diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 0af5b29..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -# These are supported funding model platforms - -github: [standardnotes] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index b6edeca..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: bug, needs triage -assignees: TheodoreChu - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 11fc491..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: enhancement -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 24e8326..0000000 --- a/.gitignore +++ /dev/null @@ -1,130 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -#### Copied from Create React App #### - -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 544138b..0000000 --- a/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "singleQuote": true -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 4d3d7b9..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Chrome", - "type": "chrome", - "request": "launch", - "url": "http://localhost:3001", - "webRoot": "${workspaceFolder}/src", - "sourceMapPathOverrides": { - "webpack:///src/*": "${webRoot}/*" - } - } - ] -} diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 0ad25db..0000000 --- a/LICENSE +++ /dev/null @@ -1,661 +0,0 @@ - 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 -. diff --git a/public/LICENSE.txt b/LICENSE.txt similarity index 100% rename from public/LICENSE.txt rename to LICENSE.txt diff --git a/README.md b/README.md deleted file mode 100644 index fc40bec..0000000 --- a/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# Code Pro for Standard Notes - -Code Pro is a [derived editor](https://standardnotes.org/help/77/what-are-editors) for [Standard Notes](https://standardnotes.org), a free, [open-source](https://standardnotes.org/knowledge/5/what-is-free-and-open-source-software), and [end-to-end encrypted](https://standardnotes.org/knowledge/2/what-is-end-to-end-encryption) notes app. - -Code Pro is a code editor powered by the [Monaco Editor](https://microsoft.github.io/monaco-editor/) (Visual Studio Code). It is meant for writing Markdown and 60 other programming languages. - -Code Pro is not meant to be used on mobile devices. - -## Features - -- Syntax highlighting for Markdown and more than 60 other programming languages - - Languages supported: abap, aes, apex, azcli, bat, c, cameligo, clojure, coffeescript, cpp, csharp, csp, css, dart, dockerfile, fsharp, go, graphql, handlebars, hcl, html, ini, java, javascript, json, julia, kotlin, less, lexon, lua, markdown, mips, msdax, mysql, objective-c, pascal, pascaligo, perl, pgsql, php, plaintext, postiats, powerquery, powershell, pug, python, r, razor, redis, redshift, restructuredtext, ruby, rust, sb, scala, scheme, scss, shell, sol, sql, st, swift, systemverilog, tcl, twig, typescript, vb, verilog, xml, yaml -- Autocompletion -- Intelligent autocompletion for CSS, JavaScript, JSON, Less, Handlebars, HTML, Razor, SCSS, and TypeScript -- Sophisticated search and replace -- Prettier formatting for CSS, GraphQL, Markdown, HTML, JavaScript, Less, TypeScript, Sass, and Yaml. Built-in formatting for JSON. -- Settings: language, font size, tab size (`2` or `4`), theme (light, dark, high contrast, or SN themed), and word wrap (`on`, `off`, and `bounded`) -- Per-note settings -- Buttons to save and load default settings - -## Keyboard Shortcuts - -Perform these shortcuts with the editor - -| Action | Shortcut | -| :-------------------------------------------------------------- | :----------------------------------------------- | -| Toggle word wrap between `on` and `off` (bounded is unaffected) | Alt + Z | -| Format code with Prettier^ | Shift + Alt + F | -| Toggle Tab Key Moves Focus (vs tab spacing) | Ctrl/⌘ + M | - -^ For CSS, GraphQL, Markdown, HTML, JavaScript, Less, TypeScript, Sass, and Yaml. Some languages, such as JSON, have built-in formatters. - -Each time the editor refreshes (e.g., toggling word wrap, formatting code), the editor remembers your position (line number and column) and centers it on the screen if it's not already in focus. - -## Settings - -The settings for each note are saved automatically after they are changed. Loading default settings will sync the note's settings with the default settings and save automatically. - -### Themes - -The Monaco Editor comes with three themes: `vs` (a white/light theme), `vs-dark` (a dark theme like the default theme for VS Code), and `hc-black` (a high contrast dark theme). There is also one more option: `sn-theme`. The `sn-theme` option takes either `vs` or `vs-dark` depending on your system theme and adjusts some of the colors (e.g., link colors) to match the theme. The `sn-theme` is still a work-in-progress. - -## Development - -**Prerequisites:** Install [Node.js](https://nodejs.org/en/), [Yarn](https://classic.yarnpkg.com/en/docs/install/), and [Git](https://github.com/git-guides/install-git) on your computer. - -The general instructions setting up an environment to develop Standard Notes extensions can be found [here](https://docs.standardnotes.org/extensions/local-setup). You can also follow these instructions: - -1. Fork the [repository](https://github.com/standardnotes/code-pro) on GitHub. -2. [Clone](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) your fork of the repository. -3. Run `cd code-pro` to enter the `code-pro` directory. -4. Run `yarn install` to install the dependencies on your machine as they are described in `yarn.lock`. - -### Testing in the browser - -1. To run the app in development mode, run `yarn start` and visit http://localhost:3001. Press `ctrl/cmd + C` to exit development mode. - -### Testing in the Standard Notes app - -1. Create an `ext.json` in the `public` directory. You have three options: - 1. Use `sample.ext.json`. - 2. Create `ext.json` as a copy of `sample.ext.json`. - 3. Follow the instructions [here](https://docs.standardnotes.org/extensions/local-setup) with `url: "http://localhost:3000/index.html"`. -2. Install http-server using `sudo npm install -g http-server` then run `yarn server` to serve the `./build` directory at http://localhost:3000. -3. To build the app, run `yarn build`. -4. Install the editor into the [web](https://app.standardnotes.org) or [desktop](https://standardnotes.org/download) app with `http://localhost:3000/sample.ext.json` or with your custom `ext.json`. Press `ctrl/cmd + C` to shut down the server. - -### Deployment - -1. To make the source code prettier, run `yarn pretty`. -2. To the deploy the build into the `gh-pages` branch of your repository on GitHub, run `yarn deploy-stable`. -3. To deploy the build into to the `dev` branch for testing, run `yarn deploy-dev`. -4. To deploy the built into the `build` branch for distributing, run `yarn deploy-build` for distributing builds. - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -### Available Scripts - -In the project directory, you can run: - -#### `yarn start` - -Runs the app in the development mode.\ -Open [http://localhost:3001](http://localhost:3001) to view it in the browser. - -The page will reload if you make edits.\ -You will also see any lint errors in the console. - -#### `yarn test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -#### `yarn build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -#### `yarn eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -### Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). diff --git a/public/README.txt b/README.txt similarity index 100% rename from public/README.txt rename to README.txt diff --git a/asset-manifest.json b/asset-manifest.json new file mode 100644 index 0000000..b5c8bb4 --- /dev/null +++ b/asset-manifest.json @@ -0,0 +1,171 @@ +{ + "files": { + "static/js/0.fbc33ed6.chunk.js": "./static/js/0.fbc33ed6.chunk.js", + "static/js/0.fbc33ed6.chunk.js.map": "./static/js/0.fbc33ed6.chunk.js.map", + "static/js/1.95675e55.chunk.js": "./static/js/1.95675e55.chunk.js", + "static/js/1.95675e55.chunk.js.map": "./static/js/1.95675e55.chunk.js.map", + "main.css": "./static/css/main.61f56e2a.chunk.css", + "main.js": "./static/js/main.66e088a3.chunk.js", + "main.js.map": "./static/js/main.66e088a3.chunk.js.map", + "runtime-main.js": "./static/js/runtime-main.6f4bdf85.js", + "runtime-main.js.map": "./static/js/runtime-main.6f4bdf85.js.map", + "static/css/4.1b641094.chunk.css": "./static/css/4.1b641094.chunk.css", + "static/js/4.dda9952f.chunk.js": "./static/js/4.dda9952f.chunk.js", + "static/js/4.dda9952f.chunk.js.map": "./static/js/4.dda9952f.chunk.js.map", + "static/js/5.1f50f185.chunk.js": "./static/js/5.1f50f185.chunk.js", + "static/js/5.1f50f185.chunk.js.map": "./static/js/5.1f50f185.chunk.js.map", + "static/js/6.f06f2c42.chunk.js": "./static/js/6.f06f2c42.chunk.js", + "static/js/6.f06f2c42.chunk.js.map": "./static/js/6.f06f2c42.chunk.js.map", + "static/js/7.06183952.chunk.js": "./static/js/7.06183952.chunk.js", + "static/js/7.06183952.chunk.js.map": "./static/js/7.06183952.chunk.js.map", + "static/js/8.d710b43d.chunk.js": "./static/js/8.d710b43d.chunk.js", + "static/js/8.d710b43d.chunk.js.map": "./static/js/8.d710b43d.chunk.js.map", + "static/js/9.31808254.chunk.js": "./static/js/9.31808254.chunk.js", + "static/js/9.31808254.chunk.js.map": "./static/js/9.31808254.chunk.js.map", + "static/js/10.1257e231.chunk.js": "./static/js/10.1257e231.chunk.js", + "static/js/10.1257e231.chunk.js.map": "./static/js/10.1257e231.chunk.js.map", + "static/js/11.3f7676ec.chunk.js": "./static/js/11.3f7676ec.chunk.js", + "static/js/11.3f7676ec.chunk.js.map": "./static/js/11.3f7676ec.chunk.js.map", + "static/js/12.20b3a26e.chunk.js": "./static/js/12.20b3a26e.chunk.js", + "static/js/12.20b3a26e.chunk.js.map": "./static/js/12.20b3a26e.chunk.js.map", + "static/js/13.df305cad.chunk.js": "./static/js/13.df305cad.chunk.js", + "static/js/13.df305cad.chunk.js.map": "./static/js/13.df305cad.chunk.js.map", + "static/js/14.6283d4e9.chunk.js": "./static/js/14.6283d4e9.chunk.js", + "static/js/14.6283d4e9.chunk.js.map": "./static/js/14.6283d4e9.chunk.js.map", + "static/js/15.bbec87c9.chunk.js": "./static/js/15.bbec87c9.chunk.js", + "static/js/15.bbec87c9.chunk.js.map": "./static/js/15.bbec87c9.chunk.js.map", + "static/js/16.a8325dea.chunk.js": "./static/js/16.a8325dea.chunk.js", + "static/js/16.a8325dea.chunk.js.map": "./static/js/16.a8325dea.chunk.js.map", + "static/js/17.32789fd3.chunk.js": "./static/js/17.32789fd3.chunk.js", + "static/js/17.32789fd3.chunk.js.map": "./static/js/17.32789fd3.chunk.js.map", + "static/js/18.28fd2809.chunk.js": "./static/js/18.28fd2809.chunk.js", + "static/js/18.28fd2809.chunk.js.map": "./static/js/18.28fd2809.chunk.js.map", + "static/js/19.fd734e84.chunk.js": "./static/js/19.fd734e84.chunk.js", + "static/js/19.fd734e84.chunk.js.map": "./static/js/19.fd734e84.chunk.js.map", + "static/js/20.8b23b789.chunk.js": "./static/js/20.8b23b789.chunk.js", + "static/js/20.8b23b789.chunk.js.map": "./static/js/20.8b23b789.chunk.js.map", + "static/js/21.73273ed9.chunk.js": "./static/js/21.73273ed9.chunk.js", + "static/js/21.73273ed9.chunk.js.map": "./static/js/21.73273ed9.chunk.js.map", + "static/js/22.0553122e.chunk.js": "./static/js/22.0553122e.chunk.js", + "static/js/22.0553122e.chunk.js.map": "./static/js/22.0553122e.chunk.js.map", + "static/js/23.acc0d03a.chunk.js": "./static/js/23.acc0d03a.chunk.js", + "static/js/23.acc0d03a.chunk.js.map": "./static/js/23.acc0d03a.chunk.js.map", + "static/js/24.de1031c4.chunk.js": "./static/js/24.de1031c4.chunk.js", + "static/js/24.de1031c4.chunk.js.map": "./static/js/24.de1031c4.chunk.js.map", + "static/js/25.d24eb6df.chunk.js": "./static/js/25.d24eb6df.chunk.js", + "static/js/25.d24eb6df.chunk.js.map": "./static/js/25.d24eb6df.chunk.js.map", + "static/js/26.42e6b1ab.chunk.js": "./static/js/26.42e6b1ab.chunk.js", + "static/js/26.42e6b1ab.chunk.js.map": "./static/js/26.42e6b1ab.chunk.js.map", + "static/js/27.dd675da1.chunk.js": "./static/js/27.dd675da1.chunk.js", + "static/js/27.dd675da1.chunk.js.map": "./static/js/27.dd675da1.chunk.js.map", + "static/js/28.8e51ca3b.chunk.js": "./static/js/28.8e51ca3b.chunk.js", + "static/js/28.8e51ca3b.chunk.js.map": "./static/js/28.8e51ca3b.chunk.js.map", + "static/js/29.79604051.chunk.js": "./static/js/29.79604051.chunk.js", + "static/js/29.79604051.chunk.js.map": "./static/js/29.79604051.chunk.js.map", + "static/js/30.c0502858.chunk.js": "./static/js/30.c0502858.chunk.js", + "static/js/30.c0502858.chunk.js.map": "./static/js/30.c0502858.chunk.js.map", + "static/js/31.fd45096d.chunk.js": "./static/js/31.fd45096d.chunk.js", + "static/js/31.fd45096d.chunk.js.map": "./static/js/31.fd45096d.chunk.js.map", + "static/js/32.9e90179c.chunk.js": "./static/js/32.9e90179c.chunk.js", + "static/js/32.9e90179c.chunk.js.map": "./static/js/32.9e90179c.chunk.js.map", + "static/js/33.dffb1041.chunk.js": "./static/js/33.dffb1041.chunk.js", + "static/js/33.dffb1041.chunk.js.map": "./static/js/33.dffb1041.chunk.js.map", + "static/js/34.ca8e1080.chunk.js": "./static/js/34.ca8e1080.chunk.js", + "static/js/34.ca8e1080.chunk.js.map": "./static/js/34.ca8e1080.chunk.js.map", + "static/js/35.e8728aa9.chunk.js": "./static/js/35.e8728aa9.chunk.js", + "static/js/35.e8728aa9.chunk.js.map": "./static/js/35.e8728aa9.chunk.js.map", + "static/js/36.02972db8.chunk.js": "./static/js/36.02972db8.chunk.js", + "static/js/36.02972db8.chunk.js.map": "./static/js/36.02972db8.chunk.js.map", + "static/js/37.1eed4be9.chunk.js": "./static/js/37.1eed4be9.chunk.js", + "static/js/37.1eed4be9.chunk.js.map": "./static/js/37.1eed4be9.chunk.js.map", + "static/js/38.04dabaef.chunk.js": "./static/js/38.04dabaef.chunk.js", + "static/js/38.04dabaef.chunk.js.map": "./static/js/38.04dabaef.chunk.js.map", + "static/js/39.20c1603a.chunk.js": "./static/js/39.20c1603a.chunk.js", + "static/js/39.20c1603a.chunk.js.map": "./static/js/39.20c1603a.chunk.js.map", + "static/js/40.9d1672e5.chunk.js": "./static/js/40.9d1672e5.chunk.js", + "static/js/40.9d1672e5.chunk.js.map": "./static/js/40.9d1672e5.chunk.js.map", + "static/js/41.4e3d29ee.chunk.js": "./static/js/41.4e3d29ee.chunk.js", + "static/js/41.4e3d29ee.chunk.js.map": "./static/js/41.4e3d29ee.chunk.js.map", + "static/js/42.870da971.chunk.js": "./static/js/42.870da971.chunk.js", + "static/js/42.870da971.chunk.js.map": "./static/js/42.870da971.chunk.js.map", + "static/js/43.e339433d.chunk.js": "./static/js/43.e339433d.chunk.js", + "static/js/43.e339433d.chunk.js.map": "./static/js/43.e339433d.chunk.js.map", + "static/js/44.e7b0f3c3.chunk.js": "./static/js/44.e7b0f3c3.chunk.js", + "static/js/44.e7b0f3c3.chunk.js.map": "./static/js/44.e7b0f3c3.chunk.js.map", + "static/js/45.33167b20.chunk.js": "./static/js/45.33167b20.chunk.js", + "static/js/45.33167b20.chunk.js.map": "./static/js/45.33167b20.chunk.js.map", + "static/js/46.2faf9383.chunk.js": "./static/js/46.2faf9383.chunk.js", + "static/js/46.2faf9383.chunk.js.map": "./static/js/46.2faf9383.chunk.js.map", + "static/js/47.84840d3d.chunk.js": "./static/js/47.84840d3d.chunk.js", + "static/js/47.84840d3d.chunk.js.map": "./static/js/47.84840d3d.chunk.js.map", + "static/js/48.ff55e973.chunk.js": "./static/js/48.ff55e973.chunk.js", + "static/js/48.ff55e973.chunk.js.map": "./static/js/48.ff55e973.chunk.js.map", + "static/js/49.2d777778.chunk.js": "./static/js/49.2d777778.chunk.js", + "static/js/49.2d777778.chunk.js.map": "./static/js/49.2d777778.chunk.js.map", + "static/js/50.c31630c5.chunk.js": "./static/js/50.c31630c5.chunk.js", + "static/js/50.c31630c5.chunk.js.map": "./static/js/50.c31630c5.chunk.js.map", + "static/js/51.5e133f85.chunk.js": "./static/js/51.5e133f85.chunk.js", + "static/js/51.5e133f85.chunk.js.map": "./static/js/51.5e133f85.chunk.js.map", + "static/js/52.d0ae1e6d.chunk.js": "./static/js/52.d0ae1e6d.chunk.js", + "static/js/52.d0ae1e6d.chunk.js.map": "./static/js/52.d0ae1e6d.chunk.js.map", + "static/js/53.a8265110.chunk.js": "./static/js/53.a8265110.chunk.js", + "static/js/53.a8265110.chunk.js.map": "./static/js/53.a8265110.chunk.js.map", + "static/js/54.e89b003b.chunk.js": "./static/js/54.e89b003b.chunk.js", + "static/js/54.e89b003b.chunk.js.map": "./static/js/54.e89b003b.chunk.js.map", + "static/js/55.35df46c1.chunk.js": "./static/js/55.35df46c1.chunk.js", + "static/js/55.35df46c1.chunk.js.map": "./static/js/55.35df46c1.chunk.js.map", + "static/js/56.6f3dcfcd.chunk.js": "./static/js/56.6f3dcfcd.chunk.js", + "static/js/56.6f3dcfcd.chunk.js.map": "./static/js/56.6f3dcfcd.chunk.js.map", + "static/js/57.c44ca460.chunk.js": "./static/js/57.c44ca460.chunk.js", + "static/js/57.c44ca460.chunk.js.map": "./static/js/57.c44ca460.chunk.js.map", + "static/js/58.da47e291.chunk.js": "./static/js/58.da47e291.chunk.js", + "static/js/58.da47e291.chunk.js.map": "./static/js/58.da47e291.chunk.js.map", + "static/js/59.53c546b9.chunk.js": "./static/js/59.53c546b9.chunk.js", + "static/js/59.53c546b9.chunk.js.map": "./static/js/59.53c546b9.chunk.js.map", + "static/js/60.5c9efba4.chunk.js": "./static/js/60.5c9efba4.chunk.js", + "static/js/60.5c9efba4.chunk.js.map": "./static/js/60.5c9efba4.chunk.js.map", + "static/js/61.ec85f8d9.chunk.js": "./static/js/61.ec85f8d9.chunk.js", + "static/js/61.ec85f8d9.chunk.js.map": "./static/js/61.ec85f8d9.chunk.js.map", + "static/js/62.20911d7b.chunk.js": "./static/js/62.20911d7b.chunk.js", + "static/js/62.20911d7b.chunk.js.map": "./static/js/62.20911d7b.chunk.js.map", + "static/js/63.44dc306d.chunk.js": "./static/js/63.44dc306d.chunk.js", + "static/js/63.44dc306d.chunk.js.map": "./static/js/63.44dc306d.chunk.js.map", + "static/js/64.53954008.chunk.js": "./static/js/64.53954008.chunk.js", + "static/js/64.53954008.chunk.js.map": "./static/js/64.53954008.chunk.js.map", + "static/js/65.85e803af.chunk.js": "./static/js/65.85e803af.chunk.js", + "static/js/65.85e803af.chunk.js.map": "./static/js/65.85e803af.chunk.js.map", + "static/js/66.cf6f6f39.chunk.js": "./static/js/66.cf6f6f39.chunk.js", + "static/js/66.cf6f6f39.chunk.js.map": "./static/js/66.cf6f6f39.chunk.js.map", + "static/js/67.4639baeb.chunk.js": "./static/js/67.4639baeb.chunk.js", + "static/js/67.4639baeb.chunk.js.map": "./static/js/67.4639baeb.chunk.js.map", + "static/js/68.6a62dd84.chunk.js": "./static/js/68.6a62dd84.chunk.js", + "static/js/68.6a62dd84.chunk.js.map": "./static/js/68.6a62dd84.chunk.js.map", + "static/js/69.7bffdc00.chunk.js": "./static/js/69.7bffdc00.chunk.js", + "static/js/69.7bffdc00.chunk.js.map": "./static/js/69.7bffdc00.chunk.js.map", + "static/js/70.701dd604.chunk.js": "./static/js/70.701dd604.chunk.js", + "static/js/70.701dd604.chunk.js.map": "./static/js/70.701dd604.chunk.js.map", + "static/js/71.bf0fe696.chunk.js": "./static/js/71.bf0fe696.chunk.js", + "static/js/71.bf0fe696.chunk.js.map": "./static/js/71.bf0fe696.chunk.js.map", + "static/js/72.4fdd6179.chunk.js": "./static/js/72.4fdd6179.chunk.js", + "static/js/72.4fdd6179.chunk.js.map": "./static/js/72.4fdd6179.chunk.js.map", + "static/js/73.9c4e0942.chunk.js": "./static/js/73.9c4e0942.chunk.js", + "static/js/73.9c4e0942.chunk.js.map": "./static/js/73.9c4e0942.chunk.js.map", + "static/js/74.8854e200.chunk.js": "./static/js/74.8854e200.chunk.js", + "static/js/74.8854e200.chunk.js.map": "./static/js/74.8854e200.chunk.js.map", + "static/js/75.b9858823.chunk.js": "./static/js/75.b9858823.chunk.js", + "static/js/75.b9858823.chunk.js.map": "./static/js/75.b9858823.chunk.js.map", + "index.html": "./index.html", + "static/css/4.1b641094.chunk.css.map": "./static/css/4.1b641094.chunk.css.map", + "static/css/main.61f56e2a.chunk.css.map": "./static/css/main.61f56e2a.chunk.css.map", + "static/js/4.dda9952f.chunk.js.LICENSE.txt": "./static/js/4.dda9952f.chunk.js.LICENSE.txt", + "static/js/67.4639baeb.chunk.js.LICENSE.txt": "./static/js/67.4639baeb.chunk.js.LICENSE.txt", + "static/media/codicon.css": "./static/media/codicon.4168b9c1.ttf" + }, + "entrypoints": [ + "static/js/runtime-main.6f4bdf85.js", + "static/css/4.1b641094.chunk.css", + "static/js/4.dda9952f.chunk.js", + "static/css/main.61f56e2a.chunk.css", + "static/js/main.66e088a3.chunk.js" + ] +} \ No newline at end of file diff --git a/public/favicon.ico b/favicon.ico similarity index 100% rename from public/favicon.ico rename to favicon.ico diff --git a/public/ic-code-tags-16.png b/ic-code-tags-16.png similarity index 100% rename from public/ic-code-tags-16.png rename to ic-code-tags-16.png diff --git a/public/ic-code-tags-192.png b/ic-code-tags-192.png similarity index 100% rename from public/ic-code-tags-192.png rename to ic-code-tags-192.png diff --git a/public/ic-code-tags-32.png b/ic-code-tags-32.png similarity index 100% rename from public/ic-code-tags-32.png rename to ic-code-tags-32.png diff --git a/public/ic-code-tags-48.png b/ic-code-tags-48.png similarity index 100% rename from public/ic-code-tags-48.png rename to ic-code-tags-48.png diff --git a/public/ic-code-tags-512.png b/ic-code-tags-512.png similarity index 100% rename from public/ic-code-tags-512.png rename to ic-code-tags-512.png diff --git a/public/ic-code-tags-64.png b/ic-code-tags-64.png similarity index 100% rename from public/ic-code-tags-64.png rename to ic-code-tags-64.png diff --git a/public/ic-code-tags.svg b/ic-code-tags.svg similarity index 100% rename from public/ic-code-tags.svg rename to ic-code-tags.svg diff --git a/index.html b/index.html new file mode 100644 index 0000000..9951c63 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +Code Pro
\ No newline at end of file diff --git a/public/katex/v0.12.0/README.md b/katex/v0.12.0/README.md similarity index 100% rename from public/katex/v0.12.0/README.md rename to katex/v0.12.0/README.md diff --git a/public/katex/v0.12.0/contrib/auto-render.js b/katex/v0.12.0/contrib/auto-render.js similarity index 100% rename from public/katex/v0.12.0/contrib/auto-render.js rename to katex/v0.12.0/contrib/auto-render.js diff --git a/public/katex/v0.12.0/contrib/auto-render.min.js b/katex/v0.12.0/contrib/auto-render.min.js similarity index 100% rename from public/katex/v0.12.0/contrib/auto-render.min.js rename to katex/v0.12.0/contrib/auto-render.min.js diff --git a/public/katex/v0.12.0/contrib/auto-render.mjs b/katex/v0.12.0/contrib/auto-render.mjs similarity index 100% rename from public/katex/v0.12.0/contrib/auto-render.mjs rename to katex/v0.12.0/contrib/auto-render.mjs diff --git a/public/katex/v0.12.0/contrib/copy-tex.css b/katex/v0.12.0/contrib/copy-tex.css similarity index 100% rename from public/katex/v0.12.0/contrib/copy-tex.css rename to katex/v0.12.0/contrib/copy-tex.css diff --git a/public/katex/v0.12.0/contrib/copy-tex.js b/katex/v0.12.0/contrib/copy-tex.js similarity index 100% rename from public/katex/v0.12.0/contrib/copy-tex.js rename to katex/v0.12.0/contrib/copy-tex.js diff --git a/public/katex/v0.12.0/contrib/copy-tex.min.css b/katex/v0.12.0/contrib/copy-tex.min.css similarity index 100% rename from public/katex/v0.12.0/contrib/copy-tex.min.css rename to katex/v0.12.0/contrib/copy-tex.min.css diff --git a/public/katex/v0.12.0/contrib/copy-tex.min.js b/katex/v0.12.0/contrib/copy-tex.min.js similarity index 100% rename from public/katex/v0.12.0/contrib/copy-tex.min.js rename to katex/v0.12.0/contrib/copy-tex.min.js diff --git a/public/katex/v0.12.0/contrib/copy-tex.mjs b/katex/v0.12.0/contrib/copy-tex.mjs similarity index 100% rename from public/katex/v0.12.0/contrib/copy-tex.mjs rename to katex/v0.12.0/contrib/copy-tex.mjs diff --git a/public/katex/v0.12.0/contrib/mathtex-script-type.js b/katex/v0.12.0/contrib/mathtex-script-type.js similarity index 100% rename from public/katex/v0.12.0/contrib/mathtex-script-type.js rename to katex/v0.12.0/contrib/mathtex-script-type.js diff --git a/public/katex/v0.12.0/contrib/mathtex-script-type.min.js b/katex/v0.12.0/contrib/mathtex-script-type.min.js similarity index 100% rename from public/katex/v0.12.0/contrib/mathtex-script-type.min.js rename to katex/v0.12.0/contrib/mathtex-script-type.min.js diff --git a/public/katex/v0.12.0/contrib/mathtex-script-type.mjs b/katex/v0.12.0/contrib/mathtex-script-type.mjs similarity index 100% rename from public/katex/v0.12.0/contrib/mathtex-script-type.mjs rename to katex/v0.12.0/contrib/mathtex-script-type.mjs diff --git a/public/katex/v0.12.0/contrib/mhchem.js b/katex/v0.12.0/contrib/mhchem.js similarity index 100% rename from public/katex/v0.12.0/contrib/mhchem.js rename to katex/v0.12.0/contrib/mhchem.js diff --git a/public/katex/v0.12.0/contrib/mhchem.min.js b/katex/v0.12.0/contrib/mhchem.min.js similarity index 100% rename from public/katex/v0.12.0/contrib/mhchem.min.js rename to katex/v0.12.0/contrib/mhchem.min.js diff --git a/public/katex/v0.12.0/contrib/mhchem.mjs b/katex/v0.12.0/contrib/mhchem.mjs similarity index 100% rename from public/katex/v0.12.0/contrib/mhchem.mjs rename to katex/v0.12.0/contrib/mhchem.mjs diff --git a/public/katex/v0.12.0/contrib/render-a11y-string.js b/katex/v0.12.0/contrib/render-a11y-string.js similarity index 100% rename from public/katex/v0.12.0/contrib/render-a11y-string.js rename to katex/v0.12.0/contrib/render-a11y-string.js diff --git a/public/katex/v0.12.0/contrib/render-a11y-string.min.js b/katex/v0.12.0/contrib/render-a11y-string.min.js similarity index 100% rename from public/katex/v0.12.0/contrib/render-a11y-string.min.js rename to katex/v0.12.0/contrib/render-a11y-string.min.js diff --git a/public/katex/v0.12.0/contrib/render-a11y-string.mjs b/katex/v0.12.0/contrib/render-a11y-string.mjs similarity index 100% rename from public/katex/v0.12.0/contrib/render-a11y-string.mjs rename to katex/v0.12.0/contrib/render-a11y-string.mjs diff --git a/public/katex/v0.12.0/fonts/KaTeX_AMS-Regular.ttf b/katex/v0.12.0/fonts/KaTeX_AMS-Regular.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_AMS-Regular.ttf rename to katex/v0.12.0/fonts/KaTeX_AMS-Regular.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_AMS-Regular.woff b/katex/v0.12.0/fonts/KaTeX_AMS-Regular.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_AMS-Regular.woff rename to katex/v0.12.0/fonts/KaTeX_AMS-Regular.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_AMS-Regular.woff2 b/katex/v0.12.0/fonts/KaTeX_AMS-Regular.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_AMS-Regular.woff2 rename to katex/v0.12.0/fonts/KaTeX_AMS-Regular.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Caligraphic-Bold.ttf b/katex/v0.12.0/fonts/KaTeX_Caligraphic-Bold.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Caligraphic-Bold.ttf rename to katex/v0.12.0/fonts/KaTeX_Caligraphic-Bold.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Caligraphic-Bold.woff b/katex/v0.12.0/fonts/KaTeX_Caligraphic-Bold.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Caligraphic-Bold.woff rename to katex/v0.12.0/fonts/KaTeX_Caligraphic-Bold.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Caligraphic-Bold.woff2 b/katex/v0.12.0/fonts/KaTeX_Caligraphic-Bold.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Caligraphic-Bold.woff2 rename to katex/v0.12.0/fonts/KaTeX_Caligraphic-Bold.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Caligraphic-Regular.ttf b/katex/v0.12.0/fonts/KaTeX_Caligraphic-Regular.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Caligraphic-Regular.ttf rename to katex/v0.12.0/fonts/KaTeX_Caligraphic-Regular.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Caligraphic-Regular.woff b/katex/v0.12.0/fonts/KaTeX_Caligraphic-Regular.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Caligraphic-Regular.woff rename to katex/v0.12.0/fonts/KaTeX_Caligraphic-Regular.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Caligraphic-Regular.woff2 b/katex/v0.12.0/fonts/KaTeX_Caligraphic-Regular.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Caligraphic-Regular.woff2 rename to katex/v0.12.0/fonts/KaTeX_Caligraphic-Regular.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Fraktur-Bold.ttf b/katex/v0.12.0/fonts/KaTeX_Fraktur-Bold.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Fraktur-Bold.ttf rename to katex/v0.12.0/fonts/KaTeX_Fraktur-Bold.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Fraktur-Bold.woff b/katex/v0.12.0/fonts/KaTeX_Fraktur-Bold.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Fraktur-Bold.woff rename to katex/v0.12.0/fonts/KaTeX_Fraktur-Bold.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Fraktur-Bold.woff2 b/katex/v0.12.0/fonts/KaTeX_Fraktur-Bold.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Fraktur-Bold.woff2 rename to katex/v0.12.0/fonts/KaTeX_Fraktur-Bold.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Fraktur-Regular.ttf b/katex/v0.12.0/fonts/KaTeX_Fraktur-Regular.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Fraktur-Regular.ttf rename to katex/v0.12.0/fonts/KaTeX_Fraktur-Regular.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Fraktur-Regular.woff b/katex/v0.12.0/fonts/KaTeX_Fraktur-Regular.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Fraktur-Regular.woff rename to katex/v0.12.0/fonts/KaTeX_Fraktur-Regular.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Fraktur-Regular.woff2 b/katex/v0.12.0/fonts/KaTeX_Fraktur-Regular.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Fraktur-Regular.woff2 rename to katex/v0.12.0/fonts/KaTeX_Fraktur-Regular.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Main-Bold.ttf b/katex/v0.12.0/fonts/KaTeX_Main-Bold.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Main-Bold.ttf rename to katex/v0.12.0/fonts/KaTeX_Main-Bold.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Main-Bold.woff b/katex/v0.12.0/fonts/KaTeX_Main-Bold.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Main-Bold.woff rename to katex/v0.12.0/fonts/KaTeX_Main-Bold.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Main-Bold.woff2 b/katex/v0.12.0/fonts/KaTeX_Main-Bold.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Main-Bold.woff2 rename to katex/v0.12.0/fonts/KaTeX_Main-Bold.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Main-BoldItalic.ttf b/katex/v0.12.0/fonts/KaTeX_Main-BoldItalic.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Main-BoldItalic.ttf rename to katex/v0.12.0/fonts/KaTeX_Main-BoldItalic.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Main-BoldItalic.woff b/katex/v0.12.0/fonts/KaTeX_Main-BoldItalic.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Main-BoldItalic.woff rename to katex/v0.12.0/fonts/KaTeX_Main-BoldItalic.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Main-BoldItalic.woff2 b/katex/v0.12.0/fonts/KaTeX_Main-BoldItalic.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Main-BoldItalic.woff2 rename to katex/v0.12.0/fonts/KaTeX_Main-BoldItalic.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Main-Italic.ttf b/katex/v0.12.0/fonts/KaTeX_Main-Italic.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Main-Italic.ttf rename to katex/v0.12.0/fonts/KaTeX_Main-Italic.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Main-Italic.woff b/katex/v0.12.0/fonts/KaTeX_Main-Italic.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Main-Italic.woff rename to katex/v0.12.0/fonts/KaTeX_Main-Italic.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Main-Italic.woff2 b/katex/v0.12.0/fonts/KaTeX_Main-Italic.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Main-Italic.woff2 rename to katex/v0.12.0/fonts/KaTeX_Main-Italic.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Main-Regular.ttf b/katex/v0.12.0/fonts/KaTeX_Main-Regular.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Main-Regular.ttf rename to katex/v0.12.0/fonts/KaTeX_Main-Regular.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Main-Regular.woff b/katex/v0.12.0/fonts/KaTeX_Main-Regular.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Main-Regular.woff rename to katex/v0.12.0/fonts/KaTeX_Main-Regular.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Main-Regular.woff2 b/katex/v0.12.0/fonts/KaTeX_Main-Regular.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Main-Regular.woff2 rename to katex/v0.12.0/fonts/KaTeX_Main-Regular.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Math-BoldItalic.ttf b/katex/v0.12.0/fonts/KaTeX_Math-BoldItalic.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Math-BoldItalic.ttf rename to katex/v0.12.0/fonts/KaTeX_Math-BoldItalic.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Math-BoldItalic.woff b/katex/v0.12.0/fonts/KaTeX_Math-BoldItalic.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Math-BoldItalic.woff rename to katex/v0.12.0/fonts/KaTeX_Math-BoldItalic.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Math-BoldItalic.woff2 b/katex/v0.12.0/fonts/KaTeX_Math-BoldItalic.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Math-BoldItalic.woff2 rename to katex/v0.12.0/fonts/KaTeX_Math-BoldItalic.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Math-Italic.ttf b/katex/v0.12.0/fonts/KaTeX_Math-Italic.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Math-Italic.ttf rename to katex/v0.12.0/fonts/KaTeX_Math-Italic.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Math-Italic.woff b/katex/v0.12.0/fonts/KaTeX_Math-Italic.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Math-Italic.woff rename to katex/v0.12.0/fonts/KaTeX_Math-Italic.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Math-Italic.woff2 b/katex/v0.12.0/fonts/KaTeX_Math-Italic.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Math-Italic.woff2 rename to katex/v0.12.0/fonts/KaTeX_Math-Italic.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_SansSerif-Bold.ttf b/katex/v0.12.0/fonts/KaTeX_SansSerif-Bold.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_SansSerif-Bold.ttf rename to katex/v0.12.0/fonts/KaTeX_SansSerif-Bold.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_SansSerif-Bold.woff b/katex/v0.12.0/fonts/KaTeX_SansSerif-Bold.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_SansSerif-Bold.woff rename to katex/v0.12.0/fonts/KaTeX_SansSerif-Bold.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_SansSerif-Bold.woff2 b/katex/v0.12.0/fonts/KaTeX_SansSerif-Bold.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_SansSerif-Bold.woff2 rename to katex/v0.12.0/fonts/KaTeX_SansSerif-Bold.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_SansSerif-Italic.ttf b/katex/v0.12.0/fonts/KaTeX_SansSerif-Italic.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_SansSerif-Italic.ttf rename to katex/v0.12.0/fonts/KaTeX_SansSerif-Italic.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_SansSerif-Italic.woff b/katex/v0.12.0/fonts/KaTeX_SansSerif-Italic.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_SansSerif-Italic.woff rename to katex/v0.12.0/fonts/KaTeX_SansSerif-Italic.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_SansSerif-Italic.woff2 b/katex/v0.12.0/fonts/KaTeX_SansSerif-Italic.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_SansSerif-Italic.woff2 rename to katex/v0.12.0/fonts/KaTeX_SansSerif-Italic.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_SansSerif-Regular.ttf b/katex/v0.12.0/fonts/KaTeX_SansSerif-Regular.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_SansSerif-Regular.ttf rename to katex/v0.12.0/fonts/KaTeX_SansSerif-Regular.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_SansSerif-Regular.woff b/katex/v0.12.0/fonts/KaTeX_SansSerif-Regular.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_SansSerif-Regular.woff rename to katex/v0.12.0/fonts/KaTeX_SansSerif-Regular.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_SansSerif-Regular.woff2 b/katex/v0.12.0/fonts/KaTeX_SansSerif-Regular.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_SansSerif-Regular.woff2 rename to katex/v0.12.0/fonts/KaTeX_SansSerif-Regular.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Script-Regular.ttf b/katex/v0.12.0/fonts/KaTeX_Script-Regular.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Script-Regular.ttf rename to katex/v0.12.0/fonts/KaTeX_Script-Regular.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Script-Regular.woff b/katex/v0.12.0/fonts/KaTeX_Script-Regular.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Script-Regular.woff rename to katex/v0.12.0/fonts/KaTeX_Script-Regular.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Script-Regular.woff2 b/katex/v0.12.0/fonts/KaTeX_Script-Regular.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Script-Regular.woff2 rename to katex/v0.12.0/fonts/KaTeX_Script-Regular.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Size1-Regular.ttf b/katex/v0.12.0/fonts/KaTeX_Size1-Regular.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Size1-Regular.ttf rename to katex/v0.12.0/fonts/KaTeX_Size1-Regular.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Size1-Regular.woff b/katex/v0.12.0/fonts/KaTeX_Size1-Regular.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Size1-Regular.woff rename to katex/v0.12.0/fonts/KaTeX_Size1-Regular.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Size1-Regular.woff2 b/katex/v0.12.0/fonts/KaTeX_Size1-Regular.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Size1-Regular.woff2 rename to katex/v0.12.0/fonts/KaTeX_Size1-Regular.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Size2-Regular.ttf b/katex/v0.12.0/fonts/KaTeX_Size2-Regular.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Size2-Regular.ttf rename to katex/v0.12.0/fonts/KaTeX_Size2-Regular.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Size2-Regular.woff b/katex/v0.12.0/fonts/KaTeX_Size2-Regular.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Size2-Regular.woff rename to katex/v0.12.0/fonts/KaTeX_Size2-Regular.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Size2-Regular.woff2 b/katex/v0.12.0/fonts/KaTeX_Size2-Regular.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Size2-Regular.woff2 rename to katex/v0.12.0/fonts/KaTeX_Size2-Regular.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Size3-Regular.ttf b/katex/v0.12.0/fonts/KaTeX_Size3-Regular.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Size3-Regular.ttf rename to katex/v0.12.0/fonts/KaTeX_Size3-Regular.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Size3-Regular.woff b/katex/v0.12.0/fonts/KaTeX_Size3-Regular.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Size3-Regular.woff rename to katex/v0.12.0/fonts/KaTeX_Size3-Regular.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Size3-Regular.woff2 b/katex/v0.12.0/fonts/KaTeX_Size3-Regular.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Size3-Regular.woff2 rename to katex/v0.12.0/fonts/KaTeX_Size3-Regular.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Size4-Regular.ttf b/katex/v0.12.0/fonts/KaTeX_Size4-Regular.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Size4-Regular.ttf rename to katex/v0.12.0/fonts/KaTeX_Size4-Regular.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Size4-Regular.woff b/katex/v0.12.0/fonts/KaTeX_Size4-Regular.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Size4-Regular.woff rename to katex/v0.12.0/fonts/KaTeX_Size4-Regular.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Size4-Regular.woff2 b/katex/v0.12.0/fonts/KaTeX_Size4-Regular.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Size4-Regular.woff2 rename to katex/v0.12.0/fonts/KaTeX_Size4-Regular.woff2 diff --git a/public/katex/v0.12.0/fonts/KaTeX_Typewriter-Regular.ttf b/katex/v0.12.0/fonts/KaTeX_Typewriter-Regular.ttf similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Typewriter-Regular.ttf rename to katex/v0.12.0/fonts/KaTeX_Typewriter-Regular.ttf diff --git a/public/katex/v0.12.0/fonts/KaTeX_Typewriter-Regular.woff b/katex/v0.12.0/fonts/KaTeX_Typewriter-Regular.woff similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Typewriter-Regular.woff rename to katex/v0.12.0/fonts/KaTeX_Typewriter-Regular.woff diff --git a/public/katex/v0.12.0/fonts/KaTeX_Typewriter-Regular.woff2 b/katex/v0.12.0/fonts/KaTeX_Typewriter-Regular.woff2 similarity index 100% rename from public/katex/v0.12.0/fonts/KaTeX_Typewriter-Regular.woff2 rename to katex/v0.12.0/fonts/KaTeX_Typewriter-Regular.woff2 diff --git a/public/katex/v0.12.0/katex.css b/katex/v0.12.0/katex.css similarity index 100% rename from public/katex/v0.12.0/katex.css rename to katex/v0.12.0/katex.css diff --git a/public/katex/v0.12.0/katex.js b/katex/v0.12.0/katex.js similarity index 100% rename from public/katex/v0.12.0/katex.js rename to katex/v0.12.0/katex.js diff --git a/public/katex/v0.12.0/katex.min.css b/katex/v0.12.0/katex.min.css similarity index 100% rename from public/katex/v0.12.0/katex.min.css rename to katex/v0.12.0/katex.min.css diff --git a/public/katex/v0.12.0/katex.min.js b/katex/v0.12.0/katex.min.js similarity index 100% rename from public/katex/v0.12.0/katex.min.js rename to katex/v0.12.0/katex.min.js diff --git a/public/katex/v0.12.0/katex.mjs b/katex/v0.12.0/katex.mjs similarity index 100% rename from public/katex/v0.12.0/katex.mjs rename to katex/v0.12.0/katex.mjs diff --git a/public/manifest.json b/manifest.json similarity index 100% rename from public/manifest.json rename to manifest.json diff --git a/monaco/.gitignore b/monaco/.gitignore deleted file mode 100644 index 24e8326..0000000 --- a/monaco/.gitignore +++ /dev/null @@ -1,130 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -#### Copied from Create React App #### - -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* \ No newline at end of file diff --git a/monaco/README.md b/monaco/README.md deleted file mode 100644 index 2ead54c..0000000 --- a/monaco/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Monaco Editor Workers - -This folder contains the workers required to make full use of the Monaco Editor. Build them in the `dist` folder by running `yarn run build`, then copy the workers from `dist` to `../public/monaco` by running `yarn run copy`. Create React App will bundle the remaining of the necessary files because we import the Monaco Editor in [Editor.tsx](../src/components/Editor.tsx) with `import * as monaco from 'monaco-editor';`. diff --git a/public/monaco/css.worker.bundle.js b/monaco/css.worker.bundle.js similarity index 100% rename from public/monaco/css.worker.bundle.js rename to monaco/css.worker.bundle.js diff --git a/public/monaco/editor.worker.bundle.js b/monaco/editor.worker.bundle.js similarity index 100% rename from public/monaco/editor.worker.bundle.js rename to monaco/editor.worker.bundle.js diff --git a/public/monaco/html.worker.bundle.js b/monaco/html.worker.bundle.js similarity index 100% rename from public/monaco/html.worker.bundle.js rename to monaco/html.worker.bundle.js diff --git a/public/monaco/json.worker.bundle.js b/monaco/json.worker.bundle.js similarity index 100% rename from public/monaco/json.worker.bundle.js rename to monaco/json.worker.bundle.js diff --git a/monaco/package.json b/monaco/package.json deleted file mode 100644 index af8d187..0000000 --- a/monaco/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "monaco-editor-workers", - "scripts": { - "build": "NODE_ENV='production' ./node_modules/.bin/webpack --progress", - "copy": "cp ./dist/* ../public/monaco" - }, - "dependencies": { - "monaco-editor-webpack-plugin": "^3.0.0", - "monaco-editor": "^0.22.3", - "webpack-cli": "^4.4.0", - "webpack": "^5.19.0" } -} diff --git a/public/monaco/ts.worker.bundle.js b/monaco/ts.worker.bundle.js similarity index 100% rename from public/monaco/ts.worker.bundle.js rename to monaco/ts.worker.bundle.js diff --git a/public/monaco/ts.worker.bundle.js.LICENSE.txt b/monaco/ts.worker.bundle.js.LICENSE.txt similarity index 100% rename from public/monaco/ts.worker.bundle.js.LICENSE.txt rename to monaco/ts.worker.bundle.js.LICENSE.txt diff --git a/monaco/webpack.config.js b/monaco/webpack.config.js deleted file mode 100644 index cfb0e8d..0000000 --- a/monaco/webpack.config.js +++ /dev/null @@ -1,19 +0,0 @@ -const path = require('path'); -module.exports = { - mode: 'production', - entry: { - 'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js', - 'json.worker': 'monaco-editor/esm/vs/language/json/json.worker', - 'css.worker': 'monaco-editor/esm/vs/language/css/css.worker', - 'html.worker': 'monaco-editor/esm/vs/language/html/html.worker', - 'ts.worker': 'monaco-editor/esm/vs/language/typescript/ts.worker', - }, - resolve: { - extensions: ['*', '.js', '.jsx', '.tsx', '.ts'], - }, - output: { - globalObject: 'self', - filename: '[name].bundle.js', - path: path.resolve(__dirname, 'dist'), - }, -}; diff --git a/monaco/yarn.lock b/monaco/yarn.lock deleted file mode 100644 index 2923681..0000000 --- a/monaco/yarn.lock +++ /dev/null @@ -1,910 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@discoveryjs/json-ext@^0.5.0": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752" - integrity sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg== - -"@types/eslint-scope@^3.7.0": - version "3.7.0" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.0.tgz#4792816e31119ebd506902a482caec4951fabd86" - integrity sha512-O/ql2+rrCUe2W2rs7wMR+GqPRcgB6UiqN5RhrR5xruFlY7l9YLMn0ZkDzjoHLeiFkR8MCQZVudUuuvQ2BLC9Qw== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "7.2.6" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.6.tgz#5e9aff555a975596c03a98b59ecd103decc70c3c" - integrity sha512-I+1sYH+NPQ3/tVqCeUSBwTE/0heyvtXqpIopUUArlBm0Kpocb8FbMa3AZ/ASKIFpN3rnEx932TTXDbt9OXsNDw== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*", "@types/estree@^0.0.46": - version "0.0.46" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.46.tgz#0fb6bfbbeabd7a30880504993369c4bf1deab1fe" - integrity sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg== - -"@types/json-schema@*", "@types/json-schema@^7.0.6": - version "7.0.7" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" - integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== - -"@types/node@*": - version "14.14.22" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18" - integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw== - -"@webassemblyjs/ast@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.0.tgz#a5aa679efdc9e51707a4207139da57920555961f" - integrity sha512-kX2W49LWsbthrmIRMbQZuQDhGtjyqXfEmmHyEi4XWnSZtPmxY0+3anPIzsnRb45VH/J55zlOfWvZuY47aJZTJg== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - -"@webassemblyjs/floating-point-hex-parser@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.0.tgz#34d62052f453cd43101d72eab4966a022587947c" - integrity sha512-Q/aVYs/VnPDVYvsCBL/gSgwmfjeCb4LW8+TMrO3cSzJImgv8lxxEPM2JA5jMrivE7LSz3V+PFqtMbls3m1exDA== - -"@webassemblyjs/helper-api-error@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.0.tgz#aaea8fb3b923f4aaa9b512ff541b013ffb68d2d4" - integrity sha512-baT/va95eXiXb2QflSx95QGT5ClzWpGaa8L7JnJbgzoYeaA27FCvuBXU758l+KXWRndEmUXjP0Q5fibhavIn8w== - -"@webassemblyjs/helper-buffer@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.0.tgz#d026c25d175e388a7dbda9694e91e743cbe9b642" - integrity sha512-u9HPBEl4DS+vA8qLQdEQ6N/eJQ7gT7aNvMIo8AAWvAl/xMrcOSiI2M0MAnMCy3jIFke7bEee/JwdX1nUpCtdyA== - -"@webassemblyjs/helper-numbers@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.0.tgz#7ab04172d54e312cc6ea4286d7d9fa27c88cd4f9" - integrity sha512-DhRQKelIj01s5IgdsOJMKLppI+4zpmcMQ3XboFPLwCpSNH6Hqo1ritgHgD0nqHeSYqofA6aBN/NmXuGjM1jEfQ== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.0" - "@webassemblyjs/helper-api-error" "1.11.0" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/helper-wasm-bytecode@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.0.tgz#85fdcda4129902fe86f81abf7e7236953ec5a4e1" - integrity sha512-MbmhvxXExm542tWREgSFnOVo07fDpsBJg3sIl6fSp9xuu75eGz5lz31q7wTLffwL3Za7XNRCMZy210+tnsUSEA== - -"@webassemblyjs/helper-wasm-section@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.0.tgz#9ce2cc89300262509c801b4af113d1ca25c1a75b" - integrity sha512-3Eb88hcbfY/FCukrg6i3EH8H2UsD7x8Vy47iVJrP967A9JGqgBVL9aH71SETPx1JrGsOUVLo0c7vMCN22ytJew== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-buffer" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - "@webassemblyjs/wasm-gen" "1.11.0" - -"@webassemblyjs/ieee754@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.0.tgz#46975d583f9828f5d094ac210e219441c4e6f5cf" - integrity sha512-KXzOqpcYQwAfeQ6WbF6HXo+0udBNmw0iXDmEK5sFlmQdmND+tr773Ti8/5T/M6Tl/413ArSJErATd8In3B+WBA== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.0.tgz#f7353de1df38aa201cba9fb88b43f41f75ff403b" - integrity sha512-aqbsHa1mSQAbeeNcl38un6qVY++hh8OpCOzxhixSYgbRfNWcxJNJQwe2rezK9XEcssJbbWIkblaJRwGMS9zp+g== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.0.tgz#86e48f959cf49e0e5091f069a709b862f5a2cadf" - integrity sha512-A/lclGxH6SpSLSyFowMzO/+aDEPU4hvEiooCMXQPcQFPPJaYcPQNKGOCLUySJsYJ4trbpr+Fs08n4jelkVTGVw== - -"@webassemblyjs/wasm-edit@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.0.tgz#ee4a5c9f677046a210542ae63897094c2027cb78" - integrity sha512-JHQ0damXy0G6J9ucyKVXO2j08JVJ2ntkdJlq1UTiUrIgfGMmA7Ik5VdC/L8hBK46kVJgujkBIoMtT8yVr+yVOQ== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-buffer" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - "@webassemblyjs/helper-wasm-section" "1.11.0" - "@webassemblyjs/wasm-gen" "1.11.0" - "@webassemblyjs/wasm-opt" "1.11.0" - "@webassemblyjs/wasm-parser" "1.11.0" - "@webassemblyjs/wast-printer" "1.11.0" - -"@webassemblyjs/wasm-gen@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.0.tgz#3cdb35e70082d42a35166988dda64f24ceb97abe" - integrity sha512-BEUv1aj0WptCZ9kIS30th5ILASUnAPEvE3tVMTrItnZRT9tXCLW2LEXT8ezLw59rqPP9klh9LPmpU+WmRQmCPQ== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - "@webassemblyjs/ieee754" "1.11.0" - "@webassemblyjs/leb128" "1.11.0" - "@webassemblyjs/utf8" "1.11.0" - -"@webassemblyjs/wasm-opt@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.0.tgz#1638ae188137f4bb031f568a413cd24d32f92978" - integrity sha512-tHUSP5F4ywyh3hZ0+fDQuWxKx3mJiPeFufg+9gwTpYp324mPCQgnuVKwzLTZVqj0duRDovnPaZqDwoyhIO8kYg== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-buffer" "1.11.0" - "@webassemblyjs/wasm-gen" "1.11.0" - "@webassemblyjs/wasm-parser" "1.11.0" - -"@webassemblyjs/wasm-parser@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.0.tgz#3e680b8830d5b13d1ec86cc42f38f3d4a7700754" - integrity sha512-6L285Sgu9gphrcpDXINvm0M9BskznnzJTE7gYkjDbxET28shDqp27wpruyx3C2S/dvEwiigBwLA1cz7lNUi0kw== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/helper-api-error" "1.11.0" - "@webassemblyjs/helper-wasm-bytecode" "1.11.0" - "@webassemblyjs/ieee754" "1.11.0" - "@webassemblyjs/leb128" "1.11.0" - "@webassemblyjs/utf8" "1.11.0" - -"@webassemblyjs/wast-printer@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.0.tgz#680d1f6a5365d6d401974a8e949e05474e1fab7e" - integrity sha512-Fg5OX46pRdTgB7rKIUojkh9vXaVN6sGYCnEiJN1GYkb0RPwShZXp6KTDqmoMdQPKhcroOXh3fEzmkWmCYaKYhQ== - dependencies: - "@webassemblyjs/ast" "1.11.0" - "@xtuc/long" "4.2.2" - -"@webpack-cli/configtest@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.0.0.tgz#2aff5f1ebc6f793c13ba9b2a701d180eab17f5ee" - integrity sha512-Un0SdBoN1h4ACnIO7EiCjWuyhNI0Jl96JC+63q6xi4HDUYRZn8Auluea9D+v9NWKc5J4sICVEltdBaVjLX39xw== - -"@webpack-cli/info@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.2.1.tgz#af98311f983d0b9fce7284cfcf1acaf1e9f4879c" - integrity sha512-fLnDML5HZ5AEKzHul8xLAksoKN2cibu6MgonkUj8R9V7bbeVRkd1XbGEGWrAUNYHbX1jcqCsDEpBviE5StPMzQ== - dependencies: - envinfo "^7.7.3" - -"@webpack-cli/serve@^1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.2.2.tgz#1f8eee44f96524756268f5e3f43e9d943f864d41" - integrity sha512-03GkWxcgFfm8+WIwcsqJb9agrSDNDDoxaNnexPnCCexP5SCE4IgFd9lNpSy+K2nFqVMpgTFw6SwbmVAVTndVew== - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - -acorn@^8.0.4: - version "8.0.5" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.5.tgz#a3bfb872a74a6a7f661bc81b9849d9cac12601b7" - integrity sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg== - -ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv@^6.12.5: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-colors@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -browserslist@^4.14.5: - version "4.16.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.3.tgz#340aa46940d7db878748567c5dea24a48ddf3717" - integrity sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw== - dependencies: - caniuse-lite "^1.0.30001181" - colorette "^1.2.1" - electron-to-chromium "^1.3.649" - escalade "^3.1.1" - node-releases "^1.1.70" - -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -caniuse-lite@^1.0.30001181: - version "1.0.30001181" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001181.tgz#4f0e5184e1ea7c3bf2727e735cbe7ca9a451d673" - integrity sha512-m5ul/ARCX50JB8BSNM+oiPmQrR5UmngaQ3QThTTp5HcIIQGP/nPBs82BYLE+tigzm3VW+F4BJIhUyaVtEweelQ== - -chrome-trace-event@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" - integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== - dependencies: - tslib "^1.9.0" - -clone-deep@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" - integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== - dependencies: - is-plain-object "^2.0.4" - kind-of "^6.0.2" - shallow-clone "^3.0.0" - -colorette@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" - integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^6.2.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" - integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== - -cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -electron-to-chromium@^1.3.649: - version "1.3.650" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.650.tgz#24e821fff2ed61fd71fee092f2a0631b3c0c22a6" - integrity sha512-j6pRuNylFBbroG6NB8Lw/Im9oDY74s2zWHBP5TmdYg73cBuL6cz//SMgolVa0gIJk/DSL+kO7baJ1DSXW1FUZg== - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -enhanced-resolve@^5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz#525c5d856680fbd5052de453ac83e32049958b5c" - integrity sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -enquirer@^2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - -envinfo@^7.7.3: - version "7.7.4" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.4.tgz#c6311cdd38a0e86808c1c9343f667e4267c4a320" - integrity sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ== - -es-module-lexer@^0.3.26: - version "0.3.26" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.3.26.tgz#7b507044e97d5b03b01d4392c74ffeb9c177a83b" - integrity sha512-Va0Q/xqtrss45hWzP8CZJwzGSZJjDM5/MJRE3IXXnUCcVLElR9BRaE9F62BopysASyc4nM3uwhSW7FFB9nlWAA== - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== - -events@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.2.0.tgz#93b87c18f8efcd4202a461aec4dfc0556b639379" - integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg== - -execa@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" - integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fastest-levenshtein@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" - integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== - -find-up@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -get-stream@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" - integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg== - -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -graceful-fs@^4.1.2, graceful-fs@^4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -import-local@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" - integrity sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - -interpret@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" - integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== - -is-core-module@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" - integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== - dependencies: - has "^1.0.3" - -is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" - integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -jest-worker@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" - integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^7.0.0" - -json-parse-better-errors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json5@^2.1.2: - version "2.2.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" - integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== - dependencies: - minimist "^1.2.5" - -kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -loader-runner@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" - integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw== - -loader-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" - integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -mime-db@1.45.0: - version "1.45.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" - integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== - -mime-types@^2.1.27: - version "2.1.28" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" - integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ== - dependencies: - mime-db "1.45.0" - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -monaco-editor-webpack-plugin@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-3.0.0.tgz#47a1c16e990d743572f47b0a1abb6de36bbc4afb" - integrity sha512-oPuYInTZIT5ctj8gjx7VEzxZFjcIBJXazVOaF6wJ/TPCldF0Lb/58jEeKTERXr4nr1Yobgx2tVfKcfkncAlAHg== - dependencies: - loader-utils "^2.0.0" - -monaco-editor@^0.22.3: - version "0.22.3" - resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.22.3.tgz#69b42451d3116c6c08d9b8e052007ff891fd85d7" - integrity sha512-RM559z2CJbczZ3k2b+ouacMINkAYWwRit4/vs0g2X/lkYefDiu0k2GmgWjAuiIpQi+AqASPOKvXNmYc8KUSvVQ== - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -node-releases@^1.1.70: - version "1.1.70" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.70.tgz#66e0ed0273aa65666d7fe78febe7634875426a08" - integrity sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw== - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2, p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -pkg-dir@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760" - integrity sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA== - dependencies: - find-up "^5.0.0" - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -rechoir@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.0.tgz#32650fd52c21ab252aa5d65b19310441c7e03aca" - integrity sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q== - dependencies: - resolve "^1.9.0" - -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve@^1.9.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" - integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== - dependencies: - is-core-module "^2.1.0" - path-parse "^1.0.6" - -safe-buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -schema-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.0.0.tgz#67502f6aa2b66a2d4032b4279a2944978a0913ef" - integrity sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA== - dependencies: - "@types/json-schema" "^7.0.6" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -serialize-javascript@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" - integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== - dependencies: - randombytes "^2.1.0" - -shallow-clone@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" - integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== - dependencies: - kind-of "^6.0.2" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -signal-exit@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - -source-list-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" - integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== - -source-map-support@~0.5.19: - version "0.5.19" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" - integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@~0.7.2: - version "0.7.3" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -supports-color@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -tapable@^2.1.1, tapable@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" - integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== - -terser-webpack-plugin@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.1.tgz#7effadee06f7ecfa093dbbd3e9ab23f5f3ed8673" - integrity sha512-5XNNXZiR8YO6X6KhSGXfY0QrGrCRlSwAEjIIrlRQR4W8nP69TaJUlh3bkuac6zzgspiGPfKEHcY295MMVExl5Q== - dependencies: - jest-worker "^26.6.2" - p-limit "^3.1.0" - schema-utils "^3.0.0" - serialize-javascript "^5.0.1" - source-map "^0.6.1" - terser "^5.5.1" - -terser@^5.5.1: - version "5.5.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.5.1.tgz#540caa25139d6f496fdea056e414284886fb2289" - integrity sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ== - dependencies: - commander "^2.20.0" - source-map "~0.7.2" - source-map-support "~0.5.19" - -tslib@^1.9.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -v8-compile-cache@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz#9471efa3ef9128d2f7c6a7ca39c4dd6b5055b132" - integrity sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q== - -watchpack@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.1.0.tgz#e63194736bf3aa22026f7b191cd57907b0f9f696" - integrity sha512-UjgD1mqjkG99+3lgG36at4wPnUXNvis2v1utwTgQ43C22c4LD71LsYMExdWXh4HZ+RmW+B0t1Vrg2GpXAkTOQw== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - -webpack-cli@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.4.0.tgz#38c7fa01ea31510f5c490245dd1bb28018792f1b" - integrity sha512-/Qh07CXfXEkMu5S8wEpjuaw2Zj/CC0hf/qbTDp6N8N7JjdGuaOjZ7kttz+zhuJO/J5m7alQEhNk9lsc4rC6xgQ== - dependencies: - "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^1.0.0" - "@webpack-cli/info" "^1.2.1" - "@webpack-cli/serve" "^1.2.2" - colorette "^1.2.1" - commander "^6.2.0" - enquirer "^2.3.6" - execa "^5.0.0" - fastest-levenshtein "^1.0.12" - import-local "^3.0.2" - interpret "^2.2.0" - rechoir "^0.7.0" - v8-compile-cache "^2.2.0" - webpack-merge "^5.7.3" - -webpack-merge@^5.7.3: - version "5.7.3" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.7.3.tgz#2a0754e1877a25a8bbab3d2475ca70a052708213" - integrity sha512-6/JUQv0ELQ1igjGDzHkXbVDRxkfA57Zw7PfiupdLFJYrgFqY5ZP8xxbpp2lU3EPwYx89ht5Z/aDkD40hFCm5AA== - dependencies: - clone-deep "^4.0.1" - wildcard "^2.0.0" - -webpack-sources@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-2.2.0.tgz#058926f39e3d443193b6c31547229806ffd02bac" - integrity sha512-bQsA24JLwcnWGArOKUxYKhX3Mz/nK1Xf6hxullKERyktjNMC4x8koOeaDNTA2fEJ09BdWLbM/iTW0ithREUP0w== - dependencies: - source-list-map "^2.0.1" - source-map "^0.6.1" - -webpack@^5.19.0: - version "5.19.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.19.0.tgz#1a5fee84dd63557e68336b0774ac4a1c81aa2c73" - integrity sha512-egX19vAQ8fZ4cVYtA9Y941eqJtcZAK68mQq87MMv+GTXKZOc3TpKBBxdGX+HXUYlquPxiluNsJ1VHvwwklW7CQ== - dependencies: - "@types/eslint-scope" "^3.7.0" - "@types/estree" "^0.0.46" - "@webassemblyjs/ast" "1.11.0" - "@webassemblyjs/wasm-edit" "1.11.0" - "@webassemblyjs/wasm-parser" "1.11.0" - acorn "^8.0.4" - browserslist "^4.14.5" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.7.0" - es-module-lexer "^0.3.26" - eslint-scope "^5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.4" - json-parse-better-errors "^1.0.2" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - pkg-dir "^5.0.0" - schema-utils "^3.0.0" - tapable "^2.1.1" - terser-webpack-plugin "^5.1.1" - watchpack "^2.0.0" - webpack-sources "^2.1.1" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wildcard@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" - integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/package.json b/package.json index b7f27ff..51aebbb 100644 --- a/package.json +++ b/package.json @@ -17,97 +17,6 @@ "url": "https://github.com/standardnotes/code-pro/issues" }, "sn": { - "main": "build/index.html" - }, - "homepage": ".", - "scripts": { - "analyze": "source-map-explorer 'build/static/js/*.js'", - "start": "PORT=3001 react-scripts start", - "build": "react-scripts build", - "clean-deploy-cache": "rm -rf node_modules/.cache/gh-pages", - "predeploy": "yarn run pretty && cp README.md public/README.txt && cp LICENSE public/LICENSE.txt && yarn run build && yarn clean-deploy-cache", - "deploy-build": "yarn run predeploy && gh-pages -b build -d build", - "deploy-dev": "yarn run predeploy && gh-pages -b dev -d build", - "deploy-stable": "yarn run predeploy && gh-pages -b gh-pages -d build", - "test": "react-scripts test", - "eject": "react-scripts eject", - "serve": "serve -s -p 3000 build", - "server-public": "http-server -p 3000 --cors", - "server-root": "http-server ./ -p 3000 --cors", - "server": "http-server ./build -p 3000 --cors", - "pretty": "prettier --write 'src/**/*.{html,css,scss,js,jsx,ts,tsx,json}' README.md public/*.{html,json}" - }, - "dependencies": { - "@testing-library/dom": "^7.29.4", - "@testing-library/jest-dom": "^5.11.9", - "@testing-library/react": "^11.2.3", - "@testing-library/user-event": "^12.6.2", - "@types/jest": "^26.0.20", - "@types/lodash": "^4.14.168", - "@types/node": "^14.14.22", - "@types/react": "^17.0.0", - "@types/react-dom": "^17.0.0", - "filesafe-embed": "^1.0.10", - "filesafe-js": "^1.0.4", - "gh-pages": "^3.1.0", - "husky": "^4.3.8", - "lint-staged": "^10.5.3", - "monaco-editor": "^0.22.3", - "node-sass": "4.14.1", - "prettier": "^2.2.1", - "react": "^17.0.1", - "react-dom": "^17.0.1", - "react-scripts": "4.0.1", - "rehype-highlight": "^4.0.0", - "rehype-katex": "^4.0.0", - "rehype-raw": "^5.0.0", - "rehype-react": "^6.2.0", - "remark-breaks": "^2.0.1", - "remark-external-links": "^8.0.0", - "remark-footnotes": "^3.0.0", - "remark-gemoji": "^6.0.0", - "remark-gfm": "^1.0.0", - "remark-math": "^4.0.0", - "remark-parse": "^9.0.0", - "remark-rehype": "^8.0.0", - "remark-slug": "^6.0.0", - "remark-toc": "^7.0.0", - "sn-editor-kit": "1.0.6", - "sn-stylekit": "2.1.0", - "source-map-explorer": "^2.5.2", - "typescript": "^4.1.3", - "unified": "^9.2.0", - "web-vitals": "^1.1.0" - }, - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "README.md": [ - "prettier --write" - ], - "src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [ - "prettier --write" - ] + "main": "index.html" } } diff --git a/public/index.html b/public/index.html deleted file mode 100644 index 98a61f4..0000000 --- a/public/index.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - Code Pro - - - - -
- - - diff --git a/public/package.json b/public/package.json deleted file mode 100644 index 51aebbb..0000000 --- a/public/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "code-pro", - "version": "0.1.0-beta.2", - "description": "Code Pro is a code editor for Standard Notes powered by the Monaco Editor", - "keywords": [ - "Standard Notes", - "Standard Notes Extensions", - "Monaco Editor" - ], - "private": true, - "license": "AGPL-3.0-or-later", - "repository": { - "type": "git", - "url": "https://github.com/standardnotes/code-pro.git" - }, - "bugs": { - "url": "https://github.com/standardnotes/code-pro/issues" - }, - "sn": { - "main": "index.html" - } -} diff --git a/public/robots.txt b/robots.txt similarity index 100% rename from public/robots.txt rename to robots.txt diff --git a/public/sample.ext.json b/sample.ext.json similarity index 100% rename from public/sample.ext.json rename to sample.ext.json diff --git a/src/Editor.test.tsx b/src/Editor.test.tsx deleted file mode 100644 index ca9060b..0000000 --- a/src/Editor.test.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render, screen } from '@testing-library/react'; -import Editor from './components/Editor'; - -test('renders Standard Notes documentation link', () => { - render(); - const linkElement = screen.getByText(/Standard Notes documentation/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/src/components/Editor.tsx b/src/components/Editor.tsx deleted file mode 100644 index 3cb19db..0000000 --- a/src/components/Editor.tsx +++ /dev/null @@ -1,1169 +0,0 @@ -import React, { useEffect, useRef, useState } from 'react'; -import { EditorKit, EditorKitDelegate } from 'sn-editor-kit'; -import * as monaco from 'monaco-editor'; - -/** Components */ -import Settings from './Settings'; - -/** Lib */ -import { makePrettier } from '../lib/makePrettier'; -import { getCodeText, renderMarkdown } from '../lib/renderMarkdown'; -import ErrorBoundary from './ErrorBoundary'; -import PrintDialog from './PrintDialog'; - -export enum HtmlClassName { - MonacoEditorContainerParentDiv = 'MonacoEditorContainerParentDiv', - MonacoEditorContainer = 'MonacoEditorContainer', - snComponent = 'sn-component', - textarea = 'sk-input contrast textarea', -} - -export enum HtmlElementId { - fontSize = 'fontSize', - language = 'language', - minimap = 'minimap', - tabSize = 'tabSize', - theme = 'theme', - wordWrap = 'wordWrap', - saveAsDefault = 'saveAsDefault', - - buttonCancel = 'buttonCancel', - buttonToggleEditMode = 'buttonToggleEditMode', - buttonLoadSettings = 'buttonLoadSettings', - buttonPrint = 'buttonPrint', - buttonRefreshEditor = 'buttonRefreshEditor', - buttonSaveSettings = 'buttonSaveSettings', - buttonToggleViewMode = 'buttonToggleViewMode', - - contentContainer = 'contentContainer', - MonacoEditorContainer = 'MonacoEditorContainer', - settings = 'settingsContainer', - settingsToggleButton = 'settingsToggleButton', - snComponent = 'sn-component', - viewContainer = 'viewContainer', -} - -export interface SettingsInterface { - fontSize: string; - language: string; - minimap: boolean; - tabSize: number; - theme: string; - wordWrap: string; -} - -export interface EditorInterface extends SettingsInterface { - confirmPrintUrl: boolean; - editMode: boolean; - text: string; - platform?: string; - printUrl: boolean; - refreshTokenEditor: boolean; - refreshTokenView: boolean; - showSettings: boolean; - viewMode: boolean; - /** this is used for handleSelectChange, but could mess with type checking */ - [x: string]: string | number | boolean | undefined; -} - -const initialState = { - confirmPrintUrl: false, - editMode: false, - fontSize: '16px', - language: 'markdown', - minimap: true, - printUrl: true, - refreshTokenEditor: false, - refreshTokenView: false, - showSettings: true, - tabSize: 2, - text: '', - theme: 'sn-theme', - viewMode: false, - wordWrap: 'on', -}; - -const debugMode = false; -let keyMap = new Map(); - -let editor: monaco.editor.IStandaloneCodeEditor; -let diffEditor: monaco.editor.IStandaloneDiffEditor; -let lastBackgroundColor = 'white'; -let lastDarkMode = true; -let lastPosition: monaco.IPosition; -let lastRefreshToken = false; -let wasEditorFocused = true; -let viewScrollTop = 0; - -export default class Editor extends React.Component<{}, EditorInterface> { - editorKit: any; - saveTimer: NodeJS.Timeout | undefined; - - constructor(props: EditorInterface) { - super(props); - this.state = initialState; - } - - configureEditorKit = () => { - let delegate = new EditorKitDelegate({ - /** This loads every time a different note is loaded */ - setEditorRawText: (text: string) => { - this.setState( - { - text, - }, - () => { - if (this.state.viewMode) { - renderMarkdown.cancel(); - renderMarkdown(getCodeText(this.state.language, text)); - renderMarkdown.flush(); - this.refreshView(); - } - this.refreshEditor(); - /** Wait until the text has been loaded to show the editor */ - this.loadDefaultSettings(() => {}); - this.loadSettings(); - } - ); - }, - clearUndoHistory: () => {}, - getElementsBySelector: () => [], - }); - - this.editorKit = new EditorKit({ - delegate: delegate, - mode: 'plaintext', - supportsFilesafe: false, - }); - }; - - componentDidMount = () => { - this.configureEditorKit(); - setTimeout(() => { - this.setState({ editMode: true }); - }, 250); - }; - - saveSettings = () => { - try { - const note = this.editorKit.internal.note; - let settings: SettingsInterface; - settings = { - fontSize: this.state.fontSize, - language: this.state.language, - minimap: this.state.minimap, - tabSize: this.state.tabSize, - theme: this.state.theme, - wordWrap: this.state.wordWrap, - }; - this.editorKit.internal.componentManager.saveItemWithPresave(note, () => { - note.content.codeEditorSettings = JSON.stringify(settings); - }); - } catch (error) { - console.error('Error saving settings', error); - } - }; - - loadSettings = () => { - this.editorKit.internal.componentManager.streamContextItem((note: any) => { - // Load editor settings - if (note.content.codeEditorSettings !== undefined) { - const loadedSettings = JSON.parse( - note.content.codeEditorSettings - ) as SettingsInterface; - this.setState({ - /** If each property is the appropriate type, then assign it. - * Otherwise, set state as the current state. */ - fontSize: - typeof loadedSettings.fontSize === 'string' - ? loadedSettings.fontSize - : this.state.fontSize, - language: - typeof loadedSettings.language === 'string' - ? loadedSettings.language - : this.state.language, - minimap: - typeof loadedSettings.minimap === 'boolean' - ? loadedSettings.minimap - : this.state.minimap, - tabSize: - typeof loadedSettings.tabSize === 'number' - ? loadedSettings.tabSize - : this.state.tabSize, - theme: - typeof loadedSettings.theme === 'string' - ? loadedSettings.theme - : this.state.theme, - wordWrap: - typeof loadedSettings.wordWrap === 'string' - ? loadedSettings.wordWrap - : this.state.wordWrap, - }); - } - }); - }; - - saveEditorOption = (optionKey: string, optionValue: string) => { - try { - this.editorKit.internal.componentManager.setComponentDataValueForKey( - optionKey, - optionValue - ); - } catch (error) { - console.error( - 'Error saving editor option. Your optionKey:', - optionKey, - '\n - Your optionValue: ', - optionValue, - '\n - The error: ', - error - ); - } - }; - - saveDefaultSettings = () => { - let defaultSettings: SettingsInterface; - defaultSettings = { - fontSize: this.state.fontSize, - language: this.state.language, - minimap: this.state.minimap, - tabSize: this.state.tabSize, - theme: this.state.theme, - wordWrap: this.state.wordWrap, - }; - this.saveEditorOption('defaultSettings', JSON.stringify(defaultSettings)); - }; - - loadDefaultSettings = (callback: () => void) => { - try { - const settingsString = this.editorKit.internal.componentManager.componentDataValueForKey( - 'defaultSettings' - ); - if (settingsString !== undefined) { - const defaultSettings = JSON.parse(settingsString) as SettingsInterface; - if (debugMode) { - console.log('defaultSettings', defaultSettings); - } - this.setState( - { - /** If each property is the appropriate type, then assign it. - * Otherwise, set state as the current state. */ - fontSize: - typeof defaultSettings.fontSize === 'string' - ? defaultSettings.fontSize - : this.state.fontSize, - language: - typeof defaultSettings.language === 'string' - ? defaultSettings.language - : this.state.language, - minimap: - typeof defaultSettings.minimap === 'boolean' - ? defaultSettings.minimap - : this.state.minimap, - tabSize: - typeof defaultSettings.tabSize === 'number' - ? defaultSettings.tabSize - : this.state.tabSize, - theme: - typeof defaultSettings.theme === 'string' - ? defaultSettings.theme - : this.state.theme, - wordWrap: - typeof defaultSettings.wordWrap === 'string' - ? defaultSettings.wordWrap - : this.state.wordWrap, - }, - () => { - if (callback) { - callback(); - } - } - ); - } - this.setState( - { - platform: this.editorKit.internal.componentManager.platform, - }, - () => { - if (debugMode) { - console.log(this.state.platform); - } - } - ); - } catch (error) { - // Log outside debug mode - console.error('Error loading editor options:', error); - } - }; - - handleInputChange = (event: React.ChangeEvent) => { - const target = event.target; - const value = target.type === 'checkbox' ? target.checked : target.value; - const name = target.name; - this.setState( - { - [name]: value, - }, - () => { - /** Mini map is the only possible [name] */ - if (name === 'minimap') { - this.saveSettings(); - } - } - ); - }; - - handleSelectChange = (event: React.ChangeEvent) => { - const target = event.target; - const value = target.value; - const name = target.name; - this.setState( - { - [name]: value, - }, - () => { - if (debugMode) { - console.log( - 'Saved select. Name: ' + - event.target.name + - ' Value: ' + - event.target.value - ); - } - this.saveSettings(); - } - ); - }; - - saveText = (text: string) => { - this.saveNote(text); - this.setState( - { - text: text, - }, - () => { - if (this.state.viewMode) { - if (this.saveTimer) { - clearTimeout(this.saveTimer); - } - this.refreshMarkdown(); - } - } - ); - }; - - saveNote = (text: string) => { - /** This will work in an SN context, but breaks the standalone editor, - * so we need to catch the error - */ - try { - this.editorKit.onEditorValueChanged(text); - } catch (error) { - console.error('Error saving note:', error); - } - }; - - refreshEditor = () => { - this.setState({ - refreshTokenEditor: !this.state.refreshTokenEditor, - }); - }; - - refreshMarkdown = () => { - this.saveTimer = setTimeout(() => { - renderMarkdown.cancel(); - this.refreshView(); - }, 550); - }; - - refreshView = () => { - this.setState({ - refreshTokenView: !this.state.refreshTokenView, - }); - }; - - toggleShowSettings = () => { - this.setState( - { - showSettings: !this.state.showSettings, - }, - () => { - /** Refresh the editor to increase its height */ - if (!this.state.showSettings) { - this.refreshEditor(); - } - const toggleSettingsButton = document.getElementById( - HtmlElementId.settingsToggleButton - ); - if (toggleSettingsButton) { - toggleSettingsButton.focus(); - } - } - ); - }; - - toggleEditMode = () => { - if (!this.state.editMode) { - this.setState({ - editMode: true, - }); - } else if (this.state.editMode) { - this.setState( - { - editMode: false, - }, - () => { - this.toggleViewMode(); - } - ); - } - }; - - toggleViewMode = () => { - if (!this.state.viewMode) { - this.setState( - { - viewMode: true, - }, - () => { - this.refreshEditor(); - const view = document.getElementById(HtmlElementId.viewContainer); - if (view) { - view.scrollTop = viewScrollTop; - } - this.refreshMarkdown(); - } - ); - } else if (this.state.viewMode) { - /** Record the scroll top of the view container */ - const view = document.getElementById(HtmlElementId.viewContainer); - if (view) { - viewScrollTop = view.scrollTop; - } - if (!this.state.editMode) { - /** If the editor is closed, then open it */ - this.setState({ - editMode: true, - viewMode: false, - }); - } else if (this.state.editMode) { - this.setState( - { - viewMode: false, - }, - () => { - /** If the editor is open, refresh the size */ - this.refreshEditor(); - } - ); - } - } - }; - - /** Printing */ - cancelPrint = () => { - this.setState( - { - confirmPrintUrl: false, - }, - () => { - const printButton = document.getElementById(HtmlElementId.buttonPrint); - if (printButton) { - printButton.focus(); - } - } - ); - }; - - confirmPrintUrl = () => { - if (!this.state.viewMode) { - this.toggleViewMode(); - } - this.setState( - { - confirmPrintUrl: true, - }, - () => { - const cancelPrint = document.getElementById(HtmlElementId.buttonCancel); - if (cancelPrint) { - cancelPrint.focus(); - } - } - ); - }; - - printUrlFalse = () => { - this.setState( - { - confirmPrintUrl: false, - printUrl: false, - }, - () => { - this.printRenderedHtml(); - } - ); - }; - - printUrlTrue = () => { - this.setState( - { - confirmPrintUrl: false, - printUrl: true, - }, - () => { - this.printRenderedHtml(); - } - ); - }; - - printRenderedHtml = () => { - window.print(); - const printButton = document.getElementById(HtmlElementId.buttonPrint); - if (printButton) { - printButton.focus(); - } - }; - - /** Events */ - onBlur = (e: React.FocusEvent) => {}; - - onFocus = (e: React.FocusEvent) => {}; - - // Keyboard Events - onKeyDown = (e: monaco.IKeyboardEvent) => { - // Do nothing if 'Control' and 's' are pressed - if (e.ctrlKey && e.code === 'KeyS') { - e.preventDefault(); - } else if (e.altKey && e.code === 'KeyZ') { - /** Toggle word wrap with Alt + Z */ - if (this.state.wordWrap === 'on') { - this.setState({ - wordWrap: 'off', - }); - } else if (this.state.wordWrap === 'off') { - this.setState({ - wordWrap: 'on', - }); - } - } - }; - - onKeyUp = (e: React.KeyboardEvent | KeyboardEvent) => { - keyMap.delete(e.key); - }; - - render() { - return ( -
-
- {this.state.editMode && ( -
- - - -
- )} - {this.state.viewMode && ( - - - - )} - {this.state.confirmPrintUrl && ( - - - - )} -
- - - -
- ); - } -} - -const MonacoDiffEditorContainerID = 'MonacoDiffEditorContainer'; - -/*eslint no-restricted-globals: ["error", "event", "monaco"]*/ -// @ts-ignore -self.MonacoEnvironment = { - getWorkerUrl: function (_moduleId: any, label: string) { - if (label === 'json') { - return './monaco/json.worker.bundle.js'; - } - if (label === 'css' || label === 'scss' || label === 'less') { - return './monaco/css.worker.bundle.js'; - } - if (label === 'html' || label === 'handlebars' || label === 'razor') { - return './monaco/html.worker.bundle.js'; - } - if (label === 'typescript' || label === 'javascript') { - return './monaco/ts.worker.bundle.js'; - } - return './monaco/editor.worker.bundle.js'; - }, -}; - -const onKeyDownDebug = (keyCode: string, debugMode = false) => { - if (debugMode) { - //console.log('IKeyboardEvent Up: ' + keyCode); - } -}; - -const onKeyUpDebug = (keyCode: string, debugMode = false) => { - if (debugMode) { - //console.log('IKeyboardEvent Up: ' + keyCode); - } -}; - -interface MonacoEditorTypes { - fontSize: string; - id?: string; - language: string; - minimap: boolean; - onKeyDown: Function; - onKeyUp?: Function; - refreshTokenEditor: boolean; - saveText: Function; - tabSize: number; - text: string; - theme: string; - wordWrap: string; -} - -export const getBaseTheme = (): monaco.editor.BuiltinTheme => { - const whiteSpaceRegExp = /\s+/g; - let themeType = getComputedStyle(document.documentElement) - .getPropertyValue('--sn-stylekit-theme-type') - .replace(whiteSpaceRegExp, ''); - let backgroundColor = getComputedStyle(document.documentElement) - .getPropertyValue('--sn-stylekit-background-color') - .replace(whiteSpaceRegExp, ''); - if (themeType === 'light') { - return 'vs'; - } else if (themeType === 'dark') { - return 'vs-dark'; - } else if (backgroundColor === 'white' || backgroundColor === '#fff') { - /** Default theme */ - return 'vs'; - } else if (backgroundColor === '#EDE4DA') { - /** Autobiography */ - return 'vs'; - } else if (backgroundColor === '#0f1011') { - /** Focus */ - return 'vs-dark'; - } else if (backgroundColor === '#20202b') { - /** Futura and Focus Midnight */ - return 'vs-dark'; - } else if (backgroundColor === '#002B36') { - /** Solarized Dark */ - return 'vs-dark'; - } else if (backgroundColor === '#d9dbde') { - /** Titanium */ - return 'vs'; - } else if (window.matchMedia('(prefers-color-scheme: dark)').matches) { - return 'vs-dark'; - } else { - return 'vs-dark'; - } -}; - -export const MonacoEditor: React.FC = ({ - fontSize = '16px', - id = HtmlElementId.MonacoEditorContainer, - language = 'javascript', - minimap = true, - onKeyDown, - refreshTokenEditor, - saveText, - tabSize = 2, - text, - theme = 'vs-dark', - wordWrap = 'on', -}) => { - const divEl = useRef(null); - useEffect(() => { - if (divEl.current) { - const defineSnTheme = () => { - const colorRegExp = /^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/; - const whiteSpaceRegExp = /\s+/g; - - let backgroundColor: string; - let tempBackgroundColor = getComputedStyle(document.documentElement) - .getPropertyValue('--sn-stylekit-background-color') - .replace(whiteSpaceRegExp, ''); - - if (!tempBackgroundColor.match(colorRegExp)) { - console.error('Error parsing background color', tempBackgroundColor); - backgroundColor = '#ffffff'; - } else { - backgroundColor = tempBackgroundColor; - } - - let borderColor: string; - let tempBorderColor = getComputedStyle(document.documentElement) - .getPropertyValue('--sn-stylekit-border-color') - .replace(whiteSpaceRegExp, ''); - if (!tempBorderColor.match(colorRegExp)) { - console.error('Error parsing border color', tempBorderColor); - borderColor = '#e3e3e3'; - } else { - borderColor = tempBorderColor; - } - - let contrastBackgroundColor: string; - let tempContrastBackgroundColor = getComputedStyle( - document.documentElement - ) - .getPropertyValue('--sn-stylekit-contrast-background-color') - .replace(whiteSpaceRegExp, ''); - if (!tempContrastBackgroundColor.match(colorRegExp)) { - console.error( - 'Error parsing contrast background color', - tempContrastBackgroundColor - ); - contrastBackgroundColor = '#F6F6F6'; - } else { - contrastBackgroundColor = tempContrastBackgroundColor; - } - - let dangerColor: string; - let tempDangerColor = getComputedStyle(document.documentElement) - .getPropertyValue('--sn-stylekit-danger-color') - .replace(whiteSpaceRegExp, ''); - if (!tempDangerColor.match(colorRegExp)) { - console.error('Error parsing danger color', tempDangerColor); - dangerColor = '#F80324'; // Red - } else { - dangerColor = tempDangerColor; - } - - let foregroundColor: string; - let fadedForegroundColor: string; - let fadedTwiceForegroundColor: string; - let tempForegroundColor = getComputedStyle(document.documentElement) - .getPropertyValue('--sn-stylekit-foreground-color') - .replace(whiteSpaceRegExp, ''); - if (!tempForegroundColor.match(colorRegExp)) { - console.error('Error parsing foreground color', tempForegroundColor); - foregroundColor = '#000000'; - fadedForegroundColor = '#00000099'; /** 60 */ - fadedTwiceForegroundColor = '#0000001A'; /** 10 */ - } else { - foregroundColor = tempForegroundColor; - if (!foregroundColor.concat('99').match(colorRegExp)) { - fadedForegroundColor = '#00000099'; /** 60 */ - fadedTwiceForegroundColor = '#0000001A'; /** 10 */ - } else { - fadedForegroundColor = tempForegroundColor.concat('99'); /** 60% */ - fadedTwiceForegroundColor = tempForegroundColor.concat( - '1A' - ); /** 10% */ - } - } - - let infoColor: string; - let fadedInfoColor: string; - let fadedTwiceInfoColor: string; - let tempInfoColor = getComputedStyle(document.documentElement) - .getPropertyValue('--sn-stylekit-info-color') - .replace(whiteSpaceRegExp, ''); - if (!tempInfoColor.match(colorRegExp)) { - console.error('Error parsing info color', tempInfoColor); - infoColor = '#086dd6'; - fadedInfoColor = '#086dd666'; /** 40% */ - fadedTwiceInfoColor = '#086dd633'; /** 20% */ - } else { - infoColor = tempInfoColor; - /** You only need to test for one */ - if (!tempInfoColor.concat('66').match(colorRegExp)) { - fadedInfoColor = '#086dd666'; - fadedTwiceInfoColor = '#086dd633'; - } else { - fadedInfoColor = tempInfoColor.concat('66'); // This is 40% opacity - fadedTwiceInfoColor = tempInfoColor.concat('33'); // This is 20% opacity - } - } - - let shadowColor: string; - let tempShadowColor = getComputedStyle(document.documentElement) - .getPropertyValue('--sn-stylekit-shadow-color') - .replace(whiteSpaceRegExp, ''); - if (!tempShadowColor.match(colorRegExp)) { - console.error('Error parsing shadow color', tempShadowColor); - shadowColor = '#C8C8C8'; // Gray shadow - } else { - shadowColor = tempShadowColor; - } - - let warningColor: string; - let tempWarningColor = getComputedStyle(document.documentElement) - .getPropertyValue('--sn-stylekit-warning-color') - .replace(whiteSpaceRegExp, ''); - if (!tempWarningColor.match(colorRegExp)) { - console.error('Error parsing warning color', tempWarningColor); - warningColor = '#f6a200'; // Orange - } else { - warningColor = tempWarningColor; - } - - monaco.editor.defineTheme('sn-theme', { - /** If sn-theme, then if not dark mode, use vs. Otherwise, use vs-dark (default) */ - base: getBaseTheme(), - inherit: true, - rules: [ - { - token: '', - background: backgroundColor, - foreground: foregroundColor, - }, - ], - colors: { - /** Ordered in mostly alphabetical order */ - //foreground: foregroundColor /* Overall foreground color. This color is only used if not overridden by a component. - - 'button.background': backgroundColor, // Button background color. - 'button.foreground': foregroundColor, // Button foreground color. - 'button.hoverBackground': contrastBackgroundColor, // Button background color when hovering. - - /** This is what you see when you right click */ - 'dropdown.background': contrastBackgroundColor, // Dropdown background. - 'dropdown.border': borderColor, // Dropdown border. - 'dropdown.foreground': foregroundColor, // Dropdown foreground., - - 'editor.background': backgroundColor, // - 'editor.foreground': foregroundColor, // - 'editor.inactiveSelectionBackground': fadedTwiceInfoColor, // Color of the selection in an inactive editor. - 'editor.lineHighlightBorder': fadedTwiceForegroundColor, // Background color for the border around the line at the cursor position. - 'editor.selectionBackground': fadedInfoColor, // Color of the editor selection. - - 'editorCursor.foreground': fadedForegroundColor, //Color of the editor cursor. - 'editorError.foreground': dangerColor, // Foreground color of error squigglies in the editor. - - 'editorLineNumber.foreground': fadedForegroundColor, // Color of editor line numbers. - 'editorLink.activeForeground': infoColor, // Color of active links. Such as when you press ctrl when hovering over a link - - 'editorWidget.background': contrastBackgroundColor, // Background color of editor widgets, such as find/replace. - 'editorWidget.border': borderColor, // Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget. - 'editorWarning.foreground': warningColor, // Foreground color of warning squigglies in the editor. - - focusBorder: infoColor, // Overall border color for focused elements. This color is only used if not overridden by a component. - - 'input.background': backgroundColor, //,// Input box background. - 'input.border': borderColor, // Input box border. - 'input.foreground': foregroundColor, // Input box foreground. - - 'list.focusBackground': fadedInfoColor, // List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. - 'list.focusForeground': foregroundColor, // List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. - 'list.activeSelectionBackground': fadedInfoColor, // List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. - 'list.activeSelectionForeground': foregroundColor, // List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. - 'list.inactiveSelectionBackground': backgroundColor, // List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not. - 'list.inactiveSelectionForeground': foregroundColor, // List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not. - 'list.hoverBackground': backgroundColor, // List/Tree background when hovering over items using the mouse. - 'list.hoverForeground': foregroundColor, // List/Tree foreground when hovering over items using the mouse. - 'list.dropBackground': backgroundColor, // List/Tree drag and drop background when moving items around using the mouse. - 'list.highlightForeground': foregroundColor, // List/Tree foreground color of the match highlights when searching inside the list/tree. - - 'textLink.activeForeground': infoColor, // Foreground color for active links in text. // Not sure where this is used. - 'textLink.foreground': infoColor, // Foreground color for links in text (such as "Follow Link") - - 'widget.shadow': shadowColor, // Shadow color of widgets such as find/replace inside the editor. - }, - }); - monaco.editor.setTheme(theme); - }; - - if (theme === 'sn-theme') { - defineSnTheme(); - } - - editor = monaco.editor.create(divEl.current, { - // These are variable: customizable by user or dependent on props - fontFamily: 'var(--sn-stylekit-monospace-font)', - fontSize: parseInt(fontSize.replace('px', '')), - language: language, - minimap: { - enabled: minimap, - }, - tabSize: tabSize, - theme: theme, - //@ts-ignore - wordWrap: wordWrap, - - value: [text].join('\n'), - - // These are not customizable - autoClosingOvertype: 'auto', - formatOnPaste: true, - formatOnType: true, - wrappingStrategy: 'advanced', - }); - - // Keyboard Events - editor.onKeyDown((e: monaco.IKeyboardEvent) => { - if (e.ctrlKey && e.code === 'KeyS') { - e.preventDefault(); - } else if (e.shiftKey && e.altKey && e.code === 'KeyF') { - /** Format code */ - e.preventDefault(); - const previousPosition = lastPosition; - const formattedText = makePrettier(language, editor.getValue()); - if (formattedText) { - editor.setValue(formattedText); - } - lastPosition = previousPosition; - if (lastPosition) { - editor.revealLineInCenterIfOutsideViewport(lastPosition.lineNumber); - editor.setPosition(lastPosition); - } - } - onKeyDownDebug(e.code, debugMode); - onKeyDown(e); - }); - - editor.onKeyUp((e: monaco.IKeyboardEvent) => { - onKeyUpDebug(e.code, debugMode); - }); - - // Content Change Events - editor.onDidChangeModelContent( - (e: monaco.editor.IModelContentChangedEvent) => { - if (saveText) { - saveText(editor.getValue()); - } - } - ); - - editor.onDidChangeCursorPosition( - (e: monaco.editor.ICursorPositionChangedEvent) => { - let pos = editor.getPosition(); - if (pos) { - lastPosition = pos; - } - } - ); - - editor.onDidFocusEditorWidget(() => { - wasEditorFocused = true; - - /** If the theme has changed or dark mode has changed, redefine the sn-theme */ - let currentBackgroundColor = getComputedStyle( - document.documentElement - ).getPropertyValue('--sn-stylekit-background-color'); - let isDarkMode = window.matchMedia('(prefers-color-scheme: dark)') - .matches; - if ( - lastBackgroundColor !== currentBackgroundColor || - lastDarkMode !== isDarkMode - ) { - lastBackgroundColor = currentBackgroundColor; - lastDarkMode = isDarkMode; - defineSnTheme(); - } - }); - - editor.onDidBlurEditorWidget(() => { - wasEditorFocused = false; - }); - - if (lastPosition) { - editor.revealLineInCenterIfOutsideViewport(lastPosition.lineNumber); - editor.setPosition(lastPosition); - } - /* If editor was previously focused, or is loaded the first time, focus again */ - if (wasEditorFocused || refreshTokenEditor !== lastRefreshToken) { - lastRefreshToken = refreshTokenEditor; - editor.focus(); - } - } - return () => { - editor.dispose(); - }; - /** Do not include text so useEffect doesn't activate on each edit - * A change in these things will cause a refresh of the editor. - */ - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [ - fontSize, - language, - minimap, - refreshTokenEditor, - tabSize, - theme, - wordWrap, - ]); - return ( -
- ); -}; - -/** For the Diff Editor Feature */ -interface MonacoDiffEditorTypes extends MonacoEditorTypes { - modifiedText: string; -} - -export const MonacoDiffEditor: React.FC = ({ - fontSize = '16', - id = MonacoDiffEditorContainerID, - language = 'markdown', - saveText, - text, - modifiedText, - theme = 'vs-dark', -}) => { - const divEl = useRef(null); - - if (fontSize === '') { - fontSize = '16px'; - } - - useEffect(() => { - if (divEl.current) { - const originalModel = monaco.editor.createModel( - [text].join('\n'), - language - ); - const modifiedModel = monaco.editor.createModel( - [modifiedText].join('\n'), - language - ); - - diffEditor = monaco.editor.createDiffEditor(divEl.current, { - // Same settings as above - // These are variable: customizable by user or dependent on props - fontSize: parseInt(fontSize.replace('px', '')), - theme: theme, - - // These are not customizable - autoClosingOvertype: 'auto', - formatOnPaste: true, - formatOnType: true, - wordWrap: 'on', - wrappingStrategy: 'advanced', - - // Specific to Diff Editor - originalEditable: true, // for left panel - readOnly: true, // for right panel - }); - diffEditor.setModel({ - original: originalModel, - modified: modifiedModel, - }); - - // Content Change Events - originalModel.onDidChangeContent( - (e: monaco.editor.IModelContentChangedEvent) => { - if (saveText) { - saveText(originalModel.getValue()); - } - } - ); - } - return () => { - diffEditor.dispose(); - }; - /** Do not include text so the editor doesn't refresh on each edit */ - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [fontSize, language, modifiedText, theme]); - return ( -
- ); -}; - -interface ViewProps { - language: string; - refreshTokenView: boolean; - text: string; -} - -let lastLanguage: string; -export const View: React.FC = ({ - language, - refreshTokenView, // used to manually refresh the markdown - text, -}) => { - const [markdown, updateMarkdown] = useState( - renderMarkdown(getCodeText(language, text)) - ); - useEffect(() => { - if (lastLanguage !== language) { - lastLanguage = language; - renderMarkdown.cancel(); - renderMarkdown(getCodeText(language, text)); - renderMarkdown.flush(); - } - updateMarkdown(renderMarkdown(getCodeText(language, text))); - }, [language, text, refreshTokenView]); - return
{markdown}
; -}; diff --git a/src/components/ErrorBoundary.tsx b/src/components/ErrorBoundary.tsx deleted file mode 100644 index 2f27d4e..0000000 --- a/src/components/ErrorBoundary.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import React, { ErrorInfo } from 'react'; - -interface ErrorBoundaryState { - hasError: boolean; - error?: Error; - errorInfo?: ErrorInfo; -} - -/** - * Learn more about Error Boundaries here: - * https://reactjs.org/docs/error-boundaries.html - */ - -export default class ErrorBoundary extends React.Component< - any, - ErrorBoundaryState -> { - constructor(props: any) { - super(props); - this.state = { hasError: false }; - } - - static getDerivedStateFromError(error: Error) { - // Update state so the next render will show the fallback UI. - return { hasError: true }; - } - - componentDidCatch(error: Error, errorInfo: ErrorInfo) { - // You can also log the error to an error reporting service - console.error('Error:', error, '\nError Info:', errorInfo); - this.setState({ - error, - errorInfo, - }); - } - - render() { - if (this.state.hasError) { - // You can render any custom fallback UI - return ( -
-

Something went wrong.

-

- Error Name: {this.state.error?.name} -

-

- Error Message: {this.state.error?.message} -

-

- Error Info: {this.state.errorInfo} -

-

Please see the developer console for details.

-
-

- If the error persists and is not related to the content of your - note, then please{' '} - - report the issue on GitHub - {' '} - and we will try to fix it. -

-
- ); - } - - return this.props.children; - } -} diff --git a/src/components/Icons.tsx b/src/components/Icons.tsx deleted file mode 100644 index a4553e1..0000000 --- a/src/components/Icons.tsx +++ /dev/null @@ -1,205 +0,0 @@ -import React from 'react'; - -const infoColor = 'var(--sn-stylekit-info-color)'; -const foregroundColor = 'var(--sn-stylekit-foreground-color)'; - -interface Icons { - condition?: boolean; - fill?: string; - role: string; -} - -export const ChevronIconDown: React.FC = ({ fill, role }) => ( - - - - - -); - -export const ChevronIconRight: React.FC = ({ fill, role }) => ( - - - - - -); - -export const CloseIcon: React.FC = ({ fill, role }) => ( - - - -); - -export const EyeIcon: React.FC = ({ condition, fill, role }) => ( - - - -); - -export const GearIcon: React.FC = ({ condition, fill, role }) => ( - - - -); - -export const PencilIcon: React.FC = ({ condition, fill, role }) => ( - - - -); - -export const PrintIcon: React.FC = ({ fill, role }) => ( - - - -); - -export const RefreshIcon: React.FC = ({ fill, role }) => ( - - - -); - -export const SaveIcon: React.FC = ({ fill, role }) => ( - - - - - -); - -export const UndoIcon: React.FC = ({ fill, role }) => ( - - - -); - -export const WindowIcon: React.FC = ({ fill, role }) => ( - - - - - -); diff --git a/src/components/PrintDialog.tsx b/src/components/PrintDialog.tsx deleted file mode 100644 index 7f1b7ab..0000000 --- a/src/components/PrintDialog.tsx +++ /dev/null @@ -1,65 +0,0 @@ -// import { Method } from '@testing-library/react'; -import React from 'react'; -import { CloseIcon } from './Icons'; -import { HtmlElementId } from './Editor'; - -interface PrintDialogTypes { - cancelText: string; - confirmText: string; - helpLink: string; - onCancel: () => void; - onConfirm: () => void; - onUndo: () => void; - title: string; -} - -const PrintDialog: React.FC = ({ - cancelText, - confirmText, - helpLink, - onCancel, - onConfirm, - onUndo, - title, -}) => ( -
-
-
-
-
-

{title}

- -
-

- Need help deciding? Check out the{' '} - - documentation - - . -

-
-
-
-
- - -
-
-
-
-); - -export default PrintDialog; diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx deleted file mode 100644 index 100da40..0000000 --- a/src/components/Settings.tsx +++ /dev/null @@ -1,368 +0,0 @@ -import React from 'react'; -import { - ChevronIconDown, - ChevronIconRight, - EyeIcon, - PencilIcon, - PrintIcon, - RefreshIcon, - SaveIcon, - WindowIcon, -} from './Icons'; - -import { HtmlElementId, SettingsInterface } from './Editor'; - -interface SettingsProps extends SettingsInterface { - confirmPrintUrl: () => void; - debugMode: boolean; - editMode: boolean; - handleInputChange: (event: React.ChangeEvent) => void; - handleSelectChange: (event: React.ChangeEvent) => void; - loadDefaultSettings: (callback: () => void) => void; - refreshEditor: () => void; - saveSettings: () => void; - saveDefaultSettings: () => void; - showSettings: boolean; - toggleEditMode: () => void; - toggleShowSettings: () => void; - toggleViewMode: () => void; - viewMode: boolean; -} - -interface SettingsState { - [x: string]: string | number | boolean; -} - -export default class Settings extends React.Component< - SettingsProps, - SettingsState -> { - constructor(props: SettingsProps) { - super(props); - this.state = {}; - } - - onFocus = () => { - const settings = document.getElementById(HtmlElementId.settings); - if (settings) { - settings.classList.add('focused'); - } - }; - - onBlur = () => { - const settings = document.getElementById(HtmlElementId.settings); - if (settings) { - settings.classList.remove('focused'); - } - }; - - loadDefaultSettings = () => { - const callback = () => { - /** Save settings after loading the default settings */ - this.props.saveSettings(); - }; - this.props.loadDefaultSettings(callback); - }; - - render() { - return ( -
-
- - - - - {!this.props.showSettings && ( - - )} - {this.props.showSettings && ( - - )} -
- {this.props.showSettings && [ -
- -
- -
-
, -
- -
- -
-
, -
- -
- -
-
, -
- -
- -
-
, -
- -
- -
-
, -
- -
- -
-
, - ]} -
- {this.props.showSettings && [ - , - , - ]} -
-
- ); - } -} diff --git a/src/index.scss b/src/index.scss deleted file mode 100644 index ec2585e..0000000 --- a/src/index.scss +++ /dev/null @@ -1,13 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; -} diff --git a/src/index.tsx b/src/index.tsx deleted file mode 100644 index 14a961f..0000000 --- a/src/index.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import './index.scss'; -import reportWebVitals from './reportWebVitals'; - -import Editor from './components/Editor'; -import './stylesheets/main.scss'; -ReactDOM.render( - - - , - document.getElementById('root') -); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/src/lib/makePrettier.ts b/src/lib/makePrettier.ts deleted file mode 100644 index a4d4406..0000000 --- a/src/lib/makePrettier.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** Prettier */ -import prettier from 'prettier'; -import parserBabel from 'prettier/parser-babel'; -import parserCss from 'prettier/parser-postcss'; -import parserGraphql from 'prettier/parser-graphql'; -import parserHtml from 'prettier/parser-html'; -import parserMarkdown from 'prettier/parser-markdown'; -import parserTypescript from 'prettier/parser-typescript'; -import parserYaml from 'prettier/parser-yaml'; - -/** Make Prettier */ -export const makePrettier = (language: string, text: string) => { - try { - if (language === 'css') { - const formattedText = prettier.format(text, { - parser: 'css', - plugins: [parserCss], - }); - return formattedText; - } else if (language === 'graphql') { - const formattedText = prettier.format(text, { - parser: 'graphql', - plugins: [parserGraphql], - }); - return formattedText; - } else if (language === 'markdown') { - const formattedText = prettier.format(text, { - parser: 'markdown', - plugins: [parserMarkdown], - }); - return formattedText; - } else if (language === 'html') { - const formattedText = prettier.format(text, { - parser: 'html', - plugins: [parserHtml], - }); - return formattedText; - } else if (language === 'javascript') { - const formattedText = prettier.format(text, { - parser: 'babel', - plugins: [parserBabel], - }); - return formattedText; - } else if (language === 'less') { - const formattedText = prettier.format(text, { - parser: 'less', - plugins: [parserCss], - }); - return formattedText; - } else if (language === 'typescript') { - const formattedText = prettier.format(text, { - parser: 'typescript', - plugins: [parserTypescript], - }); - return formattedText; - } else if (language === 'scss') { - const formattedText = prettier.format(text, { - parser: 'scss', - plugins: [parserCss], - }); - return formattedText; - } else if (language === 'yaml') { - const formattedText = prettier.format(text, { - parser: 'yaml', - plugins: [parserYaml], - }); - return formattedText; - } - } catch (error) { - console.error('Error formatting code:', error); - } -}; diff --git a/src/lib/renderMarkdown.ts b/src/lib/renderMarkdown.ts deleted file mode 100644 index 0b0a87a..0000000 --- a/src/lib/renderMarkdown.ts +++ /dev/null @@ -1,59 +0,0 @@ -import React, { ReactNode } from 'react'; -import unified from 'unified'; -import parse from 'remark-parse'; -import remark2rehype from 'remark-rehype'; -import rehype2react from 'rehype-react'; -import { debounce } from 'lodash'; - -// Remark -const breaks = require('remark-breaks'); -const externalLinks = require('remark-external-links'); -const footnotes = require('remark-footnotes'); -const gfm = require('remark-gfm'); -const gemoji = require('remark-gemoji'); -const math = require('remark-math'); -const slug = require('remark-slug'); -const toc = require('remark-toc'); - -// Rehype -const highlight = require('rehype-highlight'); -const rehypeKatex = require('rehype-katex'); -const raw = require('rehype-raw'); - -const processor = unified() - .use(parse) - .use(gfm) - .use(breaks) - .use(slug) - .use(toc, { maxDepth: 6 }) - .use(externalLinks) - .use(footnotes, { inlineNotes: true }) - .use(gemoji) - .use(remark2rehype, { allowDangerousHtml: true }) - .use(raw) - .use(math) - .use(rehypeKatex) - .use(highlight, { ignoreMissing: true }) - .use(rehype2react, { createElement: React.createElement }); - -export const processMarkdown = (text: string) => { - //console.log('processedMarkdown'); - const markdown = processor.processSync(text).result as ReactNode; - return markdown; -}; - -/** Debounce the rendering of markdown to prevent lag - * when rendering long notes or lots of Markdown or KaTeX */ -export const renderMarkdown = debounce((text: string): React.ReactNode => { - //console.log('renderMarkdown', text.substring(0, 10)); - const markdown = processMarkdown(text); - return markdown; -}, 500); - -export const getCodeText = (language: string, text: string): string => { - if (language !== 'markdown' && language !== 'html' && text) { - return '```' + language + '\n' + text + '\n```'; - } else { - return text; - } -}; diff --git a/src/logo.svg b/src/logo.svg deleted file mode 100644 index 9dfc1c0..0000000 --- a/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/react-app-env.d.ts b/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5..0000000 --- a/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/src/reportWebVitals.ts b/src/reportWebVitals.ts deleted file mode 100644 index 49a2a16..0000000 --- a/src/reportWebVitals.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ReportHandler } from 'web-vitals'; - -const reportWebVitals = (onPerfEntry?: ReportHandler) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/src/setupTests.ts b/src/setupTests.ts deleted file mode 100644 index 8f2609b..0000000 --- a/src/setupTests.ts +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; diff --git a/src/stylesheets/dark.scss b/src/stylesheets/dark.scss deleted file mode 100644 index 865bb15..0000000 --- a/src/stylesheets/dark.scss +++ /dev/null @@ -1,59 +0,0 @@ -@media (prefers-color-scheme: dark) { - // This is the Midnight theme available here: - // https://github.com/sn-extensions/midnight-theme - // Licensed under AGPL-3.0 - :root { - --primary-bg-color: #292937; - --secondary-bg-color: #313142; - --editor-bg-color: #202020; - --border-color: #13131a; - --ui-text-color: #d8d8d8; - - --sn-stylekit-info-color: #086dd6; - --sn-stylekit-info-contrast-color: white; - - --sn-stylekit-neutral-color: #7c7c7c; - --sn-stylekit-neutral-contrast-color: white; - - --sn-stylekit-success-color: #2b9612; - --sn-stylekit-success-contrast-color: white; - - --sn-stylekit-warning-color: #f6a200; - --sn-stylekit-warning-contrast-color: white; - - --sn-stylekit-danger-color: #f80324; - --sn-stylekit-danger-contrast-color: white; - - --sn-desktop-titlebar-bg-color: var(--primary-bg-color); - --sn-desktop-titlebar-border-color: var(--border-color); - --sn-desktop-titlebar-ui-color: var(--ui-text-color); - --sn-desktop-titlebar-ui-hover-color: var(--sn-stylekit-info-color); - - // StyleKit Vars - --sn-stylekit-shadow-color: #20202b; - - --sn-stylekit-background-color: #20202b; - --sn-stylekit-border-color: var(--border-color); - --sn-stylekit-foreground-color: var(--ui-text-color); - - --sn-stylekit-contrast-background-color: var(--secondary-bg-color); - --sn-stylekit-contrast-foreground-color: var(--ui-text-color); - --sn-stylekit-contrast-border-color: var(--border-color); - - --sn-stylekit-secondary-background-color: #292937; - --sn-stylekit-secondary-foreground-color: var(--ui-text-color); - --sn-stylekit-secondary-border-color: var(--border-color); - - --sn-stylekit-secondary-contrast-background-color: #45445a; - --sn-stylekit-secondary-contrast-foreground-color: var(--ui-text-color); - --sn-stylekit-secondary-contrast-border-color: var(--border-color); - - --sn-stylekit-editor-background-color: var(--sn-stylekit-background-color); - --sn-stylekit-editor-foreground-color: var(--sn-stylekit-foreground-color); - - --sn-stylekit-paragraph-text-color: var(--ui-text-color); - - --sn-stylekit-scrollbar-track-border-color: var(--border-color); - --sn-stylekit-scrollbar-thumb-color: var(--sn-stylekit-info-color); - } -} diff --git a/src/stylesheets/main.scss b/src/stylesheets/main.scss deleted file mode 100644 index 193592c..0000000 --- a/src/stylesheets/main.scss +++ /dev/null @@ -1,533 +0,0 @@ -@import '~sn-stylekit/dist/stylekit.css'; -@import '~highlight.js/scss/vs.scss'; - -:root { - --sn-stylekit-font-size-editor: 16px; - --sn-stylekit-monospace-font: SFMono-Regular, Consolas, Liberation Mono, Menlo, - 'Ubuntu Mono', 'Courier New', monospace; -} - -body, -html { - background-color: transparent; - background-color: var(--sn-stylekit-background-color); - font-family: var(--sn-stylekit-sans-serif-font); - font-size: var(--sn-stylekit-base-font-size); - height: 100%; - margin: 0; - padding: 0; - width: 100%; - /* This is used to prevent KaTeX from overflowing the page */ - overflow-y: hidden; -} - -* { - // To prevent gray flash when focusing input on mobile Safari - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} - -.sn-component { - display: flex; - flex-direction: column; - font-size: var(--sn-stylekit-font-size-editor); - min-height: 100vh; - @media screen and (max-width: 420px) { - min-height: -webkit-fill-available; - } - &.vs { - background-color: #fffffe; - .settings { - color: #000000; - } - } - &.vs-dark { - background-color: #1e1e1e; - .settings { - color: #d4d4d4; - } - } - &.hc-black { - background-color: #000000; - .settings { - color: #ffffff; - } - } -} - -/* Content */ -#contentContainer { - display: flex; - flex-direction: row; - &.editMode { - .MonacoEditorContainerParentDiv { - width: 100%; - } - } - &.viewMode { - #viewContainer { - width: 100%; - } - } - &.editMode.viewMode { - .MonacoEditorContainerParentDiv, - #viewContainer { - width: 50%; - } - } - height: var(--heightVar); - /* Needs both max and min for the MonacoEditorContainerParentDiv */ - max-height: var(--heightVar); - min-height: var(--heightVar); - --heightVar: calc(100vh - 2em); - @media screen and (max-width: 1172px) { - --heightVar: calc(100vh - 3.25em); - } - @media screen and (max-width: 1068px) { - --heightVar: calc(100vh - 3.5em); - } - /* For three lines of settings */ - @media screen and (max-width: 840px) { - --heightVar: calc(100vh - 5.5em); - } - /* Make settings small when hidden */ - &.hideSettings { - --heightVar: calc(100vh - 2em); - } -} - -/** Monaco Editor Parent div*/ -.MonacoEditorContainerParentDiv { - min-width: 150px; - // Hides the horizontal scroll bar when using the Monaco Editor - // Otherwise the horizontal scroll bar will flash when the Monaco editor suggests words - overflow-x: hidden !important; - overflow-y: hidden; - padding-top: 1em; - width: 100%; -} - -.MonacoEditorContainer, -.MonacoDiffEditorContainer { - height: 100%; - width: 100%; -} - -/* view mode */ -#viewContainer, -.error-boundary, -.note-dialog { - background-color: var(--sn-stylekit-background-color); - font-size: var(--sn-stylekit-font-size-editor); - @media screen and (max-width: 650px) { - font-size: 18px; - } - line-height: 1.7; - overflow: auto; - padding: 1em; - - a { - color: var(--sn-stylekit-info-color); // #086dd6; - text-decoration: none; - } - - a:hover { - text-decoration: underline; - } - - blockquote { - margin: 0; - margin-top: 0; - margin-bottom: 16px; - padding: 0 1em; - color: #6a737d; - border-left: 0.25em solid #dfe2e5; - } - - hr { - border: 0.5px solid var(--sn-stylekit-border-color); - } - - img { - max-width: 100%; // 645.500px; - } - - table { - display: block; - width: 100%; - overflow: auto; - margin-top: 0; - margin-bottom: 16px; - border-spacing: 0; - border-collapse: collapse; - - tr { - background-color: transparent; // #fff; - border-top: 1px solid var(--sn-stylekit-contrast-border-color); // #c6cbd1; - } - - td, - th { - padding: 6px 13px; - border: 1px solid var(--sn-stylekit-contrast-border-color); // #dfe2e5; - } - - tr:nth-child(2n) { - background-color: var( - --sn-stylekit-contrast-background-color - ); // #f6f8fa; - code, - pre { - background-color: var(--sn-stylekit-background-color); - } - } - } - summary { - .link { - display: inline; - color: var(--sn-stylekit-info-color); - } - .link:hover { - text-decoration: underline; - } - } - - h1, - h2, - h3 { - line-height: normal; - } - - /* Code */ - code, - pre { - font-family: var(--sn-stylekit-monospace-font); - } - .hljs { - color: var(--sn-stylekit-contrast-foreground-color); - } - .hljs-tag { - color: var(--sn-stylekit-foreground-color); - } - - code { - box-sizing: border-box; - word-wrap: break-word; - padding: 0.2em 0.4em; - margin: 0; - font-size: 85%; - background-color: var( - --sn-stylekit-contrast-background-color - ); // rgba(27,31,35,.05); - border-radius: 3px; - } - - pre { - padding: 16px; - overflow: auto; - font-size: 85%; - line-height: 1.45; - background-color: var( - --sn-stylekit-contrast-background-color - ); // rgba(27,31,35,.05);// #f6f8fa; the latter doesn't work well on dark mode - color: var(--sn-stylekit-foreground-color); - border-radius: 3px; - word-wrap: normal; - margin-top: 0; - margin-bottom: 16px; - } - - pre > code { - padding: 0; - margin: 0; - font-size: 100%; - word-break: normal; - white-space: pre; - background: transparent; - background-color: transparent; - border: 0; - } - - pre code { - display: inline; - max-width: auto; - padding: 0; - margin: 0; - overflow: visible; - line-height: inherit; - word-wrap: normal; - background-color: initial; - border: 0; - } -} - -.error-boundary > :nth-child(1), -#viewContainer > div > :nth-child(1) { - margin-top: 0px; -} - -/** Settings */ -#settingsContainer { - display: flex; - flex-direction: row; - margin-bottom: auto; - margin-top: auto; - opacity: 0.2; - overflow-x: auto; - padding-bottom: 0.1em; - padding-left: 1em; - padding-top: 0.1em; - transition: opacity 400ms ease-out; - @media screen and (max-width: 720px) { - padding-left: 0.5em; - } - @media screen and (max-width: 500px) { - opacity: 0.5; - } - /* If screen is big enough to fit all buttons */ - @media screen and (min-width: 840px) { - &.hide { - opacity: 0; - } - } - &:focus, - &:hover, - &.focused { - opacity: 1; - transition: opacity 250ms ease-in; - } -} - -.settings { - color: var(--sn-stylekit-foreground-color); - display: flex; - padding-right: 0.5em; - &.buttons { - padding-right: 0px; - } - &.buttons .button { - margin-right: 0.5em; - } - .button { - border-width: 0px; - max-height: 22.6px; - padding: 0px 0.5em; - } - input[type='checkbox' i]:hover, - select:hover { - cursor: pointer; - } - .label { - display: block; - font-size: 16px; - text-align: center; - } - label { - min-height: 22.6px; - } - select { - background-color: var(--sn-stylekit-background-color); - color: var(--sn-stylekit-foreground-color); - //font-size: var(--sn-stylekit-font-size-editor); - font-size: 16px; - } - @media screen and (max-width: 1068px) { - flex-direction: column; - &.buttons { - flex-direction: row; - } - } -} - -/* Persist for all themes */ -.MonacoEditorContainer { - /* This hides the shadow at the top of the editor */ - .monaco-editor .scroll-decoration { - box-shadow: none; - } -} - -/* Only for Sn theme */ -.sn-theme { - .monaco-editor .line-numbers { - color: var(--sn-stylekit-foreground-color); - opacity: 0.6; - } - - /** This is the editing / input container */ - .monaco-editor, - .monaco-editor .margin, /* This is the line numbers container */ - .monaco-editor-background, - .monaco-editor .inputarea.ime-input { - background-color: var(--sn-stylekit-background-color); - } - - /* Find widget */ - .monaco-editor .find-widget { - box-shadow: 0 2px 8px var(--sn-stylekit-shadow-color); - background-color: var(--sn-stylekit-contrast-background-color); - } - .monaco-editor .find-widget > .find-part .monaco-inputbox, - .monaco-editor .find-widget > .replace-part .monaco-inputbox { - background-color: var(--sn-stylekit-background-color) !important; - border-color: var(--sn-stylekit-border-color) !important; - } - .monaco-editor .find-widget .monaco-inputbox.synthetic-focus { - outline-color: var(--sn-stylekit-info-color); - } - .monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input, - .monaco-editor - .find-widget - > .replace-part - .monaco-inputbox - > .wrapper - > .input { - color: var(--sn-stylekit-foreground-color) !important; - } - .monaco-editor .find-widget.no-results .matchesCount { - color: var(--sn-stylekit-danger-color); - } - - /* Mini Map */ - .monaco-editor .minimap-shadow-visible { - box-shadow: var(--sn-stylekit-shadow-color) -6px 0 6px -6px inset; - } - - /* Quick input widget */ - .quick-input-widget.show-file-icons { - background-color: var(--sn-stylekit-contrast-background-color) !important; - color: var(--sn-stylekit-foreground-color) !important; - box-shadow: var(--sn-stylekit-shadow-color) 0px 5px 8px !important; - } - - /* This is for the text and keyboard items in the list when you right click and press F1 - and also the icons in the find widget */ - .monaco-editor .monaco-list-row, - .monaco-editor .monaco-keybinding-key, - .monaco-editor .find-widget, - .mtk1 { - color: var(--sn-stylekit-foreground-color); - } - - /* This is for 'recently used' and 'other commands' */ - .monaco-editor .quick-input-list-separator { - color: var(--sn-stylekit-info-color); - } - - @media (prefers-color-scheme: light) { - /* This is for normal text */ - .mtk10 { - color: var(--sn-stylekit-foreground-color); - } - /* This is for headers */ - .mtk6 { - color: var(--sn-stylekit-success-color); - } - /* This is for links */ - .mtk20, - .mtk20.detected-link, - .mtk21, - .mtk21.detected-link { - color: var(--sn-stylekit-info-color); - opacity: 0.95; - } - } - - @media (prefers-color-scheme: dark) { - /* This is for headers */ - .mtk9 { - color: var(--sn-stylekit-success-color); - opacity: 0.95; - } - /* This is for links */ - .mtk5, - .mtk5.detected-link { - color: var(--sn-stylekit-info-color); - opacity: 0.95; - } - } -} - -.error-boundary { - background-color: var(--sn-stylekit-background-color); - color: var(--sn-stylekit-foreground-color); - font-size: var(--sn-stylekit-font-size-editor); -} - -/* For Print */ -.note-overlay { - position: fixed !important; - width: 100%; - height: 100%; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 100; -} - -/* Also for Print */ -.note-dialog { - /* Positioning */ - max-width: 700px; - width: 100%; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - z-index: 200; - /* Content */ - line-height: normal; - padding: 0px; - /* Button */ - button { - color: var(--sn-stylekit-foreground-color); - background-color: transparent; - border-width: 0px; - font-family: var(--sn-stylekit-sans-serif-font); - font-size: var(--sn-stylekit-font-size-editor); - } - button:hover { - background-color: var(--sn-stylekit-contrast-background-color); - cursor: pointer; - } - button:focus { - outline: -webkit-focus-ring-color auto 1px; - outline-color: -webkit-focus-ring-color; - outline-style: auto; - outline-width: 1px; - } - /* Title */ - .title-section { - padding-top: 0px; - h1, - h2 { - margin: 0.2em 0px; - } - } - /* Section */ - .sk-panel-section:last-child { - margin-bottom: 0px; - } - /* Footer */ - .sk-button.info, - .sk-button.neutral { - font-size: var(--sn-stylekit-font-size-editor); - @media screen and (max-width: 650px) { - font-size: 18px; - } - } -} - -.inline-text-and-svg { - display: inline-flex; - padding-left: 0px; - padding-right: 0px; - svg { - opacity: 0.75; - margin-bottom: auto; - margin-top: auto; - } -} - -@import './print.scss'; -@import './dark.scss'; diff --git a/src/stylesheets/print.scss b/src/stylesheets/print.scss deleted file mode 100644 index ec21f72..0000000 --- a/src/stylesheets/print.scss +++ /dev/null @@ -1,36 +0,0 @@ -@media print { - .print-url { - a[href]:after { - content: ' (' attr(href) ')'; - } - } - - .sn-component, - textarea { - outline: none; - } - - html, - body { - overflow: unset; - } - - #contentContainer { - height: 100%; - max-height: unset; - padding-top: 0px; - width: 100%; - #viewContainer { - width: 100% !important; - pre code { - white-space: pre-wrap; - word-break: break-word; - } - } - } - - .MonacoEditorContainerParentDiv, - #settingsContainer { - display: none; - } -} diff --git a/static/css/4.1b641094.chunk.css b/static/css/4.1b641094.chunk.css new file mode 100644 index 0000000..e7924bd --- /dev/null +++ b/static/css/4.1b641094.chunk.css @@ -0,0 +1,2 @@ +.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,"Segoe WPC","Segoe UI","HelveticaNeue-Light",system-ui,"Ubuntu","Droid Sans",sans-serif;--monaco-monospace-font:"SF Mono",Monaco,Menlo,Consolas,"Ubuntu Mono","Liberation Mono","DejaVu Sans Mono","Courier New",monospace}.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{position:absolute!important;height:1px;width:1px;left:inherit!important;overflow:hidden;clip:rect(1px,1px,1px,1px)}.monaco-editor.hc-black{-ms-high-contrast-adjust:none}@media screen and (-ms-high-contrast:active){.monaco-editor.vs-dark .view-overlays .current-line,.monaco-editor.vs .view-overlays .current-line{border-color:windowtext!important;border-left:0;border-right:0}.monaco-editor.vs-dark .cursor,.monaco-editor.vs .cursor{background-color:windowtext!important}.monaco-editor.vs-dark .dnd-target,.monaco-editor.vs .dnd-target{border-color:windowtext!important}.monaco-editor.vs-dark .selected-text,.monaco-editor.vs .selected-text{background-color:highlight!important}.monaco-editor.vs-dark .view-line,.monaco-editor.vs .view-line{-ms-high-contrast-adjust:none}.monaco-editor.vs-dark .view-line span,.monaco-editor.vs .view-line span{color:windowtext!important}.monaco-editor.vs-dark .view-line span.inline-selected-text,.monaco-editor.vs .view-line span.inline-selected-text{color:highlighttext!important}.monaco-editor.vs-dark .view-overlays,.monaco-editor.vs .view-overlays{-ms-high-contrast-adjust:none}.monaco-editor.vs-dark .reference-decoration,.monaco-editor.vs-dark .selectionHighlight,.monaco-editor.vs-dark .wordHighlight,.monaco-editor.vs-dark .wordHighlightStrong,.monaco-editor.vs .reference-decoration,.monaco-editor.vs .selectionHighlight,.monaco-editor.vs .wordHighlight,.monaco-editor.vs .wordHighlightStrong{border:2px dotted highlight!important;background:transparent!important;box-sizing:border-box}.monaco-editor.vs-dark .rangeHighlight,.monaco-editor.vs .rangeHighlight{background:transparent!important;border:1px dotted activeborder!important;box-sizing:border-box}.monaco-editor.vs-dark .bracket-match,.monaco-editor.vs .bracket-match{border-color:windowtext!important;background:transparent!important}.monaco-editor.vs-dark .currentFindMatch,.monaco-editor.vs-dark .findMatch,.monaco-editor.vs .currentFindMatch,.monaco-editor.vs .findMatch{border:2px dotted activeborder!important;background:transparent!important;box-sizing:border-box}.monaco-editor.vs-dark .find-widget,.monaco-editor.vs .find-widget{border:1px solid windowtext}.monaco-editor.vs-dark .monaco-list .monaco-list-row,.monaco-editor.vs .monaco-list .monaco-list-row{-ms-high-contrast-adjust:none;color:windowtext!important}.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused,.monaco-editor.vs .monaco-list .monaco-list-row.focused{color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover,.monaco-editor.vs .monaco-list .monaco-list-row:hover{background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar,.monaco-editor.vs .monaco-scrollable-element>.scrollbar{-ms-high-contrast-adjust:none;background:background!important;border:1px solid windowtext;box-sizing:border-box}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider{background:windowtext!important}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider:hover,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider:hover{background:highlight!important}.monaco-editor.vs-dark .decorationsOverviewRuler,.monaco-editor.vs .decorationsOverviewRuler{opacity:0}.monaco-editor.vs-dark .minimap,.monaco-editor.vs .minimap{display:none}.monaco-editor.vs-dark .squiggly-d-error,.monaco-editor.vs .squiggly-d-error{background:transparent!important;border-bottom:4px double #e47777}.monaco-editor.vs-dark .squiggly-b-info,.monaco-editor.vs-dark .squiggly-c-warning,.monaco-editor.vs .squiggly-b-info,.monaco-editor.vs .squiggly-c-warning{border-bottom:4px double #71b771}.monaco-editor.vs-dark .squiggly-a-hint,.monaco-editor.vs .squiggly-a-hint{border-bottom:4px double #6c6c6c}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{-ms-high-contrast-adjust:none;color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label{-ms-high-contrast-adjust:none;background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-diff-editor.vs-dark .diffOverviewRuler,.monaco-diff-editor.vs .diffOverviewRuler{display:none}.monaco-editor.vs-dark .line-delete,.monaco-editor.vs-dark .line-insert,.monaco-editor.vs .line-delete,.monaco-editor.vs .line-insert{background:transparent!important;border:1px solid highlight!important;box-sizing:border-box}.monaco-editor.vs-dark .char-delete,.monaco-editor.vs-dark .char-insert,.monaco-editor.vs .char-delete,.monaco-editor.vs .char-insert{background:transparent!important}}.monaco-aria-container{position:absolute;left:-999em}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .inputarea{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent}.monaco-editor .inputarea.ime-input{z-index:10}.monaco-editor .margin-view-overlays .line-numbers{font-feature-settings:"tnum";font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;box-sizing:border-box;cursor:default;height:100%}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-mouse-cursor-text{cursor:text}.hc-black.mac .monaco-mouse-cursor-text,.hc-black .mac .monaco-mouse-cursor-text,.vs-dark.mac .monaco-mouse-cursor-text,.vs-dark .mac .monaco-mouse-cursor-text{cursor:-webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x,url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8,text}.monaco-editor .margin-view-overlays .current-line,.monaco-editor .view-overlays .current-line{display:block;position:absolute;left:0;top:0;box-sizing:border-box}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:transparent;transition:opacity .1s linear}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:inset 0 6px 6px -6px #ddd}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:inset 6px 0 6px -6px #ddd}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:inset 6px 6px 6px -6px #ddd}.vs .monaco-scrollable-element>.scrollbar>.slider{background:hsla(0,0%,39.2%,.4)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:hsla(0,0%,47.5%,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider{background:rgba(111,195,223,.6)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:hsla(0,0%,39.2%,.7)}.hc-black .monaco-scrollable-element>.scrollbar>.slider:hover{background:rgba(111,195,223,.8)}.monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(0,0,0,.6)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active{background:hsla(0,0%,74.9%,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider.active{background:#6fc3df}.vs-dark .monaco-scrollable-element .shadow.top{box-shadow:none}.vs-dark .monaco-scrollable-element .shadow.left{box-shadow:inset 6px 0 6px -6px #000}.vs-dark .monaco-scrollable-element .shadow.top.left{box-shadow:inset 6px 6px 6px -6px #000}.hc-black .monaco-scrollable-element .shadow.left,.hc-black .monaco-scrollable-element .shadow.top,.hc-black .monaco-scrollable-element .shadow.top.left{box-shadow:none}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .margin-view-overlays .cgmr{position:absolute;display:flex;align-items:center;justify-content:center}.monaco-editor .lines-content .cigr,.monaco-editor .lines-content .cigra{position:absolute}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .mtkz{display:inline-block}.monaco-editor .lines-decorations{position:absolute;top:0;background:#fff}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}.monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover .minimap-slider.active,.monaco-editor .minimap.slider-mouseover:hover .minimap-slider{opacity:1}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{position:absolute;left:-1px;width:1px}.monaco-editor .overlayWidgets{position:absolute;top:0;left:0}.monaco-editor .view-ruler{position:absolute;top:0}.monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;overflow:hidden}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{box-sizing:border-box;background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{border-bottom-width:2px;border-bottom-style:solid;background:transparent!important;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{border-bottom-width:1px;border-bottom-style:solid;background:transparent!important;box-sizing:border-box}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:rgba(0,0,0,.03)}.monaco-diff-editor.vs-dark .diffOverview{background:hsla(0,0%,100%,.01)}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar{background:transparent}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:hsla(0,0%,67.1%,.4)}.modified-in-monaco-diff-editor.hc-black .slider.active{background:none}.monaco-diff-editor .delete-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-editor .insert-sign{font-size:11px!important;opacity:.7!important;display:flex!important;align-items:center}.monaco-diff-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-editor.hc-black .insert-sign{opacity:1}.monaco-editor .inline-added-margin-view-zone,.monaco-editor .inline-deleted-margin-view-zone{text-align:right}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}:root{--sash-size:4px}.monaco-sash{position:absolute;z-index:35;touch-action:none}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;top:0;width:4px;width:var(--sash-size);height:100%}.monaco-sash.horizontal{cursor:ns-resize;left:0;width:100%;height:4px;height:var(--sash-size)}.monaco-sash:not(.disabled).orthogonal-end:after,.monaco-sash:not(.disabled).orthogonal-start:before{content:" ";height:8px;height:calc(var(--sash-size)*2);width:8px;width:calc(var(--sash-size)*2);z-index:100;display:block;cursor:all-scroll;position:absolute}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled).orthogonal-start:before,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled).orthogonal-end:after{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled).orthogonal-end:after,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled).orthogonal-start:before{cursor:nesw-resize}.monaco-sash.orthogonal-start.vertical:before{left:2px;left:-calc(var(--sash-size)/2);top:-4px;top:calc(var(--sash-size)*-1)}.monaco-sash.orthogonal-end.vertical:after{left:2px;left:-calc(var(--sash-size)/2);bottom:-4px;bottom:calc(var(--sash-size)*-1)}.monaco-sash.orthogonal-start.horizontal:before{top:2px;top:-calc(var(--sash-size)/2);left:-4px;left:calc(var(--sash-size)*-1)}.monaco-sash.orthogonal-end.horizontal:after{top:2px;top:-calc(var(--sash-size)/2);right:-4px;right:calc(var(--sash-size)*-1)}.monaco-sash{transition:background-color .1s ease-out;background:transparent}.monaco-sash.debug{background:#0ff}.monaco-sash.debug.disabled{background:rgba(0,255,255,.2)}.monaco-sash.debug:not(.disabled).orthogonal-end:after,.monaco-sash.debug:not(.disabled).orthogonal-start:before{background:red}.monaco-diff-editor .diff-review-line-number{text-align:right;display:inline-block}.monaco-diff-editor .diff-review{position:absolute;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-diff-editor .diff-review-summary{padding-left:10px}.monaco-diff-editor .diff-review-shadow{position:absolute}.monaco-diff-editor .diff-review-row{white-space:pre}.monaco-diff-editor .diff-review-table{display:table;min-width:100%}.monaco-diff-editor .diff-review-row{display:table-row;width:100%}.monaco-diff-editor .diff-review-spacer{display:inline-block;width:10px;vertical-align:middle}.monaco-diff-editor .diff-review-spacer>.codicon{font-size:9px!important}.monaco-diff-editor .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px}.monaco-diff-editor .diff-review-actions .action-label{width:16px;height:16px;margin:2px 0}.monaco-action-bar{text-align:right;white-space:nowrap}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;width:100%;justify-content:flex-end}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar.reverse .actions-container{flex-direction:row-reverse}.monaco-action-bar .action-item{cursor:pointer;display:inline-block;transition:transform 50ms ease;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar.animated .action-item.active{transform:scale(1.272019649)}.monaco-action-bar .action-item .codicon,.monaco-action-bar .action-item .icon{display:inline-block}.monaco-action-bar .action-item .codicon{display:flex;align-items:center}.monaco-action-bar .action-label{font-size:11px;margin-right:4px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:hover{opacity:.4}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{display:block;border-bottom:1px solid #bbb;padding-top:1px;margin-left:.8em;margin-right:.8em}.monaco-action-bar.animated.vertical .action-item.active{transform:translate(5px)}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{overflow:hidden;flex:1 1;max-width:170px;min-width:60px;display:flex;align-items:center;justify-content:center;margin-right:10px}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-label{margin-right:1px}.context-view .monaco-menu{min-width:130px}.context-view{position:absolute;z-index:2500}.context-view.fixed{animation:none 0s ease 0s 1 normal none running;-webkit-backface-visibility:visible;backface-visibility:visible;background:transparent none repeat 0 0/auto auto padding-box border-box scroll;border:none;border-collapse:separate;border-image:none;border-radius:0;border-spacing:0;bottom:auto;box-shadow:none;box-sizing:content-box;caption-side:top;clear:none;clip:auto;color:#000;-webkit-columns:auto;-webkit-column-count:auto;-webkit-column-fill:balance;column-fill:balance;grid-column-gap:normal;-webkit-column-gap:normal;column-gap:normal;-webkit-column-rule:medium none currentColor;column-rule:medium none currentColor;-webkit-column-span:1;column-span:1;-webkit-column-width:auto;columns:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:inline;empty-cells:show;float:none;font-family:serif;font-size:medium;font-style:normal;font-feature-settings:normal;font-variant:normal;font-weight:400;font-stretch:normal;line-height:normal;height:auto;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none;left:auto;letter-spacing:normal;list-style:disc outside none;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:2;outline:medium none invert;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;position:static;right:auto;-moz-tab-size:8;tab-size:8;table-layout:auto;text-align:left;text-align-last:auto;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-origin:50% 50% 0;transform-style:flat;transition:none 0s ease 0s;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:2;width:auto;word-spacing:normal;z-index:auto;all:initial;font-family:inherit;font-size:13px;position:fixed;z-index:2500;color:inherit}@font-face{font-family:"codicon";src:url(../../static/media/codicon.4168b9c1.ttf) format("truetype")}.codicon[class*=codicon-]{font:normal normal normal 16px/1 codicon;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none;-webkit-user-select:none;-ms-user-select:none}.codicon-wrench-subaction{opacity:.5}@keyframes codicon-spin{to{transform:rotate(1turn)}}.codicon-loading.codicon-modifier-spin,.codicon-sync.codicon-modifier-spin{animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{animation-duration:1s!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}.monaco-list{position:relative;height:100%;width:100%;white-space:nowrap}.monaco-list.mouse-support{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{position:relative;width:100%;height:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{width:auto;min-width:100%}.monaco-list-row{position:absolute;box-sizing:border-box;overflow:hidden;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-multiple,.monaco-list.selection-single{outline:0!important}.monaco-list:focus .monaco-list-row.selected .codicon{color:inherit}.monaco-drag-image{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;position:absolute;z-index:1000}.monaco-list-type-filter{display:flex;align-items:center;position:absolute;border-radius:2px;padding:0 3px;max-width:calc(100% - 10px);text-overflow:ellipsis;overflow:hidden;text-align:right;box-sizing:border-box;cursor:all-scroll;font-size:13px;line-height:18px;height:20px;z-index:1;top:4px}.monaco-list-type-filter.dragging{transition:top .2s,left .2s}.monaco-list-type-filter.ne{right:4px}.monaco-list-type-filter.nw{left:4px}.monaco-list-type-filter>.controls{display:flex;align-items:center;box-sizing:border-box;transition:width .2s;width:0}.monaco-list-type-filter.dragging>.controls,.monaco-list-type-filter:hover>.controls{width:36px}.monaco-list-type-filter>.controls>*{border:none;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;background:none;width:16px;height:16px;flex-shrink:0;margin:0;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer}.monaco-list-type-filter>.controls>.filter{margin-left:4px}.monaco-list-type-filter-message{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;padding:40px 1em 1em;text-align:center;white-space:normal;opacity:.7;pointer-events:none}.monaco-list-type-filter-message:empty{display:none}.monaco-list-type-filter{cursor:-webkit-grab;cursor:grab}.monaco-list-type-filter.dragging{cursor:-webkit-grabbing;cursor:grabbing}.monaco-tl-row{display:flex;height:100%;align-items:center;position:relative}.monaco-tl-indent{height:100%;position:absolute;top:0;left:16px;pointer-events:none}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{display:inline-block;box-sizing:border-box;height:100%;border-left:1px solid transparent;transition:border-color .1s linear}.monaco-tl-contents,.monaco-tl-twistie{height:100%}.monaco-tl-twistie{font-size:10px;text-align:right;padding-right:6px;flex-shrink:0;width:16px;display:flex!important;align-items:center;justify-content:center;color:inherit!important;transform:translateX(3px)}.monaco-tl-contents{flex:1 1;overflow:hidden}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{animation:codicon-spin 1.25s steps(30) infinite}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.quick-input-widget{position:absolute;width:600px;z-index:2000;padding-bottom:6px;left:50%;margin-left:-300px}.quick-input-titlebar{display:flex}.quick-input-left-action-bar{display:flex;margin-left:4px;flex:1 1}.quick-input-left-action-bar.monaco-action-bar .actions-container{justify-content:flex-start}.quick-input-title{padding:3px 0;text-align:center}.quick-input-right-action-bar{display:flex;margin-right:4px;flex:1 1}.quick-input-titlebar .monaco-action-bar .action-label.codicon{margin:0;width:19px;height:100%;background-position:50%;background-repeat:no-repeat}.quick-input-description{margin:6px}.quick-input-header .quick-input-description{margin:4px 2px}.quick-input-header{display:flex;padding:6px 6px 0;margin-bottom:-2px}.quick-input-widget.hidden-input .quick-input-header{padding:0;margin-bottom:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-filter{flex-grow:1;display:flex;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{position:absolute;left:-10000px}.quick-input-count{align-self:center;position:absolute;right:4px;display:flex;align-items:center}.quick-input-count .monaco-count-badge{vertical-align:middle;padding:2px 4px;border-radius:2px;min-height:auto;line-height:normal}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{font-size:11px;padding:0 6px;display:flex;height:27.5px;align-items:center}.quick-input-message{margin-top:-1px;padding:5px 5px 2px}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-progress.monaco-progress-container,.quick-input-progress.monaco-progress-container .progress-bit{height:2px}.quick-input-list{line-height:22px;margin-top:6px}.quick-input-widget.hidden-input .quick-input-list{margin-top:0}.quick-input-list .monaco-list{overflow:hidden;max-height:440px}.quick-input-list .quick-input-list-entry{box-sizing:border-box;overflow:hidden;display:flex;height:100%;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-width:1px;border-top-style:solid}.quick-input-list .monaco-list-row:first-child .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{overflow:hidden;display:flex;height:100%;flex:1 1}.quick-input-list .quick-input-list-checkbox{align-self:center;margin:0}.quick-input-list .quick-input-list-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1 1;margin-left:5px}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{display:flex;align-items:center}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1 1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:sub}.quick-input-list .quick-input-list-rows .monaco-highlighted-label span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{opacity:.7;line-height:normal;text-overflow:ellipsis;overflow:hidden}.quick-input-list .monaco-highlighted-label .highlight{font-weight:700}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:8px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0 1;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin:0;height:100%;padding:0 2px;vertical-align:middle}.quick-input-list .quick-input-list-entry-action-bar{margin-top:1px;margin-right:4px}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px}.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label{display:flex}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-size:16px;background-position:0;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;line-height:inherit!important;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;flex-shrink:0}.monaco-icon-label>.monaco-icon-label-container{min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1 1}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.7;margin-left:.5em;font-size:.9em;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{font-style:italic}.monaco-icon-label.deprecated{text-decoration:line-through;opacity:.66}.monaco-icon-label.italic:after{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{text-decoration:line-through}.monaco-icon-label:after{opacity:.75;font-size:90%;font-weight:600;padding:0 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.monaco-keybinding{display:flex;align-items:center;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{display:inline-block;border:1px solid hsla(0,0%,80%,.4);border-bottom-color:hsla(0,0%,73.3%,.4);border-radius:3px;box-shadow:inset 0 -1px 0 hsla(0,0%,73.3%,.4);background-color:hsla(0,0%,86.7%,.4);vertical-align:middle;color:#555;font-size:11px;padding:3px 5px;margin:0 2px}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.hc-black .monaco-keybinding>.monaco-keybinding-key,.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:hsla(0,0%,50.2%,.17);color:#ccc;border:1px solid rgba(51,51,51,.6);border-bottom-color:rgba(68,68,68,.6);box-shadow:inset 0 -1px 0 rgba(68,68,68,.6)}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}.monaco-inputbox{position:relative;display:block;padding:0;box-sizing:border-box;font-size:inherit}.monaco-inputbox.idle{border:1px solid transparent}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px}.monaco-inputbox>.ibwrapper{position:relative;width:100%;height:100%}.monaco-inputbox>.ibwrapper>.input{display:inline-block;box-sizing:border-box;width:100%;height:100%;line-height:inherit;border:none;font-family:inherit;font-size:inherit;resize:none;color:inherit}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{display:block;-ms-overflow-style:none;scrollbar-width:none;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{position:absolute;display:inline-block;width:100%;top:0;left:0;box-sizing:border-box;white-space:pre-wrap;visibility:hidden;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{display:inline-block;overflow:hidden;text-align:left;width:100%;box-sizing:border-box;padding:.4em;font-size:12px;line-height:17px;min-height:34px;margin-top:-1px;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;width:16px;height:16px}.monaco-count-badge{padding:3px 6px;border-radius:11px;font-size:11px;min-width:18px;min-height:18px;line-height:11px;font-weight:400;text-align:center;display:inline-block;box-sizing:border-box}.monaco-count-badge.long{padding:2px 3px;border-radius:2px;min-height:auto;line-height:normal}.monaco-progress-container{width:100%;height:5px;overflow:hidden}.monaco-progress-container .progress-bit{width:2%;height:5px;position:absolute;left:0;display:none}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{animation-name:progress;animation-duration:4s;animation-iteration-count:infinite;animation-timing-function:linear;transform:translateZ(0)}@keyframes progress{0%{transform:translateX(0) scaleX(1)}50%{transform:translateX(2500%) scaleX(3)}to{transform:translateX(4900%) scaleX(1)}}.monaco-text-button{box-sizing:border-box;display:flex;width:100%;padding:4px;text-align:center;cursor:pointer;justify-content:center;align-items:center}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled{opacity:.4;cursor:default}.monaco-text-button>.codicon{margin:0 .2em;color:inherit!important}.monaco-button-dropdown{display:flex}.monaco-button-dropdown>.monaco-dropdown-button{margin-left:1px}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{box-sizing:border-box}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{animation:fadeIn .15s ease-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{padding:1px 4px}.monaco-editor .monaco-editor-overlaymessage .anchor{width:0!important;height:0!important;z-index:1000;border:8px solid transparent;position:absolute}.monaco-editor .monaco-editor-overlaymessage.below .anchor.below,.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.monaco-editor .contentWidgets .codicon-light-bulb,.monaco-editor .contentWidgets .codicon-lightbulb-autofix{display:flex;align-items:center;justify-content:center}.monaco-editor .contentWidgets .codicon-light-bulb:hover,.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover{cursor:pointer}.monaco-editor .codelens-decoration{overflow:hidden;display:inline-block;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .codelens-decoration>a,.monaco-editor .codelens-decoration>span{user-select:none;-webkit-user-select:none;-ms-user-select:none;white-space:nowrap;vertical-align:sub}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer}.monaco-editor .codelens-decoration .codicon{vertical-align:middle;color:currentColor!important}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}.monaco-editor .codelens-decoration.fadein{animation:fadein .1s linear}.colorpicker-widget{height:190px;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .colorpicker-hover:focus{outline:none}.colorpicker-header{display:flex;height:24px;position:relative;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=");background-size:9px 9px;-ms-interpolation-mode:nearest-neighbor;image-rendering:-moz-crisp-edges;image-rendering:pixelated}.colorpicker-header .picked-color{width:216px;line-height:24px;cursor:pointer;color:#fff;flex:1 1;text-align:center}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{width:74px;z-index:inherit;cursor:pointer}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{overflow:hidden;height:150px;position:relative;min-width:220px;flex:1 1}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{width:9px;height:9px;margin:-5px 0 0 -5px;border:1px solid #fff;border-radius:100%;box-shadow:0 0 2px rgba(0,0,0,.8);position:absolute}.colorpicker-body .strip{width:25px;height:150px}.colorpicker-body .hue-strip{background:linear-gradient(180deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.colorpicker-body .hue-strip,.colorpicker-body .opacity-strip{position:relative;margin-left:8px;cursor:-webkit-grab;cursor:grab}.colorpicker-body .opacity-strip{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=");background-size:9px 9px;-ms-interpolation-mode:nearest-neighbor;image-rendering:-moz-crisp-edges;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:-webkit-grabbing;cursor:grabbing}.colorpicker-body .slider{position:absolute;top:0;left:-2px;width:calc(100% + 4px);height:4px;box-sizing:border-box;border:1px solid hsla(0,0%,100%,.71);box-shadow:0 0 1px rgba(0,0,0,.85)}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.monaco-hover{cursor:default;position:absolute;overflow:hidden;z-index:50;user-select:text;-webkit-user-select:text;-ms-user-select:text;box-sizing:content-box;box-sizing:initial;animation:fadein .1s linear;line-height:1.5em}.monaco-hover.hidden{display:none}.monaco-hover .hover-contents{padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){max-width:500px;word-wrap:break-word}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:calc(100% + 100vw)}.monaco-hover .code,.monaco-hover p,.monaco-hover ul{margin:8px 0}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{box-sizing:border-box;border-left:0;border-right:0;margin:4px -8px -4px;height:1px}.monaco-hover .code:first-child,.monaco-hover p:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover .code:last-child,.monaco-hover p:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ol,.monaco-hover ul{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:pre-wrap}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px}.monaco-hover .hover-row.status-bar .actions .action-container{margin-right:16px;cursor:pointer}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link{color:inherit}.monaco-hover .hover-contents a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents) span{margin-bottom:4px;display:inline-block}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;vertical-align:text-top;margin-right:4px}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{opacity:.6;font-style:italic}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{position:absolute;white-space:pre;user-select:text;-webkit-user-select:text;-ms-user-select:text;padding:8px 12px 0 20px}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{opacity:.6;color:inherit}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex}.monaco-editor .peekview-widget .head .peekview-title{display:flex;align-items:center;font-size:13px;margin-left:20px;cursor:pointer;min-width:0}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em}.monaco-editor .peekview-widget .head .peekview-title .dirname,.monaco-editor .peekview-widget .head .peekview-title .meta{white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1 1;text-align:right;padding-right:2px}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar .action-item{margin-left:4px}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar .action-label{width:16px;height:100%;margin:0;line-height:inherit;background-repeat:no-repeat;background-position:50%}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar .action-label.codicon{margin:0}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-top-style:solid;border-bottom-style:solid;border-top-width:0;border-bottom-width:0;position:relative}.monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-light);display:inline-flex}.hc-black .monaco-action-bar .action-item.menu-entry .action-label,.vs-dark .monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{cursor:pointer;height:100%}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-editor .goto-definition-link{text-decoration:underline;cursor:pointer}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-top-width:1px;border-bottom-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;width:100%;text-align:center;padding:3em 0}.monaco-editor .reference-zone-widget .ref-tree{line-height:23px}.monaco-editor .reference-zone-widget .ref-tree .reference{text-overflow:ellipsis;overflow:hidden}.monaco-editor .reference-zone-widget .ref-tree .reference-file{display:inline-flex;width:100%;height:100%}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-right:12px;margin-left:auto}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-split-view2{position:relative;width:100%;height:100%}.monaco-split-view2>.sash-container{position:absolute;width:100%;height:100%;pointer-events:none}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:auto}.monaco-split-view2>.monaco-scrollable-element{width:100%;height:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{width:100%;height:100%;white-space:nowrap;position:relative}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{white-space:normal;position:absolute}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{content:" ";position:absolute;top:0;left:0;z-index:5;pointer-events:none;background-color:var(--separator-border)}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-editor.vs .dnd-target{border-right:2px dotted #000;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #aeafad;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.hc-black.mac.mouse-default .view-lines,.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines{cursor:default}.monaco-editor.hc-black.mac.mouse-copy .view-lines,.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines{cursor:copy}.monaco-custom-checkbox{margin-left:2px;float:left;cursor:pointer;overflow:hidden;opacity:.7;width:20px;height:20px;border:1px solid transparent;padding:1px;box-sizing:border-box;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-custom-checkbox.checked,.monaco-custom-checkbox:hover{opacity:1}.hc-black .monaco-custom-checkbox,.hc-black .monaco-custom-checkbox:hover{background:none}.monaco-custom-checkbox.monaco-simple-checkbox{height:18px;width:18px;border:1px solid transparent;border-radius:3px;margin-right:9px;margin-left:0;padding:0;opacity:1;background-size:16px!important}.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked):before{visibility:hidden}.monaco-editor .find-widget{position:absolute;z-index:50;height:33px;overflow:hidden;line-height:19px;transition:transform .2s linear;padding:0 4px;box-sizing:border-box;transform:translateY(calc(-100% - 10px))}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{margin:4px 0 0 17px;font-size:12px;display:flex}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-top:2px;padding-bottom:2px}.monaco-editor .find-widget>.find-part .find-actions,.monaco-editor .find-widget>.replace-part .replace-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget .monaco-findInput{vertical-align:middle;display:flex;flex:1 1}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{display:flex;flex:initial;margin:0 0 0 3px;padding:2px 0 0 2px;height:25px;vertical-align:middle;box-sizing:border-box;text-align:center;line-height:23px}.monaco-editor .find-widget .button{width:20px;height:20px;flex:initial;margin-left:3px;background-position:50%;background-repeat:no-repeat;cursor:pointer;display:flex;align-items:center;justify-content:center}.monaco-editor .find-widget .button.left{margin-left:0;margin-right:3px}.monaco-editor .find-widget .button.wide{width:auto;padding:1px 6px;top:-1px}.monaco-editor .find-widget .button.toggle{position:absolute;top:0;left:3px;width:18px;height:100%;box-sizing:border-box}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{opacity:.3;cursor:default}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{position:relative;display:flex;vertical-align:middle;flex:auto;flex-grow:0;flex-shrink:0}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .findMatch{animation-duration:0;animation-name:inherit!important}.monaco-editor .find-widget .monaco-sash{left:0!important}.monaco-editor.hc-black .find-widget .button:before{position:relative;top:1px;left:2px}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@keyframes monaco-findInput-highlight-0{0%{background:rgba(253,255,0,.8)}to{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:rgba(253,255,0,.8)}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:hsla(0,0%,100%,.44)}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:hsla(0,0%,100%,.44)}99%{background:transparent}}.monaco-editor .margin-view-overlays .codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon-folding-expanded{cursor:pointer;opacity:0;transition:opacity .5s;display:flex;align-items:center;justify-content:center;font-size:140%;margin-left:2px}.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays:hover .codicon{opacity:1}.monaco-editor .inline-folded:after{color:grey;margin:.1em .2em 0;content:"⋯";display:inline;line-height:1em;cursor:pointer}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer}.monaco-editor .parameter-hints-widget{z-index:10;display:flex;flex-direction:column;line-height:1.5em}.monaco-editor .parameter-hints-widget>.phwrapper{max-width:440px;display:flex;flex-direction:row}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.visible{transition:left .05s ease-in-out}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .body,.monaco-editor .parameter-hints-widget .monaco-scrollable-element{display:flex;flex:1 1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:normal}.monaco-editor .parameter-hints-widget .docs .markdown-docs code{font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .docs .code{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs code{border-radius:3px;padding:0 .4em}.monaco-editor .parameter-hints-widget .controls{display:none;flex-direction:column;align-items:center;min-width:22px;justify-content:flex-end}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{width:16px;height:16px;background-repeat:no-repeat;cursor:pointer}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{text-align:center;height:12px;line-height:12px;opacity:.5;font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .signature .parameter.active{font-weight:700;text-decoration:underline}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor .rename-box{z-index:100;color:inherit}.monaco-editor .rename-box.preview{padding:3px 3px 0}.monaco-editor .rename-box .rename-input{padding:3px;width:calc(100% - 6px)}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor .snippet-placeholder{min-width:2px}.monaco-editor .finish-snippet-placeholder,.monaco-editor .snippet-placeholder{outline-style:solid;outline-width:1px}.monaco-editor .suggest-widget{width:430px;z-index:40;display:flex;flex-direction:column}.monaco-editor .suggest-widget.message{flex-direction:row;align-items:center}.monaco-editor .suggest-details,.monaco-editor .suggest-widget{flex:0 1 auto;width:100%;border-style:solid;border-width:1px}.monaco-editor.hc-black .suggest-details,.monaco-editor.hc-black .suggest-widget{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{box-sizing:border-box;display:none;flex-flow:row nowrap;justify-content:space-between;width:100%;font-size:80%;padding:0 4px;border-top:1px solid transparent;overflow:hidden}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{opacity:.5;color:inherit}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{display:flex;-mox-box-sizing:border-box;box-sizing:border-box;padding-right:10px;background-repeat:no-repeat;background-position:2px 2px;white-space:nowrap;cursor:pointer;touch-action:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1 1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:pre;justify-content:space-between}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;opacity:1;font-size:14px;cursor:pointer}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;top:6px;right:2px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{opacity:.7}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{overflow:hidden;text-overflow:ellipsis}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{margin-left:4px;opacity:.4;font-size:90%;text-overflow:ellipsis;overflow:hidden;align-self:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-shrink:1;flex-grow:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{overflow:hidden;flex-shrink:4;max-width:70%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;position:absolute;right:10px;width:18px;height:18px;visibility:hidden}.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{display:block;height:16px;width:16px;margin-left:2px;background-repeat:no-repeat;background-size:80%;background-position:50%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{display:flex;align-items:center;margin-right:4px}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{margin:0 0 0 .3em;border:.1em solid #000;width:.7em;height:.7em;display:inline-block}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{display:flex;flex-direction:column;cursor:default}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1 1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2 1;overflow:hidden;text-overflow:ellipsis;opacity:.7;white-space:pre;margin:0 24px 0 0;padding:4px 0 12px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{padding:0;white-space:normal;min-height:calc(1rem + 8px)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{white-space:pre-wrap;word-wrap:break-word}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ol,.monaco-editor .suggest-details ul{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}.monaco-editor .accessibilityHelpWidget{padding:10px;vertical-align:middle;overflow:scroll}.monaco-editor .iPadShowKeyboard{width:58px;min-width:0;height:36px;min-height:0;margin:0;padding:0;position:absolute;resize:none;overflow:hidden;background:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzYgNC4wMUg0LjAwOFYzMi4wM2g0NC4wMjhWNC4wMXpNNC4wMDguMDA4QTQuMDAzIDQuMDAzIDAgMDAuMDA1IDQuMDFWMzIuMDNhNC4wMDMgNC4wMDMgMCAwMDQuMDAzIDQuMDAyaDQ0LjAyOGE0LjAwMyA0LjAwMyAwIDAwNC4wMDMtNC4wMDJWNC4wMUE0LjAwMyA0LjAwMyAwIDAwNDguMDM2LjAwOEg0LjAwOHpNOC4wMSA4LjAxM2g0LjAwM3Y0LjAwM0g4LjAxVjguMDEzem0xMi4wMDggMGgtNC4wMDJ2NC4wMDNoNC4wMDJWOC4wMTN6bTQuMDAzIDBoNC4wMDJ2NC4wMDNoLTQuMDAyVjguMDEzem0xMi4wMDggMGgtNC4wMDN2NC4wMDNoNC4wMDNWOC4wMTN6bTQuMDAyIDBoNC4wMDN2NC4wMDNINDAuMDNWOC4wMTN6bS0yNC4wMTUgOC4wMDVIOC4wMXY0LjAwM2g4LjAwNnYtNC4wMDN6bTQuMDAyIDBoNC4wMDN2NC4wMDNoLTQuMDAzdi00LjAwM3ptMTIuMDA4IDBoLTQuMDAzdjQuMDAzaDQuMDAzdi00LjAwM3ptMTIuMDA4IDB2NC4wMDNoLTguMDA1di00LjAwM2g4LjAwNXptLTMyLjAyMSA4LjAwNUg4LjAxdjQuMDAzaDQuMDAzdi00LjAwM3ptNC4wMDMgMGgyMC4wMTN2NC4wMDNIMTYuMDE2di00LjAwM3ptMjguMDE4IDBINDAuMDN2NC4wMDNoNC4wMDN2LTQuMDAzeiIgZmlsbD0iIzQyNDI0MiIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDUzdjM2SDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+") 50% no-repeat;border:4px solid #f6f6f6;border-radius:4px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzYgNC4wMUg0LjAwOFYzMi4wM2g0NC4wMjhWNC4wMXpNNC4wMDguMDA4QTQuMDAzIDQuMDAzIDAgMDAuMDA1IDQuMDFWMzIuMDNhNC4wMDMgNC4wMDMgMCAwMDQuMDAzIDQuMDAyaDQ0LjAyOGE0LjAwMyA0LjAwMyAwIDAwNC4wMDMtNC4wMDJWNC4wMUE0LjAwMyA0LjAwMyAwIDAwNDguMDM2LjAwOEg0LjAwOHpNOC4wMSA4LjAxM2g0LjAwM3Y0LjAwM0g4LjAxVjguMDEzem0xMi4wMDggMGgtNC4wMDJ2NC4wMDNoNC4wMDJWOC4wMTN6bTQuMDAzIDBoNC4wMDJ2NC4wMDNoLTQuMDAyVjguMDEzem0xMi4wMDggMGgtNC4wMDN2NC4wMDNoNC4wMDNWOC4wMTN6bTQuMDAyIDBoNC4wMDN2NC4wMDNINDAuMDNWOC4wMTN6bS0yNC4wMTUgOC4wMDVIOC4wMXY0LjAwM2g4LjAwNnYtNC4wMDN6bTQuMDAyIDBoNC4wMDN2NC4wMDNoLTQuMDAzdi00LjAwM3ptMTIuMDA4IDBoLTQuMDAzdjQuMDAzaDQuMDAzdi00LjAwM3ptMTIuMDA4IDB2NC4wMDNoLTguMDA1di00LjAwM2g4LjAwNXptLTMyLjAyMSA4LjAwNUg4LjAxdjQuMDAzaDQuMDAzdi00LjAwM3ptNC4wMDMgMGgyMC4wMTN2NC4wMDNIMTYuMDE2di00LjAwM3ptMjguMDE4IDBINDAuMDN2NC4wMDNoNC4wMDN2LTQuMDAzeiIgZmlsbD0iI0M1QzVDNSIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDUzdjM2SDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+") 50% no-repeat;border:4px solid #252526}.monaco-editor .tokens-inspect-widget{z-index:50;user-select:text;-webkit-user-select:text;-ms-user-select:text;padding:10px}.tokens-inspect-separator{height:1px;border:0}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{font-weight:400;font-size:60%;float:right}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)}:root{--sn-stylekit-base-font-size:13px;--sn-stylekit-font-size-p:1.0rem;--sn-stylekit-font-size-editor:1.21rem;--sn-stylekit-font-size-h6:0.8rem;--sn-stylekit-font-size-h5:0.9rem;--sn-stylekit-font-size-h4:1.0rem;--sn-stylekit-font-size-h3:1.1rem;--sn-stylekit-font-size-h2:1.2rem;--sn-stylekit-font-size-h1:1.3rem;--sn-stylekit-neutral-color:#989898;--sn-stylekit-neutral-contrast-color:#fff;--sn-stylekit-info-color:#086dd6;--sn-stylekit-info-contrast-color:#fff;--sn-stylekit-success-color:#2b9612;--sn-stylekit-success-contrast-color:#fff;--sn-stylekit-warning-color:#f6a200;--sn-stylekit-warning-contrast-color:#fff;--sn-stylekit-danger-color:#f80324;--sn-stylekit-danger-contrast-color:#fff;--sn-stylekit-shadow-color:#c8c8c8;--sn-stylekit-background-color:#fff;--sn-stylekit-border-color:#e3e3e3;--sn-stylekit-foreground-color:#000;--sn-stylekit-contrast-background-color:#f6f6f6;--sn-stylekit-contrast-foreground-color:#2e2e2e;--sn-stylekit-contrast-border-color:#e3e3e3;--sn-stylekit-secondary-background-color:#f6f6f6;--sn-stylekit-secondary-foreground-color:#2e2e2e;--sn-stylekit-secondary-border-color:#e3e3e3;--sn-stylekit-secondary-contrast-background-color:#e3e3e3;--sn-stylekit-secondary-contrast-foreground-color:#2e2e2e;--sn-styleki--secondary-contrast-border-color:#a2a2a2;--sn-stylekit-editor-background-color:var(--sn-stylekit-background-color);--sn-stylekit-editor-foreground-color:var(--sn-stylekit-foreground-color);--sn-stylekit-paragraph-text-color:#454545;--sn-stylekit-input-placeholder-color:#a8a8a8;--sn-stylekit-input-border-color:#e3e3e3;--sn-stylekit-scrollbar-thumb-color:#dfdfdf;--sn-stylekit-scrollbar-track-border-color:#e7e7e7;--sn-stylekit-general-border-radius:2px;--sn-stylekit-simplified-chinese-font:"Microsoft Yahei","微软雅黑体";--sn-stylekit-monospace-font:"Ubuntu Mono",courier,monospace;--sn-stylekit-sans-serif-font:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",var(--sn-stylekit-simplified-chinese-font),sans-serif}.sn-component{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue","Microsoft Yahei","微软雅黑体",sans-serif;font-family:var(--sn-stylekit-sans-serif-font);-webkit-font-smoothing:antialiased;color:#000;color:var(--sn-stylekit-foreground-color)}.sn-component .sk-panel{box-shadow:0 2px 5px #c8c8c8;box-shadow:0 2px 5px var(--sn-stylekit-shadow-color);background-color:#fff;background-color:var(--sn-stylekit-background-color);border:1px solid #e3e3e3;border:1px solid var(--sn-stylekit-border-color);border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);display:flex;flex-direction:column;overflow:auto;flex-grow:1}.sn-component .sk-panel a:hover{text-decoration:underline}.sn-component .sk-panel.static{box-shadow:none;border:none;border-radius:0}.sn-component .sk-panel .sk-panel-header{flex-shrink:0;display:flex;justify-content:space-between;padding:1.1rem 2rem;border-bottom:1px solid #e3e3e3;border-bottom:1px solid var(--sn-stylekit-contrast-border-color);background-color:#f6f6f6;background-color:var(--sn-stylekit-contrast-background-color);color:#2e2e2e;color:var(--sn-stylekit-contrast-foreground-color);align-items:center}.sn-component .sk-panel .sk-panel-header .sk-panel-header-title{font-size:1.3rem;font-size:var(--sn-stylekit-font-size-h1);font-weight:500}.sn-component .sk-panel .sk-panel-header .close-button{font-weight:700}.sn-component .sk-panel .sk-footer,.sn-component .sk-panel .sk-panel-footer{padding:1rem 2rem;border-top:1px solid #e3e3e3;border-top:1px solid var(--sn-stylekit-border-color);box-sizing:border-box}.sn-component .sk-panel .sk-footer.extra-padding,.sn-component .sk-panel .sk-panel-footer.extra-padding{padding:2rem}.sn-component .sk-panel .sk-footer .left,.sn-component .sk-panel .sk-panel-footer .left{text-align:left;display:block}.sn-component .sk-panel .sk-footer .right,.sn-component .sk-panel .sk-panel-footer .right{text-align:right;display:block}.sn-component .sk-panel .sk-panel-content{padding:1.6rem 2rem 0;flex-grow:1;overflow:scroll;height:100%;overflow-y:auto!important;overflow-x:auto!important}.sn-component .sk-panel .sk-panel-content .sk-li,.sn-component .sk-panel .sk-panel-content .sk-p{color:#454545;color:var(--sn-stylekit-paragraph-text-color);line-height:1.3}.sn-component .sk-panel-section{padding-bottom:1.6rem;display:flex;flex-direction:column}.sn-component .sk-panel-section.sk-panel-hero{text-align:center}.sn-component .sk-panel-section .sk-p:last-child{margin-bottom:0}.sn-component .sk-panel-section:not(:last-child){margin-bottom:1.5rem;border-bottom:1px solid #e3e3e3;border-bottom:1px solid var(--sn-stylekit-border-color)}.sn-component .sk-panel-section:not(:last-child).no-border{border-bottom:none}.sn-component .sk-panel-section:last-child{margin-bottom:.5rem}.sn-component .sk-panel-section.no-bottom-pad{padding-bottom:0;margin-bottom:0}.sn-component .sk-panel-section .sk-panel-section-title{margin-bottom:.5rem;font-weight:700;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-panel-section .sk-panel-section-outer-title{border-bottom:1px solid #e3e3e3;border-bottom:1px solid var(--sn-stylekit-border-color);padding-bottom:.9rem;margin-top:2.1rem;margin-bottom:15px;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-panel-section .sk-panel-section-subtitle{font-size:.9rem;font-size:var(--sn-stylekit-font-size-h5);margin-bottom:2px}.sn-component .sk-panel-section .sk-panel-section-subtitle.subtle{font-weight:400;opacity:.6}.sn-component .sk-panel-section .text-content .sk-p{margin-bottom:1rem}.sn-component .sk-panel-section .text-content p:first-child{margin-top:.3rem}.sn-component .sk-panel-row{display:flex;justify-content:space-between;align-items:center;padding-top:.4rem}.sn-component .sk-panel-row.centered{justify-content:center}.sn-component .sk-panel-row.justify-right{justify-content:flex-end}.sn-component .sk-panel-row.justify-left{justify-content:flex-start}.sn-component .sk-panel-row.align-top{align-items:flex-start}.sn-component .sk-panel-row .sk-panel-column.stretch{width:100%}.sn-component .sk-panel-row.default-padding,.sn-component .sk-panel-row:not(:last-child){padding-bottom:.4rem}.sn-component .sk-panel-row.condensed{padding-top:.2rem;padding-bottom:.2rem}.sn-component .sk-panel-row .sk-p{margin:0;padding:0}.sn-component .vertical-rule{background-color:#e3e3e3;background-color:var(--sn-stylekit-border-color);height:1.5rem;width:1px}.sn-component .sk-panel-form{width:100%}.sn-component .sk-panel-form.half{width:50%}.sn-component .sk-panel-form .form-submit{margin-top:.15rem}.sn-component .right-aligned{justify-content:flex-end;text-align:right}.sn-component .sk-menu-panel{background-color:#fff;background-color:var(--sn-stylekit-background-color);border:1px solid #e3e3e3;border:1px solid var(--sn-stylekit-contrast-border-color);border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);overflow:scroll;-webkit-user-select:none;-ms-user-select:none;user-select:none;overflow-y:auto!important;overflow-x:auto!important}.sn-component .sk-menu-panel .sk-menu-panel-header{padding:.8rem 1rem;border-bottom:1px solid #e3e3e3;border-bottom:1px solid var(--sn-stylekit-contrast-border-color);background-color:#f6f6f6;background-color:var(--sn-stylekit-contrast-background-color);color:#2e2e2e;color:var(--sn-stylekit-contrast-foreground-color);display:flex;justify-content:space-between;align-items:center}.sn-component .sk-menu-panel .sk-menu-panel-header-title{font-weight:700;font-size:1rem;font-size:var(--sn-stylekit-font-size-h4)}.sn-component .sk-menu-panel .sk-menu-panel-header-subtitle{margin-top:.2rem;opacity:.6}.sn-component .sk-menu-panel .sk-menu-panel-row{padding:1rem;cursor:pointer;display:flex;flex-direction:row;justify-content:space-between;border-bottom:1px solid #e3e3e3;border-bottom:1px solid var(--sn-stylekit-border-color)}.sn-component .sk-menu-panel .sk-menu-panel-row:hover{background-color:#f6f6f6;background-color:var(--sn-stylekit-contrast-background-color);color:#2e2e2e;color:var(--sn-stylekit-contrast-foreground-color);border-color:#e3e3e3;border-color:var(--sn-stylekit-contrast-border-color)}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column{display:flex;justify-content:center;flex-direction:column}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column:not(:first-child){padding-left:1rem;padding-right:.15rem}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column.stretch{width:100%}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-subrows{margin-top:1rem}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-row,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-subrow{border:1px solid #e3e3e3;border:1px solid var(--sn-stylekit-contrast-border-color);margin-top:-1px}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-row:hover,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-subrow:hover{background-color:#fff;background-color:var(--sn-stylekit-background-color)}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .left{display:flex}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-box .sk-label,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-box .sk-panel-section .sk-panel-section-subtitle,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-button .sk-label,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-button .sk-panel-section .sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-menu-panel .sk-menu-panel-row .sk-box .sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-menu-panel .sk-menu-panel-row .sk-button .sk-panel-section-subtitle{font-size:.8rem;font-size:var(--sn-stylekit-font-size-h6);font-weight:400}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-label,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-panel-section .sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-menu-panel .sk-menu-panel-row .sk-panel-section-subtitle{font-size:1rem;font-size:var(--sn-stylekit-font-size-p);font-weight:700}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-sublabel{font-size:.9rem;font-size:var(--sn-stylekit-font-size-h5);margin-top:.2rem;opacity:.6}.sn-component .red{color:#f80324;color:var(--sn-stylekit-danger-color)}.sn-component .tinted{color:#086dd6;color:var(--sn-stylekit-info-color)}.sn-component .selectable{user-select:text!important;-ms-user-select:text!important;-moz-user-select:text!important;-webkit-user-select:text!important}.sn-component .sk-h1,.sn-component .sk-h2,.sn-component .sk-h3,.sn-component .sk-h4,.sn-component .sk-h5{margin:0;padding:0;font-weight:400}.sn-component .sk-h1{font-weight:500;font-size:1.3rem;font-size:var(--sn-stylekit-font-size-h1);line-height:1.9rem}.sn-component .sk-h2{font-size:1.2rem;font-size:var(--sn-stylekit-font-size-h2);line-height:1.8rem}.sn-component .sk-h3{font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3);line-height:1.7rem}.sn-component .sk-h4{font-size:1rem;font-size:var(--sn-stylekit-font-size-p);line-height:1.4rem}.sn-component .sk-h5{font-size:.9rem;font-size:var(--sn-stylekit-font-size-h5)}.sn-component .sk-bold{font-weight:700}.sn-component .sk-font-small{font-size:.9rem;font-size:var(--sn-stylekit-font-size-h5)}.sn-component .sk-font-normal{font-size:1rem;font-size:var(--sn-stylekit-font-size-p)}.sn-component .sk-font-large{font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component a.sk-a{cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sn-component a.sk-a.disabled{color:#989898;color:var(--sn-stylekit-neutral-color);opacity:.6}.sn-component a.sk-a.boxed{border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);padding:.3rem .4rem}.sn-component a.sk-a.boxed:hover{text-decoration:none}.sn-component a.sk-a.boxed.neutral{background-color:#989898;background-color:var(--sn-stylekit-neutral-color);color:#fff;color:var(--sn-stylekit-neutral-contrast-color)}.sn-component a.sk-a.boxed.info{background-color:#086dd6;background-color:var(--sn-stylekit-info-color);color:#fff;color:var(--sn-stylekit-info-contrast-color)}.sn-component a.sk-a.boxed.warning{background-color:#f6a200;background-color:var(--sn-stylekit-warning-color);color:#fff;color:var(--sn-stylekit-warning-contrast-color)}.sn-component a.sk-a.boxed.danger{background-color:#f80324;background-color:var(--sn-stylekit-danger-color);color:#fff;color:var(--sn-stylekit-danger-contrast-color)}.sn-component a.sk-a.boxed.success{background-color:#2b9612;background-color:var(--sn-stylekit-success-color);color:#fff;color:var(--sn-stylekit-success-contrast-color)}.sn-component .wrap{word-wrap:break-word}.sn-component .sk-base{color:#000;color:var(--sn-stylekit-foreground-color)}.sn-component .contrast{color:#2e2e2e;color:var(--sn-stylekit-contrast-foreground-color)}.sn-component .neutral{color:#989898;color:var(--sn-stylekit-neutral-color)}.sn-component .info{color:#086dd6;color:var(--sn-stylekit-info-color)}.sn-component .info-contrast{color:#fff;color:var(--sn-stylekit-info-contrast-color)}.sn-component .warning{color:#f6a200;color:var(--sn-stylekit-warning-color)}.sn-component .danger{color:#f80324;color:var(--sn-stylekit-danger-color)}.sn-component .success{color:#2b9612;color:var(--sn-stylekit-success-color)}.sn-component .info-i{color:#086dd6!important;color:var(--sn-stylekit-info-color)!important}.sn-component .warning-i{color:#f6a200!important;color:var(--sn-stylekit-warning-color)!important}.sn-component .danger-i{color:#f80324!important;color:var(--sn-stylekit-danger-color)!important}.sn-component .success-i{color:#2b9612!important;color:var(--sn-stylekit-success-color)!important}.sn-component .clear{background-color:transparent;border:none}.sn-component .center-text{text-align:center!important;justify-content:center!important}.sn-component p.sk-p{margin:.5rem 0}.sn-component input.sk-input{box-sizing:border-box;padding:.7rem .8rem;margin:.3rem 0;border:none;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3);width:100%;outline:0;resize:none}.sn-component input.sk-input.clear{color:#000;color:var(--sn-stylekit-foreground-color);background-color:transparent;border:none}.sn-component input.sk-input.no-border{border:none}.sn-component .sk-label,.sn-component .sk-panel-section .sk-panel-section-subtitle{font-weight:700}.sn-component .sk-label.no-bold,.sn-component .sk-panel-section .no-bold.sk-panel-section-subtitle{font-weight:400}.sn-component .sk-panel-section label.sk-panel-section-subtitle,.sn-component label.sk-label{margin:.7rem 0;display:block}.sn-component .sk-panel-section label.sk-panel-section-subtitle input[type=checkbox],.sn-component input[type=radio],.sn-component label.sk-label input[type=checkbox]{width:auto;margin-right:.45rem;vertical-align:middle}.sn-component .sk-horizontal-group>*,.sn-component .sk-input-group>*{display:inline-block;vertical-align:middle}.sn-component .sk-horizontal-group>:not(:first-child),.sn-component .sk-input-group>:not(:first-child){margin-left:.9rem}.sn-component .sk-border-bottom{border-bottom:1px solid #e3e3e3;border-bottom:1px solid var(--sn-stylekit-border-color)}.sn-component .sk-checkbox-group{padding-top:.5rem;padding-bottom:.3rem}.sn-component ::-webkit-input-placeholder{color:#a8a8a8;color:var(--sn-stylekit-input-placeholder-color)}.sn-component ::placeholder{color:#a8a8a8;color:var(--sn-stylekit-input-placeholder-color)}.sn-component :-ms-input-placeholder{color:#a8a8a8;color:var(--sn-stylekit-input-placeholder-color)}.sn-component ::-ms-input-placeholder{color:#a8a8a8;color:var(--sn-stylekit-input-placeholder-color)}.sn-component .sk-button-group.stretch{display:flex;width:100%}.sn-component .sk-button-group.stretch .sk-box,.sn-component .sk-button-group.stretch .sk-button{display:block;flex-grow:1;text-align:center}.sn-component .sk-button-group .sk-box,.sn-component .sk-button-group .sk-button{display:inline-block;vertical-align:middle}.sn-component .sk-button-group .sk-box:not(:last-child),.sn-component .sk-button-group .sk-button:not(:last-child){margin-right:5px}.sn-component .sk-button-group .sk-box:not(:last-child).featured,.sn-component .sk-button-group .sk-button:not(:last-child).featured{margin-right:8px}.sn-component .sk-segmented-buttons{display:flex;flex-direction:row}.sn-component .sk-segmented-buttons .sk-box,.sn-component .sk-segmented-buttons .sk-button{border-radius:0;white-space:nowrap;margin:0;margin-left:0!important;margin-right:0!important}.sn-component .sk-segmented-buttons .sk-box:not(:last-child),.sn-component .sk-segmented-buttons .sk-button:not(:last-child){border-right:none;border-radius:0}.sn-component .sk-segmented-buttons .sk-box:first-child,.sn-component .sk-segmented-buttons .sk-button:first-child{border-top-left-radius:2px;border-top-left-radius:var(--sn-stylekit-general-border-radius);border-bottom-left-radius:2px;border-bottom-left-radius:var(--sn-stylekit-general-border-radius);border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.sn-component .sk-segmented-buttons .sk-box:last-child,.sn-component .sk-segmented-buttons .sk-button:last-child{border-top-right-radius:2px;border-top-right-radius:var(--sn-stylekit-general-border-radius);border-bottom-right-radius:2px;border-bottom-right-radius:var(--sn-stylekit-general-border-radius);border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.sn-component .sk-box-group .sk-box{display:inline-block}.sn-component .sk-box-group .sk-box:not(:last-child){margin-right:5px}.sn-component .sk-a.button{text-decoration:none}.sn-component .sk-box,.sn-component .sk-button{display:table;padding:.5rem .7rem;font-size:.9rem;font-size:var(--sn-stylekit-font-size-h5);cursor:pointer;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sn-component .no-hover-border.sk-box:after,.sn-component .sk-button.no-hover-border:after{color:transparent!important}.sn-component .sk-button.wide,.sn-component .wide.sk-box{padding:.3rem 1.7rem}.sn-component .sk-box>.sk-label,.sn-component .sk-button>.sk-label,.sn-component .sk-panel-section .sk-box>.sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-button>.sk-panel-section-subtitle{font-weight:700;display:block;text-align:center}.sn-component .big.sk-box,.sn-component .sk-button.big{font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3);padding:.7rem 2.5rem}.sn-component .sk-box{padding:2.5rem 1.5rem}.sn-component .sk-base.sk-box,.sn-component .sk-box.sk-base,.sn-component .sk-button.sk-base,.sn-component .sk-circle.sk-base{color:#000;color:var(--sn-stylekit-foreground-color);position:relative;background-color:#fff;background-color:var(--sn-stylekit-background-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#fff;border-color:var(--sn-stylekit-background-color)}.sn-component .sk-base.sk-box *,.sn-component .sk-box.sk-base *,.sn-component .sk-button.sk-base *,.sn-component .sk-circle.sk-base *{position:relative}.sn-component .sk-base.sk-box:before,.sn-component .sk-box.sk-base:before,.sn-component .sk-button.sk-base:before,.sn-component .sk-circle.sk-base:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#fff;background-color:var(--sn-stylekit-background-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-base.sk-box:after,.sn-component .sk-box.sk-base:after,.sn-component .sk-button.sk-base:after,.sn-component .sk-circle.sk-base:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#fff;color:var(--sn-stylekit-background-color)}.sn-component .sk-base.sk-box:hover:before,.sn-component .sk-box.sk-base:hover:before,.sn-component .sk-button.sk-base:hover:before,.sn-component .sk-circle.sk-base:hover:before{-webkit-filter:brightness(130%);filter:brightness(130%)}.sn-component .sk-base.no-bg.sk-box,.sn-component .sk-box.sk-base.no-bg,.sn-component .sk-button.sk-base.no-bg,.sn-component .sk-circle.sk-base.no-bg{background-color:transparent}.sn-component .sk-base.no-bg.sk-box:before,.sn-component .sk-box.sk-base.no-bg:before,.sn-component .sk-button.sk-base.no-bg:before,.sn-component .sk-circle.sk-base.no-bg:before{content:none}.sn-component .sk-base.featured.sk-box,.sn-component .sk-box.sk-base.featured,.sn-component .sk-button.sk-base.featured,.sn-component .sk-circle.sk-base.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-base.featured.sk-box:before,.sn-component .sk-box.sk-base.featured:before,.sn-component .sk-button.sk-base.featured:before,.sn-component .sk-circle.sk-base.featured:before{opacity:1}.sn-component .contrast.sk-box,.sn-component .sk-box.contrast,.sn-component .sk-button.contrast,.sn-component .sk-circle.contrast{color:#2e2e2e;color:var(--sn-stylekit-contrast-foreground-color);position:relative;background-color:#f6f6f6;background-color:var(--sn-stylekit-contrast-background-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#f6f6f6;border-color:var(--sn-stylekit-contrast-background-color)}.sn-component .contrast.sk-box *,.sn-component .sk-box.contrast *,.sn-component .sk-button.contrast *,.sn-component .sk-circle.contrast *{position:relative}.sn-component .contrast.sk-box:before,.sn-component .sk-box.contrast:before,.sn-component .sk-button.contrast:before,.sn-component .sk-circle.contrast:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#f6f6f6;background-color:var(--sn-stylekit-contrast-background-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .contrast.sk-box:after,.sn-component .sk-box.contrast:after,.sn-component .sk-button.contrast:after,.sn-component .sk-circle.contrast:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#f6f6f6;color:var(--sn-stylekit-contrast-background-color)}.sn-component .contrast.sk-box:hover:before,.sn-component .sk-box.contrast:hover:before,.sn-component .sk-button.contrast:hover:before,.sn-component .sk-circle.contrast:hover:before{-webkit-filter:brightness(130%);filter:brightness(130%)}.sn-component .contrast.no-bg.sk-box,.sn-component .sk-box.contrast.no-bg,.sn-component .sk-button.contrast.no-bg,.sn-component .sk-circle.contrast.no-bg{background-color:transparent}.sn-component .contrast.no-bg.sk-box:before,.sn-component .sk-box.contrast.no-bg:before,.sn-component .sk-button.contrast.no-bg:before,.sn-component .sk-circle.contrast.no-bg:before{content:none}.sn-component .contrast.featured.sk-box,.sn-component .sk-box.contrast.featured,.sn-component .sk-button.contrast.featured,.sn-component .sk-circle.contrast.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .contrast.featured.sk-box:before,.sn-component .sk-box.contrast.featured:before,.sn-component .sk-button.contrast.featured:before,.sn-component .sk-circle.contrast.featured:before{opacity:1}.sn-component .sk-box.sk-secondary,.sn-component .sk-button.sk-secondary,.sn-component .sk-circle.sk-secondary,.sn-component .sk-secondary.sk-box{color:#2e2e2e;color:var(--sn-stylekit-secondary-foreground-color);position:relative;background-color:#f6f6f6;background-color:var(--sn-stylekit-secondary-background-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#f6f6f6;border-color:var(--sn-stylekit-secondary-background-color)}.sn-component .sk-box.sk-secondary *,.sn-component .sk-button.sk-secondary *,.sn-component .sk-circle.sk-secondary *,.sn-component .sk-secondary.sk-box *{position:relative}.sn-component .sk-box.sk-secondary:before,.sn-component .sk-button.sk-secondary:before,.sn-component .sk-circle.sk-secondary:before,.sn-component .sk-secondary.sk-box:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#f6f6f6;background-color:var(--sn-stylekit-secondary-background-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-box.sk-secondary:after,.sn-component .sk-button.sk-secondary:after,.sn-component .sk-circle.sk-secondary:after,.sn-component .sk-secondary.sk-box:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#f6f6f6;color:var(--sn-stylekit-secondary-background-color)}.sn-component .sk-box.sk-secondary:hover:before,.sn-component .sk-button.sk-secondary:hover:before,.sn-component .sk-circle.sk-secondary:hover:before,.sn-component .sk-secondary.sk-box:hover:before{-webkit-filter:brightness(130%);filter:brightness(130%)}.sn-component .sk-box.sk-secondary.no-bg,.sn-component .sk-button.sk-secondary.no-bg,.sn-component .sk-circle.sk-secondary.no-bg,.sn-component .sk-secondary.no-bg.sk-box{background-color:transparent}.sn-component .sk-box.sk-secondary.no-bg:before,.sn-component .sk-button.sk-secondary.no-bg:before,.sn-component .sk-circle.sk-secondary.no-bg:before,.sn-component .sk-secondary.no-bg.sk-box:before{content:none}.sn-component .sk-box.sk-secondary.featured,.sn-component .sk-button.sk-secondary.featured,.sn-component .sk-circle.sk-secondary.featured,.sn-component .sk-secondary.featured.sk-box{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-box.sk-secondary.featured:before,.sn-component .sk-button.sk-secondary.featured:before,.sn-component .sk-circle.sk-secondary.featured:before,.sn-component .sk-secondary.featured.sk-box:before{opacity:1}.sn-component .sk-box.sk-secondary-contrast,.sn-component .sk-button.sk-secondary-contrast,.sn-component .sk-circle.sk-secondary-contrast,.sn-component .sk-secondary-contrast.sk-box{color:#2e2e2e;color:var(--sn-stylekit-secondary-contrast-foreground-color);position:relative;background-color:#e3e3e3;background-color:var(--sn-stylekit-secondary-contrast-background-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#e3e3e3;border-color:var(--sn-stylekit-secondary-contrast-background-color)}.sn-component .sk-box.sk-secondary-contrast *,.sn-component .sk-button.sk-secondary-contrast *,.sn-component .sk-circle.sk-secondary-contrast *,.sn-component .sk-secondary-contrast.sk-box *{position:relative}.sn-component .sk-box.sk-secondary-contrast:before,.sn-component .sk-button.sk-secondary-contrast:before,.sn-component .sk-circle.sk-secondary-contrast:before,.sn-component .sk-secondary-contrast.sk-box:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#e3e3e3;background-color:var(--sn-stylekit-secondary-contrast-background-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-box.sk-secondary-contrast:after,.sn-component .sk-button.sk-secondary-contrast:after,.sn-component .sk-circle.sk-secondary-contrast:after,.sn-component .sk-secondary-contrast.sk-box:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#e3e3e3;color:var(--sn-stylekit-secondary-contrast-background-color)}.sn-component .sk-box.sk-secondary-contrast:hover:before,.sn-component .sk-button.sk-secondary-contrast:hover:before,.sn-component .sk-circle.sk-secondary-contrast:hover:before,.sn-component .sk-secondary-contrast.sk-box:hover:before{-webkit-filter:brightness(130%);filter:brightness(130%)}.sn-component .sk-box.sk-secondary-contrast.no-bg,.sn-component .sk-button.sk-secondary-contrast.no-bg,.sn-component .sk-circle.sk-secondary-contrast.no-bg,.sn-component .sk-secondary-contrast.no-bg.sk-box{background-color:transparent}.sn-component .sk-box.sk-secondary-contrast.no-bg:before,.sn-component .sk-button.sk-secondary-contrast.no-bg:before,.sn-component .sk-circle.sk-secondary-contrast.no-bg:before,.sn-component .sk-secondary-contrast.no-bg.sk-box:before{content:none}.sn-component .sk-box.sk-secondary-contrast.featured,.sn-component .sk-button.sk-secondary-contrast.featured,.sn-component .sk-circle.sk-secondary-contrast.featured,.sn-component .sk-secondary-contrast.featured.sk-box{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-box.sk-secondary-contrast.featured:before,.sn-component .sk-button.sk-secondary-contrast.featured:before,.sn-component .sk-circle.sk-secondary-contrast.featured:before,.sn-component .sk-secondary-contrast.featured.sk-box:before{opacity:1}.sn-component .neutral.sk-box,.sn-component .sk-box.neutral,.sn-component .sk-button.neutral,.sn-component .sk-circle.neutral{color:#fff;color:var(--sn-stylekit-neutral-contrast-color);position:relative;background-color:#989898;background-color:var(--sn-stylekit-neutral-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#989898;border-color:var(--sn-stylekit-neutral-color)}.sn-component .neutral.sk-box *,.sn-component .sk-box.neutral *,.sn-component .sk-button.neutral *,.sn-component .sk-circle.neutral *{position:relative}.sn-component .neutral.sk-box:before,.sn-component .sk-box.neutral:before,.sn-component .sk-button.neutral:before,.sn-component .sk-circle.neutral:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#989898;background-color:var(--sn-stylekit-neutral-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .neutral.sk-box:after,.sn-component .sk-box.neutral:after,.sn-component .sk-button.neutral:after,.sn-component .sk-circle.neutral:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#989898;color:var(--sn-stylekit-neutral-color)}.sn-component .neutral.sk-box:hover:before,.sn-component .sk-box.neutral:hover:before,.sn-component .sk-button.neutral:hover:before,.sn-component .sk-circle.neutral:hover:before{-webkit-filter:brightness(130%);filter:brightness(130%)}.sn-component .neutral.no-bg.sk-box,.sn-component .sk-box.neutral.no-bg,.sn-component .sk-button.neutral.no-bg,.sn-component .sk-circle.neutral.no-bg{background-color:transparent}.sn-component .neutral.no-bg.sk-box:before,.sn-component .sk-box.neutral.no-bg:before,.sn-component .sk-button.neutral.no-bg:before,.sn-component .sk-circle.neutral.no-bg:before{content:none}.sn-component .neutral.featured.sk-box,.sn-component .sk-box.neutral.featured,.sn-component .sk-button.neutral.featured,.sn-component .sk-circle.neutral.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .neutral.featured.sk-box:before,.sn-component .sk-box.neutral.featured:before,.sn-component .sk-button.neutral.featured:before,.sn-component .sk-circle.neutral.featured:before{opacity:1}.sn-component .info.sk-box,.sn-component .sk-box.info,.sn-component .sk-button.info,.sn-component .sk-circle.info{color:#fff;color:var(--sn-stylekit-info-contrast-color);position:relative;background-color:#086dd6;background-color:var(--sn-stylekit-info-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#086dd6;border-color:var(--sn-stylekit-info-color)}.sn-component .info.sk-box *,.sn-component .sk-box.info *,.sn-component .sk-button.info *,.sn-component .sk-circle.info *{position:relative}.sn-component .info.sk-box:before,.sn-component .sk-box.info:before,.sn-component .sk-button.info:before,.sn-component .sk-circle.info:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#086dd6;background-color:var(--sn-stylekit-info-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .info.sk-box:after,.sn-component .sk-box.info:after,.sn-component .sk-button.info:after,.sn-component .sk-circle.info:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#086dd6;color:var(--sn-stylekit-info-color)}.sn-component .info.sk-box:hover:before,.sn-component .sk-box.info:hover:before,.sn-component .sk-button.info:hover:before,.sn-component .sk-circle.info:hover:before{-webkit-filter:brightness(130%);filter:brightness(130%)}.sn-component .info.no-bg.sk-box,.sn-component .sk-box.info.no-bg,.sn-component .sk-button.info.no-bg,.sn-component .sk-circle.info.no-bg{background-color:transparent}.sn-component .info.no-bg.sk-box:before,.sn-component .sk-box.info.no-bg:before,.sn-component .sk-button.info.no-bg:before,.sn-component .sk-circle.info.no-bg:before{content:none}.sn-component .info.featured.sk-box,.sn-component .sk-box.info.featured,.sn-component .sk-button.info.featured,.sn-component .sk-circle.info.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .info.featured.sk-box:before,.sn-component .sk-box.info.featured:before,.sn-component .sk-button.info.featured:before,.sn-component .sk-circle.info.featured:before{opacity:1}.sn-component .sk-box.warning,.sn-component .sk-button.warning,.sn-component .sk-circle.warning,.sn-component .warning.sk-box{color:#fff;color:var(--sn-stylekit-warning-contrast-color);position:relative;background-color:#f6a200;background-color:var(--sn-stylekit-warning-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#f6a200;border-color:var(--sn-stylekit-warning-color)}.sn-component .sk-box.warning *,.sn-component .sk-button.warning *,.sn-component .sk-circle.warning *,.sn-component .warning.sk-box *{position:relative}.sn-component .sk-box.warning:before,.sn-component .sk-button.warning:before,.sn-component .sk-circle.warning:before,.sn-component .warning.sk-box:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#f6a200;background-color:var(--sn-stylekit-warning-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-box.warning:after,.sn-component .sk-button.warning:after,.sn-component .sk-circle.warning:after,.sn-component .warning.sk-box:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#f6a200;color:var(--sn-stylekit-warning-color)}.sn-component .sk-box.warning:hover:before,.sn-component .sk-button.warning:hover:before,.sn-component .sk-circle.warning:hover:before,.sn-component .warning.sk-box:hover:before{-webkit-filter:brightness(130%);filter:brightness(130%)}.sn-component .sk-box.warning.no-bg,.sn-component .sk-button.warning.no-bg,.sn-component .sk-circle.warning.no-bg,.sn-component .warning.no-bg.sk-box{background-color:transparent}.sn-component .sk-box.warning.no-bg:before,.sn-component .sk-button.warning.no-bg:before,.sn-component .sk-circle.warning.no-bg:before,.sn-component .warning.no-bg.sk-box:before{content:none}.sn-component .sk-box.warning.featured,.sn-component .sk-button.warning.featured,.sn-component .sk-circle.warning.featured,.sn-component .warning.featured.sk-box{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-box.warning.featured:before,.sn-component .sk-button.warning.featured:before,.sn-component .sk-circle.warning.featured:before,.sn-component .warning.featured.sk-box:before{opacity:1}.sn-component .danger.sk-box,.sn-component .sk-box.danger,.sn-component .sk-button.danger,.sn-component .sk-circle.danger{color:#fff;color:var(--sn-stylekit-danger-contrast-color);position:relative;background-color:#f80324;background-color:var(--sn-stylekit-danger-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#f80324;border-color:var(--sn-stylekit-danger-color)}.sn-component .danger.sk-box *,.sn-component .sk-box.danger *,.sn-component .sk-button.danger *,.sn-component .sk-circle.danger *{position:relative}.sn-component .danger.sk-box:before,.sn-component .sk-box.danger:before,.sn-component .sk-button.danger:before,.sn-component .sk-circle.danger:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#f80324;background-color:var(--sn-stylekit-danger-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .danger.sk-box:after,.sn-component .sk-box.danger:after,.sn-component .sk-button.danger:after,.sn-component .sk-circle.danger:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#f80324;color:var(--sn-stylekit-danger-color)}.sn-component .danger.sk-box:hover:before,.sn-component .sk-box.danger:hover:before,.sn-component .sk-button.danger:hover:before,.sn-component .sk-circle.danger:hover:before{-webkit-filter:brightness(130%);filter:brightness(130%)}.sn-component .danger.no-bg.sk-box,.sn-component .sk-box.danger.no-bg,.sn-component .sk-button.danger.no-bg,.sn-component .sk-circle.danger.no-bg{background-color:transparent}.sn-component .danger.no-bg.sk-box:before,.sn-component .sk-box.danger.no-bg:before,.sn-component .sk-button.danger.no-bg:before,.sn-component .sk-circle.danger.no-bg:before{content:none}.sn-component .danger.featured.sk-box,.sn-component .sk-box.danger.featured,.sn-component .sk-button.danger.featured,.sn-component .sk-circle.danger.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .danger.featured.sk-box:before,.sn-component .sk-box.danger.featured:before,.sn-component .sk-button.danger.featured:before,.sn-component .sk-circle.danger.featured:before{opacity:1}.sn-component .sk-box.success,.sn-component .sk-button.success,.sn-component .sk-circle.success,.sn-component .success.sk-box{color:#fff;color:var(--sn-stylekit-success-contrast-color);position:relative;background-color:#2b9612;background-color:var(--sn-stylekit-success-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#2b9612;border-color:var(--sn-stylekit-success-color)}.sn-component .sk-box.success *,.sn-component .sk-button.success *,.sn-component .sk-circle.success *,.sn-component .success.sk-box *{position:relative}.sn-component .sk-box.success:before,.sn-component .sk-button.success:before,.sn-component .sk-circle.success:before,.sn-component .success.sk-box:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#2b9612;background-color:var(--sn-stylekit-success-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-box.success:after,.sn-component .sk-button.success:after,.sn-component .sk-circle.success:after,.sn-component .success.sk-box:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#2b9612;color:var(--sn-stylekit-success-color)}.sn-component .sk-box.success:hover:before,.sn-component .sk-button.success:hover:before,.sn-component .sk-circle.success:hover:before,.sn-component .success.sk-box:hover:before{-webkit-filter:brightness(130%);filter:brightness(130%)}.sn-component .sk-box.success.no-bg,.sn-component .sk-button.success.no-bg,.sn-component .sk-circle.success.no-bg,.sn-component .success.no-bg.sk-box{background-color:transparent}.sn-component .sk-box.success.no-bg:before,.sn-component .sk-button.success.no-bg:before,.sn-component .sk-circle.success.no-bg:before,.sn-component .success.no-bg.sk-box:before{content:none}.sn-component .sk-box.success.featured,.sn-component .sk-button.success.featured,.sn-component .sk-circle.success.featured,.sn-component .success.featured.sk-box{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-box.success.featured:before,.sn-component .sk-button.success.featured:before,.sn-component .sk-circle.success.featured:before,.sn-component .success.featured.sk-box:before{opacity:1}.sn-component .sk-input.contrast,.sn-component .sk-notification.contrast{color:#2e2e2e;color:var(--sn-stylekit-contrast-foreground-color);position:relative;background-color:#f6f6f6;background-color:var(--sn-stylekit-contrast-background-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border:1px solid #e3e3e3;border:1px solid var(--sn-stylekit-contrast-border-color)}.sn-component .sk-input.contrast *,.sn-component .sk-notification.contrast *{position:relative}.sn-component .sk-input.contrast:before,.sn-component .sk-notification.contrast:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#f6f6f6;background-color:var(--sn-stylekit-contrast-background-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-input.contrast:after,.sn-component .sk-notification.contrast:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;color:#e3e3e3;color:var(--sn-stylekit-contrast-border-color);border-color:#e3e3e3;border-color:var(--sn-stylekit-contrast-border-color)}.sn-component .sk-input.contrast.no-bg,.sn-component .sk-notification.contrast.no-bg{background-color:transparent}.sn-component .sk-input.contrast.no-bg:before,.sn-component .sk-notification.contrast.no-bg:before{content:none}.sn-component .sk-input.contrast.featured,.sn-component .sk-notification.contrast.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-input.contrast.featured:before,.sn-component .sk-notification.contrast.featured:before{opacity:1}.sn-component .sk-input.sk-secondary,.sn-component .sk-notification.sk-secondary{color:#2e2e2e;color:var(--sn-stylekit-secondary-foreground-color);position:relative;background-color:#f6f6f6;background-color:var(--sn-stylekit-secondary-background-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border:1px solid #e3e3e3;border:1px solid var(--sn-stylekit-secondary-border-color)}.sn-component .sk-input.sk-secondary *,.sn-component .sk-notification.sk-secondary *{position:relative}.sn-component .sk-input.sk-secondary:before,.sn-component .sk-notification.sk-secondary:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#f6f6f6;background-color:var(--sn-stylekit-secondary-background-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-input.sk-secondary:after,.sn-component .sk-notification.sk-secondary:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;color:#e3e3e3;color:var(--sn-stylekit-secondary-border-color);border-color:#e3e3e3;border-color:var(--sn-stylekit-secondary-border-color)}.sn-component .sk-input.sk-secondary.no-bg,.sn-component .sk-notification.sk-secondary.no-bg{background-color:transparent}.sn-component .sk-input.sk-secondary.no-bg:before,.sn-component .sk-notification.sk-secondary.no-bg:before{content:none}.sn-component .sk-input.sk-secondary.featured,.sn-component .sk-notification.sk-secondary.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-input.sk-secondary.featured:before,.sn-component .sk-notification.sk-secondary.featured:before{opacity:1}.sn-component .sk-input.sk-secondary-contrast,.sn-component .sk-notification.sk-secondary-contrast{color:#2e2e2e;color:var(--sn-stylekit-secondary-contrast-foreground-color);position:relative;background-color:#e3e3e3;background-color:var(--sn-stylekit-secondary-contrast-background-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-secondary-contrast-border-color);border:1px solid var(--sn-stylekit-secondary-contrast-border-color)}.sn-component .sk-input.sk-secondary-contrast *,.sn-component .sk-notification.sk-secondary-contrast *{position:relative}.sn-component .sk-input.sk-secondary-contrast:before,.sn-component .sk-notification.sk-secondary-contrast:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#e3e3e3;background-color:var(--sn-stylekit-secondary-contrast-background-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-input.sk-secondary-contrast:after,.sn-component .sk-notification.sk-secondary-contrast:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;color:var(--sn-stylekit-secondary-contrast-border-color);border-color:var(--sn-stylekit-secondary-contrast-border-color)}.sn-component .sk-input.sk-secondary-contrast.no-bg,.sn-component .sk-notification.sk-secondary-contrast.no-bg{background-color:transparent}.sn-component .sk-input.sk-secondary-contrast.no-bg:before,.sn-component .sk-notification.sk-secondary-contrast.no-bg:before{content:none}.sn-component .sk-input.sk-secondary-contrast.featured,.sn-component .sk-notification.sk-secondary-contrast.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-input.sk-secondary-contrast.featured:before,.sn-component .sk-notification.sk-secondary-contrast.featured:before{opacity:1}.sn-component .sk-input.sk-base,.sn-component .sk-notification.sk-base{color:#000;color:var(--sn-stylekit-foreground-color);position:relative;background-color:#fff;background-color:var(--sn-stylekit-background-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border:1px solid #e3e3e3;border:1px solid var(--sn-stylekit-border-color)}.sn-component .sk-input.sk-base *,.sn-component .sk-notification.sk-base *{position:relative}.sn-component .sk-input.sk-base:before,.sn-component .sk-notification.sk-base:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#fff;background-color:var(--sn-stylekit-background-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-input.sk-base:after,.sn-component .sk-notification.sk-base:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;color:#e3e3e3;color:var(--sn-stylekit-border-color);border-color:#e3e3e3;border-color:var(--sn-stylekit-border-color)}.sn-component .sk-input.sk-base.no-bg,.sn-component .sk-notification.sk-base.no-bg{background-color:transparent}.sn-component .sk-input.sk-base.no-bg:before,.sn-component .sk-notification.sk-base.no-bg:before{content:none}.sn-component .sk-input.sk-base.featured,.sn-component .sk-notification.sk-base.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-input.sk-base.featured:before,.sn-component .sk-notification.sk-base.featured:before{opacity:1}.sn-component .sk-input.neutral,.sn-component .sk-notification.neutral{color:#fff;color:var(--sn-stylekit-neutral-contrast-color);position:relative;background-color:#989898;background-color:var(--sn-stylekit-neutral-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#989898;border-color:var(--sn-stylekit-neutral-color)}.sn-component .sk-input.neutral *,.sn-component .sk-notification.neutral *{position:relative}.sn-component .sk-input.neutral:before,.sn-component .sk-notification.neutral:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#989898;background-color:var(--sn-stylekit-neutral-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-input.neutral:after,.sn-component .sk-notification.neutral:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#989898;color:var(--sn-stylekit-neutral-color)}.sn-component .sk-input.neutral.no-bg,.sn-component .sk-notification.neutral.no-bg{background-color:transparent}.sn-component .sk-input.neutral.no-bg:before,.sn-component .sk-notification.neutral.no-bg:before{content:none}.sn-component .sk-input.neutral.featured,.sn-component .sk-notification.neutral.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-input.neutral.featured:before,.sn-component .sk-notification.neutral.featured:before{opacity:1}.sn-component .sk-input.info,.sn-component .sk-notification.info{color:#fff;color:var(--sn-stylekit-info-contrast-color);position:relative;background-color:#086dd6;background-color:var(--sn-stylekit-info-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#086dd6;border-color:var(--sn-stylekit-info-color)}.sn-component .sk-input.info *,.sn-component .sk-notification.info *{position:relative}.sn-component .sk-input.info:before,.sn-component .sk-notification.info:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#086dd6;background-color:var(--sn-stylekit-info-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-input.info:after,.sn-component .sk-notification.info:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#086dd6;color:var(--sn-stylekit-info-color)}.sn-component .sk-input.info.no-bg,.sn-component .sk-notification.info.no-bg{background-color:transparent}.sn-component .sk-input.info.no-bg:before,.sn-component .sk-notification.info.no-bg:before{content:none}.sn-component .sk-input.info.featured,.sn-component .sk-notification.info.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-input.info.featured:before,.sn-component .sk-notification.info.featured:before{opacity:1}.sn-component .sk-input.warning,.sn-component .sk-notification.warning{color:#fff;color:var(--sn-stylekit-warning-contrast-color);position:relative;background-color:#f6a200;background-color:var(--sn-stylekit-warning-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#f6a200;border-color:var(--sn-stylekit-warning-color)}.sn-component .sk-input.warning *,.sn-component .sk-notification.warning *{position:relative}.sn-component .sk-input.warning:before,.sn-component .sk-notification.warning:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#f6a200;background-color:var(--sn-stylekit-warning-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-input.warning:after,.sn-component .sk-notification.warning:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#f6a200;color:var(--sn-stylekit-warning-color)}.sn-component .sk-input.warning.no-bg,.sn-component .sk-notification.warning.no-bg{background-color:transparent}.sn-component .sk-input.warning.no-bg:before,.sn-component .sk-notification.warning.no-bg:before{content:none}.sn-component .sk-input.warning.featured,.sn-component .sk-notification.warning.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-input.warning.featured:before,.sn-component .sk-notification.warning.featured:before{opacity:1}.sn-component .sk-input.danger,.sn-component .sk-notification.danger{color:#fff;color:var(--sn-stylekit-danger-contrast-color);position:relative;background-color:#f80324;background-color:var(--sn-stylekit-danger-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#f80324;border-color:var(--sn-stylekit-danger-color)}.sn-component .sk-input.danger *,.sn-component .sk-notification.danger *{position:relative}.sn-component .sk-input.danger:before,.sn-component .sk-notification.danger:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#f80324;background-color:var(--sn-stylekit-danger-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-input.danger:after,.sn-component .sk-notification.danger:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#f80324;color:var(--sn-stylekit-danger-color)}.sn-component .sk-input.danger.no-bg,.sn-component .sk-notification.danger.no-bg{background-color:transparent}.sn-component .sk-input.danger.no-bg:before,.sn-component .sk-notification.danger.no-bg:before{content:none}.sn-component .sk-input.danger.featured,.sn-component .sk-notification.danger.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-input.danger.featured:before,.sn-component .sk-notification.danger.featured:before{opacity:1}.sn-component .sk-input.success,.sn-component .sk-notification.success{color:#fff;color:var(--sn-stylekit-success-contrast-color);position:relative;background-color:#2b9612;background-color:var(--sn-stylekit-success-color);overflow:hidden;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);border-color:#2b9612;border-color:var(--sn-stylekit-success-color)}.sn-component .sk-input.success *,.sn-component .sk-notification.success *{position:relative}.sn-component .sk-input.success:before,.sn-component .sk-notification.success:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:#2b9612;background-color:var(--sn-stylekit-success-color);opacity:1;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-input.success:after,.sn-component .sk-notification.success:after{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:2px;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:#2b9612;color:var(--sn-stylekit-success-color)}.sn-component .sk-input.success.no-bg,.sn-component .sk-notification.success.no-bg{background-color:transparent}.sn-component .sk-input.success.no-bg:before,.sn-component .sk-notification.success.no-bg:before{content:none}.sn-component .sk-input.success.featured,.sn-component .sk-notification.success.featured{border:none;padding:.75rem 1.25rem;font-size:1.1rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-input.success.featured:before,.sn-component .sk-notification.success.featured:before{opacity:1}.sn-component .sk-notification{padding:1.1rem 1rem;margin:1.4rem 0;text-align:left;cursor:default}.sn-component .sk-notification.one-line{padding:0 .4rem}.sn-component .sk-notification.stretch{width:100%}.sn-component .sk-notification.dashed{border-style:dashed;border-width:2px}.sn-component .sk-notification.dashed:after{box-shadow:none}.sn-component .sk-notification .sk-notification-title{font-size:1.3rem;font-size:var(--sn-stylekit-font-size-h1);font-weight:700;line-height:1.9rem}.sn-component .sk-notification .sk-notification-text{line-height:1.5rem;font-size:1rem;font-size:var(--sn-stylekit-font-size-p);text-align:left;font-weight:400}.sn-component .sk-circle{cursor:pointer;border:1px solid #2e2e2e;border-color:var(--sn-stylekit-contrast-foreground-color);background-color:#f6f6f6;background-color:var(--sn-stylekit-contrast-background-color);padding:0;border-radius:50%!important;flex-shrink:0}.sn-component .sk-circle:after,.sn-component .sk-circle:before{border-radius:50%!important}.sn-component .sk-circle.small{width:11px;height:11px}.sn-component .sk-spinner{border-left:1px solid #989898;border-bottom:1px solid #989898;border-top:1px solid #989898;border:1px solid var(--sn-stylekit-neutral-color);border-radius:50%;animation:rotate .8s linear infinite;border-right:1px solid transparent}.sn-component .sk-spinner.small{width:12px;height:12px}.sn-component .sk-spinner.info-contrast{border-color:#fff;border-color:var(--sn-stylekit-info-contrast-color);border-right-color:transparent}.sn-component .sk-spinner.info{border-color:#086dd6;border-color:var(--sn-stylekit-info-color);border-right-color:transparent}.sn-component .sk-spinner.warning{border-color:#f6a200;border-color:var(--sn-stylekit-warning-color);border-right-color:transparent}.sn-component .sk-spinner.danger{border-color:#f80324;border-color:var(--sn-stylekit-danger-color);border-right-color:transparent}.sn-component .sk-spinner.success{border-color:#2b9612;border-color:var(--sn-stylekit-success-color);border-right-color:transparent}@keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.sn-component .sk-app-bar{display:flex;width:100%;height:2rem;padding:0 .8rem;background-color:#f6f6f6;background-color:var(--sn-stylekit-contrast-background-color);color:#2e2e2e;color:var(--sn-stylekit-contrast-foreground-color);justify-content:space-between;align-items:center;border:1px solid #e3e3e3;border:1px solid var(--sn-stylekit-contrast-border-color);-webkit-user-select:none;-ms-user-select:none;user-select:none}.sn-component .sk-app-bar.no-edges{border-left:0;border-right:0}.sn-component .sk-app-bar.no-bottom-edge{border-bottom:0}.sn-component .sk-app-bar .left,.sn-component .sk-app-bar .right{display:flex;height:100%}.sn-component .sk-app-bar .sk-app-bar-item{flex-grow:1;cursor:pointer;display:flex;align-items:center;justify-content:center}.sn-component .sk-app-bar .sk-app-bar-item:not(:first-child){margin-left:1rem}.sn-component .sk-app-bar .sk-app-bar-item.border{border-left:1px solid #e3e3e3;border-left:1px solid var(--sn-stylekit-contrast-border-color)}.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column{height:100%;display:flex;align-items:center}.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column:not(:first-child){margin-left:.5rem}.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column.underline{border-bottom:2px solid #086dd6;border-bottom:2px solid var(--sn-stylekit-info-color)}.sn-component .sk-app-bar .sk-app-bar-item.no-pointer{cursor:default}.sn-component .sk-app-bar .sk-app-bar-item:hover>.sk-app-bar-item-column>.sk-label:not(.subtle),.sn-component .sk-app-bar .sk-app-bar-item:hover>.sk-app-bar-item-column>.sk-sublabel:not(.subtle),.sn-component .sk-app-bar .sk-app-bar-item:hover>.sk-label:not(.subtle),.sn-component .sk-app-bar .sk-app-bar-item:hover>.sk-sublabel:not(.subtle),.sn-component .sk-app-bar .sk-panel-section .sk-app-bar-item:hover>.sk-app-bar-item-column>.sk-panel-section-subtitle:not(.subtle),.sn-component .sk-app-bar .sk-panel-section .sk-app-bar-item:hover>.sk-panel-section-subtitle:not(.subtle),.sn-component .sk-panel-section .sk-app-bar .sk-app-bar-item:hover>.sk-app-bar-item-column>.sk-panel-section-subtitle:not(.subtle),.sn-component .sk-panel-section .sk-app-bar .sk-app-bar-item:hover>.sk-panel-section-subtitle:not(.subtle){color:#086dd6;color:var(--sn-stylekit-info-color)}.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column>.sk-label,.sn-component .sk-app-bar .sk-app-bar-item>.sk-label,.sn-component .sk-app-bar .sk-panel-section .sk-app-bar-item>.sk-app-bar-item-column>.sk-panel-section-subtitle,.sn-component .sk-app-bar .sk-panel-section .sk-app-bar-item>.sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column>.sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-app-bar .sk-app-bar-item>.sk-panel-section-subtitle{font-weight:700;font-size:.9rem;font-size:var(--sn-stylekit-font-size-h5);white-space:nowrap}.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column>.sk-sublabel,.sn-component .sk-app-bar .sk-app-bar-item>.sk-sublabel{font-size:.9rem;font-size:var(--sn-stylekit-font-size-h5);font-weight:400;white-space:nowrap}.sn-component .sk-app-bar .sk-app-bar-item .subtle{font-weight:400;opacity:.6}.sn-component .sk-panel-table{display:flex;flex-wrap:wrap;padding-left:1px;padding-top:1px}.sn-component .sk-panel-table .sk-panel-table-item{flex:45% 1;flex-flow:wrap;border:1px solid #e3e3e3;border:1px solid var(--sn-stylekit-border-color);padding:1rem;margin-left:-1px;margin-top:-1px;display:flex;flex-direction:column;justify-content:space-between}.sn-component .sk-panel-table .sk-panel-table-item img{max-width:100%;margin-bottom:1rem}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-content{display:flex;flex-direction:row}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column{align-items:center}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column.stretch{width:100%}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column:not(:first-child){padding-left:.75rem}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column.quarter{flex-basis:25%}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column.three-quarters{flex-basis:75%}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-footer{margin-top:1.25rem}.sn-component .sk-panel-table .sk-panel-table-item.no-border{border:none}.sn-component .sk-modal{position:fixed;margin-left:auto;margin-right:auto;left:0;right:0;top:0;bottom:0;z-index:10000;width:100vw;height:100vh;background-color:transparent;color:#2e2e2e;color:var(--sn-stylekit-contrast-foreground-color);display:flex;align-items:center;justify-content:center}.sn-component .sk-modal .sn-component,.sn-component .sk-modal .sn-component .sk-panel{height:100%}.sn-component .sk-modal.auto-height>.sk-modal-content{height:auto!important}.sn-component .sk-modal.large>.sk-modal-content{width:900px;height:600px}.sn-component .sk-modal.medium>.sk-modal-content{width:700px;height:500px}.sn-component .sk-modal.small>.sk-modal-content{width:700px;height:344px}.sn-component .sk-modal .sk-modal-background{position:absolute;z-index:-1;width:100%;height:100%;background-color:#f6f6f6;background-color:var(--sn-stylekit-contrast-background-color);opacity:.7}.sn-component .sk-modal>.sk-modal-content{overflow-y:auto;width:auto;padding:0;min-width:300px;box-shadow:0 2px 35px 0 rgba(0,0,0,.19)}.sn-component.no-select{-webkit-user-select:none;-ms-user-select:none;user-select:none}[contenteditable],input,textarea{caret-color:#000;caret-color:var(--sn-stylekit-editor-foreground-color)}.linux-desktop,.linux-web,.windows-desktop,.windows-web{scrollbar-width:thin}.linux-desktop ::-webkit-scrollbar,.linux-web ::-webkit-scrollbar,.windows-desktop ::-webkit-scrollbar,.windows-web ::-webkit-scrollbar{width:17px;height:18px;border-left:.5px solid var(--sn-stylekit-scrollbar-track-border-color-color)}.linux-desktop ::-webkit-scrollbar-thumb,.linux-web ::-webkit-scrollbar-thumb,.windows-desktop ::-webkit-scrollbar-thumb,.windows-web ::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:10px;background-color:#dfdfdf;background-color:var(--sn-stylekit-scrollbar-thumb-color);-webkit-box-shadow:inset -1px -1px 0 rgba(0,0,0,.05),inset 1px 1px 0 rgba(0,0,0,.05)}.linux-desktop ::-webkit-scrollbar-button,.linux-web ::-webkit-scrollbar-button,.windows-desktop ::-webkit-scrollbar-button,.windows-web ::-webkit-scrollbar-button{width:0;height:0;display:none}.linux-desktop ::-webkit-scrollbar-corner,.linux-web ::-webkit-scrollbar-corner,.windows-desktop ::-webkit-scrollbar-corner,.windows-web ::-webkit-scrollbar-corner{background-color:transparent} +/*# sourceMappingURL=4.1b641094.chunk.css.map */ \ No newline at end of file diff --git a/static/css/4.1b641094.chunk.css.map b/static/css/4.1b641094.chunk.css.map new file mode 100644 index 0000000..4ed68a9 --- /dev/null +++ b/static/css/4.1b641094.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css","webpack://node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css","webpack://node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/list/list.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css","webpack://node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css","webpack://node_modules/monaco-editor/esm/vs/base/parts/quickinput/browser/media/quickInput.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/anchorSelect/anchorSelect.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/message/messageController.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/colorPicker/colorPicker.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/hover/hover.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/gotoError/media/gotoErrorWidget.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/peekView/media/peekViewWidget.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css","webpack://node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/find/findWidget.css","webpack://node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/folding/folding.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/links/links.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/parameterHints/parameterHints.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css","webpack://node_modules/monaco-editor/esm/vs/editor/contrib/suggest/media/suggest.css","webpack://node_modules/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css","webpack://node_modules/monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.css","webpack://node_modules/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css","webpack://node_modules/sn-stylekit/dist/stylekit.css"],"names":[],"mappings":"AAOA,eACC,oIAA6I,CAC7I,kIACD,CAMA,ySAEC,kBACD,CAEA,gBACC,QACD,CAMA,uBACC,2BAA6B,CAC7B,UAAW,CACX,SAAU,CACV,sBAAwB,CACxB,eAAgB,CAChB,0BACD,CAGA,wBACC,6BACD,CAEA,6CAGC,mGAEC,iCAAmC,CACnC,aAAc,CACd,cACD,CAGA,yDAEC,qCACD,CAEA,iEAEC,iCACD,CAGA,uEAEC,oCACD,CAGA,+DAEC,6BACD,CAGA,yEAEC,0BACD,CAEA,mHAEC,6BACD,CAGA,uEAEC,6BACD,CAGA,gUAQC,qCAAuC,CACvC,gCAAkC,CAClC,qBACD,CACA,yEAEC,gCAAkC,CAClC,wCAA0C,CAC1C,qBACD,CACA,uEAEC,iCAAmC,CACnC,gCACD,CAGA,4IAIC,wCAA0C,CAC1C,gCAAkC,CAClC,qBACD,CACA,mEAEC,2BACD,CAGA,qGAEC,6BAA8B,CAC9B,0BACD,CACA,qHAEC,6BAA+B,CAC/B,oCACD,CACA,iHAEC,gCAAkC,CAClC,0BAA2B,CAC3B,qBACD,CAGA,qHAEC,6BAA8B,CAC9B,+BAAiC,CACjC,2BAA4B,CAC5B,qBACD,CACA,qIAEC,+BACD,CAKA,oSAEC,8BACD,CAGA,6FAEC,SACD,CAGA,2DAEC,YACD,CAGA,6EAEC,gCAAkC,CAClC,gCACD,CAKA,4JAEC,gCACD,CACA,2EAEC,gCACD,CAGA,uMAEC,6BAA8B,CAC9B,6BAA+B,CAC/B,oCACD,CACA,uMAEC,6BAA8B,CAC9B,gCAAkC,CAClC,0BAA2B,CAC3B,qBACD,CAGA,yFAEC,YACD,CACA,sIAIC,gCAAkC,CAClC,oCAAsC,CACtC,qBACD,CACA,sIAIC,gCACD,CACD,CCvOA,uBACC,iBAAkB,CAClB,WACD,CCDA,YACC,YACD,CAIA,oCACC,aACD,CAIA,eACC,iBAAkB,CAClB,gBAAiB,CACjB,6BACD,CAIA,+BACC,iBAAkB,CAClB,eACD,CAEA,8BACC,iBAAkB,CAClB,KACD,CC9BA,0BACC,WAAY,CACZ,YAAa,CACb,QAAS,CACT,SAAU,CACV,iBAAkB,CAClB,sBAAwB,CACxB,WAAY,CACZ,WAAY,CACZ,eAAgB,CAChB,iBAAkB,CAClB,4BACD,CAcA,oCACC,UACD,CC5BA,mDACC,4BAAkC,CAAlC,iCAAkC,CAClC,iBAAkB,CAClB,gBAAiB,CACjB,oBAAqB,CACrB,qBAAsB,CACtB,qBAAsB,CACtB,cAAe,CACf,WACD,CAEA,6CACC,eAAgB,CAChB,oBAAqB,CACrB,UACD,CAEA,0DACC,cACD,CCnBA,0BACC,WACD,CAGA,gKAEC,4kBACD,CCAA,+FACC,aAAc,CACd,iBAAkB,CAClB,MAAO,CACP,KAAM,CACN,qBACD,CAEA,gGACC,cACD,CCdA,mCACC,iBACD,CCLA,4CACC,cAAe,CACf,wBACD,CAEA,oCACC,SAAU,CAGV,sBAAwB,CAExB,6BACD,CACA,sCACC,SAAU,CACV,mBACD,CACA,2CACC,6BACD,CAGA,mCACC,iBAAkB,CAClB,YACD,CACA,uCACC,aAAc,CACd,KAAM,CACN,QAAS,CACT,UAAW,CACX,UAAW,CACX,oCACD,CACA,wCACC,aAAc,CACd,OAAQ,CACR,MAAO,CACP,WAAY,CACZ,SAAU,CACV,oCACD,CACA,mDACC,aAAc,CACd,KAAM,CACN,MAAO,CACP,UAAW,CACX,SACD,CACA,4CACC,sCACD,CAIA,kDACC,8BACD,CACA,uDACC,8BACD,CACA,wDACC,+BACD,CAEA,oDACC,8BACD,CACA,8DACC,+BACD,CAEA,qDACC,yBACD,CACA,8DACC,8BACD,CACA,+DACC,kBACD,CAEA,gDACC,eACD,CAEA,iDACC,oCACD,CAEA,qDACC,sCACD,CAUA,yJACC,eACD,CCzGA,6BACC,iBAAkB,CAClB,KACD,CAMA,2CACC,iBAAkB,CAClB,YAAa,CACb,kBAAmB,CACnB,sBACD,CCPA,yEACC,iBACD,CCEA,gIAGC,gBAAiB,CACjB,wBAAyB,CACzB,oBACD,CAEA,2BACC,kBACD,CAEA,0BACC,iBAAkB,CAClB,UACD,CAEA,qBACC,oBACD,CC/BA,kCACC,iBAAkB,CAClB,KAAM,CACN,eACD,CAMA,2CACC,iBAAkB,CAClB,WACD,CCRA,2CACC,iBAAkB,CAClB,MAAO,CACP,UAAW,CACX,WACD,CCRA,yDACC,SAAU,CACV,6BACD,CAIA,+HACC,SACD,CAGA,sCACC,iBAAkB,CAClB,OACD,CACA,uCACC,iBAAkB,CAClB,SAAU,CACV,SACD,CACA,yDACC,iBAAkB,CAClB,SAAU,CACV,SACD,CC3BA,+BACC,iBAAkB,CAClB,KAAM,CACN,MACD,CCHA,2BACC,iBAAkB,CAClB,KACD,CCHA,kCACC,iBAAkB,CAClB,KAAM,CACN,MAAO,CACP,UACD,CCDA,oCACC,iBACD,CAEA,gCAAqC,0BAA6B,CAClE,mCAAwC,6BAAgC,CACxE,iCAAsC,2BAA8B,CACpE,oCAAwC,8BAAiC,CAEzE,yCAA4C,wBAA2B,CACvE,4CAA+C,2BAA8B,CAC7E,0CAA6C,yBAA4B,CACzE,6CAA+C,4BAA+B,CCjB9E,8BACC,iBAAkB,CAClB,KACD,CAEA,sCACC,iBAAkB,CAClB,eACD,CAGA,oEACC,mBACD,CAGA,iEACC,qBAAsB,CACtB,gCAAkC,CAClC,kBAAmB,CACnB,gBACD,CAGA,6DACC,uBAAwB,CACxB,yBAA0B,CAC1B,gCAAkC,CAClC,qBACD,CAGA,kEACC,uBAAwB,CACxB,yBAA0B,CAC1B,gCAAkC,CAClC,qBACD,CAEA,gCACC,OAEC,SACD,CACA,OAEC,SACD,CACD,CAEA,+BACC,OAEC,SACD,CACA,OAEC,SACD,CACD,CAEA,gCACC,OAEC,mBACD,CACA,OAEC,mBACD,CACD,CAEA,eACC,8DACD,CAEA,cACC,6DACD,CAEA,uBACC,8DACD,CChFA,kCACC,SACD,CAEA,gDACC,UACD,CAGA,qCAAyC,0BAAiC,CAC1E,0CAA6C,8BAAuC,CAGpF,qJAA+E,sBAA2B,CAC1G,8EAAgF,eAAkB,CAElG,kEACC,UACD,CACA,+CAAoD,8BAAqC,CACzF,wDAA0D,eAAkB,CAI5E,0HAIC,wBAA0B,CAC1B,oBAAuB,CACvB,sBAAwB,CACxB,kBACD,CACA,8JAIC,SACD,CAKA,8FACC,gBACD,CAIA,uDACC,oBACD,CAEA,yDACC,cACD,CCxDA,MACC,eACD,CAEA,aACC,iBAAkB,CAClB,UAAW,CACX,iBACD,CAEA,sBACC,mBACD,CAEA,0BACC,iBACD,CAEA,8BACC,eACD,CAEA,8BACC,eACD,CAEA,4BACC,iBACD,CAEA,gCACC,eACD,CAEA,gCACC,eACD,CAEA,sBACC,wBAA0B,CAC1B,6BACD,CAEA,sBACC,gBAAiB,CACjB,KAAM,CACN,SAAuB,CAAvB,sBAAuB,CACvB,WACD,CAEA,wBACC,gBAAiB,CACjB,MAAO,CACP,UAAW,CACX,UAAwB,CAAxB,uBACD,CAEA,qGAEC,WAAY,CACZ,UAAkC,CAAlC,+BAAkC,CAClC,SAAiC,CAAjC,8BAAiC,CACjC,WAAY,CACZ,aAAc,CACd,iBAAkB,CAClB,iBACD,CAEA,uKAEC,kBACD,CAEA,uKAEC,kBACD,CAEA,8CACC,QAAiC,CAAjC,8BAAiC,CACjC,QAAgC,CAAhC,6BACD,CACA,2CACC,QAAiC,CAAjC,8BAAiC,CACjC,WAAmC,CAAnC,gCACD,CACA,gDACC,OAAgC,CAAhC,6BAAgC,CAChC,SAAiC,CAAjC,8BACD,CACA,6CACC,OAAgC,CAAhC,6BAAgC,CAChC,UAAkC,CAAlC,+BACD,CAEA,aACC,wCAA0C,CAC1C,sBACD,CAIA,mBACC,eACD,CAEA,4BACC,6BACD,CAEA,iHAEC,cACD,CCjHA,6CACC,gBAAiB,CACjB,oBACD,CAEA,iCACC,iBAAkB,CAClB,gBAAiB,CACjB,wBAAyB,CACzB,oBACD,CAEA,yCACC,iBACD,CAEA,wCACC,iBACD,CAEA,qCACC,eACD,CAEA,uCACC,aAAc,CACd,cACD,CAEA,qCACC,iBAAkB,CAClB,UACD,CAEA,wCACC,oBAAqB,CACrB,UAAW,CACX,qBACD,CAEA,iDACC,uBACD,CAEA,yCACC,oBAAqB,CACrB,iBAAkB,CAClB,UAAW,CACX,OACD,CAEA,uDACC,UAAW,CACX,WAAY,CACZ,YACD,CCvDA,mBACC,gBAAiB,CACjB,kBACD,CAEA,sCACC,YAAa,CACb,aAAc,CACd,SAAU,CACV,UAAW,CACX,wBACD,CAEA,+CACC,oBACD,CAEA,8CACC,0BACD,CAEA,gCACC,cAAe,CACf,oBAAqB,CACrB,8BAA+B,CAC/B,iBACD,CAEA,yCACC,cACD,CAEA,gDACC,4BACD,CAEA,+EAEC,oBACD,CAEA,yCACC,YAAa,CACb,kBACD,CAEA,iCACC,cAAe,CACf,gBACD,CAEA,oHAEC,UACD,CAIA,4BACC,eACD,CAEA,yCACC,aACD,CAEA,oDACC,aAAc,CACd,4BAA6B,CAC7B,eAAgB,CAChB,gBAAiB,CACjB,iBACD,CAEA,yDACC,wBACD,CAEA,oDACC,eACD,CAGA,iDACC,eAAgB,CAChB,QAAO,CACP,eAAgB,CAChB,cAAe,CACf,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,iBACD,CAEA,qDACC,YACD,CAEA,mEACC,gBACD,CCpGA,2BACC,eACD,CCFA,cACC,iBAAkB,CAClB,YACD,CAEA,oBACC,+CAAY,CAAZ,mCAAY,CAAZ,2BAAY,CAAZ,8EAAY,CAAZ,WAAY,CAAZ,wBAAY,CAAZ,iBAAY,CAAZ,eAAY,CAAZ,gBAAY,CAAZ,WAAY,CAAZ,eAAY,CAAZ,sBAAY,CAAZ,gBAAY,CAAZ,UAAY,CAAZ,SAAY,CAAZ,UAAY,CAAZ,oBAAY,CAAZ,yBAAY,CAAZ,2BAAY,CAAZ,mBAAY,CAAZ,sBAAY,CAAZ,yBAAY,CAAZ,iBAAY,CAAZ,4CAAY,CAAZ,oCAAY,CAAZ,qBAAY,CAAZ,aAAY,CAAZ,yBAAY,CAAZ,YAAY,CAAZ,cAAY,CAAZ,sBAAY,CAAZ,kBAAY,CAAZ,WAAY,CAAZ,aAAY,CAAZ,cAAY,CAAZ,gBAAY,CAAZ,UAAY,CAAZ,iBAAY,CAAZ,gBAAY,CAAZ,iBAAY,CAAZ,4BAAY,CAAZ,mBAAY,CAAZ,eAAY,CAAZ,mBAAY,CAAZ,kBAAY,CAAZ,WAAY,CAAZ,oBAAY,CAAZ,gBAAY,CAAZ,YAAY,CAAZ,SAAY,CAAZ,qBAAY,CAAZ,4BAAY,CAAZ,QAAY,CAAZ,eAAY,CAAZ,cAAY,CAAZ,YAAY,CAAZ,WAAY,CAAZ,SAAY,CAAZ,SAAY,CAAZ,0BAAY,CAAZ,gBAAY,CAAZ,kBAAY,CAAZ,kBAAY,CAAZ,SAAY,CAAZ,qBAAY,CAAZ,sBAAY,CAAZ,sBAAY,CAAZ,gBAAY,CAAZ,0BAAY,CAAZ,eAAY,CAAZ,UAAY,CAAZ,eAAY,CAAZ,UAAY,CAAZ,iBAAY,CAAZ,eAAY,CAAZ,oBAAY,CAAZ,oBAAY,CAAZ,aAAY,CAAZ,gBAAY,CAAZ,mBAAY,CAAZ,QAAY,CAAZ,cAAY,CAAZ,0BAAY,CAAZ,oBAAY,CAAZ,0BAAY,CAAZ,mBAAY,CAAZ,uBAAY,CAAZ,kBAAY,CAAZ,kBAAY,CAAZ,QAAY,CAAZ,UAAY,CAAZ,mBAAY,CAAZ,YAAY,CAAZ,WAAY,CACZ,mBAAoB,CACpB,cAAe,CACf,cAAe,CACf,YAAa,CACb,aACD,CCZA,WACC,qBAAsB,CACtB,mEACD,CAEA,0BACC,wCAAyC,CACzC,oBAAqB,CACrB,oBAAqB,CACrB,mBAAoB,CACpB,iBAAkB,CAClB,kCAAmC,CACnC,iCAAkC,CAClC,gBAAiB,CACjB,wBAAyB,CACzB,oBACD,CChBA,0BACC,UACD,CAEA,wBACC,GACC,uBACD,CACD,CAEA,2EAEC,8CACD,CAEA,2BACC,UACD,CAGA,mDAEC,+BAAiC,CACjC,iEACD,CCxBA,aACC,iBAAkB,CAClB,WAAY,CACZ,UAAW,CACX,kBACD,CAEA,2BACC,gBAAiB,CACjB,wBAAyB,CACzB,oBACD,CAEA,wCACC,WACD,CAEA,kBACC,iBAAkB,CAClB,UAAW,CACX,WACD,CAEA,oDACC,UAAW,CACX,cACD,CAEA,iBACC,iBAAkB,CAClB,qBAAsB,CACtB,eAAgB,CAChB,UACD,CAEA,4CACC,cAAe,CACf,iBACD,CAGA,2BACC,sBACD,CAGA,2FAGC,mBACD,CAEA,sDACC,aACD,CAGA,mBACC,oBAAqB,CACrB,eAAgB,CAChB,kBAAmB,CACnB,cAAe,CACf,iBAAkB,CAClB,YACD,CAIA,yBACC,YAAa,CACb,kBAAmB,CACnB,iBAAkB,CAClB,iBAAkB,CAClB,aAAgB,CAChB,2BAA4B,CAC5B,sBAAuB,CACvB,eAAgB,CAChB,gBAAiB,CACjB,qBAAsB,CACtB,iBAAkB,CAClB,cAAe,CACf,gBAAiB,CACjB,WAAY,CACZ,SAAU,CACV,OACD,CAEA,kCACC,2BACD,CAEA,4BACC,SACD,CAEA,4BACC,QACD,CAEA,mCACC,YAAa,CACb,kBAAmB,CACnB,qBAAsB,CACtB,oBAAsB,CACtB,OACD,CAEA,qFAEC,UACD,CAEA,qCACC,WAAY,CACZ,qBAAsB,CACtB,uBAAwB,CACxB,oBAAqB,CACrB,eAAgB,CAChB,UAAW,CACX,WAAY,CACZ,aAAc,CACd,QAAS,CACT,SAAU,CACV,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,cACD,CAEA,2CACC,eACD,CAEA,iCACC,iBAAkB,CAClB,qBAAsB,CACtB,UAAW,CACX,WAAY,CACZ,KAAM,CACN,MAAO,CACP,oBAAyB,CACzB,iBAAkB,CAClB,kBAAmB,CACnB,UAAY,CACZ,mBACD,CAEA,uCACC,YACD,CAIA,yBACC,mBAAY,CAAZ,WACD,CAEA,kCACC,uBAAgB,CAAhB,eACD,CC/JA,eACC,YAAa,CACb,WAAY,CACZ,kBAAmB,CACnB,iBACD,CAEA,kBACC,WAAY,CACZ,iBAAkB,CAClB,KAAM,CACN,SAAU,CACV,mBACD,CAEA,+BACC,SACD,CAEA,gCACC,oBAAqB,CACrB,qBAAsB,CACtB,WAAY,CACZ,iCAAkC,CAIlC,kCAHD,CAMA,uCAEC,WACD,CAEA,mBACC,cAAe,CACf,gBAAiB,CACjB,iBAAkB,CAClB,aAAc,CACd,UAAW,CACX,sBAAwB,CACxB,kBAAmB,CACnB,sBAAuB,CACvB,uBAAyB,CACzB,yBACD,CAEA,oBACC,QAAO,CACP,eACD,CAEA,oCACC,wBACD,CAEA,oDAEC,+CACD,CC5DA,oBACC,cACD,CAEA,yDAEC,aACD,CAEA,kEAEC,aACD,CAEA,mEAEC,aACD,CCjBA,oBACC,iBAAkB,CAClB,WAAY,CACZ,YAAa,CACb,kBAAmB,CACnB,QAAS,CACT,kBACD,CAEA,sBACC,YACD,CAEA,6BACC,YAAa,CACb,eAAgB,CAChB,QACD,CAEA,kEACC,0BACD,CAEA,mBACC,aAAgB,CAChB,iBACD,CAEA,8BACC,YAAa,CACb,gBAAiB,CACjB,QACD,CAEA,+DACC,QAAS,CACT,UAAW,CACX,WAAY,CACZ,uBAA2B,CAC3B,2BACD,CAEA,yBACC,UACD,CAEA,6CACC,cACD,CAEA,oBACC,YAAa,CACb,iBAAwB,CACxB,kBACD,CAEA,qDAEC,SAAU,CACV,eACD,CAEA,yBACC,YAAa,CACb,qBAAsB,CACtB,WAAY,CACZ,iBACD,CAEA,uBACC,iBAAkB,CAClB,QACD,CAEA,oBACC,WAAY,CACZ,YAAa,CACb,iBACD,CAEA,iBACC,WACD,CAEA,8GAEC,eACD,CAEA,2BACC,iBAAkB,CAClB,aACD,CAEA,mBACC,iBAAkB,CAClB,iBAAkB,CAClB,SAAU,CACV,YAAa,CACb,kBACD,CAEA,uCACC,qBAAsB,CACtB,eAAgB,CAChB,iBAAkB,CAClB,eAAgB,CAChB,kBACD,CAEA,oBACC,eACD,CAEA,wCACC,cAAe,CACf,aAAc,CACd,YAAa,CACb,aAAc,CACd,kBACD,CAEA,qBACC,eAAgB,CAChB,mBACD,CAEA,8BACC,aAAe,CACf,0BACD,CAEA,gDACC,iBACD,CAEA,8GAEC,UACD,CAEA,kBACC,gBAAiB,CACjB,cACD,CAEA,mDACC,YACD,CAEA,+BACC,eAAgB,CAChB,gBACD,CAEA,0CACC,qBAAsB,CACtB,eAAgB,CAChB,YAAa,CACb,WAAY,CACZ,aACD,CAEA,4EACC,oBAAqB,CACrB,sBACD,CAEA,yGACC,qBACD,CAEA,0CACC,eAAgB,CAChB,YAAa,CACb,WAAY,CACZ,QACD,CAEA,6CACC,iBAAkB,CAClB,QACD,CAEA,yCACC,eAAgB,CAChB,sBAAuB,CACvB,YAAa,CACb,qBAAsB,CACtB,WAAY,CACZ,QAAO,CACP,eACD,CAEA,6EACC,gBACD,CAEA,iEACC,YACD,CACA,iFACC,cACD,CAEA,+DACC,YAAa,CACb,kBACD,CAEA,6NAEC,QACD,CAEA,yFACC,kBACD,CAEA,wEACC,SACD,CAEA,6EACC,gBACD,CAEA,+CACC,UAAY,CACZ,kBAAmB,CACnB,sBAAuB,CACvB,eACD,CAEA,uDACC,eACD,CAEA,sEACC,gBACD,CAEA,qDACC,YAAa,CACb,QAAO,CACP,gBACD,CAEA,mEAKC,YACD,CAEA,2EACC,QAAS,CACT,WAAY,CACZ,aAAc,CACd,qBACD,CAEA,qDACC,cAAe,CAIf,gBAHD,CAMA,2EACC,gBACD,CAEA,uSAGC,YACD,CCrRA,mBACC,YAAa,CACb,eAAgB,CAChB,sBACD,CAEA,0BAGC,oBAAqB,CACrB,qBAAgC,CAChC,2BAA4B,CAC5B,iBAAkB,CAClB,UAAW,CACX,WAAY,CACZ,6BAA+B,CAC/B,oBAAqB,CAGrB,kCAAmC,CACnC,iCAAkC,CAClC,kBAAmB,CAEnB,aACD,CAEA,gDACC,WAAY,CACZ,eAAgB,CAChB,sBAAuB,CACvB,QACD,CAEA,wFACC,aAAc,CACd,eACD,CAEA,yGACC,YAAa,CACb,UACD,CAEA,sGACC,UAAW,CACX,gBAAkB,CAClB,cAAgB,CAChB,eACD,CAEA,6GACC,kBACD,CAEA,0GACC,WACD,CAEA,4MAEC,iBACD,CAEA,8BACC,4BAA6B,CAC7B,WACD,CAGA,gCACC,iBACD,CAEA,0NAEC,4BACD,CAEA,yBACC,WAAa,CACb,aAAc,CACd,eAAgB,CAChB,oBAAqB,CACrB,iBACD,CAGA,sGAGC,uBACD,CAEA,kGAEC,UACD,CClGA,mBACC,YAAa,CACb,kBAAmB,CACnB,gBACD,CAEA,0CACC,oBAAqB,CAErB,kCAA6C,CAA7C,uCAA6C,CAC7C,iBAAkB,CAClB,6CAAmD,CACnD,oCAA0C,CAC1C,qBAAsB,CACtB,UAAW,CACX,cAAe,CACf,eAAgB,CAChB,YACD,CAEA,sDACC,aACD,CAEA,qDACC,cACD,CAEA,uGAEC,qCAA2C,CAC3C,UAAW,CAEX,kCAA0C,CAA1C,qCAA0C,CAC1C,2CACD,CAEA,oDACC,oBACD,CAEA,0DACC,SACD,CC3CA,iBACC,iBAAkB,CAClB,aAAc,CACd,SAAU,CACV,qBAAsB,CAGtB,iBACD,CAEA,sBACC,4BACD,CAEA,uEAIC,WACD,CAEA,4BACC,iBAAkB,CAClB,UAAW,CACX,WACD,CAEA,mCACC,oBAAqB,CACrB,qBAAsB,CACtB,UAAW,CACX,WAAY,CACZ,mBAAoB,CACpB,WAAY,CACZ,mBAAoB,CACpB,iBAAkB,CAClB,WAAY,CACZ,aACD,CAEA,kCACC,sBACD,CAEA,2CACC,aAAc,CACd,uBAAwB,CACxB,oBAAqB,CACrB,YACD,CAEA,8DACC,YACD,CAEA,iDACC,kBACD,CAEA,oCACC,iBAAkB,CAClB,oBAAqB,CACrB,UAAW,CACX,KAAM,CACN,MAAO,CACP,qBAAsB,CACtB,oBAAqB,CACrB,iBAAkB,CAClB,oBACD,CAIA,2BACC,gBACD,CAEA,oDACC,oBAAqB,CACrB,eAAgB,CAChB,eAAgB,CAChB,UAAW,CACX,qBAAsB,CACtB,YAAc,CACd,cAAe,CACf,gBAAiB,CACjB,eAAgB,CAChB,eAAgB,CAChB,oBACD,CAGA,oCACC,iBAAkB,CAClB,SAAU,CACV,OACD,CAEA,iDACC,eACD,CAEA,0DACC,2BAA4B,CAC5B,UAAW,CACX,WACD,CC1GA,oBACC,eAAgB,CAChB,kBAAmB,CACnB,cAAe,CACf,cAAe,CACf,eAAgB,CAChB,gBAAiB,CACjB,eAAmB,CACnB,iBAAkB,CAClB,oBAAqB,CACrB,qBACD,CAEA,yBACC,eAAgB,CAChB,iBAAkB,CAClB,eAAgB,CAChB,kBACD,CClBA,2BACC,UAAW,CACX,UAAW,CACX,eACD,CAEA,yCACC,QAAS,CACT,UAAW,CACX,iBAAkB,CAClB,MAAO,CACP,YACD,CAEA,gDACC,eACD,CAEA,kDACC,MAAO,CACP,2BACD,CAEA,uDACC,UACD,CAEA,kDACC,uBAAwB,CACxB,qBAAsB,CACtB,kCAAmC,CACnC,gCAAiC,CACjC,uBACD,CAYA,oBAAsB,GAAO,iCAAoC,CAAE,IAAM,qCAAuC,CAAE,GAAK,qCAAuC,CAAE,CC7ChK,oBACC,qBAAsB,CACtB,YAAa,CACb,UAAW,CACX,WAAY,CACZ,iBAAkB,CAClB,cAAe,CACf,sBAAuB,CACvB,kBACD,CAEA,0BACC,8BACD,CAEA,wBACC,UAAY,CACZ,cACD,CAEA,6BACC,aAAe,CACf,uBACD,CAEA,wBACC,YACD,CAEA,gDACC,eACD,CC/BA,iCACC,wBAAyB,CACzB,mBACD,CCHA,8BACC,qBACD,CCFA,6CACC,kBAAmB,CACnB,aACD,CAEA,mDACC,gBAAiB,CACjB,eAAgB,CAChB,aACD,CAEA,kBACC,GAAO,SAAY,CACnB,GAAK,SAAY,CAClB,CACA,oDACC,8BACD,CAEA,mBACC,GAAO,SAAY,CACnB,GAAK,SAAY,CAClB,CACA,qDACC,8BACD,CAEA,sDACC,eACD,CAEA,qDACC,iBAAmB,CACnB,kBAAoB,CAGpB,YAAa,CACb,4BAAiB,CACjB,iBACD,CAEA,sIAEC,YACD,CAEA,+DACC,eAAgB,CAChB,QACD,CCjDA,6GAEC,YAAa,CACb,kBAAmB,CACnB,sBACD,CAEA,yHAEC,cACD,CCVA,oCACC,eAAgB,CAChB,oBAAqB,CACrB,sBAAuB,CACvB,kBACD,CAEA,+EAEC,gBAAiB,CACjB,wBAAyB,CACzB,oBAAqB,CACrB,kBAAmB,CACnB,kBACD,CAEA,sCACC,oBACD,CAEA,4CACC,cACD,CAEA,6CACC,qBAAsB,CACtB,4BACD,CAEA,4DACC,cACD,CAEA,kBACC,GAAK,SAAU,CAAE,kBAAoB,CACrC,GAAO,SAAY,CACpB,CAEA,2CACC,2BACD,CCxCA,oBACC,YAAa,CACb,gBAAiB,CACjB,wBAAyB,CACzB,oBACD,CAEA,wCACC,YACD,CAKA,oBACC,YAAa,CACb,WAAY,CACZ,iBAAkB,CAClB,gRAAiR,CACjR,uBAAwB,CACxB,uCAA0B,CAA1B,gCAA0B,CAA1B,yBACD,CAEA,kCACC,WAAY,CAEZ,gBAAiB,CACjB,cAAe,CACf,UAAY,CACZ,QAAO,CACP,iBACD,CAEA,wCACC,UACD,CAEA,oCACC,UAAW,CACX,eAAgB,CAChB,cACD,CAKA,kBACC,YAAa,CACb,WAAY,CACZ,iBACD,CAEA,mCACC,eAAgB,CAChB,YAAa,CACb,iBAAkB,CAClB,eAAgB,CAChB,QACD,CAEA,kCACC,YAAa,CACb,iBACD,CAEA,wCACC,SAAU,CACV,UAAW,CACX,oBAAqB,CACrB,qBAAoC,CACpC,kBAAmB,CACnB,iCAA0C,CAC1C,iBACD,CAEA,yBACC,UAAW,CACX,YACD,CAEA,6BAIC,yFACD,CAEA,8DANC,iBAAkB,CAClB,eAAgB,CAChB,mBAAY,CAAZ,WAWD,CAPA,iCAIC,gRAAiR,CACjR,uBAAwB,CACxB,uCAA0B,CAA1B,gCAA0B,CAA1B,yBACD,CAEA,kCACC,uBAAgB,CAAhB,eACD,CAEA,0BACC,iBAAkB,CAClB,KAAM,CACN,SAAU,CACV,sBAAuB,CACvB,UAAW,CACX,qBAAsB,CACtB,oCAA2C,CAC3C,kCACD,CAEA,kCACC,YAAa,CACb,mBACD,CClHA,cACC,cAAe,CACf,iBAAkB,CAClB,eAAgB,CAChB,UAAW,CACX,gBAAiB,CACjB,wBAAyB,CACzB,oBAAqB,CACrB,sBAAmB,CAAnB,kBAAmB,CACnB,2BAA8B,CAC9B,iBACD,CAEA,qBACC,YACD,CAEA,8BACC,eACD,CAEA,wEACC,eAAgB,CAChB,oBACD,CAEA,2EAEC,4BACD,CAEA,qDAGC,YACD,CAEA,mBACC,wCACD,CAEA,iBACC,qBAAsB,CACtB,aAAgB,CAChB,cAAiB,CAIjB,oBAAkB,CAClB,UACD,CAEA,yFAGC,YACD,CAEA,sFAGC,eACD,CAMA,kCACC,iBACD,CAEA,mBACC,eACD,CAEA,oBACC,YACD,CAEA,mBACC,iBAAkB,CAClB,cACD,CAEA,uCACC,oBACD,CAEA,oCACC,cAAe,CACf,gBACD,CAEA,6CACC,YAAa,CACb,aACD,CAEA,+DACC,iBAAkB,CAClB,cACD,CAEA,6EACC,iBACD,CAEA,uDACC,aAAc,CACd,iBAAkB,CAClB,qBACD,CAEA,iDACC,WACD,CACA,gDACC,WACD,CAEA,0CACC,aACD,CACA,+CACC,yBAA0B,CAE1B,mCAAoC,CACpC,6BACD,CAGA,6EACC,iBAAkB,CAClB,oBACD,CCrIA,qEACC,oBAAqB,CACrB,uBAAwB,CACxB,gBACD,CAEA,8BACC,sBAAuB,CACvB,kBACD,CAEA,qCACC,UAAY,CACZ,iBACD,CAEA,qCACC,oBAAqB,CACrB,iBACD,CAEA,oDACC,iBAAkB,CAClB,eAAgB,CAChB,gBAAiB,CACjB,wBAAyB,CACzB,oBAAqB,CACrB,uBACD,CAEA,6DACC,YAAa,CACb,qBACD,CAEA,sEACC,gBACD,CAEA,4IAEC,UACD,CAEA,yEACC,UAAY,CACZ,aACD,CACA,gFACC,WACD,CACA,+EACC,WACD,CACA,8EACC,yBAA0B,CAE1B,mCAAoC,CACpC,6BACD,CAEA,8DACC,cACD,CCjEA,sCACC,qBAAsB,CACtB,YACD,CAEA,sDACC,YAAa,CACb,kBAAmB,CACnB,cAAe,CACf,gBAAiB,CACjB,cAAe,CACf,WACD,CAEA,2EACC,cAAgB,CAChB,gBACD,CAMA,2HACC,kBACD,CAEA,gEACC,eAAgB,CAChB,sBACD,CAEA,+EACC,WAAY,CACZ,cACD,CAEA,wDACC,QAAO,CACP,gBAAiB,CACjB,iBACD,CAEA,2EACC,oBACD,CAEA,yKAEC,WACD,CAEA,wFACC,eACD,CAEA,yFACC,UAAW,CACX,WAAY,CACZ,QAAS,CACT,mBAAoB,CACpB,2BAA4B,CAC5B,uBACD,CAEA,iGACC,QACD,CAEA,sCACC,oBAAqB,CACrB,iBACD,CAEA,+DACC,gBACD,CC7EA,4BACC,iBAAkB,CAClB,UACD,CAGA,mDACC,sBAAuB,CACvB,yBAA0B,CAC1B,kBAAmB,CACnB,qBAAsB,CACtB,iBACD,CCXA,yDACC,6CAA8C,CAC9C,mBACD,CAEA,qIAEC,4CACD,CCRA,iBACC,WAAY,CACZ,SACD,CAEA,iCACC,cAAe,CACf,WACD,CAEA,wDACC,cACD,CCZA,qCACC,yBAA0B,CAC1B,cACD,CCFA,yEACC,oBAAqB,CACrB,uBACD,CAEA,8CACC,oBAAqB,CACrB,kBACD,CAEA,gDACC,WAAY,CACZ,UAAW,CACX,iBAAkB,CAClB,aACD,CAEA,gDACC,gBACD,CAEA,2DACC,sBAAuB,CACvB,eACD,CAEA,gEACC,mBAAoB,CACpB,UAAW,CACX,WACD,CAEA,6FACC,uBACD,CAEA,uEACC,iBAAkB,CAClB,gBACD,CAIA,yEACC,eACD,CC9CA,oBACC,iBAAkB,CAClB,UAAW,CACX,WACD,CAEA,oCACC,iBAAkB,CAClB,UAAW,CACX,WAAY,CACZ,mBACD,CAEA,iDACC,mBACD,CAEA,+CACC,UAAW,CACX,WACD,CAEA,qEACC,UAAW,CACX,WAAY,CACZ,kBAAmB,CACnB,iBACD,CAEA,sFACC,kBAAoB,CACpB,iBACD,CAEA,oGACC,YACD,CAEA,+FACC,UACD,CAEA,iGACC,WACD,CAEA,gIACC,WAAY,CACZ,iBAAkB,CAClB,KAAM,CACN,MAAO,CACP,SAAU,CACV,mBAAoB,CACpB,wCACD,CAEA,2IACC,WAAY,CACZ,SACD,CAEA,yIACC,UAAW,CACX,UACD,CChEA,8BACC,4BAA8B,CAC9B,UACD,CACA,mCACC,+BAAgC,CAChC,aACD,CACA,oCACC,4BAA6B,CAC7B,UACD,CAEA,oJAGC,cACD,CACA,2IAGC,WACD,CCtBA,wBACC,eAAgB,CAChB,UAAW,CACX,cAAe,CACf,eAAgB,CAChB,UAAY,CACZ,UAAW,CACX,WAAY,CACZ,4BAA6B,CAC7B,WAAY,CACZ,qBAAsB,CACtB,gBAAiB,CACjB,wBAAyB,CACzB,oBACD,CAEA,8DAEC,SACD,CAMA,0EACC,eACD,CAEA,+CACC,WAAY,CACZ,UAAW,CACX,4BAA6B,CAC7B,iBAAkB,CAClB,gBAAiB,CACjB,aAAgB,CAChB,SAAY,CACZ,SAAU,CACV,8BACD,CAGA,oEACC,iBACD,CC3CA,4BACC,iBAAkB,CAClB,UAAW,CACX,WAAY,CACZ,eAAgB,CAChB,gBAAiB,CACjB,+BAAkC,CAClC,aAAc,CACd,qBAAsB,CACtB,wCACD,CAEA,qCACC,QACD,CAEA,yCACC,YACD,CAGA,yDACC,YACD,CAEA,oCACC,uBACD,CAEA,6DACC,0CAA2C,CAC3C,mBACD,CAEA,oDACC,4BAA6B,CAC7B,YACD,CAEA,qDACC,cACD,CAEA,iFAEC,mBAAoB,CACpB,cAAe,CACf,YACD,CAEA,mHAEC,eACD,CAGA,8EACC,kBACD,CAEA,gTAIC,eAAgB,CAChB,kBACD,CAQA,gHACC,WAAY,CACZ,YAAa,CACb,kBACD,CAEA,8CACC,qBAAsB,CACtB,YAAa,CACb,QACD,CAEA,yEAEC,UACD,CAEA,6FAEC,SACD,CAEA,0CACC,YAAa,CACb,YAAa,CACb,gBAAiB,CACjB,mBAAoB,CACpB,WAAY,CACZ,qBAAsB,CACtB,qBAAsB,CACtB,iBAAkB,CAClB,gBACD,CAEA,oCACC,UAAW,CACX,WAAY,CAEZ,YAAa,CACb,eAAgB,CAChB,uBAAkC,CAClC,2BAA4B,CAC5B,cAAe,CACf,YAAa,CACb,kBAAmB,CACnB,sBACD,CAEA,yCACC,aAAc,CACd,gBACD,CAEA,yCACC,UAAW,CACX,eAAgB,CAChB,QACD,CAEA,2CACC,iBAAkB,CAClB,KAAM,CACN,QAAS,CACT,UAAW,CACX,WAAY,CACZ,qBACD,CAEA,oDACC,YACD,CAEA,sCACC,UAAY,CACZ,cACD,CAEA,0CACC,YACD,CAEA,4DACC,iBAAkB,CAClB,YAAa,CACb,qBAAsB,CACtB,SAAU,CACV,WAAY,CACZ,aACD,CAEA,sEACC,iBAAkB,CAClB,OAAQ,CACR,SACD,CAGA,8DACC,YACD,CAGA,+CACC,yBACD,CAGA,kDACC,yBACD,CAEA,mWAKC,YACD,CAEA,0BACC,oBAAqB,CACrB,gCACD,CAEA,yCACC,gBACD,CAEA,oDACC,iBAAkB,CAClB,OAAQ,CACR,QACD,CC9MA,kBACC,iBACD,CAEA,mCACC,cAAe,CACf,UACD,CAEA,4BACC,iBAAkB,CAClB,OAAQ,CACR,SACD,CAEA,+BACC,wBACD,CAGA,oCACC,qBACD,CAGA,wCACC,oDACD,CACA,wCACC,oDACD,CACA,mGAEC,yDACD,CACA,mGAEC,yDACD,CAEA,wCACC,GAAK,6BAAoC,CACzC,GAAO,sBAAyB,CACjC,CACA,wCACC,GAAK,6BAAoC,CAEzC,IAAM,sBAAyB,CAChC,CAEA,6CACC,GAAK,8BAAuC,CAC5C,GAAO,sBAAyB,CACjC,CACA,6CACC,GAAK,8BAAuC,CAE5C,IAAM,sBAAyB,CAChC,CC3DA,+HAEC,cAAe,CACf,SAAU,CACV,sBAAwB,CACxB,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,cAAe,CACf,eACD,CAEA,8LAGC,SACD,CAEA,oCACC,UAAW,CACX,kBAA2B,CAC3B,WAAY,CACZ,cAAe,CACf,eAAgB,CAChB,cACD,CC1BA,mEAEC,yBAA0B,CAC1B,6BACD,CAEA,qCACC,cACD,CCPA,uCACC,UAAW,CACX,YAAa,CACb,qBAAsB,CACtB,iBACD,CAEA,kDACC,eAAgB,CAChB,YAAa,CACb,kBACD,CAEA,gDACC,gBAAiB,CACjB,SACD,CAEA,+CACC,gCACD,CAEA,mFAEC,YACD,CAEA,+GAEC,YAAa,CACb,QAAO,CACP,qBAAsB,CACtB,eACD,CAEA,kDACC,eACD,CAEA,6CACC,oBAAqB,CACrB,oBACD,CAEA,mDACC,YACD,CAEA,4DACC,kBACD,CAEA,iEACC,wCACD,CAEA,mDACC,oBACD,CAEA,kDACC,iBAAkB,CAClB,cACD,CAEA,iDACC,YAAa,CACb,qBAAsB,CACtB,kBAAmB,CACnB,cAAe,CACf,wBACD,CAEA,0DACC,YAAa,CACb,aACD,CAEA,wDACC,UAAW,CACX,WAAY,CACZ,2BAA4B,CAC5B,cACD,CAEA,wDACC,WACD,CAEA,kDACC,iBAAkB,CAClB,WAAY,CACZ,gBAAiB,CACjB,UAAY,CACZ,wCACD,CAEA,oEACC,eAAiB,CACjB,yBACD,CAEA,2EACC,eAAiB,CACjB,iBACD,CCzGA,2BACC,WAAY,CACZ,aACD,CAEA,mCACC,iBACD,CAEA,yCACC,WAAY,CACZ,sBACD,CAEA,yCACC,YAAa,CACb,UACD,CAEA,iDACC,eACD,CCrBA,oCACC,aAGD,CAEA,+EAJC,mBAAoB,CACpB,iBAMD,CCPA,+BACC,WAAY,CACZ,UAAW,CACX,YAAa,CACb,qBACD,CAEA,uCACC,kBAAmB,CACnB,kBACD,CAEA,+DAEC,aAAc,CACd,UAAW,CACX,kBAAmB,CACnB,gBACD,CAEA,iFAEC,gBACD,CAKA,mDACC,qBAAsB,CACtB,YAAa,CACb,oBAAqB,CACrB,6BAA8B,CAC9B,UAAW,CACX,aAAc,CACd,aAAoB,CACpB,gCAAiC,CACjC,eACD,CAEA,mEACC,YACD,CAEA,yDACC,iBACD,CAEA,iFACC,UAAY,CACZ,aACD,CAEA,iHACC,cACD,CAEA,uHACC,YAAa,CACb,iBACD,CAEA,iPAEC,YACD,CAEA,4JACC,UACD,CAIA,wCACC,iBACD,CAIA,qCACC,WAAY,CACZ,UACD,CAEA,4CACC,gBAAiB,CACjB,wBAAyB,CACzB,oBACD,CAIA,6DACC,YAAa,CACb,0BAA2B,CAC3B,qBAAsB,CACtB,kBAAmB,CACnB,2BAA4B,CAC5B,2BAA4B,CAC5B,kBAAmB,CACnB,cAAe,CACf,iBACD,CAEA,uEACC,QAAO,CACP,WAAY,CACZ,eAAgB,CAChB,gBACD,CAEA,6EACC,YAAa,CACb,eAAgB,CAChB,sBAAuB,CACvB,eAAgB,CAChB,6BACD,CAEA,uKACC,YACD,CAEA,iFACC,eACD,CAIA,6LAEC,aAAc,CACd,SAAU,CACV,cAAe,CACf,cACD,CAEA,wFACC,iBAAkB,CAClB,OAAQ,CACR,SACD,CAEA,kMAEC,SACD,CAIA,2SAGC,UACD,CAEA,oGACC,eAAgB,CAChB,sBACD,CAEA,oGACC,eAAgB,CAChB,UAAY,CACZ,aAAc,CACd,sBAAuB,CACvB,eAAgB,CAChB,iBACD,CAIA,mGACC,iBAAkB,CAClB,eAAgB,CAChB,sBAAuB,CACvB,kBACD,CAEA,4HACC,cACD,CAIA,mGACC,YACD,CAQA,6XAEC,cACD,CAIA,4IACC,uBACD,CAEA,mFACC,aAAc,CACd,WAAY,CACZ,eACD,CAEA,sGACC,aACD,CAEA,yHACC,cACD,CAEA,mHACC,aACD,CAEA,oFACC,eAAgB,CAChB,aAAc,CACd,aACD,CAEA,8FACC,oBAAqB,CACrB,iBAAkB,CAClB,UAAW,CACX,UAAW,CACX,WAAY,CACZ,iBACD,CAIA,iNACC,sBACD,CAIA,2GACC,YACD,CAIA,mHACC,oBACD,CAEA,iNAEC,YACD,CAEA,oGACC,kBACD,CAIA,2FACC,WAAa,CACb,qBACD,CAEA,oJACC,4BACD,CAEA,uFACC,WACD,CAEA,mEACC,aAAc,CACd,WAAY,CACZ,UAAW,CACX,eAAgB,CAChB,2BAA4B,CAC5B,mBAAoB,CACpB,uBACD,CAEA,wEACC,YACD,CAEA,2EACC,YAAa,CACb,kBAAmB,CACnB,gBACD,CAEA,uKACC,YACD,CAEA,0FACC,iBAAmB,CACnB,sBAAwB,CACxB,UAAY,CACZ,WAAa,CACb,oBACD,CAIA,0CACC,UACD,CAEA,gCACC,YAAa,CACb,qBAAsB,CACtB,cACD,CAEA,wCACC,YACD,CAEA,2DACC,QACD,CAEA,iEACC,qBAAsB,CACtB,WAAY,CACZ,UACD,CAEA,+EACC,QAAO,CACP,eAAgB,CAChB,sBAAuB,CACvB,UAAY,CACZ,eAAgB,CAChB,iBAAkB,CAClB,sBACD,CAEA,yFACC,kBAAmB,CACnB,oBACD,CAGA,uEACC,QAAS,CACT,eAAgB,CAChB,oBACD,CAEA,+EACC,iBACD,CAEA,qFACC,SAAU,CACV,kBAAoB,CACpB,2BACD,CAEA,+LAEC,eACD,CAEA,uGACC,YACD,CAEA,sGACC,eACD,CAEA,6EACC,oBAAqB,CACrB,oBACD,CAEA,8FACC,kBACD,CAEA,yEACC,YACD,CAEA,qCACC,iBAAkB,CAClB,cACD,CAMA,sEACC,iBACD,CAEA,uCACC,wCACD,CC9ZA,wCACC,YAAa,CACb,qBAAsB,CACtB,eACD,CCJA,iCACC,UAAW,CACX,WAAY,CACZ,WAAY,CACZ,YAAa,CACb,QAAS,CACT,SAAU,CACV,iBAAkB,CAClB,WAAY,CACZ,eAAgB,CAChB,ksCAAioD,CACjoD,wBAAyB,CACzB,iBACD,CAEA,yCACC,ksCAAioD,CACjoD,wBACD,CClBA,sCACC,UAAW,CACX,gBAAiB,CACjB,wBAAyB,CACzB,oBAAqB,CACrB,YACD,CAEA,0BACC,UAAW,CACX,QACD,CAEA,gDACC,wCACD,CAEA,uDACC,eAAmB,CACnB,aAAc,CACd,WACD,CAEA,yDACC,UACD,CAEA,yDACC,wCAAyC,CACzC,gBACD,CAEA,qDACC,wCACD,CCvCA,MAAM,iCAA6B,CAAM,gCAA0B,CAAQ,sCAA+B,CAAS,iCAA2B,CAAQ,iCAA2B,CAAQ,iCAA2B,CAAQ,iCAA2B,CAAQ,iCAA2B,CAAQ,iCAA2B,CAAQ,mCAA4B,CAAS,yCAAqC,CAAO,gCAAyB,CAAS,sCAAkC,CAAO,mCAA4B,CAAS,yCAAqC,CAAO,mCAA4B,CAAS,yCAAqC,CAAO,kCAA2B,CAAS,wCAAoC,CAAO,kCAA2B,CAAS,mCAA+B,CAAO,kCAA2B,CAAS,mCAA+B,CAAO,+CAAwC,CAAS,+CAAwC,CAAS,2CAAoC,CAAS,gDAAyC,CAAS,gDAAyC,CAAS,4CAAqC,CAAS,yDAAkD,CAAS,yDAAkD,CAAS,qDAA8C,CAAS,yEAAsC,CAAqC,yEAAsC,CAAqC,0CAAmC,CAAS,6CAAsC,CAAoB,wCAAiC,CAAS,2CAAoC,CAAS,kDAA2C,CAAS,uCAAoC,CAAK,+DAAqC,CAAA,4DAA8D,CAAA,gNAAkE,CAE5zD,cAAc,6KAA8C,CAA9C,8CAA8C,CAAC,kCAAkC,CAAC,UAAA,CAAA,yCAAyC,CAAC,wBAAwB,4BAAsD,CAAtD,oDAAsD,CAAC,qBAAoD,CAApD,oDAAoD,CAAC,wBAAgD,CAAhD,gDAAgD,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,YAAY,CAAC,qBAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,gCAAgC,yBAAyB,CAAC,+BAA+B,eAAe,CAAC,WAAW,CAAC,eAAe,CAAC,yCAAyC,aAAa,CAAC,YAAY,CAAC,6BAA6B,CAAC,mBAAmB,CAAC,+BAAgE,CAAhE,gEAAgE,CAAC,wBAA6D,CAA7D,6DAA6D,CAAC,aAAkD,CAAlD,kDAAkD,CAAC,kBAAkB,CAAC,gEAAgE,gBAAyC,CAAzC,yCAAyC,CAAC,eAAe,CAAC,uDAAuD,eAAgB,CAAC,4EAA4E,iBAAiB,CAAC,4BAAoD,CAApD,oDAAoD,CAAC,qBAAqB,CAAC,wGAAwG,YAAiB,CAAC,wFAAwF,eAAe,CAAC,aAAa,CAAC,0FAA0F,gBAAgB,CAAC,aAAa,CAAC,0CAA8D,qBAAgB,CAAC,WAAW,CAAC,eAAe,CAAC,WAAW,CAAC,yBAA0B,CAAC,yBAA0B,CAAC,iGAAiG,aAA6C,CAA7C,6CAA6C,CAAC,eAAe,CAAC,gCAAgC,qBAAqB,CAAC,YAAY,CAAC,qBAAqB,CAAC,8CAA8C,iBAAiB,CAAC,iDAAiD,eAAe,CAAC,iDAAiD,oBAAoB,CAAC,+BAAA,CAAA,uDAAuD,CAAC,2DAA2D,kBAAkB,CAAC,2CAA2C,mBAAoB,CAAC,8CAA8C,gBAAgB,CAAC,eAAe,CAAC,wDAAwD,mBAAoB,CAAC,eAAgB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,8DAA8D,+BAAuD,CAAvD,uDAAuD,CAAC,oBAAqB,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,2DAA2D,eAAyC,CAAzC,yCAAyC,CAAC,iBAAiB,CAAC,kEAAkE,eAAkB,CAAC,UAAW,CAAC,oDAAoD,kBAAkB,CAAC,4DAA4D,gBAAiB,CAAC,4BAA4B,YAAY,CAAC,6BAA6B,CAAC,kBAAkB,CAAC,iBAAkB,CAAC,qCAAqC,sBAAsB,CAAC,0CAA0C,wBAAwB,CAAC,yCAAyC,0BAA0B,CAAC,sCAAsC,sBAAsB,CAAC,qDAAqD,UAAU,CAAC,yFAAyF,oBAAqB,CAAC,sCAAsC,iBAAkB,CAAC,oBAAqB,CAAC,kCAAkC,QAAQ,CAAC,SAAS,CAAC,6BAA6B,wBAAgD,CAAhD,gDAAgD,CAAC,aAAa,CAAC,SAAS,CAAC,6BAA6B,UAAU,CAAC,kCAAkC,SAAS,CAAC,0CAA0C,iBAAkB,CAAC,6BAA6B,wBAAwB,CAAC,gBAAgB,CAAC,6BAA6B,qBAAoD,CAApD,oDAAoD,CAAC,wBAAyD,CAAzD,yDAAyD,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,eAAe,CAAC,wBAAgB,CAAhB,oBAAgB,CAAhB,gBAAgB,CAAC,yBAA0B,CAAC,yBAA0B,CAAC,mDAAmD,kBAAmB,CAAC,+BAAgE,CAAhE,gEAAgE,CAAC,wBAA6D,CAA7D,6DAA6D,CAAC,aAAkD,CAAlD,kDAAkD,CAAC,YAAY,CAAC,6BAA6B,CAAC,kBAAkB,CAAC,yDAAyD,eAAgB,CAAC,cAAA,CAAA,yCAAyC,CAAC,4DAA4D,gBAAiB,CAAC,UAAW,CAAC,gDAAgD,YAAiB,CAAC,cAAc,CAAC,YAAY,CAAC,kBAAkB,CAAC,6BAA6B,CAAC,+BAAA,CAAA,uDAAuD,CAAC,sDAAsD,wBAA6D,CAA7D,6DAA6D,CAAC,aAAkD,CAAlD,kDAAkD,CAAC,oBAAA,CAAA,qDAAqD,CAAC,sEAAsE,YAAY,CAAC,sBAAsB,CAAC,qBAAqB,CAAC,wFAAwF,iBAAmB,CAAC,oBAAqB,CAAC,8EAA8E,UAAU,CAAC,6FAA6F,eAAe,CAAC,qLAAqL,wBAAyD,CAAzD,yDAAyD,CAAC,eAAe,CAAC,iMAAiM,qBAAA,CAAA,oDAAoD,CAAC,4EAA4E,YAAY,CAAC,iiBAAiiB,eAAyC,CAAzC,yCAAyC,CAAC,eAAkB,CAAC,oPAAoP,cAAwC,CAAxC,wCAAwC,CAAC,eAAgB,CAAC,6DAA6D,eAAyC,CAAzC,yCAAyC,CAAC,gBAAiB,CAAC,UAAW,CAAC,mBAAmB,aAAA,CAAA,qCAAqC,CAAC,sBAAsB,aAAA,CAAA,mCAAmC,CAAC,0BAA0B,0BAA2B,CAAC,8BAA+B,CAAC,+BAAgC,CAAC,kCAAmC,CAAC,yGAAyG,QAAQ,CAAC,SAAS,CAAC,eAAkB,CAAC,qBAAqB,eAAe,CAAC,gBAAyC,CAAzC,yCAAyC,CAAC,kBAAkB,CAAC,qBAAqB,gBAAyC,CAAzC,yCAAyC,CAAC,kBAAkB,CAAC,qBAAqB,gBAAyC,CAAzC,yCAAyC,CAAC,kBAAkB,CAAC,qBAAqB,cAAwC,CAAxC,wCAAwC,CAAC,kBAAkB,CAAC,qBAAqB,eAAA,CAAA,yCAAyC,CAAC,uBAAuB,eAAgB,CAAC,6BAA6B,eAAA,CAAA,yCAAyC,CAAC,8BAA8B,cAAA,CAAA,wCAAwC,CAAC,6BAA6B,gBAAA,CAAA,yCAAyC,CAAC,qBAAqB,cAAc,CAAC,wBAAA,CAAA,oBAAA,CAAA,gBAAgB,CAAC,8BAA8B,aAAsC,CAAtC,sCAAsC,CAAC,UAAW,CAAC,2BAA2B,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAqB,CAAC,iCAAiC,oBAAoB,CAAC,mCAAmC,wBAAiD,CAAjD,iDAAiD,CAAC,UAAA,CAAA,+CAA+C,CAAC,gCAAgC,wBAA8C,CAA9C,8CAA8C,CAAC,UAAA,CAAA,4CAA4C,CAAC,mCAAmC,wBAAiD,CAAjD,iDAAiD,CAAC,UAAA,CAAA,+CAA+C,CAAC,kCAAkC,wBAAgD,CAAhD,gDAAgD,CAAC,UAAA,CAAA,8CAA8C,CAAC,mCAAmC,wBAAiD,CAAjD,iDAAiD,CAAC,UAAA,CAAA,+CAA+C,CAAC,oBAAoB,oBAAoB,CAAC,uBAAwB,UAAA,CAAA,yCAAyC,CAAC,wBAAyB,aAAA,CAAA,kDAAkD,CAAC,uBAAwB,aAAA,CAAA,sCAAsC,CAAC,oBAAqB,aAAA,CAAA,mCAAmC,CAAC,6BAA8B,UAAA,CAAA,4CAA4C,CAAC,uBAAwB,aAAA,CAAA,sCAAsC,CAAC,sBAAuB,aAAA,CAAA,qCAAqC,CAAC,uBAAwB,aAAA,CAAA,sCAAsC,CAAC,sBAAuB,uBAAA,CAAA,6CAA8C,CAAC,yBAA0B,uBAAA,CAAA,gDAAiD,CAAC,wBAAyB,uBAAA,CAAA,+CAAgD,CAAC,yBAA0B,uBAAA,CAAA,gDAAiD,CAAC,qBAAsB,4BAA4B,CAAC,WAAW,CAAC,2BAA2B,2BAA4B,CAAC,gCAAiC,CAAC,qBAAqB,cAAe,CAAC,6BAA6B,qBAAqB,CAAC,mBAAqB,CAAC,cAAgB,CAAC,WAAW,CAAC,gBAAyC,CAAzC,yCAAyC,CAAC,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,mCAAmC,UAAyC,CAAzC,yCAAyC,CAAC,4BAA4B,CAAC,WAAW,CAAC,uCAAuC,WAAW,CAAC,mFAAmF,eAAgB,CAAC,mGAAmG,eAAkB,CAAC,6FAA6F,cAAe,CAAC,aAAa,CAAC,uKAA6K,UAAU,CAAC,mBAAoB,CAAC,qBAAqB,CAAC,qEAAqE,oBAAoB,CAAC,qBAAqB,CAAC,uGAAyG,iBAAkB,CAAC,gCAAgC,+BAAA,CAAA,uDAAuD,CAAC,iCAAiC,iBAAkB,CAAC,oBAAqB,CAAC,0CAA4B,aAAA,CAAA,gDAAgD,CAA5E,4BAA4B,aAAA,CAAA,gDAAgD,CAAC,qCAAqC,aAAA,CAAA,gDAAgD,CAAC,sCAAsC,aAAA,CAAA,gDAAgD,CAAC,uCAAuC,YAAY,CAAC,UAAU,CAAC,iGAAiG,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,iFAAiF,oBAAoB,CAAC,qBAAqB,CAAC,mHAAmH,gBAAgB,CAAC,qIAAqI,gBAAgB,CAAC,oCAAoC,YAAY,CAAC,kBAAkB,CAAC,2FAA2F,eAAe,CAAC,kBAAkB,CAAC,QAAQ,CAAC,uBAAwB,CAAC,wBAAyB,CAAC,6HAA6H,iBAAiB,CAAC,eAAe,CAAC,mHAAmH,0BAA+D,CAA/D,+DAA+D,CAAC,6BAAkE,CAAlE,kEAAkE,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,4BAA4B,CAAC,iHAAiH,2BAAgE,CAAhE,gEAAgE,CAAC,8BAAmE,CAAnE,mEAAmE,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,2BAA2B,CAAC,oCAAoC,oBAAoB,CAAC,qDAAqD,gBAAgB,CAAC,2BAA2B,oBAAoB,CAAC,+CAA+C,aAAa,CAAC,mBAAqB,CAAC,eAAyC,CAAzC,yCAAyC,CAAC,cAAc,CAAC,iBAAiB,CAAC,wBAAA,CAAA,oBAAA,CAAA,gBAAgB,CAAC,2FAA2F,2BAA4B,CAAC,yDAAyD,oBAAqB,CAAC,4MAA4M,eAAgB,CAAC,aAAa,CAAC,iBAAiB,CAAC,uDAAuD,gBAAyC,CAAzC,yCAAyC,CAAC,oBAAqB,CAAC,sBAAsB,qBAAqB,CAAC,8HAA8H,UAAyC,CAAzC,yCAAyC,CAAC,iBAAiB,CAAC,qBAAoD,CAApD,oDAAoD,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,iBAAA,CAAA,gDAAgD,CAAC,sIAAsI,iBAAiB,CAAC,0JAA0J,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,qBAAoD,CAApD,oDAAoD,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,sJAAsJ,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,UAAA,CAAA,yCAAyC,CAAC,kLAAkL,+BAAA,CAAA,uBAAuB,CAAC,sJAAsJ,4BAA4B,CAAC,kLAAkL,YAAY,CAAC,kKAAkK,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,8LAA8L,SAAW,CAAC,kIAAkI,aAAkD,CAAlD,kDAAkD,CAAC,iBAAiB,CAAC,wBAA6D,CAA7D,6DAA6D,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,yDAAyD,CAAC,0IAA0I,iBAAiB,CAAC,8JAA8J,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAA6D,CAA7D,6DAA6D,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,0JAA0J,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,kDAAkD,CAAC,sLAAsL,+BAAA,CAAA,uBAAuB,CAAC,0JAA0J,4BAA4B,CAAC,sLAAsL,YAAY,CAAC,sKAAsK,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,kMAAkM,SAAW,CAAC,kJAAkJ,aAAmD,CAAnD,mDAAmD,CAAC,iBAAiB,CAAC,wBAA8D,CAA9D,8DAA8D,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,0DAA0D,CAAC,0JAA0J,iBAAiB,CAAC,8KAA8K,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAA8D,CAA9D,8DAA8D,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,0KAA0K,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,mDAAmD,CAAC,sMAAsM,+BAAA,CAAA,uBAAuB,CAAC,0KAA0K,4BAA4B,CAAC,sMAAsM,YAAY,CAAC,sLAAsL,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,kNAAkN,SAAW,CAAC,sLAAsL,aAA4D,CAA5D,4DAA4D,CAAC,iBAAiB,CAAC,wBAAuE,CAAvE,uEAAuE,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,mEAAmE,CAAC,8LAA8L,iBAAiB,CAAC,kNAAkN,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAAuE,CAAvE,uEAAuE,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,8MAA8M,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,4DAA4D,CAAC,0OAA0O,+BAAA,CAAA,uBAAuB,CAAC,8MAA8M,4BAA4B,CAAC,0OAA0O,YAAY,CAAC,0NAA0N,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,sPAAsP,SAAW,CAAC,8HAA8H,UAA+C,CAA/C,+CAA+C,CAAC,iBAAiB,CAAC,wBAAiD,CAAjD,iDAAiD,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,6CAA6C,CAAC,sIAAsI,iBAAiB,CAAC,0JAA0J,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAAiD,CAAjD,iDAAiD,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,sJAAsJ,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,sCAAsC,CAAC,kLAAkL,+BAAA,CAAA,uBAAuB,CAAC,sJAAsJ,4BAA4B,CAAC,kLAAkL,YAAY,CAAC,kKAAkK,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,8LAA8L,SAAW,CAAC,kHAAkH,UAA4C,CAA5C,4CAA4C,CAAC,iBAAiB,CAAC,wBAA8C,CAA9C,8CAA8C,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,0CAA0C,CAAC,0HAA0H,iBAAiB,CAAC,8IAA8I,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAA8C,CAA9C,8CAA8C,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,0IAA0I,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,mCAAmC,CAAC,sKAAsK,+BAAA,CAAA,uBAAuB,CAAC,0IAA0I,4BAA4B,CAAC,sKAAsK,YAAY,CAAC,sJAAsJ,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,kLAAkL,SAAW,CAAC,8HAA8H,UAA+C,CAA/C,+CAA+C,CAAC,iBAAiB,CAAC,wBAAiD,CAAjD,iDAAiD,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,6CAA6C,CAAC,sIAAsI,iBAAiB,CAAC,0JAA0J,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAAiD,CAAjD,iDAAiD,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,sJAAsJ,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,sCAAsC,CAAC,kLAAkL,+BAAA,CAAA,uBAAuB,CAAC,sJAAsJ,4BAA4B,CAAC,kLAAkL,YAAY,CAAC,kKAAkK,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,8LAA8L,SAAW,CAAC,0HAA0H,UAA8C,CAA9C,8CAA8C,CAAC,iBAAiB,CAAC,wBAAgD,CAAhD,gDAAgD,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,4CAA4C,CAAC,kIAAkI,iBAAiB,CAAC,sJAAsJ,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAAgD,CAAhD,gDAAgD,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,kJAAkJ,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,qCAAqC,CAAC,8KAA8K,+BAAA,CAAA,uBAAuB,CAAC,kJAAkJ,4BAA4B,CAAC,8KAA8K,YAAY,CAAC,8JAA8J,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,0LAA0L,SAAW,CAAC,8HAA8H,UAA+C,CAA/C,+CAA+C,CAAC,iBAAiB,CAAC,wBAAiD,CAAjD,iDAAiD,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,6CAA6C,CAAC,sIAAsI,iBAAiB,CAAC,0JAA0J,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAAiD,CAAjD,iDAAiD,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,sJAAsJ,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,sCAAsC,CAAC,kLAAkL,+BAAA,CAAA,uBAAuB,CAAC,sJAAsJ,4BAA4B,CAAC,kLAAkL,YAAY,CAAC,kKAAkK,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,8LAA8L,SAAW,CAAC,yEAAyE,aAAkD,CAAlD,kDAAkD,CAAC,iBAAiB,CAAC,wBAA6D,CAA7D,6DAA6D,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAuD,wBAAA,CAAA,yDAAyD,CAAC,6EAA6E,iBAAiB,CAAC,uFAAuF,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAA6D,CAA7D,6DAA6D,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,qFAAqF,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,aAA8C,CAA9C,8CAA8C,CAAC,oBAAA,CAAA,qDAAqD,CAAC,qFAAqF,4BAA4B,CAAC,mGAAmG,YAAY,CAAC,2FAA2F,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,yGAAyG,SAAW,CAAC,iFAAiF,aAAmD,CAAnD,mDAAmD,CAAC,iBAAiB,CAAC,wBAA8D,CAA9D,8DAA8D,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAwD,wBAAA,CAAA,0DAA0D,CAAC,qFAAqF,iBAAiB,CAAC,+FAA+F,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAA8D,CAA9D,8DAA8D,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,6FAA6F,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,aAA+C,CAA/C,+CAA+C,CAAC,oBAAA,CAAA,sDAAsD,CAAC,6FAA6F,4BAA4B,CAAC,2GAA2G,YAAY,CAAC,mGAAmG,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,iHAAiH,SAAW,CAAC,mGAAmG,aAA4D,CAA5D,4DAA4D,CAAC,iBAAiB,CAAC,wBAAuE,CAAvE,uEAAuE,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,+DAA+D,CAAC,mEAAmE,CAAC,uGAAuG,iBAAiB,CAAC,iHAAiH,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAAuE,CAAvE,uEAAuE,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,+GAA+G,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,wDAAwD,CAAC,+DAA+D,CAAC,+GAA+G,4BAA4B,CAAC,6HAA6H,YAAY,CAAC,qHAAqH,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,mIAAmI,SAAW,CAAC,uEAAuE,UAAyC,CAAzC,yCAAyC,CAAC,iBAAiB,CAAC,qBAAoD,CAApD,oDAAoD,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAA8C,wBAAA,CAAA,gDAAgD,CAAC,2EAA2E,iBAAiB,CAAC,qFAAqF,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,qBAAoD,CAApD,oDAAoD,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,mFAAmF,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,aAAqC,CAArC,qCAAqC,CAAC,oBAAA,CAAA,4CAA4C,CAAC,mFAAmF,4BAA4B,CAAC,iGAAiG,YAAY,CAAC,yFAAyF,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,uGAAuG,SAAW,CAAC,uEAAuE,UAA+C,CAA/C,+CAA+C,CAAC,iBAAiB,CAAC,wBAAiD,CAAjD,iDAAiD,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,6CAA6C,CAAC,2EAA2E,iBAAiB,CAAC,qFAAqF,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAAiD,CAAjD,iDAAiD,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,mFAAmF,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,sCAAsC,CAAC,mFAAmF,4BAA4B,CAAC,iGAAiG,YAAY,CAAC,yFAAyF,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,uGAAuG,SAAW,CAAC,iEAAiE,UAA4C,CAA5C,4CAA4C,CAAC,iBAAiB,CAAC,wBAA8C,CAA9C,8CAA8C,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,0CAA0C,CAAC,qEAAqE,iBAAiB,CAAC,+EAA+E,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAA8C,CAA9C,8CAA8C,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,6EAA6E,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,mCAAmC,CAAC,6EAA6E,4BAA4B,CAAC,2FAA2F,YAAY,CAAC,mFAAmF,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,iGAAiG,SAAW,CAAC,uEAAuE,UAA+C,CAA/C,+CAA+C,CAAC,iBAAiB,CAAC,wBAAiD,CAAjD,iDAAiD,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,6CAA6C,CAAC,2EAA2E,iBAAiB,CAAC,qFAAqF,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAAiD,CAAjD,iDAAiD,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,mFAAmF,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,sCAAsC,CAAC,mFAAmF,4BAA4B,CAAC,iGAAiG,YAAY,CAAC,yFAAyF,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,uGAAuG,SAAW,CAAC,qEAAqE,UAA8C,CAA9C,8CAA8C,CAAC,iBAAiB,CAAC,wBAAgD,CAAhD,gDAAgD,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,4CAA4C,CAAC,yEAAyE,iBAAiB,CAAC,mFAAmF,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAAgD,CAAhD,gDAAgD,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,iFAAiF,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,qCAAqC,CAAC,iFAAiF,4BAA4B,CAAC,+FAA+F,YAAY,CAAC,uFAAuF,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,qGAAqG,SAAW,CAAC,uEAAuE,UAA+C,CAA/C,+CAA+C,CAAC,iBAAiB,CAAC,wBAAiD,CAAjD,iDAAiD,CAAC,eAAe,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,oBAAA,CAAA,6CAA6C,CAAC,2EAA2E,iBAAiB,CAAC,qFAAqF,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,wBAAiD,CAAjD,iDAAiD,CAAC,SAAW,CAAC,iBAAA,CAAA,sDAAsD,CAAC,mFAAmF,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAsD,CAAtD,sDAAsD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,aAAA,CAAA,sCAAsC,CAAC,mFAAmF,4BAA4B,CAAC,iGAAiG,YAAY,CAAC,yFAAyF,WAAW,CAAC,sBAAuB,CAAC,gBAAA,CAAA,yCAAyC,CAAC,uGAAuG,SAAW,CAAC,+BAA+B,mBAAmB,CAAC,eAAe,CAAC,eAAe,CAAC,cAAc,CAAC,wCAAwC,eAAmB,CAAC,uCAAuC,UAAU,CAAC,sCAAsC,mBAAmB,CAAC,gBAAgB,CAAC,4CAA4C,eAAe,CAAC,sDAAsD,gBAAyC,CAAzC,yCAAyC,CAAC,eAAgB,CAAC,kBAAkB,CAAC,qDAAqD,kBAAkB,CAAC,cAAwC,CAAxC,wCAAwC,CAAC,eAAe,CAAC,eAAkB,CAAC,yBAA0C,cAAc,CAAC,wBAAyD,CAAzD,yDAAyD,CAAC,wBAA6D,CAA7D,6DAA6D,CAAC,SAAS,CAAC,2BAA4B,CAAC,aAAa,CAA8D,+DAA+B,2BAA4B,CAAC,+BAA+B,UAAU,CAAC,WAAW,CAAC,0BAA0B,6BAAiD,CAAjD,+BAAiD,CAAjD,4BAAiD,CAAjD,iDAAiD,CAAC,iBAAiB,CAAC,oCAAqC,CAAC,kCAA8B,CAAC,gCAAgC,UAAU,CAAC,WAAW,CAAC,wCAAwC,iBAAmD,CAAnD,mDAAmD,CAAC,8BAA8B,CAAC,+BAA+B,oBAA0C,CAA1C,0CAA0C,CAAC,8BAA8B,CAAC,kCAAkC,oBAA6C,CAA7C,6CAA6C,CAAC,8BAA8B,CAAC,iCAAiC,oBAA4C,CAA5C,4CAA4C,CAAC,8BAA8B,CAAC,kCAAkC,oBAA6C,CAA7C,6CAA6C,CAAC,8BAA8B,CAAC,kBAAkB,GAAG,sBAAsB,CAAC,GAAK,uBAAwB,CAAA,CAAE,0BAA0B,YAAY,CAAC,UAAU,CAAC,WAAW,CAAC,eAAqB,CAAC,wBAA6D,CAA7D,6DAA6D,CAAC,aAAkD,CAAlD,kDAAkD,CAAC,6BAA6B,CAAC,kBAAkB,CAAC,wBAAyD,CAAzD,yDAAyD,CAAC,wBAAA,CAAA,oBAAA,CAAA,gBAAgB,CAAC,mCAAmC,aAAa,CAAC,cAAc,CAAC,yCAAyC,eAAe,CAAC,iEAAiE,YAAY,CAAC,WAAW,CAAC,2CAA2C,WAAW,CAAC,cAAc,CAAC,YAAY,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,6DAA6D,gBAAgB,CAAC,kDAAkD,6BAAA,CAAA,8DAA8D,CAAC,mEAAmE,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAC,qFAAqF,iBAAkB,CAAC,6EAA6E,+BAAA,CAAA,qDAAqD,CAAC,sDAAsD,cAAc,CAAC,kzBAAkzB,aAAA,CAAA,mCAAmC,CAAC,khBAAkhB,eAAgB,CAAC,eAAyC,CAAzC,yCAAyC,CAAC,kBAAkB,CAAC,wIAAwI,eAAyC,CAAzC,yCAAyC,CAAC,eAAkB,CAAC,kBAAkB,CAAC,mDAAmD,eAAkB,CAAC,UAAW,CAAC,8BAA8B,YAAY,CAAC,cAAc,CAAC,gBAAgB,CAAC,eAAe,CAAC,mDAAmD,UAAQ,CAAC,cAAc,CAAC,wBAAgD,CAAhD,gDAAgD,CAAC,YAAY,CAAC,gBAAgB,CAAC,eAAe,CAAC,YAAY,CAAC,qBAAqB,CAAC,6BAA6B,CAAC,uDAAuD,cAAc,CAAC,kBAAkB,CAAC,gFAAgF,YAAY,CAAC,kBAAkB,CAAC,+EAA+E,kBAAkB,CAAC,uFAAuF,UAAU,CAAC,iGAAiG,mBAAoB,CAAC,uFAAuF,cAAc,CAAC,8FAA8F,cAAc,CAAC,+EAA+E,kBAAkB,CAAC,6DAA6D,WAAW,CAAC,wBAAwB,cAAc,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,YAAY,CAAC,4BAA4B,CAAC,aAAkD,CAAlD,kDAAkD,CAAC,YAAY,CAAC,kBAAkB,CAAC,sBAAsB,CAAmD,sFAAgD,WAAW,CAAC,sDAAsD,qBAAsB,CAAC,gDAAgD,WAAW,CAAC,YAAY,CAAC,iDAAiD,WAAW,CAAC,YAAY,CAAC,gDAAgD,WAAW,CAAC,YAAY,CAAC,6CAA6C,iBAAiB,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,wBAA6D,CAA7D,6DAA6D,CAAC,UAAW,CAAC,0CAA0C,eAAe,CAAC,UAAU,CAAW,SAAgB,CAAC,eAAe,CAAwG,uCAA4C,CAAC,wBAAwB,wBAAA,CAAA,oBAAA,CAAA,gBAAgB,CAAC,iCAAiC,gBAAA,CAAA,sDAAsD,CAAC,wDAAwD,oBAAoB,CAAC,wIAAwI,UAAU,CAAC,WAAW,CAAC,4EAA6E,CAAC,gKAAgK,4BAA8B,CAAC,2BAA2B,CAAC,0BAA0B,CAAC,wBAAyD,CAAzD,yDAAyD,CAAC,oFAA0F,CAAC,oKAAoK,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,oKAAoK,4BAA4B","file":"4.1b641094.chunk.css","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n/* Default standalone editor fonts */\r\n.monaco-editor {\r\n\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe WPC\", \"Segoe UI\", \"HelveticaNeue-Light\", system-ui, \"Ubuntu\", \"Droid Sans\", sans-serif;\r\n\t--monaco-monospace-font: \"SF Mono\", Monaco, Menlo, Consolas, \"Ubuntu Mono\", \"Liberation Mono\", \"DejaVu Sans Mono\", \"Courier New\", monospace;\r\n}\r\n\r\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\r\n\tstroke-width: 1.2px;\r\n}\r\n\r\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\tstroke-width: 1.2px;\r\n}\r\n\r\n.monaco-hover p {\r\n\tmargin: 0;\r\n}\r\n\r\n/*\r\nIn certain cases, the default positioning of the aria container (left: -999em) can cause scrollbars to appear.\r\nSo here we try to avoid that by using a different technique. See https://stackoverflow.com/a/26032207\r\n*/\r\n.monaco-aria-container {\r\n\tposition: absolute !important;\r\n\theight: 1px;\r\n\twidth: 1px;\r\n\tleft: inherit !important;\r\n\toverflow: hidden;\r\n\tclip: rect(1px, 1px, 1px, 1px);\r\n}\r\n\r\n/* The hc-black theme is already high contrast optimized */\r\n.monaco-editor.hc-black {\r\n\t-ms-high-contrast-adjust: none;\r\n}\r\n/* In case the browser goes into high contrast mode and the editor is not configured with the hc-black theme */\r\n@media screen and (-ms-high-contrast:active) {\r\n\r\n\t/* current line highlight */\r\n\t.monaco-editor.vs .view-overlays .current-line,\r\n\t.monaco-editor.vs-dark .view-overlays .current-line {\r\n\t\tborder-color: windowtext !important;\r\n\t\tborder-left: 0;\r\n\t\tborder-right: 0;\r\n\t}\r\n\r\n\t/* view cursors */\r\n\t.monaco-editor.vs .cursor,\r\n\t.monaco-editor.vs-dark .cursor {\r\n\t\tbackground-color: windowtext !important;\r\n\t}\r\n\t/* dnd target */\r\n\t.monaco-editor.vs .dnd-target,\r\n\t.monaco-editor.vs-dark .dnd-target {\r\n\t\tborder-color: windowtext !important;\r\n\t}\r\n\r\n\t/* selected text background */\r\n\t.monaco-editor.vs .selected-text,\r\n\t.monaco-editor.vs-dark .selected-text {\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\r\n\t/* allow the text to have a transparent background. */\r\n\t.monaco-editor.vs .view-line,\r\n\t.monaco-editor.vs-dark .view-line {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t}\r\n\r\n\t/* text color */\r\n\t.monaco-editor.vs .view-line span,\r\n\t.monaco-editor.vs-dark .view-line span {\r\n\t\tcolor: windowtext !important;\r\n\t}\r\n\t/* selected text color */\r\n\t.monaco-editor.vs .view-line span.inline-selected-text,\r\n\t.monaco-editor.vs-dark .view-line span.inline-selected-text {\r\n\t\tcolor: highlighttext !important;\r\n\t}\r\n\r\n\t/* allow decorations */\r\n\t.monaco-editor.vs .view-overlays,\r\n\t.monaco-editor.vs-dark .view-overlays {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t}\r\n\r\n\t/* various decorations */\r\n\t.monaco-editor.vs .selectionHighlight,\r\n\t.monaco-editor.vs-dark .selectionHighlight,\r\n\t.monaco-editor.vs .wordHighlight,\r\n\t.monaco-editor.vs-dark .wordHighlight,\r\n\t.monaco-editor.vs .wordHighlightStrong,\r\n\t.monaco-editor.vs-dark .wordHighlightStrong,\r\n\t.monaco-editor.vs .reference-decoration,\r\n\t.monaco-editor.vs-dark .reference-decoration {\r\n\t\tborder: 2px dotted highlight !important;\r\n\t\tbackground: transparent !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .rangeHighlight,\r\n\t.monaco-editor.vs-dark .rangeHighlight {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px dotted activeborder !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .bracket-match,\r\n\t.monaco-editor.vs-dark .bracket-match {\r\n\t\tborder-color: windowtext !important;\r\n\t\tbackground: transparent !important;\r\n\t}\r\n\r\n\t/* find widget */\r\n\t.monaco-editor.vs .findMatch,\r\n\t.monaco-editor.vs-dark .findMatch,\r\n\t.monaco-editor.vs .currentFindMatch,\r\n\t.monaco-editor.vs-dark .currentFindMatch {\r\n\t\tborder: 2px dotted activeborder !important;\r\n\t\tbackground: transparent !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .find-widget,\r\n\t.monaco-editor.vs-dark .find-widget {\r\n\t\tborder: 1px solid windowtext;\r\n\t}\r\n\r\n\t/* list - used by suggest widget */\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row.focused,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused {\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-list .monaco-list-row:hover,\r\n\t.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* scrollbars */\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: background !important;\r\n\t\tborder: 1px solid windowtext;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\t\tbackground: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\r\n\t/* overview ruler */\r\n\t.monaco-editor.vs .decorationsOverviewRuler,\r\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\r\n\t\topacity: 0;\r\n\t}\r\n\r\n\t/* minimap */\r\n\t.monaco-editor.vs .minimap,\r\n\t.monaco-editor.vs-dark .minimap {\r\n\t\tdisplay: none;\r\n\t}\r\n\r\n\t/* squiggles */\r\n\t.monaco-editor.vs .squiggly-d-error,\r\n\t.monaco-editor.vs-dark .squiggly-d-error {\r\n\t\tbackground: transparent !important;\r\n\t\tborder-bottom: 4px double #E47777;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-c-warning,\r\n\t.monaco-editor.vs-dark .squiggly-c-warning {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-b-info,\r\n\t.monaco-editor.vs-dark .squiggly-b-info {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-a-hint,\r\n\t.monaco-editor.vs-dark .squiggly-a-hint {\r\n\t\tborder-bottom: 4px double #6c6c6c;\r\n\t}\r\n\r\n\t/* contextmenu */\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* diff editor */\r\n\t.monaco-diff-editor.vs .diffOverviewRuler,\r\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\r\n\t\tdisplay: none;\r\n\t}\r\n\t.monaco-editor.vs .line-insert,\r\n\t.monaco-editor.vs-dark .line-insert,\r\n\t.monaco-editor.vs .line-delete,\r\n\t.monaco-editor.vs-dark .line-delete {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .char-insert,\r\n\t.monaco-editor.vs-dark .char-insert,\r\n\t.monaco-editor.vs .char-delete,\r\n\t.monaco-editor.vs-dark .char-delete {\r\n\t\tbackground: transparent !important;\r\n\t}\r\n}\r\n\r\n/*.monaco-editor.vs [tabindex=\"0\"]:focus {\r\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}\r\n\r\n.monaco-editor.vs-dark [tabindex=\"0\"]:focus {\r\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}*/\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-aria-container {\r\n\tposition: absolute; /* try to hide from window but not from screen readers */\r\n\tleft:-999em;\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* -------------------- IE10 remove auto clear button -------------------- */\r\n\r\n::-ms-clear {\r\n\tdisplay: none;\r\n}\r\n\r\n/* All widgets */\r\n/* I am not a big fan of this rule */\r\n.monaco-editor .editor-widget input {\r\n\tcolor: inherit;\r\n}\r\n\r\n/* -------------------- Editor -------------------- */\r\n\r\n.monaco-editor {\r\n\tposition: relative;\r\n\toverflow: visible;\r\n\t-webkit-text-size-adjust: 100%;\r\n}\r\n\r\n/* -------------------- Misc -------------------- */\r\n\r\n.monaco-editor .overflow-guard {\r\n\tposition: relative;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .view-overlays {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n.monaco-editor .auto-closed-character {\r\n\topacity: 0.3;\r\n}\r\n*/\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .inputarea {\r\n\tmin-width: 0;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\toutline: none !important;\r\n\tresize: none;\r\n\tborder: none;\r\n\toverflow: hidden;\r\n\tcolor: transparent;\r\n\tbackground-color: transparent;\r\n}\r\n/*.monaco-editor .inputarea {\r\n\tposition: fixed !important;\r\n\twidth: 800px !important;\r\n\theight: 500px !important;\r\n\ttop: initial !important;\r\n\tleft: initial !important;\r\n\tbottom: 0 !important;\r\n\tright: 0 !important;\r\n\tcolor: black !important;\r\n\tbackground: white !important;\r\n\tline-height: 15px !important;\r\n\tfont-size: 14px !important;\r\n}*/\r\n.monaco-editor .inputarea.ime-input {\r\n\tz-index: 10;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers {\r\n\tfont-variant-numeric: tabular-nums;\r\n\tposition: absolute;\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\tcursor: default;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .relative-current-line-number {\r\n\ttext-align: left;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\r\n\tmargin-top: 1px;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-mouse-cursor-text {\r\n\tcursor: text;\r\n}\r\n\r\n/* The following selector looks a bit funny, but that is needed to cover all the workbench and the editor!! */\r\n.vs-dark .mac .monaco-mouse-cursor-text, .hc-black .mac .monaco-mouse-cursor-text,\r\n.vs-dark.mac .monaco-mouse-cursor-text, .hc-black.mac .monaco-mouse-cursor-text {\r\n\tcursor: -webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8, text;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\r\n\tborder-right: 0;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcdr = core decorations rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cdr {\r\n\tposition: absolute;\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Arrows */\r\n.monaco-scrollable-element > .scrollbar > .scra {\r\n\tcursor: pointer;\r\n\tfont-size: 11px !important;\r\n}\r\n\r\n.monaco-scrollable-element > .visible {\r\n\topacity: 1;\r\n\r\n\t/* Background rule added for IE9 - to allow clicks on dom node */\r\n\tbackground:rgba(0,0,0,0);\r\n\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-scrollable-element > .invisible {\r\n\topacity: 0;\r\n\tpointer-events: none;\r\n}\r\n.monaco-scrollable-element > .invisible.fade {\r\n\ttransition: opacity 800ms linear;\r\n}\r\n\r\n/* Scrollable Content Inset Shadow */\r\n.monaco-scrollable-element > .shadow {\r\n\tposition: absolute;\r\n\tdisplay: none;\r\n}\r\n.monaco-scrollable-element > .shadow.top {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\theight: 3px;\r\n\twidth: 100%;\r\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.left {\r\n\tdisplay: block;\r\n\ttop: 3px;\r\n\tleft: 0;\r\n\theight: 100%;\r\n\twidth: 3px;\r\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.top-left-corner {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 3px;\r\n\twidth: 3px;\r\n}\r\n.monaco-scrollable-element > .shadow.top.left {\r\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\r\n}\r\n\r\n/* ---------- Default Style ---------- */\r\n\r\n.vs .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(100, 100, 100, .4);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(121, 121, 121, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(111, 195, 223, .6);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(100, 100, 100, .7);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(111, 195, 223, .8);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(0, 0, 0, .6);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(191, 191, 191, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(111, 195, 223, 1);\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: #000 6px 0 6px -6px inset;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: #000 6px 6px 6px -6px inset;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: none;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .glyph-margin {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcgmr = core glyph margin rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cgmr {\r\n\tposition: absolute;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcigr = core ident guides rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cigr {\r\n\tposition: absolute;\r\n}\r\n.monaco-editor .lines-content .cigra {\r\n\tposition: absolute;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Uncomment to see lines flashing when they're painted */\r\n/*.monaco-editor .view-lines > .view-line {\r\n\tbackground-color: none;\r\n\tanimation-name: flash-background;\r\n\tanimation-duration: 800ms;\r\n}\r\n@keyframes flash-background {\r\n\t0% { background-color: lightgreen; }\r\n\t100% { background-color: none }\r\n}*/\r\n\r\n.monaco-editor.no-user-select .lines-content,\r\n.monaco-editor.no-user-select .view-line,\r\n.monaco-editor.no-user-select .view-lines {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-editor .view-lines {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .view-line {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .mtkz {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n/* TODO@tokenization bootstrap fix */\r\n/*.monaco-editor .view-line > span > span {\r\n\tfloat: none;\r\n\tmin-height: inherit;\r\n\tmargin-left: inherit;\r\n}*/\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .lines-decorations {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tbackground: white;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcldr = core lines decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cldr {\r\n\tposition: absolute;\r\n\theight: 100%;\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcmdr = core margin decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cmdr {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* START cover the case that slider is visible on mouseover */\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\r\n\topacity: 0;\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\r\n\topacity: 1;\r\n}\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\r\n\topacity: 1;\r\n}\r\n/* END cover the case that slider is visible on mouseover */\r\n\r\n.monaco-editor .minimap-shadow-hidden {\r\n\tposition: absolute;\r\n\twidth: 0;\r\n}\r\n.monaco-editor .minimap-shadow-visible {\r\n\tposition: absolute;\r\n\tleft: -6px;\r\n\twidth: 6px;\r\n}\r\n.monaco-editor.no-minimap-shadow .minimap-shadow-visible {\r\n\tposition: absolute;\r\n\tleft: -1px;\r\n\twidth: 1px;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .overlayWidgets {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft:0;\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .view-ruler {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .scroll-decoration {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 6px;\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcslr = core selections layer rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cslr {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\r\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\r\n\r\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\r\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\r\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\r\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .cursors-layer {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n.monaco-editor .cursors-layer > .cursor {\r\n\tposition: absolute;\r\n\toverflow: hidden;\r\n}\r\n\r\n/* -- smooth-caret-animation -- */\r\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\r\n\ttransition: all 80ms;\r\n}\r\n\r\n/* -- block-outline-style -- */\r\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\r\n\tbox-sizing: border-box;\r\n\tbackground: transparent !important;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n}\r\n\r\n/* -- underline-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\r\n\tborder-bottom-width: 2px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n/* -- underline-thin-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\r\n\tborder-bottom-width: 1px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n@keyframes monaco-cursor-smooth {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t60%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-phase {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t90%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-expand {\r\n\t0%,\r\n\t20% {\r\n\t\ttransform: scaleY(1);\r\n\t}\r\n\t80%,\r\n\t100% {\r\n\t\ttransform: scaleY(0);\r\n\t}\r\n}\r\n\r\n.cursor-smooth {\r\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-phase {\r\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-expand > .cursor {\r\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* ---------- DiffEditor ---------- */\r\n\r\n.monaco-diff-editor .diffOverview {\r\n\tz-index: 9;\r\n}\r\n\r\n.monaco-diff-editor .diffOverview .diffViewport {\r\n\tz-index: 10;\r\n}\r\n\r\n/* colors not externalized: using transparancy on background */\r\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\r\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\r\n\tz-index: 10;\r\n}\r\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\r\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\r\n\r\n/* ---------- Diff ---------- */\r\n\r\n.monaco-editor .insert-sign,\r\n.monaco-diff-editor .insert-sign,\r\n.monaco-editor .delete-sign,\r\n.monaco-diff-editor .delete-sign {\r\n\tfont-size: 11px !important;\r\n\topacity: 0.7 !important;\r\n\tdisplay: flex !important;\r\n\talign-items: center;\r\n}\r\n.monaco-editor.hc-black .insert-sign,\r\n.monaco-diff-editor.hc-black .insert-sign,\r\n.monaco-editor.hc-black .delete-sign,\r\n.monaco-diff-editor.hc-black .delete-sign {\r\n\topacity: 1;\r\n}\r\n\r\n.monaco-editor .inline-deleted-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n.monaco-editor .inline-added-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n\r\n/* ---------- Inline Diff ---------- */\r\n\r\n.monaco-editor .view-zones .view-lines .view-line span {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\r\n\tcursor: pointer;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n:root {\r\n\t--sash-size: 4px;\r\n}\r\n\r\n.monaco-sash {\r\n\tposition: absolute;\r\n\tz-index: 35;\r\n\ttouch-action: none;\r\n}\r\n\r\n.monaco-sash.disabled {\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-sash.mac.vertical {\r\n\tcursor: col-resize;\r\n}\r\n\r\n.monaco-sash.vertical.minimum {\r\n\tcursor: e-resize;\r\n}\r\n\r\n.monaco-sash.vertical.maximum {\r\n\tcursor: w-resize;\r\n}\r\n\r\n.monaco-sash.mac.horizontal {\r\n\tcursor: row-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.minimum {\r\n\tcursor: s-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.maximum {\r\n\tcursor: n-resize;\r\n}\r\n\r\n.monaco-sash.disabled {\r\n\tcursor: default !important;\r\n\tpointer-events: none !important;\r\n}\r\n\r\n.monaco-sash.vertical {\r\n\tcursor: ew-resize;\r\n\ttop: 0;\r\n\twidth: var(--sash-size);\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-sash.horizontal {\r\n\tcursor: ns-resize;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: var(--sash-size);\r\n}\r\n\r\n.monaco-sash:not(.disabled).orthogonal-start::before,\r\n.monaco-sash:not(.disabled).orthogonal-end::after {\r\n\tcontent: \" \";\r\n\theight: calc(var(--sash-size) * 2);\r\n\twidth: calc(var(--sash-size) * 2);\r\n\tz-index: 100;\r\n\tdisplay: block;\r\n\tcursor: all-scroll;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled).orthogonal-start::before,\r\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled).orthogonal-end::after {\r\n\tcursor: nwse-resize;\r\n}\r\n\r\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled).orthogonal-end::after,\r\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled).orthogonal-start::before {\r\n\tcursor: nesw-resize;\r\n}\r\n\r\n.monaco-sash.orthogonal-start.vertical::before {\r\n\tleft: -calc(var(--sash-size) / 2);\r\n\ttop: calc(var(--sash-size) * -1);\r\n}\r\n.monaco-sash.orthogonal-end.vertical::after {\r\n\tleft: -calc(var(--sash-size) / 2);\r\n\tbottom: calc(var(--sash-size) * -1);\r\n}\r\n.monaco-sash.orthogonal-start.horizontal::before {\r\n\ttop: -calc(var(--sash-size) / 2);\r\n\tleft: calc(var(--sash-size) * -1);\r\n}\r\n.monaco-sash.orthogonal-end.horizontal::after {\r\n\ttop: -calc(var(--sash-size) / 2);\r\n\tright: calc(var(--sash-size) * -1);\r\n}\r\n\r\n.monaco-sash {\r\n\ttransition: background-color 0.1s ease-out;\r\n\tbackground: transparent;\r\n}\r\n\r\n/** Debug **/\r\n\r\n.monaco-sash.debug {\r\n\tbackground: cyan;\r\n}\r\n\r\n.monaco-sash.debug.disabled {\r\n\tbackground: rgba(0, 255, 255, 0.2);\r\n}\r\n\r\n.monaco-sash.debug:not(.disabled).orthogonal-start::before,\r\n.monaco-sash.debug:not(.disabled).orthogonal-end::after {\r\n\tbackground: red;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-diff-editor .diff-review-line-number {\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-diff-editor .diff-review {\r\n\tposition: absolute;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-summary {\r\n\tpadding-left: 10px;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-shadow {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-row {\r\n\twhite-space: pre;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-table {\r\n\tdisplay: table;\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-row {\r\n\tdisplay: table-row;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-spacer {\r\n\tdisplay: inline-block;\r\n\twidth: 10px;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-spacer > .codicon {\r\n\tfont-size: 9px !important;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-actions {\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\tright: 10px;\r\n\ttop: 2px;\r\n}\r\n\r\n.monaco-diff-editor .diff-review-actions .action-label {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tmargin: 2px 0;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-action-bar {\r\n\ttext-align: right;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-action-bar .actions-container {\r\n\tdisplay: flex;\r\n\tmargin: 0 auto;\r\n\tpadding: 0;\r\n\twidth: 100%;\r\n\tjustify-content: flex-end;\r\n}\r\n\r\n.monaco-action-bar.vertical .actions-container {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-action-bar.reverse .actions-container {\r\n\tflex-direction: row-reverse;\r\n}\r\n\r\n.monaco-action-bar .action-item {\r\n\tcursor: pointer;\r\n\tdisplay: inline-block;\r\n\ttransition: transform 50ms ease;\r\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\r\n}\r\n\r\n.monaco-action-bar .action-item.disabled {\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-action-bar.animated .action-item.active {\r\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\r\n}\r\n\r\n.monaco-action-bar .action-item .icon,\r\n.monaco-action-bar .action-item .codicon {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-action-bar .action-item .codicon {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-action-bar .action-label {\r\n\tfont-size: 11px;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-action-bar .action-item.disabled .action-label,\r\n.monaco-action-bar .action-item.disabled .action-label:hover {\r\n\topacity: 0.4;\r\n}\r\n\r\n/* Vertical actions */\r\n\r\n.monaco-action-bar.vertical {\r\n\ttext-align: left;\r\n}\r\n\r\n.monaco-action-bar.vertical .action-item {\r\n\tdisplay: block;\r\n}\r\n\r\n.monaco-action-bar.vertical .action-label.separator {\r\n\tdisplay: block;\r\n\tborder-bottom: 1px solid #bbb;\r\n\tpadding-top: 1px;\r\n\tmargin-left: .8em;\r\n\tmargin-right: .8em;\r\n}\r\n\r\n.monaco-action-bar.animated.vertical .action-item.active {\r\n\ttransform: translate(5px, 0);\r\n}\r\n\r\n.secondary-actions .monaco-action-bar .action-label {\r\n\tmargin-left: 6px;\r\n}\r\n\r\n/* Action Items */\r\n.monaco-action-bar .action-item.select-container {\r\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\r\n\tflex: 1;\r\n\tmax-width: 170px;\r\n\tmin-width: 60px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tmargin-right: 10px;\r\n}\r\n\r\n.monaco-action-bar .action-item.action-dropdown-item {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-action-bar .action-item.action-dropdown-item > .action-label {\r\n\tmargin-right: 1px;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.context-view .monaco-menu {\r\n\tmin-width: 130px;\r\n}\r\n\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.context-view {\r\n\tposition: absolute;\r\n\tz-index: 2500;\r\n}\r\n\r\n.context-view.fixed {\r\n\tall: initial;\r\n\tfont-family: inherit;\r\n\tfont-size: 13px;\r\n\tposition: fixed;\r\n\tz-index: 2500;\r\n\tcolor: inherit;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n@font-face {\r\n\tfont-family: \"codicon\";\r\n\tsrc: url(./codicon.ttf) format(\"truetype\");\r\n}\r\n\r\n.codicon[class*='codicon-'] {\r\n\tfont: normal normal normal 16px/1 codicon;\r\n\tdisplay: inline-block;\r\n\ttext-decoration: none;\r\n\ttext-rendering: auto;\r\n\ttext-align: center;\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n/* icon rules are dynamically created in codiconStyles */\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.codicon-wrench-subaction {\r\n\topacity: 0.5;\r\n}\r\n\r\n@keyframes codicon-spin {\r\n\t100% {\r\n\t\ttransform:rotate(360deg);\r\n\t}\r\n}\r\n\r\n.codicon-sync.codicon-modifier-spin, .codicon-loading.codicon-modifier-spin{\r\n\t/* Use steps to throttle FPS to reduce CPU usage */\r\n\tanimation: codicon-spin 1.5s steps(30) infinite;\r\n}\r\n\r\n.codicon-modifier-disabled {\r\n\topacity: 0.4;\r\n}\r\n\r\n/* custom speed & easing for loading icon */\r\n.codicon-loading,\r\n.codicon-tree-item-loading::before {\r\n\tanimation-duration: 1s !important;\r\n\tanimation-timing-function: cubic-bezier(0.53, 0.21, 0.29, 0.67) !important;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-list {\r\n\tposition: relative;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-list.mouse-support {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-list > .monaco-scrollable-element {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-list-rows {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-list.horizontal-scrolling .monaco-list-rows {\r\n\twidth: auto;\r\n\tmin-width: 100%;\r\n}\r\n\r\n.monaco-list-row {\r\n\tposition: absolute;\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-list.mouse-support .monaco-list-row {\r\n\tcursor: pointer;\r\n\ttouch-action: none;\r\n}\r\n\r\n/* for OS X ballistic scrolling */\r\n.monaco-list-row.scrolling {\r\n\tdisplay: none !important;\r\n}\r\n\r\n/* Focus */\r\n.monaco-list.element-focused,\r\n.monaco-list.selection-single,\r\n.monaco-list.selection-multiple {\r\n\toutline: 0 !important;\r\n}\r\n\r\n.monaco-list:focus .monaco-list-row.selected .codicon {\r\n\tcolor: inherit;\r\n}\r\n\r\n/* Dnd */\r\n.monaco-drag-image {\r\n\tdisplay: inline-block;\r\n\tpadding: 1px 7px;\r\n\tborder-radius: 10px;\r\n\tfont-size: 12px;\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n}\r\n\r\n/* Type filter */\r\n\r\n.monaco-list-type-filter {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tposition: absolute;\r\n\tborder-radius: 2px;\r\n\tpadding: 0px 3px;\r\n\tmax-width: calc(100% - 10px);\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n\ttext-align: right;\r\n\tbox-sizing: border-box;\r\n\tcursor: all-scroll;\r\n\tfont-size: 13px;\r\n\tline-height: 18px;\r\n\theight: 20px;\r\n\tz-index: 1;\r\n\ttop: 4px;\r\n}\r\n\r\n.monaco-list-type-filter.dragging {\r\n\ttransition: top 0.2s, left 0.2s;\r\n}\r\n\r\n.monaco-list-type-filter.ne {\r\n\tright: 4px;\r\n}\r\n\r\n.monaco-list-type-filter.nw {\r\n\tleft: 4px;\r\n}\r\n\r\n.monaco-list-type-filter > .controls {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tbox-sizing: border-box;\r\n\ttransition: width 0.2s;\r\n\twidth: 0;\r\n}\r\n\r\n.monaco-list-type-filter.dragging > .controls,\r\n.monaco-list-type-filter:hover > .controls {\r\n\twidth: 36px;\r\n}\r\n\r\n.monaco-list-type-filter > .controls > * {\r\n\tborder: none;\r\n\tbox-sizing: border-box;\r\n\t-webkit-appearance: none;\r\n\t-moz-appearance: none;\r\n\tbackground: none;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tflex-shrink: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-list-type-filter > .controls > .filter {\r\n\tmargin-left: 4px;\r\n}\r\n\r\n.monaco-list-type-filter-message {\r\n\tposition: absolute;\r\n\tbox-sizing: border-box;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tpadding: 40px 1em 1em 1em;\r\n\ttext-align: center;\r\n\twhite-space: normal;\r\n\topacity: 0.7;\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-list-type-filter-message:empty {\r\n\tdisplay: none;\r\n}\r\n\r\n/* Electron */\r\n\r\n.monaco-list-type-filter {\r\n\tcursor: grab;\r\n}\r\n\r\n.monaco-list-type-filter.dragging {\r\n\tcursor: grabbing;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-tl-row {\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\talign-items: center;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-tl-indent {\r\n\theight: 100%;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 16px;\r\n\tpointer-events: none;\r\n}\r\n\r\n.hide-arrows .monaco-tl-indent {\r\n\tleft: 12px;\r\n}\r\n\r\n.monaco-tl-indent > .indent-guide {\r\n\tdisplay: inline-block;\r\n\tbox-sizing: border-box;\r\n\theight: 100%;\r\n\tborder-left: 1px solid transparent;\r\n}\r\n\r\n.monaco-tl-indent > .indent-guide {\r\n\ttransition: border-color 0.1s linear;\r\n}\r\n\r\n.monaco-tl-twistie,\r\n.monaco-tl-contents {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-tl-twistie {\r\n\tfont-size: 10px;\r\n\ttext-align: right;\r\n\tpadding-right: 6px;\r\n\tflex-shrink: 0;\r\n\twidth: 16px;\r\n\tdisplay: flex !important;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tcolor: inherit !important;\r\n\ttransform: translateX(3px);\r\n}\r\n\r\n.monaco-tl-contents {\r\n\tflex: 1;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-tl-twistie.collapsed::before {\r\n\ttransform: rotate(-90deg);\r\n}\r\n\r\n.monaco-tl-twistie.codicon-tree-item-loading::before {\r\n\t/* Use steps to throttle FPS to reduce CPU usage */\r\n\tanimation: codicon-spin 1.25s steps(30) infinite;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.quick-input-widget {\r\n\tfont-size: 13px;\r\n}\r\n\r\n.quick-input-widget .monaco-highlighted-label .highlight,\r\n.quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #0066BF;\r\n}\r\n\r\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\r\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #0097fb;\r\n}\r\n\r\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\r\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\r\n\tcolor: #F38518;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.quick-input-widget {\r\n\tposition: absolute;\r\n\twidth: 600px;\r\n\tz-index: 2000;\r\n\tpadding-bottom: 6px;\r\n\tleft: 50%;\r\n\tmargin-left: -300px;\r\n}\r\n\r\n.quick-input-titlebar {\r\n\tdisplay: flex;\r\n}\r\n\r\n.quick-input-left-action-bar {\r\n\tdisplay: flex;\r\n\tmargin-left: 4px;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-left-action-bar.monaco-action-bar .actions-container {\r\n\tjustify-content: flex-start;\r\n}\r\n\r\n.quick-input-title {\r\n\tpadding: 3px 0px;\r\n\ttext-align: center;\r\n}\r\n\r\n.quick-input-right-action-bar {\r\n\tdisplay: flex;\r\n\tmargin-right: 4px;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\r\n\tmargin: 0;\r\n\twidth: 19px;\r\n\theight: 100%;\r\n\tbackground-position: center;\r\n\tbackground-repeat: no-repeat;\r\n}\r\n\r\n.quick-input-description {\r\n\tmargin: 6px;\r\n}\r\n\r\n.quick-input-header .quick-input-description {\r\n\tmargin: 4px 2px;\r\n}\r\n\r\n.quick-input-header {\r\n\tdisplay: flex;\r\n\tpadding: 6px 6px 0px 6px;\r\n\tmargin-bottom: -2px;\r\n}\r\n\r\n.quick-input-widget.hidden-input .quick-input-header {\r\n\t/* reduce margins and paddings when input box hidden */\r\n\tpadding: 0;\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.quick-input-and-message {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tflex-grow: 1;\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-check-all {\r\n\talign-self: center;\r\n\tmargin: 0;\r\n}\r\n\r\n.quick-input-filter {\r\n\tflex-grow: 1;\r\n\tdisplay: flex;\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-box {\r\n\tflex-grow: 1;\r\n}\r\n\r\n.quick-input-widget.show-checkboxes .quick-input-box,\r\n.quick-input-widget.show-checkboxes .quick-input-message {\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.quick-input-visible-count {\r\n\tposition: absolute;\r\n\tleft: -10000px;\r\n}\r\n\r\n.quick-input-count {\r\n\talign-self: center;\r\n\tposition: absolute;\r\n\tright: 4px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-count .monaco-count-badge {\r\n\tvertical-align: middle;\r\n\tpadding: 2px 4px;\r\n\tborder-radius: 2px;\r\n\tmin-height: auto;\r\n\tline-height: normal;\r\n}\r\n\r\n.quick-input-action {\r\n\tmargin-left: 6px;\r\n}\r\n\r\n.quick-input-action .monaco-text-button {\r\n\tfont-size: 11px;\r\n\tpadding: 0 6px;\r\n\tdisplay: flex;\r\n\theight: 27.5px;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-message {\r\n\tmargin-top: -1px;\r\n\tpadding: 5px 5px 2px 5px;\r\n}\r\n\r\n.quick-input-message > .codicon {\r\n\tmargin: 0 0.2em;\r\n\tvertical-align: text-bottom;\r\n}\r\n\r\n.quick-input-progress.monaco-progress-container {\r\n\tposition: relative;\r\n}\r\n\r\n.quick-input-progress.monaco-progress-container,\r\n.quick-input-progress.monaco-progress-container .progress-bit {\r\n\theight: 2px;\r\n}\r\n\r\n.quick-input-list {\r\n\tline-height: 22px;\r\n\tmargin-top: 6px;\r\n}\r\n\r\n.quick-input-widget.hidden-input .quick-input-list {\r\n\tmargin-top: 0; /* reduce margins when input box hidden */\r\n}\r\n\r\n.quick-input-list .monaco-list {\r\n\toverflow: hidden;\r\n\tmax-height: calc(20 * 22px);\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry {\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\tpadding: 0 6px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\r\n\tborder-top-width: 1px;\r\n\tborder-top-style: solid;\r\n}\r\n\r\n.quick-input-list .monaco-list-row:first-child .quick-input-list-entry.quick-input-list-separator-border {\r\n\tborder-top-style: none;\r\n}\r\n\r\n.quick-input-list .quick-input-list-label {\r\n\toverflow: hidden;\r\n\tdisplay: flex;\r\n\theight: 100%;\r\n\tflex: 1;\r\n}\r\n\r\n.quick-input-list .quick-input-list-checkbox {\r\n\talign-self: center;\r\n\tmargin: 0;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\theight: 100%;\r\n\tflex: 1;\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\r\n\tmargin-left: 10px;\r\n}\r\n\r\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\r\n\tdisplay: none;\r\n}\r\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\r\n\tdisplay: inline;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\r\n\tflex: 1; /* make sure the icon label grows within the row */\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\r\n\tvertical-align: sub;\r\n}\r\n\r\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label span {\r\n\topacity: 1;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\r\n\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\r\n}\r\n\r\n.quick-input-list .quick-input-list-label-meta {\r\n\topacity: 0.7;\r\n\tline-height: normal;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.quick-input-list .monaco-highlighted-label .highlight {\r\n\tfont-weight: bold;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\r\n\tmargin-right: 8px; /* separate from keybindings or actions */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tdisplay: flex;\r\n\tflex: 0;\r\n\toverflow: visible;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\r\n\t/*\r\n\t * By default, actions in the quick input action bar are hidden\r\n\t * until hovered over them or selected.\r\n\t */\r\n\tdisplay: none;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\r\n\tmargin: 0;\r\n\theight: 100%;\r\n\tpadding: 0 2px;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tmargin-top: 1px;\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar {\r\n\tmargin-right: 4px; /* separate from scrollbar */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\r\n\tmargin-right: 4px; /* separate actions */\r\n}\r\n\r\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\r\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\r\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {\r\n\tdisplay: flex;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* ---------- Icon label ---------- */\r\n\r\n.monaco-icon-label {\r\n\tdisplay: flex; /* required for icons support :before rule */\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-icon-label::before {\r\n\r\n\t/* svg icons rendered as background image */\r\n\tbackground-size: 16px;\r\n\tbackground-position: left center;\r\n\tbackground-repeat: no-repeat;\r\n\tpadding-right: 6px;\r\n\twidth: 16px;\r\n\theight: 22px;\r\n\tline-height: inherit !important;\r\n\tdisplay: inline-block;\r\n\r\n\t/* fonts icons */\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n\tvertical-align: top;\r\n\r\n\tflex-shrink: 0; /* fix for https://github.com/microsoft/vscode/issues/13787 */\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container {\r\n\tmin-width: 0;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\r\n\tcolor: inherit;\r\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\r\n\tmargin: 0 2px;\r\n\topacity: 0.5;\r\n}\r\n\r\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\topacity: .7;\r\n\tmargin-left: 0.5em;\r\n\tfont-size: 0.9em;\r\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\r\n}\r\n\r\n.monaco-icon-label.nowrap > .monaco-icon-label-container > .monaco-icon-description-container > .label-description{\r\n\twhite-space: nowrap\r\n}\r\n\r\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\topacity: .95;\r\n}\r\n\r\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\r\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-icon-label.deprecated {\r\n\ttext-decoration: line-through;\r\n\topacity: 0.66;\r\n}\r\n\r\n/* make sure apply italic font style to decorations as well */\r\n.monaco-icon-label.italic::after {\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\r\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.monaco-icon-label::after {\r\n\topacity: 0.75;\r\n\tfont-size: 90%;\r\n\tfont-weight: 600;\r\n\tpadding: 0 16px 0 5px;\r\n\ttext-align: center;\r\n}\r\n\r\n/* make sure selection color wins when a label is being selected */\r\n.monaco-list:focus .selected .monaco-icon-label, /* list */\r\n.monaco-list:focus .selected .monaco-icon-label::after\r\n{\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-list-row.focused.selected .label-description,\r\n.monaco-list-row.selected .label-description {\r\n\topacity: .8;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-keybinding {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tline-height: 10px;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key {\r\n\tdisplay: inline-block;\r\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\r\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\r\n\tborder-radius: 3px;\r\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\r\n\tbackground-color: rgba(221, 221, 221, 0.4);\r\n\tvertical-align: middle;\r\n\tcolor: #555;\r\n\tfont-size: 11px;\r\n\tpadding: 3px 5px;\r\n\tmargin: 0 2px;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key:first-child {\r\n\tmargin-left: 0;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key:last-child {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.hc-black .monaco-keybinding > .monaco-keybinding-key,\r\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\r\n\tbackground-color: rgba(128, 128, 128, 0.17);\r\n\tcolor: #ccc;\r\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\r\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\r\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key-separator {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\r\n\twidth: 6px;\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-inputbox {\r\n\tposition: relative;\r\n\tdisplay: block;\r\n\tpadding: 0;\r\n\tbox-sizing:\tborder-box;\r\n\r\n\t/* Customizable */\r\n\tfont-size: inherit;\r\n}\r\n\r\n.monaco-inputbox.idle {\r\n\tborder: 1px solid transparent;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > .input,\r\n.monaco-inputbox > .ibwrapper > .mirror {\r\n\r\n\t/* Customizable */\r\n\tpadding: 4px;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > .input {\r\n\tdisplay: inline-block;\r\n\tbox-sizing:\tborder-box;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tline-height: inherit;\r\n\tborder: none;\r\n\tfont-family: inherit;\r\n\tfont-size: inherit;\r\n\tresize: none;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > input {\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > textarea.input {\r\n\tdisplay: block;\r\n\t-ms-overflow-style: none; /* IE 10+: hide scrollbars */\r\n\tscrollbar-width: none; /* Firefox: hide scrollbars */\r\n\toutline: none;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > textarea.input::-webkit-scrollbar {\r\n\tdisplay: none; /* Chrome + Safari: hide scrollbar */\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > textarea.input.empty {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-inputbox > .ibwrapper > .mirror {\r\n\tposition: absolute;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbox-sizing: border-box;\r\n\twhite-space: pre-wrap;\r\n\tvisibility: hidden;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n/* Context view */\r\n\r\n.monaco-inputbox-container {\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-inputbox-container .monaco-inputbox-message {\r\n\tdisplay: inline-block;\r\n\toverflow: hidden;\r\n\ttext-align: left;\r\n\twidth: 100%;\r\n\tbox-sizing:\tborder-box;\r\n\tpadding: 0.4em;\r\n\tfont-size: 12px;\r\n\tline-height: 17px;\r\n\tmin-height: 34px;\r\n\tmargin-top: -1px;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n/* Action bar support */\r\n.monaco-inputbox .monaco-action-bar {\r\n\tposition: absolute;\r\n\tright: 2px;\r\n\ttop: 4px;\r\n}\r\n\r\n.monaco-inputbox .monaco-action-bar .action-item {\r\n\tmargin-left: 2px;\r\n}\r\n\r\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\r\n\tbackground-repeat: no-repeat;\r\n\twidth: 16px;\r\n\theight: 16px;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-count-badge {\r\n\tpadding: 3px 6px;\r\n\tborder-radius: 11px;\r\n\tfont-size: 11px;\r\n\tmin-width: 18px;\r\n\tmin-height: 18px;\r\n\tline-height: 11px;\r\n\tfont-weight: normal;\r\n\ttext-align: center;\r\n\tdisplay: inline-block;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-count-badge.long {\r\n\tpadding: 2px 3px;\r\n\tborder-radius: 2px;\r\n\tmin-height: auto;\r\n\tline-height: normal;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-progress-container {\r\n\twidth: 100%;\r\n\theight: 5px;\r\n\toverflow: hidden; /* keep progress bit in bounds */\r\n}\r\n\r\n.monaco-progress-container .progress-bit {\r\n\twidth: 2%;\r\n\theight: 5px;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-progress-container.active .progress-bit {\r\n\tdisplay: inherit;\r\n}\r\n\r\n.monaco-progress-container.discrete .progress-bit {\r\n\tleft: 0;\r\n\ttransition: width 100ms linear;\r\n}\r\n\r\n.monaco-progress-container.discrete.done .progress-bit {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-progress-container.infinite .progress-bit {\r\n\tanimation-name: progress;\r\n\tanimation-duration: 4s;\r\n\tanimation-iteration-count: infinite;\r\n\tanimation-timing-function: linear;\r\n\ttransform: translate3d(0px, 0px, 0px);\r\n}\r\n\r\n/**\r\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\r\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\r\n * its relative size to the parent container:\r\n * parent width: 5000%\r\n * bit width: 100%\r\n * translateX should be as follow:\r\n * 50%: 5000% * 50% - 50% (set to center) = 2450%\r\n * 100%: 5000% * 100% - 100% (do not overflow) = 4900%\r\n */\r\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4900%) scaleX(1) } }\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-text-button {\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n\twidth: 100%;\r\n\tpadding: 4px;\r\n\ttext-align: center;\r\n\tcursor: pointer;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-text-button:hover {\r\n\ttext-decoration: none !important;\r\n}\r\n\r\n.monaco-button.disabled {\r\n\topacity: 0.4;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-text-button > .codicon {\r\n\tmargin: 0 0.2em;\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-button-dropdown {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-button-dropdown > .monaco-dropdown-button {\r\n\tmargin-left: 1px;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .selection-anchor {\r\n\tbackground-color: #007ACC;\r\n\twidth: 2px !important;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .bracket-match {\r\n\tbox-sizing: border-box;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .monaco-editor-overlaymessage {\r\n\tpadding-bottom: 8px;\r\n\tz-index: 10000;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage.below {\r\n\tpadding-bottom: 0;\r\n\tpadding-top: 8px;\r\n\tz-index: 10000;\r\n}\r\n\r\n@keyframes fadeIn {\r\n\tfrom { opacity: 0; }\r\n\tto { opacity: 1; }\r\n}\r\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\r\n\tanimation: fadeIn 150ms ease-out;\r\n}\r\n\r\n@keyframes fadeOut {\r\n\tfrom { opacity: 1; }\r\n\tto { opacity: 0; }\r\n}\r\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\r\n\tanimation: fadeOut 100ms ease-out;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage .message {\r\n\tpadding: 1px 4px;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage .anchor {\r\n\twidth: 0 !important;\r\n\theight: 0 !important;\r\n\tborder-color: transparent;\r\n\tborder-style: solid;\r\n\tz-index: 1000;\r\n\tborder-width: 8px;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,\r\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.below {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.top {\r\n\tdisplay: inherit;\r\n\ttop: -8px;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .contentWidgets .codicon-light-bulb,\r\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.monaco-editor .contentWidgets .codicon-light-bulb:hover,\r\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover {\r\n\tcursor: pointer;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .codelens-decoration {\r\n\toverflow: hidden;\r\n\tdisplay: inline-block;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > span,\r\n.monaco-editor .codelens-decoration > a {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n\twhite-space: nowrap;\r\n\tvertical-align: sub;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a {\r\n\ttext-decoration: none;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a:hover {\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .codelens-decoration .codicon {\r\n\tvertical-align: middle;\r\n\tcolor: currentColor !important;\r\n}\r\n\r\n.monaco-editor .codelens-decoration > a:hover .codicon::before {\r\n\tcursor: pointer;\r\n}\r\n\r\n@keyframes fadein {\r\n\t0% { opacity: 0; visibility: visible;}\r\n\t100% { opacity: 1; }\r\n}\r\n\r\n.monaco-editor .codelens-decoration.fadein {\r\n\tanimation: fadein 0.1s linear;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.colorpicker-widget {\r\n\theight: 190px;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-editor .colorpicker-hover:focus {\r\n\toutline: none;\r\n}\r\n\r\n\r\n/* Header */\r\n\r\n.colorpicker-header {\r\n\tdisplay: flex;\r\n\theight: 24px;\r\n\tposition: relative;\r\n\tbackground: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=\");\r\n\tbackground-size: 9px 9px;\r\n\timage-rendering: pixelated;\r\n}\r\n\r\n.colorpicker-header .picked-color {\r\n\twidth: 216px;\r\n\ttext-align: center;\r\n\tline-height: 24px;\r\n\tcursor: pointer;\r\n\tcolor: white;\r\n\tflex: 1;\r\n\ttext-align: center;\r\n}\r\n\r\n.colorpicker-header .picked-color.light {\r\n\tcolor: black;\r\n}\r\n\r\n.colorpicker-header .original-color {\r\n\twidth: 74px;\r\n\tz-index: inherit;\r\n\tcursor: pointer;\r\n}\r\n\r\n\r\n/* Body */\r\n\r\n.colorpicker-body {\r\n\tdisplay: flex;\r\n\tpadding: 8px;\r\n\tposition: relative;\r\n}\r\n\r\n.colorpicker-body .saturation-wrap {\r\n\toverflow: hidden;\r\n\theight: 150px;\r\n\tposition: relative;\r\n\tmin-width: 220px;\r\n\tflex: 1;\r\n}\r\n\r\n.colorpicker-body .saturation-box {\r\n\theight: 150px;\r\n\tposition: absolute;\r\n}\r\n\r\n.colorpicker-body .saturation-selection {\r\n\twidth: 9px;\r\n\theight: 9px;\r\n\tmargin: -5px 0 0 -5px;\r\n\tborder: 1px solid rgb(255, 255, 255);\r\n\tborder-radius: 100%;\r\n\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\r\n\tposition: absolute;\r\n}\r\n\r\n.colorpicker-body .strip {\r\n\twidth: 25px;\r\n\theight: 150px;\r\n}\r\n\r\n.colorpicker-body .hue-strip {\r\n\tposition: relative;\r\n\tmargin-left: 8px;\r\n\tcursor: grab;\r\n\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\r\n}\r\n\r\n.colorpicker-body .opacity-strip {\r\n\tposition: relative;\r\n\tmargin-left: 8px;\r\n\tcursor: grab;\r\n\tbackground: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=\");\r\n\tbackground-size: 9px 9px;\r\n\timage-rendering: pixelated;\r\n}\r\n\r\n.colorpicker-body .strip.grabbing {\r\n\tcursor: grabbing;\r\n}\r\n\r\n.colorpicker-body .slider {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: -2px;\r\n\twidth: calc(100% + 4px);\r\n\theight: 4px;\r\n\tbox-sizing: border-box;\r\n\tborder: 1px solid rgba(255, 255, 255, 0.71);\r\n\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\r\n}\r\n\r\n.colorpicker-body .strip .overlay {\r\n\theight: 150px;\r\n\tpointer-events: none;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-hover {\r\n\tcursor: default;\r\n\tposition: absolute;\r\n\toverflow: hidden;\r\n\tz-index: 50;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tbox-sizing: initial;\r\n\tanimation: fadein 100ms linear;\r\n\tline-height: 1.5em;\r\n}\r\n\r\n.monaco-hover.hidden {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-hover .hover-contents {\r\n\tpadding: 4px 8px;\r\n}\r\n\r\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {\r\n\tmax-width: 500px;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {\r\n\t/* This is a strange rule but it avoids https://github.com/microsoft/vscode/issues/96795, just 100vw on its own caused the actual hover width to increase */\r\n\tmin-width: calc(100% + 100vw);\r\n}\r\n\r\n.monaco-hover p,\r\n.monaco-hover .code,\r\n.monaco-hover ul {\r\n\tmargin: 8px 0;\r\n}\r\n\r\n.monaco-hover code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-hover hr {\r\n\tbox-sizing: border-box;\r\n\tborder-left: 0px;\r\n\tborder-right: 0px;\r\n\tmargin-top: 4px;\r\n\tmargin-bottom: -4px;\r\n\tmargin-left: -8px;\r\n\tmargin-right: -8px;\r\n\theight: 1px;\r\n}\r\n\r\n.monaco-hover p:first-child,\r\n.monaco-hover .code:first-child,\r\n.monaco-hover ul:first-child {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-hover p:last-child,\r\n.monaco-hover .code:last-child,\r\n.monaco-hover ul:last-child {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n/* MarkupContent Layout */\r\n.monaco-hover ul {\r\n\tpadding-left: 20px;\r\n}\r\n.monaco-hover ol {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-hover li > p {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.monaco-hover li > ul {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-hover code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-hover .monaco-tokenized-source {\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar {\r\n\tfont-size: 12px;\r\n\tline-height: 22px;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions {\r\n\tdisplay: flex;\r\n\tpadding: 0px 8px;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions .action-container {\r\n\tmargin-right: 16px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {\r\n\tpadding-right: 4px;\r\n}\r\n\r\n.monaco-hover .markdown-hover .hover-contents .codicon {\r\n\tcolor: inherit;\r\n\tfont-size: inherit;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link:before {\r\n\tcontent: '(';\r\n}\r\n.monaco-hover .hover-contents a.code-link:after {\r\n\tcontent: ')';\r\n}\r\n\r\n.monaco-hover .hover-contents a.code-link {\r\n\tcolor: inherit;\r\n}\r\n.monaco-hover .hover-contents a.code-link > span {\r\n\ttext-decoration: underline;\r\n\t/** Hack to force underline to show **/\r\n\tborder-bottom: 1px solid transparent;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n/** Spans in markdown hovers need a margin-bottom to avoid looking cramped: https://github.com/microsoft/vscode/issues/101496 **/\r\n.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents) span {\r\n\tmargin-bottom: 4px;\r\n\tdisplay: inline-block;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* marker zone */\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .severity-icon {\r\n\tdisplay: inline-block;\r\n\tvertical-align: text-top;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .marker-widget {\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .marker-widget > .stale {\r\n\topacity: 0.6;\r\n\tfont-style: italic;\r\n}\r\n\r\n.monaco-editor .marker-widget .title {\r\n\tdisplay: inline-block;\r\n\tpadding-right: 5px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer {\r\n\tposition: absolute;\r\n\twhite-space: pre;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tpadding: 8px 12px 0 20px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message .details {\r\n\tpadding-left: 6px;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message .source,\r\n.monaco-editor .marker-widget .descriptioncontainer .message span.code {\r\n\topacity: 0.6;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link {\r\n\topacity: 0.6;\r\n\tcolor: inherit;\r\n}\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before {\r\n\tcontent: '(';\r\n}\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after {\r\n\tcontent: ')';\r\n}\r\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\r\n\ttext-decoration: underline;\r\n\t/** Hack to force underline to show **/\r\n\tborder-bottom: 1px solid transparent;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .marker-widget .descriptioncontainer .filename {\r\n\tcursor: pointer;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .peekview-widget .head {\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tfont-size: 13px;\r\n\tmargin-left: 20px;\r\n\tcursor: pointer;\r\n\tmin-width: 0;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\r\n\tfont-size: 0.9em;\r\n\tmargin-left: 0.5em;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .meta {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .dirname {\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .filename {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty)::before {\r\n\tcontent: '-';\r\n\tpadding: 0 0.3em;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions {\r\n\tflex: 1;\r\n\ttext-align: right;\r\n\tpadding-right: 2px;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-item {\r\n\tmargin-left: 4px;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label {\r\n\twidth: 16px;\r\n\theight: 100%;\r\n\tmargin: 0;\r\n\tline-height: inherit;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: center center;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar .action-label.codicon {\r\n\tmargin: 0;\r\n}\r\n\r\n.monaco-editor .peekview-widget > .body {\r\n\tborder-top: 1px solid;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-editor .peekview-widget .head .peekview-title .codicon {\r\n\tmargin-right: 4px;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .zone-widget {\r\n\tposition: absolute;\r\n\tz-index: 10;\r\n}\r\n\r\n\r\n.monaco-editor .zone-widget .zone-widget-container {\r\n\tborder-top-style: solid;\r\n\tborder-bottom-style: solid;\r\n\tborder-top-width: 0;\r\n\tborder-bottom-width: 0;\r\n\tposition: relative;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-action-bar .action-item.menu-entry .action-label {\r\n\tbackground-image: var(--menu-entry-icon-light);\r\n\tdisplay: inline-flex;\r\n}\r\n\r\n.vs-dark .monaco-action-bar .action-item.menu-entry .action-label,\r\n.hc-black .monaco-action-bar .action-item.menu-entry .action-label {\r\n\tbackground-image: var(--menu-entry-icon-dark);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-dropdown {\r\n\theight: 100%;\r\n\tpadding: 0;\r\n}\r\n\r\n.monaco-dropdown > .dropdown-label {\r\n\tcursor: pointer;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-dropdown > .dropdown-label > .action-label.disabled {\r\n\tcursor: default;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .goto-definition-link {\r\n\ttext-decoration: underline;\r\n\tcursor: pointer;\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* -- zone widget */\r\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\r\n\tborder-top-width: 1px;\r\n\tborder-bottom-width: 1px;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .inline {\r\n\tdisplay: inline-block;\r\n\tvertical-align: top;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .messages {\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\ttext-align: center;\r\n\tpadding: 3em 0;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree {\r\n\tline-height: 23px;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference {\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\r\n\tdisplay: inline-flex;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file {\r\n\tcolor: inherit !important;\r\n}\r\n\r\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\r\n\tmargin-right: 12px;\r\n\tmargin-left: auto;\r\n}\r\n\r\n/* High Contrast Theming */\r\n\r\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file {\r\n\tfont-weight: bold;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-split-view2 {\r\n\tposition: relative;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2 > .sash-container {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tpointer-events: none;\r\n}\r\n\r\n.monaco-split-view2 > .sash-container > .monaco-sash {\r\n\tpointer-events: initial;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\twhite-space: nowrap;\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view {\r\n\twhite-space: initial;\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view:not(.visible) {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-split-view2.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-split-view2.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-split-view2.separator-border > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\tcontent: ' ';\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tz-index: 5;\r\n\tpointer-events: none;\r\n\tbackground-color: var(--separator-border);\r\n}\r\n\r\n.monaco-split-view2.separator-border.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\theight: 100%;\r\n\twidth: 1px;\r\n}\r\n\r\n.monaco-split-view2.separator-border.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\r\n\theight: 1px;\r\n\twidth: 100%;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor.vs .dnd-target {\r\n\tborder-right: 2px dotted black;\r\n\tcolor: white; /* opposite of black */\r\n}\r\n.monaco-editor.vs-dark .dnd-target {\r\n\tborder-right: 2px dotted #AEAFAD;\r\n\tcolor: #51504f; /* opposite of #AEAFAD */\r\n}\r\n.monaco-editor.hc-black .dnd-target {\r\n\tborder-right: 2px dotted #fff;\r\n\tcolor: #000; /* opposite of #fff */\r\n}\r\n\r\n.monaco-editor.mouse-default .view-lines,\r\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\r\n.monaco-editor.hc-black.mac.mouse-default .view-lines {\r\n\tcursor: default;\r\n}\r\n.monaco-editor.mouse-copy .view-lines,\r\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\r\n.monaco-editor.hc-black.mac.mouse-copy .view-lines {\r\n\tcursor: copy;\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-custom-checkbox {\r\n\tmargin-left: 2px;\r\n\tfloat: left;\r\n\tcursor: pointer;\r\n\toverflow: hidden;\r\n\topacity: 0.7;\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tborder: 1px solid transparent;\r\n\tpadding: 1px;\r\n\tbox-sizing:\tborder-box;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n.monaco-custom-checkbox:hover,\r\n.monaco-custom-checkbox.checked {\r\n\topacity: 1;\r\n}\r\n\r\n.hc-black .monaco-custom-checkbox {\r\n\tbackground: none;\r\n}\r\n\r\n.hc-black .monaco-custom-checkbox:hover {\r\n\tbackground: none;\r\n}\r\n\r\n.monaco-custom-checkbox.monaco-simple-checkbox {\r\n\theight: 18px;\r\n\twidth: 18px;\r\n\tborder: 1px solid transparent;\r\n\tborder-radius: 3px;\r\n\tmargin-right: 9px;\r\n\tmargin-left: 0px;\r\n\tpadding: 0px;\r\n\topacity: 1;\r\n\tbackground-size: 16px !important;\r\n}\r\n\r\n/* hide check when unchecked */\r\n.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked)::before {\r\n\tvisibility: hidden;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Find widget */\r\n.monaco-editor .find-widget {\r\n\tposition: absolute;\r\n\tz-index: 50;\r\n\theight: 33px;\r\n\toverflow: hidden;\r\n\tline-height: 19px;\r\n\ttransition: transform 200ms linear;\r\n\tpadding: 0 4px;\r\n\tbox-sizing: border-box;\r\n\ttransform: translateY(calc(-100% - 10px)); /* shadow (10px) */\r\n}\r\n\r\n.monaco-editor .find-widget textarea {\r\n\tmargin: 0px;\r\n}\r\n\r\n.monaco-editor .find-widget.hiddenEditor {\r\n\tdisplay: none;\r\n}\r\n\r\n/* Find widget when replace is toggled on */\r\n.monaco-editor .find-widget.replaceToggled > .replace-part {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .find-widget.visible {\r\n\ttransform: translateY(0);\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\r\n\toutline: 1px solid -webkit-focus-ring-color;\r\n\toutline-offset: -1px;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-inputbox .input {\r\n\tbackground-color: transparent;\r\n\tmin-height: 0;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .input {\r\n\tfont-size: 13px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part,\r\n.monaco-editor .find-widget > .replace-part {\r\n\tmargin: 4px 0 0 17px;\r\n\tfont-size: 12px;\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\r\n\tmin-height: 25px;\r\n}\r\n\r\n\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\r\n\tpadding-right: 22px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .input,\r\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .mirror,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .input,\r\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\r\n\tpadding-top: 2px;\r\n\tpadding-bottom: 2px;\r\n}\r\n\r\n.monaco-editor .find-widget > .find-part .find-actions {\r\n\theight: 25px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part .replace-actions {\r\n\theight: 25px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput {\r\n\tvertical-align: middle;\r\n\tdisplay: flex;\r\n\tflex:1;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element {\r\n\t/* Make sure textarea inherits the width correctly */\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical {\r\n\t/* Hide vertical scrollbar */\r\n\topacity: 0;\r\n}\r\n\r\n.monaco-editor .find-widget .matchesCount {\r\n\tdisplay: flex;\r\n\tflex: initial;\r\n\tmargin: 0 0 0 3px;\r\n\tpadding: 2px 0 0 2px;\r\n\theight: 25px;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\ttext-align: center;\r\n\tline-height: 23px;\r\n}\r\n\r\n.monaco-editor .find-widget .button {\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tdisplay: flex;\r\n\tflex: initial;\r\n\tmargin-left: 3px;\r\n\tbackground-position: center center;\r\n\tbackground-repeat: no-repeat;\r\n\tcursor: pointer;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.monaco-editor .find-widget .button.left {\r\n\tmargin-left: 0;\r\n\tmargin-right: 3px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.wide {\r\n\twidth: auto;\r\n\tpadding: 1px 6px;\r\n\ttop: -1px;\r\n}\r\n\r\n.monaco-editor .find-widget .button.toggle {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\twidth: 18px;\r\n\theight: 100%;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .find-widget .button.toggle.disabled {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .find-widget .disabled {\r\n\topacity: 0.3;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part > .monaco-findInput {\r\n\tposition: relative;\r\n\tdisplay: flex;\r\n\tvertical-align: middle;\r\n\tflex: auto;\r\n\tflex-grow: 0;\r\n\tflex-shrink: 0;\r\n}\r\n\r\n.monaco-editor .find-widget > .replace-part > .monaco-findInput > .controls {\r\n\tposition: absolute;\r\n\ttop: 3px;\r\n\tright: 2px;\r\n}\r\n\r\n/* REDUCED */\r\n.monaco-editor .find-widget.reduced-find-widget .matchesCount {\r\n\tdisplay:none;\r\n}\r\n\r\n/* NARROW (SMALLER THAN REDUCED) */\r\n.monaco-editor .find-widget.narrow-find-widget {\r\n\tmax-width: 257px !important;\r\n}\r\n\r\n/* COLLAPSED (SMALLER THAN NARROW) */\r\n.monaco-editor .find-widget.collapsed-find-widget {\r\n\tmax-width: 170px !important;\r\n}\r\n\r\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\r\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\r\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\r\n\tdisplay:none;\r\n}\r\n\r\n.monaco-editor .findMatch {\r\n\tanimation-duration: 0;\r\n\tanimation-name: inherit !important;\r\n}\r\n\r\n.monaco-editor .find-widget .monaco-sash {\r\n\tleft: 0 !important;\r\n}\r\n\r\n.monaco-editor.hc-black .find-widget .button:before {\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\tleft: 2px;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* ---------- Find input ---------- */\r\n\r\n.monaco-findInput {\r\n\tposition: relative;\r\n}\r\n\r\n.monaco-findInput .monaco-inputbox {\r\n\tfont-size: 13px;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-findInput > .controls {\r\n\tposition: absolute;\r\n\ttop: 3px;\r\n\tright: 2px;\r\n}\r\n\r\n.vs .monaco-findInput.disabled {\r\n\tbackground-color: #E1E1E1;\r\n}\r\n\r\n/* Theming */\r\n.vs-dark .monaco-findInput.disabled {\r\n\tbackground-color: #333;\r\n}\r\n\r\n/* Highlighting */\r\n.monaco-findInput.highlight-0 .controls {\r\n\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\r\n}\r\n.monaco-findInput.highlight-1 .controls {\r\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\r\n}\r\n.hc-black .monaco-findInput.highlight-0 .controls,\r\n.vs-dark .monaco-findInput.highlight-0 .controls {\r\n\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\r\n}\r\n.hc-black .monaco-findInput.highlight-1 .controls,\r\n.vs-dark .monaco-findInput.highlight-1 .controls {\r\n\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\r\n}\r\n\r\n@keyframes monaco-findInput-highlight-0 {\r\n\t0% { background: rgba(253, 255, 0, 0.8); }\r\n\t100% { background: transparent; }\r\n}\r\n@keyframes monaco-findInput-highlight-1 {\r\n\t0% { background: rgba(253, 255, 0, 0.8); }\r\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\r\n\t99% { background: transparent; }\r\n}\r\n\r\n@keyframes monaco-findInput-highlight-dark-0 {\r\n\t0% { background: rgba(255, 255, 255, 0.44); }\r\n\t100% { background: transparent; }\r\n}\r\n@keyframes monaco-findInput-highlight-dark-1 {\r\n\t0% { background: rgba(255, 255, 255, 0.44); }\r\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\r\n\t99% { background: transparent; }\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .margin-view-overlays .codicon-folding-expanded,\r\n.monaco-editor .margin-view-overlays .codicon-folding-collapsed {\r\n\tcursor: pointer;\r\n\topacity: 0;\r\n\ttransition: opacity 0.5s;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tfont-size: 140%;\r\n\tmargin-left: 2px;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays:hover .codicon,\r\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,\r\n.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons {\r\n\topacity: 1;\r\n}\r\n\r\n.monaco-editor .inline-folded:after {\r\n\tcolor: grey;\r\n\tmargin: 0.1em 0.2em 0 0.2em;\r\n\tcontent: \"⋯\";\r\n\tdisplay: inline;\r\n\tline-height: 1em;\r\n\tcursor: pointer;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n.monaco-editor .detected-link,\r\n.monaco-editor .detected-link-active {\r\n\ttext-decoration: underline;\r\n\ttext-underline-position: under;\r\n}\r\n\r\n.monaco-editor .detected-link-active {\r\n\tcursor: pointer;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .parameter-hints-widget {\r\n\tz-index: 10;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tline-height: 1.5em;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget > .phwrapper {\r\n\tmax-width: 440px;\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple {\r\n\tmin-height: 3.3em;\r\n\tpadding: 0;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.visible {\r\n\ttransition: left .05s ease-in-out;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget p,\r\n.monaco-editor .parameter-hints-widget ul {\r\n\tmargin: 8px 0;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\r\n.monaco-editor .parameter-hints-widget .body {\r\n\tdisplay: flex;\r\n\tflex: 1;\r\n\tflex-direction: column;\r\n\tmin-height: 100%;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .signature {\r\n\tpadding: 4px 5px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs {\r\n\tpadding: 0 10px 0 5px;\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs.empty {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\r\n\twhite-space: initial;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .markdown-docs code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs .code {\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .docs code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .controls {\r\n\tdisplay: none;\r\n\tflex-direction: column;\r\n\talign-items: center;\r\n\tmin-width: 22px;\r\n\tjustify-content: flex-end;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple .controls {\r\n\tdisplay: flex;\r\n\tpadding: 0 2px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget.multiple .button {\r\n\twidth: 16px;\r\n\theight: 16px;\r\n\tbackground-repeat: no-repeat;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .button.previous {\r\n\tbottom: 24px;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .overloads {\r\n\ttext-align: center;\r\n\theight: 12px;\r\n\tline-height: 12px;\r\n\topacity: 0.5;\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\r\n\tfont-weight: bold;\r\n\ttext-decoration: underline;\r\n}\r\n\r\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\r\n\tfont-weight: bold;\r\n\tmargin-right: 0.5em;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .rename-box {\r\n\tz-index: 100;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .rename-box.preview {\r\n\tpadding: 3px 3px 0 3px;\r\n}\r\n\r\n.monaco-editor .rename-box .rename-input {\r\n\tpadding: 3px;\r\n\twidth: calc(100% - 6px);\r\n}\r\n\r\n.monaco-editor .rename-box .rename-label {\r\n\tdisplay: none;\r\n\topacity: .8;\r\n}\r\n\r\n.monaco-editor .rename-box.preview .rename-label {\r\n\tdisplay: inherit;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .snippet-placeholder {\r\n\tmin-width: 2px;\r\n\toutline-style: solid;\r\n\toutline-width: 1px;\r\n}\r\n\r\n.monaco-editor .finish-snippet-placeholder {\r\n\toutline-style: solid;\r\n\toutline-width: 1px;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Suggest widget*/\r\n\r\n.monaco-editor .suggest-widget {\r\n\twidth: 430px;\r\n\tz-index: 40;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n\r\n.monaco-editor .suggest-widget.message {\r\n\tflex-direction: row;\r\n\talign-items: center;\r\n}\r\n\r\n.monaco-editor .suggest-widget,\r\n.monaco-editor .suggest-details {\r\n\tflex: 0 1 auto;\r\n\twidth: 100%;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n}\r\n\r\n.monaco-editor.hc-black .suggest-widget,\r\n.monaco-editor.hc-black .suggest-details {\r\n\tborder-width: 2px;\r\n}\r\n\r\n/* Styles for status bar part */\r\n\r\n\r\n.monaco-editor .suggest-widget .suggest-status-bar {\r\n\tbox-sizing: border-box;\r\n\tdisplay: none;\r\n\tflex-flow: row nowrap;\r\n\tjustify-content: space-between;\r\n\twidth: 100%;\r\n\tfont-size: 80%;\r\n\tpadding: 0 4px 0 4px;\r\n\tborder-top: 1px solid transparent;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .suggest-widget .suggest-status-bar .left {\r\n\tpadding-right: 8px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label {\r\n\topacity: 0.5;\r\n\tcolor: inherit;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label {\r\n\tmargin-right: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label::after {\r\n\tcontent: ', ';\r\n\tmargin-right: 0.3em;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\r\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\r\n\twidth: 100%;\r\n}\r\n\r\n/* Styles for Message element for when widget is loading or is empty */\r\n\r\n.monaco-editor .suggest-widget>.message {\r\n\tpadding-left: 22px;\r\n}\r\n\r\n/** Styles for the list element **/\r\n\r\n.monaco-editor .suggest-widget>.tree {\r\n\theight: 100%;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list {\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n}\r\n\r\n/** Styles for each row in the list element **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\r\n\tdisplay: flex;\r\n\t-mox-box-sizing: border-box;\r\n\tbox-sizing: border-box;\r\n\tpadding-right: 10px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: 2px 2px;\r\n\twhite-space: nowrap;\r\n\tcursor: pointer;\r\n\ttouch-action: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents {\r\n\tflex: 1;\r\n\theight: 100%;\r\n\toverflow: hidden;\r\n\tpadding-left: 2px;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main {\r\n\tdisplay: flex;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: pre;\r\n\tjustify-content: space-between;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left, .monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\r\n\tdisplay: flex;\r\n}\r\n\r\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\r\n\tfont-weight: bold;\r\n}\r\n\r\n/** ReadMore Icon styles **/\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore::before {\r\n\tcolor: inherit;\r\n\topacity: 1;\r\n\tfont-size: 14px;\r\n\tcursor: pointer;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close {\r\n\tposition: absolute;\r\n\ttop: 6px;\r\n\tright: 2px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover {\r\n\topacity: 1;\r\n}\r\n\r\n/** signature, qualifier, type/details opacity **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label,\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\r\n\topacity: 0.7;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label {\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label {\r\n\tmargin-left: 4px;\r\n\topacity: 0.4;\r\n\tfont-size: 90%;\r\n\ttext-overflow: ellipsis;\r\n\toverflow: hidden;\r\n\talign-self: center;\r\n}\r\n\r\n/** Type Info and icon next to the label in the focused completion item **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\r\n\tmargin-left: 1.1em;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Details: if using CompletionItem#details, show on focus **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Details: if using CompletionItemLabel#details, always show **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label {\r\n\tdisplay: inline;\r\n}\r\n\r\n/** Ellipsis on hover **/\r\n\r\n.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label {\r\n\twidth: calc(100% - 26px);\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left {\r\n\tflex-shrink: 1;\r\n\tflex-grow: 1;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label {\r\n\tflex-shrink: 0;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label {\r\n\tmax-width: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label {\r\n\tflex-shrink: 1;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right {\r\n\toverflow: hidden;\r\n\tflex-shrink: 4;\r\n\tmax-width: 70%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\tright: 10px;\r\n\twidth: 18px;\r\n\theight: 18px;\r\n\tvisibility: hidden;\r\n}\r\n\r\n/** Do NOT display ReadMore when docs is side/below **/\r\n\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore, .monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\r\n\tdisplay: none !important;\r\n}\r\n\r\n/** Do NOT display ReadMore when using plain CompletionItemLabel (details/documentation might not be resolved) **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n/** Focused item can show ReadMore, but can't when docs is side/below **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,\r\n.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover>.contents>.main>.right>.readMore {\r\n\tvisibility: visible;\r\n}\r\n\r\n/** Styles for each row in the list **/\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated {\r\n\topacity: 0.66;\r\n\ttext-decoration: unset;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label::before {\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\r\n\tdisplay: block;\r\n\theight: 16px;\r\n\twidth: 16px;\r\n\tmargin-left: 2px;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-size: 80%;\r\n\tbackground-position: center;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tmargin-right: 4px;\r\n}\r\n\r\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon, .monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon::before {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\r\n\tmargin: 0 0 0 0.3em;\r\n\tborder: 0.1em solid #000;\r\n\twidth: 0.7em;\r\n\theight: 0.7em;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n/** Styles for the docs of the completion item in focus **/\r\n\r\n.monaco-editor .suggest-details-container {\r\n\tz-index: 41;\r\n}\r\n\r\n.monaco-editor .suggest-details {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tcursor: default;\r\n}\r\n\r\n.monaco-editor .suggest-details.no-docs {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element {\r\n\tflex: 1;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body {\r\n\tbox-sizing: border-box;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type {\r\n\tflex: 2;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\topacity: 0.7;\r\n\twhite-space: pre;\r\n\tmargin: 0 24px 0 0;\r\n\tpadding: 4px 0 12px 5px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap {\r\n\twhite-space: normal;\r\n\tword-break: break-all;\r\n}\r\n\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs {\r\n\tmargin: 0;\r\n\tpadding: 4px 5px;\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\n.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs {\r\n\tmargin-right: 24px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs {\r\n\tpadding: 0;\r\n\twhite-space: initial;\r\n\tmin-height: calc(1rem + 8px);\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty) {\r\n\tpadding: 4px 5px;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child {\r\n\tmargin-top: 0;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child {\r\n\tmargin-bottom: 0;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code {\r\n\twhite-space: pre-wrap;\r\n\tword-wrap: break-word;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon {\r\n\tvertical-align: sub;\r\n}\r\n\r\n.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty {\r\n\tdisplay: none;\r\n}\r\n\r\n.monaco-editor .suggest-details code {\r\n\tborder-radius: 3px;\r\n\tpadding: 0 0.4em;\r\n}\r\n\r\n.monaco-editor .suggest-details ul {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-editor .suggest-details ol {\r\n\tpadding-left: 20px;\r\n}\r\n\r\n.monaco-editor .suggest-details p code {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .accessibilityHelpWidget {\r\n\tpadding: 10px;\r\n\tvertical-align: middle;\r\n\toverflow: scroll;\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .iPadShowKeyboard {\r\n\twidth: 58px;\r\n\tmin-width: 0;\r\n\theight: 36px;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\tresize: none;\r\n\toverflow: hidden;\r\n\tbackground: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzY0IDQuMDEwNDJINC4wMDc3OUw0LjAwNzc5IDMyLjAyODZINDguMDM2NFY0LjAxMDQyWk00LjAwNzc5IDAuMDA3ODEyNUMxLjc5NzIxIDAuMDA3ODEyNSAwLjAwNTE4Nzk5IDEuNzk5ODQgMC4wMDUxODc5OSA0LjAxMDQyVjMyLjAyODZDMC4wMDUxODc5OSAzNC4yMzkyIDEuNzk3MjEgMzYuMDMxMiA0LjAwNzc5IDM2LjAzMTJINDguMDM2NEM1MC4yNDcgMzYuMDMxMiA1Mi4wMzkgMzQuMjM5MiA1Mi4wMzkgMzIuMDI4NlY0LjAxMDQyQzUyLjAzOSAxLjc5OTg0IDUwLjI0NyAwLjAwNzgxMjUgNDguMDM2NCAwLjAwNzgxMjVINC4wMDc3OVpNOC4wMTA0MiA4LjAxMzAySDEyLjAxM1YxMi4wMTU2SDguMDEwNDJWOC4wMTMwMlpNMjAuMDE4MiA4LjAxMzAySDE2LjAxNTZWMTIuMDE1NkgyMC4wMTgyVjguMDEzMDJaTTI0LjAyMDggOC4wMTMwMkgyOC4wMjM0VjEyLjAxNTZIMjQuMDIwOFY4LjAxMzAyWk0zNi4wMjg2IDguMDEzMDJIMzIuMDI2VjEyLjAxNTZIMzYuMDI4NlY4LjAxMzAyWk00MC4wMzEyIDguMDEzMDJINDQuMDMzOVYxMi4wMTU2SDQwLjAzMTJWOC4wMTMwMlpNMTYuMDE1NiAxNi4wMTgySDguMDEwNDJWMjAuMDIwOEgxNi4wMTU2VjE2LjAxODJaTTIwLjAxODIgMTYuMDE4MkgyNC4wMjA4VjIwLjAyMDhIMjAuMDE4MlYxNi4wMTgyWk0zMi4wMjYgMTYuMDE4MkgyOC4wMjM0VjIwLjAyMDhIMzIuMDI2VjE2LjAxODJaTTQ0LjAzMzkgMTYuMDE4MlYyMC4wMjA4SDM2LjAyODZWMTYuMDE4Mkg0NC4wMzM5Wk0xMi4wMTMgMjQuMDIzNEg4LjAxMDQyVjI4LjAyNkgxMi4wMTNWMjQuMDIzNFpNMTYuMDE1NiAyNC4wMjM0SDM2LjAyODZWMjguMDI2SDE2LjAxNTZWMjQuMDIzNFpNNDQuMDMzOSAyNC4wMjM0SDQwLjAzMTJWMjguMDI2SDQ0LjAzMzlWMjQuMDIzNFoiIGZpbGw9IiM0MjQyNDIiLz4NCjwvZz4NCjxkZWZzPg0KPGNsaXBQYXRoIGlkPSJjbGlwMCI+DQo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+DQo8L2NsaXBQYXRoPg0KPC9kZWZzPg0KPC9zdmc+DQo=\") center center no-repeat;\r\n\tborder: 4px solid #F6F6F6;\r\n\tborder-radius: 4px;\r\n}\r\n\r\n.monaco-editor.vs-dark .iPadShowKeyboard {\r\n\tbackground: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OC4wMzY0IDQuMDEwNDJINC4wMDc3OUw0LjAwNzc5IDMyLjAyODZINDguMDM2NFY0LjAxMDQyWk00LjAwNzc5IDAuMDA3ODEyNUMxLjc5NzIxIDAuMDA3ODEyNSAwLjAwNTE4Nzk5IDEuNzk5ODQgMC4wMDUxODc5OSA0LjAxMDQyVjMyLjAyODZDMC4wMDUxODc5OSAzNC4yMzkyIDEuNzk3MjEgMzYuMDMxMiA0LjAwNzc5IDM2LjAzMTJINDguMDM2NEM1MC4yNDcgMzYuMDMxMiA1Mi4wMzkgMzQuMjM5MiA1Mi4wMzkgMzIuMDI4NlY0LjAxMDQyQzUyLjAzOSAxLjc5OTg0IDUwLjI0NyAwLjAwNzgxMjUgNDguMDM2NCAwLjAwNzgxMjVINC4wMDc3OVpNOC4wMTA0MiA4LjAxMzAySDEyLjAxM1YxMi4wMTU2SDguMDEwNDJWOC4wMTMwMlpNMjAuMDE4MiA4LjAxMzAySDE2LjAxNTZWMTIuMDE1NkgyMC4wMTgyVjguMDEzMDJaTTI0LjAyMDggOC4wMTMwMkgyOC4wMjM0VjEyLjAxNTZIMjQuMDIwOFY4LjAxMzAyWk0zNi4wMjg2IDguMDEzMDJIMzIuMDI2VjEyLjAxNTZIMzYuMDI4NlY4LjAxMzAyWk00MC4wMzEyIDguMDEzMDJINDQuMDMzOVYxMi4wMTU2SDQwLjAzMTJWOC4wMTMwMlpNMTYuMDE1NiAxNi4wMTgySDguMDEwNDJWMjAuMDIwOEgxNi4wMTU2VjE2LjAxODJaTTIwLjAxODIgMTYuMDE4MkgyNC4wMjA4VjIwLjAyMDhIMjAuMDE4MlYxNi4wMTgyWk0zMi4wMjYgMTYuMDE4MkgyOC4wMjM0VjIwLjAyMDhIMzIuMDI2VjE2LjAxODJaTTQ0LjAzMzkgMTYuMDE4MlYyMC4wMjA4SDM2LjAyODZWMTYuMDE4Mkg0NC4wMzM5Wk0xMi4wMTMgMjQuMDIzNEg4LjAxMDQyVjI4LjAyNkgxMi4wMTNWMjQuMDIzNFpNMTYuMDE1NiAyNC4wMjM0SDM2LjAyODZWMjguMDI2SDE2LjAxNTZWMjQuMDIzNFpNNDQuMDMzOSAyNC4wMjM0SDQwLjAzMTJWMjguMDI2SDQ0LjAzMzlWMjQuMDIzNFoiIGZpbGw9IiNDNUM1QzUiLz4NCjwvZz4NCjxkZWZzPg0KPGNsaXBQYXRoIGlkPSJjbGlwMCI+DQo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+DQo8L2NsaXBQYXRoPg0KPC9kZWZzPg0KPC9zdmc+DQo=\") center center no-repeat;\r\n\tborder: 4px solid #252526;\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .tokens-inspect-widget {\r\n\tz-index: 50;\r\n\tuser-select: text;\r\n\t-webkit-user-select: text;\r\n\t-ms-user-select: text;\r\n\tpadding: 10px;\r\n}\r\n\r\n.tokens-inspect-separator {\r\n\theight: 1px;\r\n\tborder: 0;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token-length {\r\n\tfont-weight: normal;\r\n\tfont-size: 60%;\r\n\tfloat: right;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\r\n\tfont-family: var(--monaco-monospace-font);\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-editor .tokens-inspect-widget .tm-token-type {\r\n\tfont-family: var(--monaco-monospace-font);\r\n}\r\n",":root{--sn-stylekit-base-font-size: 13px;--sn-stylekit-font-size-p: 1.0rem;--sn-stylekit-font-size-editor: 1.21rem;--sn-stylekit-font-size-h6: 0.8rem;--sn-stylekit-font-size-h5: 0.9rem;--sn-stylekit-font-size-h4: 1.0rem;--sn-stylekit-font-size-h3: 1.1rem;--sn-stylekit-font-size-h2: 1.2rem;--sn-stylekit-font-size-h1: 1.3rem;--sn-stylekit-neutral-color: #989898;--sn-stylekit-neutral-contrast-color: white;--sn-stylekit-info-color: #086DD6;--sn-stylekit-info-contrast-color: white;--sn-stylekit-success-color: #2B9612;--sn-stylekit-success-contrast-color: white;--sn-stylekit-warning-color: #f6a200;--sn-stylekit-warning-contrast-color: white;--sn-stylekit-danger-color: #F80324;--sn-stylekit-danger-contrast-color: white;--sn-stylekit-shadow-color: #C8C8C8;--sn-stylekit-background-color: white;--sn-stylekit-border-color: #e3e3e3;--sn-stylekit-foreground-color: black;--sn-stylekit-contrast-background-color: #F6F6F6;--sn-stylekit-contrast-foreground-color: #2e2e2e;--sn-stylekit-contrast-border-color: #e3e3e3;--sn-stylekit-secondary-background-color: #F6F6F6;--sn-stylekit-secondary-foreground-color: #2e2e2e;--sn-stylekit-secondary-border-color: #e3e3e3;--sn-stylekit-secondary-contrast-background-color: #e3e3e3;--sn-stylekit-secondary-contrast-foreground-color: #2e2e2e;--sn-styleki--secondary-contrast-border-color: #a2a2a2;--sn-stylekit-editor-background-color: var(--sn-stylekit-background-color);--sn-stylekit-editor-foreground-color: var(--sn-stylekit-foreground-color);--sn-stylekit-paragraph-text-color: #454545;--sn-stylekit-input-placeholder-color: rgb(168, 168, 168);--sn-stylekit-input-border-color: #e3e3e3;--sn-stylekit-scrollbar-thumb-color: #dfdfdf;--sn-stylekit-scrollbar-track-border-color: #E7E7E7;--sn-stylekit-general-border-radius: 2px;--sn-stylekit-simplified-chinese-font: \"Microsoft Yahei\", \"微软雅黑体\";--sn-stylekit-monospace-font: \"Ubuntu Mono\", courier, monospace;--sn-stylekit-sans-serif-font: -apple-system, BlinkMacSystemFont, \"Segoe UI\",\n \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\",\n \"Helvetica Neue\", var(--sn-stylekit-simplified-chinese-font), sans-serif}.sn-component{font-family:var(--sn-stylekit-sans-serif-font);-webkit-font-smoothing:antialiased;color:var(--sn-stylekit-foreground-color)}.sn-component .sk-panel{box-shadow:0px 2px 5px var(--sn-stylekit-shadow-color);background-color:var(--sn-stylekit-background-color);border:1px solid var(--sn-stylekit-border-color);border-radius:var(--sn-stylekit-general-border-radius);display:flex;flex-direction:column;overflow:auto;flex-grow:1}.sn-component .sk-panel a:hover{text-decoration:underline}.sn-component .sk-panel.static{box-shadow:none;border:none;border-radius:0}.sn-component .sk-panel .sk-panel-header{flex-shrink:0;display:flex;justify-content:space-between;padding:1.1rem 2rem;border-bottom:1px solid var(--sn-stylekit-contrast-border-color);background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-contrast-foreground-color);align-items:center}.sn-component .sk-panel .sk-panel-header .sk-panel-header-title{font-size:var(--sn-stylekit-font-size-h1);font-weight:500}.sn-component .sk-panel .sk-panel-header .close-button{font-weight:bold}.sn-component .sk-panel .sk-footer,.sn-component .sk-panel .sk-panel-footer{padding:1rem 2rem;border-top:1px solid var(--sn-stylekit-border-color);box-sizing:border-box}.sn-component .sk-panel .sk-footer.extra-padding,.sn-component .sk-panel .sk-panel-footer.extra-padding{padding:2rem 2rem}.sn-component .sk-panel .sk-footer .left,.sn-component .sk-panel .sk-panel-footer .left{text-align:left;display:block}.sn-component .sk-panel .sk-footer .right,.sn-component .sk-panel .sk-panel-footer .right{text-align:right;display:block}.sn-component .sk-panel .sk-panel-content{padding:1.6rem 2rem;padding-bottom:0;flex-grow:1;overflow:scroll;height:100%;overflow-y:auto !important;overflow-x:auto !important}.sn-component .sk-panel .sk-panel-content .sk-p,.sn-component .sk-panel .sk-panel-content .sk-li{color:var(--sn-stylekit-paragraph-text-color);line-height:1.3}.sn-component .sk-panel-section{padding-bottom:1.6rem;display:flex;flex-direction:column}.sn-component .sk-panel-section.sk-panel-hero{text-align:center}.sn-component .sk-panel-section .sk-p:last-child{margin-bottom:0}.sn-component .sk-panel-section:not(:last-child){margin-bottom:1.5rem;border-bottom:1px solid var(--sn-stylekit-border-color)}.sn-component .sk-panel-section:not(:last-child).no-border{border-bottom:none}.sn-component .sk-panel-section:last-child{margin-bottom:0.5rem}.sn-component .sk-panel-section.no-bottom-pad{padding-bottom:0;margin-bottom:0}.sn-component .sk-panel-section .sk-panel-section-title{margin-bottom:0.5rem;font-weight:bold;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-panel-section .sk-panel-section-outer-title{border-bottom:1px solid var(--sn-stylekit-border-color);padding-bottom:0.9rem;margin-top:2.1rem;margin-bottom:15px;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-panel-section .sk-panel-section-subtitle{font-size:var(--sn-stylekit-font-size-h5);margin-bottom:2px}.sn-component .sk-panel-section .sk-panel-section-subtitle.subtle{font-weight:normal;opacity:0.6}.sn-component .sk-panel-section .text-content .sk-p{margin-bottom:1rem}.sn-component .sk-panel-section .text-content p:first-child{margin-top:0.3rem}.sn-component .sk-panel-row{display:flex;justify-content:space-between;align-items:center;padding-top:0.4rem}.sn-component .sk-panel-row.centered{justify-content:center}.sn-component .sk-panel-row.justify-right{justify-content:flex-end}.sn-component .sk-panel-row.justify-left{justify-content:flex-start}.sn-component .sk-panel-row.align-top{align-items:flex-start}.sn-component .sk-panel-row .sk-panel-column.stretch{width:100%}.sn-component .sk-panel-row.default-padding,.sn-component .sk-panel-row:not(:last-child){padding-bottom:0.4rem}.sn-component .sk-panel-row.condensed{padding-top:0.2rem;padding-bottom:0.2rem}.sn-component .sk-panel-row .sk-p{margin:0;padding:0}.sn-component .vertical-rule{background-color:var(--sn-stylekit-border-color);height:1.5rem;width:1px}.sn-component .sk-panel-form{width:100%}.sn-component .sk-panel-form.half{width:50%}.sn-component .sk-panel-form .form-submit{margin-top:0.15rem}.sn-component .right-aligned{justify-content:flex-end;text-align:right}.sn-component .sk-menu-panel{background-color:var(--sn-stylekit-background-color);border:1px solid var(--sn-stylekit-contrast-border-color);border-radius:var(--sn-stylekit-general-border-radius);overflow:scroll;user-select:none;overflow-y:auto !important;overflow-x:auto !important}.sn-component .sk-menu-panel .sk-menu-panel-header{padding:0.8rem 1rem;border-bottom:1px solid var(--sn-stylekit-contrast-border-color);background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-contrast-foreground-color);display:flex;justify-content:space-between;align-items:center}.sn-component .sk-menu-panel .sk-menu-panel-header-title{font-weight:bold;font-size:var(--sn-stylekit-font-size-h4)}.sn-component .sk-menu-panel .sk-menu-panel-header-subtitle{margin-top:0.2rem;opacity:0.6}.sn-component .sk-menu-panel .sk-menu-panel-row{padding:1rem 1rem;cursor:pointer;display:flex;flex-direction:row;justify-content:space-between;border-bottom:1px solid var(--sn-stylekit-border-color)}.sn-component .sk-menu-panel .sk-menu-panel-row:hover{background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-contrast-foreground-color);border-color:var(--sn-stylekit-contrast-border-color)}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column{display:flex;justify-content:center;flex-direction:column}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column:not(:first-child){padding-left:1.0rem;padding-right:0.15rem}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column.stretch{width:100%}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-subrows{margin-top:1rem}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-row,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-subrow{border:1px solid var(--sn-stylekit-contrast-border-color);margin-top:-1px}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-row:hover,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-subrow:hover{background-color:var(--sn-stylekit-background-color)}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .left{display:flex}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-button .sk-label,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-box .sk-label,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-button .sk-panel-section .sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-menu-panel .sk-menu-panel-row .sk-button .sk-panel-section-subtitle,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-box .sk-panel-section .sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-menu-panel .sk-menu-panel-row .sk-box .sk-panel-section-subtitle{font-size:var(--sn-stylekit-font-size-h6);font-weight:normal}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-label,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-panel-section .sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-menu-panel .sk-menu-panel-row .sk-panel-section-subtitle{font-size:var(--sn-stylekit-font-size-p);font-weight:bold}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-sublabel{font-size:var(--sn-stylekit-font-size-h5);margin-top:0.2rem;opacity:0.6}.sn-component .red{color:var(--sn-stylekit-danger-color)}.sn-component .tinted{color:var(--sn-stylekit-info-color)}.sn-component .selectable{user-select:text !important;-ms-user-select:text !important;-moz-user-select:text !important;-webkit-user-select:text !important}.sn-component .sk-h1,.sn-component .sk-h2,.sn-component .sk-h3,.sn-component .sk-h4,.sn-component .sk-h5{margin:0;padding:0;font-weight:normal}.sn-component .sk-h1{font-weight:500;font-size:var(--sn-stylekit-font-size-h1);line-height:1.9rem}.sn-component .sk-h2{font-size:var(--sn-stylekit-font-size-h2);line-height:1.8rem}.sn-component .sk-h3{font-size:var(--sn-stylekit-font-size-h3);line-height:1.7rem}.sn-component .sk-h4{font-size:var(--sn-stylekit-font-size-p);line-height:1.4rem}.sn-component .sk-h5{font-size:var(--sn-stylekit-font-size-h5)}.sn-component .sk-bold{font-weight:bold}.sn-component .sk-font-small{font-size:var(--sn-stylekit-font-size-h5)}.sn-component .sk-font-normal{font-size:var(--sn-stylekit-font-size-p)}.sn-component .sk-font-large{font-size:var(--sn-stylekit-font-size-h3)}.sn-component a.sk-a{cursor:pointer;user-select:none}.sn-component a.sk-a.disabled{color:var(--sn-stylekit-neutral-color);opacity:0.6}.sn-component a.sk-a.boxed{border-radius:var(--sn-stylekit-general-border-radius);padding:0.3rem 0.4rem}.sn-component a.sk-a.boxed:hover{text-decoration:none}.sn-component a.sk-a.boxed.neutral{background-color:var(--sn-stylekit-neutral-color);color:var(--sn-stylekit-neutral-contrast-color)}.sn-component a.sk-a.boxed.info{background-color:var(--sn-stylekit-info-color);color:var(--sn-stylekit-info-contrast-color)}.sn-component a.sk-a.boxed.warning{background-color:var(--sn-stylekit-warning-color);color:var(--sn-stylekit-warning-contrast-color)}.sn-component a.sk-a.boxed.danger{background-color:var(--sn-stylekit-danger-color);color:var(--sn-stylekit-danger-contrast-color)}.sn-component a.sk-a.boxed.success{background-color:var(--sn-stylekit-success-color);color:var(--sn-stylekit-success-contrast-color)}.sn-component .wrap{word-wrap:break-word}.sn-component *.sk-base{color:var(--sn-stylekit-foreground-color)}.sn-component *.contrast{color:var(--sn-stylekit-contrast-foreground-color)}.sn-component *.neutral{color:var(--sn-stylekit-neutral-color)}.sn-component *.info{color:var(--sn-stylekit-info-color)}.sn-component *.info-contrast{color:var(--sn-stylekit-info-contrast-color)}.sn-component *.warning{color:var(--sn-stylekit-warning-color)}.sn-component *.danger{color:var(--sn-stylekit-danger-color)}.sn-component *.success{color:var(--sn-stylekit-success-color)}.sn-component *.info-i{color:var(--sn-stylekit-info-color) !important}.sn-component *.warning-i{color:var(--sn-stylekit-warning-color) !important}.sn-component *.danger-i{color:var(--sn-stylekit-danger-color) !important}.sn-component *.success-i{color:var(--sn-stylekit-success-color) !important}.sn-component *.clear{background-color:transparent;border:none}.sn-component .center-text{text-align:center !important;justify-content:center !important}.sn-component p.sk-p{margin:0.5rem 0}.sn-component input.sk-input{box-sizing:border-box;padding:0.7rem 0.8rem;margin:0.30rem 0;border:none;font-size:var(--sn-stylekit-font-size-h3);width:100%;outline:0;resize:none}.sn-component input.sk-input.clear{color:var(--sn-stylekit-foreground-color);background-color:transparent;border:none}.sn-component input.sk-input.no-border{border:none}.sn-component .sk-label,.sn-component .sk-panel-section .sk-panel-section-subtitle{font-weight:bold}.sn-component .sk-label.no-bold,.sn-component .sk-panel-section .no-bold.sk-panel-section-subtitle{font-weight:normal}.sn-component label.sk-label,.sn-component .sk-panel-section label.sk-panel-section-subtitle{margin:0.7rem 0;display:block}.sn-component label.sk-label input[type='checkbox'],.sn-component .sk-panel-section label.sk-panel-section-subtitle input[type='checkbox'],.sn-component input[type='radio']{width:auto;margin-right:0.45rem;vertical-align:middle}.sn-component .sk-horizontal-group>*,.sn-component .sk-input-group>*{display:inline-block;vertical-align:middle}.sn-component .sk-horizontal-group>*:not(:first-child),.sn-component .sk-input-group>*:not(:first-child){margin-left:0.9rem}.sn-component .sk-border-bottom{border-bottom:1px solid var(--sn-stylekit-border-color)}.sn-component .sk-checkbox-group{padding-top:0.5rem;padding-bottom:0.3rem}.sn-component ::placeholder{color:var(--sn-stylekit-input-placeholder-color)}.sn-component :-ms-input-placeholder{color:var(--sn-stylekit-input-placeholder-color)}.sn-component ::-ms-input-placeholder{color:var(--sn-stylekit-input-placeholder-color)}.sn-component .sk-button-group.stretch{display:flex;width:100%}.sn-component .sk-button-group.stretch .sk-button,.sn-component .sk-button-group.stretch .sk-box{display:block;flex-grow:1;text-align:center}.sn-component .sk-button-group .sk-button,.sn-component .sk-button-group .sk-box{display:inline-block;vertical-align:middle}.sn-component .sk-button-group .sk-button:not(:last-child),.sn-component .sk-button-group .sk-box:not(:last-child){margin-right:5px}.sn-component .sk-button-group .sk-button:not(:last-child).featured,.sn-component .sk-button-group .sk-box:not(:last-child).featured{margin-right:8px}.sn-component .sk-segmented-buttons{display:flex;flex-direction:row}.sn-component .sk-segmented-buttons .sk-button,.sn-component .sk-segmented-buttons .sk-box{border-radius:0;white-space:nowrap;margin:0;margin-left:0 !important;margin-right:0 !important}.sn-component .sk-segmented-buttons .sk-button:not(:last-child),.sn-component .sk-segmented-buttons .sk-box:not(:last-child){border-right:none;border-radius:0}.sn-component .sk-segmented-buttons .sk-button:first-child,.sn-component .sk-segmented-buttons .sk-box:first-child{border-top-left-radius:var(--sn-stylekit-general-border-radius);border-bottom-left-radius:var(--sn-stylekit-general-border-radius);border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.sn-component .sk-segmented-buttons .sk-button:last-child,.sn-component .sk-segmented-buttons .sk-box:last-child{border-top-right-radius:var(--sn-stylekit-general-border-radius);border-bottom-right-radius:var(--sn-stylekit-general-border-radius);border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.sn-component .sk-box-group .sk-box{display:inline-block}.sn-component .sk-box-group .sk-box:not(:last-child){margin-right:5px}.sn-component .sk-a.button{text-decoration:none}.sn-component .sk-button,.sn-component .sk-box{display:table;padding:0.5rem 0.7rem;font-size:var(--sn-stylekit-font-size-h5);cursor:pointer;text-align:center;user-select:none}.sn-component .sk-button.no-hover-border:after,.sn-component .no-hover-border.sk-box:after{color:transparent !important}.sn-component .sk-button.wide,.sn-component .wide.sk-box{padding:0.3rem 1.7rem}.sn-component .sk-button>.sk-label,.sn-component .sk-box>.sk-label,.sn-component .sk-panel-section .sk-button>.sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-box>.sk-panel-section-subtitle{font-weight:bold;display:block;text-align:center}.sn-component .sk-button.big,.sn-component .big.sk-box{font-size:var(--sn-stylekit-font-size-h3);padding:0.7rem 2.5rem}.sn-component .sk-box{padding:2.5rem 1.5rem}.sn-component .sk-button.sk-base,.sn-component .sk-base.sk-box,.sn-component .sk-box.sk-base,.sn-component .sk-circle.sk-base{color:var(--sn-stylekit-foreground-color);position:relative;background-color:var(--sn-stylekit-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-background-color)}.sn-component .sk-button.sk-base *,.sn-component .sk-base.sk-box *,.sn-component .sk-box.sk-base *,.sn-component .sk-circle.sk-base *{position:relative}.sn-component .sk-button.sk-base:before,.sn-component .sk-base.sk-box:before,.sn-component .sk-box.sk-base:before,.sn-component .sk-circle.sk-base:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.sk-base:after,.sn-component .sk-base.sk-box:after,.sn-component .sk-box.sk-base:after,.sn-component .sk-circle.sk-base:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-background-color)}.sn-component .sk-button.sk-base:hover:before,.sn-component .sk-base.sk-box:hover:before,.sn-component .sk-box.sk-base:hover:before,.sn-component .sk-circle.sk-base:hover:before{filter:brightness(130%)}.sn-component .sk-button.sk-base.no-bg,.sn-component .sk-base.no-bg.sk-box,.sn-component .sk-box.sk-base.no-bg,.sn-component .sk-circle.sk-base.no-bg{background-color:transparent}.sn-component .sk-button.sk-base.no-bg:before,.sn-component .sk-base.no-bg.sk-box:before,.sn-component .sk-box.sk-base.no-bg:before,.sn-component .sk-circle.sk-base.no-bg:before{content:none}.sn-component .sk-button.sk-base.featured,.sn-component .sk-base.featured.sk-box,.sn-component .sk-box.sk-base.featured,.sn-component .sk-circle.sk-base.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.sk-base.featured:before,.sn-component .sk-base.featured.sk-box:before,.sn-component .sk-box.sk-base.featured:before,.sn-component .sk-circle.sk-base.featured:before{opacity:1.0}.sn-component .sk-button.contrast,.sn-component .contrast.sk-box,.sn-component .sk-box.contrast,.sn-component .sk-circle.contrast{color:var(--sn-stylekit-contrast-foreground-color);position:relative;background-color:var(--sn-stylekit-contrast-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-contrast-background-color)}.sn-component .sk-button.contrast *,.sn-component .contrast.sk-box *,.sn-component .sk-box.contrast *,.sn-component .sk-circle.contrast *{position:relative}.sn-component .sk-button.contrast:before,.sn-component .contrast.sk-box:before,.sn-component .sk-box.contrast:before,.sn-component .sk-circle.contrast:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-contrast-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.contrast:after,.sn-component .contrast.sk-box:after,.sn-component .sk-box.contrast:after,.sn-component .sk-circle.contrast:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-contrast-background-color)}.sn-component .sk-button.contrast:hover:before,.sn-component .contrast.sk-box:hover:before,.sn-component .sk-box.contrast:hover:before,.sn-component .sk-circle.contrast:hover:before{filter:brightness(130%)}.sn-component .sk-button.contrast.no-bg,.sn-component .contrast.no-bg.sk-box,.sn-component .sk-box.contrast.no-bg,.sn-component .sk-circle.contrast.no-bg{background-color:transparent}.sn-component .sk-button.contrast.no-bg:before,.sn-component .contrast.no-bg.sk-box:before,.sn-component .sk-box.contrast.no-bg:before,.sn-component .sk-circle.contrast.no-bg:before{content:none}.sn-component .sk-button.contrast.featured,.sn-component .contrast.featured.sk-box,.sn-component .sk-box.contrast.featured,.sn-component .sk-circle.contrast.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.contrast.featured:before,.sn-component .contrast.featured.sk-box:before,.sn-component .sk-box.contrast.featured:before,.sn-component .sk-circle.contrast.featured:before{opacity:1.0}.sn-component .sk-button.sk-secondary,.sn-component .sk-secondary.sk-box,.sn-component .sk-box.sk-secondary,.sn-component .sk-circle.sk-secondary{color:var(--sn-stylekit-secondary-foreground-color);position:relative;background-color:var(--sn-stylekit-secondary-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-secondary-background-color)}.sn-component .sk-button.sk-secondary *,.sn-component .sk-secondary.sk-box *,.sn-component .sk-box.sk-secondary *,.sn-component .sk-circle.sk-secondary *{position:relative}.sn-component .sk-button.sk-secondary:before,.sn-component .sk-secondary.sk-box:before,.sn-component .sk-box.sk-secondary:before,.sn-component .sk-circle.sk-secondary:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-secondary-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.sk-secondary:after,.sn-component .sk-secondary.sk-box:after,.sn-component .sk-box.sk-secondary:after,.sn-component .sk-circle.sk-secondary:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-secondary-background-color)}.sn-component .sk-button.sk-secondary:hover:before,.sn-component .sk-secondary.sk-box:hover:before,.sn-component .sk-box.sk-secondary:hover:before,.sn-component .sk-circle.sk-secondary:hover:before{filter:brightness(130%)}.sn-component .sk-button.sk-secondary.no-bg,.sn-component .sk-secondary.no-bg.sk-box,.sn-component .sk-box.sk-secondary.no-bg,.sn-component .sk-circle.sk-secondary.no-bg{background-color:transparent}.sn-component .sk-button.sk-secondary.no-bg:before,.sn-component .sk-secondary.no-bg.sk-box:before,.sn-component .sk-box.sk-secondary.no-bg:before,.sn-component .sk-circle.sk-secondary.no-bg:before{content:none}.sn-component .sk-button.sk-secondary.featured,.sn-component .sk-secondary.featured.sk-box,.sn-component .sk-box.sk-secondary.featured,.sn-component .sk-circle.sk-secondary.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.sk-secondary.featured:before,.sn-component .sk-secondary.featured.sk-box:before,.sn-component .sk-box.sk-secondary.featured:before,.sn-component .sk-circle.sk-secondary.featured:before{opacity:1.0}.sn-component .sk-button.sk-secondary-contrast,.sn-component .sk-secondary-contrast.sk-box,.sn-component .sk-box.sk-secondary-contrast,.sn-component .sk-circle.sk-secondary-contrast{color:var(--sn-stylekit-secondary-contrast-foreground-color);position:relative;background-color:var(--sn-stylekit-secondary-contrast-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-secondary-contrast-background-color)}.sn-component .sk-button.sk-secondary-contrast *,.sn-component .sk-secondary-contrast.sk-box *,.sn-component .sk-box.sk-secondary-contrast *,.sn-component .sk-circle.sk-secondary-contrast *{position:relative}.sn-component .sk-button.sk-secondary-contrast:before,.sn-component .sk-secondary-contrast.sk-box:before,.sn-component .sk-box.sk-secondary-contrast:before,.sn-component .sk-circle.sk-secondary-contrast:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-secondary-contrast-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.sk-secondary-contrast:after,.sn-component .sk-secondary-contrast.sk-box:after,.sn-component .sk-box.sk-secondary-contrast:after,.sn-component .sk-circle.sk-secondary-contrast:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-secondary-contrast-background-color)}.sn-component .sk-button.sk-secondary-contrast:hover:before,.sn-component .sk-secondary-contrast.sk-box:hover:before,.sn-component .sk-box.sk-secondary-contrast:hover:before,.sn-component .sk-circle.sk-secondary-contrast:hover:before{filter:brightness(130%)}.sn-component .sk-button.sk-secondary-contrast.no-bg,.sn-component .sk-secondary-contrast.no-bg.sk-box,.sn-component .sk-box.sk-secondary-contrast.no-bg,.sn-component .sk-circle.sk-secondary-contrast.no-bg{background-color:transparent}.sn-component .sk-button.sk-secondary-contrast.no-bg:before,.sn-component .sk-secondary-contrast.no-bg.sk-box:before,.sn-component .sk-box.sk-secondary-contrast.no-bg:before,.sn-component .sk-circle.sk-secondary-contrast.no-bg:before{content:none}.sn-component .sk-button.sk-secondary-contrast.featured,.sn-component .sk-secondary-contrast.featured.sk-box,.sn-component .sk-box.sk-secondary-contrast.featured,.sn-component .sk-circle.sk-secondary-contrast.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.sk-secondary-contrast.featured:before,.sn-component .sk-secondary-contrast.featured.sk-box:before,.sn-component .sk-box.sk-secondary-contrast.featured:before,.sn-component .sk-circle.sk-secondary-contrast.featured:before{opacity:1.0}.sn-component .sk-button.neutral,.sn-component .neutral.sk-box,.sn-component .sk-box.neutral,.sn-component .sk-circle.neutral{color:var(--sn-stylekit-neutral-contrast-color);position:relative;background-color:var(--sn-stylekit-neutral-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-neutral-color)}.sn-component .sk-button.neutral *,.sn-component .neutral.sk-box *,.sn-component .sk-box.neutral *,.sn-component .sk-circle.neutral *{position:relative}.sn-component .sk-button.neutral:before,.sn-component .neutral.sk-box:before,.sn-component .sk-box.neutral:before,.sn-component .sk-circle.neutral:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-neutral-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.neutral:after,.sn-component .neutral.sk-box:after,.sn-component .sk-box.neutral:after,.sn-component .sk-circle.neutral:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-neutral-color)}.sn-component .sk-button.neutral:hover:before,.sn-component .neutral.sk-box:hover:before,.sn-component .sk-box.neutral:hover:before,.sn-component .sk-circle.neutral:hover:before{filter:brightness(130%)}.sn-component .sk-button.neutral.no-bg,.sn-component .neutral.no-bg.sk-box,.sn-component .sk-box.neutral.no-bg,.sn-component .sk-circle.neutral.no-bg{background-color:transparent}.sn-component .sk-button.neutral.no-bg:before,.sn-component .neutral.no-bg.sk-box:before,.sn-component .sk-box.neutral.no-bg:before,.sn-component .sk-circle.neutral.no-bg:before{content:none}.sn-component .sk-button.neutral.featured,.sn-component .neutral.featured.sk-box,.sn-component .sk-box.neutral.featured,.sn-component .sk-circle.neutral.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.neutral.featured:before,.sn-component .neutral.featured.sk-box:before,.sn-component .sk-box.neutral.featured:before,.sn-component .sk-circle.neutral.featured:before{opacity:1.0}.sn-component .sk-button.info,.sn-component .info.sk-box,.sn-component .sk-box.info,.sn-component .sk-circle.info{color:var(--sn-stylekit-info-contrast-color);position:relative;background-color:var(--sn-stylekit-info-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-info-color)}.sn-component .sk-button.info *,.sn-component .info.sk-box *,.sn-component .sk-box.info *,.sn-component .sk-circle.info *{position:relative}.sn-component .sk-button.info:before,.sn-component .info.sk-box:before,.sn-component .sk-box.info:before,.sn-component .sk-circle.info:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-info-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.info:after,.sn-component .info.sk-box:after,.sn-component .sk-box.info:after,.sn-component .sk-circle.info:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-info-color)}.sn-component .sk-button.info:hover:before,.sn-component .info.sk-box:hover:before,.sn-component .sk-box.info:hover:before,.sn-component .sk-circle.info:hover:before{filter:brightness(130%)}.sn-component .sk-button.info.no-bg,.sn-component .info.no-bg.sk-box,.sn-component .sk-box.info.no-bg,.sn-component .sk-circle.info.no-bg{background-color:transparent}.sn-component .sk-button.info.no-bg:before,.sn-component .info.no-bg.sk-box:before,.sn-component .sk-box.info.no-bg:before,.sn-component .sk-circle.info.no-bg:before{content:none}.sn-component .sk-button.info.featured,.sn-component .info.featured.sk-box,.sn-component .sk-box.info.featured,.sn-component .sk-circle.info.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.info.featured:before,.sn-component .info.featured.sk-box:before,.sn-component .sk-box.info.featured:before,.sn-component .sk-circle.info.featured:before{opacity:1.0}.sn-component .sk-button.warning,.sn-component .warning.sk-box,.sn-component .sk-box.warning,.sn-component .sk-circle.warning{color:var(--sn-stylekit-warning-contrast-color);position:relative;background-color:var(--sn-stylekit-warning-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-warning-color)}.sn-component .sk-button.warning *,.sn-component .warning.sk-box *,.sn-component .sk-box.warning *,.sn-component .sk-circle.warning *{position:relative}.sn-component .sk-button.warning:before,.sn-component .warning.sk-box:before,.sn-component .sk-box.warning:before,.sn-component .sk-circle.warning:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-warning-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.warning:after,.sn-component .warning.sk-box:after,.sn-component .sk-box.warning:after,.sn-component .sk-circle.warning:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-warning-color)}.sn-component .sk-button.warning:hover:before,.sn-component .warning.sk-box:hover:before,.sn-component .sk-box.warning:hover:before,.sn-component .sk-circle.warning:hover:before{filter:brightness(130%)}.sn-component .sk-button.warning.no-bg,.sn-component .warning.no-bg.sk-box,.sn-component .sk-box.warning.no-bg,.sn-component .sk-circle.warning.no-bg{background-color:transparent}.sn-component .sk-button.warning.no-bg:before,.sn-component .warning.no-bg.sk-box:before,.sn-component .sk-box.warning.no-bg:before,.sn-component .sk-circle.warning.no-bg:before{content:none}.sn-component .sk-button.warning.featured,.sn-component .warning.featured.sk-box,.sn-component .sk-box.warning.featured,.sn-component .sk-circle.warning.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.warning.featured:before,.sn-component .warning.featured.sk-box:before,.sn-component .sk-box.warning.featured:before,.sn-component .sk-circle.warning.featured:before{opacity:1.0}.sn-component .sk-button.danger,.sn-component .danger.sk-box,.sn-component .sk-box.danger,.sn-component .sk-circle.danger{color:var(--sn-stylekit-danger-contrast-color);position:relative;background-color:var(--sn-stylekit-danger-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-danger-color)}.sn-component .sk-button.danger *,.sn-component .danger.sk-box *,.sn-component .sk-box.danger *,.sn-component .sk-circle.danger *{position:relative}.sn-component .sk-button.danger:before,.sn-component .danger.sk-box:before,.sn-component .sk-box.danger:before,.sn-component .sk-circle.danger:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-danger-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.danger:after,.sn-component .danger.sk-box:after,.sn-component .sk-box.danger:after,.sn-component .sk-circle.danger:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-danger-color)}.sn-component .sk-button.danger:hover:before,.sn-component .danger.sk-box:hover:before,.sn-component .sk-box.danger:hover:before,.sn-component .sk-circle.danger:hover:before{filter:brightness(130%)}.sn-component .sk-button.danger.no-bg,.sn-component .danger.no-bg.sk-box,.sn-component .sk-box.danger.no-bg,.sn-component .sk-circle.danger.no-bg{background-color:transparent}.sn-component .sk-button.danger.no-bg:before,.sn-component .danger.no-bg.sk-box:before,.sn-component .sk-box.danger.no-bg:before,.sn-component .sk-circle.danger.no-bg:before{content:none}.sn-component .sk-button.danger.featured,.sn-component .danger.featured.sk-box,.sn-component .sk-box.danger.featured,.sn-component .sk-circle.danger.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.danger.featured:before,.sn-component .danger.featured.sk-box:before,.sn-component .sk-box.danger.featured:before,.sn-component .sk-circle.danger.featured:before{opacity:1.0}.sn-component .sk-button.success,.sn-component .success.sk-box,.sn-component .sk-box.success,.sn-component .sk-circle.success{color:var(--sn-stylekit-success-contrast-color);position:relative;background-color:var(--sn-stylekit-success-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-success-color)}.sn-component .sk-button.success *,.sn-component .success.sk-box *,.sn-component .sk-box.success *,.sn-component .sk-circle.success *{position:relative}.sn-component .sk-button.success:before,.sn-component .success.sk-box:before,.sn-component .sk-box.success:before,.sn-component .sk-circle.success:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-success-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.success:after,.sn-component .success.sk-box:after,.sn-component .sk-box.success:after,.sn-component .sk-circle.success:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-success-color)}.sn-component .sk-button.success:hover:before,.sn-component .success.sk-box:hover:before,.sn-component .sk-box.success:hover:before,.sn-component .sk-circle.success:hover:before{filter:brightness(130%)}.sn-component .sk-button.success.no-bg,.sn-component .success.no-bg.sk-box,.sn-component .sk-box.success.no-bg,.sn-component .sk-circle.success.no-bg{background-color:transparent}.sn-component .sk-button.success.no-bg:before,.sn-component .success.no-bg.sk-box:before,.sn-component .sk-box.success.no-bg:before,.sn-component .sk-circle.success.no-bg:before{content:none}.sn-component .sk-button.success.featured,.sn-component .success.featured.sk-box,.sn-component .sk-box.success.featured,.sn-component .sk-circle.success.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.success.featured:before,.sn-component .success.featured.sk-box:before,.sn-component .sk-box.success.featured:before,.sn-component .sk-circle.success.featured:before{opacity:1.0}.sn-component .sk-notification.contrast,.sn-component .sk-input.contrast{color:var(--sn-stylekit-contrast-foreground-color);position:relative;background-color:var(--sn-stylekit-contrast-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-contrast-border-color);border:1px solid var(--sn-stylekit-contrast-border-color)}.sn-component .sk-notification.contrast *,.sn-component .sk-input.contrast *{position:relative}.sn-component .sk-notification.contrast:before,.sn-component .sk-input.contrast:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-contrast-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.contrast:after,.sn-component .sk-input.contrast:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;color:var(--sn-stylekit-contrast-border-color);border-color:var(--sn-stylekit-contrast-border-color)}.sn-component .sk-notification.contrast.no-bg,.sn-component .sk-input.contrast.no-bg{background-color:transparent}.sn-component .sk-notification.contrast.no-bg:before,.sn-component .sk-input.contrast.no-bg:before{content:none}.sn-component .sk-notification.contrast.featured,.sn-component .sk-input.contrast.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.contrast.featured:before,.sn-component .sk-input.contrast.featured:before{opacity:1.0}.sn-component .sk-notification.sk-secondary,.sn-component .sk-input.sk-secondary{color:var(--sn-stylekit-secondary-foreground-color);position:relative;background-color:var(--sn-stylekit-secondary-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-secondary-border-color);border:1px solid var(--sn-stylekit-secondary-border-color)}.sn-component .sk-notification.sk-secondary *,.sn-component .sk-input.sk-secondary *{position:relative}.sn-component .sk-notification.sk-secondary:before,.sn-component .sk-input.sk-secondary:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-secondary-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.sk-secondary:after,.sn-component .sk-input.sk-secondary:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;color:var(--sn-stylekit-secondary-border-color);border-color:var(--sn-stylekit-secondary-border-color)}.sn-component .sk-notification.sk-secondary.no-bg,.sn-component .sk-input.sk-secondary.no-bg{background-color:transparent}.sn-component .sk-notification.sk-secondary.no-bg:before,.sn-component .sk-input.sk-secondary.no-bg:before{content:none}.sn-component .sk-notification.sk-secondary.featured,.sn-component .sk-input.sk-secondary.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.sk-secondary.featured:before,.sn-component .sk-input.sk-secondary.featured:before{opacity:1.0}.sn-component .sk-notification.sk-secondary-contrast,.sn-component .sk-input.sk-secondary-contrast{color:var(--sn-stylekit-secondary-contrast-foreground-color);position:relative;background-color:var(--sn-stylekit-secondary-contrast-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-secondary-contrast-border-color);border:1px solid var(--sn-stylekit-secondary-contrast-border-color)}.sn-component .sk-notification.sk-secondary-contrast *,.sn-component .sk-input.sk-secondary-contrast *{position:relative}.sn-component .sk-notification.sk-secondary-contrast:before,.sn-component .sk-input.sk-secondary-contrast:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-secondary-contrast-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.sk-secondary-contrast:after,.sn-component .sk-input.sk-secondary-contrast:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;color:var(--sn-stylekit-secondary-contrast-border-color);border-color:var(--sn-stylekit-secondary-contrast-border-color)}.sn-component .sk-notification.sk-secondary-contrast.no-bg,.sn-component .sk-input.sk-secondary-contrast.no-bg{background-color:transparent}.sn-component .sk-notification.sk-secondary-contrast.no-bg:before,.sn-component .sk-input.sk-secondary-contrast.no-bg:before{content:none}.sn-component .sk-notification.sk-secondary-contrast.featured,.sn-component .sk-input.sk-secondary-contrast.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.sk-secondary-contrast.featured:before,.sn-component .sk-input.sk-secondary-contrast.featured:before{opacity:1.0}.sn-component .sk-notification.sk-base,.sn-component .sk-input.sk-base{color:var(--sn-stylekit-foreground-color);position:relative;background-color:var(--sn-stylekit-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-border-color);border:1px solid var(--sn-stylekit-border-color)}.sn-component .sk-notification.sk-base *,.sn-component .sk-input.sk-base *{position:relative}.sn-component .sk-notification.sk-base:before,.sn-component .sk-input.sk-base:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.sk-base:after,.sn-component .sk-input.sk-base:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;color:var(--sn-stylekit-border-color);border-color:var(--sn-stylekit-border-color)}.sn-component .sk-notification.sk-base.no-bg,.sn-component .sk-input.sk-base.no-bg{background-color:transparent}.sn-component .sk-notification.sk-base.no-bg:before,.sn-component .sk-input.sk-base.no-bg:before{content:none}.sn-component .sk-notification.sk-base.featured,.sn-component .sk-input.sk-base.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.sk-base.featured:before,.sn-component .sk-input.sk-base.featured:before{opacity:1.0}.sn-component .sk-notification.neutral,.sn-component .sk-input.neutral{color:var(--sn-stylekit-neutral-contrast-color);position:relative;background-color:var(--sn-stylekit-neutral-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-neutral-color)}.sn-component .sk-notification.neutral *,.sn-component .sk-input.neutral *{position:relative}.sn-component .sk-notification.neutral:before,.sn-component .sk-input.neutral:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-neutral-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.neutral:after,.sn-component .sk-input.neutral:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-neutral-color)}.sn-component .sk-notification.neutral.no-bg,.sn-component .sk-input.neutral.no-bg{background-color:transparent}.sn-component .sk-notification.neutral.no-bg:before,.sn-component .sk-input.neutral.no-bg:before{content:none}.sn-component .sk-notification.neutral.featured,.sn-component .sk-input.neutral.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.neutral.featured:before,.sn-component .sk-input.neutral.featured:before{opacity:1.0}.sn-component .sk-notification.info,.sn-component .sk-input.info{color:var(--sn-stylekit-info-contrast-color);position:relative;background-color:var(--sn-stylekit-info-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-info-color)}.sn-component .sk-notification.info *,.sn-component .sk-input.info *{position:relative}.sn-component .sk-notification.info:before,.sn-component .sk-input.info:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-info-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.info:after,.sn-component .sk-input.info:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-info-color)}.sn-component .sk-notification.info.no-bg,.sn-component .sk-input.info.no-bg{background-color:transparent}.sn-component .sk-notification.info.no-bg:before,.sn-component .sk-input.info.no-bg:before{content:none}.sn-component .sk-notification.info.featured,.sn-component .sk-input.info.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.info.featured:before,.sn-component .sk-input.info.featured:before{opacity:1.0}.sn-component .sk-notification.warning,.sn-component .sk-input.warning{color:var(--sn-stylekit-warning-contrast-color);position:relative;background-color:var(--sn-stylekit-warning-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-warning-color)}.sn-component .sk-notification.warning *,.sn-component .sk-input.warning *{position:relative}.sn-component .sk-notification.warning:before,.sn-component .sk-input.warning:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-warning-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.warning:after,.sn-component .sk-input.warning:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-warning-color)}.sn-component .sk-notification.warning.no-bg,.sn-component .sk-input.warning.no-bg{background-color:transparent}.sn-component .sk-notification.warning.no-bg:before,.sn-component .sk-input.warning.no-bg:before{content:none}.sn-component .sk-notification.warning.featured,.sn-component .sk-input.warning.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.warning.featured:before,.sn-component .sk-input.warning.featured:before{opacity:1.0}.sn-component .sk-notification.danger,.sn-component .sk-input.danger{color:var(--sn-stylekit-danger-contrast-color);position:relative;background-color:var(--sn-stylekit-danger-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-danger-color)}.sn-component .sk-notification.danger *,.sn-component .sk-input.danger *{position:relative}.sn-component .sk-notification.danger:before,.sn-component .sk-input.danger:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-danger-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.danger:after,.sn-component .sk-input.danger:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-danger-color)}.sn-component .sk-notification.danger.no-bg,.sn-component .sk-input.danger.no-bg{background-color:transparent}.sn-component .sk-notification.danger.no-bg:before,.sn-component .sk-input.danger.no-bg:before{content:none}.sn-component .sk-notification.danger.featured,.sn-component .sk-input.danger.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.danger.featured:before,.sn-component .sk-input.danger.featured:before{opacity:1.0}.sn-component .sk-notification.success,.sn-component .sk-input.success{color:var(--sn-stylekit-success-contrast-color);position:relative;background-color:var(--sn-stylekit-success-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-success-color)}.sn-component .sk-notification.success *,.sn-component .sk-input.success *{position:relative}.sn-component .sk-notification.success:before,.sn-component .sk-input.success:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-success-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.success:after,.sn-component .sk-input.success:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-success-color)}.sn-component .sk-notification.success.no-bg,.sn-component .sk-input.success.no-bg{background-color:transparent}.sn-component .sk-notification.success.no-bg:before,.sn-component .sk-input.success.no-bg:before{content:none}.sn-component .sk-notification.success.featured,.sn-component .sk-input.success.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.success.featured:before,.sn-component .sk-input.success.featured:before{opacity:1.0}.sn-component .sk-notification{padding:1.1rem 1rem;margin:1.4rem 0;text-align:left;cursor:default}.sn-component .sk-notification.one-line{padding:0rem 0.4rem}.sn-component .sk-notification.stretch{width:100%}.sn-component .sk-notification.dashed{border-style:dashed;border-width:2px}.sn-component .sk-notification.dashed:after{box-shadow:none}.sn-component .sk-notification .sk-notification-title{font-size:var(--sn-stylekit-font-size-h1);font-weight:bold;line-height:1.9rem}.sn-component .sk-notification .sk-notification-text{line-height:1.5rem;font-size:var(--sn-stylekit-font-size-p);text-align:left;font-weight:normal}.sn-component .sk-circle{border:1px solid;cursor:pointer;border-color:var(--sn-stylekit-contrast-foreground-color);background-color:var(--sn-stylekit-contrast-background-color);padding:0;border-radius:50% !important;flex-shrink:0}.sn-component .sk-circle:before{border-radius:50% !important}.sn-component .sk-circle:after{border-radius:50% !important}.sn-component .sk-circle.small{width:11px;height:11px}.sn-component .sk-spinner{border:1px solid var(--sn-stylekit-neutral-color);border-radius:50%;animation:rotate 0.8s infinite linear;border-right-color:transparent}.sn-component .sk-spinner.small{width:12px;height:12px}.sn-component .sk-spinner.info-contrast{border-color:var(--sn-stylekit-info-contrast-color);border-right-color:transparent}.sn-component .sk-spinner.info{border-color:var(--sn-stylekit-info-color);border-right-color:transparent}.sn-component .sk-spinner.warning{border-color:var(--sn-stylekit-warning-color);border-right-color:transparent}.sn-component .sk-spinner.danger{border-color:var(--sn-stylekit-danger-color);border-right-color:transparent}.sn-component .sk-spinner.success{border-color:var(--sn-stylekit-success-color);border-right-color:transparent}@keyframes rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.sn-component .sk-app-bar{display:flex;width:100%;height:2rem;padding:0.0rem 0.8rem;background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-contrast-foreground-color);justify-content:space-between;align-items:center;border:1px solid var(--sn-stylekit-contrast-border-color);user-select:none}.sn-component .sk-app-bar.no-edges{border-left:0;border-right:0}.sn-component .sk-app-bar.no-bottom-edge{border-bottom:0}.sn-component .sk-app-bar .left,.sn-component .sk-app-bar .right{display:flex;height:100%}.sn-component .sk-app-bar .sk-app-bar-item{flex-grow:1;cursor:pointer;display:flex;align-items:center;justify-content:center}.sn-component .sk-app-bar .sk-app-bar-item:not(:first-child){margin-left:1rem}.sn-component .sk-app-bar .sk-app-bar-item.border{border-left:1px solid var(--sn-stylekit-contrast-border-color)}.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column{height:100%;display:flex;align-items:center}.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column:not(:first-child){margin-left:0.5rem}.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column.underline{border-bottom:2px solid var(--sn-stylekit-info-color)}.sn-component .sk-app-bar .sk-app-bar-item.no-pointer{cursor:default}.sn-component .sk-app-bar .sk-app-bar-item:hover>.sk-label:not(.subtle),.sn-component .sk-app-bar .sk-panel-section .sk-app-bar-item:hover>.sk-panel-section-subtitle:not(.subtle),.sn-component .sk-panel-section .sk-app-bar .sk-app-bar-item:hover>.sk-panel-section-subtitle:not(.subtle),.sn-component .sk-app-bar .sk-app-bar-item:hover>.sk-sublabel:not(.subtle),.sn-component .sk-app-bar .sk-app-bar-item:hover>.sk-app-bar-item-column>.sk-label:not(.subtle),.sn-component .sk-app-bar .sk-panel-section .sk-app-bar-item:hover>.sk-app-bar-item-column>.sk-panel-section-subtitle:not(.subtle),.sn-component .sk-panel-section .sk-app-bar .sk-app-bar-item:hover>.sk-app-bar-item-column>.sk-panel-section-subtitle:not(.subtle),.sn-component .sk-app-bar .sk-app-bar-item:hover>.sk-app-bar-item-column>.sk-sublabel:not(.subtle){color:var(--sn-stylekit-info-color)}.sn-component .sk-app-bar .sk-app-bar-item>.sk-label,.sn-component .sk-app-bar .sk-panel-section .sk-app-bar-item>.sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-app-bar .sk-app-bar-item>.sk-panel-section-subtitle,.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column>.sk-label,.sn-component .sk-app-bar .sk-panel-section .sk-app-bar-item>.sk-app-bar-item-column>.sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column>.sk-panel-section-subtitle{font-weight:bold;font-size:var(--sn-stylekit-font-size-h5);white-space:nowrap}.sn-component .sk-app-bar .sk-app-bar-item>.sk-sublabel,.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column>.sk-sublabel{font-size:var(--sn-stylekit-font-size-h5);font-weight:normal;white-space:nowrap}.sn-component .sk-app-bar .sk-app-bar-item .subtle{font-weight:normal;opacity:0.6}.sn-component .sk-panel-table{display:flex;flex-wrap:wrap;padding-left:1px;padding-top:1px}.sn-component .sk-panel-table .sk-panel-table-item{flex:45%;flex-flow:wrap;border:1px solid var(--sn-stylekit-border-color);padding:1rem;margin-left:-1px;margin-top:-1px;display:flex;flex-direction:column;justify-content:space-between}.sn-component .sk-panel-table .sk-panel-table-item img{max-width:100%;margin-bottom:1rem}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-content{display:flex;flex-direction:row}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column{align-items:center}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column.stretch{width:100%}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column:not(:first-child){padding-left:0.75rem}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column.quarter{flex-basis:25%}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column.three-quarters{flex-basis:75%}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-footer{margin-top:1.25rem}.sn-component .sk-panel-table .sk-panel-table-item.no-border{border:none}.sn-component .sk-modal{position:fixed;margin-left:auto;margin-right:auto;left:0;right:0;top:0;bottom:0;z-index:10000;width:100vw;height:100vh;background-color:transparent;color:var(--sn-stylekit-contrast-foreground-color);display:flex;align-items:center;justify-content:center}.sn-component .sk-modal .sn-component{height:100%}.sn-component .sk-modal .sn-component .sk-panel{height:100%}.sn-component .sk-modal.auto-height>.sk-modal-content{height:auto !important}.sn-component .sk-modal.large>.sk-modal-content{width:900px;height:600px}.sn-component .sk-modal.medium>.sk-modal-content{width:700px;height:500px}.sn-component .sk-modal.small>.sk-modal-content{width:700px;height:344px}.sn-component .sk-modal .sk-modal-background{position:absolute;z-index:-1;width:100%;height:100%;background-color:var(--sn-stylekit-contrast-background-color);opacity:0.7}.sn-component .sk-modal>.sk-modal-content{overflow-y:auto;width:auto;padding:0;padding-bottom:0;min-width:300px;-webkit-box-shadow:0px 2px 35px 0px rgba(0,0,0,0.19);-moz-box-shadow:0px 2px 35px 0px rgba(0,0,0,0.19);box-shadow:0px 2px 35px 0px rgba(0,0,0,0.19)}.sn-component.no-select{user-select:none}input,textarea,[contenteditable]{caret-color:var(--sn-stylekit-editor-foreground-color)}.windows-web,.windows-desktop,.linux-web,.linux-desktop{scrollbar-width:thin}.windows-web ::-webkit-scrollbar,.windows-desktop ::-webkit-scrollbar,.linux-web ::-webkit-scrollbar,.linux-desktop ::-webkit-scrollbar{width:17px;height:18px;border-left:0.5px solid var(--sn-stylekit-scrollbar-track-border-color-color)}.windows-web ::-webkit-scrollbar-thumb,.windows-desktop ::-webkit-scrollbar-thumb,.linux-web ::-webkit-scrollbar-thumb,.linux-desktop ::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;-webkit-border-radius:10px;background-color:var(--sn-stylekit-scrollbar-thumb-color);-webkit-box-shadow:inset -1px -1px 0px rgba(0,0,0,0.05),inset 1px 1px 0px rgba(0,0,0,0.05)}.windows-web ::-webkit-scrollbar-button,.windows-desktop ::-webkit-scrollbar-button,.linux-web ::-webkit-scrollbar-button,.linux-desktop ::-webkit-scrollbar-button{width:0;height:0;display:none}.windows-web ::-webkit-scrollbar-corner,.windows-desktop ::-webkit-scrollbar-corner,.linux-web ::-webkit-scrollbar-corner,.linux-desktop ::-webkit-scrollbar-corner{background-color:transparent}\n"]} \ No newline at end of file diff --git a/static/css/main.61f56e2a.chunk.css b/static/css/main.61f56e2a.chunk.css new file mode 100644 index 0000000..865ee8c --- /dev/null +++ b/static/css/main.61f56e2a.chunk.css @@ -0,0 +1,2 @@ +body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.hljs{display:block;overflow-x:auto;padding:.5em;background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:grey}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}:root{--sn-stylekit-font-size-editor:16px;--sn-stylekit-monospace-font:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono","Courier New",monospace}body,html{background-color:transparent;background-color:var(--sn-stylekit-background-color);font-family:var(--sn-stylekit-sans-serif-font);font-size:var(--sn-stylekit-base-font-size);height:100%;margin:0;padding:0;width:100%;overflow-y:hidden}*{-webkit-tap-highlight-color:rgba(0,0,0,0)}.sn-component{display:flex;flex-direction:column;font-size:16px;font-size:var(--sn-stylekit-font-size-editor);min-height:100vh}@media screen and (max-width:420px){.sn-component{min-height:-webkit-fill-available}}.sn-component.vs{background-color:#fffffe}.sn-component.vs .settings{color:#000}.sn-component.vs-dark{background-color:#1e1e1e}.sn-component.vs-dark .settings{color:#d4d4d4}.sn-component.hc-black{background-color:#000}.sn-component.hc-black .settings{color:#fff}#contentContainer{display:flex;flex-direction:row;height:var(--heightVar);max-height:var(--heightVar);min-height:var(--heightVar);--heightVar:calc(100vh - 2em)}#contentContainer.editMode .MonacoEditorContainerParentDiv,#contentContainer.viewMode #viewContainer{width:100%}#contentContainer.editMode.viewMode #viewContainer,#contentContainer.editMode.viewMode .MonacoEditorContainerParentDiv{width:50%}@media screen and (max-width:1172px){#contentContainer{--heightVar:calc(100vh - 3.25em)}}@media screen and (max-width:1068px){#contentContainer{--heightVar:calc(100vh - 3.5em)}}@media screen and (max-width:840px){#contentContainer{--heightVar:calc(100vh - 5.5em)}}#contentContainer.hideSettings{--heightVar:calc(100vh - 2em)}.MonacoEditorContainerParentDiv{min-width:150px;overflow-x:hidden!important;overflow-y:hidden;padding-top:1em;width:100%}.MonacoDiffEditorContainer,.MonacoEditorContainer{height:100%;width:100%}#viewContainer,.error-boundary,.note-dialog{background-color:var(--sn-stylekit-background-color);font-size:16px;font-size:var(--sn-stylekit-font-size-editor);line-height:1.7;overflow:auto;padding:1em}@media screen and (max-width:650px){#viewContainer,.error-boundary,.note-dialog{font-size:18px}}#viewContainer a,.error-boundary a,.note-dialog a{color:var(--sn-stylekit-info-color);text-decoration:none}#viewContainer a:hover,.error-boundary a:hover,.note-dialog a:hover{text-decoration:underline}#viewContainer blockquote,.error-boundary blockquote,.note-dialog blockquote{margin:0 0 16px;padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}#viewContainer hr,.error-boundary hr,.note-dialog hr{border:.5px solid var(--sn-stylekit-border-color)}#viewContainer img,.error-boundary img,.note-dialog img{max-width:100%}#viewContainer table,.error-boundary table,.note-dialog table{display:block;width:100%;overflow:auto;margin-top:0;margin-bottom:16px;border-spacing:0;border-collapse:collapse}#viewContainer table tr,.error-boundary table tr,.note-dialog table tr{background-color:transparent;border-top:1px solid var(--sn-stylekit-contrast-border-color)}#viewContainer table td,#viewContainer table th,.error-boundary table td,.error-boundary table th,.note-dialog table td,.note-dialog table th{padding:6px 13px;border:1px solid var(--sn-stylekit-contrast-border-color)}#viewContainer table tr:nth-child(2n),.error-boundary table tr:nth-child(2n),.note-dialog table tr:nth-child(2n){background-color:var(--sn-stylekit-contrast-background-color)}#viewContainer table tr:nth-child(2n) code,#viewContainer table tr:nth-child(2n) pre,.error-boundary table tr:nth-child(2n) code,.error-boundary table tr:nth-child(2n) pre,.note-dialog table tr:nth-child(2n) code,.note-dialog table tr:nth-child(2n) pre{background-color:var(--sn-stylekit-background-color)}#viewContainer summary .link,.error-boundary summary .link,.note-dialog summary .link{display:inline;color:var(--sn-stylekit-info-color)}#viewContainer summary .link:hover,.error-boundary summary .link:hover,.note-dialog summary .link:hover{text-decoration:underline}#viewContainer h1,#viewContainer h2,#viewContainer h3,.error-boundary h1,.error-boundary h2,.error-boundary h3,.note-dialog h1,.note-dialog h2,.note-dialog h3{line-height:normal}#viewContainer code,#viewContainer pre,.error-boundary code,.error-boundary pre,.note-dialog code,.note-dialog pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,"Ubuntu Mono","Courier New",monospace;font-family:var(--sn-stylekit-monospace-font)}#viewContainer .hljs,.error-boundary .hljs,.note-dialog .hljs{color:var(--sn-stylekit-contrast-foreground-color)}#viewContainer .hljs-tag,.error-boundary .hljs-tag,.note-dialog .hljs-tag{color:var(--sn-stylekit-foreground-color)}#viewContainer code,.error-boundary code,.note-dialog code{box-sizing:border-box;word-wrap:break-word;padding:.2em .4em;margin:0;font-size:85%;background-color:var(--sn-stylekit-contrast-background-color);border-radius:3px}#viewContainer pre,.error-boundary pre,.note-dialog pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-foreground-color);border-radius:3px;word-wrap:normal;margin-top:0;margin-bottom:16px}#viewContainer pre>code,.error-boundary pre>code,.note-dialog pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;background-color:transparent;border:0}#viewContainer pre code,.error-boundary pre code,.note-dialog pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;background-color:initial;border:0}#viewContainer>div>:first-child,.error-boundary>:first-child{margin-top:0}#settingsContainer{display:flex;flex-direction:row;margin-bottom:auto;margin-top:auto;opacity:.2;overflow-x:auto;padding-bottom:.1em;padding-left:1em;padding-top:.1em;transition:opacity .4s ease-out}@media screen and (max-width:720px){#settingsContainer{padding-left:.5em}}@media screen and (max-width:500px){#settingsContainer{opacity:.5}}@media screen and (min-width:840px){#settingsContainer.hide{opacity:0}}#settingsContainer.focused,#settingsContainer:focus,#settingsContainer:hover{opacity:1;transition:opacity .25s ease-in}.settings{color:var(--sn-stylekit-foreground-color);display:flex;padding-right:.5em}.settings.buttons{padding-right:0}.settings.buttons .button{margin-right:.5em}.settings .button{border-width:0;max-height:22.6px;padding:0 .5em}.settings input[type=checkbox i]:hover,.settings select:hover{cursor:pointer}.settings .label{display:block;font-size:16px;text-align:center}.settings label{min-height:22.6px}.settings select{background-color:var(--sn-stylekit-background-color);color:var(--sn-stylekit-foreground-color);font-size:16px}@media screen and (max-width:1068px){.settings{flex-direction:column}.settings.buttons{flex-direction:row}}.MonacoEditorContainer .monaco-editor .scroll-decoration{box-shadow:none}.sn-theme .monaco-editor .line-numbers{color:var(--sn-stylekit-foreground-color);opacity:.6}.sn-theme .monaco-editor,.sn-theme .monaco-editor-background,.sn-theme .monaco-editor .inputarea.ime-input,.sn-theme .monaco-editor .margin{background-color:var(--sn-stylekit-background-color)}.sn-theme .monaco-editor .find-widget{box-shadow:0 2px 8px var(--sn-stylekit-shadow-color);background-color:var(--sn-stylekit-contrast-background-color)}.sn-theme .monaco-editor .find-widget>.find-part .monaco-inputbox,.sn-theme .monaco-editor .find-widget>.replace-part .monaco-inputbox{background-color:var(--sn-stylekit-background-color)!important;border-color:var(--sn-stylekit-border-color)!important}.sn-theme .monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline-color:var(--sn-stylekit-info-color)}.sn-theme .monaco-editor .find-widget>.find-part .monaco-inputbox>.wrapper>.input,.sn-theme .monaco-editor .find-widget>.replace-part .monaco-inputbox>.wrapper>.input{color:var(--sn-stylekit-foreground-color)!important}.sn-theme .monaco-editor .find-widget.no-results .matchesCount{color:var(--sn-stylekit-danger-color)}.sn-theme .monaco-editor .minimap-shadow-visible{box-shadow:var(--sn-stylekit-shadow-color) -6px 0 6px -6px inset}.sn-theme .quick-input-widget.show-file-icons{background-color:var(--sn-stylekit-contrast-background-color)!important;color:var(--sn-stylekit-foreground-color)!important;box-shadow:var(--sn-stylekit-shadow-color) 0 5px 8px!important}.sn-theme .monaco-editor .find-widget,.sn-theme .monaco-editor .monaco-keybinding-key,.sn-theme .monaco-editor .monaco-list-row,.sn-theme .mtk1{color:var(--sn-stylekit-foreground-color)}.sn-theme .monaco-editor .quick-input-list-separator{color:var(--sn-stylekit-info-color)}@media (prefers-color-scheme:light){.sn-theme .mtk10{color:var(--sn-stylekit-foreground-color)}.sn-theme .mtk6{color:var(--sn-stylekit-success-color)}.sn-theme .mtk20,.sn-theme .mtk20.detected-link,.sn-theme .mtk21,.sn-theme .mtk21.detected-link{color:var(--sn-stylekit-info-color);opacity:.95}}@media (prefers-color-scheme:dark){.sn-theme .mtk9{color:var(--sn-stylekit-success-color);opacity:.95}.sn-theme .mtk5,.sn-theme .mtk5.detected-link{color:var(--sn-stylekit-info-color);opacity:.95}}.error-boundary{background-color:var(--sn-stylekit-background-color);color:var(--sn-stylekit-foreground-color);font-size:16px;font-size:var(--sn-stylekit-font-size-editor)}.note-overlay{position:fixed!important;width:100%;height:100%;top:0;left:0;right:0;bottom:0;z-index:100}.note-dialog{max-width:700px;width:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:200;line-height:normal;padding:0}.note-dialog button{color:var(--sn-stylekit-foreground-color);background-color:transparent;border-width:0;font-family:var(--sn-stylekit-sans-serif-font);font-size:16px;font-size:var(--sn-stylekit-font-size-editor)}.note-dialog button:hover{background-color:var(--sn-stylekit-contrast-background-color);cursor:pointer}.note-dialog button:focus{outline:1px auto -webkit-focus-ring-color;outline-color:-webkit-focus-ring-color;outline-style:auto;outline-width:1px}.note-dialog .title-section{padding-top:0}.note-dialog .title-section h1,.note-dialog .title-section h2{margin:.2em 0}.note-dialog .sk-panel-section:last-child{margin-bottom:0}.note-dialog .sk-button.info,.note-dialog .sk-button.neutral{font-size:16px;font-size:var(--sn-stylekit-font-size-editor)}@media screen and (max-width:650px){.note-dialog .sk-button.info,.note-dialog .sk-button.neutral{font-size:18px}}.inline-text-and-svg{display:inline-flex;padding-left:0;padding-right:0}.inline-text-and-svg svg{opacity:.75;margin-bottom:auto;margin-top:auto}@media print{.print-url a[href]:after{content:" (" attr(href) ")"}.sn-component,textarea{outline:none}body,html{overflow:unset}#contentContainer{height:100%;max-height:unset;padding-top:0;width:100%}#contentContainer #viewContainer{width:100%!important}#contentContainer #viewContainer pre code{white-space:pre-wrap;word-break:break-word}#settingsContainer,.MonacoEditorContainerParentDiv{display:none}}@media (prefers-color-scheme:dark){:root{--primary-bg-color:#292937;--secondary-bg-color:#313142;--editor-bg-color:#202020;--border-color:#13131a;--ui-text-color:#d8d8d8;--sn-stylekit-info-color:#086dd6;--sn-stylekit-info-contrast-color:#fff;--sn-stylekit-neutral-color:#7c7c7c;--sn-stylekit-neutral-contrast-color:#fff;--sn-stylekit-success-color:#2b9612;--sn-stylekit-success-contrast-color:#fff;--sn-stylekit-warning-color:#f6a200;--sn-stylekit-warning-contrast-color:#fff;--sn-stylekit-danger-color:#f80324;--sn-stylekit-danger-contrast-color:#fff;--sn-desktop-titlebar-bg-color:var(--primary-bg-color);--sn-desktop-titlebar-border-color:var(--border-color);--sn-desktop-titlebar-ui-color:var(--ui-text-color);--sn-desktop-titlebar-ui-hover-color:var(--sn-stylekit-info-color);--sn-stylekit-shadow-color:#20202b;--sn-stylekit-background-color:#20202b;--sn-stylekit-border-color:var(--border-color);--sn-stylekit-foreground-color:var(--ui-text-color);--sn-stylekit-contrast-background-color:var(--secondary-bg-color);--sn-stylekit-contrast-foreground-color:var(--ui-text-color);--sn-stylekit-contrast-border-color:var(--border-color);--sn-stylekit-secondary-background-color:#292937;--sn-stylekit-secondary-foreground-color:var(--ui-text-color);--sn-stylekit-secondary-border-color:var(--border-color);--sn-stylekit-secondary-contrast-background-color:#45445a;--sn-stylekit-secondary-contrast-foreground-color:var(--ui-text-color);--sn-stylekit-secondary-contrast-border-color:var(--border-color);--sn-stylekit-editor-background-color:var(--sn-stylekit-background-color);--sn-stylekit-editor-foreground-color:var(--sn-stylekit-foreground-color);--sn-stylekit-paragraph-text-color:var(--ui-text-color);--sn-stylekit-scrollbar-track-border-color:var(--border-color);--sn-stylekit-scrollbar-thumb-color:var(--sn-stylekit-info-color)}} +/*# sourceMappingURL=main.61f56e2a.chunk.css.map */ \ No newline at end of file diff --git a/static/css/main.61f56e2a.chunk.css.map b/static/css/main.61f56e2a.chunk.css.map new file mode 100644 index 0000000..d087db0 --- /dev/null +++ b/static/css/main.61f56e2a.chunk.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://src/index.scss","webpack://node_modules/highlight.js/scss/vs.scss","webpack://src/stylesheets/main.scss","webpack://src/stylesheets/print.scss","webpack://src/stylesheets/dark.scss"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCAAkC,CACnC,KAGC,yEACW,CCNb,MACE,aAAc,CACd,eAAgB,CAChB,YAAc,CACd,eAAiB,CACjB,UAAY,CACb,yCAKC,WAAc,CACf,qEAOC,UAAW,CACZ,0IAWC,aAAc,CACf,oEAMC,aAAc,CACf,aAGC,UAAc,CACf,WAGC,SAAW,CACZ,qCAKC,aAAc,CACf,eAIC,iBAAkB,CACnB,aAGC,eAAiB,CC/DnB,MACE,mCAA+B,CAC/B,gHAA6B,CAE9B,UAIC,4BAA6B,CAC7B,oDAAqD,CACrD,8CAA+C,CAC/C,2CAA4C,CAC5C,WAAY,CACZ,QAAS,CACT,SAAU,CACV,UAAW,CAEX,iBAAkB,CACnB,EAIC,yCAA6C,CAC9C,cAGC,YAAa,CACb,qBAAsB,CACtB,cAA8C,CAA9C,6CAA8C,CAC9C,gBAAiB,CACjB,oCALF,cAMI,iCAAkC,CAoBrC,CA1BD,iBASI,wBAAyB,CAT7B,2BAWM,UAAc,CAXpB,sBAeI,wBAAyB,CAf7B,gCAiBM,aAAc,CAjBpB,uBAqBI,qBAAyB,CArB7B,iCAuBM,UAAc,CACf,kBAMH,YAAa,CACb,kBAAmB,CAiBnB,uBAAwB,CAExB,2BAA4B,CAC5B,2BAA4B,CAC5B,6BAAY,CAvBd,qGAUM,UAAW,CAVjB,uHAgBM,SAAU,CACX,qCAjBL,kBAyBI,gCAAY,CAaf,CAXC,qCA3BF,kBA4BI,+BAAY,CAUf,CAPC,oCA/BF,kBAgCI,+BAAY,CAMf,CAtCD,+BAoCI,6BAAY,CACb,gCAKD,eAAgB,CAGhB,2BAA6B,CAC7B,iBAAkB,CAClB,eAAgB,CAChB,UAAW,CACZ,kDAIC,WAAY,CACZ,UAAW,CACZ,4CAMC,oDAAqD,CACrD,cAA8C,CAA9C,6CAA8C,CAI9C,eAAgB,CAChB,aAAc,CACd,WAAY,CALZ,oCALF,4CAMI,cAAe,CA2IlB,CAjJD,kDAaI,mCAAoC,CACpC,oBAAqB,CAdzB,oEAkBI,yBAA0B,CAlB9B,6EAwBI,eAAmB,CACnB,aAAc,CACd,aAAc,CACd,+BAAiC,CA3BrC,qDA+BI,iDAAmD,CA/BvD,wDAmCI,cAAe,CAnCnB,8DAuCI,aAAc,CACd,UAAW,CACX,aAAc,CACd,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,wBAAyB,CA7C7B,uEAgDM,4BAA6B,CAC7B,6DAA8D,CAjDpE,8IAsDM,gBAAiB,CACjB,yDAA0D,CAvDhE,iHA2DM,6DAEC,CA7DP,6PAgEQ,oDAAqD,CAhE7D,sFAsEM,cAAe,CACf,mCAAoC,CAvE1C,wGA0EM,yBAA0B,CA1EhC,+JAiFI,kBAAmB,CAjFvB,mHAuFI,+FAAA,CAAA,6CAA8C,CAvFlD,8DA0FI,kDAAmD,CA1FvD,0EA6FI,yCAA0C,CA7F9C,2DAiGI,qBAAsB,CACtB,oBAAqB,CACrB,iBAAoB,CACpB,QAAS,CACT,aAAc,CACd,6DAEC,CACD,iBAAkB,CAzGtB,wDA6GI,YAAa,CACb,aAAc,CACd,aAAc,CACd,gBAAiB,CACjB,6DAEC,CACD,yCAA0C,CAC1C,iBAAkB,CAClB,gBAAiB,CACjB,YAAa,CACb,kBAAmB,CAxHvB,uEA4HI,SAAU,CACV,QAAS,CACT,cAAe,CACf,iBAAkB,CAClB,eAAgB,CAChB,sBAAuB,CACvB,4BAA6B,CAC7B,QAAS,CAnIb,uEAuII,cAAe,CACf,cAAe,CACf,SAAU,CACV,QAAS,CACT,gBAAiB,CACjB,mBAAoB,CACpB,gBAAiB,CACjB,4BAAyB,CAAzB,wBAAyB,CACzB,QAAS,CACV,6DAKD,YAAe,CAChB,mBAIC,YAAa,CACb,kBAAmB,CACnB,kBAAmB,CACnB,eAAgB,CAChB,UAAY,CACZ,eAAgB,CAChB,mBAAqB,CACrB,gBAAiB,CACjB,gBAAkB,CAClB,+BAAkC,CAClC,oCAXF,mBAYI,iBAAmB,CAiBtB,CAfC,oCAdF,mBAeI,UAAY,CAcf,CAXC,oCAlBF,wBAoBM,SAAU,CACX,CArBL,6EA0BI,SAAU,CACV,+BAAiC,CAClC,UAID,yCAA0C,CAC1C,YAAa,CACb,kBAAoB,CAHtB,kBAKI,eAAkB,CALtB,0BAQI,iBAAmB,CARvB,kBAWI,cAAiB,CACjB,iBAAkB,CAClB,cAAkB,CAbtB,8DAiBI,cAAe,CAjBnB,iBAoBI,aAAc,CACd,cAAe,CACf,iBAAkB,CAtBtB,gBAyBI,iBAAkB,CAzBtB,iBA4BI,oDAAqD,CACrD,yCAA0C,CAE1C,cAAe,CAChB,qCAhCH,UAkCI,qBAAsB,CAlC1B,kBAoCM,kBAAmB,CACpB,CAKL,yDAGI,eAAgB,CACjB,uCAMC,yCAA0C,CAC1C,UAAY,CAHhB,4IAWI,oDAAqD,CAXzD,sCAgBI,oDAAqD,CACrD,6DAA8D,CAjBlE,uIAqBI,8DAAgE,CAChE,sDAAwD,CAtB5D,uEAyBI,2CAA4C,CAzBhD,uKAkCI,mDAAqD,CAlCzD,+DAqCI,qCAAsC,CArC1C,iDA0CI,gEAAiE,CA1CrE,8CA+CI,uEAAyE,CACzE,mDAAqD,CACrD,8DAAkE,CAjDtE,gJA0DI,yCAA0C,CA1D9C,qDA+DI,mCAAoC,CACrC,oCAhEH,iBAqEM,yCAA0C,CArEhD,gBAyEM,sCAAuC,CAzE7C,gGAgFM,mCAAoC,CACpC,WAAa,CACd,CAGH,mCArFF,gBAwFM,sCAAuC,CACvC,WAAa,CAzFnB,8CA8FM,mCAAoC,CACpC,WAAa,CACd,CAIL,gBACE,oDAAqD,CACrD,yCAA0C,CAC1C,cAAA,CAAA,6CAA8C,CAC/C,cAIC,wBAA0B,CAC1B,UAAW,CACX,WAAY,CACZ,KAAM,CACN,MAAO,CACP,OAAQ,CACR,QAAS,CACT,WAAY,CACb,aAKC,eAAgB,CAChB,UAAW,CACX,iBAAkB,CAClB,OAAQ,CACR,QAAS,CACT,8BAAgC,CAChC,WAAY,CAEZ,kBAAmB,CACnB,SAAY,CAXd,oBAcI,yCAA0C,CAC1C,4BAA6B,CAC7B,cAAiB,CACjB,8CAA+C,CAC/C,cAAA,CAAA,6CAA8C,CAlBlD,0BAqBI,6DAA8D,CAC9D,cAAe,CAtBnB,0BAyBI,yCAA0C,CAC1C,sCAAuC,CACvC,kBAAmB,CACnB,iBAAkB,CA5BtB,4BAgCI,aAAgB,CAhCpB,8DAmCM,aAAiB,CAnCvB,0CAwCI,eAAkB,CAxCtB,6DA6CI,cAAA,CAAA,6CAA8C,CAC9C,oCA9CJ,6DA+CM,cAAe,CAElB,CAGH,qBACE,mBAAoB,CACpB,cAAiB,CACjB,eAAkB,CAHpB,yBAKI,WAAa,CACb,kBAAmB,CACnB,eAAgB,CACjB,aC/gBD,yBAEI,2BAA4B,CAC7B,uBAKD,YAAa,CACd,UAIC,cAAe,CAChB,kBAGC,WAAY,CACZ,gBAAiB,CACjB,aAAgB,CAChB,UAAW,CAJb,iCAMI,oBAAsB,CAN1B,0CAQM,oBAAqB,CACrB,qBAAsB,CACvB,mDAMH,YAAa,CACd,CClCH,mCAIE,MACE,0BAAmB,CACnB,4BAAqB,CACrB,yBAAkB,CAClB,sBAAe,CACf,uBAAgB,CAEhB,gCAAyB,CACzB,sCAAkC,CAElC,mCAA4B,CAC5B,yCAAqC,CAErC,mCAA4B,CAC5B,yCAAqC,CAErC,mCAA4B,CAC5B,yCAAqC,CAErC,kCAA2B,CAC3B,wCAAoC,CAEpC,sDAA+B,CAC/B,sDAAmC,CACnC,mDAA+B,CAC/B,kEAAqC,CAGrC,kCAA2B,CAE3B,sCAA+B,CAC/B,8CAA2B,CAC3B,mDAA+B,CAE/B,iEAAwC,CACxC,4DAAwC,CACxC,uDAAoC,CAEpC,gDAAyC,CACzC,6DAAyC,CACzC,wDAAqC,CAErC,yDAAkD,CAClD,sEAAkD,CAClD,iEAA8C,CAE9C,yEAAsC,CACtC,yEAAsC,CAEtC,uDAAmC,CAEnC,8DAA2C,CAC3C,iEAAoC,CACrC","file":"main.61f56e2a.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n","/*\n\nVisual Studio-like style based on original C# coloring by Jason Diamond \n\n*/\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n background: white;\n color: black;\n}\n\n.hljs-comment,\n.hljs-quote,\n.hljs-variable {\n color: #008000;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-built_in,\n.hljs-name,\n.hljs-tag {\n color: #00f;\n}\n\n.hljs-string,\n.hljs-title,\n.hljs-section,\n.hljs-attribute,\n.hljs-literal,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-type,\n.hljs-addition {\n color: #a31515;\n}\n\n.hljs-deletion,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-meta {\n color: #2b91af;\n}\n\n.hljs-doctag {\n color: #808080;\n}\n\n.hljs-attr {\n color: #f00;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link {\n color: #00b0e8;\n}\n\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n","@import '~sn-stylekit/dist/stylekit.css';\n@import '~highlight.js/scss/vs.scss';\n\n:root {\n --sn-stylekit-font-size-editor: 16px;\n --sn-stylekit-monospace-font: SFMono-Regular, Consolas, Liberation Mono, Menlo,\n 'Ubuntu Mono', 'Courier New', monospace;\n}\n\nbody,\nhtml {\n background-color: transparent;\n background-color: var(--sn-stylekit-background-color);\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-base-font-size);\n height: 100%;\n margin: 0;\n padding: 0;\n width: 100%;\n /* This is used to prevent KaTeX from overflowing the page */\n overflow-y: hidden;\n}\n\n* {\n // To prevent gray flash when focusing input on mobile Safari\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.sn-component {\n display: flex;\n flex-direction: column;\n font-size: var(--sn-stylekit-font-size-editor);\n min-height: 100vh;\n @media screen and (max-width: 420px) {\n min-height: -webkit-fill-available;\n }\n &.vs {\n background-color: #fffffe;\n .settings {\n color: #000000;\n }\n }\n &.vs-dark {\n background-color: #1e1e1e;\n .settings {\n color: #d4d4d4;\n }\n }\n &.hc-black {\n background-color: #000000;\n .settings {\n color: #ffffff;\n }\n }\n}\n\n/* Content */\n#contentContainer {\n display: flex;\n flex-direction: row;\n &.editMode {\n .MonacoEditorContainerParentDiv {\n width: 100%;\n }\n }\n &.viewMode {\n #viewContainer {\n width: 100%;\n }\n }\n &.editMode.viewMode {\n .MonacoEditorContainerParentDiv,\n #viewContainer {\n width: 50%;\n }\n }\n height: var(--heightVar);\n /* Needs both max and min for the MonacoEditorContainerParentDiv */\n max-height: var(--heightVar);\n min-height: var(--heightVar);\n --heightVar: calc(100vh - 2em);\n @media screen and (max-width: 1172px) {\n --heightVar: calc(100vh - 3.25em);\n }\n @media screen and (max-width: 1068px) {\n --heightVar: calc(100vh - 3.5em);\n }\n /* For three lines of settings */\n @media screen and (max-width: 840px) {\n --heightVar: calc(100vh - 5.5em);\n }\n /* Make settings small when hidden */\n &.hideSettings {\n --heightVar: calc(100vh - 2em);\n }\n}\n\n/** Monaco Editor Parent div*/\n.MonacoEditorContainerParentDiv {\n min-width: 150px;\n // Hides the horizontal scroll bar when using the Monaco Editor\n // Otherwise the horizontal scroll bar will flash when the Monaco editor suggests words\n overflow-x: hidden !important;\n overflow-y: hidden;\n padding-top: 1em;\n width: 100%;\n}\n\n.MonacoEditorContainer,\n.MonacoDiffEditorContainer {\n height: 100%;\n width: 100%;\n}\n\n/* view mode */\n#viewContainer,\n.error-boundary,\n.note-dialog {\n background-color: var(--sn-stylekit-background-color);\n font-size: var(--sn-stylekit-font-size-editor);\n @media screen and (max-width: 650px) {\n font-size: 18px;\n }\n line-height: 1.7;\n overflow: auto;\n padding: 1em;\n\n a {\n color: var(--sn-stylekit-info-color); // #086dd6;\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n blockquote {\n margin: 0;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0 1em;\n color: #6a737d;\n border-left: 0.25em solid #dfe2e5;\n }\n\n hr {\n border: 0.5px solid var(--sn-stylekit-border-color);\n }\n\n img {\n max-width: 100%; // 645.500px;\n }\n\n table {\n display: block;\n width: 100%;\n overflow: auto;\n margin-top: 0;\n margin-bottom: 16px;\n border-spacing: 0;\n border-collapse: collapse;\n\n tr {\n background-color: transparent; // #fff;\n border-top: 1px solid var(--sn-stylekit-contrast-border-color); // #c6cbd1;\n }\n\n td,\n th {\n padding: 6px 13px;\n border: 1px solid var(--sn-stylekit-contrast-border-color); // #dfe2e5;\n }\n\n tr:nth-child(2n) {\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // #f6f8fa;\n code,\n pre {\n background-color: var(--sn-stylekit-background-color);\n }\n }\n }\n summary {\n .link {\n display: inline;\n color: var(--sn-stylekit-info-color);\n }\n .link:hover {\n text-decoration: underline;\n }\n }\n\n h1,\n h2,\n h3 {\n line-height: normal;\n }\n\n /* Code */\n code,\n pre {\n font-family: var(--sn-stylekit-monospace-font);\n }\n .hljs {\n color: var(--sn-stylekit-contrast-foreground-color);\n }\n .hljs-tag {\n color: var(--sn-stylekit-foreground-color);\n }\n\n code {\n box-sizing: border-box;\n word-wrap: break-word;\n padding: 0.2em 0.4em;\n margin: 0;\n font-size: 85%;\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // rgba(27,31,35,.05);\n border-radius: 3px;\n }\n\n pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: var(\n --sn-stylekit-contrast-background-color\n ); // rgba(27,31,35,.05);// #f6f8fa; the latter doesn't work well on dark mode\n color: var(--sn-stylekit-foreground-color);\n border-radius: 3px;\n word-wrap: normal;\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n pre > code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n background-color: transparent;\n border: 0;\n }\n\n pre code {\n display: inline;\n max-width: auto;\n padding: 0;\n margin: 0;\n overflow: visible;\n line-height: inherit;\n word-wrap: normal;\n background-color: initial;\n border: 0;\n }\n}\n\n.error-boundary > :nth-child(1),\n#viewContainer > div > :nth-child(1) {\n margin-top: 0px;\n}\n\n/** Settings */\n#settingsContainer {\n display: flex;\n flex-direction: row;\n margin-bottom: auto;\n margin-top: auto;\n opacity: 0.2;\n overflow-x: auto;\n padding-bottom: 0.1em;\n padding-left: 1em;\n padding-top: 0.1em;\n transition: opacity 400ms ease-out;\n @media screen and (max-width: 720px) {\n padding-left: 0.5em;\n }\n @media screen and (max-width: 500px) {\n opacity: 0.5;\n }\n /* If screen is big enough to fit all buttons */\n @media screen and (min-width: 840px) {\n &.hide {\n opacity: 0;\n }\n }\n &:focus,\n &:hover,\n &.focused {\n opacity: 1;\n transition: opacity 250ms ease-in;\n }\n}\n\n.settings {\n color: var(--sn-stylekit-foreground-color);\n display: flex;\n padding-right: 0.5em;\n &.buttons {\n padding-right: 0px;\n }\n &.buttons .button {\n margin-right: 0.5em;\n }\n .button {\n border-width: 0px;\n max-height: 22.6px;\n padding: 0px 0.5em;\n }\n input[type='checkbox' i]:hover,\n select:hover {\n cursor: pointer;\n }\n .label {\n display: block;\n font-size: 16px;\n text-align: center;\n }\n label {\n min-height: 22.6px;\n }\n select {\n background-color: var(--sn-stylekit-background-color);\n color: var(--sn-stylekit-foreground-color);\n //font-size: var(--sn-stylekit-font-size-editor);\n font-size: 16px;\n }\n @media screen and (max-width: 1068px) {\n flex-direction: column;\n &.buttons {\n flex-direction: row;\n }\n }\n}\n\n/* Persist for all themes */\n.MonacoEditorContainer {\n /* This hides the shadow at the top of the editor */\n .monaco-editor .scroll-decoration {\n box-shadow: none;\n }\n}\n\n/* Only for Sn theme */\n.sn-theme {\n .monaco-editor .line-numbers {\n color: var(--sn-stylekit-foreground-color);\n opacity: 0.6;\n }\n\n /** This is the editing / input container */\n .monaco-editor,\n .monaco-editor .margin, /* This is the line numbers container */\n .monaco-editor-background,\n .monaco-editor .inputarea.ime-input {\n background-color: var(--sn-stylekit-background-color);\n }\n\n /* Find widget */\n .monaco-editor .find-widget {\n box-shadow: 0 2px 8px var(--sn-stylekit-shadow-color);\n background-color: var(--sn-stylekit-contrast-background-color);\n }\n .monaco-editor .find-widget > .find-part .monaco-inputbox,\n .monaco-editor .find-widget > .replace-part .monaco-inputbox {\n background-color: var(--sn-stylekit-background-color) !important;\n border-color: var(--sn-stylekit-border-color) !important;\n }\n .monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\n outline-color: var(--sn-stylekit-info-color);\n }\n .monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input,\n .monaco-editor\n .find-widget\n > .replace-part\n .monaco-inputbox\n > .wrapper\n > .input {\n color: var(--sn-stylekit-foreground-color) !important;\n }\n .monaco-editor .find-widget.no-results .matchesCount {\n color: var(--sn-stylekit-danger-color);\n }\n\n /* Mini Map */\n .monaco-editor .minimap-shadow-visible {\n box-shadow: var(--sn-stylekit-shadow-color) -6px 0 6px -6px inset;\n }\n\n /* Quick input widget */\n .quick-input-widget.show-file-icons {\n background-color: var(--sn-stylekit-contrast-background-color) !important;\n color: var(--sn-stylekit-foreground-color) !important;\n box-shadow: var(--sn-stylekit-shadow-color) 0px 5px 8px !important;\n }\n\n /* This is for the text and keyboard items in the list when you right click and press F1 \n and also the icons in the find widget */\n .monaco-editor .monaco-list-row,\n .monaco-editor .monaco-keybinding-key,\n .monaco-editor .find-widget,\n .mtk1 {\n color: var(--sn-stylekit-foreground-color);\n }\n\n /* This is for 'recently used' and 'other commands' */\n .monaco-editor .quick-input-list-separator {\n color: var(--sn-stylekit-info-color);\n }\n\n @media (prefers-color-scheme: light) {\n /* This is for normal text */\n .mtk10 {\n color: var(--sn-stylekit-foreground-color);\n }\n /* This is for headers */\n .mtk6 {\n color: var(--sn-stylekit-success-color);\n }\n /* This is for links */\n .mtk20,\n .mtk20.detected-link,\n .mtk21,\n .mtk21.detected-link {\n color: var(--sn-stylekit-info-color);\n opacity: 0.95;\n }\n }\n\n @media (prefers-color-scheme: dark) {\n /* This is for headers */\n .mtk9 {\n color: var(--sn-stylekit-success-color);\n opacity: 0.95;\n }\n /* This is for links */\n .mtk5,\n .mtk5.detected-link {\n color: var(--sn-stylekit-info-color);\n opacity: 0.95;\n }\n }\n}\n\n.error-boundary {\n background-color: var(--sn-stylekit-background-color);\n color: var(--sn-stylekit-foreground-color);\n font-size: var(--sn-stylekit-font-size-editor);\n}\n\n/* For Print */\n.note-overlay {\n position: fixed !important;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 100;\n}\n\n/* Also for Print */\n.note-dialog {\n /* Positioning */\n max-width: 700px;\n width: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 200;\n /* Content */\n line-height: normal;\n padding: 0px;\n /* Button */\n button {\n color: var(--sn-stylekit-foreground-color);\n background-color: transparent;\n border-width: 0px;\n font-family: var(--sn-stylekit-sans-serif-font);\n font-size: var(--sn-stylekit-font-size-editor);\n }\n button:hover {\n background-color: var(--sn-stylekit-contrast-background-color);\n cursor: pointer;\n }\n button:focus {\n outline: -webkit-focus-ring-color auto 1px;\n outline-color: -webkit-focus-ring-color;\n outline-style: auto;\n outline-width: 1px;\n }\n /* Title */\n .title-section {\n padding-top: 0px;\n h1,\n h2 {\n margin: 0.2em 0px;\n }\n }\n /* Section */\n .sk-panel-section:last-child {\n margin-bottom: 0px;\n }\n /* Footer */\n .sk-button.info,\n .sk-button.neutral {\n font-size: var(--sn-stylekit-font-size-editor);\n @media screen and (max-width: 650px) {\n font-size: 18px;\n }\n }\n}\n\n.inline-text-and-svg {\n display: inline-flex;\n padding-left: 0px;\n padding-right: 0px;\n svg {\n opacity: 0.75;\n margin-bottom: auto;\n margin-top: auto;\n }\n}\n\n@import './print.scss';\n@import './dark.scss';\n","@media print {\n .print-url {\n a[href]:after {\n content: ' (' attr(href) ')';\n }\n }\n\n .sn-component,\n textarea {\n outline: none;\n }\n\n html,\n body {\n overflow: unset;\n }\n\n #contentContainer {\n height: 100%;\n max-height: unset;\n padding-top: 0px;\n width: 100%;\n #viewContainer {\n width: 100% !important;\n pre code {\n white-space: pre-wrap;\n word-break: break-word;\n }\n }\n }\n\n .MonacoEditorContainerParentDiv,\n #settingsContainer {\n display: none;\n }\n}\n","@media (prefers-color-scheme: dark) {\n // This is the Midnight theme available here:\n // https://github.com/sn-extensions/midnight-theme\n // Licensed under AGPL-3.0\n :root {\n --primary-bg-color: #292937;\n --secondary-bg-color: #313142;\n --editor-bg-color: #202020;\n --border-color: #13131a;\n --ui-text-color: #d8d8d8;\n\n --sn-stylekit-info-color: #086dd6;\n --sn-stylekit-info-contrast-color: white;\n\n --sn-stylekit-neutral-color: #7c7c7c;\n --sn-stylekit-neutral-contrast-color: white;\n\n --sn-stylekit-success-color: #2b9612;\n --sn-stylekit-success-contrast-color: white;\n\n --sn-stylekit-warning-color: #f6a200;\n --sn-stylekit-warning-contrast-color: white;\n\n --sn-stylekit-danger-color: #f80324;\n --sn-stylekit-danger-contrast-color: white;\n\n --sn-desktop-titlebar-bg-color: var(--primary-bg-color);\n --sn-desktop-titlebar-border-color: var(--border-color);\n --sn-desktop-titlebar-ui-color: var(--ui-text-color);\n --sn-desktop-titlebar-ui-hover-color: var(--sn-stylekit-info-color);\n\n // StyleKit Vars\n --sn-stylekit-shadow-color: #20202b;\n\n --sn-stylekit-background-color: #20202b;\n --sn-stylekit-border-color: var(--border-color);\n --sn-stylekit-foreground-color: var(--ui-text-color);\n\n --sn-stylekit-contrast-background-color: var(--secondary-bg-color);\n --sn-stylekit-contrast-foreground-color: var(--ui-text-color);\n --sn-stylekit-contrast-border-color: var(--border-color);\n\n --sn-stylekit-secondary-background-color: #292937;\n --sn-stylekit-secondary-foreground-color: var(--ui-text-color);\n --sn-stylekit-secondary-border-color: var(--border-color);\n\n --sn-stylekit-secondary-contrast-background-color: #45445a;\n --sn-stylekit-secondary-contrast-foreground-color: var(--ui-text-color);\n --sn-stylekit-secondary-contrast-border-color: var(--border-color);\n\n --sn-stylekit-editor-background-color: var(--sn-stylekit-background-color);\n --sn-stylekit-editor-foreground-color: var(--sn-stylekit-foreground-color);\n\n --sn-stylekit-paragraph-text-color: var(--ui-text-color);\n\n --sn-stylekit-scrollbar-track-border-color: var(--border-color);\n --sn-stylekit-scrollbar-thumb-color: var(--sn-stylekit-info-color);\n }\n}\n"]} \ No newline at end of file diff --git a/static/js/0.fbc33ed6.chunk.js b/static/js/0.fbc33ed6.chunk.js new file mode 100644 index 0000000..ff426b6 --- /dev/null +++ b/static/js/0.fbc33ed6.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[0],{805:function(e,t,n){"use strict";n.r(t),n.d(t,"conf",(function(){return i})),n.d(t,"language",(function(){return r}));var i={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")}}},r={defaultToken:"",tokenPostfix:".cpp",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],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"}]]]}}}}]); +//# sourceMappingURL=0.fbc33ed6.chunk.js.map \ No newline at end of file diff --git a/static/js/0.fbc33ed6.chunk.js.map b/static/js/0.fbc33ed6.chunk.js.map new file mode 100644 index 0000000..4e17923 --- /dev/null +++ b/static/js/0.fbc33ed6.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.js"],"names":["conf","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","folding","markers","start","RegExp","end","language","defaultToken","tokenPostfix","token","keywords","operators","symbols","escapes","integersuffix","floatsuffix","encoding","tokenizer","root","next","cases","include","whitespace","comment","doccomment","string","raw"],"mappings":"4GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,YAErCC,iBAAkB,CACd,CAAEH,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBG,QAAS,CACLC,QAAS,CACLC,MAAO,IAAIC,OAAO,6BAClBC,IAAK,IAAID,OAAO,mCAIjBE,EAAW,CAClBC,aAAc,GACdC,aAAc,OACdb,SAAU,CACN,CAAEc,MAAO,kBAAmBZ,KAAM,IAAKC,MAAO,KAC9C,CAAEW,MAAO,wBAAyBZ,KAAM,IAAKC,MAAO,KACpD,CAAEW,MAAO,mBAAoBZ,KAAM,IAAKC,MAAO,KAC/C,CAAEW,MAAO,kBAAmBZ,KAAM,IAAKC,MAAO,MAElDY,SAAU,CACN,WACA,MACA,QACA,OACA,OACA,QACA,OACA,QACA,OACA,QACA,QACA,YACA,aACA,WACA,MACA,WACA,UACA,WACA,SACA,KACA,SACA,eACA,OACA,OACA,OACA,QACA,WACA,SACA,SACA,QACA,QACA,UACA,QACA,MACA,SACA,QACA,UACA,OACA,KACA,KACA,WACA,SACA,MACA,YACA,eACA,WACA,UACA,OACA,UACA,YACA,MACA,WACA,UACA,YACA,WACA,WACA,UACA,SACA,UACA,UACA,WACA,YACA,SACA,MACA,WACA,mBACA,WACA,SACA,YACA,SACA,QACA,SACA,SACA,SACA,gBACA,cACA,SACA,SACA,WACA,OACA,eACA,QACA,cACA,OACA,MACA,UACA,SACA,WACA,QACA,WACA,QACA,UACA,OACA,WACA,UACA,QACA,QACA,OACA,SACA,SACA,YACA,YACA,aACA,iBACA,UACA,wBACA,UACA,sBACA,WACA,uBACA,OACA,aACA,YACA,QACA,WACA,UACA,QACA,oBACA,UACA,YACA,aACA,aACA,UACA,WACA,aACA,YACA,gBACA,OACA,SACA,eACA,cACA,kBACA,WACA,WACA,UACA,UACA,UACA,SACA,cACA,UACA,SACA,UACA,UACA,SACA,UACA,UACA,QACA,yBACA,YACA,SACA,SACA,aACA,eACA,WACA,QACA,WACA,aACA,UACA,UACA,UACA,aACA,WACA,WACA,uBACA,YACA,UACA,aACA,QACA,aACA,WACA,cACA,WACA,WACA,UACA,wBACA,QACA,aAEJC,UAAW,CACP,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,QAGJC,QAAS,wBACTC,QAAS,wEACTC,cAAe,mCACfC,YAAa,UACbC,SAAU,WAEVC,UAAW,CACPC,KAAM,CAEF,CAAC,mCAAoC,CAAET,MAAO,mBAAoBU,KAAM,YAExE,CACI,eACA,CACIC,MAAO,CACH,YAAa,CAAEX,MAAO,cACtB,WAAY,gBAKxB,CAAEY,QAAS,eAEX,CAAC,aAAc,cACf,CAAC,eAAgB,CAAEZ,MAAO,4BAA6BU,KAAM,aAE7D,CAAC,cAAe,WAEhB,CAAC,aAAc,aACf,CAAC,mBAAoB,aACrB,CACI,WACA,CACIC,MAAO,CACH,aAAc,YACd,WAAY,MAKxB,CAAC,uCAAwC,gBACzC,CAAC,yCAA0C,gBAC3C,CAAC,gDAAiD,cAClD,CAAC,gCAAiC,gBAClC,CAAC,oCAAqC,iBACtC,CAAC,6BAA8B,UAC/B,CAAC,qBAAsB,UAEvB,CAAC,QAAS,aAEV,CAAC,kBAAmB,kBACpB,CAAC,IAAK,SAAU,WAEhB,CAAC,WAAY,UACb,CAAC,mBAAoB,CAAC,SAAU,gBAAiB,WACjD,CAAC,IAAK,mBAEVE,WAAY,CACR,CAAC,aAAc,IACf,CAAC,eAAgB,cAAe,eAChC,CAAC,OAAQ,UAAW,YACpB,CAAC,UAAW,YAEhBC,QAAS,CACL,CAAC,UAAW,WACZ,CAAC,OAAQ,UAAW,QACpB,CAAC,QAAS,YAGdC,WAAY,CACR,CAAC,UAAW,eACZ,CAAC,OAAQ,cAAe,QACxB,CAAC,QAAS,gBAEdC,OAAQ,CACJ,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU,SAEpBC,IAAK,CACD,CACI,iCACA,CACIN,MAAO,CACH,UAAW,CACP,aACA,iBACA,iBACA,CAAEX,MAAO,iBAAkBU,KAAM,SAErC,WAAY,CAAC,aAAc,aAAc,aAAc,iBAInE,CAAC,KAAM,eAEXE,QAAS,CACL,CACI,sBACA,CACI,GACA,kCACA,4BACA,CAAEZ,MAAO,gCAAiCU,KAAM,UAGxD,CACI,qBACA,CACI,GACA,kCACA,4BACA,CAAEV,MAAO,gCAAiCU,KAAM","file":"static/js/0.fbc33ed6.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '[', close: ']' },\r\n { open: '{', close: '}' },\r\n { open: '(', close: ')' },\r\n { open: \"'\", close: \"'\", notIn: ['string', 'comment'] },\r\n { open: '\"', close: '\"', notIn: ['string'] }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*#pragma\\\\s+region\\\\b'),\r\n end: new RegExp('^\\\\s*#pragma\\\\s+endregion\\\\b')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.cpp',\r\n brackets: [\r\n { token: 'delimiter.curly', open: '{', close: '}' },\r\n { token: 'delimiter.parenthesis', open: '(', close: ')' },\r\n { token: 'delimiter.square', open: '[', close: ']' },\r\n { token: 'delimiter.angle', open: '<', close: '>' }\r\n ],\r\n keywords: [\r\n 'abstract',\r\n 'amp',\r\n 'array',\r\n 'auto',\r\n 'bool',\r\n 'break',\r\n 'case',\r\n 'catch',\r\n 'char',\r\n 'class',\r\n 'const',\r\n 'constexpr',\r\n 'const_cast',\r\n 'continue',\r\n 'cpu',\r\n 'decltype',\r\n 'default',\r\n 'delegate',\r\n 'delete',\r\n 'do',\r\n 'double',\r\n 'dynamic_cast',\r\n 'each',\r\n 'else',\r\n 'enum',\r\n 'event',\r\n 'explicit',\r\n 'export',\r\n 'extern',\r\n 'false',\r\n 'final',\r\n 'finally',\r\n 'float',\r\n 'for',\r\n 'friend',\r\n 'gcnew',\r\n 'generic',\r\n 'goto',\r\n 'if',\r\n 'in',\r\n 'initonly',\r\n 'inline',\r\n 'int',\r\n 'interface',\r\n 'interior_ptr',\r\n 'internal',\r\n 'literal',\r\n 'long',\r\n 'mutable',\r\n 'namespace',\r\n 'new',\r\n 'noexcept',\r\n 'nullptr',\r\n '__nullptr',\r\n 'operator',\r\n 'override',\r\n 'partial',\r\n 'pascal',\r\n 'pin_ptr',\r\n 'private',\r\n 'property',\r\n 'protected',\r\n 'public',\r\n 'ref',\r\n 'register',\r\n 'reinterpret_cast',\r\n 'restrict',\r\n 'return',\r\n 'safe_cast',\r\n 'sealed',\r\n 'short',\r\n 'signed',\r\n 'sizeof',\r\n 'static',\r\n 'static_assert',\r\n 'static_cast',\r\n 'struct',\r\n 'switch',\r\n 'template',\r\n 'this',\r\n 'thread_local',\r\n 'throw',\r\n 'tile_static',\r\n 'true',\r\n 'try',\r\n 'typedef',\r\n 'typeid',\r\n 'typename',\r\n 'union',\r\n 'unsigned',\r\n 'using',\r\n 'virtual',\r\n 'void',\r\n 'volatile',\r\n 'wchar_t',\r\n 'where',\r\n 'while',\r\n '_asm',\r\n '_based',\r\n '_cdecl',\r\n '_declspec',\r\n '_fastcall',\r\n '_if_exists',\r\n '_if_not_exists',\r\n '_inline',\r\n '_multiple_inheritance',\r\n '_pascal',\r\n '_single_inheritance',\r\n '_stdcall',\r\n '_virtual_inheritance',\r\n '_w64',\r\n '__abstract',\r\n '__alignof',\r\n '__asm',\r\n '__assume',\r\n '__based',\r\n '__box',\r\n '__builtin_alignof',\r\n '__cdecl',\r\n '__clrcall',\r\n '__declspec',\r\n '__delegate',\r\n '__event',\r\n '__except',\r\n '__fastcall',\r\n '__finally',\r\n '__forceinline',\r\n '__gc',\r\n '__hook',\r\n '__identifier',\r\n '__if_exists',\r\n '__if_not_exists',\r\n '__inline',\r\n '__int128',\r\n '__int16',\r\n '__int32',\r\n '__int64',\r\n '__int8',\r\n '__interface',\r\n '__leave',\r\n '__m128',\r\n '__m128d',\r\n '__m128i',\r\n '__m256',\r\n '__m256d',\r\n '__m256i',\r\n '__m64',\r\n '__multiple_inheritance',\r\n '__newslot',\r\n '__nogc',\r\n '__noop',\r\n '__nounwind',\r\n '__novtordisp',\r\n '__pascal',\r\n '__pin',\r\n '__pragma',\r\n '__property',\r\n '__ptr32',\r\n '__ptr64',\r\n '__raise',\r\n '__restrict',\r\n '__resume',\r\n '__sealed',\r\n '__single_inheritance',\r\n '__stdcall',\r\n '__super',\r\n '__thiscall',\r\n '__try',\r\n '__try_cast',\r\n '__typeof',\r\n '__unaligned',\r\n '__unhook',\r\n '__uuidof',\r\n '__value',\r\n '__virtual_inheritance',\r\n '__w64',\r\n '__wchar_t'\r\n ],\r\n operators: [\r\n '=',\r\n '>',\r\n '<',\r\n '!',\r\n '~',\r\n '?',\r\n ':',\r\n '==',\r\n '<=',\r\n '>=',\r\n '!=',\r\n '&&',\r\n '||',\r\n '++',\r\n '--',\r\n '+',\r\n '-',\r\n '*',\r\n '/',\r\n '&',\r\n '|',\r\n '^',\r\n '%',\r\n '<<',\r\n '>>',\r\n '>>>',\r\n '+=',\r\n '-=',\r\n '*=',\r\n '/=',\r\n '&=',\r\n '|=',\r\n '^=',\r\n '%=',\r\n '<<=',\r\n '>>=',\r\n '>>>='\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>](?!@symbols)/, '@brackets'],\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'delimiter',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n // numbers\r\n [/\\d*\\d+[eE]([\\-+]?\\d+)?(@floatsuffix)/, 'number.float'],\r\n [/\\d*\\.\\d+([eE][\\-+]?\\d+)?(@floatsuffix)/, 'number.float'],\r\n [/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, 'number.hex'],\r\n [/0[0-7']*[0-7](@integersuffix)/, 'number.octal'],\r\n [/0[bB][0-1']*[0-1](@integersuffix)/, 'number.binary'],\r\n [/\\d[\\d']*\\d(@integersuffix)/, 'number'],\r\n [/\\d(@integersuffix)/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"/, 'string', '@string'],\r\n // characters\r\n [/'[^\\\\']'/, 'string'],\r\n [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],\r\n [/'/, 'string.invalid']\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/\\/\\*\\*(?!\\/)/, 'comment.doc', '@doccomment'],\r\n [/\\/\\*/, 'comment', '@comment'],\r\n [/\\/\\/.*$/, 'comment']\r\n ],\r\n comment: [\r\n [/[^\\/*]+/, 'comment'],\r\n [/\\*\\//, 'comment', '@pop'],\r\n [/[\\/*]/, 'comment']\r\n ],\r\n //Identical copy of comment above, except for the addition of .doc\r\n doccomment: [\r\n [/[^\\/*]+/, 'comment.doc'],\r\n [/\\*\\//, 'comment.doc', '@pop'],\r\n [/[\\/*]/, 'comment.doc']\r\n ],\r\n string: [\r\n [/[^\\\\\"]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"/, 'string', '@pop']\r\n ],\r\n raw: [\r\n [\r\n /(.*)(\\))(?:([^ ()\\\\\\t\"]*))(\\\")/,\r\n {\r\n cases: {\r\n '$3==$S2': [\r\n 'string.raw',\r\n 'string.raw.end',\r\n 'string.raw.end',\r\n { token: 'string.raw.end', next: '@pop' }\r\n ],\r\n '@default': ['string.raw', 'string.raw', 'string.raw', 'string.raw']\r\n }\r\n }\r\n ],\r\n [/.*/, 'string.raw']\r\n ],\r\n include: [\r\n [\r\n /(\\s*)(<)([^<>]*)(>)/,\r\n [\r\n '',\r\n 'keyword.directive.include.begin',\r\n 'string.include.identifier',\r\n { token: 'keyword.directive.include.end', next: '@pop' }\r\n ]\r\n ],\r\n [\r\n /(\\s*)(\")([^\"]*)(\")/,\r\n [\r\n '',\r\n 'keyword.directive.include.begin',\r\n 'string.include.identifier',\r\n { token: 'keyword.directive.include.end', next: '@pop' }\r\n ]\r\n ]\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/1.95675e55.chunk.js b/static/js/1.95675e55.chunk.js new file mode 100644 index 0000000..92e73e0 --- /dev/null +++ b/static/js/1.95675e55.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[1],{859:function(e,n,i){"use strict";i.r(n),i.d(n,"conf",(function(){return t})),i.d(n,"language",(function(){return r}));var t={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["begin","end"],["case","endcase"],["casex","endcase"],["casez","endcase"],["checker","endchecker"],["class","endclass"],["clocking","endclocking"],["config","endconfig"],["function","endfunction"],["generate","endgenerate"],["group","endgroup"],["interface","endinterface"],["module","endmodule"],["package","endpackage"],["primitive","endprimitive"],["program","endprogram"],["property","endproperty"],["specify","endspecify"],["sequence","endsequence"],["table","endtable"],["task","endtask"]],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:{offSide:!1,markers:{start:new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:begin|case(x|z)?|class|clocking|config|covergroup|function|generate|interface|module|package|primitive|property|program|sequence|specify|table|task)\\b"),end:new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:end|endcase|endclass|endclocking|endconfig|endgroup|endfunction|endgenerate|endinterface|endmodule|endpackage|endprimitive|endproperty|endprogram|endsequence|endspecify|endtable|endtask)\\b")}}},r={defaultToken:"",tokenPostfix:".sv",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate","genvar","global","highz0","highz1","if","iff","ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","null","or","output","package","packed","parameter","pmos","posedge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","xor"],builtin_gates:["and","nand","nor","or","xor","xnor","buf","not","bufif0","bufif1","notif1","notif0","cmos","nmos","pmos","rcmos","rnmos","rpmos","tran","tranif1","tranif0","rtran","rtranif1","rtranif0"],operators:["=","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>+","<<<=",">>>=","?",":","+","-","!","~","&","~&","|","~|","^","~^","^~","+","-","*","/","%","==","!=","===","!==","==?","!=?","&&","||","**","<","<=",">",">=","&","|","^",">>","<<",">>>","<<<","++","--","->","<->","inside","dist","::","+:","-:","*>","&&&","|->","|=>","#=#"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],{include:"@numbers"},[/[;,.]/,"delimiter"],{include:"@strings"}],identifier_or_keyword:[[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}]],numbers:[[/\d+?[\d_]*(?:\.[\d_]+)?[eE][\-+]?\d+/,"number.float"],[/\d+?[\d_]*\.[\d_]+(?:\s*@timeunits)?/,"number.float"],[/(?:\d+?[\d_]*\s*)?'[sS]?[dD]\s*[0-9xXzZ?]+?[0-9xXzZ?_]*/,"number"],[/(?:\d+?[\d_]*\s*)?'[sS]?[bB]\s*[0-1xXzZ?]+?[0-1xXzZ?_]*/,"number.binary"],[/(?:\d+?[\d_]*\s*)?'[sS]?[oO]\s*[0-7xXzZ?]+?[0-7xXzZ?_]*/,"number.octal"],[/(?:\d+?[\d_]*\s*)?'[sS]?[hH]\s*[0-9a-fA-FxXzZ?]+?[0-9a-fA-FxXzZ?_]*/,"number.hex"],[/1step/,"number"],[/[\dxXzZ]+?[\dxXzZ_]*(?:\s*@timeunits)?/,"number"],[/'[01xXzZ]+/,"number"]],module_instance:[{include:"@whitespace"},[/(#?)(\()/,["",{token:"@brackets",next:"@port_connection"}]],[/@identifier\s*[;={}\[\],]/,{token:"@rematch",next:"@pop"}],[/@symbols|[;={}\[\],]/,{token:"@rematch",next:"@pop"}],[/@identifier/,"type"],[/;/,"delimiter","@pop"]],port_connection:[{include:"@identifier_or_keyword"},{include:"@whitespace"},[/@systemcall/,"variable.predefined"],{include:"@numbers"},{include:"@strings"},[/[,]/,"delimiter"],[/\(/,"@brackets","@port_connection"],[/\)/,"@brackets","@pop"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],strings:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],include:[[/(\s*)(")([\w*\/*]*)(.\w*)(")/,["","string.include.identifier","string.include.identifier","string.include.identifier",{token:"string.include.identifier",next:"@pop"}]],[/(\s*)(<)([\w*\/*]*)(.\w*)(>)/,["","string.include.identifier","string.include.identifier","string.include.identifier",{token:"string.include.identifier",next:"@pop"}]]]}}}}]); +//# sourceMappingURL=1.95675e55.chunk.js.map \ No newline at end of file diff --git a/static/js/1.95675e55.chunk.js.map b/static/js/1.95675e55.chunk.js.map new file mode 100644 index 0000000..0d76c01 --- /dev/null +++ b/static/js/1.95675e55.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.js"],"names":["conf","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","folding","offSide","markers","start","RegExp","end","language","defaultToken","tokenPostfix","token","keywords","builtin_gates","operators","symbols","escapes","identifier","systemcall","timeunits","tokenizer","root","cases","next","include","identifier_or_keyword","numbers","module_instance","port_connection","whitespace","comment","strings","string"],"mappings":"4GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,QAAS,OACV,CAAC,OAAQ,WACT,CAAC,QAAS,WACV,CAAC,QAAS,WACV,CAAC,UAAW,cACZ,CAAC,QAAS,YACV,CAAC,WAAY,eACb,CAAC,SAAU,aACX,CAAC,WAAY,eACb,CAAC,WAAY,eACb,CAAC,QAAS,YACV,CAAC,YAAa,gBACd,CAAC,SAAU,aACX,CAAC,UAAW,cACZ,CAAC,YAAa,gBACd,CAAC,UAAW,cACZ,CAAC,WAAY,eACb,CAAC,UAAW,cACZ,CAAC,WAAY,eACb,CAAC,QAAS,YACV,CAAC,OAAQ,YAEbC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,YAErCC,iBAAkB,CACd,CAAEH,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBG,QAAS,CACLC,SAAS,EACTC,QAAS,CACLC,MAAO,IAAIC,OAAO,+LAClBC,IAAK,IAAID,OAAO,wOAIjBE,EAAW,CAClBC,aAAc,GACdC,aAAc,MACdd,SAAU,CACN,CAAEe,MAAO,kBAAmBb,KAAM,IAAKC,MAAO,KAC9C,CAAEY,MAAO,wBAAyBb,KAAM,IAAKC,MAAO,KACpD,CAAEY,MAAO,mBAAoBb,KAAM,IAAKC,MAAO,KAC/C,CAAEY,MAAO,kBAAmBb,KAAM,IAAKC,MAAO,MAElDa,SAAU,CACN,YACA,QACA,SACA,cACA,YACA,eACA,MACA,SACA,SACA,SACA,YACA,SACA,QACA,OACA,OACA,SACA,MACA,QACA,MACA,SACA,SACA,OACA,OACA,QACA,QACA,OACA,UACA,UACA,QACA,WACA,OACA,SACA,QACA,aACA,UACA,WACA,QACA,aACA,aACA,QACA,WACA,UACA,WACA,SACA,UACA,OACA,KACA,OACA,OACA,MACA,UACA,aACA,WACA,cACA,YACA,cACA,cACA,WACA,eACA,YACA,aACA,eACA,aACA,cACA,aACA,cACA,WACA,UACA,OACA,QACA,aACA,SACA,SACA,UACA,SACA,QACA,cACA,MACA,QACA,UACA,UACA,OACA,WACA,WACA,WACA,SACA,SACA,SACA,SACA,KACA,MACA,SACA,cACA,eACA,aACA,UACA,SACA,SACA,UACA,UACA,QACA,QACA,SACA,WACA,MACA,UACA,eACA,YACA,YACA,OACA,WACA,YACA,QACA,MACA,UACA,UACA,QACA,aACA,QACA,UACA,cACA,UACA,SACA,UACA,SACA,OACA,UACA,UACA,MACA,WACA,OACA,MACA,kBACA,MACA,SACA,SACA,OACA,KACA,SACA,UACA,SACA,YACA,OACA,UACA,YACA,WACA,UACA,WACA,YACA,QACA,QACA,WACA,SACA,sBACA,qBACA,OACA,OACA,QACA,WACA,eACA,QACA,OACA,WACA,MACA,MACA,YACA,UACA,SACA,WACA,SACA,QACA,QACA,QACA,WACA,WACA,WACA,eACA,aACA,UACA,eACA,WACA,WACA,WACA,YACA,gBACA,SACA,QACA,OACA,QACA,UACA,YACA,SACA,SACA,SACA,UACA,UACA,SACA,QACA,UACA,UACA,iBACA,iBACA,QACA,SACA,OACA,OACA,aACA,OACA,gBACA,WACA,OACA,UACA,UACA,MACA,OACA,OACA,SACA,QACA,SACA,OACA,UACA,QACA,SACA,UACA,WACA,QACA,aACA,UACA,MACA,QACA,MACA,WACA,UACA,OACA,OACA,aACA,OACA,OACA,QACA,QACA,QACA,WACA,OACA,OACA,SACA,MACA,OACA,OAEJC,cAAe,CACX,MACA,OACA,MACA,KACA,MACA,OACA,MACA,MACA,SACA,SACA,SACA,SACA,OACA,OACA,OACA,QACA,QACA,QACA,OACA,UACA,UACA,QACA,WACA,YAEJC,UAAW,CAEP,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,OACA,OAEA,IACA,IAEA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,KACA,IACA,KACA,KAEA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,IACA,KACA,IACA,KACA,IACA,IACA,IACA,KACA,KACA,MACA,MAEA,KACA,KAEA,KACA,MAEA,SAEA,OACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,OAGJC,QAAS,yBACTC,QAAS,oDACTC,WAAY,uCACZC,WAAY,mBACZC,UAAW,mBAEXC,UAAW,CACPC,KAAM,CAEF,CACI,sBACA,CACI,GACA,CACIC,MAAO,CACH,iBAAkB,CACdX,MAAO,aACPY,KAAM,oBAEV,YAAa,CAAEZ,MAAO,cACtB,WAAY,CACRA,MAAO,aACPY,KAAM,wBAO1B,CAAC,eAAgB,CAAEZ,MAAO,4BAA6BY,KAAM,aAE7D,CAAC,cAAe,WAEhB,CAAEC,QAAS,0BAEX,CAAEA,QAAS,eAEX,CAAC,aAAc,cAEf,CAAC,cAAe,uBAEhB,CAAC,aAAc,aACf,CAAC,mBAAoB,aACrB,CACI,WACA,CACIF,MAAO,CACH,aAAc,YACd,WAAY,MAKxB,CAAEE,QAAS,YAEX,CAAC,QAAS,aAEV,CAAEA,QAAS,aAEfC,sBAAuB,CACnB,CACI,cACA,CACIH,MAAO,CACH,YAAa,CAAEX,MAAO,cACtB,WAAY,iBAK5Be,QAAS,CACL,CAAC,uCAAwC,gBACzC,CAAC,uCAAwC,gBACzC,CAAC,0DAA2D,UAC5D,CAAC,0DAA2D,iBAC5D,CAAC,0DAA2D,gBAC5D,CAAC,sEAAuE,cACxE,CAAC,QAAS,UACV,CAAC,yCAA0C,UAC3C,CAAC,aAAc,WAEnBC,gBAAiB,CACb,CAAEH,QAAS,eACX,CAAC,WAAY,CAAC,GAAI,CAAEb,MAAO,YAAaY,KAAM,sBAC9C,CAAC,4BAA6B,CAAEZ,MAAO,WAAYY,KAAM,SACzD,CAAC,uBAAwB,CAAEZ,MAAO,WAAYY,KAAM,SACpD,CAAC,cAAe,QAChB,CAAC,IAAK,YAAa,SAEvBK,gBAAiB,CACb,CAAEJ,QAAS,0BACX,CAAEA,QAAS,eACX,CAAC,cAAe,uBAChB,CAAEA,QAAS,YACX,CAAEA,QAAS,YACX,CAAC,MAAO,aACR,CAAC,KAAM,YAAa,oBACpB,CAAC,KAAM,YAAa,SAExBK,WAAY,CACR,CAAC,aAAc,IACf,CAAC,OAAQ,UAAW,YACpB,CAAC,UAAW,YAEhBC,QAAS,CACL,CAAC,UAAW,WACZ,CAAC,OAAQ,UAAW,QACpB,CAAC,QAAS,YAEdC,QAAS,CACL,CAAC,kBAAmB,kBACpB,CAAC,IAAK,SAAU,YAEpBC,OAAQ,CACJ,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU,SAEpBR,QAAS,CACL,CACI,+BACA,CACI,GACA,4BACA,4BACA,4BACA,CAAEb,MAAO,4BAA6BY,KAAM,UAGpD,CACI,+BACA,CACI,GACA,4BACA,4BACA,4BACA,CAAEZ,MAAO,4BAA6BY,KAAM","file":"static/js/1.95675e55.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')'],\r\n ['begin', 'end'],\r\n ['case', 'endcase'],\r\n ['casex', 'endcase'],\r\n ['casez', 'endcase'],\r\n ['checker', 'endchecker'],\r\n ['class', 'endclass'],\r\n ['clocking', 'endclocking'],\r\n ['config', 'endconfig'],\r\n ['function', 'endfunction'],\r\n ['generate', 'endgenerate'],\r\n ['group', 'endgroup'],\r\n ['interface', 'endinterface'],\r\n ['module', 'endmodule'],\r\n ['package', 'endpackage'],\r\n ['primitive', 'endprimitive'],\r\n ['program', 'endprogram'],\r\n ['property', 'endproperty'],\r\n ['specify', 'endspecify'],\r\n ['sequence', 'endsequence'],\r\n ['table', 'endtable'],\r\n ['task', 'endtask']\r\n ],\r\n autoClosingPairs: [\r\n { open: '[', close: ']' },\r\n { open: '{', close: '}' },\r\n { open: '(', close: ')' },\r\n { open: \"'\", close: \"'\", notIn: ['string', 'comment'] },\r\n { open: '\"', close: '\"', notIn: ['string'] }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n folding: {\r\n offSide: false,\r\n markers: {\r\n start: new RegExp('^(?:\\\\s*|.*(?!\\\\/[\\\\/\\\\*])[^\\\\w])(?:begin|case(x|z)?|class|clocking|config|covergroup|function|generate|interface|module|package|primitive|property|program|sequence|specify|table|task)\\\\b'),\r\n end: new RegExp('^(?:\\\\s*|.*(?!\\\\/[\\\\/\\\\*])[^\\\\w])(?:end|endcase|endclass|endclocking|endconfig|endgroup|endfunction|endgenerate|endinterface|endmodule|endpackage|endprimitive|endproperty|endprogram|endsequence|endspecify|endtable|endtask)\\\\b')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.sv',\r\n brackets: [\r\n { token: 'delimiter.curly', open: '{', close: '}' },\r\n { token: 'delimiter.parenthesis', open: '(', close: ')' },\r\n { token: 'delimiter.square', open: '[', close: ']' },\r\n { token: 'delimiter.angle', open: '<', close: '>' }\r\n ],\r\n keywords: [\r\n 'accept_on',\r\n 'alias',\r\n 'always',\r\n 'always_comb',\r\n 'always_ff',\r\n 'always_latch',\r\n 'and',\r\n 'assert',\r\n 'assign',\r\n 'assume',\r\n 'automatic',\r\n 'before',\r\n 'begin',\r\n 'bind',\r\n 'bins',\r\n 'binsof',\r\n 'bit',\r\n 'break',\r\n 'buf',\r\n 'bufif0',\r\n 'bufif1',\r\n 'byte',\r\n 'case',\r\n 'casex',\r\n 'casez',\r\n 'cell',\r\n 'chandle',\r\n 'checker',\r\n 'class',\r\n 'clocking',\r\n 'cmos',\r\n 'config',\r\n 'const',\r\n 'constraint',\r\n 'context',\r\n 'continue',\r\n 'cover',\r\n 'covergroup',\r\n 'coverpoint',\r\n 'cross',\r\n 'deassign',\r\n 'default',\r\n 'defparam',\r\n 'design',\r\n 'disable',\r\n 'dist',\r\n 'do',\r\n 'edge',\r\n 'else',\r\n 'end',\r\n 'endcase',\r\n 'endchecker',\r\n 'endclass',\r\n 'endclocking',\r\n 'endconfig',\r\n 'endfunction',\r\n 'endgenerate',\r\n 'endgroup',\r\n 'endinterface',\r\n 'endmodule',\r\n 'endpackage',\r\n 'endprimitive',\r\n 'endprogram',\r\n 'endproperty',\r\n 'endspecify',\r\n 'endsequence',\r\n 'endtable',\r\n 'endtask',\r\n 'enum',\r\n 'event',\r\n 'eventually',\r\n 'expect',\r\n 'export',\r\n 'extends',\r\n 'extern',\r\n 'final',\r\n 'first_match',\r\n 'for',\r\n 'force',\r\n 'foreach',\r\n 'forever',\r\n 'fork',\r\n 'forkjoin',\r\n 'function',\r\n 'generate',\r\n 'genvar',\r\n 'global',\r\n 'highz0',\r\n 'highz1',\r\n 'if',\r\n 'iff',\r\n 'ifnone',\r\n 'ignore_bins',\r\n 'illegal_bins',\r\n 'implements',\r\n 'implies',\r\n 'import',\r\n 'incdir',\r\n 'include',\r\n 'initial',\r\n 'inout',\r\n 'input',\r\n 'inside',\r\n 'instance',\r\n 'int',\r\n 'integer',\r\n 'interconnect',\r\n 'interface',\r\n 'intersect',\r\n 'join',\r\n 'join_any',\r\n 'join_none',\r\n 'large',\r\n 'let',\r\n 'liblist',\r\n 'library',\r\n 'local',\r\n 'localparam',\r\n 'logic',\r\n 'longint',\r\n 'macromodule',\r\n 'matches',\r\n 'medium',\r\n 'modport',\r\n 'module',\r\n 'nand',\r\n 'negedge',\r\n 'nettype',\r\n 'new',\r\n 'nexttime',\r\n 'nmos',\r\n 'nor',\r\n 'noshowcancelled',\r\n 'not',\r\n 'notif0',\r\n 'notif1',\r\n 'null',\r\n 'or',\r\n 'output',\r\n 'package',\r\n 'packed',\r\n 'parameter',\r\n 'pmos',\r\n 'posedge',\r\n 'primitive',\r\n 'priority',\r\n 'program',\r\n 'property',\r\n 'protected',\r\n 'pull0',\r\n 'pull1',\r\n 'pulldown',\r\n 'pullup',\r\n 'pulsestyle_ondetect',\r\n 'pulsestyle_onevent',\r\n 'pure',\r\n 'rand',\r\n 'randc',\r\n 'randcase',\r\n 'randsequence',\r\n 'rcmos',\r\n 'real',\r\n 'realtime',\r\n 'ref',\r\n 'reg',\r\n 'reject_on',\r\n 'release',\r\n 'repeat',\r\n 'restrict',\r\n 'return',\r\n 'rnmos',\r\n 'rpmos',\r\n 'rtran',\r\n 'rtranif0',\r\n 'rtranif1',\r\n 's_always',\r\n 's_eventually',\r\n 's_nexttime',\r\n 's_until',\r\n 's_until_with',\r\n 'scalared',\r\n 'sequence',\r\n 'shortint',\r\n 'shortreal',\r\n 'showcancelled',\r\n 'signed',\r\n 'small',\r\n 'soft',\r\n 'solve',\r\n 'specify',\r\n 'specparam',\r\n 'static',\r\n 'string',\r\n 'strong',\r\n 'strong0',\r\n 'strong1',\r\n 'struct',\r\n 'super',\r\n 'supply0',\r\n 'supply1',\r\n 'sync_accept_on',\r\n 'sync_reject_on',\r\n 'table',\r\n 'tagged',\r\n 'task',\r\n 'this',\r\n 'throughout',\r\n 'time',\r\n 'timeprecision',\r\n 'timeunit',\r\n 'tran',\r\n 'tranif0',\r\n 'tranif1',\r\n 'tri',\r\n 'tri0',\r\n 'tri1',\r\n 'triand',\r\n 'trior',\r\n 'trireg',\r\n 'type',\r\n 'typedef',\r\n 'union',\r\n 'unique',\r\n 'unique0',\r\n 'unsigned',\r\n 'until',\r\n 'until_with',\r\n 'untyped',\r\n 'use',\r\n 'uwire',\r\n 'var',\r\n 'vectored',\r\n 'virtual',\r\n 'void',\r\n 'wait',\r\n 'wait_order',\r\n 'wand',\r\n 'weak',\r\n 'weak0',\r\n 'weak1',\r\n 'while',\r\n 'wildcard',\r\n 'wire',\r\n 'with',\r\n 'within',\r\n 'wor',\r\n 'xnor',\r\n 'xor'\r\n ],\r\n builtin_gates: [\r\n 'and',\r\n 'nand',\r\n 'nor',\r\n 'or',\r\n 'xor',\r\n 'xnor',\r\n 'buf',\r\n 'not',\r\n 'bufif0',\r\n 'bufif1',\r\n 'notif1',\r\n 'notif0',\r\n 'cmos',\r\n 'nmos',\r\n 'pmos',\r\n 'rcmos',\r\n 'rnmos',\r\n 'rpmos',\r\n 'tran',\r\n 'tranif1',\r\n 'tranif0',\r\n 'rtran',\r\n 'rtranif1',\r\n 'rtranif0'\r\n ],\r\n operators: [\r\n // assignment operators\r\n '=',\r\n '+=',\r\n '-=',\r\n '*=',\r\n '/=',\r\n '%=',\r\n '&=',\r\n '|=',\r\n '^=',\r\n '<<=',\r\n '>>+',\r\n '<<<=',\r\n '>>>=',\r\n // conditional expression\r\n '?',\r\n ':',\r\n // Unary operators\r\n '+',\r\n '-',\r\n '!',\r\n '~',\r\n '&',\r\n '~&',\r\n '|',\r\n '~|',\r\n '^',\r\n '~^',\r\n '^~',\r\n //binary operators\r\n '+',\r\n '-',\r\n '*',\r\n '/',\r\n '%',\r\n '==',\r\n '!=',\r\n '===',\r\n '!==',\r\n '==?',\r\n '!=?',\r\n '&&',\r\n '||',\r\n '**',\r\n '<',\r\n '<=',\r\n '>',\r\n '>=',\r\n '&',\r\n '|',\r\n '^',\r\n '>>',\r\n '<<',\r\n '>>>',\r\n '<<<',\r\n // increment or decrement operator\r\n '++',\r\n '--',\r\n //binary logical operator\r\n '->',\r\n '<->',\r\n // binary set membership operator\r\n 'inside',\r\n // binary distrubution operator\r\n 'dist',\r\n '::',\r\n '+:',\r\n '-:',\r\n '*>',\r\n '&&&',\r\n '|->',\r\n '|=>',\r\n '#=#'\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>](?!@symbols)/, '@brackets'],\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'delimiter',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n // numbers\r\n { include: '@numbers' },\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n { include: '@strings' }\r\n ],\r\n identifier_or_keyword: [\r\n [\r\n /@identifier/,\r\n {\r\n cases: {\r\n '@keywords': { token: 'keyword.$0' },\r\n '@default': 'identifier'\r\n }\r\n }\r\n ]\r\n ],\r\n numbers: [\r\n [/\\d+?[\\d_]*(?:\\.[\\d_]+)?[eE][\\-+]?\\d+/, 'number.float'],\r\n [/\\d+?[\\d_]*\\.[\\d_]+(?:\\s*@timeunits)?/, 'number.float'],\r\n [/(?:\\d+?[\\d_]*\\s*)?'[sS]?[dD]\\s*[0-9xXzZ?]+?[0-9xXzZ?_]*/, 'number'],\r\n [/(?:\\d+?[\\d_]*\\s*)?'[sS]?[bB]\\s*[0-1xXzZ?]+?[0-1xXzZ?_]*/, 'number.binary'],\r\n [/(?:\\d+?[\\d_]*\\s*)?'[sS]?[oO]\\s*[0-7xXzZ?]+?[0-7xXzZ?_]*/, 'number.octal'],\r\n [/(?:\\d+?[\\d_]*\\s*)?'[sS]?[hH]\\s*[0-9a-fA-FxXzZ?]+?[0-9a-fA-FxXzZ?_]*/, 'number.hex'],\r\n [/1step/, 'number'],\r\n [/[\\dxXzZ]+?[\\dxXzZ_]*(?:\\s*@timeunits)?/, 'number'],\r\n [/'[01xXzZ]+/, 'number']\r\n ],\r\n module_instance: [\r\n { include: '@whitespace' },\r\n [/(#?)(\\()/, ['', { token: '@brackets', next: '@port_connection' }]],\r\n [/@identifier\\s*[;={}\\[\\],]/, { token: '@rematch', next: '@pop' }],\r\n [/@symbols|[;={}\\[\\],]/, { token: '@rematch', next: '@pop' }],\r\n [/@identifier/, 'type'],\r\n [/;/, 'delimiter', '@pop']\r\n ],\r\n port_connection: [\r\n { include: '@identifier_or_keyword' },\r\n { include: '@whitespace' },\r\n [/@systemcall/, 'variable.predefined'],\r\n { include: '@numbers' },\r\n { include: '@strings' },\r\n [/[,]/, 'delimiter'],\r\n [/\\(/, '@brackets', '@port_connection'],\r\n [/\\)/, '@brackets', '@pop']\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/\\/\\*/, 'comment', '@comment'],\r\n [/\\/\\/.*$/, 'comment']\r\n ],\r\n comment: [\r\n [/[^\\/*]+/, 'comment'],\r\n [/\\*\\//, 'comment', '@pop'],\r\n [/[\\/*]/, 'comment']\r\n ],\r\n strings: [\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"/, 'string', '@string']\r\n ],\r\n string: [\r\n [/[^\\\\\"]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"/, 'string', '@pop']\r\n ],\r\n include: [\r\n [\r\n /(\\s*)(\")([\\w*\\/*]*)(.\\w*)(\")/,\r\n [\r\n '',\r\n 'string.include.identifier',\r\n 'string.include.identifier',\r\n 'string.include.identifier',\r\n { token: 'string.include.identifier', next: '@pop' }\r\n ]\r\n ],\r\n [\r\n /(\\s*)(<)([\\w*\\/*]*)(.\\w*)(>)/,\r\n [\r\n '',\r\n 'string.include.identifier',\r\n 'string.include.identifier',\r\n 'string.include.identifier',\r\n { token: 'string.include.identifier', next: '@pop' }\r\n ]\r\n ]\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/10.1257e231.chunk.js b/static/js/10.1257e231.chunk.js new file mode 100644 index 0000000..504f2a5 --- /dev/null +++ b/static/js/10.1257e231.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[10],{799:function(e,t,n){"use strict";n.r(t),n.d(t,"conf",(function(){return o})),n.d(t,"language",(function(){return i}));var o={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)|(?:))")}}},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))}));var i={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"}}]]}}}}]); +//# sourceMappingURL=10.1257e231.chunk.js.map \ No newline at end of file diff --git a/static/js/10.1257e231.chunk.js.map b/static/js/10.1257e231.chunk.js.map new file mode 100644 index 0000000..20d48cf --- /dev/null +++ b/static/js/10.1257e231.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.js"],"names":["conf","wordPattern","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","surroundingPairs","folding","markers","start","RegExp","end","keywordsWithCaseVariations","forEach","lowercase","push","toUpperCase","charAt","substr","uppercaseFirstLetter","language","defaultToken","tokenPostfix","keywords","operators","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","tokenizer","root","cases","token","include","whitespace","comment","apexdoc","string","next"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CAEdC,YAAa,qFACbC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBC,iBAAkB,CACd,CAAEF,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBE,QAAS,CACLC,QAAS,CACLC,MAAO,IAAIC,OAAO,sDAClBC,IAAK,IAAID,OAAO,2DAwJxBE,EAA6B,GApJlB,CACX,WACA,WACA,MACA,MACA,QACA,KACA,MACA,SACA,aACA,QACA,aACA,OACA,UACA,QACA,OACA,KACA,OACA,OACA,QACA,OACA,QACA,UACA,SACA,QACA,WACA,kBACA,UACA,UACA,SACA,OACA,KACA,SACA,OACA,MACA,OACA,YACA,OACA,SACA,UACA,QACA,QACA,UACA,QACA,MACA,OACA,SACA,MACA,SACA,OACA,QACA,SACA,OACA,KACA,aACA,SACA,KACA,QACA,SACA,aACA,MACA,YACA,OACA,OACA,eACA,aACA,cACA,YACA,OACA,QACA,OACA,OACA,OACA,MACA,QACA,SACA,MACA,eACA,aACA,cACA,YACA,MACA,OACA,QACA,SACA,SACA,KACA,KACA,KACA,QACA,WACA,UACA,WACA,SACA,UACA,YACA,SACA,WACA,SACA,YACA,WACA,YACA,SACA,SACA,MACA,QACA,OACA,OACA,SACA,WACA,QACA,SACA,eACA,SACA,aACA,OACA,OACA,aACA,YACA,QACA,SACA,QACA,UACA,WACA,cACA,YACA,UACA,OACA,MACA,OACA,WACA,SACA,SACA,QACA,UACA,OACA,WACA,aACA,OACA,QACA,QACA,aAQKC,SAAQ,SAAUC,GACvBF,EAA2BG,KAAKD,GAChCF,EAA2BG,KAAKD,EAAUE,eAC1CJ,EAA2BG,KAPJ,SAAUD,GACjC,OAAOA,EAAUG,OAAO,GAAGD,cAAgBF,EAAUI,OAAO,GAM5BC,CAAqBL,OAElD,IAAIM,EAAW,CAClBC,aAAc,GACdC,aAAc,QACdC,SAAUX,EACVY,UAAW,CACP,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,QAGJC,QAAS,wBACTC,QAAS,wEACTC,OAAQ,cACRC,YAAa,oBACbC,aAAc,oBACdC,UAAW,iCAEXC,UAAW,CACPC,KAAM,CAEF,CACI,gBACA,CACIC,MAAO,CACH,YAAa,CAAEC,MAAO,cACtB,WAAY,gBAKxB,CACI,eACA,CACID,MAAO,CACH,YAAa,CAAEC,MAAO,cACtB,WAAY,qBAKxB,CAAEC,QAAS,eAEX,CAAC,aAAc,aACf,CAAC,mBAAoB,aACrB,CACI,WACA,CACIF,MAAO,CACH,aAAc,YACd,WAAY,MAKxB,CAAC,yBAA0B,cAE3B,CAAC,yCAA0C,gBAC3C,CAAC,oDAAqD,gBACtD,CAAC,kBAAmB,gBACpB,CAAC,iBAAkB,UAEnB,CAAC,QAAS,aAEV,CAAC,kBAAmB,kBACpB,CAAC,kBAAmB,kBACpB,CAAC,IAAK,SAAU,aAChB,CAAC,IAAK,SAAU,aAEhB,CAAC,WAAY,UACb,CAAC,mBAAoB,CAAC,SAAU,gBAAiB,WACjD,CAAC,IAAK,mBAEVG,WAAY,CACR,CAAC,aAAc,IACf,CAAC,eAAgB,cAAe,YAChC,CAAC,OAAQ,UAAW,YACpB,CAAC,UAAW,YAEhBC,QAAS,CACL,CAAC,UAAW,WAGZ,CAAC,OAAQ,UAAW,QACpB,CAAC,QAAS,YAGdC,QAAS,CACL,CAAC,UAAW,eACZ,CAAC,OAAQ,cAAe,QACxB,CAAC,QAAS,gBAEdC,OAAQ,CACJ,CAAC,WAAY,UACb,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CACI,OACA,CACIN,MAAO,CACH,UAAW,CAAEC,MAAO,SAAUM,KAAM,QACpC,WAAY","file":"static/js/10.1257e231.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n // the default separators except `@$`\r\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g,\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" },\r\n { open: '<', close: '>' }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*//\\\\s*(?:(?:#?region\\\\b)|(?:))')\r\n }\r\n }\r\n};\r\nvar keywords = [\r\n 'abstract',\r\n 'activate',\r\n 'and',\r\n 'any',\r\n 'array',\r\n 'as',\r\n 'asc',\r\n 'assert',\r\n 'autonomous',\r\n 'begin',\r\n 'bigdecimal',\r\n 'blob',\r\n 'boolean',\r\n 'break',\r\n 'bulk',\r\n 'by',\r\n 'case',\r\n 'cast',\r\n 'catch',\r\n 'char',\r\n 'class',\r\n 'collect',\r\n 'commit',\r\n 'const',\r\n 'continue',\r\n 'convertcurrency',\r\n 'decimal',\r\n 'default',\r\n 'delete',\r\n 'desc',\r\n 'do',\r\n 'double',\r\n 'else',\r\n 'end',\r\n 'enum',\r\n 'exception',\r\n 'exit',\r\n 'export',\r\n 'extends',\r\n 'false',\r\n 'final',\r\n 'finally',\r\n 'float',\r\n 'for',\r\n 'from',\r\n 'future',\r\n 'get',\r\n 'global',\r\n 'goto',\r\n 'group',\r\n 'having',\r\n 'hint',\r\n 'if',\r\n 'implements',\r\n 'import',\r\n 'in',\r\n 'inner',\r\n 'insert',\r\n 'instanceof',\r\n 'int',\r\n 'interface',\r\n 'into',\r\n 'join',\r\n 'last_90_days',\r\n 'last_month',\r\n 'last_n_days',\r\n 'last_week',\r\n 'like',\r\n 'limit',\r\n 'list',\r\n 'long',\r\n 'loop',\r\n 'map',\r\n 'merge',\r\n 'native',\r\n 'new',\r\n 'next_90_days',\r\n 'next_month',\r\n 'next_n_days',\r\n 'next_week',\r\n 'not',\r\n 'null',\r\n 'nulls',\r\n 'number',\r\n 'object',\r\n 'of',\r\n 'on',\r\n 'or',\r\n 'outer',\r\n 'override',\r\n 'package',\r\n 'parallel',\r\n 'pragma',\r\n 'private',\r\n 'protected',\r\n 'public',\r\n 'retrieve',\r\n 'return',\r\n 'returning',\r\n 'rollback',\r\n 'savepoint',\r\n 'search',\r\n 'select',\r\n 'set',\r\n 'short',\r\n 'sort',\r\n 'stat',\r\n 'static',\r\n 'strictfp',\r\n 'super',\r\n 'switch',\r\n 'synchronized',\r\n 'system',\r\n 'testmethod',\r\n 'then',\r\n 'this',\r\n 'this_month',\r\n 'this_week',\r\n 'throw',\r\n 'throws',\r\n 'today',\r\n 'tolabel',\r\n 'tomorrow',\r\n 'transaction',\r\n 'transient',\r\n 'trigger',\r\n 'true',\r\n 'try',\r\n 'type',\r\n 'undelete',\r\n 'update',\r\n 'upsert',\r\n 'using',\r\n 'virtual',\r\n 'void',\r\n 'volatile',\r\n 'webservice',\r\n 'when',\r\n 'where',\r\n 'while',\r\n 'yesterday'\r\n];\r\n// create case variations of the keywords - apex is case insensitive, but we can't make the highlighter case insensitive\r\n// because we use a heuristic to assume that identifiers starting with an upper case letter are types.\r\nvar uppercaseFirstLetter = function (lowercase) {\r\n return lowercase.charAt(0).toUpperCase() + lowercase.substr(1);\r\n};\r\nvar keywordsWithCaseVariations = [];\r\nkeywords.forEach(function (lowercase) {\r\n keywordsWithCaseVariations.push(lowercase);\r\n keywordsWithCaseVariations.push(lowercase.toUpperCase());\r\n keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase));\r\n});\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.apex',\r\n keywords: keywordsWithCaseVariations,\r\n operators: [\r\n '=',\r\n '>',\r\n '<',\r\n '!',\r\n '~',\r\n '?',\r\n ':',\r\n '==',\r\n '<=',\r\n '>=',\r\n '!=',\r\n '&&',\r\n '||',\r\n '++',\r\n '--',\r\n '+',\r\n '-',\r\n '*',\r\n '/',\r\n '&',\r\n '|',\r\n '^',\r\n '%',\r\n '<<',\r\n '>>',\r\n '>>>',\r\n '+=',\r\n '-=',\r\n '*=',\r\n '/=',\r\n '&=',\r\n '|=',\r\n '^=',\r\n '%=',\r\n '<<=',\r\n '>>=',\r\n '>>>='\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>](?!@symbols)/, '@brackets'],\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'delimiter',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n // @ annotations.\r\n [/@\\s*[a-zA-Z_\\$][\\w\\$]*/, 'annotation'],\r\n // numbers\r\n [/(@digits)[eE]([\\-+]?(@digits))?[fFdD]?/, 'number.float'],\r\n [/(@digits)\\.(@digits)([eE][\\-+]?(@digits))?[fFdD]?/, 'number.float'],\r\n [/(@digits)[fFdD]/, 'number.float'],\r\n [/(@digits)[lL]?/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/'([^'\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"/, 'string', '@string.\"'],\r\n [/'/, 'string', \"@string.'\"],\r\n // characters\r\n [/'[^\\\\']'/, 'string'],\r\n [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],\r\n [/'/, 'string.invalid']\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/\\/\\*\\*(?!\\/)/, 'comment.doc', '@apexdoc'],\r\n [/\\/\\*/, 'comment', '@comment'],\r\n [/\\/\\/.*$/, 'comment']\r\n ],\r\n comment: [\r\n [/[^\\/*]+/, 'comment'],\r\n // [/\\/\\*/, 'comment', '@push' ], // nested comment not allowed :-(\r\n // [/\\/\\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/\r\n [/\\*\\//, 'comment', '@pop'],\r\n [/[\\/*]/, 'comment']\r\n ],\r\n //Identical copy of comment above, except for the addition of .doc\r\n apexdoc: [\r\n [/[^\\/*]+/, 'comment.doc'],\r\n [/\\*\\//, 'comment.doc', '@pop'],\r\n [/[\\/*]/, 'comment.doc']\r\n ],\r\n string: [\r\n [/[^\\\\\"']+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [\r\n /[\"']/,\r\n {\r\n cases: {\r\n '$#==$S2': { token: 'string', next: '@pop' },\r\n '@default': 'string'\r\n }\r\n }\r\n ]\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/11.3f7676ec.chunk.js b/static/js/11.3f7676ec.chunk.js new file mode 100644 index 0000000..00c1f1c --- /dev/null +++ b/static/js/11.3f7676ec.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[11],{800:function(e,t,n){"use strict";n.r(t),n.d(t,"conf",(function(){return o})),n.d(t,"language",(function(){return s}));var o={comments:{lineComment:"#"}},s={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"}}}]]}}}}]); +//# sourceMappingURL=11.3f7676ec.chunk.js.map \ No newline at end of file diff --git a/static/js/11.3f7676ec.chunk.js.map b/static/js/11.3f7676ec.chunk.js.map new file mode 100644 index 0000000..a5dd621 --- /dev/null +++ b/static/js/11.3f7676ec.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.js"],"names":["conf","comments","lineComment","language","defaultToken","ignoreCase","tokenPostfix","str","tokenizer","root","include","cases","token","next","type","comment"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,YAAa,MAGVC,EAAW,CAClBC,aAAc,UACdC,YAAY,EACZC,aAAc,SACdC,IAAK,SACLC,UAAW,CACPC,KAAM,CACF,CAAEC,QAAS,YACX,CACI,eACA,CACIC,MAAO,CACH,OAAQ,CAAEC,MAAO,iBAAkBC,KAAM,WACzC,WAAY,CAAED,MAAO,iBAAkBC,KAAM,YAIzD,CACI,cACA,CACIF,MAAO,CACH,OAAQ,CAAEC,MAAO,iBAAkBC,KAAM,WACzC,WAAY,CAAED,MAAO,iBAAkBC,KAAM,aAK7DC,KAAM,CACF,CAAEJ,QAAS,YACX,CACI,aACA,CACIC,MAAO,CACH,OAAQ,CAAEC,MAAO,iBAAkBC,KAAM,WACzC,WAAY,oBAIxB,CACI,WACA,CACIF,MAAO,CACH,OAAQ,CAAEC,MAAO,SAAUC,KAAM,WACjC,WAAY,aAK5BE,QAAS,CACL,CACI,OACA,CACIJ,MAAO,CACH,OAAQ,CAAEC,MAAO,UAAWC,KAAM","file":"static/js/11.3f7676ec.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n lineComment: '#'\r\n }\r\n};\r\nexport var language = {\r\n defaultToken: 'keyword',\r\n ignoreCase: true,\r\n tokenPostfix: '.azcli',\r\n str: /[^#\\s]/,\r\n tokenizer: {\r\n root: [\r\n { include: '@comment' },\r\n [\r\n /\\s-+@str*\\s*/,\r\n {\r\n cases: {\r\n '@eos': { token: 'key.identifier', next: '@popall' },\r\n '@default': { token: 'key.identifier', next: '@type' }\r\n }\r\n }\r\n ],\r\n [\r\n /^-+@str*\\s*/,\r\n {\r\n cases: {\r\n '@eos': { token: 'key.identifier', next: '@popall' },\r\n '@default': { token: 'key.identifier', next: '@type' }\r\n }\r\n }\r\n ]\r\n ],\r\n type: [\r\n { include: '@comment' },\r\n [\r\n /-+@str*\\s*/,\r\n {\r\n cases: {\r\n '@eos': { token: 'key.identifier', next: '@popall' },\r\n '@default': 'key.identifier'\r\n }\r\n }\r\n ],\r\n [\r\n /@str+\\s*/,\r\n {\r\n cases: {\r\n '@eos': { token: 'string', next: '@popall' },\r\n '@default': 'string'\r\n }\r\n }\r\n ]\r\n ],\r\n comment: [\r\n [\r\n /#.*$/,\r\n {\r\n cases: {\r\n '@eos': { token: 'comment', next: '@popall' }\r\n }\r\n }\r\n ]\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/12.20b3a26e.chunk.js b/static/js/12.20b3a26e.chunk.js new file mode 100644 index 0000000..c8a3a25 --- /dev/null +++ b/static/js/12.20b3a26e.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[12],{801:function(e,s,o){"use strict";o.r(s),o.d(s,"conf",(function(){return t})),o.d(s,"language",(function(){return n}));var t={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")}}},n={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:"'"}]},s={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"]]}}}}]); +//# sourceMappingURL=13.df305cad.chunk.js.map \ No newline at end of file diff --git a/static/js/13.df305cad.chunk.js.map b/static/js/13.df305cad.chunk.js.map new file mode 100644 index 0000000..86636b2 --- /dev/null +++ b/static/js/13.df305cad.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.js"],"names":["conf","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","surroundingPairs","language","defaultToken","tokenPostfix","ignoreCase","token","keywords","typeKeywords","operators","symbols","tokenizer","root","cases","include","comment","string","bracket","next","whitespace"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBC,iBAAkB,CACd,CAAEF,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,OAGjBE,EAAW,CAClBC,aAAc,GACdC,aAAc,YACdC,YAAY,EACZR,SAAU,CACN,CAAEE,KAAM,IAAKC,MAAO,IAAKM,MAAO,mBAChC,CAAEP,KAAM,IAAKC,MAAO,IAAKM,MAAO,oBAChC,CAAEP,KAAM,IAAKC,MAAO,IAAKM,MAAO,yBAChC,CAAEP,KAAM,IAAKC,MAAO,IAAKM,MAAO,oBAEpCC,SAAU,CACN,MACA,QACA,QACA,SACA,UACA,OACA,MACA,WACA,QACA,MACA,KACA,KACA,MACA,YACA,WACA,OACA,OACA,MACA,MACA,QACA,YACA,MACA,MACA,YACA,YACA,KACA,MACA,MACA,SACA,SACA,SACA,OACA,OACA,OACA,QAEJC,aAAc,CAAC,MAAO,OAAQ,SAAU,MACxCC,UAAW,CACP,IACA,IACA,IACA,KACA,KACA,KACA,IACA,KACA,MACA,MACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,MAGJC,QAAS,wBAETC,UAAW,CACPC,KAAM,CAEF,CACI,iBACA,CACIC,MAAO,CACH,YAAa,CAAEP,MAAO,cACtB,WAAY,gBAKxB,CAAEQ,QAAS,eAEX,CAAC,aAAc,aACf,CAAC,mBAAoB,aACrB,CACI,WACA,CACID,MAAO,CACH,aAAc,YACd,WAAY,MAKxB,CAAC,2BAA4B,gBAC7B,CAAC,sBAAuB,cACxB,CAAC,MAAO,UAER,CAAC,QAAS,aAEV,CAAC,kBAAmB,kBACpB,CAAC,IAAK,SAAU,WAEhB,CAAC,WAAY,UACb,CAAC,IAAK,kBACN,CAAC,QAAS,WAGdE,QAAS,CACL,CAAC,WAAY,WAEb,CAAC,OAAQ,UAAW,QACpB,CAAC,OAAQ,YAEbC,OAAQ,CACJ,CAAC,UAAW,UACZ,CAAC,MAAO,yBACR,CAAC,IAAK,CAAEV,MAAO,eAAgBW,QAAS,SAAUC,KAAM,UAE5DC,WAAY,CACR,CAAC,aAAc,SACf,CAAC,OAAQ,UAAW,YACpB,CAAC,UAAW","file":"static/js/13.df305cad.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['(*', '*)']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')'],\r\n ['<', '>']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '<', close: '>' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '<', close: '>' },\r\n { open: \"'\", close: \"'\" }\r\n ]\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.cameligo',\r\n ignoreCase: true,\r\n brackets: [\r\n { open: '{', close: '}', token: 'delimiter.curly' },\r\n { open: '[', close: ']', token: 'delimiter.square' },\r\n { open: '(', close: ')', token: 'delimiter.parenthesis' },\r\n { open: '<', close: '>', token: 'delimiter.angle' }\r\n ],\r\n keywords: [\r\n 'abs',\r\n 'begin',\r\n 'Bytes',\r\n 'Crypto',\r\n 'Current',\r\n 'else',\r\n 'end',\r\n 'failwith',\r\n 'false',\r\n 'fun',\r\n 'if',\r\n 'in',\r\n 'let',\r\n 'let%entry',\r\n 'let%init',\r\n 'List',\r\n 'list',\r\n 'Map',\r\n 'map',\r\n 'match',\r\n 'match%nat',\r\n 'mod',\r\n 'not',\r\n 'operation',\r\n 'Operation',\r\n 'of',\r\n 'Set',\r\n 'set',\r\n 'sender',\r\n 'source',\r\n 'String',\r\n 'then',\r\n 'true',\r\n 'type',\r\n 'with'\r\n ],\r\n typeKeywords: ['int', 'unit', 'string', 'tz'],\r\n operators: [\r\n '=',\r\n '>',\r\n '<',\r\n '<=',\r\n '>=',\r\n '<>',\r\n ':',\r\n ':=',\r\n 'and',\r\n 'mod',\r\n 'or',\r\n '+',\r\n '-',\r\n '*',\r\n '/',\r\n '@',\r\n '&',\r\n '^',\r\n '%',\r\n '->',\r\n '<-'\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=><:@\\^&|+\\-*\\/\\^%]+/,\r\n // The main tokenizer for our languages\r\n tokenizer: {\r\n root: [\r\n // identifiers and keywords\r\n [\r\n /[a-zA-Z_][\\w]*/,\r\n {\r\n cases: {\r\n '@keywords': { token: 'keyword.$0' },\r\n '@default': 'identifier'\r\n }\r\n }\r\n ],\r\n // whitespace\r\n { include: '@whitespace' },\r\n // delimiters and operators\r\n [/[{}()\\[\\]]/, '@brackets'],\r\n [/[<>](?!@symbols)/, '@brackets'],\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'delimiter',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n // numbers\r\n [/\\d*\\.\\d+([eE][\\-+]?\\d+)?/, 'number.float'],\r\n [/\\$[0-9a-fA-F]{1,16}/, 'number.hex'],\r\n [/\\d+/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n [/'([^'\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/'/, 'string', '@string'],\r\n // characters\r\n [/'[^\\\\']'/, 'string'],\r\n [/'/, 'string.invalid'],\r\n [/\\#\\d+/, 'string']\r\n ],\r\n /* */\r\n comment: [\r\n [/[^\\(\\*]+/, 'comment'],\r\n //[/\\(\\*/, 'comment', '@push' ], // nested comment not allowed :-(\r\n [/\\*\\)/, 'comment', '@pop'],\r\n [/\\(\\*/, 'comment']\r\n ],\r\n string: [\r\n [/[^\\\\']+/, 'string'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, 'white'],\r\n [/\\(\\*/, 'comment', '@comment'],\r\n [/\\/\\/.*$/, 'comment']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/14.6283d4e9.chunk.js b/static/js/14.6283d4e9.chunk.js new file mode 100644 index 0000000..ca6e3d0 --- /dev/null +++ b/static/js/14.6283d4e9.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[14],{803:function(e,t,n){"use strict";n.r(t),n.d(t,"conf",(function(){return r})),n.d(t,"language",(function(){return s}));var r={comments:{lineComment:";;"},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}],surroundingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}]},s={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"]]}}}}]); +//# sourceMappingURL=14.6283d4e9.chunk.js.map \ No newline at end of file diff --git a/static/js/14.6283d4e9.chunk.js.map b/static/js/14.6283d4e9.chunk.js.map new file mode 100644 index 0000000..3c046f4 --- /dev/null +++ b/static/js/14.6283d4e9.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.js"],"names":["conf","comments","lineComment","brackets","autoClosingPairs","open","close","surroundingPairs","language","defaultToken","ignoreCase","tokenPostfix","token","constants","numbers","characters","escapes","qualifiedSymbols","specialForms","coreSymbols","tokenizer","root","include","cases","whitespace","comment","string","multiLineString"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,YAAa,MAEjBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBC,iBAAkB,CACd,CAAEF,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,OAGjBE,EAAW,CAClBC,aAAc,GACdC,YAAY,EACZC,aAAc,OACdR,SAAU,CACN,CAAEE,KAAM,IAAKC,MAAO,IAAKM,MAAO,oBAChC,CAAEP,KAAM,IAAKC,MAAO,IAAKM,MAAO,yBAChC,CAAEP,KAAM,IAAKC,MAAO,IAAKM,MAAO,oBAEpCC,UAAW,CAAC,OAAQ,QAAS,OAE7BC,QAAS,kJACTC,WAAY,iIACZC,QAAS,uEAITC,iBAAkB,kNAClBC,aAAc,CACV,IACA,QACA,MACA,KACA,KACA,gBACA,eACA,MACA,QACA,QACA,OACA,QACA,MACA,OAEJC,YAAa,CACT,IACA,KACA,KACA,KACA,KACA,UACA,0BACA,WACA,oBACA,sBACA,kBACA,iBACA,qBACA,iBACA,2BACA,KACA,QACA,SACA,qBACA,cACA,OACA,iBACA,OACA,QACA,cACA,iBACA,gBACA,eACA,yBACA,mBACA,cACA,oBACA,gBACA,kBACA,mBACA,4BACA,uBACA,uBACA,IACA,KACA,IACA,KACA,KACA,MACA,eACA,aACA,QACA,YACA,WACA,qBACA,iBACA,KACA,IACA,IACA,KACA,IACA,KACA,IACA,KACA,aACA,OACA,yBACA,iBACA,WACA,SACA,gBACA,YACA,QACA,cACA,eACA,OACA,UACA,QACA,SACA,QACA,cACA,iBACA,OACA,YACA,MACA,OACA,QACA,UACA,YACA,OACA,OACA,eACA,YACA,YACA,cACA,aACA,WACA,YACA,aACA,SACA,QACA,SACA,WACA,eACA,OACA,QACA,YACA,SACA,QACA,OACA,SACA,SACA,aACA,UACA,UACA,cACA,YACA,WACA,UACA,SACA,UACA,iBACA,kBACA,WACA,UACA,UACA,gBACA,WACA,WACA,WACA,YACA,SACA,gBACA,UACA,OACA,aACA,QACA,SACA,OACA,OACA,MACA,OACA,aACA,qBACA,mBACA,QACA,QACA,QACA,eACA,eACA,aACA,cACA,aACA,aACA,eACA,QACA,SACA,qBACA,kBACA,QACA,UACA,UACA,OACA,aACA,UACA,mBACA,UACA,aACA,aACA,SACA,OACA,SACA,UACA,QACA,OACA,QACA,OACA,aACA,kBACA,YACA,QACA,WACA,YACA,gBACA,QACA,MACA,OACA,WACA,UACA,SACA,uBACA,YACA,eACA,WACA,YACA,WACA,OACA,QACA,UACA,cACA,YACA,YACA,UACA,QACA,SACA,UACA,cACA,QACA,SACA,cACA,cACA,OACA,QACA,SACA,UACA,WACA,YACA,QACA,QACA,QACA,SACA,UACA,OACA,SACA,eACA,UACA,UACA,OACA,YACA,aACA,WACA,QACA,SACA,SACA,iBACA,kBACA,gBACA,aACA,OACA,QACA,aACA,SACA,UACA,UACA,SACA,kBACA,cACA,YACA,WACA,SACA,SACA,WACA,SACA,UACA,OACA,eACA,UACA,qBACA,uBACA,WACA,QACA,UACA,QACA,cACA,SACA,SACA,QACA,KACA,MACA,QACA,OACA,MACA,QACA,SACA,cACA,SACA,cACA,gBACA,oBACA,eACA,UACA,YACA,gBACA,SACA,MACA,SACA,aACA,kBACA,sBACA,gBACA,WACA,YACA,OACA,eACA,WACA,oBACA,WACA,sBACA,SACA,aACA,WACA,SACA,SACA,UACA,OACA,SACA,QACA,MACA,OACA,WACA,aACA,UACA,WACA,QACA,YACA,MACA,YACA,OACA,WACA,aACA,SACA,YACA,OACA,aACA,OACA,MACA,OACA,UACA,eACA,OACA,OACA,eACA,MACA,OACA,UACA,WACA,OACA,WACA,WACA,MACA,QACA,WACA,OACA,QACA,QACA,OACA,YACA,cACA,cACA,cACA,UACA,OACA,aACA,QACA,OACA,cACA,gBACA,aACA,iBACA,MACA,aACA,cACA,OACA,SACA,OACA,MACA,UACA,QACA,UACA,QACA,aACA,OACA,aACA,UACA,MACA,UACA,sBACA,MACA,QACA,OACA,YACA,kBACA,WACA,WACA,OACA,UACA,OACA,SACA,OACA,QACA,MACA,WACA,YACA,aACA,OACA,KACA,aACA,aACA,aACA,SACA,UACA,aACA,YACA,aACA,aACA,WACA,MACA,UACA,UACA,MACA,UACA,YACA,eACA,OACA,KACA,UACA,UACA,YACA,gBACA,eACA,SACA,OACA,cACA,OACA,MACA,OACA,sBACA,WACA,OACA,KACA,SACA,gBACA,UACA,wBACA,QACA,aACA,YACA,eACA,eACA,YACA,SACA,UACA,cACA,MACA,UACA,UACA,QACA,wBACA,iBACA,aACA,cACA,uBACA,UACA,mBACA,qBACA,oBACA,OACA,OACA,WACA,WACA,gBACA,QACA,SACA,YACA,cACA,UACA,YACA,aACA,aACA,aACA,SACA,OACA,YACA,cACA,qBACA,sBACA,YACA,UACA,SACA,YACA,UACA,WACA,aACA,MACA,oBACA,kBACA,kBACA,UACA,QACA,gBACA,QACA,wBACA,MACA,SACA,qBACA,gBACA,YACA,eACA,SACA,aACA,UACA,YACA,UACA,SACA,cACA,cACA,UACA,OACA,gBACA,gBACA,UACA,cACA,OACA,UACA,OACA,aACA,SACA,cACA,OACA,WACA,WACA,MACA,OACA,WACA,QACA,WACA,cACA,MACA,2BACA,+BACA,qBACA,kBACA,iBACA,OACA,QACA,cACA,SACA,UACA,kBACA,gBACA,kBACA,iBACA,QACA,OACA,SACA,UACA,UACA,QACA,OACA,UACA,aACA,gBACA,aACA,gBACA,UACA,kBACA,OACA,WACA,aACA,MACA,UACA,SACA,aACA,OACA,SACA,SACA,SACA,QACA,aACA,SACA,UACA,OACA,iBACA,kBACA,OACA,YACA,WACA,aACA,OACA,SACA,gBACA,OACA,WACA,cACA,aACA,YACA,YACA,WACA,QACA,OACA,gBACA,oBACA,iBACA,iBACA,gBACA,oBACA,uBACA,mBACA,kBACA,gBACA,oBACA,gBACA,iBACA,qBACA,yBACA,mBACA,uBACA,0BACA,kBACA,qBACA,yBACA,WACA,UACA,mBACA,YACA,2BACA,SACA,YACA,eACA,OACA,MACA,QACA,MACA,OACA,UACA,UACA,OACA,YACA,MACA,SACA,YACA,UACA,YACA,YACA,UACA,SACA,OACA,aACA,WACA,WACA,YACA,QACA,gBACA,iBACA,cACA,uBACA,kBACA,YACA,YACA,eACA,iBACA,cACA,iBACA,UACA,QACA,UAEJC,UAAW,CACPC,KAAM,CAEF,CAAEC,QAAS,eAEX,CAAC,WAAY,UAEb,CAAC,cAAe,UAEhB,CAAEA,QAAS,WAEX,CAAC,aAAc,aAEf,CAAC,+BAAgC,UAEjC,CAAC,WAAY,QAEb,CACI,oBACA,CACIC,MAAO,CACH,QAAS,WACT,gBAAiB,UACjB,eAAgB,UAChB,aAAc,WACd,WAAY,iBAK5BC,WAAY,CACR,CAAC,SAAU,SACX,CAAC,OAAQ,WACT,CAAC,cAAe,UAAW,aAE/BC,QAAS,CACL,CAAC,KAAM,UAAW,SAClB,CAAC,KAAM,UAAW,QAClB,CAAC,QAAS,YAEdC,OAAQ,CAAC,CAAC,IAAK,SAAU,qBACzBC,gBAAiB,CACb,CAAC,IAAK,SAAU,WAChB,CAAC,WAAY,iBACb,CAAC,IAAK","file":"static/js/14.6283d4e9.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n lineComment: ';;'\r\n },\r\n brackets: [\r\n ['[', ']'],\r\n ['(', ')'],\r\n ['{', '}']\r\n ],\r\n autoClosingPairs: [\r\n { open: '[', close: ']' },\r\n { open: '\"', close: '\"' },\r\n { open: '(', close: ')' },\r\n { open: '{', close: '}' }\r\n ],\r\n surroundingPairs: [\r\n { open: '[', close: ']' },\r\n { open: '\"', close: '\"' },\r\n { open: '(', close: ')' },\r\n { open: '{', close: '}' }\r\n ]\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n ignoreCase: true,\r\n tokenPostfix: '.clj',\r\n brackets: [\r\n { open: '[', close: ']', token: 'delimiter.square' },\r\n { open: '(', close: ')', token: 'delimiter.parenthesis' },\r\n { open: '{', close: '}', token: 'delimiter.curly' }\r\n ],\r\n constants: ['true', 'false', 'nil'],\r\n // delimiters: /[\\\\\\[\\]\\s\"#'(),;@^`{}~]|$/,\r\n numbers: /^(?:[+\\-]?\\d+(?:(?:N|(?:[eE][+\\-]?\\d+))|(?:\\.?\\d*(?:M|(?:[eE][+\\-]?\\d+))?)|\\/\\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\\\\[\\]\\s\"#'(),;@^`{}~]|$))/,\r\n characters: /^(?:\\\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\\\\[\\]\\s\"(),;@^`{}~]|$))/,\r\n escapes: /^\\\\(?:[\"'\\\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,\r\n // simple-namespace := /^[^\\\\\\/\\[\\]\\d\\s\"#'(),;@^`{}~][^\\\\\\[\\]\\s\"(),;@^`{}~]*/\r\n // simple-symbol := /^(?:\\/|[^\\\\\\/\\[\\]\\d\\s\"#'(),;@^`{}~][^\\\\\\[\\]\\s\"(),;@^`{}~]*)/\r\n // qualified-symbol := ((<.>)*)?\r\n qualifiedSymbols: /^(?:(?:[^\\\\\\/\\[\\]\\d\\s\"#'(),;@^`{}~][^\\\\\\[\\]\\s\"(),;@^`{}~]*(?:\\.[^\\\\\\/\\[\\]\\d\\s\"#'(),;@^`{}~][^\\\\\\[\\]\\s\"(),;@^`{}~]*)*\\/)?(?:\\/|[^\\\\\\/\\[\\]\\d\\s\"#'(),;@^`{}~][^\\\\\\[\\]\\s\"(),;@^`{}~]*)*(?=[\\\\\\[\\]\\s\"(),;@^`{}~]|$))/,\r\n specialForms: [\r\n '.',\r\n 'catch',\r\n 'def',\r\n 'do',\r\n 'if',\r\n 'monitor-enter',\r\n 'monitor-exit',\r\n 'new',\r\n 'quote',\r\n 'recur',\r\n 'set!',\r\n 'throw',\r\n 'try',\r\n 'var'\r\n ],\r\n coreSymbols: [\r\n '*',\r\n \"*'\",\r\n '*1',\r\n '*2',\r\n '*3',\r\n '*agent*',\r\n '*allow-unresolved-vars*',\r\n '*assert*',\r\n '*clojure-version*',\r\n '*command-line-args*',\r\n '*compile-files*',\r\n '*compile-path*',\r\n '*compiler-options*',\r\n '*data-readers*',\r\n '*default-data-reader-fn*',\r\n '*e',\r\n '*err*',\r\n '*file*',\r\n '*flush-on-newline*',\r\n '*fn-loader*',\r\n '*in*',\r\n '*math-context*',\r\n '*ns*',\r\n '*out*',\r\n '*print-dup*',\r\n '*print-length*',\r\n '*print-level*',\r\n '*print-meta*',\r\n '*print-namespace-maps*',\r\n '*print-readably*',\r\n '*read-eval*',\r\n '*reader-resolver*',\r\n '*source-path*',\r\n '*suppress-read*',\r\n '*unchecked-math*',\r\n '*use-context-classloader*',\r\n '*verbose-defrecords*',\r\n '*warn-on-reflection*',\r\n '+',\r\n \"+'\",\r\n '-',\r\n \"-'\",\r\n '->',\r\n '->>',\r\n '->ArrayChunk',\r\n '->Eduction',\r\n '->Vec',\r\n '->VecNode',\r\n '->VecSeq',\r\n '-cache-protocol-fn',\r\n '-reset-methods',\r\n '..',\r\n '/',\r\n '<',\r\n '<=',\r\n '=',\r\n '==',\r\n '>',\r\n '>=',\r\n 'EMPTY-NODE',\r\n 'Inst',\r\n 'StackTraceElement->vec',\r\n 'Throwable->map',\r\n 'accessor',\r\n 'aclone',\r\n 'add-classpath',\r\n 'add-watch',\r\n 'agent',\r\n 'agent-error',\r\n 'agent-errors',\r\n 'aget',\r\n 'alength',\r\n 'alias',\r\n 'all-ns',\r\n 'alter',\r\n 'alter-meta!',\r\n 'alter-var-root',\r\n 'amap',\r\n 'ancestors',\r\n 'and',\r\n 'any?',\r\n 'apply',\r\n 'areduce',\r\n 'array-map',\r\n 'as->',\r\n 'aset',\r\n 'aset-boolean',\r\n 'aset-byte',\r\n 'aset-char',\r\n 'aset-double',\r\n 'aset-float',\r\n 'aset-int',\r\n 'aset-long',\r\n 'aset-short',\r\n 'assert',\r\n 'assoc',\r\n 'assoc!',\r\n 'assoc-in',\r\n 'associative?',\r\n 'atom',\r\n 'await',\r\n 'await-for',\r\n 'await1',\r\n 'bases',\r\n 'bean',\r\n 'bigdec',\r\n 'bigint',\r\n 'biginteger',\r\n 'binding',\r\n 'bit-and',\r\n 'bit-and-not',\r\n 'bit-clear',\r\n 'bit-flip',\r\n 'bit-not',\r\n 'bit-or',\r\n 'bit-set',\r\n 'bit-shift-left',\r\n 'bit-shift-right',\r\n 'bit-test',\r\n 'bit-xor',\r\n 'boolean',\r\n 'boolean-array',\r\n 'boolean?',\r\n 'booleans',\r\n 'bound-fn',\r\n 'bound-fn*',\r\n 'bound?',\r\n 'bounded-count',\r\n 'butlast',\r\n 'byte',\r\n 'byte-array',\r\n 'bytes',\r\n 'bytes?',\r\n 'case',\r\n 'cast',\r\n 'cat',\r\n 'char',\r\n 'char-array',\r\n 'char-escape-string',\r\n 'char-name-string',\r\n 'char?',\r\n 'chars',\r\n 'chunk',\r\n 'chunk-append',\r\n 'chunk-buffer',\r\n 'chunk-cons',\r\n 'chunk-first',\r\n 'chunk-next',\r\n 'chunk-rest',\r\n 'chunked-seq?',\r\n 'class',\r\n 'class?',\r\n 'clear-agent-errors',\r\n 'clojure-version',\r\n 'coll?',\r\n 'comment',\r\n 'commute',\r\n 'comp',\r\n 'comparator',\r\n 'compare',\r\n 'compare-and-set!',\r\n 'compile',\r\n 'complement',\r\n 'completing',\r\n 'concat',\r\n 'cond',\r\n 'cond->',\r\n 'cond->>',\r\n 'condp',\r\n 'conj',\r\n 'conj!',\r\n 'cons',\r\n 'constantly',\r\n 'construct-proxy',\r\n 'contains?',\r\n 'count',\r\n 'counted?',\r\n 'create-ns',\r\n 'create-struct',\r\n 'cycle',\r\n 'dec',\r\n \"dec'\",\r\n 'decimal?',\r\n 'declare',\r\n 'dedupe',\r\n 'default-data-readers',\r\n 'definline',\r\n 'definterface',\r\n 'defmacro',\r\n 'defmethod',\r\n 'defmulti',\r\n 'defn',\r\n 'defn-',\r\n 'defonce',\r\n 'defprotocol',\r\n 'defrecord',\r\n 'defstruct',\r\n 'deftype',\r\n 'delay',\r\n 'delay?',\r\n 'deliver',\r\n 'denominator',\r\n 'deref',\r\n 'derive',\r\n 'descendants',\r\n 'destructure',\r\n 'disj',\r\n 'disj!',\r\n 'dissoc',\r\n 'dissoc!',\r\n 'distinct',\r\n 'distinct?',\r\n 'doall',\r\n 'dorun',\r\n 'doseq',\r\n 'dosync',\r\n 'dotimes',\r\n 'doto',\r\n 'double',\r\n 'double-array',\r\n 'double?',\r\n 'doubles',\r\n 'drop',\r\n 'drop-last',\r\n 'drop-while',\r\n 'eduction',\r\n 'empty',\r\n 'empty?',\r\n 'ensure',\r\n 'ensure-reduced',\r\n 'enumeration-seq',\r\n 'error-handler',\r\n 'error-mode',\r\n 'eval',\r\n 'even?',\r\n 'every-pred',\r\n 'every?',\r\n 'ex-data',\r\n 'ex-info',\r\n 'extend',\r\n 'extend-protocol',\r\n 'extend-type',\r\n 'extenders',\r\n 'extends?',\r\n 'false?',\r\n 'ffirst',\r\n 'file-seq',\r\n 'filter',\r\n 'filterv',\r\n 'find',\r\n 'find-keyword',\r\n 'find-ns',\r\n 'find-protocol-impl',\r\n 'find-protocol-method',\r\n 'find-var',\r\n 'first',\r\n 'flatten',\r\n 'float',\r\n 'float-array',\r\n 'float?',\r\n 'floats',\r\n 'flush',\r\n 'fn',\r\n 'fn?',\r\n 'fnext',\r\n 'fnil',\r\n 'for',\r\n 'force',\r\n 'format',\r\n 'frequencies',\r\n 'future',\r\n 'future-call',\r\n 'future-cancel',\r\n 'future-cancelled?',\r\n 'future-done?',\r\n 'future?',\r\n 'gen-class',\r\n 'gen-interface',\r\n 'gensym',\r\n 'get',\r\n 'get-in',\r\n 'get-method',\r\n 'get-proxy-class',\r\n 'get-thread-bindings',\r\n 'get-validator',\r\n 'group-by',\r\n 'halt-when',\r\n 'hash',\r\n 'hash-combine',\r\n 'hash-map',\r\n 'hash-ordered-coll',\r\n 'hash-set',\r\n 'hash-unordered-coll',\r\n 'ident?',\r\n 'identical?',\r\n 'identity',\r\n 'if-let',\r\n 'if-not',\r\n 'if-some',\r\n 'ifn?',\r\n 'import',\r\n 'in-ns',\r\n 'inc',\r\n \"inc'\",\r\n 'indexed?',\r\n 'init-proxy',\r\n 'inst-ms',\r\n 'inst-ms*',\r\n 'inst?',\r\n 'instance?',\r\n 'int',\r\n 'int-array',\r\n 'int?',\r\n 'integer?',\r\n 'interleave',\r\n 'intern',\r\n 'interpose',\r\n 'into',\r\n 'into-array',\r\n 'ints',\r\n 'io!',\r\n 'isa?',\r\n 'iterate',\r\n 'iterator-seq',\r\n 'juxt',\r\n 'keep',\r\n 'keep-indexed',\r\n 'key',\r\n 'keys',\r\n 'keyword',\r\n 'keyword?',\r\n 'last',\r\n 'lazy-cat',\r\n 'lazy-seq',\r\n 'let',\r\n 'letfn',\r\n 'line-seq',\r\n 'list',\r\n 'list*',\r\n 'list?',\r\n 'load',\r\n 'load-file',\r\n 'load-reader',\r\n 'load-string',\r\n 'loaded-libs',\r\n 'locking',\r\n 'long',\r\n 'long-array',\r\n 'longs',\r\n 'loop',\r\n 'macroexpand',\r\n 'macroexpand-1',\r\n 'make-array',\r\n 'make-hierarchy',\r\n 'map',\r\n 'map-entry?',\r\n 'map-indexed',\r\n 'map?',\r\n 'mapcat',\r\n 'mapv',\r\n 'max',\r\n 'max-key',\r\n 'memfn',\r\n 'memoize',\r\n 'merge',\r\n 'merge-with',\r\n 'meta',\r\n 'method-sig',\r\n 'methods',\r\n 'min',\r\n 'min-key',\r\n 'mix-collection-hash',\r\n 'mod',\r\n 'munge',\r\n 'name',\r\n 'namespace',\r\n 'namespace-munge',\r\n 'nat-int?',\r\n 'neg-int?',\r\n 'neg?',\r\n 'newline',\r\n 'next',\r\n 'nfirst',\r\n 'nil?',\r\n 'nnext',\r\n 'not',\r\n 'not-any?',\r\n 'not-empty',\r\n 'not-every?',\r\n 'not=',\r\n 'ns',\r\n 'ns-aliases',\r\n 'ns-imports',\r\n 'ns-interns',\r\n 'ns-map',\r\n 'ns-name',\r\n 'ns-publics',\r\n 'ns-refers',\r\n 'ns-resolve',\r\n 'ns-unalias',\r\n 'ns-unmap',\r\n 'nth',\r\n 'nthnext',\r\n 'nthrest',\r\n 'num',\r\n 'number?',\r\n 'numerator',\r\n 'object-array',\r\n 'odd?',\r\n 'or',\r\n 'parents',\r\n 'partial',\r\n 'partition',\r\n 'partition-all',\r\n 'partition-by',\r\n 'pcalls',\r\n 'peek',\r\n 'persistent!',\r\n 'pmap',\r\n 'pop',\r\n 'pop!',\r\n 'pop-thread-bindings',\r\n 'pos-int?',\r\n 'pos?',\r\n 'pr',\r\n 'pr-str',\r\n 'prefer-method',\r\n 'prefers',\r\n 'primitives-classnames',\r\n 'print',\r\n 'print-ctor',\r\n 'print-dup',\r\n 'print-method',\r\n 'print-simple',\r\n 'print-str',\r\n 'printf',\r\n 'println',\r\n 'println-str',\r\n 'prn',\r\n 'prn-str',\r\n 'promise',\r\n 'proxy',\r\n 'proxy-call-with-super',\r\n 'proxy-mappings',\r\n 'proxy-name',\r\n 'proxy-super',\r\n 'push-thread-bindings',\r\n 'pvalues',\r\n 'qualified-ident?',\r\n 'qualified-keyword?',\r\n 'qualified-symbol?',\r\n 'quot',\r\n 'rand',\r\n 'rand-int',\r\n 'rand-nth',\r\n 'random-sample',\r\n 'range',\r\n 'ratio?',\r\n 'rational?',\r\n 'rationalize',\r\n 're-find',\r\n 're-groups',\r\n 're-matcher',\r\n 're-matches',\r\n 're-pattern',\r\n 're-seq',\r\n 'read',\r\n 'read-line',\r\n 'read-string',\r\n 'reader-conditional',\r\n 'reader-conditional?',\r\n 'realized?',\r\n 'record?',\r\n 'reduce',\r\n 'reduce-kv',\r\n 'reduced',\r\n 'reduced?',\r\n 'reductions',\r\n 'ref',\r\n 'ref-history-count',\r\n 'ref-max-history',\r\n 'ref-min-history',\r\n 'ref-set',\r\n 'refer',\r\n 'refer-clojure',\r\n 'reify',\r\n 'release-pending-sends',\r\n 'rem',\r\n 'remove',\r\n 'remove-all-methods',\r\n 'remove-method',\r\n 'remove-ns',\r\n 'remove-watch',\r\n 'repeat',\r\n 'repeatedly',\r\n 'replace',\r\n 'replicate',\r\n 'require',\r\n 'reset!',\r\n 'reset-meta!',\r\n 'reset-vals!',\r\n 'resolve',\r\n 'rest',\r\n 'restart-agent',\r\n 'resultset-seq',\r\n 'reverse',\r\n 'reversible?',\r\n 'rseq',\r\n 'rsubseq',\r\n 'run!',\r\n 'satisfies?',\r\n 'second',\r\n 'select-keys',\r\n 'send',\r\n 'send-off',\r\n 'send-via',\r\n 'seq',\r\n 'seq?',\r\n 'seqable?',\r\n 'seque',\r\n 'sequence',\r\n 'sequential?',\r\n 'set',\r\n 'set-agent-send-executor!',\r\n 'set-agent-send-off-executor!',\r\n 'set-error-handler!',\r\n 'set-error-mode!',\r\n 'set-validator!',\r\n 'set?',\r\n 'short',\r\n 'short-array',\r\n 'shorts',\r\n 'shuffle',\r\n 'shutdown-agents',\r\n 'simple-ident?',\r\n 'simple-keyword?',\r\n 'simple-symbol?',\r\n 'slurp',\r\n 'some',\r\n 'some->',\r\n 'some->>',\r\n 'some-fn',\r\n 'some?',\r\n 'sort',\r\n 'sort-by',\r\n 'sorted-map',\r\n 'sorted-map-by',\r\n 'sorted-set',\r\n 'sorted-set-by',\r\n 'sorted?',\r\n 'special-symbol?',\r\n 'spit',\r\n 'split-at',\r\n 'split-with',\r\n 'str',\r\n 'string?',\r\n 'struct',\r\n 'struct-map',\r\n 'subs',\r\n 'subseq',\r\n 'subvec',\r\n 'supers',\r\n 'swap!',\r\n 'swap-vals!',\r\n 'symbol',\r\n 'symbol?',\r\n 'sync',\r\n 'tagged-literal',\r\n 'tagged-literal?',\r\n 'take',\r\n 'take-last',\r\n 'take-nth',\r\n 'take-while',\r\n 'test',\r\n 'the-ns',\r\n 'thread-bound?',\r\n 'time',\r\n 'to-array',\r\n 'to-array-2d',\r\n 'trampoline',\r\n 'transduce',\r\n 'transient',\r\n 'tree-seq',\r\n 'true?',\r\n 'type',\r\n 'unchecked-add',\r\n 'unchecked-add-int',\r\n 'unchecked-byte',\r\n 'unchecked-char',\r\n 'unchecked-dec',\r\n 'unchecked-dec-int',\r\n 'unchecked-divide-int',\r\n 'unchecked-double',\r\n 'unchecked-float',\r\n 'unchecked-inc',\r\n 'unchecked-inc-int',\r\n 'unchecked-int',\r\n 'unchecked-long',\r\n 'unchecked-multiply',\r\n 'unchecked-multiply-int',\r\n 'unchecked-negate',\r\n 'unchecked-negate-int',\r\n 'unchecked-remainder-int',\r\n 'unchecked-short',\r\n 'unchecked-subtract',\r\n 'unchecked-subtract-int',\r\n 'underive',\r\n 'unquote',\r\n 'unquote-splicing',\r\n 'unreduced',\r\n 'unsigned-bit-shift-right',\r\n 'update',\r\n 'update-in',\r\n 'update-proxy',\r\n 'uri?',\r\n 'use',\r\n 'uuid?',\r\n 'val',\r\n 'vals',\r\n 'var-get',\r\n 'var-set',\r\n 'var?',\r\n 'vary-meta',\r\n 'vec',\r\n 'vector',\r\n 'vector-of',\r\n 'vector?',\r\n 'volatile!',\r\n 'volatile?',\r\n 'vreset!',\r\n 'vswap!',\r\n 'when',\r\n 'when-first',\r\n 'when-let',\r\n 'when-not',\r\n 'when-some',\r\n 'while',\r\n 'with-bindings',\r\n 'with-bindings*',\r\n 'with-in-str',\r\n 'with-loading-context',\r\n 'with-local-vars',\r\n 'with-meta',\r\n 'with-open',\r\n 'with-out-str',\r\n 'with-precision',\r\n 'with-redefs',\r\n 'with-redefs-fn',\r\n 'xml-seq',\r\n 'zero?',\r\n 'zipmap'\r\n ],\r\n tokenizer: {\r\n root: [\r\n // whitespaces and comments\r\n { include: '@whitespace' },\r\n // numbers\r\n [/@numbers/, 'number'],\r\n // characters\r\n [/@characters/, 'string'],\r\n // strings\r\n { include: '@string' },\r\n // brackets\r\n [/[()\\[\\]{}]/, '@brackets'],\r\n // regular expressions\r\n [/\\/#\"(?:\\.|(?:\")|[^\"\\n])*\"\\/g/, 'regexp'],\r\n // reader macro characters\r\n [/[#'@^`~]/, 'meta'],\r\n // symbols\r\n [\r\n /@qualifiedSymbols/,\r\n {\r\n cases: {\r\n '^:.+$': 'constant',\r\n '@specialForms': 'keyword',\r\n '@coreSymbols': 'keyword',\r\n '@constants': 'constant',\r\n '@default': 'identifier'\r\n }\r\n }\r\n ]\r\n ],\r\n whitespace: [\r\n [/[\\s,]+/, 'white'],\r\n [/;.*$/, 'comment'],\r\n [/\\(comment\\b/, 'comment', '@comment']\r\n ],\r\n comment: [\r\n [/\\(/, 'comment', '@push'],\r\n [/\\)/, 'comment', '@pop'],\r\n [/[^()]/, 'comment']\r\n ],\r\n string: [[/\"/, 'string', '@multiLineString']],\r\n multiLineString: [\r\n [/\"/, 'string', '@popall'],\r\n [/@escapes/, 'string.escape'],\r\n [/./, 'string']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/15.bbec87c9.chunk.js b/static/js/15.bbec87c9.chunk.js new file mode 100644 index 0000000..5bbe04f --- /dev/null +++ b/static/js/15.bbec87c9.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[15],{804:function(e,n,r){"use strict";r.r(n),r.d(n,"conf",(function(){return t})),r.d(n,"language",(function(){return s}));var t={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")}}},s={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:/[=>\\/\\?\\s]+)/g,\r\n comments: {\r\n blockComment: ['###', '###'],\r\n lineComment: '#'\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*#region\\\\b'),\r\n end: new RegExp('^\\\\s*#endregion\\\\b')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n ignoreCase: true,\r\n tokenPostfix: '.coffee',\r\n brackets: [\r\n { open: '{', close: '}', token: 'delimiter.curly' },\r\n { open: '[', close: ']', token: 'delimiter.square' },\r\n { open: '(', close: ')', token: 'delimiter.parenthesis' }\r\n ],\r\n regEx: /\\/(?!\\/\\/)(?:[^\\/\\\\]|\\\\.)*\\/[igm]*/,\r\n keywords: [\r\n 'and',\r\n 'or',\r\n 'is',\r\n 'isnt',\r\n 'not',\r\n 'on',\r\n 'yes',\r\n '@',\r\n 'no',\r\n 'off',\r\n 'true',\r\n 'false',\r\n 'null',\r\n 'this',\r\n 'new',\r\n 'delete',\r\n 'typeof',\r\n 'in',\r\n 'instanceof',\r\n 'return',\r\n 'throw',\r\n 'break',\r\n 'continue',\r\n 'debugger',\r\n 'if',\r\n 'else',\r\n 'switch',\r\n 'for',\r\n 'while',\r\n 'do',\r\n 'try',\r\n 'catch',\r\n 'finally',\r\n 'class',\r\n 'extends',\r\n 'super',\r\n 'undefined',\r\n 'then',\r\n 'unless',\r\n 'until',\r\n 'loop',\r\n 'of',\r\n 'by',\r\n 'when'\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>\/\?\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")}}},s={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"]]}}}}]); +//# sourceMappingURL=16.a8325dea.chunk.js.map \ No newline at end of file diff --git a/static/js/16.a8325dea.chunk.js.map b/static/js/16.a8325dea.chunk.js.map new file mode 100644 index 0000000..8969afd --- /dev/null +++ b/static/js/16.a8325dea.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.js"],"names":["conf","wordPattern","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","folding","markers","start","RegExp","end","language","defaultToken","tokenPostfix","token","keywords","namespaceFollows","parenFollows","operators","symbols","escapes","tokenizer","root","cases","next","include","qualified","namespace","comment","string","litstring","litinterpstring","interpolatedstring","whitespace"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,YAAa,uFACbC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,aAE/CC,iBAAkB,CACd,CAAEH,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBG,QAAS,CACLC,QAAS,CACLC,MAAO,IAAIC,OAAO,mBAClBC,IAAK,IAAID,OAAO,yBAIjBE,EAAW,CAClBC,aAAc,GACdC,aAAc,MACdb,SAAU,CACN,CAAEE,KAAM,IAAKC,MAAO,IAAKW,MAAO,mBAChC,CAAEZ,KAAM,IAAKC,MAAO,IAAKW,MAAO,oBAChC,CAAEZ,KAAM,IAAKC,MAAO,IAAKW,MAAO,yBAChC,CAAEZ,KAAM,IAAKC,MAAO,IAAKW,MAAO,oBAEpCC,SAAU,CACN,SACA,QACA,QACA,OACA,UACA,QACA,OACA,QACA,SACA,MACA,OACA,OACA,QACA,OACA,QACA,SACA,SACA,UACA,SACA,WACA,KACA,KACA,MACA,MACA,OACA,OACA,MACA,SACA,OACA,UACA,YACA,UACA,WACA,MACA,QACA,KACA,OACA,SACA,OACA,QACA,KACA,MACA,UACA,KACA,QACA,WACA,OACA,SACA,QACA,MACA,QACA,UACA,OACA,QACA,OACA,MACA,QACA,OACA,KACA,SACA,OACA,UACA,YACA,aACA,SACA,QACA,KACA,YACA,UACA,QACA,QACA,QACA,SACA,QACA,WACA,SACA,YACA,WACA,UACA,WACA,SACA,SACA,SACA,WACA,WACA,UACA,WACA,SACA,MACA,MACA,MACA,SACA,WACA,OACA,QACA,WACA,WACA,YACA,OACA,OACA,QACA,QACA,QACA,SACA,aACA,SACA,SACA,QAEJC,iBAAkB,CAAC,YAAa,SAChCC,aAAc,CAAC,KAAM,MAAO,QAAS,SAAU,UAAW,QAAS,QAAS,QAC5EC,UAAW,CACP,IACA,KACA,KACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,KACA,MAEJC,QAAS,wBAETC,QAAS,wEAETC,UAAW,CACPC,KAAM,CAEF,CACI,kBACA,CACIC,MAAO,CACH,oBAAqB,CACjBT,MAAO,aACPU,KAAM,cAEV,YAAa,CACTV,MAAO,aACPU,KAAM,cAEV,WAAY,CAAEV,MAAO,aAAcU,KAAM,iBAKrD,CAAEC,QAAS,eAEX,CACI,IACA,CACIF,MAAO,CACH,0BAA2B,CACvBT,MAAO,eACPU,KAAM,QAEV,uBAAwB,CACpBV,MAAO,eACPU,KAAM,QAEV,WAAY,eAIxB,CAAC,aAAc,aACf,CAAC,mBAAoB,aACrB,CACI,WACA,CACID,MAAO,CACH,aAAc,YACd,WAAY,MAKxB,CAAC,0CAA2C,gBAC5C,CAAC,qBAAsB,cACvB,CAAC,cAAe,cAChB,CAAC,UAAW,UAEZ,CAAC,QAAS,aAEV,CAAC,kBAAmB,kBACpB,CAAC,IAAK,CAAET,MAAO,eAAgBU,KAAM,YACrC,CAAC,QAAS,CAAEV,MAAO,eAAgBU,KAAM,qBACzC,CAAC,MAAO,CAAEV,MAAO,eAAgBU,KAAM,eACvC,CAAC,MAAO,CAAEV,MAAO,eAAgBU,KAAM,wBAEvC,CAAC,WAAY,UACb,CAAC,mBAAoB,CAAC,SAAU,gBAAiB,WACjD,CAAC,IAAK,mBAEVE,UAAW,CACP,CACI,iBACA,CACIH,MAAO,CACH,YAAa,CAAET,MAAO,cACtB,WAAY,gBAIxB,CAAC,KAAM,aACP,CAAC,GAAI,GAAI,SAEba,UAAW,CACP,CAAEF,QAAS,eACX,CAAC,WAAY,aACb,CAAC,QAAS,aACV,CAAC,GAAI,GAAI,SAEbG,QAAS,CACL,CAAC,UAAW,WAEZ,CAAC,OAAQ,UAAW,QACpB,CAAC,QAAS,YAEdC,OAAQ,CACJ,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,CAAEf,MAAO,eAAgBU,KAAM,UAEzCM,UAAW,CACP,CAAC,QAAS,UACV,CAAC,KAAM,iBACP,CAAC,IAAK,CAAEhB,MAAO,eAAgBU,KAAM,UAEzCO,gBAAiB,CACb,CAAC,SAAU,UACX,CAAC,KAAM,iBACP,CAAC,KAAM,iBACP,CAAC,KAAM,iBACP,CAAC,IAAK,CAAEjB,MAAO,eAAgBU,KAAM,yBACrC,CAAC,IAAK,CAAEV,MAAO,eAAgBU,KAAM,UAEzCQ,mBAAoB,CAChB,CAAC,WAAY,UACb,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,KAAM,iBACP,CAAC,KAAM,iBACP,CAAC,IAAK,CAAElB,MAAO,eAAgBU,KAAM,4BACrC,CAAC,IAAK,CAAEV,MAAO,eAAgBU,KAAM,UAEzCS,WAAY,CACR,CAAC,iCAAkC,iBACnC,CAAC,oBAAqB,iBACtB,CAAC,iBAAkB,IACnB,CAAC,OAAQ,UAAW,YACpB,CAAC,UAAW","file":"static/js/16.a8325dea.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\#\\$\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g,\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: \"'\", close: \"'\", notIn: ['string', 'comment'] },\r\n { open: '\"', close: '\"', notIn: ['string', 'comment'] }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '<', close: '>' },\r\n { open: \"'\", close: \"'\" },\r\n { open: '\"', close: '\"' }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*#region\\\\b'),\r\n end: new RegExp('^\\\\s*#endregion\\\\b')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.cs',\r\n brackets: [\r\n { open: '{', close: '}', token: 'delimiter.curly' },\r\n { open: '[', close: ']', token: 'delimiter.square' },\r\n { open: '(', close: ')', token: 'delimiter.parenthesis' },\r\n { open: '<', close: '>', token: 'delimiter.angle' }\r\n ],\r\n keywords: [\r\n 'extern',\r\n 'alias',\r\n 'using',\r\n 'bool',\r\n 'decimal',\r\n 'sbyte',\r\n 'byte',\r\n 'short',\r\n 'ushort',\r\n 'int',\r\n 'uint',\r\n 'long',\r\n 'ulong',\r\n 'char',\r\n 'float',\r\n 'double',\r\n 'object',\r\n 'dynamic',\r\n 'string',\r\n 'assembly',\r\n 'is',\r\n 'as',\r\n 'ref',\r\n 'out',\r\n 'this',\r\n 'base',\r\n 'new',\r\n 'typeof',\r\n 'void',\r\n 'checked',\r\n 'unchecked',\r\n 'default',\r\n 'delegate',\r\n 'var',\r\n 'const',\r\n 'if',\r\n 'else',\r\n 'switch',\r\n 'case',\r\n 'while',\r\n 'do',\r\n 'for',\r\n 'foreach',\r\n 'in',\r\n 'break',\r\n 'continue',\r\n 'goto',\r\n 'return',\r\n 'throw',\r\n 'try',\r\n 'catch',\r\n 'finally',\r\n 'lock',\r\n 'yield',\r\n 'from',\r\n 'let',\r\n 'where',\r\n 'join',\r\n 'on',\r\n 'equals',\r\n 'into',\r\n 'orderby',\r\n 'ascending',\r\n 'descending',\r\n 'select',\r\n 'group',\r\n 'by',\r\n 'namespace',\r\n 'partial',\r\n 'class',\r\n 'field',\r\n 'event',\r\n 'method',\r\n 'param',\r\n 'property',\r\n 'public',\r\n 'protected',\r\n 'internal',\r\n 'private',\r\n 'abstract',\r\n 'sealed',\r\n 'static',\r\n 'struct',\r\n 'readonly',\r\n 'volatile',\r\n 'virtual',\r\n 'override',\r\n 'params',\r\n 'get',\r\n 'set',\r\n 'add',\r\n 'remove',\r\n 'operator',\r\n 'true',\r\n 'false',\r\n 'implicit',\r\n 'explicit',\r\n 'interface',\r\n 'enum',\r\n 'null',\r\n 'async',\r\n 'await',\r\n 'fixed',\r\n 'sizeof',\r\n 'stackalloc',\r\n 'unsafe',\r\n 'nameof',\r\n 'when'\r\n ],\r\n namespaceFollows: ['namespace', 'using'],\r\n parenFollows: ['if', 'for', 'while', 'switch', 'foreach', 'using', 'catch', 'when'],\r\n operators: [\r\n '=',\r\n '??',\r\n '||',\r\n '&&',\r\n '|',\r\n '^',\r\n '&',\r\n '==',\r\n '!=',\r\n '<=',\r\n '>=',\r\n '<<',\r\n '+',\r\n '-',\r\n '*',\r\n '/',\r\n '%',\r\n '!',\r\n '~',\r\n '++',\r\n '--',\r\n '+=',\r\n '-=',\r\n '*=',\r\n '/=',\r\n '%=',\r\n '&=',\r\n '|=',\r\n '^=',\r\n '<<=',\r\n '>>=',\r\n '>>',\r\n '=>'\r\n ],\r\n symbols: /[=>](?!@symbols)/, '@brackets'],\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'delimiter',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n // numbers\r\n [/[0-9_]*\\.[0-9_]+([eE][\\-+]?\\d+)?[fFdD]?/, 'number.float'],\r\n [/0[xX][0-9a-fA-F_]+/, 'number.hex'],\r\n [/0[bB][01_]+/, 'number.hex'],\r\n [/[0-9_]+/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"/, { token: 'string.quote', next: '@string' }],\r\n [/\\$\\@\"/, { token: 'string.quote', next: '@litinterpstring' }],\r\n [/\\@\"/, { token: 'string.quote', next: '@litstring' }],\r\n [/\\$\"/, { token: 'string.quote', next: '@interpolatedstring' }],\r\n // characters\r\n [/'[^\\\\']'/, 'string'],\r\n [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],\r\n [/'/, 'string.invalid']\r\n ],\r\n qualified: [\r\n [\r\n /[a-zA-Z_][\\w]*/,\r\n {\r\n cases: {\r\n '@keywords': { token: 'keyword.$0' },\r\n '@default': 'identifier'\r\n }\r\n }\r\n ],\r\n [/\\./, 'delimiter'],\r\n ['', '', '@pop']\r\n ],\r\n namespace: [\r\n { include: '@whitespace' },\r\n [/[A-Z]\\w*/, 'namespace'],\r\n [/[\\.=]/, 'delimiter'],\r\n ['', '', '@pop']\r\n ],\r\n comment: [\r\n [/[^\\/*]+/, 'comment'],\r\n // [/\\/\\*/, 'comment', '@push' ], // no nested comments :-(\r\n ['\\\\*/', 'comment', '@pop'],\r\n [/[\\/*]/, 'comment']\r\n ],\r\n string: [\r\n [/[^\\\\\"]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"/, { token: 'string.quote', next: '@pop' }]\r\n ],\r\n litstring: [\r\n [/[^\"]+/, 'string'],\r\n [/\"\"/, 'string.escape'],\r\n [/\"/, { token: 'string.quote', next: '@pop' }]\r\n ],\r\n litinterpstring: [\r\n [/[^\"{]+/, 'string'],\r\n [/\"\"/, 'string.escape'],\r\n [/{{/, 'string.escape'],\r\n [/}}/, 'string.escape'],\r\n [/{/, { token: 'string.quote', next: 'root.litinterpstring' }],\r\n [/\"/, { token: 'string.quote', next: '@pop' }]\r\n ],\r\n interpolatedstring: [\r\n [/[^\\\\\"{]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/{{/, 'string.escape'],\r\n [/}}/, 'string.escape'],\r\n [/{/, { token: 'string.quote', next: 'root.interpolatedstring' }],\r\n [/\"/, { token: 'string.quote', next: '@pop' }]\r\n ],\r\n whitespace: [\r\n [/^[ \\t\\v\\f]*#((r)|(load))(?=\\s)/, 'directive.csx'],\r\n [/^[ \\t\\v\\f]*#\\w.*$/, 'namespace.cpp'],\r\n [/[ \\t\\v\\f\\r\\n]+/, ''],\r\n [/\\/\\*/, 'comment', '@comment'],\r\n [/\\/\\/.*$/, 'comment']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/17.32789fd3.chunk.js b/static/js/17.32789fd3.chunk.js new file mode 100644 index 0000000..41e8fde --- /dev/null +++ b/static/js/17.32789fd3.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[17],{807:function(t,r,e){"use strict";e.r(r),e.d(r,"conf",(function(){return s})),e.d(r,"language",(function(){return o}));var s={brackets:[],autoClosingPairs:[],surroundingPairs:[]},o={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"]]}}}}]); +//# sourceMappingURL=18.28fd2809.chunk.js.map \ No newline at end of file diff --git a/static/js/18.28fd2809.chunk.js.map b/static/js/18.28fd2809.chunk.js.map new file mode 100644 index 0000000..5cda6c9 --- /dev/null +++ b/static/js/18.28fd2809.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/css/css.js"],"names":["conf","wordPattern","comments","blockComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","folding","markers","start","RegExp","end","language","defaultToken","tokenPostfix","ws","identifier","token","tokenizer","root","include","selector","next","selectorbody","selectorname","selectorattribute","term","rulevalue","warndebug","import","urldeclaration","parenthizedterm","declarationbody","comment","name","numbers","units","keyframedeclaration","switchTo","keyframebody","functioninvocation","functionarguments","strings","stringenddoublequote","stringendquote"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,YAAa,0DACbC,SAAU,CACNC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,aAE/CC,iBAAkB,CACd,CAAEH,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBG,QAAS,CACLC,QAAS,CACLC,MAAO,IAAIC,OAAO,gDAClBC,IAAK,IAAID,OAAO,2CAIjBE,EAAW,CAClBC,aAAc,GACdC,aAAc,OACdC,GAAI,eACJC,WAAY,sHACZf,SAAU,CACN,CAAEE,KAAM,IAAKC,MAAO,IAAKa,MAAO,qBAChC,CAAEd,KAAM,IAAKC,MAAO,IAAKa,MAAO,qBAChC,CAAEd,KAAM,IAAKC,MAAO,IAAKa,MAAO,yBAChC,CAAEd,KAAM,IAAKC,MAAO,IAAKa,MAAO,oBAEpCC,UAAW,CACPC,KAAM,CAAC,CAAEC,QAAS,cAClBC,SAAU,CACN,CAAED,QAAS,aACX,CAAEA,QAAS,WACX,CAAEA,QAAS,YACX,CACI,+DACA,CAAEH,MAAO,UAAWK,KAAM,yBAE9B,CAAC,4CAA6C,CAAEL,MAAO,YACvD,CAAC,yBAA0B,CAAEA,MAAO,UAAWK,KAAM,qBACrD,CACI,oBACA,CAAC,kBAAmB,CAAEL,MAAO,wBAAyBK,KAAM,qBAEhE,CACI,aACA,CAAC,kBAAmB,CAAEL,MAAO,wBAAyBK,KAAM,qBAEhE,CAAEF,QAAS,iBACX,CAAC,QAAS,OACV,CAAC,UAAW,aACZ,CAAC,MAAO,CAAEH,MAAO,oBAAqBK,KAAM,uBAC5C,CAAC,IAAK,CAAEL,MAAO,oBAAqBK,KAAM,mBAE9CC,aAAc,CACV,CAAEH,QAAS,aACX,CAAC,gDAAiD,iBAAkB,cACpE,CAAC,IAAK,CAAEH,MAAO,oBAAqBK,KAAM,UAE9CE,aAAc,CACV,CAAC,qCAAsC,QAE3CC,kBAAmB,CACf,CAAEL,QAAS,SACX,CAAC,IAAK,CAAEH,MAAO,oBAAqBK,KAAM,UAE9CI,KAAM,CACF,CAAEN,QAAS,aACX,CACI,oBACA,CAAC,kBAAmB,CAAEH,MAAO,wBAAyBK,KAAM,qBAEhE,CACI,aACA,CAAC,kBAAmB,CAAEL,MAAO,wBAAyBK,KAAM,qBAEhE,CAAEF,QAAS,uBACX,CAAEA,QAAS,YACX,CAAEA,QAAS,SACX,CAAC,gCAAiC,aAClC,CAAC,IAAK,cAEVO,UAAW,CACP,CAAEP,QAAS,aACX,CAAEA,QAAS,YACX,CAAEA,QAAS,SACX,CAAC,aAAc,WACf,CAAC,IAAK,YAAa,QACnB,CAAC,QAAS,CAAEH,MAAO,GAAIK,KAAM,UAEjCM,UAAW,CAAC,CAAC,kBAAmB,CAAEX,MAAO,UAAWK,KAAM,sBAC1DO,OAAQ,CAAC,CAAC,cAAe,CAAEZ,MAAO,UAAWK,KAAM,sBACnDQ,eAAgB,CACZ,CAAEV,QAAS,YACX,CAAC,YAAa,UACd,CAAC,MAAO,CAAEH,MAAO,wBAAyBK,KAAM,UAEpDS,gBAAiB,CACb,CAAEX,QAAS,SACX,CAAC,MAAO,CAAEH,MAAO,wBAAyBK,KAAM,UAEpDU,gBAAiB,CACb,CAAEZ,QAAS,SACX,CAAC,IAAK,YAAa,QACnB,CAAC,QAAS,CAAEH,MAAO,GAAIK,KAAM,UAEjCvB,SAAU,CACN,CAAC,SAAU,UAAW,YACtB,CAAC,YAAa,YAElBkC,QAAS,CACL,CAAC,SAAU,UAAW,QACtB,CAAC,SAAU,WACX,CAAC,IAAK,YAEVC,KAAM,CAAC,CAAC,cAAe,oBACvBC,QAAS,CACL,CACI,qCACA,CAAElB,MAAO,yBAA0BK,KAAM,WAE7C,CAAC,wBAAyB,wBAE9Bc,MAAO,CACH,CACI,uFACA,uBACA,SAGRC,oBAAqB,CACjB,CAAC,cAAe,mBAChB,CAAC,IAAK,CAAEpB,MAAO,oBAAqBqB,SAAU,mBAElDC,aAAc,CACV,CAAEnB,QAAS,SACX,CAAC,IAAK,CAAEH,MAAO,oBAAqBK,KAAM,kBAC1C,CAAC,IAAK,CAAEL,MAAO,oBAAqBK,KAAM,UAE9CkB,mBAAoB,CAChB,CAAC,iBAAkB,CAAEvB,MAAO,kBAAmBK,KAAM,wBAEzDmB,kBAAmB,CACf,CAAC,qBAAsB,kBACvB,CAAC,MAAO,aACR,CAAErB,QAAS,SACX,CAAC,MAAO,CAAEH,MAAO,kBAAmBK,KAAM,UAE9CoB,QAAS,CACL,CAAC,MAAO,CAAEzB,MAAO,SAAUK,KAAM,0BACjC,CAAC,MAAO,CAAEL,MAAO,SAAUK,KAAM,qBAErCqB,qBAAsB,CAClB,CAAC,QAAS,UACV,CAAC,IAAK,CAAE1B,MAAO,SAAUK,KAAM,SAC/B,CAAC,UAAW,UACZ,CAAC,IAAK,WAEVsB,eAAgB,CACZ,CAAC,QAAS,UACV,CAAC,IAAK,CAAE3B,MAAO,SAAUK,KAAM,SAC/B,CAAC,UAAW,UACZ,CAAC,IAAK","file":"static/js/18.28fd2809.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n wordPattern: /(#?-?\\d*\\.\\d\\w*%?)|((::|[@#.!:])?[\\w-?]+%?)|::|[@#.!:]/g,\r\n comments: {\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}', notIn: ['string', 'comment'] },\r\n { open: '[', close: ']', notIn: ['string', 'comment'] },\r\n { open: '(', close: ')', notIn: ['string', 'comment'] },\r\n { open: '\"', close: '\"', notIn: ['string', 'comment'] },\r\n { open: \"'\", close: \"'\", notIn: ['string', 'comment'] }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*\\\\/\\\\*\\\\s*#region\\\\b\\\\s*(.*?)\\\\s*\\\\*\\\\/'),\r\n end: new RegExp('^\\\\s*\\\\/\\\\*\\\\s*#endregion\\\\b.*\\\\*\\\\/')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.css',\r\n ws: '[ \\t\\n\\r\\f]*',\r\n 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])))*',\r\n brackets: [\r\n { open: '{', close: '}', token: 'delimiter.bracket' },\r\n { open: '[', close: ']', token: 'delimiter.bracket' },\r\n { open: '(', close: ')', token: 'delimiter.parenthesis' },\r\n { open: '<', close: '>', token: 'delimiter.angle' }\r\n ],\r\n tokenizer: {\r\n root: [{ include: '@selector' }],\r\n selector: [\r\n { include: '@comments' },\r\n { include: '@import' },\r\n { include: '@strings' },\r\n [\r\n '[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)',\r\n { token: 'keyword', next: '@keyframedeclaration' }\r\n ],\r\n ['[@](page|content|font-face|-moz-document)', { token: 'keyword' }],\r\n ['[@](charset|namespace)', { token: 'keyword', next: '@declarationbody' }],\r\n [\r\n '(url-prefix)(\\\\()',\r\n ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]\r\n ],\r\n [\r\n '(url)(\\\\()',\r\n ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]\r\n ],\r\n { include: '@selectorname' },\r\n ['[\\\\*]', 'tag'],\r\n ['[>\\\\+,]', 'delimiter'],\r\n ['\\\\[', { token: 'delimiter.bracket', next: '@selectorattribute' }],\r\n ['{', { token: 'delimiter.bracket', next: '@selectorbody' }]\r\n ],\r\n selectorbody: [\r\n { include: '@comments' },\r\n ['[*_]?@identifier@ws:(?=(\\\\s|\\\\d|[^{;}]*[;}]))', 'attribute.name', '@rulevalue'],\r\n ['}', { token: 'delimiter.bracket', next: '@pop' }]\r\n ],\r\n selectorname: [\r\n ['(\\\\.|#(?=[^{])|%|(@identifier)|:)+', 'tag'] // selector (.foo, div, ...)\r\n ],\r\n selectorattribute: [\r\n { include: '@term' },\r\n [']', { token: 'delimiter.bracket', next: '@pop' }]\r\n ],\r\n term: [\r\n { include: '@comments' },\r\n [\r\n '(url-prefix)(\\\\()',\r\n ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]\r\n ],\r\n [\r\n '(url)(\\\\()',\r\n ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]\r\n ],\r\n { include: '@functioninvocation' },\r\n { include: '@numbers' },\r\n { include: '@name' },\r\n ['([<>=\\\\+\\\\-\\\\*\\\\/\\\\^\\\\|\\\\~,])', 'delimiter'],\r\n [',', 'delimiter']\r\n ],\r\n rulevalue: [\r\n { include: '@comments' },\r\n { include: '@strings' },\r\n { include: '@term' },\r\n ['!important', 'keyword'],\r\n [';', 'delimiter', '@pop'],\r\n ['(?=})', { token: '', next: '@pop' }] // missing semicolon\r\n ],\r\n warndebug: [['[@](warn|debug)', { token: 'keyword', next: '@declarationbody' }]],\r\n import: [['[@](import)', { token: 'keyword', next: '@declarationbody' }]],\r\n urldeclaration: [\r\n { include: '@strings' },\r\n ['[^)\\r\\n]+', 'string'],\r\n ['\\\\)', { token: 'delimiter.parenthesis', next: '@pop' }]\r\n ],\r\n parenthizedterm: [\r\n { include: '@term' },\r\n ['\\\\)', { token: 'delimiter.parenthesis', next: '@pop' }]\r\n ],\r\n declarationbody: [\r\n { include: '@term' },\r\n [';', 'delimiter', '@pop'],\r\n ['(?=})', { token: '', next: '@pop' }] // missing semicolon\r\n ],\r\n comments: [\r\n ['\\\\/\\\\*', 'comment', '@comment'],\r\n ['\\\\/\\\\/+.*', 'comment']\r\n ],\r\n comment: [\r\n ['\\\\*\\\\/', 'comment', '@pop'],\r\n [/[^*/]+/, 'comment'],\r\n [/./, 'comment']\r\n ],\r\n name: [['@identifier', 'attribute.value']],\r\n numbers: [\r\n [\r\n '-?(\\\\d*\\\\.)?\\\\d+([eE][\\\\-+]?\\\\d+)?',\r\n { token: 'attribute.value.number', next: '@units' }\r\n ],\r\n ['#[0-9a-fA-F_]+(?!\\\\w)', 'attribute.value.hex']\r\n ],\r\n units: [\r\n [\r\n '(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?',\r\n 'attribute.value.unit',\r\n '@pop'\r\n ]\r\n ],\r\n keyframedeclaration: [\r\n ['@identifier', 'attribute.value'],\r\n ['{', { token: 'delimiter.bracket', switchTo: '@keyframebody' }]\r\n ],\r\n keyframebody: [\r\n { include: '@term' },\r\n ['{', { token: 'delimiter.bracket', next: '@selectorbody' }],\r\n ['}', { token: 'delimiter.bracket', next: '@pop' }]\r\n ],\r\n functioninvocation: [\r\n ['@identifier\\\\(', { token: 'attribute.value', next: '@functionarguments' }]\r\n ],\r\n functionarguments: [\r\n ['\\\\$@identifier@ws:', 'attribute.name'],\r\n ['[,]', 'delimiter'],\r\n { include: '@term' },\r\n ['\\\\)', { token: 'attribute.value', next: '@pop' }]\r\n ],\r\n strings: [\r\n ['~?\"', { token: 'string', next: '@stringenddoublequote' }],\r\n [\"~?'\", { token: 'string', next: '@stringendquote' }]\r\n ],\r\n stringenddoublequote: [\r\n ['\\\\\\\\.', 'string'],\r\n ['\"', { token: 'string', next: '@pop' }],\r\n [/[^\\\\\"]+/, 'string'],\r\n ['.', 'string']\r\n ],\r\n stringendquote: [\r\n ['\\\\\\\\.', 'string'],\r\n [\"'\", { token: 'string', next: '@pop' }],\r\n [/[^\\\\']+/, 'string'],\r\n ['.', 'string']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/19.fd734e84.chunk.js b/static/js/19.fd734e84.chunk.js new file mode 100644 index 0000000..91da14a --- /dev/null +++ b/static/js/19.fd734e84.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[19],{809:function(e,n,t){"use strict";t.r(n),t.d(n,"conf",(function(){return o})),t.d(n,"language",(function(){return r}));var o={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:"(",close:")"},{open:'"',close:'"'},{open:"`",close:"`"}],folding:{markers:{start:/^\s*\s*#?region\b/,end:/^\s*\s*#?endregion\b/}}},r={defaultToken:"invalid",tokenPostfix:".dart",keywords:["abstract","dynamic","implements","show","as","else","import","static","assert","enum","in","super","async","export","interface","switch","await","extends","is","sync","break","external","library","this","case","factory","mixin","throw","catch","false","new","true","class","final","null","try","const","finally","on","typedef","continue","for","operator","var","covariant","Function","part","void","default","get","rethrow","while","deferred","hide","return","with","do","if","set","yield"],typeKeywords:["int","double","String","bool"],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"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/\/.*$/,"comment.doc"],[/\/\/.*$/,"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"],[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"],[/\$\w+/,"identifier"]],string_single:[[/[^\\'\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"],[/\$\w+/,"identifier"]]}}}}]); +//# sourceMappingURL=19.fd734e84.chunk.js.map \ No newline at end of file diff --git a/static/js/19.fd734e84.chunk.js.map b/static/js/19.fd734e84.chunk.js.map new file mode 100644 index 0000000..e78c70f --- /dev/null +++ b/static/js/19.fd734e84.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.js"],"names":["conf","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","folding","markers","start","end","language","defaultToken","tokenPostfix","keywords","typeKeywords","operators","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","regexpctl","regexpesc","tokenizer","root","include","common","cases","token","bracket","next","whitespace","comment","jsdoc","regexp","regexrange","string_double","string_single"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,WACjC,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,MAAOC,MAAO,MAAOC,MAAO,CAAC,YAEzCC,iBAAkB,CACd,CAAEH,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBG,QAAS,CACLC,QAAS,CACLC,MAAO,oBACPC,IAAK,0BAINC,EAAW,CAClBC,aAAc,UACdC,aAAc,QACdC,SAAU,CACN,WACA,UACA,aACA,OACA,KACA,OACA,SACA,SACA,SACA,OACA,KACA,QACA,QACA,SACA,YACA,SACA,QACA,UACA,KACA,OACA,QACA,WACA,UACA,OACA,OACA,UACA,QACA,QACA,QACA,QACA,MACA,OACA,QACA,QACA,OACA,MACA,QACA,UACA,KACA,UACA,WACA,MACA,WACA,MACA,YACA,WACA,OACA,OACA,UACA,MACA,UACA,QACA,WACA,OACA,SACA,OACA,KACA,KACA,MACA,SAEJC,aAAc,CAAC,MAAO,SAAU,SAAU,QAC1CC,UAAW,CACP,IACA,IACA,IACA,IACA,KACA,IACA,KACA,KACA,KACA,KACA,IACA,IACA,KACA,KACA,IACA,KACA,KACA,KACA,MACA,KACA,KACA,KACA,MACA,MACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,KACA,KACA,IACA,MACA,KACA,IACA,IACA,MAGJC,QAAS,wBACTC,QAAS,wEACTC,OAAQ,cACRC,YAAa,oBACbC,aAAc,oBACdC,UAAW,iCACXC,UAAW,yBACXC,UAAW,+EAEXC,UAAW,CACPC,KAAM,CAAC,CAAC,OAAQ,qBAAsB,CAAEC,QAAS,WACjDC,OAAQ,CAEJ,CACI,gBACA,CACIC,MAAO,CACH,gBAAiB,kBACjB,YAAa,UACb,WAAY,gBAIxB,CAAC,iBAAkB,mBAGnB,CAAEF,QAAS,eAEX,CACI,4DACA,CAAEG,MAAO,SAAUC,QAAS,QAASC,KAAM,YAG/C,CAAC,aAAc,cAGf,CAAC,WAAY,aACb,CAAC,mBAAoB,aACrB,CAAC,gBAAiB,aAClB,CACI,WACA,CACIH,MAAO,CACH,aAAc,YACd,WAAY,MAKxB,CAAC,kCAAmC,gBACpC,CAAC,6CAA8C,gBAC/C,CAAC,sBAAuB,cACxB,CAAC,yBAA0B,gBAC3B,CAAC,yBAA0B,iBAC3B,CAAC,cAAe,UAEhB,CAAC,QAAS,aAEV,CAAC,kBAAmB,kBACpB,CAAC,kBAAmB,kBACpB,CAAC,IAAK,SAAU,kBAChB,CAAC,IAAK,SAAU,mBAGpBI,WAAY,CACR,CAAC,aAAc,IACf,CAAC,eAAgB,cAAe,UAChC,CAAC,OAAQ,UAAW,YACpB,CAAC,YAAa,eACd,CAAC,UAAW,YAEhBC,QAAS,CACL,CAAC,UAAW,WACZ,CAAC,OAAQ,UAAW,QACpB,CAAC,QAAS,YAEdC,MAAO,CACH,CAAC,UAAW,eACZ,CAAC,OAAQ,cAAe,QACxB,CAAC,QAAS,gBAGdC,OAAQ,CACJ,CACI,yBACA,CAAC,wBAAyB,wBAAyB,0BAEvD,CACI,kCACA,CAAC,wBAAyB,CAAEN,MAAO,wBAAyBE,KAAM,iBAEtE,CAAC,oBAAqB,CAAC,wBAAyB,0BAChD,CAAC,OAAQ,yBACT,CAAC,aAAc,yBACf,CAAC,UAAW,UACZ,CAAC,aAAc,iBACf,CAAC,OAAQ,kBACT,CACI,kBACA,CAAC,CAAEF,MAAO,SAAUC,QAAS,SAAUC,KAAM,QAAU,mBAG/DK,WAAY,CACR,CAAC,IAAK,yBACN,CAAC,KAAM,kBACP,CAAC,aAAc,iBACf,CAAC,QAAS,UACV,CACI,KACA,CACIP,MAAO,wBACPE,KAAM,OACND,QAAS,YAIrBO,cAAe,CACX,CAAC,YAAa,UACd,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU,QAChB,CAAC,QAAS,eAEdC,cAAe,CACX,CAAC,YAAa,UACd,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU,QAChB,CAAC,QAAS","file":"static/js/19.fd734e84.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: \"'\", close: \"'\", notIn: ['string', 'comment'] },\r\n { open: '\"', close: '\"', notIn: ['string'] },\r\n { open: '`', close: '`', notIn: ['string', 'comment'] },\r\n { open: '/**', close: ' */', notIn: ['string'] }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '<', close: '>' },\r\n { open: \"'\", close: \"'\" },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: '`', close: '`' }\r\n ],\r\n folding: {\r\n markers: {\r\n start: /^\\s*\\s*#?region\\b/,\r\n end: /^\\s*\\s*#?endregion\\b/\r\n }\r\n }\r\n};\r\nexport var language = {\r\n defaultToken: 'invalid',\r\n tokenPostfix: '.dart',\r\n keywords: [\r\n 'abstract',\r\n 'dynamic',\r\n 'implements',\r\n 'show',\r\n 'as',\r\n 'else',\r\n 'import',\r\n 'static',\r\n 'assert',\r\n 'enum',\r\n 'in',\r\n 'super',\r\n 'async',\r\n 'export',\r\n 'interface',\r\n 'switch',\r\n 'await',\r\n 'extends',\r\n 'is',\r\n 'sync',\r\n 'break',\r\n 'external',\r\n 'library',\r\n 'this',\r\n 'case',\r\n 'factory',\r\n 'mixin',\r\n 'throw',\r\n 'catch',\r\n 'false',\r\n 'new',\r\n 'true',\r\n 'class',\r\n 'final',\r\n 'null',\r\n 'try',\r\n 'const',\r\n 'finally',\r\n 'on',\r\n 'typedef',\r\n 'continue',\r\n 'for',\r\n 'operator',\r\n 'var',\r\n 'covariant',\r\n 'Function',\r\n 'part',\r\n 'void',\r\n 'default',\r\n 'get',\r\n 'rethrow',\r\n 'while',\r\n 'deferred',\r\n 'hide',\r\n 'return',\r\n 'with',\r\n 'do',\r\n 'if',\r\n 'set',\r\n 'yield'\r\n ],\r\n typeKeywords: ['int', 'double', 'String', 'bool'],\r\n operators: [\r\n '+',\r\n '-',\r\n '*',\r\n '/',\r\n '~/',\r\n '%',\r\n '++',\r\n '--',\r\n '==',\r\n '!=',\r\n '>',\r\n '<',\r\n '>=',\r\n '<=',\r\n '=',\r\n '-=',\r\n '/=',\r\n '%=',\r\n '>>=',\r\n '^=',\r\n '+=',\r\n '*=',\r\n '~/=',\r\n '<<=',\r\n '&=',\r\n '!=',\r\n '||',\r\n '&&',\r\n '&',\r\n '|',\r\n '^',\r\n '~',\r\n '<<',\r\n '>>',\r\n '!',\r\n '>>>',\r\n '??',\r\n '?',\r\n ':',\r\n '|='\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>](?!@symbols)/, '@brackets'],\r\n [/!(?=([^=]|$))/, 'delimiter'],\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'delimiter',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n // numbers\r\n [/(@digits)[eE]([\\-+]?(@digits))?/, 'number.float'],\r\n [/(@digits)\\.(@digits)([eE][\\-+]?(@digits))?/, 'number.float'],\r\n [/0[xX](@hexdigits)n?/, 'number.hex'],\r\n [/0[oO]?(@octaldigits)n?/, 'number.octal'],\r\n [/0[bB](@binarydigits)n?/, 'number.binary'],\r\n [/(@digits)n?/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/'([^'\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"/, 'string', '@string_double'],\r\n [/'/, 'string', '@string_single']\r\n // [/[a-zA-Z]+/, \"variable\"]\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/\\/\\*\\*(?!\\/)/, 'comment.doc', '@jsdoc'],\r\n [/\\/\\*/, 'comment', '@comment'],\r\n [/\\/\\/\\/.*$/, 'comment.doc'],\r\n [/\\/\\/.*$/, 'comment']\r\n ],\r\n comment: [\r\n [/[^\\/*]+/, 'comment'],\r\n [/\\*\\//, 'comment', '@pop'],\r\n [/[\\/*]/, 'comment']\r\n ],\r\n jsdoc: [\r\n [/[^\\/*]+/, 'comment.doc'],\r\n [/\\*\\//, 'comment.doc', '@pop'],\r\n [/[\\/*]/, 'comment.doc']\r\n ],\r\n // We match regular expression quite precisely\r\n regexp: [\r\n [\r\n /(\\{)(\\d+(?:,\\d*)?)(\\})/,\r\n ['regexp.escape.control', 'regexp.escape.control', 'regexp.escape.control']\r\n ],\r\n [\r\n /(\\[)(\\^?)(?=(?:[^\\]\\\\\\/]|\\\\.)+)/,\r\n ['regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]\r\n ],\r\n [/(\\()(\\?:|\\?=|\\?!)/, ['regexp.escape.control', 'regexp.escape.control']],\r\n [/[()]/, 'regexp.escape.control'],\r\n [/@regexpctl/, 'regexp.escape.control'],\r\n [/[^\\\\\\/]/, 'regexp'],\r\n [/@regexpesc/, 'regexp.escape'],\r\n [/\\\\\\./, 'regexp.invalid'],\r\n [\r\n /(\\/)([gimsuy]*)/,\r\n [{ token: 'regexp', bracket: '@close', next: '@pop' }, 'keyword.other']\r\n ]\r\n ],\r\n regexrange: [\r\n [/-/, 'regexp.escape.control'],\r\n [/\\^/, 'regexp.invalid'],\r\n [/@regexpesc/, 'regexp.escape'],\r\n [/[^\\]]/, 'regexp'],\r\n [\r\n /\\]/,\r\n {\r\n token: 'regexp.escape.control',\r\n next: '@pop',\r\n bracket: '@close'\r\n }\r\n ]\r\n ],\r\n string_double: [\r\n [/[^\\\\\"\\$]+/, 'string'],\r\n [/[^\\\\\"]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"/, 'string', '@pop'],\r\n [/\\$\\w+/, 'identifier']\r\n ],\r\n string_single: [\r\n [/[^\\\\'\\$]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/'/, 'string', '@pop'],\r\n [/\\$\\w+/, 'identifier']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/20.8b23b789.chunk.js b/static/js/20.8b23b789.chunk.js new file mode 100644 index 0000000..81a169c --- /dev/null +++ b/static/js/20.8b23b789.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[20],{810:function(e,o,n){"use strict";n.r(o),n.d(o,"conf",(function(){return s})),n.d(o,"language",(function(){return t}));var s={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t={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:[[/\\'$/,"","@popall"],[/\\'/,""],[/'$/,"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"]]}}}}]); +//# sourceMappingURL=20.8b23b789.chunk.js.map \ No newline at end of file diff --git a/static/js/20.8b23b789.chunk.js.map b/static/js/20.8b23b789.chunk.js.map new file mode 100644 index 0000000..e0bb4d0 --- /dev/null +++ b/static/js/20.8b23b789.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.js"],"names":["conf","brackets","autoClosingPairs","open","close","surroundingPairs","language","defaultToken","tokenPostfix","variable","tokenizer","root","include","token","next","arguments","cases","whitespace","comment","strings","stringBody","dblStringBody"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBC,iBAAkB,CACd,CAAEF,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,OAGjBE,EAAW,CAClBC,aAAc,GACdC,aAAc,cACdC,SAAU,cACVC,UAAW,CACPC,KAAM,CACF,CAAEC,QAAS,eACX,CAAEA,QAAS,YACX,CAAC,iBAAkB,CAAC,UAAW,KAC/B,CAAC,oBAAqB,CAAC,UAAW,GAAI,CAAEC,MAAO,WAAYC,KAAM,gBACjE,CACI,sHACA,CAAED,MAAO,UAAWC,KAAM,gBAGlCC,UAAW,CACP,CAAEH,QAAS,eACX,CAAEA,QAAS,YACX,CACI,cACA,CACII,MAAO,CACH,OAAQ,CAAEH,MAAO,WAAYC,KAAM,WACnC,WAAY,cAIxB,CACI,KACA,CACIE,MAAO,CACH,OAAQ,GACR,WAAY,MAIxB,CACI,IACA,CACIA,MAAO,CACH,OAAQ,CAAEH,MAAO,GAAIC,KAAM,WAC3B,WAAY,OAM5BG,WAAY,CACR,CACI,MACA,CACID,MAAO,CACH,OAAQ,CAAEH,MAAO,GAAIC,KAAM,WAC3B,WAAY,OAK5BI,QAAS,CAAC,CAAC,UAAW,UAAW,YAEjCC,QAAS,CACL,CAAC,OAAQ,GAAI,WACb,CAAC,MAAO,IACR,CAAC,KAAM,SAAU,WACjB,CAAC,IAAK,SAAU,eAChB,CAAC,KAAM,SAAU,WACjB,CAAC,IAAK,SAAU,mBAEpBC,WAAY,CACR,CACI,WACA,CACIJ,MAAO,CACH,OAAQ,CAAEH,MAAO,SAAUC,KAAM,WACjC,WAAY,YAIxB,CAAC,MAAO,iBACR,CAAC,KAAM,SAAU,WACjB,CAAC,IAAK,SAAU,QAChB,CAAC,cAAe,YAChB,CAAC,MAAO,UACR,CAAC,IAAK,SAAU,YAEpBO,cAAe,CACX,CACI,WACA,CACIL,MAAO,CACH,OAAQ,CAAEH,MAAO,SAAUC,KAAM,WACjC,WAAY,YAIxB,CAAC,MAAO,iBACR,CAAC,KAAM,SAAU,WACjB,CAAC,IAAK,SAAU,QAChB,CAAC,cAAe,YAChB,CAAC,MAAO,UACR,CAAC,IAAK,SAAU","file":"static/js/20.8b23b789.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ]\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.dockerfile',\r\n variable: /\\${?[\\w]+}?/,\r\n tokenizer: {\r\n root: [\r\n { include: '@whitespace' },\r\n { include: '@comment' },\r\n [/(ONBUILD)(\\s+)/, ['keyword', '']],\r\n [/(ENV)(\\s+)([\\w]+)/, ['keyword', '', { token: 'variable', next: '@arguments' }]],\r\n [\r\n /(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,\r\n { token: 'keyword', next: '@arguments' }\r\n ]\r\n ],\r\n arguments: [\r\n { include: '@whitespace' },\r\n { include: '@strings' },\r\n [\r\n /(@variable)/,\r\n {\r\n cases: {\r\n '@eos': { token: 'variable', next: '@popall' },\r\n '@default': 'variable'\r\n }\r\n }\r\n ],\r\n [\r\n /\\\\/,\r\n {\r\n cases: {\r\n '@eos': '',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n [\r\n /./,\r\n {\r\n cases: {\r\n '@eos': { token: '', next: '@popall' },\r\n '@default': ''\r\n }\r\n }\r\n ]\r\n ],\r\n // Deal with white space, including comments\r\n whitespace: [\r\n [\r\n /\\s+/,\r\n {\r\n cases: {\r\n '@eos': { token: '', next: '@popall' },\r\n '@default': ''\r\n }\r\n }\r\n ]\r\n ],\r\n comment: [[/(^#.*$)/, 'comment', '@popall']],\r\n // Recognize strings, including those broken across lines with \\ (but not without)\r\n strings: [\r\n [/\\\\'$/, '', '@popall'],\r\n [/\\\\'/, ''],\r\n [/'$/, 'string', '@popall'],\r\n [/'/, 'string', '@stringBody'],\r\n [/\"$/, 'string', '@popall'],\r\n [/\"/, 'string', '@dblStringBody']\r\n ],\r\n stringBody: [\r\n [\r\n /[^\\\\\\$']/,\r\n {\r\n cases: {\r\n '@eos': { token: 'string', next: '@popall' },\r\n '@default': 'string'\r\n }\r\n }\r\n ],\r\n [/\\\\./, 'string.escape'],\r\n [/'$/, 'string', '@popall'],\r\n [/'/, 'string', '@pop'],\r\n [/(@variable)/, 'variable'],\r\n [/\\\\$/, 'string'],\r\n [/$/, 'string', '@popall']\r\n ],\r\n dblStringBody: [\r\n [\r\n /[^\\\\\\$\"]/,\r\n {\r\n cases: {\r\n '@eos': { token: 'string', next: '@popall' },\r\n '@default': 'string'\r\n }\r\n }\r\n ],\r\n [/\\\\./, 'string.escape'],\r\n [/\"$/, 'string', '@popall'],\r\n [/\"/, 'string', '@pop'],\r\n [/(@variable)/, 'variable'],\r\n [/\\\\$/, 'string'],\r\n [/$/, 'string', '@popall']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/21.73273ed9.chunk.js b/static/js/21.73273ed9.chunk.js new file mode 100644 index 0000000..617f451 --- /dev/null +++ b/static/js/21.73273ed9.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[21],{811:function(e,o,n){"use strict";n.r(o),n.d(o,"conf",(function(){return t})),n.d(o,"language",(function(){return r}));var t={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:'"'}]},r={defaultToken:"",tokenPostfix:".ecl",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],pounds:["append","break","declare","demangle","end","for","getdatatype","if","inmodule","loop","mangle","onwarning","option","set","stored","uniquename"].join("|"),keywords:["__compressed__","after","all","and","any","as","atmost","before","beginc","best","between","case","cluster","compressed","compression","const","counter","csv","default","descend","embed","encoding","encrypt","end","endc","endembed","endmacro","enum","escape","except","exclusive","expire","export","extend","fail","few","fileposition","first","flat","forward","from","full","function","functionmacro","group","grouped","heading","hole","ifblock","import","in","inner","interface","internal","joined","keep","keyed","last","left","limit","linkcounted","literal","little_endian","load","local","locale","lookup","lzw","macro","many","maxcount","maxlength","min skew","module","mofn","multiple","named","namespace","nocase","noroot","noscan","nosort","not","noxpath","of","onfail","only","opt","or","outer","overwrite","packed","partition","penalty","physicallength","pipe","prefetch","quote","record","repeat","retry","return","right","right1","right2","rows","rowset","scan","scope","self","separator","service","shared","skew","skip","smart","soapaction","sql","stable","store","terminator","thor","threshold","timelimit","timeout","token","transform","trim","type","unicodeorder","unordered","unsorted","unstable","update","use","validate","virtual","whole","width","wild","within","wnotrim","xml","xpath"],functions:["abs","acos","aggregate","allnodes","apply","ascii","asin","assert","asstring","atan","atan2","ave","build","buildindex","case","catch","choose","choosen","choosesets","clustersize","combine","correlation","cos","cosh","count","covariance","cron","dataset","dedup","define","denormalize","dictionary","distribute","distributed","distribution","ebcdic","enth","error","evaluate","event","eventextra","eventname","exists","exp","fail","failcode","failmessage","fetch","fromunicode","fromxml","getenv","getisvalid","global","graph","group","hash","hash32","hash64","hashcrc","hashmd5","having","httpcall","httpheader","if","iff","index","intformat","isvalid","iterate","join","keydiff","keypatch","keyunicode","length","library","limit","ln","loadxml","local","log","loop","map","matched","matchlength","matchposition","matchtext","matchunicode","max","merge","mergejoin","min","nofold","nolocal","nonempty","normalize","nothor","notify","output","parallel","parse","pipe","power","preload","process","project","pull","random","range","rank","ranked","realformat","recordof","regexfind","regexreplace","regroup","rejected","rollup","round","roundup","row","rowdiff","sample","sequential","set","sin","sinh","sizeof","soapcall","sort","sorted","sqrt","stepped","stored","sum","table","tan","tanh","thisnode","topn","tounicode","toxml","transfer","transform","trim","truncate","typeof","ungroup","unicodeorder","variance","wait","which","workunit","xmldecode","xmlencode","xmltext","xmlunicode"],typesint:["integer","unsigned"].join("|"),typesnum:["data","qstring","string","unicode","utf8","varstring","varunicode"],typesone:["ascii","big_endian","boolean","data","decimal","ebcdic","grouped","integer","linkcounted","pattern","qstring","real","record","rule","set of","streamed","string","token","udecimal","unicode","unsigned","utf8","varstring","varunicode"].join("|"),operators:["+","-","/",":=","<","<>","=",">","\\","and","in","not","or"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]]}}}}]); +//# sourceMappingURL=21.73273ed9.chunk.js.map \ No newline at end of file diff --git a/static/js/21.73273ed9.chunk.js.map b/static/js/21.73273ed9.chunk.js.map new file mode 100644 index 0000000..1320a9d --- /dev/null +++ b/static/js/21.73273ed9.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/ecl/ecl.js"],"names":["conf","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","language","defaultToken","tokenPostfix","ignoreCase","token","pounds","join","keywords","functions","typesint","typesnum","typesone","operators","symbols","escapes","tokenizer","root","cases","include","whitespace","comment","string"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,aAE/CC,iBAAkB,CACd,CAAEH,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,OAGjBG,EAAW,CAClBC,aAAc,GACdC,aAAc,OACdC,YAAY,EACZT,SAAU,CACN,CAAEE,KAAM,IAAKC,MAAO,IAAKO,MAAO,mBAChC,CAAER,KAAM,IAAKC,MAAO,IAAKO,MAAO,oBAChC,CAAER,KAAM,IAAKC,MAAO,IAAKO,MAAO,yBAChC,CAAER,KAAM,IAAKC,MAAO,IAAKO,MAAO,oBAEpCC,OAAQ,CACJ,SACA,QACA,UACA,WACA,MACA,MACA,cACA,KACA,WACA,OACA,SACA,YACA,SACA,MACA,SACA,cACFC,KAAK,KACPC,SAAU,CACN,iBACA,QACA,MACA,MACA,MACA,KACA,SACA,SACA,SACA,OACA,UACA,OACA,UACA,aACA,cACA,QACA,UACA,MACA,UACA,UACA,QACA,WACA,UACA,MACA,OACA,WACA,WACA,OACA,SACA,SACA,YACA,SACA,SACA,SACA,OACA,MACA,eACA,QACA,OACA,UACA,OACA,OACA,WACA,gBACA,QACA,UACA,UACA,OACA,UACA,SACA,KACA,QACA,YACA,WACA,SACA,OACA,QACA,OACA,OACA,QACA,cACA,UACA,gBACA,OACA,QACA,SACA,SACA,MACA,QACA,OACA,WACA,YACA,WACA,SACA,OACA,WACA,QACA,YACA,SACA,SACA,SACA,SACA,MACA,UACA,KACA,SACA,OACA,MACA,KACA,QACA,YACA,SACA,YACA,UACA,iBACA,OACA,WACA,QACA,SACA,SACA,QACA,SACA,QACA,SACA,SACA,OACA,SACA,OACA,QACA,OACA,YACA,UACA,SACA,OACA,OACA,QACA,aACA,MACA,SACA,QACA,aACA,OACA,YACA,YACA,UACA,QACA,YACA,OACA,OACA,eACA,YACA,WACA,WACA,SACA,MACA,WACA,UACA,QACA,QACA,OACA,SACA,UACA,MACA,SAEJC,UAAW,CACP,MACA,OACA,YACA,WACA,QACA,QACA,OACA,SACA,WACA,OACA,QACA,MACA,QACA,aACA,OACA,QACA,SACA,UACA,aACA,cACA,UACA,cACA,MACA,OACA,QACA,aACA,OACA,UACA,QACA,SACA,cACA,aACA,aACA,cACA,eACA,SACA,OACA,QACA,WACA,QACA,aACA,YACA,SACA,MACA,OACA,WACA,cACA,QACA,cACA,UACA,SACA,aACA,SACA,QACA,QACA,OACA,SACA,SACA,UACA,UACA,SACA,WACA,aACA,KACA,MACA,QACA,YACA,UACA,UACA,OACA,UACA,WACA,aACA,SACA,UACA,QACA,KACA,UACA,QACA,MACA,OACA,MACA,UACA,cACA,gBACA,YACA,eACA,MACA,QACA,YACA,MACA,SACA,UACA,WACA,YACA,SACA,SACA,SACA,WACA,QACA,OACA,QACA,UACA,UACA,UACA,OACA,SACA,QACA,OACA,SACA,aACA,WACA,YACA,eACA,UACA,WACA,SACA,QACA,UACA,MACA,UACA,SACA,aACA,MACA,MACA,OACA,SACA,WACA,OACA,SACA,OACA,UACA,SACA,MACA,QACA,MACA,OACA,WACA,OACA,YACA,QACA,WACA,YACA,OACA,WACA,SACA,UACA,eACA,WACA,OACA,QACA,WACA,YACA,YACA,UACA,cAEJC,SAAU,CAAC,UAAW,YAAYH,KAAK,KACvCI,SAAU,CAAC,OAAQ,UAAW,SAAU,UAAW,OAAQ,YAAa,cACxEC,SAAU,CACN,QACA,aACA,UACA,OACA,UACA,SACA,UACA,UACA,cACA,UACA,UACA,OACA,SACA,OACA,SACA,WACA,SACA,QACA,WACA,UACA,WACA,OACA,YACA,cACFL,KAAK,KACPM,UAAW,CAAC,IAAK,IAAK,IAAK,KAAM,IAAK,KAAM,IAAK,IAAK,KAAM,MAAO,KAAM,MAAO,MAChFC,QAAS,wBAETC,QAAS,wEAETC,UAAW,CACPC,KAAM,CACF,CAAC,iBAAkB,QACnB,CAAC,aAAc,QACf,CAAC,YAAa,QACd,CACI,oBACA,CACIC,MAAO,CACH,aAAc,mBACd,YAAa,UACb,aAAc,cAK1B,CAAEC,QAAS,eACX,CAAC,aAAc,aACf,CAAC,mBAAoB,aACrB,CACI,WACA,CACID,MAAO,CACH,aAAc,YACd,WAAY,MAKxB,CAAC,mCAAoC,gBACrC,CAAC,qBAAsB,cACvB,CAAC,aAAc,cACf,CAAC,UAAW,UAEZ,CAAC,QAAS,aAEV,CAAC,kBAAmB,kBACpB,CAAC,IAAK,SAAU,WAEhB,CAAC,WAAY,UACb,CAAC,mBAAoB,CAAC,SAAU,gBAAiB,WACjD,CAAC,IAAK,mBAEVE,WAAY,CACR,CAAC,iBAAkB,IACnB,CAAC,OAAQ,UAAW,YACpB,CAAC,UAAW,YAEhBC,QAAS,CACL,CAAC,UAAW,WACZ,CAAC,OAAQ,UAAW,QACpB,CAAC,QAAS,YAEdC,OAAQ,CACJ,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU","file":"static/js/21.73273ed9.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: \"'\", close: \"'\", notIn: ['string', 'comment'] },\r\n { open: '\"', close: '\"', notIn: ['string', 'comment'] }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '<', close: '>' },\r\n { open: \"'\", close: \"'\" },\r\n { open: '\"', close: '\"' }\r\n ]\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.ecl',\r\n ignoreCase: true,\r\n brackets: [\r\n { open: '{', close: '}', token: 'delimiter.curly' },\r\n { open: '[', close: ']', token: 'delimiter.square' },\r\n { open: '(', close: ')', token: 'delimiter.parenthesis' },\r\n { open: '<', close: '>', token: 'delimiter.angle' }\r\n ],\r\n pounds: [\r\n 'append',\r\n 'break',\r\n 'declare',\r\n 'demangle',\r\n 'end',\r\n 'for',\r\n 'getdatatype',\r\n 'if',\r\n 'inmodule',\r\n 'loop',\r\n 'mangle',\r\n 'onwarning',\r\n 'option',\r\n 'set',\r\n 'stored',\r\n 'uniquename'\r\n ].join('|'),\r\n keywords: [\r\n '__compressed__',\r\n 'after',\r\n 'all',\r\n 'and',\r\n 'any',\r\n 'as',\r\n 'atmost',\r\n 'before',\r\n 'beginc',\r\n 'best',\r\n 'between',\r\n 'case',\r\n 'cluster',\r\n 'compressed',\r\n 'compression',\r\n 'const',\r\n 'counter',\r\n 'csv',\r\n 'default',\r\n 'descend',\r\n 'embed',\r\n 'encoding',\r\n 'encrypt',\r\n 'end',\r\n 'endc',\r\n 'endembed',\r\n 'endmacro',\r\n 'enum',\r\n 'escape',\r\n 'except',\r\n 'exclusive',\r\n 'expire',\r\n 'export',\r\n 'extend',\r\n 'fail',\r\n 'few',\r\n 'fileposition',\r\n 'first',\r\n 'flat',\r\n 'forward',\r\n 'from',\r\n 'full',\r\n 'function',\r\n 'functionmacro',\r\n 'group',\r\n 'grouped',\r\n 'heading',\r\n 'hole',\r\n 'ifblock',\r\n 'import',\r\n 'in',\r\n 'inner',\r\n 'interface',\r\n 'internal',\r\n 'joined',\r\n 'keep',\r\n 'keyed',\r\n 'last',\r\n 'left',\r\n 'limit',\r\n 'linkcounted',\r\n 'literal',\r\n 'little_endian',\r\n 'load',\r\n 'local',\r\n 'locale',\r\n 'lookup',\r\n 'lzw',\r\n 'macro',\r\n 'many',\r\n 'maxcount',\r\n 'maxlength',\r\n 'min skew',\r\n 'module',\r\n 'mofn',\r\n 'multiple',\r\n 'named',\r\n 'namespace',\r\n 'nocase',\r\n 'noroot',\r\n 'noscan',\r\n 'nosort',\r\n 'not',\r\n 'noxpath',\r\n 'of',\r\n 'onfail',\r\n 'only',\r\n 'opt',\r\n 'or',\r\n 'outer',\r\n 'overwrite',\r\n 'packed',\r\n 'partition',\r\n 'penalty',\r\n 'physicallength',\r\n 'pipe',\r\n 'prefetch',\r\n 'quote',\r\n 'record',\r\n 'repeat',\r\n 'retry',\r\n 'return',\r\n 'right',\r\n 'right1',\r\n 'right2',\r\n 'rows',\r\n 'rowset',\r\n 'scan',\r\n 'scope',\r\n 'self',\r\n 'separator',\r\n 'service',\r\n 'shared',\r\n 'skew',\r\n 'skip',\r\n 'smart',\r\n 'soapaction',\r\n 'sql',\r\n 'stable',\r\n 'store',\r\n 'terminator',\r\n 'thor',\r\n 'threshold',\r\n 'timelimit',\r\n 'timeout',\r\n 'token',\r\n 'transform',\r\n 'trim',\r\n 'type',\r\n 'unicodeorder',\r\n 'unordered',\r\n 'unsorted',\r\n 'unstable',\r\n 'update',\r\n 'use',\r\n 'validate',\r\n 'virtual',\r\n 'whole',\r\n 'width',\r\n 'wild',\r\n 'within',\r\n 'wnotrim',\r\n 'xml',\r\n 'xpath'\r\n ],\r\n functions: [\r\n 'abs',\r\n 'acos',\r\n 'aggregate',\r\n 'allnodes',\r\n 'apply',\r\n 'ascii',\r\n 'asin',\r\n 'assert',\r\n 'asstring',\r\n 'atan',\r\n 'atan2',\r\n 'ave',\r\n 'build',\r\n 'buildindex',\r\n 'case',\r\n 'catch',\r\n 'choose',\r\n 'choosen',\r\n 'choosesets',\r\n 'clustersize',\r\n 'combine',\r\n 'correlation',\r\n 'cos',\r\n 'cosh',\r\n 'count',\r\n 'covariance',\r\n 'cron',\r\n 'dataset',\r\n 'dedup',\r\n 'define',\r\n 'denormalize',\r\n 'dictionary',\r\n 'distribute',\r\n 'distributed',\r\n 'distribution',\r\n 'ebcdic',\r\n 'enth',\r\n 'error',\r\n 'evaluate',\r\n 'event',\r\n 'eventextra',\r\n 'eventname',\r\n 'exists',\r\n 'exp',\r\n 'fail',\r\n 'failcode',\r\n 'failmessage',\r\n 'fetch',\r\n 'fromunicode',\r\n 'fromxml',\r\n 'getenv',\r\n 'getisvalid',\r\n 'global',\r\n 'graph',\r\n 'group',\r\n 'hash',\r\n 'hash32',\r\n 'hash64',\r\n 'hashcrc',\r\n 'hashmd5',\r\n 'having',\r\n 'httpcall',\r\n 'httpheader',\r\n 'if',\r\n 'iff',\r\n 'index',\r\n 'intformat',\r\n 'isvalid',\r\n 'iterate',\r\n 'join',\r\n 'keydiff',\r\n 'keypatch',\r\n 'keyunicode',\r\n 'length',\r\n 'library',\r\n 'limit',\r\n 'ln',\r\n 'loadxml',\r\n 'local',\r\n 'log',\r\n 'loop',\r\n 'map',\r\n 'matched',\r\n 'matchlength',\r\n 'matchposition',\r\n 'matchtext',\r\n 'matchunicode',\r\n 'max',\r\n 'merge',\r\n 'mergejoin',\r\n 'min',\r\n 'nofold',\r\n 'nolocal',\r\n 'nonempty',\r\n 'normalize',\r\n 'nothor',\r\n 'notify',\r\n 'output',\r\n 'parallel',\r\n 'parse',\r\n 'pipe',\r\n 'power',\r\n 'preload',\r\n 'process',\r\n 'project',\r\n 'pull',\r\n 'random',\r\n 'range',\r\n 'rank',\r\n 'ranked',\r\n 'realformat',\r\n 'recordof',\r\n 'regexfind',\r\n 'regexreplace',\r\n 'regroup',\r\n 'rejected',\r\n 'rollup',\r\n 'round',\r\n 'roundup',\r\n 'row',\r\n 'rowdiff',\r\n 'sample',\r\n 'sequential',\r\n 'set',\r\n 'sin',\r\n 'sinh',\r\n 'sizeof',\r\n 'soapcall',\r\n 'sort',\r\n 'sorted',\r\n 'sqrt',\r\n 'stepped',\r\n 'stored',\r\n 'sum',\r\n 'table',\r\n 'tan',\r\n 'tanh',\r\n 'thisnode',\r\n 'topn',\r\n 'tounicode',\r\n 'toxml',\r\n 'transfer',\r\n 'transform',\r\n 'trim',\r\n 'truncate',\r\n 'typeof',\r\n 'ungroup',\r\n 'unicodeorder',\r\n 'variance',\r\n 'wait',\r\n 'which',\r\n 'workunit',\r\n 'xmldecode',\r\n 'xmlencode',\r\n 'xmltext',\r\n 'xmlunicode'\r\n ],\r\n typesint: ['integer', 'unsigned'].join('|'),\r\n typesnum: ['data', 'qstring', 'string', 'unicode', 'utf8', 'varstring', 'varunicode'],\r\n typesone: [\r\n 'ascii',\r\n 'big_endian',\r\n 'boolean',\r\n 'data',\r\n 'decimal',\r\n 'ebcdic',\r\n 'grouped',\r\n 'integer',\r\n 'linkcounted',\r\n 'pattern',\r\n 'qstring',\r\n 'real',\r\n 'record',\r\n 'rule',\r\n 'set of',\r\n 'streamed',\r\n 'string',\r\n 'token',\r\n 'udecimal',\r\n 'unicode',\r\n 'unsigned',\r\n 'utf8',\r\n 'varstring',\r\n 'varunicode'\r\n ].join('|'),\r\n operators: ['+', '-', '/', ':=', '<', '<>', '=', '>', '\\\\', 'and', 'in', 'not', 'or'],\r\n symbols: /[=>](?!@symbols)/, '@brackets'],\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'delimiter',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n // numbers\r\n [/[0-9_]*\\.[0-9_]+([eE][\\-+]?\\d+)?/, 'number.float'],\r\n [/0[xX][0-9a-fA-F_]+/, 'number.hex'],\r\n [/0[bB][01]+/, 'number.hex'],\r\n [/[0-9_]+/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"/, 'string', '@string'],\r\n // characters\r\n [/'[^\\\\']'/, 'string'],\r\n [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],\r\n [/'/, 'string.invalid']\r\n ],\r\n whitespace: [\r\n [/[ \\t\\v\\f\\r\\n]+/, ''],\r\n [/\\/\\*/, 'comment', '@comment'],\r\n [/\\/\\/.*$/, 'comment']\r\n ],\r\n comment: [\r\n [/[^\\/*]+/, 'comment'],\r\n [/\\*\\//, 'comment', '@pop'],\r\n [/[\\/*]/, 'comment']\r\n ],\r\n string: [\r\n [/[^\\\\']+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/'/, 'string', '@pop']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/22.0553122e.chunk.js b/static/js/22.0553122e.chunk.js new file mode 100644 index 0000000..f90568d --- /dev/null +++ b/static/js/22.0553122e.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[22],{812:function(e,n,t){"use strict";t.r(n),t.d(n,"conf",(function(){return s})),t.d(n,"language",(function(){return o}));var s={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*\\*\\)")}}},o={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"}]]}}}}]); +//# sourceMappingURL=22.0553122e.chunk.js.map \ No newline at end of file diff --git a/static/js/22.0553122e.chunk.js.map b/static/js/22.0553122e.chunk.js.map new file mode 100644 index 0000000..b3ccdd7 --- /dev/null +++ b/static/js/22.0553122e.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.js"],"names":["conf","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","surroundingPairs","folding","markers","start","RegExp","end","language","defaultToken","tokenPostfix","keywords","symbols","escapes","integersuffix","floatsuffix","tokenizer","root","cases","token","include","next","whitespace","comment","string","litstring"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBC,iBAAkB,CACd,CAAEF,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBE,QAAS,CACLC,QAAS,CACLC,MAAO,IAAIC,OAAO,0DAClBC,IAAK,IAAID,OAAO,mEAIjBE,EAAW,CAClBC,aAAc,GACdC,aAAc,MACdC,SAAU,CACN,WACA,MACA,SACA,KACA,SACA,MACA,OACA,QACA,QACA,UACA,YACA,QACA,aACA,cACA,WACA,QACA,UACA,WACA,KACA,OACA,WACA,SACA,OACA,OACA,MACA,YACA,QACA,QACA,WACA,SACA,QACA,UACA,MACA,MACA,WACA,QACA,UACA,SACA,KACA,KACA,UACA,UACA,SACA,YACA,WACA,OACA,MACA,MACA,MACA,OACA,OACA,MACA,QACA,SACA,MACA,SACA,UACA,YACA,SACA,QACA,MACA,MACA,OACA,KACA,OACA,KACA,SACA,WACA,UACA,WACA,UACA,YACA,OACA,SACA,MACA,SACA,SACA,SACA,SACA,MACA,OACA,KACA,OACA,WACA,QACA,MACA,OACA,SACA,MACA,MACA,OACA,UACA,WACA,OACA,QACA,OACA,SAGJC,QAAS,4BACTC,QAAS,wEACTC,cAAe,iBACfC,YAAa,UAEbC,UAAW,CACPC,KAAM,CAEF,CACI,eACA,CACIC,MAAO,CACH,YAAa,CAAEC,MAAO,cACtB,WAAY,gBAKxB,CAAEC,QAAS,eAEX,CAAC,WAAY,cAEb,CAAC,oBAAqB,WAEtB,CAAC,aAAc,aACf,CAAC,mBAAoB,aACrB,CAAC,WAAY,aAEb,CAAC,uCAAwC,gBACzC,CAAC,yCAA0C,gBAC3C,CAAC,mBAAoB,gBACrB,CAAC,iCAAkC,cACnC,CAAC,2BAA4B,cAC7B,CAAC,sBAAuB,UAExB,CAAC,QAAS,aAEV,CAAC,kBAAmB,kBACpB,CAAC,MAAO,SAAU,eAClB,CAAC,IAAK,SAAU,aAEhB,CAAC,MAAO,CAAED,MAAO,eAAgBE,KAAM,eAEvC,CAAC,aAAc,UACf,CAAC,mBAAoB,CAAC,SAAU,gBAAiB,WACjD,CAAC,IAAK,mBAEVC,WAAY,CACR,CAAC,aAAc,IACf,CAAC,aAAc,UAAW,YAC1B,CAAC,UAAW,YAEhBC,QAAS,CACL,CAAC,SAAU,WACX,CAAC,OAAQ,UAAW,QACpB,CAAC,KAAM,WACP,CAAC,SAAU,WACX,CAAC,KAAM,YAEXC,OAAQ,CACJ,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CACI,YACA,CACIN,MAAO,CACH,UAAW,CAAEC,MAAO,SAAUE,KAAM,QACpC,WAAY,aAK5BI,UAAW,CACP,CAAC,QAAS,UACV,CAAC,KAAM,iBACP,CAAC,IAAK,CAAEN,MAAO,eAAgBE,KAAM","file":"static/js/22.0553122e.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['(*', '*)']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*//\\\\s*#region\\\\b|^\\\\s*\\\\(\\\\*\\\\s*#region(.*)\\\\*\\\\)'),\r\n end: new RegExp('^\\\\s*//\\\\s*#endregion\\\\b|^\\\\s*\\\\(\\\\*\\\\s*#endregion\\\\s*\\\\*\\\\)')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.fs',\r\n keywords: [\r\n 'abstract',\r\n 'and',\r\n 'atomic',\r\n 'as',\r\n 'assert',\r\n 'asr',\r\n 'base',\r\n 'begin',\r\n 'break',\r\n 'checked',\r\n 'component',\r\n 'const',\r\n 'constraint',\r\n 'constructor',\r\n 'continue',\r\n 'class',\r\n 'default',\r\n 'delegate',\r\n 'do',\r\n 'done',\r\n 'downcast',\r\n 'downto',\r\n 'elif',\r\n 'else',\r\n 'end',\r\n 'exception',\r\n 'eager',\r\n 'event',\r\n 'external',\r\n 'extern',\r\n 'false',\r\n 'finally',\r\n 'for',\r\n 'fun',\r\n 'function',\r\n 'fixed',\r\n 'functor',\r\n 'global',\r\n 'if',\r\n 'in',\r\n 'include',\r\n 'inherit',\r\n 'inline',\r\n 'interface',\r\n 'internal',\r\n 'land',\r\n 'lor',\r\n 'lsl',\r\n 'lsr',\r\n 'lxor',\r\n 'lazy',\r\n 'let',\r\n 'match',\r\n 'member',\r\n 'mod',\r\n 'module',\r\n 'mutable',\r\n 'namespace',\r\n 'method',\r\n 'mixin',\r\n 'new',\r\n 'not',\r\n 'null',\r\n 'of',\r\n 'open',\r\n 'or',\r\n 'object',\r\n 'override',\r\n 'private',\r\n 'parallel',\r\n 'process',\r\n 'protected',\r\n 'pure',\r\n 'public',\r\n 'rec',\r\n 'return',\r\n 'static',\r\n 'sealed',\r\n 'struct',\r\n 'sig',\r\n 'then',\r\n 'to',\r\n 'true',\r\n 'tailcall',\r\n 'trait',\r\n 'try',\r\n 'type',\r\n 'upcast',\r\n 'use',\r\n 'val',\r\n 'void',\r\n 'virtual',\r\n 'volatile',\r\n 'when',\r\n 'while',\r\n 'with',\r\n 'yield'\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>].\r\n [/\\[<.*>\\]/, 'annotation'],\r\n // Preprocessor directive\r\n [/^#(if|else|endif)/, 'keyword'],\r\n // delimiters and operators\r\n [/[{}()\\[\\]]/, '@brackets'],\r\n [/[<>](?!@symbols)/, '@brackets'],\r\n [/@symbols/, 'delimiter'],\r\n // numbers\r\n [/\\d*\\d+[eE]([\\-+]?\\d+)?(@floatsuffix)/, 'number.float'],\r\n [/\\d*\\.\\d+([eE][\\-+]?\\d+)?(@floatsuffix)/, 'number.float'],\r\n [/0x[0-9a-fA-F]+LF/, 'number.float'],\r\n [/0x[0-9a-fA-F]+(@integersuffix)/, 'number.hex'],\r\n [/0b[0-1]+(@integersuffix)/, 'number.bin'],\r\n [/\\d+(@integersuffix)/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"\"\"/, 'string', '@string.\"\"\"'],\r\n [/\"/, 'string', '@string.\"'],\r\n // literal string\r\n [/\\@\"/, { token: 'string.quote', next: '@litstring' }],\r\n // characters\r\n [/'[^\\\\']'B?/, 'string'],\r\n [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],\r\n [/'/, 'string.invalid']\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/\\(\\*(?!\\))/, 'comment', '@comment'],\r\n [/\\/\\/.*$/, 'comment']\r\n ],\r\n comment: [\r\n [/[^*(]+/, 'comment'],\r\n [/\\*\\)/, 'comment', '@pop'],\r\n [/\\*/, 'comment'],\r\n [/\\(\\*\\)/, 'comment'],\r\n [/\\(/, 'comment']\r\n ],\r\n string: [\r\n [/[^\\\\\"]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [\r\n /(\"\"\"|\"B?)/,\r\n {\r\n cases: {\r\n '$#==$S2': { token: 'string', next: '@pop' },\r\n '@default': 'string'\r\n }\r\n }\r\n ]\r\n ],\r\n litstring: [\r\n [/[^\"]+/, 'string'],\r\n [/\"\"/, 'string.escape'],\r\n [/\"/, { token: 'string.quote', next: '@pop' }]\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/23.acc0d03a.chunk.js b/static/js/23.acc0d03a.chunk.js new file mode 100644 index 0000000..e882dab --- /dev/null +++ b/static/js/23.acc0d03a.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[23],{813:function(e,n,o){"use strict";o.r(n),o.d(n,"conf",(function(){return t})),o.d(n,"language",(function(){return s}));var t={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:"'"}]},s={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"]]}}}}]); +//# sourceMappingURL=23.acc0d03a.chunk.js.map \ No newline at end of file diff --git a/static/js/23.acc0d03a.chunk.js.map b/static/js/23.acc0d03a.chunk.js.map new file mode 100644 index 0000000..5cad2a1 --- /dev/null +++ b/static/js/23.acc0d03a.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/go/go.js"],"names":["conf","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","language","defaultToken","tokenPostfix","keywords","operators","symbols","escapes","tokenizer","root","cases","token","include","whitespace","comment","doccomment","string","rawstring"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,WACjC,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,WACjC,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,aAE/CC,iBAAkB,CACd,CAAEH,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,OAGjBG,EAAW,CAClBC,aAAc,GACdC,aAAc,MACdC,SAAU,CACN,QACA,OACA,OACA,QACA,WACA,UACA,QACA,OACA,cACA,MACA,OACA,KACA,OACA,KACA,SACA,YACA,MACA,UACA,QACA,SACA,SACA,SACA,SACA,OACA,MACA,OACA,OACA,QACA,QACA,SACA,SACA,SACA,OACA,QACA,QACA,QACA,UACA,UACA,YACA,aACA,OACA,OACA,OACA,MACA,UACA,SACA,OAEJC,UAAW,CACP,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,MACA,IACA,IACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,KAGJC,QAAS,wBACTC,QAAS,wEAETC,UAAW,CACPC,KAAM,CAEF,CACI,eACA,CACIC,MAAO,CACH,YAAa,CAAEC,MAAO,cACtB,WAAY,gBAKxB,CAAEC,QAAS,eAEX,CAAC,aAAc,cAEf,CAAC,WAAY,WAEb,CAAC,aAAc,aACf,CAAC,mBAAoB,aACrB,CACI,WACA,CACIF,MAAO,CACH,aAAc,YACd,WAAY,MAKxB,CAAC,yBAA0B,gBAC3B,CAAC,2BAA4B,gBAC7B,CAAC,gCAAiC,cAClC,CAAC,gBAAiB,gBAClB,CAAC,oBAAqB,iBACtB,CAAC,WAAY,UACb,CAAC,KAAM,UAEP,CAAC,QAAS,aAEV,CAAC,kBAAmB,kBACpB,CAAC,IAAK,SAAU,WAChB,CAAC,IAAK,SAAU,cAEhB,CAAC,WAAY,UACb,CAAC,mBAAoB,CAAC,SAAU,gBAAiB,WACjD,CAAC,IAAK,mBAEVG,WAAY,CACR,CAAC,aAAc,IACf,CAAC,eAAgB,cAAe,eAChC,CAAC,OAAQ,UAAW,YACpB,CAAC,UAAW,YAEhBC,QAAS,CACL,CAAC,UAAW,WAGZ,CAAC,OAAQ,UAAW,QACpB,CAAC,QAAS,YAGdC,WAAY,CACR,CAAC,UAAW,eAEZ,CAAC,OAAQ,uBACT,CAAC,OAAQ,cAAe,QACxB,CAAC,QAAS,gBAEdC,OAAQ,CACJ,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU,SAEpBC,UAAW,CACP,CAAC,QAAS,UACV,CAAC,IAAK,SAAU","file":"static/js/23.acc0d03a.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '`', close: '`', notIn: ['string'] },\r\n { open: '\"', close: '\"', notIn: ['string'] },\r\n { open: \"'\", close: \"'\", notIn: ['string', 'comment'] }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '`', close: '`' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ]\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.go',\r\n keywords: [\r\n 'break',\r\n 'case',\r\n 'chan',\r\n 'const',\r\n 'continue',\r\n 'default',\r\n 'defer',\r\n 'else',\r\n 'fallthrough',\r\n 'for',\r\n 'func',\r\n 'go',\r\n 'goto',\r\n 'if',\r\n 'import',\r\n 'interface',\r\n 'map',\r\n 'package',\r\n 'range',\r\n 'return',\r\n 'select',\r\n 'struct',\r\n 'switch',\r\n 'type',\r\n 'var',\r\n 'bool',\r\n 'true',\r\n 'false',\r\n 'uint8',\r\n 'uint16',\r\n 'uint32',\r\n 'uint64',\r\n 'int8',\r\n 'int16',\r\n 'int32',\r\n 'int64',\r\n 'float32',\r\n 'float64',\r\n 'complex64',\r\n 'complex128',\r\n 'byte',\r\n 'rune',\r\n 'uint',\r\n 'int',\r\n 'uintptr',\r\n 'string',\r\n 'nil'\r\n ],\r\n operators: [\r\n '+',\r\n '-',\r\n '*',\r\n '/',\r\n '%',\r\n '&',\r\n '|',\r\n '^',\r\n '<<',\r\n '>>',\r\n '&^',\r\n '+=',\r\n '-=',\r\n '*=',\r\n '/=',\r\n '%=',\r\n '&=',\r\n '|=',\r\n '^=',\r\n '<<=',\r\n '>>=',\r\n '&^=',\r\n '&&',\r\n '||',\r\n '<-',\r\n '++',\r\n '--',\r\n '==',\r\n '<',\r\n '>',\r\n '=',\r\n '!',\r\n '!=',\r\n '<=',\r\n '>=',\r\n ':=',\r\n '...',\r\n '(',\r\n ')',\r\n '',\r\n ']',\r\n '{',\r\n '}',\r\n ',',\r\n ';',\r\n '.',\r\n ':'\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>](?!@symbols)/, '@brackets'],\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'delimiter',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n // numbers\r\n [/\\d*\\d+[eE]([\\-+]?\\d+)?/, 'number.float'],\r\n [/\\d*\\.\\d+([eE][\\-+]?\\d+)?/, 'number.float'],\r\n [/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, 'number.hex'],\r\n [/0[0-7']*[0-7]/, 'number.octal'],\r\n [/0[bB][0-1']*[0-1]/, 'number.binary'],\r\n [/\\d[\\d']*/, 'number'],\r\n [/\\d/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"/, 'string', '@string'],\r\n [/`/, 'string', '@rawstring'],\r\n // characters\r\n [/'[^\\\\']'/, 'string'],\r\n [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],\r\n [/'/, 'string.invalid']\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/\\/\\*\\*(?!\\/)/, 'comment.doc', '@doccomment'],\r\n [/\\/\\*/, 'comment', '@comment'],\r\n [/\\/\\/.*$/, 'comment']\r\n ],\r\n comment: [\r\n [/[^\\/*]+/, 'comment'],\r\n // [/\\/\\*/, 'comment', '@push' ], // nested comment not allowed :-(\r\n // [/\\/\\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/\r\n [/\\*\\//, 'comment', '@pop'],\r\n [/[\\/*]/, 'comment']\r\n ],\r\n //Identical copy of comment above, except for the addition of .doc\r\n doccomment: [\r\n [/[^\\/*]+/, 'comment.doc'],\r\n // [/\\/\\*/, 'comment.doc', '@push' ], // nested comment not allowed :-(\r\n [/\\/\\*/, 'comment.doc.invalid'],\r\n [/\\*\\//, 'comment.doc', '@pop'],\r\n [/[\\/*]/, 'comment.doc']\r\n ],\r\n string: [\r\n [/[^\\\\\"]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"/, 'string', '@pop']\r\n ],\r\n rawstring: [\r\n [/[^\\`]/, 'string'],\r\n [/`/, 'string', '@pop']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/24.de1031c4.chunk.js b/static/js/24.de1031c4.chunk.js new file mode 100644 index 0000000..d115fdf --- /dev/null +++ b/static/js/24.de1031c4.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[24],{814:function(e,n,t){"use strict";t.r(n),t.d(n,"conf",(function(){return o})),t.d(n,"language",(function(){return s}));var o={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}},s={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"]]}}}}]); +//# sourceMappingURL=24.de1031c4.chunk.js.map \ No newline at end of file diff --git a/static/js/24.de1031c4.chunk.js.map b/static/js/24.de1031c4.chunk.js.map new file mode 100644 index 0000000..eacdaf5 --- /dev/null +++ b/static/js/24.de1031c4.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.js"],"names":["conf","comments","lineComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","folding","offSide","language","defaultToken","tokenPostfix","keywords","typeKeywords","directiveLocations","operators","symbols","escapes","tokenizer","root","cases","include","token","log","next","nextEmbedded","bracket","mlstring","string","whitespace"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,YAAa,KAEjBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,MAAOC,MAAO,MAAOC,MAAO,CAAC,SAAU,YAC/C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,aAE/CC,iBAAkB,CACd,CAAEH,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,MAAOC,MAAO,OACtB,CAAED,KAAM,IAAKC,MAAO,MAExBG,QAAS,CACLC,SAAS,IAGNC,EAAW,CAElBC,aAAc,UACdC,aAAc,OACdC,SAAU,CACN,OACA,OACA,QACA,QACA,WACA,eACA,SACA,SACA,YACA,SACA,OACA,YACA,QACA,OACA,QACA,aACA,WACA,MAEJC,aAAc,CAAC,MAAO,QAAS,SAAU,UAAW,MACpDC,mBAAoB,CAChB,SACA,SACA,SACA,mBACA,sBACA,YACA,QACA,OACA,aACA,eACA,yBACA,QACA,WACA,eACA,QACA,sBACA,kBACA,kBACA,uBAEJC,UAAW,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,KAErCC,QAAS,YAETC,QAAS,qCAETC,UAAW,CACPC,KAAM,CAEF,CACI,eACA,CACIC,MAAO,CACH,YAAa,UACb,WAAY,oBAKxB,CACI,YACA,CACIA,MAAO,CACH,YAAa,UACb,WAAY,yBAKxB,CACI,eACA,CACIA,MAAO,CACH,gBAAiB,UACjB,WAAY,qBAKxB,CAAEC,QAAS,eAEX,CAAC,aAAc,aACf,CAAC,WAAY,CAAED,MAAO,CAAE,aAAc,WAAY,WAAY,MAI9D,CAAC,yBAA0B,CAAEE,MAAO,aAAcC,IAAK,yBAEvD,CAAC,2BAA4B,gBAC7B,CAAC,oBAAqB,cACtB,CAAC,MAAO,UAER,CAAC,QAAS,aACV,CAAC,MAAO,CAAED,MAAO,SAAUE,KAAM,YAAaC,aAAc,aAE5D,CAAC,kBAAmB,kBACpB,CAAC,IAAK,CAAEH,MAAO,eAAgBI,QAAS,QAASF,KAAM,aAE3DG,SAAU,CACN,CAAC,QAAS,UACV,CAAC,MAAO,CAAEL,MAAO,SAAUE,KAAM,OAAQC,aAAc,UAE3DG,OAAQ,CACJ,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,CAAEN,MAAO,eAAgBI,QAAS,SAAUF,KAAM,UAE5DK,WAAY,CACR,CAAC,aAAc,IACf,CAAC,OAAQ","file":"static/js/24.de1031c4.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n lineComment: '#'\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"\"\"', close: '\"\"\"', notIn: ['string', 'comment'] },\r\n { open: '\"', close: '\"', notIn: ['string', 'comment'] }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"\"\"', close: '\"\"\"' },\r\n { open: '\"', close: '\"' }\r\n ],\r\n folding: {\r\n offSide: true\r\n }\r\n};\r\nexport var language = {\r\n // Set defaultToken to invalid to see what you do not tokenize yet\r\n defaultToken: 'invalid',\r\n tokenPostfix: '.gql',\r\n keywords: [\r\n 'null',\r\n 'true',\r\n 'false',\r\n 'query',\r\n 'mutation',\r\n 'subscription',\r\n 'extend',\r\n 'schema',\r\n 'directive',\r\n 'scalar',\r\n 'type',\r\n 'interface',\r\n 'union',\r\n 'enum',\r\n 'input',\r\n 'implements',\r\n 'fragment',\r\n 'on'\r\n ],\r\n typeKeywords: ['Int', 'Float', 'String', 'Boolean', 'ID'],\r\n directiveLocations: [\r\n 'SCHEMA',\r\n 'SCALAR',\r\n 'OBJECT',\r\n 'FIELD_DEFINITION',\r\n 'ARGUMENT_DEFINITION',\r\n 'INTERFACE',\r\n 'UNION',\r\n 'ENUM',\r\n 'ENUM_VALUE',\r\n 'INPUT_OBJECT',\r\n 'INPUT_FIELD_DEFINITION',\r\n 'QUERY',\r\n 'MUTATION',\r\n 'SUBSCRIPTION',\r\n 'FIELD',\r\n 'FRAGMENT_DEFINITION',\r\n 'FRAGMENT_SPREAD',\r\n 'INLINE_FRAGMENT',\r\n 'VARIABLE_DEFINITION'\r\n ],\r\n operators: ['=', '!', '?', ':', '&', '|'],\r\n // we include these common regular expressions\r\n symbols: /[=!?:&|]+/,\r\n // https://facebook.github.io/graphql/draft/#sec-String-Value\r\n escapes: /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9A-Fa-f]{4})/,\r\n // The main tokenizer for our languages\r\n tokenizer: {\r\n root: [\r\n // fields and argument names\r\n [\r\n /[a-z_][\\w$]*/,\r\n {\r\n cases: {\r\n '@keywords': 'keyword',\r\n '@default': 'key.identifier'\r\n }\r\n }\r\n ],\r\n // identify typed input variables\r\n [\r\n /[$][\\w$]*/,\r\n {\r\n cases: {\r\n '@keywords': 'keyword',\r\n '@default': 'argument.identifier'\r\n }\r\n }\r\n ],\r\n // to show class names nicely\r\n [\r\n /[A-Z][\\w\\$]*/,\r\n {\r\n cases: {\r\n '@typeKeywords': 'keyword',\r\n '@default': 'type.identifier'\r\n }\r\n }\r\n ],\r\n // whitespace\r\n { include: '@whitespace' },\r\n // delimiters and operators\r\n [/[{}()\\[\\]]/, '@brackets'],\r\n [/@symbols/, { cases: { '@operators': 'operator', '@default': '' } }],\r\n // @ annotations.\r\n // As an example, we emit a debugging log message on these tokens.\r\n // Note: message are supressed during the first load -- change some lines to see them.\r\n [/@\\s*[a-zA-Z_\\$][\\w\\$]*/, { token: 'annotation', log: 'annotation token: $0' }],\r\n // numbers\r\n [/\\d*\\.\\d+([eE][\\-+]?\\d+)?/, 'number.float'],\r\n [/0[xX][0-9a-fA-F]+/, 'number.hex'],\r\n [/\\d+/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n [/\"\"\"/, { token: 'string', next: '@mlstring', nextEmbedded: 'markdown' }],\r\n // strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"/, { token: 'string.quote', bracket: '@open', next: '@string' }]\r\n ],\r\n mlstring: [\r\n [/[^\"]+/, 'string'],\r\n ['\"\"\"', { token: 'string', next: '@pop', nextEmbedded: '@pop' }]\r\n ],\r\n string: [\r\n [/[^\\\\\"]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"/, { token: 'string.quote', bracket: '@close', next: '@pop' }]\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/#.*$/, 'comment']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/25.d24eb6df.chunk.js b/static/js/25.d24eb6df.chunk.js new file mode 100644 index 0000000..71b768e --- /dev/null +++ b/static/js/25.d24eb6df.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[25],{815:function(e,t,n){"use strict";n.r(t),n.d(t,"conf",(function(){return m})),n.d(t,"language",(function(){return i}));var a=n(209),r=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],m={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("<(?!(?:"+r.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:a.a.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+r.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:a.a.IndentAction.Indent}}]},i={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{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:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{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"]]}}}}]); +//# sourceMappingURL=25.d24eb6df.chunk.js.map \ No newline at end of file diff --git a/static/js/25.d24eb6df.chunk.js.map b/static/js/25.d24eb6df.chunk.js.map new file mode 100644 index 0000000..225b515 --- /dev/null +++ b/static/js/25.d24eb6df.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.js"],"names":["EMPTY_ELEMENTS","conf","wordPattern","comments","blockComment","brackets","autoClosingPairs","open","close","surroundingPairs","onEnterRules","beforeText","RegExp","join","afterText","action","indentAction","languages","IndentAction","IndentOutdent","Indent","language","defaultToken","tokenPostfix","tokenizer","root","token","switchTo","next","doctype","comment","commentBlock","commentHtml","otherTag","script","nextEmbedded","scriptAfterType","scriptAfterTypeEquals","scriptWithCustomType","scriptEmbedded","style","styleAfterType","styleAfterTypeEquals","styleWithCustomType","styleEmbedded","handlebarsInSimpleState","include","handlebarsInEmbeddedState","handlebarsRoot"],"mappings":"6GAAA,kGAKIA,EAAiB,CACjB,OACA,OACA,KACA,MACA,QACA,KACA,MACA,QACA,SACA,OACA,WACA,OACA,QACA,SACA,QACA,OAEOC,EAAO,CACdC,YAAa,iFACbC,SAAU,CACNC,aAAc,CAAC,QAAS,SAE5BC,SAAU,CACN,CAAC,UAAQ,UACT,CAAC,IAAK,KACN,CAAC,KAAM,MACP,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBC,iBAAkB,CACd,CAAEF,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBE,aAAc,CACV,CACIC,WAAY,IAAIC,OAAO,UAAYZ,EAAea,KAAK,KAAO,uCAAwC,KACtGC,UAAW,wBACXC,OAAQ,CACJC,aAAcC,IAAUC,aAAaC,gBAG7C,CACIR,WAAY,IAAIC,OAAO,UAAYZ,EAAea,KAAK,KAAO,uCAAwC,KACtGE,OAAQ,CAAEC,aAAcC,IAAUC,aAAaE,WAIhDC,EAAW,CAClBC,aAAc,GACdC,aAAc,GAGdC,UAAW,CACPC,KAAM,CACF,CAAC,UAAW,iCAAkC,iBAC9C,CAAC,QAAS,2BAA4B,YACtC,CAAC,OAAQ,CAAEC,MAAO,WAAYC,SAAU,kCACxC,CAAC,YAAa,eAAgB,YAC9B,CAAC,OAAQ,eAAgB,gBACzB,CAAC,gBAAiB,CAAC,iBAAkB,WAAY,mBACjD,CAAC,cAAe,CAAC,iBAAkB,CAAED,MAAO,WAAYE,KAAM,aAC9D,CAAC,aAAc,CAAC,iBAAkB,CAAEF,MAAO,WAAYE,KAAM,YAC7D,CAAC,cAAe,CAAC,iBAAkB,CAAEF,MAAO,WAAYE,KAAM,eAC9D,CAAC,aAAc,CAAC,iBAAkB,CAAEF,MAAO,WAAYE,KAAM,eAC7D,CAAC,IAAK,kBACN,CAAC,KAAM,kBACP,CAAC,WAELC,QAAS,CACL,CACI,OACA,CACIH,MAAO,WACPC,SAAU,qCAGlB,CAAC,QAAS,wBACV,CAAC,IAAK,eAAgB,SAE1BG,QAAS,CACL,CAAC,OAAQ,yBAA0B,QACnC,CAAC,IAAK,+BAEVC,aAAc,CACV,CAAC,SAAU,+BAAgC,QAC3C,CAAC,IAAK,+BAEVC,YAAa,CACT,CACI,OACA,CACIN,MAAO,WACPC,SAAU,qCAGlB,CAAC,MAAO,eAAgB,QACxB,CAAC,QAAS,wBACV,CAAC,IAAK,yBAEVM,SAAU,CACN,CACI,OACA,CACIP,MAAO,WACPC,SAAU,sCAGlB,CAAC,OAAQ,iBAAkB,QAC3B,CAAC,YAAa,mBACd,CAAC,YAAa,mBACd,CAAC,UAAW,kBACZ,CAAC,IAAK,aACN,CAAC,eAILO,OAAQ,CACJ,CACI,OACA,CACIR,MAAO,WACPC,SAAU,oCAGlB,CAAC,OAAQ,iBAAkB,oBAC3B,CAAC,YAAa,mBACd,CAAC,YAAa,mBACd,CAAC,UAAW,kBACZ,CAAC,IAAK,aACN,CACI,IACA,CACID,MAAO,iBACPE,KAAM,kCACNO,aAAc,oBAGtB,CAAC,cACD,CACI,sBACA,CAAC,iBAAkB,WAAY,CAAET,MAAO,iBAAkBE,KAAM,WAIxEQ,gBAAiB,CACb,CACI,OACA,CACIV,MAAO,WACPC,SAAU,6CAGlB,CAAC,IAAK,YAAa,0BACnB,CACI,IACA,CACID,MAAO,iBACPE,KAAM,kCACNO,aAAc,oBAGtB,CAAC,cACD,CAAC,gBAAiB,CAAET,MAAO,WAAYE,KAAM,UAGjDS,sBAAuB,CACnB,CACI,OACA,CACIX,MAAO,WACPC,SAAU,mDAGlB,CACI,YACA,CACID,MAAO,kBACPC,SAAU,6BAGlB,CACI,YACA,CACID,MAAO,kBACPC,SAAU,6BAGlB,CACI,IACA,CACID,MAAO,iBACPE,KAAM,kCACNO,aAAc,oBAGtB,CAAC,cACD,CAAC,gBAAiB,CAAET,MAAO,WAAYE,KAAM,UAGjDU,qBAAsB,CAClB,CACI,OACA,CACIZ,MAAO,WACPC,SAAU,sDAGlB,CACI,IACA,CACID,MAAO,iBACPE,KAAM,sBACNO,aAAc,QAGtB,CAAC,YAAa,mBACd,CAAC,YAAa,mBACd,CAAC,UAAW,kBACZ,CAAC,IAAK,aACN,CAAC,cACD,CAAC,gBAAiB,CAAET,MAAO,WAAYE,KAAM,UAEjDW,eAAgB,CACZ,CACI,OACA,CACIb,MAAO,WACPC,SAAU,gDACVQ,aAAc,SAGtB,CAAC,YAAa,CAAET,MAAO,WAAYE,KAAM,OAAQO,aAAc,UAKnEK,MAAO,CACH,CACI,OACA,CACId,MAAO,WACPC,SAAU,mCAGlB,CAAC,OAAQ,iBAAkB,mBAC3B,CAAC,YAAa,mBACd,CAAC,YAAa,mBACd,CAAC,UAAW,kBACZ,CAAC,IAAK,aACN,CACI,IACA,CACID,MAAO,iBACPE,KAAM,0BACNO,aAAc,aAGtB,CAAC,cACD,CACI,qBACA,CAAC,iBAAkB,WAAY,CAAET,MAAO,iBAAkBE,KAAM,WAIxEa,eAAgB,CACZ,CACI,OACA,CACIf,MAAO,WACPC,SAAU,4CAGlB,CAAC,IAAK,YAAa,yBACnB,CACI,IACA,CACID,MAAO,iBACPE,KAAM,0BACNO,aAAc,aAGtB,CAAC,cACD,CAAC,eAAgB,CAAET,MAAO,WAAYE,KAAM,UAGhDc,qBAAsB,CAClB,CACI,OACA,CACIhB,MAAO,WACPC,SAAU,kDAGlB,CACI,YACA,CACID,MAAO,kBACPC,SAAU,4BAGlB,CACI,YACA,CACID,MAAO,kBACPC,SAAU,4BAGlB,CACI,IACA,CACID,MAAO,iBACPE,KAAM,0BACNO,aAAc,aAGtB,CAAC,cACD,CAAC,eAAgB,CAAET,MAAO,WAAYE,KAAM,UAGhDe,oBAAqB,CACjB,CACI,OACA,CACIjB,MAAO,WACPC,SAAU,qDAGlB,CACI,IACA,CACID,MAAO,iBACPE,KAAM,qBACNO,aAAc,QAGtB,CAAC,YAAa,mBACd,CAAC,YAAa,mBACd,CAAC,UAAW,kBACZ,CAAC,IAAK,aACN,CAAC,cACD,CAAC,eAAgB,CAAET,MAAO,WAAYE,KAAM,UAEhDgB,cAAe,CACX,CACI,OACA,CACIlB,MAAO,WACPC,SAAU,+CACVQ,aAAc,SAGtB,CAAC,WAAY,CAAET,MAAO,WAAYE,KAAM,OAAQO,aAAc,UAGlEU,wBAAyB,CACrB,CAAC,UAAW,wBACZ,CAAC,UAAW,CAAEnB,MAAO,uBAAwBC,SAAU,aACvD,CAAEmB,QAAS,mBAEfC,0BAA2B,CACvB,CAAC,UAAW,wBACZ,CACI,UACA,CACIrB,MAAO,uBACPC,SAAU,WACVQ,aAAc,QAGtB,CAAEW,QAAS,mBAEfE,eAAgB,CACZ,CAAC,UAAW,qBACZ,CAAC,cAAe,6BAChB,CAAC,SAAU,6BACX,CAAC,SACD,CAAC,OAAQ","file":"static/js/25.d24eb6df.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { languages } from '../fillers/monaco-editor-core.js';\r\nvar EMPTY_ELEMENTS = [\r\n 'area',\r\n 'base',\r\n 'br',\r\n 'col',\r\n 'embed',\r\n 'hr',\r\n 'img',\r\n 'input',\r\n 'keygen',\r\n 'link',\r\n 'menuitem',\r\n 'meta',\r\n 'param',\r\n 'source',\r\n 'track',\r\n 'wbr'\r\n];\r\nexport var conf = {\r\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\$\\^\\&\\*\\(\\)\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\s]+)/g,\r\n comments: {\r\n blockComment: ['{{!--', '--}}']\r\n },\r\n brackets: [\r\n [''],\r\n ['<', '>'],\r\n ['{{', '}}'],\r\n ['{', '}'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n surroundingPairs: [\r\n { open: '<', close: '>' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n onEnterRules: [\r\n {\r\n beforeText: new RegExp(\"<(?!(?:\" + EMPTY_ELEMENTS.join('|') + \"))(\\\\w[\\\\w\\\\d]*)([^/>]*(?!/)>)[^<]*$\", 'i'),\r\n afterText: /^<\\/(\\w[\\w\\d]*)\\s*>$/i,\r\n action: {\r\n indentAction: languages.IndentAction.IndentOutdent\r\n }\r\n },\r\n {\r\n beforeText: new RegExp(\"<(?!(?:\" + EMPTY_ELEMENTS.join('|') + \"))(\\\\w[\\\\w\\\\d]*)([^/>]*(?!/)>)[^<]*$\", 'i'),\r\n action: { indentAction: languages.IndentAction.Indent }\r\n }\r\n ]\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '',\r\n // ignoreCase: true,\r\n // The main tokenizer for our languages\r\n tokenizer: {\r\n root: [\r\n [/\\{\\{!--/, 'comment.block.start.handlebars', '@commentBlock'],\r\n [/\\{\\{!/, 'comment.start.handlebars', '@comment'],\r\n [/\\{\\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.root' }],\r\n [/)/, ['delimiter.html', 'tag.html', 'delimiter.html']],\r\n [/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]],\r\n [/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]],\r\n [/(<)([:\\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],\r\n [/(<\\/)(\\w+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],\r\n [/]+/, 'metatag.content.html'],\r\n [/>/, 'metatag.html', '@pop']\r\n ],\r\n comment: [\r\n [/\\}\\}/, 'comment.end.handlebars', '@pop'],\r\n [/./, 'comment.content.handlebars']\r\n ],\r\n commentBlock: [\r\n [/--\\}\\}/, 'comment.block.end.handlebars', '@pop'],\r\n [/./, 'comment.content.handlebars']\r\n ],\r\n commentHtml: [\r\n [\r\n /\\{\\{/,\r\n {\r\n token: '@rematch',\r\n switchTo: '@handlebarsInSimpleState.comment'\r\n }\r\n ],\r\n [/-->/, 'comment.html', '@pop'],\r\n [/[^-]+/, 'comment.content.html'],\r\n [/./, 'comment.content.html']\r\n ],\r\n otherTag: [\r\n [\r\n /\\{\\{/,\r\n {\r\n token: '@rematch',\r\n switchTo: '@handlebarsInSimpleState.otherTag'\r\n }\r\n ],\r\n [/\\/?>/, 'delimiter.html', '@pop'],\r\n [/\"([^\"]*)\"/, 'attribute.value'],\r\n [/'([^']*)'/, 'attribute.value'],\r\n [/[\\w\\-]+/, 'attribute.name'],\r\n [/=/, 'delimiter'],\r\n [/[ \\t\\r\\n]+/] // whitespace\r\n ],\r\n // -- BEGIN \r\n// \r\n// .bar { text-decoration: underline; }\r\n// \r\n// \r\n// \r\n// \r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/28.8e51ca3b.chunk.js b/static/js/28.8e51ca3b.chunk.js new file mode 100644 index 0000000..b786226 --- /dev/null +++ b/static/js/28.8e51ca3b.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[28],{818:function(e,n,s){"use strict";s.r(n),s.d(n,"conf",(function(){return o})),s.d(n,"language",(function(){return t}));var o={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:"'"}]},t={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"}}]]}}}}]); +//# sourceMappingURL=28.8e51ca3b.chunk.js.map \ No newline at end of file diff --git a/static/js/28.8e51ca3b.chunk.js.map b/static/js/28.8e51ca3b.chunk.js.map new file mode 100644 index 0000000..d875757 --- /dev/null +++ b/static/js/28.8e51ca3b.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.js"],"names":["conf","comments","lineComment","brackets","autoClosingPairs","open","close","surroundingPairs","language","defaultToken","tokenPostfix","escapes","tokenizer","root","include","whitespace","string","cases","token","next"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,YAAa,KAEjBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBC,iBAAkB,CACd,CAAEF,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,OAGjBE,EAAW,CAClBC,aAAc,GACdC,aAAc,OAEdC,QAAS,wEAETC,UAAW,CACPC,KAAM,CAEF,CAAC,cAAe,WAEhB,CAAC,kBAAmB,CAAC,MAAO,GAAI,cAEhC,CAAEC,QAAS,eAEX,CAAC,MAAO,UAER,CAAC,kBAAmB,kBACpB,CAAC,kBAAmB,kBACpB,CAAC,IAAK,SAAU,aAChB,CAAC,IAAK,SAAU,cAEpBC,WAAY,CACR,CAAC,aAAc,IACf,CAAC,cAAe,YAEpBC,OAAQ,CACJ,CAAC,WAAY,UACb,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CACI,OACA,CACIC,MAAO,CACH,UAAW,CAAEC,MAAO,SAAUC,KAAM,QACpC,WAAY","file":"static/js/28.8e51ca3b.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n lineComment: '#'\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ]\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.ini',\r\n // we include these common regular expressions\r\n escapes: /\\\\(?:[abfnrtv\\\\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,\r\n // The main tokenizer for our languages\r\n tokenizer: {\r\n root: [\r\n // sections\r\n [/^\\[[^\\]]*\\]/, 'metatag'],\r\n // keys\r\n [/(^\\w+)(\\s*)(\\=)/, ['key', '', 'delimiter']],\r\n // whitespace\r\n { include: '@whitespace' },\r\n // numbers\r\n [/\\d+/, 'number'],\r\n // strings: recover on non-terminated strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/'([^'\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"/, 'string', '@string.\"'],\r\n [/'/, 'string', \"@string.'\"]\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/^\\s*[#;].*$/, 'comment']\r\n ],\r\n string: [\r\n [/[^\\\\\"']+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [\r\n /[\"']/,\r\n {\r\n cases: {\r\n '$#==$S2': { token: 'string', next: '@pop' },\r\n '@default': 'string'\r\n }\r\n }\r\n ]\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/29.79604051.chunk.js b/static/js/29.79604051.chunk.js new file mode 100644 index 0000000..73d4996 --- /dev/null +++ b/static/js/29.79604051.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[29],{819:function(e,t,o){"use strict";o.r(t),o.d(t,"conf",(function(){return n})),o.d(t,"language",(function(){return s}));var n={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)|(?:))")}}},s={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"]]}}}}]); +//# sourceMappingURL=29.79604051.chunk.js.map \ No newline at end of file diff --git a/static/js/29.79604051.chunk.js.map b/static/js/29.79604051.chunk.js.map new file mode 100644 index 0000000..8f54f5b --- /dev/null +++ b/static/js/29.79604051.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/java/java.js"],"names":["conf","wordPattern","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","surroundingPairs","folding","markers","start","RegExp","end","language","defaultToken","tokenPostfix","keywords","operators","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","tokenizer","root","cases","token","include","whitespace","comment","javadoc","string"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CAEdC,YAAa,qFACbC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBC,iBAAkB,CACd,CAAEF,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBE,QAAS,CACLC,QAAS,CACLC,MAAO,IAAIC,OAAO,sDAClBC,IAAK,IAAID,OAAO,2DAIjBE,EAAW,CAClBC,aAAc,GACdC,aAAc,QACdC,SAAU,CACN,WACA,WACA,MACA,MACA,SACA,SACA,UACA,OACA,UACA,eACA,UACA,KACA,KACA,UACA,OACA,QACA,SACA,aACA,YACA,QACA,OACA,OACA,SACA,SACA,SACA,OACA,OACA,aACA,SACA,YACA,QACA,UACA,MACA,QACA,MACA,OACA,QACA,YACA,SACA,OACA,QACA,UACA,OACA,WACA,WACA,QACA,QACA,SACA,QACA,QACA,OACA,SAEJC,UAAW,CACP,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,QAGJC,QAAS,wBACTC,QAAS,wEACTC,OAAQ,cACRC,YAAa,oBACbC,aAAc,oBACdC,UAAW,iCAEXC,UAAW,CACPC,KAAM,CAEF,CACI,mBACA,CACIC,MAAO,CACH,YAAa,CAAEC,MAAO,cACtB,WAAY,gBAKxB,CAAEC,QAAS,eAEX,CAAC,aAAc,aACf,CAAC,mBAAoB,aACrB,CACI,WACA,CACIF,MAAO,CACH,aAAc,YACd,WAAY,MAKxB,CAAC,yBAA0B,cAE3B,CAAC,yCAA0C,gBAC3C,CAAC,oDAAqD,gBACtD,CAAC,yBAA0B,cAC3B,CAAC,uBAAwB,gBACzB,CAAC,4BAA6B,iBAC9B,CAAC,kBAAmB,gBACpB,CAAC,iBAAkB,UAEnB,CAAC,QAAS,aAEV,CAAC,kBAAmB,kBACpB,CAAC,IAAK,SAAU,WAEhB,CAAC,WAAY,UACb,CAAC,mBAAoB,CAAC,SAAU,gBAAiB,WACjD,CAAC,IAAK,mBAEVG,WAAY,CACR,CAAC,aAAc,IACf,CAAC,eAAgB,cAAe,YAChC,CAAC,OAAQ,UAAW,YACpB,CAAC,UAAW,YAEhBC,QAAS,CACL,CAAC,UAAW,WAGZ,CAAC,OAAQ,UAAW,QACpB,CAAC,QAAS,YAGdC,QAAS,CACL,CAAC,UAAW,eAEZ,CAAC,OAAQ,uBACT,CAAC,OAAQ,cAAe,QACxB,CAAC,QAAS,gBAEdC,OAAQ,CACJ,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU","file":"static/js/29.79604051.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n // the default separators except `@$`\r\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g,\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" },\r\n { open: '<', close: '>' }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*//\\\\s*(?:(?:#?region\\\\b)|(?:))')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.java',\r\n keywords: [\r\n 'abstract',\r\n 'continue',\r\n 'for',\r\n 'new',\r\n 'switch',\r\n 'assert',\r\n 'default',\r\n 'goto',\r\n 'package',\r\n 'synchronized',\r\n 'boolean',\r\n 'do',\r\n 'if',\r\n 'private',\r\n 'this',\r\n 'break',\r\n 'double',\r\n 'implements',\r\n 'protected',\r\n 'throw',\r\n 'byte',\r\n 'else',\r\n 'import',\r\n 'public',\r\n 'throws',\r\n 'case',\r\n 'enum',\r\n 'instanceof',\r\n 'return',\r\n 'transient',\r\n 'catch',\r\n 'extends',\r\n 'int',\r\n 'short',\r\n 'try',\r\n 'char',\r\n 'final',\r\n 'interface',\r\n 'static',\r\n 'void',\r\n 'class',\r\n 'finally',\r\n 'long',\r\n 'strictfp',\r\n 'volatile',\r\n 'const',\r\n 'float',\r\n 'native',\r\n 'super',\r\n 'while',\r\n 'true',\r\n 'false'\r\n ],\r\n operators: [\r\n '=',\r\n '>',\r\n '<',\r\n '!',\r\n '~',\r\n '?',\r\n ':',\r\n '==',\r\n '<=',\r\n '>=',\r\n '!=',\r\n '&&',\r\n '||',\r\n '++',\r\n '--',\r\n '+',\r\n '-',\r\n '*',\r\n '/',\r\n '&',\r\n '|',\r\n '^',\r\n '%',\r\n '<<',\r\n '>>',\r\n '>>>',\r\n '+=',\r\n '-=',\r\n '*=',\r\n '/=',\r\n '&=',\r\n '|=',\r\n '^=',\r\n '%=',\r\n '<<=',\r\n '>>=',\r\n '>>>='\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>](?!@symbols)/, '@brackets'],\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'delimiter',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n // @ annotations.\r\n [/@\\s*[a-zA-Z_\\$][\\w\\$]*/, 'annotation'],\r\n // numbers\r\n [/(@digits)[eE]([\\-+]?(@digits))?[fFdD]?/, 'number.float'],\r\n [/(@digits)\\.(@digits)([eE][\\-+]?(@digits))?[fFdD]?/, 'number.float'],\r\n [/0[xX](@hexdigits)[Ll]?/, 'number.hex'],\r\n [/0(@octaldigits)[Ll]?/, 'number.octal'],\r\n [/0[bB](@binarydigits)[Ll]?/, 'number.binary'],\r\n [/(@digits)[fFdD]/, 'number.float'],\r\n [/(@digits)[lL]?/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"/, 'string', '@string'],\r\n // characters\r\n [/'[^\\\\']'/, 'string'],\r\n [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],\r\n [/'/, 'string.invalid']\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/\\/\\*\\*(?!\\/)/, 'comment.doc', '@javadoc'],\r\n [/\\/\\*/, 'comment', '@comment'],\r\n [/\\/\\/.*$/, 'comment']\r\n ],\r\n comment: [\r\n [/[^\\/*]+/, 'comment'],\r\n // [/\\/\\*/, 'comment', '@push' ], // nested comment not allowed :-(\r\n // [/\\/\\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/\r\n [/\\*\\//, 'comment', '@pop'],\r\n [/[\\/*]/, 'comment']\r\n ],\r\n //Identical copy of comment above, except for the addition of .doc\r\n javadoc: [\r\n [/[^\\/*]+/, 'comment.doc'],\r\n // [/\\/\\*/, 'comment.doc', '@push' ], // nested comment not allowed :-(\r\n [/\\/\\*/, 'comment.doc.invalid'],\r\n [/\\*\\//, 'comment.doc', '@pop'],\r\n [/[\\/*]/, 'comment.doc']\r\n ],\r\n string: [\r\n [/[^\\\\\"]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"/, 'string', '@pop']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/30.c0502858.chunk.js b/static/js/30.c0502858.chunk.js new file mode 100644 index 0000000..39c6b1e --- /dev/null +++ b/static/js/30.c0502858.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[30],{821:function(e,t,r){"use strict";r.r(t),r.d(t,"conf",(function(){return n})),r.d(t,"language",(function(){return o}));var n={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},o={tokenPostfix:".julia",keywords:["begin","while","if","for","try","return","break","continue","function","macro","quote","let","local","global","const","do","struct","module","baremodule","using","import","export","end","else","elseif","catch","finally","mutable","primitive","abstract","type","in","isa","where","new"],types:["LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","AbstractArray","UndefKeywordError","AbstractChannel","UndefRefError","AbstractChar","UndefVarError","AbstractDict","Union","AbstractDisplay","UnionAll","AbstractFloat","UnitRange","AbstractIrrational","Unsigned","AbstractMatrix","AbstractRange","Val","AbstractSet","Vararg","AbstractString","VecElement","AbstractUnitRange","VecOrMat","AbstractVecOrMat","Vector","AbstractVector","VersionNumber","Any","WeakKeyDict","ArgumentError","WeakRef","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError"],keywordops:["<:",">:",":","=>","...",".","->","?"],allops:/[^\w\d\s()\[\]{}"'#]+/,constants:["true","false","nothing","missing","undef","Inf","pi","NaN","\u03c0","\u212f","ans","PROGRAM_FILE","ARGS","C_NULL","VERSION","DEPOT_PATH","LOAD_PATH"],operators:["!","!=","!==","%","&","*","+","-","/","//","<","<<","<=","==","===","=>",">",">=",">>",">>>","\\","^","|","|>","~","\xf7","\u2208","\u2209","\u220b","\u220c","\u2218","\u221a","\u221b","\u2229","\u222a","\u2248","\u2249","\u2260","\u2261","\u2262","\u2264","\u2265","\u2286","\u2287","\u2288","\u2289","\u228a","\u228b","\u22bb"],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],ident:/\u03c0|\u212f|\b(?!\d)\w+\b/,escape:/(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,escapes:/\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,tokenizer:{root:[[/(::)\s*|\b(isa)\s+/,"keyword","@typeanno"],[/\b(isa)(\s*\(@ident\s*,\s*)/,["keyword",{token:"",next:"@typeanno"}]],[/\b(type|struct)[ \t]+/,"keyword","@typeanno"],[/^\s*:@ident[!?]?/,"metatag"],[/(return)(\s*:@ident[!?]?)/,["keyword","metatag"]],[/(\(|\[|\{|@allops)(\s*:@ident[!?]?)/,["","metatag"]],[/:\(/,"metatag","@quote"],[/r"""/,"regexp.delim","@tregexp"],[/r"/,"regexp.delim","@sregexp"],[/raw"""/,"string.delim","@rtstring"],[/[bv]?"""/,"string.delim","@dtstring"],[/raw"/,"string.delim","@rsstring"],[/[bv]?"/,"string.delim","@dsstring"],[/(@ident)\{/,{cases:{"$1@types":{token:"type",next:"@gen"},"@default":{token:"type",next:"@gen"}}}],[/@ident[!?'']?(?=\.?\()/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"keyword.flow"}}],[/@ident[!?']?/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"identifier"}}],[/\$\w+/,"key"],[/\$\(/,"key","@paste"],[/@@ident/,"annotation"],{include:"@whitespace"},[/'(?:@escapes|.)'/,"string.character"],[/[()\[\]{}]/,"@brackets"],[/@allops/,{cases:{"@keywordops":"keyword","@operators":"operator"}}],[/[;,]/,"delimiter"],[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/,"number.hex"],[/0[_oO][0-7](_?[0-7])*/,"number.octal"],[/0[bB][01](_?[01])*/,"number.binary"],[/[+\-]?\d+(\.\d+)?(im?|[eE][+\-]?\d+(\.\d+)?)?/,"number"]],typeanno:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@gen"],[/([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(\s*<:\s*)/,["type","keyword"]],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type","@pop"],["","","@pop"]],gen:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@push"],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type"],[/<:/,"keyword"],[/(\})(\s*<:\s*)/,["type",{token:"keyword",next:"@pop"}]],[/\}/,"type","@pop"],{include:"@root"}],quote:[[/\$\(/,"key","@paste"],[/\(/,"@brackets","@paren"],[/\)/,"metatag","@pop"],{include:"@root"}],paste:[[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@paren"],[/\)/,"key","@pop"],{include:"@root"}],paren:[[/\$\(/,"key","@paste"],[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@push"],[/\)/,"@brackets","@pop"],{include:"@root"}],sregexp:[[/^.*/,"invalid"],[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"[imsx]*/,"regexp.delim","@pop"]],tregexp:[[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"(?!"")/,"string"],[/"""[imsx]*/,"regexp.delim","@pop"]],rsstring:[[/^.*/,"invalid"],[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"/,"string.delim","@pop"]],rtstring:[[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],dsstring:[[/^.*/,"invalid"],[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string.delim","@pop"]],dtstring:[[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],interpolated:[[/\(/,{token:"",switchTo:"@interpolated_compound"}],[/[a-zA-Z_]\w*/,"identifier"],["","","@pop"]],interpolated_compound:[[/\)/,"","@pop"],{include:"@root"}],whitespace:[[/[ \t\r\n]+/,""],[/#=/,"comment","@multi_comment"],[/#.*$/,"comment"]],multi_comment:[[/#=/,"comment","@push"],[/=#/,"comment","@pop"],[/=(?!#)|#(?!=)/,"comment"],[/[^#=]+/,"comment"]]}}}}]); +//# sourceMappingURL=30.c0502858.chunk.js.map \ No newline at end of file diff --git a/static/js/30.c0502858.chunk.js.map b/static/js/30.c0502858.chunk.js.map new file mode 100644 index 0000000..12e9a0c --- /dev/null +++ b/static/js/30.c0502858.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.js"],"names":["conf","brackets","autoClosingPairs","open","close","surroundingPairs","language","tokenPostfix","keywords","types","keywordops","allops","constants","operators","token","ident","escape","escapes","tokenizer","root","next","cases","include","typeanno","gen","quote","paste","paren","sregexp","tregexp","rsstring","rtstring","dsstring","dtstring","interpolated","switchTo","interpolated_compound","whitespace","multi_comment"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBC,iBAAkB,CACd,CAAEF,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,OAGjBE,EAAW,CAClBC,aAAc,SACdC,SAAU,CACN,QACA,QACA,KACA,MACA,MACA,SACA,QACA,WACA,WACA,QACA,QACA,MACA,QACA,SACA,QACA,KACA,SACA,SACA,aACA,QACA,SACA,SACA,MACA,OACA,SACA,QACA,UACA,UACA,YACA,WACA,OACA,KACA,MACA,QACA,OAEJC,MAAO,CACH,WACA,iBACA,gBACA,YACA,OACA,SACA,SACA,cACA,UACA,mBACA,SACA,SACA,aACA,UACA,SACA,eACA,mBACA,gBACA,OACA,mBACA,oBACA,OACA,MACA,YACA,WACA,QACA,sBACA,OACA,gBACA,MACA,QACA,aACA,eACA,oBACA,MACA,SACA,OACA,qBACA,YACA,eACA,eACA,gBACA,kBACA,gBACA,SACA,mBACA,WACA,YACA,qBACA,SACA,cACA,OACA,OACA,cACA,QACA,QACA,OACA,YACA,UACA,OACA,UACA,SACA,SACA,SACA,QACA,mBACA,gBACA,oBACA,kBACA,gBACA,eACA,gBACA,eACA,QACA,kBACA,WACA,gBACA,YACA,qBACA,WACA,iBACA,gBACA,MACA,cACA,SACA,iBACA,aACA,oBACA,WACA,mBACA,SACA,iBACA,gBACA,MACA,cACA,gBACA,UACA,QACA,iBACA,WACA,SACA,WACA,YACA,SACA,YACA,OACA,cACA,oBACA,iBACA,mBACA,QACA,UACA,SACA,UACA,OACA,OACA,YACA,QACA,YACA,MACA,QACA,UACA,aACA,aACA,aACA,qBACA,YACA,aACA,SACA,UACA,WACA,UACA,SACA,QACA,aACA,SACA,aACA,UACA,QACA,WACA,WACA,WACA,aACA,cACA,gBACA,cACA,OACA,oBACA,OACA,cACA,cACA,WACA,OACA,iBACA,YACA,qBACA,OACA,UACA,UACA,UACA,WACA,YACA,OACA,KACA,WACA,YACA,WACA,SACA,iBACA,cACA,aACA,eACA,YACA,MACA,SACA,QACA,QACA,QACA,OACA,UACA,qBACA,wBACA,aACA,YAEJC,WAAY,CAAC,KAAM,KAAM,IAAK,KAAM,MAAO,IAAK,KAAM,KACtDC,OAAQ,wBACRC,UAAW,CACP,OACA,QACA,UACA,UACA,QACA,MACA,KACA,MACA,SACA,SACA,MACA,eACA,OACA,SACA,UACA,aACA,aAEJC,UAAW,CACP,IACA,KACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,KACA,KACA,KACA,MACA,KACA,IACA,KACA,KACA,MACA,KACA,IACA,IACA,KACA,IACA,OACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,UAEJZ,SAAU,CACN,CAAEE,KAAM,IAAKC,MAAO,IAAKU,MAAO,yBAChC,CAAEX,KAAM,IAAKC,MAAO,IAAKU,MAAO,mBAChC,CAAEX,KAAM,IAAKC,MAAO,IAAKU,MAAO,qBAEpCC,MAAO,8BAEPC,OAAQ,uEACRC,QAAS,4CAETC,UAAW,CACPC,KAAM,CACF,CAAC,qBAAsB,UAAW,aAClC,CAAC,8BAA+B,CAAC,UAAW,CAAEL,MAAO,GAAIM,KAAM,eAC/D,CAAC,wBAAyB,UAAW,aAErC,CAAC,mBAAoB,WACrB,CAAC,4BAA6B,CAAC,UAAW,YAC1C,CAAC,sCAAuC,CAAC,GAAI,YAC7C,CAAC,MAAO,UAAW,UAEnB,CAAC,OAAQ,eAAgB,YACzB,CAAC,KAAM,eAAgB,YAEvB,CAAC,SAAU,eAAgB,aAC3B,CAAC,WAAY,eAAgB,aAC7B,CAAC,OAAQ,eAAgB,aACzB,CAAC,SAAU,eAAgB,aAC3B,CACI,aACA,CACIC,MAAO,CACH,WAAY,CAAEP,MAAO,OAAQM,KAAM,QACnC,WAAY,CAAEN,MAAO,OAAQM,KAAM,WAI/C,CACI,yBACA,CACIC,MAAO,CACH,SAAU,OACV,YAAa,UACb,aAAc,WACd,WAAY,kBAIxB,CACI,eACA,CACIA,MAAO,CACH,SAAU,OACV,YAAa,UACb,aAAc,WACd,WAAY,gBAIxB,CAAC,QAAS,OACV,CAAC,OAAQ,MAAO,UAChB,CAAC,UAAW,cAEZ,CAAEC,QAAS,eAEX,CAAC,mBAAoB,oBAErB,CAAC,aAAc,aACf,CACI,UACA,CACID,MAAO,CACH,cAAe,UACf,aAAc,cAI1B,CAAC,OAAQ,aAET,CAAC,mCAAoC,cACrC,CAAC,wBAAyB,gBAC1B,CAAC,qBAAsB,iBACvB,CAAC,gDAAiD,WAGtDE,SAAU,CACN,CAAC,oCAAqC,OAAQ,QAC9C,CAAC,8CAA+C,CAAC,OAAQ,YACzD,CAAC,kCAAmC,OAAQ,QAC5C,CAAC,GAAI,GAAI,SAGbC,IAAK,CACD,CAAC,oCAAqC,OAAQ,SAC9C,CAAC,kCAAmC,QACpC,CAAC,KAAM,WACP,CAAC,iBAAkB,CAAC,OAAQ,CAAEV,MAAO,UAAWM,KAAM,UACtD,CAAC,KAAM,OAAQ,QACf,CAAEE,QAAS,UAGfG,MAAO,CACH,CAAC,OAAQ,MAAO,UAChB,CAAC,KAAM,YAAa,UACpB,CAAC,KAAM,UAAW,QAClB,CAAEH,QAAS,UAGfI,MAAO,CACH,CAAC,MAAO,UAAW,UACnB,CAAC,KAAM,YAAa,UACpB,CAAC,KAAM,MAAO,QACd,CAAEJ,QAAS,UAGfK,MAAO,CACH,CAAC,OAAQ,MAAO,UAChB,CAAC,MAAO,UAAW,UACnB,CAAC,KAAM,YAAa,SACpB,CAAC,KAAM,YAAa,QACpB,CAAEL,QAAS,UAGfM,QAAS,CACL,CAAC,MAAO,WACR,CAAC,iBAAkB,UACnB,CAAC,aAAc,aACf,CAAC,MAAO,iBACR,CAAC,WAAY,eAAgB,SAEjCC,QAAS,CACL,CAAC,iBAAkB,UACnB,CAAC,aAAc,aACf,CAAC,MAAO,iBACR,CAAC,UAAW,UACZ,CAAC,aAAc,eAAgB,SAGnCC,SAAU,CACN,CAAC,MAAO,WACR,CAAC,SAAU,UACX,CAAC,MAAO,iBACR,CAAC,IAAK,eAAgB,SAE1BC,SAAU,CACN,CAAC,SAAU,UACX,CAAC,MAAO,iBACR,CAAC,UAAW,UACZ,CAAC,MAAO,eAAgB,SAG5BC,SAAU,CACN,CAAC,MAAO,WACR,CAAC,WAAY,UACb,CAAC,KAAM,GAAI,iBACX,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,eAAgB,SAE1BC,SAAU,CACN,CAAC,WAAY,UACb,CAAC,KAAM,GAAI,iBACX,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,UAAW,UACZ,CAAC,MAAO,eAAgB,SAG5BC,aAAc,CACV,CAAC,KAAM,CAAEpB,MAAO,GAAIqB,SAAU,2BAC9B,CAAC,eAAgB,cACjB,CAAC,GAAI,GAAI,SAGbC,sBAAuB,CAAC,CAAC,KAAM,GAAI,QAAS,CAAEd,QAAS,UAEvDe,WAAY,CACR,CAAC,aAAc,IACf,CAAC,KAAM,UAAW,kBAClB,CAAC,OAAQ,YAEbC,cAAe,CACX,CAAC,KAAM,UAAW,SAClB,CAAC,KAAM,UAAW,QAClB,CAAC,gBAAiB,WAClB,CAAC,SAAU","file":"static/js/30.c0502858.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ]\r\n};\r\nexport var language = {\r\n tokenPostfix: '.julia',\r\n keywords: [\r\n 'begin',\r\n 'while',\r\n 'if',\r\n 'for',\r\n 'try',\r\n 'return',\r\n 'break',\r\n 'continue',\r\n 'function',\r\n 'macro',\r\n 'quote',\r\n 'let',\r\n 'local',\r\n 'global',\r\n 'const',\r\n 'do',\r\n 'struct',\r\n 'module',\r\n 'baremodule',\r\n 'using',\r\n 'import',\r\n 'export',\r\n 'end',\r\n 'else',\r\n 'elseif',\r\n 'catch',\r\n 'finally',\r\n 'mutable',\r\n 'primitive',\r\n 'abstract',\r\n 'type',\r\n 'in',\r\n 'isa',\r\n 'where',\r\n 'new'\r\n ],\r\n types: [\r\n 'LinRange',\r\n 'LineNumberNode',\r\n 'LinearIndices',\r\n 'LoadError',\r\n 'MIME',\r\n 'Matrix',\r\n 'Method',\r\n 'MethodError',\r\n 'Missing',\r\n 'MissingException',\r\n 'Module',\r\n 'NTuple',\r\n 'NamedTuple',\r\n 'Nothing',\r\n 'Number',\r\n 'OrdinalRange',\r\n 'OutOfMemoryError',\r\n 'OverflowError',\r\n 'Pair',\r\n 'PartialQuickSort',\r\n 'PermutedDimsArray',\r\n 'Pipe',\r\n 'Ptr',\r\n 'QuoteNode',\r\n 'Rational',\r\n 'RawFD',\r\n 'ReadOnlyMemoryError',\r\n 'Real',\r\n 'ReentrantLock',\r\n 'Ref',\r\n 'Regex',\r\n 'RegexMatch',\r\n 'RoundingMode',\r\n 'SegmentationFault',\r\n 'Set',\r\n 'Signed',\r\n 'Some',\r\n 'StackOverflowError',\r\n 'StepRange',\r\n 'StepRangeLen',\r\n 'StridedArray',\r\n 'StridedMatrix',\r\n 'StridedVecOrMat',\r\n 'StridedVector',\r\n 'String',\r\n 'StringIndexError',\r\n 'SubArray',\r\n 'SubString',\r\n 'SubstitutionString',\r\n 'Symbol',\r\n 'SystemError',\r\n 'Task',\r\n 'Text',\r\n 'TextDisplay',\r\n 'Timer',\r\n 'Tuple',\r\n 'Type',\r\n 'TypeError',\r\n 'TypeVar',\r\n 'UInt',\r\n 'UInt128',\r\n 'UInt16',\r\n 'UInt32',\r\n 'UInt64',\r\n 'UInt8',\r\n 'UndefInitializer',\r\n 'AbstractArray',\r\n 'UndefKeywordError',\r\n 'AbstractChannel',\r\n 'UndefRefError',\r\n 'AbstractChar',\r\n 'UndefVarError',\r\n 'AbstractDict',\r\n 'Union',\r\n 'AbstractDisplay',\r\n 'UnionAll',\r\n 'AbstractFloat',\r\n 'UnitRange',\r\n 'AbstractIrrational',\r\n 'Unsigned',\r\n 'AbstractMatrix',\r\n 'AbstractRange',\r\n 'Val',\r\n 'AbstractSet',\r\n 'Vararg',\r\n 'AbstractString',\r\n 'VecElement',\r\n 'AbstractUnitRange',\r\n 'VecOrMat',\r\n 'AbstractVecOrMat',\r\n 'Vector',\r\n 'AbstractVector',\r\n 'VersionNumber',\r\n 'Any',\r\n 'WeakKeyDict',\r\n 'ArgumentError',\r\n 'WeakRef',\r\n 'Array',\r\n 'AssertionError',\r\n 'BigFloat',\r\n 'BigInt',\r\n 'BitArray',\r\n 'BitMatrix',\r\n 'BitSet',\r\n 'BitVector',\r\n 'Bool',\r\n 'BoundsError',\r\n 'CapturedException',\r\n 'CartesianIndex',\r\n 'CartesianIndices',\r\n 'Cchar',\r\n 'Cdouble',\r\n 'Cfloat',\r\n 'Channel',\r\n 'Char',\r\n 'Cint',\r\n 'Cintmax_t',\r\n 'Clong',\r\n 'Clonglong',\r\n 'Cmd',\r\n 'Colon',\r\n 'Complex',\r\n 'ComplexF16',\r\n 'ComplexF32',\r\n 'ComplexF64',\r\n 'CompositeException',\r\n 'Condition',\r\n 'Cptrdiff_t',\r\n 'Cshort',\r\n 'Csize_t',\r\n 'Cssize_t',\r\n 'Cstring',\r\n 'Cuchar',\r\n 'Cuint',\r\n 'Cuintmax_t',\r\n 'Culong',\r\n 'Culonglong',\r\n 'Cushort',\r\n 'Cvoid',\r\n 'Cwchar_t',\r\n 'Cwstring',\r\n 'DataType',\r\n 'DenseArray',\r\n 'DenseMatrix',\r\n 'DenseVecOrMat',\r\n 'DenseVector',\r\n 'Dict',\r\n 'DimensionMismatch',\r\n 'Dims',\r\n 'DivideError',\r\n 'DomainError',\r\n 'EOFError',\r\n 'Enum',\r\n 'ErrorException',\r\n 'Exception',\r\n 'ExponentialBackOff',\r\n 'Expr',\r\n 'Float16',\r\n 'Float32',\r\n 'Float64',\r\n 'Function',\r\n 'GlobalRef',\r\n 'HTML',\r\n 'IO',\r\n 'IOBuffer',\r\n 'IOContext',\r\n 'IOStream',\r\n 'IdDict',\r\n 'IndexCartesian',\r\n 'IndexLinear',\r\n 'IndexStyle',\r\n 'InexactError',\r\n 'InitError',\r\n 'Int',\r\n 'Int128',\r\n 'Int16',\r\n 'Int32',\r\n 'Int64',\r\n 'Int8',\r\n 'Integer',\r\n 'InterruptException',\r\n 'InvalidStateException',\r\n 'Irrational',\r\n 'KeyError'\r\n ],\r\n keywordops: ['<:', '>:', ':', '=>', '...', '.', '->', '?'],\r\n allops: /[^\\w\\d\\s()\\[\\]{}\"'#]+/,\r\n constants: [\r\n 'true',\r\n 'false',\r\n 'nothing',\r\n 'missing',\r\n 'undef',\r\n 'Inf',\r\n 'pi',\r\n 'NaN',\r\n 'π',\r\n 'ℯ',\r\n 'ans',\r\n 'PROGRAM_FILE',\r\n 'ARGS',\r\n 'C_NULL',\r\n 'VERSION',\r\n 'DEPOT_PATH',\r\n 'LOAD_PATH'\r\n ],\r\n operators: [\r\n '!',\r\n '!=',\r\n '!==',\r\n '%',\r\n '&',\r\n '*',\r\n '+',\r\n '-',\r\n '/',\r\n '//',\r\n '<',\r\n '<<',\r\n '<=',\r\n '==',\r\n '===',\r\n '=>',\r\n '>',\r\n '>=',\r\n '>>',\r\n '>>>',\r\n '\\\\',\r\n '^',\r\n '|',\r\n '|>',\r\n '~',\r\n '÷',\r\n '∈',\r\n '∉',\r\n '∋',\r\n '∌',\r\n '∘',\r\n '√',\r\n '∛',\r\n '∩',\r\n '∪',\r\n '≈',\r\n '≉',\r\n '≠',\r\n '≡',\r\n '≢',\r\n '≤',\r\n '≥',\r\n '⊆',\r\n '⊇',\r\n '⊈',\r\n '⊉',\r\n '⊊',\r\n '⊋',\r\n '⊻'\r\n ],\r\n brackets: [\r\n { open: '(', close: ')', token: 'delimiter.parenthesis' },\r\n { open: '{', close: '}', token: 'delimiter.curly' },\r\n { open: '[', close: ']', token: 'delimiter.square' }\r\n ],\r\n ident: /π|ℯ|\\b(?!\\d)\\w+\\b/,\r\n // escape sequences\r\n escape: /(?:[abefnrstv\\\\\"'\\n\\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,\r\n escapes: /\\\\(?:C\\-(@escape|.)|c(@escape|.)|@escape)/,\r\n // The main tokenizer for our languages\r\n tokenizer: {\r\n root: [\r\n [/(::)\\s*|\\b(isa)\\s+/, 'keyword', '@typeanno'],\r\n [/\\b(isa)(\\s*\\(@ident\\s*,\\s*)/, ['keyword', { token: '', next: '@typeanno' }]],\r\n [/\\b(type|struct)[ \\t]+/, 'keyword', '@typeanno'],\r\n // symbols\r\n [/^\\s*:@ident[!?]?/, 'metatag'],\r\n [/(return)(\\s*:@ident[!?]?)/, ['keyword', 'metatag']],\r\n [/(\\(|\\[|\\{|@allops)(\\s*:@ident[!?]?)/, ['', 'metatag']],\r\n [/:\\(/, 'metatag', '@quote'],\r\n // regular expressions\r\n [/r\"\"\"/, 'regexp.delim', '@tregexp'],\r\n [/r\"/, 'regexp.delim', '@sregexp'],\r\n // strings\r\n [/raw\"\"\"/, 'string.delim', '@rtstring'],\r\n [/[bv]?\"\"\"/, 'string.delim', '@dtstring'],\r\n [/raw\"/, 'string.delim', '@rsstring'],\r\n [/[bv]?\"/, 'string.delim', '@dsstring'],\r\n [\r\n /(@ident)\\{/,\r\n {\r\n cases: {\r\n '$1@types': { token: 'type', next: '@gen' },\r\n '@default': { token: 'type', next: '@gen' }\r\n }\r\n }\r\n ],\r\n [\r\n /@ident[!?'']?(?=\\.?\\()/,\r\n {\r\n cases: {\r\n '@types': 'type',\r\n '@keywords': 'keyword',\r\n '@constants': 'variable',\r\n '@default': 'keyword.flow'\r\n }\r\n }\r\n ],\r\n [\r\n /@ident[!?']?/,\r\n {\r\n cases: {\r\n '@types': 'type',\r\n '@keywords': 'keyword',\r\n '@constants': 'variable',\r\n '@default': 'identifier'\r\n }\r\n }\r\n ],\r\n [/\\$\\w+/, 'key'],\r\n [/\\$\\(/, 'key', '@paste'],\r\n [/@@ident/, 'annotation'],\r\n // whitespace\r\n { include: '@whitespace' },\r\n // characters\r\n [/'(?:@escapes|.)'/, 'string.character'],\r\n // delimiters and operators\r\n [/[()\\[\\]{}]/, '@brackets'],\r\n [\r\n /@allops/,\r\n {\r\n cases: {\r\n '@keywordops': 'keyword',\r\n '@operators': 'operator'\r\n }\r\n }\r\n ],\r\n [/[;,]/, 'delimiter'],\r\n // numbers\r\n [/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/, 'number.hex'],\r\n [/0[_oO][0-7](_?[0-7])*/, 'number.octal'],\r\n [/0[bB][01](_?[01])*/, 'number.binary'],\r\n [/[+\\-]?\\d+(\\.\\d+)?(im?|[eE][+\\-]?\\d+(\\.\\d+)?)?/, 'number']\r\n ],\r\n // type\r\n typeanno: [\r\n [/[a-zA-Z_]\\w*(?:\\.[a-zA-Z_]\\w*)*\\{/, 'type', '@gen'],\r\n [/([a-zA-Z_]\\w*(?:\\.[a-zA-Z_]\\w*)*)(\\s*<:\\s*)/, ['type', 'keyword']],\r\n [/[a-zA-Z_]\\w*(?:\\.[a-zA-Z_]\\w*)*/, 'type', '@pop'],\r\n ['', '', '@pop']\r\n ],\r\n // generic type\r\n gen: [\r\n [/[a-zA-Z_]\\w*(?:\\.[a-zA-Z_]\\w*)*\\{/, 'type', '@push'],\r\n [/[a-zA-Z_]\\w*(?:\\.[a-zA-Z_]\\w*)*/, 'type'],\r\n [/<:/, 'keyword'],\r\n [/(\\})(\\s*<:\\s*)/, ['type', { token: 'keyword', next: '@pop' }]],\r\n [/\\}/, 'type', '@pop'],\r\n { include: '@root' }\r\n ],\r\n // $(...)\r\n quote: [\r\n [/\\$\\(/, 'key', '@paste'],\r\n [/\\(/, '@brackets', '@paren'],\r\n [/\\)/, 'metatag', '@pop'],\r\n { include: '@root' }\r\n ],\r\n // :(...)\r\n paste: [\r\n [/:\\(/, 'metatag', '@quote'],\r\n [/\\(/, '@brackets', '@paren'],\r\n [/\\)/, 'key', '@pop'],\r\n { include: '@root' }\r\n ],\r\n // (...)\r\n paren: [\r\n [/\\$\\(/, 'key', '@paste'],\r\n [/:\\(/, 'metatag', '@quote'],\r\n [/\\(/, '@brackets', '@push'],\r\n [/\\)/, '@brackets', '@pop'],\r\n { include: '@root' }\r\n ],\r\n // r\"egex string\"\r\n sregexp: [\r\n [/^.*/, 'invalid'],\r\n [/[^\\\\\"()\\[\\]{}]/, 'regexp'],\r\n [/[()\\[\\]{}]/, '@brackets'],\r\n [/\\\\./, 'operator.scss'],\r\n [/\"[imsx]*/, 'regexp.delim', '@pop']\r\n ],\r\n tregexp: [\r\n [/[^\\\\\"()\\[\\]{}]/, 'regexp'],\r\n [/[()\\[\\]{}]/, '@brackets'],\r\n [/\\\\./, 'operator.scss'],\r\n [/\"(?!\"\")/, 'string'],\r\n [/\"\"\"[imsx]*/, 'regexp.delim', '@pop']\r\n ],\r\n // raw\"string\"\r\n rsstring: [\r\n [/^.*/, 'invalid'],\r\n [/[^\\\\\"]/, 'string'],\r\n [/\\\\./, 'string.escape'],\r\n [/\"/, 'string.delim', '@pop']\r\n ],\r\n rtstring: [\r\n [/[^\\\\\"]/, 'string'],\r\n [/\\\\./, 'string.escape'],\r\n [/\"(?!\"\")/, 'string'],\r\n [/\"\"\"/, 'string.delim', '@pop']\r\n ],\r\n // \"string\".\r\n dsstring: [\r\n [/^.*/, 'invalid'],\r\n [/[^\\\\\"\\$]/, 'string'],\r\n [/\\$/, '', '@interpolated'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"/, 'string.delim', '@pop']\r\n ],\r\n dtstring: [\r\n [/[^\\\\\"\\$]/, 'string'],\r\n [/\\$/, '', '@interpolated'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"(?!\"\")/, 'string'],\r\n [/\"\"\"/, 'string.delim', '@pop']\r\n ],\r\n // interpolated sequence\r\n interpolated: [\r\n [/\\(/, { token: '', switchTo: '@interpolated_compound' }],\r\n [/[a-zA-Z_]\\w*/, 'identifier'],\r\n ['', '', '@pop'] // just a $ is interpreted as a $\r\n ],\r\n // any code\r\n interpolated_compound: [[/\\)/, '', '@pop'], { include: '@root' }],\r\n // whitespace & comments\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/#=/, 'comment', '@multi_comment'],\r\n [/#.*$/, 'comment']\r\n ],\r\n multi_comment: [\r\n [/#=/, 'comment', '@push'],\r\n [/=#/, 'comment', '@pop'],\r\n [/=(?!#)|#(?!=)/, 'comment'],\r\n [/[^#=]+/, 'comment']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/31.fd45096d.chunk.js b/static/js/31.fd45096d.chunk.js new file mode 100644 index 0000000..122f3b8 --- /dev/null +++ b/static/js/31.fd45096d.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[31],{822:function(e,t,n){"use strict";n.r(t),n.d(t,"conf",(function(){return i})),n.d(t,"language",(function(){return o}));var i={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)|(?:))")}}},o={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"]]}}}}]); +//# sourceMappingURL=31.fd45096d.chunk.js.map \ No newline at end of file diff --git a/static/js/31.fd45096d.chunk.js.map b/static/js/31.fd45096d.chunk.js.map new file mode 100644 index 0000000..1ef26a1 --- /dev/null +++ b/static/js/31.fd45096d.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.js"],"names":["conf","wordPattern","comments","lineComment","blockComment","brackets","autoClosingPairs","open","close","surroundingPairs","folding","markers","start","RegExp","end","language","defaultToken","tokenPostfix","keywords","operators","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","tokenizer","root","cases","token","include","whitespace","comment","javadoc","string","multistring"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CAEdC,YAAa,qFACbC,SAAU,CACNC,YAAa,KACbC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBC,iBAAkB,CACd,CAAEF,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBE,QAAS,CACLC,QAAS,CACLC,MAAO,IAAIC,OAAO,sDAClBC,IAAK,IAAID,OAAO,2DAIjBE,EAAW,CAClBC,aAAc,GACdC,aAAc,MACdC,SAAU,CACN,KACA,MACA,QACA,QACA,WACA,KACA,OACA,QACA,MACA,MACA,KACA,KACA,MACA,YACA,KACA,MACA,OACA,SACA,UACA,SACA,QACA,OACA,QACA,OACA,MACA,YACA,MACA,MACA,OACA,QACA,KACA,QACA,cACA,WACA,UACA,QACA,OACA,UACA,MACA,SACA,OACA,QACA,WACA,WACA,MACA,WACA,QACA,SACA,WACA,aACA,YACA,QACA,cACA,OACA,OACA,SACA,WACA,QACA,QACA,SACA,QACA,WACA,WACA,WACA,OACA,WACA,MACA,WACA,UACA,YACA,SACA,UACA,SACA,UACA,UACA,SACA,QACA,MAEJC,UAAW,CACP,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,MACA,MACA,IACA,IACA,KACA,KACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,KACA,IACA,IACA,IACA,KAGJC,QAAS,wBACTC,QAAS,wEACTC,OAAQ,cACRC,YAAa,oBACbC,aAAc,oBACdC,UAAW,iCAEXC,UAAW,CACPC,KAAM,CAEF,CAAC,eAAgB,mBAEjB,CACI,mBACA,CACIC,MAAO,CACH,YAAa,CAAEC,MAAO,cACtB,WAAY,gBAKxB,CAAEC,QAAS,eAEX,CAAC,aAAc,aACf,CAAC,mBAAoB,aACrB,CACI,WACA,CACIF,MAAO,CACH,aAAc,YACd,WAAY,MAKxB,CAAC,yBAA0B,cAE3B,CAAC,yCAA0C,gBAC3C,CAAC,oDAAqD,gBACtD,CAAC,yBAA0B,cAC3B,CAAC,uBAAwB,gBACzB,CAAC,4BAA6B,iBAC9B,CAAC,kBAAmB,gBACpB,CAAC,iBAAkB,UAEnB,CAAC,QAAS,aAEV,CAAC,kBAAmB,kBACpB,CAAC,MAAO,SAAU,gBAClB,CAAC,IAAK,SAAU,WAEhB,CAAC,WAAY,UACb,CAAC,mBAAoB,CAAC,SAAU,gBAAiB,WACjD,CAAC,IAAK,mBAEVG,WAAY,CACR,CAAC,aAAc,IACf,CAAC,eAAgB,cAAe,YAChC,CAAC,OAAQ,UAAW,YACpB,CAAC,UAAW,YAEhBC,QAAS,CACL,CAAC,UAAW,WACZ,CAAC,OAAQ,UAAW,YACpB,CAAC,OAAQ,UAAW,QACpB,CAAC,QAAS,YAGdC,QAAS,CACL,CAAC,UAAW,eACZ,CAAC,OAAQ,cAAe,SACxB,CAAC,OAAQ,uBACT,CAAC,OAAQ,cAAe,QACxB,CAAC,QAAS,gBAEdC,OAAQ,CACJ,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,IAAK,SAAU,SAEpBC,YAAa,CACT,CAAC,UAAW,UACZ,CAAC,WAAY,iBACb,CAAC,MAAO,yBACR,CAAC,MAAO,SAAU,QAClB,CAAC,IAAK","file":"static/js/31.fd45096d.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n // the default separators except `@$`\r\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)/g,\r\n comments: {\r\n lineComment: '//',\r\n blockComment: ['/*', '*/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" },\r\n { open: '<', close: '>' }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*//\\\\s*(?:(?:#?region\\\\b)|(?:))')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.kt',\r\n keywords: [\r\n 'as',\r\n 'as?',\r\n 'break',\r\n 'class',\r\n 'continue',\r\n 'do',\r\n 'else',\r\n 'false',\r\n 'for',\r\n 'fun',\r\n 'if',\r\n 'in',\r\n '!in',\r\n 'interface',\r\n 'is',\r\n '!is',\r\n 'null',\r\n 'object',\r\n 'package',\r\n 'return',\r\n 'super',\r\n 'this',\r\n 'throw',\r\n 'true',\r\n 'try',\r\n 'typealias',\r\n 'val',\r\n 'var',\r\n 'when',\r\n 'while',\r\n 'by',\r\n 'catch',\r\n 'constructor',\r\n 'delegate',\r\n 'dynamic',\r\n 'field',\r\n 'file',\r\n 'finally',\r\n 'get',\r\n 'import',\r\n 'init',\r\n 'param',\r\n 'property',\r\n 'receiver',\r\n 'set',\r\n 'setparam',\r\n 'where',\r\n 'actual',\r\n 'abstract',\r\n 'annotation',\r\n 'companion',\r\n 'const',\r\n 'crossinline',\r\n 'data',\r\n 'enum',\r\n 'expect',\r\n 'external',\r\n 'final',\r\n 'infix',\r\n 'inline',\r\n 'inner',\r\n 'internal',\r\n 'lateinit',\r\n 'noinline',\r\n 'open',\r\n 'operator',\r\n 'out',\r\n 'override',\r\n 'private',\r\n 'protected',\r\n 'public',\r\n 'reified',\r\n 'sealed',\r\n 'suspend',\r\n 'tailrec',\r\n 'vararg',\r\n 'field',\r\n 'it'\r\n ],\r\n operators: [\r\n '+',\r\n '-',\r\n '*',\r\n '/',\r\n '%',\r\n '=',\r\n '+=',\r\n '-=',\r\n '*=',\r\n '/=',\r\n '%=',\r\n '++',\r\n '--',\r\n '&&',\r\n '||',\r\n '!',\r\n '==',\r\n '!=',\r\n '===',\r\n '!==',\r\n '>',\r\n '<',\r\n '<=',\r\n '>=',\r\n '[',\r\n ']',\r\n '!!',\r\n '?.',\r\n '?:',\r\n '::',\r\n '..',\r\n ':',\r\n '?',\r\n '->',\r\n '@',\r\n ';',\r\n '$',\r\n '_'\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>](?!@symbols)/, '@brackets'],\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'delimiter',\r\n '@default': ''\r\n }\r\n }\r\n ],\r\n // @ annotations.\r\n [/@\\s*[a-zA-Z_\\$][\\w\\$]*/, 'annotation'],\r\n // numbers\r\n [/(@digits)[eE]([\\-+]?(@digits))?[fFdD]?/, 'number.float'],\r\n [/(@digits)\\.(@digits)([eE][\\-+]?(@digits))?[fFdD]?/, 'number.float'],\r\n [/0[xX](@hexdigits)[Ll]?/, 'number.hex'],\r\n [/0(@octaldigits)[Ll]?/, 'number.octal'],\r\n [/0[bB](@binarydigits)[Ll]?/, 'number.binary'],\r\n [/(@digits)[fFdD]/, 'number.float'],\r\n [/(@digits)[lL]?/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter'],\r\n // strings\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'string.invalid'],\r\n [/\"\"\"/, 'string', '@multistring'],\r\n [/\"/, 'string', '@string'],\r\n // characters\r\n [/'[^\\\\']'/, 'string'],\r\n [/(')(@escapes)(')/, ['string', 'string.escape', 'string']],\r\n [/'/, 'string.invalid']\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, ''],\r\n [/\\/\\*\\*(?!\\/)/, 'comment.doc', '@javadoc'],\r\n [/\\/\\*/, 'comment', '@comment'],\r\n [/\\/\\/.*$/, 'comment']\r\n ],\r\n comment: [\r\n [/[^\\/*]+/, 'comment'],\r\n [/\\/\\*/, 'comment', '@comment'],\r\n [/\\*\\//, 'comment', '@pop'],\r\n [/[\\/*]/, 'comment']\r\n ],\r\n //Identical copy of comment above, except for the addition of .doc\r\n javadoc: [\r\n [/[^\\/*]+/, 'comment.doc'],\r\n [/\\/\\*/, 'comment.doc', '@push'],\r\n [/\\/\\*/, 'comment.doc.invalid'],\r\n [/\\*\\//, 'comment.doc', '@pop'],\r\n [/[\\/*]/, 'comment.doc']\r\n ],\r\n string: [\r\n [/[^\\\\\"]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"/, 'string', '@pop']\r\n ],\r\n multistring: [\r\n [/[^\\\\\"]+/, 'string'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'string.escape.invalid'],\r\n [/\"\"\"/, 'string', '@pop'],\r\n [/./, 'string']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/32.9e90179c.chunk.js b/static/js/32.9e90179c.chunk.js new file mode 100644 index 0000000..9d7667f --- /dev/null +++ b/static/js/32.9e90179c.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[32],{823:function(e,t,n){"use strict";n.r(t),n.d(t,"conf",(function(){return i})),n.d(t,"language",(function(){return r}));var i={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.*\\*\\/")}}},r={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"]]}}}}]); +//# sourceMappingURL=32.9e90179c.chunk.js.map \ No newline at end of file diff --git a/static/js/32.9e90179c.chunk.js.map b/static/js/32.9e90179c.chunk.js.map new file mode 100644 index 0000000..9c3b894 --- /dev/null +++ b/static/js/32.9e90179c.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/less/less.js"],"names":["conf","wordPattern","comments","blockComment","lineComment","brackets","autoClosingPairs","open","close","notIn","surroundingPairs","folding","markers","start","RegExp","end","language","defaultToken","tokenPostfix","identifier","identifierPlus","token","tokenizer","root","include","next","nestedJSBegin","nextEmbedded","nestedJSEnd","operators","keyword","urldeclaration","attribute","comment","numbers","units","strings","stringsEndDoubleQuote","stringsEndQuote","atRules"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,YAAa,iDACbC,SAAU,CACNC,aAAc,CAAC,KAAM,MACrBC,YAAa,MAEjBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,aAE/CC,iBAAkB,CACd,CAAEH,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBG,QAAS,CACLC,QAAS,CACLC,MAAO,IAAIC,OAAO,gDAClBC,IAAK,IAAID,OAAO,2CAIjBE,EAAW,CAClBC,aAAc,GACdC,aAAc,QACdC,WAAY,sHACZC,eAAgB,0HAChBf,SAAU,CACN,CAAEE,KAAM,IAAKC,MAAO,IAAKa,MAAO,mBAChC,CAAEd,KAAM,IAAKC,MAAO,IAAKa,MAAO,qBAChC,CAAEd,KAAM,IAAKC,MAAO,IAAKa,MAAO,yBAChC,CAAEd,KAAM,IAAKC,MAAO,IAAKa,MAAO,oBAEpCC,UAAW,CACPC,KAAM,CACF,CAAEC,QAAS,kBACX,CAAC,gBAAiB,IAClB,CAAEA,QAAS,aACX,CAAEA,QAAS,YACX,CAAEA,QAAS,YACX,CAAEA,QAAS,YACX,CAAC,yCAA0C,iBAAkB,cAC7D,CAAC,qBAAsB,CAAEH,MAAO,MAAOI,KAAM,oBAC7C,CAAC,eAAgB,aACjB,CAAC,QAAS,aACV,CAAC,mBAAoB,UACrB,CAAC,IAAK,OACN,CAAC,4BAA6B,YAAa,cAC3C,CAAC,qBAAsB,aACvB,CAAC,kBAAmB,OACpB,CAAED,QAAS,cACX,CAAC,4BAA6B,WAAY,cAC1C,CAAC,iBAAkB,YACnB,CAAC,IAAK,MAAO,aAEjBE,cAAe,CACX,CAAC,KAAM,sBACP,CACI,IACA,CACIL,MAAO,qBACPI,KAAM,eACNE,aAAc,qBAI1BC,YAAa,CACT,CACI,IACA,CACIP,MAAO,qBACPI,KAAM,OACNE,aAAc,UAI1BE,UAAW,CAAC,CAAC,6BAA8B,aAC3CC,QAAS,CACL,CACI,qPACA,YAGRC,eAAgB,CACZ,CAAEP,QAAS,YACX,CAAC,YAAa,UACd,CAAC,MAAO,CAAEH,MAAO,MAAOI,KAAM,UAElCO,UAAW,CACP,CAAER,QAAS,kBACX,CAAEA,QAAS,aACX,CAAEA,QAAS,YACX,CAAEA,QAAS,YACX,CAAEA,QAAS,YACX,CAAC,sBAAuB,kBAAmB,cAC3C,CAAC,IAAK,WAAY,QAClB,CAAC,cAAe,mBAChB,CAAEA,QAAS,cACX,CAAC,iBAAkB,YACnB,CAAC,SAAU,YAAa,QACxB,CAAC,gBAAiB,aAClB,CAAC,MAAO,YAAa,QACrB,CAAC,QAAS,aACV,CAAC,MAAO,IACR,CAAC,IAAK,oBAEVtB,SAAU,CACN,CAAC,SAAU,UAAW,YACtB,CAAC,YAAa,YAElB+B,QAAS,CACL,CAAC,SAAU,UAAW,QACtB,CAAC,IAAK,YAEVC,QAAS,CACL,CACI,mCACA,CAAEb,MAAO,yBAA0BI,KAAM,WAE7C,CAAC,wBAAyB,wBAE9BU,MAAO,CACH,CACI,uFACA,uBACA,SAGRC,QAAS,CACL,CAAC,MAAO,CAAEf,MAAO,mBAAoBI,KAAM,2BAC3C,CAAC,MAAO,CAAEJ,MAAO,mBAAoBI,KAAM,sBAE/CY,sBAAuB,CACnB,CAAC,QAAS,UACV,CAAC,IAAK,CAAEhB,MAAO,mBAAoBI,KAAM,YACzC,CAAC,IAAK,WAEVa,gBAAiB,CACb,CAAC,QAAS,UACV,CAAC,IAAK,CAAEjB,MAAO,mBAAoBI,KAAM,YACzC,CAAC,IAAK,WAEVc,QAAS,CACL,CAAEf,QAAS,aACX,CAAEA,QAAS,YACX,CAAC,OAAQ,aACT,CAAC,SAAU,YAAa,QACxB,CAAC,IAAK","file":"static/js/32.9e90179c.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n wordPattern: /(#?-?\\d*\\.\\d\\w*%?)|([@#!.:]?[\\w-?]+%?)|[@#!.]/g,\r\n comments: {\r\n blockComment: ['/*', '*/'],\r\n lineComment: '//'\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}', notIn: ['string', 'comment'] },\r\n { open: '[', close: ']', notIn: ['string', 'comment'] },\r\n { open: '(', close: ')', notIn: ['string', 'comment'] },\r\n { open: '\"', close: '\"', notIn: ['string', 'comment'] },\r\n { open: \"'\", close: \"'\", notIn: ['string', 'comment'] }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*\\\\/\\\\*\\\\s*#region\\\\b\\\\s*(.*?)\\\\s*\\\\*\\\\/'),\r\n end: new RegExp('^\\\\s*\\\\/\\\\*\\\\s*#endregion\\\\b.*\\\\*\\\\/')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.less',\r\n 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])))*',\r\n 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])))*',\r\n brackets: [\r\n { open: '{', close: '}', token: 'delimiter.curly' },\r\n { open: '[', close: ']', token: 'delimiter.bracket' },\r\n { open: '(', close: ')', token: 'delimiter.parenthesis' },\r\n { open: '<', close: '>', token: 'delimiter.angle' }\r\n ],\r\n tokenizer: {\r\n root: [\r\n { include: '@nestedJSBegin' },\r\n ['[ \\\\t\\\\r\\\\n]+', ''],\r\n { include: '@comments' },\r\n { include: '@keyword' },\r\n { include: '@strings' },\r\n { include: '@numbers' },\r\n ['[*_]?[a-zA-Z\\\\-\\\\s]+(?=:.*(;|(\\\\\\\\$)))', 'attribute.name', '@attribute'],\r\n ['url(\\\\-prefix)?\\\\(', { token: 'tag', next: '@urldeclaration' }],\r\n ['[{}()\\\\[\\\\]]', '@brackets'],\r\n ['[,:;]', 'delimiter'],\r\n ['#@identifierPlus', 'tag.id'],\r\n ['&', 'tag'],\r\n ['\\\\.@identifierPlus(?=\\\\()', 'tag.class', '@attribute'],\r\n ['\\\\.@identifierPlus', 'tag.class'],\r\n ['@identifierPlus', 'tag'],\r\n { include: '@operators' },\r\n ['@(@identifier(?=[:,\\\\)]))', 'variable', '@attribute'],\r\n ['@(@identifier)', 'variable'],\r\n ['@', 'key', '@atRules']\r\n ],\r\n nestedJSBegin: [\r\n ['``', 'delimiter.backtick'],\r\n [\r\n '`',\r\n {\r\n token: 'delimiter.backtick',\r\n next: '@nestedJSEnd',\r\n nextEmbedded: 'text/javascript'\r\n }\r\n ]\r\n ],\r\n nestedJSEnd: [\r\n [\r\n '`',\r\n {\r\n token: 'delimiter.backtick',\r\n next: '@pop',\r\n nextEmbedded: '@pop'\r\n }\r\n ]\r\n ],\r\n operators: [['[<>=\\\\+\\\\-\\\\*\\\\/\\\\^\\\\|\\\\~]', 'operator']],\r\n keyword: [\r\n [\r\n '(@[\\\\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',\r\n 'keyword'\r\n ]\r\n ],\r\n urldeclaration: [\r\n { include: '@strings' },\r\n ['[^)\\r\\n]+', 'string'],\r\n ['\\\\)', { token: 'tag', next: '@pop' }]\r\n ],\r\n attribute: [\r\n { include: '@nestedJSBegin' },\r\n { include: '@comments' },\r\n { include: '@strings' },\r\n { include: '@numbers' },\r\n { include: '@keyword' },\r\n ['[a-zA-Z\\\\-]+(?=\\\\()', 'attribute.value', '@attribute'],\r\n ['>', 'operator', '@pop'],\r\n ['@identifier', 'attribute.value'],\r\n { include: '@operators' },\r\n ['@(@identifier)', 'variable'],\r\n ['[)\\\\}]', '@brackets', '@pop'],\r\n ['[{}()\\\\[\\\\]>]', '@brackets'],\r\n ['[;]', 'delimiter', '@pop'],\r\n ['[,=:]', 'delimiter'],\r\n ['\\\\s', ''],\r\n ['.', 'attribute.value']\r\n ],\r\n comments: [\r\n ['\\\\/\\\\*', 'comment', '@comment'],\r\n ['\\\\/\\\\/+.*', 'comment']\r\n ],\r\n comment: [\r\n ['\\\\*\\\\/', 'comment', '@pop'],\r\n ['.', 'comment']\r\n ],\r\n numbers: [\r\n [\r\n '(\\\\d*\\\\.)?\\\\d+([eE][\\\\-+]?\\\\d+)?',\r\n { token: 'attribute.value.number', next: '@units' }\r\n ],\r\n ['#[0-9a-fA-F_]+(?!\\\\w)', 'attribute.value.hex']\r\n ],\r\n units: [\r\n [\r\n '(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?',\r\n 'attribute.value.unit',\r\n '@pop'\r\n ]\r\n ],\r\n strings: [\r\n ['~?\"', { token: 'string.delimiter', next: '@stringsEndDoubleQuote' }],\r\n [\"~?'\", { token: 'string.delimiter', next: '@stringsEndQuote' }]\r\n ],\r\n stringsEndDoubleQuote: [\r\n ['\\\\\\\\\"', 'string'],\r\n ['\"', { token: 'string.delimiter', next: '@popall' }],\r\n ['.', 'string']\r\n ],\r\n stringsEndQuote: [\r\n [\"\\\\\\\\'\", 'string'],\r\n [\"'\", { token: 'string.delimiter', next: '@popall' }],\r\n ['.', 'string']\r\n ],\r\n atRules: [\r\n { include: '@comments' },\r\n { include: '@strings' },\r\n ['[()]', 'delimiter'],\r\n ['[\\\\{;]', 'delimiter', '@pop'],\r\n ['.', 'key']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/33.dffb1041.chunk.js b/static/js/33.dffb1041.chunk.js new file mode 100644 index 0000000..f51c79a --- /dev/null +++ b/static/js/33.dffb1041.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[33],{824:function(e,t,i){"use strict";i.r(t),i.d(t,"conf",(function(){return o})),i.d(t,"language",(function(){return n}));var o={comments:{lineComment:"COMMENT"},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:"'"},{open:":",close:"."}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#region"),end:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#endregion")}}},n={tokenPostfix:".lexon",ignoreCase:!0,keywords:["lexon","lex","clause","terms","contracts","may","pay","pays","appoints","into","to"],typeKeywords:["amount","person","key","time","date","asset","text"],operators:["less","greater","equal","le","gt","or","and","add","added","subtract","subtracted","multiply","multiplied","times","divide","divided","is","be","certified"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d*\.\d*/,"number.semver"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"]],quoted_identifier:[[/[^\\"]+/,"identifier"],[/"/,{token:"identifier.quote",bracket:"@close",next:"@pop"}]],space_identifier_until_period:[[":","delimiter"],[" ",{token:"white",next:"@identifier_rest"}]],identifier_until_period:[{include:"@whitespace"},[":",{token:"delimiter",next:"@identifier_rest"}],[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],identifier_rest:[[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],semver:[{include:"@whitespace"},[":","delimiter"],[/\d*\.\d*\.\d*/,{token:"number.semver",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"]]}}}}]); +//# sourceMappingURL=33.dffb1041.chunk.js.map \ No newline at end of file diff --git a/static/js/33.dffb1041.chunk.js.map b/static/js/33.dffb1041.chunk.js.map new file mode 100644 index 0000000..c7ed9a6 --- /dev/null +++ b/static/js/33.dffb1041.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.js"],"names":["conf","comments","lineComment","brackets","autoClosingPairs","open","close","surroundingPairs","folding","markers","start","RegExp","end","language","tokenPostfix","ignoreCase","keywords","typeKeywords","operators","symbols","tokenizer","root","token","bracket","next","cases","include","quoted_identifier","space_identifier_until_period","identifier_until_period","identifier_rest","semver","whitespace"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,YAAa,WAGjBC,SAAU,CAAC,CAAC,IAAK,MACjBC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBC,iBAAkB,CACd,CAAEF,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,MAExBE,QAAS,CACLC,QAAS,CACLC,MAAO,IAAIC,OAAO,oCAClBC,IAAK,IAAID,OAAO,0CAIjBE,EAAW,CAGlBC,aAAc,SACdC,YAAY,EACZC,SAAU,CACN,QACA,MACA,SACA,QACA,YACA,MACA,MACA,OACA,WACA,OACA,MAEJC,aAAc,CAAC,SAAU,SAAU,MAAO,OAAQ,OAAQ,QAAS,QACnEC,UAAW,CACP,OACA,UACA,QACA,KACA,KACA,KACA,MACA,MACA,QACA,WACA,aACA,WACA,aACA,QACA,SACA,UACA,KACA,KACA,aAGJC,QAAS,wBAETC,UAAW,CACPC,KAAM,CAEF,CAAC,8BAA+B,CAAC,GAAI,YAErC,CACI,IACA,CACIC,MAAO,mBACPC,QAAS,QACTC,KAAM,uBAGd,CACI,OACA,CACIF,MAAO,UACPC,QAAS,QACTC,KAAM,6BAGd,CAAC,QAAS,CAAEF,MAAO,UAAWC,QAAS,QAASC,KAAM,YACtD,CACI,IACA,CACIF,MAAO,YACPC,QAAS,QACTC,KAAM,6BAId,CACI,gBACA,CACIC,MAAO,CACH,aAAc,WACd,gBAAiB,eACjB,YAAa,UACb,WAAY,gBAKxB,CAAEC,QAAS,eAEX,CAAC,aAAc,aACf,CAAC,mBAAoB,aACrB,CAAC,WAAY,aAEb,CAAC,gBAAiB,iBAClB,CAAC,2BAA4B,gBAC7B,CAAC,oBAAqB,cACtB,CAAC,MAAO,UAER,CAAC,QAAS,cAEdC,kBAAmB,CACf,CAAC,UAAW,cACZ,CAAC,IAAK,CAAEL,MAAO,mBAAoBC,QAAS,SAAUC,KAAM,UAEhEI,8BAA+B,CAC3B,CAAC,IAAK,aACN,CAAC,IAAK,CAAEN,MAAO,QAASE,KAAM,sBAElCK,wBAAyB,CACrB,CAAEH,QAAS,eACX,CAAC,IAAK,CAAEJ,MAAO,YAAaE,KAAM,qBAClC,CAAC,UAAW,cACZ,CAAC,KAAM,CAAEF,MAAO,YAAaC,QAAS,SAAUC,KAAM,UAE1DM,gBAAiB,CACb,CAAC,UAAW,cACZ,CAAC,KAAM,CAAER,MAAO,YAAaC,QAAS,SAAUC,KAAM,UAE1DO,OAAQ,CACJ,CAAEL,QAAS,eACX,CAAC,IAAK,aACN,CAAC,gBAAiB,CAAEJ,MAAO,gBAAiBC,QAAS,SAAUC,KAAM,UAEzEQ,WAAY,CAAC,CAAC,aAAc","file":"static/js/33.dffb1041.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n lineComment: 'COMMENT'\r\n // blockComment: ['COMMENT', '.'],\r\n },\r\n brackets: [['(', ')']],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '\"', close: '\"' },\r\n { open: ':', close: '.' }\r\n ],\r\n surroundingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '`', close: '`' },\r\n { open: '\"', close: '\"' },\r\n { open: \"'\", close: \"'\" },\r\n { open: ':', close: '.' }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*(::\\\\s*|COMMENT\\\\s+)#region'),\r\n end: new RegExp('^\\\\s*(::\\\\s*|COMMENT\\\\s+)#endregion')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n // Set defaultToken to invalid to see what you do not tokenize yet\r\n // defaultToken: 'invalid',\r\n tokenPostfix: '.lexon',\r\n ignoreCase: true,\r\n keywords: [\r\n 'lexon',\r\n 'lex',\r\n 'clause',\r\n 'terms',\r\n 'contracts',\r\n 'may',\r\n 'pay',\r\n 'pays',\r\n 'appoints',\r\n 'into',\r\n 'to'\r\n ],\r\n typeKeywords: ['amount', 'person', 'key', 'time', 'date', 'asset', 'text'],\r\n operators: [\r\n 'less',\r\n 'greater',\r\n 'equal',\r\n 'le',\r\n 'gt',\r\n 'or',\r\n 'and',\r\n 'add',\r\n 'added',\r\n 'subtract',\r\n 'subtracted',\r\n 'multiply',\r\n 'multiplied',\r\n 'times',\r\n 'divide',\r\n 'divided',\r\n 'is',\r\n 'be',\r\n 'certified'\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>](?!@symbols)/, '@brackets'],\r\n [/@symbols/, 'delimiter'],\r\n // numbers\r\n [/\\d*\\.\\d*\\.\\d*/, 'number.semver'],\r\n [/\\d*\\.\\d+([eE][\\-+]?\\d+)?/, 'number.float'],\r\n [/0[xX][0-9a-fA-F]+/, 'number.hex'],\r\n [/\\d+/, 'number'],\r\n // delimiter: after number because of .\\d floats\r\n [/[;,.]/, 'delimiter']\r\n ],\r\n quoted_identifier: [\r\n [/[^\\\\\"]+/, 'identifier'],\r\n [/\"/, { token: 'identifier.quote', bracket: '@close', next: '@pop' }]\r\n ],\r\n space_identifier_until_period: [\r\n [':', 'delimiter'],\r\n [' ', { token: 'white', next: '@identifier_rest' }]\r\n ],\r\n identifier_until_period: [\r\n { include: '@whitespace' },\r\n [':', { token: 'delimiter', next: '@identifier_rest' }],\r\n [/[^\\\\.]+/, 'identifier'],\r\n [/\\./, { token: 'delimiter', bracket: '@close', next: '@pop' }]\r\n ],\r\n identifier_rest: [\r\n [/[^\\\\.]+/, 'identifier'],\r\n [/\\./, { token: 'delimiter', bracket: '@close', next: '@pop' }]\r\n ],\r\n semver: [\r\n { include: '@whitespace' },\r\n [':', 'delimiter'],\r\n [/\\d*\\.\\d*\\.\\d*/, { token: 'number.semver', bracket: '@close', next: '@pop' }]\r\n ],\r\n whitespace: [[/[ \\t\\r\\n]+/, 'white']]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/34.ca8e1080.chunk.js b/static/js/34.ca8e1080.chunk.js new file mode 100644 index 0000000..f00ebfa --- /dev/null +++ b/static/js/34.ca8e1080.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[34],{825:function(e,n,o){"use strict";o.r(n),o.d(n,"conf",(function(){return t})),o.d(n,"language",(function(){return s}));var t={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:"'"}]},s={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:/[=>=',\r\n '<',\r\n '>',\r\n '=',\r\n ';',\r\n ':',\r\n ',',\r\n '.',\r\n '..',\r\n '...'\r\n ],\r\n // we include these common regular expressions\r\n symbols: /[=>"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}]},r={defaultToken:"",tokenPostfix:".m3",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["AND","ANY","ARRAY","AS","BEGIN","BITS","BRANDED","BY","CASE","CONST","DIV","DO","ELSE","ELSIF","END","EVAL","EXCEPT","EXCEPTION","EXIT","EXPORTS","FINALLY","FOR","FROM","GENERIC","IF","IMPORT","IN","INTERFACE","LOCK","LOOP","METHODS","MOD","MODULE","NOT","OBJECT","OF","OR","OVERRIDES","PROCEDURE","RAISE","RAISES","READONLY","RECORD","REF","REPEAT","RETURN","REVEAL","SET","THEN","TO","TRY","TYPE","TYPECASE","UNSAFE","UNTIL","UNTRACED","VALUE","VAR","WHILE","WITH"],reservedConstNames:["ABS","ADR","ADRSIZE","BITSIZE","BYTESIZE","CEILING","DEC","DISPOSE","FALSE","FIRST","FLOAT","FLOOR","INC","ISTYPE","LAST","LOOPHOLE","MAX","MIN","NARROW","NEW","NIL","NUMBER","ORD","ROUND","SUBARRAY","TRUE","TRUNC","TYPECODE","VAL"],reservedTypeNames:["ADDRESS","ANY","BOOLEAN","CARDINAL","CHAR","EXTENDED","INTEGER","LONGCARD","LONGINT","LONGREAL","MUTEX","NULL","REAL","REFANY","ROOT","TEXT"],operators:["+","-","*","/","&","^","."],relations:["=","#","<","<=",">",">=","<:",":"],delimiters:["|","..","=>",",",";",":="],symbols:/[>=<#.,:;+\-*/&^]+/,escapes:/\\(?:[\\fnrt"']|[0-7]{3})/,tokenizer:{root:[[/_\w*/,"invalid"],[/[a-zA-Z][a-zA-Z0-9_]*/,{cases:{"@keywords":{token:"keyword.$0"},"@reservedConstNames":{token:"constant.reserved.$0"},"@reservedTypeNames":{token:"type.reserved.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[0-9]+\.[0-9]+(?:[DdEeXx][\+\-]?[0-9]+)?/,"number.float"],[/[0-9]+(?:\_[0-9a-fA-F]+)?L?/,"number"],[/@symbols/,{cases:{"@operators":"operators","@relations":"operators","@delimiters":"delimiter","@default":"invalid"}}],[/'[^\\']'/,"string.char"],[/(')(@escapes)(')/,["string.char","string.escape","string.char"]],[/'/,"invalid"],[/"([^"\\]|\\.)*$/,"invalid"],[/"/,"string.text","@text"]],text:[[/[^\\"]+/,"string.text"],[/@escapes/,"string.escape"],[/\\./,"invalid"],[/"/,"string.text","@pop"]],comment:[[/\(\*/,"comment","@push"],[/\*\)/,"comment","@pop"],[/./,"comment"]],pragma:[[/<\*/,"keyword.pragma","@push"],[/\*>/,"keyword.pragma","@pop"],[/./,"keyword.pragma"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/<\*/,"keyword.pragma","@pragma"]]}}}}]); +//# sourceMappingURL=35.e8728aa9.chunk.js.map \ No newline at end of file diff --git a/static/js/35.e8728aa9.chunk.js.map b/static/js/35.e8728aa9.chunk.js.map new file mode 100644 index 0000000..857a483 --- /dev/null +++ b/static/js/35.e8728aa9.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../node_modules/monaco-editor/esm/vs/basic-languages/m3/m3.js"],"names":["conf","comments","blockComment","brackets","autoClosingPairs","open","close","notIn","language","defaultToken","tokenPostfix","token","keywords","reservedConstNames","reservedTypeNames","operators","relations","delimiters","symbols","escapes","tokenizer","root","cases","include","text","comment","pragma","whitespace"],"mappings":"6GAAA,qFAIO,IAAIA,EAAO,CACdC,SAAU,CACNC,aAAc,CAAC,KAAM,OAEzBC,SAAU,CACN,CAAC,IAAK,KACN,CAAC,IAAK,KACN,CAAC,IAAK,MAEVC,iBAAkB,CACd,CAAEC,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,IAAKC,MAAO,KACpB,CAAED,KAAM,KAAMC,MAAO,MACrB,CAAED,KAAM,KAAMC,MAAO,MACrB,CAAED,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,YAC3C,CAAEF,KAAM,IAAKC,MAAO,IAAKC,MAAO,CAAC,SAAU,cAGxCC,EAAW,CAClBC,aAAc,GACdC,aAAc,MACdP,SAAU,CACN,CAAEQ,MAAO,kBAAmBN,KAAM,IAAKC,MAAO,KAC9C,CAAEK,MAAO,wBAAyBN,KAAM,IAAKC,MAAO,KACpD,CAAEK,MAAO,mBAAoBN,KAAM,IAAKC,MAAO,MAEnDM,SAAU,CACN,MACA,MACA,QACA,KACA,QACA,OACA,UACA,KACA,OACA,QACA,MACA,KACA,OACA,QACA,MACA,OACA,SACA,YACA,OACA,UACA,UACA,MACA,OACA,UACA,KACA,SACA,KACA,YACA,OACA,OACA,UACA,MACA,SACA,MACA,SACA,KACA,KACA,YACA,YACA,QACA,SACA,WACA,SACA,MACA,SACA,SACA,SACA,MACA,OACA,KACA,MACA,OACA,WACA,SACA,QACA,WACA,QACA,MACA,QACA,QAEJC,mBAAoB,CAChB,MACA,MACA,UACA,UACA,WACA,UACA,MACA,UACA,QACA,QACA,QACA,QACA,MACA,SACA,OACA,WACA,MACA,MACA,SACA,MACA,MACA,SACA,MACA,QACA,WACA,OACA,QACA,WACA,OAEJC,kBAAmB,CACf,UACA,MACA,UACA,WACA,OACA,WACA,UACA,WACA,UACA,WACA,QACA,OACA,OACA,SACA,OACA,QAEJC,UAAW,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAC1CC,UAAW,CAAC,IAAK,IAAK,IAAK,KAAM,IAAK,KAAM,KAAM,KAClDC,WAAY,CAAC,IAAK,KAAM,KAAM,IAAK,IAAK,MACxCC,QAAS,qBACTC,QAAS,4BACTC,UAAW,CACPC,KAAM,CAEF,CAAC,OAAQ,WACT,CACI,wBACA,CACIC,MAAO,CACH,YAAa,CAAEX,MAAO,cACtB,sBAAuB,CAAEA,MAAO,wBAChC,qBAAsB,CAAEA,MAAO,oBAC/B,WAAY,gBAKxB,CAAEY,QAAS,eACX,CAAC,aAAc,aAEf,CAAC,2CAA4C,gBAC7C,CAAC,8BAA+B,UAEhC,CACI,WACA,CACID,MAAO,CACH,aAAc,YACd,aAAc,YACd,cAAe,YACf,WAAY,aAKxB,CAAC,WAAY,eACb,CAAC,mBAAoB,CAAC,cAAe,gBAAiB,gBACtD,CAAC,IAAK,WAEN,CAAC,kBAAmB,WACpB,CAAC,IAAK,cAAe,UAEzBE,KAAM,CACF,CAAC,UAAW,eACZ,CAAC,WAAY,iBACb,CAAC,MAAO,WACR,CAAC,IAAK,cAAe,SAEzBC,QAAS,CACL,CAAC,OAAQ,UAAW,SACpB,CAAC,OAAQ,UAAW,QACpB,CAAC,IAAK,YAEVC,OAAQ,CACJ,CAAC,MAAO,iBAAkB,SAC1B,CAAC,MAAO,iBAAkB,QAC1B,CAAC,IAAK,mBAEVC,WAAY,CACR,CAAC,aAAc,SACf,CAAC,OAAQ,UAAW,YACpB,CAAC,MAAO,iBAAkB","file":"static/js/35.e8728aa9.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport var conf = {\r\n comments: {\r\n blockComment: ['(*', '*)']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '[', close: ']' },\r\n { open: '{', close: '}' },\r\n { open: '(', close: ')' },\r\n { open: '(*', close: '*)' },\r\n { open: '<*', close: '*>' },\r\n { open: \"'\", close: \"'\", notIn: ['string', 'comment'] },\r\n { open: '\"', close: '\"', notIn: ['string', 'comment'] }\r\n ]\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.m3',\r\n brackets: [\r\n { token: 'delimiter.curly', open: '{', close: '}' },\r\n { token: 'delimiter.parenthesis', open: '(', close: ')' },\r\n { token: 'delimiter.square', open: '[', close: ']' }\r\n ],\r\n keywords: [\r\n 'AND',\r\n 'ANY',\r\n 'ARRAY',\r\n 'AS',\r\n 'BEGIN',\r\n 'BITS',\r\n 'BRANDED',\r\n 'BY',\r\n 'CASE',\r\n 'CONST',\r\n 'DIV',\r\n 'DO',\r\n 'ELSE',\r\n 'ELSIF',\r\n 'END',\r\n 'EVAL',\r\n 'EXCEPT',\r\n 'EXCEPTION',\r\n 'EXIT',\r\n 'EXPORTS',\r\n 'FINALLY',\r\n 'FOR',\r\n 'FROM',\r\n 'GENERIC',\r\n 'IF',\r\n 'IMPORT',\r\n 'IN',\r\n 'INTERFACE',\r\n 'LOCK',\r\n 'LOOP',\r\n 'METHODS',\r\n 'MOD',\r\n 'MODULE',\r\n 'NOT',\r\n 'OBJECT',\r\n 'OF',\r\n 'OR',\r\n 'OVERRIDES',\r\n 'PROCEDURE',\r\n 'RAISE',\r\n 'RAISES',\r\n 'READONLY',\r\n 'RECORD',\r\n 'REF',\r\n 'REPEAT',\r\n 'RETURN',\r\n 'REVEAL',\r\n 'SET',\r\n 'THEN',\r\n 'TO',\r\n 'TRY',\r\n 'TYPE',\r\n 'TYPECASE',\r\n 'UNSAFE',\r\n 'UNTIL',\r\n 'UNTRACED',\r\n 'VALUE',\r\n 'VAR',\r\n 'WHILE',\r\n 'WITH'\r\n ],\r\n reservedConstNames: [\r\n 'ABS',\r\n 'ADR',\r\n 'ADRSIZE',\r\n 'BITSIZE',\r\n 'BYTESIZE',\r\n 'CEILING',\r\n 'DEC',\r\n 'DISPOSE',\r\n 'FALSE',\r\n 'FIRST',\r\n 'FLOAT',\r\n 'FLOOR',\r\n 'INC',\r\n 'ISTYPE',\r\n 'LAST',\r\n 'LOOPHOLE',\r\n 'MAX',\r\n 'MIN',\r\n 'NARROW',\r\n 'NEW',\r\n 'NIL',\r\n 'NUMBER',\r\n 'ORD',\r\n 'ROUND',\r\n 'SUBARRAY',\r\n 'TRUE',\r\n 'TRUNC',\r\n 'TYPECODE',\r\n 'VAL'\r\n ],\r\n reservedTypeNames: [\r\n 'ADDRESS',\r\n 'ANY',\r\n 'BOOLEAN',\r\n 'CARDINAL',\r\n 'CHAR',\r\n 'EXTENDED',\r\n 'INTEGER',\r\n 'LONGCARD',\r\n 'LONGINT',\r\n 'LONGREAL',\r\n 'MUTEX',\r\n 'NULL',\r\n 'REAL',\r\n 'REFANY',\r\n 'ROOT',\r\n 'TEXT'\r\n ],\r\n operators: ['+', '-', '*', '/', '&', '^', '.'],\r\n relations: ['=', '#', '<', '<=', '>', '>=', '<:', ':'],\r\n delimiters: ['|', '..', '=>', ',', ';', ':='],\r\n symbols: /[>=<#.,:;+\\-*/&^]+/,\r\n escapes: /\\\\(?:[\\\\fnrt\"']|[0-7]{3})/,\r\n tokenizer: {\r\n root: [\r\n // Identifiers and keywords\r\n [/_\\w*/, 'invalid'],\r\n [\r\n /[a-zA-Z][a-zA-Z0-9_]*/,\r\n {\r\n cases: {\r\n '@keywords': { token: 'keyword.$0' },\r\n '@reservedConstNames': { token: 'constant.reserved.$0' },\r\n '@reservedTypeNames': { token: 'type.reserved.$0' },\r\n '@default': 'identifier'\r\n }\r\n }\r\n ],\r\n // Whitespace\r\n { include: '@whitespace' },\r\n [/[{}()\\[\\]]/, '@brackets'],\r\n // Integer- and real literals\r\n [/[0-9]+\\.[0-9]+(?:[DdEeXx][\\+\\-]?[0-9]+)?/, 'number.float'],\r\n [/[0-9]+(?:\\_[0-9a-fA-F]+)?L?/, 'number'],\r\n // Operators, relations, and delimiters\r\n [\r\n /@symbols/,\r\n {\r\n cases: {\r\n '@operators': 'operators',\r\n '@relations': 'operators',\r\n '@delimiters': 'delimiter',\r\n '@default': 'invalid'\r\n }\r\n }\r\n ],\r\n // Character literals\r\n [/'[^\\\\']'/, 'string.char'],\r\n [/(')(@escapes)(')/, ['string.char', 'string.escape', 'string.char']],\r\n [/'/, 'invalid'],\r\n // Text literals\r\n [/\"([^\"\\\\]|\\\\.)*$/, 'invalid'],\r\n [/\"/, 'string.text', '@text']\r\n ],\r\n text: [\r\n [/[^\\\\\"]+/, 'string.text'],\r\n [/@escapes/, 'string.escape'],\r\n [/\\\\./, 'invalid'],\r\n [/\"/, 'string.text', '@pop']\r\n ],\r\n comment: [\r\n [/\\(\\*/, 'comment', '@push'],\r\n [/\\*\\)/, 'comment', '@pop'],\r\n [/./, 'comment']\r\n ],\r\n pragma: [\r\n [/<\\*/, 'keyword.pragma', '@push'],\r\n [/\\*>/, 'keyword.pragma', '@pop'],\r\n [/./, 'keyword.pragma']\r\n ],\r\n whitespace: [\r\n [/[ \\t\\r\\n]+/, 'white'],\r\n [/\\(\\*/, 'comment', '@comment'],\r\n [/<\\*/, 'keyword.pragma', '@pragma']\r\n ]\r\n }\r\n};\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/36.02972db8.chunk.js b/static/js/36.02972db8.chunk.js new file mode 100644 index 0000000..85d71ef --- /dev/null +++ b/static/js/36.02972db8.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonpcode-pro"]=this["webpackJsonpcode-pro"]||[]).push([[36],{827:function(e,t,n){"use strict";n.r(t),n.d(t,"conf",(function(){return s})),n.d(t,"language",(function(){return o}));var s={comments:{blockComment:["\x3c!--","--\x3e"]},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")}}},o={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"],[/']\r\n },\r\n brackets: [\r\n ['{', '}'],\r\n ['[', ']'],\r\n ['(', ')']\r\n ],\r\n autoClosingPairs: [\r\n { open: '{', close: '}' },\r\n { open: '[', close: ']' },\r\n { open: '(', close: ')' },\r\n { open: '<', close: '>', notIn: ['string'] }\r\n ],\r\n surroundingPairs: [\r\n { open: '(', close: ')' },\r\n { open: '[', close: ']' },\r\n { open: '`', close: '`' }\r\n ],\r\n folding: {\r\n markers: {\r\n start: new RegExp('^\\\\s*'),\r\n end: new RegExp('^\\\\s*')\r\n }\r\n }\r\n};\r\nexport var language = {\r\n defaultToken: '',\r\n tokenPostfix: '.md',\r\n // escape codes\r\n control: /[\\\\`*_\\[\\]{}()#+\\-\\.!]/,\r\n noncontrol: /[^\\\\`*_\\[\\]{}()#+\\-\\.!]/,\r\n escapes: /\\\\(?:@control)/,\r\n // escape codes for javascript/CSS strings\r\n jsescapes: /\\\\(?:[btnfr\\\\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,\r\n // non matched elements\r\n empty: [\r\n 'area',\r\n 'base',\r\n 'basefont',\r\n 'br',\r\n 'col',\r\n 'frame',\r\n 'hr',\r\n 'img',\r\n 'input',\r\n 'isindex',\r\n 'link',\r\n 'meta',\r\n 'param'\r\n ],\r\n tokenizer: {\r\n root: [\r\n // markdown tables\r\n [/^\\s*\\|/, '@rematch', '@table_header'],\r\n // headers (with #)\r\n [\r\n /^(\\s{0,3})(#+)((?:[^\\\\#]|@escapes)+)((?:#+)?)/,\r\n ['white', 'keyword', 'keyword', 'keyword']\r\n ],\r\n // headers (with =)\r\n [/^\\s*(=+|\\-+)\\s*$/, 'keyword'],\r\n // headers (with ***)\r\n [/^\\s*((\\*[ ]?)+)\\s*$/, 'meta.separator'],\r\n // quote\r\n [/^\\s*>+/, 'comment'],\r\n // list (starting with * or number)\r\n [/^\\s*([\\*\\-+:]|\\d+\\.)\\s/, 'keyword'],\r\n // code block (4 spaces indent)\r\n [/^(\\t|[ ]{4})[^ ].*$/, 'string'],\r\n // code block (3 tilde)\r\n [/^\\s*~~~\\s*((?:\\w|[\\/\\-#])+)?\\s*$/, { token: 'string', next: '@codeblock' }],\r\n // github style code blocks (with backticks and language)\r\n [\r\n /^\\s*```\\s*((?:\\w|[\\/\\-#])+).*$/,\r\n { token: 'string', next: '@codeblockgh', nextEmbedded: '$1' }\r\n ],\r\n // github style code blocks (with backticks but no language)\r\n [/^\\s*```\\s*$/, { token: 'string', next: '@codeblock' }],\r\n // markup within lines\r\n { include: '@linecontent' }\r\n ],\r\n table_header: [\r\n { include: '@table_common' },\r\n [/[^\\|]+/, 'keyword.table.header'] // table header\r\n ],\r\n table_body: [{ include: '@table_common' }, { include: '@linecontent' }],\r\n table_common: [\r\n [/\\s*[\\-:]+\\s*/, { token: 'keyword', switchTo: 'table_body' }],\r\n [/^\\s*\\|/, 'keyword.table.left'],\r\n [/^\\s*[^\\|]/, '@rematch', '@pop'],\r\n [/^\\s*$/, '@rematch', '@pop'],\r\n [\r\n /\\|/,\r\n {\r\n cases: {\r\n '@eos': 'keyword.table.right',\r\n '@default': 'keyword.table.middle' // inner |\r\n }\r\n }\r\n ]\r\n ],\r\n codeblock: [\r\n [/^\\s*~~~\\s*$/, { token: 'string', next: '@pop' }],\r\n [/^\\s*```\\s*$/, { token: 'string', next: '@pop' }],\r\n [/.*$/, 'variable.source']\r\n ],\r\n // github style code blocks\r\n codeblockgh: [\r\n [/```\\s*$/, { token: 'variable.source', next: '@pop', nextEmbedded: '@pop' }],\r\n [/[^`]+/, 'variable.source']\r\n ],\r\n linecontent: [\r\n // escapes\r\n [/&\\w+;/, 'string.escape'],\r\n [/@escapes/, 'escape'],\r\n // various markup\r\n [/\\b__([^\\\\_]|@escapes|_(?!_))+__\\b/, 'strong'],\r\n [/\\*\\*([^\\\\*]|@escapes|\\*(?!\\*))+\\*\\*/, 'strong'],\r\n [/\\b_[^_]+_\\b/, 'emphasis'],\r\n [/\\*([^\\\\*]|@escapes)+\\*/, 'emphasis'],\r\n [/`([^\\\\`]|@escapes)+`/, 'variable'],\r\n // links\r\n [/\\{+[^}]+\\}+/, 'string.target'],\r\n [/(!?\\[)((?:[^\\]\\\\]|@escapes)*)(\\]\\([^\\)]+\\))/, ['string.link', '', 'string.link']],\r\n [/(!?\\[)((?:[^\\]\\\\]|@escapes)*)(\\])/, 'string.link'],\r\n // or html\r\n { include: 'html' }\r\n ],\r\n // Note: it is tempting to rather switch to the real HTML mode instead of building our own here\r\n // but currently there is a limitation in Monarch that prevents us from doing it: The opening\r\n // '<' would start the HTML mode, however there is no way to jump 1 character back to let the\r\n // HTML mode also tokenize the opening angle bracket. Thus, even though we could jump to HTML,\r\n // we cannot correctly tokenize it in that mode yet.\r\n html: [\r\n // html tags\r\n [/<(\\w+)\\/>/, 'tag'],\r\n [\r\n /<(\\w+)/,\r\n {\r\n cases: {\r\n '@empty': { token: 'tag', next: '@tag.$1' },\r\n '@default': { token: 'tag', next: '@tag.$1' }\r\n }\r\n }\r\n ],\r\n [/<\\/(\\w+)\\s*>/, { token: 'tag' }],\r\n [//, 'comment', '@pop'],\r\n [/$/);return null!==t&&(t[1]?t[1]:"next")}function pT(e,t){var n=t.prevNode&&"list"===t.prevNode.type,r="code"===e.type&&e.isIndented;return n&&r}function fT(e,t){var n=[" "].concat(t||[]);return new RegExp(n.map((function(e){return"\\".concat(e)})).join("|")).test(e)?"<".concat(e,">"):e}function hT(e,t,n){if(null==n&&(n=!0),!e)return"";if(n)return" "+hT(e,t,!1);if((e=e.replace(/\\(["')])/g,"$1")).includes('"')&&e.includes("'")&&!e.includes(")"))return"(".concat(e,")");var r=e.split("'").length-1,i=e.split('"').length-1,a=r>i?'"':i>r||t.singleQuote?"'":'"';return e=(e=e.replace(/\\/,"\\\\")).replace(new RegExp("(".concat(a,")"),"g"),"\\$1"),"".concat(a).concat(e).concat(a)}var gT={preprocess:_k,print:function(e,t,n){var r=e.getValue();if(function(e){var t=oT(e,["linkReference","imageReference"]);return t&&("linkReference"!==t.type||"full"!==t.referenceType)}(e))return Ak(Jk(t.originalText.slice(r.position.start.offset,r.position.end.offset),t).map((function(n){return"word"===n.type?n.value:""===n.value?"":sT(e,n.value,t)})));switch(r.type){case"front-matter":return t.originalText.slice(r.position.start.offset,r.position.end.offset);case"root":return 0===r.children.length?"":Ak([Vk(uT(e,t,n)),eT.has(lT(r).type)?"":Lk]);case"paragraph":return cT(e,t,n,{postprocessor:Mk});case"sentence":return cT(e,t,n);case"word":var i=r.value.replace(/\*/g,"\\$&").replace(new RegExp(["(^|".concat($k,")(_+)"),"(_+)(".concat($k,"|$)")].join("|"),"g"),(function(e,t,n,r,i){return(n?"".concat(t).concat(n):"".concat(r).concat(i)).replace(/_/g,"\\_")})),a=function(e,t,n){return"sentence"===e.type&&0===n},o=function(e,t,n){return Zk(e.children[n-1])};return i!==r.value&&(e.match(void 0,a,o)||e.match(void 0,a,(function(e,t,n){return"emphasis"===e.type&&0===n}),o))&&(i=i.replace(/^(\\?[*_])+/,(function(e){return e.replace(/\\/g,"")}))),i;case"whitespace":var s=e.getParentNode(),u=s.children.indexOf(r),c=s.children[u+1],l=c&&/^>|^([*+-]|#{1,6}|\d+[).])$/.test(c.value)?"never":t.proseWrap;return sT(e,r.value,{proseWrap:l});case"emphasis":var d;if(Zk(r.children[0]))d=t.originalText[r.position.start.offset];else{var p=e.getParentNode(),f=p.children.indexOf(r),h=p.children[f-1],g=p.children[f+1];d=h&&"sentence"===h.type&&h.children.length>0&&"word"===Ck(h.children).type&&!Ck(h.children).hasTrailingPunctuation||g&&"sentence"===g.type&&g.children.length>0&&"word"===g.children[0].type&&!g.children[0].hasLeadingPunctuation||oT(e,"emphasis")?"*":"_"}return Ak([d,cT(e,t,n),d]);case"strong":return Ak(["**",cT(e,t,n),"**"]);case"delete":return Ak(["~~",cT(e,t,n),"~~"]);case"inlineCode":var m=Sk(r.value,"`"),_="`".repeat(m||1),v=m&&!/^\s/.test(r.value)?" ":"";return Ak([_,v,r.value,v,_]);case"wikiLink":var y="";return y="preserve"===t.proseWrap?r.value:r.value.replace(/[\t\n]+/g," "),Ak(["[[",y,"]]"]);case"link":switch(t.originalText[r.position.start.offset]){case"<":var b="mailto:",D=r.url.startsWith(b)&&t.originalText.slice(r.position.start.offset+1,r.position.start.offset+1+b.length)!==b?r.url.slice(b.length):r.url;return Ak(["<",D,">"]);case"[":return Ak(["[",cT(e,t,n),"](",fT(r.url,")"),hT(r.title,t),")"]);default:return t.originalText.slice(r.position.start.offset,r.position.end.offset)}case"image":return Ak(["![",r.alt||"","](",fT(r.url,")"),hT(r.title,t),")"]);case"blockquote":return Ak(["> ",Bk("> ",cT(e,t,n))]);case"heading":return Ak(["#".repeat(r.depth)+" ",cT(e,t,n)]);case"code":if(r.isIndented){var E=" ".repeat(4);return Bk(E,Ak([E,Ak(Hk(r.value,Lk))]))}var C=t.__inJsTemplate?"~":"`",S=C.repeat(Math.max(3,xk(r.value,C)+1));return Ak([S,r.lang||"",r.meta?" "+r.meta:"",Lk,Ak(Hk(Gk(r,t.originalText),Lk)),Lk,S]);case"html":var x=e.getParentNode(),k="root"===x.type&&Ck(x.children)===r?r.value.trimEnd():r.value,T=/^$/.test(k);return Ak(Hk(k,T?Lk:Fk(Ik)));case"list":var w=iT(r,e.getParentNode()),A=Yk(r,t);return cT(e,t,n,{processor:function(e,i){var a=function(){var e=r.ordered?(0===i?r.start:A?1:r.start+i)+(w%2==0?". ":") "):w%2==0?"- ":"* ";return r.isAligned||r.hasIndentedCodeblock?function(e,t){var n=r();return e+" ".repeat(n>=4?0:n);function r(){var n=e.length%t.tabWidth;return 0===n?0:t.tabWidth-n}}(e,t):e}(),o=e.getValue();return 2===o.children.length&&"html"===o.children[1].type&&o.children[0].position.start.column!==o.children[1].position.start.column?Ak([a,rT(e,t,n,a)]):Ak([a,Bk(" ".repeat(a.length),rT(e,t,n,a))])}});case"thematicBreak":var O=aT(e,"list");return-1===O?"---":iT(e.getParentNode(O),e.getParentNode(O+1))%2==0?"***":"---";case"linkReference":return Ak(["[",cT(e,t,n),"]","full"===r.referenceType?Ak(["[",r.identifier,"]"]):"collapsed"===r.referenceType?"[]":""]);case"imageReference":switch(r.referenceType){case"full":return Ak(["![",r.alt||"","][",r.identifier,"]"]);default:return Ak(["![",r.alt,"]","collapsed"===r.referenceType?"[]":""])}case"definition":var N="always"===t.proseWrap?Nk:" ";return Uk(Ak([Ak(["[",r.identifier,"]:"]),jk(Ak([N,fT(r.url),null===r.title?"":Ak([N,hT(r.title,t,!1)])]))]));case"footnote":return Ak(["[^",cT(e,t,n),"]"]);case"footnoteReference":return Ak(["[^",r.identifier,"]"]);case"footnoteDefinition":var I=e.getParentNode().children[e.getName()+1],F=1===r.children.length&&"paragraph"===r.children[0].type&&("never"===t.proseWrap||"preserve"===t.proseWrap&&r.children[0].position.start.line===r.children[0].position.end.line);return Ak(["[^",r.identifier,"]: ",F?cT(e,t,n):Uk(Ak([Bk(" ".repeat(4),cT(e,t,n,{processor:function(e,t){return 0===t?Uk(Ak([Pk,e.call(n)])):e.call(n)}})),I&&"footnoteDefinition"===I.type?Pk:""]))]);case"table":return function(e,t,n){var r=Lk.parts[0],i=e.getValue(),a=[],o=e.map((function(e){return e.map((function(e,r){var i=zk(e.call(n),t).formatted,o=kk(i);return a[r]=Math.max(a[r]||3,o),{text:i,width:o}}),"children")}),"children"),s=c(!1);if("never"!==t.proseWrap)return Ak([wk,s]);var u=c(!0);return Ak([wk,Uk(Rk(u,s))]);function c(e){var t=[d(o[0],e),l(e)];return o.length>1&&t.push(Ok(r,o.slice(1).map((function(t){return d(t,e)})))),Ok(r,t)}function l(e){var t=a.map((function(t,n){var r=i.align[n],a="center"===r||"left"===r?":":"-",o="center"===r||"right"===r?":":"-",s=e?"-":"-".repeat(t-2);return"".concat(a).concat(s).concat(o)}));return"| ".concat(t.join(" | ")," |")}function d(e,t){var n=e.map((function(e,n){var r=e.text,o=e.width;if(t)return r;var s=a[n]-o,u=i.align[n],c=0;"right"===u?c=s:"center"===u&&(c=Math.floor(s/2));var l=s-c;return"".concat(" ".repeat(c)).concat(r).concat(" ".repeat(l))}));return"| ".concat(n.join(" | ")," |")}}(e,t,n);case"tableCell":return cT(e,t,n);case"break":return/\s/.test(t.originalText[r.position.start.offset])?Ak([" ",Fk(Ik)]):Ak(["\\",Lk]);case"liquidNode":return Ak(Hk(r.value,Lk));case"importExport":return Ak([r.value,Lk]);case"jsx":return r.value;case"math":return Ak(["$$",Lk,r.value?Ak([Ak(Hk(r.value,Lk)),Lk]):"","$$"]);case"inlineMath":return t.originalText.slice(Kk(r),qk(r));case"tableRow":case"listItem":default:throw new Error("Unknown markdown type ".concat(JSON.stringify(r.type)))}},embed:sk,massageAstNode:Ek,hasPrettierIgnore:function(e){var t=+e.getName();return 0!==t&&"next"===dT(e.getParentNode().children[t-1])},insertPragma:Wk},mT={proseWrap:KD.proseWrap,singleQuote:KD.singleQuote},_T={name:"Markdown",type:"prose",color:"#083fa1",aliases:["pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".markdown",".mdown",".mdwn",".mdx",".mkd",".mkdn",".mkdown",".ronn",".workbook"],filenames:["contents.lr"],tmScope:"source.gfm",languageId:222},vT={languages:[sc(_T,(function(e){return{since:"1.8.0",parsers:["markdown"],vscodeLanguageIds:["markdown"],filenames:e.filenames.concat(["README"]),extensions:e.extensions.filter((function(e){return".mdx"!==e}))}})),sc(_T,(function(){return{name:"MDX",since:"1.15.0",parsers:["mdx"],vscodeLanguageIds:["mdx"],filenames:[],extensions:[".mdx"]}}))],options:mT,printers:{mdast:gT},parsers:{get remark(){return{}.parsers.remark},get markdown(){return{}.parsers.remark},get mdx(){return{}.parsers.mdx}}},yT=Gt.isFrontMatterNode,bT=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan"]);function DT(e,t){return"text"===e.type||"comment"===e.type||yT(e)||"yaml"===e.type||"toml"===e.type?null:("attribute"===e.type&&delete t.value,void("docType"===e.type&&delete t.value))}DT.ignoredProperties=bT;var ET=DT,CT={"*":["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","slot","spellcheck","style","tabindex","title","translate"],a:["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],abbr:["title"],applet:["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],area:["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],base:["href","target"],basefont:["color","face","size"],bdo:["dir"],blockquote:["cite"],body:["alink","background","bgcolor","link","text","vlink"],br:["clear"],button:["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],canvas:["height","width"],caption:["align"],col:["align","char","charoff","span","valign","width"],colgroup:["align","char","charoff","span","valign","width"],data:["value"],del:["cite","datetime"],details:["open"],dfn:["title"],dialog:["open"],dir:["compact"],div:["align"],dl:["compact"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],font:["color","face","size"],form:["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],frame:["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],frameset:["cols","rows"],h1:["align"],h2:["align"],h3:["align"],h4:["align"],h5:["align"],h6:["align"],head:["profile"],hr:["align","noshade","size","width"],html:["manifest","version"],iframe:["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],img:["align","alt","border","crossorigin","decoding","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],input:["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value","width"],ins:["cite","datetime"],isindex:["prompt"],label:["accesskey","for","form"],legend:["accesskey","align"],li:["type","value"],link:["as","charset","color","crossorigin","disabled","href","hreflang","imagesizes","imagesrcset","integrity","media","nonce","referrerpolicy","rel","rev","sizes","target","title","type"],map:["name"],menu:["compact"],meta:["charset","content","http-equiv","name","scheme"],meter:["high","low","max","min","optimum","value"],object:["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","tabindex","type","typemustmatch","usemap","vspace","width"],ol:["compact","reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["for","form","name"],p:["align"],param:["name","type","value","valuetype"],pre:["width"],progress:["max","value"],q:["cite"],script:["async","charset","crossorigin","defer","integrity","language","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","autofocus","disabled","form","multiple","name","required","size","tabindex"],slot:["name"],source:["media","sizes","src","srcset","type"],style:["media","nonce","title","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],tbody:["align","char","charoff","valign"],td:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],textarea:["accesskey","autocomplete","autofocus","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","tabindex","wrap"],tfoot:["align","char","charoff","valign"],th:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],thead:["align","char","charoff","valign"],time:["datetime"],tr:["align","bgcolor","char","charoff","valign"],track:["default","kind","label","src","srclang"],ul:["compact","type"],video:["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"]},ST=Gt.inferParserByLanguage,xT=Gt.isFrontMatterNode,kT={CSS_DISPLAY_TAGS:{area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",fieldset:"block",button:"inline-block",details:"block",summary:"block",dialog:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},CSS_DISPLAY_DEFAULT:"inline",CSS_WHITE_SPACE_TAGS:{listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"},CSS_WHITE_SPACE_DEFAULT:"normal"},TT=kT.CSS_DISPLAY_TAGS,wT=kT.CSS_DISPLAY_DEFAULT,AT=kT.CSS_WHITE_SPACE_TAGS,OT=kT.CSS_WHITE_SPACE_DEFAULT,NT=RT(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]),IT=function(e,t){for(var n=Object.create(null),r=0,i=Object.keys(e);re.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function qT(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function GT(e){var t=e.attrMap,n=t.type,r=t.lang;return"module"===n||"text/javascript"===n||"text/babel"===n||"application/javascript"===n||"jsx"===r?"babel":"application/x-typescript"===n||"ts"===r||"tsx"===r?"typescript":"text/markdown"===n?"markdown":"text/html"===n?"html":n&&(n.endsWith("json")||n.endsWith("importmap"))?"json":"text/x-handlebars-template"===n?"glimmer":void 0}function YT(e){return"block"===e||"list-item"===e||e.startsWith("table")}function JT(e){return QT(e).startsWith("pre")}function $T(e){return"element"===e.type&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}function QT(e){return"element"===e.type&&(!e.namespace||$T(e))&&AT[e.name]||OT}var XT=new Set(["template","style","script"]);function ZT(e,t){return ew(e,t)&&!XT.has(e.fullName)}function ew(e,t){return"vue"===t.parser&&"element"===e.type&&"root"===e.parent.type&&"html"!==e.fullName.toLowerCase()}function tw(e,t){return ew(e,t)&&(ZT(e,t)||e.attrMap.lang&&"html"!==e.attrMap.lang)}var nw={HTML_ELEMENT_ATTRIBUTES:IT,HTML_TAGS:NT,htmlTrim:function(e){return function(e){return e.replace(/^[\t\n\f\r ]+/,"")}(LT(e))},htmlTrimPreserveIndentation:function(e){return function(e){return e.replace(/^[\t\f\r ]*?\n/g,"")}(LT(e))},splitByHtmlWhitespace:function(e){return e.split(/[\t\n\f\r ]+/)},hasHtmlWhitespace:function(e){return/[\t\n\f\r ]/.test(e)},getLeadingAndTrailingHtmlWhitespace:function(e){var t=e.match(/^([\t\n\f\r ]*)([\S\s]*?)([\t\n\f\r ]*)$/),n=p(t,4),r=n[1],i=n[2];return{leadingWhitespace:r,trailingWhitespace:n[3],text:i}},canHaveInterpolation:function(e){return e.children&&!jT(e)},countChars:function(e,t){for(var n=0,r=0;r=0;r--){var i=e.stack[r];i&&"object"==typeof i&&!Array.isArray(i)&&t(i)&&n++}return n},dedentString:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){var t,n=1/0,r=c(e.split("\n"));try{for(r.s();!(t=r.n()).done;){var i=t.value;if(0!==i.length){if(!FT.has(i[0]))return 0;var a=PT(i).length;i.length!==a&&a=t.$TAB&&e<=t.$SPACE||e==t.$NBSP},t.isDigit=n,t.isAsciiLetter=function(e){return e>=t.$a&&e<=t.$z||e>=t.$A&&e<=t.$Z},t.isAsciiHexDigit=function(e){return e>=t.$a&&e<=t.$f||e>=t.$A&&e<=t.$F||n(e)},t.isNewLine=function(e){return e===t.$LF||e===t.$CR},t.isOctalDigit=function(e){return t.$0<=e&&e<=t.$7}})),iw=$e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n,r){f(this,e),this.filePath=t,this.name=n,this.members=r}return h(e,[{key:"assertNoMembers",value:function(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got ".concat(JSON.stringify(this),"."))}}]),e}();t.StaticSymbol=n,t.StaticSymbolCache=function(){function e(){f(this,e),this.cache=new Map}return h(e,[{key:"get",value:function(e,t,r){var i=(r=r||[]).length?".".concat(r.join(".")):"",a='"'.concat(e,'".').concat(t).concat(i),o=this.cache.get(a);return o||(o=new n(e,t,r),this.cache.set(a,o)),o}}]),e}()})),aw=$e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=/-+([a-z0-9])/g;function r(e,t,n){var r=e.indexOf(t);return-1==r?n:[e.slice(0,r).trim(),e.slice(r+1).trim()]}function i(e,t,n){return Array.isArray(e)?t.visitArray(e,n):"object"==typeof(r=e)&&null!==r&&Object.getPrototypeOf(r)===s?t.visitStringMap(e,n):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?t.visitPrimitive(e,n):t.visitOther(e,n);var r}t.dashCaseToCamelCase=function(e){return e.replace(n,(function(){for(var e=arguments.length,t=new Array(e),n=0;n=55296&&r<=56319&&e.length>n+1){var i=e.charCodeAt(n+1);i>=56320&&i<=57343&&(n++,r=(r-55296<<10)+i-56320+65536)}r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(r>>6&31|192,63&r|128):r<=65535?t+=String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128):r<=2097151&&(t+=String.fromCharCode(r>>18&7|240,r>>12&63|128,r>>6&63|128,63&r|128))}return t},t.stringify=function e(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(e).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);if(!t.toString)return"object";var n=t.toString();if(null==n)return""+n;var r=n.indexOf("\n");return-1===r?n:n.substring(0,r)},t.resolveForwardRef=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e},t.isPromise=u,t.Version=function(){function e(t){f(this,e),this.full=t;var n=t.split(".");this.major=n[0],this.minor=n[1],this.patch=n.slice(2).join(".")}return e}();var c="undefined"!=typeof window&&window,l="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,d=void 0!==Je&&Je||c||l;t.global=d})),ow=$e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function r(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=r;var i,a=0;function o(e){if(!e||!e.reference)return null;var t=e.reference;if(t instanceof iw.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;var n=aw.stringify(t);return n.indexOf("(")>=0?(n="anonymous_".concat(a++),t.__anonymousType=n):n=r(n),n}t.identifierName=o,t.identifierModuleUrl=function(e){var t=e.reference;return t instanceof iw.StaticSymbol?t.filePath:"./".concat(aw.stringify(t))},t.viewClassName=function(e,t){return"View_".concat(o({reference:e}),"_").concat(t)},t.rendererTypeName=function(e){return"RenderType_".concat(o({reference:e}))},t.hostViewClassName=function(e){return"HostView_".concat(o({reference:e}))},t.componentFactoryName=function(e){return"".concat(o({reference:e}),"NgFactory")},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(i=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?r(e.value):o(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value},t.CompileStylesheetMetadata=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.moduleUrl,r=t.styles,i=t.styleUrls;f(this,e),this.moduleUrl=n||null,this.styles=u(r),this.styleUrls=u(i)}return e}(),t.CompileTemplateMetadata=function(){function e(t){var n=t.encapsulation,r=t.template,i=t.templateUrl,a=t.htmlAst,o=t.styles,s=t.styleUrls,l=t.externalStylesheets,d=t.animations,p=t.ngContentSelectors,h=t.interpolation,g=t.isInline,m=t.preserveWhitespaces;if(f(this,e),this.encapsulation=n,this.template=r,this.templateUrl=i,this.htmlAst=a,this.styles=u(o),this.styleUrls=u(s),this.externalStylesheets=u(l),this.animations=d?c(d):[],this.ngContentSelectors=p||[],h&&2!=h.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=h,this.isInline=g,this.preserveWhitespaces=m}return h(e,[{key:"toSummary",value:function(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}}]),e}();var s=function(){function e(t){var n=t.isHost,r=t.type,i=t.isComponent,a=t.selector,o=t.exportAs,s=t.changeDetection,c=t.inputs,l=t.outputs,d=t.hostListeners,p=t.hostProperties,h=t.hostAttributes,g=t.providers,m=t.viewProviders,_=t.queries,v=t.guards,y=t.viewQueries,b=t.entryComponents,D=t.template,E=t.componentViewType,C=t.rendererType,S=t.componentFactory;f(this,e),this.isHost=!!n,this.type=r,this.isComponent=i,this.selector=a,this.exportAs=o,this.changeDetection=s,this.inputs=c,this.outputs=l,this.hostListeners=d,this.hostProperties=p,this.hostAttributes=h,this.providers=u(g),this.viewProviders=u(m),this.queries=u(_),this.guards=v,this.viewQueries=u(y),this.entryComponents=u(b),this.template=D,this.componentViewType=E,this.rendererType=C,this.componentFactory=S}return h(e,null,[{key:"create",value:function(t){var r=t.isHost,i=t.type,a=t.isComponent,o=t.selector,s=t.exportAs,u=t.changeDetection,c=t.inputs,l=t.outputs,d=t.host,p=t.providers,f=t.viewProviders,h=t.queries,g=t.guards,m=t.viewQueries,_=t.entryComponents,v=t.template,y=t.componentViewType,b=t.rendererType,D=t.componentFactory,E={},C={},S={};null!=d&&Object.keys(d).forEach((function(e){var t=d[e],r=e.match(n);null===r?S[e]=t:null!=r[1]?C[r[1]]=t:null!=r[2]&&(E[r[2]]=t)}));var x={};null!=c&&c.forEach((function(e){var t=aw.splitAtColon(e,[e,e]);x[t[0]]=t[1]}));var k={};return null!=l&&l.forEach((function(e){var t=aw.splitAtColon(e,[e,e]);k[t[0]]=t[1]})),new e({isHost:r,type:i,isComponent:!!a,selector:o,exportAs:s,changeDetection:u,inputs:x,outputs:k,hostListeners:E,hostProperties:C,hostAttributes:S,providers:p,viewProviders:f,queries:h,guards:g,viewQueries:m,entryComponents:_,template:v,componentViewType:y,rendererType:b,componentFactory:D})}}]),h(e,[{key:"toSummary",value:function(){return{summaryKind:i.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}}}]),e}();function u(e){return e||[]}function c(e){return e.reduce((function(e,t){var n=Array.isArray(t)?c(t):t;return e.concat(n)}),[])}function l(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}t.CompileDirectiveMetadata=s,t.CompilePipeMetadata=function(){function e(t){var n=t.type,r=t.name,i=t.pure;f(this,e),this.type=n,this.name=r,this.pure=!!i}return h(e,[{key:"toSummary",value:function(){return{summaryKind:i.Pipe,type:this.type,name:this.name,pure:this.pure}}}]),e}(),t.CompileShallowModuleMetadata=function(){function e(){f(this,e)}return e}(),t.CompileNgModuleMetadata=function(){function e(t){var n=t.type,r=t.providers,i=t.declaredDirectives,a=t.exportedDirectives,o=t.declaredPipes,s=t.exportedPipes,c=t.entryComponents,l=t.bootstrapComponents,d=t.importedModules,p=t.exportedModules,h=t.schemas,g=t.transitiveModule,m=t.id;f(this,e),this.type=n||null,this.declaredDirectives=u(i),this.exportedDirectives=u(a),this.declaredPipes=u(o),this.exportedPipes=u(s),this.providers=u(r),this.entryComponents=u(c),this.bootstrapComponents=u(l),this.importedModules=u(d),this.exportedModules=u(p),this.schemas=u(h),this.id=m||null,this.transitiveModule=g||null}return h(e,[{key:"toSummary",value:function(){var e=this.transitiveModule;return{summaryKind:i.NgModule,type:this.type,entryComponents:e.entryComponents,providers:e.providers,modules:e.modules,exportedDirectives:e.exportedDirectives,exportedPipes:e.exportedPipes}}}]),e}(),t.TransitiveCompileNgModuleMetadata=function(){function e(){f(this,e),this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}return h(e,[{key:"addProvider",value:function(e,t){this.providers.push({provider:e,module:t})}},{key:"addDirective",value:function(e){this.directivesSet.has(e.reference)||(this.directivesSet.add(e.reference),this.directives.push(e))}},{key:"addExportedDirective",value:function(e){this.exportedDirectivesSet.has(e.reference)||(this.exportedDirectivesSet.add(e.reference),this.exportedDirectives.push(e))}},{key:"addPipe",value:function(e){this.pipesSet.has(e.reference)||(this.pipesSet.add(e.reference),this.pipes.push(e))}},{key:"addExportedPipe",value:function(e){this.exportedPipesSet.has(e.reference)||(this.exportedPipesSet.add(e.reference),this.exportedPipes.push(e))}},{key:"addModule",value:function(e){this.modulesSet.has(e.reference)||(this.modulesSet.add(e.reference),this.modules.push(e))}},{key:"addEntryComponent",value:function(e){this.entryComponentsSet.has(e.componentType)||(this.entryComponentsSet.add(e.componentType),this.entryComponents.push(e))}}]),e}(),t.ProviderMeta=function(){function e(t,n){var r=n.useClass,i=n.useValue,a=n.useExisting,o=n.useFactory,s=n.deps,u=n.multi;f(this,e),this.token=t,this.useClass=r||null,this.useValue=i,this.useExisting=a,this.useFactory=o||null,this.dependencies=s||null,this.multi=!!u}return e}(),t.flatten=c,t.templateSourceUrl=function(e,t,n){var r;return r=n.isInline?t.type.reference instanceof iw.StaticSymbol?"".concat(t.type.reference.filePath,".").concat(t.type.reference.name,".html"):"".concat(o(e),"/").concat(o(t.type),".html"):n.templateUrl,t.type.reference instanceof iw.StaticSymbol?r:l(r)},t.sharedStylesheetJitUrl=function(e,t){var n=e.moduleUrl.split(/\/\\/g),r=n[n.length-1];return l("css/".concat(t).concat(r,".ngstyle.js"))},t.ngModuleJitUrl=function(e){return l("".concat(o(e.type),"/module.ngfactory.js"))},t.templateJitUrl=function(e,t){return l("".concat(o(e),"/").concat(o(t.type),".ngfactory.js"))}})),sw=$e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n,r,i){f(this,e),this.file=t,this.offset=n,this.line=r,this.col=i}return h(e,[{key:"toString",value:function(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url}},{key:"moveBy",value:function(t){for(var n=this.file.content,r=n.length,i=this.offset,a=this.line,o=this.col;i>0&&t<0;)if(i--,t++,n.charCodeAt(i)==rw.$LF){a--;var s=n.substr(0,i-1).lastIndexOf(String.fromCharCode(rw.$LF));o=s>0?i-s:i}else o--;for(;i0;){var u=n.charCodeAt(i);i++,t--,u==rw.$LF?(a++,o=0):o++}return new e(this.file,i,a,o)}},{key:"getContext",value:function(e,t){var n=this.file.content,r=this.offset;if(null!=r){r>n.length-1&&(r=n.length-1);for(var i=r,a=0,o=0;a0&&(a++,"\n"!=n[--r]||++o!=t););for(a=0,o=0;a2&&void 0!==arguments[2]?arguments[2]:null;f(this,e),this.start=t,this.end=n,this.details=r}return h(e,[{key:"toString",value:function(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}]),e}();t.ParseSourceSpan=a,t.EMPTY_PARSE_LOCATION=new n(new r("",""),0,0,0),t.EMPTY_SOURCE_SPAN=new a(t.EMPTY_PARSE_LOCATION,t.EMPTY_PARSE_LOCATION),function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(i=t.ParseErrorLevel||(t.ParseErrorLevel={})),t.ParseError=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.ERROR;f(this,e),this.span=t,this.msg=n,this.level=r}return h(e,[{key:"contextualMessage",value:function(){var e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(i[this.level]," ->]").concat(e.after,'")'):this.msg}},{key:"toString",value:function(){var e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e)}}]),e}(),t.typeSourceSpan=function(e,t){var i=ow.identifierModuleUrl(t),o=null!=i?"in ".concat(e," ").concat(ow.identifierName(t)," in ").concat(i):"in ".concat(e," ").concat(ow.identifierName(t)),s=new r("",o);return new a(new n(s,-1,-1,-1),new n(s,-1,-1,-1))},t.r3JitTypeSourceSpan=function(e,t,i){var o="in ".concat(e," ").concat(t," in ").concat(i),s=new r("",o);return new a(new n(s,-1,-1,-1),new n(s,-1,-1,-1))}})).ParseSourceSpan,uw=nw.htmlTrim,cw=nw.getLeadingAndTrailingHtmlWhitespace,lw=nw.hasHtmlWhitespace,dw=nw.canHaveInterpolation,pw=nw.getNodeCssStyleDisplay,fw=nw.isDanglingSpaceSensitiveNode,hw=nw.isIndentationSensitiveNode,gw=nw.isLeadingSpaceSensitiveNode,mw=nw.isTrailingSpaceSensitiveNode,_w=nw.isWhitespaceSensitiveNode,vw=[function(e){return e.map((function(e){if("element"===e.type&&e.tagDefinition.ignoreFirstLf&&0!==e.children.length&&"text"===e.children[0].type&&"\n"===e.children[0].value[0]){var t=r(e.children),n=t[0],i=t.slice(1);return e.clone({children:1===n.value.length?i:[n.clone({value:n.value.slice(1)})].concat(l(i))})}return e}))},function(e){var t=function(e){return"element"===e.type&&e.prev&&"ieConditionalStartComment"===e.prev.type&&e.prev.sourceSpan.end.offset===e.startSourceSpan.start.offset&&e.firstChild&&"ieConditionalEndComment"===e.firstChild.type&&e.firstChild.sourceSpan.start.offset===e.startSourceSpan.end.offset};return e.map((function(e){if(e.children){var n=e.children.map(t);if(n.some(Boolean)){for(var r=[],i=0;i")}))},function(e,t){if("html"===t.parser)return e;var n=/{{([\S\s]+?)}}/g;return e.map((function(e){if(!dw(e))return e;var t,r=[],i=c(e.children);try{for(i.s();!(t=i.n()).done;){var a=t.value;if("text"===a.type)for(var o=a.sourceSpan.start,s=null,u=a.value.split(n),l=0;l$/.test(t.originalText.slice(e.endSourceSpan.start.offset,e.endSourceSpan.end.offset))})}))},function(e,t){return e.map((function(e){return e.children?0===e.children.length?e.clone({isDanglingSpaceSensitive:fw(e)}):e.clone({children:e.children.map((function(e){return Object.assign({},e,{isLeadingSpaceSensitive:gw(e,t),isTrailingSpaceSensitive:mw(e,t)})})).map((function(e,t,n){return Object.assign({},e,{isLeadingSpaceSensitive:(0===t||n[t-1].isTrailingSpaceSensitive)&&e.isLeadingSpaceSensitive,isTrailingSpaceSensitive:(t===n.length-1||n[t+1].isLeadingSpaceSensitive)&&e.isTrailingSpaceSensitive})}))}):e}))},function(e){var t=function(e){return"element"===e.type&&0===e.attrs.length&&1===e.children.length&&"text"===e.firstChild.type&&!lw(e.children[0].value)&&!e.firstChild.hasLeadingSpaces&&!e.firstChild.hasTrailingSpaces&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces&&e.prev&&"text"===e.prev.type&&e.next&&"text"===e.next.type};return e.map((function(e){if(e.children){var n=e.children.map(t);if(n.some(Boolean)){for(var r=[],i=0;i")+a.firstChild.value+"")+s.value,sourceSpan:new sw(o.sourceSpan.start,s.sourceSpan.end),isTrailingSpaceSensitive:u,hasTrailingSpaces:c}))}else r.push(a)}return e.clone({children:r})}}return e}))}],yw=function(e,t){var n,r=c(vw);try{for(r.s();!(n=r.n()).done;)e=(0,n.value)(e,t)}catch(i){r.e(i)}finally{r.f()}return e},bw={hasPragma:function(e){return/^\s*/.test(e)},insertPragma:function(e){return"\x3c!-- @format --\x3e\n\n"+e.replace(/^\s*\n/,"")}},Dw={locStart:function(e){return e.sourceSpan.start.offset},locEnd:function(e){return e.sourceSpan.end.offset}},Ew=bn.builders,Cw=Ew.concat,Sw=Ew.group,xw={isVueEventBindingExpression:function(e){var t=e.trim();return/^([\w$]+|\([^)]*?\))\s*=>|^function\s*\(/.test(t)||/^[$A-Z_a-z][\w$]*(?:\.[$A-Z_a-z][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[$A-Z_a-z][\w$]*])*$/.test(t)},printVueFor:function(e,t){var n=function(e){var t=/([^]*?)\s+(in|of)\s+([^]*)/,n=/,([^,\]}]*)(?:,([^,\]}]*))?$/,r=/^\(|\)$/g,i=e.match(t);if(i){var a={};a.for=i[3].trim();var o=i[1].trim().replace(r,""),s=o.match(n);return s?(a.alias=o.replace(n,""),a.iterator1=s[1].trim(),s[2]&&(a.iterator2=s[2].trim())):a.alias=o,{left:"".concat([a.alias,a.iterator1,a.iterator2].filter(Boolean).join(",")),operator:i[2],right:a.for}}}(e),r=n.left,i=n.operator,a=n.right;return Cw([Sw(t("function _(".concat(r,") {}"),{parser:"babel",__isVueForBindingLeft:!0}))," ",i," ",t(a,{parser:"__js_expression"},{stripTrailingHardline:!0})])},printVueBindings:function(e,t){return t("function _(".concat(e,") {}"),{parser:"babel",__isVueBindings:!0},{stripTrailingHardline:!0})}},kw=$e((function(e){!function(t,n){e.exports?e.exports=n():t.parseSrcset=n()}(Je,(function(){return function(e,t){var n=t&&t.logger||console;function r(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function i(t){var n,r=t.exec(e.substring(_));if(r)return n=r[0],_+=n.length,n}for(var a,o,s,u,c,l=e.length,d=/^[ \t\n\r\u000c]+/,p=/^[, \t\n\r\u000c]+/,f=/^[^ \t\n\r\u000c]+/,h=/[,]+$/,g=/^\d+$/,m=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,_=0,v=[];;){if(i(p),_>=l)return v;a=i(f),o=[],","===a.slice(-1)?(a=a.replace(h,""),b()):y()}function y(){for(i(d),s="",u="in descriptor";;){if(c=e.charAt(_),"in descriptor"===u)if(r(c))s&&(o.push(s),s="",u="after descriptor");else{if(","===c)return _+=1,s&&o.push(s),void b();if("("===c)s+=c,u="in parens";else{if(""===c)return s&&o.push(s),void b();s+=c}}else if("in parens"===u)if(")"===c)s+=c,u="in descriptor";else{if(""===c)return o.push(s),void b();s+=c}else if("after descriptor"===u)if(r(c));else{if(""===c)return void b();u="in descriptor",_-=1}_+=1}}function b(){var t,r,i,s,u,c,l,d,p,f=!1,h={};for(s=0;s1)throw new Error("Mixed descriptor in srcset is not supported");var i=n?"w":r?"h":"d",a=n?"w":r?"h":"x",o=function(e){return Math.max.apply(Math,l(e))},s=t.map((function(e){return e.url})),u=o(s.map((function(e){return e.length}))),c=t.map((function(e){return e[i]})).map((function(e){return e?e.toString():""})),d=c.map((function(e){var t=e.indexOf(".");return-1===t?e.length:t})),p=o(d);return Ow(ww([",",Nw]),s.map((function(e,t){var n=[e],r=c[t];if(r){var i=u-e.length+1,o=p-d[t],s=" ".repeat(i+o);n.push(Aw(s," "),r+a)}return ww(n)})))},printClassNames:function(e){return e.trim().split(/\s+/).join(" ")}},Fw=bn.builders,Lw=bn.utils,Pw=Lw.mapDoc,Rw=Lw.normalizeParts,Mw=Gt.replaceEndOfLineWith,Bw=dE.print,jw=Fw.breakParent,Uw=Fw.dedentToRoot,Vw=Fw.fill,zw=Fw.group,Hw=Fw.hardline,Ww=Fw.ifBreak,Kw=Fw.indent,qw=Fw.join,Gw=Fw.line,Yw=Fw.literalline,Jw=Fw.softline,$w=nw.htmlTrimPreserveIndentation,Qw=nw.splitByHtmlWhitespace,Xw=nw.countChars,Zw=nw.countParents,eA=nw.dedentString,tA=nw.forceBreakChildren,nA=nw.forceBreakContent,rA=nw.forceNextEmptyLine,iA=nw.getLastDescendant,aA=nw.getPrettierIgnoreAttributeCommentData,oA=nw.hasPrettierIgnore,sA=nw.inferScriptParser,uA=nw.isVueCustomBlock,cA=nw.isVueNonHtmlBlock,lA=nw.isVueSlotAttribute,dA=nw.isVueSfcBindingsAttribute,pA=nw.isScriptLikeTag,fA=nw.isTextLikeNode,hA=nw.preferHardlineAsLeadingSpaces,gA=nw.shouldNotPrintClosingTag,mA=nw.shouldPreserveContent,_A=nw.unescapeQuoteEntities,vA=nw.isPreLikeNode,yA=bw.insertPragma,bA=Dw.locStart,DA=Dw.locEnd,EA=xw.printVueFor,CA=xw.printVueBindings,SA=xw.isVueEventBindingExpression,xA=Iw.printImgSrcset,kA=Iw.printClassNames;function TA(e){var t=Rw(e);return 0===t.length?"":1===t.length?t[0]:Fw.concat(t)}function wA(e,t,n){var r=e.getValue();if(tA(r))return TA([jw,TA(e.map((function(e){var t=e.getValue(),n=t.prev?o(t.prev,t):"";return TA([n?TA([n,rA(t.prev)?Hw:""]):"",a(e)])}),"children"))]);var i=r.children.map((function(){return Symbol("")}));return TA(e.map((function(e,t){var n=e.getValue();if(fA(n)){if(n.prev&&fA(n.prev)){var r=o(n.prev,n);if(r)return rA(n.prev)?TA([Hw,Hw,a(e)]):TA([r,a(e)])}return a(e)}var s=[],u=[],c=[],l=[],d=n.prev?o(n.prev,n):"",p=n.next?o(n,n.next):"";return d&&(rA(n.prev)?s.push(Hw,Hw):d===Hw?s.push(Hw):fA(n.prev)?u.push(d):u.push(Ww("",Jw,{groupId:i[t-1]}))),p&&(rA(n)?fA(n.next)&&l.push(Hw,Hw):p===Hw?fA(n.next)&&l.push(Hw):c.push(p)),TA([].concat(s,zw(TA([TA(u),zw(TA([a(e),TA(c)]),{id:i[t]})])),l))}),"children"));function a(e){var r=e.getValue();return oA(r)?TA([].concat(zA(r,t),Mw(t.originalText.slice(bA(r)+(r.prev&&MA(r.prev)?KA(r).length:0),DA(r)-(r.next&&jA(r.next)?YA(r,t).length:0)),Yw),WA(r,t))):n(e)}function o(e,t){return fA(e)&&fA(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?hA(t)?Hw:Gw:"":hA(t)?Hw:Jw:MA(e)&&(oA(t)||t.firstChild||t.isSelfClosing||"element"===t.type&&0!==t.attrs.length)||"element"===e.type&&e.isSelfClosing&&jA(t)?"":!t.isLeadingSpaceSensitive||hA(t)||jA(t)&&e.lastChild&&VA(e.lastChild)&&e.lastChild.lastChild&&VA(e.lastChild.lastChild)?Hw:t.hasLeadingSpaces?Gw:Jw}}function AA(e,t){var n=e.startSourceSpan.end.offset;e.firstChild&&BA(e.firstChild)&&(n-=qA(e).length);var r=e.endSourceSpan.start.offset;return e.lastChild&&VA(e.lastChild)?r+=GA(e,t).length:UA(e)&&(r-=YA(e.lastChild,t).length),t.originalText.slice(n,r)}function OA(e,t,n){var r=e.getValue();if(!r.attrs||0===r.attrs.length)return r.isSelfClosing?" ":"";var i=r.prev&&"comment"===r.prev.type&&aA(r.prev.value),a="boolean"==typeof i?function(){return i}:Array.isArray(i)?function(e){return i.includes(e.rawName)}:function(){return!1},o=e.map((function(e){var r=e.getValue();return a(r)?TA(Mw(t.originalText.slice(bA(r),DA(r)),Yw)):n(e)}),"attrs"),s="element"===r.type&&"script"===r.fullName&&1===r.attrs.length&&"src"===r.attrs[0].fullName&&0===r.children.length,u=[Kw(TA([s?" ":Gw,qw(Gw,o)]))];return r.firstChild&&BA(r.firstChild)||r.isSelfClosing&&UA(r.parent)||s?u.push(r.isSelfClosing?" ":""):u.push(r.isSelfClosing?Gw:Jw),TA(u)}function NA(e,t,n){var r=e.getValue();return TA([IA(r,t),OA(e,t,n),r.isSelfClosing?"":FA(r)])}function IA(e,t){return e.prev&&MA(e.prev)?"":TA([zA(e,t),KA(e)])}function FA(e){return e.firstChild&&BA(e.firstChild)?"":qA(e)}function LA(e,t){return TA([e.isSelfClosing?"":PA(e,t),RA(e,t)])}function PA(e,t){return e.lastChild&&VA(e.lastChild)?"":TA([HA(e,t),GA(e,t)])}function RA(e,t){return(e.next?jA(e.next):UA(e.parent))?"":TA([YA(e,t),WA(e,t)])}function MA(e){return e.next&&!fA(e.next)&&fA(e)&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces}function BA(e){return!e.prev&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function jA(e){return e.prev&&"docType"!==e.prev.type&&!fA(e.prev)&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function UA(e){return e.lastChild&&e.lastChild.isTrailingSpaceSensitive&&!e.lastChild.hasTrailingSpaces&&!fA(iA(e.lastChild))&&!vA(e)}function VA(e){return!e.next&&!e.hasTrailingSpaces&&e.isTrailingSpaceSensitive&&fA(iA(e))}function zA(e,t){return BA(e)?qA(e.parent):jA(e)?YA(e.prev,t):""}function HA(e,t){return UA(e)?YA(e.lastChild,t):""}function WA(e,t){return VA(e)?GA(e.parent,t):MA(e)?KA(e.next):""}function KA(e){switch(e.type){case"ieConditionalComment":case"ieConditionalStartComment":return"\x3c!--[if ".concat(e.condition);case"ieConditionalEndComment":return"\x3c!--\x3c!--\x3e<").concat(e.rawName);default:return"<".concat(e.rawName)}}function qA(e){switch(Os(!e.isSelfClosing),e.type){case"ieConditionalComment":return"]>";case"element":if(e.condition)return">\x3c!--"}}function GA(e,t){if(Os(!e.isSelfClosing),gA(e,t))return"";switch(e.type){case"ieConditionalComment":return"\x3c!--\x3e";case"interpolation":return"}}";case"element":if(e.isSelfClosing)return"/>";default:return">"}}function JA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.value;return e.parent.isWhitespaceSensitive?e.parent.isIndentationSensitive?Mw(t,Yw):Mw(eA($w(t)),Hw):qw(Gw,Qw(t)).parts}var $A={preprocess:yw,print:function(e,t,n){var r,i=e.getValue();switch(i.type){case"front-matter":return TA(Mw(i.raw,Yw));case"root":return t.__onHtmlRoot&&t.__onHtmlRoot(i),Fw.concat([zw(wA(e,t,n)),Hw]);case"element":case"ieConditionalComment":if(mA(i,t))return TA([].concat(zA(i,t),zw(NA(e,t,n)),Mw(AA(i,t),Yw),LA(i,t),WA(i,t)));var a=1===i.children.length&&"interpolation"===i.firstChild.type&&i.firstChild.isLeadingSpaceSensitive&&!i.firstChild.hasLeadingSpaces&&i.lastChild.isTrailingSpaceSensitive&&!i.lastChild.hasTrailingSpaces,o=Symbol("element-attr-group-id");return TA([zw(TA([zw(NA(e,t,n),{id:o}),0===i.children.length?i.hasDanglingSpaces&&i.isDanglingSpaceSensitive?Gw:"":TA([nA(i)?jw:"",(r=TA([a?Ww(Jw,"",{groupId:o}):i.firstChild.hasLeadingSpaces&&i.firstChild.isLeadingSpaceSensitive?Gw:"text"===i.firstChild.type&&i.isWhitespaceSensitive&&i.isIndentationSensitive?Uw(Jw):Jw,wA(e,t,n)]),a?Ww(Kw(r),r,{groupId:o}):!pA(i)&&!uA(i,t)||"root"!==i.parent.type||"vue"!==t.parser||t.vueIndentScriptAndStyle?Kw(r):r),(i.next?jA(i.next):UA(i.parent))?i.lastChild.hasTrailingSpaces&&i.lastChild.isTrailingSpaceSensitive?" ":"":a?Ww(Jw,"",{groupId:o}):i.lastChild.hasTrailingSpaces&&i.lastChild.isTrailingSpaceSensitive?Gw:("comment"===i.lastChild.type||"text"===i.lastChild.type&&i.isWhitespaceSensitive&&i.isIndentationSensitive)&&new RegExp("\\n[\\t ]{".concat(t.tabWidth*Zw(e,(function(e){return e.parent&&"root"!==e.parent.type})),"}$")).test(i.lastChild.value)?"":Jw])])),LA(i,t)]);case"ieConditionalStartComment":case"ieConditionalEndComment":return TA([IA(i),RA(i)]);case"interpolation":return TA([IA(i,t),TA(e.map(n,"children")),RA(i,t)]);case"text":if("interpolation"===i.parent.type){var s=/\n[^\S\n]*?$/,u=s.test(i.value),c=u?i.value.replace(s,""):i.value;return TA([TA(Mw(c,Yw)),u?Hw:""])}return Vw(Rw([].concat(zA(i,t),JA(i),WA(i,t))));case"docType":return TA([zw(TA([IA(i,t)," ",i.value.replace(/^html\b/i,"html").replace(/\s+/g," ")])),RA(i,t)]);case"comment":return TA([zA(i,t),TA(Mw(t.originalText.slice(bA(i),DA(i)),Yw)),WA(i,t)]);case"attribute":if(null===i.value)return i.rawName;var l=_A(i.value),d=Xw(l,"'")1&&void 0!==arguments[1])||arguments[1];return zw(TA([Kw(TA([Jw,e])),t?Jw:""]))},c=function(e){return a?s(e):u(e)},l=function(e,n){return t(e,Object.assign({__onHtmlBindingRoot:o},n),{stripTrailingHardline:!0})};if("srcset"===e.fullName&&("img"===e.parent.fullName||"source"===e.parent.fullName))return u(xA(i()));if("class"===e.fullName&&!n.parentParser){var d=i();if(!d.includes("{{"))return kA(d)}if("style"===e.fullName&&!n.parentParser){var p=i();if(!p.includes("{{"))return u(l(p,{parser:"css",__isHTMLStyleAttribute:!0}))}if("vue"===n.parser){if("v-for"===e.fullName)return EA(i(),l);if(lA(e)||dA(e,n))return CA(i(),l);var f=["^:","^v-bind:"],h=["^v-"];if(r(["^@","^v-on:"])){var g=i();return c(l(g,{parser:SA(g)?"__js_expression":"__vue_event_binding"}))}if(r(f))return c(l(i(),{parser:"__vue_expression"}));if(r(h))return c(l(i(),{parser:"__js_expression"}))}if("angular"===n.parser){var m=function(e,t){return l(e,Object.assign({},t,{trailingComma:"none"}))},_=["^\\*"],v=["^\\[.+\\]$","^bind(on)?-","^ng-(if|show|hide|class|style)$"],y=["^i18n(-.+)?$"];if(r(["^\\(.+\\)$","^on-"]))return c(m(i(),{parser:"__ng_action"}));if(r(v))return c(m(i(),{parser:"__ng_binding"}));if(r(y)){var b=i().trim();return u(Vw(JA(e,b)),!b.includes("@@"))}if(r(_))return c(m(i(),{parser:"__ng_directive"}));var D=/{{([\S\s]+?)}}/g,E=i();if(D.test(E)){var C=[];return E.split(D).forEach((function(e,n){if(n%2==0)C.push(TA(Mw(e,Yw)));else try{C.push(zw(TA(["{{",Kw(TA([Gw,m(e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})])),Gw,"}}"])))}catch(t){C.push("{{",TA(Mw(e,Yw)),"}}")}})),zw(TA(C))}}return null}(i,(function(e,t){return n(e,Object.assign({__isInHtmlAttribute:!0},t),{stripTrailingHardline:!0})}),r);if(h)return TA([i.rawName,'="',zw(Pw(h,(function(e){return"string"==typeof e?e.replace(/"/g,"""):e}))),'"']);break;case"front-matter":return Bw(i,n)}}},QA="HTML",XA={htmlWhitespaceSensitivity:{since:"1.15.0",category:QA,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},vueIndentScriptAndStyle:{since:"1.19.0",category:QA,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},ZA={name:"HTML",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[".html",".htm",".html.hl",".inc",".st",".xht",".xhtml"],languageId:146},eO={name:"Vue",type:"markup",color:"#2c3e50",extensions:[".vue"],tmScope:"text.html.vue",aceMode:"html",languageId:391},tO={languages:[sc(ZA,(function(){return{name:"Angular",since:"1.15.0",parsers:["angular"],vscodeLanguageIds:["html"],extensions:[".component.html"],filenames:[]}})),sc(ZA,(function(e){return{since:"1.15.0",parsers:["html"],vscodeLanguageIds:["html"],extensions:e.extensions.concat([".mjml"])}})),sc(ZA,(function(){return{name:"Lightning Web Components",since:"1.17.0",parsers:["lwc"],vscodeLanguageIds:["html"],extensions:[],filenames:[]}})),sc(eO,(function(){return{since:"1.10.0",parsers:["vue"],vscodeLanguageIds:["vue"]}}))],printers:{html:$A},options:XA,parsers:{get html(){return{}.parsers.html},get vue(){return{}.parsers.vue},get angular(){return{}.parsers.angular},get lwc(){return{}.parsers.lwc}}},nO={isPragma:function(e){return/^\s*@(prettier|format)\s*$/.test(e)},hasPragma:function(e){return/^\s*#[^\S\n]*@(prettier|format)\s*?(\n|$)/.test(e)},insertPragma:function(e){return"# @format\n\n".concat(e)}},rO={locStart:function(e){return e.position.start.offset},locEnd:function(e){return e.position.end.offset}},iO=Gt.getLast;function aO(e,t){return e&&"string"==typeof e.type&&(!t||t.includes(e.type))}function oO(e){return"prettier-ignore"===e.value.trim()}function sO(e){return e&&e.leadingComments&&0!==e.leadingComments.length}function uO(e){return e&&e.middleComments&&0!==e.middleComments.length}function cO(e){return e&&e.indicatorComment}function lO(e){return e&&e.trailingComment}function dO(e){return e&&e.endComments&&0!==e.endComments.length}function pO(e){var t,n,r=[],i=c(e.split(/( +)/g));try{for(i.s();!(n=i.n()).done;){var a=n.value;" "!==a?" "===t?r.push(a):r.push((r.pop()||"")+a):void 0===t&&r.unshift(""),t=a}}catch(o){i.e(o)}finally{i.f()}return" "===t&&r.push((r.pop()||"")+" "),""===r[0]&&(r.shift(),r.unshift(" "+(r.shift()||""))),r}var fO={getLast:iO,getAncestorCount:function(e,t){for(var n=0,r=e.stack.length-1,i=0;i=0&&0===t[r].length;r--)n++;return 0===n?t:n>=2&&!i?t.slice(0,-(n-1)):t.slice(0,-n)}},getFlowScalarLineContents:function(e,t,n){var r=t.split("\n").map((function(e,t,n){return 0===t&&t===n.length-1?e:0!==t&&t!==n.length-1?e.trim():0===t?e.trimEnd():e.trimStart()}));return"preserve"===n.proseWrap?r.map((function(e){return 0===e.length?[]:[e]})):r.map((function(e){return 0===e.length?[]:pO(e)})).reduce((function(t,n,i){return 0===i||0===r[i-1].length||0===n.length||"quoteDouble"===e&&iO(iO(t)).endsWith("\\")?t.concat([n]):t.concat([t.pop().concat(n)])}),[]).map((function(e){return"never"===n.proseWrap?[e.join(" ")]:e}))},getLastDescendantNode:function e(t){return"children"in t&&0!==t.children.length?e(iO(t.children)):t},hasPrettierIgnore:function(e){var t=e.getValue();if("documentBody"===t.type){var n=e.getParentNode();return dO(n.head)&&oO(iO(n.head.endComments))}return sO(t)&&oO(iO(t.leadingComments))},hasLeadingComments:sO,hasMiddleComments:uO,hasIndicatorComment:cO,hasTrailingComment:lO,hasEndComments:dO},hO=bn.builders,gO=hO.conditionalGroup,mO=hO.breakParent,_O=hO.concat,vO=hO.dedent,yO=hO.dedentToRoot,bO=hO.fill,DO=hO.group,EO=hO.hardline,CO=hO.ifBreak,SO=hO.join,xO=hO.line,kO=hO.lineSuffix,TO=hO.literalline,wO=hO.markAsRoot,AO=hO.softline,OO=Gt.replaceEndOfLineWith,NO=Gt.isPreviousLineEmpty,IO=nO.insertPragma,FO=nO.isPragma,LO=rO.locStart,PO=fO.getAncestorCount,RO=fO.getBlockValueLineContents,MO=fO.getFlowScalarLineContents,BO=fO.getLast,jO=fO.getLastDescendantNode,UO=fO.hasLeadingComments,VO=fO.hasMiddleComments,zO=fO.hasIndicatorComment,HO=fO.hasTrailingComment,WO=fO.hasEndComments,KO=fO.hasPrettierIgnore,qO=fO.isLastDescendantNode,GO=fO.isNextLineEmpty,YO=fO.isNode,JO=fO.isEmptyNode,$O=fO.defineShortcut,QO=fO.mapNode;function XO(e){switch(e.type){case"document":$O(e,"head",(function(){return e.children[0]})),$O(e,"body",(function(){return e.children[1]}));break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":$O(e,"content",(function(){return e.children[0]}));break;case"mappingItem":case"flowMappingItem":$O(e,"key",(function(){return e.children[0]})),$O(e,"value",(function(){return e.children[1]}))}return e}function ZO(e,t,n,r,i){switch(e.type){case"root":return _O([SO(EO,n.map((function(t,r){var a=e.children[r],o=e.children[r+1];return _O([i(t),rN(a,o)?_O([EO,"...",HO(a)?_O([" ",n.call(i,"trailingComment")]):""]):!o||HO(o.head)?"":_O([EO,"---"])])}),"children")),0===e.children.length||(T=jO(e),YO(T,["blockLiteral","blockFolded"])&&"keep"===T.chomping)?"":EO]);case"document":var a=t.children[n.getName()+1];return SO(EO,["head"===iN(e,a,t,r)?SO(EO,[0===e.head.children.length&&0===e.head.endComments.length?"":n.call(i,"head"),_O(["---",HO(e.head)?_O([" ",n.call(i,"head","trailingComment")]):""])].filter(Boolean)):"",nN(e)?n.call(i,"body"):""].filter(Boolean));case"documentHead":return SO(EO,[].concat(n.map(i,"children"),n.map(i,"endComments")));case"documentBody":var o=SO(EO,n.map(i,"children")).parts,s=SO(EO,n.map(i,"endComments")).parts,u=0===o.length||0===s.length?"":function(e){return YO(e,["blockFolded","blockLiteral"])?"keep"===e.chomping?"":_O([EO,EO]):EO}(jO(e));return _O([].concat(o,u,s));case"directive":return _O(["%",SO(" ",[e.name].concat(e.parameters))]);case"comment":return _O(["#",e.value]);case"alias":return _O(["*",e.value]);case"tag":return r.originalText.slice(e.position.start.offset,e.position.end.offset);case"anchor":return _O(["&",e.value]);case"plain":return lN(e.type,r.originalText.slice(e.position.start.offset,e.position.end.offset),r);case"quoteDouble":case"quoteSingle":var c="'",l='"',d=r.originalText.slice(e.position.start.offset+1,e.position.end.offset-1);if("quoteSingle"===e.type&&d.includes("\\")||"quoteDouble"===e.type&&/\\[^"]/.test(d)){var p="quoteDouble"===e.type?l:c;return _O([p,lN(e.type,d,r),p])}if(d.includes(l))return _O([c,lN(e.type,"quoteDouble"===e.type?d.replace(/\\"/g,l).replace(/'/g,c.repeat(2)):d,r),c]);if(d.includes(c))return _O([l,lN(e.type,"quoteSingle"===e.type?d.replace(/''/g,c):d,r),l]);var f=r.singleQuote?c:l;return _O([f,lN(e.type,d,r),f]);case"blockFolded":case"blockLiteral":var h=PO(n,(function(e){return YO(e,["sequence","mapping"])})),g=qO(n);return _O(["blockFolded"===e.type?">":"|",null===e.indent?"":e.indent.toString(),"clip"===e.chomping?"":"keep"===e.chomping?"+":"-",zO(e)?_O([" ",n.call(i,"indicatorComment")]):"",(null===e.indent?vO:yO)(eN(null===e.indent?r.tabWidth:e.indent-1+h,_O(RO(e,{parentIndent:h,isLastDescendant:g,options:r}).reduce((function(t,n,r,i){return t.concat(0===r?EO:"",bO(SO(xO,n).parts),r!==i.length-1?0===n.length?EO:wO(TO):"keep"===e.chomping&&g?0===n.length?yO(EO):yO(TO):"")}),[]))))]);case"sequence":return SO(EO,n.map(i,"children"));case"sequenceItem":return _O(["- ",eN(2,e.content?n.call(i,"content"):"")]);case"mappingKey":case"mappingValue":return e.content?n.call(i,"content"):"";case"mapping":return SO(EO,n.map(i,"children"));case"mappingItem":case"flowMappingItem":var m=JO(e.key),_=JO(e.value);if(m&&_)return _O([": "]);var v=n.call(i,"key"),y=n.call(i,"value");if(_)return"flowMappingItem"===e.type&&"flowMapping"===t.type?v:"mappingItem"!==e.type||!aN(e.key.content,r)||HO(e.key.content)||t.tag&&"tag:yaml.org,2002:set"===t.tag.value?_O(["? ",eN(2,v)]):_O([v,oN(e)?" ":"",":"]);if(m)return _O([": ",eN(2,y)]);var b=Symbol("mappingKey");return UO(e.value)||!tN(e.key.content)?_O(["? ",eN(2,v),EO,SO("",n.map(i,"value","leadingComments").map((function(e){return _O([e,EO])}))),": ",eN(2,y)]):!function(e){if(!e)return!0;switch(e.type){case"plain":case"quoteDouble":case"quoteSingle":return e.position.start.line===e.position.end.line;case"alias":return!0;default:return!1}}(e.key.content)||UO(e.key.content)||VO(e.key.content)||HO(e.key.content)||WO(e.key)||UO(e.value.content)||VO(e.value.content)||WO(e.value)||!aN(e.value.content,r)?gO([_O([DO(_O([CO("? "),DO(eN(2,v),{id:b})])),CO(_O([EO,": ",eN(2,y)]),w(_O([oN(e)?" ":"",":",UO(e.value.content)||WO(e.value)&&e.value.content&&!YO(e.value.content,["mapping","sequence"])||"mapping"===t.type&&HO(e.key.content)&&tN(e.value.content)||YO(e.value.content,["mapping","sequence"])&&null===e.value.content.tag&&null===e.value.content.anchor?EO:e.value.content?xO:"",y])),{groupId:b})])]):_O([v,oN(e)?" ":"",": ",y]);case"flowMapping":case"flowSequence":var D="flowMapping"===e.type?"{":"[",E="flowMapping"===e.type?"}":"]",C="flowMapping"===e.type&&0!==e.children.length&&r.bracketSpacing?xO:AO,S=0!==e.children.length&&"flowMappingItem"===(k=BO(e.children)).type&&JO(k.key)&&JO(k.value),x="none"===r.trailingComma?"":CO(",","");return _O([D,w(_O([C,_O(n.map((function(t,n){return _O([i(t),n===e.children.length-1?"":_O([",",xO,e.children[n].position.start.line!==e.children[n+1].position.start.line?cN(t,r.originalText):""])])}),"children")),x,WO(e)?_O([EO,SO(EO,n.map(i,"endComments"))]):""])),S?"":C,E]);case"flowSequenceItem":return n.call(i,"content");default:throw new Error("Unexpected node type ".concat(e.type))}var k,T;function w(e){return hO.align(" ".repeat(r.tabWidth),e)}}function eN(e,t){return"number"==typeof e&&e>0?hO.align(" ".repeat(e),t):hO.align(e,t)}function tN(e){if(!e)return!0;switch(e.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}function nN(e){return 0!==e.body.children.length||WO(e.body)}function rN(e,t){return HO(e)||t&&(0!==t.head.children.length||WO(t.head))}function iN(e,t,n,r){return n.children[0]===e&&/---(\s|$)/.test(r.originalText.slice(LO(e),LO(e)+4))||0!==e.head.children.length||WO(e.head)||HO(e.head)?"head":!rN(e,t)&&!!t&&"root"}function aN(e,t){if(!e)return!0;switch(e.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if("preserve"===t.proseWrap)return e.position.start.line===e.position.end.line;if(/\\$/m.test(t.originalText.slice(e.position.start.offset,e.position.end.offset)))return!1;switch(t.proseWrap){case"never":return!e.value.includes("\n");case"always":return!/[\n ]/.test(e.value);default:return!1}}function oN(e){return e.key.content&&"alias"===e.key.content.type}function sN(e){return WO(e)&&!YO(e,["documentHead","documentBody","flowMapping","flowSequence"])}var uN=new WeakMap;function cN(e,t){var n,r=e.getValue(),i=e.stack[0];return uN.has(i)?n=uN.get(i):(n=new Set,uN.set(i,n)),n.has(r.position.end.line)||(n.add(r.position.end.line),!GO(r,t)||sN(e.getParentNode()))?"":AO}function lN(e,t,n){var r=MO(e,t,n);return SO(EO,r.map((function(e){return bO(SO(xO,e).parts)})))}var dN={preprocess:function(e){return QO(e,XO)},print:function(e,t,n){var r=e.getValue(),i=e.getParentNode(),a=r.tag?e.call(n,"tag"):"",o=r.anchor?e.call(n,"anchor"):"",s=YO(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!qO(e)?cN(e,t.originalText):"";return _O(["mappingValue"!==r.type&&UO(r)?_O([SO(EO,e.map(n,"leadingComments")),EO]):"",a,a&&o?" ":"",o,a||o?YO(r,["sequence","mapping"])&&!VO(r)?EO:" ":"",VO(r)?_O([1===r.middleComments.length?"":EO,SO(EO,e.map(n,"middleComments")),EO]):"",KO(e)?_O(OO(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd(),TO)):DO(ZO(r,i,e,t,n)),HO(r)&&!YO(r,["document","documentHead"])?kO(_O(["mappingValue"!==r.type||r.content?" ":"","mappingKey"===i.type&&"mapping"===e.getParentNode(2).type&&tN(r)?"":mO,e.call(n,"trailingComment")])):"",sN(r)?eN("sequenceItem"===r.type?2:0,_O([EO,SO(EO,e.map((function(e){return _O([NO(t.originalText,e.getValue(),LO)?EO:"",n(e)])}),"endComments"))])):"",s])},massageAstNode:function(e,t){if(YO(t))switch(delete t.position,t.type){case"comment":if(FO(t.value))return null;break;case"quoteDouble":case"quoteSingle":t.type="quote"}},insertPragma:IO},pN={bracketSpacing:KD.bracketSpacing,singleQuote:KD.singleQuote,proseWrap:KD.proseWrap},fN=[tE,uS,gx,Mx,vT,tO,{languages:[sc({name:"YAML",type:"data",color:"#cb171e",tmScope:"source.yaml",aliases:["yml"],extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".gemrc","glide.lock","yarn.lock"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",languageId:407},(function(e){return{since:"1.14.0",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"],filenames:e.filenames.filter((function(e){return"yarn.lock"!==e}))}}))],printers:{yaml:dN},options:pN,parsers:{get yaml(){return{}.parsers.yaml}}}],hN=g.version,gN=Tt.getSupportInfo,mN=fN.map((function(t){return e(t,["parsers"])}));function _N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(){for(var n=arguments.length,r=new Array(n),i=0;i=12&&t<=16)return!1}return!0}()},keyboard:i.g||r.l?0:navigator.keyboard||r.k?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)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(28),i=Object(r.c)("textResourceConfigurationService"),a=Object(r.c)("textResourcePropertiesService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(21),i=n(6),a=n(0),o=n(1),s=n(49),u=n(3),c=n(147),l=function(){function e(t,n){Object(a.a)(this,e),this.supportIcons=n,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",t.appendChild(this.domNode)}return Object(o.a)(e,[{key:"set",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3?arguments[3]:void 0;t||(t=""),i&&(t=e.escapeNewLines(t,n)),this.didEverRender&&this.text===t&&this.title===r&&s.d(this.highlights,n)||(this.text=t,this.title=r,this.highlights=n,this.render())}},{key:"render",value:function(){var e,t=[],n=0,a=Object(i.a)(this.highlights);try{for(a.s();!(e=a.n()).done;){var o=e.value;if(o.end!==o.start){if(n=a&&(u.start+=r),u.end>=a&&(u.end+=r))}}catch(c){s.e(c)}finally{s.f()}return n+=r,"\u23ce"}))}}]),e}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return y}));var r=n(6),i=n(0),a=n(1),o=n(2),s=n(27),u=n(33),c=n(35),l=n(221),d=n(71),p=n(57);function f(e){return e.toString()}var h=function(){function e(t,n,r,a,o,s,u){Object(i.a)(this,e),this.beforeVersionId=t,this.afterVersionId=n,this.beforeEOL=r,this.afterEOL=a,this.beforeCursorState=o,this.afterCursorState=s,this.changes=u}return Object(a.a)(e,[{key:"append",value:function(e,t,n,r,i){t.length>0&&(this.changes=Object(l.b)(this.changes,t)),this.afterEOL=n,this.afterVersionId=r,this.afterCursorState=i}},{key:"serialize",value:function(){var t,n=10+e._writeSelectionsSize(this.beforeCursorState)+e._writeSelectionsSize(this.afterCursorState)+4,i=Object(r.a)(this.changes);try{for(i.s();!(t=i.n()).done;){n+=t.value.writeSize()}}catch(c){i.e(c)}finally{i.f()}var a=new Uint8Array(n),o=0;d.f(a,this.beforeVersionId,o),o+=4,d.f(a,this.afterVersionId,o),o+=4,d.g(a,this.beforeEOL,o),o+=1,d.g(a,this.afterEOL,o),o+=1,o=e._writeSelections(a,this.beforeCursorState,o),o=e._writeSelections(a,this.afterCursorState,o),d.f(a,this.changes.length,o),o+=4;var s,u=Object(r.a)(this.changes);try{for(u.s();!(s=u.n()).done;){o=s.value.write(a,o)}}catch(c){u.e(c)}finally{u.f()}return a.buffer}}],[{key:"create",value:function(t,n){var r=t.getAlternativeVersionId(),i=_(t);return new e(r,r,i,i,n,n,[])}},{key:"_writeSelectionsSize",value:function(e){return 4+16*(e?e.length:0)}},{key:"_writeSelections",value:function(e,t,n){if(d.f(e,t?t.length:0,n),n+=4,t){var i,a=Object(r.a)(t);try{for(a.s();!(i=a.n()).done;){var o=i.value;d.f(e,o.selectionStartLineNumber,n),n+=4,d.f(e,o.selectionStartColumn,n),n+=4,d.f(e,o.positionLineNumber,n),n+=4,d.f(e,o.positionColumn,n),n+=4}}catch(s){a.e(s)}finally{a.f()}}return n}},{key:"_readSelections",value:function(e,t,n){var r=d.c(e,t);t+=4;for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(r.a)(this,e),this.ctor=t,this.staticArguments=n,this.supportsDelayedInstantiation=i}},function(e,t,n){var r=n(229);e.exports=function(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}},function(e,t,n){"use strict";var r=n(210);e.exports=function(e){return r({},e)}},function(e,t,n){"use strict";var r=n(233);e.exports=function(e){return function(t){return e.test(r(t))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(218);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(17),i=n(15),a=n(4),o=n(5),s=n(0),u=n(1),c=n(11),l=n(7),d=function(){function e(t,n,r,i,a,o){Object(s.a)(this,e),t|=0,n|=0,r|=0,i|=0,a|=0,o|=0,this.rawScrollLeft=r,this.rawScrollTop=o,t<0&&(t=0),r+t>n&&(r=n-t),r<0&&(r=0),i<0&&(i=0),o+i>a&&(o=a-i),o<0&&(o=0),this.width=t,this.scrollWidth=n,this.scrollLeft=r,this.height=i,this.scrollHeight=a,this.scrollTop=o}return Object(u.a)(e,[{key:"equals",value:function(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}},{key:"withScrollDimensions",value:function(t,n){return new e("undefined"!==typeof t.width?t.width:this.width,"undefined"!==typeof t.scrollWidth?t.scrollWidth:this.scrollWidth,n?this.rawScrollLeft:this.scrollLeft,"undefined"!==typeof t.height?t.height:this.height,"undefined"!==typeof t.scrollHeight?t.scrollHeight:this.scrollHeight,n?this.rawScrollTop:this.scrollTop)}},{key:"withScrollPosition",value:function(t){return new e(this.width,this.scrollWidth,"undefined"!==typeof t.scrollLeft?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,"undefined"!==typeof t.scrollTop?t.scrollTop:this.rawScrollTop)}},{key:"createScrollEvent",value:function(e,t){var n=this.width!==e.width,r=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,a=this.height!==e.height,o=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:r,scrollLeftChanged:i,heightChanged:a,scrollHeightChanged:o,scrollTopChanged:s}}}]),e}(),p=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,r){var i;return Object(s.a)(this,n),(i=t.call(this))._onScroll=i._register(new c.a),i.onScroll=i._onScroll.event,i._smoothScrollDuration=e,i._scheduleAtNextAnimationFrame=r,i._state=new d(0,0,0,0,0,0),i._smoothScrolling=null,i}return Object(u.a)(n,[{key:"dispose",value:function(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}},{key:"setSmoothScrollDuration",value:function(e){this._smoothScrollDuration=e}},{key:"validateScrollPosition",value:function(e){return this._state.withScrollPosition(e)}},{key:"getScrollDimensions",value:function(){return this._state}},{key:"setScrollDimensions",value:function(e,t){var n=this._state.withScrollDimensions(e,t);this._setState(n,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}},{key:"getFutureScrollPosition",value:function(){return this._smoothScrolling?this._smoothScrolling.to:this._state}},{key:"getCurrentScrollPosition",value:function(){return this._state}},{key:"setScrollPositionNow",value:function(e){var t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}},{key:"setScrollPositionSmooth",value:function(e,t){var n=this;if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:"undefined"===typeof e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:"undefined"===typeof e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};var r,i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;r=t?new g(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{var a=this._state.withScrollPosition(e);this._smoothScrolling=g.start(this._state,a,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){n._smoothScrolling&&(n._smoothScrolling.animationFrameDisposable=null,n._performSmoothScrolling())}))}},{key:"_performSmoothScrolling",value:function(){var e=this;if(this._smoothScrolling){var t=this._smoothScrolling.tick(),n=this._state.withScrollPosition(t);if(this._setState(n,!0),this._smoothScrolling)return t.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){e._smoothScrolling&&(e._smoothScrolling.animationFrameDisposable=null,e._performSmoothScrolling())})))}}},{key:"_setState",value:function(e,t){var n=this._state;n.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(n,t)))}}]),n}(l.a),f=function e(t,n,r){Object(s.a)(this,e),this.scrollLeft=t,this.scrollTop=n,this.isDone=r};function h(e,t){var n=t-e;return function(t){return e+n*(1-function(e){return Math.pow(e,3)}(1-t))}}var g=function(){function e(t,n,r,i){Object(s.a)(this,e),this.from=t,this.to=n,this.duration=i,this.startTime=r,this.animationFrameDisposable=null,this._initAnimations()}return Object(u.a)(e,[{key:"_initAnimations",value: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)}},{key:"_initAnimation",value:function(e,t,n){var r,i,a,o,s;return Math.abs(e-t)>2.5*n?(e=o.range.end)){if(e.end2&&void 0!==arguments[2]?arguments[2]:[],r=n.length-t,i=m({start:0,end:e},this.groups),a=m({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((function(e){return{range:_(e.range,r),size:e.size}})),o=n.map((function(t,n){return{range:{start:e+n,end:e+n+1},size:t.size}}));this.groups=y(i,o,a),this._size=this.groups.reduce((function(e,t){return e+t.size*(t.range.end-t.range.start)}),0)}},{key:"indexAt",value:function(e){if(e<0)return-1;var t,n=0,r=0,a=Object(i.a)(this.groups);try{for(a.s();!(t=a.n()).done;){var o=t.value,s=o.range.end-o.range.start,u=r+s*o.size;if(e=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},A={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:function(e){return[e]},getDragURI:function(){return null},onDragStart:function(){},onDragOver:function(){return!1},drop:function(){}},horizontalScrolling:!1,transformOptimization:!0},O=function(){function e(t){Object(o.a)(this,e),this.elements=t}return Object(s.a)(e,[{key:"update",value:function(){}},{key:"getData",value:function(){return this.elements}}]),e}(),N=function(){function e(t){Object(o.a)(this,e),this.elements=t}return Object(s.a)(e,[{key:"update",value:function(){}},{key:"getData",value:function(){return this.elements}}]),e}(),I=function(){function e(){Object(o.a)(this,e),this.types=[],this.files=[]}return Object(s.a)(e,[{key:"update",value:function(e){var t;e.types&&(t=this.types).splice.apply(t,[0,this.types.length].concat(Object(a.a)(e.types)));if(e.files){this.files.splice(0,this.files.length);for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:A;if(Object(o.a)(this,e),this.virtualDelegate=n,this.domId="list_id_".concat(++e.InstanceCount),this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new k.a(50),this.splicing=!1,this.dragOverAnimationStopDisposable=c.a.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=c.a.None,this.onDragLeaveTimeout=c.a.None,this.disposables=new c.b,this._onDidChangeContentHeight=new d.a,this._horizontalScrolling=!1,s.horizontalScrolling&&s.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new b;var g,m=Object(i.a)(r);try{for(m.s();!(g=m.n()).done;){var _=g.value;this.renderers.set(_.templateId,_)}}catch(y){m.e(y)}finally{m.f()}this.cache=this.disposables.add(new E(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!==typeof s.mouseSupport||s.mouseSupport),this._horizontalScrolling=Object(u.e)(s,(function(e){return e.horizontalScrolling}),A.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight="undefined"===typeof s.additionalScrollHeight?0:s.additionalScrollHeight,this.accessibilityProvider=new F(s.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";var v=Object(u.e)(s,(function(e){return e.transformOptimization}),A.transformOptimization);v&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(l.b.addTarget(this.rowsContainer)),this.scrollable=new h.a(Object(u.e)(s,(function(e){return e.smoothScrolling}),!1)?125:0,(function(e){return Object(D.scheduleAtNextAnimationFrame)(e)})),this.scrollableElement=this.disposables.add(new f.c(this.rowsContainer,{horizontal:1,vertical:Object(u.e)(s,(function(e){return e.verticalScrollMode}),A.verticalScrollMode),useShadows:Object(u.e)(s,(function(e){return e.useShadows}),A.useShadows)},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),t.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),Object(p.a)(this.rowsContainer,l.a.Change)(this.onTouchChange,this,this.disposables),Object(p.a)(this.scrollableElement.getDomNode(),"scroll")((function(e){return e.target.scrollTop=0}),null,this.disposables),d.b.map(Object(p.a)(this.domNode,"dragover"),(function(e){return a.toDragEvent(e)}))(this.onDragOver,this,this.disposables),d.b.map(Object(p.a)(this.domNode,"drop"),(function(e){return a.toDragEvent(e)}))(this.onDrop,this,this.disposables),Object(p.a)(this.domNode,"dragleave")(this.onDragLeave,this,this.disposables),Object(p.a)(window,"dragend")(this.onDragEnd,this,this.disposables),this.setRowLineHeight=Object(u.e)(s,(function(e){return e.setRowLineHeight}),A.setRowLineHeight),this.setRowHeight=Object(u.e)(s,(function(e){return e.setRowHeight}),A.setRowHeight),this.supportDynamicHeights=Object(u.e)(s,(function(e){return e.supportDynamicHeights}),A.supportDynamicHeights),this.dnd=Object(u.e)(s,(function(e){return e.dnd}),A.dnd),this.layout()}return Object(s.a)(e,[{key:"updateOptions",value:function(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling)}},{key:"splice",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,n)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}},{key:"_splice",value:function(e,t){for(var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),u={start:e,end:e+t},l=g.a.intersect(s,u),d=new Map,p=l.start;p=this.items.length?(this.rangeMap=new b,this.rangeMap.splice(0,0,C),this.items=C,m=[]):(this.rangeMap.splice(e,t,C),m=(v=this.items).splice.apply(v,[e,t].concat(Object(a.a)(C))));for(var S=o.length-t,x=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),k=_(D,S),T=g.a.intersect(x,k),w=T.start;w5&&void 0!==arguments[5]&&arguments[5],s=this.getRenderRange(t,n),u=g.a.relativeComplement(s,e),c=g.a.relativeComplement(e,s),l=this.getNextToLastElement(u);if(o)for(var d=g.a.intersect(e,s),p=d.start;p=-1&&en&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-n))))}}},{key:"teardownDragAndDropScrollTopAnimation",value:function(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}},{key:"getItemIndexFromEventTarget",value:function(e){for(var t=this.scrollableElement.getDomNode(),n=e;n instanceof HTMLElement&&n!==this.rowsContainer&&t.contains(n);){var r=n.getAttribute("data-index");if(r){var i=Number(r);if(!isNaN(i))return i}n=n.parentElement}}},{key:"getRenderRange",value:function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}},{key:"_rerender",value:function(e,t,n){var r,a,o=this.getRenderRange(e,t);e===this.elementTop(o.start)?(r=o.start,a=0):o.end-o.start>1&&(r=o.start+1,a=this.elementTop(r)-e);for(var s=0;;){for(var u=this.getRenderRange(e,t),c=!1,l=u.start;l0&&v.a.areIntersectingOrTouching(f[h-1],E)?f[h-1]=v.a.fromPositions(f[h-1].getStartPosition(),E.getEndPosition()):h=f.push(E)}catch(s){_.e(s)}finally{_.f()}S=[],x=0,k=f;case 8:if(!(x1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r=u?i=Math.max(i,u+c-r):(t[n++]=new z(r,i),r=u,i=c)}return t[n++]=new z(r,i),t}},{key:"_createHorizontalRangesFromClientRects",value:function(e,t){if(!e||0===e.length)return null;for(var n=[],r=0,i=e.length;rs)return null;if((t=Math.min(s,Math.max(0,t)))===(r=Math.min(s,Math.max(0,r)))&&n===i&&0===n){var u=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(u,a)}t!==r&&r>0&&0===i&&(r--,i=1073741824);var c=e.children[t].firstChild,l=e.children[r].firstChild;if(c&&l||(!c&&0===n&&t>0&&(c=e.children[t-1].firstChild,n=1073741824),!l&&0===i&&r>0&&(l=e.children[r-1].firstChild,i=1073741824)),!c||!l)return null;n=Math.min(c.textContent.length,Math.max(0,n)),i=Math.min(l.textContent.length,Math.max(0,i));var d=this._readClientRects(c,n,l,i,o);return this._createHorizontalRangesFromClientRects(d,a)}}]),e}(),G=n(154),Y=n(87),J=n(112),$=n(40),Q=!!S.g||!(S.d||D.i||D.k),X=!0,Z=D.f,ee=function(){function e(t,n){Object(l.a)(this,e),this._domNode=t,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=n}return Object(d.a)(e,[{key:"clientRectDeltaLeft",get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}]),e}(),te=function(){function e(t,n){Object(l.a)(this,e),this.themeType=n;var r=t.options,i=r.get(38);this.renderWhitespace=r.get(83),this.renderControlCharacters=r.get(77),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.useMonospaceOptimizations=i.isMonospace&&!r.get(26),this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=r.get(53),this.stopRenderingLineAfter=r.get(100),this.fontLigatures=r.get(39)}return Object(d.a)(e,[{key:"equals",value:function(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}]),e}(),ne=function(){function e(t){Object(l.a)(this,e),this._options=t,this._isMaybeInvalid=!0,this._renderedViewLine=null}return Object(d.a)(e,[{key:"getDomNode",value:function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}},{key:"setDomNode",value:function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=Object(C.b)(e)}},{key:"onContentChanged",value:function(){this._isMaybeInvalid=!0}},{key:"onTokensChanged",value:function(){this._isMaybeInvalid=!0}},{key:"onDecorationsChanged",value:function(){this._isMaybeInvalid=!0}},{key:"onOptionsChanged",value:function(e){this._isMaybeInvalid=!0,this._options=e}},{key:"onSelectionChanged",value:function(){return!(!Z&&this._options.themeType!==J.a.HIGH_CONTRAST&&"selection"!==this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}},{key:"renderLine",value:function(t,n,r,a){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var o=r.getViewLineRenderingData(t),s=this._options,u=G.a.filter(o.inlineDecorations,t,o.minColumn,o.maxColumn),c=null;if(Z||s.themeType===J.a.HIGH_CONTRAST||"selection"===this._options.renderWhitespace){var l,d=r.selections,p=Object(i.a)(d);try{for(p.s();!(l=p.n()).done;){var f=l.value;if(!(f.endLineNumbert)){var h=f.startLineNumber===t?f.startColumn:o.minColumn,g=f.endLineNumber===t?f.endColumn:o.maxColumn;h');var _=Object(Y.d)(m,a);a.appendASCIIString("");var v=null;return X&&Q&&o.isBasicASCII&&s.useMonospaceOptimizations&&0===_.containsForeignElements&&o.content.length<300&&m.lineTokens.getCount()<100&&(v=new re(this._renderedViewLine?this._renderedViewLine.domNode:null,m,_.characterMapping)),v||(v=oe(this._renderedViewLine?this._renderedViewLine.domNode:null,m,_.characterMapping,_.containsRTL,_.containsForeignElements)),this._renderedViewLine=v,!0}},{key:"layoutLine",value:function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}},{key:"getWidth",value:function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}},{key:"getWidthIsFast",value:function(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}},{key:"needsMonospaceFontCheck",value:function(){return!!this._renderedViewLine&&this._renderedViewLine instanceof re}},{key:"monospaceAssumptionsAreValid",value:function(){return this._renderedViewLine&&this._renderedViewLine instanceof re?this._renderedViewLine.monospaceAssumptionsAreValid():X}},{key:"onMonospaceAssumptionsInvalidated",value:function(){this._renderedViewLine&&this._renderedViewLine instanceof re&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}},{key:"getVisibleRangesForRange",value:function(e,t,n){if(!this._renderedViewLine)return null;e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));var r=0|this._renderedViewLine.input.stopRenderingLineAfter,i=!1;-1!==r&&e>r+1&&t>r+1&&(i=!0),-1!==r&&e>r+1&&(e=r+1),-1!==r&&t>r+1&&(t=r+1);var a=this._renderedViewLine.getVisibleRangesForRange(e,t,n);return a&&a.length>0?new W(i,a):null}},{key:"getColumnOfNodeOffset",value:function(e,t,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,n):1}}]),e}();ne.CLASS_NAME="view-line";var re=function(){function e(t,n,r){Object(l.a)(this,e),this.domNode=t,this.input=n,this._characterMapping=r,this._charWidth=n.spaceWidth}return Object(d.a)(e,[{key:"getWidth",value:function(){return this._getCharPosition(this._characterMapping.length)}},{key:"getWidthIsFast",value:function(){return!0}},{key:"monospaceAssumptionsAreValid",value:function(){if(!this.domNode)return X;var e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),X=!1),X}},{key:"toSlowRenderedLine",value:function(){return oe(this.domNode,this.input,this._characterMapping,!1,0)}},{key:"getVisibleRangesForRange",value:function(e,t,n){var r=this._getCharPosition(e),i=this._getCharPosition(t);return[new z(r,i-r)]}},{key:"_getCharPosition",value:function(e){var t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])}},{key:"getColumnOfNodeOffset",value:function(e,t,n){for(var r=t.textContent.length,i=-1;t;)t=t.previousSibling,i++;return this._characterMapping.partDataToCharOffset(i,r,n)+1}}]),e}(),ie=function(){function e(t,n,r,i,a){if(Object(l.a)(this,e),this.domNode=t,this.input=n,this._characterMapping=r,this._isWhitespaceOnly=/^\s*$/.test(n.lineContent),this._containsForeignElements=a,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(var o=0,s=this._characterMapping.length;o<=s;o++)this._pixelOffsetCache[o]=-1}}return Object(d.a)(e,[{key:"_getReadingTarget",value:function(e){return e.domNode.firstChild}},{key:"getWidth",value:function(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}},{key:"getWidthIsFast",value:function(){return-1!==this._cachedWidth}},{key:"getVisibleRangesForRange",value:function(e,t,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){var r=this._readPixelOffset(this.domNode,e,n);if(-1===r)return null;var i=this._readPixelOffset(this.domNode,t,n);return-1===i?null:[new z(r,i-r)]}return this._readVisibleRangesForRange(this.domNode,e,t,n)}},{key:"_readVisibleRangesForRange",value:function(e,t,n,r){if(t===n){var i=this._readPixelOffset(e,t,r);return-1===i?null:[new z(i,0)]}return this._readRawVisibleRangesForRange(e,t,n,r)}},{key:"_readPixelOffset",value:function(e,t,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();var r=this._getReadingTarget(e);return r.firstChild?r.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){var i=this._pixelOffsetCache[t];if(-1!==i)return i;var a=this._actualReadPixelOffset(e,t,n);return this._pixelOffsetCache[t]=a,a}return this._actualReadPixelOffset(e,t,n)}},{key:"_actualReadPixelOffset",value:function(e,t,n){if(0===this._characterMapping.length){var r=q.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.endNode);return r&&0!==r.length?r[0].left:-1}if(t===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var i=this._characterMapping.charOffsetToPartData(t-1),a=Y.a.getPartIndex(i),o=Y.a.getCharIndex(i),s=q.readHorizontalRanges(this._getReadingTarget(e),a,o,a,o,n.clientRectDeltaLeft,n.endNode);if(!s||0===s.length)return-1;var u=s[0].left;if(this.input.isBasicASCII){var c=this._characterMapping.getAbsoluteOffsets(),l=Math.round(this.input.spaceWidth*c[t-1]);if(Math.abs(l-u)<=1)return l}return u}},{key:"_readRawVisibleRangesForRange",value:function(e,t,n,r){if(1===t&&n===this._characterMapping.length)return[new z(0,this.getWidth())];var i=this._characterMapping.charOffsetToPartData(t-1),a=Y.a.getPartIndex(i),o=Y.a.getCharIndex(i),s=this._characterMapping.charOffsetToPartData(n-1),u=Y.a.getPartIndex(s),c=Y.a.getCharIndex(s);return q.readHorizontalRanges(this._getReadingTarget(e),a,o,u,c,r.clientRectDeltaLeft,r.endNode)}},{key:"getColumnOfNodeOffset",value:function(e,t,n){for(var r=t.textContent.length,i=-1;t;)t=t.previousSibling,i++;return this._characterMapping.partDataToCharOffset(i,r,n)+1}}]),e}(),ae=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(){return Object(l.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"_readVisibleRangesForRange",value:function(e,t,r,i){var a=Object(o.a)(Object(s.a)(n.prototype),"_readVisibleRangesForRange",this).call(this,e,t,r,i);if(!a||0===a.length||t===r||1===t&&r===this._characterMapping.length)return a;if(!this.input.containsRTL){var u=this._readPixelOffset(e,r,i);if(-1!==u){var c=a[a.length-1];c.left2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;Object(l.a)(this,e),this.element=t,this.type=n,this.mouseColumn=r,this.position=i,!a&&i&&(a=new le.a(i.lineNumber,i.column,i.lineNumber,i.column)),this.range=a,this.detail=o}return Object(d.a)(e,[{key:"toString",value:function(){return e.toString(this)}}],[{key:"_typeToString",value:function(e){return 1===e?"TEXTAREA":2===e?"GUTTER_GLYPH_MARGIN":3===e?"GUTTER_LINE_NUMBERS":4===e?"GUTTER_LINE_DECORATIONS":5===e?"GUTTER_VIEW_ZONE":6===e?"CONTENT_TEXT":7===e?"CONTENT_EMPTY":8===e?"CONTENT_VIEW_ZONE":9===e?"CONTENT_WIDGET":10===e?"OVERVIEW_RULER":11===e?"SCROLLBAR":12===e?"OVERLAY_WIDGET":"UNKNOWN"}},{key:"toString",value:function(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail}}]),e}(),ge=function(){function e(){Object(l.a)(this,e)}return Object(d.a)(e,null,[{key:"isTextArea",value:function(e){return 2===e.length&&3===e[0]&&6===e[1]}},{key:"isChildOfViewLines",value:function(e){return e.length>=4&&3===e[0]&&7===e[3]}},{key:"isStrictChildOfViewLines",value:function(e){return e.length>4&&3===e[0]&&7===e[3]}},{key:"isChildOfScrollableElement",value:function(e){return e.length>=2&&3===e[0]&&5===e[1]}},{key:"isChildOfMinimap",value:function(e){return e.length>=2&&3===e[0]&&8===e[1]}},{key:"isChildOfContentWidgets",value:function(e){return e.length>=4&&3===e[0]&&1===e[3]}},{key:"isChildOfOverflowingContentWidgets",value:function(e){return e.length>=1&&2===e[0]}},{key:"isChildOfOverlayWidgets",value:function(e){return e.length>=2&&3===e[0]&&4===e[1]}}]),e}(),me=function(){function e(t,n,r){Object(l.a)(this,e),this.model=t.model;var i=t.configuration.options;this.layoutInfo=i.get(124),this.viewDomNode=n.viewDomNode,this.lineHeight=i.get(53),this.stickyTabStops=i.get(99),this.typicalHalfwidthCharacterWidth=i.get(38).typicalHalfwidthCharacterWidth,this.lastRenderData=r,this._context=t,this._viewHelper=n}return Object(d.a)(e,[{key:"getZoneAtCoord",value:function(t){return e.getZoneAtCoord(this._context,t)}},{key:"getFullLineRangeAtCoord",value:function(e){if(this._context.viewLayout.isAfterLines(e)){var t=this._context.model.getLineCount(),n=this._context.model.getLineMaxColumn(t);return{range:new le.a(t,n,t,n),isAfterLines:!0}}var r=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.model.getLineMaxColumn(r);return{range:new le.a(r,1,r,i),isAfterLines:!1}}},{key:"getLineNumberAtVerticalOffset",value:function(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}},{key:"isAfterLines",value:function(e){return this._context.viewLayout.isAfterLines(e)}},{key:"isInTopPadding",value:function(e){return this._context.viewLayout.isInTopPadding(e)}},{key:"isInBottomPadding",value:function(e){return this._context.viewLayout.isInBottomPadding(e)}},{key:"getVerticalOffsetForLineNumber",value:function(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}},{key:"findAttribute",value:function(t,n){return e._findAttribute(t,n,this._viewHelper.viewDomNode)}},{key:"getLineWidth",value:function(e){return this._viewHelper.getLineWidth(e)}},{key:"visibleRangeForPosition",value:function(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}},{key:"getPositionFromDOMInfo",value:function(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}},{key:"getCurrentScrollTop",value:function(){return this._context.viewLayout.getCurrentScrollTop()}},{key:"getCurrentScrollLeft",value:function(){return this._context.viewLayout.getCurrentScrollLeft()}}],[{key:"getZoneAtCoord",value:function(e,t){var n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){var r,i=n.verticalOffset+n.height/2,a=e.model.getLineCount(),o=null,s=null;return n.afterLineNumber!==a&&(s=new ce.a(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(o=new ce.a(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),r=null===s?o:null===o?s:t1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=this.mouseColumn;return t&&t.column=t.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,be._getMouseColumn(this.mouseContentHorizontalOffset,t.typicalHalfwidthCharacterWidth))})),ve={isAfterLines:!0};function ye(e){return{isAfterLines:!1,horizontalDistanceToText:e}}var be=function(){function e(t,n){Object(l.a)(this,e),this._context=t,this._viewHelper=n}return Object(d.a)(e,[{key:"mouseTargetIsWidget",value:function(e){var t=e.target,n=j.collect(t,this._viewHelper.viewDomNode);return!(!ge.isChildOfContentWidgets(n)&&!ge.isChildOfOverflowingContentWidgets(n))||!!ge.isChildOfOverlayWidgets(n)}},{key:"createMouseTarget",value:function(t,n,r,i){var a=new me(this._context,this._viewHelper,t),o=new _e(a,n,r,i);try{return e._createMouseTarget(a,o,!1)}catch(s){return o.fulfill(0)}}},{key:"getMouseColumn",value:function(t,n){var r=this._context.configuration.options,i=r.get(124),a=this._context.viewLayout.getCurrentScrollLeft()+n.x-t.x-i.contentLeft;return e._getMouseColumn(a,r.get(38).typicalHalfwidthCharacterWidth)}}],[{key:"_createMouseTarget",value:function(t,n,r){if(null===n.target){if(r)return n.fulfill(0);var i=e._doHitTest(t,n);return i.position?e.createMouseTargetFromHitTestPosition(t,n,i.position.lineNumber,i.position.column):this._createMouseTarget(t,n.withTarget(i.hitTarget),!0)}var a=n,o=null;return(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o||e._hitTestContentWidget(t,a))||e._hitTestOverlayWidget(t,a))||e._hitTestMinimap(t,a))||e._hitTestScrollbarSlider(t,a))||e._hitTestViewZone(t,a))||e._hitTestMargin(t,a))||e._hitTestViewCursor(t,a))||e._hitTestTextArea(t,a))||e._hitTestViewLines(t,a,r))||e._hitTestScrollbar(t,a))||n.fulfill(0)}},{key:"_hitTestContentWidget",value:function(e,t){if(ge.isChildOfContentWidgets(t.targetPath)||ge.isChildOfOverflowingContentWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(9,null,null,n):t.fulfill(0)}return null}},{key:"_hitTestOverlayWidget",value:function(e,t){if(ge.isChildOfOverlayWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(12,null,null,n):t.fulfill(0)}return null}},{key:"_hitTestViewCursor",value:function(e,t){if(t.target){var n,r=e.lastRenderData.lastViewCursorsRenderData,a=Object(i.a)(r);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(t.target===o.domNode)return t.fulfill(6,o.position)}}catch(h){a.e(h)}finally{a.f()}}if(t.isInContentArea){var s,u=e.lastRenderData.lastViewCursorsRenderData,c=t.mouseContentHorizontalOffset,l=t.mouseVerticalOffset,d=Object(i.a)(u);try{for(d.s();!(s=d.n()).done;){var p=s.value;if(!(cp.contentLeft+p.width)){var f=e.getVerticalOffsetForLineNumber(p.position.lineNumber);if(f<=l&&l<=f+p.height)return t.fulfill(6,p.position)}}}catch(h){d.e(h)}finally{d.f()}}return null}},{key:"_hitTestViewZone",value:function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var r=t.isInContentArea?8:5;return t.fulfill(r,n.position,null,n)}return null}},{key:"_hitTestTextArea",value:function(e,t){return ge.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}},{key:"_hitTestMargin",value:function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),r=n.range.getStartPosition(),i=Math.abs(t.pos.x-t.editorPos.x),a={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:i};return(i-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,r,n.range,a):(i-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,r,n.range,a):(i-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,r,n.range,a))}return null}},{key:"_hitTestViewLines",value:function(t,n,r){if(!ge.isChildOfViewLines(n.targetPath))return null;if(t.isInTopPadding(n.mouseVerticalOffset))return n.fulfill(7,new ce.a(1,1),void 0,ve);if(t.isAfterLines(n.mouseVerticalOffset)||t.isInBottomPadding(n.mouseVerticalOffset)){var i=t.model.getLineCount(),a=t.model.getLineMaxColumn(i);return n.fulfill(7,new ce.a(i,a),void 0,ve)}if(r){if(ge.isStrictChildOfViewLines(n.targetPath)){var o=t.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(0===t.model.getLineLength(o)){var s=t.getLineWidth(o),u=ye(n.mouseContentHorizontalOffset-s);return n.fulfill(7,new ce.a(o,1),void 0,u)}var c=t.getLineWidth(o);if(n.mouseContentHorizontalOffset>=c){var l=ye(n.mouseContentHorizontalOffset-c),d=new ce.a(o,t.model.getLineMaxColumn(o));return n.fulfill(7,d,void 0,l)}}return n.fulfill(0)}var p=e._doHitTest(t,n);return p.position?e.createMouseTargetFromHitTestPosition(t,n,p.position.lineNumber,p.position.column):this._createMouseTarget(t,n.withTarget(p.hitTarget),!0)}},{key:"_hitTestMinimap",value:function(e,t){if(ge.isChildOfMinimap(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.model.getLineMaxColumn(n);return t.fulfill(11,new ce.a(n,r))}return null}},{key:"_hitTestScrollbarSlider",value:function(e,t){if(ge.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){var r=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(r);return t.fulfill(11,new ce.a(r,i))}}return null}},{key:"_hitTestScrollbar",value:function(e,t){if(ge.isChildOfScrollableElement(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.model.getLineMaxColumn(n);return t.fulfill(11,new ce.a(n,r))}return null}},{key:"_getMouseColumn",value:function(e,t){return e<0?1:Math.round(e/t)+1}},{key:"createMouseTargetFromHitTestPosition",value:function(e,t,n,r){var i=new ce.a(n,r),a=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>a){if(D.f&&1===i.column){var o=ye(t.mouseContentHorizontalOffset-a);return t.fulfill(7,new ce.a(n,e.model.getLineMaxColumn(n)),void 0,o)}var s=ye(t.mouseContentHorizontalOffset-a);return t.fulfill(7,i,void 0,s)}var u=e.visibleRangeForPosition(n,r);if(!u)return t.fulfill(0,i);var c=u.left;if(t.mouseContentHorizontalOffset===c)return t.fulfill(6,i);var l=[];if(l.push({offset:u.left,column:r}),r>1){var d=e.visibleRangeForPosition(n,r-1);d&&l.push({offset:d.left,column:r-1})}if(r=t.editorPos.y+e.layoutInfo.height&&(i=t.editorPos.y+e.layoutInfo.height-1);var a=new A(t.pos.x,i),o=this._actualDoHitTestWithCaretRangeFromPoint(e,a.toClientCoordinates());return o.position?o:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}},{key:"_actualDoHitTestWithCaretRangeFromPoint",value:function(e,t){var n,r=f.getShadowRoot(e.viewDomNode);if(!(n=r?"undefined"===typeof r.caretRangeFromPoint?function(e,t,n){var r=document.createRange(),i=e.elementFromPoint(t,n);if(null!==i){for(;i&&i.firstChild&&i.firstChild.nodeType!==i.firstChild.TEXT_NODE&&i.lastChild&&i.lastChild.firstChild;)i=i.lastChild;var a,o=i.getBoundingClientRect(),s=window.getComputedStyle(i,null).getPropertyValue("font"),u=i.innerText,c=o.left,l=0;if(t>o.left+o.width)l=u.length;else for(var d=De.getInstance(),p=0;p0?1:-1;Ee.a.setZoomLevel(n+r),t.preventDefault(),t.stopPropagation()}}}),{capture:!0,passive:!1})),o._context.addEventHandler(Object(a.a)(o)),o}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onCursorStateChanged",value:function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}},{key:"onFocusChanged",value:function(e){return!1}},{key:"onScrollChanged",value:function(e){return this._mouseDownOperation.onScrollChanged(),!1}},{key:"getTargetAtClientPoint",value:function(e,t){var n=new O(e,t).toPageCoordinates(),r=I(this.viewHelper.viewDomNode);return n.yr.y+r.height||n.xr.x+r.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),r,n,null)}},{key:"_createMouseTarget",value:function(e,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?e.target:null)}},{key:"_getMouseColumn",value:function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}},{key:"_onContextMenu",value:function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}},{key:"_onMouseMove",value:function(e){this._mouseDownOperation.isActive()||(e.timestampt.y+t.height){var c=r.getCurrentScrollTop()+(e.posy-t.y),l=me.getZoneAtCoord(this._context,c);if(l){var d=this._helpPositionJumpOverViewZone(l);if(d)return new he(null,13,i,d)}var p=r.getLineNumberAtVerticalOffset(c);return new he(null,13,i,new ce.a(p,n.getLineMaxColumn(p)))}var f=r.getLineNumberAtVerticalOffset(r.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new he(null,13,i,new ce.a(f,n.getLineMaxColumn(f))):null}},{key:"_findMousePosition",value:function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var r=this._createMouseTarget(e,t);if(!r.position)return null;if(8===r.type||5===r.type){var i=this._helpPositionJumpOverViewZone(r.detail);if(i)return new he(r.element,r.type,r.mouseColumn,i,null,r.detail)}return r}},{key:"_helpPositionJumpOverViewZone",value:function(e){var t=new ce.a(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,r=e.positionAfter;return n&&r?n.isBefore(t)?n:r:null}},{key:"_dispatchMouse",value:function(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}]),n}(m.a),ke=function(){function e(){Object(l.a)(this,e),this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}return Object(d.a)(e,[{key:"setModifiers",value:function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}},{key:"setStartButtons",value:function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}},{key:"setStartedOnLineNumbers",value:function(e){this._startedOnLineNumbers=e}},{key:"trySetCount",value:function(t,n){var r=(new Date).getTime();r-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=r,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)}},{key:"altKey",get:function(){return this._altKey}},{key:"ctrlKey",get:function(){return this._ctrlKey}},{key:"metaKey",get:function(){return this._metaKey}},{key:"shiftKey",get:function(){return this._shiftKey}},{key:"leftButton",get:function(){return this._leftButton}},{key:"middleButton",get:function(){return this._middleButton}},{key:"startedOnLineNumbers",get:function(){return this._startedOnLineNumbers}},{key:"count",get:function(){return this._lastMouseDownCount}}]),e}();ke.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var Te=n(170);function we(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}var Ae=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r,i){var a;return Object(l.a)(this,n),(a=t.call(this,e,r,i)).viewHelper.linesContentDomNode.style.touchAction="none",a._installGestureHandlerTimeout=window.setTimeout((function(){if(a._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=a.viewHelper.linesContentDomNode,t.target=a.viewHelper.linesContentDomNode,a.viewHelper.linesContentDomNode.addEventListener("pointerdown",(function(n){var r=n.pointerType;"mouse"!==r?"touch"===r?(a._lastPointerType="touch",e.addPointer(n.pointerId)):(a._lastPointerType="pen",t.addPointer(n.pointerId)):a._lastPointerType="mouse"})),a._register(f.addDisposableThrottledListener(a.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return a._onGestureChange(e)}),we)),a._register(f.addDisposableListener(a.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return a._onCaptureGestureTap(e)}),!0))}}),100),a._lastPointerType="mouse",a}return Object(d.a)(n,[{key:"_onMouseDown",value:function(e){"mouse"===this._lastPointerType&&Object(o.a)(Object(s.a)(n.prototype),"_onMouseDown",this).call(this,e)}},{key:"_onCaptureGestureTap",value:function(e){var t=this,n=new F(e,this.viewHelper.viewDomNode),r=this._createMouseTarget(n,!1);r.position&&this.viewController.moveTo(r.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout((function(){t.viewHelper.focusTextArea()}))}},{key:"_onGestureChange",value:function(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}},{key:"dispose",value:function(){window.clearTimeout(this._installGestureHandlerTimeout),Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}}]),n}(Se),Oe=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r,i){var a;Object(l.a)(this,n),(a=t.call(this,e,r,i))._register(x.b.addTarget(a.viewHelper.linesContentDomNode)),a._register(f.addDisposableListener(a.viewHelper.linesContentDomNode,x.a.Tap,(function(e){return a.onTap(e)}))),a._register(f.addDisposableListener(a.viewHelper.linesContentDomNode,x.a.Change,(function(e){return a.onChange(e)}))),a._register(f.addDisposableListener(a.viewHelper.linesContentDomNode,x.a.Contextmenu,(function(e){return a._onContextMenu(new F(e,a.viewHelper.viewDomNode),!1)}))),a._lastPointerType="mouse",a._register(f.addDisposableListener(a.viewHelper.linesContentDomNode,"pointerdown",(function(e){var t=e.pointerType;a._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));var o=new P(a.viewHelper.viewDomNode);return a._register(o.onPointerMoveThrottled(a.viewHelper.viewDomNode,(function(e){return a._onMouseMove(e)}),Ce(a.mouseTargetFactory),Se.MOUSE_MOVE_MINIMUM_TIME)),a._register(o.onPointerUp(a.viewHelper.viewDomNode,(function(e){return a._onMouseUp(e)}))),a._register(o.onPointerLeave(a.viewHelper.viewDomNode,(function(e){return a._onMouseLeave(e)}))),a._register(o.onPointerDown(a.viewHelper.viewDomNode,(function(e){return a._onMouseDown(e)}))),a}return Object(d.a)(n,[{key:"onTap",value:function(e){if(e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new F(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}}},{key:"onChange",value:function(e){"touch"===this._lastPointerType&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}},{key:"_onMouseDown",value:function(e){"touch"!==e.browserEvent.pointerType&&Object(o.a)(Object(s.a)(n.prototype),"_onMouseDown",this).call(this,e)}}]),n}(Se),Ne=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r,i){var a;return Object(l.a)(this,n),(a=t.call(this,e,r,i))._register(x.b.addTarget(a.viewHelper.linesContentDomNode)),a._register(f.addDisposableListener(a.viewHelper.linesContentDomNode,x.a.Tap,(function(e){return a.onTap(e)}))),a._register(f.addDisposableListener(a.viewHelper.linesContentDomNode,x.a.Change,(function(e){return a.onChange(e)}))),a._register(f.addDisposableListener(a.viewHelper.linesContentDomNode,x.a.Contextmenu,(function(e){return a._onContextMenu(new F(e,a.viewHelper.viewDomNode),!1)}))),a}return Object(d.a)(n,[{key:"onTap",value:function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new F(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)}},{key:"onChange",value:function(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}]),n}(Se),Ie=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r,i){var a;return Object(l.a)(this,n),a=t.call(this),S.c&&Te.a.pointerEvents?a.handler=a._register(new Oe(e,r,i)):window.TouchEvent?a.handler=a._register(new Ne(e,r,i)):window.navigator.pointerEnabled||window.PointerEvent?a.handler=a._register(new Ae(e,r,i)):a.handler=a._register(new Se(e,r,i)),a}return Object(d.a)(n,[{key:"getTargetAtClientPoint",value:function(e,t){return this.handler.getTargetAtClientPoint(e,t)}}]),n}(m.a),Fe=(n(360),n(14)),Le=n(190),Pe=n(109),Re=(n(361),function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(){return Object(l.a)(this,n),t.apply(this,arguments)}return n}(M)),Me=n(58),Be=n(25),je=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this))._context=e,r._readConfig(),r._lastCursorModelPosition=new ce.a(1,1),r._renderResult=null,r._context.addEventHandler(Object(a.a)(r)),r}return Object(d.a)(n,[{key:"_readConfig",value:function(){var e=this._context.configuration.options;this._lineHeight=e.get(53);var t=e.get(54);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(79);var n=e.get(124);this._lineNumbersLeft=n.lineNumbersLeft,this._lineNumbersWidth=n.lineNumbersWidth}},{key:"dispose",value:function(){this._context.removeEventHandler(this),this._renderResult=null,Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){return this._readConfig(),!0}},{key:"onCursorStateChanged",value:function(e){var t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),2===this._renderLineNumbers||3===this._renderLineNumbers}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesChanged",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return e.scrollTopChanged}},{key:"onZonesChanged",value:function(e){return!0}},{key:"_getLineRenderLineNumber",value:function(e){var t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new ce.a(e,1));if(1!==t.column)return"";var n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(2===this._renderLineNumbers){var r=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===r?''+n+"":String(r)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n||n%10===0?String(n):"":String(n)}},{key:"prepareRender",value:function(e){if(0!==this._renderLineNumbers){for(var t=S.d?this._lineHeight%2===0?" lh-even":" lh-odd":"",r=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,a='
',o=this._context.model.getLineCount(),s=[],u=r;u<=i;u++){var c=u-r;if(this._renderFinalNewline||u!==o||0!==this._context.model.getLineLength(u)){var l=this._getLineRenderLineNumber(u);s[c]=l?a+l+"
":""}else s[c]=""}this._renderResult=s}else this._renderResult=null}},{key:"render",value:function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}]),n}(Re);je.CLASS_NAME="line-numbers",Object(Be.f)((function(e,t){var n=e.getColor(Me.k);n&&t.addRule(".monaco-editor .line-numbers { color: ".concat(n,"; }"));var r=e.getColor(Me.b);r&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: ".concat(r,"; }"))}));var Ue=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(l.a)(this,n);var i=(r=t.call(this,e))._context.configuration.options,a=i.get(124);return r._canUseLayerHinting=!i.get(25),r._contentLeft=a.contentLeft,r._glyphMarginLeft=a.glyphMarginLeft,r._glyphMarginWidth=a.glyphMarginWidth,r._domNode=Object(C.b)(document.createElement("div")),r._domNode.setClassName(n.OUTER_CLASS_NAME),r._domNode.setPosition("absolute"),r._domNode.setAttribute("role","presentation"),r._domNode.setAttribute("aria-hidden","true"),r._glyphMarginBackgroundDomNode=Object(C.b)(document.createElement("div")),r._glyphMarginBackgroundDomNode.setClassName(n.CLASS_NAME),r._domNode.appendChild(r._glyphMarginBackgroundDomNode),r}return Object(d.a)(n,[{key:"dispose",value:function(){Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"getDomNode",value:function(){return this._domNode}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options,n=t.get(124);return this._canUseLayerHinting=!t.get(25),this._contentLeft=n.contentLeft,this._glyphMarginLeft=n.glyphMarginLeft,this._glyphMarginWidth=n.glyphMarginWidth,!0}},{key:"onScrollChanged",value:function(e){return Object(o.a)(Object(s.a)(n.prototype),"onScrollChanged",this).call(this,e)||e.scrollTopChanged}},{key:"prepareRender",value:function(e){}},{key:"render",value:function(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");var t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);var n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)}}]),n}(B);Ue.CLASS_NAME="glyph-margin",Ue.OUTER_CLASS_NAME="margin";var Ve=n(115),ze=n(152),He=function(){function e(t,n,r){Object(l.a)(this,e),this.top=t,this.left=n,this.width=r}return Object(d.a)(e,[{key:"setWidth",value:function(t){return new e(this.top,this.left,t)}}]),e}(),We=D.i,Ke=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r,i){var a;Object(l.a)(this,n),(a=t.call(this,e))._primaryCursorPosition=new ce.a(1,1),a._primaryCursorVisibleRange=null,a._viewController=r,a._viewHelper=i,a._scrollLeft=0,a._scrollTop=0;var o=a._context.configuration.options,s=o.get(124);a._setAccessibilityOptions(o),a._contentLeft=s.contentLeft,a._contentWidth=s.contentWidth,a._contentHeight=s.height,a._fontInfo=o.get(38),a._lineHeight=o.get(53),a._emptySelectionClipboard=o.get(28),a._copyWithSyntaxHighlighting=o.get(18),a._visibleTextArea=null,a._selections=[new E.a(1,1,1,1)],a._modelSelections=[new E.a(1,1,1,1)],a._lastRenderPosition=null,a.textArea=Object(C.b)(document.createElement("textarea")),j.write(a.textArea,6),a.textArea.setClassName("inputarea ".concat(ze.a)),a.textArea.setAttribute("wrap","off"),a.textArea.setAttribute("autocorrect","off"),a.textArea.setAttribute("autocapitalize","off"),a.textArea.setAttribute("autocomplete","off"),a.textArea.setAttribute("spellcheck","false"),a.textArea.setAttribute("aria-label",a._getAriaLabel(o)),a.textArea.setAttribute("tabindex",String(o.get(107))),a.textArea.setAttribute("role","textbox"),a.textArea.setAttribute("aria-roledescription",p.a("editor","editor")),a.textArea.setAttribute("aria-multiline","true"),a.textArea.setAttribute("aria-haspopup","false"),a.textArea.setAttribute("aria-autocomplete","both"),S.i&&o.get(75)&&a.textArea.setAttribute("readonly","true"),a.textAreaCover=Object(C.b)(document.createElement("div")),a.textAreaCover.setPosition("absolute");var u={getLineCount:function(){return a._context.model.getLineCount()},getLineMaxColumn:function(e){return a._context.model.getLineMaxColumn(e)},getValueInRange:function(e,t){return a._context.model.getValueInRange(e,t)}},c={getDataToCopy:function(e){var t=a._context.model.getPlainTextToCopy(a._modelSelections,a._emptySelectionClipboard,S.j),n=a._context.model.getEOL(),r=a._emptySelectionClipboard&&1===a._modelSelections.length&&a._modelSelections[0].isEmpty(),i=Array.isArray(t)?t:null,o=Array.isArray(t)?t.join(n):t,s=void 0,u=null;if(e&&(Le.a.forceCopyWithSyntaxHighlighting||a._copyWithSyntaxHighlighting&&o.length<65536)){var c=a._context.model.getRichTextToCopy(a._modelSelections,a._emptySelectionClipboard);c&&(s=c.html,u=c.mode)}return{isFromEmptySelection:r,multicursorText:i,text:o,html:s,mode:u}},getScreenReaderContent:function(e){if(1===a._accessibilitySupport){if(S.f){var t=a._selections[0];if(t.isEmpty()){var n=t.getStartPosition(),r=a._getWordBeforePosition(n);if(0===r.length&&(r=a._getCharacterBeforePosition(n)),r.length>0)return new Pe.b(r,r.length,r.length,n,n)}}return Pe.b.EMPTY}return Pe.a.fromEditorSelection(e,u,a._selections[0],a._accessibilityPageSize,0===a._accessibilitySupport)},deduceModelPosition:function(e,t,n){return a._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)}};return a._textAreaInput=a._register(new Le.c(c,a.textArea)),a._register(a._textAreaInput.onKeyDown((function(e){a._viewController.emitKeyDown(e)}))),a._register(a._textAreaInput.onKeyUp((function(e){a._viewController.emitKeyUp(e)}))),a._register(a._textAreaInput.onPaste((function(e){var t=!1,n=null,r=null;e.metadata&&(t=a._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,n="undefined"!==typeof e.metadata.multicursorText?e.metadata.multicursorText:null,r=e.metadata.mode),a._viewController.paste(e.text,t,n,r)}))),a._register(a._textAreaInput.onCut((function(){a._viewController.cut()}))),a._register(a._textAreaInput.onType((function(e){e.replaceCharCnt?a._viewController.replacePreviousChar(e.text,e.replaceCharCnt):a._viewController.type(e.text)}))),a._register(a._textAreaInput.onSelectionChangeRequest((function(e){a._viewController.setSelection(e)}))),a._register(a._textAreaInput.onCompositionStart((function(e){var t=a._selections[0].startLineNumber,n=a._selections[0].startColumn-(e.moveOneCharacterLeft?1:0);a._context.model.revealRange("keyboard",!0,new le.a(t,n,t,n),0,1);var r=a._viewHelper.visibleRangeForPositionRelativeToEditor(t,n);r&&(a._visibleTextArea=new He(a._context.viewLayout.getVerticalOffsetForLineNumber(t),r.left,We?0:1),a._render()),a.textArea.setClassName("inputarea ".concat(ze.a," ime-input")),a._viewController.compositionStart(),a._context.model.onCompositionStart()}))),a._register(a._textAreaInput.onCompositionUpdate((function(e){a._visibleTextArea=a._visibleTextArea.setWidth(function(e,t){var n=document.createElement("canvas").getContext("2d");n.font=function(e){return t="normal",n=e.fontWeight,r=e.fontSize,i=e.lineHeight,a=e.fontFamily,"".concat(t," normal ").concat(n," ").concat(r,"px / ").concat(i,"px ").concat(a);var t,n,r,i,a}(t);var r=n.measureText(e);return D.i?r.width+2:r.width}(e.data,a._fontInfo)),a._render()}))),a._register(a._textAreaInput.onCompositionEnd((function(){a._visibleTextArea=null,a._render(),a.textArea.setClassName("inputarea ".concat(ze.a)),a._viewController.compositionEnd(),a._context.model.onCompositionEnd()}))),a._register(a._textAreaInput.onFocus((function(){a._context.model.setHasFocus(!0)}))),a._register(a._textAreaInput.onBlur((function(){a._context.model.setHasFocus(!1)}))),a}return Object(d.a)(n,[{key:"dispose",value:function(){Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"_getWordBeforePosition",value:function(e){for(var t=this._context.model.getLineContent(e.lineNumber),n=Object(Ve.a)(this._context.configuration.options.get(110)),r=e.column,i=0;r>1;){var a=t.charCodeAt(r-2);if(0!==n.get(a)||i>50)return t.substring(r-1,e.column-1);i++,r--}return t.substring(0,e.column-1)}},{key:"_getCharacterBeforePosition",value:function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!Fe.E(t.charCodeAt(0)))return t}return""}},{key:"_getAriaLabel",value:function(e){return 1===e.get(2)?p.a("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",S.d?"Shift+Alt+F1":"Alt+F1"):e.get(4)}},{key:"_setAccessibilityOptions",value:function(e){this._accessibilitySupport=e.get(2);var t=e.get(3);2===this._accessibilitySupport&&t===$.g.accessibilityPageSize.defaultValue?this._accessibilityPageSize=100:this._accessibilityPageSize=t}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options,n=t.get(124);return this._setAccessibilityOptions(t),this._contentLeft=n.contentLeft,this._contentWidth=n.contentWidth,this._contentHeight=n.height,this._fontInfo=t.get(38),this._lineHeight=t.get(53),this._emptySelectionClipboard=t.get(28),this._copyWithSyntaxHighlighting=t.get(18),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(107))),S.i&&e.hasChanged(75)&&(t.get(75)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}},{key:"onCursorStateChanged",value:function(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}},{key:"onDecorationsChanged",value:function(e){return!0}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesChanged",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}},{key:"onZonesChanged",value:function(e){return!0}},{key:"isFocused",value:function(){return this._textAreaInput.isFocused()}},{key:"focusTextArea",value:function(){this._textAreaInput.focusTextArea()}},{key:"getLastRenderData",value:function(){return this._lastRenderPosition}},{key:"setAriaOptions",value:function(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}},{key:"prepareRender",value:function(e){this._primaryCursorPosition=new ce.a(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}},{key:"render",value:function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}},{key:"_render",value:function(){if(this._visibleTextArea)this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():S.f?this._renderInsideEditor(this._primaryCursorPosition,t,e,We?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,We?0:1,We?0:1)}}else this._renderAtTopLeft()}},{key:"_renderInsideEditor",value:function(e,t,n,r,i){this._lastRenderPosition=e;var a=this.textArea,o=this.textAreaCover;v.a.applyFontInfo(a,this._fontInfo),a.setTop(t),a.setLeft(n),a.setWidth(r),a.setHeight(i),o.setTop(0),o.setLeft(0),o.setWidth(0),o.setHeight(0)}},{key:"_renderAtTopLeft",value:function(){this._lastRenderPosition=null;var e=this.textArea,t=this.textAreaCover;if(v.a.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),We)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);var n=this._context.configuration.options;n.get(44)?t.setClassName("monaco-editor-background textAreaCover "+Ue.OUTER_CLASS_NAME):0!==n.get(54).renderType?t.setClassName("monaco-editor-background textAreaCover "+je.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}]),n}(B);var qe,Ge=n(108),Ye=function(){function e(t,n,r,i){Object(l.a)(this,e),this.configuration=t,this.viewModel=n,this.userInputEvents=r,this.commandDelegate=i}return Object(d.a)(e,[{key:"paste",value:function(e,t,n,r){this.commandDelegate.paste(e,t,n,r)}},{key:"type",value:function(e){this.commandDelegate.type(e)}},{key:"replacePreviousChar",value:function(e,t){this.commandDelegate.replacePreviousChar(e,t)}},{key:"compositionStart",value:function(){this.commandDelegate.startComposition()}},{key:"compositionEnd",value:function(){this.commandDelegate.endComposition()}},{key:"cut",value:function(){this.commandDelegate.cut()}},{key:"setSelection",value:function(e){Ge.b.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}},{key:"_validateViewColumn",value:function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||r?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}},{key:"_usualArgs",value:function(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}},{key:"moveTo",value:function(e){Ge.b.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_moveToSelect",value:function(e){Ge.b.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_columnSelect",value:function(e,t,n){e=this._validateViewColumn(e),Ge.b.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:n})}},{key:"_createCursor",value:function(e,t){e=this._validateViewColumn(e),Ge.b.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}},{key:"_lastCursorMoveToSelect",value:function(e){Ge.b.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_wordSelect",value:function(e){Ge.b.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_wordSelectDrag",value:function(e){Ge.b.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_lastCursorWordSelect",value:function(e){Ge.b.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_lineSelect",value:function(e){Ge.b.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_lineSelectDrag",value:function(e){Ge.b.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_lastCursorLineSelect",value:function(e){Ge.b.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_lastCursorLineSelectDrag",value:function(e){Ge.b.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}},{key:"_selectAll",value:function(){Ge.b.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}},{key:"_convertViewToModelPosition",value:function(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}},{key:"emitKeyDown",value:function(e){this.userInputEvents.emitKeyDown(e)}},{key:"emitKeyUp",value:function(e){this.userInputEvents.emitKeyUp(e)}},{key:"emitContextMenu",value:function(e){this.userInputEvents.emitContextMenu(e)}},{key:"emitMouseMove",value:function(e){this.userInputEvents.emitMouseMove(e)}},{key:"emitMouseLeave",value:function(e){this.userInputEvents.emitMouseLeave(e)}},{key:"emitMouseUp",value:function(e){this.userInputEvents.emitMouseUp(e)}},{key:"emitMouseDown",value:function(e){this.userInputEvents.emitMouseDown(e)}},{key:"emitMouseDrag",value:function(e){this.userInputEvents.emitMouseDrag(e)}},{key:"emitMouseDrop",value:function(e){this.userInputEvents.emitMouseDrop(e)}},{key:"emitMouseDropCanceled",value:function(){this.userInputEvents.emitMouseDropCanceled()}},{key:"emitMouseWheel",value:function(e){this.userInputEvents.emitMouseWheel(e)}}]),e}(),Je=function(){function e(t){Object(l.a)(this,e),this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=t}return Object(d.a)(e,[{key:"emitKeyDown",value:function(e){this.onKeyDown&&this.onKeyDown(e)}},{key:"emitKeyUp",value:function(e){this.onKeyUp&&this.onKeyUp(e)}},{key:"emitContextMenu",value:function(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseMove",value:function(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseLeave",value:function(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseDown",value:function(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseUp",value:function(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseDrag",value:function(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseDrop",value:function(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}},{key:"emitMouseDropCanceled",value:function(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}},{key:"emitMouseWheel",value:function(e){this.onMouseWheel&&this.onMouseWheel(e)}},{key:"_convertViewToModelMouseEvent",value:function(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}},{key:"_convertViewToModelMouseTarget",value:function(t){return e.convertViewToModelMouseTarget(t,this._coordinatesConverter)}}],[{key:"convertViewToModelMouseTarget",value:function(e,t){return new $e(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}]),e}(),$e=function(){function e(t,n,r,i,a,o){Object(l.a)(this,e),this.element=t,this.type=n,this.mouseColumn=r,this.position=i,this.range=a,this.detail=o}return Object(d.a)(e,[{key:"toString",value:function(){return he.toString(this)}}]),e}(),Qe=n(138),Xe=function(){function e(t){Object(l.a)(this,e),this._createLine=t,this._set(1,[])}return Object(d.a)(e,[{key:"flush",value:function(){this._set(1,[])}},{key:"_set",value:function(e,t){this._lines=t,this._rendLineNumberStart=e}},{key:"_get",value:function(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}},{key:"getStartLineNumber",value:function(){return this._rendLineNumberStart}},{key:"getEndLineNumber",value:function(){return this._rendLineNumberStart+this._lines.length-1}},{key:"getCount",value:function(){return this._lines.length}},{key:"getLine",value:function(e){var t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}},{key:"onLinesDeleted",value:function(e,t){if(0===this.getCount())return null;var n=this.getStartLineNumber(),r=this.getEndLineNumber();if(tr)return null;for(var a=0,o=0,s=n;s<=r;s++){var u=s-this._rendLineNumberStart;e<=s&&s<=t&&(0===o?(a=u,o=1):o++)}if(e=n&&a<=r&&(this._lines[a-this._rendLineNumberStart].onContentChanged(),i=!0);return i}},{key:"onLinesInserted",value:function(e,t){if(0===this.getCount())return null;var n=t-e+1,r=this.getStartLineNumber(),i=this.getEndLineNumber();if(e<=r)return this._rendLineNumberStart+=n,null;if(e>i)return null;if(n+e>i)return this._lines.splice(e-this._rendLineNumberStart,i-e+1);for(var a=[],o=0;on))for(var s=Math.max(t,o.fromLineNumber),u=Math.min(n,o.toLineNumber),c=s;c<=u;c++){var l=c-this._rendLineNumberStart;this._lines[l].onTokensChanged(),r=!0}}return r}}]),e}(),Ze=function(){function e(t){var n=this;Object(l.a)(this,e),this._host=t,this.domNode=this._createDomNode(),this._linesCollection=new Xe((function(){return n._host.createVisibleLine()}))}return Object(d.a)(e,[{key:"_createDomNode",value:function(){var e=Object(C.b)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}},{key:"onConfigurationChanged",value:function(e){return!!e.hasChanged(124)}},{key:"onFlushed",value:function(e){return this._linesCollection.flush(),!0}},{key:"onLinesChanged",value:function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}},{key:"onLinesDeleted",value:function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,r=t.length;nt){var o=t,s=Math.min(n,i.rendLineNumberStart-1);o<=s&&(this._insertLinesBefore(i,o,s,r,t),i.linesLength+=s-o+1)}else if(i.rendLineNumberStart0&&(this._removeLinesBefore(i,u),i.linesLength-=u)}if(i.rendLineNumberStart=t,i.rendLineNumberStart+i.linesLength-1n){var d=Math.max(0,n-i.rendLineNumberStart+1),p=i.linesLength-1-d+1;p>0&&(this._removeLinesAfter(i,p),i.linesLength-=p)}return this._finishRendering(i,!1,r),i}},{key:"_renderUntouchedLines",value:function(e,t,n,r,i){for(var a=e.rendLineNumberStart,o=e.lines,s=t;s<=n;s++){var u=a+s;o[s].layoutLine(u,r[u-i])}}},{key:"_insertLinesBefore",value:function(e,t,n,r,i){for(var a=[],o=0,s=t;s<=n;s++)a[o++]=this.host.createVisibleLine();e.lines=a.concat(e.lines)}},{key:"_removeLinesBefore",value:function(e,t){for(var n=0;n=0;s--){var u=t.lines[s];i[s]&&(u.setDomNode(o),o=o.previousSibling)}}},{key:"_finishRenderingInvalidLines",value:function(t,n,r){var i=document.createElement("div");e._ttPolicy&&(n=e._ttPolicy.createHTML(n)),i.innerHTML=n;for(var a=0;a'),r.appendASCIIString(i),r.appendASCIIString(""),!0)}},{key:"layoutLine",value:function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}]),e}(),rt=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(l.a)(this,n);var i=(r=t.call(this,e))._context.configuration.options.get(124);return r._contentWidth=i.contentWidth,r.domNode.setHeight(0),r}return Object(d.a)(n,[{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options.get(124);return this._contentWidth=t.contentWidth,Object(o.a)(Object(s.a)(n.prototype),"onConfigurationChanged",this).call(this,e)||!0}},{key:"onScrollChanged",value:function(e){return Object(o.a)(Object(s.a)(n.prototype),"onScrollChanged",this).call(this,e)||e.scrollWidthChanged}},{key:"_viewOverlaysRender",value:function(e){Object(o.a)(Object(s.a)(n.prototype),"_viewOverlaysRender",this).call(this,e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}]),n}(tt),it=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(l.a)(this,n);var i=(r=t.call(this,e))._context.configuration.options,a=i.get(124);return r._contentLeft=a.contentLeft,r.domNode.setClassName("margin-view-overlays"),r.domNode.setWidth(1),v.a.applyFontInfo(r.domNode,i.get(38)),r}return Object(d.a)(n,[{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options;v.a.applyFontInfo(this.domNode,t.get(38));var r=t.get(124);return this._contentLeft=r.contentLeft,Object(o.a)(Object(s.a)(n.prototype),"onConfigurationChanged",this).call(this,e)||!0}},{key:"onScrollChanged",value:function(e){return Object(o.a)(Object(s.a)(n.prototype),"onScrollChanged",this).call(this,e)||e.scrollHeightChanged}},{key:"_viewOverlaysRender",value:function(e){Object(o.a)(Object(s.a)(n.prototype),"_viewOverlaysRender",this).call(this,e);var t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}]),n}(tt),at=function e(t,n){Object(l.a)(this,e),this.top=t,this.left=n},ot=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r){var i;return Object(l.a)(this,n),(i=t.call(this,e))._viewDomNode=r,i._widgets={},i.domNode=Object(C.b)(document.createElement("div")),j.write(i.domNode,1),i.domNode.setClassName("contentWidgets"),i.domNode.setPosition("absolute"),i.domNode.setTop(0),i.overflowingContentWidgetsDomNode=Object(C.b)(document.createElement("div")),j.write(i.overflowingContentWidgetsDomNode,2),i.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),i}return Object(d.a)(n,[{key:"dispose",value:function(){Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this),this._widgets={}}},{key:"onConfigurationChanged",value:function(e){for(var t=0,n=Object.keys(this._widgets);t=r,l=s,d=i.viewportHeight-s>=r,p=e.left,f=t.left;return p+n>i.scrollLeft+i.viewportWidth&&(p=i.scrollLeft+i.viewportWidth-n),f+n>i.scrollLeft+i.viewportWidth&&(f=i.scrollLeft+i.viewportWidth-n),pa){var s=o-(a-r);o-=s,n-=s}if(o=22,E=l+i<=d.height-22;return this._fixedOverflowWidgets?{fitsAbove:D,aboveTop:Math.max(c,22),aboveLeft:m,fitsBelow:E,belowTop:l,belowLeft:b}:{fitsAbove:D,aboveTop:o,aboveLeft:g,fitsBelow:E,belowTop:s,belowLeft:y}}},{key:"_prepareRenderWidgetAtExactPositionOverflowing",value:function(e){return new at(e.top,e.left+this._contentLeft)}},{key:"_getTopAndBottomLeft",value:function(e){if(!this._viewRange)return[null,null];var t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];var n,r=t[0],a=t[0],o=Object(i.a)(t);try{for(o.s();!(n=o.n()).done;){var s=n.value;s.lineNumbera.lineNumber&&(a=s)}}catch(y){o.e(y)}finally{o.f()}var u,c=1073741824,l=Object(i.a)(r.ranges);try{for(l.s();!(u=l.n()).done;){var d=u.value;d.lefte.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}},{key:"prepareRender",value:function(e){this._renderData=this._prepareRenderWidget(e)}},{key:"render",value:function(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"===typeof this._actual.afterRender&&ut(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"===typeof this._actual.afterRender&&ut(this._actual.afterRender,this._actual,this._renderData.position)}}]),e}();function ut(e,t){try{for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i=this._renderData.length?"":this._renderData[n]}}]),n}(Re),pt=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(){return Object(l.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"_renderOne",value:function(e){var t="current-line"+(this._shouldRenderOther()?" current-line-both":"");return'
')}},{key:"_shouldRenderThis",value:function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}},{key:"_shouldRenderOther",value:function(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}]),n}(dt),ft=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(){return Object(l.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"_renderOne",value:function(e){var t="current-line"+(this._shouldRenderMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"");return'
')}},{key:"_shouldRenderMargin",value:function(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}},{key:"_shouldRenderThis",value:function(){return!0}},{key:"_shouldRenderOther",value:function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}]),n}(dt);Object(Be.f)((function(e,t){lt=!1;var n=e.getColor(Me.i);if(n&&(t.addRule(".monaco-editor .view-overlays .current-line { background-color: ".concat(n,"; }")),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: ".concat(n,"; border: none; }"))),!n||n.isTransparent()||e.defines(Me.j)){var r=e.getColor(Me.j);r&&(lt=!0,t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid ".concat(r,"; }")),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ".concat(r,"; }")),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));n(364);var ht=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(l.a)(this,n),(r=t.call(this))._context=e;var i=r._context.configuration.options;return r._lineHeight=i.get(53),r._typicalHalfwidthCharacterWidth=i.get(38).typicalHalfwidthCharacterWidth,r._renderResult=null,r._context.addEventHandler(Object(a.a)(r)),r}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),this._renderResult=null,Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options;return this._lineHeight=t.get(53),this._typicalHalfwidthCharacterWidth=t.get(38).typicalHalfwidthCharacterWidth,!0}},{key:"onDecorationsChanged",value:function(e){return!0}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesChanged",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return e.scrollTopChanged||e.scrollWidthChanged}},{key:"onZonesChanged",value:function(e){return!0}},{key:"prepareRender",value:function(e){for(var t=e.getDecorationsInViewport(),n=[],r=0,i=0,a=t.length;it.options.zIndex)return 1;var n=e.options.className,r=t.options.className;return nr?1:le.a.compareRangesUsingStarts(e.range,t.range)}));for(var s=e.visibleRange.startLineNumber,u=e.visibleRange.endLineNumber,c=[],l=s;l<=u;l++){c[l-s]=""}this._renderWholeLineDecorations(e,n,c),this._renderNormalDecorations(e,n,c),this._renderResult=c}},{key:"_renderWholeLineDecorations",value:function(e,t,n){for(var r=String(this._lineHeight),i=e.visibleRange.startLineNumber,a=e.visibleRange.endLineNumber,o=0,s=t.length;o',l=Math.max(u.range.startLineNumber,i),d=Math.min(u.range.endLineNumber,a),p=l;p<=d;p++){n[p-i]+=c}}}},{key:"_renderNormalDecorations",value:function(e,t,n){for(var r=String(this._lineHeight),i=e.visibleRange.startLineNumber,a=null,o=!1,s=null,u=0,c=t.length;u';o[d]+=m}}}}},{key:"render",value:function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}]),n}(Re),gt=n(98),mt=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,a){var o;Object(l.a)(this,n);var s=(o=t.call(this,e))._context.configuration.options,u=s.get(87),c=s.get(61),d=s.get(30),p=s.get(90),h={listenOnDomNode:i.domNode,className:"editor-scrollable "+Object(Be.e)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:u.vertical,horizontal:u.horizontal,verticalHasArrows:u.verticalHasArrows,horizontalHasArrows:u.horizontalHasArrows,verticalScrollbarSize:u.verticalScrollbarSize,verticalSliderSize:u.verticalSliderSize,horizontalScrollbarSize:u.horizontalScrollbarSize,horizontalSliderSize:u.horizontalSliderSize,handleMouseWheel:u.handleMouseWheel,alwaysConsumeMouseWheel:u.alwaysConsumeMouseWheel,arrowSize:u.arrowSize,mouseWheelScrollSensitivity:c,fastScrollSensitivity:d,scrollPredominantAxis:p,scrollByPage:u.scrollByPage};o.scrollbar=o._register(new gt.c(r.domNode,h,o._context.viewLayout.getScrollable())),j.write(o.scrollbar.getDomNode(),5),o.scrollbarDomNode=Object(C.b)(o.scrollbar.getDomNode()),o.scrollbarDomNode.setPosition("absolute"),o._setLayout();var g=function(e,t,n){var r={};if(t){var i=e.scrollTop;i&&(r.scrollTop=o._context.viewLayout.getCurrentScrollTop()+i,e.scrollTop=0)}if(n){var a=e.scrollLeft;a&&(r.scrollLeft=o._context.viewLayout.getCurrentScrollLeft()+a,e.scrollLeft=0)}o._context.model.setScrollPosition(r,1)};return o._register(f.addDisposableListener(i.domNode,"scroll",(function(e){return g(i.domNode,!0,!0)}))),o._register(f.addDisposableListener(r.domNode,"scroll",(function(e){return g(r.domNode,!0,!1)}))),o._register(f.addDisposableListener(a.domNode,"scroll",(function(e){return g(a.domNode,!0,!1)}))),o._register(f.addDisposableListener(o.scrollbarDomNode.domNode,"scroll",(function(e){return g(o.scrollbarDomNode.domNode,!0,!1)}))),o}return Object(d.a)(n,[{key:"dispose",value:function(){Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"_setLayout",value:function(){var e=this._context.configuration.options,t=e.get(124);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(59).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}},{key:"getOverviewRulerLayoutInfo",value:function(){return this.scrollbar.getOverviewRulerLayoutInfo()}},{key:"getDomNode",value:function(){return this.scrollbarDomNode}},{key:"delegateVerticalScrollbarMouseDown",value:function(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}},{key:"onConfigurationChanged",value:function(e){if(e.hasChanged(87)||e.hasChanged(61)||e.hasChanged(30)){var t=this._context.configuration.options,n=t.get(87),r=t.get(61),i=t.get(30),a=t.get(90),o={handleMouseWheel:n.handleMouseWheel,mouseWheelScrollSensitivity:r,fastScrollSensitivity:i,scrollPredominantAxis:a};this.scrollbar.updateOptions(o)}return e.hasChanged(124)&&this._setLayout(),!0}},{key:"onScrollChanged",value:function(e){return!0}},{key:"onThemeChanged",value:function(e){return this.scrollbar.updateClassName("editor-scrollable "+Object(Be.e)(this._context.theme.type)),!0}},{key:"prepareRender",value:function(e){}},{key:"render",value:function(e){this.scrollbar.renderNow()}}]),n}(B),_t=(n(366),function e(t,n,r){Object(l.a)(this,e),this.startLineNumber=+t,this.endLineNumber=+n,this.className=String(r)}),vt=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(){return Object(l.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"_render",value:function(e,t,n){for(var r=[],i=e;i<=t;i++){r[i-e]=[]}if(0===n.length)return r;n.sort((function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',o=[],s=t;s<=n;s++){var u=s-t,c=r[u];0===c.length?o[u]="":o[u]='
=this._renderResult.length?"":this._renderResult[n]}}]),n}(vt),bt=(n(367),function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(l.a)(this,n),(r=t.call(this))._context=e,r._primaryLineNumber=0;var i=r._context.configuration.options,o=i.get(125),s=i.get(38);return r._lineHeight=i.get(53),r._spaceWidth=s.spaceWidth,r._enabled=i.get(78),r._activeIndentEnabled=i.get(47),r._maxIndentLeft=-1===o.wrappingColumn?-1:o.wrappingColumn*s.typicalHalfwidthCharacterWidth,r._renderResult=null,r._context.addEventHandler(Object(a.a)(r)),r}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),this._renderResult=null,Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options,n=t.get(125),r=t.get(38);return this._lineHeight=t.get(53),this._spaceWidth=r.spaceWidth,this._enabled=t.get(78),this._activeIndentEnabled=t.get(47),this._maxIndentLeft=-1===n.wrappingColumn?-1:n.wrappingColumn*r.typicalHalfwidthCharacterWidth,!0}},{key:"onCursorStateChanged",value:function(e){var t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0)}},{key:"onDecorationsChanged",value:function(e){return!0}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesChanged",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return e.scrollTopChanged}},{key:"onZonesChanged",value:function(e){return!0}},{key:"onLanguageConfigurationChanged",value:function(e){return!0}},{key:"prepareRender",value:function(e){if(this._enabled){var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,r=this._context.model.getTextModelOptions().indentSize*this._spaceWidth,i=e.scrollWidth,a=this._lineHeight,o=this._context.model.getLinesIndentGuides(t,n),s=0,u=0,c=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var l=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);s=l.startLineNumber,u=l.endLineNumber,c=l.indent}for(var d=[],p=t;p<=n;p++){var f=s<=p&&p<=u,h=p-t,g=o[h],m="";if(g>=1)for(var _=e.visibleRangeForPosition(new ce.a(p,1)),v=_?_.left:0,y=1;y<=g;y++){if(m+='
'),(v+=r)>i||this._maxIndentLeft>0&&v>this._maxIndentLeft)break}d[h]=m}this._renderResult=d}else this._renderResult=null}},{key:"render",value:function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}]),n}(Re));Object(Be.f)((function(e,t){var n=e.getColor(Me.h);n&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ".concat(n," inset; }"));var r=e.getColor(Me.a)||n;r&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ".concat(r," inset; }"))}));n(368);var Dt=function(){function e(){Object(l.a)(this,e),this._currentVisibleRange=new le.a(1,1,1,1)}return Object(d.a)(e,[{key:"getCurrentVisibleRange",value:function(){return this._currentVisibleRange}},{key:"setCurrentVisibleRange",value:function(e){this._currentVisibleRange=e}}]),e}(),Et=function e(t,n,r,i,a,o){Object(l.a)(this,e),this.lineNumber=t,this.startColumn=n,this.endColumn=r,this.startScrollTop=i,this.stopScrollTop=a,this.scrollType=o,this.type="range",this.minLineNumber=t,this.maxLineNumber=t},Ct=function e(t,n,r,i){Object(l.a)(this,e),this.selections=t,this.startScrollTop=n,this.stopScrollTop=r,this.scrollType=i,this.type="selections";for(var a=t[0].startLineNumber,o=t[0].endLineNumber,s=1,u=t.length;s0&&(this._horizontalRevealRequest=new Ct(e.selections,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;var r=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(n,r),!0}},{key:"onScrollChanged",value:function(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){var t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}},{key:"onTokensChanged",value:function(e){return this._visibleLines.onTokensChanged(e)}},{key:"onZonesChanged",value:function(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}},{key:"onThemeChanged",value:function(e){return this._onOptionsMaybeChanged()}},{key:"getPositionFromDOMInfo",value:function(e,t){var n=this._getViewLineDomNode(e);if(null===n)return null;var r=this._getLineNumberFor(n);if(-1===r)return null;if(r<1||r>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(r))return new ce.a(r,1);var i=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();if(ra)return null;var o=this._visibleLines.getVisibleLine(r).getColumnOfNodeOffset(r,e,t),s=this._context.model.getLineMinColumn(r);return on?-1:this._visibleLines.getVisibleLine(e).getWidth()}},{key:"linesVisibleRangesForRange",value:function(e,t){if(this.shouldRender())return null;var n=e.endLineNumber,r=le.a.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!r)return null;var i=[],a=0,o=new ee(this.domNode.domNode,this._textRangeRestingSpot),s=0;t&&(s=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new ce.a(r.startLineNumber,1)).lineNumber);for(var u=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber(),l=r.startLineNumber;l<=r.endLineNumber;l++)if(!(lc)){var d=l===r.startLineNumber?r.startColumn:1,p=l===r.endLineNumber?r.endColumn:this._context.model.getLineMaxColumn(l),f=this._visibleLines.getVisibleLine(l).getVisibleRangesForRange(d,p,o);if(f){if(t&&lthis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t,n,new ee(this.domNode.domNode,this._textRangeRestingSpot))}},{key:"visibleRangeForPosition",value:function(e){var t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new H(t.outsideRenderedLine,t.ranges[0].left):null}},{key:"updateLineWidths",value:function(){this._updateLineWidths(!1)}},{key:"_updateLineWidthsFast",value:function(){return this._updateLineWidths(!0)}},{key:"_updateLineWidthsSlow",value:function(){this._updateLineWidths(!1)}},{key:"_updateLineWidths",value:function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),r=1,i=!0,a=t;a<=n;a++){var o=this._visibleLines.getVisibleLine(a);!e||o.getWidthIsFast()?r=Math.max(r,o.getWidth()):i=!1}return i&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(r),i}},{key:"_checkMonospaceFontAssumptions",value:function(){for(var e=-1,t=-1,n=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber(),i=n;i<=r;i++){var a=this._visibleLines.getVisibleLine(i);if(a.needsMonospaceFontCheck()){var o=a.getWidth();o>t&&(t=o,e=i)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(var s=n;s<=r;s++){this._visibleLines.getVisibleLine(s).onMonospaceAssumptionsInvalidated()}}},{key:"prepareRender",value:function(){throw new Error("Not supported")}},{key:"render",value:function(){throw new Error("Not supported")}},{key:"renderText",value:function(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){var t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var n=this._computeScrollLeftToReveal(t);n&&(this._isViewportWrapping||this._ensureMaxLineWidth(n.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:n.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),S.d&&!this._asyncCheckMonospaceFontAssumptions.isScheduled())for(var r=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),a=r;a<=i;a++){if(this._visibleLines.getVisibleLine(a).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");var o=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-o),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}},{key:"_ensureMaxLineWidth",value:function(e){var t=Math.ceil(e);this._maxLineWidth0){for(var p=r[0].startLineNumber,f=r[0].endLineNumber,h=1,g=r.length;hl){if(!a)return-1;u=o}else if(5===i||6===i)if(6===i&&c<=o&&s<=d)u=c;else{var v=o-Math.max(5*this._lineHeight,.2*l),y=s-l;u=Math.max(y,v)}else if(1===i||2===i)if(2===i&&c<=o&&s<=d)u=c;else{var b=(o+s)/2;u=Math.max(0,b-l/2)}else u=this._computeMinimumScrolling(c,d,o,s,3===i,4===i);return u}},{key:"_computeScrollLeftToReveal",value:function(e){var t=this._context.viewLayout.getCurrentViewport(),r=t.left,a=r+t.width,o=1073741824,s=0;if("range"===e.type){var u=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!u)return null;var c,l=Object(i.a)(u.ranges);try{for(l.s();!(c=l.n()).done;){var d=c.value;o=Math.min(o,d.left),s=Math.max(s,d.left+d.width)}}catch(y){l.e(y)}finally{l.f()}}else{var p,f=Object(i.a)(e.selections);try{for(f.s();!(p=f.n()).done;){var h=p.value;if(h.startLineNumber!==h.endLineNumber)return null;var g=this._visibleRangesForLineRange(h.startLineNumber,h.startColumn,h.endColumn);if(!g)return null;var m,_=Object(i.a)(g.ranges);try{for(_.s();!(m=_.n()).done;){var v=m.value;o=Math.min(o,v.left),s=Math.max(s,v.left+v.width)}}catch(y){_.e(y)}finally{_.f()}}}catch(y){f.e(y)}finally{f.f()}}return o=Math.max(0,o-n.HORIZONTAL_EXTRA_PX),s+=this._revealHorizontalRightPadding,"selections"===e.type&&s-o>t.width?null:{scrollLeft:this._computeMinimumScrolling(r,a,o,s),maxHorizontalOffset:s}}},{key:"_computeMinimumScrolling",value:function(e,t,n,r,i,a){i=!!i,a=!!a;var o=(t|=0)-(e|=0);return(r|=0)-(n|=0)t?Math.max(0,r-o):e:n}}]),n}(B);St.HORIZONTAL_EXTRA_PX=30;n(369);var xt=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(l.a)(this,n),(r=t.call(this))._context=e;var i=r._context.configuration.options.get(124);return r._decorationsLeft=i.decorationsLeft,r._decorationsWidth=i.decorationsWidth,r._renderResult=null,r._context.addEventHandler(Object(a.a)(r)),r}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),this._renderResult=null,Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options.get(124);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}},{key:"onDecorationsChanged",value:function(e){return!0}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesChanged",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return e.scrollTopChanged}},{key:"onZonesChanged",value:function(e){return!0}},{key:"_getDecorations",value:function(e){for(var t=e.getDecorationsInViewport(),n=[],r=0,i=0,a=t.length;i
',a=[],o=t;o<=n;o++){for(var s=o-t,u=r[s],c="",l=0,d=u.length;l';i[o]=u}this._renderResult=i}},{key:"render",value:function(e,t){return this._renderResult?this._renderResult[t-e]:""}}]),n}(vt)),Tt=(n(371),function(){function e(t,n,r,i){Object(l.a)(this,e),this.r=e._clamp(t),this.g=e._clamp(n),this.b=e._clamp(r),this.a=e._clamp(i)}return Object(d.a)(e,[{key:"equals",value:function(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}}],[{key:"_clamp",value:function(e){return e<0?0:e>255?255:0|e}}]),e}());Tt.Empty=new Tt(0,0,0,0);var wt=n(18),At=function(){function e(){var t=this;Object(l.a)(this,e),this._onDidChange=new g.a,this.onDidChange=this._onDidChange.event,this._updateColorMap(),wt.D.onDidChange((function(e){e.changedColorMap&&t._updateColorMap()}))}return Object(d.a)(e,[{key:"_updateColorMap",value:function(){var e=wt.D.getColorMap();if(!e)return this._colors=[Tt.Empty],void(this._backgroundIsLight=!0);this._colors=[Tt.Empty];for(var t=1;t=.5,this._onDidChange.fire(void 0)}},{key:"getColor",value:function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}},{key:"backgroundIsLight",value:function(){return this._backgroundIsLight}}],[{key:"getInstance",value:function(){return this._INSTANCE||(this._INSTANCE=new e),this._INSTANCE}}]),e}();At._INSTANCE=null;var Ot=n(61),Nt=n(10),It=function(){for(var e=[],t=32;t<=126;t++)e.push(t);return e.push(65533),e}(),Ft=n(136),Lt=function(){function e(t,n){Object(l.a)(this,e),this.scale=n,this.charDataNormal=e.soften(t,.8),this.charDataLight=e.soften(t,50/60)}return Object(d.a)(e,[{key:"renderChar",value:function(e,t,n,r,i,a,o,s,u){var c=1*this.scale,l=2*this.scale,d=u?1:l;if(t+c>e.width||n+d>e.height)console.warn("bad render request outside image data");else for(var p=s?this.charDataLight:this.charDataNormal,f=function(e,t){return(e-=32)<0||e>96?t<=2?(e+96)%96:95:e}(r,o),h=4*e.width,g=a.r,m=a.g,_=a.b,v=i.r-g,y=i.g-m,b=i.b-_,D=e.data,E=f*c*l,C=n*h+4*t,S=0;Se.width||n+c>e.height)console.warn("bad render request outside image data");else for(var l=4*e.width,d=i.r,p=i.g,f=i.b,h=d+.5*(r.r-d),g=p+.5*(r.g-p),m=f+.5*(r.b-f),_=e.data,v=n*l+4*t,y=0;y>1]=Rt[e[n]]<<4|15&Rt[e[n+1]];return t},Bt={1:Object(Pt.a)((function(){return Mt("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")})),2:Object(Pt.a)((function(){return Mt("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")}))},jt=function(){function e(){Object(l.a)(this,e)}return Object(d.a)(e,null,[{key:"create",value:function(t,n){return this.lastCreated&&t===this.lastCreated.scale&&n===this.lastFontFamily?this.lastCreated:(r=Bt[t]?new Lt(Bt[t](),t):e.createFromSampleData(e.createSampleData(n).data,t),this.lastFontFamily=n,this.lastCreated=r,r);var r}},{key:"createSampleData",value:function(e){var t=document.createElement("canvas"),n=t.getContext("2d");t.style.height="".concat(16,"px"),t.height=16,t.width=960,t.style.width="960px",n.fillStyle="#ffffff",n.font="bold ".concat(16,"px ",e),n.textBaseline="middle";var r,a=0,o=Object(i.a)(It);try{for(o.s();!(r=o.n()).done;){var s=r.value;n.fillText(String.fromCharCode(s),a,8),a+=10}}catch(u){o.e(u)}finally{o.f()}return n.getImageData(0,0,960,16)}},{key:"createFromSampleData",value:function(t,n){if(61440!==t.length)throw new Error("Unexpected source in MinimapCharRenderer");var r=e._downsample(t,n);return new Lt(r,n)}},{key:"_downsampleChar",value:function(e,t,n,r,i){for(var a=1*i,o=2*i,s=r,u=0,c=0;c0)for(var c=255/s,l=0;l0,S=Math.floor(t.canvasInnerHeight/t.minimapLineHeight);return new e(c,l,C,D,E,y,1,Math.min(s,S))}if(o&&r!==s){var x=r-n+1;p=Math.floor(x*g/h)}else{var k=a/_;p=Math.floor(k*g/h)}f=t.scrollBeyondLastLine?(s-1)*g/h:Math.max(0,s*g/h-p);var T=(f=Math.min(t.minimapHeight-p,f))/(l-a),w=c*T,A=0;t.scrollBeyondLastLine&&(A=a/_-1);if(m>=s+A){return new e(c,l,f>0,T,w,p,1,s)}var O=Math.max(1,Math.floor(n-w*h/g));return d&&d.scrollHeight===l&&(d.scrollTop>c&&(O=Math.min(O,d.startLineNumber)),d.scrollTop0&&this.minimapLines[n-1]>=e;)n--;for(var r=this.modelLineToMinimapLine(t)-1;r+1t)return null}return[n+1,r+1]}},{key:"decorationLineRangeToMinimapLineRange",value:function(e,t){var n=this.modelLineToMinimapLine(e),r=this.modelLineToMinimapLine(t);return e!==t&&r===n&&(r===this.minimapLines.length?n>1&&n--:r++),[n,r]}},{key:"onLinesDeleted",value:function(e){for(var t=e.toLineNumber-e.fromLineNumber+1,n=this.minimapLines.length,r=0,i=this.minimapLines.length-1;i>=0&&!(this.minimapLines[i]=0&&!(this.minimapLines[n]1){for(var d=0,p=s-1;d0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:n,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(r)}},{key:"_recreateLineSampling",value:function(){this._minimapSelections=null;var e=Boolean(this._samplingState),t=qt.compute(this.options,this._context.model.getLineCount(),this._samplingState),n=Object(r.a)(t,2),a=n[0],o=n[1];if(this._samplingState=a,e&&this._samplingState){var s,u=Object(i.a)(o);try{for(u.s();!(s=u.n()).done;){var c=s.value;switch(c.type){case"deleted":this._actual.onLinesDeleted(c.deleteFromLineNumber,c.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(c.insertFromLineNumber,c.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}}catch(l){u.e(l)}finally{u.f()}}}},{key:"getLineCount",value:function(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}},{key:"getRealLineCount",value:function(){return this._context.model.getLineCount()}},{key:"getLineContent",value:function(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}},{key:"getMinimapLinesRenderingData",value:function(e,t,n){if(this._samplingState){for(var r=[],i=0,a=t-e+1;i140)a._model.setScrollTop(i.scrollTop);else{var s=e-n;a._model.setScrollTop(i.getDesiredScrollTopFromDelta(s))}};r!==n&&o(r,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,w.b,(function(e){return o(e.posy,e.posx)}),(function(){a._slider.toggleClassName("active",!1)}))}},{key:"scrollDueToTouchEvent",value:function(e){var t=this._domNode.domNode.getBoundingClientRect().top,n=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(n)}},{key:"dispose",value:function(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"_getMinimapDomNodeClassName",value:function(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}},{key:"getDomNode",value:function(){return this._domNode}},{key:"_applyLayout",value:function(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}},{key:"_getBuffer",value:function(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Kt(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}},{key:"onDidChangeOptions",value:function(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}},{key:"onSelectionChanged",value:function(){return this._renderDecorations=!0,!0}},{key:"onDecorationsChanged",value:function(){return this._renderDecorations=!0,!0}},{key:"onFlushed",value:function(){return this._lastRenderData=null,!0}},{key:"onLinesChanged",value:function(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}},{key:"onLinesDeleted",value:function(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}},{key:"onLinesInserted",value:function(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}},{key:"onScrollChanged",value:function(){return this._renderDecorations=!0,!0}},{key:"onThemeChanged",value:function(){return this._selectionColor=this._theme.getColor(Nt.Ub),this._renderDecorations=!0,!0}},{key:"onTokensChanged",value:function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}},{key:"onTokensColorsChanged",value:function(){return this._lastRenderData=null,this._buffers=null,!0}},{key:"onZonesChanged",value:function(){return this._lastRenderData=null,!0}},{key:"render",value:function(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");var t=zt.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);var n=e.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,r=Math.min(this._model.options.minimapWidth,Math.round(n*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(r),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-r),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}},{key:"renderDecorations",value:function(e){if(this._renderDecorations){this._renderDecorations=!1;var t=this._model.getSelections(),n=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber),r=this._model.options,i=r.canvasInnerWidth,a=r.canvasInnerHeight,o=this._model.options.minimapLineHeight,s=this._model.options.minimapCharWidth,u=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,i,a);for(var l=new Map,d=0;dthis._model.options.canvasInnerHeight)){var d=t.get(a),p=!d;if(!d){var f=this._model.getLineContent(a);d=[$.h];for(var h=1;ha?d.length-1:v-1;if(E>0){var C=d[E]-D||2;this.renderDecoration(e,r,D,l,C,o)}p&&this.renderLineHighlight(e,r,l,o)}}},{key:"renderLineHighlight",value:function(e,t,n,r){e.fillStyle=t&&t.transparent(.5).toString()||"",e.fillRect($.h,n,e.canvas.width,r)}},{key:"renderDecoration",value:function(e,t,n,r,i,a){e.fillStyle=t&&t.toString()||"",e.fillRect(n,r,i,a)}},{key:"renderLines",value:function(e){var t=e.startLineNumber,i=e.endLineNumber,a=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var o=this._lastRenderData._get();return new Wt(e,o.imageData,o.lines)}var s=this._getBuffer();if(!s)return null;for(var u=n._renderUntouchedLines(s,t,i,a,this._lastRenderData),c=Object(r.a)(u,3),l=c[0],d=c[1],p=c[2],f=this._model.getMinimapLinesRenderingData(t,i,p),h=this._model.getOptions().tabSize,g=this._model.options.backgroundColor,m=this._model.tokensColorTracker,_=m.backgroundIsLight(),v=this._model.options.renderMinimap,y=this._model.options.charRenderer(),b=this._model.options.fontScale,D=this._model.options.minimapCharWidth,E=(1===v?2:3)*b,C=a>E?Math.floor((a-E)/2):0,S=0,x=[],k=0,T=i-t+1;k=0&&xg)return;var x=f.charCodeAt(v);if(9===x){var k=c-(v+y)%c;y+=k-1,_+=k*i}else if(32===x)_+=i;else for(var T=Fe.D(x)?2:1,w=0;wg)return}}}]),n}(m.a);Object(Be.f)((function(e,t){var n=e.getColor(Nt.Rb);n&&t.addRule(".monaco-editor .minimap > canvas { opacity: ".concat(n.rgba.a,"; will-change: opacity; }"));var r=e.getColor(Nt.Wb);r&&t.addRule(".monaco-editor .minimap-slider .minimap-slider-horizontal { background: ".concat(r,"; }"));var i=e.getColor(Nt.Xb);i&&t.addRule(".monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ".concat(i,"; }"));var a=e.getColor(Nt.Vb);a&&t.addRule(".monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ".concat(a,"; }"));var o=e.getColor(Nt.nc);o&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: ".concat(o," -6px 0 6px -6px inset; }"))}));n(372);var Jt=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(l.a)(this,n);var i=(r=t.call(this,e))._context.configuration.options.get(124);return r._widgets={},r._verticalScrollbarWidth=i.verticalScrollbarWidth,r._minimapWidth=i.minimap.minimapWidth,r._horizontalScrollbarHeight=i.horizontalScrollbarHeight,r._editorHeight=i.height,r._editorWidth=i.width,r._domNode=Object(C.b)(document.createElement("div")),j.write(r._domNode,4),r._domNode.setClassName("overlayWidgets"),r}return Object(d.a)(n,[{key:"dispose",value:function(){Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this),this._widgets={}}},{key:"getDomNode",value:function(){return this._domNode}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options.get(124);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}},{key:"addWidget",value:function(e){var t=Object(C.b)(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()}},{key:"setWidgetPosition",value:function(e,t){var n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)}},{key:"removeWidget",value: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()}}},{key:"_renderWidget",value: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()}},{key:"prepareRender",value:function(e){}},{key:"render",value:function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),n=0,r=t.length;n=3){var i=Math.floor(r/3),a=Math.floor(r/3),o=r-i-a,s=e+i;return[[0,e,s,e,e+i+o,e,s,e],[0,i,o,i+o,a,i+o+a,o+a,i+o+a]]}if(2===n){var u=Math.floor(r/2),c=r-u;return[[0,e,e,e,e+u,e,e,e],[0,u,u,u,c,u+c,u+c,u+c]]}return[[0,e,e,e,e,e,e,e],[0,r,r,r,r,r,r,r]]}},{key:"equals",value:function(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}]),e}(),Xt=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this,e))._domNode=Object(C.b)(document.createElement("canvas")),r._domNode.setClassName("decorationsOverviewRuler"),r._domNode.setPosition("absolute"),r._domNode.setLayerHinting(!0),r._domNode.setContain("strict"),r._domNode.setAttribute("aria-hidden","true"),r._updateSettings(!1),r._tokensColorTrackerListener=wt.D.onDidChange((function(e){e.changedColorMap&&r._updateSettings(!0)})),r._cursorPositions=[],r}return Object(d.a)(n,[{key:"dispose",value:function(){Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this),this._tokensColorTrackerListener.dispose()}},{key:"_updateSettings",value:function(e){var t=new Qt(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}},{key:"onConfigurationChanged",value:function(e){return this._updateSettings(!1)}},{key:"onCursorStateChanged",value:function(e){this._cursorPositions=[];for(var t=0,n=e.selections.length;tt&&(k=t-s),S=k-s,x=k+s}S>v+1||D!==m?(0!==y&&u.fillRect(c[m],_,l[m],v-_),m=D,_=S,v=x):x>v&&(v=x)}u.fillRect(c[m],_,l[m],v-_)}if(!this._settings.hideCursor&&this._settings.cursorColor){var T=2*this._settings.pixelRatio|0,w=T/2|0,A=this._settings.x[7],O=this._settings.w[7];u.fillStyle=this._settings.cursorColor;for(var N=-100,I=-100,F=0,L=this._cursorPositions.length;Ft&&(R=t-w);var M=R-w,B=M+T;M>I+1?(0!==F&&u.fillRect(A,N,O,I-N),N=M,I=B):B>I&&(I=B)}u.fillRect(A,N,O,I-N)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,t),u.stroke(),u.moveTo(0,0),u.lineTo(e,0),u.stroke())}else this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"")}}]),n}(B),Zt=n(191),en=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r){var i;Object(l.a)(this,n),(i=t.call(this))._context=e;var o=i._context.configuration.options;return i._domNode=Object(C.b)(document.createElement("canvas")),i._domNode.setClassName(r),i._domNode.setPosition("absolute"),i._domNode.setLayerHinting(!0),i._domNode.setContain("strict"),i._zoneManager=new Zt.b((function(e){return i._context.viewLayout.getVerticalOffsetForLineNumber(e)})),i._zoneManager.setDOMWidth(0),i._zoneManager.setDOMHeight(0),i._zoneManager.setOuterHeight(i._context.viewLayout.getScrollHeight()),i._zoneManager.setLineHeight(o.get(53)),i._zoneManager.setPixelRatio(o.get(122)),i._context.addEventHandler(Object(a.a)(i)),i}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options;return e.hasChanged(53)&&(this._zoneManager.setLineHeight(t.get(53)),this._render()),e.hasChanged(122)&&(this._zoneManager.setPixelRatio(t.get(122)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}},{key:"onFlushed",value:function(e){return this._render(),!0}},{key:"onScrollChanged",value:function(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}},{key:"onZonesChanged",value:function(e){return this._render(),!0}},{key:"getDomNode",value:function(){return this._domNode.domNode}},{key:"setLayout",value:function(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);var t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}},{key:"setZones",value:function(e){this._zoneManager.setZones(e),this._render()}},{key:"_render",value:function(){if(0===this._zoneManager.getOuterHeight())return!1;var e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),r=this._zoneManager.getId2Color(),i=this._domNode.domNode.getContext("2d");return i.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(i,n,r,e),!0}},{key:"_renderOneLane",value:function(e,t,n,r){var a,o=0,s=0,u=0,c=Object(i.a)(t);try{for(c.s();!(a=c.n()).done;){var l=a.value,d=l.colorId,p=l.from,f=l.to;d!==o?(e.fillRect(0,s,r,u-s),o=d,e.fillStyle=n[o],s=p,u=f):u>=p?u=Math.max(u,f):(e.fillRect(0,s,r,u-s),s=p,u=f)}}catch(h){c.e(h)}finally{c.f()}e.fillRect(0,s,r,u-s)}}]),n}(M),tn=(n(373),function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(l.a)(this,n),(r=t.call(this,e)).domNode=Object(C.b)(document.createElement("div")),r.domNode.setAttribute("role","presentation"),r.domNode.setAttribute("aria-hidden","true"),r.domNode.setClassName("view-rulers"),r._renderedRulers=[];var i=r._context.configuration.options;return r._rulers=i.get(86),r._typicalHalfwidthCharacterWidth=i.get(38).typicalHalfwidthCharacterWidth,r}return Object(d.a)(n,[{key:"dispose",value:function(){Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options;return this._rulers=t.get(86),this._typicalHalfwidthCharacterWidth=t.get(38).typicalHalfwidthCharacterWidth,!0}},{key:"onScrollChanged",value:function(e){return e.scrollHeightChanged}},{key:"prepareRender",value:function(e){}},{key:"_ensureRulersCount",value:function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e0;){var i=Object(C.b)(document.createElement("div"));i.setClassName("view-ruler"),i.setWidth(n),this.domNode.appendChild(i),this._renderedRulers.push(i),r--}else for(var a=e-t;a>0;){var o=this._renderedRulers.pop();this.domNode.removeChild(o),a--}}},{key:"render",value:function(e){this._ensureRulersCount();for(var t=0,n=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}},{key:"getDomNode",value:function(){return this._domNode}},{key:"_updateWidth",value:function(){var e=this._context.configuration.options.get(124);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options.get(87);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}},{key:"onScrollChanged",value:function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}},{key:"prepareRender",value:function(e){}},{key:"render",value:function(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}]),n}(B);Object(Be.f)((function(e,t){var n=e.getColor(Nt.nc);n&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: ".concat(n," 0 6px 6px -6px inset; }"))}));n(375);var rn=function e(t){Object(l.a)(this,e),this.left=t.left,this.width=t.width,this.startStyle=null,this.endStyle=null},an=function e(t,n){Object(l.a)(this,e),this.lineNumber=t,this.ranges=n};function on(e){return new rn(e)}function sn(e){return new an(e.lineNumber,e.ranges.map(on))}var un=D.f,cn=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(l.a)(this,n),(r=t.call(this))._previousFrameVisibleRangesWithStyle=[],r._context=e;var i=r._context.configuration.options;return r._lineHeight=i.get(53),r._roundedSelection=i.get(85),r._typicalHalfwidthCharacterWidth=i.get(38).typicalHalfwidthCharacterWidth,r._selections=[],r._renderResult=null,r._context.addEventHandler(Object(a.a)(r)),r}return Object(d.a)(n,[{key:"dispose",value:function(){this._context.removeEventHandler(this),this._renderResult=null,Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options;return this._lineHeight=t.get(53),this._roundedSelection=t.get(85),this._typicalHalfwidthCharacterWidth=t.get(38).typicalHalfwidthCharacterWidth,!0}},{key:"onCursorStateChanged",value:function(e){return this._selections=e.selections.slice(0),!0}},{key:"onDecorationsChanged",value:function(e){return!0}},{key:"onFlushed",value:function(e){return!0}},{key:"onLinesChanged",value:function(e){return!0}},{key:"onLinesDeleted",value:function(e){return!0}},{key:"onLinesInserted",value:function(e){return!0}},{key:"onScrollChanged",value:function(e){return e.scrollTopChanged}},{key:"onZonesChanged",value:function(e){return!0}},{key:"_visibleRangesHaveGaps",value:function(e){for(var t=0,n=e.length;t1)return!0}return!1}},{key:"_enrichVisibleRangesWithStyle",value:function(e,t,n){var r=this._typicalHalfwidthCharacterWidth/4,i=null,a=null;if(n&&n.length>0&&t.length>0){var o=t[0].lineNumber;if(o===e.startLineNumber)for(var s=0;!i&&s=0;c--)n[c].lineNumber===u&&(a=n[c].ranges[0]);i&&!i.startStyle&&(i=null),a&&!a.startStyle&&(a=null)}for(var l=0,d=t.length;l0){var _=t[l-1].ranges[0].left,v=t[l-1].ranges[0].left+t[l-1].ranges[0].width;ln(f-_)_&&(g.top=1),ln(h-v)'}},{key:"_actualRenderOneSelection",value:function(e,t,r,i){if(0!==i.length)for(var a=!!i[0].ranges[0].startStyle,o=this._lineHeight.toString(),s=(this._lineHeight-1).toString(),u=i[0].lineNumber,c=i[i.length-1].lineNumber,l=0,d=i.length;l1,l)}}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map((function(e){var t=Object(r.a)(e,2);return t[0]+t[1]}))}},{key:"render",value:function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]}}]),n}(Re);function ln(e){return e<0?-e:e}cn.SELECTION_CLASS_NAME="selected-text",cn.SELECTION_TOP_LEFT="top-left-radius",cn.SELECTION_BOTTOM_LEFT="bottom-left-radius",cn.SELECTION_TOP_RIGHT="top-right-radius",cn.SELECTION_BOTTOM_RIGHT="bottom-right-radius",cn.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",cn.ROUNDED_PIECE_WIDTH=10,Object(Be.f)((function(e,t){var n=e.getColor(Nt.S);n&&t.addRule(".monaco-editor .focused .selected-text { background-color: ".concat(n,"; }"));var r=e.getColor(Nt.K);r&&t.addRule(".monaco-editor .selected-text { background-color: ".concat(r,"; }"));var i=e.getColor(Nt.T);i&&!i.isTransparent()&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: ".concat(i,"; }"))}));n(376);var dn=function e(t,n,r,i,a,o){Object(l.a)(this,e),this.top=t,this.left=n,this.width=r,this.height=i,this.textContent=a,this.textContentClassName=o},pn=function(){function e(t){Object(l.a)(this,e),this._context=t;var n=this._context.configuration.options,r=n.get(38);this._cursorStyle=n.get(21),this._lineHeight=n.get(53),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(24),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Object(C.b)(document.createElement("div")),this._domNode.setClassName("cursor ".concat(ze.a)),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),v.a.applyFontInfo(this._domNode,r),this._domNode.setDisplay("none"),this._position=new ce.a(1,1),this._lastRenderedContent="",this._renderData=null}return Object(d.a)(e,[{key:"getDomNode",value:function(){return this._domNode}},{key:"getPosition",value:function(){return this._position}},{key:"show",value:function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}},{key:"hide",value:function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options,n=t.get(38);return this._cursorStyle=t.get(21),this._lineHeight=t.get(53),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(24),this._typicalHalfwidthCharacterWidth),v.a.applyFontInfo(this._domNode,n),!0}},{key:"onCursorPositionChanged",value:function(e){return this._position=e,!0}},{key:"_prepareRender",value:function(e){var t="";if(this._cursorStyle===$.i.Line||this._cursorStyle===$.i.LineThin){var n,r=e.visibleRangeForPosition(this._position);if(!r||r.outsideRenderedLine)return null;if(this._cursorStyle===$.i.Line){if((n=f.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2))>2){var i=this._context.model.getLineContent(this._position.lineNumber),a=Fe.K(i,this._position.column-1);t=i.substr(this._position.column-1,a)}}else n=f.computeScreenAwareSize(1);var o=r.left;n>=2&&o>=1&&(o-=1);var s=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new dn(s,o,n,this._lineHeight,t,"")}var u=this._context.model.getLineContent(this._position.lineNumber),c=Fe.K(u,this._position.column-1),l=e.linesVisibleRangesForRange(new le.a(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+c),!1);if(!l||0===l.length)return null;var d=l[0];if(d.outsideRenderedLine||0===d.ranges.length)return null;var p=d.ranges[0],h=p.width<1?this._typicalHalfwidthCharacterWidth:p.width,g="";if(this._cursorStyle===$.i.Block){var m=this._context.model.getViewLineData(this._position.lineNumber);t=u.substr(this._position.column-1,c);var _=m.tokens.findTokenIndexAtOffset(this._position.column-1);g=m.tokens.getClassName(_)}var v=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,y=this._lineHeight;return this._cursorStyle!==$.i.Underline&&this._cursorStyle!==$.i.UnderlineThin||(v+=this._lineHeight-2,y=2),new dn(v,p.left,h,y,t,g)}},{key:"prepareRender",value:function(e){this._renderData=this._prepareRender(e)}},{key:"render",value:function(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName("cursor ".concat(ze.a," ").concat(this._renderData.textContentClassName)),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}]),e}(),fn=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(l.a)(this,n);var i=(r=t.call(this,e))._context.configuration.options;return r._readOnly=i.get(75),r._cursorBlinking=i.get(19),r._cursorStyle=i.get(21),r._cursorSmoothCaretAnimation=i.get(20),r._selectionIsEmpty=!0,r._isComposingInput=!1,r._isVisible=!1,r._primaryCursor=new pn(r._context),r._secondaryCursors=[],r._renderData=[],r._domNode=Object(C.b)(document.createElement("div")),r._domNode.setAttribute("role","presentation"),r._domNode.setAttribute("aria-hidden","true"),r._updateDomClassName(),r._domNode.appendChild(r._primaryCursor.getDomNode()),r._startCursorBlinkAnimation=new T.e,r._cursorFlatBlinkInterval=new T.c,r._blinkingEnabled=!1,r._editorHasFocus=!1,r._updateBlinking(),r}return Object(d.a)(n,[{key:"dispose",value:function(){Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}},{key:"getDomNode",value:function(){return this._domNode}},{key:"onCompositionStart",value:function(e){return this._isComposingInput=!0,this._updateBlinking(),!0}},{key:"onCompositionEnd",value:function(e){return this._isComposingInput=!1,this._updateBlinking(),!0}},{key:"onConfigurationChanged",value:function(e){var t=this._context.configuration.options;this._readOnly=t.get(75),this._cursorBlinking=t.get(19),this._cursorStyle=t.get(21),this._cursorSmoothCaretAnimation=t.get(20),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(var n=0,r=this._secondaryCursors.length;nt.length)for(var a=this._secondaryCursors.length-t.length,o=0;o.001&&this._context.configuration.updatePixelRatio()}}}},{key:"delegateVerticalScrollbarMouseDown",value:function(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}},{key:"restoreState",value:function(e){this._context.model.setScrollPosition({scrollTop:e.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},1)}},{key:"getOffsetForColumn",value:function(e,t){var n=this._context.model.validateModelPosition({lineNumber:e,column:t}),r=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(n);this._flushAccumulatedAndRenderNow();var i=this._viewLines.visibleRangeForPosition(new ce.a(r.lineNumber,r.column));return i?i.left:-1}},{key:"getTargetAtClientPoint",value:function(e,t){var n=this._pointerHandler.getTargetAtClientPoint(e,t);return n?Je.convertViewToModelMouseTarget(n,this._context.model.coordinatesConverter):null}},{key:"createOverviewRuler",value:function(e){return new en(this._context,e)}},{key:"change",value:function(e){this._viewZones.changeViewZones(e),this._scheduleRender()}},{key:"render",value:function(e,t){if(t){this._viewLines.forceShouldRender();var n,r=Object(i.a)(this._viewParts);try{for(r.s();!(n=r.n()).done;){n.value.forceShouldRender()}}catch(a){r.e(a)}finally{r.f()}}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}},{key:"focus",value:function(){this._textAreaHandler.focusTextArea()}},{key:"isFocused",value:function(){return this._textAreaHandler.isFocused()}},{key:"setAriaOptions",value:function(e){this._textAreaHandler.setAriaOptions(e)}},{key:"addContentWidget",value:function(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}},{key:"layoutContentWidget",value:function(e){var t=e.position&&e.position.range||null;if(null===t){var n=e.position?e.position.position:null;null!==n&&(t=new le.a(n.lineNumber,n.column,n.lineNumber,n.column))}var r=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,r),this._scheduleRender()}},{key:"removeContentWidget",value:function(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}},{key:"addOverlayWidget",value:function(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}},{key:"layoutOverlayWidget",value:function(e){var t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}},{key:"removeOverlayWidget",value:function(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}]),n}(M);var bn=function(){function e(t){Object(l.a)(this,e),this._selTrackedRange=null,this._trackSelection=!0,this._setState(t,new de.f(new le.a(1,1,1,1),0,new ce.a(1,1),0),new de.f(new le.a(1,1,1,1),0,new ce.a(1,1),0))}return Object(d.a)(e,[{key:"dispose",value:function(e){this._removeTrackedRange(e)}},{key:"startTrackingSelection",value:function(e){this._trackSelection=!0,this._updateTrackedRange(e)}},{key:"stopTrackingSelection",value:function(e){this._trackSelection=!1,this._removeTrackedRange(e)}},{key:"_updateTrackedRange",value:function(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}},{key:"_removeTrackedRange",value:function(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}},{key:"asCursorState",value:function(){return new de.d(this.modelState,this.viewState)}},{key:"readSelectionFromMarkers",value:function(e){var t=e.model._getTrackedRange(this._selTrackedRange);return 0===this.modelState.selection.getDirection()?new E.a(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new E.a(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}},{key:"ensureValidState",value:function(e){this._setState(e,this.modelState,this.viewState)}},{key:"setState",value:function(e,t,n){this._setState(e,t,n)}},{key:"_setState",value:function(e,t,n){if(t){var r=e.model.validateRange(t.selectionStart),i=t.selectionStart.equalsRange(r)?t.selectionStartLeftoverVisibleColumns:0,a=e.model.validatePosition(t.position),o=t.position.equals(a)?t.leftoverVisibleColumns:0;t=new de.f(r,i,a,o)}else{if(!n)return;var s=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(n.selectionStart)),u=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(n.position));t=new de.f(s,n.selectionStartLeftoverVisibleColumns,u,n.leftoverVisibleColumns)}if(n){var c=e.coordinatesConverter.validateViewRange(n.selectionStart,t.selectionStart),l=e.coordinatesConverter.validateViewPosition(n.position,t.position);n=new de.f(c,t.selectionStartLeftoverVisibleColumns,l,t.leftoverVisibleColumns)}else{var d=e.coordinatesConverter.convertModelPositionToViewPosition(new ce.a(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),p=e.coordinatesConverter.convertModelPositionToViewPosition(new ce.a(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),f=new le.a(d.lineNumber,d.column,p.lineNumber,p.column),h=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);n=new de.f(f,t.selectionStartLeftoverVisibleColumns,h,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)}}]),e}(),Dn=function(){function e(t){Object(l.a)(this,e),this.context=t,this.primaryCursor=new bn(t),this.secondaryCursors=[],this.lastAddedCursorIndex=0}return Object(d.a)(e,[{key:"dispose",value:function(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}},{key:"startTrackingSelections",value:function(){this.primaryCursor.startTrackingSelection(this.context);for(var e=0,t=this.secondaryCursors.length;en)for(var a=t-n,o=0;o=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}},{key:"_getAll",value:function(){var e=[];e[0]=this.primaryCursor;for(var t=0,n=this.secondaryCursors.length;tp&&x.index--}}catch(k){S.e(k)}finally{S.f()}e.splice(p,1),t.splice(d,1),this._removeSecondaryCursor(p-1),a--}}}}}}]),e}(),En=n(188),Cn=n(132),Sn=function e(){Object(l.a)(this,e),this.type=0},xn=function e(){Object(l.a)(this,e),this.type=1},kn=function(){function e(t){Object(l.a)(this,e),this.type=2,this._source=t}return Object(d.a)(e,[{key:"hasChanged",value:function(e){return this._source.hasChanged(e)}}]),e}(),Tn=function e(t,n){Object(l.a)(this,e),this.type=3,this.selections=t,this.modelSelections=n},wn=function e(t){Object(l.a)(this,e),this.type=4,t?(this.affectsMinimap=t.affectsMinimap,this.affectsOverviewRuler=t.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)},An=function e(){Object(l.a)(this,e),this.type=5},On=function e(t){Object(l.a)(this,e),this.type=6,this.isFocused=t},Nn=function e(){Object(l.a)(this,e),this.type=7},In=function e(){Object(l.a)(this,e),this.type=8},Fn=function e(t,n){Object(l.a)(this,e),this.type=9,this.fromLineNumber=t,this.toLineNumber=n},Ln=function e(t,n){Object(l.a)(this,e),this.type=10,this.fromLineNumber=t,this.toLineNumber=n},Pn=function e(t,n){Object(l.a)(this,e),this.type=11,this.fromLineNumber=t,this.toLineNumber=n},Rn=function e(t,n,r,i,a,o){Object(l.a)(this,e),this.type=12,this.source=t,this.range=n,this.selections=r,this.verticalType=i,this.revealHorizontal=a,this.scrollType=o},Mn=function e(t){Object(l.a)(this,e),this.type=13,this.scrollWidth=t.scrollWidth,this.scrollLeft=t.scrollLeft,this.scrollHeight=t.scrollHeight,this.scrollTop=t.scrollTop,this.scrollWidthChanged=t.scrollWidthChanged,this.scrollLeftChanged=t.scrollLeftChanged,this.scrollHeightChanged=t.scrollHeightChanged,this.scrollTopChanged=t.scrollTopChanged},Bn=function e(){Object(l.a)(this,e),this.type=14},jn=function e(t){Object(l.a)(this,e),this.type=15,this.ranges=t},Un=function e(){Object(l.a)(this,e),this.type=16},Vn=function e(){Object(l.a)(this,e),this.type=17},zn=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(){var e;return Object(l.a)(this,n),(e=t.call(this))._onEvent=e._register(new g.a),e.onEvent=e._onEvent.event,e._eventHandlers=[],e._viewEventQueue=null,e._isConsumingViewEventQueue=!1,e._collector=null,e._collectorCnt=0,e._outgoingEvents=[],e}return Object(d.a)(n,[{key:"emitOutgoingEvent",value:function(e){this._addOutgoingEvent(e),this._emitOugoingEvents()}},{key:"_addOutgoingEvent",value:function(e){for(var t=0,n=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;var e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}},{key:"addViewEventHandler",value:function(e){for(var t=0,n=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOugoingEvents()}},{key:"emitSingleViewEvent",value:function(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}},{key:"_emitMany",value:function(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}},{key:"_consumeViewEventQueue",value:function(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}},{key:"_doConsumeQueue",value:function(){for(;this._viewEventQueue;){var e=this._viewEventQueue;this._viewEventQueue=null;var t,n=this._eventHandlers.slice(0),r=Object(i.a)(n);try{for(r.s();!(t=r.n()).done;){t.value.handleEvents(e)}}catch(a){r.e(a)}finally{r.f()}}}}]),n}(m.a),Hn=function(){function e(){Object(l.a)(this,e),this.viewEvents=[],this.outgoingEvents=[]}return Object(d.a)(e,[{key:"emitViewEvent",value:function(e){this.viewEvents.push(e)}},{key:"emitOutgoingEvent",value:function(e){this.outgoingEvents.push(e)}}]),e}(),Wn=function(){function e(t,n,r,i){Object(l.a)(this,e),this.kind=0,this._oldContentWidth=t,this._oldContentHeight=n,this.contentWidth=r,this.contentHeight=i,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}return Object(d.a)(e,[{key:"isNoOp",value:function(){return!this.contentWidthChanged&&!this.contentHeightChanged}},{key:"merge",value:function(t){return 0!==t.kind?this:new e(this._oldContentWidth,this._oldContentHeight,t.contentWidth,t.contentHeight)}}]),e}(),Kn=function(){function e(t,n){Object(l.a)(this,e),this.kind=1,this.oldHasFocus=t,this.hasFocus=n}return Object(d.a)(e,[{key:"isNoOp",value:function(){return this.oldHasFocus===this.hasFocus}},{key:"merge",value:function(t){return 1!==t.kind?this:new e(this.oldHasFocus,t.hasFocus)}}]),e}(),qn=function(){function e(t,n,r,i,a,o,s,u){Object(l.a)(this,e),this.kind=2,this._oldScrollWidth=t,this._oldScrollLeft=n,this._oldScrollHeight=r,this._oldScrollTop=i,this.scrollWidth=a,this.scrollLeft=o,this.scrollHeight=s,this.scrollTop=u,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}return Object(d.a)(e,[{key:"isNoOp",value:function(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}},{key:"merge",value:function(t){return 2!==t.kind?this:new e(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,t.scrollWidth,t.scrollLeft,t.scrollHeight,t.scrollTop)}}]),e}(),Gn=function(){function e(){Object(l.a)(this,e),this.kind=3}return Object(d.a)(e,[{key:"isNoOp",value:function(){return!1}},{key:"merge",value:function(e){return this}}]),e}(),Yn=function(){function e(t,n,r,i,a,o,s){Object(l.a)(this,e),this.kind=5,this.oldSelections=t,this.selections=n,this.oldModelVersionId=r,this.modelVersionId=i,this.source=a,this.reason=o,this.reachedMaxCursorCount=s}return Object(d.a)(e,[{key:"isNoOp",value:function(){return e._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}},{key:"merge",value:function(t){return 5!==t.kind?this:new e(this.oldSelections,t.selections,this.oldModelVersionId,t.modelVersionId,t.source,t.reason,this.reachedMaxCursorCount||t.reachedMaxCursorCount)}}],[{key:"_selectionsAreEqual",value:function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}],[{key:"getAllAutoClosedCharacters",value:function(e){var t,n=[],r=Object(i.a)(e);try{for(r.s();!(t=r.n()).done;){var a=t.value;n=n.concat(a.getAutoClosedCharactersRanges())}}catch(o){r.e(o)}finally{r.f()}return n}}]),e}(),Xn=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r,i,a){var o;return Object(l.a)(this,n),(o=t.call(this))._model=e,o._knownModelVersionId=o._model.getVersionId(),o._viewModel=r,o._coordinatesConverter=i,o.context=new de.c(o._model,o._coordinatesConverter,a),o._cursors=new Dn(o.context),o._hasFocus=!1,o._isHandling=!1,o._isDoingComposition=!1,o._selectionsWhenCompositionStarted=null,o._columnSelectData=null,o._autoClosedActions=[],o._prevEditOperationType=0,o}return Object(d.a)(n,[{key:"dispose",value:function(){this._cursors.dispose(),this._autoClosedActions=Object(m.f)(this._autoClosedActions),Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"updateConfiguration",value:function(e){this.context=new de.c(this._model,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}},{key:"onLineMappingChanged",value:function(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}},{key:"setHasFocus",value:function(e){this._hasFocus=e}},{key:"_validateAutoClosedActions",value:function(){if(this._autoClosedActions.length>0)for(var e=this._cursors.getSelections(),t=0;tn.MAX_CURSOR_COUNT&&(i=i.slice(0,n.MAX_CURSOR_COUNT),a=!0);var o=new $n(this._model,this);return this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,r,o,a)}},{key:"setCursorColumnSelectData",value:function(e){this._columnSelectData=e}},{key:"revealPrimary",value:function(e,t,n,r){var i=this._cursors.getViewPositions();if(i.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,n,r);else{var a=i[0],o=new le.a(a.lineNumber,a.column,a.lineNumber,a.column);this._emitCursorRevealRange(e,t,o,null,0,n,r)}}},{key:"_revealPrimaryCursor",value:function(e,t,n,r,i){var a=this._cursors.getViewPositions();if(a.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),n,r,i);else{var o=a[0],s=new le.a(o.lineNumber,o.column,o.lineNumber,o.column);this._emitCursorRevealRange(e,t,s,null,n,r,i)}}},{key:"_emitCursorRevealRange",value:function(e,t,n,r,i,a,o){e.emitViewEvent(new Rn(t,n,r,i,a,o))}},{key:"saveState",value:function(){for(var e=[],t=this._cursors.getSelections(),n=0,r=t.length;n0){var r=de.d.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,r)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{var i=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,de.d.fromModelSelections(i))}}}},{key:"getSelection",value:function(){return this._cursors.getPrimaryCursor().modelState.selection}},{key:"getTopMostViewPosition",value:function(){return this._cursors.getTopMostViewPosition()}},{key:"getBottomMostViewPosition",value:function(){return this._cursors.getBottomMostViewPosition()}},{key:"getCursorColumnSelectData",value:function(){if(this._columnSelectData)return this._columnSelectData;var e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),n=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:de.a.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:n.lineNumber,toViewVisualColumn:de.a.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,n)}}},{key:"getSelections",value:function(){return this._cursors.getSelections()}},{key:"setSelections",value:function(e,t,n,r){this.setStates(e,t,r,de.d.fromModelSelections(n))}},{key:"getPrevEditOperationType",value:function(){return this._prevEditOperationType}},{key:"setPrevEditOperationType",value:function(e){this._prevEditOperationType=e}},{key:"_pushAutoClosedAction",value:function(e,t){for(var n=[],r=[],i=0,a=e.length;i0&&this._pushAutoClosedAction(n,r),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}}},{key:"_interpretCommandResult",value:function(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}},{key:"_emitStateChangedIfNecessary",value:function(e,t,n,r,i){var a=new $n(this._model,this);if(a.equals(r))return!1;var o=this._cursors.getSelections(),s=this._cursors.getViewSelections();if(e.emitViewEvent(new Tn(s,o)),!r||r.cursorState.length!==a.cursorState.length||a.cursorState.some((function(e,t){return!e.modelState.equals(r.cursorState[t].modelState)}))){var u=r?r.cursorState.map((function(e){return e.modelState.selection})):null,c=r?r.modelVersionId:0;e.emitOutgoingEvent(new Yn(u,o,c,a.modelVersionId,t||"keyboard",n,i))}return!0}},{key:"_findAutoClosingPairs",value:function(e){if(!e.length)return null;for(var t=[],n=0,r=e.length;n=0)return null;var a=i.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!a)return null;var o=a[1],s=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(o);if(!s||1!==s.length)return null;var u=s[0].open,c=i.text.length-a[2].length-1,l=i.text.lastIndexOf(u,c-1);if(-1===l)return null;t.push([l,c])}return t}},{key:"executeEdits",value:function(e,t,n,i){var a=this,o=null;"snippet"===t&&(o=this._findAutoClosingPairs(n)),o&&(n[0]._isTracked=!0);var s=[],u=[],c=this._model.pushEditOperations(this.getSelections(),n,(function(e){if(o)for(var t=0,n=o.length;t0&&this._pushAutoClosedAction(s,u)}},{key:"_executeEdit",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!this.context.cursorConfig.readOnly){var i=new $n(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(a){Object(h.e)(a)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,n,r,i,!1)&&this._revealPrimaryCursor(t,n,0,!0,0)}}},{key:"setIsDoingComposition",value:function(e){this._isDoingComposition=e}},{key:"startComposition",value:function(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}},{key:"endComposition",value:function(e,t){var n=this;this._executeEdit((function(){if("keyboard"===t){var e=Qn.getAllAutoClosedCharacters(n._autoClosedActions);n._executeEditOperation(Cn.a.compositionEndWithInterceptors(n._prevEditOperationType,n.context.cursorConfig,n._model,n._selectionsWhenCompositionStarted,n.getSelections(),e)),n._selectionsWhenCompositionStarted=null}}),e,t)}},{key:"type",value:function(e,t,n){var r=this;this._executeEdit((function(){if("keyboard"===n)for(var e=t.length,i=0;i0&&(o[0]._isTracked=!0);var c=e.model.pushEditOperations(e.selectionsBefore,o,(function(n){for(var r=[],a=0;a0?(r[n].sort(c),l[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:function(){return r[n]},getTrackedSelection:function(t){var n=parseInt(t,10),r=e.model._getTrackedRange(e.trackedRanges[n]);return 0===e.trackedRangesDirection[n]?new E.a(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn):new E.a(r.endLineNumber,r.endColumn,r.startLineNumber,r.startColumn)}})):l[n]=e.selectionsBefore[n]},p=0;p2&&void 0!==arguments[2]&&arguments[2];le.a.isEmpty(e)&&""===a||r.push({identifier:{major:t,minor:i++},range:e,text:a,forceMoveMarkers:o,isAutoWhitespaceEdit:n.insertsAutoWhitespace})},o=!1,s={addEditOperation:a,addTrackedEditOperation:function(e,t,n){o=!0,a(e,t,n)},trackSelection:function(t,n){var r,i=E.a.liftSelection(t);if(i.isEmpty())if("boolean"===typeof n)r=n?2:3;else{var a=e.model.getLineMaxColumn(i.startLineNumber);r=i.startColumn===a?2:3}else r=1;var o=e.trackedRanges.length,s=e.model._setTrackedRange(null,i,r);return e.trackedRanges[o]=s,e.trackedRangesDirection[o]=i.getDirection(),o.toString()}};try{n.getEditOperations(e.model,s)}catch(u){return Object(h.e)(u),{operations:[],hadTrackedEditOperation:!1}}return{operations:r,hadTrackedEditOperation:o}}},{key:"_getLoserCursorMap",value:function(e){(e=e.slice(0)).sort((function(e,t){return-le.a.compareRangesUsingEnds(e.range,t.range)}));for(var t={},n=1;ni.identifier.major?r.identifier.major:i.identifier.major).toString()]=!0;for(var o=0;o0&&n--}}return t}}]),e}(),er=n(252),tr=n(151),nr=n(13),rr=n(223),ir=n(179),ar=function(){function e(){Object(l.a)(this,e),this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}return Object(d.a)(e,[{key:"insert",value:function(e){this._hasPending=!0,this._inserts.push(e)}},{key:"change",value:function(e){this._hasPending=!0,this._changes.push(e)}},{key:"remove",value:function(e){this._hasPending=!0,this._removes.push(e)}},{key:"mustCommit",value:function(){return this._hasPending}},{key:"commit",value:function(e){if(this._hasPending){var t=this._inserts,n=this._changes,r=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,n,r)}}}]),e}(),or=function e(t,n,r,i,a){Object(l.a)(this,e),this.id=t,this.afterLineNumber=n,this.ordinal=r,this.height=i,this.minWidth=a,this.prefixSum=0},sr=function(){function e(t,n,r,i){Object(l.a)(this,e),this._instanceId=Fe.P(++e.INSTANCE_COUNT),this._pendingChanges=new ar,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=t,this._lineHeight=n,this._paddingTop=r,this._paddingBottom=i}return Object(d.a)(e,[{key:"setLineHeight",value:function(e){this._checkPendingChanges(),this._lineHeight=e}},{key:"setPadding",value:function(e,t){this._paddingTop=e,this._paddingBottom=t}},{key:"onFlushed",value:function(e){this._checkPendingChanges(),this._lineCount=e}},{key:"changeWhitespace",value:function(e){var t=this,n=!1;try{e({insertWhitespace:function(e,r,i,a){n=!0,e|=0,r|=0,i|=0,a|=0;var o=t._instanceId+ ++t._lastWhitespaceId;return t._pendingChanges.insert(new or(o,e,r,i,a)),o},changeOneWhitespace:function(e,r,i){n=!0,r|=0,i|=0,t._pendingChanges.change({id:e,newAfterLineNumber:r,newHeight:i})},removeWhitespace:function(e){n=!0,t._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return n}},{key:"_commitPendingChanges",value:function(e,t,n){if((e.length>0||n.length>0)&&(this._minWidth=-1),e.length+t.length+n.length<=1){var r,a=Object(i.a)(e);try{for(a.s();!(r=a.n()).done;){var o=r.value;this._insertWhitespace(o)}}catch(S){a.e(S)}finally{a.f()}var s,u=Object(i.a)(t);try{for(u.s();!(s=u.n()).done;){var c=s.value;this._changeOneWhitespace(c.id,c.newAfterLineNumber,c.newHeight)}}catch(S){u.e(S)}finally{u.f()}var l,d=Object(i.a)(n);try{for(d.s();!(l=d.n()).done;){var p=l.value,f=this._findWhitespaceIndex(p.id);-1!==f&&this._removeWhitespace(f)}}catch(S){d.e(S)}finally{d.f()}}else{var h,g=new Set,m=Object(i.a)(n);try{for(m.s();!(h=m.n()).done;){var _=h.value;g.add(_.id)}}catch(S){m.e(S)}finally{m.f()}var v,y=new Map,b=Object(i.a)(t);try{for(b.s();!(v=b.n()).done;){var D=v.value;y.set(D.id,D)}}catch(S){b.e(S)}finally{b.f()}var E=function(e){var t,n=[],r=Object(i.a)(e);try{for(r.s();!(t=r.n()).done;){var a=t.value;if(!g.has(a.id)){if(y.has(a.id)){var o=y.get(a.id);a.afterLineNumber=o.newAfterLineNumber,a.height=o.newHeight}n.push(a)}}}catch(S){r.e(S)}finally{r.f()}return n},C=E(this._arr).concat(E(e));C.sort((function(e,t){return e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber})),this._arr=C,this._prefixSumValidIndex=-1}}},{key:"_checkPendingChanges",value:function(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}},{key:"_insertWhitespace",value:function(t){var n=e.findInsertionIndex(this._arr,t.afterLineNumber,t.ordinal);this._arr.splice(n,0,t),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)}},{key:"_findWhitespaceIndex",value:function(e){for(var t=this._arr,n=0,r=t.length;nt&&(this._arr[n].afterLineNumber-=t-e+1)}}},{key:"onLinesInserted",value:function(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(var n=0,r=this._arr.length;n=t.length||t[i+1].afterLineNumber>=e)return i;n=i+1|0}else r=i-1|0}return-1}},{key:"_findFirstWhitespaceAfterLineNumber",value:function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+this._paddingTop}},{key:"getWhitespaceMinWidth",value:function(){if(this._checkPendingChanges(),-1===this._minWidth){for(var e=0,t=0,n=this._arr.length;tthis.getLinesTotalHeight()}},{key:"isInTopPadding",value:function(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom)}},{key:"getLineNumberAtOrAfterVerticalOffset",value:function(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;for(var t=0|this._lineCount,n=this._lineHeight,r=1,i=t;r=o+n)r=a+1;else{if(e>=o)return a;i=a}}return r>t?t:r}},{key:"getLinesViewportData",value:function(e,t){this._checkPendingChanges(),e|=0,t|=0;var n,r,i=this._lineHeight,a=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(a),s=0|this._lineCount,u=0|this.getFirstWhitespaceIndexAfterLineNumber(a),c=0|this.getWhitespacesCount();-1===u?(u=c,r=s+1,n=0):(r=0|this.getAfterLineNumberForWhitespaceIndex(u),n=0|this.getHeightForWhitespaceIndex(u));var l=o,d=l,p=5e5,f=0;o>=p&&(f=Math.floor(o/p)*p,d-=f=Math.floor(f/i)*i);for(var h=[],g=e+(t-e)/2,m=-1,_=a;_<=s;_++){if(-1===m){(l<=g&&gg)&&(m=_)}for(l+=i,h[_-a]=d,d+=i;r===_;)d+=n,l+=n,++u>=c?r=s+1:(r=0|this.getAfterLineNumberForWhitespaceIndex(u),n=0|this.getHeightForWhitespaceIndex(u));if(l>=t){s=_;break}}-1===m&&(m=s);var v=0|this.getVerticalOffsetForLineNumber(s),y=a,b=s;return yt&&b--,{bigNumbersDelta:f,startLineNumber:a,endLineNumber:s,relativeVerticalOffset:h,centeredLineNumber:m,completelyVisibleStartLineNumber:y,completelyVisibleEndLineNumber:b}}},{key:"getVerticalOffsetForWhitespaceIndex",value: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)+this._paddingTop}},{key:"getWhitespaceIndexAtOrAfterVerticallOffset",value: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=i+this.getHeightForWhitespaceIndex(r))t=r+1;else{if(e>=i)return r;n=r}}return t}},{key:"getWhitespaceAtVerticalOffset",value: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 r=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:r}}},{key:"getWhitespaceViewportData",value:function(e,t){this._checkPendingChanges(),e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),r=this.getWhitespacesCount()-1;if(n<0)return[];for(var i=[],a=n;a<=r;a++){var o=this.getVerticalOffsetForWhitespaceIndex(a),s=this.getHeightForWhitespaceIndex(a);if(o>=t)break;i.push({id:this.getIdForWhitespaceIndex(a),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(a),verticalOffset:o,height:s})}return i}},{key:"getWhitespaces",value:function(){return this._checkPendingChanges(),this._arr.slice(0)}},{key:"getWhitespacesCount",value:function(){return this._checkPendingChanges(),this._arr.length}},{key:"getIdForWhitespaceIndex",value:function(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}},{key:"getAfterLineNumberForWhitespaceIndex",value:function(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}},{key:"getHeightForWhitespaceIndex",value:function(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}],[{key:"findInsertionIndex",value:function(e,t,n){for(var r=0,i=e.length;r>>1;t===e[a].afterLineNumber?n=t?0:n.horizontalScrollbarSize}},{key:"_getContentHeight",value:function(e,t,n){var r=this._configuration.options,i=this._linesLayout.getLinesTotalHeight();return r.get(89)?i+=Math.max(0,t-r.get(53)-r.get(69).bottom):i+=this._getHorizontalScrollbarHeight(e,n),i}},{key:"_updateHeight",value:function(){var e=this._scrollable.getScrollDimensions(),t=e.width,n=e.height,r=e.contentWidth;this._scrollable.setScrollDimensions(new ur(t,e.contentWidth,n,this._getContentHeight(t,n,r)))}},{key:"getCurrentViewport",value:function(){var e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new Ot.g(t.scrollTop,t.scrollLeft,e.width,e.height)}},{key:"getFutureViewport",value:function(){var e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new Ot.g(t.scrollTop,t.scrollLeft,e.width,e.height)}},{key:"_computeContentWidth",value:function(e){var t=this._configuration.options,n=t.get(125),r=t.get(38);if(n.isViewportWrapping){var i=t.get(124),a=t.get(59);return e>i.contentWidth+r.typicalHalfwidthCharacterWidth&&a.enabled&&"right"===a.side?e+i.verticalScrollbarWidth:e}var o=t.get(88)*r.typicalHalfwidthCharacterWidth,s=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+o,s)}},{key:"setMaxLineWidth",value:function(e){var t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new ur(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}},{key:"saveState",value: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}}},{key:"changeWhitespace",value:function(e){var t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}},{key:"getVerticalOffsetForLineNumber",value:function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}},{key:"isAfterLines",value:function(e){return this._linesLayout.isAfterLines(e)}},{key:"isInTopPadding",value:function(e){return this._linesLayout.isInTopPadding(e)}},{key:"isInBottomPadding",value:function(e){return this._linesLayout.isInBottomPadding(e)}},{key:"getLineNumberAtVerticalOffset",value:function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}},{key:"getWhitespaceAtVerticalOffset",value:function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}},{key:"getLinesViewportData",value:function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}},{key:"getLinesViewportDataAtScrollTop",value: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)}},{key:"getWhitespaceViewportData",value:function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}},{key:"getWhitespaces",value:function(){return this._linesLayout.getWhitespaces()}},{key:"getContentWidth",value:function(){return this._scrollable.getScrollDimensions().contentWidth}},{key:"getScrollWidth",value:function(){return this._scrollable.getScrollDimensions().scrollWidth}},{key:"getContentHeight",value:function(){return this._scrollable.getScrollDimensions().contentHeight}},{key:"getScrollHeight",value:function(){return this._scrollable.getScrollDimensions().scrollHeight}},{key:"getCurrentScrollLeft",value:function(){return this._scrollable.getCurrentScrollPosition().scrollLeft}},{key:"getCurrentScrollTop",value:function(){return this._scrollable.getCurrentScrollPosition().scrollTop}},{key:"validateScrollPosition",value:function(e){return this._scrollable.validateScrollPosition(e)}},{key:"setScrollPosition",value:function(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}},{key:"deltaScrollNow",value:function(e,t){var n=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})}}]),n}(m.a),dr=n(41),pr=n(249),fr=function(){function e(t){Object(l.a)(this,e),this._lines=t}return Object(d.a)(e,[{key:"convertViewPositionToModelPosition",value:function(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}},{key:"convertViewRangeToModelRange",value:function(e){return this._lines.convertViewRangeToModelRange(e)}},{key:"validateViewPosition",value:function(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}},{key:"validateViewRange",value:function(e,t){return this._lines.validateViewRange(e,t)}},{key:"convertModelPositionToViewPosition",value:function(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)}},{key:"convertModelRangeToViewRange",value:function(e){return this._lines.convertModelRangeToViewRange(e)}},{key:"modelPositionIsVisible",value:function(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}},{key:"getModelLineViewLineCount",value:function(e){return this._lines.getModelLineViewLineCount(e)}}]),e}(),hr=function(){function e(t){Object(l.a)(this,e),this._counts=t,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}return Object(d.a)(e,[{key:"_invalidate",value:function(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}},{key:"_ensureValid",value:function(){if(!this._isValid){for(var e=this._validEndIndex+1,t=this._counts.length;e0?this._modelToView[e-1]:0;this._modelToView[e]=r+n;for(var i=0;i0?this._modelToView[t-1]:0;return new pr.b(t,e-n)}}]),e}(),gr=function(){function e(t,n,r,i,a,o,s,u){Object(l.a)(this,e),this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=n,this._monospaceLineBreaksComputerFactory=r,this.fontInfo=i,this.tabSize=a,this.wrappingStrategy=o,this.wrappingColumn=s,this.wrappingIndent=u,this._constructLines(!0,null)}return Object(d.a)(e,[{key:"dispose",value:function(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}},{key:"createCoordinatesConverter",value:function(){return new fr(this)}},{key:"_constructLines",value:function(e,t){var n=this;this.lines=[],e&&(this.hiddenAreasIds=[]);for(var r=this.model.getLinesContent(),i=r.length,a=this.createLineBreaksComputer(),o=0;o=l&&g<=d,_=Er(s[h],!m);u[h]=_.getViewLineCount(),this.lines[h]=_}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new hr(u)}},{key:"getHiddenAreas",value:function(){var e=this;return this.hiddenAreasIds.map((function(t){return e.model.getDecorationRange(t)}))}},{key:"_reduceRanges",value:function(e){var t=this;if(0===e.length)return[];for(var n=e.map((function(e){return t.model.validateRange(e)})).sort(le.a.compareRangesUsingStarts),r=[],i=n[0].startLineNumber,a=n[0].endLineNumber,o=1,s=n.length;oa+1?(r.push(new le.a(i,1,a,1)),i=u.startLineNumber,a=u.endLineNumber):u.endLineNumber>a&&(a=u.endLineNumber)}return r.push(new le.a(i,1,a,1)),r}},{key:"setHiddenAreas",value:function(e){var t=this,n=this._reduceRanges(e),r=this.hiddenAreasIds.map((function(e){return t.model.getDecorationRange(e)})).sort(le.a.compareRangesUsingStarts);if(n.length===r.length){for(var a=!1,o=0;o=p&&v<=f?this.lines[_].isVisible()&&(this.lines[_]=this.lines[_].setVisible(!1),y=!0):(m=!0,this.lines[_].isVisible()||(this.lines[_]=this.lines[_].setVisible(!0),y=!0)),y){var b=this.lines[_].getViewLineCount();this.prefixSumComputer.changeValue(_,b)}}return m||this.setHiddenAreas([]),!0}},{key:"modelPositionIsVisible",value:function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()}},{key:"getModelLineViewLineCount",value:function(e){return e<1||e>this.lines.length?1:this.lines[e-1].getViewLineCount()}},{key:"setTabSize",value:function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}},{key:"setWrappingSettings",value:function(e,t,n,r){var i=this.fontInfo.equals(e),a=this.wrappingStrategy===t,o=this.wrappingColumn===n,s=this.wrappingIndent===r;if(i&&a&&o&&s)return!1;var u=i&&a&&!o&&s;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=n,this.wrappingIndent=r;var c=null;if(u){c=[];for(var l=0,d=this.lines.length;l2&&!this.lines[t-2].isVisible(),a=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,o=0,s=[],u=[],c=0,l=r.length;co?(f=(p=(c=(u=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+o-1)+1)+(i-o)-1,s=!0):it?t:0|e}},{key:"getActiveIndentGuide",value:function(e,t,n){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);var r=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),a=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),o=this.model.getActiveIndentGuide(r.lineNumber,i.lineNumber,a.lineNumber),s=this.convertModelPositionToViewPosition(o.startLineNumber,1),u=this.convertModelPositionToViewPosition(o.endLineNumber,this.model.getLineMaxColumn(o.endLineNumber));return{startLineNumber:s.lineNumber,endLineNumber:u.lineNumber,indent:o.indent}}},{key:"getViewLinesIndentGuides",value:function(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),i=[],a=[],o=[],s=n.lineNumber-1,u=r.lineNumber-1,c=null,l=s;l<=u;l++){var d=this.lines[l];if(d.isVisible()){var p=d.getViewLineNumberOfModelPosition(0,l===s?n.column:1),f=d.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(l+1)),h=f-p+1,g=0;h>1&&1===d.getViewLineMinColumn(this.model,l+1,f)&&(g=0===p?1:2),a.push(h),o.push(g),null===c&&(c=new ce.a(l+1,0))}else null!==c&&(i=i.concat(this.model.getLinesIndentGuides(c.lineNumber,l)),c=null)}null!==c&&(i=i.concat(this.model.getLinesIndentGuides(c.lineNumber,r.lineNumber)),c=null);for(var m=t-e+1,_=new Array(m),v=0,y=0,b=i.length;yt&&(f=!0,p=t-i+1);var h=d+p;if(l.getViewLinesData(this.model,u+1,d,h,i-e,n,s),i+=p,f)break}}return s}},{key:"validateViewPosition",value:function(e,t,n){e=this._toValidViewLineNumber(e);var r=this.prefixSumComputer.getIndexOf(e-1),i=r.index,a=r.remainder,o=this.lines[i],s=o.getViewLineMinColumn(this.model,i+1,a),u=o.getViewLineMaxColumn(this.model,i+1,a);tu&&(t=u);var c=o.getModelColumnOfViewPosition(a,t);return this.model.validatePosition(new ce.a(i+1,c)).equals(n)?new ce.a(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)}},{key:"validateViewRange",value:function(e,t){var n=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),r=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new le.a(n.lineNumber,n.column,r.lineNumber,r.column)}},{key:"convertViewPositionToModelPosition",value:function(e,t){e=this._toValidViewLineNumber(e);var n=this.prefixSumComputer.getIndexOf(e-1),r=n.index,i=n.remainder,a=this.lines[r].getModelColumnOfViewPosition(i,t);return this.model.validatePosition(new ce.a(r+1,a))}},{key:"convertViewRangeToModelRange",value:function(e){var t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new le.a(t.lineNumber,t.column,n.lineNumber,n.column)}},{key:"convertModelPositionToViewPosition",value:function(e,t){for(var n=this.model.validatePosition(new ce.a(e,t)),r=n.lineNumber,i=n.column,a=r-1,o=!1;a>0&&!this.lines[a].isVisible();)a--,o=!0;if(0===a&&!this.lines[a].isVisible())return new ce.a(1,1);var s=1+(0===a?0:this.prefixSumComputer.getAccumulatedValue(a-1));return o?this.lines[a].getViewPositionOfModelPosition(s,this.model.getLineMaxColumn(a+1)):this.lines[r-1].getViewPositionOfModelPosition(s,i)}},{key:"convertModelRangeToViewRange",value:function(e){var t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return e.startLineNumber===e.endLineNumber&&t.lineNumber!==n.lineNumber&&n.column===this.getViewLineMinColumn(n.lineNumber)?new le.a(t.lineNumber,t.column,n.lineNumber-1,this.getViewLineMaxColumn(n.lineNumber-1)):new le.a(t.lineNumber,t.column,n.lineNumber,n.column)}},{key:"_getViewLineNumberForModelPosition",value:function(e,t){var n=e-1;if(this.lines[n].isVisible()){var r=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(r,t)}for(;n>0&&!this.lines[n].isVisible();)n--;if(0===n&&!this.lines[n].isVisible())return 1;var i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,this.model.getLineMaxColumn(n+1))}},{key:"getAllOverviewRulerDecorations",value:function(e,t,n){var r,a=this.model.getOverviewRulerDecorations(e,t),o=new kr,s=Object(i.a)(a);try{for(s.s();!(r=s.n()).done;){var u=r.value,c=u.options.overviewRuler,l=c?c.position:0;if(0!==l){var d=c.getColor(n),p=this._getViewLineNumberForModelPosition(u.range.startLineNumber,u.range.startColumn),f=this._getViewLineNumberForModelPosition(u.range.endLineNumber,u.range.endColumn);o.accept(d,p,f,l)}}}catch(h){s.e(h)}finally{s.f()}return o.result}},{key:"getDecorationsInRange",value:function(e,t,n){var r=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),a=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(a.lineNumber-r.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new le.a(r.lineNumber,1,a.lineNumber,a.column),t,n);for(var o=[],s=r.lineNumber-1,u=a.lineNumber-1,c=null,l=s;l<=u;l++){if(this.lines[l].isVisible())null===c&&(c=new ce.a(l+1,l===s?r.column:1));else if(null!==c){var d=this.model.getLineMaxColumn(l);o=o.concat(this.model.getDecorationsInRange(new le.a(c.lineNumber,c.column,l,d),t,n)),c=null}}null!==c&&(o=o.concat(this.model.getDecorationsInRange(new le.a(c.lineNumber,c.column,a.lineNumber,a.column),t,n)),c=null),o.sort((function(e,t){var n=le.a.compareRangesUsingStarts(e.range,t.range);return 0===n?e.idt.id?1:0:n}));var p,f=[],h=0,g=null,m=Object(i.a)(o);try{for(m.s();!(p=m.n()).done;){var _=p.value,v=_.id;g!==v&&(g=v,f[h++]=_)}}catch(y){m.e(y)}finally{m.f()}return f}}]),e}(),mr=function(){function e(){Object(l.a)(this,e)}return Object(d.a)(e,[{key:"isVisible",value:function(){return!0}},{key:"setVisible",value:function(e){return e?this:_r.INSTANCE}},{key:"getLineBreakData",value:function(){return null}},{key:"getViewLineCount",value:function(){return 1}},{key:"getViewLineContent",value:function(e,t,n){return e.getLineContent(t)}},{key:"getViewLineLength",value:function(e,t,n){return e.getLineLength(t)}},{key:"getViewLineMinColumn",value:function(e,t,n){return e.getLineMinColumn(t)}},{key:"getViewLineMaxColumn",value:function(e,t,n){return e.getLineMaxColumn(t)}},{key:"getViewLineData",value:function(e,t,n){var r=e.getLineTokens(t),i=r.getLineContent();return new Ot.d(i,!1,1,i.length+1,0,r.inflate())}},{key:"getViewLinesData",value:function(e,t,n,r,i,a,o){a[i]?o[i]=this.getViewLineData(e,t,0):o[i]=null}},{key:"getModelColumnOfViewPosition",value:function(e,t){return t}},{key:"getViewPositionOfModelPosition",value:function(e,t){return new ce.a(e,t)}},{key:"getViewLineNumberOfModelPosition",value:function(e,t){return e}}]),e}();mr.INSTANCE=new mr;var _r=function(){function e(){Object(l.a)(this,e)}return Object(d.a)(e,[{key:"isVisible",value:function(){return!1}},{key:"setVisible",value:function(e){return e?mr.INSTANCE:this}},{key:"getLineBreakData",value:function(){return null}},{key:"getViewLineCount",value:function(){return 0}},{key:"getViewLineContent",value:function(e,t,n){throw new Error("Not supported")}},{key:"getViewLineLength",value:function(e,t,n){throw new Error("Not supported")}},{key:"getViewLineMinColumn",value:function(e,t,n){throw new Error("Not supported")}},{key:"getViewLineMaxColumn",value:function(e,t,n){throw new Error("Not supported")}},{key:"getViewLineData",value:function(e,t,n){throw new Error("Not supported")}},{key:"getViewLinesData",value:function(e,t,n,r,i,a,o){throw new Error("Not supported")}},{key:"getModelColumnOfViewPosition",value:function(e,t){throw new Error("Not supported")}},{key:"getViewPositionOfModelPosition",value:function(e,t){throw new Error("Not supported")}},{key:"getViewLineNumberOfModelPosition",value:function(e,t){throw new Error("Not supported")}}]),e}();_r.INSTANCE=new _r;var vr=function(){function e(t,n){Object(l.a)(this,e),this._lineBreakData=t,this._isVisible=n}return Object(d.a)(e,[{key:"isVisible",value:function(){return this._isVisible}},{key:"setVisible",value:function(e){return this._isVisible=e,this}},{key:"getLineBreakData",value:function(){return this._lineBreakData}},{key:"getViewLineCount",value:function(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}},{key:"getInputStartOffsetOfOutputLineIndex",value:function(e){return Ot.b.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,e,0)}},{key:"getInputEndOffsetOfOutputLineIndex",value:function(e,t,n){return n+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:Ot.b.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,n+1,0)}},{key:"getViewLineContent",value:function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var r=this.getInputStartOffsetOfOutputLineIndex(n),i=this.getInputEndOffsetOfOutputLineIndex(e,t,n),a=e.getValueInRange({startLineNumber:t,startColumn:r+1,endLineNumber:t,endColumn:i+1});return n>0&&(a=br(this._lineBreakData.wrappedTextIndentLength)+a),a}},{key:"getViewLineLength",value:function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var r=this.getInputStartOffsetOfOutputLineIndex(n),i=this.getInputEndOffsetOfOutputLineIndex(e,t,n)-r;return n>0&&(i=this._lineBreakData.wrappedTextIndentLength+i),i}},{key:"getViewLineMinColumn",value:function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this._lineBreakData.wrappedTextIndentLength+1:1}},{key:"getViewLineMaxColumn",value:function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1}},{key:"getViewLineData",value:function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var r=this.getInputStartOffsetOfOutputLineIndex(n),i=this.getInputEndOffsetOfOutputLineIndex(e,t,n),a=e.getValueInRange({startLineNumber:t,startColumn:r+1,endLineNumber:t,endColumn:i+1});n>0&&(a=br(this._lineBreakData.wrappedTextIndentLength)+a);var o=n>0?this._lineBreakData.wrappedTextIndentLength+1:1,s=a.length+1,u=n+10&&(c=this._lineBreakData.wrappedTextIndentLength);var l=e.getLineTokens(t),d=0===n?0:this._lineBreakData.breakOffsetsVisibleColumn[n-1];return new Ot.d(a,u,o,s,d,l.sliceAndInflate(r,i,c))}},{key:"getViewLinesData",value:function(e,t,n,r,i,a,o){if(!this._isVisible)throw new Error("Not supported");for(var s=n;s0&&(n0&&(i+=this._lineBreakData.wrappedTextIndentLength),new ce.a(e+r,i)}},{key:"getViewLineNumberOfModelPosition",value:function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+Ot.b.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1).outputLineIndex}}]),e}(),yr=[""];function br(e){if(e>=yr.length)for(var t=1;t<=e;t++)yr[t]=Dr(t);return yr[e]}function Dr(e){return new Array(e+1).join(" ")}function Er(e,t){return null===e?t?mr.INSTANCE:_r.INSTANCE:new vr(e,t)}var Cr,Sr=function(){function e(t){Object(l.a)(this,e),this._lines=t}return Object(d.a)(e,[{key:"_validPosition",value:function(e){return this._lines.model.validatePosition(e)}},{key:"_validRange",value:function(e){return this._lines.model.validateRange(e)}},{key:"convertViewPositionToModelPosition",value:function(e){return this._validPosition(e)}},{key:"convertViewRangeToModelRange",value:function(e){return this._validRange(e)}},{key:"validateViewPosition",value:function(e,t){return this._validPosition(t)}},{key:"validateViewRange",value:function(e,t){return this._validRange(t)}},{key:"convertModelPositionToViewPosition",value:function(e){return this._validPosition(e)}},{key:"convertModelRangeToViewRange",value:function(e){return this._validRange(e)}},{key:"modelPositionIsVisible",value:function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}},{key:"getModelLineViewLineCount",value:function(e){return 1}}]),e}(),xr=function(){function e(t){Object(l.a)(this,e),this.model=t}return Object(d.a)(e,[{key:"dispose",value:function(){}},{key:"createCoordinatesConverter",value:function(){return new Sr(this)}},{key:"getHiddenAreas",value:function(){return[]}},{key:"setHiddenAreas",value:function(e){return!1}},{key:"setTabSize",value:function(e){return!1}},{key:"setWrappingSettings",value:function(e,t,n,r){return!1}},{key:"createLineBreaksComputer",value:function(){var e=[];return{addRequest:function(t,n){e.push(null)},finalize:function(){return e}}}},{key:"onModelFlushed",value:function(){}},{key:"onModelLinesDeleted",value:function(e,t,n){return new Ln(t,n)}},{key:"onModelLinesInserted",value:function(e,t,n,r){return new Pn(t,n)}},{key:"onModelLineChanged",value:function(e,t,n){return[!1,new Fn(t,t),null,null]}},{key:"acceptVersionId",value:function(e){}},{key:"getViewLineCount",value:function(){return this.model.getLineCount()}},{key:"getActiveIndentGuide",value:function(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}}},{key:"getViewLinesIndentGuides",value:function(e,t){for(var n=t-e+1,r=new Array(n),i=0;i=t)return void(n>o&&(i[i.length-1]=n));i.push(r,t,n)}else this.result[e]=[r,t,n]}}]),e}(),Tr=function(){function e(t,n,r,i,a){Object(l.a)(this,e),this.editorId=t,this.model=n,this.configuration=r,this._linesCollection=i,this._coordinatesConverter=a,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}return Object(d.a)(e,[{key:"_clearCachedModelDecorationsResolver",value:function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}},{key:"dispose",value:function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}},{key:"reset",value:function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}},{key:"onModelDecorationsChanged",value:function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}},{key:"onLineMappingChanged",value:function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}},{key:"_getOrCreateViewModelDecoration",value:function(e){var t=e.id,n=this._decorationsCache[t];if(!n){var r,i=e.range,a=e.options;if(a.isWholeLine){var o=this._coordinatesConverter.convertModelPositionToViewPosition(new ce.a(i.startLineNumber,1)),s=this._coordinatesConverter.convertModelPositionToViewPosition(new ce.a(i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber)));r=new le.a(o.lineNumber,o.column,s.lineNumber,s.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(i);n=new Ot.f(r,a),this._decorationsCache[t]=n}return n}},{key:"getDecorationsViewportData",value:function(e){var t=null!==this._cachedModelDecorationsResolver;return(t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}},{key:"_getDecorationsViewportData",value:function(e){for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,Object($.m)(this.configuration.options)),n=e.startLineNumber,r=e.endLineNumber,i=[],a=0,o=[],s=n;s<=r;s++)o[s-n]=[];for(var u=0,c=t.length;u=2&&e._viewportStartLineTrackedRange){var N=e.model._getTrackedRange(e._viewportStartLineTrackedRange);if(N){var I=e.coordinatesConverter.convertModelPositionToViewPosition(N.getStartPosition()),F=e.viewLayout.getVerticalOffsetForLineNumber(I.lineNumber);e.viewLayout.setScrollPosition({scrollTop:F+e._viewportStartLineDelta},1)}}try{var L=e._eventDispatcher.beginEmitViewEvents();e._cursor.onModelContentChanged(L,t)}finally{e._eventDispatcher.endEmitViewEvents()}}))),this._register(this.model.onDidChangeTokens((function(t){for(var n=[],r=0,i=t.ranges.length;rs||(a0&&c[d-1]===c[d]||(l+=this.model.getLineContent(c[d])+r);return l}if(o&&t){var p,f=[],h=0,g=Object(i.a)(e);try{for(g.s();!(p=g.n()).done;){var m=p.value,_=m.startLineNumber;m.isEmpty()?_!==h&&f.push(this.model.getLineContent(_)):f.push(this.model.getValueInRange(m,n?2:0)),h=_}}catch(E){g.e(E)}finally{g.f()}return 1===f.length?f[0]:f}var v,y=[],b=Object(i.a)(e);try{for(b.s();!(v=b.n()).done;){var D=v.value;D.isEmpty()||y.push(this.model.getValueInRange(D,n?2:0))}}catch(E){b.e(E)}finally{b.f()}return 1===y.length?y[0]:y}},{key:"getRichTextToCopy",value:function(e,t){var n=this.model.getLanguageIdentifier();if(1===n.id)return null;if(1!==e.length)return null;var r=e[0];if(r.isEmpty()){if(!t)return null;var i=r.startLineNumber;r=new le.a(i,this.model.getLineMinColumn(i),i,this.model.getLineMaxColumn(i))}var a=this._configuration.options.get(38),o=this._getColorMap(),s=a.fontFamily===$.c.fontFamily?a.fontFamily:"'".concat(a.fontFamily,"', ").concat($.c.fontFamily);return{mode:n.language,html:'
'+this._getHTMLToCopy(r,o)+"
"}}},{key:"_getHTMLToCopy",value:function(e,t){for(var n=e.startLineNumber,r=e.startColumn,i=e.endLineNumber,a=e.endColumn,o=this.getTabSize(),s="",u=n;u<=i;u++){var c=this.model.getLineTokens(u),l=c.getLineContent(),d=u===n?r-1:0,p=u===i?a-1:l.length;s+=""===l?"
":Object(rr.a)(l,c.inflate(),t,d,p,o,S.j)}return s}},{key:"_getColorMap",value:function(){var e=wt.D.getColorMap(),t=["#000000"];if(e)for(var n=1,r=e.length;n2&&void 0!==arguments[2]?arguments[2]:0;this._withViewEventsCollector((function(i){return n._cursor.setSelections(i,e,t,r)}))}},{key:"saveCursorState",value:function(){return this._cursor.saveState()}},{key:"restoreCursorState",value:function(e){var t=this;this._withViewEventsCollector((function(n){return t._cursor.restoreState(n,e)}))}},{key:"_executeCursorEdit",value:function(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new Jn):this._withViewEventsCollector(e)}},{key:"executeEdits",value:function(e,t,n){var r=this;this._executeCursorEdit((function(i){return r._cursor.executeEdits(i,e,t,n)}))}},{key:"startComposition",value:function(){var e=this;this._cursor.setIsDoingComposition(!0),this._executeCursorEdit((function(t){return e._cursor.startComposition(t)}))}},{key:"endComposition",value:function(e){var t=this;this._cursor.setIsDoingComposition(!1),this._executeCursorEdit((function(n){return t._cursor.endComposition(n,e)}))}},{key:"type",value:function(e,t){var n=this;this._executeCursorEdit((function(r){return n._cursor.type(r,e,t)}))}},{key:"replacePreviousChar",value:function(e,t,n){var r=this;this._executeCursorEdit((function(i){return r._cursor.replacePreviousChar(i,e,t,n)}))}},{key:"paste",value:function(e,t,n,r){var i=this;this._executeCursorEdit((function(a){return i._cursor.paste(a,e,t,n,r)}))}},{key:"cut",value:function(e){var t=this;this._executeCursorEdit((function(n){return t._cursor.cut(n,e)}))}},{key:"executeCommand",value:function(e,t){var n=this;this._executeCursorEdit((function(r){return n._cursor.executeCommand(r,e,t)}))}},{key:"executeCommands",value:function(e,t){var n=this;this._executeCursorEdit((function(r){return n._cursor.executeCommands(r,e,t)}))}},{key:"revealPrimaryCursor",value:function(e,t){var n=this;this._withViewEventsCollector((function(r){return n._cursor.revealPrimary(r,e,t,0)}))}},{key:"revealTopMostCursor",value:function(e){var t=this._cursor.getTopMostViewPosition(),n=new le.a(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((function(t){return t.emitViewEvent(new Rn(e,n,null,0,!0,0))}))}},{key:"revealBottomMostCursor",value:function(e){var t=this._cursor.getBottomMostViewPosition(),n=new le.a(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((function(t){return t.emitViewEvent(new Rn(e,n,null,0,!0,0))}))}},{key:"revealRange",value:function(e,t,n,r,i){this._withViewEventsCollector((function(a){return a.emitViewEvent(new Rn(e,n,null,r,t,i))}))}},{key:"getVerticalOffsetForLineNumber",value:function(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}},{key:"getScrollTop",value:function(){return this.viewLayout.getCurrentScrollTop()}},{key:"setScrollTop",value:function(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}},{key:"setScrollPosition",value:function(e,t){this.viewLayout.setScrollPosition(e,t)}},{key:"deltaScrollNow",value:function(e,t){this.viewLayout.deltaScrollNow(e,t)}},{key:"changeWhitespace",value:function(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new Vn),this._eventDispatcher.emitOutgoingEvent(new Gn))}},{key:"setMaxLineWidth",value:function(e){this.viewLayout.setMaxLineWidth(e)}},{key:"_withViewEventsCollector",value:function(e){try{e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}}]),n}(m.a),Ar=n(38),Or=n(16),Nr=n(28),Ir=n(161),Fr=n(52),Lr=n(76),Pr=n(26),Rr=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r){var i;Object(l.a)(this,n),i=t.call(this,0);for(var a=0;a=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}]),n}(n(127).a),Mr=[],Br=[],jr=function(){function e(t,n){Object(l.a)(this,e),this.classifier=new Rr(t,n)}return Object(d.a)(e,[{key:"createLineBreaksComputer",value:function(e,t,n,r){var i=this;t|=0,n=+n;var a=[],o=[];return{addRequest:function(e,t){a.push(e),o.push(t)},finalize:function(){for(var s=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,u=[],c=0,l=a.length;c=0)for(var b=Math.abs(c[y]-_);y+1=b)break;b=D,y++}for(;yE&&(E=g,C=m);var S=0,x=0,k=0,T=0;if(C<=_){for(var w=C,A=0===E?0:n.charCodeAt(E-1),O=0===E?0:e.get(A),N=!0,I=E;Ig&&Wr(A,O,L,P)&&(S=F,x=w),(w+=R)>_){F>g?(k=F,T=w-R):(k=I+1,T=w),w-x>d&&(S=0),N=!1;break}A=L,O=P}if(N){h>0&&(p[h]=u[u.length-1],f[h]=c[u.length-1],h++);break}}if(0===S){for(var M=C,B=n.charCodeAt(E),j=e.get(B),U=!1,V=E-1;V>=g;V--){var z=V+1,H=n.charCodeAt(V);if(9===H){U=!0;break}var W=void 0,K=void 0;if(Fe.F(H)?(V--,W=0,K=2):(W=e.get(H),K=Fe.D(H)?a:1),M<=_){if(0===k&&(k=z,T=M),M<=_-d)break;if(Wr(H,W,B,j)){S=z,x=M;break}}M-=K,B=H,j=W}if(0!==S){var q=d-(T-x);if(q<=r){var G=n.charCodeAt(k);q-(Fe.E(G)?2:zr(G,T,r,a))<0&&(S=0)}}if(U){y--;continue}}if(0===S&&(S=k,x=T),S<=g){var Y=n.charCodeAt(g);Fe.E(Y)?(S=g+2,x=m+2):(S=g+1,x=m+zr(Y,m,r,a))}for(g=S,p[h]=S,m=x,f[h]=x,h++,_=x+d;y<0||y=J)break;J=$,y++}}return 0===h?null:(p.length=h,f.length=h,Mr=t.breakOffsets,Br=t.breakOffsetsVisibleColumn,t.breakOffsets=p,t.breakOffsetsVisibleColumn=f,t.wrappedTextIndentLength=l,t)}function Vr(e,t,n,r,i,a){if(-1===r)return null;var o=t.length;if(o<=1)return null;var s=Kr(t,n,r,i,a),u=r-s,c=[],l=[],d=0,p=0,f=0,h=r,g=t.charCodeAt(0),m=e.get(g),_=zr(g,0,n,i),v=1;Fe.E(g)&&(_+=1,g=t.charCodeAt(1),m=e.get(g),v++);for(var y=v;yh&&((0===p||_-f>u)&&(p=b,f=_-C),c[d]=p,l[d]=f,d++,h=f+u,p=0),g=D,m=E}return 0===d?null:(c[d]=o,l[d]=_,new Ot.b(c,l,s))}function zr(e,t,n,r){return 9===e?n-t%n:Fe.D(e)||e<32?r:1}function Hr(e,t){return t-e%t}function Wr(e,t,n,r){return 32!==n&&(2===t||3===t&&2!==r||1===r||3===r&&1!==t)}function Kr(e,t,n,r,i){var a=0;if(0!==i){var o=Fe.v(e);if(-1!==o){for(var s=0;sn&&(a=0)}}return a}var qr=null===(Cr=window.trustedTypes)||void 0===Cr?void 0:Cr.createPolicy("domLineBreaksComputer",{createHTML:function(e){return e}}),Gr=function(){function e(){Object(l.a)(this,e)}return Object(d.a)(e,null,[{key:"create",value:function(){return new e}}]),Object(d.a)(e,[{key:"createLineBreaksComputer",value:function(e,t,n,r){t|=0,n=+n;var i=[];return{addRequest:function(e,t){i.push(e)},finalize:function(){return function(e,t,n,r,i){var a;if(-1===r){for(var o=[],s=0,u=e.length;sc?(b=0,D=0):E=c-S}var x=y.substr(b),k=Yr(x,D,n,E,d);p[_]=b,f[_]=D,h[_]=x,g[_]=k[0],m[_]=k[1]}var T=d.build(),w=null!==(a=null===qr||void 0===qr?void 0:qr.createHTML(T))&&void 0!==a?a:T;l.innerHTML=w,l.style.position="absolute",l.style.top="10000",l.style.wordWrap="break-word",document.body.appendChild(l);for(var A=document.createRange(),O=Array.prototype.slice.call(l.children,0),N=[],I=0;I');var a=e.length,o=t,s=0,u=[],c=[],l=0");for(var d=0;d"),u[d]=s,c[d]=o;var p=l;l=d+1"),u[e.length]=s,c[e.length]=o,i.appendASCIIString(""),[u,c]}function Jr(e,t,n,r){if(n.length<=1)return null;var i=Array.prototype.slice.call(t.children,0),a=[];try{$r(e,i,r,0,null,n.length-1,null,a)}catch(o){return console.log(o),null}return 0===a.length?null:(a.push(n.length),a)}function $r(e,t,n,r,i,a,o,s){if(r!==a&&(i=i||Qr(e,t,n[r],n[r+1]),o=o||Qr(e,t,n[a],n[a+1]),!(Math.abs(i[0].top-o[0].top)<=.1)))if(r+1!==a){var u=r+(a-r)/2|0,c=Qr(e,t,n[u],n[u+1]);$r(e,t,n,r,i,u,c,s),$r(e,t,n,u,c,a,o,s)}else s.push(a)}function Qr(e,t,n,r){return e.setStart(t[n/16384|0].firstChild,n%16384),e.setEnd(t[r/16384|0].firstChild,r%16384),e.getClientRects()}var Xr=n(130),Zr=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},ei=function(e,t){return function(n,r){t(n,r,e)}},ti=0,ni=function(){function e(t,n,r,i,a){Object(l.a)(this,e),this.model=t,this.viewModel=n,this.view=r,this.hasRealView=i,this.listenersToRemove=a}return Object(d.a)(e,[{key:"dispose",value:function(){Object(m.f)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}]),e}(),ri=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r,o,s,u,c,d,p,f,m){var _;Object(l.a)(this,n),(_=t.call(this))._onDidDispose=_._register(new g.a),_.onDidDispose=_._onDidDispose.event,_._onDidChangeModelContent=_._register(new g.a),_.onDidChangeModelContent=_._onDidChangeModelContent.event,_._onDidChangeModelLanguage=_._register(new g.a),_.onDidChangeModelLanguage=_._onDidChangeModelLanguage.event,_._onDidChangeModelLanguageConfiguration=_._register(new g.a),_.onDidChangeModelLanguageConfiguration=_._onDidChangeModelLanguageConfiguration.event,_._onDidChangeModelOptions=_._register(new g.a),_.onDidChangeModelOptions=_._onDidChangeModelOptions.event,_._onDidChangeModelDecorations=_._register(new g.a),_.onDidChangeModelDecorations=_._onDidChangeModelDecorations.event,_._onDidChangeConfiguration=_._register(new g.a),_.onDidChangeConfiguration=_._onDidChangeConfiguration.event,_._onDidChangeModel=_._register(new g.a),_.onDidChangeModel=_._onDidChangeModel.event,_._onDidChangeCursorPosition=_._register(new g.a),_.onDidChangeCursorPosition=_._onDidChangeCursorPosition.event,_._onDidChangeCursorSelection=_._register(new g.a),_.onDidChangeCursorSelection=_._onDidChangeCursorSelection.event,_._onDidAttemptReadOnlyEdit=_._register(new g.a),_.onDidAttemptReadOnlyEdit=_._onDidAttemptReadOnlyEdit.event,_._onDidLayoutChange=_._register(new g.a),_.onDidLayoutChange=_._onDidLayoutChange.event,_._editorTextFocus=_._register(new ii),_.onDidFocusEditorText=_._editorTextFocus.onDidChangeToTrue,_.onDidBlurEditorText=_._editorTextFocus.onDidChangeToFalse,_._editorWidgetFocus=_._register(new ii),_.onDidFocusEditorWidget=_._editorWidgetFocus.onDidChangeToTrue,_.onDidBlurEditorWidget=_._editorWidgetFocus.onDidChangeToFalse,_._onWillType=_._register(new g.a),_.onWillType=_._onWillType.event,_._onDidType=_._register(new g.a),_.onDidType=_._onDidType.event,_._onDidCompositionStart=_._register(new g.a),_.onDidCompositionStart=_._onDidCompositionStart.event,_._onDidCompositionEnd=_._register(new g.a),_.onDidCompositionEnd=_._onDidCompositionEnd.event,_._onDidPaste=_._register(new g.a),_.onDidPaste=_._onDidPaste.event,_._onMouseUp=_._register(new g.a),_.onMouseUp=_._onMouseUp.event,_._onMouseDown=_._register(new g.a),_.onMouseDown=_._onMouseDown.event,_._onMouseDrag=_._register(new g.a),_.onMouseDrag=_._onMouseDrag.event,_._onMouseDrop=_._register(new g.a),_.onMouseDrop=_._onMouseDrop.event,_._onMouseDropCanceled=_._register(new g.a),_.onMouseDropCanceled=_._onMouseDropCanceled.event,_._onContextMenu=_._register(new g.a),_.onContextMenu=_._onContextMenu.event,_._onMouseMove=_._register(new g.a),_.onMouseMove=_._onMouseMove.event,_._onMouseLeave=_._register(new g.a),_.onMouseLeave=_._onMouseLeave.event,_._onMouseWheel=_._register(new g.a),_.onMouseWheel=_._onMouseWheel.event,_._onKeyUp=_._register(new g.a),_.onKeyUp=_._onKeyUp.event,_._onKeyDown=_._register(new g.a),_.onKeyDown=_._onKeyDown.event,_._onDidContentSizeChange=_._register(new g.a),_.onDidContentSizeChange=_._onDidContentSizeChange.event,_._onDidScrollChange=_._register(new g.a),_.onDidScrollChange=_._onDidScrollChange.event,_._onDidChangeViewZones=_._register(new g.a),_.onDidChangeViewZones=_._onDidChangeViewZones.event;var v,b=Object.assign({},r);_._domElement=e,_._overflowWidgetsDomNode=b.overflowWidgetsDomNode,delete b.overflowWidgetsDomNode,_._id=++ti,_._decorationTypeKeysToIds={},_._decorationTypeSubtypes={},_.isSimpleWidget=o.isSimpleWidget||!1,_._telemetryData=o.telemetryData,_._configuration=_._register(_._createConfiguration(b,m)),_._register(_._configuration.onDidChange((function(e){_._onDidChangeConfiguration.fire(e);var t=_._configuration.options;if(e.hasChanged(124)){var n=t.get(124);_._onDidLayoutChange.fire(n)}}))),_._contextKeyService=_._register(d.createScoped(_._domElement)),_._notificationService=f,_._codeEditorService=u,_._commandService=c,_._themeService=p,_._register(new ai(Object(a.a)(_),_._contextKeyService)),_._register(new oi(Object(a.a)(_),_._contextKeyService)),_._instantiationService=s.createChild(new Ir.a([Or.b,_._contextKeyService])),_._modelData=null,_._contributions={},_._actions={},_._focusTracker=new si(e),_._focusTracker.onChange((function(){_._editorWidgetFocus.setValue(_._focusTracker.hasFocus())})),_._contentWidgets={},_._overlayWidgets={},v=Array.isArray(o.contributions)?o.contributions:y.d.getEditorContributions();var D,E=Object(i.a)(v);try{for(E.s();!(D=E.n()).done;){var C=D.value;try{var S=_._instantiationService.createInstance(C.ctor,Object(a.a)(_));_._contributions[C.id]=S}catch(x){Object(h.e)(x)}}}catch(x){E.e(x)}finally{E.f()}return y.d.getEditorActions().forEach((function(e){var t=new er.a(e.id,e.label,e.alias,Object(Pr.n)(e.precondition),(function(){return _._instantiationService.invokeFunction((function(t){return Promise.resolve(e.runEditorCommand(t,Object(a.a)(_),null))}))}),_._contextKeyService);_._actions[t.id]=t})),_._codeEditorService.addCodeEditor(Object(a.a)(_)),_}return Object(d.a)(n,[{key:"_createConfiguration",value:function(e,t){return new v.a(this.isSimpleWidget,e,this._domElement,t)}},{key:"getId",value:function(){return this.getEditorType()+":"+this._id}},{key:"getEditorType",value:function(){return tr.a.ICodeEditor}},{key:"dispose",value:function(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();for(var e=Object.keys(this._contributions),t=0,r=e.length;t0&&void 0!==arguments[0]?arguments[0]:null;if(!this._modelData)return"";var t=!(!e||!e.preserveBOM),n=0;return e&&e.lineEnding&&"\n"===e.lineEnding?n=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(n=2),this._modelData.model.getValue(n,t)}},{key:"setValue",value:function(e){this._modelData&&this._modelData.model.setValue(e)}},{key:"getModel",value:function(){return this._modelData?this._modelData.model:null}},{key:"setModel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e;if((null!==this._modelData||null!==t)&&(!this._modelData||this._modelData.model!==t)){var n=this.hasTextFocus(),r=this._detachModel();this._attachModel(t),n&&this.hasModel()&&this.focus();var i={oldModelUrl:r?r.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(i),this._postDetachModelCleanup(r)}}},{key:"_removeDecorationTypes",value:function(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(var e in this._decorationTypeSubtypes){var t=this._decorationTypeSubtypes[e];for(var n in t)this._removeDecorationType(e+"-"+n)}this._decorationTypeSubtypes={}}}},{key:"getVisibleRanges",value:function(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}},{key:"getVisibleRangesPlusViewportAboveBelow",value:function(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}},{key:"getWhitespaces",value:function(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}},{key:"getTopForLineNumber",value:function(e){return this._modelData?n._getVerticalOffsetForPosition(this._modelData,e,1):-1}},{key:"getTopForPosition",value:function(e,t){return this._modelData?n._getVerticalOffsetForPosition(this._modelData,e,t):-1}},{key:"setHiddenAreas",value:function(e){this._modelData&&this._modelData.viewModel.setHiddenAreas(e.map((function(e){return le.a.lift(e)})))}},{key:"getVisibleColumnFromPosition",value:function(e){if(!this._modelData)return e.column;var t=this._modelData.model.validatePosition(e),n=this._modelData.model.getOptions().tabSize;return de.a.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,n)+1}},{key:"getPosition",value:function(){return this._modelData?this._modelData.viewModel.getPosition():null}},{key:"setPosition",value:function(e){if(this._modelData){if(!ce.a.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}},{key:"_sendRevealRange",value:function(e,t,n,r){if(this._modelData){if(!le.a.isIRange(e))throw new Error("Invalid arguments");var i=this._modelData.model.validateRange(e),a=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(i);this._modelData.viewModel.revealRange("api",n,a,t,r)}}},{key:"revealLine",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealLine(e,0,t)}},{key:"revealLineInCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealLine(e,1,t)}},{key:"revealLineInCenterIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealLine(e,2,t)}},{key:"revealLineNearTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealLine(e,5,t)}},{key:"_revealLine",value:function(e,t,n){if("number"!==typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new le.a(e,1,e,1),t,!1,n)}},{key:"revealPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealPosition(e,0,!0,t)}},{key:"revealPositionInCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealPosition(e,1,!0,t)}},{key:"revealPositionInCenterIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealPosition(e,2,!0,t)}},{key:"revealPositionNearTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealPosition(e,5,!0,t)}},{key:"_revealPosition",value:function(e,t,n,r){if(!ce.a.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new le.a(e.lineNumber,e.column,e.lineNumber,e.column),t,n,r)}},{key:"getSelection",value:function(){return this._modelData?this._modelData.viewModel.getSelection():null}},{key:"getSelections",value:function(){return this._modelData?this._modelData.viewModel.getSelections():null}},{key:"setSelection",value:function(e){var t=E.a.isISelection(e),n=le.a.isIRange(e);if(!t&&!n)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(n){var r={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(r)}}},{key:"_setSelectionImpl",value:function(e){if(this._modelData){var t=new E.a(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}}},{key:"revealLines",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._revealLines(e,t,0,n)}},{key:"revealLinesInCenter",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._revealLines(e,t,1,n)}},{key:"revealLinesInCenterIfOutsideViewport",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._revealLines(e,t,2,n)}},{key:"revealLinesNearTop",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._revealLines(e,t,5,n)}},{key:"_revealLines",value:function(e,t,n,r){if("number"!==typeof e||"number"!==typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new le.a(e,1,t,1),n,!1,r)}},{key:"revealRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this._revealRange(e,n?1:0,r,t)}},{key:"revealRangeInCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealRange(e,1,!0,t)}},{key:"revealRangeInCenterIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealRange(e,2,!0,t)}},{key:"revealRangeNearTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealRange(e,5,!0,t)}},{key:"revealRangeNearTopIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealRange(e,6,!0,t)}},{key:"revealRangeAtTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._revealRange(e,3,!0,t)}},{key:"_revealRange",value:function(e,t,n,r){if(!le.a.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(le.a.lift(e),t,n,r)}},{key:"setSelections",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(var r=0,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:1;if(this._modelData){if("number"!==typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:e},t)}}},{key:"setScrollTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this._modelData){if("number"!==typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:e},t)}}},{key:"setScrollPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._modelData&&this._modelData.viewModel.setScrollPosition(e,t)}},{key:"saveViewState",value:function(){if(!this._modelData)return null;for(var e={},t=0,n=Object.keys(this._contributions);t0&&void 0!==arguments[0]&&arguments[0];this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}},{key:"setAriaOptions",value:function(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}},{key:"applyFontInfo",value:function(e){v.a.applyFontInfoSlow(e,this._configuration.options.get(38))}},{key:"_attachModel",value:function(e){var t=this;if(e){var n=[];this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();var i=new wr(this._id,this._configuration,e,Gr.create(),jr.create(this._configuration.options),(function(e){return f.scheduleAtNextAnimationFrame(e)}));n.push(e.onDidChangeDecorations((function(e){return t._onDidChangeModelDecorations.fire(e)}))),n.push(e.onDidChangeLanguage((function(n){t._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),t._onDidChangeModelLanguage.fire(n)}))),n.push(e.onDidChangeLanguageConfiguration((function(e){return t._onDidChangeModelLanguageConfiguration.fire(e)}))),n.push(e.onDidChangeContent((function(e){return t._onDidChangeModelContent.fire(e)}))),n.push(e.onDidChangeOptions((function(e){return t._onDidChangeModelOptions.fire(e)}))),n.push(e.onWillDispose((function(){return t.setModel(null)}))),n.push(i.onEvent((function(e){switch(e.kind){case 0:t._onDidContentSizeChange.fire(e);break;case 1:t._editorTextFocus.setValue(e.hasFocus);break;case 2:t._onDidScrollChange.fire(e);break;case 3:t._onDidChangeViewZones.fire();break;case 4:t._onDidAttemptReadOnlyEdit.fire();break;case 5:e.reachedMaxCursorCount&&t._notificationService.warn(p.a("cursors.maximum","The number of cursors has been limited to {0}.",Xn.MAX_CURSOR_COUNT));for(var n=[],r=0,i=e.selections.length;r1),this._hasNonEmptySelection.set(e.some((function(e){return!e.isEmpty()})))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}},{key:"_updateFromFocus",value:function(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}},{key:"_updateFromModel",value:function(){var e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}]),n}(m.a),oi=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,r){var i;Object(l.a)(this,n),(i=t.call(this))._editor=e,i._contextKeyService=r,i._langId=nr.a.languageId.bindTo(r),i._hasCompletionItemProvider=nr.a.hasCompletionItemProvider.bindTo(r),i._hasCodeActionsProvider=nr.a.hasCodeActionsProvider.bindTo(r),i._hasCodeLensProvider=nr.a.hasCodeLensProvider.bindTo(r),i._hasDefinitionProvider=nr.a.hasDefinitionProvider.bindTo(r),i._hasDeclarationProvider=nr.a.hasDeclarationProvider.bindTo(r),i._hasImplementationProvider=nr.a.hasImplementationProvider.bindTo(r),i._hasTypeDefinitionProvider=nr.a.hasTypeDefinitionProvider.bindTo(r),i._hasHoverProvider=nr.a.hasHoverProvider.bindTo(r),i._hasDocumentHighlightProvider=nr.a.hasDocumentHighlightProvider.bindTo(r),i._hasDocumentSymbolProvider=nr.a.hasDocumentSymbolProvider.bindTo(r),i._hasReferenceProvider=nr.a.hasReferenceProvider.bindTo(r),i._hasRenameProvider=nr.a.hasRenameProvider.bindTo(r),i._hasSignatureHelpProvider=nr.a.hasSignatureHelpProvider.bindTo(r),i._hasInlineHintsProvider=nr.a.hasInlineHintsProvider.bindTo(r),i._hasDocumentFormattingProvider=nr.a.hasDocumentFormattingProvider.bindTo(r),i._hasDocumentSelectionFormattingProvider=nr.a.hasDocumentSelectionFormattingProvider.bindTo(r),i._hasMultipleDocumentFormattingProvider=nr.a.hasMultipleDocumentFormattingProvider.bindTo(r),i._hasMultipleDocumentSelectionFormattingProvider=nr.a.hasMultipleDocumentSelectionFormattingProvider.bindTo(r),i._isInWalkThrough=nr.a.isInWalkThroughSnippet.bindTo(r);var a=function(){return i._update()};return i._register(e.onDidChangeModel(a)),i._register(e.onDidChangeModelLanguage(a)),i._register(wt.d.onDidChange(a)),i._register(wt.a.onDidChange(a)),i._register(wt.b.onDidChange(a)),i._register(wt.f.onDidChange(a)),i._register(wt.e.onDidChange(a)),i._register(wt.q.onDidChange(a)),i._register(wt.E.onDidChange(a)),i._register(wt.p.onDidChange(a)),i._register(wt.i.onDidChange(a)),i._register(wt.m.onDidChange(a)),i._register(wt.w.onDidChange(a)),i._register(wt.x.onDidChange(a)),i._register(wt.g.onDidChange(a)),i._register(wt.j.onDidChange(a)),i._register(wt.z.onDidChange(a)),i._register(wt.r.onDidChange(a)),a(),i}return Object(d.a)(n,[{key:"dispose",value:function(){Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"reset",value:function(){var e=this;this._contextKeyService.bufferChangeEvents((function(){e._langId.reset(),e._hasCompletionItemProvider.reset(),e._hasCodeActionsProvider.reset(),e._hasCodeLensProvider.reset(),e._hasDefinitionProvider.reset(),e._hasDeclarationProvider.reset(),e._hasImplementationProvider.reset(),e._hasTypeDefinitionProvider.reset(),e._hasHoverProvider.reset(),e._hasDocumentHighlightProvider.reset(),e._hasDocumentSymbolProvider.reset(),e._hasReferenceProvider.reset(),e._hasRenameProvider.reset(),e._hasDocumentFormattingProvider.reset(),e._hasDocumentSelectionFormattingProvider.reset(),e._hasSignatureHelpProvider.reset(),e._isInWalkThrough.reset()}))}},{key:"_update",value:function(){var e=this,t=this._editor.getModel();t?this._contextKeyService.bufferChangeEvents((function(){e._langId.set(t.getLanguageIdentifier().language),e._hasCompletionItemProvider.set(wt.d.has(t)),e._hasCodeActionsProvider.set(wt.a.has(t)),e._hasCodeLensProvider.set(wt.b.has(t)),e._hasDefinitionProvider.set(wt.f.has(t)),e._hasDeclarationProvider.set(wt.e.has(t)),e._hasImplementationProvider.set(wt.q.has(t)),e._hasTypeDefinitionProvider.set(wt.E.has(t)),e._hasHoverProvider.set(wt.p.has(t)),e._hasDocumentHighlightProvider.set(wt.i.has(t)),e._hasDocumentSymbolProvider.set(wt.m.has(t)),e._hasReferenceProvider.set(wt.w.has(t)),e._hasRenameProvider.set(wt.x.has(t)),e._hasSignatureHelpProvider.set(wt.z.has(t)),e._hasInlineHintsProvider.set(wt.r.has(t)),e._hasDocumentFormattingProvider.set(wt.g.has(t)||wt.j.has(t)),e._hasDocumentSelectionFormattingProvider.set(wt.j.has(t)),e._hasMultipleDocumentFormattingProvider.set(wt.g.all(t).length+wt.j.all(t).length>1),e._hasMultipleDocumentSelectionFormattingProvider.set(wt.j.all(t).length>1),e._isInWalkThrough.set(t.uri.scheme===_.c.walkThroughSnippet)})):this.reset()}}]),n}(m.a),si=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this))._onChange=r._register(new g.a),r.onChange=r._onChange.event,r._hasFocus=!1,r._domFocusTracker=r._register(f.trackFocus(e)),r._register(r._domFocusTracker.onDidFocus((function(){r._hasFocus=!0,r._onChange.fire(void 0)}))),r._register(r._domFocusTracker.onDidBlur((function(){r._hasFocus=!1,r._onChange.fire(void 0)}))),r}return Object(d.a)(n,[{key:"hasFocus",value:function(){return this._hasFocus}}]),n}(m.a),ui=encodeURIComponent("");function li(e){return ui+encodeURIComponent(e.toString())+ci}var di=encodeURIComponent('');Object(Be.f)((function(e,t){var n=e.getColor(Nt.u);n&&t.addRule(".monaco-editor .".concat("squiggly-error"," { border-bottom: 4px double ",n,"; }"));var r=e.getColor(Nt.v);r&&t.addRule(".monaco-editor .".concat("squiggly-error",' { background: url("data:image/svg+xml,',li(r),'") repeat-x bottom left; }'));var i=e.getColor(Nt.t);i&&t.addRule(".monaco-editor .".concat("squiggly-error","::before { display: block; content: ''; width: 100%; height: 100%; background: ",i,"; }"));var a=e.getColor(Nt.X);a&&t.addRule(".monaco-editor .".concat("squiggly-warning"," { border-bottom: 4px double ",a,"; }"));var o=e.getColor(Nt.Y);o&&t.addRule(".monaco-editor .".concat("squiggly-warning",' { background: url("data:image/svg+xml,',li(o),'") repeat-x bottom left; }'));var s=e.getColor(Nt.W);s&&t.addRule(".monaco-editor .".concat("squiggly-warning","::before { display: block; content: ''; width: 100%; height: 100%; background: ",s,"; }"));var u=e.getColor(Nt.M);u&&t.addRule(".monaco-editor .".concat("squiggly-info"," { border-bottom: 4px double ",u,"; }"));var c=e.getColor(Nt.N);c&&t.addRule(".monaco-editor .".concat("squiggly-info",' { background: url("data:image/svg+xml,',li(c),'") repeat-x bottom left; }'));var l=e.getColor(Nt.L);l&&t.addRule(".monaco-editor .".concat("squiggly-info","::before { display: block; content: ''; width: 100%; height: 100%; background: ",l,"; }"));var d=e.getColor(Nt.D);d&&t.addRule(".monaco-editor .".concat("squiggly-hint"," { border-bottom: 2px dotted ",d,"; }"));var p=e.getColor(Nt.E);p&&t.addRule(".monaco-editor .".concat("squiggly-hint",' { background: url("data:image/svg+xml,',di+encodeURIComponent(p.toString())+pi,'") no-repeat bottom left; }'));var f=e.getColor(Me.p);f&&t.addRule(".monaco-editor.showUnused .".concat("squiggly-inline-unnecessary"," { opacity: ",f.rgba.a,"; }"));var h=e.getColor(Me.o);h&&t.addRule(".monaco-editor.showUnused .".concat("squiggly-unnecessary"," { border-bottom: 2px dashed ",h,"; }"));var g=e.getColor(Nt.C)||"inherit";t.addRule(".monaco-editor.showDeprecated .".concat("squiggly-inline-deprecated"," { text-decoration: line-through; text-decoration-color: ",g,"}"))}))},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return c}));var r=n(23),i=n(14),a=n(60);function o(e){return e.replace(/[\\/]/g,a.e.sep)}function s(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a.h;if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(n){var o=Object(i.R)(e,t);if(!o)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)}function u(e){var t=Object(a.d)(e);return r.j?!(e.length>3)&&(c(t)&&(2===e.length||92===t.charCodeAt(2))):t===a.e.sep}function c(e){return!!r.j&&(((t=e.charCodeAt(0))>=65&&t<=90||t>=97&&t<=122)&&58===e.charCodeAt(1));var t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(6),i=n(0),a=n(1),o=n(14),s=n(65),u=n(32),c=n(79),l=n(8),d=function(){function e(){Object(i.a)(this,e)}return Object(a.a)(e,null,[{key:"deleteRight",value:function(e,t,n,r){for(var i=[],a=3!==e,o=0,u=r.length;o=d.length+1)return!1;var p=d.charAt(l.column-2),f=n.get(p);if(!f)return!1;if(Object(u.g)(p)){if("never"===t)return!1}else if("never"===e)return!1;var h,g=d.charAt(l.column-1),m=!1,_=Object(r.a)(f);try{for(_.s();!(h=_.n()).done;){var v=h.value;v.open===p&&v.close===g&&(m=!0)}}catch(y){_.e(y)}finally{_.f()}if(!m)return!1}return!0}},{key:"_runAutoClosingPairDelete",value:function(e,t,n){for(var r=[],i=0,a=n.length;i1){var m=n.getLineContent(g.lineNumber),_=o.v(m),v=-1===_?m.length+1:_+1;if(g.column<=v){var y=u.a.visibleColumnFromColumn2(t,n,g),b=u.a.prevIndentTabStop(y,t.indentSize),D=u.a.columnFromVisibleColumn2(t,n,g.lineNumber,b);h=new l.a(g.lineNumber,D,g.lineNumber,g.column)}else h=new l.a(g.lineNumber,g.column-1,g.lineNumber,g.column)}else{var E=c.a.left(t,n,g.lineNumber,g.column);h=new l.a(E.lineNumber,E.column,g.lineNumber,g.column)}}h.isEmpty()?i[d]=null:(h.startLineNumber!==h.endLineNumber&&(a=!0),i[d]=new s.a(h,""))}return[a,i]}},{key:"cut",value:function(e,t,n){for(var r=[],i=0,a=n.length;i1?(d=c.lineNumber-1,p=t.getLineMaxColumn(c.lineNumber-1),f=c.lineNumber,h=t.getLineMaxColumn(c.lineNumber)):(d=c.lineNumber,p=1,f=c.lineNumber,h=t.getLineMaxColumn(c.lineNumber));var g=new l.a(d,p,f,h);g.isEmpty()?r[i]=null:r[i]=new s.a(g,"")}else r[i]=null;else r[i]=new s.a(o,"")}return new u.e(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}]),e}()},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return u}));var r=n(0),i=n(1),a=n(3);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=u(t);return n.textContent=e,n}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=u(t);return l(n,d(e),t.actionHandler),n}function u(e){var t=e.inline?"span":"div",n=document.createElement(t);return e.className&&(n.className=e.className),n}var c=function(){function e(t){Object(r.a)(this,e),this.source=t,this.index=0}return Object(i.a)(e,[{key:"eos",value:function(){return this.index>=this.source.length}},{key:"next",value:function(){var e=this.peek();return this.advance(),e}},{key:"peek",value:function(){return this.source[this.index]}},{key:"advance",value:function(){this.index++}}]),e}();function l(e,t,n){var r;if(2===t.type)r=document.createTextNode(t.content||"");else if(3===t.type)r=document.createElement("b");else if(4===t.type)r=document.createElement("i");else if(5===t.type&&n){var i=document.createElement("a");i.href="#",n.disposeables.add(a.addStandardDisposableListener(i,"click",(function(e){n.callback(String(t.index),e)}))),r=i}else 7===t.type?r=document.createElement("br"):1===t.type&&(r=e);r&&e!==r&&e.appendChild(r),r&&Array.isArray(t.children)&&t.children.forEach((function(e){l(r,e,n)}))}function d(e){for(var t={type:1,children:[]},n=0,r=t,i=[],a=new c(e);!a.eos();){var o=a.next(),s="\\"===o&&0!==p(a.peek());if(s&&(o=a.next()),s||0===p(o)||o!==a.peek())if("\n"===o)2===r.type&&(r=i.pop()),r.children.push({type:7});else if(2!==r.type){var u={type:2,content:o};r.children.push(u),i.push(r),r=u}else r.content+=o;else{a.advance(),2===r.type&&(r=i.pop());var l=p(o);if(r.type===l||5===r.type&&6===l)r=i.pop();else{var d={type:l,children:[]};5===l&&(d.index=n,n++),r.children.push(d),i.push(r),r=d}}}return 2===r.type&&(r=i.pop()),i.length,t}function p(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return D})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return C}));var r=n(22),i=n(17),a=n(15),o=n(4),s=n(5),u=n(0),c=n(1),l=n(42),d=n(3),p=n(29),f=n(11),h=n(7),g=n(23),m=n(14),_=n(109),v=n(19),y=n(33),b=n(170),D={forceCopyWithSyntaxHighlighting:!1},E=function(){function e(){Object(u.a)(this,e),this._lastState=null}return Object(c.a)(e,[{key:"set",value:function(e,t){this._lastState={lastCopiedValue:e,data:t}}},{key:"get",value:function(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}]),e}();E.INSTANCE=new E;var C=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,i){var a;Object(u.a)(this,n),(a=t.call(this)).textArea=i,a._onFocus=a._register(new f.a),a.onFocus=a._onFocus.event,a._onBlur=a._register(new f.a),a.onBlur=a._onBlur.event,a._onKeyDown=a._register(new f.a),a.onKeyDown=a._onKeyDown.event,a._onKeyUp=a._register(new f.a),a.onKeyUp=a._onKeyUp.event,a._onCut=a._register(new f.a),a.onCut=a._onCut.event,a._onPaste=a._register(new f.a),a.onPaste=a._onPaste.event,a._onType=a._register(new f.a),a.onType=a._onType.event,a._onCompositionStart=a._register(new f.a),a.onCompositionStart=a._onCompositionStart.event,a._onCompositionUpdate=a._register(new f.a),a.onCompositionUpdate=a._onCompositionUpdate.event,a._onCompositionEnd=a._register(new f.a),a.onCompositionEnd=a._onCompositionEnd.event,a._onSelectionChangeRequest=a._register(new f.a),a.onSelectionChangeRequest=a._onSelectionChangeRequest.event,a._host=e,a._textArea=a._register(new x(i)),a._asyncTriggerCut=a._register(new p.d((function(){return a._onCut.fire()}),0)),a._asyncFocusGainWriteScreenReaderContent=a._register(new p.d((function(){return a.writeScreenReaderContent("asyncFocusGain")}),0)),a._textAreaState=_.b.EMPTY,a._selectionChangeListener=null,a.writeScreenReaderContent("ctor"),a._hasFocus=!1,a._isDoingComposition=!1,a._nextCommand=0;var o=null;a._register(d.addStandardDisposableListener(i.domNode,"keydown",(function(e){(109===e.keyCode||a._isDoingComposition&&1===e.keyCode)&&e.stopPropagation(),e.equals(9)&&e.preventDefault(),o=e,a._onKeyDown.fire(e)}))),a._register(d.addStandardDisposableListener(i.domNode,"keyup",(function(e){a._onKeyUp.fire(e)}))),a._register(d.addDisposableListener(i.domNode,"compositionstart",(function(e){if(_.c&&console.log("[compositionstart]",e),!a._isDoingComposition){a._isDoingComposition=!0;var t=!1;g.f&&o&&o.equals(109)&&a._textAreaState.selectionStart===a._textAreaState.selectionEnd&&a._textAreaState.selectionStart>0&&a._textAreaState.value.substr(a._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"!==o.code&&"ArrowLeft"!==o.code||(_.c&&console.log("[compositionstart] Handling long press case on macOS + arrow key",e),t=!0)),t?a._textAreaState=new _.b(a._textAreaState.value,a._textAreaState.selectionStart-1,a._textAreaState.selectionEnd,a._textAreaState.selectionStartPosition?new v.a(a._textAreaState.selectionStartPosition.lineNumber,a._textAreaState.selectionStartPosition.column-1):null,a._textAreaState.selectionEndPosition):a._setAndWriteTextAreaState("compositionstart",_.b.EMPTY),a._onCompositionStart.fire({moveOneCharacterLeft:t})}})));var s=function(e){var t=a._textAreaState,n=_.b.selectedText(e);return[n,{text:n.value,replaceCharCnt:t.selectionEnd-t.selectionStart}]};return a._register(d.addDisposableListener(i.domNode,"compositionupdate",(function(e){_.c&&console.log("[compositionupdate]",e);var t=s(e.data||""),n=Object(r.a)(t,2),i=n[0],o=n[1];a._textAreaState=i,a._onType.fire(o),a._onCompositionUpdate.fire(e)}))),a._register(d.addDisposableListener(i.domNode,"compositionend",(function(e){if(_.c&&console.log("[compositionend]",e),a._isDoingComposition){var t=s(e.data||""),n=Object(r.a)(t,2),i=n[0],o=n[1];a._textAreaState=i,a._onType.fire(o),(l.e||l.i)&&(a._textAreaState=_.b.readFromTextArea(a._textArea)),a._isDoingComposition&&(a._isDoingComposition=!1,a._onCompositionEnd.fire())}}))),a._register(d.addDisposableListener(i.domNode,"input",(function(){if(a._textArea.setIgnoreSelectionChangeTime("received input event"),!a._isDoingComposition){var e=function(e){var t=a._textAreaState,n=_.b.readFromTextArea(a._textArea);return[n,_.b.deduceInput(t,n,e)]}(g.f),t=Object(r.a)(e,2),n=t[0],i=t[1];0===i.replaceCharCnt&&1===i.text.length&&m.E(i.text.charCodeAt(0))||(a._textAreaState=n,0===a._nextCommand?""!==i.text&&a._onType.fire(i):(""===i.text&&0===i.replaceCharCnt||a._firePaste(i.text,null),a._nextCommand=0))}}))),a._register(d.addDisposableListener(i.domNode,"cut",(function(e){a._textArea.setIgnoreSelectionChangeTime("received cut event"),a._ensureClipboardGetsEditorSelection(e),a._asyncTriggerCut.schedule()}))),a._register(d.addDisposableListener(i.domNode,"copy",(function(e){a._ensureClipboardGetsEditorSelection(e)}))),a._register(d.addDisposableListener(i.domNode,"paste",(function(e){if(a._textArea.setIgnoreSelectionChangeTime("received paste event"),S.canUseTextData(e)){var t=S.getTextData(e),n=Object(r.a)(t,2),i=n[0],o=n[1];""!==i&&a._firePaste(i,o)}else a._textArea.getSelectionStart()!==a._textArea.getSelectionEnd()&&a._setAndWriteTextAreaState("paste",_.b.EMPTY),a._nextCommand=1}))),a._register(d.addDisposableListener(i.domNode,"focus",(function(){var e=a._hasFocus;a._setHasFocus(!0),l.k&&!e&&a._hasFocus&&a._asyncFocusGainWriteScreenReaderContent.schedule()}))),a._register(d.addDisposableListener(i.domNode,"blur",(function(){a._isDoingComposition&&(a._isDoingComposition=!1,a.writeScreenReaderContent("blurWithoutCompositionEnd"),a._onCompositionEnd.fire()),a._setHasFocus(!1)}))),a}return Object(c.a)(n,[{key:"_installSelectionChangeListener",value:function(){var e=this,t=0;return d.addDisposableListener(document,"selectionchange",(function(n){if(e._hasFocus&&!e._isDoingComposition&&l.e){var r=Date.now(),i=r-t;if(t=r,!(i<5)){var a=r-e._textArea.getIgnoreSelectionChangeTime();if(e._textArea.resetSelectionChangeTime(),!(a<100)&&e._textAreaState.selectionStartPosition&&e._textAreaState.selectionEndPosition){var o=e._textArea.getValue();if(e._textAreaState.value===o){var s=e._textArea.getSelectionStart(),u=e._textArea.getSelectionEnd();if(e._textAreaState.selectionStart!==s||e._textAreaState.selectionEnd!==u){var c=e._textAreaState.deduceEditorPosition(s),d=e._host.deduceModelPosition(c[0],c[1],c[2]),p=e._textAreaState.deduceEditorPosition(u),f=e._host.deduceModelPosition(p[0],p[1],p[2]),h=new y.a(d.lineNumber,d.column,f.lineNumber,f.column);e._onSelectionChangeRequest.fire(h)}}}}}}))}},{key:"dispose",value:function(){Object(i.a)(Object(a.a)(n.prototype),"dispose",this).call(this),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}},{key:"focusTextArea",value:function(){this._setHasFocus(!0),this.refreshFocusState()}},{key:"isFocused",value:function(){return this._hasFocus}},{key:"refreshFocusState",value:function(){var e=d.getShadowRoot(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):d.isInDOM(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}},{key:"_setHasFocus",value:function(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}},{key:"_setAndWriteTextAreaState",value:function(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}},{key:"writeScreenReaderContent",value:function(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}},{key:"_ensureClipboardGetsEditorSelection",value:function(e){var t=this._host.getDataToCopy(S.canUseTextData(e)&&b.a.clipboard.richText),n={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};E.INSTANCE.set(l.i?t.text.replace(/\r\n/g,"\n"):t.text,n),S.canUseTextData(e)?S.setTextData(e,t.text,t.html,n):this._setAndWriteTextAreaState("copy or cut",_.b.selectedText(t.text))}},{key:"_firePaste",value:function(e,t){t||(t=E.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}]),n}(h.a),S=function(){function e(){Object(u.a)(this,e)}return Object(c.a)(e,null,[{key:"canUseTextData",value:function(e){return!!e.clipboardData||!!window.clipboardData}},{key:"getTextData",value:function(e){if(e.clipboardData){e.preventDefault();var t=e.clipboardData.getData("text/plain"),n=null,r=e.clipboardData.getData("vscode-editor-data");if("string"===typeof r)try{1!==(n=JSON.parse(r)).version&&(n=null)}catch(i){}return[t,n]}if(window.clipboardData)return e.preventDefault(),[window.clipboardData.getData("Text"),null];throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}},{key:"setTextData",value:function(e,t,n,r){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),"string"===typeof n&&e.clipboardData.setData("text/html",n),e.clipboardData.setData("vscode-editor-data",JSON.stringify(r)),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}]),e}(),x=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this))._actual=e,r._ignoreSelectionChangeTime=0,r}return Object(c.a)(n,[{key:"setIgnoreSelectionChangeTime",value:function(e){this._ignoreSelectionChangeTime=Date.now()}},{key:"getIgnoreSelectionChangeTime",value:function(){return this._ignoreSelectionChangeTime}},{key:"resetSelectionChangeTime",value:function(){this._ignoreSelectionChangeTime=0}},{key:"getValue",value:function(){return this._actual.domNode.value}},{key:"setValue",value:function(e,t){var n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)}},{key:"getSelectionStart",value:function(){return this._actual.domNode.selectionStart}},{key:"getSelectionEnd",value:function(){return this._actual.domNode.selectionEnd}},{key:"setSelectionRange",value:function(e,t,n){var r=this._actual.domNode,i=d.getShadowRoot(r),a=(i?i.activeElement:document.activeElement)===r,o=r.selectionStart,s=r.selectionEnd;if(a&&o===t&&s===n)l.i&&window.parent!==window&&r.focus();else{if(a)return this.setIgnoreSelectionChangeTime("setSelectionRange"),r.setSelectionRange(t,n),void(l.i&&window.parent!==window&&r.focus());try{var u=d.saveParentsScrollTop(r);this.setIgnoreSelectionChangeTime("setSelectionRange"),r.focus(),r.setSelectionRange(t,n),d.restoreParentsScrollTop(r,u)}catch(c){}}}}]),n}(h.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(0),i=n(1),a=function(){function e(t,n,i){Object(r.a)(this,e),this.from=0|t,this.to=0|n,this.colorId=0|i}return Object(i.a)(e,null,[{key:"compare",value:function(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}]),e}(),o=function(){function e(t,n,i){Object(r.a)(this,e),this.startLineNumber=t,this.endLineNumber=n,this.color=i,this._colorZone=null}return Object(i.a)(e,[{key:"setColorZone",value:function(e){this._colorZone=e}},{key:"getColorZones",value:function(){return this._colorZone}}],[{key:"compare",value:function(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.colorn&&(f=n-h);var g=c.color,m=this._color2Id[g];m||(m=++this._lastAssignedId,this._color2Id[g]=m,this._id2Color[m]=g);var _=new a(f-h,f+h,m);c.setColorZone(_),o.push(_)}return this._colorZonesInvalid=!1,o.sort(a.compare),o}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return u.f}));var r,i,a,o,s,u=n(110),c=n(197);!function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext"}(r||(r={})),function(e){e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev"}(i||(i={})),function(e){e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed"}(a||(a={})),function(e){e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest"}(o||(o={})),function(e){e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs"}(s||(s={}));var l=function(){function e(e,t,n){this._onDidChange=new c.a,this._onDidExtraLibsChange=new c.a,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(n),this._onDidExtraLibsChangeTimeout=-1}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDidExtraLibsChange",{get:function(){return this._onDidExtraLibsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"workerOptions",{get:function(){return this._workerOptions},enumerable:!1,configurable:!0}),e.prototype.getExtraLibs=function(){return this._extraLibs},e.prototype.addExtraLib=function(e,t){var n,r=this;if(n="undefined"===typeof t?"ts:extralib-"+Math.random().toString(36).substring(2,15):t,this._extraLibs[n]&&this._extraLibs[n].content===e)return{dispose:function(){}};var i=1;return this._removedExtraLibs[n]&&(i=this._removedExtraLibs[n]+1),this._extraLibs[n]&&(i=this._extraLibs[n].version+1),this._extraLibs[n]={content:e,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:function(){var e=r._extraLibs[n];e&&e.version===i&&(delete r._extraLibs[n],r._removedExtraLibs[n]=i,r._fireOnDidExtraLibsChangeSoon())}}},e.prototype.setExtraLibs=function(e){for(var t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(var n=0,r=e;n0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Object(Y.a)(this,e),this.value=r,"string"!==typeof this.value)throw Object(ie.b)("value");"boolean"===typeof i?(this.isTrusted=i,this.supportThemeIcons=!1):(this.isTrusted=null!==(t=i.isTrusted)&&void 0!==t?t:void 0,this.supportThemeIcons=null!==(n=i.supportThemeIcons)&&void 0!==n&&n)}return Object(J.a)(e,[{key:"appendText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.value+=ce(this.supportThemeIcons?Object(re.a)(e):e).replace(/([ \t]+)/g,(function(e,t){return" ".repeat(t.length)})).replace(/^>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}},{key:"appendMarkdown",value:function(e){return this.value+=e,this}},{key:"appendCodeblock",value:function(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}}]),e}();function oe(e){return se(e)?!e.value:!Array.isArray(e)||e.every(oe)}function se(e){return e instanceof ae||!(!e||"object"!==typeof e)&&("string"===typeof e.value&&("boolean"===typeof e.isTrusted||void 0===e.isTrusted)&&("boolean"===typeof e.supportThemeIcons||void 0===e.supportThemeIcons))}function ue(e,t){return e===t||!(!e||!t)&&(e.value===t.value&&e.isTrusted===t.isTrusted&&e.supportThemeIcons===t.supportThemeIcons)}function ce(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function le(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}function de(e){var t=[],n=e.split("|").map((function(e){return e.trim()}));e=n[0];var r=n[1];if(r){var i=/height=(\d+)/.exec(r),a=/width=(\d+)/.exec(r),o=i?i[1]:"",s=a?a[1]:"",u=isFinite(parseInt(s)),c=isFinite(parseInt(o));u&&t.push('width="'.concat(s,'"')),c&&t.push('height="'.concat(o,'"'))}return{href:e,dimensions:t}}var pe=n(67),fe=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},he=function(e,t){return function(n,r){t(n,r,e)}},ge=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},me=new te.c("selectionAnchorSet",!1),_e=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this.editor=t,this.selectionAnchorSetContextKey=me.bindTo(n),this.modelChangeListener=t.onDidChangeModel((function(){return r.selectionAnchorSetContextKey.reset()}))}return Object(J.a)(e,[{key:"setSelectionAnchor",value:function(){if(this.editor.hasModel()){var e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],n=this.editor.deltaDecorations(t,[{range:Z.a.fromPositions(e,e),options:{stickiness:1,hoverMessage:(new ae).appendText(Object(Q.a)("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=n[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),Object(pe.a)(Object(Q.a)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}},{key:"goToSelectionAnchor",value:function(){if(this.editor.hasModel()&&this.decorationId){var e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}},{key:"selectFromAnchorToCursor",value:function(){if(this.editor.hasModel()&&this.decorationId){var e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){var t=this.editor.getPosition();this.editor.setSelection(Z.a.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}},{key:"cancelSelectionAnchor",value:function(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}},{key:"dispose",value:function(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();_e.ID="editor.contrib.selectionAnchorController",_e=fe([he(1,te.b)],_e);var ve=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.setSelectionAnchor",label:Object(Q.a)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,2080),weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){return ge(this,void 0,void 0,K.a.mark((function e(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_e.get(t).setSelectionAnchor();case 2:case"end":return e.stop()}}),e)})))}}]),n}($.b),ye=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.goToSelectionAnchor",label:Object(Q.a)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:me})}return Object(J.a)(n,[{key:"run",value:function(e,t){return ge(this,void 0,void 0,K.a.mark((function e(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_e.get(t).goToSelectionAnchor();case 2:case"end":return e.stop()}}),e)})))}}]),n}($.b),be=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.selectFromAnchorToCursor",label:Object(Q.a)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:me,kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,2089),weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){return ge(this,void 0,void 0,K.a.mark((function e(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_e.get(t).selectFromAnchorToCursor();case 2:case"end":return e.stop()}}),e)})))}}]),n}($.b),De=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.cancelSelectionAnchor",label:Object(Q.a)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:me,kbOpts:{kbExpr:X.a.editorTextFocus,primary:9,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){return ge(this,void 0,void 0,K.a.mark((function e(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_e.get(t).cancelSelectionAnchor();case 2:case"end":return e.stop()}}),e)})))}}]),n}($.b);Object($.l)(_e.ID,_e),Object($.j)(ve),Object($.j)(ye),Object($.j)(be),Object($.j)(De);var Ee=n(6),Ce=n(22),Se=(n(393),n(29)),xe=n(7),ke=n(19),Te=n(8),we=n(59),Ae=n(41),Oe=n(58),Ne=n(10),Ie=n(25),Fe=n(39),Le=Object(Ne.lc)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},Q.a("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),Pe=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.jumpToBracket",label:Q.a("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3160,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=Be.get(t);n&&n.jumpToBracket()}}]),n}($.b),Re=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.selectToBracket",label:Q.a("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}return Object(J.a)(n,[{key:"run",value:function(e,t,n){var r=Be.get(t);if(r){var i=!0;n&&!1===n.selectBrackets&&(i=!1),r.selectToBracket(i)}}}]),n}($.b),Me=function e(t,n,r){Object(Y.a)(this,e),this.position=t,this.brackets=n,this.options=r},Be=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this))._editor=e,r._lastBracketsData=[],r._lastVersionId=0,r._decorations=[],r._updateBracketsSoon=r._register(new Se.d((function(){return r._updateBrackets()}),50)),r._matchBrackets=r._editor.getOption(58),r._updateBracketsSoon.schedule(),r._register(e.onDidChangeCursorPosition((function(e){"never"!==r._matchBrackets&&r._updateBracketsSoon.schedule()}))),r._register(e.onDidChangeModelContent((function(e){r._updateBracketsSoon.schedule()}))),r._register(e.onDidChangeModel((function(e){r._lastBracketsData=[],r._decorations=[],r._updateBracketsSoon.schedule()}))),r._register(e.onDidChangeModelLanguageConfiguration((function(e){r._lastBracketsData=[],r._updateBracketsSoon.schedule()}))),r._register(e.onDidChangeConfiguration((function(e){e.hasChanged(58)&&(r._matchBrackets=r._editor.getOption(58),r._decorations=r._editor.deltaDecorations(r._decorations,[]),r._lastBracketsData=[],r._lastVersionId=0,r._updateBracketsSoon.schedule())}))),r}return Object(J.a)(n,[{key:"jumpToBracket",value:function(){if(this._editor.hasModel()){var e=this._editor.getModel(),t=this._editor.getSelections().map((function(t){var n=t.getStartPosition(),r=e.matchBracket(n),i=null;if(r)r[0].containsPosition(n)?i=r[1].getStartPosition():r[1].containsPosition(n)&&(i=r[0].getStartPosition());else{var a=e.findEnclosingBrackets(n);if(a)i=a[0].getStartPosition();else{var o=e.findNextBracket(n);o&&o.range&&(i=o.range.getStartPosition())}}return i?new Z.a(i.lineNumber,i.column,i.lineNumber,i.column):new Z.a(n.lineNumber,n.column,n.lineNumber,n.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}}},{key:"selectToBracket",value:function(e){if(this._editor.hasModel()){var t=this._editor.getModel(),n=[];this._editor.getSelections().forEach((function(r){var i=r.getStartPosition(),a=t.matchBracket(i);if(!a&&!(a=t.findEnclosingBrackets(i))){var o=t.findNextBracket(i);o&&o.range&&(a=t.matchBracket(o.range.getStartPosition()))}var s=null,u=null;if(a){a.sort(Te.a.compareRangesUsingStarts);var c=a,l=Object(Ce.a)(c,2),d=l[0],p=l[1];s=e?d.getStartPosition():d.getEndPosition(),u=e?p.getEndPosition():p.getStartPosition()}s&&u&&n.push(new Z.a(s.lineNumber,s.column,u.lineNumber,u.column))})),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}}},{key:"_updateBrackets",value:function(){if("never"!==this._matchBrackets){this._recomputeBrackets();var e,t=[],n=0,r=Object(Ee.a)(this._lastBracketsData);try{for(r.s();!(e=r.n()).done;){var i=e.value,a=i.brackets;a&&(t[n++]={range:a[0],options:i.options},t[n++]={range:a[1],options:i.options})}}catch(o){r.e(o)}finally{r.f()}this._decorations=this._editor.deltaDecorations(this._decorations,t)}}},{key:"_recomputeBrackets",value:function(){if(!this._editor.hasModel())return this._lastBracketsData=[],void(this._lastVersionId=0);var e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);var t=this._editor.getModel(),r=t.getVersionId(),i=[];this._lastVersionId===r&&(i=this._lastBracketsData);for(var a=[],o=0,s=0,u=e.length;s1&&a.sort(ke.a.compare);for(var l=[],d=0,p=0,f=i.length,h=0,g=a.length;h0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())}}}]),n}($.b);Object($.j)(Ke);var qe=n(42),Ge=n(23),Ye=n(190),Je=n(46),$e=n(126),Qe=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Xe="9_cutcopypaste",Ze=Ge.g||document.queryCommandSupported("cut"),et=Ge.g||document.queryCommandSupported("copy"),tt=et&&!qe.f,nt="undefined"!==typeof navigator.clipboard&&!qe.i||document.queryCommandSupported("paste");function rt(e){return e.register(),e}var it=Ze?rt(new $.e({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Ge.g?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Fe.b.MenubarEditMenu,group:"2_ccp",title:Q.a({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:Fe.b.EditorContext,group:Xe,title:Q.a("actions.clipboard.cutLabel","Cut"),when:X.a.writable,order:1},{menuId:Fe.b.CommandPalette,group:"",title:Q.a("actions.clipboard.cutLabel","Cut"),order:1}]})):void 0,at=et?rt(new $.e({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Ge.g?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Fe.b.MenubarEditMenu,group:"2_ccp",title:Q.a({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:Fe.b.EditorContext,group:Xe,title:Q.a("actions.clipboard.copyLabel","Copy"),order:2},{menuId:Fe.b.CommandPalette,group:"",title:Q.a("actions.clipboard.copyLabel","Copy"),order:1}]})):void 0,ot=nt?rt(new $.e({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Ge.g?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Fe.b.MenubarEditMenu,group:"2_ccp",title:Q.a({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:3},{menuId:Fe.b.EditorContext,group:Xe,title:Q.a("actions.clipboard.pasteLabel","Paste"),when:X.a.writable,order:3},{menuId:Fe.b.CommandPalette,group:"",title:Q.a("actions.clipboard.pasteLabel","Paste"),order:1}]})):void 0,st=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:Q.a("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){t.hasModel()&&(!t.getOption(28)&&t.getSelection().isEmpty()||(Ye.a.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),Ye.a.forceCopyWithSyntaxHighlighting=!1))}}]),n}($.b);function ut(e,t){e&&(e.addImplementation(1e4,(function(e,n){var r=e.get(Je.a).getFocusedCodeEditor();if(r&&r.hasTextFocus()){var i=r.getOption(28),a=r.getSelection();return a&&a.isEmpty()&&!i||document.execCommand(t),!0}return!1})),e.addImplementation(0,(function(e,n){return document.execCommand(t),!0})))}ut(it,"cut"),ut(at,"copy"),ot&&(ot.addImplementation(1e4,(function(e,t){var n=e.get(Je.a),r=e.get($e.a),i=n.getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&(!(!document.execCommand("paste")&&Ge.i)||(Qe(void 0,void 0,void 0,K.a.mark((function e(){var t,n,a,o,s;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.readText();case 2:""!==(t=e.sent)&&(n=Ye.b.INSTANCE.get(t),a=!1,o=null,s=null,n&&(a=i.getOption(28)&&!!n.isFromEmptySelection,o="undefined"!==typeof n.multicursorText?n.multicursorText:null,s=n.mode),i.trigger("keyboard","paste",{text:t,pasteOnNewLine:a,multicursorText:o,mode:s}));case 4:case"end":return e.stop()}}),e)}))),!0))})),ot.addImplementation(0,(function(e,t){return document.execCommand("paste"),!0}))),tt&&Object($.j)(st);var ct=n(21),lt=n(34),dt=n(37),pt=function(){function e(t){Object(Y.a)(this,e),this.executor=t,this._didRun=!1}return Object(J.a)(e,[{key:"getValue",value:function(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}},{key:"rawValue",get:function(){return this._value}}]),e}(),ft=n(14),ht=n(160),gt=n(35),mt=n(85),_t=n(18),vt=n(55),yt=function(){function e(t){Object(Y.a)(this,e),this.value=t}return Object(J.a)(e,[{key:"equals",value:function(e){return this.value===e.value}},{key:"contains",value:function(t){return this.equals(t)||""===this.value||t.value.startsWith(this.value+e.sep)}},{key:"intersects",value:function(e){return this.contains(e)||e.contains(this)}},{key:"append",value:function(t){return new e(this.value+e.sep+t)}}]),e}();function bt(e,t){var n=t.kind?new yt(t.kind):void 0;return!!(!e.include||n&&e.include.contains(n))&&(!(e.excludes&&n&&e.excludes.some((function(t){return Dt(n,t,e.include)})))&&(!(!e.includeSourceActions&&n&&yt.Source.contains(n))&&!(e.onlyIncludePreferredActions&&!t.isPreferred)))}function Dt(e,t,n){return!!t.contains(e)&&(!n||!t.contains(n))}yt.sep=".",yt.None=new yt("@@none@@"),yt.Empty=new yt(""),yt.QuickFix=new yt("quickfix"),yt.Refactor=new yt("refactor"),yt.Source=new yt("source"),yt.SourceOrganizeImports=yt.Source.append("organizeImports"),yt.SourceFixAll=yt.Source.append("fixAll");var Et=function(){function e(t,n,r){Object(Y.a)(this,e),this.kind=t,this.apply=n,this.preferred=r}return Object(J.a)(e,null,[{key:"fromUser",value:function(t,n){return t&&"object"===typeof t?new e(e.getKindFromUser(t,n.kind),e.getApplyFromUser(t,n.apply),e.getPreferredUser(t)):new e(n.kind,n.apply,!1)}},{key:"getApplyFromUser",value:function(e,t){switch("string"===typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}},{key:"getKindFromUser",value:function(e,t){return"string"===typeof e.kind?new yt(e.kind):t}},{key:"getPreferredUser",value:function(e){return"boolean"===typeof e.preferred&&e.preferred}}]),e}(),Ct=n(81),St=n(38),xt=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},kt="editor.action.codeAction",Tt="editor.action.refactor",wt="editor.action.sourceAction",At="editor.action.organizeImports",Ot="editor.action.fixAll",Nt=function(){function e(t,n){Object(Y.a)(this,e),this.action=t,this.provider=n}return Object(J.a)(e,[{key:"resolve",value:function(e){var t;return xt(this,void 0,void 0,K.a.mark((function n(){var r;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)||this.action.edit){n.next=11;break}return n.prev=1,n.next=4,this.provider.resolveCodeAction(this.action,e);case 4:r=n.sent,n.next=10;break;case 7:n.prev=7,n.t0=n.catch(1),Object(ie.f)(n.t0);case 10:r&&(this.action.edit=r.edit);case 11:return n.abrupt("return",this);case 12:case"end":return n.stop()}}),n,this,[[1,7]])})))}}]),e}(),It=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;return Object(Y.a)(this,n),(a=t.call(this)).documentation=r,a._register(i),a.allActions=Object(ne.n)(Object(ct.a)(e),n.codeActionsComparator),a.validActions=a.allActions.filter((function(e){return!e.action.disabled})),a}return Object(J.a)(n,[{key:"hasAutoFix",get:function(){return this.validActions.some((function(e){var t=e.action;return!!t.kind&&yt.QuickFix.contains(new yt(t.kind))&&!!t.isPreferred}))}}],[{key:"codeActionsComparator",value:function(e,t){var n=e.action,r=t.action;return n.isPreferred&&!r.isPreferred?-1:!n.isPreferred&&r.isPreferred?1:Object(ne.m)(n.diagnostics)?Object(ne.m)(r.diagnostics)?n.diagnostics[0].message.localeCompare(r.diagnostics[0].message):-1:Object(ne.m)(r.diagnostics)?1:0}}]),n}(xe.a),Ft={actions:[],documentation:void 0};function Lt(e,t,n,r,i){var a,o=this,s=n.filter||{},u={only:null===(a=s.include)||void 0===a?void 0:a.value,trigger:n.type},c=new mt.d(e,i),l=function(e,t){return _t.a.all(e).filter((function(e){return!e.providedCodeActionKinds||e.providedCodeActionKinds.some((function(e){return function(e,t){return!(e.include&&!e.include.intersects(t))&&(!e.excludes||!e.excludes.some((function(n){return Dt(t,n,e.include)})))&&!(!e.includeSourceActions&&yt.Source.contains(t))}(t,new yt(e))}))}))}(e,s),d=new xe.b,p=l.map((function(n){return xt(o,void 0,void 0,K.a.mark((function i(){var a,o,l;return K.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,r.report(n),i.next=4,n.provideCodeActions(e,t,u,c.token);case 4:if((a=i.sent)&&d.add(a),!c.token.isCancellationRequested){i.next=8;break}return i.abrupt("return",Ft);case 8:return o=((null===a||void 0===a?void 0:a.actions)||[]).filter((function(e){return e&&bt(s,e)})),l=Pt(n,o,s.include),i.abrupt("return",{actions:o.map((function(e){return new Nt(e,n)})),documentation:l});case 13:if(i.prev=13,i.t0=i.catch(0),!Object(ie.d)(i.t0)){i.next=17;break}throw i.t0;case 17:return Object(ie.f)(i.t0),i.abrupt("return",Ft);case 19:case"end":return i.stop()}}),i,null,[[0,13]])})))})),f=_t.a.onDidChange((function(){var t=_t.a.all(e);Object(ne.g)(t,l)||c.cancel()}));return Promise.all(p).then((function(e){var t=Object(ne.j)(e.map((function(e){return e.actions}))),n=Object(ne.d)(e.map((function(e){return e.documentation})));return new It(t,n,d)})).finally((function(){f.dispose(),c.dispose()}))}function Pt(e,t,n){if(e.documentation){var r=e.documentation.map((function(e){return{kind:new yt(e.kind),command:e.command}}));if(n){var i,a,o=Object(Ee.a)(r);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.kind.contains(n)&&(i?i.kind.contains(s.kind)&&(i=s):i=s)}}catch(h){o.e(h)}finally{o.f()}if(i)return null===i||void 0===i?void 0:i.command}var u,c=Object(Ee.a)(t);try{for(c.s();!(u=c.n()).done;){var l=u.value;if(l.kind){var d,p=Object(Ee.a)(r);try{for(p.s();!(d=p.n()).done;){var f=d.value;if(f.kind.contains(new yt(l.kind)))return f.command}}catch(h){p.e(h)}finally{p.f()}}}}catch(h){c.e(h)}finally{c.f()}}}St.a.registerCommand("_executeCodeActionProvider",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Bt=function(e,t){return function(n,r){t(n,r,e)}},jt=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this._messageWidget=new xe.d,this._messageListeners=new xe.b,this._editor=t,this._visible=e.MESSAGE_VISIBLE.bindTo(n),this._editorListener=this._editor.onDidAttemptReadOnlyEdit((function(){return r._onDidAttemptReadOnlyEdit()}))}return Object(J.a)(e,[{key:"dispose",value:function(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}},{key:"showMessage",value:function(e,t){var n,r=this;Object(pe.a)(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new Vt(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText((function(){return r.closeMessage()}))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((function(){return r.closeMessage()}))),this._messageListeners.add(this._editor.onDidDispose((function(){return r.closeMessage()}))),this._messageListeners.add(this._editor.onDidChangeModel((function(){return r.closeMessage()}))),this._messageListeners.add(new Se.e((function(){return r.closeMessage()}),3e3)),this._messageListeners.add(this._editor.onMouseMove((function(e){e.target.position&&(n?n.containsPosition(e.target.position)||r.closeMessage():n=new Te.a(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}},{key:"closeMessage",value:function(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Vt.fadeOut(this._messageWidget.value))}},{key:"_onDidAttemptReadOnlyEdit",value:function(){this._editor.hasModel()&&this.showMessage(Q.a("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();jt.ID="editor.contrib.messageController",jt.MESSAGE_VISIBLE=new te.c("messageVisible",!1),jt=Mt([Bt(1,te.b)],jt);var Ut=$.c.bindToContribution(jt.get);Object($.k)(new Ut({id:"leaveEditorMessage",precondition:jt.MESSAGE_VISIBLE,handler:function(e){return e.closeMessage()},kbOpts:{weight:130,primary:9}}));var Vt=function(){function e(t,n,r){var i=n.lineNumber,a=n.column;Object(Y.a)(this,e),this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=t,this._editor.revealLinesInCenterIfOutsideViewport(i,i,0),this._position={lineNumber:i,column:a-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");var o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);var s=document.createElement("div");s.classList.add("message"),s.textContent=r,this._domNode.appendChild(s);var u=document.createElement("div");u.classList.add("anchor","below"),this._domNode.appendChild(u),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}return Object(J.a)(e,[{key:"dispose",value:function(){this._editor.removeContentWidget(this)}},{key:"getId",value:function(){return"messageoverlay"}},{key:"getDomNode",value:function(){return this._domNode}},{key:"getPosition",value:function(){return{position:this._position,preference:[1,2]}}},{key:"afterRender",value:function(e){this._domNode.classList.toggle("below",2===e)}}],[{key:"fadeOut",value:function(e){var t,n=function n(){e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",n)};return t=setTimeout(n,110),e.getDomNode().addEventListener("animationend",n),e.getDomNode().classList.add("fadeOut"),{dispose:n}}}]),e}();Object($.l)(jt.ID,jt),Object(Ie.f)((function(e,t){var n=e.getColor(Ne.rb);if(n){var r=e.type===Rt.a.HIGH_CONTRAST?2:1;t.addRule(".monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ".concat(n,"; }")),t.addRule(".monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ".concat(n,"; }")),t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { border: ".concat(r,"px solid ").concat(n,"; }"))}var i=e.getColor(Ne.qb);i&&t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { background-color: ".concat(i,"; }"));var a=e.getColor(Ne.sb);a&&t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { color: ".concat(a,"; }"))}));var zt=n(28),Ht=n(3),Wt=n(63),Kt=n(83),qt=n(56),Gt=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Yt=function(e,t){return function(n,r){t(n,r,e)}},Jt=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},$t=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,e.command?e.command.id:e.title,e.title.replace(/\r\n|\r|\n/g," "),void 0,!e.disabled,r)).action=e,i}return n}(Wt.a);var Qt=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o;return Object(Y.a)(this,n),(o=t.call(this))._editor=e,o._delegate=r,o._contextMenuService=i,o._visible=!1,o._showingActions=o._register(new xe.d),o._keybindingResolver=new Xt({getKeybindings:function(){return a.getKeybindings()}}),o}return Object(J.a)(n,[{key:"show",value:function(e,t,n,r){return Jt(this,void 0,void 0,K.a.mark((function i(){var a,o,s,u,c=this;return K.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if((a=r.includeDisabledActions?t.allActions:t.validActions).length){i.next=4;break}return this._visible=!1,i.abrupt("return");case 4:if(this._editor.getDomNode()){i.next=7;break}throw this._visible=!1,Object(ie.a)();case 7:this._visible=!0,this._showingActions.value=t,o=this.getMenuActions(e,a,t.documentation),s=ke.a.isIPosition(n)?this._toCoords(n):n||{x:0,y:0},u=this._keybindingResolver.getResolver(),this._contextMenuService.showContextMenu({domForShadowRoot:this._editor.getDomNode(),getAnchor:function(){return s},getActions:function(){return o},onHide:function(){c._visible=!1,c._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:function(e){return e instanceof $t?u(e.action):void 0}});case 13:case"end":return i.stop()}}),i,this)})))}},{key:"getMenuActions",value:function(e,t,n){var r,i,a=this,o=function(e){return new $t(e.action,(function(){return a._delegate.onSelectCodeAction(e)}))},s=t.map(o),u=Object(ct.a)(n),c=this._editor.getModel();if(c&&s.length){var l,d=Object(Ee.a)(_t.a.all(c));try{for(d.s();!(l=d.n()).done;){var p=l.value;p._getAdditionalMenuItems&&u.push.apply(u,Object(ct.a)(p._getAdditionalMenuItems({trigger:e.type,only:null===(i=null===(r=e.filter)||void 0===r?void 0:r.include)||void 0===i?void 0:i.value},t.map((function(e){return e.action})))))}}catch(f){d.e(f)}finally{d.f()}}return u.length&&s.push.apply(s,[new Wt.d].concat(Object(ct.a)(u.map((function(e){return o(new Nt({title:e.title,command:e},void 0))}))))),s}},{key:"_toCoords",value:function(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();var t=this._editor.getScrolledVisiblePosition(e),n=Object(Ht.getDomNodePagePosition)(this._editor.getDomNode());return{x:n.left+t.left,y:n.top+t.top+t.height}}},{key:"isVisible",get:function(){return this._visible}}]),n}(xe.a);Qt=Gt([Yt(2,Kt.a),Yt(3,qt.a)],Qt);var Xt=function(){function e(t){Object(Y.a)(this,e),this._keybindingProvider=t}return Object(J.a)(e,[{key:"getResolver",value:function(){var t=this,n=new pt((function(){return t._keybindingProvider.getKeybindings().filter((function(t){return e.codeActionCommands.indexOf(t.command)>=0})).filter((function(e){return e.resolvedKeybinding})).map((function(e){var t=e.commandArgs;return e.command===At?t={kind:yt.SourceOrganizeImports.value}:e.command===Ot&&(t={kind:yt.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},Et.fromUser(t,{kind:yt.None,apply:"never"}))}))}));return function(e){if(e.kind){var r=t.bestKeybindingForCodeAction(e,n.getValue());return null===r||void 0===r?void 0:r.resolvedKeybinding}}}},{key:"bestKeybindingForCodeAction",value:function(e,t){if(e.kind){var n=new yt(e.kind);return t.filter((function(e){return e.kind.contains(n)})).filter((function(t){return!t.preferred||e.isPreferred})).reduceRight((function(e,t){return e?e.kind.contains(t.kind)?t:e:t}),void 0)}}}]),e}();Xt.codeActionCommands=[Tt,kt,wt,At,Ot];var Zt,en=n(17),tn=n(15),nn=n(104),rn=n(11),an=(n(395),n(64)),on=n(31),sn=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},un=function(e,t){return function(n,r){t(n,r,e)}};!function(e){e.Hidden={type:0};e.Showing=function e(t,n,r,i){Object(Y.a)(this,e),this.actions=t,this.trigger=n,this.editorPosition=r,this.widgetPosition=i,this.type=1}}(Zt||(Zt={}));var cn=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o;return Object(Y.a)(this,n),(o=t.call(this))._editor=e,o._quickFixActionId=r,o._preferredFixActionId=i,o._keybindingService=a,o._onClick=o._register(new rn.a),o.onClick=o._onClick.event,o._state=Zt.Hidden,o._domNode=document.createElement("div"),o._domNode.className=on.b.lightBulb.classNames,o._editor.addContentWidget(Object(lt.a)(o)),o._register(o._editor.onDidChangeModelContent((function(e){var t=o._editor.getModel();(1!==o.state.type||!t||o.state.editorPosition.lineNumber>=t.getLineCount())&&o.hide()}))),an.b.ignoreTarget(o._domNode),o._register(Ht.addStandardDisposableGenericMouseDownListner(o._domNode,(function(e){if(1===o.state.type){o._editor.focus(),e.preventDefault();var t=Ht.getDomNodePagePosition(o._domNode),n=t.top,r=t.height,i=o._editor.getOption(53),a=Math.floor(i/3);null!==o.state.widgetPosition.position&&o.state.widgetPosition.position.lineNumber2&&i._editor.getTopForLineNumber(e)===i._editor.getTopForLineNumber(e-1)},g=u;if(!(d.spaceWidth*f>22))if(u>1&&!h(u-1))g-=1;else if(h(u+1)){if(c*d.spaceWidth<22)return this.hide()}else g+=1;this.state=new Zt.Showing(e,t,r,{position:{lineNumber:g,column:1},preference:n._posPref}),this._editor.layoutContentWidget(this)}},{key:"hide",value:function(){this.state=Zt.Hidden,this._editor.layoutContentWidget(this)}},{key:"_updateLightBulbTitleAndIcon",value:function(){var e,t;if(1===this.state.type&&this.state.actions.hasAutoFix){var n,r;(n=this._domNode.classList).remove.apply(n,Object(ct.a)(on.b.lightBulb.classNamesArray)),(r=this._domNode.classList).add.apply(r,Object(ct.a)(on.b.lightbulbAutofix.classNamesArray));var i=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(i)return void(this.title=Q.a("prefferedQuickFixWithKb","Show Fixes. Preferred Fix Available ({0})",i.getLabel()))}(e=this._domNode.classList).remove.apply(e,Object(ct.a)(on.b.lightbulbAutofix.classNamesArray)),(t=this._domNode.classList).add.apply(t,Object(ct.a)(on.b.lightBulb.classNamesArray));var a=this._keybindingService.lookupKeybinding(this._quickFixActionId);this.title=a?Q.a("quickFixWithKb","Show Fixes ({0})",a.getLabel()):Q.a("quickFix","Show Fixes")}},{key:"state",get:function(){return this._state},set:function(e){this._state=e,this._updateLightBulbTitleAndIcon()}},{key:"title",set:function(e){this._domNode.title=e}}]),n}(xe.a);cn._posPref=[0],cn=sn([un(3,qt.a)],cn),Object(Ie.f)((function(e,t){var n,r=null===(n=e.getColor(Ne.s))||void 0===n?void 0:n.transparent(.7),i=e.getColor(Ne.R);i&&t.addRule("\n\t\t.monaco-editor .contentWidgets ".concat(on.b.lightBulb.cssSelector," {\n\t\t\tcolor: ").concat(i,";\n\t\t\tbackground-color: ").concat(r,";\n\t\t}"));var a=e.getColor(Ne.Q);a&&t.addRule("\n\t\t.monaco-editor .contentWidgets ".concat(on.b.lightbulbAutofix.cssSelector," {\n\t\t\tcolor: ").concat(a,";\n\t\t\tbackground-color: ").concat(r,";\n\t\t}"))}));var ln=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},dn=function(e,t){return function(n,r){t(n,r,e)}},pn=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},fn=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a,o){var s;return Object(Y.a)(this,n),(s=t.call(this))._editor=e,s.delegate=a,s._activeCodeActions=s._register(new xe.d),s._codeActionWidget=new pt((function(){return s._register(o.createInstance(Qt,s._editor,{onSelectCodeAction:function(e){return pn(Object(lt.a)(s),void 0,void 0,K.a.mark((function t(){return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.delegate.applyCodeAction(e,!0);case 1:case"end":return t.stop()}}),t,this)})))}}))})),s._lightBulbWidget=new pt((function(){var e=s._register(o.createInstance(cn,s._editor,r,i));return s._register(e.onClick((function(e){return s.showCodeActionList(e.trigger,e.actions,e,{includeDisabledActions:!1})}))),e})),s}return Object(J.a)(n,[{key:"update",value:function(e){var t,n,r;return pn(this,void 0,void 0,K.a.mark((function i(){var a,o,s,u;return K.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(1===e.type){i.next=3;break}return null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide(),i.abrupt("return");case 3:return i.prev=3,i.next=6,e.actions;case 6:a=i.sent,i.next=13;break;case 9:return i.prev=9,i.t0=i.catch(3),Object(ie.e)(i.t0),i.abrupt("return");case 13:if(this._lightBulbWidget.getValue().update(a,e.trigger,e.position),2!==e.trigger.type){i.next=42;break}if(!(null===(n=e.trigger.filter)||void 0===n?void 0:n.include)){i.next=31;break}if(!(o=this.tryGetValidActionToApply(e.trigger,a))){i.next=25;break}return i.prev=18,i.next=21,this.delegate.applyCodeAction(o,!1);case 21:return i.prev=21,a.dispose(),i.finish(21);case 24:return i.abrupt("return");case 25:if(!e.trigger.context){i.next=31;break}if(!(s=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,a))||!s.action.disabled){i.next=31;break}return jt.get(this._editor).showMessage(s.action.disabled,e.trigger.context.position),a.dispose(),i.abrupt("return");case 31:if(u=!!(null===(r=e.trigger.filter)||void 0===r?void 0:r.include),!e.trigger.context){i.next=38;break}if(a.allActions.length&&(u||a.validActions.length)){i.next=38;break}return jt.get(this._editor).showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=a,a.dispose(),i.abrupt("return");case 38:this._activeCodeActions.value=a,this._codeActionWidget.getValue().show(e.trigger,a,e.position,{includeDisabledActions:u}),i.next=43;break;case 42:this._codeActionWidget.getValue().isVisible?a.dispose():this._activeCodeActions.value=a;case 43:case"end":return i.stop()}}),i,this,[[3,9],[18,,21,24]])})))}},{key:"getInvalidActionThatWouldHaveBeenApplied",value:function(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((function(e){return e.action.disabled})):void 0}},{key:"tryGetValidActionToApply",value:function(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}},{key:"showCodeActionList",value:function(e,t,n,r){return pn(this,void 0,void 0,K.a.mark((function i(){return K.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:this._codeActionWidget.getValue().show(e,t,n,r);case 1:case"end":return i.stop()}}),i,this)})))}}]),n}(xe.a);fn=ln([dn(4,zt.a)],fn);var hn,gn=n(62),mn=n(52),_n=n(125),vn=n(57),yn=new te.c("supportedCodeAction",""),bn=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:250;return Object(Y.a)(this,n),(a=t.call(this))._editor=e,a._markerService=r,a._signalChange=i,a._delay=o,a._autoTriggerTimer=a._register(new Se.e),a._register(a._markerService.onMarkerChanged((function(e){return a._onMarkerChanges(e)}))),a._register(a._editor.onDidChangeCursorPosition((function(){return a._onCursorChange()}))),a}return Object(J.a)(n,[{key:"trigger",value:function(e){var t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}},{key:"_onMarkerChanges",value:function(e){var t=this,n=this._editor.getModel();n&&e.some((function(e){return Object(vn.f)(e,n.uri)}))&&this._autoTriggerTimer.cancelAndSet((function(){t.trigger({type:1})}),this._delay)}},{key:"_onCursorChange",value:function(){var e=this;this._autoTriggerTimer.cancelAndSet((function(){e.trigger({type:1})}),this._delay)}},{key:"_getRangeOfMarker",value:function(e){var t=this._editor.getModel();if(t){var n,r=Object(Ee.a)(this._markerService.read({resource:t.uri}));try{for(r.s();!(n=r.n()).done;){var i=n.value,a=t.validateRange(i);if(Te.a.intersectRanges(a,e))return Te.a.lift(a)}}catch(o){r.e(o)}finally{r.f()}}}},{key:"_getRangeOfSelectionUnlessWhitespaceEnclosed",value:function(e){if(this._editor.hasModel()){var t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&1===e.type){var r=n.getPosition(),i=r.lineNumber,a=r.column,o=t.getLineContent(i);if(0===o.length)return;if(1===a){if(/\s/.test(o[0]))return}else if(a===t.getLineMaxColumn(i)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[a-2])&&/\s/.test(o[a-1]))return}return n}}},{key:"_createEventAndSignalChange",value:function(e,t){var n=this._editor.getModel();if(t&&n){var r=this._getRangeOfMarker(t),i=r?r.getStartPosition():t.getStartPosition(),a={trigger:e,selection:t,position:i};return this._signalChange(a),a}this._signalChange(void 0)}}]),n}(xe.a);!function(e){e.Empty={type:0};e.Triggered=function e(t,n,r,i){Object(Y.a)(this,e),this.trigger=t,this.rangeOrSelection=n,this.position=r,this.actions=i,this.type=1}}(hn||(hn={}));var Dn=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o;return Object(Y.a)(this,n),(o=t.call(this))._editor=e,o._markerService=r,o._progressService=a,o._codeActionOracle=o._register(new xe.d),o._state=hn.Empty,o._onDidChangeState=o._register(new rn.a),o.onDidChangeState=o._onDidChangeState.event,o._supportedCodeActions=yn.bindTo(i),o._register(o._editor.onDidChangeModel((function(){return o._update()}))),o._register(o._editor.onDidChangeModelLanguage((function(){return o._update()}))),o._register(_t.a.onDidChange((function(){return o._update()}))),o._update(),o}return Object(J.a)(n,[{key:"dispose",value:function(){Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this),this.setState(hn.Empty,!0)}},{key:"_update",value:function(){var e=this;this._codeActionOracle.value=void 0,this.setState(hn.Empty);var t=this._editor.getModel();if(t&&_t.a.has(t)&&!this._editor.getOption(75)){var n,r=[],i=Object(Ee.a)(_t.a.all(t));try{for(i.s();!(n=i.n()).done;){var a=n.value;Array.isArray(a.providedCodeActionKinds)&&r.push.apply(r,Object(ct.a)(a.providedCodeActionKinds))}}catch(o){i.e(o)}finally{i.f()}this._supportedCodeActions.set(r.join(" ")),this._codeActionOracle.value=new bn(this._editor,this._markerService,(function(n){var r;if(n){var i=Object(Se.f)((function(e){return Lt(t,n.selection,n.trigger,Ct.b.None,e)}));2===n.trigger.type&&(null===(r=e._progressService)||void 0===r||r.showWhile(i,250)),e.setState(new hn.Triggered(n.trigger,n.selection,n.position,i))}else e.setState(hn.Empty)}),void 0),this._codeActionOracle.value.trigger({type:1})}else this._supportedCodeActions.reset()}},{key:"trigger",value:function(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}},{key:"setState",value:function(e,t){e!==this._state&&(1===this._state.type&&this._state.actions.cancel(),this._state=e,t||this._onDidChangeState.fire(e))}}]),n}(xe.a),En=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Cn=function(e,t){return function(n,r){t(n,r,e)}},Sn=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))};function xn(e){return te.a.regex(yn.keys()[0],new RegExp("(\\s|^)"+Object(ft.u)(e.value)+"\\b"))}var kn={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:Q.a("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:Q.a("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[Q.a("args.schema.apply.first","Always apply the first returned code action."),Q.a("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),Q.a("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:Q.a("args.schema.preferred","Controls if only preferred code actions should be returned.")}}},Tn=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a,o){var s;return Object(Y.a)(this,n),(s=t.call(this))._instantiationService=o,s._editor=e,s._model=s._register(new Dn(s._editor,r,i,a)),s._register(s._model.onDidChangeState((function(e){return s.update(e)}))),s._ui=new pt((function(){return s._register(new fn(e,Nn.Id,Mn.Id,{applyCodeAction:function(e,t){return Sn(Object(lt.a)(s),void 0,void 0,K.a.mark((function n(){return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this._applyCodeAction(e);case 3:return n.prev=3,t&&this._trigger({type:1,filter:{}}),n.finish(3);case 6:case"end":return n.stop()}}),n,this,[[0,,3,6]])})))}},s._instantiationService))})),s}return Object(J.a)(n,[{key:"update",value:function(e){this._ui.getValue().update(e)}},{key:"showCodeActions",value:function(e,t,n){return this._ui.getValue().showCodeActionList(e,t,n,{includeDisabledActions:!1})}},{key:"manualTriggerAtCurrentPosition",value:function(e,t,n){if(this._editor.hasModel()){jt.get(this._editor).closeMessage();var r=this._editor.getPosition();this._trigger({type:2,filter:t,autoApply:n,context:{notAvailableMessage:e,position:r}})}}},{key:"_trigger",value:function(e){return this._model.trigger(e)}},{key:"_applyCodeAction",value:function(e){return this._instantiationService.invokeFunction(wn,e,this._editor)}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(xe.a);function wn(e,t,n){return Sn(this,void 0,void 0,K.a.mark((function r(){var i,a,o,s,u;return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=e.get(ht.a),a=e.get(St.b),o=e.get(_n.a),s=e.get(mn.a),o.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred}),r.next=7,t.resolve(dt.a.None);case 7:if(!t.action.edit){r.next=10;break}return r.next=10,i.apply(ht.b.convert(t.action.edit),{editor:n,label:t.action.title});case 10:if(!t.action.command){r.next=20;break}return r.prev=11,r.next=14,a.executeCommand.apply(a,[t.action.command.id].concat(Object(ct.a)(t.action.command.arguments||[])));case 14:r.next=20;break;case 16:r.prev=16,r.t0=r.catch(11),u=An(r.t0),s.error("string"===typeof u?u:Q.a("applyCodeActionFailed","An unknown error occurred while applying the code action"));case 20:case"end":return r.stop()}}),r,null,[[11,16]])})))}function An(e){return"string"===typeof e?e:e instanceof Error&&"string"===typeof e.message?e.message:void 0}function On(e,t,n,r){if(e.hasModel()){var i=Tn.get(e);i&&i.manualTriggerAtCurrentPosition(t,n,r)}}Tn.ID="editor.contrib.quickFixController",Tn=En([Cn(1,gn.b),Cn(2,te.b),Cn(3,Ct.a),Cn(4,zt.a)],Tn);var Nn=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.Id,label:Q.a("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:te.a.and(X.a.writable,X.a.hasCodeActionsProvider),kbOpts:{kbExpr:X.a.editorTextFocus,primary:2132,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){return On(t,Q.a("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}]),n}($.b);Nn.Id="editor.action.quickFix";var In=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:kt,precondition:te.a.and(X.a.writable,X.a.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:kn}]}})}return Object(J.a)(n,[{key:"runEditorCommand",value:function(e,t,n){var r=Et.fromUser(n,{kind:yt.Empty,apply:"ifSingle"});return On(t,"string"===typeof(null===n||void 0===n?void 0:n.kind)?r.preferred?Q.a("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):Q.a("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):r.preferred?Q.a("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):Q.a("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}}]),n}($.c),Fn=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Tt,label:Q.a("refactor.label","Refactor..."),alias:"Refactor...",precondition:te.a.and(X.a.writable,X.a.hasCodeActionsProvider),kbOpts:{kbExpr:X.a.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:te.a.and(X.a.writable,xn(yt.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:kn}]}})}return Object(J.a)(n,[{key:"run",value:function(e,t,n){var r=Et.fromUser(n,{kind:yt.Refactor,apply:"never"});return On(t,"string"===typeof(null===n||void 0===n?void 0:n.kind)?r.preferred?Q.a("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):Q.a("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):r.preferred?Q.a("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):Q.a("editor.action.refactor.noneMessage","No refactorings available"),{include:yt.Refactor.contains(r.kind)?r.kind:yt.None,onlyIncludePreferredActions:r.preferred},r.apply)}}]),n}($.b),Ln=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:wt,label:Q.a("source.label","Source Action..."),alias:"Source Action...",precondition:te.a.and(X.a.writable,X.a.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:te.a.and(X.a.writable,xn(yt.Source))},description:{description:"Source Action...",args:[{name:"args",schema:kn}]}})}return Object(J.a)(n,[{key:"run",value:function(e,t,n){var r=Et.fromUser(n,{kind:yt.Source,apply:"never"});return On(t,"string"===typeof(null===n||void 0===n?void 0:n.kind)?r.preferred?Q.a("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):Q.a("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):r.preferred?Q.a("editor.action.source.noneMessage.preferred","No preferred source actions available"):Q.a("editor.action.source.noneMessage","No source actions available"),{include:yt.Source.contains(r.kind)?r.kind:yt.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}}]),n}($.b),Pn=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:At,label:Q.a("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:te.a.and(X.a.writable,xn(yt.SourceOrganizeImports)),kbOpts:{kbExpr:X.a.editorTextFocus,primary:1581,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){return On(t,Q.a("editor.action.organize.noneMessage","No organize imports action available"),{include:yt.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}]),n}($.b),Rn=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Ot,label:Q.a("fixAll.label","Fix All"),alias:"Fix All",precondition:te.a.and(X.a.writable,xn(yt.SourceFixAll))})}return Object(J.a)(n,[{key:"run",value:function(e,t){return On(t,Q.a("fixAll.noneMessage","No fix all action available"),{include:yt.SourceFixAll,includeSourceActions:!0},"ifSingle")}}]),n}($.b),Mn=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.Id,label:Q.a("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:te.a.and(X.a.writable,xn(yt.QuickFix)),kbOpts:{kbExpr:X.a.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){return On(t,Q.a("editor.action.autoFix.noneMessage","No auto fixes available"),{include:yt.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}]),n}($.b);Mn.Id="editor.action.autoFix",Object($.l)(Tn.ID,Tn),Object($.j)(Nn),Object($.j)(Fn),Object($.j)(Ln),Object($.j)(Pn),Object($.j)(Mn),Object($.j)(Rn),Object($.k)(new In);var Bn=n(26),jn=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Un=function(){function e(){Object(Y.a)(this,e),this.lenses=[],this._disposables=new xe.b}return Object(J.a)(e,[{key:"dispose",value:function(){this._disposables.dispose()}},{key:"add",value:function(e,t){this._disposables.add(e);var n,r=Object(Ee.a)(e.lenses);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.lenses.push({symbol:i,provider:t})}}catch(a){r.e(a)}finally{r.f()}}}]),e}();function Vn(e,t){return jn(this,void 0,void 0,K.a.mark((function n(){var r,i,a,o,s=this;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=_t.b.ordered(e),i=new Map,a=new Un,o=r.map((function(n,r){return jn(s,void 0,void 0,K.a.mark((function o(){var s;return K.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i.set(n,r),o.prev=1,o.next=4,Promise.resolve(n.provideCodeLenses(e,t));case 4:(s=o.sent)&&a.add(s,n),o.next=11;break;case 8:o.prev=8,o.t0=o.catch(1),Object(ie.f)(o.t0);case 11:case"end":return o.stop()}}),o,null,[[1,8]])})))})),n.next=6,Promise.all(o);case 6:return a.lenses=Object(ne.n)(a.lenses,(function(e,t){return e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:i.get(e.provider)i.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0})),n.abrupt("return",a);case 8:case"end":return n.stop()}}),n)})))}St.a.registerCommand("_executeCodeLensProvider",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&e.provider.resolveCodeLens&&n.push(Promise.resolve(e.provider.resolveCodeLens(o,e.symbol,dt.a.None)).then((function(t){return s.push(t||e.symbol)})))};for(r.s();!(t=r.n()).done;)i()}catch(c){r.e(c)}finally{r.f()}return Promise.all(n)})).then((function(){return s})).finally((function(){setTimeout((function(){return u.dispose()}),100)}))}));n(396);var zn=n(147),Hn=function(){function e(t,n,r){Object(Y.a)(this,e),this.afterLineNumber=t,this.heightInPx=n,this._onHeight=r,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}return Object(J.a)(e,[{key:"onComputedHeight",value:function(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}}]),e}(),Wn=function(){function e(t,n,r){Object(Y.a)(this,e),this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=t,this._id="codelens.widget-".concat(e._idPool++),this.updatePosition(r),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration ".concat(n)}return Object(J.a)(e,[{key:"withCommands",value:function(e,t){this._commands.clear();for(var n=[],r=!1,i=0;i0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}return Object(J.a)(e,[{key:"_createContentWidgetIfNecessary",value:function(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new Wn(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}},{key:"dispose",value:function(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}},{key:"isDisposed",value:function(){return this._isDisposed}},{key:"isValid",value:function(){var e=this;return this._decorationIds.some((function(t,n){var r=e._editor.getModel().getDecorationRange(t),i=e._data[n].symbol;return!(!r||Te.a.isEmpty(i.range)!==r.isEmpty())}))}},{key:"updateCodeLensSymbols",value:function(e,t){var n=this;this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((function(e,r){t.addDecoration({range:e.symbol.range,options:Ae.a.EMPTY},(function(e){return n._decorationIds[r]=e}))}))}},{key:"updateHeight",value:function(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}},{key:"computeIfNecessary",value:function(e){if(!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone"))return null;for(var t=0;t a:hover { color: ".concat(r," !important; }")),t.addRule(".monaco-editor .codelens-decoration > a:hover .codicon { color: ".concat(r," !important; }")))}));var Gn=n(118),Yn=n(70),Jn=n(102),$n=n(139),Qn=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Xn=function(e,t){return function(n,r){t(n,r,e)}},Zn=Object(zt.c)("ICodeLensCache"),er=function e(t,n){Object(Y.a)(this,e),this.lineCount=t,this.data=n},tr=function(){function e(t){var n=this;Object(Y.a)(this,e),this._fakeProvider=new(function(){function e(){Object(Y.a)(this,e)}return Object(J.a)(e,[{key:"provideCodeLenses",value:function(){throw new Error("not supported")}}]),e}()),this._cache=new Yn.a(20,.75);Object(Se.k)((function(){return t.remove("codelens/cache",1)}));var r="codelens/cache2",i=t.get(r,1,"{}");this._deserialize(i),Object($n.a)(t.onWillSaveState)((function(e){e.reason===Jn.c.SHUTDOWN&&t.store(r,n._serialize(),1,1)}))}return Object(J.a)(e,[{key:"put",value:function(e,t){var n=t.lenses.map((function(e){var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),r=new Un;r.add({lenses:n,dispose:function(){}},this._fakeProvider);var i=new er(e.getLineCount(),r);this._cache.set(e.uri.toString(),i)}},{key:"get",value:function(e){var t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}},{key:"delete",value:function(e){this._cache.delete(e.uri.toString())}},{key:"_serialize",value:function(){var e,t=Object.create(null),n=Object(Ee.a)(this._cache);try{for(n.s();!(e=n.n()).done;){var r,i=Object(Ce.a)(e.value,2),a=i[0],o=i[1],s=new Set,u=Object(Ee.a)(o.data.lenses);try{for(u.s();!(r=u.n()).done;){var c=r.value;s.add(c.symbol.range.startLineNumber)}}catch(l){u.e(l)}finally{u.f()}t[a]={lineCount:o.lineCount,lines:Object(ct.a)(s.values())}}}catch(l){n.e(l)}finally{n.f()}return JSON.stringify(t)}},{key:"_deserialize",value:function(e){try{var t=JSON.parse(e);for(var n in t){var r,i=t[n],a=[],o=Object(Ee.a)(i.lines);try{for(o.s();!(r=o.n()).done;){var s=r.value;a.push({range:new Te.a(s,1,s,11)})}}catch(c){o.e(c)}finally{o.f()}var u=new Un;u.add({lenses:a,dispose:function(){}},this._fakeProvider),this._cache.set(n,new er(i.lineCount,u))}}catch(l){}}}]),e}();tr=Qn([Xn(0,Jn.a)],tr),Object(Gn.b)(Zn,tr);var nr=n(145),rr=n(111),ir=n(75),ar=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},or=function(e,t){return function(n,r){t(n,r,e)}},sr=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},ur=function(){function e(t,n,r,i){var a=this;Object(Y.a)(this,e),this._editor=t,this._commandService=n,this._notificationService=r,this._codeLensCache=i,this._disposables=new xe.b,this._localToDispose=new xe.b,this._lenses=[],this._getCodeLensModelDelays=new ir.b(_t.b,250,2500),this._oldCodeLensModels=new xe.b,this._resolveCodeLensesDelays=new ir.b(_t.b,250,2500),this._resolveCodeLensesScheduler=new Se.d((function(){return a._resolveCodeLensesInViewport()}),this._resolveCodeLensesDelays.min),this._disposables.add(this._editor.onDidChangeModel((function(){return a._onModelChange()}))),this._disposables.add(this._editor.onDidChangeModelLanguage((function(){return a._onModelChange()}))),this._disposables.add(this._editor.onDidChangeConfiguration((function(e){(e.hasChanged(38)||e.hasChanged(13)||e.hasChanged(12))&&a._updateLensStyle(),e.hasChanged(11)&&a._onModelChange()}))),this._disposables.add(_t.b.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+Object(nr.b)(this._editor.getId()).toString(16),this._styleElement=Ht.createStyleSheet(Ht.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}return Object(J.a)(e,[{key:"dispose",value:function(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose(),this._styleElement.remove()}},{key:"_getLayoutInfo",value:function(){var e,t=this._editor.getOption(13);return!t||t<5?(t=.9*this._editor.getOption(40)|0,e=this._editor.getOption(53)):e=t*Math.max(1.3,this._editor.getOption(53)/this._editor.getOption(40))|0,{codeLensHeight:e,fontSize:t}}},{key:"_updateLensStyle",value:function(){var e,t=this,n=this._getLayoutInfo(),r=n.codeLensHeight,i=n.fontSize,a=this._editor.getOption(12),o=this._editor.getOption(38),s="--codelens-font-family".concat(this._styleClassName),u="\n\t\t.monaco-editor .codelens-decoration.".concat(this._styleClassName," { line-height: ").concat(r,"px; font-size: ").concat(i,"px; padding-right: ").concat(Math.round(.5*i),"px; font-feature-settings: ").concat(o.fontFeatureSettings," }\n\t\t.monaco-editor .codelens-decoration.").concat(this._styleClassName," span.codicon { line-height: ").concat(r,"px; font-size: ").concat(i,"px; }\n\t\t");a&&(u+=".monaco-editor .codelens-decoration.".concat(this._styleClassName," { font-family: var(").concat(s,")}")),this._styleElement.textContent=u,null===(e=this._editor.getDomNode())||void 0===e||e.style.setProperty(s,null!==a&&void 0!==a?a:"inherit"),this._editor.changeViewZones((function(e){var n,i=Object(Ee.a)(t._lenses);try{for(i.s();!(n=i.n()).done;){n.value.updateHeight(r,e)}}catch(a){i.e(a)}finally{i.f()}}))}},{key:"_localDispose",value:function(){var e,t,n;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(n=this._currentCodeLensModel)||void 0===n||n.dispose()}},{key:"_onModelChange",value:function(){var e=this;this._localDispose();var t=this._editor.getModel();if(t&&this._editor.getOption(11)){var n=this._codeLensCache.get(t);if(n&&this._renderCodeLensSymbols(n),_t.b.has(t)){var r,i=Object(Ee.a)(_t.b.all(t));try{for(i.s();!(r=i.n()).done;){var a=r.value;if("function"===typeof a.onDidChange){var o=a.onDidChange((function(){return s.schedule()}));this._localToDispose.add(o)}}}catch(u){i.e(u)}finally{i.f()}var s=new Se.d((function(){var n,r=Date.now();null===(n=e._getCodeLensModelPromise)||void 0===n||n.cancel(),e._getCodeLensModelPromise=Object(Se.f)((function(e){return Vn(t,e)})),e._getCodeLensModelPromise.then((function(n){e._currentCodeLensModel&&e._oldCodeLensModels.add(e._currentCodeLensModel),e._currentCodeLensModel=n,e._codeLensCache.put(t,n);var i=e._getCodeLensModelDelays.update(t,Date.now()-r);s.delay=i,e._renderCodeLensSymbols(n),e._resolveCodeLensesInViewport()}),ie.e)}),this._getCodeLensModelDelays.get(t));this._localToDispose.add(s),this._localToDispose.add(Object(xe.h)((function(){return e._resolveCodeLensesScheduler.cancel()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((function(){e._editor.changeDecorations((function(t){e._editor.changeViewZones((function(n){var r=[],i=-1;e._lenses.forEach((function(e){e.isValid()&&i!==e.getLineNumber()?(e.update(n),i=e.getLineNumber()):r.push(e)}));var a=new Kn;r.forEach((function(t){t.dispose(a,n),e._lenses.splice(e._lenses.indexOf(t),1)})),a.commit(t)}))})),s.schedule()}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((function(){s.schedule()}))),this._localToDispose.add(this._editor.onDidScrollChange((function(t){t.scrollTopChanged&&e._lenses.length>0&&e._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((function(){e._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(Object(xe.h)((function(){if(e._editor.getModel()){var t=mt.c.capture(e._editor);e._editor.changeDecorations((function(t){e._editor.changeViewZones((function(n){e._disposeAllLenses(t,n)}))})),t.restore(e._editor)}else e._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((function(t){if(9===t.target.type){var n=t.target.element;if("SPAN"===(null===n||void 0===n?void 0:n.tagName)&&(n=n.parentElement),"A"===(null===n||void 0===n?void 0:n.tagName)){var r,i=Object(Ee.a)(e._lenses);try{for(i.s();!(r=i.n()).done;){var a=r.value.getCommand(n);if(a){var o;(o=e._commandService).executeCommand.apply(o,[a.id].concat(Object(ct.a)(a.arguments||[]))).catch((function(t){return e._notificationService.error(t)}));break}}}catch(u){i.e(u)}finally{i.f()}}}}))),s.schedule()}else n&&this._localToDispose.add(Object(Se.g)((function(){var r=e._codeLensCache.get(t);n===r&&(e._codeLensCache.delete(t),e._onModelChange())}),3e4))}}},{key:"_disposeAllLenses",value:function(e,t){var n,r=new Kn,i=Object(Ee.a)(this._lenses);try{for(i.s();!(n=i.n()).done;){n.value.dispose(r,t)}}catch(a){i.e(a)}finally{i.f()}e&&r.commit(e),this._lenses.length=0}},{key:"_renderCodeLensSymbols",value:function(e){var t=this;if(this._editor.hasModel()){var n,r,i=this._editor.getModel().getLineCount(),a=[],o=Object(Ee.a)(e.lenses);try{for(o.s();!(r=o.n()).done;){var s=r.value,u=s.symbol.range.startLineNumber;u<1||u>i||(n&&n[n.length-1].symbol.range.startLineNumber===u?n.push(s):(n=[s],a.push(n)))}}catch(d){o.e(d)}finally{o.f()}var c=mt.c.capture(this._editor),l=this._getLayoutInfo();this._editor.changeDecorations((function(e){t._editor.changeViewZones((function(n){for(var r=new Kn,i=0,o=0;o1?t-1:0),r=1;r1?t-1:0),r=1;r=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},fr=function(e,t){return function(n,r){t(n,r,e)}},hr=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;return Object(Y.a)(this,n),(a=t.call(this))._editor=e,a._codeEditorService=r,a._configurationService=i,a._localToDispose=a._register(new xe.b),a._decorationsIds=[],a._colorDatas=new Map,a._colorDecoratorIds=[],a._decorationsTypes=new Set,a._register(e.onDidChangeModel((function(){a._isEnabled=a.isEnabled(),a.onModelChanged()}))),a._register(e.onDidChangeModelLanguage((function(){return a.onModelChanged()}))),a._register(_t.c.onDidChange((function(){return a.onModelChanged()}))),a._register(e.onDidChangeConfiguration((function(){var e=a._isEnabled;a._isEnabled=a.isEnabled(),e!==a._isEnabled&&(a._isEnabled?a.onModelChanged():a.removeAllDecorations())}))),a._timeoutTimer=null,a._computePromise=null,a._isEnabled=a.isEnabled(),a.onModelChanged(),a}return Object(J.a)(n,[{key:"isEnabled",value:function(){var e=this._editor.getModel();if(!e)return!1;var t=e.getLanguageIdentifier(),n=this._configurationService.getValue(t.language);if(n){var r=n.colorDecorators;if(r&&void 0!==r.enable&&!r.enable)return r.enable}return this._editor.getOption(14)}},{key:"dispose",value:function(){this.stop(),this.removeAllDecorations(),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}},{key:"onModelChanged",value:function(){var e=this;if(this.stop(),this._isEnabled){var t=this._editor.getModel();t&&_t.c.has(t)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((function(){e._timeoutTimer||(e._timeoutTimer=new Se.e,e._timeoutTimer.cancelAndSet((function(){e._timeoutTimer=null,e.beginCompute()}),n.RECOMPUTE_TIME))}))),this.beginCompute())}}},{key:"beginCompute",value:function(){var e=this;this._computePromise=Object(Se.f)((function(t){var n=e._editor.getModel();return n?function(e,t){var n=[],r=_t.c.ordered(e).reverse().map((function(r){return Promise.resolve(r.provideDocumentColors(e,t)).then((function(e){if(Array.isArray(e)){var t,i=Object(Ee.a)(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;n.push({colorInfo:a,provider:r})}}catch(o){i.e(o)}finally{i.f()}}}))}));return Promise.all(r).then((function(){return n}))}(n,t):Promise.resolve([])})),this._computePromise.then((function(t){e.updateDecorations(t),e.updateColorDecorators(t),e._computePromise=null}),ie.e)}},{key:"stop",value:function(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}},{key:"updateDecorations",value:function(e){var t=this,n=e.map((function(e){return{range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:Ae.a.EMPTY}}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,n),this._colorDatas=new Map,this._decorationsIds.forEach((function(n,r){return t._colorDatas.set(n,e[r])}))}},{key:"updateColorDecorators",value:function(e){for(var t=this,n=[],r={},i=0;ie.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}}]),e}(),_r=(n(397),n(80)),vr=Ht.$,yr=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;Object(Y.a)(this,n),(a=t.call(this)).model=r,a.domNode=vr(".colorpicker-header"),Ht.append(e,a.domNode),a.pickedColorNode=Ht.append(a.domNode,vr(".picked-color"));var o=Ht.append(a.domNode,vr(".original-color"));return o.style.backgroundColor=cr.a.Format.CSS.format(a.model.originalColor)||"",a.backgroundColor=i.getColorTheme().getColor(Ne.F)||cr.a.white,a._register(Object(Ie.f)((function(e,t){a.backgroundColor=e.getColor(Ne.F)||cr.a.white}))),a._register(Ht.addDisposableListener(a.pickedColorNode,Ht.EventType.CLICK,(function(){return a.model.selectNextColorPresentation()}))),a._register(Ht.addDisposableListener(o,Ht.EventType.CLICK,(function(){a.model.color=a.model.originalColor,a.model.flushColor()}))),a._register(r.onDidChangeColor(a.onDidChangeColor,Object(lt.a)(a))),a._register(r.onDidChangePresentation(a.onDidChangePresentation,Object(lt.a)(a))),a.pickedColorNode.style.backgroundColor=cr.a.Format.CSS.format(r.color)||"",a.pickedColorNode.classList.toggle("light",r.color.rgba.a<.5?a.backgroundColor.isLighter():r.color.isLighter()),a}return Object(J.a)(n,[{key:"onDidChangeColor",value:function(e){this.pickedColorNode.style.backgroundColor=cr.a.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}},{key:"onDidChangePresentation",value:function(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:""}}]),n}(xe.a),br=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;return Object(Y.a)(this,n),(a=t.call(this)).model=r,a.pixelRatio=i,a.domNode=vr(".colorpicker-body"),Ht.append(e,a.domNode),a.saturationBox=new Dr(a.domNode,a.model,a.pixelRatio),a._register(a.saturationBox),a._register(a.saturationBox.onDidChange(a.onDidSaturationValueChange,Object(lt.a)(a))),a._register(a.saturationBox.onColorFlushed(a.flushColor,Object(lt.a)(a))),a.opacityStrip=new Cr(a.domNode,a.model),a._register(a.opacityStrip),a._register(a.opacityStrip.onDidChange(a.onDidOpacityChange,Object(lt.a)(a))),a._register(a.opacityStrip.onColorFlushed(a.flushColor,Object(lt.a)(a))),a.hueStrip=new Sr(a.domNode,a.model),a._register(a.hueStrip),a._register(a.hueStrip.onDidChange(a.onDidHueChange,Object(lt.a)(a))),a._register(a.hueStrip.onColorFlushed(a.flushColor,Object(lt.a)(a))),a}return Object(J.a)(n,[{key:"flushColor",value:function(){this.model.flushColor()}},{key:"onDidSaturationValueChange",value:function(e){var t=e.s,n=e.v,r=this.model.color.hsva;this.model.color=new cr.a(new cr.b(r.h,t,n,r.a))}},{key:"onDidOpacityChange",value:function(e){var t=this.model.color.hsva;this.model.color=new cr.a(new cr.b(t.h,t.s,t.v,e))}},{key:"onDidHueChange",value:function(e){var t=this.model.color.hsva,n=360*(1-e);this.model.color=new cr.a(new cr.b(360===n?0:n,t.s,t.v,t.a))}},{key:"layout",value:function(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}]),n}(xe.a),Dr=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;return Object(Y.a)(this,n),(a=t.call(this)).model=r,a.pixelRatio=i,a._onDidChange=new rn.a,a.onDidChange=a._onDidChange.event,a._onColorFlushed=new rn.a,a.onColorFlushed=a._onColorFlushed.event,a.domNode=vr(".saturation-wrap"),Ht.append(e,a.domNode),a.canvas=document.createElement("canvas"),a.canvas.className="saturation-box",Ht.append(a.domNode,a.canvas),a.selection=vr(".saturation-selection"),Ht.append(a.domNode,a.selection),a.layout(),a._register(Ht.addDisposableGenericMouseDownListner(a.domNode,(function(e){return a.onMouseDown(e)}))),a._register(a.model.onDidChangeColor(a.onDidChangeColor,Object(lt.a)(a))),a.monitor=null,a}return Object(J.a)(n,[{key:"onMouseDown",value:function(e){var t=this;this.monitor=this._register(new nn.a);var n=Ht.getDomNodePagePosition(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,nn.b,(function(e){return t.onDidChangePosition(e.posx-n.left,e.posy-n.top)}),(function(){return null}));var r=Ht.addDisposableGenericMouseUpListner(document,(function(){t._onColorFlushed.fire(),r.dispose(),t.monitor&&(t.monitor.stopMonitoring(!0),t.monitor=null)}),!0)}},{key:"onDidChangePosition",value:function(e,t){var n=Math.max(0,Math.min(1,e/this.width)),r=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,r),this._onDidChange.fire({s:n,v:r})}},{key:"layout",value:function(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();var e=this.model.color.hsva;this.paintSelection(e.s,e.v)}},{key:"paint",value:function(){var e=this.model.color.hsva,t=new cr.a(new cr.b(e.h,1,1,1)),n=this.canvas.getContext("2d"),r=n.createLinearGradient(0,0,this.canvas.width,0);r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),r.addColorStop(1,"rgba(255, 255, 255, 0)");var i=n.createLinearGradient(0,0,0,this.canvas.height);i.addColorStop(0,"rgba(0, 0, 0, 0)"),i.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this.canvas.width,this.canvas.height),n.fillStyle=cr.a.Format.CSS.format(t),n.fill(),n.fillStyle=r,n.fill(),n.fillStyle=i,n.fill()}},{key:"paintSelection",value:function(e,t){this.selection.style.left="".concat(e*this.width,"px"),this.selection.style.top="".concat(this.height-t*this.height,"px")}},{key:"onDidChangeColor",value:function(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}]),n}(xe.a),Er=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this)).model=r,i._onDidChange=new rn.a,i.onDidChange=i._onDidChange.event,i._onColorFlushed=new rn.a,i.onColorFlushed=i._onColorFlushed.event,i.domNode=Ht.append(e,vr(".strip")),i.overlay=Ht.append(i.domNode,vr(".overlay")),i.slider=Ht.append(i.domNode,vr(".slider")),i.slider.style.top="0px",i._register(Ht.addDisposableGenericMouseDownListner(i.domNode,(function(e){return i.onMouseDown(e)}))),i.layout(),i}return Object(J.a)(n,[{key:"layout",value:function(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;var e=this.getValue(this.model.color);this.updateSliderPosition(e)}},{key:"onMouseDown",value:function(e){var t=this,n=this._register(new nn.a),r=Ht.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),n.startMonitoring(e.target,e.buttons,nn.b,(function(e){return t.onDidChangeTop(e.posy-r.top)}),(function(){return null}));var i=Ht.addDisposableGenericMouseUpListner(document,(function(){t._onColorFlushed.fire(),i.dispose(),n.stopMonitoring(!0),t.domNode.classList.remove("grabbing")}),!0)}},{key:"onDidChangeTop",value:function(e){var t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}},{key:"updateSliderPosition",value:function(e){this.slider.style.top="".concat((1-e)*this.height,"px")}}]),n}(xe.a),Cr=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,e,r)).domNode.classList.add("opacity-strip"),i._register(r.onDidChangeColor(i.onDidChangeColor,Object(lt.a)(i))),i.onDidChangeColor(i.model.color),i}return Object(J.a)(n,[{key:"onDidChangeColor",value:function(e){var t=e.rgba,n=t.r,r=t.g,i=t.b,a=new cr.a(new cr.c(n,r,i,1)),o=new cr.a(new cr.c(n,r,i,0));this.overlay.style.background="linear-gradient(to bottom, ".concat(a," 0%, ").concat(o," 100%)")}},{key:"getValue",value:function(e){return e.hsva.a}}]),n}(Er),Sr=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,e,r)).domNode.classList.add("hue-strip"),i}return Object(J.a)(n,[{key:"getValue",value:function(e){return 1-e.hsva.h/360}}]),n}(Er),xr=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o;Object(Y.a)(this,n),(o=t.call(this)).model=r,o.pixelRatio=i,o._register(Object(qe.o)((function(){return o.layout()})));var s=vr(".colorpicker-widget");e.appendChild(s);var u=new yr(s,o.model,a);return o.body=new br(s,o.model,o.pixelRatio),o._register(u),o._register(o.body),o}return Object(J.a)(n,[{key:"layout",value:function(){this.body.layout()}}]),n}(_r.a),kr=function(){function e(t,n,r,i,a){var o=this;Object(Y.a)(this,e),this._computer=t,this._state=0,this._hoverTime=a,this._firstWaitScheduler=new Se.d((function(){return o._triggerAsyncComputation()}),0),this._secondWaitScheduler=new Se.d((function(){return o._triggerSyncComputation()}),0),this._loadingMessageScheduler=new Se.d((function(){return o._showLoadingMessage()}),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=n,this._errorCallback=r,this._progressCallback=i}return Object(J.a)(e,[{key:"setHoverTime",value:function(e){this._hoverTime=e}},{key:"_firstWaitTime",value:function(){return this._hoverTime/2}},{key:"_secondWaitTime",value:function(){return this._hoverTime/2}},{key:"_loadingMessageTime",value:function(){return 3*this._hoverTime}},{key:"_triggerAsyncComputation",value:function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=Object(Se.f)((function(t){return e._computer.computeAsync(t)})),this._asyncComputationPromise.then((function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)}),(function(t){return e._onError(t)}))):this._asyncComputationPromiseDone=!0}},{key:"_triggerSyncComputation",value:function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}},{key:"_showLoadingMessage",value:function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())}},{key:"_withAsyncResult",value:function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))}},{key:"_onComplete",value:function(e){this._completeCallback(e)}},{key:"_onError",value:function(e){this._errorCallback?this._errorCallback(e):Object(ie.e)(e)}},{key:"_onProgress",value:function(e){this._progressCallback(e)}},{key:"start",value:function(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}},{key:"cancel",value:function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0}}]),e}(),Tr=(n(398),n(98)),wr=Ht.$,Ar=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){var e;return Object(Y.a)(this,n),(e=t.call(this)).containerDomNode=document.createElement("div"),e.containerDomNode.className="monaco-hover",e.containerDomNode.tabIndex=0,e.containerDomNode.setAttribute("role","tooltip"),e.contentsDomNode=document.createElement("div"),e.contentsDomNode.className="monaco-hover-content",e._scrollbar=e._register(new Tr.a(e.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),e.containerDomNode.appendChild(e._scrollbar.getDomNode()),e}return Object(J.a)(n,[{key:"onContentsChanged",value:function(){this._scrollbar.scanDomNode()}}]),n}(xe.a);var Or=n(253),Nr=n(78),Ir=(n(399),n(47)),Fr=n(187);function Lr(e){if(e){"string"===typeof e&&(e=gt.a.file(e));var t=Object(vn.b)(e)||(e.scheme===Ir.c.file?e.fsPath:e.path);return Ge.j&&Object(Fr.c)(t)?Pr(t):t}}function Pr(e){return Object(Fr.a)(e)?e.charAt(0).toUpperCase()+e.slice(1):e}n(400);var Rr=n(120),Mr=n(49),Br=n(76),jr=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Ur=function(e,t){return function(n,r){t(n,r,e)}},Vr=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a,o,s,u,c,l,d){var p,f;return Object(Y.a)(this,n),(f=t.call(this,e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},a,o,s,u,c,l,d))._parentEditor=i,f._overwriteOptions=r,Object(en.a)((p=Object(lt.a)(f),Object(tn.a)(n.prototype)),"updateOptions",p).call(p,f._overwriteOptions),f._register(i.onDidChangeConfiguration((function(e){return f._onParentConfigurationChanged(e)}))),f}return Object(J.a)(n,[{key:"getParentEditor",value:function(){return this._parentEditor}},{key:"_onParentConfigurationChanged",value:function(e){Object(en.a)(Object(tn.a)(n.prototype),"updateOptions",this).call(this,this._parentEditor.getRawOptions()),Object(en.a)(Object(tn.a)(n.prototype),"updateOptions",this).call(this,this._overwriteOptions)}},{key:"updateOptions",value:function(e){Mr.f(this._overwriteOptions,e,!0),Object(en.a)(Object(tn.a)(n.prototype),"updateOptions",this).call(this,this._overwriteOptions)}}]),n}(H.a);Vr=jr([Ur(3,zt.a),Ur(4,Je.a),Ur(5,St.b),Ur(6,te.b),Ur(7,Ie.b),Ur(8,mn.a),Ur(9,Br.b)],Vr);n(401);var zr=n(121),Hr=n(180),Wr=new cr.a(new cr.c(0,122,204)),Kr={showArrow:!0,showFrame:!0,className:"",frameColor:Wr,arrowColor:Wr,keepEditorSelection:!1},qr=function(){function e(t,n,r,i,a,o){Object(Y.a)(this,e),this.id="",this.domNode=t,this.afterLineNumber=n,this.afterColumn=r,this.heightInLines=i,this._onDomNodeTop=a,this._onComputedHeight=o}return Object(J.a)(e,[{key:"onDomNodeTop",value:function(e){this._onDomNodeTop(e)}},{key:"onComputedHeight",value:function(e){this._onComputedHeight(e)}}]),e}(),Gr=function(){function e(t,n){Object(Y.a)(this,e),this._id=t,this._domNode=n}return Object(J.a)(e,[{key:"getId",value:function(){return this._id}},{key:"getDomNode",value:function(){return this._domNode}},{key:"getPosition",value:function(){return null}}]),e}(),Yr=function(){function e(t){Object(Y.a)(this,e),this._editor=t,this._ruleName=e._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}return Object(J.a)(e,[{key:"dispose",value:function(){this.hide(),Ht.removeCSSRulesContainingSelector(this._ruleName)}},{key:"_updateStyle",value:function(){Ht.removeCSSRulesContainingSelector(this._ruleName),Ht.createCSSRule(".monaco-editor ".concat(this._ruleName),"border-style: solid; border-color: transparent; border-bottom-color: ".concat(this._color,"; border-width: ").concat(this._height,"px; bottom: -").concat(this._height,"px; margin-left: -").concat(this._height,"px; "))}},{key:"show",value:function(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:Te.a.fromPositions(e),options:{className:this._ruleName,stickiness:1}}])}},{key:"hide",value:function(){this._editor.deltaDecorations(this._decorations,[])}},{key:"color",set:function(e){this._color!==e&&(this._color=e,this._updateStyle())}},{key:"height",set:function(e){this._height!==e&&(this._height=e,this._updateStyle())}}]),e}();Yr._IdGenerator=new Hr.a(".arrow-decoration-");var Jr=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(Y.a)(this,e),this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new xe.b,this.container=null,this._isShowing=!1,this.editor=t,this.options=Mr.b(r),Mr.f(this.options,Kr,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((function(e){var t=n._getWidth(e);n.domNode.style.width=t+"px",n.domNode.style.left=n._getLeft(e)+"px",n._onWidth(t)})))}return Object(J.a)(e,[{key:"dispose",value:function(){var e=this;this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((function(t){e._viewZone&&t.removeZone(e._viewZone.id),e._viewZone=null})),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}},{key:"create",value:function(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new Yr(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}},{key:"style",value:function(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}},{key:"_applyStyles",value:function(){if(this.container&&this.options.frameColor){var e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){var t=this.options.arrowColor.toString();this._arrow.color=t}}},{key:"_getWidth",value:function(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}},{key:"_getLeft",value:function(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}},{key:"_onViewZoneTop",value:function(e){this.domNode.style.top=e+"px"}},{key:"_onViewZoneHeight",value:function(e){if(this.domNode.style.height="".concat(e,"px"),this.container){var t=e-this._decoratingElementsHeight();this.container.style.height="".concat(t,"px");var n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n))}this._resizeSash&&this._resizeSash.layout()}},{key:"show",value:function(e,t){var n=Te.a.isIRange(e)?Te.a.lift(e):Te.a.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:Ae.a.EMPTY}])}},{key:"hide",value:function(){var e=this;this._viewZone&&(this.editor.changeViewZones((function(t){e._viewZone&&t.removeZone(e._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}},{key:"_decoratingElementsHeight",value:function(){var e=this.editor.getOption(53),t=0;this.options.showArrow&&(t+=2*Math.round(e/3));this.options.showFrame&&(t+=2*Math.round(e/9));return t}},{key:"_showImpl",value:function(e,t){var n=this,r=e.getStartPosition(),i=this.editor.getLayoutInfo(),a=this._getWidth(i);this.domNode.style.width="".concat(a,"px"),this.domNode.style.left=this._getLeft(i)+"px";var o=document.createElement("div");o.style.overflow="hidden";var s=this.editor.getOption(53),u=Math.max(12,this.editor.getLayoutInfo().height/s*.8);t=Math.min(t,u);var c=0,l=0;if(this._arrow&&this.options.showArrow&&(c=Math.round(s/3),this._arrow.height=c,this._arrow.show(r)),this.options.showFrame&&(l=Math.round(s/9)),this.editor.changeViewZones((function(e){n._viewZone&&e.removeZone(n._viewZone.id),n._overlayWidget&&(n.editor.removeOverlayWidget(n._overlayWidget),n._overlayWidget=null),n.domNode.style.top="-1000px",n._viewZone=new qr(o,r.lineNumber,r.column,t,(function(e){return n._onViewZoneTop(e)}),(function(e){return n._onViewZoneHeight(e)})),n._viewZone.id=e.addZone(n._viewZone),n._overlayWidget=new Gr("vs.editor.contrib.zoneWidget"+n._viewZone.id,n.domNode),n.editor.addOverlayWidget(n._overlayWidget)})),this.container&&this.options.showFrame){var d=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=d+"px",this.container.style.borderBottomWidth=d+"px"}var p=t*s-this._decoratingElementsHeight();this.container&&(this.container.style.top=c+"px",this.container.style.height=p+"px",this.container.style.overflow="hidden"),this._doLayout(p,a),this.options.keepEditorSelection||this.editor.setSelection(e);var f=this.editor.getModel();if(f){var h=e.endLineNumber+1;h<=f.getLineCount()?this.revealLine(h,!1):this.revealLine(f.getLineCount(),!0)}}},{key:"revealLine",value:function(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(e,0)}},{key:"setCssClass",value:function(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}},{key:"_onWidth",value:function(e){}},{key:"_doLayout",value:function(e,t){}},{key:"_relayout",value:function(e){var t=this;this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((function(n){t._viewZone&&(t._viewZone.heightInLines=e,n.layoutZone(t._viewZone.id))}))}},{key:"_initSash",value:function(){var e,t=this;this._resizeSash||(this._resizeSash=this._disposables.add(new zr.b(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((function(n){t._viewZone&&(e={startY:n.startY,heightInLines:t._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((function(){e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((function(n){if(e){var r=(n.currentY-e.startY)/t.editor.getOption(53),i=r<0?Math.ceil(r):Math.floor(r),a=e.heightInLines+i;a>5&&a<35&&t._relayout(a)}}))))}},{key:"getHorizontalSashLeft",value:function(){return 0}},{key:"getHorizontalSashTop",value:function(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}},{key:"getHorizontalSashWidth",value:function(){var e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}},{key:"position",get:function(){var e=Object(Ce.a)(this._positionMarkerId,1)[0];if(e){var t=this.editor.getModel();if(t){var n=t.getDecorationRange(e);if(n)return n.getStartPosition()}}}}]),e}(),$r=(n(402),n(44)),Qr=n(141),Xr=(n(280),n(66)),Zr=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,e,r))._actions=[],i._contextMenuProvider=r.contextMenuProvider,i.actions=r.actions||[],i.actionProvider=r.actionProvider,i.menuClassName=r.menuClassName||"",i.menuAsChild=!!r.menuAsChild,i}return Object(J.a)(n,[{key:"show",value:function(){var e=this;Object(en.a)(Object(tn.a)(n.prototype),"show",this).call(this),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:function(){return e.element},getActions:function(){return e.actions},getActionsContext:function(){return e.menuOptions?e.menuOptions.context:null},getActionViewItem:function(t){return e.menuOptions&&e.menuOptions.actionViewItemProvider?e.menuOptions.actionViewItemProvider(t):void 0},getKeyBinding:function(t){return e.menuOptions&&e.menuOptions.getKeyBinding?e.menuOptions.getKeyBinding(t):void 0},getMenuClassName:function(){return e.menuClassName},onHide:function(){return e.onHide()},actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}},{key:"hide",value:function(){Object(en.a)(Object(tn.a)(n.prototype),"hide",this).call(this)}},{key:"onHide",value:function(){this.hide(),this.element.classList.remove("active")}},{key:"menuOptions",set:function(e){this._menuOptions=e},get:function(){return this._menuOptions}},{key:"actions",get:function(){return this.actionProvider?this.actionProvider.getActions():this._actions},set:function(e){this._actions=e}}]),n}(function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;Object(Y.a)(this,n),(i=t.call(this))._onDidChangeVisibility=new rn.a,i.onDidChangeVisibility=i._onDidChangeVisibility.event,i._element=Object(Ht.append)(e,Object(Ht.$)(".monaco-dropdown")),i._label=Object(Ht.append)(i._element,Object(Ht.$)(".dropdown-label"));var a=r.labelRenderer;a||(a=function(e){return e.textContent=r.label||"",null});for(var o=0,s=[Ht.EventType.CLICK,Ht.EventType.MOUSE_DOWN,an.a.Tap];o1||(i.visible?i.hide():i.show())})))}i._register(Object(Ht.addDisposableListener)(i._label,Ht.EventType.KEY_UP,(function(e){var t=new Xr.a(e);(t.equals(3)||t.equals(10))&&(Ht.EventHelper.stop(e,!0),i.visible?i.hide():i.show())})));var p=a(i._label);return p&&i._register(p),i._register(an.b.addTarget(i._label)),i}return Object(J.a)(n,[{key:"show",value:function(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}},{key:"hide",value:function(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}},{key:"dispose",value:function(){Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}},{key:"element",get:function(){return this._element}}]),n}(Wt.b)),ei=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(Y.a)(this,n),(a=t.call(this,null,e,o)).options=o,a.actionItem=null,a._onDidChangeVisibility=a._register(new rn.a),a.menuActionsOrProvider=r,a.contextMenuProvider=i,a.options.actionRunner&&(a.actionRunner=a.options.actionRunner),a}return Object(J.a)(n,[{key:"render",value:function(e){var t=this;this.actionItem=e;var n=Array.isArray(this.menuActionsOrProvider),r={contextMenuProvider:this.contextMenuProvider,labelRenderer:function(e){var n;t.element=Object(Ht.append)(e,Object(Ht.$)("a.action-label"));var r=[];return"string"===typeof t.options.classNames?r=t.options.classNames.split(/\s+/g).filter((function(e){return!!e})):t.options.classNames&&(r=t.options.classNames),r.find((function(e){return"icon"===e}))||r.push("codicon"),(n=t.element.classList).add.apply(n,Object(ct.a)(r)),t.element.tabIndex=0,t.element.setAttribute("role","button"),t.element.setAttribute("aria-haspopup","true"),t.element.setAttribute("aria-expanded","false"),t.element.title=t._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:n?this.menuActionsOrProvider:void 0,actionProvider:n?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new Zr(e,r)),this._register(this.dropdownMenu.onDidChangeVisibility((function(e){var n;null===(n=t.element)||void 0===n||n.setAttribute("aria-expanded","".concat(e)),t._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){var i=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return i.options.anchorAlignmentProvider()}})}this.updateEnabled()}},{key:"setActionContext",value:function(e){Object(en.a)(Object(tn.a)(n.prototype),"setActionContext",this).call(this,e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}},{key:"updateEnabled",value:function(){var e,t,n=!this.getAction().enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",n),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",n)}}]),n}(Qr.b),ti=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},ni=function(e,t){return function(n,r){t(n,r,e)}};function ri(e,t,n,r){var i=e.getActions(t);return function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(e){return"navigation"===e},a=Object(Ee.a)(e);try{for(a.s();!(r=a.n()).done;){var o=Object(Ce.a)(r.value,2),s=o[0],u=o[1];if(n&&(u=u.map((function(e){return e instanceof Fe.c&&e.alt?e.alt:e}))),i(s)){var c=Array.isArray(t)?t:t.primary;c.unshift.apply(c,Object(ct.a)(u))}else{var l=Array.isArray(t)?t:t.secondary;l.length>0&&l.push(new Wt.d),l.push.apply(l,Object(ct.a)(u))}}}catch(d){a.e(d)}finally{a.f()}}(i,n,!1,r),function(e){var t,n=new xe.b,r=Object(Ee.a)(e);try{for(r.s();!(t=r.n()).done;){var i,a=Object(Ce.a)(t.value,2)[1],o=Object(Ee.a)(a);try{for(o.s();!(i=o.n()).done;){var s=i.value;n.add(s)}}catch(u){o.e(u)}finally{o.f()}}}catch(u){r.e(u)}finally{r.f()}return n}(i)}var ii=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;return Object(Y.a)(this,n),(a=t.call(this,void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon}))._action=e,a._keybindingService=r,a._notificationService=i,a._wantsAltCommand=!1,a._itemClassDispose=a._register(new xe.d),a._altKey=Ht.ModifierKeyEmitter.getInstance(),a}return Object(J.a)(n,[{key:"onClick",value:function(e){var t=this;e.preventDefault(),e.stopPropagation(),this.actionRunner.run(this._commandAction,this._context).catch((function(e){return t._notificationService.error(e)}))}},{key:"render",value:function(e){var t=this;Object(en.a)(Object(tn.a)(n.prototype),"render",this).call(this,e),e.classList.add("menu-entry"),this._updateItemClass(this._action.item);var r=!1,i=this._altKey.keyStatus.altKey||(Ge.j||Ge.d)&&this._altKey.keyStatus.shiftKey,a=function(){var e=r&&i;e!==t._wantsAltCommand&&(t._wantsAltCommand=e,t.updateLabel(),t.updateTooltip(),t.updateClass())};this._action.alt&&this._register(this._altKey.event((function(e){i=e.altKey||(Ge.j||Ge.d)&&e.shiftKey,a()}))),this._register(Object($r.a)(e,"mouseleave")((function(e){r=!1,a()}))),this._register(Object($r.a)(e,"mouseenter")((function(e){r=!0,a()})))}},{key:"updateLabel",value:function(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}},{key:"updateTooltip",value:function(){if(this.label){var e=this._keybindingService.lookupKeybinding(this._commandAction.id),t=e&&e.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;this.label.title=t?Object(Q.a)("titleAndKb","{0} ({1})",n,t):n}}},{key:"updateClass",value:function(){this.options.icon&&(this._commandAction!==this._action?this._action.alt&&this._updateItemClass(this._action.alt.item):this._action.alt&&this._updateItemClass(this._action.item))}},{key:"_updateItemClass",value:function(e){var t;this._itemClassDispose.value=void 0;var n=this.element,r=this.label;if(n&&r){var i=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(i)if(Ie.d.isThemeIcon(i)){var a,o=Ie.d.asClassName(i);(a=r.classList).add.apply(a,Object(ct.a)(o.split(" "))),this._itemClassDispose.value=Object(xe.h)((function(){var e;(e=r.classList).remove.apply(e,Object(ct.a)(o.split(" ")))}))}else i.light&&r.style.setProperty("--menu-entry-icon-light",Object(Ht.asCSSUrl)(i.light)),i.dark&&r.style.setProperty("--menu-entry-icon-dark",Object(Ht.asCSSUrl)(i.dark)),r.classList.add("icon"),this._itemClassDispose.value=Object(xe.h)((function(){r.classList.remove("icon"),r.style.removeProperty("--menu-entry-icon-light"),r.style.removeProperty("--menu-entry-icon-dark")}))}}},{key:"_commandAction",get:function(){return this._wantsAltCommand&&this._action.alt||this._action}}]),n}(Qr.a);ii=ti([ni(1,qt.a),ni(2,mn.a)],ii);var ai=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){return Object(Y.a)(this,n),t.call(this,e,{getActions:function(){return e.actions}},r,{menuAsChild:!0,classNames:Ie.d.isThemeIcon(e.item.icon)?Ie.d.asClassName(e.item.icon):void 0})}return Object(J.a)(n,[{key:"render",value:function(e){if(Object(en.a)(Object(tn.a)(n.prototype),"render",this).call(this,e),this.element){e.classList.add("menu-entry");var t=this._action.item.icon;t&&!Ie.d.isThemeIcon(t)&&(this.element.classList.add("icon"),t.light&&this.element.style.setProperty("--menu-entry-icon-light",Object(Ht.asCSSUrl)(t.light)),t.dark&&this.element.style.setProperty("--menu-entry-icon-dark",Object(Ht.asCSSUrl)(t.dark)))}}}]),n}(ei);function oi(e,t){return t instanceof Fe.c?e.createInstance(ii,t):t instanceof Fe.e?e.createInstance(ai,t):void 0}ai=ti([ni(1,Kt.a)],ai);var si,ui,ci=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},li=function(e,t){return function(n,r){t(n,r,e)}},di=Object(zt.c)("IPeekViewService");Object(Gn.b)(di,function(){function e(){Object(Y.a)(this,e),this._widgets=new Map}return Object(J.a)(e,[{key:"addExclusiveWidget",value:function(e,t){var n=this,r=this._widgets.get(e);r&&(r.listener.dispose(),r.widget.dispose());this._widgets.set(e,{widget:t,listener:t.onDidClose((function(){var r=n._widgets.get(e);r&&r.widget===t&&(r.listener.dispose(),n._widgets.delete(e))}))})}}]),e}()),(ui=si||(si={})).inPeekEditor=new te.c("inReferenceSearchEditor",!0),ui.notInPeekEditor=ui.inPeekEditor.toNegated();var pi=function(){function e(t,n){Object(Y.a)(this,e),t instanceof Vr&&si.inPeekEditor.bindTo(n)}return Object(J.a)(e,[{key:"dispose",value:function(){}}]),e}();pi.ID="editor.contrib.referenceController",pi=ci([li(1,te.b)],pi),Object($.l)(pi.ID,pi);var fi={headerBackgroundColor:cr.a.white,primaryHeadingColor:cr.a.fromHex("#333333"),secondaryHeadingColor:cr.a.fromHex("#6c6c6cb3")},hi=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;return Object(Y.a)(this,n),(a=t.call(this,e,r)).instantiationService=i,a._onDidClose=new rn.a,a.onDidClose=a._onDidClose.event,Mr.f(a.options,fi,!1),a}return Object(J.a)(n,[{key:"dispose",value:function(){this.disposed||(this.disposed=!0,Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this),this._onDidClose.fire(this))}},{key:"style",value:function(e){var t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),Object(en.a)(Object(tn.a)(n.prototype),"style",this).call(this,e)}},{key:"_applyStyles",value:function(){Object(en.a)(Object(tn.a)(n.prototype),"_applyStyles",this).call(this);var e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}},{key:"_fillContainer",value:function(e){this.setCssClass("peekview-widget"),this._headElement=Ht.$(".head"),this._bodyElement=Ht.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}},{key:"_fillHead",value:function(e,t){var n=this,r=Ht.$(".peekview-title");Ht.append(this._headElement,r),Ht.addStandardDisposableListener(r,"click",(function(e){return n._onTitleClick(e)})),this._fillTitleIcon(r),this._primaryHeading=Ht.$("span.filename"),this._secondaryHeading=Ht.$("span.dirname"),this._metaHeading=Ht.$("span.meta"),Ht.append(r,this._primaryHeading,this._secondaryHeading,this._metaHeading);var i=Ht.$(".peekview-actions");Ht.append(this._headElement,i);var a=this._getActionBarOptions();this._actionbarWidget=new Rr.a(i,a),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Wt.a("peekview.close",Q.a("label.close","Close"),on.b.close.classNames,!0,(function(){return n.dispose(),Promise.resolve()})),{label:!1,icon:!0})}},{key:"_fillTitleIcon",value:function(e){}},{key:"_getActionBarOptions",value:function(){return{actionViewItemProvider:oi.bind(void 0,this.instantiationService),orientation:0}}},{key:"_onTitleClick",value:function(e){}},{key:"setTitle",value:function(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("aria-label",e),t?this._secondaryHeading.innerText=t:Ht.clearNode(this._secondaryHeading))}},{key:"setMetaTitle",value:function(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Ht.show(this._metaHeading)):Ht.hide(this._metaHeading))}},{key:"_doLayout",value:function(e,t){if(!this._isShowing&&e<0)this.dispose();else{var n=Math.ceil(1.2*this.editor.getOption(53)),r=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(r,t)}}},{key:"_doLayoutHead",value:function(e,t){this._headElement&&(this._headElement.style.height="".concat(e,"px"),this._headElement.style.lineHeight=this._headElement.style.height)}},{key:"_doLayoutBody",value:function(e,t){this._bodyElement&&(this._bodyElement.style.height="".concat(e,"px"))}}]),n}(Jr);hi=ci([li(2,zt.a)],hi);var gi,mi=Object(Ne.lc)("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},Q.a("peekViewTitleBackground","Background color of the peek view title area.")),_i=Object(Ne.lc)("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},Q.a("peekViewTitleForeground","Color of the peek view title.")),vi=Object(Ne.lc)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161e6",hc:"#FFFFFF99"},Q.a("peekViewTitleInfoForeground","Color of the peek view title info.")),yi=Object(Ne.lc)("peekView.border",{dark:"#007acc",light:"#007acc",hc:Ne.h},Q.a("peekViewBorder","Color of the peek view borders and arrow.")),bi=Object(Ne.lc)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:cr.a.black},Q.a("peekViewResultsBackground","Background color of the peek view result list.")),Di=Object(Ne.lc)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:cr.a.white},Q.a("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),Ei=Object(Ne.lc)("peekViewResult.fileForeground",{dark:cr.a.white,light:"#1E1E1E",hc:cr.a.white},Q.a("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),Ci=Object(Ne.lc)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},Q.a("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),Si=Object(Ne.lc)("peekViewResult.selectionForeground",{dark:cr.a.white,light:"#6C6C6C",hc:cr.a.white},Q.a("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),xi=Object(Ne.lc)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:cr.a.black},Q.a("peekViewEditorBackground","Background color of the peek view editor.")),ki=Object(Ne.lc)("peekViewEditorGutter.background",{dark:xi,light:xi,hc:xi},Q.a("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),Ti=Object(Ne.lc)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},Q.a("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),wi=Object(Ne.lc)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},Q.a("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),Ai=Object(Ne.lc)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:Ne.b},Q.a("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor.")),Oi=n(69);(gi||(gi={})).className=function(e){switch(e){case Oi.a.Ignore:return"severity-ignore "+on.b.info.classNames;case Oi.a.Info:return on.b.info.classNames;case Oi.a.Warning:return on.b.warning.classNames;case Oi.a.Error:return on.b.error.classNames;default:return""}},Object(Ie.f)((function(e,t){var n=e.getColor(Ne.ec);if(n){var r=on.b.error.cssSelector;t.addRule("\n\t\t\t.monaco-editor .zone-widget ".concat(r,",\n\t\t\t.markers-panel .marker-icon").concat(r,",\n\t\t\t.extensions-viewlet > .extensions ").concat(r," {\n\t\t\t\tcolor: ").concat(n,";\n\t\t\t}\n\t\t"))}var i=e.getColor(Ne.gc);if(i){var a=on.b.warning.cssSelector;t.addRule("\n\t\t\t.monaco-editor .zone-widget ".concat(a,",\n\t\t\t.markers-panel .marker-icon").concat(a,",\n\t\t\t.extensions-viewlet > .extensions ").concat(a,",\n\t\t\t.extension-editor ").concat(a," {\n\t\t\t\tcolor: ").concat(i,";\n\t\t\t}\n\t\t"))}var o=e.getColor(Ne.fc);if(o){var s=on.b.info.cssSelector;t.addRule("\n\t\t\t.monaco-editor .zone-widget ".concat(s,",\n\t\t\t.markers-panel .marker-icon").concat(s,",\n\t\t\t.extensions-viewlet > .extensions ").concat(s,",\n\t\t\t.extension-editor ").concat(s," {\n\t\t\t\tcolor: ").concat(o,";\n\t\t\t}\n\t\t"))}}));var Ni=n(158),Ii=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Fi=function(e,t){return function(n,r){t(n,r,e)}},Li=function(){function e(t,n,r,i,a){var o=this;Object(Y.a)(this,e),this._openerService=i,this._labelService=a,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new xe.b,this._editor=n;var s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(Ht.addStandardDisposableListener(this._relatedBlock,"click",(function(e){e.preventDefault();var t=o._relatedDiagnostics.get(e.target);t&&r(t)}))),this._scrollable=new Tr.b(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),t.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((function(e){s.style.left="-".concat(e.scrollLeft,"px"),s.style.top="-".concat(e.scrollTop,"px")}))),this._disposables.add(this._scrollable)}return Object(J.a)(e,[{key:"dispose",value:function(){Object(xe.f)(this._disposables)}},{key:"update",value:function(e){var t=this,n=e.source,r=e.message,i=e.relatedInformation,a=e.code,o=((null===n||void 0===n?void 0:n.length)||0)+"()".length;a&&(o+="string"===typeof a?a.length:a.value.length);var s=Object(ft.Q)(r);this._lines=s.length,this._longestLineLength=0;var u,c=Object(Ee.a)(s);try{for(c.s();!(u=c.n()).done;){var l=u.value;this._longestLineLength=Math.max(l.length+o,this._longestLineLength)}}catch(w){c.e(w)}finally{c.f()}Ht.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);var d,p=this._messageBlock,f=Object(Ee.a)(s);try{for(f.s();!(d=f.n()).done;){var h=d.value;(p=document.createElement("div")).innerText=h,""===h&&(p.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(p)}}catch(w){f.e(w)}finally{f.f()}if(n||a){var g=document.createElement("span");if(g.classList.add("details"),p.appendChild(g),n){var m=document.createElement("span");m.innerText=n,m.classList.add("source"),g.appendChild(m)}if(a)if("string"===typeof a){var _=document.createElement("span");_.innerText="(".concat(a,")"),_.classList.add("code"),g.appendChild(_)}else{this._codeLink=Ht.$("a.code-link"),this._codeLink.setAttribute("href","".concat(a.target.toString())),this._codeLink.onclick=function(e){t._openerService.open(a.target),e.preventDefault(),e.stopPropagation()},Ht.append(this._codeLink,Ht.$("span")).innerText=a.value,g.appendChild(this._codeLink)}}if(Ht.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Object(ne.m)(i)){var v=this._relatedBlock.appendChild(document.createElement("div"));v.style.paddingTop="".concat(Math.floor(.66*this._editor.getOption(53)),"px"),this._lines+=1;var y,b=Object(Ee.a)(i);try{for(b.s();!(y=b.n()).done;){var D=y.value,E=document.createElement("div"),C=document.createElement("a");C.classList.add("filename"),C.innerText="".concat(Lr(D.resource),"(").concat(D.startLineNumber,", ").concat(D.startColumn,"): "),C.title=this._labelService.getUriLabel(D.resource),this._relatedDiagnostics.set(C,D);var S=document.createElement("span");S.innerText=D.message,E.appendChild(C),E.appendChild(S),this._lines+=1,v.appendChild(E)}}catch(w){b.e(w)}finally{b.f()}}var x=this._editor.getOption(38),k=Math.ceil(x.typicalFullwidthCharacterWidth*this._longestLineLength*.75),T=x.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:k,scrollHeight:T})}},{key:"layout",value:function(e,t){this._scrollable.getDomNode().style.height="".concat(e,"px"),this._scrollable.getDomNode().style.width="".concat(t,"px"),this._scrollable.setScrollDimensions({width:t,height:e})}},{key:"getHeightInLines",value:function(){return Math.min(17,this._lines)}},{key:"getAriaLabel",value:function(e){var t="";switch(e.severity){case gn.c.Error:t=Q.a("Error","Error");break;case gn.c.Warning:t=Q.a("Warning","Warning");break;case gn.c.Info:t=Q.a("Info","Info");break;case gn.c.Hint:t=Q.a("Hint","Hint")}var n=Q.a("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn),r=this._editor.getModel();if(r&&e.startLineNumber<=r.getLineCount()&&e.startLineNumber>=1){var i=r.getLineContent(e.startLineNumber);n="".concat(i,", ").concat(n)}return n}}]),e}(),Pi=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a,o,s,u){var c;return Object(Y.a)(this,n),(c=t.call(this,e,{showArrow:!0,showFrame:!0,isAccessible:!0},o))._themeService=r,c._openerService=i,c._menuService=a,c._contextKeyService=s,c._labelService=u,c._callOnDispose=new xe.b,c._onDidSelectRelatedInformation=new rn.a,c.onDidSelectRelatedInformation=c._onDidSelectRelatedInformation.event,c._severity=gn.c.Warning,c._backgroundColor=cr.a.white,c._applyTheme(r.getColorTheme()),c._callOnDispose.add(r.onDidColorThemeChange(c._applyTheme.bind(Object(lt.a)(c)))),c.create(),c}return Object(J.a)(n,[{key:"_applyTheme",value:function(e){this._backgroundColor=e.getColor(zi);var t=ji;this._severity===gn.c.Warning?t=Ui:this._severity===gn.c.Info&&(t=Vi);var n=e.getColor(t);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:this._backgroundColor,primaryHeadingColor:e.getColor(_i),secondaryHeadingColor:e.getColor(vi)})}},{key:"_applyStyles",value:function(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),Object(en.a)(Object(tn.a)(n.prototype),"_applyStyles",this).call(this)}},{key:"dispose",value:function(){this._callOnDispose.dispose(),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}},{key:"_fillHead",value:function(e){var t=this;Object(en.a)(Object(tn.a)(n.prototype),"_fillHead",this).call(this,e),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun((function(e){return t.editor.focus()})));var r=[],i=this._menuService.createMenu(n.TitleMenu,this._contextKeyService);ri(i,void 0,r),this._actionbarWidget.push(r,{label:!1,icon:!0,index:0}),i.dispose()}},{key:"_fillTitleIcon",value:function(e){this._icon=Ht.append(e,Ht.$(""))}},{key:"_fillBody",value:function(e){var t=this;this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new Li(this._container,this.editor,(function(e){return t._onDidSelectRelatedInformation.fire(e)}),this._openerService,this._labelService),this._disposables.add(this._message)}},{key:"show",value:function(){throw new Error("call showAtMarker")}},{key:"showAtMarker",value:function(e,t,r){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());var i=Te.a.lift(e),a=this.editor.getPosition(),o=a&&i.containsPosition(a)?a:i.getStartPosition();Object(en.a)(Object(tn.a)(n.prototype),"show",this).call(this,o,this.computeRequiredHeight());var s=this.editor.getModel();if(s){var u=r>1?Q.a("problems","{0} of {1} problems",t,r):Q.a("change","{0} of {1} problem",t,r);this.setTitle(Object(vn.b)(s.uri),u)}this._icon.className="codicon ".concat(gi.className(gn.c.toSeverity(this._severity))),this.editor.revealPositionNearTop(o,0),this.editor.focus()}},{key:"updateMarker",value:function(e){this._container.classList.remove("stale"),this._message.update(e)}},{key:"showStale",value:function(){this._container.classList.add("stale"),this._relayout()}},{key:"_doLayoutBody",value:function(e,t){Object(en.a)(Object(tn.a)(n.prototype),"_doLayoutBody",this).call(this,e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height="".concat(e,"px")}},{key:"_onWidth",value:function(e){this._message.layout(this._heightInPixel,e)}},{key:"_relayout",value:function(){Object(en.a)(Object(tn.a)(n.prototype),"_relayout",this).call(this,this.computeRequiredHeight())}},{key:"computeRequiredHeight",value:function(){return 3+this._message.getHeightInLines()}}]),n}(hi);Pi.TitleMenu=new Fe.b("gotoErrorTitleMenu"),Pi=Ii([Fi(1,Ie.b),Fi(2,Nr.a),Fi(3,Fe.a),Fi(4,zt.a),Fi(5,te.b),Fi(6,Ni.a)],Pi);var Ri=Object(Ne.Zb)(Ne.v,Ne.u),Mi=Object(Ne.Zb)(Ne.Y,Ne.X),Bi=Object(Ne.Zb)(Ne.N,Ne.M),ji=Object(Ne.lc)("editorMarkerNavigationError.background",{dark:Ri,light:Ri,hc:Ri},Q.a("editorMarkerNavigationError","Editor marker navigation widget error color.")),Ui=Object(Ne.lc)("editorMarkerNavigationWarning.background",{dark:Mi,light:Mi,hc:Mi},Q.a("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Vi=Object(Ne.lc)("editorMarkerNavigationInfo.background",{dark:Bi,light:Bi,hc:Bi},Q.a("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),zi=Object(Ne.lc)("editorMarkerNavigation.background",{dark:"#2D2D30",light:cr.a.white,hc:"#0C141F"},Q.a("editorMarkerNavigationBackground","Editor marker navigation widget background."));Object(Ie.f)((function(e,t){var n=e.getColor(Ne.wc);n&&(t.addRule(".monaco-editor .marker-widget a { color: ".concat(n,"; }")),t.addRule(".monaco-editor .marker-widget a.code-link span:hover { color: ".concat(n,"; }")))}));var Hi=n(90),Wi=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Ki=function(e,t){return function(n,r){t(n,r,e)}},qi=function e(t,n,r){Object(Y.a)(this,e),this.marker=t,this.index=n,this.total=r},Gi=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this._markerService=n,this._onDidChange=new rn.a,this.onDidChange=this._onDidChange.event,this._dispoables=new xe.b,this._markers=[],this._nextIdx=-1,gt.a.isUri(t)?this._resourceFilter=function(e){return e.toString()===t.toString()}:t&&(this._resourceFilter=t);var i=function(){r._markers=r._markerService.read({resource:gt.a.isUri(t)?t:void 0,severities:gn.c.Error|gn.c.Warning|gn.c.Info}),"function"===typeof t&&(r._markers=r._markers.filter((function(e){return r._resourceFilter(e.resource)}))),r._markers.sort(e._compareMarker)};i(),this._dispoables.add(n.onMarkerChanged((function(e){r._resourceFilter&&!e.some((function(e){return r._resourceFilter(e)}))||(i(),r._nextIdx=-1,r._onDidChange.fire())})))}return Object(J.a)(e,[{key:"dispose",value:function(){this._dispoables.dispose(),this._onDidChange.dispose()}},{key:"matches",value:function(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}},{key:"_initIdx",value:function(e,t,n){var r=!1,i=this._markers.findIndex((function(t){return t.resource.toString()===e.uri.toString()}));i<0&&(i=Object(ne.c)(this._markers,{resource:e.uri},(function(e,t){return Object(ft.f)(e.resource.toString(),t.resource.toString())})))<0&&(i=~i);for(var a=i;a=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Xi=function(e,t){return function(n,r){t(n,r,e)}},Zi=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},ea=function(){function e(t,n,r,i,a){Object(Y.a)(this,e),this._markerNavigationService=n,this._contextKeyService=r,this._editorService=i,this._instantiationService=a,this._sessionDispoables=new xe.b,this._editor=t,this._widgetVisible=oa.bindTo(this._contextKeyService)}return Object(J.a)(e,[{key:"dispose",value:function(){this._cleanUp(),this._sessionDispoables.dispose()}},{key:"_cleanUp",value:function(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}},{key:"_getOrCreateModel",value:function(e){var t=this;if(this._model&&this._model.matches(e))return this._model;var n=!1;return this._model&&(n=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),n&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(Pi,this._editor),this._widget.onDidClose((function(){return t.close()}),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((function(e){var n,r,i;(null===(n=t._model)||void 0===n?void 0:n.selected)&&Te.a.containsPosition(null===(r=t._model)||void 0===r?void 0:r.selected.marker,e.position)||null===(i=t._model)||void 0===i||i.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((function(){if(t._widget&&t._widget.position&&t._model){var e=t._model.find(t._editor.getModel().uri,t._widget.position);e?t._widget.updateMarker(e.marker):t._widget.showStale()}}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((function(e){t._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:Te.a.lift(e).collapseToStart()}},t._editor),t.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((function(){return t._cleanUp()}))),this._model}},{key:"close",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._cleanUp(),e&&this._editor.focus()}},{key:"showAtMarker",value:function(e){if(this._editor.hasModel()){var t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new ke.a(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}},{key:"nagivate",value:function(t,n){return Zi(this,void 0,void 0,K.a.mark((function r(){var i,a;return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this._editor.hasModel()){r.next=14;break}if((i=this._getOrCreateModel(n?void 0:this._editor.getModel().uri)).move(t,this._editor.getModel(),this._editor.getPosition()),i.selected){r.next=5;break}return r.abrupt("return");case 5:if(i.selected.marker.resource.toString()===this._editor.getModel().uri.toString()){r.next=13;break}return this._cleanUp(),r.next=9,this._editorService.openCodeEditor({resource:i.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:i.selected.marker}},this._editor);case 9:(a=r.sent)&&(e.get(a).close(),e.get(a).nagivate(t,n)),r.next=14;break;case 13:this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total);case 14:case"end":return r.stop()}}),r,this)})))}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();ea.ID="editor.contrib.markerController",ea=Qi([Xi(1,Yi),Xi(2,te.b),Xi(3,Je.a),Xi(4,zt.a)],ea);var ta=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;return Object(Y.a)(this,n),(a=t.call(this,i))._next=e,a._multiFile=r,a}return Object(J.a)(n,[{key:"run",value:function(e,t){return Zi(this,void 0,void 0,K.a.mark((function e(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.hasModel()&&ea.get(t).nagivate(this._next,this._multiFile);case 1:case"end":return e.stop()}}),e,this)})))}}]),n}($.b),na=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!0,!1,{id:n.ID,label:n.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:578,weight:100},menuOpts:{menuId:Pi.TitleMenu,title:n.LABEL,icon:Object($i.b)("marker-navigation-next",on.b.chevronDown,Q.a("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}return n}(ta);na.ID="editor.action.marker.next",na.LABEL=Q.a("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");var ra=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!1,!1,{id:n.ID,label:n.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:1602,weight:100},menuOpts:{menuId:Pi.TitleMenu,title:na.LABEL,icon:Object($i.b)("marker-navigation-previous",on.b.chevronUp,Q.a("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}return n}(ta);ra.ID="editor.action.marker.prev",ra.LABEL=Q.a("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");var ia=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!0,!0,{id:"editor.action.marker.nextInFiles",label:Q.a("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:66,weight:100},menuOpts:{menuId:Fe.b.MenubarGoMenu,title:Q.a({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}return n}(ta),aa=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!1,!0,{id:"editor.action.marker.prevInFiles",label:Q.a("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:1090,weight:100},menuOpts:{menuId:Fe.b.MenubarGoMenu,title:Q.a({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}return n}(ta);Object($.l)(ea.ID,ea),Object($.j)(na),Object($.j)(ra),Object($.j)(ia),Object($.j)(aa);var oa=new te.c("markersNavigationVisible",!1),sa=$.c.bindToContribution(ea.get);Object($.k)(new sa({id:"closeMarkersNavigation",precondition:oa,handler:function(e){return e.close()},kbOpts:{weight:150,kbExpr:X.a.focus,primary:9,secondary:[1033]}}));var ua=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},ca=function(e,t){return function(n,r){t(n,r,e)}},la=Ht.$,da=function(){function e(t,n){Object(Y.a)(this,e),this.range=t,this.marker=n}return Object(J.a)(e,[{key:"equals",value:function(t){return t instanceof e&&gn.a.makeKey(this.marker)===gn.a.makeKey(t.marker)}}]),e}(),pa={type:2,filter:{include:yt.QuickFix}},fa=function(){function e(t,n,r,i,a){Object(Y.a)(this,e),this._editor=t,this._hover=n,this._markerDecorationsService=r,this._keybindingService=i,this._openerService=a,this.recentMarkerCodeActionsInfo=void 0}return Object(J.a)(e,[{key:"computeSync",value:function(e,t){if(!this._editor.hasModel())return[];var n,r=this._editor.getModel(),i=e.startLineNumber,a=r.getLineMaxColumn(i),o=[],s=Object(Ee.a)(t);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=u.range.startLineNumber===i?u.range.startColumn:1,l=u.range.endLineNumber===i?u.range.endColumn:a,d=this._markerDecorationsService.getMarker(r.uri,u);if(d){var p=new Te.a(e.startLineNumber,c,e.startLineNumber,l);o.push(new da(p,d))}}}catch(f){s.e(f)}finally{s.f()}return o}},{key:"renderHoverParts",value:function(e,t){var n=this;if(!e.length)return xe.a.None;var r=new xe.b;e.forEach((function(e){return t.appendChild(n.renderMarkerHover(e,r))}));var i=1===e.length?e[0]:e.sort((function(e,t){return gn.c.compare(e.marker.severity,t.marker.severity)}))[0];return t.appendChild(this.renderMarkerStatusbar(i,r)),r}},{key:"renderMarkerHover",value:function(e,t){var n=this,r=la("div.hover-row"),i=Ht.append(r,la("div.marker.hover-contents")),a=e.marker,o=a.source,s=a.message,u=a.code,c=a.relatedInformation;this._editor.applyFontInfo(i);var l=Ht.append(i,la("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=s,o||u)if(u&&"string"!==typeof u){var d=la("span");if(o)Ht.append(d,la("span")).innerText=o;var p=Ht.append(d,la("a.code-link"));p.setAttribute("href",u.target.toString()),t.add(Ht.addDisposableListener(p,"click",(function(e){n._openerService.open(u.target),e.preventDefault(),e.stopPropagation()}))),Ht.append(p,la("span")).innerText=u.value;var f=Ht.append(i,d);f.style.opacity="0.6",f.style.paddingLeft="6px"}else{var h=Ht.append(i,la("span"));h.style.opacity="0.6",h.style.paddingLeft="6px",h.innerText=o&&u?"".concat(o,"(").concat(u,")"):o||"(".concat(u,")")}if(Object(ne.m)(c)){var g,m=Object(Ee.a)(c);try{var _=function(){var e=g.value,r=e.message,a=e.resource,o=e.startLineNumber,s=e.startColumn,u=Ht.append(i,la("div"));u.style.marginTop="8px";var c=Ht.append(u,la("a"));c.innerText="".concat(Object(vn.b)(a),"(").concat(o,", ").concat(s,"): "),c.style.cursor="pointer",t.add(Ht.addDisposableListener(c,"click",(function(e){e.stopPropagation(),e.preventDefault(),n._openerService&&n._openerService.open(a,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:o,startColumn:s}}}).catch(ie.e)})));var l=Ht.append(u,la("span"));l.innerText=r,n._editor.applyFontInfo(l)};for(m.s();!(g=m.n()).done;)_()}catch(v){m.e(v)}finally{m.f()}}return r}},{key:"renderMarkerStatusbar",value:function(e,t){var n=this,r=la("div.hover-row.status-bar"),i=Ht.append(r,la("div.actions"));if(e.marker.severity!==gn.c.Error&&e.marker.severity!==gn.c.Warning&&e.marker.severity!==gn.c.Info||t.add(this.renderAction(i,{label:Q.a("peek problem","Peek Problem"),commandId:na.ID,run:function(){n._hover.hide(),ea.get(n._editor).showAtMarker(e.marker),n._editor.focus()}})),!this._editor.getOption(75)){var a=Ht.append(i,la("div"));this.recentMarkerCodeActionsInfo&&(gn.a.makeKey(this.recentMarkerCodeActionsInfo.marker)===gn.a.makeKey(e.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(a.textContent=Q.a("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);var o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?xe.a.None:t.add(Object(Se.g)((function(){return a.textContent=Q.a("checkingForQuickFixes","Checking for quick fixes...")}),200));a.textContent||(a.textContent=String.fromCharCode(160));var s=this.getCodeActions(e.marker);t.add(Object(xe.h)((function(){return s.cancel()}))),s.then((function(r){if(o.dispose(),n.recentMarkerCodeActionsInfo={marker:e.marker,hasCodeActions:r.validActions.length>0},!n.recentMarkerCodeActionsInfo.hasCodeActions)return r.dispose(),void(a.textContent=Q.a("noQuickFixes","No quick fixes available"));a.style.display="none";var s=!1;t.add(Object(xe.h)((function(){s||r.dispose()}))),t.add(n.renderAction(i,{label:Q.a("quick fixes","Quick Fix..."),commandId:Nn.Id,run:function(e){s=!0;var t=Tn.get(n._editor),i=Ht.getDomNodePagePosition(e);n._hover.hide(),t.showCodeActions(pa,r,{x:i.left+6,y:i.top+i.height+6})}}))}))}return r}},{key:"renderAction",value:function(e,t){var n=this._keybindingService.lookupKeybinding(t.commandId);return function(e,t,n){var r=Ht.append(e,wr("div.action-container")),i=Ht.append(r,wr("a.action"));return i.setAttribute("href","#"),i.setAttribute("role","button"),t.iconClass&&Ht.append(i,wr("span.icon.".concat(t.iconClass))),Ht.append(i,wr("span")).textContent=n?"".concat(t.label," (").concat(n,")"):t.label,Ht.addDisposableListener(r,Ht.EventType.CLICK,(function(e){e.stopPropagation(),e.preventDefault(),t.run(r)}))}(e,t,n?n.getLabel():null)}},{key:"getCodeActions",value:function(e){var t=this;return Object(Se.f)((function(n){return Lt(t._editor.getModel(),new Te.a(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),pa,Ct.b.None,n)}))}}]),e}();fa=ua([ca(2,Or.a),ca(3,qt.a),ca(4,Nr.a)],fa);var ha,ga=n(189),ma=n(276);!function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){return i(t[o][1][e]||e)}),c,c.exports,e,t,n,r)}return n[o].exports}for(var a=!1,o=0;o\s]+))?)*)\s*(\/?)\s*>/,s=/^<\s*\/\s*([\w:-]+)[^>]*>/,u=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,c=/^=0&&(t.comment&&t.comment(e.substring(4,r)),e=e.substring(r+3),n=!1)}():l.test(e)?h(s,m):c.test(e)&&h(o,g);!function(){if(!n)return;var r,i=e.indexOf("<");i>=0?(r=e.substring(0,i),e=e.substring(i)):(r=e,e="");t.chars&&t.chars(r)}()}();var r=e===p;p=e,r&&(e="")}function h(t,r){var i=e.match(t);i&&(e=e.substring(i[0].length),i[0].replace(t,r),n=!1)}function g(e,n,o,s){var c={},l=i(n),p=a.voids[l]||!!s;o.replace(u,(function(e,t,n,i,a){c[t]=void 0===n&&void 0===i&&void 0===a?void 0:r.decode(n||i||a||"")})),p||d.push(l),t.start&&t.start(l,c,p)}function m(e,n){var r,a=0,o=i(n);if(o)for(a=d.length-1;a>=0&&d[a]!==o;a--);if(a>=0){for(r=d.length-1;r>=a;r--)t.end&&t.end(d[r]);d.length=a}}m()}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],8:[function(e,t,n){var r=e("he"),i=e("./lowercase"),a=e("./attributes"),o=e("./elements");t.exports=function(e,t){var n,s=t||{};return d(),{start:function(e,t,o){var l=i(e);if(n.ignoring)return void c(l);if(-1===(s.allowedTags||[]).indexOf(l))return void c(l);if(s.filter&&!s.filter({tag:l,attrs:t}))return void c(l);u("<"),u(l),Object.keys(t).forEach((function(e){var n=t[e],o=(s.allowedClasses||{})[l]||[],c=(s.allowedAttributes||{})[l]||[];c=c.concat((s.allowedAttributes||{})["*"]||[]);var d=i(e);("class"===d&&-1===c.indexOf(d)?(n=n.split(" ").filter((function(e){return o&&-1!==o.indexOf(e)})).join(" ").trim()).length:-1!==c.indexOf(d)&&(!0!==a.uris[d]||function(e){var t=e[0];if("#"===t||"/"===t)return!0;var n=e.indexOf(":");if(-1===n)return!0;var r=e.indexOf("?");if(-1!==r&&n>r)return!0;var i=e.indexOf("#");return-1!==i&&n>i||s.allowedSchemes.some(a);function a(t){return 0===e.indexOf(t+":")}}(n)))&&(u(" "),u(e),"string"===typeof n&&(u('="'),u(r.encode(n)),u('"')))})),u(o?"/>":">")},end:function(e){var t=i(e);-1!==(s.allowedTags||[]).indexOf(t)&&!1===n.ignoring?(u("")):l(t)},chars:function(e){!1===n.ignoring&&u(s.transformText?s.transformText(e):e)}};function u(t){e.push(t)}function c(e){o.voids[e]||(!1===n.ignoring?n={ignoring:e,depth:1}:n.ignoring===e&&n.depth++)}function l(e){n.ignoring===e&&--n.depth<=0&&d()}function d(){n={ignoring:!1,depth:0}}}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],9:[function(e,t,n){var r={"&":"&","<":"<",">":">",'"':""","'":"'"},i={"&":"&","<":"<",">":">",""":'"',"'":"'"},a=/(&|<|>|"|')/g,o=/[&<>"']/g;function s(e){return r[e]}function u(e){return i[e]}function c(e){return null==e?"":String(e).replace(o,s)}function l(e){return null==e?"":String(e).replace(a,u)}c.options=l.options={},t.exports={encode:c,escape:c,decode:l,unescape:l,version:"1.0.0-browser"}},{}],10:[function(e,t,n){function r(e,t){return e[t]=!0,e}t.exports=function(e){return e.reduce(r,{})}},{}]},{},[4]);var _a,va=ha,ya=n(220),ba=n(72),Da=null===(_a=window.trustedTypes)||void 0===_a?void 0:_a.createPolicy("insane",{createHTML:function(e,t){return va(e,t)}});function Ea(e,t){var n,r=function(e){var t=[Ir.c.http,Ir.c.https,Ir.c.mailto,Ir.c.data,Ir.c.file,Ir.c.vscodeRemote,Ir.c.vscodeRemoteResource];e.isTrusted&&t.push(Ir.c.command);return{allowedSchemes:t,allowedTags:["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],allowedAttributes:{a:["href","name","target","data-href"],img:["src","title","alt","width","height"],div:["class","data-code"],span:["class","style"],th:["align"],td:["align"]},filter:function(t){return"span"!==t.tag||!e.isTrusted||(t.attrs.style&&1===Object.keys(t.attrs).length?!!t.attrs.style.match(/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/):!!t.attrs.class&&!!t.attrs.class.match(/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/))}}}(e);return null!==(n=null===Da||void 0===Da?void 0:Da.createHTML(t,r))&&void 0!==n?n:va(t,r)}var Ca,Sa=n(223),xa=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},ka=function(e,t){return function(n,r){t(n,r,e)}},Ta=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},wa=function(){function e(t,n,r){Object(Y.a)(this,e),this._options=t,this._modeService=n,this._openerService=r,this._onDidRenderAsync=new rn.a,this.onDidRenderAsync=this._onDidRenderAsync.event}return Object(J.a)(e,[{key:"dispose",value:function(){this._onDidRenderAsync.dispose()}},{key:"render",value:function(e,t,n){var r=new xe.b;return{element:e?function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=Object(ga.a)(r),o=function(t){var n;try{n=Object(ya.a)(decodeURIComponent(t))}catch(r){}return n?(n=Object(Mr.a)(n,(function(t){return e.uris&&e.uris[t]?gt.a.revive(e.uris[t]):void 0})),encodeURIComponent(JSON.stringify(n))):t},s=function(t,n){var r=e.uris&&e.uris[t];if(!r)return t;var i=gt.a.revive(r);return gt.a.parse(t).toString()===i.toString()?t:n?Ir.a.asBrowserUri(i).toString(!0):(i.query&&(i=i.with({query:o(i.query)})),i.toString())},u=new Promise((function(e){return n=e})),c=new ma.Renderer;c.image=function(e,t,n){var i=[],a=[];if(e){var o=de(e);e=o.href,i=o.dimensions,e=s(e,!0);try{var u=gt.a.parse(e);r.baseUrl&&u.scheme===Ir.c.file&&(e=Object(vn.j)(r.baseUrl,e).toString())}catch(c){}a.push('src="'.concat(e,'"'))}return n&&a.push('alt="'.concat(n,'"')),t&&a.push('title="'.concat(t,'"')),i.length&&(a=a.concat(i)),""},c.link=function(t,n,i){return t===i&&(i=le(i)),t=s(t,!1),r.baseUrl&&(/^\w[\w\d+.-]*:/.test(t)||(t=Object(vn.j)(r.baseUrl,t).toString())),n=le(n),!(t=le(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted||t.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?i:(t=t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),'').concat(i,""))},c.paragraph=function(t){return e.supportThemeIcons&&(t=Object(zn.a)(t).map((function(e){return"string"===typeof e?e:e.outerHTML})).join("")),"

".concat(t,"

")},r.codeBlockRenderer&&(c.code=function(e,t){var n=r.codeBlockRenderer(t,e),i=Hr.b.nextId(),o=Promise.all([n,u]).then((function(e){var t=a.querySelector('div[data-code="'.concat(i,'"]'));t&&Ht.reset(t,e[0])})).catch((function(e){}));return r.asyncRenderCallback&&o.then(r.asyncRenderCallback),'
').concat(Object(ft.t)(e),"
")}),r.actionHandler&&r.actionHandler.disposeables.add(rn.b.any(Object($r.a)(a,"click"),Object($r.a)(a,"auxclick"))((function(e){var t=new ba.a(e);if(t.leftButton||t.middleButton){var n=t.target;if("A"===n.tagName||(n=n.parentElement)&&"A"===n.tagName)try{var i=n.dataset.href;i&&r.actionHandler.callback(i,t)}catch(a){Object(ie.e)(a)}finally{t.preventDefault()}}}))),i.sanitizer=function(t){return(e.isTrusted?t.match(/^(]+>)|(<\/\s*span>)$/):void 0)?t:""},i.sanitize=!0,i.silent=!0,i.renderer=c;var l=null!==(t=e.value)&&void 0!==t?t:"";l.length>1e5&&(l="".concat(l.substr(0,1e5),"\u2026")),e.supportThemeIcons&&(l=Object(re.b)(l));var d=ma.parse(l,i);if(a.innerHTML=Ea(e,d),n(),r.asyncRenderCallback){var p,f=Object(Ee.a)(a.getElementsByTagName("img"));try{var h=function(){var e=p.value,t=Ht.addDisposableListener(e,"load",(function(){t.dispose(),r.asyncRenderCallback()}))};for(f.s();!(p=f.n()).done;)h()}catch(g){f.e(g)}finally{f.f()}}return a}(e,Object.assign(Object.assign({},this._getRenderOptions(r)),t),n):document.createElement("span"),dispose:function(){return r.dispose()}}}},{key:"_getRenderOptions",value:function(t){var n=this;return{baseUrl:this._options.baseUrl,codeBlockRenderer:function(t,r){return Ta(n,void 0,void 0,K.a.mark((function n(){var i,a,o,s,u,c,l,d;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t?u=this._modeService.getModeIdForLanguageName(t):this._options.editor&&(u=null===(i=this._options.editor.getModel())||void 0===i?void 0:i.getLanguageIdentifier().language),u||(u="plaintext"),this._modeService.triggerMode(u),n.next=5,_t.D.getPromise(u);case 5:if(n.t1=a=n.sent,n.t0=null!==n.t1,!n.t0){n.next=9;break}n.t0=void 0!==a;case 9:if(!n.t0){n.next=13;break}n.t2=a,n.next=14;break;case 13:n.t2=void 0;case 14:return c=n.t2,(l=document.createElement("span")).innerHTML=null!==(s=null===(o=e._ttpTokenizer)||void 0===o?void 0:o.createHTML(r,c))&&void 0!==s?s:Object(Sa.b)(r,c),d=this._options.codeBlockFontFamily,this._options.editor&&(d=this._options.editor.getOption(38).fontFamily),d&&(l.style.fontFamily=d),n.abrupt("return",l);case 21:case"end":return n.stop()}}),n,this)})))},asyncRenderCallback:function(){return n._onDidRenderAsync.fire()},actionHandler:{callback:function(e){return n._openerService.open(e,{fromUserGesture:!0,allowContributedOpeners:!0}).catch(ie.e)},disposeables:t}}}}]),e}();function Aa(e,t,n){var r=_t.p.ordered(e).map((function(r){return Promise.resolve(r.provideHover(e,t,n)).then((function(e){return e&&function(e){var t="undefined"!==typeof e.range,n="undefined"!==typeof e.contents&&e.contents&&e.contents.length>0;return t&&n}(e)?e:void 0}),(function(e){Object(ie.f)(e)}))}));return Promise.all(r).then(ne.d)}wa._ttpTokenizer=null===(Ca=window.trustedTypes)||void 0===Ca?void 0:Ca.createPolicy("tokenizeToString",{createHTML:function(e,t){return Object(Sa.b)(e,t)}}),wa=xa([ka(1,gr.a),ka(2,Nr.a)],wa),Object($.n)("_executeHoverProvider",(function(e,t){return Aa(e,t,dt.a.None)}));var Oa=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Na=function(e,t){return function(n,r){t(n,r,e)}},Ia=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Fa=Ht.$,La=function(){function e(t,n){Object(Y.a)(this,e),this.range=t,this.contents=n}return Object(J.a)(e,[{key:"equals",value:function(t){return t instanceof e&&(n=this.contents,r=t.contents,!n&&!r||!(!n||!r)&&(Array.isArray(n)&&Array.isArray(r)?Object(ne.g)(n,r,ue):!(!se(n)||!se(r))&&ue(n,r)));var n,r}}]),e}(),Pa=function(){function e(t,n,r,i){Object(Y.a)(this,e),this._editor=t,this._hover=n,this._modeService=r,this._openerService=i}return Object(J.a)(e,[{key:"createLoadingMessage",value:function(e){return new La(e,[(new ae).appendText(Q.a("modesContentHover.loading","Loading..."))])}},{key:"computeSync",value:function(e,t){if(!this._editor.hasModel())return[];var n,r=this._editor.getModel(),i=e.startLineNumber,a=r.getLineMaxColumn(i),o=[],s=Object(Ee.a)(t);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=u.range.startLineNumber===i?u.range.startColumn:1,l=u.range.endLineNumber===i?u.range.endColumn:a,d=u.options.hoverMessage;if(d&&!oe(d)){var p=new Te.a(e.startLineNumber,c,e.startLineNumber,l);o.push(new La(p,Object(ne.b)(d)))}}}catch(f){s.e(f)}finally{s.f()}return o}},{key:"computeAsync",value:function(e,t){return Ia(this,void 0,void 0,K.a.mark((function n(){var r,i,a,o,s,u,c;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this._editor.hasModel()&&e){n.next=2;break}return n.abrupt("return",Promise.resolve([]));case 2:if(r=this._editor.getModel(),_t.p.has(r)){n.next=5;break}return n.abrupt("return",Promise.resolve([]));case 5:return n.next=7,Aa(r,new ke.a(e.startLineNumber,e.startColumn),t);case 7:i=n.sent,a=[],o=Object(Ee.a)(i),n.prev=10,o.s();case 12:if((s=o.n()).done){n.next=20;break}if(!oe((u=s.value).contents)){n.next=16;break}return n.abrupt("continue",18);case 16:c=u.range?Te.a.lift(u.range):e,a.push(new La(c,u.contents));case 18:n.next=12;break;case 20:n.next=25;break;case 22:n.prev=22,n.t0=n.catch(10),o.e(n.t0);case 25:return n.prev=25,o.f(),n.finish(25);case 28:return n.abrupt("return",a);case 29:case"end":return n.stop()}}),n,this,[[10,22,25,28]])})))}},{key:"renderHoverParts",value:function(e,t){var n,r=this,i=new xe.b,a=Object(Ee.a)(e);try{for(a.s();!(n=a.n()).done;){var o,s=n.value,u=Object(Ee.a)(s.contents);try{var c=function(){var e=o.value;if(oe(e))return"continue";var n=Fa("div.hover-row.markdown-hover"),a=Ht.append(n,Fa("div.hover-contents")),s=i.add(new wa({editor:r._editor},r._modeService,r._openerService));i.add(s.onDidRenderAsync((function(){a.className="hover-contents code-hover-contents",r._hover.onContentsChanged()})));var u=i.add(s.render(e));a.appendChild(u.element),t.appendChild(n)};for(u.s();!(o=u.n()).done;)c()}catch(l){u.e(l)}finally{u.f()}}}catch(l){a.e(l)}finally{a.f()}return i}}]),e}();Pa=Oa([Na(2,gr.a),Na(3,Nr.a)],Pa);var Ra=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Ma=function(){function e(t,n,r){Object(Y.a)(this,e),this.range=t,this.color=n,this.provider=r}return Object(J.a)(e,[{key:"equals",value:function(e){return!1}}]),e}(),Ba=function e(t,n){Object(Y.a)(this,e),this.owner=t,this.data=n},ja=function(){function e(t,n,r){Object(Y.a)(this,e),this._markerHoverParticipant=n,this._markdownHoverParticipant=r,this._editor=t,this._result=[],this._range=null}return Object(J.a)(e,[{key:"setRange",value:function(e){this._range=e,this._result=[]}},{key:"clearResult",value:function(){this._result=[]}},{key:"computeAsync",value:function(e){return Ra(this,void 0,void 0,K.a.mark((function t(){var n,r=this;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._editor.hasModel()&&this._range){t.next=2;break}return t.abrupt("return",Promise.resolve([]));case 2:return t.next=4,this._markdownHoverParticipant.computeAsync(this._range,e);case 4:return n=t.sent,t.abrupt("return",n.map((function(e){return new Ba(r._markdownHoverParticipant,e)})));case 6:case"end":return t.stop()}}),t,this)})))}},{key:"computeSync",value:function(){var e=this;if(!this._editor.hasModel()||!this._range)return[];var t=this._editor.getModel(),n=this._range,r=n.startLineNumber;if(r>this._editor.getModel().getLineCount())return[];var i,a=t.getLineMaxColumn(r),o=this._editor.getLineDecorations(r).filter((function(e){var t=e.range.startLineNumber===r?e.range.startColumn:1,i=e.range.endLineNumber===r?e.range.endColumn:a;return!(t>n.startColumn||n.endColumn>i)})),s=[],u=hr.get(this._editor),c=Object(Ee.a)(o);try{for(c.s();!(i=c.n()).done;){var l=i.value,d=u.getColorData(l.range.getStartPosition());if(d){var p=d.colorInfo,f=p.color,h=p.range;s.push(new Ba(null,new Ma(Te.a.lift(h),f,d.provider)));break}}}catch(_){c.e(_)}finally{c.f()}var g=this._markdownHoverParticipant.computeSync(this._range,o);s=s.concat(g.map((function(t){return new Ba(e._markdownHoverParticipant,t)})));var m=this._markerHoverParticipant.computeSync(this._range,o);return s=s.concat(m.map((function(t){return new Ba(e._markerHoverParticipant,t)}))),Object(ne.d)(s)}},{key:"onResult",value:function(e,t){this._result=t?e.concat(this._result):this._result.concat(e)}},{key:"getResult",value:function(){return this._result.slice(0)}},{key:"getResultWithLoadingMessage",value:function(){if(this._range){var e=new Ba(this._markdownHoverParticipant,this._markdownHoverParticipant.createLoadingMessage(this._range));return this._result.slice(0).concat([e])}return this._result.slice(0)}}]),e}(),Ua=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o;return Object(Y.a)(this,n),(o=t.call(this))._hoverVisibleKey=r,o._themeService=a,o.allowEditorOverflow=!0,o._markerHoverParticipant=i.createInstance(fa,e,Object(lt.a)(o)),o._markdownHoverParticipant=i.createInstance(Pa,e,Object(lt.a)(o)),o._hover=o._register(new Ar),o._id=n.ID,o._editor=e,o._isVisible=!1,o._stoleFocus=!1,o._renderDisposable=null,o.onkeydown(o._hover.containerDomNode,(function(e){e.equals(9)&&o.hide()})),o._register(o._editor.onDidChangeConfiguration((function(e){e.hasChanged(38)&&o._updateFont()}))),o._editor.onDidLayoutChange((function(){return o.layout()})),o.layout(),o._editor.addContentWidget(Object(lt.a)(o)),o._showAtPosition=null,o._showAtRange=null,o._stoleFocus=!1,o._messages=[],o._lastRange=null,o._computer=new ja(o._editor,o._markerHoverParticipant,o._markdownHoverParticipant),o._highlightDecorations=[],o._isChangingDecorations=!1,o._shouldFocus=!1,o._colorPicker=null,o._hoverOperation=new kr(o._computer,(function(e){return o._withResult(e,!0)}),null,(function(e){return o._withResult(e,!1)}),o._editor.getOption(48).delay),o._register(Ht.addStandardDisposableListener(o.getDomNode(),Ht.EventType.FOCUS,(function(){o._colorPicker&&o.getDomNode().classList.add("colorpicker-hover")}))),o._register(Ht.addStandardDisposableListener(o.getDomNode(),Ht.EventType.BLUR,(function(){o.getDomNode().classList.remove("colorpicker-hover")}))),o._register(e.onDidChangeConfiguration((function(){o._hoverOperation.setHoverTime(o._editor.getOption(48).delay)}))),o._register(_t.D.onDidChange((function(){o._isVisible&&o._lastRange&&o._messages.length>0&&(o._messages=o._messages.map((function(e){var t,n;if(e.data instanceof Ma&&(null===(t=o._lastRange)||void 0===t?void 0:t.intersectRanges(e.data.range))&&(null===(n=o._colorPicker)||void 0===n?void 0:n.model.color)){var r=o._colorPicker.model.color,i={red:r.rgba.r/255,green:r.rgba.g/255,blue:r.rgba.b/255,alpha:r.rgba.a};return new Ba(e.owner,new Ma(e.data.range,i,e.data.provider))}return e})),o._hover.contentsDomNode.textContent="",o._renderMessages(o._lastRange,o._messages))}))),o}return Object(J.a)(n,[{key:"dispose",value:function(){this._hoverOperation.cancel(),this._editor.removeContentWidget(this),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}},{key:"getId",value:function(){return this._id}},{key:"getDomNode",value:function(){return this._hover.containerDomNode}},{key:"showAt",value:function(e,t,n){this._showAtPosition=e,this._showAtRange=t,this._hoverVisibleKey.set(!0),this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=n,n&&this._hover.containerDomNode.focus()}},{key:"getPosition",value:function(){return this._isVisible?{position:this._showAtPosition,range:this._showAtRange,preference:[1,2]}:null}},{key:"_updateFont",value:function(){var e=this;Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((function(t){return e._editor.applyFontInfo(t)}))}},{key:"_updateContents",value:function(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}},{key:"layout",value:function(){var e=Math.max(this._editor.getLayoutInfo().height/4,250),t=this._editor.getOption(38),n=t.fontSize,r=t.lineHeight;this._hover.contentsDomNode.style.fontSize="".concat(n,"px"),this._hover.contentsDomNode.style.lineHeight="".concat(r,"px"),this._hover.contentsDomNode.style.maxHeight="".concat(e,"px"),this._hover.contentsDomNode.style.maxWidth="".concat(Math.max(.66*this._editor.getLayoutInfo().width,500),"px")}},{key:"onModelDecorationsChanged",value:function(){this._isChangingDecorations||this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}},{key:"startShowingAt",value:function(e,t,n){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this._isVisible)if(this._showAtPosition&&this._showAtPosition.lineNumber===e.startLineNumber){for(var r=[],i=0,a=this._messages.length;i=e.endColumn&&r.push(o)}if(r.length>0){if(function(e,t){if(e.length!==t.length)return!1;for(var n=0;n0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()}},{key:"_renderMessages",value:function(e,t){var r=this;this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null;var i=1073741824,a=t[0].data.range?Te.a.lift(t[0].data.range):null,o=document.createDocumentFragment(),s=!1,u=new xe.b,c=[],l=[];t.forEach((function(e){var t=e.data;if(t.range)if(i=Math.min(i,t.range.startColumn),a=a?Te.a.plusRange(a,t.range):Te.a.lift(t.range),t instanceof Ma){s=!0;var n=t.color,d=n.red,p=n.green,f=n.blue,h=n.alpha,g=new cr.c(Math.round(255*d),Math.round(255*p),Math.round(255*f),h),m=new cr.a(g);if(!r._editor.hasModel())return;var _=r._editor.getModel(),v=new Te.a(t.range.startLineNumber,t.range.startColumn,t.range.endLineNumber,t.range.endColumn),y={range:t.range,color:t.color},b=new mr(m,[],0),D=new xr(o,b,r._editor.getOption(122),r._themeService);lr(_,y,t.provider,dt.a.None).then((function(e){if(b.colorPresentations=e||[],r._editor.hasModel()){var n=r._editor.getModel().getValueInRange(t.range);b.guessColorPresentation(m,n);var i=function(){var e,t;if(b.presentation.textEdit){e=[b.presentation.textEdit],t=new Te.a(b.presentation.textEdit.range.startLineNumber,b.presentation.textEdit.range.startColumn,b.presentation.textEdit.range.endLineNumber,b.presentation.textEdit.range.endColumn);var n=r._editor.getModel()._setTrackedRange(null,t,3);r._editor.pushUndoStop(),r._editor.executeEdits("colorpicker",e),t=r._editor.getModel()._getTrackedRange(n)||t}else e=[{identifier:null,range:v,text:b.presentation.label,forceMoveMarkers:!1}],t=v.setEndPosition(v.endLineNumber,v.startColumn+b.presentation.label.length),r._editor.pushUndoStop(),r._editor.executeEdits("colorpicker",e);b.presentation.additionalTextEdits&&(e=Object(ct.a)(b.presentation.additionalTextEdits),r._editor.executeEdits("colorpicker",e),r.hide()),r._editor.pushUndoStop(),v=t},a=function(e){return lr(_,{range:v,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},t.provider,dt.a.None).then((function(e){b.colorPresentations=e||[]}))},s=b.onColorFlushed((function(e){a(e).then(i)})),c=b.onDidChangeColor(a);r._colorPicker=D,r.showAt(v.getStartPosition(),v,r._shouldFocus),r._updateContents(o),r._colorPicker.layout(),r._renderDisposable=Object(xe.e)(s,c,D,u)}}))}else t instanceof da?c.push(t):t instanceof La&&l.push(t)})),l.length>0&&u.add(this._markdownHoverParticipant.renderHoverParts(l,o)),c.length&&u.add(this._markerHoverParticipant.renderHoverParts(c,o)),this._renderDisposable=u,!s&&o.hasChildNodes()&&(this.showAt(new ke.a(e.startLineNumber,i),a,this._shouldFocus),this._updateContents(o)),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,a?[{range:a,options:n._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}}]),n}(_r.a);Ua.ID="editor.contrib.modesContentHoverWidget",Ua._DECORATION_OPTIONS=Ae.a.register({className:"hoverHighlight"}),Object(Ie.f)((function(e,t){var n=e.getColor(Ne.wc);n&&t.addRule(".monaco-hover .hover-contents a.code-link span:hover { color: ".concat(n,"; }"))}));var Va=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this))._id=e,i._editor=r,i._isVisible=!1,i._domNode=document.createElement("div"),i._domNode.className="monaco-hover hidden",i._domNode.setAttribute("aria-hidden","true"),i._domNode.setAttribute("role","tooltip"),i._showAtLineNumber=-1,i._register(i._editor.onDidChangeConfiguration((function(e){e.hasChanged(38)&&i.updateFont()}))),i._editor.addOverlayWidget(Object(lt.a)(i)),i}return Object(J.a)(n,[{key:"getId",value:function(){return this._id}},{key:"getDomNode",value:function(){return this._domNode}},{key:"showAt",value:function(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);var t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(this._showAtLineNumber),r=this._editor.getScrollTop(),i=this._editor.getOption(53),a=n-r-(this._domNode.clientHeight-i)/2;this._domNode.style.left="".concat(t.glyphMarginLeft+t.glyphMarginWidth,"px"),this._domNode.style.top="".concat(Math.max(Math.round(a),0),"px")}},{key:"hide",value:function(){this.isVisible&&(this.isVisible=!1)}},{key:"getPosition",value:function(){return null}},{key:"dispose",value:function(){this._editor.removeOverlayWidget(this),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}},{key:"updateFont",value:function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),n=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));[].concat(Object(ct.a)(t),Object(ct.a)(n)).forEach((function(t){return e._editor.applyFontInfo(t)}))}},{key:"updateContents",value:function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()}},{key:"isVisible",get:function(){return this._isVisible},set:function(e){this._isVisible=e,this._domNode.classList.toggle("hidden",!this._isVisible)}}]),n}(_r.a),za=function(){function e(t){Object(Y.a)(this,e),this._editor=t,this._lineNumber=-1,this._result=[]}return Object(J.a)(e,[{key:"setLineNumber",value:function(e){this._lineNumber=e,this._result=[]}},{key:"clearResult",value:function(){this._result=[]}},{key:"computeSync",value:function(){var e=function(e){return{value:e}},t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;var r,i=Object(Ee.a)(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a.options.glyphMarginClassName){var o=a.options.glyphMarginHoverMessage;o&&!oe(o)&&n.push.apply(n,Object(ct.a)(Object(ne.b)(o).map(e)))}}}catch(s){i.e(s)}finally{i.f()}return n}},{key:"onResult",value:function(e,t){this._result=this._result.concat(e)}},{key:"getResult",value:function(){return this._result}},{key:"getResultWithLoadingMessage",value:function(){return this.getResult()}}]),e}(),Ha=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Nr.b;return Object(Y.a)(this,n),(i=t.call(this,n.ID,e))._renderDisposeables=i._register(new xe.b),i._messages=[],i._lastLineNumber=-1,i._markdownRenderer=i._register(new wa({editor:i._editor},r,a)),i._computer=new za(i._editor),i._hoverOperation=new kr(i._computer,(function(e){return i._withResult(e)}),void 0,(function(e){return i._withResult(e)}),300),i}return Object(J.a)(n,[{key:"dispose",value:function(){this._hoverOperation.cancel(),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}},{key:"onModelDecorationsChanged",value:function(){this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}},{key:"startShowingAt",value:function(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start(0))}},{key:"hide",value:function(){this._lastLineNumber=-1,this._hoverOperation.cancel(),Object(en.a)(Object(tn.a)(n.prototype),"hide",this).call(this)}},{key:"_withResult",value:function(e){this._messages=e,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()}},{key:"_renderMessages",value:function(e,t){this._renderDisposeables.clear();var n,r=document.createDocumentFragment(),i=Object(Ee.a)(t);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=this._markdownRenderer.render(a.value);this._renderDisposeables.add(o),r.appendChild(Object(Ht.$)("div.hover-row",void 0,o.element))}}catch(s){i.e(s)}finally{i.f()}this.updateContents(r),this.showAt(e)}}]),n}(Va);Ha.ID="editor.contrib.modesGlyphHoverWidget";n(403);var Wa=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))};function Ka(e,t,n,r){var i=n.ordered(e).map((function(n){return Promise.resolve(r(n,e,t)).then(void 0,(function(e){Object(ie.f)(e)}))}));return Promise.all(i).then((function(e){var t,n=[],r=Object(Ee.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;Array.isArray(i)?n.push.apply(n,Object(ct.a)(i)):i&&n.push(i)}}catch(a){r.e(a)}finally{r.f()}return n}))}function qa(e,t,n){return Ka(e,t,_t.f,(function(e,t,r){return e.provideDefinition(t,r,n)}))}function Ga(e,t,n){return Ka(e,t,_t.e,(function(e,t,r){return e.provideDeclaration(t,r,n)}))}function Ya(e,t,n){return Ka(e,t,_t.q,(function(e,t,r){return e.provideImplementation(t,r,n)}))}function Ja(e,t,n){return Ka(e,t,_t.E,(function(e,t,r){return e.provideTypeDefinition(t,r,n)}))}function $a(e,t,n,r){var i=this;return Ka(e,t,_t.w,(function(e,t,a){return Wa(i,void 0,void 0,K.a.mark((function i(){var o,s;return K.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,e.provideReferences(t,a,{includeDeclaration:!0},r);case 2:if(o=i.sent,n&&o&&2===o.length){i.next=5;break}return i.abrupt("return",o);case 5:return i.next=7,e.provideReferences(t,a,{includeDeclaration:!1},r);case 7:if(!(s=i.sent)||1!==s.length){i.next=10;break}return i.abrupt("return",s);case 10:return i.abrupt("return",o);case 11:case"end":return i.stop()}}),i)})))}))}Object($.n)("_executeDefinitionProvider",(function(e,t){return qa(e,t,dt.a.None)})),Object($.n)("_executeDeclarationProvider",(function(e,t){return Ga(e,t,dt.a.None)})),Object($.n)("_executeImplementationProvider",(function(e,t){return Ya(e,t,dt.a.None)})),Object($.n)("_executeTypeDefinitionProvider",(function(e,t){return Ja(e,t,dt.a.None)})),Object($.n)("_executeReferenceProvider",(function(e,t){return $a(e,t,!1,dt.a.None)}));var Qa=n(100),Xa=n(114),Za=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},eo=function(){function e(t,n,r,i,a){Object(Y.a)(this,e),this.isProviderFirst=t,this.parent=n,this.uri=r,this._range=i,this._rangeCallback=a,this.id=Hr.b.nextId()}return Object(J.a)(e,[{key:"range",get:function(){return this._range},set:function(e){this._range=e,this._rangeCallback(this)}},{key:"ariaMessage",get:function(){var e,t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?Object(Q.a)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",Object(vn.b)(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):Object(Q.a)("aria.oneReference","symbol in {0} on line {1} at column {2}",Object(vn.b)(this.uri),this.range.startLineNumber,this.range.startColumn)}}]),e}(),to=function(){function e(t){Object(Y.a)(this,e),this._modelReference=t}return Object(J.a)(e,[{key:"dispose",value:function(){this._modelReference.dispose()}},{key:"preview",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,n=this._modelReference.object.textEditorModel;if(n){var r=e.startLineNumber,i=e.startColumn,a=e.endLineNumber,o=e.endColumn,s=n.getWordUntilPosition({lineNumber:r,column:i-t}),u=new Te.a(r,s.startColumn,r,i),c=new Te.a(a,o,a,1073741824),l=n.getValueInRange(u).replace(/^\s+/,""),d=n.getValueInRange(e),p=n.getValueInRange(c).replace(/\s+$/,"");return{value:l+d+p,highlight:{start:l.length,end:l.length+d.length}}}}}]),e}(),no=function(){function e(t,n){Object(Y.a)(this,e),this.parent=t,this.uri=n,this.children=[],this._previews=new Yn.b}return Object(J.a)(e,[{key:"dispose",value:function(){Object(xe.f)(this._previews.values()),this._previews.clear()}},{key:"getPreview",value:function(e){return this._previews.get(e.uri)}},{key:"resolve",value:function(e){return Za(this,void 0,void 0,K.a.mark((function t(){var n,r,i,a;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0===this._previews.size){t.next=2;break}return t.abrupt("return",this);case 2:n=Object(Ee.a)(this.children),t.prev=3,n.s();case 5:if((r=n.n()).done){t.next=21;break}if(i=r.value,!this._previews.has(i.uri)){t.next=9;break}return t.abrupt("continue",19);case 9:return t.prev=9,t.next=12,e.createModelReference(i.uri);case 12:a=t.sent,this._previews.set(i.uri,new to(a)),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(9),Object(ie.e)(t.t0);case 19:t.next=5;break;case 21:t.next=26;break;case 23:t.prev=23,t.t1=t.catch(3),n.e(t.t1);case 26:return t.prev=26,n.f(),t.finish(26);case 29:return t.abrupt("return",this);case 30:case"end":return t.stop()}}),t,this,[[3,23,26,29],[9,16]])})))}},{key:"ariaMessage",get:function(){var e=this.children.length;return 1===e?Object(Q.a)("aria.fileReferences.1","1 symbol in {0}, full path {1}",Object(vn.b)(this.uri),this.uri.fsPath):Object(Q.a)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Object(vn.b)(this.uri),this.uri.fsPath)}}]),e}(),ro=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this._disposables=new xe.b,this.groups=[],this.references=[],this._onDidChangeReferenceRange=new rn.a,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=t,this._title=n;var i,a=Object(Ce.a)(t,1)[0];t.sort(e._compareReferences);var o,s=Object(Ee.a)(t);try{for(s.s();!(o=s.n()).done;){var u=o.value;if(i&&vn.e.isEqual(i.uri,u.uri,!0)||(i=new no(this,u.uri),this.groups.push(i)),0===i.children.length||0!==e._compareReferences(u,i.children[i.children.length-1])){var c=new eo(a===u,i,u.uri,u.targetSelectionRange||u.range,(function(e){return r._onDidChangeReferenceRange.fire(e)}));this.references.push(c),i.children.push(c)}}}catch(l){s.e(l)}finally{s.f()}}return Object(J.a)(e,[{key:"dispose",value:function(){Object(xe.f)(this.groups),this._disposables.dispose(),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}},{key:"clone",value:function(){return new e(this._links,this._title)}},{key:"nextOrPreviousReference",value:function(e,t){var n=e.parent,r=n.children.indexOf(e),i=n.children.length,a=n.parent.groups.length;return 1===a||t&&r+10?(r=t?(r+1)%i:(r+i-1)%i,n.children[r]):(r=n.parent.groups.indexOf(n),t?(r=(r+1)%a,n.parent.groups[r].children[0]):(r=(r+a-1)%a,n.parent.groups[r].children[n.parent.groups[r].children.length-1]))}},{key:"nearestReference",value:function(e,t){var n=this.references.map((function(n,r){return{idx:r,prefixLen:ft.d(n.uri.toString(),e.toString()),offsetDist:100*Math.abs(n.range.startLineNumber-t.lineNumber)+Math.abs(n.range.startColumn-t.column)}})).sort((function(e,t){return e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0}))[0];if(n)return this.references[n.idx]}},{key:"referenceAt",value:function(e,t){var n,r=Object(Ee.a)(this.references);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.uri.toString()===e.toString()&&Te.a.containsPosition(i.range,t))return i}}catch(a){r.e(a)}finally{r.f()}}},{key:"firstReference",value:function(){var e,t=Object(Ee.a)(this.references);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.isProviderFirst)return n}}catch(r){t.e(r)}finally{t.f()}return this.references[0]}},{key:"title",get:function(){return this._title}},{key:"isEmpty",get:function(){return 0===this.groups.length}},{key:"ariaMessage",get:function(){return this.isEmpty?Object(Q.a)("aria.result.0","No results found"):1===this.references.length?Object(Q.a)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?Object(Q.a)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):Object(Q.a)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}}],[{key:"_compareReferences",value:function(e,t){return vn.e.compare(e.uri,t.uri)||Te.a.compareRangesUsingStarts(e.range,t.range)}}]),e}(),io=(n(404),n(204)),ao=n(226),oo=n(92),so=n(73),uo=n(172),co=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},lo=function(e,t){return function(n,r){t(n,r,e)}},po=function(){function e(t){Object(Y.a)(this,e),this._resolverService=t}return Object(J.a)(e,[{key:"hasChildren",value:function(e){return e instanceof ro||e instanceof no}},{key:"getChildren",value:function(e){if(e instanceof ro)return e.groups;if(e instanceof no)return e.resolve(this._resolverService).then((function(e){return e.children}));throw new Error("bad tree")}}]),e}();po=co([lo(0,Qa.a)],po);var fo=function(){function e(){Object(Y.a)(this,e)}return Object(J.a)(e,[{key:"getHeight",value:function(){return 23}},{key:"getTemplateId",value:function(e){return e instanceof no?_o.id:yo.id}}]),e}(),ho=function(){function e(t){Object(Y.a)(this,e),this._keybindingService=t}return Object(J.a)(e,[{key:"getKeyboardNavigationLabel",value:function(e){var t;if(e instanceof eo){var n=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(n)return n.value}return Object(vn.b)(e.uri)}}]),e}();ho=co([lo(0,qt.a)],ho);var go=function(){function e(){Object(Y.a)(this,e)}return Object(J.a)(e,[{key:"getId",value:function(e){return e instanceof eo?e.id:e.uri}}]),e}(),mo=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;Object(Y.a)(this,n),(a=t.call(this))._uriLabel=r;var o=document.createElement("div");return o.classList.add("reference-file"),a.file=a._register(new io.a(o,{supportHighlights:!0})),a.badge=new ao.a(Ht.append(o,Ht.$(".count"))),a._register(Object(oo.a)(a.badge,i)),e.appendChild(o),a}return Object(J.a)(n,[{key:"set",value:function(e,t){var n=Object(vn.d)(e.uri);this.file.setLabel(Lr(e.uri),this._uriLabel.getUriLabel(n,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});var r=e.children.length;this.badge.setCount(r),r>1?this.badge.setTitleFormat(Object(Q.a)("referencesCount","{0} references",r)):this.badge.setTitleFormat(Object(Q.a)("referenceCount","{0} reference",r))}}]),n}(xe.a);mo=co([lo(1,Ni.a),lo(2,Ie.b)],mo);var _o=function(){function e(t){Object(Y.a)(this,e),this._instantiationService=t,this.templateId=e.id}return Object(J.a)(e,[{key:"renderTemplate",value:function(e){return this._instantiationService.createInstance(mo,e)}},{key:"renderElement",value:function(e,t,n){n.set(e.element,Object(so.c)(e.filterData))}},{key:"disposeTemplate",value:function(e){e.dispose()}}]),e}();_o.id="FileReferencesRenderer",_o=co([lo(0,zt.a)],_o);var vo=function(){function e(t){Object(Y.a)(this,e),this.label=new uo.a(t,!1)}return Object(J.a)(e,[{key:"set",value:function(e,t){var n,r=null===(n=e.parent.getPreview(e))||void 0===n?void 0:n.preview(e.range);if(r&&r.value){var i=r.value,a=r.highlight;t&&!so.a.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(i,Object(so.c)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(i,[a]))}else this.label.set("".concat(Object(vn.b)(e.uri),":").concat(e.range.startLineNumber+1,":").concat(e.range.startColumn+1))}}]),e}(),yo=function(){function e(){Object(Y.a)(this,e),this.templateId=e.id}return Object(J.a)(e,[{key:"renderTemplate",value:function(e){return new vo(e)}},{key:"renderElement",value:function(e,t,n){n.set(e.element,e.filterData)}},{key:"disposeTemplate",value:function(){}}]),e}();yo.id="OneReferenceRenderer";var bo,Do,Eo=function(){function e(){Object(Y.a)(this,e)}return Object(J.a)(e,[{key:"getWidgetAriaLabel",value:function(){return Object(Q.a)("treeAriaLabel","References")}},{key:"getAriaLabel",value:function(e){return e.ariaMessage}}]),e}(),Co=n(143),So=(n(405),n(105)),xo=n(179),ko={separatorBorder:cr.a.transparent},To=function(){function e(t,n,r,i){Object(Y.a)(this,e),this.container=t,this.view=n,this.disposable=i,this._cachedVisibleSize=void 0,"number"===typeof r?(this._size=r,this._cachedVisibleSize=void 0,t.classList.add("visible")):(this._size=0,this._cachedVisibleSize=r.cachedVisibleSize)}return Object(J.a)(e,[{key:"setVisible",value:function(e,t){e!==this.visible&&(e?(this.size=Object(So.b)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"===typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),this.view.setVisible&&this.view.setVisible(e))}},{key:"layout",value:function(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}},{key:"dispose",value:function(){return this.disposable.dispose(),this.view}},{key:"size",set:function(e){this._size=e},get:function(){return this._size}},{key:"visible",get:function(){return"undefined"===typeof this._cachedVisibleSize}},{key:"minimumSize",get:function(){return this.visible?this.view.minimumSize:0}},{key:"viewMinimumSize",get:function(){return this.view.minimumSize}},{key:"maximumSize",get:function(){return this.visible?this.view.maximumSize:0}},{key:"viewMaximumSize",get:function(){return this.view.maximumSize}},{key:"priority",get:function(){return this.view.priority}},{key:"snap",get:function(){return!!this.view.snap}},{key:"enabled",set:function(e){this.container.style.pointerEvents=e?"":"none"}}]),e}(),wo=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"layoutContainer",value:function(e){this.container.style.top="".concat(e,"px"),this.container.style.height="".concat(this.size,"px")}}]),n}(To),Ao=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"layoutContainer",value:function(e){this.container.style.left="".concat(e,"px"),this.container.style.width="".concat(this.size,"px")}}]),n}(To);!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(bo||(bo={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(Do||(Do={}));var Oo=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(Y.a)(this,n),(r=t.call(this)).size=0,r.contentSize=0,r.proportions=void 0,r.viewItems=[],r.sashItems=[],r.state=bo.Idle,r._onDidSashChange=r._register(new rn.a),r.onDidSashChange=r._onDidSashChange.event,r._onDidSashReset=r._register(new rn.a),r._startSnappingEnabled=!0,r._endSnappingEnabled=!0,r.orientation=Bn.k(i.orientation)?0:i.orientation,r.inverseAltBehavior=!!i.inverseAltBehavior,r.proportionalLayout=!!Bn.k(i.proportionalLayout)||!!i.proportionalLayout,r.el=document.createElement("div"),r.el.classList.add("monaco-split-view2"),r.el.classList.add(0===r.orientation?"vertical":"horizontal"),e.appendChild(r.el),r.sashContainer=Object(Ht.append)(r.el,Object(Ht.$)(".sash-container")),r.viewContainer=Object(Ht.$)(".split-view-container"),r.scrollable=new xo.a(125,Ht.scheduleAtNextAnimationFrame),r.scrollableElement=r._register(new Tr.c(r.viewContainer,{vertical:0===r.orientation?1:2,horizontal:1===r.orientation?1:2},r.scrollable)),r._register(r.scrollableElement.onScroll((function(e){r.viewContainer.scrollTop=e.scrollTop,r.viewContainer.scrollLeft=e.scrollLeft}))),Object(Ht.append)(r.el,r.scrollableElement.getDomNode()),r.style(i.styles||ko),i.descriptor&&(r.size=i.descriptor.size,i.descriptor.views.forEach((function(e,t){var n=Bn.k(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},i=e.view;r.doAddView(i,n,t,!0)})),r.contentSize=r.viewItems.reduce((function(e,t){return e+t.size}),0),r.saveProportions()),r}return Object(J.a)(n,[{key:"style",value:function(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}},{key:"addView",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.viewItems.length,r=arguments.length>3?arguments[3]:void 0;this.doAddView(e,t,n,r)}},{key:"layout",value:function(e,t){var n=this,r=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(var i=0;i0&&(this.proportions=this.viewItems.map((function(t){return t.size/e.contentSize})))}},{key:"onSashStart",value:function(e){var t,n=this,r=e.sash,i=e.start,a=e.alt,o=Object(Ee.a)(this.viewItems);try{for(o.s();!(t=o.n()).done;){t.value.enabled=!1}}catch(l){o.e(l)}finally{o.f()}var s=this.sashItems.findIndex((function(e){return e.sash===r})),u=Object(xe.e)(Object($r.a)(document.body,"keydown")((function(e){return c(n.sashDragState.current,e.altKey)})),Object($r.a)(document.body,"keyup")((function(){return c(n.sashDragState.current,!1)}))),c=function(e,t){var r,i,a=n.viewItems.map((function(e){return e.size})),o=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;if(n.inverseAltBehavior&&(t=!t),t)if(s===n.sashItems.length-1){var l=n.viewItems[s];o=(l.minimumSize-l.size)/2,c=(l.maximumSize-l.size)/2}else{var d=n.viewItems[s+1];o=(d.size-d.maximumSize)/2,c=(d.size-d.minimumSize)/2}if(!t){var p=Object(ne.r)(s,-1),f=Object(ne.r)(s+1,n.viewItems.length),h=p.reduce((function(e,t){return e+(n.viewItems[t].minimumSize-a[t])}),0),g=p.reduce((function(e,t){return e+(n.viewItems[t].viewMaximumSize-a[t])}),0),m=0===f.length?Number.POSITIVE_INFINITY:f.reduce((function(e,t){return e+(a[t]-n.viewItems[t].minimumSize)}),0),_=0===f.length?Number.NEGATIVE_INFINITY:f.reduce((function(e,t){return e+(a[t]-n.viewItems[t].viewMaximumSize)}),0),v=Math.max(h,_),y=Math.min(m,g),b=n.findFirstSnapIndex(p),D=n.findFirstSnapIndex(f);if("number"===typeof b){var E=n.viewItems[b],C=Math.floor(E.viewMinimumSize/2);r={index:b,limitDelta:E.visible?v-C:v+C,size:E.size}}if("number"===typeof D){var S=n.viewItems[D],x=Math.floor(S.viewMinimumSize/2);i={index:D,limitDelta:S.visible?y+x:y-x,size:S.size}}}n.sashDragState={start:e,current:e,index:s,sizes:a,minDelta:o,maxDelta:c,alt:t,snapBefore:r,snapAfter:i,disposable:u}};c(i,a)}},{key:"onSashChange",value:function(e){var t=e.current,n=this.sashDragState,r=n.index,i=n.start,a=n.sizes,o=n.alt,s=n.minDelta,u=n.maxDelta,c=n.snapBefore,l=n.snapAfter;this.sashDragState.current=t;var d=t-i,p=this.resize(r,d,a,void 0,void 0,s,u,c,l);if(o){var f=r===this.sashItems.length-1,h=this.viewItems.map((function(e){return e.size})),g=f?r:r+1,m=this.viewItems[g],_=m.size-m.maximumSize,v=m.size-m.minimumSize,y=f?r-1:r+1;this.resize(y,-p,h,void 0,void 0,_,v)}this.distributeEmptySpace(),this.layoutViews()}},{key:"onSashEnd",value:function(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();var t,n=Object(Ee.a)(this.viewItems);try{for(n.s();!(t=n.n()).done;){t.value.enabled=!0}}catch(r){n.e(r)}finally{n.f()}}},{key:"onViewChange",value:function(e,t){var n=this.viewItems.indexOf(e);n<0||n>=this.viewItems.length||(t="number"===typeof t?t:e.size,t=Object(So.b)(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)))}},{key:"resizeView",value:function(e,t){var n=this;if(this.state!==bo.Idle)throw new Error("Cant modify splitview");if(this.state=bo.Busy,!(e<0||e>=this.viewItems.length)){var r=Object(ne.r)(this.viewItems.length).filter((function(t){return t!==e})),i=[].concat(Object(ct.a)(r.filter((function(e){return 1===n.viewItems[e].priority}))),[e]),a=r.filter((function(e){return 2===n.viewItems[e].priority})),o=this.viewItems[e];t=Math.round(t),t=Object(So.b)(t,o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(i,a),this.state=bo.Idle}}},{key:"distributeViewSizes",value:function(){var e,t=this,n=[],r=0,i=Object(Ee.a)(this.viewItems);try{for(i.s();!(e=i.n()).done;){var a=e.value;a.maximumSize-a.minimumSize>0&&(n.push(a),r+=a.size)}}catch(f){i.e(f)}finally{i.f()}for(var o=Math.floor(r/n.length),s=0,u=n;s=this.viewItems.length?-1:this.viewItems[e].size}},{key:"doAddView",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.viewItems.length,i=arguments.length>3?arguments[3]:void 0;if(this.state!==bo.Idle)throw new Error("Cant modify splitview");this.state=bo.Busy;var a=Object(Ht.$)(".split-view-view");r===this.viewItems.length?this.viewContainer.appendChild(a):this.viewContainer.insertBefore(a,this.viewContainer.children.item(r));var o,s=e.onDidChange((function(e){return n.onViewChange(d,e)})),u=Object(xe.h)((function(){return n.viewContainer.removeChild(a)})),c=Object(xe.e)(s,u);o="number"===typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;var l,d=0===this.orientation?new wo(a,e,o,c):new Ao(a,e,o,c);if(this.viewItems.splice(r,0,d),this.viewItems.length>1){var p=0===this.orientation?new zr.b(this.sashContainer,{getHorizontalSashTop:function(e){return n.getSashPosition(e)}},{orientation:1,orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash}):new zr.b(this.sashContainer,{getVerticalSashLeft:function(e){return n.getSashPosition(e)}},{orientation:0,orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash}),f=0===this.orientation?function(e){return{sash:p,start:e.startY,current:e.currentY,alt:e.altKey}}:function(e){return{sash:p,start:e.startX,current:e.currentX,alt:e.altKey}},h=rn.b.map(p.onDidStart,f),g=h(this.onSashStart,this),m=rn.b.map(p.onDidChange,f),_=m(this.onSashChange,this),v=rn.b.map(p.onDidEnd,(function(){return n.sashItems.findIndex((function(e){return e.sash===p}))})),y=v(this.onSashEnd,this),b=p.onDidReset((function(){var e=n.sashItems.findIndex((function(e){return e.sash===p})),t=Object(ne.r)(e,-1),r=Object(ne.r)(e+1,n.viewItems.length),i=n.findFirstSnapIndex(t),a=n.findFirstSnapIndex(r);("number"!==typeof i||n.viewItems[i].visible)&&("number"!==typeof a||n.viewItems[a].visible)&&n._onDidSashReset.fire(e)})),D=Object(xe.e)(g,_,y,b,p),E={sash:p,disposable:D};this.sashItems.splice(r-1,0,E)}a.appendChild(e.element),"number"!==typeof t&&"split"===t.type&&(l=[t.index]),i||this.relayout([r],l),this.state=bo.Idle,i||"number"===typeof t||"distribute"!==t.type||this.distributeViewSizes()}},{key:"relayout",value: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()}},{key:"resize",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.viewItems.map((function(e){return e.size})),i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Number.NEGATIVE_INFINITY,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Number.POSITIVE_INFINITY,u=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0;if(e<0||e>=this.viewItems.length)return 0;var l=Object(ne.r)(e,-1),d=Object(ne.r)(e+1,this.viewItems.length);if(a){var p,f=Object(Ee.a)(a);try{for(f.s();!(p=f.n()).done;){var h=p.value;Object(ne.p)(l,h),Object(ne.p)(d,h)}}catch(H){f.e(H)}finally{f.f()}}if(i){var g,m=Object(Ee.a)(i);try{for(m.s();!(g=m.n()).done;){var _=g.value;Object(ne.o)(l,_),Object(ne.o)(d,_)}}catch(H){m.e(H)}finally{m.f()}}var v=l.map((function(e){return n.viewItems[e]})),y=l.map((function(e){return r[e]})),b=d.map((function(e){return n.viewItems[e]})),D=d.map((function(e){return r[e]})),E=l.reduce((function(e,t){return e+(n.viewItems[t].minimumSize-r[t])}),0),C=l.reduce((function(e,t){return e+(n.viewItems[t].maximumSize-r[t])}),0),S=0===d.length?Number.POSITIVE_INFINITY:d.reduce((function(e,t){return e+(r[t]-n.viewItems[t].minimumSize)}),0),x=0===d.length?Number.NEGATIVE_INFINITY:d.reduce((function(e,t){return e+(r[t]-n.viewItems[t].maximumSize)}),0),k=Math.max(E,x,o),T=Math.min(S,C,s),w=!1;if(u){var A=this.viewItems[u.index],O=t>=u.limitDelta;w=O!==A.visible,A.setVisible(O,u.size)}if(!w&&c){var N=this.viewItems[c.index],I=t0||e}));e=!1;var n=this.viewItems.map((function(t){return e=t.maximumSize-t.size>0||e})),r=Object(ct.a)(this.viewItems).reverse();e=!1;var i=r.map((function(t){return e=t.size-t.minimumSize>0||e})).reverse();e=!1;for(var a=r.map((function(t){return e=t.maximumSize-t.size>0||e})).reverse(),o=0,s=0;s0||this.startSnappingEnabled)?u.state=1:m&&t[s]&&(o0)return;if(!u.visible&&u.snap)return s}}catch(c){o.e(c)}finally{o.f()}}},{key:"dispose",value:function(){Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this),this.viewItems.forEach((function(e){return e.dispose()})),this.viewItems=[],this.sashItems.forEach((function(e){return e.disposable.dispose()})),this.sashItems=[]}},{key:"orthogonalStartSash",get:function(){return this._orthogonalStartSash},set:function(e){var t,n=Object(Ee.a)(this.sashItems);try{for(n.s();!(t=n.n()).done;){t.value.sash.orthogonalStartSash=e}}catch(r){n.e(r)}finally{n.f()}this._orthogonalStartSash=e}},{key:"orthogonalEndSash",get:function(){return this._orthogonalEndSash},set:function(e){var t,n=Object(Ee.a)(this.sashItems);try{for(n.s();!(t=n.n()).done;){t.value.sash.orthogonalEndSash=e}}catch(r){n.e(r)}finally{n.f()}this._orthogonalEndSash=e}},{key:"startSnappingEnabled",get:function(){return this._startSnappingEnabled},set:function(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}},{key:"endSnappingEnabled",get:function(){return this._endSnappingEnabled},set:function(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}}]),n}(xe.a),No=n(122),Io=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Fo=function(e,t){return function(n,r){t(n,r,e)}},Lo=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Po=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this._editor=t,this._model=n,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new xe.b,this._callOnModelChange=new xe.b,this._callOnDispose.add(this._editor.onDidChangeModel((function(){return r._onModelChanged()}))),this._onModelChanged()}return Object(J.a)(e,[{key:"dispose",value:function(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}},{key:"_onModelChanged",value:function(){this._callOnModelChange.clear();var e=this._editor.getModel();if(e){var t,n=Object(Ee.a)(this._model.references);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.uri.toString()===e.uri.toString())return void this._addDecorations(r.parent)}}catch(i){n.e(i)}finally{n.f()}}}},{key:"_addDecorations",value:function(t){var n=this;if(this._editor.hasModel()){this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((function(){return n._onDecorationChanged()})));for(var r=[],i=[],a=0,o=t.children.length;a0?t.children[0]:void 0}},{key:"revealReference",value:function(e){return Lo(this,void 0,void 0,K.a.mark((function t(){return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._revealReference(e,!1);case 2:this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"});case 3:case"end":return t.stop()}}),t,this)})))}},{key:"_revealReference",value:function(e,t){return Lo(this,void 0,void 0,K.a.mark((function n(){var r,i,a,o,s;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this._revealedReference!==e){n.next=2;break}return n.abrupt("return");case 2:if(this._revealedReference=e,e.uri.scheme!==Ir.c.inMemory?this.setTitle(Object(vn.c)(e.uri),this._uriLabel.getUriLabel(Object(vn.d)(e.uri))):this.setTitle(Q.a("peekView.alternateTitle","References")),r=this._textModelResolverService.createModelReference(e.uri),this._tree.getInput()!==e.parent){n.next=9;break}this._tree.reveal(e),n.next=13;break;case 9:return t&&this._tree.reveal(e.parent),n.next=12,this._tree.expand(e.parent);case 12:this._tree.reveal(e);case 13:return n.next=15,r;case 15:if(i=n.sent,this._model){n.next=19;break}return i.dispose(),n.abrupt("return");case 19:Object(xe.f)(this._previewModelReference),(a=i.object)?(o=this._preview.getModel()===a.textEditorModel?0:1,s=Te.a.lift(e.range).collapseToStart(),this._previewModelReference=i,this._preview.setModel(a.textEditorModel),this._preview.setSelection(s),this._preview.revealRangeInCenter(s,o)):(this._preview.setModel(this._previewNotAvailableMessage),i.dispose());case 22:case"end":return n.stop()}}),n,this)})))}}]),n}(hi);Bo=Io([Fo(3,Ie.b),Fo(4,Qa.a),Fo(5,zt.a),Fo(6,di),Fo(7,Ni.a),Fo(8,No.a),Fo(9,qt.a)],Bo),Object(Ie.f)((function(e,t){var n=e.getColor(Ti);n&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ".concat(n,"; }"));var r=e.getColor(wi);r&&t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ".concat(r,"; }"));var i=e.getColor(Ai);i&&t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ".concat(i,"; box-sizing: border-box; }"));var a=e.getColor(Ne.b);a&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ".concat(a,"; box-sizing: border-box; }"));var o=e.getColor(bi);o&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree { background-color: ".concat(o,"; }"));var s=e.getColor(Di);s&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree { color: ".concat(s,"; }"));var u=e.getColor(Ei);u&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ".concat(u,"; }"));var c=e.getColor(Ci);c&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ".concat(c,"; }"));var l=e.getColor(Si);l&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ".concat(l," !important; }"));var d=e.getColor(xi);d&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {"+"\tbackground-color: ".concat(d,";")+"}");var p=e.getColor(ki);p&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {"+"\tbackground-color: ".concat(p,";")+"}")}));var jo=n(91),Uo=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Vo=function(e,t){return function(n,r){t(n,r,e)}},zo=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Ho=new te.c("referenceSearchVisible",!1),Wo=function(){function e(t,n,r,i,a,o,s,u){Object(Y.a)(this,e),this._defaultTreeKeyboardSupport=t,this._editor=n,this._editorService=i,this._notificationService=a,this._instantiationService=o,this._storageService=s,this._configurationService=u,this._disposables=new xe.b,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Ho.bindTo(r)}return Object(J.a)(e,[{key:"dispose",value:function(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}},{key:"toggleWidget",value:function(e,t,n){var r,i=this;if(this._widget&&(r=this._widget.position),this.closeWidget(),!r||!e.containsPosition(r)){this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((function(){i.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((function(){i._ignoreModelChangeEvent||i.closeWidget()})));var a="peekViewLayout",o=Ro.fromJSON(this._storageService.get(a,0,"{}"));this._widget=this._instantiationService.createInstance(Bo,this._editor,this._defaultTreeKeyboardSupport,o),this._widget.setTitle(Q.a("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((function(){t.cancel(),i._widget&&(i._storageService.store(a,JSON.stringify(i._widget.layoutData),0,1),i._widget=void 0),i.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((function(e){var t=e.element,r=e.kind;if(t)switch(r){case"open":"editor"===e.source&&i._configurationService.getValue("editor.stablePeek")||i.openReference(t,!1,!1);break;case"side":i.openReference(t,!0,!1);break;case"goto":n?i._gotoReference(t):i.openReference(t,!1,!0)}})));var s=++this._requestIdPool;t.then((function(t){if(s===i._requestIdPool&&i._widget)return i._model&&i._model.dispose(),i._model=t,i._widget.setModel(i._model).then((function(){if(i._widget&&i._model&&i._editor.hasModel()){i._model.isEmpty?i._widget.setMetaTitle(""):i._widget.setMetaTitle(Q.a("metaTitle.N","{0} ({1})",i._model.title,i._model.references.length));var t=i._editor.getModel().uri,n=new ke.a(e.startLineNumber,e.startColumn),r=i._model.nearestReference(t,n);if(r)return i._widget.setSelection(r).then((function(){i._widget&&"editor"===i._editor.getOption(71)&&i._widget.focusOnPreviewEditor()}))}}))}),(function(e){i._notificationService.error(e)}))}}},{key:"changeFocusBetweenPreviewAndReferences",value:function(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}},{key:"goToNextOrPreviousReference",value:function(e){return zo(this,void 0,void 0,K.a.mark((function t(){var n,r,i,a,o;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._editor.hasModel()&&this._model&&this._widget){t.next=2;break}return t.abrupt("return");case 2:if(n=this._widget.position){t.next=5;break}return t.abrupt("return");case 5:if(r=this._model.nearestReference(this._editor.getModel().uri,n)){t.next=8;break}return t.abrupt("return");case 8:return i=this._model.nextOrPreviousReference(r,e),a=this._editor.hasTextFocus(),o=this._widget.isPreviewEditorFocused(),t.next=13,this._widget.setSelection(i);case 13:return t.next=15,this._gotoReference(i);case 15:a?this._editor.focus():this._widget&&o&&this._widget.focusOnPreviewEditor();case 16:case"end":return t.stop()}}),t,this)})))}},{key:"revealReference",value:function(e){return zo(this,void 0,void 0,K.a.mark((function t(){return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._editor.hasModel()&&this._model&&this._widget){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,this._widget.revealReference(e);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"closeWidget",value:function(){var e,t,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,n&&this._editor.focus(),this._requestIdPool+=1}},{key:"_gotoReference",value:function(t){var n=this;this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;var r=Te.a.lift(t.range).collapseToStart();return this._editorService.openCodeEditor({resource:t.uri,options:{selection:r}},this._editor).then((function(t){var i;if(n._ignoreModelChangeEvent=!1,t&&n._widget)if(n._editor===t)n._widget.show(r),n._widget.focusOnReferenceTree();else{var a=e.get(t),o=n._model.clone();n.closeWidget(),t.focus(),a.toggleWidget(r,Object(Se.f)((function(e){return Promise.resolve(o)})),null!==(i=n._peekMode)&&void 0!==i&&i)}else n.closeWidget()}),(function(e){n._ignoreModelChangeEvent=!1,Object(ie.e)(e)}))}},{key:"openReference",value:function(e,t,n){t||this.closeWidget();var r=e.uri,i=e.range;this._editorService.openCodeEditor({resource:r,options:{selection:i,pinned:n}},this._editor,t)}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();function Ko(e,t){var n=function(e){var t=e.get(Je.a).getFocusedCodeEditor();return t instanceof Vr?t.getParentEditor():t}(e);if(n){var r=Wo.get(n);r&&t(r)}}Wo.ID="editor.contrib.referencesController",Wo=Uo([Vo(2,te.b),Vo(3,Je.a),Vo(4,mn.a),Vo(5,zt.a),Vo(6,Jn.a),Vo(7,dr.a)],Wo),jo.a.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Object(ee.a)(2089,60),when:te.a.or(Ho,si.inPeekEditor),handler:function(e){Ko(e,(function(e){e.changeFocusBetweenPreviewAndReferences()}))}}),jo.a.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:te.a.or(Ho,si.inPeekEditor),handler:function(e){Ko(e,(function(e){e.goToNextOrPreviousReference(!0)}))}}),jo.a.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:te.a.or(Ho,si.inPeekEditor),handler:function(e){Ko(e,(function(e){e.goToNextOrPreviousReference(!1)}))}}),St.a.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),St.a.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),St.a.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),St.a.registerCommand("closeReferenceSearch",(function(e){return Ko(e,(function(e){return e.closeWidget()}))})),jo.a.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:te.a.and(si.inPeekEditor,te.a.not("config.editor.stablePeek"))}),jo.a.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:te.a.and(Ho,te.a.not("config.editor.stablePeek"))}),jo.a.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:te.a.and(Ho,Co.e),handler:function(e){var t,n=null===(t=e.get(Co.a).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(n)&&n[0]instanceof eo&&Ko(e,(function(e){return e.revealReference(n[0])}))}}),jo.a.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:te.a.and(Ho,Co.e),handler:function(e){var t,n=null===(t=e.get(Co.a).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(n)&&n[0]instanceof eo&&Ko(e,(function(e){return e.openReference(n[0],!0,!0)}))}}),St.a.registerCommand("openReference",(function(e){var t,n=null===(t=e.get(Co.a).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(n)&&n[0]instanceof eo&&Ko(e,(function(e){return e.openReference(n[0],!1,!0)}))}));var qo=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Go=function(e,t){return function(n,r){t(n,r,e)}},Yo=new te.c("hasSymbols",!1),Jo=Object(zt.c)("ISymbolNavigationService"),$o=function(){function e(t,n,r,i){Object(Y.a)(this,e),this._editorService=n,this._notificationService=r,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=Yo.bindTo(t)}return Object(J.a)(e,[{key:"reset",value:function(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}},{key:"put",value:function(e){var t=this,n=e.parent.parent;if(n.references.length<=1)this.reset();else{this._currentModel=n,this._currentIdx=n.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();var r=new Qo(this._editorService),i=r.onDidChange((function(e){if(!t._ignoreEditorChange){var r=t._editorService.getActiveCodeEditor();if(r){var i=r.getModel(),a=r.getPosition();if(i&&a){var o,s=!1,u=!1,c=Object(Ee.a)(n.references);try{for(c.s();!(o=c.n()).done;){var l=o.value;if(Object(vn.f)(l.uri,i.uri))s=!0,u=u||Te.a.containsPosition(l.range,a);else if(s)break}}catch(d){c.e(d)}finally{c.f()}s&&u||t.reset()}}}}));this._currentState=Object(xe.e)(r,i)}}},{key:"revealNext",value:function(e){var t=this;if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;var n=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:n.uri,options:{selection:Te.a.collapseToStart(n.range),selectionRevealType:3}},e).finally((function(){t._ignoreEditorChange=!1}))}},{key:"_showMessage",value:function(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();var t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?Object(Q.a)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):Object(Q.a)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}}]),e}();$o=qo([Go(0,te.b),Go(1,Je.a),Go(2,mn.a),Go(3,qt.a)],$o),Object(Gn.b)(Jo,$o,!0),Object($.k)(new(function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.gotoNextSymbolFromResult",precondition:Yo,kbOpts:{weight:100,primary:70}})}return Object(J.a)(n,[{key:"runEditorCommand",value:function(e,t){return e.get(Jo).revealNext(t)}}]),n}($.c))),jo.a.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:Yo,primary:9,handler:function(e){e.get(Jo).reset()}});var Qo=function(){function e(t){Object(Y.a)(this,e),this._listener=new Map,this._disposables=new xe.b,this._onDidChange=new rn.a,this.onDidChange=this._onDidChange.event,this._disposables.add(t.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(t.onCodeEditorAdd(this._onDidAddEditor,this)),t.listCodeEditors().forEach(this._onDidAddEditor,this)}return Object(J.a)(e,[{key:"dispose",value:function(){this._disposables.dispose(),this._onDidChange.dispose(),Object(xe.f)(this._listener.values())}},{key:"_onDidAddEditor",value:function(e){var t=this;this._listener.set(e,Object(xe.e)(e.onDidChangeCursorPosition((function(n){return t._onDidChange.fire({editor:e})})),e.onDidChangeModelContent((function(n){return t._onDidChange.fire({editor:e})}))))}},{key:"_onDidRemoveEditor",value:function(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}}]),e}();Qo=qo([Go(0,Je.a)],Qo);var Xo,Zo,es,ts,ns,rs,is,as,os=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))};Fe.d.appendMenuItem(Fe.b.EditorContext,{submenu:Fe.b.EditorContextPeek,title:Q.a("peek.submenu","Peek"),group:"navigation",order:100});var ss=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,r))._configuration=e,i}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=this;if(!t.hasModel())return Promise.resolve(void 0);var r=e.get(mn.a),i=e.get(Je.a),a=e.get(Ct.a),o=e.get(Jo),s=t.getModel(),u=t.getPosition(),c=new mt.b(t,5),l=Object(Se.j)(this._getLocationModel(s,u,c.token),c.token).then((function(e){return os(n,void 0,void 0,K.a.mark((function n(){var r,a,l,d;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e&&!c.token.isCancellationRequested){n.next=2;break}return n.abrupt("return");case 2:if(Object(pe.a)(e.ariaMessage),e.referenceAt(s.uri,u)&&(a=this._getAlternativeCommand(t))!==this.id&&(r=t.getAction(a)),0!==(l=e.references.length)){n.next=9;break}this._configuration.muteMessage||(d=s.getWordAtPosition(u),jt.get(t).showMessage(this._getNoResultFoundMessage(d),u)),n.next=14;break;case 9:if(1!==l||!r){n.next=13;break}r.run(),n.next=14;break;case 13:return n.abrupt("return",this._onResult(i,o,t,e));case 14:case"end":return n.stop()}}),n,this)})))}),(function(e){r.error(e)})).finally((function(){c.dispose()}));return a.showWhile(l,250),l}},{key:"_onResult",value:function(e,t,n,r){return os(this,void 0,void 0,K.a.mark((function i(){var a,o,s,u;return K.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(a=this._getGoToPreference(n),n instanceof Vr||!(this._configuration.openInPeek||"peek"===a&&r.references.length>1)){i.next=5;break}this._openInPeek(n,r),i.next=12;break;case 5:return o=r.firstReference(),s=r.references.length>1&&"gotoAndPeek"===a,i.next=9,this._openReference(n,e,o,this._configuration.openToSide,!s);case 9:u=i.sent,s&&u?this._openInPeek(u,r):r.dispose(),"goto"===a&&t.put(o);case 12:case"end":return i.stop()}}),i,this)})))}},{key:"_openReference",value:function(e,t,n,r,i){return os(this,void 0,void 0,K.a.mark((function a(){var o,s,u,c;return K.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(o=void 0,Object(_t.H)(n)&&(o=n.targetSelectionRange),o||(o=n.range),o){a.next=5;break}return a.abrupt("return",void 0);case 5:return a.next=7,t.openCodeEditor({resource:n.uri,options:{selection:Te.a.collapseToStart(o),selectionRevealType:3}},e,r);case 7:if(s=a.sent){a.next=10;break}return a.abrupt("return",void 0);case 10:return i&&(u=s.getModel(),c=s.deltaDecorations([],[{range:o,options:{className:"symbolHighlight"}}]),setTimeout((function(){s.getModel()===u&&s.deltaDecorations(c,[])}),350)),a.abrupt("return",s);case 12:case"end":return a.stop()}}),a)})))}},{key:"_openInPeek",value:function(e,t){var n=Wo.get(e);n&&e.hasModel()?n.toggleWidget(e.getSelection(),Object(Se.f)((function(e){return Promise.resolve(t)})),this._configuration.openInPeek):t.dispose()}}]),n}($.b),us=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return os(this,void 0,void 0,K.a.mark((function r(){return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=ro,r.next=3,qa(e,t,n);case 3:return r.t1=r.sent,r.t2=Q.a("def.title","Definitions"),r.abrupt("return",new r.t0(r.t1,r.t2));case 6:case"end":return r.stop()}}),r)})))}},{key:"_getNoResultFoundMessage",value:function(e){return e&&e.word?Q.a("noResultWord","No definition found for '{0}'",e.word):Q.a("generic.noResults","No definition found")}},{key:"_getAlternativeCommand",value:function(e){return e.getOption(45).alternativeDefinitionCommand}},{key:"_getGoToPreference",value:function(e){return e.getOption(45).multipleDefinitions}}]),n}(ss),cs=Ge.i&&!qe.l?2118:70;Object($.j)(((Xo=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){var e;return Object(Y.a)(this,n),e=t.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:n.id,label:Q.a("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:te.a.and(X.a.hasDefinitionProvider,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:cs,weight:100},contextMenuOpts:{group:"navigation",order:1.1},menuOpts:{menuId:Fe.b.MenubarGoMenu,group:"4_symbol_nav",order:2,title:Q.a({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")}}),St.a.registerCommandAlias("editor.action.goToDeclaration",n.id),e}return n}(us)).id="editor.action.revealDefinition",Xo)),Object($.j)(((Zo=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){var e;return Object(Y.a)(this,n),e=t.call(this,{openToSide:!0,openInPeek:!1,muteMessage:!1},{id:n.id,label:Q.a("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:te.a.and(X.a.hasDefinitionProvider,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,cs),weight:100}}),St.a.registerCommandAlias("editor.action.openDeclarationToTheSide",n.id),e}return n}(us)).id="editor.action.revealDefinitionAside",Zo)),Object($.j)(((es=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){var e;return Object(Y.a)(this,n),e=t.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:n.id,label:Q.a("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:te.a.and(X.a.hasDefinitionProvider,si.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:Fe.b.EditorContextPeek,group:"peek",order:2}}),St.a.registerCommandAlias("editor.action.previewDeclaration",n.id),e}return n}(us)).id="editor.action.peekDefinition",es));var ls=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return os(this,void 0,void 0,K.a.mark((function r(){return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=ro,r.next=3,Ga(e,t,n);case 3:return r.t1=r.sent,r.t2=Q.a("decl.title","Declarations"),r.abrupt("return",new r.t0(r.t1,r.t2));case 6:case"end":return r.stop()}}),r)})))}},{key:"_getNoResultFoundMessage",value:function(e){return e&&e.word?Q.a("decl.noResultWord","No declaration found for '{0}'",e.word):Q.a("decl.generic.noResults","No declaration found")}},{key:"_getAlternativeCommand",value:function(e){return e.getOption(45).alternativeDeclarationCommand}},{key:"_getGoToPreference",value:function(e){return e.getOption(45).multipleDeclarations}}]),n}(ss);Object($.j)(((ts=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:n.id,label:Q.a("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:te.a.and(X.a.hasDeclarationProvider,X.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3},menuOpts:{menuId:Fe.b.MenubarGoMenu,group:"4_symbol_nav",order:3,title:Q.a({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")}})}return Object(J.a)(n,[{key:"_getNoResultFoundMessage",value:function(e){return e&&e.word?Q.a("decl.noResultWord","No declaration found for '{0}'",e.word):Q.a("decl.generic.noResults","No declaration found")}}]),n}(ls)).id="editor.action.revealDeclaration",ts)),Object($.j)(function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:Q.a("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:te.a.and(X.a.hasDeclarationProvider,si.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Fe.b.EditorContextPeek,group:"peek",order:3}})}return n}(ls));var ds=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return os(this,void 0,void 0,K.a.mark((function r(){return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=ro,r.next=3,Ja(e,t,n);case 3:return r.t1=r.sent,r.t2=Q.a("typedef.title","Type Definitions"),r.abrupt("return",new r.t0(r.t1,r.t2));case 6:case"end":return r.stop()}}),r)})))}},{key:"_getNoResultFoundMessage",value:function(e){return e&&e.word?Q.a("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):Q.a("goToTypeDefinition.generic.noResults","No type definition found")}},{key:"_getAlternativeCommand",value:function(e){return e.getOption(45).alternativeTypeDefinitionCommand}},{key:"_getGoToPreference",value:function(e){return e.getOption(45).multipleTypeDefinitions}}]),n}(ss);Object($.j)(((ns=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:n.ID,label:Q.a("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:te.a.and(X.a.hasTypeDefinitionProvider,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4},menuOpts:{menuId:Fe.b.MenubarGoMenu,group:"4_symbol_nav",order:3,title:Q.a({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")}})}return n}(ds)).ID="editor.action.goToTypeDefinition",ns)),Object($.j)(((rs=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:n.ID,label:Q.a("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:te.a.and(X.a.hasTypeDefinitionProvider,si.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Fe.b.EditorContextPeek,group:"peek",order:4}})}return n}(ds)).ID="editor.action.peekTypeDefinition",rs));var ps=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return os(this,void 0,void 0,K.a.mark((function r(){return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=ro,r.next=3,Ya(e,t,n);case 3:return r.t1=r.sent,r.t2=Q.a("impl.title","Implementations"),r.abrupt("return",new r.t0(r.t1,r.t2));case 6:case"end":return r.stop()}}),r)})))}},{key:"_getNoResultFoundMessage",value:function(e){return e&&e.word?Q.a("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):Q.a("goToImplementation.generic.noResults","No implementation found")}},{key:"_getAlternativeCommand",value:function(e){return e.getOption(45).alternativeImplementationCommand}},{key:"_getGoToPreference",value:function(e){return e.getOption(45).multipleImplementations}}]),n}(ss);Object($.j)(((is=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:n.ID,label:Q.a("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:te.a.and(X.a.hasImplementationProvider,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:2118,weight:100},menuOpts:{menuId:Fe.b.MenubarGoMenu,group:"4_symbol_nav",order:4,title:Q.a({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},contextMenuOpts:{group:"navigation",order:1.45}})}return n}(ps)).ID="editor.action.goToImplementation",is)),Object($.j)(((as=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:n.ID,label:Q.a("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:te.a.and(X.a.hasImplementationProvider,si.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:Fe.b.EditorContextPeek,group:"peek",order:5}})}return n}(ps)).ID="editor.action.peekImplementation",as));var fs=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_getNoResultFoundMessage",value:function(e){return e?Q.a("references.no","No references found for '{0}'",e.word):Q.a("references.noGeneric","No references found")}},{key:"_getAlternativeCommand",value:function(e){return e.getOption(45).alternativeReferenceCommand}},{key:"_getGoToPreference",value:function(e){return e.getOption(45).multipleReferences}}]),n}(ss);Object($.j)(function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:Q.a("goToReferences.label","Go to References"),alias:"Go to References",precondition:te.a.and(X.a.hasReferenceProvider,si.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:X.a.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45},menuOpts:{menuId:Fe.b.MenubarGoMenu,group:"4_symbol_nav",order:5,title:Q.a({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")}})}return Object(J.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return os(this,void 0,void 0,K.a.mark((function r(){return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=ro,r.next=3,$a(e,t,!0,n);case 3:return r.t1=r.sent,r.t2=Q.a("ref.title","References"),r.abrupt("return",new r.t0(r.t1,r.t2));case 6:case"end":return r.stop()}}),r)})))}}]),n}(fs)),Object($.j)(function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:Q.a("references.action.label","Peek References"),alias:"Peek References",precondition:te.a.and(X.a.hasReferenceProvider,si.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Fe.b.EditorContextPeek,group:"peek",order:6}})}return Object(J.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return os(this,void 0,void 0,K.a.mark((function r(){return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=ro,r.next=3,$a(e,t,!1,n);case 3:return r.t1=r.sent,r.t2=Q.a("ref.title","References"),r.abrupt("return",new r.t0(r.t1,r.t2));case 6:case"end":return r.stop()}}),r)})))}}]),n}(fs));var hs=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;return Object(Y.a)(this,n),(a=t.call(this,e,{id:"editor.action.goToLocation",label:Q.a("label.generic","Go To Any Symbol"),alias:"Go To Any Symbol",precondition:te.a.and(si.notInPeekEditor,X.a.isInWalkThroughSnippet.toNegated())}))._references=r,a._gotoMultipleBehaviour=i,a}return Object(J.a)(n,[{key:"_getLocationModel",value:function(e,t,n){return os(this,void 0,void 0,K.a.mark((function e(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new ro(this._references,Q.a("generic.title","Locations")));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"_getNoResultFoundMessage",value:function(e){return e&&Q.a("generic.noResult","No results for '{0}'",e.word)||""}},{key:"_getGoToPreference",value:function(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(45).multipleReferences}},{key:"_getAlternativeCommand",value:function(){return""}}]),n}(ss);function gs(e,t){return!!e[t]}St.a.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:gt.a},{name:"position",description:"The position at which to start",constraint:ke.a.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:function(e,t,n,r,i,a,o){return os(void 0,void 0,void 0,K.a.mark((function s(){var u,c;return K.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return Object(Bn.b)(gt.a.isUri(t)),Object(Bn.b)(ke.a.isIPosition(n)),Object(Bn.b)(Array.isArray(r)),Object(Bn.b)("undefined"===typeof i||"string"===typeof i),Object(Bn.b)("undefined"===typeof o||"boolean"===typeof o),u=e.get(Je.a),s.next=8,u.openCodeEditor({resource:t},u.getFocusedCodeEditor());case 8:if(c=s.sent,!Object(Xa.b)(c)){s.next=13;break}return c.setPosition(n),c.revealPositionInCenterIfOutsideViewport(n,0),s.abrupt("return",c.invokeWithinContext((function(e){var t=new(function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_getNoResultFoundMessage",value:function(e){return a||Object(en.a)(Object(tn.a)(n.prototype),"_getNoResultFoundMessage",this).call(this,e)}}]),n}(hs))({muteMessage:!Boolean(a),openInPeek:Boolean(o),openToSide:!1},r,i);e.get(zt.a).invokeFunction(t.run.bind(t),c)})));case 13:case"end":return s.stop()}}),s)})))}}),St.a.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:gt.a},{name:"position",description:"The position at which to start",constraint:ke.a.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:function(e,t,n,r,i){return os(void 0,void 0,void 0,K.a.mark((function a(){return K.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:e.get(St.b).executeCommand("editor.action.goToLocations",t,n,r,i,void 0,!0);case 1:case"end":return a.stop()}}),a)})))}}),St.a.registerCommand({id:"editor.action.findReferences",handler:function(e,t,n){Object(Bn.b)(gt.a.isUri(t)),Object(Bn.b)(ke.a.isIPosition(n));var r=e.get(Je.a);return r.openCodeEditor({resource:t},r.getFocusedCodeEditor()).then((function(e){if(Object(Xa.b)(e)&&e.hasModel()){var t=Wo.get(e);if(t){var r=Object(Se.f)((function(t){return $a(e.getModel(),ke.a.lift(n),!1,t).then((function(e){return new ro(e,Q.a("ref.title","References"))}))})),i=new Te.a(n.lineNumber,n.column,n.lineNumber,n.column);return Promise.resolve(t.toggleWidget(i,r,!1))}}}))}}),St.a.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var ms=function e(t,n){Object(Y.a)(this,e),this.target=t.target,this.hasTriggerModifier=gs(t.event,n.triggerModifier),this.hasSideBySideModifier=gs(t.event,n.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=t.event.detail<=1},_s=function e(t,n){Object(Y.a)(this,e),this.keyCodeIsTriggerKey=t.keyCode===n.triggerKey,this.keyCodeIsSideBySideKey=t.keyCode===n.triggerSideBySideKey,this.hasTriggerModifier=gs(t,n.triggerModifier)},vs=function(){function e(t,n,r,i){Object(Y.a)(this,e),this.triggerKey=t,this.triggerModifier=n,this.triggerSideBySideKey=r,this.triggerSideBySideModifier=i}return Object(J.a)(e,[{key:"equals",value:function(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}]),e}();function ys(e){return"altKey"===e?Ge.f?new vs(57,"metaKey",6,"altKey"):new vs(5,"ctrlKey",6,"altKey"):Ge.f?new vs(6,"altKey",57,"metaKey"):new vs(6,"altKey",5,"ctrlKey")}var bs=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this))._onMouseMoveOrRelevantKeyDown=r._register(new rn.a),r.onMouseMoveOrRelevantKeyDown=r._onMouseMoveOrRelevantKeyDown.event,r._onExecute=r._register(new rn.a),r.onExecute=r._onExecute.event,r._onCancel=r._register(new rn.a),r.onCancel=r._onCancel.event,r._editor=e,r._opts=ys(r._editor.getOption(64)),r._lastMouseMoveEvent=null,r._hasTriggerKeyOnMouseDown=!1,r._lineNumberOnMouseDown=0,r._register(r._editor.onDidChangeConfiguration((function(e){if(e.hasChanged(64)){var t=ys(r._editor.getOption(64));if(r._opts.equals(t))return;r._opts=t,r._lastMouseMoveEvent=null,r._hasTriggerKeyOnMouseDown=!1,r._lineNumberOnMouseDown=0,r._onCancel.fire()}}))),r._register(r._editor.onMouseMove((function(e){return r._onEditorMouseMove(new ms(e,r._opts))}))),r._register(r._editor.onMouseDown((function(e){return r._onEditorMouseDown(new ms(e,r._opts))}))),r._register(r._editor.onMouseUp((function(e){return r._onEditorMouseUp(new ms(e,r._opts))}))),r._register(r._editor.onKeyDown((function(e){return r._onEditorKeyDown(new _s(e,r._opts))}))),r._register(r._editor.onKeyUp((function(e){return r._onEditorKeyUp(new _s(e,r._opts))}))),r._register(r._editor.onMouseDrag((function(){return r._resetHandler()}))),r._register(r._editor.onDidChangeCursorSelection((function(e){return r._onDidChangeCursorSelection(e)}))),r._register(r._editor.onDidChangeModel((function(e){return r._resetHandler()}))),r._register(r._editor.onDidChangeModelContent((function(){return r._resetHandler()}))),r._register(r._editor.onDidScrollChange((function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&r._resetHandler()}))),r}return Object(J.a)(n,[{key:"_onDidChangeCursorSelection",value:function(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}},{key:"_onEditorMouseMove",value:function(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}},{key:"_onEditorMouseDown",value:function(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}},{key:"_onEditorMouseUp",value:function(e){var t=e.target.position?e.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}},{key:"_onEditorKeyDown",value:function(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}},{key:"_onEditorKeyUp",value:function(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}},{key:"_resetHandler",value:function(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}]),n}(xe.a),Ds=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Es=function(e,t){return function(n,r){t(n,r,e)}},Cs=function(){function e(t,n,r){var i=this;Object(Y.a)(this,e),this.textModelResolverService=n,this.modeService=r,this.toUnhook=new xe.b,this.toUnhookForKeyboard=new xe.b,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=t;var a=new bs(t);this.toUnhook.add(a),this.toUnhook.add(a.onMouseMoveOrRelevantKeyDown((function(e){var t=Object(Ce.a)(e,2),n=t[0],r=t[1];i.startFindDefinitionFromMouse(n,Object(Bn.n)(r))}))),this.toUnhook.add(a.onExecute((function(e){i.isEnabled(e)&&i.gotoDefinition(e.target.position,e.hasSideBySideModifier).then((function(){i.removeLinkDecorations()}),(function(e){i.removeLinkDecorations(),Object(ie.e)(e)}))}))),this.toUnhook.add(a.onCancel((function(){i.removeLinkDecorations(),i.currentWordAtPosition=null})))}return Object(J.a)(e,[{key:"startFindDefinitionFromCursor",value:function(e){var t=this;return this.startFindDefinition(e).then((function(){t.toUnhookForKeyboard.add(t.editor.onDidChangeCursorPosition((function(){t.currentWordAtPosition=null,t.removeLinkDecorations(),t.toUnhookForKeyboard.clear()}))),t.toUnhookForKeyboard.add(t.editor.onKeyDown((function(e){e&&(t.currentWordAtPosition=null,t.removeLinkDecorations(),t.toUnhookForKeyboard.clear())})))}))}},{key:"startFindDefinitionFromMouse",value:function(e,t){if(!(9===e.target.type&&this.linkDecorations.length>0)){if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();var n=e.target.position;this.startFindDefinition(n)}}},{key:"startFindDefinition",value:function(e){var t,n=this;this.toUnhookForKeyboard.clear();var r=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!r)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===r.startColumn&&this.currentWordAtPosition.endColumn===r.endColumn&&this.currentWordAtPosition.word===r.word)return Promise.resolve(0);this.currentWordAtPosition=r;var i=new mt.a(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Object(Se.f)((function(t){return n.findDefinition(e,t)})),this.previousPromise.then((function(t){if(t&&t.length&&i.validate(n.editor))if(t.length>1)n.addDecoration(new Te.a(e.lineNumber,r.startColumn,e.lineNumber,r.endColumn),(new ae).appendText(Q.a("multipleResults","Click to show {0} definitions.",t.length)));else{var a=t[0];if(!a.uri)return;n.textModelResolverService.createModelReference(a.uri).then((function(t){if(t.object&&t.object.textEditorModel){var i=t.object.textEditorModel,o=a.range.startLineNumber;if(o<1||o>i.getLineCount())t.dispose();else{var s,u=n.getPreviewValue(i,o,a);s=a.originSelectionRange?Te.a.lift(a.originSelectionRange):new Te.a(e.lineNumber,r.startColumn,e.lineNumber,r.endColumn);var c=n.modeService.getModeIdByFilepathOrFirstLine(i.uri);n.addDecoration(s,(new ae).appendCodeblock(c||"",u)),t.dispose()}}else t.dispose()}))}else n.removeLinkDecorations()})).then(void 0,ie.e)}},{key:"getPreviewValue",value:function(t,n,r){var i=r.targetSelectionRange?r.range:this.getPreviewRangeBasedOnBrackets(t,n);return i.endLineNumber-i.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(t,n)),this.stripIndentationFromPreviewRange(t,n,i)}},{key:"stripIndentationFromPreviewRange",value:function(e,t,n){for(var r=e.getLineFirstNonWhitespaceColumn(t),i=t+1;ir)return new Te.a(n,1,r+1,1);o=t.findNextBracket(new ke.a(c,l))}return new Te.a(n,1,r+1,1)}},{key:"addDecoration",value:function(e,t){var n={range:e,options:{inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[n])}},{key:"removeLinkDecorations",value:function(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}},{key:"isEnabled",value:function(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&6===e.target.type&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&_t.f.has(this.editor.getModel())}},{key:"findDefinition",value:function(e,t){var n=this.editor.getModel();return n?qa(n,e,t):Promise.resolve(null)}},{key:"gotoDefinition",value:function(e,t){var n=this;return this.editor.setPosition(e),this.editor.invokeWithinContext((function(e){var r=!t&&n.editor.getOption(72)&&!n.isInPeekEditor(e);return new us({openToSide:t,openInPeek:r,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,n.editor)}))}},{key:"isInPeekEditor",value:function(e){var t=e.get(te.b);return si.inPeekEditor.getValue(t)}},{key:"dispose",value:function(){this.toUnhook.dispose()}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();Cs.ID="editor.contrib.gotodefinitionatposition",Cs.MAX_SOURCE_PREVIEW_LINES=8,Cs=Ds([Es(1,Qa.a),Es(2,gr.a)],Cs),Object($.l)(Cs.ID,Cs),Object(Ie.f)((function(e,t){var n=e.getColor(Ne.r);n&&t.addRule(".monaco-editor .goto-definition-link { color: ".concat(n," !important; }"))}));var Ss=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},xs=function(e,t){return function(n,r){t(n,r,e)}},ks=function(){function e(t,n,r,i,a,o){var s=this;Object(Y.a)(this,e),this._editor=t,this._instantiationService=n,this._openerService=r,this._modeService=i,this._themeService=a,this._toUnhook=new xe.b,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((function(e){e.hasChanged(48)&&(s._unhookEvents(),s._hookEvents())})),this._hoverVisibleKey=X.a.hoverVisible.bindTo(o)}return Object(J.a)(e,[{key:"_hookEvents",value:function(){var e=this,t=function(){return e._hideWidgets()},n=this._editor.getOption(48);this._isHoverEnabled=n.enabled,this._isHoverSticky=n.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((function(t){return e._onEditorMouseDown(t)}))),this._toUnhook.add(this._editor.onMouseUp((function(t){return e._onEditorMouseUp(t)}))),this._toUnhook.add(this._editor.onMouseMove((function(t){return e._onEditorMouseMove(t)}))),this._toUnhook.add(this._editor.onKeyDown((function(t){return e._onKeyDown(t)}))),this._toUnhook.add(this._editor.onDidChangeModelDecorations((function(){return e._onModelDecorationsChanged()})))):(this._toUnhook.add(this._editor.onMouseMove((function(t){return e._onEditorMouseMove(t)}))),this._toUnhook.add(this._editor.onKeyDown((function(t){return e._onKeyDown(t)})))),this._toUnhook.add(this._editor.onMouseLeave(t)),this._toUnhook.add(this._editor.onDidChangeModel(t)),this._toUnhook.add(this._editor.onDidScrollChange((function(t){return e._onEditorScrollChanged(t)})))}},{key:"_unhookEvents",value:function(){this._toUnhook.clear()}},{key:"_onModelDecorationsChanged",value:function(){var e,t;null===(e=this._contentWidget)||void 0===e||e.onModelDecorationsChanged(),null===(t=this._glyphWidget)||void 0===t||t.onModelDecorationsChanged()}},{key:"_onEditorScrollChanged",value:function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}},{key:"_onEditorMouseDown",value:function(e){this._isMouseDown=!0;var t=e.target.type;9!==t||e.target.detail!==Ua.ID?12===t&&e.target.detail===Ha.ID||(12!==t&&e.target.detail!==Ha.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0}},{key:"_onEditorMouseUp",value:function(e){this._isMouseDown=!1}},{key:"_onEditorMouseMove",value:function(e){var t,n,r,i,a,o,s=e.target.type;if((!this._isMouseDown||!this._hoverClicked)&&(!this._isHoverSticky||9!==s||e.target.detail!==Ua.ID)&&(!this._isHoverSticky||(null===(n=null===(t=e.event.browserEvent.view)||void 0===t?void 0:t.getSelection())||void 0===n?void 0:n.isCollapsed))&&(this._isHoverSticky||9!==s||e.target.detail!==Ua.ID||!(null===(r=this._contentWidget)||void 0===r?void 0:r.isColorPickerVisible()))&&(!this._isHoverSticky||12!==s||e.target.detail!==Ha.ID)){if(7===s){var u=this._editor.getOption(38).typicalHalfwidthCharacterWidth/2,c=e.target.detail;c&&!c.isAfterLines&&"number"===typeof c.horizontalDistanceToText&&c.horizontalDistanceToText=0&&(h=-1,g=-1)}else{var m=p.substring(h+n.length),_=f.substring(0,g);(m.indexOf(r)>=0||_.indexOf(r)>=0)&&(h=-1,g=-1)}-1!==h&&-1!==g?(i&&h+n.length0&&32===f.charCodeAt(g-1)&&(r=" "+r,g-=1),s=e._createRemoveBlockCommentOperations(new Te.a(u,h+n.length+1,l,g+1),n,r)):(s=e._createAddBlockCommentOperations(t,n,r,this._insertSpace),this._usedEndToken=1===s.length?r:null);var v,y=Object(Ee.a)(s);try{for(y.s();!(v=y.n()).done;){var b=v.value;o.addTrackedEditOperation(b.range,b.text)}}catch(D){y.e(D)}finally{y.f()}}},{key:"getEditOperations",value:function(e,t){var n=this._selection.startLineNumber,r=this._selection.startColumn;e.tokenizeIfCheap(n);var i=e.getLanguageIdAtPosition(n,r),a=Ns.a.getComments(i);a&&a.blockCommentStartToken&&a.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,a.blockCommentStartToken,a.blockCommentEndToken,this._insertSpace,e,t)}},{key:"computeCursorState",value:function(e,t){var n=t.getInverseEditOperations();if(2===n.length){var r=n[0],i=n[1];return new Z.a(r.range.endLineNumber,r.range.endColumn,i.range.startLineNumber,i.range.startColumn)}var a=n[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new Z.a(a.endLineNumber,a.endColumn+o,a.endLineNumber,a.endColumn+o)}}],[{key:"_haystackHasNeedleAtOffset",value:function(e,t,n){if(n<0)return!1;var r=t.length;if(n+r>e.length)return!1;for(var i=0;i=65&&a<=90&&a+32===o)&&!(o>=65&&o<=90&&o+32===a)))return!1}return!0}},{key:"_createRemoveBlockCommentOperations",value:function(e,t,n){var r=[];return Te.a.isEmpty(e)?r.push(Os.a.delete(new Te.a(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(r.push(Os.a.delete(new Te.a(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(Os.a.delete(new Te.a(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),r}},{key:"_createAddBlockCommentOperations",value:function(e,t,n,r){var i=[];return Te.a.isEmpty(e)?i.push(Os.a.replace(new Te.a(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(i.push(Os.a.insert(new ke.a(e.startLineNumber,e.startColumn),t+(r?" ":""))),i.push(Os.a.insert(new ke.a(e.endLineNumber,e.endColumn),(r?" ":"")+n))),i}}]),e}(),Fs=function(){function e(t,n,r,i,a,o){Object(Y.a)(this,e),this._selection=t,this._tabSize=n,this._type=r,this._insertSpace=i,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=a,this._ignoreFirstLine=o||!1}return Object(J.a)(e,[{key:"_executeLineComments",value:function(t,n,r,i){var a;r.shouldRemoveComments?a=e._createRemoveLineCommentsOperations(r.lines,i.startLineNumber):(e._normalizeInsertionPoint(t,r.lines,i.startLineNumber,this._tabSize),a=this._createAddLineCommentsOperations(r.lines,i.startLineNumber));for(var o=new ke.a(i.positionLineNumber,i.positionColumn),s=0,u=a.length;ss?a-1:a}}}]),e}(),Ls=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,r))._type=e,i}return Object(J.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){var n=[],r=t.getModel().getOptions(),i=t.getOption(16),a=t.getSelections().map((function(e,t){return{selection:e,index:t,ignoreFirstLine:!1}}));a.sort((function(e,t){return Te.a.compareRangesUsingStarts(e.selection,t.selection)}));for(var o=a[0],s=1;s=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Us=function(e,t){return function(n,r){t(n,r,e)}},Vs=function(){function e(t,n,r,i,a,o){var s=this;Object(Y.a)(this,e),this._contextMenuService=n,this._contextViewService=r,this._contextKeyService=i,this._keybindingService=a,this._menuService=o,this._toDispose=new xe.b,this._contextMenuIsBeingShownCount=0,this._editor=t,this._toDispose.add(this._editor.onContextMenu((function(e){return s._onContextMenu(e)}))),this._toDispose.add(this._editor.onMouseWheel((function(e){if(s._contextMenuIsBeingShownCount>0){var t=s._contextViewService.getContextViewElement(),n=e.srcElement;n.shadowRoot&&Ht.getShadowRoot(t)===n.shadowRoot||s._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((function(e){58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),s.showContextMenu())})))}return Object(J.a)(e,[{key:"_onContextMenu",value:function(e){if(this._editor.hasModel()){if(!this._editor.getOption(17))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12!==e.target.type&&(e.event.preventDefault(),6===e.target.type||7===e.target.type||1===e.target.type)){if(this._editor.focus(),e.target.position){var t,n=!1,r=Object(Ee.a)(this._editor.getSelections());try{for(r.s();!(t=r.n()).done;){if(t.value.containsPosition(e.target.position)){n=!0;break}}}catch(a){r.e(a)}finally{r.f()}n||this._editor.setPosition(e.target.position)}var i=null;1!==e.target.type&&(i={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(i)}}}},{key:"showContextMenu",value:function(e){if(this._editor.getOption(17)&&this._editor.hasModel())if(this._contextMenuService){var t=this._getMenuActions(this._editor.getModel(),Fe.b.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}else this._editor.focus()}},{key:"_getMenuActions",value:function(e,t){var n=[],r=this._menuService.createMenu(t,this._contextKeyService),i=r.getActions({arg:e.uri});r.dispose();var a,o=Object(Ee.a)(i);try{for(o.s();!(a=o.n()).done;){var s,u=a.value,c=Object(Ce.a)(u,2)[1],l=0,d=Object(Ee.a)(c);try{for(d.s();!(s=d.n()).done;){var p=s.value;if(p instanceof Fe.e){var f=this._getMenuActions(e,p.item.submenu);f.length>0&&(n.push(new Wt.e(p.id,p.label,f)),l++)}else n.push(p),l++}}catch(h){d.e(h)}finally{d.f()}l&&n.push(new Wt.d)}}catch(h){o.e(h)}finally{o.f()}return n.length&&n.pop(),n}},{key:"_doShowContextMenu",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this._editor.hasModel()){var r=this._editor.getOption(48);if(this._editor.updateOptions({hover:{enabled:!1}}),!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();var i=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),a=Ht.getDomNodePagePosition(this._editor.getDomNode()),o=a.left+i.left,s=a.top+i.top+i.height;n={x:o,y:s}}this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:this._editor.getDomNode(),getAnchor:function(){return n},getActions:function(){return e},getActionViewItem:function(e){var n=t._keybindingFor(e);if(n)return new Qr.a(e,e,{label:!0,keybinding:n.getLabel(),isMenu:!0});var r=e;return"function"===typeof r.getActionViewItem?r.getActionViewItem():new Qr.a(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:function(e){return t._keybindingFor(e)},onHide:function(e){t._contextMenuIsBeingShownCount--,t._editor.focus(),t._editor.updateOptions({hover:r})}})}}},{key:"_keybindingFor",value:function(e){return this._keybindingService.lookupKeybinding(e.id)}},{key:"dispose",value:function(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();Vs.ID="editor.contrib.contextmenu",Vs=js([Us(1,Kt.a),Us(2,Kt.b),Us(3,te.b),Us(4,qt.a),Us(5,Fe.a)],Vs);var zs=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.showContextMenu",label:Q.a("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:1092,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){Vs.get(t).showContextMenu()}}]),n}($.b);Object($.l)(Vs.ID,Vs),Object($.j)(zs);var Hs=function(){function e(t){Object(Y.a)(this,e),this.selections=t}return Object(J.a)(e,[{key:"equals",value:function(e){var t=this.selections.length;if(t!==e.selections.length)return!1;for(var n=0;n0&&r._undoStack[r._undoStack.length-1].cursorState.equals(n)||(r._undoStack.push(new Ws(n,e.getScrollTop(),e.getScrollLeft())),r._redoStack=[],r._undoStack.length>50&&r._undoStack.shift())}}))),r}return Object(J.a)(n,[{key:"cursorUndo",value:function(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new Ws(new Hs(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}},{key:"cursorRedo",value:function(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new Ws(new Hs(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}},{key:"_applyState",value:function(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(xe.a);Ks.ID="editor.contrib.cursorUndoRedoController";var qs=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"cursorUndo",label:Q.a("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:2099,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t,n){Ks.get(t).cursorUndo()}}]),n}($.b),Gs=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"cursorRedo",label:Q.a("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}return Object(J.a)(n,[{key:"run",value:function(e,t,n){Ks.get(t).cursorRedo()}}]),n}($.b);Object($.l)(Ks.ID,Ks),Object($.j)(qs),Object($.j)(Gs);n(406);var Ys=function(){function e(t,n,r){Object(Y.a)(this,e),this.selection=t,this.targetPosition=n,this.copy=r,this.targetSelection=null}return Object(J.a)(e,[{key:"getEditOperations",value:function(e,t){var n=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new Te.a(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new Z.a(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 Z.a(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.lineNumber=0?t+1:1}},{key:"getCurrentMatchesPosition",value:function(t){var n,r=this._editor.getModel().getDecorationsInRange(t),i=Object(Ee.a)(r);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=a.options;if(o===e._FIND_MATCH_DECORATION||o===e._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(a.id)}}catch(s){i.e(s)}finally{i.f()}return 0}},{key:"setCurrentFindMatch",value:function(t){var n=this,r=null,i=0;if(t)for(var a=0,o=this._decorations.length;a1e3){a=e._FIND_MATCH_NO_OVERVIEW_DECORATION;for(var s=r._editor.getModel().getLineCount(),u=r._editor.getLayoutInfo().height/s,c=Math.max(2,Math.ceil(3/u)),l=t[0].range.startLineNumber,d=t[0].range.endLineNumber,p=1,f=t.length;p=h.startLineNumber?h.endLineNumber>d&&(d=h.endLineNumber):(o.push({range:new Te.a(l,1,d,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),l=h.startLineNumber,d=h.endLineNumber)}o.push({range:new Te.a(l,1,d,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}for(var g=new Array(t.length),m=0,_=t.length;m<_;m++)g[m]={range:t[m].range,options:a};r._decorations=i.deltaDecorations(r._decorations,g),r._overviewRulerApproximateDecorations=i.deltaDecorations(r._overviewRulerApproximateDecorations,o),r._rangeHighlightDecorationId&&(i.removeDecoration(r._rangeHighlightDecorationId),r._rangeHighlightDecorationId=null),r._findScopeDecorationIds.length&&(r._findScopeDecorationIds.forEach((function(e){return i.removeDecoration(e)})),r._findScopeDecorationIds=[]),(null===n||void 0===n?void 0:n.length)&&(r._findScopeDecorationIds=n.map((function(t){return i.addDecoration(t,e._FIND_SCOPE_DECORATION)})))}))}},{key:"matchBeforePosition",value:function(e){if(0===this._decorations.length)return null;for(var t=this._decorations.length-1;t>=0;t--){var n=this._decorations[t],r=this._editor.getModel().getDecorationRange(n);if(r&&!(r.endLineNumber>e.lineNumber)){if(r.endLineNumbere.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}},{key:"matchAfterPosition",value:function(e){if(0===this._decorations.length)return null;for(var t=0,n=this._decorations.length;te.lineNumber)return i;if(!(i.startColumn0){for(var n=[],r=0;r0?t[0].toUpperCase()+t.substr(1):t}return t}function tu(e,t,n){return-1!==e[0].indexOf(n)&&-1!==t.indexOf(n)&&e[0].split(n).length===t.split(n).length}function nu(e,t,n){var r=t.split(n),i=e[0].split(n),a="";return r.forEach((function(e,t){a+=eu([i[t]],e)+n})),a.slice(0,-1)}var ru=function e(t){Object(Y.a)(this,e),this.staticValue=t,this.kind=0},iu=function e(t){Object(Y.a)(this,e),this.pieces=t,this.kind=1},au=function(){function e(t){Object(Y.a)(this,e),t&&0!==t.length?1===t.length&&null!==t[0].staticValue?this._state=new ru(t[0].staticValue):this._state=new iu(t):this._state=new ru("")}return Object(J.a)(e,[{key:"buildReplaceString",value:function(t,n){if(0===this._state.kind)return n?eu(t,this._state.staticValue):this._state.staticValue;for(var r="",i=0,a=this._state.pieces.length;i0){for(var u=[],c=o.caseOps.length,l=0,d=0,p=s.length;d=c){u.push(s.slice(d));break}switch(o.caseOps[l]){case"U":u.push(s[d].toUpperCase());break;case"u":u.push(s[d].toUpperCase()),l++;break;case"L":u.push(s[d].toLowerCase());break;case"l":u.push(s[d].toLowerCase()),l++;break;default:u.push(s[d])}}s=u.join("")}r+=s}else r+=o.staticValue}return r}},{key:"hasReplacementPatterns",get:function(){return 1===this._state.kind}}],[{key:"fromStaticValue",value:function(t){return new e([ou.staticValue(t)])}},{key:"_substitute",value:function(e,t){if(null===t)return"";if(0===e)return t[0];for(var n="";e>0;){if(e0){var s=Object(ne.h)(i.map((function(e){return e.range})),(function(e){return Te.a.compareRangesUsingStarts(e,a)>=0}));o=s>0?s-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._editor.getOption(31).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}},{key:"_hasMatches",value:function(){return this._state.matchesCount>0}},{key:"_cannotFind",value:function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}},{key:"_setCurrentFindMatch",value:function(e){var t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}},{key:"_prevSearchPosition",value:function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,r=e.column,i=this._editor.getModel();return t||1===r?(1===n?n=i.getLineCount():n--,r=i.getLineMaxColumn(n)):r--,new ke.a(n,r)}},{key:"_moveToPrevMatch",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._state.canNavigateBack()){if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,r=e.column,i=this._editor.getModel();return t||r===i.getLineMaxColumn(n)?(n===i.getLineCount()?n=1:n++,r=1):r++,new ke.a(n,r)}},{key:"_moveToNextMatch",value:function(e){if(this._state.canNavigateForward()){if(this._decorations.getCount()3&&void 0!==arguments[3]&&arguments[3];if(this._cannotFind())return null;var a=this._decorations.getFindScope(),o=e._getSearchRange(this._editor.getModel(),a);o.getEndPosition().isBefore(t)&&(t=o.getStartPosition()),t.isBefore(o.getStartPosition())&&(t=o.getStartPosition());var s=t,u=s.lineNumber,c=s.column,l=this._editor.getModel(),d=new ke.a(u,c),p=l.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,n);return r&&p&&p.range.isEmpty()&&p.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),p=l.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,n)),p?i||o.containsRange(p.range)?p:this._getNextMatch(p.range.getEndPosition(),n,r,!0):null}},{key:"moveToNextMatch",value:function(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}},{key:"_getReplacePattern",value:function(){return this._state.isRegex?function(e){if(!e||0===e.length)return new au(null);for(var t=[],n=new su(e),r=0,i=e.length;r=i)break;var o=e.charCodeAt(r);if(36===o){n.emitUnchanged(r-1),n.emitStatic("$",r+1);continue}if(48===o||38===o){n.emitUnchanged(r-1),n.emitMatchIndex(0,r+1,t),t.length=0;continue}if(49<=o&&o<=57){var s=o-48;if(r+1=i)break;var c=e.charCodeAt(r);switch(c){case 92:n.emitUnchanged(r-1),n.emitStatic("\\",r+1);break;case 110:n.emitUnchanged(r-1),n.emitStatic("\n",r+1);break;case 116:n.emitUnchanged(r-1),n.emitStatic("\t",r+1);break;case 117:case 85:case 108:case 76:n.emitUnchanged(r-1),n.emitStatic("",r+1),t.push(String.fromCharCode(c))}}}return n.finalize()}(this._state.replaceString):au.fromStaticValue(this._state.replaceString)}},{key:"replace",value:function(){if(this._hasMatches()){var e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),!0,!1);if(n)if(t.equalsRange(n.range)){var r=e.buildReplaceString(n.matches,this._state.preserveCase),i=new He.a(t,r);this._executeEditorCommand("replace",i),this._decorations.setStartPosition(new ke.a(t.startLineNumber,t.startColumn+r.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}}},{key:"_findMatches",value:function(t,n,r){var i=this,a=(t||[null]).map((function(t){return e._getSearchRange(i._editor.getModel(),t)}));return this._editor.getModel().findMatches(this._state.searchString,a,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,n,r)}},{key:"replaceAll",value:function(){if(this._hasMatches()){var e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=Iu?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}}},{key:"_largeReplaceAll",value:function(){var e=new Qs.a(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null).parseSearchRequest();if(e){var t=e.regex;if(!t.multiline){var n="mu";t.ignoreCase&&(n+="i"),t.global&&(n+="g"),t=new RegExp(t.source,n)}var r,i=this._editor.getModel(),a=i.getValue(1),o=i.getFullModelRange(),s=this._getReplacePattern(),u=this._state.preserveCase;r=s.hasReplacementPatterns||u?a.replace(t,(function(){return s.buildReplaceString(arguments,u)})):a.replace(t,s.buildReplaceString(null,u));var c=new He.b(o,r,this._editor.getSelection());this._executeEditorCommand("replaceAll",c)}}},{key:"_regularReplaceAll",value:function(e){for(var t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[],i=0,a=n.length;it&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,r.matchesPosition=!0,i=!0),this._matchesCount!==t&&(this._matchesCount=t,r.matchesCount=!0,i=!0),"undefined"!==typeof n&&(Te.a.equalsRange(this._currentMatch,n)||(this._currentMatch=n,r.currentMatch=!0,i=!0)),i&&this._onFindReplaceStateChange.fire(r)}},{key:"change",value:function(e,t){var n,r=this,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},o=!1,s=this.isRegex,u=this.wholeWord,c=this.matchCase,l=this.preserveCase;"undefined"!==typeof e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,a.searchString=!0,o=!0),"undefined"!==typeof e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,a.replaceString=!0,o=!0),"undefined"!==typeof e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,a.isRevealed=!0,o=!0),"undefined"!==typeof e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,a.isReplaceRevealed=!0,o=!0),"undefined"!==typeof e.isRegex&&(this._isRegex=e.isRegex),"undefined"!==typeof e.wholeWord&&(this._wholeWord=e.wholeWord),"undefined"!==typeof e.matchCase&&(this._matchCase=e.matchCase),"undefined"!==typeof e.preserveCase&&(this._preserveCase=e.preserveCase),"undefined"!==typeof e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every((function(e){var t;return null===(t=r._searchScope)||void 0===t?void 0:t.some((function(t){return!Te.a.equalsRange(t,e)}))})))||(this._searchScope=e.searchScope,a.searchScope=!0,o=!0)),"undefined"!==typeof e.loop&&this._loop!==e.loop&&(this._loop=e.loop,a.loop=!0,o=!0),this._isRegexOverride="undefined"!==typeof e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride="undefined"!==typeof e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride="undefined"!==typeof e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride="undefined"!==typeof e.preserveCaseOverride?e.preserveCaseOverride:0,s!==this.isRegex&&(o=!0,a.isRegex=!0),u!==this.wholeWord&&(o=!0,a.wholeWord=!0),c!==this.matchCase&&(o=!0,a.matchCase=!0),l!==this.preserveCase&&(o=!0,a.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(a)}},{key:"canNavigateBack",value:function(){return this.canNavigateInLoop()||1!==this.matchesPosition}},{key:"canNavigateForward",value:function(){return this.canNavigateInLoop()||this.matchesPosition=Iu}},{key:"searchString",get:function(){return this._searchString}},{key:"replaceString",get:function(){return this._replaceString}},{key:"isRevealed",get:function(){return this._isRevealed}},{key:"isReplaceRevealed",get:function(){return this._isReplaceRevealed}},{key:"isRegex",get:function(){return Hu(this._isRegexOverride,this._isRegex)}},{key:"wholeWord",get:function(){return Hu(this._wholeWordOverride,this._wholeWord)}},{key:"matchCase",get:function(){return Hu(this._matchCaseOverride,this._matchCase)}},{key:"preserveCase",get:function(){return Hu(this._preserveCaseOverride,this._preserveCase)}},{key:"actualIsRegex",get:function(){return this._isRegex}},{key:"actualWholeWord",get:function(){return this._wholeWord}},{key:"actualMatchCase",get:function(){return this._matchCase}},{key:"actualPreserveCase",get:function(){return this._preserveCase}},{key:"searchScope",get:function(){return this._searchScope}},{key:"matchesPosition",get:function(){return this._matchesPosition}},{key:"matchesCount",get:function(){return this._matchesCount}},{key:"currentMatch",get:function(){return this._currentMatch}}]),n}(xe.a),Ku=(n(408),n(281),n(205)),qu=Q.a("defaultLabel","input"),Gu=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o;Object(Y.a)(this,n),(o=t.call(this))._showOptionButtons=i,o.fixFocusOnOptionClickEnabled=!0,o._onDidOptionChange=o._register(new rn.a),o.onDidOptionChange=o._onDidOptionChange.event,o._onKeyDown=o._register(new rn.a),o.onKeyDown=o._onKeyDown.event,o._onMouseDown=o._register(new rn.a),o.onMouseDown=o._onMouseDown.event,o._onInput=o._register(new rn.a),o._onKeyUp=o._register(new rn.a),o._onCaseSensitiveKeyDown=o._register(new rn.a),o.onCaseSensitiveKeyDown=o._onCaseSensitiveKeyDown.event,o._onRegexKeyDown=o._register(new rn.a),o.onRegexKeyDown=o._onRegexKeyDown.event,o._lastHighlightFindOptions=0,o.contextViewProvider=r,o.placeholder=a.placeholder||"",o.validation=a.validation,o.label=a.label||qu,o.inputActiveOptionBorder=a.inputActiveOptionBorder,o.inputActiveOptionForeground=a.inputActiveOptionForeground,o.inputActiveOptionBackground=a.inputActiveOptionBackground,o.inputBackground=a.inputBackground,o.inputForeground=a.inputForeground,o.inputBorder=a.inputBorder,o.inputValidationInfoBorder=a.inputValidationInfoBorder,o.inputValidationInfoBackground=a.inputValidationInfoBackground,o.inputValidationInfoForeground=a.inputValidationInfoForeground,o.inputValidationWarningBorder=a.inputValidationWarningBorder,o.inputValidationWarningBackground=a.inputValidationWarningBackground,o.inputValidationWarningForeground=a.inputValidationWarningForeground,o.inputValidationErrorBorder=a.inputValidationErrorBorder,o.inputValidationErrorBackground=a.inputValidationErrorBackground,o.inputValidationErrorForeground=a.inputValidationErrorForeground;var s=a.appendCaseSensitiveLabel||"",u=a.appendWholeWordsLabel||"",c=a.appendRegexLabel||"",l=a.history||[],d=!!a.flexibleHeight,p=!!a.flexibleWidth,f=a.flexibleMaxHeight;o.domNode=document.createElement("div"),o.domNode.classList.add("monaco-findInput"),o.inputBox=o._register(new Ku.a(o.domNode,o.contextViewProvider,{placeholder:o.placeholder||"",ariaLabel:o.label||"",validationOptions:{validation:o.validation},inputBackground:o.inputBackground,inputForeground:o.inputForeground,inputBorder:o.inputBorder,inputValidationInfoBackground:o.inputValidationInfoBackground,inputValidationInfoForeground:o.inputValidationInfoForeground,inputValidationInfoBorder:o.inputValidationInfoBorder,inputValidationWarningBackground:o.inputValidationWarningBackground,inputValidationWarningForeground:o.inputValidationWarningForeground,inputValidationWarningBorder:o.inputValidationWarningBorder,inputValidationErrorBackground:o.inputValidationErrorBackground,inputValidationErrorForeground:o.inputValidationErrorForeground,inputValidationErrorBorder:o.inputValidationErrorBorder,history:l,flexibleHeight:d,flexibleWidth:p,flexibleMaxHeight:f})),o.regex=o._register(new Vu({appendTitle:c,isChecked:!1,inputActiveOptionBorder:o.inputActiveOptionBorder,inputActiveOptionForeground:o.inputActiveOptionForeground,inputActiveOptionBackground:o.inputActiveOptionBackground})),o._register(o.regex.onChange((function(e){o._onDidOptionChange.fire(e),!e&&o.fixFocusOnOptionClickEnabled&&o.inputBox.focus(),o.validate()}))),o._register(o.regex.onKeyDown((function(e){o._onRegexKeyDown.fire(e)}))),o.wholeWords=o._register(new Uu({appendTitle:u,isChecked:!1,inputActiveOptionBorder:o.inputActiveOptionBorder,inputActiveOptionForeground:o.inputActiveOptionForeground,inputActiveOptionBackground:o.inputActiveOptionBackground})),o._register(o.wholeWords.onChange((function(e){o._onDidOptionChange.fire(e),!e&&o.fixFocusOnOptionClickEnabled&&o.inputBox.focus(),o.validate()}))),o.caseSensitive=o._register(new ju({appendTitle:s,isChecked:!1,inputActiveOptionBorder:o.inputActiveOptionBorder,inputActiveOptionForeground:o.inputActiveOptionForeground,inputActiveOptionBackground:o.inputActiveOptionBackground})),o._register(o.caseSensitive.onChange((function(e){o._onDidOptionChange.fire(e),!e&&o.fixFocusOnOptionClickEnabled&&o.inputBox.focus(),o.validate()}))),o._register(o.caseSensitive.onKeyDown((function(e){o._onCaseSensitiveKeyDown.fire(e)}))),o._showOptionButtons&&(o.inputBox.paddingRight=o.caseSensitive.width()+o.wholeWords.width()+o.regex.width());var h=[o.caseSensitive.domNode,o.wholeWords.domNode,o.regex.domNode];o.onkeydown(o.domNode,(function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=h.indexOf(document.activeElement);if(t>=0){var n=-1;e.equals(17)?n=(t+1)%h.length:e.equals(15)&&(n=0===t?h.length-1:t-1),e.equals(9)?(h[t].blur(),o.inputBox.focus()):n>=0&&h[n].focus(),Ht.EventHelper.stop(e,!0)}}}));var g=document.createElement("div");return g.className="controls",g.style.display=o._showOptionButtons?"block":"none",g.appendChild(o.caseSensitive.domNode),g.appendChild(o.wholeWords.domNode),g.appendChild(o.regex.domNode),o.domNode.appendChild(g),e&&e.appendChild(o.domNode),o.onkeydown(o.inputBox.inputElement,(function(e){return o._onKeyDown.fire(e)})),o.onkeyup(o.inputBox.inputElement,(function(e){return o._onKeyUp.fire(e)})),o.oninput(o.inputBox.inputElement,(function(e){return o._onInput.fire()})),o.onmousedown(o.inputBox.inputElement,(function(e){return o._onMouseDown.fire(e)})),o}return Object(J.a)(n,[{key:"enable",value:function(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}},{key:"disable",value:function(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}},{key:"setFocusInputOnOptionClick",value:function(e){this.fixFocusOnOptionClickEnabled=e}},{key:"setEnabled",value:function(e){e?this.enable():this.disable()}},{key:"getValue",value:function(){return this.inputBox.value}},{key:"setValue",value:function(e){this.inputBox.value!==e&&(this.inputBox.value=e)}},{key:"style",value:function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,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()}},{key:"applyStyles",value:function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,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)}}},{key:"select",value:function(){this.inputBox.select()}},{key:"focus",value:function(){this.inputBox.focus()}},{key:"getCaseSensitive",value:function(){return this.caseSensitive.checked}},{key:"setCaseSensitive",value:function(e){this.caseSensitive.checked=e}},{key:"getWholeWords",value:function(){return this.wholeWords.checked}},{key:"setWholeWords",value:function(e){this.wholeWords.checked=e}},{key:"getRegex",value:function(){return this.regex.checked}},{key:"setRegex",value:function(e){this.regex.checked=e,this.validate()}},{key:"focusOnCaseSensitive",value:function(){this.caseSensitive.focus()}},{key:"highlightFindOptions",value:function(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}},{key:"validate",value:function(){this.inputBox.validate()}},{key:"clearMessage",value:function(){this.inputBox.hideMessage()}}]),n}(_r.a),Yu=Q.a("defaultLabel","input"),Ju=Q.a("label.preserveCaseCheckbox","Preserve Case"),$u=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){return Object(Y.a)(this,n),t.call(this,{icon:on.b.preserveCase,title:Ju+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}return n}(Pu),Qu=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o;Object(Y.a)(this,n),(o=t.call(this))._showOptionButtons=i,o.fixFocusOnOptionClickEnabled=!0,o.cachedOptionsWidth=0,o._onDidOptionChange=o._register(new rn.a),o.onDidOptionChange=o._onDidOptionChange.event,o._onKeyDown=o._register(new rn.a),o.onKeyDown=o._onKeyDown.event,o._onMouseDown=o._register(new rn.a),o._onInput=o._register(new rn.a),o._onKeyUp=o._register(new rn.a),o._onPreserveCaseKeyDown=o._register(new rn.a),o.onPreserveCaseKeyDown=o._onPreserveCaseKeyDown.event,o.contextViewProvider=r,o.placeholder=a.placeholder||"",o.validation=a.validation,o.label=a.label||Yu,o.inputActiveOptionBorder=a.inputActiveOptionBorder,o.inputActiveOptionForeground=a.inputActiveOptionForeground,o.inputActiveOptionBackground=a.inputActiveOptionBackground,o.inputBackground=a.inputBackground,o.inputForeground=a.inputForeground,o.inputBorder=a.inputBorder,o.inputValidationInfoBorder=a.inputValidationInfoBorder,o.inputValidationInfoBackground=a.inputValidationInfoBackground,o.inputValidationInfoForeground=a.inputValidationInfoForeground,o.inputValidationWarningBorder=a.inputValidationWarningBorder,o.inputValidationWarningBackground=a.inputValidationWarningBackground,o.inputValidationWarningForeground=a.inputValidationWarningForeground,o.inputValidationErrorBorder=a.inputValidationErrorBorder,o.inputValidationErrorBackground=a.inputValidationErrorBackground,o.inputValidationErrorForeground=a.inputValidationErrorForeground;var s=a.appendPreserveCaseLabel||"",u=a.history||[],c=!!a.flexibleHeight,l=!!a.flexibleWidth,d=a.flexibleMaxHeight;o.domNode=document.createElement("div"),o.domNode.classList.add("monaco-findInput"),o.inputBox=o._register(new Ku.a(o.domNode,o.contextViewProvider,{ariaLabel:o.label||"",placeholder:o.placeholder||"",validationOptions:{validation:o.validation},inputBackground:o.inputBackground,inputForeground:o.inputForeground,inputBorder:o.inputBorder,inputValidationInfoBackground:o.inputValidationInfoBackground,inputValidationInfoForeground:o.inputValidationInfoForeground,inputValidationInfoBorder:o.inputValidationInfoBorder,inputValidationWarningBackground:o.inputValidationWarningBackground,inputValidationWarningForeground:o.inputValidationWarningForeground,inputValidationWarningBorder:o.inputValidationWarningBorder,inputValidationErrorBackground:o.inputValidationErrorBackground,inputValidationErrorForeground:o.inputValidationErrorForeground,inputValidationErrorBorder:o.inputValidationErrorBorder,history:u,flexibleHeight:c,flexibleWidth:l,flexibleMaxHeight:d})),o.preserveCase=o._register(new $u({appendTitle:s,isChecked:!1,inputActiveOptionBorder:o.inputActiveOptionBorder,inputActiveOptionForeground:o.inputActiveOptionForeground,inputActiveOptionBackground:o.inputActiveOptionBackground})),o._register(o.preserveCase.onChange((function(e){o._onDidOptionChange.fire(e),!e&&o.fixFocusOnOptionClickEnabled&&o.inputBox.focus(),o.validate()}))),o._register(o.preserveCase.onKeyDown((function(e){o._onPreserveCaseKeyDown.fire(e)}))),o._showOptionButtons?o.cachedOptionsWidth=o.preserveCase.width():o.cachedOptionsWidth=0;var p=[o.preserveCase.domNode];o.onkeydown(o.domNode,(function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=p.indexOf(document.activeElement);if(t>=0){var n=-1;e.equals(17)?n=(t+1)%p.length:e.equals(15)&&(n=0===t?p.length-1:t-1),e.equals(9)?(p[t].blur(),o.inputBox.focus()):n>=0&&p[n].focus(),Ht.EventHelper.stop(e,!0)}}}));var f=document.createElement("div");return f.className="controls",f.style.display=o._showOptionButtons?"block":"none",f.appendChild(o.preserveCase.domNode),o.domNode.appendChild(f),e&&e.appendChild(o.domNode),o.onkeydown(o.inputBox.inputElement,(function(e){return o._onKeyDown.fire(e)})),o.onkeyup(o.inputBox.inputElement,(function(e){return o._onKeyUp.fire(e)})),o.oninput(o.inputBox.inputElement,(function(e){return o._onInput.fire()})),o.onmousedown(o.inputBox.inputElement,(function(e){return o._onMouseDown.fire(e)})),o}return Object(J.a)(n,[{key:"enable",value:function(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}},{key:"disable",value:function(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}},{key:"setEnabled",value:function(e){e?this.enable():this.disable()}},{key:"style",value:function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,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()}},{key:"applyStyles",value:function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,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)}}},{key:"select",value:function(){this.inputBox.select()}},{key:"focus",value:function(){this.inputBox.focus()}},{key:"getPreserveCase",value:function(){return this.preserveCase.checked}},{key:"setPreserveCase",value:function(e){this.preserveCase.checked=e}},{key:"focusOnPreserve",value:function(){this.preserveCase.focus()}},{key:"validate",value:function(){this.inputBox&&this.inputBox.validate()}},{key:"dispose",value:function(){Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}},{key:"width",set:function(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}}]),n}(_r.a),Xu=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Zu=function(e,t){return function(n,r){t(n,r,e)}},ec="historyNavigationWidget",tc="historyNavigationEnabled";function nc(e,t){return e.getContext(document.activeElement).getValue(t)}function rc(e,t){var n=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,n){new te.c(n,t).bindTo(e)}(n,t,ec),{scopedContextKeyService:n,historyNavigationEnablement:new te.c(tc,!0).bindTo(n)}}var ic=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return Object(Y.a)(this,n),(o=t.call(this,e,r,s,i))._register(rc(a,{target:o.inputBox.element,historyNavigator:o.inputBox}).scopedContextKeyService),o}return n}(Gu);ic=Xu([Zu(3,te.b)],ic);var ac=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return Object(Y.a)(this,n),(o=t.call(this,e,r,s,i))._register(rc(a,{target:o.inputBox.element,historyNavigator:o.inputBox}).scopedContextKeyService),o}return n}(Qu);ac=Xu([Zu(3,te.b)],ac),jo.a.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:te.a.and(te.a.has(ec),te.a.equals(tc,!0)),primary:16,secondary:[528],handler:function(e,t){var n=nc(e.get(te.b),ec);n&&n.historyNavigator.showPreviousValue()}}),jo.a.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:te.a.and(te.a.has(ec),te.a.equals(tc,!0)),primary:18,secondary:[530],handler:function(e,t){var n=nc(e.get(te.b),ec);n&&n.historyNavigator.showNextValue()}});var oc=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},sc=Object($i.b)("find-selection",on.b.selection,Q.a("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),uc=Object($i.b)("find-collapsed",on.b.chevronRight,Q.a("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),cc=Object($i.b)("find-expanded",on.b.chevronDown,Q.a("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),lc=Object($i.b)("find-replace",on.b.replace,Q.a("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),dc=Object($i.b)("find-replace-all",on.b.replaceAll,Q.a("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),pc=Object($i.b)("find-previous-match",on.b.arrowUp,Q.a("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),fc=Object($i.b)("find-next-match",on.b.arrowDown,Q.a("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),hc=Q.a("label.find","Find"),gc=Q.a("placeholder.find","Find"),mc=Q.a("label.previousMatchButton","Previous match"),_c=Q.a("label.nextMatchButton","Next match"),vc=Q.a("label.toggleSelectionFind","Find in selection"),yc=Q.a("label.closeButton","Close"),bc=Q.a("label.replace","Replace"),Dc=Q.a("placeholder.replace","Replace"),Ec=Q.a("label.replaceButton","Replace"),Cc=Q.a("label.replaceAllButton","Replace All"),Sc=Q.a("label.toggleReplaceButton","Toggle Replace mode"),xc=Q.a("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Iu),kc=Q.a("label.matchesLocation","{0} of {1}"),Tc=Q.a("label.noResults","No results"),wc=419,Ac=69,Oc="ctrlEnterReplaceAll.windows.donotask",Nc=Ge.f?256:2048,Ic=function e(t){Object(Y.a)(this,e),this.afterLineNumber=t,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"};function Fc(e,t,n){var r=!!t.match(/\n/);n&&r&&n.selectionStart>0&&e.stopPropagation()}function Lc(e,t,n){var r=!!t.match(/\n/);n&&r&&n.selectionEnd0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",t),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}},{key:"_delayedUpdateHistory",value:function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,ie.e)}},{key:"_updateHistory",value:function(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}},{key:"_updateMatchesCount",value:function(){var e;if(this._matchesCount.style.minWidth=Ac+"px",this._state.matchesCount>=Iu?this._matchesCount.title=xc:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){var t=String(this._state.matchesCount);this._state.matchesCount>=Iu&&(t+="+");var n=String(this._state.matchesPosition);"0"===n&&(n="?"),e=ft.w(kc,n,t)}else e=Tc;this._matchesCount.appendChild(document.createTextNode(e)),Object(pe.a)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Ac=Math.max(Ac,this._matchesCount.clientWidth)}},{key:"_getAriaLabel",value:function(e,t,n){if(e===Tc)return""===n?Q.a("ariaSearchNoResultEmpty","{0} found",e):Q.a("ariaSearchNoResult","{0} found for '{1}'",e,n);if(t){var r=Q.a("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,n,t.startLineNumber+":"+t.startColumn),i=this._codeEditor.getModel();if(i&&t.startLineNumber<=i.getLineCount()&&t.startLineNumber>=1){var a=i.getLineContent(t.startLineNumber);return"".concat(a,", ").concat(r)}return r}return Q.a("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,n)}},{key:"_updateToggleSelectionFindButton",value:function(){var e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),n=this._toggleSelectionFind.checked;this._isVisible&&(n||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}},{key:"_updateButtons",value:function(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);var e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);var n=!this._codeEditor.getOption(75);this._toggleReplaceBtn.setEnabled(this._isVisible&&n)}},{key:"_reveal",value:function(){var e=this;if(this._revealTimeouts.forEach((function(e){clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;var t=this._codeEditor.getSelection();switch(this._codeEditor.getOption(31).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":var n=!!t&&t.startLineNumber!==t.endLineNumber;this._toggleSelectionFind.checked=n}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((function(){e._domNode.classList.add("visible"),e._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((function(){e._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);var r=!0;if(this._codeEditor.getOption(31).seedSearchStringFromSelection&&t){var i=this._codeEditor.getDomNode();if(i){var a=Ht.getDomNodePagePosition(i),o=this._codeEditor.getScrolledVisiblePosition(t.getStartPosition()),s=a.left+(o?o.left:0),u=o?o.top:0;if(this._viewZone&&ut.startLineNumber&&(r=!1);var c=Ht.getTopLeftOffset(this._domNode).left;s>c&&(r=!1);var l=this._codeEditor.getScrolledVisiblePosition(t.getEndPosition());a.left+(l?l.left:0)>c&&(r=!1)}}}this._showViewZone(r)}}},{key:"_hide",value:function(e){this._revealTimeouts.forEach((function(e){clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}},{key:"_layoutViewZone",value:function(e){var t=this;if(this._codeEditor.getOption(31).addExtraSpaceOnTop){if(this._isVisible){var n=this._viewZone;void 0===this._viewZoneId&&n&&this._codeEditor.changeViewZones((function(r){n.heightInPx=t._getHeight(),t._viewZoneId=r.addZone(n),t._codeEditor.setScrollTop(e||t._codeEditor.getScrollTop()+n.heightInPx)}))}}else this._removeViewZone()}},{key:"_showViewZone",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._isVisible){var n=this._codeEditor.getOption(31).addExtraSpaceOnTop;if(n){void 0===this._viewZone&&(this._viewZone=new Ic(0));var r=this._viewZone;this._codeEditor.changeViewZones((function(n){if(void 0!==e._viewZoneId){var i=e._getHeight();if(i===r.heightInPx)return;var a=i-r.heightInPx;return r.heightInPx=i,n.layoutZone(e._viewZoneId),void(t&&e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+a))}var o=e._getHeight();(o-=e._codeEditor.getOption(69).top)<=0||(r.heightInPx=o,e._viewZoneId=n.addZone(r),t&&e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+o))}))}}}},{key:"_removeViewZone",value:function(){var e=this;this._codeEditor.changeViewZones((function(t){void 0!==e._viewZoneId&&(t.removeZone(e._viewZoneId),e._viewZoneId=void 0,e._viewZone&&(e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()-e._viewZone.heightInPx),e._viewZone=void 0))}))}},{key:"_applyTheme",value:function(e){var t={inputActiveOptionBorder:e.getColor(Ne.ib),inputActiveOptionBackground:e.getColor(Ne.hb),inputActiveOptionForeground:e.getColor(Ne.jb),inputBackground:e.getColor(Ne.kb),inputForeground:e.getColor(Ne.mb),inputBorder:e.getColor(Ne.lb),inputValidationInfoBackground:e.getColor(Ne.qb),inputValidationInfoForeground:e.getColor(Ne.sb),inputValidationInfoBorder:e.getColor(Ne.rb),inputValidationWarningBackground:e.getColor(Ne.tb),inputValidationWarningForeground:e.getColor(Ne.vb),inputValidationWarningBorder:e.getColor(Ne.ub),inputValidationErrorBackground:e.getColor(Ne.nb),inputValidationErrorForeground:e.getColor(Ne.pb),inputValidationErrorBorder:e.getColor(Ne.ob)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}},{key:"_tryUpdateWidgetWidth",value:function(){if(this._isVisible&&Ht.isInDOM(this._domNode)){var e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)this._domNode.classList.add("hiddenEditor");else{this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");var t=e.width,n=e.minimap.minimapWidth,r=!1,i=!1,a=!1;if(this._resized)if(Ht.getTotalWidth(this._domNode)>wc)return this._domNode.style.maxWidth="".concat(t-28-n-15,"px"),void(this._replaceInput.width=Ht.getTotalWidth(this._findInput.domNode));if(447+n>=t&&(i=!0),447+n-Ac>=t&&(a=!0),447+n-Ac>=t+50&&(r=!0),this._domNode.classList.toggle("collapsed-find-widget",r),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",i),a||r||(this._domNode.style.maxWidth="".concat(t-28-n-15,"px")),this._resized){this._findInput.inputBox.layout();var o=this._findInput.inputBox.element.clientWidth;o>0&&(this._replaceInput.width=o)}else this._isReplaceVisible&&(this._replaceInput.width=Ht.getTotalWidth(this._findInput.domNode))}}}},{key:"_getHeight",value:function(){var e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4}},{key:"_tryUpdateHeight",value:function(){var e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height="".concat(e,"px"),!0)}},{key:"focusFindInput",value:function(){this._findInput.select(),this._findInput.focus()}},{key:"focusReplaceInput",value:function(){this._replaceInput.select(),this._replaceInput.focus()}},{key:"highlightFindOptions",value:function(){this._findInput.highlightFindOptions()}},{key:"_updateSearchScope",value:function(){var e=this;if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){var t=this._codeEditor.getSelections();t.map((function(t){1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,e._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));var n=e._state.currentMatch;return t.startLineNumber===t.endLineNumber||Te.a.equalsRange(t,n)?null:t})).filter((function(e){return!!e})),t.length&&this._state.change({searchScope:t},!0)}}},{key:"_onFindInputMouseDown",value:function(e){e.middleButton&&e.stopPropagation()}},{key:"_onFindInputKeyDown",value:function(e){return e.equals(3|Nc)?(this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?Fc(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?Lc(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}},{key:"_onReplaceInputKeyDown",value:function(e){return e.equals(3|Nc)?(Ge.j&&Ge.g&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(Q.a("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(Oc,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?Fc(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?Lc(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}},{key:"getVerticalSashLeft",value:function(e){return 0}},{key:"_keybindingLabelFor",value:function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" (".concat(t.getLabel(),")"):""}},{key:"_buildDomNode",value:function(){var e=this;this._findInput=this._register(new ic(null,this._contextViewProvider,{width:221,label:hc,placeholder:gc,appendCaseSensitiveLabel:this._keybindingLabelFor(Su),appendWholeWordsLabel:this._keybindingLabelFor(xu),appendRegexLabel:this._keybindingLabelFor(ku),validation:function(t){if(0===t.length||!e._findInput.getRegex())return null;try{return new RegExp(t,"gu"),null}catch(n){return{content:n.message}}},flexibleHeight:true,flexibleWidth:true,flexibleMaxHeight:118},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((function(t){return e._onFindInputKeyDown(t)}))),this._register(this._findInput.inputBox.onDidChange((function(){e._ignoreChangeEvent||e._state.change({searchString:e._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((function(){e._state.change({isRegex:e._findInput.getRegex(),wholeWord:e._findInput.getWholeWords(),matchCase:e._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((function(t){t.equals(1026)&&e._isReplaceVisible&&(e._replaceInput.focus(),t.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceInput.focusOnPreserve(),t.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((function(t){e._tryUpdateHeight()&&e._showViewZone()}))),Ge.d&&this._register(this._findInput.onMouseDown((function(t){return e._onFindInputMouseDown(t)}))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Rc({label:mc+this._keybindingLabelFor(yu),icon:pc,onTrigger:function(){e._codeEditor.getAction(yu).run().then(void 0,ie.e)}})),this._nextBtn=this._register(new Rc({label:_c+this._keybindingLabelFor(vu),icon:fc,onTrigger:function(){e._codeEditor.getAction(vu).run().then(void 0,ie.e)}}));var t=document.createElement("div");t.className="find-part",t.appendChild(this._findInput.domNode);var n=document.createElement("div");n.className="find-actions",t.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Pu({icon:sc,title:vc+this._keybindingLabelFor(Tu),isChecked:!1})),this._register(this._toggleSelectionFind.onChange((function(){if(e._toggleSelectionFind.checked){if(e._codeEditor.hasModel()){var t=e._codeEditor.getSelections();t.map((function(t){return 1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,e._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t})).filter((function(e){return!!e})),t.length&&e._state.change({searchScope:t},!0)}}else e._state.change({searchScope:null},!0)}))),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Rc({label:yc+this._keybindingLabelFor(Cu),icon:$i.c,onTrigger:function(){e._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),n.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new ac(null,void 0,{label:bc,placeholder:Dc,appendPreserveCaseLabel:this._keybindingLabelFor(wu),history:[],flexibleHeight:true,flexibleWidth:true,flexibleMaxHeight:118},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((function(t){return e._onReplaceInputKeyDown(t)}))),this._register(this._replaceInput.inputBox.onDidChange((function(){e._state.change({replaceString:e._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((function(t){e._isReplaceVisible&&e._tryUpdateHeight()&&e._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((function(){e._state.change({preserveCase:e._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((function(t){t.equals(2)&&(e._prevBtn.isEnabled()?e._prevBtn.focus():e._nextBtn.isEnabled()?e._nextBtn.focus():e._toggleSelectionFind.enabled?e._toggleSelectionFind.focus():e._closeBtn.isEnabled()&&e._closeBtn.focus(),t.preventDefault())}))),this._replaceBtn=this._register(new Rc({label:Ec+this._keybindingLabelFor(Au),icon:lc,onTrigger:function(){e._controller.replace()},onKeyDown:function(t){t.equals(1026)&&(e._closeBtn.focus(),t.preventDefault())}})),this._replaceAllBtn=this._register(new Rc({label:Cc+this._keybindingLabelFor(Ou),icon:dc,onTrigger:function(){e._controller.replaceAll()}}));var r=document.createElement("div");r.className="replace-part",r.appendChild(this._replaceInput.domNode);var i=document.createElement("div");i.className="replace-actions",r.appendChild(i),i.appendChild(this._replaceBtn.domNode),i.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Rc({label:Sc,className:"codicon toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1),e._isReplaceVisible&&(e._replaceInput.width=Ht.getTotalWidth(e._findInput.domNode),e._replaceInput.inputBox.layout()),e._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="".concat(wc,"px"),this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(r),this._resizeSash=new zr.b(this._domNode,this,{orientation:0,size:2}),this._resized=!1;var a=wc;this._register(this._resizeSash.onDidStart((function(){a=Ht.getTotalWidth(e._domNode)}))),this._register(this._resizeSash.onDidChange((function(t){e._resized=!0;var n=a+t.startX-t.currentX;n(parseFloat(Ht.getComputedStyle(e._domNode).maxWidth)||0)||(e._domNode.style.width="".concat(n,"px"),e._isReplaceVisible&&(e._replaceInput.width=Ht.getTotalWidth(e._findInput.domNode)),e._findInput.inputBox.layout(),e._tryUpdateHeight()))}))),this._register(this._resizeSash.onDidReset((function(){var t=Ht.getTotalWidth(e._domNode);if(!(t=0}},{key:"focus",value:function(){this._domNode.focus()}},{key:"setEnabled",value:function(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}},{key:"setExpanded",value:function(e){var t,n,r,i;(this._domNode.setAttribute("aria-expanded",String(!!e)),e)?((t=this._domNode.classList).remove.apply(t,Object(ct.a)(Ie.d.asClassNameArray(uc))),(n=this._domNode.classList).add.apply(n,Object(ct.a)(Ie.d.asClassNameArray(cc)))):((r=this._domNode.classList).remove.apply(r,Object(ct.a)(Ie.d.asClassNameArray(cc))),(i=this._domNode.classList).add.apply(i,Object(ct.a)(Ie.d.asClassNameArray(uc))))}},{key:"domNode",get:function(){return this._domNode}}]),n}(_r.a);Object(Ie.f)((function(e,t){var n=function(e,n){n&&t.addRule(".monaco-editor ".concat(e," { background-color: ").concat(n,"; }"))};n(".findMatch",e.getColor(Ne.y)),n(".currentFindMatch",e.getColor(Ne.w)),n(".findScope",e.getColor(Ne.A)),n(".find-widget",e.getColor(Ne.Z));var r=e.getColor(Ne.zc);r&&t.addRule(".monaco-editor .find-widget { box-shadow: 0 0 8px 2px ".concat(r,"; }"));var i=e.getColor(Ne.z);i&&t.addRule(".monaco-editor .findMatch { border: 1px ".concat("hc"===e.type?"dotted":"solid"," ").concat(i,"; box-sizing: border-box; }"));var a=e.getColor(Ne.x);a&&t.addRule(".monaco-editor .currentFindMatch { border: 2px solid ".concat(a,"; padding: 1px; box-sizing: border-box; }"));var o=e.getColor(Ne.B);o&&t.addRule(".monaco-editor .findScope { border: 1px ".concat("hc"===e.type?"dashed":"solid"," ").concat(o,"; }"));var s=e.getColor(Ne.h);s&&t.addRule(".monaco-editor .find-widget { border: 1px solid ".concat(s,"; }"));var u=e.getColor(Ne.bb);u&&t.addRule(".monaco-editor .find-widget { color: ".concat(u,"; }"));var c=e.getColor(Ne.db);c&&t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: ".concat(c,"; }"));var l=e.getColor(Ne.cb);if(l)t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: ".concat(l,"; }"));else{var d=e.getColor(Ne.ab);d&&t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: ".concat(d,"; }"))}var p=e.getColor(Ne.eb);p&&t.addRule(".monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ".concat(p,"; }"))}));var Mc=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Bc=function(e,t){return function(n,r){t(n,r,e)}},jc=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Uc=524288;function Vc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"single";if(!e.hasModel())return null;var n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){var r=e.getConfiguredWordAtPosition(n.getStartPosition());if(r)return r.word}else if(e.getModel().getValueLengthInRange(n)t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,e._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t})).filter((function(e){return!!e})),t.length&&this._state.change({searchScope:t},!0)}}},{key:"setSearchString",value:function(e){this._state.isRegex&&(e=ft.u(e)),this._state.change({searchString:e},!1)}},{key:"highlightFindOptions",value:function(){}},{key:"_start",value:function(e){return jc(this,void 0,void 0,K.a.mark((function t(){var n,r,i,a,o;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.disposeModel(),this._editor.hasModel()){t.next=3;break}return t.abrupt("return");case 3:if(n={isRevealed:!0},"single"===e.seedSearchStringFromSelection?(r=Vc(this._editor,e.seedSearchStringFromSelection))&&(this._state.isRegex?n.searchString=ft.u(r):n.searchString=r):"multiple"!==e.seedSearchStringFromSelection||e.updateSearchScope||(i=Vc(this._editor,e.seedSearchStringFromSelection))&&(n.searchString=i),n.searchString||!e.seedSearchStringFromGlobalClipboard){t.next=12;break}return t.next=8,this.getGlobalBufferTerm();case 8:if(a=t.sent,this._editor.hasModel()){t.next=11;break}return t.abrupt("return");case 11:a&&(n.searchString=a);case 12:e.forceRevealReplace?n.isReplaceRevealed=!0:this._findWidgetVisible.get()||(n.isReplaceRevealed=!1),e.updateSearchScope&&(o=this._editor.getSelections()).some((function(e){return!e.isEmpty()}))&&(n.searchScope=o),n.loop=e.loop,this._state.change(n,!1),this._model||(this._model=new Fu(this._editor,this._state));case 17:case"end":return t.stop()}}),t,this)})))}},{key:"start",value:function(e){return this._start(e)}},{key:"moveToNextMatch",value:function(){return!!this._model&&(this._model.moveToNextMatch(),!0)}},{key:"moveToPrevMatch",value:function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}},{key:"replace",value:function(){return!!this._model&&(this._model.replace(),!0)}},{key:"replaceAll",value:function(){return!!this._model&&(this._model.replaceAll(),!0)}},{key:"selectAllMatches",value:function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}},{key:"getGlobalBufferTerm",value:function(){return jc(this,void 0,void 0,K.a.mark((function e(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._editor.getOption(31).globalFindClipboard||!this._editor.hasModel()||this._editor.getModel().isTooLargeForSyncing()){e.next=2;break}return e.abrupt("return",this._clipboardService.readFindText());case 2:return e.abrupt("return","");case 3:case"end":return e.stop()}}),e,this)})))}},{key:"setGlobalBufferTerm",value:function(e){this._editor.getOption(31).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}},{key:"editor",get:function(){return this._editor}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(xe.a);zc.ID="editor.contrib.findController";var Hc=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a,o,s,u,c){var l;return Object(Y.a)(this,n),(l=t.call(this,e,i,u,c))._contextViewService=r,l._keybindingService=a,l._themeService=o,l._notificationService=s,l._widget=null,l._findOptionsWidget=null,l}return Object(J.a)(n,[{key:"_start",value:function(e){var t=this,r=Object.create(null,{_start:{get:function(){return Object(en.a)(Object(tn.a)(n.prototype),"_start",t)}}});return jc(this,void 0,void 0,K.a.mark((function t(){var n,i,a;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this._widget||this._createFindWidget(),n=this._editor.getSelection(),i=!1,t.t0=this._editor.getOption(31).autoFindInSelection,t.next="always"===t.t0?6:"never"===t.t0?8:"multiline"===t.t0?10:13;break;case 6:return i=!0,t.abrupt("break",14);case 8:return i=!1,t.abrupt("break",14);case 10:return a=!!n&&n.startLineNumber!==n.endLineNumber,i=a,t.abrupt("break",14);case 13:return t.abrupt("break",14);case 14:return e.updateSearchScope=i,t.next=17,r._start.call(this,e);case 17:this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput());case 18:case"end":return t.stop()}}),t,this)})))}},{key:"highlightFindOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}},{key:"_createFindWidget",value:function(){this._widget=this._register(new Pc(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new zu(this._editor,this._state,this._keybindingService,this._themeService))}}]),n}(zc=Mc([Bc(1,te.b),Bc(2,Jn.a),Bc(3,$e.a)],zc));Hc=Mc([Bc(1,Kt.b),Bc(2,te.b),Bc(3,qt.a),Bc(4,Ie.b),Bc(5,mn.a),Bc(6,Jn.a),Bc(7,$e.a)],Hc);var Wc=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:mu,label:Q.a("startFindAction","Find"),alias:"Find",precondition:te.a.or(te.a.has("editorFocus"),te.a.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Fe.b.MenubarEditMenu,group:"3_find",title:Q.a({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})}return Object(J.a)(n,[{key:"run",value:function(e,t){return jc(this,void 0,void 0,K.a.mark((function e(){var n;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=zc.get(t))){e.next=4;break}return e.next=4,n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(31).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:t.getOption(31).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(31).loop});case 4:case"end":return e.stop()}}),e)})))}}]),n}($.f),Kc=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:_u,label:Q.a("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){return jc(this,void 0,void 0,K.a.mark((function e(){var n;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=zc.get(t))){e.next=5;break}return e.next=4,n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(31).loop});case 4:n.setGlobalBufferTerm(n.getState().searchString);case 5:case"end":return e.stop()}}),e)})))}}]),n}($.b),qc=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"run",value:function(e,t){return jc(this,void 0,void 0,K.a.mark((function e(){var n;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=zc.get(t))||this._run(n)){e.next=5;break}return e.next=4,n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&t.getOption(31).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(31).loop});case 4:this._run(n);case 5:case"end":return e.stop()}}),e,this)})))}}]),n}($.b),Gc=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:vu,label:Q.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100}})}return Object(J.a)(n,[{key:"_run",value:function(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}]),n}(qc),Yc=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:vu,label:Q.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:te.a.and(X.a.focus,cu),primary:3,weight:100}})}return Object(J.a)(n,[{key:"_run",value:function(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}]),n}(qc),Jc=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:yu,label:Q.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})}return Object(J.a)(n,[{key:"_run",value:function(e){return e.moveToPrevMatch()}}]),n}(qc),$c=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:yu,label:Q.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:te.a.and(X.a.focus,cu),primary:1027,weight:100}})}return Object(J.a)(n,[{key:"_run",value:function(e){return e.moveToPrevMatch()}}]),n}(qc),Qc=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"run",value:function(e,t){return jc(this,void 0,void 0,K.a.mark((function e(){var n,r;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=zc.get(t)){e.next=3;break}return e.abrupt("return");case 3:if((r=Vc(t))&&n.setSearchString(r),this._run(n)){e.next=9;break}return e.next=8,n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(31).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(31).loop});case 8:this._run(n);case 9:case"end":return e.stop()}}),e,this)})))}}]),n}($.b),Xc=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:bu,label:Q.a("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:2109,weight:100}})}return Object(J.a)(n,[{key:"_run",value:function(e){return e.moveToNextMatch()}}]),n}(Qc),Zc=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Du,label:Q.a("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:3133,weight:100}})}return Object(J.a)(n,[{key:"_run",value:function(e){return e.moveToPrevMatch()}}]),n}(Qc),el=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:Eu,label:Q.a("startReplace","Replace"),alias:"Replace",precondition:te.a.or(te.a.has("editorFocus"),te.a.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Fe.b.MenubarEditMenu,group:"3_find",title:Q.a({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})}return Object(J.a)(n,[{key:"run",value:function(e,t){return jc(this,void 0,void 0,K.a.mark((function e(){var n,r,i,a,o;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.hasModel()&&!t.getOption(75)){e.next=2;break}return e.abrupt("return");case 2:if(n=zc.get(t),r=t.getSelection(),i=n.isFindInputFocused(),a=!r.isEmpty()&&r.startLineNumber===r.endLineNumber&&t.getOption(31).seedSearchStringFromSelection&&!i,o=i||a?2:1,!n){e.next=10;break}return e.next=10,n.start({forceRevealReplace:!0,seedSearchStringFromSelection:a?"single":"none",seedSearchStringFromGlobalClipboard:t.getOption(31).seedSearchStringFromSelection,shouldFocus:o,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(31).loop});case 10:case"end":return e.stop()}}),e)})))}}]),n}($.f);Object($.l)(zc.ID,Hc);var tl=new Wc;Object($.p)(tl),Object($.j)(Kc),Object($.j)(Gc),Object($.j)(Yc),Object($.j)(Jc),Object($.j)($c),Object($.j)(Xc),Object($.j)(Zc);var nl=new el;Object($.p)(nl);var rl=$.c.bindToContribution(zc.get);Object($.k)(new rl({id:Cu,precondition:uu,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:105,kbExpr:te.a.and(X.a.focus,te.a.not("isComposing")),primary:9,secondary:[1033]}})),Object($.k)(new rl({id:Su,precondition:void 0,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:du.primary,mac:du.mac,win:du.win,linux:du.linux}})),Object($.k)(new rl({id:xu,precondition:void 0,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:pu.primary,mac:pu.mac,win:pu.win,linux:pu.linux}})),Object($.k)(new rl({id:ku,precondition:void 0,handler:function(e){return e.toggleRegex()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:fu.primary,mac:fu.mac,win:fu.win,linux:fu.linux}})),Object($.k)(new rl({id:Tu,precondition:void 0,handler:function(e){return e.toggleSearchScope()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:hu.primary,mac:hu.mac,win:hu.win,linux:hu.linux}})),Object($.k)(new rl({id:wu,precondition:void 0,handler:function(e){return e.togglePreserveCase()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:gu.primary,mac:gu.mac,win:gu.win,linux:gu.linux}})),Object($.k)(new rl({id:Au,precondition:uu,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:3094}})),Object($.k)(new rl({id:Au,precondition:uu,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:te.a.and(X.a.focus,lu),primary:3}})),Object($.k)(new rl({id:Ou,precondition:uu,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:2563}})),Object($.k)(new rl({id:Ou,precondition:uu,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:te.a.and(X.a.focus,lu),primary:void 0,mac:{primary:2051}}})),Object($.k)(new rl({id:Nu,precondition:uu,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:105,kbExpr:X.a.focus,primary:515}}));n(409);var il=16777215,al=4278190080,ol=function(){function e(t,n,r){if(Object(Y.a)(this,e),t.length!==n.length||t.length>65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=t,this._endIndexes=n,this._collapseStates=new Uint32Array(Math.ceil(t.length/32)),this._types=r,this._parentsComputed=!1}return Object(J.a)(e,[{key:"ensureParentIndices",value:function(){var e=this;if(!this._parentsComputed){this._parentsComputed=!0;for(var t=[],n=function(n,r){var i=t[t.length-1];return e.getStartLineNumber(i)<=n&&e.getEndLineNumber(i)>=r},r=0,i=this._startIndexes.length;ril||o>il)throw new Error("startLineNumber or endLineNumber must not exceed 16777215");for(;t.length>0&&!n(a,o);)t.pop();var s=t.length>0?t[t.length-1]:-1;t.push(r),this._startIndexes[r]=a+((255&s)<<24),this._endIndexes[r]=o+((65280&s)<<16)}}}},{key:"getStartLineNumber",value:function(e){return this._startIndexes[e]&il}},{key:"getEndLineNumber",value:function(e){return this._endIndexes[e]&il}},{key:"getType",value:function(e){return this._types?this._types[e]:void 0}},{key:"hasTypes",value:function(){return!!this._types}},{key:"isCollapsed",value:function(e){var t=e/32|0,n=e%32;return 0!==(this._collapseStates[t]&1<>>24)+((this._endIndexes[e]&al)>>>16);return 65535===t?-1:t}},{key:"contains",value:function(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}},{key:"findIndex",value: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}},{key:"toString",value:function(){for(var e=[],t=0;t=this.endLineNumber}},{key:"containsLine",value:function(e){return this.startLineNumber<=e&&e<=this.endLineNumber}},{key:"startLineNumber",get:function(){return this.ranges.getStartLineNumber(this.index)}},{key:"endLineNumber",get:function(){return this.ranges.getEndLineNumber(this.index)}},{key:"regionIndex",get:function(){return this.index}},{key:"parentIndex",get:function(){return this.ranges.getParentIndex(this.index)}},{key:"isCollapsed",get:function(){return this.ranges.isCollapsed(this.index)}}]),e}(),ul=function(){function e(t,n){Object(Y.a)(this,e),this._updateEventEmitter=new rn.a,this.onDidChange=this._updateEventEmitter.event,this._textModel=t,this._decorationProvider=n,this._regions=new ol(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}return Object(J.a)(e,[{key:"toggleCollapseState",value:function(e){var t=this;if(e.length){e=e.sort((function(e,t){return e.regionIndex-t.regionIndex}));var n={};this._decorationProvider.changeDecorations((function(r){var i,a=0,o=-1,s=-1,u=function(e){for(;as&&(s=n),a++}},c=Object(Ee.a)(e);try{for(c.s();!(i=c.n()).done;){var l=i.value.regionIndex,d=t._editorDecorationIds[l];if(d&&!n[d]){n[d]=!0,u(l);var p=!t._regions.isCollapsed(l);t._regions.setCollapsed(l,p),o=Math.max(o,t._regions.getEndLineNumber(l))}}}catch(f){c.e(f)}finally{c.f()}u(t._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}}},{key:"update",value:function(e){for(var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[],i=function(e,t){var r,i=Object(Ee.a)(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(ea&&(a=u)},s=0,u=function(){for(;s=f))break;o(c,p===f),c++}}l=u()}for(;c0)return e}},{key:"applyMemento",value:function(e){if(Array.isArray(e)){var t,n=[],r=Object(Ee.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,a=this.getRegionAtLine(i.startLineNumber);a&&!a.isCollapsed&&n.push(a)}}catch(o){r.e(o)}finally{r.f()}this.toggleCollapseState(n)}}},{key:"dispose",value:function(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}},{key:"getAllRegionsAtLine",value:function(e,t){var n=[];if(this._regions)for(var r=this._regions.findRange(e),i=1;r>=0;){var a=this._regions.toRegion(r);t&&!t(a,i)||n.push(a),i++,r=a.parentIndex}return n}},{key:"getRegionAtLine",value:function(e){if(this._regions){var t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}},{key:"getRegionsInside",value:function(e,t){var n=[],r=e?e.regionIndex+1:0,i=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length)for(var a=[],o=r,s=this._regions.length;o0&&!u.containedBy(a[a.length-1]);)a.pop();a.push(u),t(u,a.length)&&n.push(u)}else for(var c=r,l=this._regions.length;c2&&void 0!==arguments[2]?arguments[2]:Number.MAX_VALUE,r=arguments.length>3?arguments[3]:void 0,i=[];if(r&&r.length>0){var a,o=Object(Ee.a)(r);try{for(o.s();!(a=o.n()).done;){var s=a.value,u=e.getRegionAtLine(s);if(u&&(u.isCollapsed!==t&&i.push(u),n>1)){var c=e.getRegionsInside(u,(function(e,r){return e.isCollapsed!==t&&r=0;o--)if(n!==i.isCollapsed(o)){var s=i.getStartLineNumber(o);t.test(r.getLineContent(s))&&a.push(i.toRegion(o))}e.toggleCollapseState(a)}function pl(e,t,n){for(var r=e.regions,i=[],a=r.length-1;a>=0;a--)n!==r.isCollapsed(a)&&t===r.getType(a)&&i.push(r.toRegion(a));e.toggleCollapseState(i)}var fl=Object($i.b)("folding-expanded",on.b.chevronDown,Object(Q.a)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),hl=Object($i.b)("folding-collapsed",on.b.chevronRight,Object(Q.a)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin.")),gl=function(){function e(t){Object(Y.a)(this,e),this.editor=t,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}return Object(J.a)(e,[{key:"getDecorationOption",value:function(t,n){return n?e.HIDDEN_RANGE_DECORATION:t?this.showFoldingHighlights?e.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:e.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:e.EXPANDED_VISUAL_DECORATION}},{key:"deltaDecorations",value:function(e,t){return this.editor.deltaDecorations(e,t)}},{key:"changeDecorations",value:function(e){return this.editor.changeDecorations(e)}}]),e}();gl.COLLAPSED_VISUAL_DECORATION=Ae.a.register({stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:Ie.d.asClassName(hl)}),gl.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Ae.a.register({stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:Ie.d.asClassName(hl)}),gl.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ae.a.register({stickiness:1,isWholeLine:!0,firstLineDecorationClassName:Ie.d.asClassName(fl)}),gl.EXPANDED_VISUAL_DECORATION=Ae.a.register({stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Ie.d.asClassName(fl)}),gl.HIDDEN_RANGE_DECORATION=Ae.a.register({stickiness:1});var ml=function(){function e(t){var n=this;Object(Y.a)(this,e),this._updateEventEmitter=new rn.a,this._foldingModel=t,this._foldingModelListener=t.onDidChange((function(e){return n.updateHiddenRanges()})),this._hiddenRanges=[],t.regions.length&&this.updateHiddenRanges()}return Object(J.a)(e,[{key:"updateHiddenRanges",value:function(){for(var e=!1,t=[],n=0,r=0,i=Number.MAX_VALUE,a=-1,o=this._foldingModel.regions;n0}},{key:"isHidden",value:function(e){return null!==_l(this._hiddenRanges,e)}},{key:"adjustSelections",value:function(e){for(var t=this,n=!1,r=this._foldingModel.textModel,i=null,a=function(e){return i&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,i)||(i=_l(t._hiddenRanges,e)),i?i.startLineNumber-1:null},o=0,s=e.length;o0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}},{key:"onDidChange",get:function(){return this._updateEventEmitter.event}},{key:"hiddenRanges",get:function(){return this._hiddenRanges}}]),e}();function _l(e,t){var n=Object(ne.h)(e,(function(e){return t=0&&e[n].endLineNumber>=t?e[n]:null}var vl=5e3,yl=function(){function e(t){Object(Y.a)(this,e),this.editorModel=t,this.id="indent"}return Object(J.a)(e,[{key:"dispose",value:function(){}},{key:"compute",value:function(e){var t=Ns.a.getFoldingRules(this.editorModel.getLanguageIdentifier().id),n=t&&!!t.offSide,r=t&&t.markers;return Promise.resolve(function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vl,i=e.getOptions().tabSize,a=new bl(r),o=void 0;n&&(o=new RegExp("(".concat(n.start.source,")|(?:").concat(n.end.source,")")));var s=[],u=e.getLineCount()+1;s.push({indent:-1,endAbove:u,line:u});for(var c=e.getLineCount();c>0;c--){var l=e.getLineContent(c),d=Ae.b.computeIndentLevel(l,i),p=s[s.length-1];if(-1!==d){var f=void 0;if(o&&(f=l.match(o))){if(!f[1]){s.push({indent:-2,endAbove:c,line:c});continue}for(var h=s.length-1;h>0&&-2!==s[h].indent;)h--;if(h>0){s.length=h+1,p=s[h],a.insertFirst(c,p.line,d),p.line=c,p.indent=d,p.endAbove=c;continue}}if(p.indent>d){do{s.pop(),p=s[s.length-1]}while(p.indent>d);var g=p.endAbove-1;g-c>=1&&a.insertFirst(c,g,d)}p.indent===d?p.endAbove=c:s.push({indent:d,endAbove:c,line:c})}else t&&(p.endAbove=c)}return a.toIndentRanges(e)}(this.editorModel,n,r))}}]),e}(),bl=function(){function e(t){Object(Y.a)(this,e),this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=t}return Object(J.a)(e,[{key:"insertFirst",value:function(e,t,n){if(!(e>il||t>il)){var r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}}},{key:"toIndentRanges",value:function(e){if(this._length<=this._foldingRangesLimit){for(var t=new Uint32Array(this._length),n=new Uint32Array(this._length),r=this._length-1,i=0;r>=0;r--,i++)t[i]=this._startIndexes[r],n[i]=this._endIndexes[r];return new ol(t,n)}for(var a=0,o=this._indentOccurrences.length,s=0;sthis._foldingRangesLimit){o=s;break}a+=u}}for(var c=e.getOptions().tabSize,l=new Uint32Array(this._foldingRangesLimit),d=new Uint32Array(this._foldingRangesLimit),p=this._length-1,f=0;p>=0;p--){var h=this._startIndexes[p],g=e.getLineContent(h),m=Ae.b.computeIndentLevel(g,c);(m3&&void 0!==arguments[3]?arguments[3]:5e3;Object(Y.a)(this,e),this.editorModel=t,this.providers=n,this.limit=i,this.id=El;var a,o=Object(Ee.a)(n);try{for(o.s();!(a=o.n()).done;){var s=a.value;"function"===typeof s.onDidChange&&(this.disposables||(this.disposables=new xe.b),this.disposables.add(s.onDidChange(r)))}}catch(u){o.e(u)}finally{o.f()}}return Object(J.a)(e,[{key:"compute",value:function(e){var t=this;return function(e,t,n){var r=null,i=e.map((function(e,i){return Promise.resolve(e.provideFoldingRanges(t,Dl,n)).then((function(e){if(!n.isCancellationRequested&&Array.isArray(e)){Array.isArray(r)||(r=[]);var a,o=t.getLineCount(),s=Object(Ee.a)(e);try{for(s.s();!(a=s.n()).done;){var u=a.value;u.start>0&&u.end>u.start&&u.end<=o&&r.push({start:u.start,end:u.end,rank:i,kind:u.kind})}}catch(c){s.e(c)}finally{s.f()}}}),ie.f)}));return Promise.all(i).then((function(e){return r}))}(this.providers,this.editorModel,e).then((function(e){return e?xl(e,t.limit):null}))}},{key:"dispose",value:function(){var e;null===(e=this.disposables)||void 0===e||e.dispose()}}]),e}();var Sl=function(){function e(t){Object(Y.a)(this,e),this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=t}return Object(J.a)(e,[{key:"add",value:function(e,t,n,r){if(!(e>il||t>il)){var i=this._length;this._startIndexes[i]=e,this._endIndexes[i]=t,this._nestingLevels[i]=r,this._types[i]=n,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}}},{key:"toIndentRanges",value:function(){if(this._length<=this._foldingRangesLimit){for(var e=new Uint32Array(this._length),t=new Uint32Array(this._length),n=0;nthis._foldingRangesLimit){i=a;break}r+=o}}for(var s=new Uint32Array(this._foldingRangesLimit),u=new Uint32Array(this._foldingRangesLimit),c=[],l=0,d=0;la.start)if(u.end<=a.end)o.push(a),a=u,i.add(u.start,u.end,u.kind&&u.kind.value,o.length);else{if(u.start>a.end){do{a=o.pop()}while(a&&u.start>a.end);a&&o.push(a),a=u}i.add(u.start,u.end,u.kind&&u.kind.value,o.length)}}else a=u,i.add(u.start,u.end,u.kind&&u.kind.value,o.length)}}catch(c){s.e(c)}finally{s.f()}return i.toIndentRanges()}var kl="init",Tl=function(){function e(t,n,r,i){if(Object(Y.a)(this,e),this.editorModel=t,this.id=kl,n.length){this.decorationIds=t.deltaDecorations([],n.map((function(e){return{range:{startLineNumber:e.startLineNumber,startColumn:0,endLineNumber:e.endLineNumber,endColumn:t.getLineLength(e.endLineNumber)},options:{stickiness:1}}}))),this.timeout=setTimeout(r,i)}}return Object(J.a)(e,[{key:"dispose",value:function(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"===typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}},{key:"compute",value:function(e){var t=[];if(this.decorationIds){var n,r=Object(Ee.a)(this.decorationIds);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=this.editorModel.getDecorationRange(i);a&&t.push({start:a.startLineNumber,end:a.endLineNumber,rank:1})}}catch(o){r.e(o)}finally{r.f()}}return Promise.resolve(xl(t,Number.MAX_VALUE))}}]),e}(),wl=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Al=function(e,t){return function(n,r){t(n,r,e)}},Ol=new te.c("foldingEnabled",!1),Nl=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;Object(Y.a)(this,n),(i=t.call(this)).contextKeyService=r,i.localToDispose=i._register(new xe.b),i.editor=e;var a=i.editor.getOptions();return i._isEnabled=a.get(33),i._useFoldingProviders="indentation"!==a.get(34),i._unfoldOnClickAfterEndOfLine=a.get(36),i._restoringViewState=!1,i.foldingModel=null,i.hiddenRangeModel=null,i.rangeProvider=null,i.foldingRegionPromise=null,i.foldingStateMemento=null,i.foldingModelPromise=null,i.updateScheduler=null,i.cursorChangedScheduler=null,i.mouseDownInfo=null,i.foldingDecorationProvider=new gl(e),i.foldingDecorationProvider.autoHideFoldingControls="mouseover"===a.get(94),i.foldingDecorationProvider.showFoldingHighlights=a.get(35),i.foldingEnabled=Ol.bindTo(i.contextKeyService),i.foldingEnabled.set(i._isEnabled),i._register(i.editor.onDidChangeModel((function(){return i.onModelChanged()}))),i._register(i.editor.onDidChangeConfiguration((function(e){if(e.hasChanged(33)&&(i._isEnabled=i.editor.getOptions().get(33),i.foldingEnabled.set(i._isEnabled),i.onModelChanged()),e.hasChanged(94)||e.hasChanged(35)){var t=i.editor.getOptions();i.foldingDecorationProvider.autoHideFoldingControls="mouseover"===t.get(94),i.foldingDecorationProvider.showFoldingHighlights=t.get(35),i.onModelContentChanged()}e.hasChanged(34)&&(i._useFoldingProviders="indentation"!==i.editor.getOptions().get(34),i.onFoldingStrategyChanged()),e.hasChanged(36)&&(i._unfoldOnClickAfterEndOfLine=i.editor.getOptions().get(36))}))),i.onModelChanged(),i}return Object(J.a)(n,[{key:"saveViewState",value:function(){var e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){var t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n}}}},{key:"restoreViewState",value:function(e){var t=this,n=this.editor.getModel();if(n&&this._isEnabled&&!n.isTooLargeForTokenization()&&this.hiddenRangeModel&&e&&e.collapsedRegions&&e.lineCount===n.getLineCount()){e.provider!==El&&e.provider!==kl||(this.foldingStateMemento=e);var r=e.collapsedRegions;if(this.hiddenRangeModel.applyMemento(r)){var i=this.getFoldingModel();i&&i.then((function(e){if(e){t._restoringViewState=!0;try{e.applyMemento(r)}finally{t._restoringViewState=!1}}})).then(void 0,ie.e)}}}},{key:"onModelChanged",value:function(){var e=this;this.localToDispose.clear();var t=this.editor.getModel();this._isEnabled&&t&&!t.isTooLargeForTokenization()&&(this.foldingModel=new ul(t,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new ml(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((function(t){return e.onHiddenRangesChanges(t)}))),this.updateScheduler=new Se.a(200),this.cursorChangedScheduler=new Se.d((function(){return e.revealCursor()}),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(_t.o.onDidChange((function(){return e.onFoldingStrategyChanged()}))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((function(){return e.onFoldingStrategyChanged()}))),this.localToDispose.add(this.editor.onDidChangeModelContent((function(){return e.onModelContentChanged()}))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((function(){return e.onCursorPositionChanged()}))),this.localToDispose.add(this.editor.onMouseDown((function(t){return e.onEditorMouseDown(t)}))),this.localToDispose.add(this.editor.onMouseUp((function(t){return e.onEditorMouseUp(t)}))),this.localToDispose.add({dispose:function(){e.foldingRegionPromise&&(e.foldingRegionPromise.cancel(),e.foldingRegionPromise=null),e.updateScheduler&&e.updateScheduler.cancel(),e.updateScheduler=null,e.foldingModel=null,e.foldingModelPromise=null,e.hiddenRangeModel=null,e.cursorChangedScheduler=null,e.foldingStateMemento=null,e.rangeProvider&&e.rangeProvider.dispose(),e.rangeProvider=null}}),this.onModelContentChanged())}},{key:"onFoldingStrategyChanged",value:function(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}},{key:"getRangeProvider",value:function(e){var t=this;if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new yl(e),this._useFoldingProviders&&this.foldingModel){var n=_t.o.ordered(this.foldingModel.textModel);if(0===n.length&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new Tl(e,this.foldingStateMemento.collapsedRegions,(function(){t.foldingStateMemento=null,t.onFoldingStrategyChanged()}),3e4);n.length>0&&(this.rangeProvider=new Cl(e,n,(function(){return t.onModelContentChanged()})))}return this.foldingStateMemento=null,this.rangeProvider}},{key:"getFoldingModel",value:function(){return this.foldingModelPromise}},{key:"onModelContentChanged",value:function(){var e=this;this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((function(){var t=e.foldingModel;if(!t)return null;var n=e.foldingRegionPromise=Object(Se.f)((function(n){return e.getRangeProvider(t.textModel).compute(n)}));return n.then((function(r){if(r&&n===e.foldingRegionPromise){var i=e.editor.getSelections(),a=i?i.map((function(e){return e.startLineNumber})):[];t.update(r,a)}return t}))})).then(void 0,(function(e){return Object(ie.e)(e),null})))}},{key:"onHiddenRangesChanges",value:function(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){var t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e)}},{key:"onCursorPositionChanged",value:function(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}},{key:"revealCursor",value:function(){var e=this,t=this.getFoldingModel();t&&t.then((function(t){if(t){var n=e.editor.getSelections();if(n&&n.length>0){var r,i=[],a=Object(Ee.a)(n);try{var o=function(){var n=r.value.selectionStartLineNumber;e.hiddenRangeModel&&e.hiddenRangeModel.isHidden(n)&&i.push.apply(i,Object(ct.a)(t.getAllRegionsAtLine(n,(function(e){return e.isCollapsed&&n>e.startLineNumber}))))};for(a.s();!(r=a.n()).done;)o()}catch(s){a.e(s)}finally{a.f()}i.length&&(t.toggleCollapseState(i),e.reveal(n[0].getPosition()))}}})).then(void 0,ie.e)}},{key:"onEditorMouseDown",value:function(e){if(this.mouseDownInfo=null,this.hiddenRangeModel&&e.target&&e.target.range&&(e.event.leftButton||e.event.middleButton)){var t=e.target.range,n=!1;switch(e.target.type){case 4:var r=e.target.detail,i=e.target.element.offsetLeft;if(r.offsetX-i<5)return;n=!0;break;case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges())if(!e.target.detail.isAfterLines)break;return;case 6:if(this.hiddenRangeModel.hasRanges()){var a=this.editor.getModel();if(a&&t.startColumn===a.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:n}}}},{key:"onEditorMouseUp",value:function(e){var t=this,n=this.getFoldingModel();if(n&&this.mouseDownInfo&&e.target){var r=this.mouseDownInfo.lineNumber,i=this.mouseDownInfo.iconClicked,a=e.target.range;if(a&&a.startLineNumber===r){if(i){if(4!==e.target.type)return}else{var o=this.editor.getModel();if(!o||a.startColumn!==o.getLineMaxColumn(r))return}n.then((function(n){if(n){var a=n.getRegionAtLine(r);if(a&&a.startLineNumber===r){var o=a.isCollapsed;if(i||o){var s=[],u=e.event.middleButton||e.event.shiftKey;if(u){var c,l=Object(Ee.a)(n.getRegionsInside(a));try{for(l.s();!(c=l.n()).done;){var d=c.value;d.isCollapsed===o&&s.push(d)}}catch(p){l.e(p)}finally{l.f()}}!o&&u&&0!==s.length||s.push(a),n.toggleCollapseState(s),t.reveal({lineNumber:r,column:1})}}}})).then(void 0,ie.e)}}}},{key:"reveal",value:function(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(xe.a);Nl.ID="editor.contrib.folding",Nl=wl([Al(1,te.b)],Nl);var Il=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"runEditorCommand",value:function(e,t,n){var r=this,i=Nl.get(t);if(i){var a=i.getFoldingModel();return a?(this.reportTelemetry(e,t),a.then((function(e){if(e){r.invoke(i,e,t,n);var a=t.getSelection();a&&i.reveal(a.getStartPosition())}}))):void 0}}},{key:"getSelectedLines",value:function(e){var t=e.getSelections();return t?t.map((function(e){return e.startLineNumber})):[]}},{key:"getLineNumbers",value:function(e,t){return e&&e.selectionLines?e.selectionLines.map((function(e){return e+1})):this.getSelectedLines(t)}},{key:"run",value:function(e,t){}}]),n}($.b);function Fl(e){if(!Bn.k(e)){if(!Bn.i(e))return!1;var t=e;if(!Bn.k(t.levels)&&!Bn.h(t.levels))return!1;if(!Bn.k(t.direction)&&!Bn.j(t.direction))return!1;if(!Bn.k(t.selectionLines)&&(!Bn.e(t.selectionLines)||!t.selectionLines.every(Bn.h)))return!1}return!0}var Ll=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.unfold",label:Q.a("unfoldAction.label","Unfold"),alias:"Unfold",precondition:Ol,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3161,mac:{primary:2649},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:Fl,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}return Object(J.a)(n,[{key:"invoke",value:function(e,t,n,r){var i=r&&r.levels||1,a=this.getLineNumbers(r,n);r&&"up"===r.direction?ll(t,!1,i,a):cl(t,!1,i,a)}}]),n}(Il),Pl=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.unfoldRecursively",label:Q.a("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:Ol,kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,2137),weight:100}})}return Object(J.a)(n,[{key:"invoke",value:function(e,t,n,r){cl(t,!1,Number.MAX_VALUE,this.getSelectedLines(n))}}]),n}(Il),Rl=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.fold",label:Q.a("foldAction.label","Fold"),alias:"Fold",precondition:Ol,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3159,mac:{primary:2647},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:Fl,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}return Object(J.a)(n,[{key:"invoke",value:function(e,t,n,r){var i=this.getLineNumbers(r,n),a=r&&r.levels,o=r&&r.direction;"number"!==typeof a&&"string"!==typeof o?function(e,t,n){var r,i=[],a=Object(Ee.a)(n);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=e.getAllRegionsAtLine(o,(function(e){return e.isCollapsed!==t}));s.length>0&&i.push(s[0])}}catch(u){a.e(u)}finally{a.f()}e.toggleCollapseState(i)}(t,!0,i):"up"===o?ll(t,!0,a||1,i):cl(t,!0,a||1,i)}}]),n}(Il),Ml=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.toggleFold",label:Q.a("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:Ol,kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,2090),weight:100}})}return Object(J.a)(n,[{key:"invoke",value:function(e,t,n){!function(e,t,n){var r,i=[],a=Object(Ee.a)(n);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=e.getRegionAtLine(o);s&&function(){var n=!s.isCollapsed;if(i.push(s),t>1){var r=e.getRegionsInside(s,(function(e,r){return e.isCollapsed!==n&&r=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},rd=function(e,t){return function(n,r){t(n,r,e)}},id=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},ad=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this._workerService=n,this._callOnDispose=new xe.b,this._callOnModel=new xe.b,this._editor=t,this._callOnDispose.add(t.onDidChangeConfiguration((function(){return r._update()}))),this._callOnDispose.add(t.onDidChangeModel((function(){return r._update()}))),this._callOnDispose.add(t.onDidChangeModelLanguage((function(){return r._update()}))),this._callOnDispose.add(_t.v.onDidChange(this._update,this))}return Object(J.a)(e,[{key:"dispose",value:function(){this._callOnDispose.dispose(),this._callOnModel.dispose()}},{key:"_update",value:function(){var e=this;if(this._callOnModel.clear(),this._editor.getOption(43)&&this._editor.hasModel()){var t=this._editor.getModel(),n=_t.v.ordered(t),r=Object(Ce.a)(n,1)[0];if(r&&r.autoFormatTriggerCharacters){var i,a=new Xl.b,o=Object(Ee.a)(r.autoFormatTriggerCharacters);try{for(o.s();!(i=o.n()).done;){var s=i.value;a.add(s.charCodeAt(0))}}catch(u){o.e(u)}finally{o.f()}this._callOnModel.add(this._editor.onDidType((function(t){var n=t.charCodeAt(t.length-1);a.has(n)&&e._trigger(String.fromCharCode(n))})))}}}},{key:"_trigger",value:function(e){var t=this;if(this._editor.hasModel()&&!(this._editor.getSelections().length>1)){var n=this._editor.getModel(),r=this._editor.getPosition(),i=!1,a=this._editor.onDidChangeModelContent((function(e){if(e.isFlush)return i=!0,void a.dispose();for(var t=0,n=e.changes.length;t1||this._instantiationService.invokeFunction(ed.c,this.editor,e,2,Ct.b.None,dt.a.None).catch(ie.e))}}]),e}();od.ID="editor.contrib.formatOnPaste",od=nd([rd(1,zt.a)],od);var sd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.formatDocument",label:Q.a("formatDocument.label","Format Document"),alias:"Format Document",precondition:te.a.and(X.a.notInCompositeEditor,X.a.writable,X.a.hasDocumentFormattingProvider),kbOpts:{kbExpr:X.a.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}return Object(J.a)(n,[{key:"run",value:function(e,t){return id(this,void 0,void 0,K.a.mark((function n(){var r,i;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!t.hasModel()){n.next=5;break}return r=e.get(zt.a),i=e.get(Ct.a),n.next=5,i.showWhile(r.invokeFunction(ed.d,t,1,Ct.b.None,dt.a.None),250);case 5:case"end":return n.stop()}}),n)})))}}]),n}($.b),ud=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.formatSelection",label:Q.a("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:te.a.and(X.a.writable,X.a.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:X.a.editorTextFocus,primary:Object(ee.a)(2089,2084),weight:100},contextMenuOpts:{when:X.a.hasNonEmptySelection,group:"1_modification",order:1.31}})}return Object(J.a)(n,[{key:"run",value:function(e,t){return id(this,void 0,void 0,K.a.mark((function n(){var r,i,a,o;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.hasModel()){n.next=2;break}return n.abrupt("return");case 2:return r=e.get(zt.a),i=t.getModel(),a=t.getSelections().map((function(e){return e.isEmpty()?new Te.a(e.startLineNumber,1,e.startLineNumber,i.getLineMaxColumn(e.startLineNumber)):e})),o=e.get(Ct.a),n.next=8,o.showWhile(r.invokeFunction(ed.c,t,a,1,Ct.b.None,dt.a.None),250);case 8:case"end":return n.stop()}}),n)})))}}]),n}($.b);Object($.l)(ad.ID,ad),Object($.l)(od.ID,od),Object($.j)(sd),Object($.j)(ud),St.a.registerCommand("editor.action.format",(function(e){return id(void 0,void 0,void 0,K.a.mark((function t(){var n,r;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.get(Je.a).getFocusedCodeEditor())&&n.hasModel()){t.next=3;break}return t.abrupt("return");case 3:if(r=e.get(St.b),!n.getSelection().isEmpty()){t.next=9;break}return t.next=7,r.executeCommand("editor.action.formatDocument");case 7:t.next=11;break;case 9:return t.next=11,r.executeCommand("editor.action.formatSelection");case 11:case"end":return t.stop()}}),t)})))}));var cd=n(48),ld=function(){function e(){Object(Y.a)(this,e)}return Object(J.a)(e,[{key:"remove",value:function(){this.parent&&this.parent.children.delete(this.id)}}],[{key:"findId",value:function(e,t){var n;"string"===typeof e?n="".concat(t.id,"/").concat(e):(n="".concat(t.id,"/").concat(e.name),void 0!==t.children.get(n)&&(n="".concat(t.id,"/").concat(e.name,"_").concat(e.range.startLineNumber,"_").concat(e.range.startColumn)));for(var r=n,i=0;void 0!==t.children.get(r);i++)r="".concat(n,"_").concat(i);return r}},{key:"empty",value:function(e){return 0===e.children.size}}]),e}(),dd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;return Object(Y.a)(this,n),(a=t.call(this)).id=e,a.parent=r,a.symbol=i,a.children=new Map,a}return n}(ld),pd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o;return Object(Y.a)(this,n),(o=t.call(this)).id=e,o.parent=r,o.label=i,o.order=a,o.children=new Map,o}return n}(ld),fd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).uri=e,r.id="root",r.parent=void 0,r._groups=new Map,r.children=new Map,r.id="root",r.parent=void 0,r}return Object(J.a)(n,[{key:"_compact",value:function(){var e,t=0,n=Object(Ee.a)(this._groups);try{for(n.s();!(e=n.n()).done;){var r=Object(Ce.a)(e.value,2),i=r[0];0===r[1].children.size?this._groups.delete(i):t+=1}}catch(c){n.e(c)}finally{n.f()}if(1!==t)this.children=this._groups;else{var a,o=cd.a.first(this._groups.values()),s=Object(Ee.a)(o.children);try{for(s.s();!(a=s.n()).done;){var u=Object(Ce.a)(a.value,2)[1];u.parent=this,this.children.set(u.id,u)}}catch(c){s.e(c)}finally{s.f()}}return this}},{key:"getTopLevelSymbols",value:function(){var e,t=[],n=Object(Ee.a)(this.children.values());try{for(n.s();!(e=n.n()).done;){var r=e.value;r instanceof dd?t.push(r.symbol):t.push.apply(t,Object(ct.a)(cd.a.map(r.children.values(),(function(e){return e.symbol}))))}}catch(i){n.e(i)}finally{n.f()}return t.sort((function(e,t){return Te.a.compareRangesUsingStarts(e.range,t.range)}))}},{key:"asListOfDocumentSymbols",value:function(){var e=this.getTopLevelSymbols(),t=[];return n._flattenDocumentSymbols(t,e,""),t.sort((function(e,t){return Te.a.compareRangesUsingStarts(e.range,t.range)}))}}],[{key:"create",value:function(e,t){var r=this,i=this._keys.for(e,!0),a=n._requests.get(i);if(!a){var o=new dt.b;a={promiseCnt:0,source:o,promise:n._create(e,o.token),model:void 0},n._requests.set(i,a);var s=Date.now();a.promise.then((function(){r._requestDurations.update(e,Date.now()-s)}))}return a.model?Promise.resolve(a.model):(a.promiseCnt+=1,t.onCancellationRequested((function(){0===--a.promiseCnt&&(a.source.cancel(),n._requests.delete(i))})),new Promise((function(e,t){a.promise.then((function(t){a.model=t,e(t)}),(function(e){n._requests.delete(i),t(e)}))})))}},{key:"_create",value:function(e,t){var r=new dt.b(t),i=new n(e.uri),a=_t.m.ordered(e),o=a.map((function(t,a){var o,s=ld.findId("provider_".concat(a),i),u=new pd(s,i,null!==(o=t.displayName)&&void 0!==o?o:"Unknown Outline Provider",a);return Promise.resolve(t.provideDocumentSymbols(e,r.token)).then((function(e){var t,r=Object(Ee.a)(e||[]);try{for(r.s();!(t=r.n()).done;){var i=t.value;n._makeOutlineElement(i,u)}}catch(a){r.e(a)}finally{r.f()}return u}),(function(e){return Object(ie.f)(e),u})).then((function(e){ld.empty(e)?e.remove():i._groups.set(s,e)}))})),s=_t.m.onDidChange((function(){var t=_t.m.ordered(e);Object(ne.g)(t,a)||r.cancel()}));return Promise.all(o).then((function(){return r.token.isCancellationRequested&&!t.isCancellationRequested?n._create(e,t):i._compact()})).finally((function(){s.dispose()}))}},{key:"_makeOutlineElement",value:function(e,t){var r=ld.findId(e,t),i=new dd(r,t,e);if(e.children){var a,o=Object(Ee.a)(e.children);try{for(o.s();!(a=o.n()).done;){var s=a.value;n._makeOutlineElement(s,i)}}catch(u){o.e(u)}finally{o.f()}}t.children.set(i.id,i)}},{key:"_flattenDocumentSymbols",value:function(e,t,r){var i,a=Object(Ee.a)(t);try{for(a.s();!(i=a.n()).done;){var o=i.value;e.push({kind:o.kind,tags:o.tags,name:o.name,detail:o.detail,containerName:o.containerName||r,range:o.range,selectionRange:o.selectionRange,children:void 0}),o.children&&n._flattenDocumentSymbols(e,o.children,o.name)}}catch(s){a.e(s)}finally{a.f()}}}]),n}(ld);fd._requestDurations=new ir.b(_t.m,350),fd._requests=new Yn.a(9,.75),fd._keys=new(function(){function e(){Object(Y.a)(this,e),this._counter=1,this._data=new WeakMap}return Object(J.a)(e,[{key:"for",value:function(e,t){return"".concat(e.id,"/").concat(t?e.getVersionId():"","/").concat(this._hash(_t.m.all(e)))}},{key:"_hash",value:function(e){var t,n="",r=Object(Ee.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,a=this._data.get(i);"undefined"===typeof a&&(a=this._counter++,this._data.set(i,a)),n+=a}}catch(o){r.e(o)}finally{r.f()}return n}}]),e}());var hd=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))};function gd(e,t,n){return hd(this,void 0,void 0,K.a.mark((function r(){var i;return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,fd.create(e,n);case 2:return i=r.sent,r.abrupt("return",t?i.asListOfDocumentSymbols():i.getTopLevelSymbols());case 4:case"end":return r.stop()}}),r)})))}St.a.registerCommand("_executeDocumentSymbolProvider",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rn-1)return[];var o,s=e.getOptions(),u=s.tabSize,c=s.indentSize,l=s.insertSpaces,d=function(e,t){return t=t||1,md.a.shiftIndent(e,e.length+t,u,c,l)},p=function(e,t){return t=t||1,md.a.unshiftIndent(e,e.length+t,u,c,l)},f=[],h=e.getLineContent(t),g=h;if(void 0!==r&&null!==r){o=r;var m=ft.y(h);g=o+h.substring(m.length),i.decreaseIndentPattern&&i.decreaseIndentPattern.test(g)&&(g=(o=p(o))+h.substring(m.length)),h!==g&&f.push(Os.a.replaceMove(new Z.a(t,1,t,m.length+1),Ae.b.normalizeIndentation(o,c,l)))}else o=ft.y(h);var _=o;i.increaseIndentPattern&&i.increaseIndentPattern.test(g)?(_=d(_),o=d(o)):i.indentNextLinePattern&&i.indentNextLinePattern.test(g)&&(_=d(_));for(var v=++t;v<=n;v++){var y=e.getLineContent(v),b=ft.y(y),D=_+y.substring(b.length);i.decreaseIndentPattern&&i.decreaseIndentPattern.test(D)&&(_=p(_),o=p(o)),b!==_&&f.push(Os.a.replaceMove(new Z.a(v,1,v,b.length+1),Ae.b.normalizeIndentation(_,c,l))),i.unIndentedLinePattern&&i.unIndentedLinePattern.test(y)||(_=i.increaseIndentPattern&&i.increaseIndentPattern.test(D)?o=d(o):i.indentNextLinePattern&&i.indentNextLinePattern.test(D)?d(_):o)}return f}var bd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.ID,label:Q.a("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:X.a.writable})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=t.getModel();if(n){var r=n.getOptions(),i=t.getSelection();if(i){var a=new Nd(i,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[a]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}}}}]),n}($.b);bd.ID="editor.action.indentationToSpaces";var Dd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.ID,label:Q.a("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:X.a.writable})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=t.getModel();if(n){var r=n.getOptions(),i=t.getSelection();if(i){var a=new Id(i,r.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[a]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}}}}]),n}($.b);Dd.ID="editor.action.indentationToTabs";var Ed=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,r)).insertSpaces=e,i}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=this,r=e.get(rr.a),i=e.get(vt.a),a=t.getModel();if(a){var o=i.getCreationOptions(a.getLanguageIdentifier().language,a.uri,a.isForSimpleWidget),s=[1,2,3,4,5,6,7,8].map((function(e){return{id:e.toString(),label:e.toString(),description:e===o.tabSize?Q.a("configuredTabSize","Configured Tab Size"):void 0}})),u=Math.min(a.getOptions().tabSize-1,7);setTimeout((function(){r.pick(s,{placeHolder:Q.a({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:s[u]}).then((function(e){e&&a&&!a.isDisposed()&&a.updateOptions({tabSize:parseInt(e.label,10),insertSpaces:n.insertSpaces})}))}),50)}}}]),n}($.b),Cd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!1,{id:n.ID,label:Q.a("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}return n}(Ed);Cd.ID="editor.action.indentUsingTabs";var Sd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!0,{id:n.ID,label:Q.a("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}return n}(Ed);Sd.ID="editor.action.indentUsingSpaces";var xd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.ID,label:Q.a("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=e.get(vt.a),r=t.getModel();if(r){var i=n.getCreationOptions(r.getLanguageIdentifier().language,r.uri,r.isForSimpleWidget);r.detectIndentation(i.insertSpaces,i.tabSize)}}}]),n}($.b);xd.ID="editor.action.detectIndentation";var kd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.reindentlines",label:Q.a("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:X.a.writable})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=t.getModel();if(n){var r=yd(n,1,n.getLineCount());r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}}}]),n}($.b),Td=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.reindentselectedlines",label:Q.a("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:X.a.writable})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=t.getModel();if(n){var r=t.getSelections();if(null!==r){var i,a=[],o=Object(Ee.a)(r);try{for(o.s();!(i=o.n()).done;){var s=i.value,u=s.startLineNumber,c=s.endLineNumber;if(u!==c&&1===s.endColumn&&c--,1===u){if(u===c)continue}else u--;var l=yd(n,u,c);a.push.apply(a,Object(ct.a)(l))}}catch(d){o.e(d)}finally{o.f()}a.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,a),t.pushUndoStop())}}}}]),n}($.b),wd=function(){function e(t,n){Object(Y.a)(this,e),this._initialSelection=n,this._edits=[],this._selectionId=null;var r,i=Object(Ee.a)(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.range&&"string"===typeof a.text&&this._edits.push(a)}}catch(o){i.e(o)}finally{i.f()}}return Object(J.a)(e,[{key:"getEditOperations",value:function(e,t){var n,r=Object(Ee.a)(this._edits);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.addEditOperation(Te.a.lift(i.range),i.text)}}catch(o){r.e(o)}finally{r.f()}var a=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(a=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(a=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),a||(this._selectionId=t.trackSelection(this._initialSelection))}},{key:"computeCursorState",value:function(e,t){return t.getTrackedSelection(this._selectionId)}}]),e}(),Ad=function(){function e(t){var n=this;Object(Y.a)(this,e),this.callOnDispose=new xe.b,this.callOnModel=new xe.b,this.editor=t,this.callOnDispose.add(t.onDidChangeConfiguration((function(){return n.update()}))),this.callOnDispose.add(t.onDidChangeModel((function(){return n.update()}))),this.callOnDispose.add(t.onDidChangeModelLanguage((function(){return n.update()})))}return Object(J.a)(e,[{key:"update",value:function(){var e=this;this.callOnModel.clear(),this.editor.getOption(8)<4||this.editor.getOption(42)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((function(t){var n=t.range;e.trigger(n)})))}},{key:"trigger",value:function(e){var t=this.editor.getSelections();if(!(null===t||t.length>1)){var n=this.editor.getModel();if(n&&n.isCheapToTokenize(e.getStartPosition().lineNumber)){for(var r=this.editor.getOption(8),i=n.getOptions(),a=i.tabSize,o=i.indentSize,s=i.insertSpaces,u=[],c={shiftIndent:function(e){return md.a.shiftIndent(e,e.length+1,a,o,s)},unshiftIndent:function(e){return md.a.unshiftIndent(e,e.length+1,a,o,s)}},l=e.startLineNumber;l<=e.endLineNumber&&this.shouldIgnoreLine(n,l);)l++;if(!(l>e.endLineNumber)){var d=n.getLineContent(l);if(!/\S/.test(d.substring(0,e.startColumn-1))){var p=Ns.a.getGoodIndentForLine(r,n,n.getLanguageIdentifier().id,l,c);if(null!==p){var f=ft.y(d),h=_d(p,a);if(h!==_d(f,a)){var g=vd(h,a,s);u.push({range:new Te.a(l,1,l,f.length+1),text:g}),d=g+d.substr(f.length)}else{var m=Ns.a.getIndentMetadata(n,l);if(0===m||8===m)return}}}for(var _=l;l0){this.editor.pushUndoStop();var T=new wd(u,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",T),this.editor.pushUndoStop()}}}}}},{key:"shouldIgnoreLine",value:function(e,t){e.forceTokenization(t);var n=e.getLineFirstNonWhitespaceColumn(t);if(0===n)return!0;var r=e.getLineTokens(t);if(r.getCount()>0){var i=r.findTokenIndexAtOffset(n);if(i>=0&&1===r.getStandardTokenType(i))return!0}return!1}},{key:"dispose",value:function(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}]),e}();function Od(e,t,n,r){if(1!==e.getLineCount()||1!==e.getLineMaxColumn(1)){for(var i="",a=0;a=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Ld=function(e,t){return function(n,r){t(n,r,e)}},Pd=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))};function Rd(e,t,n){return Pd(this,void 0,void 0,K.a.mark((function r(){var i,a,o;return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=[],a=_t.r.ordered(e).reverse(),o=Object(ne.j)(a.map((function(r){return t.map((function(t){return Promise.resolve(r.provideInlineHints(e,t,n)).then((function(e){e&&i.push({list:e,provider:r})}),(function(e){Object(ie.f)(e)}))}))}))),r.next=5,Promise.all(o);case 5:return r.abrupt("return",i);case 6:case"end":return r.stop()}}),r)})))}var Md=function(){function e(t,n,r){var i=this;Object(Y.a)(this,e),this._editor=t,this._codeEditorService=n,this._themeService=r,this._disposables=new xe.b,this._sessionDisposables=new xe.b,this._getInlineHintsDelays=new ir.b(_t.r,250,2500),this._decorationsTypeIds=[],this._decorationIds=[],this._disposables.add(_t.r.onDidChange((function(){return i._update()}))),this._disposables.add(r.onDidColorThemeChange((function(){return i._update()}))),this._disposables.add(t.onDidChangeModel((function(){return i._update()}))),this._disposables.add(t.onDidChangeModelLanguage((function(){return i._update()}))),this._disposables.add(t.onDidChangeConfiguration((function(e){e.hasChanged(120)&&i._update()}))),this._update()}return Object(J.a)(e,[{key:"dispose",value:function(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}},{key:"_update",value:function(){var e=this;if(this._sessionDisposables.clear(),this._editor.getOption(120).enabled){var t=this._editor.getModel();if(t&&_t.r.has(t)){var n=new Se.d((function(){return Pd(e,void 0,void 0,K.a.mark((function e(){var r,i,a,o,s;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Date.now(),i=new dt.b,this._sessionDisposables.add(Object(xe.h)((function(){return i.dispose(!0)}))),a=this._editor.getVisibleRangesPlusViewportAboveBelow(),e.next=6,Rd(t,a,i.token);case 6:o=e.sent,s=this._getInlineHintsDelays.update(t,Date.now()-r),n.delay=s,this._updateHintsDecorators(o);case 10:case"end":return e.stop()}}),e,this)})))}),this._getInlineHintsDelays.get(t));this._sessionDisposables.add(n),this._sessionDisposables.add(this._editor.onDidChangeModelContent((function(){return n.schedule()}))),this._disposables.add(this._editor.onDidScrollChange((function(){return n.schedule()}))),n.schedule();var r=new xe.b;this._sessionDisposables.add(r);var i,a=Object(Ee.a)(_t.r.all(t));try{for(a.s();!(i=a.n()).done;){var o=i.value;"function"===typeof o.onDidChangeInlineHints&&r.add(o.onDidChangeInlineHints((function(){return n.schedule()})))}}catch(s){a.e(s)}finally{a.f()}}else this._removeAllDecorations()}else this._removeAllDecorations()}},{key:"_updateHintsDecorators",value:function(e){var t,n=this._getLayoutInfo(),r=n.fontSize,i=n.fontFamily,a=this._themeService.getColorTheme().getColor(Ne.O),o=this._themeService.getColorTheme().getColor(Ne.P),s=[],u=[],c=Object(Ee.a)(e);try{for(c.s();!(t=c.n()).done;)for(var l=t.value.list,d=0;dt)&&(n=.9*t|0),{fontSize:n,fontFamily:e.fontFamily}}},{key:"_removeAllDecorations",value:function(){this._decorationIds=this._editor.deltaDecorations(this._decorationIds,[]),this._decorationsTypeIds.forEach(this._codeEditorService.removeDecorationType,this._codeEditorService),this._decorationsTypeIds=[]}}]),e}();Md.ID="editor.contrib.InlineHints",Md=Fd([Ld(1,Je.a),Ld(2,Ie.b)],Md),Object($.l)(Md.ID,Md),St.a.registerCommand("_executeInlineHintProvider",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Ud=function(e,t){return function(n,r){t(n,r,e)}},Vd=function(){function e(t,n){Object(Y.a)(this,e),this.decorationIds=[],this.editor=t,this.editorWorkerService=n}return Object(J.a)(e,[{key:"dispose",value:function(){}},{key:"run",value:function(t,n){var r=this;this.currentRequest&&this.currentRequest.cancel();var i=this.editor.getSelection(),a=this.editor.getModel();if(a&&i){var o=i;if(o.startLineNumber===o.endLineNumber){var s=new mt.a(this.editor,5),u=a.uri;return this.editorWorkerService.canNavigateValueSet(u)?(this.currentRequest=Object(Se.f)((function(e){return r.editorWorkerService.navigateValueSet(u,o,n)})),this.currentRequest.then((function(n){if(n&&n.range&&n.value&&s.validate(r.editor)){var i=Te.a.lift(n.range),a=n.range,u=n.value.length-(o.endColumn-o.startColumn);a={startLineNumber:a.startLineNumber,startColumn:a.startColumn,endLineNumber:a.endLineNumber,endColumn:a.startColumn+n.value.length},u>1&&(o=new Z.a(o.startLineNumber,o.startColumn,o.endLineNumber,o.endColumn+u-1));var c=new Bd(i,o,n.value);r.editor.pushUndoStop(),r.editor.executeCommand(t,c),r.editor.pushUndoStop(),r.decorationIds=r.editor.deltaDecorations(r.decorationIds,[{range:a,options:e.DECORATION}]),r.decorationRemover&&r.decorationRemover.cancel(),r.decorationRemover=Object(Se.l)(350),r.decorationRemover.then((function(){return r.decorationIds=r.editor.deltaDecorations(r.decorationIds,[])})).catch(ie.e)}})).catch(ie.e)):Promise.resolve(void 0)}}}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();Vd.ID="editor.contrib.inPlaceReplaceController",Vd.DECORATION=Ae.a.register({className:"valueSetReplacement"}),Vd=jd([Ud(1,Zl.a)],Vd);var zd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.inPlaceReplace.up",label:Q.a("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3154,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=Vd.get(t);return n?n.run(this.id,!0):Promise.resolve(void 0)}}]),n}($.b),Hd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.inPlaceReplace.down",label:Q.a("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3156,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=Vd.get(t);return n?n.run(this.id,!1):Promise.resolve(void 0)}}]),n}($.b);Object($.l)(Vd.ID,Vd),Object($.j)(zd),Object($.j)(Hd),Object(Ie.f)((function(e,t){var n=e.getColor(Oe.d);n&&t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px ".concat(n,"; }"))}));var Wd=function(){function e(t,n){Object(Y.a)(this,e),this._selection=t,this._cursors=n,this._selectionId=null}return Object(J.a)(e,[{key:"getEditOperations",value:function(e,t){for(var n=function(e,t){t.sort((function(e,t){return e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber}));for(var n=t.length-2;n>=0;n--)t[n].lineNumber===t[n+1].lineNumber&&t.splice(n,1);for(var r=[],i=0,a=0,o=t.length,s=1,u=e.getLineCount();s<=u;s++){var c=e.getLineContent(s),l=c.length+1,d=0;if(!(a=r.startLineNumber+1&&t<=r.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)};var E=Ns.a.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(p,1),r.startLineNumber+1,u);if(null!==E){var C=ft.y(e.getLineContent(r.startLineNumber)),S=_d(E,a),x=_d(C,a);if(S!==x){var k=S-x;this.getIndentEditsOfMovingBlock(e,t,r,a,s,k)}}}}else t.addEditOperation(new Te.a(r.startLineNumber,1,r.startLineNumber,1),h+"\n")}else if(p=r.startLineNumber-1,f=e.getLineContent(p),t.addEditOperation(new Te.a(p,1,p+1,1),null),t.addEditOperation(new Te.a(r.endLineNumber,e.getLineMaxColumn(r.endLineNumber),r.endLineNumber,e.getLineMaxColumn(r.endLineNumber)),"\n"+f),this.shouldAutoIndent(e,r)){c.getLineContent=function(t){return t===p?e.getLineContent(r.startLineNumber):e.getLineContent(t)};var T=this.matchEnterRule(e,u,a,r.startLineNumber,r.startLineNumber-2);if(null!==T)0!==T&&this.getIndentEditsOfMovingBlock(e,t,r,a,s,T);else{var w=Ns.a.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(r.startLineNumber,1),p,u);if(null!==w){var A=ft.y(e.getLineContent(r.startLineNumber)),O=_d(w,a),N=_d(A,a);if(O!==N){var I=O-N;this.getIndentEditsOfMovingBlock(e,t,r,a,s,I)}}}}}this._selectionId=t.trackSelection(r)}else this._selectionId=t.trackSelection(this._selection)}},{key:"buildIndentConverter",value:function(e,t,n){return{shiftIndent:function(r){return md.a.shiftIndent(r,r.length+1,e,t,n)},unshiftIndent:function(r){return md.a.unshiftIndent(r,r.length+1,e,t,n)}}}},{key:"parseEnterResult",value:function(e,t,n,r,i){if(i){var a=i.indentation;i.indentAction===Gd.b.None||i.indentAction===Gd.b.Indent?a=i.indentation+i.appendText:i.indentAction===Gd.b.IndentOutdent?a=i.indentation:i.indentAction===Gd.b.Outdent&&(a=t.unshiftIndent(i.indentation)+i.appendText);var o=e.getLineContent(r);if(this.trimLeft(o).indexOf(this.trimLeft(a))>=0){var s=ft.y(e.getLineContent(r)),u=ft.y(a),c=Ns.a.getIndentMetadata(e,r);return null!==c&&2&c&&(u=t.unshiftIndent(u)),_d(u,n)-_d(s,n)}}return null}},{key:"matchEnterRuleMovingDown",value:function(e,t,n,r,i,a){if(ft.I(a)>=0){var o=e.getLineMaxColumn(i),s=Ns.a.getEnterAction(this._autoIndent,e,new Te.a(i,o,i,o));return this.parseEnterResult(e,t,n,r,s)}for(var u=r-1;u>=1;){var c=e.getLineContent(u);if(ft.I(c)>=0)break;u--}if(u<1||r>e.getLineCount())return null;var l=e.getLineMaxColumn(u),d=Ns.a.getEnterAction(this._autoIndent,e,new Te.a(u,l,u,l));return this.parseEnterResult(e,t,n,r,d)}},{key:"matchEnterRule",value:function(e,t,n,r,i,a){for(var o=i;o>=1;){var s=void 0;if(s=o===i&&void 0!==a?a:e.getLineContent(o),ft.I(s)>=0)break;o--}if(o<1||r>e.getLineCount())return null;var u=e.getLineMaxColumn(o),c=Ns.a.getEnterAction(this._autoIndent,e,new Te.a(o,u,o,u));return this.parseEnterResult(e,t,n,r,c)}},{key:"trimLeft",value:function(e){return e.replace(/^\s+/,"")}},{key:"shouldAutoIndent",value:function(e,t){if(this._autoIndent<4)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;var n=e.getLanguageIdAtPosition(t.startLineNumber,1);return n===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==Ns.a.getIndentRulesSupport(n)}},{key:"getIndentEditsOfMovingBlock",value:function(e,t,n,r,i,a){for(var o=n.startLineNumber;o<=n.endLineNumber;o++){var s=e.getLineContent(o),u=ft.y(s),c=vd(_d(u,r)+a,r,i);c!==u&&(t.addEditOperation(new Te.a(o,1,o,u.length+1),c),o===n.endLineNumber&&n.endColumn<=u.length+1&&""===c&&(this._moveEndLineSelectionShrink=!0))}}},{key:"computeCursorState",value:function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber=i)return null;for(var a=[],o=r;o<=i;o++)a.push(e.getLineContent(o));var s=a.slice(0);return s.sort(Jd.getCollator().compare),!0===n&&(s=s.reverse()),{startLineNumber:r,endLineNumber:i,before:a,after:s}}Jd._COLLATOR=null;var Qd=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,r)).down=e,i}return Object(J.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){var n=t.getSelections().map((function(e,t){return{selection:e,index:t,ignore:!1}}));n.sort((function(e,t){return Te.a.compareRangesUsingStarts(e.selection,t.selection)}));for(var r=n[0],i=1;i1&&(l-=1,p=r.getLineMaxColumn(l)),a.push(Os.a.replace(new Z.a(l,p,d,f),"")),o.push(new Z.a(l-i,c.positionColumn,l-i,c.positionColumn)),i+=c.endLineNumber-c.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,a,o),t.pushUndoStop()}}}},{key:"_getLinesToRemove",value:function(e){var t=e.getSelections().map((function(e){var t=e.endLineNumber;return e.startLineNumber=t[i].startLineNumber?r.endLineNumber=t[i].endLineNumber:(n.push(r),r=t[i]);return n.push(r),n}}]),n}($.b),cp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.indentLines",label:Q.a("lines.indent","Indent Line"),alias:"Indent Line",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:2137,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Kd.a.indent(n.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}]),n}($.b),lp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.outdentLines",label:Q.a("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:2135,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){z.a.Outdent.runEditorCommand(e,t,null)}}]),n}($.b),dp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.insertLineBefore",label:Q.a("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3075,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Kd.a.lineInsertBefore(n.cursorConfig,t.getModel(),t.getSelections())))}}]),n}($.b),pp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.insertLineAfter",label:Q.a("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:X.a.writable,kbOpts:{kbExpr:X.a.editorTextFocus,primary:2051,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=t._getViewModel();n&&(t.pushUndoStop(),t.executeCommands(this.id,Kd.a.lineInsertAfter(n.cursorConfig,t.getModel(),t.getSelections())))}}]),n}($.b),fp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){for(var n=t.getSelection(),r=this._getRangesToDelete(t),i=[],a=0,o=r.length-1;a0){var o=t.startLineNumber-i;a=new Z.a(o,t.startColumn,o,t.startColumn)}else a=new Z.a(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);i+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?n=a:r.push(a)})),n&&r.unshift(n),r}},{key:"_getRangesToDelete",value:function(e){var t=e.getSelections();if(null===t)return[];var n=t,r=e.getModel();return null===r?[]:(n.sort(Te.a.compareRangesUsingStarts),n=n.map((function(e){if(e.isEmpty()){if(1===e.startColumn){var t=Math.max(1,e.startLineNumber-1),n=1===e.startLineNumber?1:r.getLineContent(t).length+1;return new Te.a(t,n,e.startLineNumber,1)}return new Te.a(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new Te.a(e.startLineNumber,1,e.endLineNumber,e.endColumn)})))}}]),n}(fp),gp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"deleteAllRight",label:Q.a("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:X.a.writable,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}return Object(J.a)(n,[{key:"_getEndCursorState",value:function(e,t){for(var n=null,r=[],i=0,a=t.length;ie.endLineNumber+1?(i.push(e),t):new Z.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(i.push(e),t):new Z.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)}));i.push(a);var o=t.getModel();if(null!==o){for(var s=[],u=[],c=r,l=0,d=0,p=i.length;d=1){var S=!0;""===b&&(S=!1),!S||" "!==b.charAt(b.length-1)&&"\t"!==b.charAt(b.length-1)||(S=!1,b=b.replace(/[\s\uFEFF\xA0]+$/g," "));var x=E.substr(C-1);b+=(S?" ":"")+x,g=S?x.length+1:x.length}else g=0}var k=new Te.a(h,1,m,_);if(!k.isEmpty()){var T=void 0;f.isEmpty()?(s.push(Os.a.replace(k,b)),T=new Z.a(k.startLineNumber-l,b.length-g+1,h-l,b.length-g+1)):f.startLineNumber===f.endLineNumber?(s.push(Os.a.replace(k,b)),T=new Z.a(f.startLineNumber-l,f.startColumn,f.endLineNumber-l,f.endColumn)):(s.push(Os.a.replace(k,b)),T=new Z.a(f.startLineNumber-l,f.startColumn,f.startLineNumber-l,b.length-v)),null!==Te.a.intersectRanges(k,r)?c=T:u.push(T)}l+=k.endLineNumber-k.startLineNumber}u.unshift(c),t.pushUndoStop(),t.executeEdits(this.id,s,u),t.pushUndoStop()}}}}}]),n}($.b),_p=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.transpose",label:Q.a("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:X.a.writable})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=t.getSelections();if(null!==n){var r=t.getModel();if(null!==r){for(var i=[],a=0,o=n.length;a=c){if(u.lineNumber===r.getLineCount())continue;var l=new Te.a(u.lineNumber,Math.max(1,u.column-1),u.lineNumber+1,1),d=r.getValueInRange(l).split("").reverse().join("");i.push(new He.a(new Z.a(u.lineNumber,Math.max(1,u.column-1),u.lineNumber+1,1),d))}else{var p=new Te.a(u.lineNumber,Math.max(1,u.column-1),u.lineNumber,u.column+1),f=r.getValueInRange(p).split("").reverse().join("");i.push(new He.b(p,f,new Z.a(u.lineNumber,u.column+1,u.lineNumber,u.column+1)))}}}t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}}}]),n}($.b),vp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=t.getSelections();if(null!==n){var r=t.getModel();if(null!==r){var i,a=t.getOption(110),o=[],s=Object(Ee.a)(n);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(u.isEmpty()){var c=u.getStartPosition(),l=t.getConfiguredWordAtPosition(c);if(!l)continue;var d=new Te.a(c.lineNumber,l.startColumn,c.lineNumber,l.endColumn),p=r.getValueInRange(d);o.push(Os.a.replace(d,this._modifyText(p,a)))}else{var f=r.getValueInRange(u);o.push(Os.a.replace(u,this._modifyText(f,a)))}}}catch(h){s.e(h)}finally{s.f()}t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop()}}}}]),n}($.b),yp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.transformToUppercase",label:Q.a("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:X.a.writable})}return Object(J.a)(n,[{key:"_modifyText",value:function(e,t){return e.toLocaleUpperCase()}}]),n}(vp),bp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.transformToLowercase",label:Q.a("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:X.a.writable})}return Object(J.a)(n,[{key:"_modifyText",value:function(e,t){return e.toLocaleLowerCase()}}]),n}(vp),Dp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.transformToTitlecase",label:Q.a("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:X.a.writable})}return Object(J.a)(n,[{key:"_modifyText",value:function(e,t){for(var n=("\r\n\t "+t).split(""),r="",i=!0,a=0;a=0?(i=!0,r+=o):i?(i=!1,r+=o.toLocaleUpperCase()):r+=o.toLocaleLowerCase()}return r}}]),n}(vp),Ep=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.transformToSnakecase",label:Q.a("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:X.a.writable})}return Object(J.a)(n,[{key:"_modifyText",value:function(e,t){return e.replace(/((?:[a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7BB\uA7BD\uA7BF\uA7C3\uA7C8\uA7CA\uA7F6\uA7FA\uAB30-\uAB5A\uAB60-\uAB68\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]|\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD83A[\uDD22-\uDD43]))((?:[A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uA7BA\uA7BC\uA7BE\uA7C2\uA7C4-\uA7C7\uA7C9\uA7F5\uFF21-\uFF3A]|\uD801[\uDC00-\uDC27\uDCB0-\uDCD3]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]))/gm,"$1_$2").replace(/((?:(?![\x08_])[\s\S]))((?:[A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uA7BA\uA7BC\uA7BE\uA7C2\uA7C4-\uA7C7\uA7C9\uA7F5\uFF21-\uFF3A]|\uD801[\uDC00-\uDC27\uDCB0-\uDCD3]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]))((?:[a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7BB\uA7BD\uA7BF\uA7C3\uA7C8\uA7CA\uA7F6\uA7FA\uAB30-\uAB5A\uAB60-\uAB68\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]|\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD83A[\uDD22-\uDD43]))/gm,"$1_$2$3").toLocaleLowerCase()}}]),n}(vp);Object($.j)(Xd),Object($.j)(Zd),Object($.j)(ep),Object($.j)(np),Object($.j)(rp),Object($.j)(ap),Object($.j)(op),Object($.j)(sp),Object($.j)(up),Object($.j)(cp),Object($.j)(lp),Object($.j)(dp),Object($.j)(pp),Object($.j)(hp),Object($.j)(gp),Object($.j)(mp),Object($.j)(_p),Object($.j)(yp),Object($.j)(bp),Object($.j)(Dp),Object($.j)(Ep);var Cp=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Sp=function(e,t){return function(n,r){t(n,r,e)}},xp=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},kp=new te.c("LinkedEditingInputVisible",!1),Tp="linked-editing-decoration",wp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this))._debounceDuration=200,i._localToDispose=i._register(new xe.b),i._editor=e,i._enabled=!1,i._visibleContextKey=kp.bindTo(r),i._currentDecorations=[],i._languageWordPattern=null,i._currentWordPattern=null,i._ignoreChangeEvent=!1,i._localToDispose=i._register(new xe.b),i._rangeUpdateTriggerPromise=null,i._rangeSyncTriggerPromise=null,i._currentRequest=null,i._currentRequestPosition=null,i._currentRequestModelVersion=null,i._register(i._editor.onDidChangeModel((function(){return i.reinitialize()}))),i._register(i._editor.onDidChangeConfiguration((function(e){(e.hasChanged(56)||e.hasChanged(76))&&i.reinitialize()}))),i._register(_t.u.onDidChange((function(){return i.reinitialize()}))),i._register(i._editor.onDidChangeModelLanguage((function(){return i.reinitialize()}))),i.reinitialize(),i}return Object(J.a)(n,[{key:"reinitialize",value:function(){var e=this,t=this._editor.getModel(),n=null!==t&&(this._editor.getOption(56)||this._editor.getOption(76))&&_t.u.has(t);if(n!==this._enabled&&(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),n&&null!==t)){this._languageWordPattern=Ns.a.getWordDefinition(t.getLanguageIdentifier().id),this._localToDispose.add(t.onDidChangeLanguageConfiguration((function(){e._languageWordPattern=Ns.a.getWordDefinition(t.getLanguageIdentifier().id)})));var r=new Se.a(this._debounceDuration),i=function(){e._rangeUpdateTriggerPromise=r.trigger((function(){return e.updateRanges()}),e._debounceDuration)},a=new Se.a(0);this._localToDispose.add(this._editor.onDidChangeCursorPosition((function(){i()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((function(n){if(!e._ignoreChangeEvent&&e._currentDecorations.length>0){var r=t.getDecorationRange(e._currentDecorations[0]);if(r&&n.changes.every((function(e){return r.intersectRanges(e.range)})))return o=e._currentDecorations,void(e._rangeSyncTriggerPromise=a.trigger((function(){return e._syncRanges(o)})))}var o;i()}))),this._localToDispose.add({dispose:function(){r.cancel(),a.cancel()}}),this.updateRanges()}}},{key:"_syncRanges",value:function(e){if(this._editor.hasModel()&&e===this._currentDecorations&&0!==e.length){var t=this._editor.getModel(),n=t.getDecorationRange(e[0]);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();var r=t.getValueInRange(n);if(this._currentWordPattern){var i=r.match(this._currentWordPattern);if((i?i[0].length:0)!==r.length)return this.clearRanges()}for(var a=[],o=1,s=e.length;o0&&void 0!==arguments[0]&&arguments[0];return xp(this,void 0,void 0,K.a.mark((function t(){var r,i,a,o,s,u=this;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._editor.hasModel()){t.next=3;break}return this.clearRanges(),t.abrupt("return");case 3:if(r=this._editor.getPosition(),!(!this._enabled&&!e||this._editor.getSelections().length>1)){t.next=7;break}return this.clearRanges(),t.abrupt("return");case 7:if(i=this._editor.getModel(),a=i.getVersionId(),!this._currentRequestPosition||this._currentRequestModelVersion!==a){t.next=16;break}if(!r.equals(this._currentRequestPosition)){t.next=12;break}return t.abrupt("return");case 12:if(!(this._currentDecorations&&this._currentDecorations.length>0)){t.next=16;break}if(!(o=i.getDecorationRange(this._currentDecorations[0]))||!o.containsPosition(r)){t.next=16;break}return t.abrupt("return");case 16:return this._currentRequestPosition=r,this._currentRequestModelVersion=a,s=Object(Se.f)((function(e){return xp(u,void 0,void 0,K.a.mark((function t(){var o,u,c,l,d,p,f;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Np(i,r,e);case 3:if(o=t.sent,s===this._currentRequest){t.next=6;break}return t.abrupt("return");case 6:if(this._currentRequest=null,a===i.getVersionId()){t.next=9;break}return t.abrupt("return");case 9:u=[],(null===o||void 0===o?void 0:o.ranges)&&(u=o.ranges),this._currentWordPattern=(null===o||void 0===o?void 0:o.wordPattern)||this._languageWordPattern,c=!1,l=0,d=u.length;case 14:if(!(l1?t-1:0),r=1;r=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Bp=function(e,t){return function(n,r){t(n,r,e)}},jp=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))};var Up={general:Ae.a.register({stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:Ae.a.register({stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})},Vp=function(){function e(t,n){Object(Y.a)(this,e),this.link=t,this.decorationId=n}return Object(J.a)(e,[{key:"activate",value:function(t,n){t.changeDecorationOptions(this.decorationId,e._getOptions(this.link,n,!0))}},{key:"deactivate",value:function(t,n){t.changeDecorationOptions(this.decorationId,e._getOptions(this.link,n,!1))}}],[{key:"decoration",value:function(t,n){return{range:t.range,options:e._getOptions(t,n,!1)}}},{key:"_getOptions",value:function(e,t,n){var r=Object.assign({},n?Up.active:Up.general);return r.hoverMessage=function(e,t){var n=e.url&&/^command:/i.test(e.url.toString()),r=e.tooltip?e.tooltip:n?Q.a("links.navigate.executeCmd","Execute command"):Q.a("links.navigate.follow","Follow link"),i=t?Ge.f?Q.a("links.navigate.kb.meta.mac","cmd + click"):Q.a("links.navigate.kb.meta","ctrl + click"):Ge.f?Q.a("links.navigate.kb.alt.mac","option + click"):Q.a("links.navigate.kb.alt","alt + click");if(e.url){var a="";if(/^command:/i.test(e.url.toString())){var o=e.url.toString().match(/^command:([^?#]+)/);if(o){var s=o[1],u=Q.a("tooltip.explanation","Execute command {0}",s);a=' "'.concat(u,'"')}}return new ae("",!0).appendMarkdown("[".concat(r,"](").concat(e.url.toString(!0)).concat(a,") (").concat(i,")"))}return(new ae).appendText("".concat(r," (").concat(i,")"))}(e,t),r}}]),e}(),zp=function(){function e(t,n,r){var i=this;Object(Y.a)(this,e),this.listenersToRemove=new xe.b,this.editor=t,this.openerService=n,this.notificationService=r;var a=new bs(t);this.listenersToRemove.add(a),this.listenersToRemove.add(a.onMouseMoveOrRelevantKeyDown((function(e){var t=Object(Ce.a)(e,2),n=t[0],r=t[1];i._onEditorMouseMove(n,r)}))),this.listenersToRemove.add(a.onExecute((function(e){i.onEditorMouseUp(e)}))),this.listenersToRemove.add(a.onCancel((function(e){i.cleanUpActiveLinkDecoration()}))),this.enabled=t.getOption(57),this.listenersToRemove.add(t.onDidChangeConfiguration((function(e){var n=t.getOption(57);i.enabled!==n&&(i.enabled=n,i.updateDecorations([]),i.stop(),i.beginCompute())}))),this.listenersToRemove.add(t.onDidChangeModelContent((function(e){return i.onChange()}))),this.listenersToRemove.add(t.onDidChangeModel((function(e){return i.onModelChanged()}))),this.listenersToRemove.add(t.onDidChangeModelLanguage((function(e){return i.onModelModeChanged()}))),this.listenersToRemove.add(_t.t.onDidChange((function(e){return i.onModelModeChanged()}))),this.timeout=new Se.e,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}return Object(J.a)(e,[{key:"onModelChanged",value:function(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}},{key:"onModelModeChanged",value:function(){this.stop(),this.beginCompute()}},{key:"onChange",value:function(){var t=this;this.timeout.setIfNotSet((function(){return t.beginCompute()}),e.RECOMPUTE_TIME)}},{key:"beginCompute",value:function(){return jp(this,void 0,void 0,K.a.mark((function e(){var t;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.editor.hasModel()&&this.enabled){e.next=2;break}return e.abrupt("return");case 2:if(t=this.editor.getModel(),_t.t.has(t)){e.next=5;break}return e.abrupt("return");case 5:return this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Se.f((function(e){return Rp(t,e)})),e.prev=7,e.next=10,this.computePromise;case 10:this.activeLinksList=e.sent,this.updateDecorations(this.activeLinksList.links),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),Object(ie.e)(e.t0);case 17:return e.prev=17,this.computePromise=null,e.finish(17);case 20:case"end":return e.stop()}}),e,this,[[7,14,17,20]])})))}},{key:"updateDecorations",value:function(e){for(var t="altKey"===this.editor.getOption(64),n=[],r=Object.keys(this.currentOccurrences),i=0,a=r.length;i2&&void 0!==arguments[2]&&arguments[2];if(this.openerService){var i=e.link;i.resolve(dt.a.None).then((function(e){if("string"===typeof e&&n.editor.hasModel()){var i=n.editor.getModel().uri;if(i.scheme===Ir.c.file&&e.startsWith("".concat(Ir.c.file,":"))){var a=gt.a.parse(e);if(a.scheme===Ir.c.file){var o=vn.i(a),s=null;o.startsWith("/./")?s=".".concat(o.substr(1)):o.startsWith("//./")&&(s=".".concat(o.substr(2))),s&&(e=vn.g(i,s))}}}return n.openerService.open(e,{openToSide:t,fromUserGesture:r,allowContributedOpeners:!0})}),(function(e){var t=e instanceof Error?e.message:e;"invalid"===t?n.notificationService.warn(Q.a("invalid.url","Failed to open this link because it is not well-formed: {0}",i.url.toString())):"missing"===t?n.notificationService.warn(Q.a("missing.url","Failed to open this link because its target is missing.")):Object(ie.e)(e)}))}}},{key:"getLinkOccurrence",value:function(e){if(!this.editor.hasModel()||!e)return null;var t,n=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0),r=Object(Ee.a)(n);try{for(r.s();!(t=r.n()).done;){var i=t.value,a=this.currentOccurrences[i.id];if(a)return a}}catch(o){r.e(o)}finally{r.f()}return null}},{key:"isEnabled",value:function(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}},{key:"stop",value:function(){var e;this.timeout.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}},{key:"dispose",value:function(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();zp.ID="editor.linkDetector",zp.RECOMPUTE_TIME=1e3,zp=Mp([Bp(1,Nr.a),Bp(2,mn.a)],zp);var Hp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.openLink",label:Q.a("label","Open Link"),alias:"Open Link",precondition:void 0})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=zp.get(t);if(n&&t.hasModel()){var r,i=t.getSelections(),a=Object(Ee.a)(i);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=n.getLinkOccurrence(o.getEndPosition());s&&n.openLinkOccurrence(s,!1)}}catch(u){a.e(u)}finally{a.f()}}}}]),n}($.b);Object($.l)(zp.ID,zp),Object($.j)(Hp),Object(Ie.f)((function(e,t){var n=e.getColor(Ne.r);n&&t.addRule(".monaco-editor .detected-link-active { color: ".concat(n," !important; }"))}));var Wp=n(82),Kp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.insertCursorAbove",label:Q.a("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:X.a.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:Fe.b.MenubarSelectionMenu,group:"3_multi",title:Q.a({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}return Object(J.a)(n,[{key:"run",value:function(e,t,n){if(t.hasModel()){var r=n&&!0===n.logicalLine,i=t._getViewModel();i.cursorConfig.readOnly||(i.pushStackElement(),i.setCursorStates(n.source,3,Wp.b.addCursorUp(i,i.getCursorStates(),r)),i.revealTopMostCursor(n.source))}}}]),n}($.b),qp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.insertCursorBelow",label:Q.a("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:X.a.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:Fe.b.MenubarSelectionMenu,group:"3_multi",title:Q.a({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}return Object(J.a)(n,[{key:"run",value:function(e,t,n){if(t.hasModel()){var r=n&&!0===n.logicalLine,i=t._getViewModel();i.cursorConfig.readOnly||(i.pushStackElement(),i.setCursorStates(n.source,3,Wp.b.addCursorDown(i,i.getCursorStates(),r)),i.revealBottomMostCursor(n.source))}}}]),n}($.b),Gp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.insertCursorAtEndOfEachLineSelected",label:Q.a("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:X.a.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:Fe.b.MenubarSelectionMenu,group:"3_multi",title:Q.a({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}return Object(J.a)(n,[{key:"getCursorsForSelection",value:function(e,t,n){if(!e.isEmpty()){for(var r=e.startLineNumber;r1&&n.push(new Z.a(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}},{key:"run",value:function(e,t){var n=this;if(t.hasModel()){var r=t.getModel(),i=t.getSelections(),a=[];i.forEach((function(e){return n.getCursorsForSelection(e,r,a)})),a.length>0&&t.setSelections(a)}}}]),n}($.b),Yp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.addCursorsToBottom",label:Q.a("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}return Object(J.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){for(var n=t.getSelections(),r=t.getModel().getLineCount(),i=[],a=n[0].startLineNumber;a<=r;a++)i.push(new Z.a(a,n[0].startColumn,a,n[0].endColumn));i.length>0&&t.setSelections(i)}}}]),n}($.b),Jp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.addCursorsToTop",label:Q.a("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}return Object(J.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){for(var n=t.getSelections(),r=[],i=n[0].startLineNumber;i>=1;i--)r.push(new Z.a(i,n[0].startColumn,i,n[0].endColumn));r.length>0&&t.setSelections(r)}}}]),n}($.b),$p=function e(t,n,r){Object(Y.a)(this,e),this.selections=t,this.revealRange=n,this.revealScrollType=r},Qp=function(){function e(t,n,r,i,a,o,s){Object(Y.a)(this,e),this._editor=t,this.findController=n,this.isDisconnectedFromFindController=r,this.searchText=i,this.wholeWord=a,this.matchCase=o,this.currentMatch=s}return Object(J.a)(e,[{key:"addSelectionToNextFindMatch",value:function(){if(!this._editor.hasModel())return null;var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new $p(t.concat(e),e,0)}},{key:"moveSelectionToNextFindMatch",value:function(){if(!this._editor.hasModel())return null;var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new $p(t.slice(0,t.length-1).concat(e),e,0)}},{key:"_getNextMatch",value:function(){if(!this._editor.hasModel())return null;if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),n=t[t.length-1],r=this._editor.getModel().findNextMatch(this.searchText,n.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(110):null,!1);return r?new Z.a(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn):null}},{key:"addSelectionToPreviousFindMatch",value:function(){if(!this._editor.hasModel())return null;var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new $p(t.concat(e),e,0)}},{key:"moveSelectionToPreviousFindMatch",value:function(){if(!this._editor.hasModel())return null;var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new $p(t.slice(0,t.length-1).concat(e),e,0)}},{key:"_getPreviousMatch",value:function(){if(!this._editor.hasModel())return null;if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),n=t[t.length-1],r=this._editor.getModel().findPreviousMatch(this.searchText,n.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(110):null,!1);return r?new Z.a(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn):null}},{key:"selectAll",value:function(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(110):null,!1,1073741824)):[]}}],[{key:"create",value:function(t,n){if(!t.hasModel())return null;var r=n.getState();if(!t.hasTextFocus()&&r.isRevealed&&r.searchString.length>0)return new e(t,n,!1,r.searchString,r.wholeWord,r.matchCase,null);var i,a,o=!1,s=t.getSelections();1===s.length&&s[0].isEmpty()?(o=!0,i=!0,a=!0):(i=r.wholeWord,a=r.matchCase);var u,c=t.getSelection(),l=null;if(c.isEmpty()){var d=t.getConfiguredWordAtPosition(c.getStartPosition());if(!d)return null;u=d.word,l=new Z.a(c.startLineNumber,d.startColumn,c.startLineNumber,d.endColumn)}else u=t.getModel().getValueInRange(c).replace(/\r\n/g,"\n");return new e(t,n,o,u,i,a,l)}}]),e}(),Xp=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this))._sessionDispose=r._register(new xe.b),r._editor=e,r._ignoreSelectionChange=!1,r._session=null,r}return Object(J.a)(n,[{key:"dispose",value:function(){this._endSession(),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}},{key:"_beginSessionIfNeeded",value:function(e){var t=this;if(!this._session){var n=Qp.create(this._editor,e);if(!n)return;this._session=n;var r={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(r.wholeWordOverride=1,r.matchCaseOverride=1,r.isRegexOverride=2),e.getState().change(r,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((function(e){t._ignoreSelectionChange||t._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((function(){t._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((function(e){(e.matchCase||e.wholeWord)&&t._endSession()})))}}},{key:"_endSession",value:function(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){this._session.findController.getState().change({wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0},!1)}this._session=null}},{key:"_setSelections",value:function(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}},{key:"_expandEmptyToWord",value:function(e,t){if(!t.isEmpty())return t;var n=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return n?new Z.a(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t}},{key:"_applySessionResult",value:function(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}},{key:"getSession",value:function(e){return this._session}},{key:"addSelectionToNextFindMatch",value:function(e){if(this._editor.hasModel()){if(!this._session){var t=this._editor.getSelections();if(t.length>1){var n=e.getState().matchCase;if(!cf(this._editor.getModel(),t,n)){for(var r=this._editor.getModel(),i=[],a=0,o=t.length;a0&&n.isRegex)t=this._editor.getModel().findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getOption(110):null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(n.searchScope){var r=n.searchScope,i=[];t.forEach((function(e){r.forEach((function(t){e.range.endLineNumber<=t.endLineNumber&&e.range.startLineNumber>=t.startLineNumber&&i.push(e)}))})),t=i}if(t.length>0){for(var a=this._editor.getSelection(),o=0,s=t.length;o=l)o.push(d),s++;else{var p=Te.a.compareRangesUsingStarts(d,a[u]);p<0?(!a[u].isEmpty()&&Te.a.areIntersecting(d,a[u])||o.push(d),s++):(p>0||s++,u++)}}var f=o.map((function(e){return{range:e,options:r?n._SELECTION_HIGHLIGHT:n._SELECTION_HIGHLIGHT_OVERVIEW}}));this.decorations=this.editor.deltaDecorations(this.decorations,f)}}}else this.decorations=this.editor.deltaDecorations(this.decorations,[])}},{key:"dispose",value:function(){this._setState(null),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}}],[{key:"_createState",value:function(e,t){if(!e)return null;if(!t.hasModel())return null;var n=t.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;var r=Xp.get(t);if(!r)return null;var i=zc.get(t);if(!i)return null;var a=r.getSession(i);if(!a){var o=t.getSelections();if(o.length>1){var s=i.getState().matchCase;if(!cf(t.getModel(),o,s))return null}a=Qp.create(t,i)}if(!a)return null;if(a.currentMatch)return null;if(/^[ \t]+$/.test(a.searchText))return null;if(a.searchText.length>200)return null;var u=i.getState(),c=u.matchCase;if(u.isRevealed){var l=u.searchString;c||(l=l.toLowerCase());var d=a.searchText;if(c||(d=d.toLowerCase()),l===d&&a.matchCase===u.matchCase&&a.wholeWord===u.wholeWord&&!u.isRegex)return null}return new sf(a.searchText,a.matchCase,a.wholeWord?t.getOption(110):null,t.getModel().getVersionId())}}]),n}(xe.a);function cf(e,t,n){for(var r=lf(e,t[0],!n),i=1,a=t.length;i1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:n.DEFAULT_DELAY;return Object(Y.a)(this,n),(r=t.call(this))._onChangedHints=r._register(new rn.a),r.onChangedHints=r._onChangedHints.event,r.triggerOnType=!1,r._state=hf.Default,r._pendingTriggers=[],r._lastSignatureHelpResult=r._register(new xe.d),r.triggerChars=new Xl.b,r.retriggerChars=new Xl.b,r.triggerId=0,r.editor=e,r.throttledDelayer=new Se.a(i),r._register(r.editor.onDidChangeConfiguration((function(){return r.onEditorConfigurationChange()}))),r._register(r.editor.onDidChangeModel((function(e){return r.onModelChanged()}))),r._register(r.editor.onDidChangeModelLanguage((function(e){return r.onModelChanged()}))),r._register(r.editor.onDidChangeCursorSelection((function(e){return r.onCursorChange(e)}))),r._register(r.editor.onDidChangeModelContent((function(e){return r.onModelContentChange()}))),r._register(_t.z.onDidChange(r.onModelChanged,Object(lt.a)(r))),r._register(r.editor.onDidType((function(e){return r.onDidType(e)}))),r.onEditorConfigurationChange(),r.onModelChanged(),r}return Object(J.a)(n,[{key:"cancel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.state=hf.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}},{key:"trigger",value:function(e,t){var n=this,r=this.editor.getModel();if(r&&_t.z.has(r)){var i=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((function(){return n.doTrigger(i)}),t).catch(ie.e)}}},{key:"next",value:function(){if(1===this.state.type){var e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=t%e===e-1,r=this.editor.getOption(70).cycle;!(e<2||n)||r?this.updateActiveSignature(n&&r?0:t+1):this.cancel()}}},{key:"previous",value:function(){if(1===this.state.type){var e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,n=0===t,r=this.editor.getOption(70).cycle;!(e<2||n)||r?this.updateActiveSignature(n&&r?e-1:t-1):this.cancel()}}},{key:"updateActiveSignature",value:function(e){1===this.state.type&&(this.state=new hf.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}},{key:"doTrigger",value:function(e){return gf(this,void 0,void 0,K.a.mark((function t(){var n,r,i,a,o,s,u;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=1===this.state.type||2===this.state.type,r=this.getLastActiveHints(),this.cancel(!0),0!==this._pendingTriggers.length){t.next=5;break}return t.abrupt("return",!1);case 5:if(i=this._pendingTriggers.reduce(_f),this._pendingTriggers=[],a={triggerKind:i.triggerKind,triggerCharacter:i.triggerCharacter,isRetrigger:n,activeSignatureHelp:r},this.editor.hasModel()){t.next=10;break}return t.abrupt("return",!1);case 10:return o=this.editor.getModel(),s=this.editor.getPosition(),this.state=new hf.Pending(Object(Se.f)((function(e){return ff(o,s,a,e)})),r),t.prev=13,t.next=16,this.state.request;case 16:if(u=t.sent,e===this.triggerId){t.next=20;break}return null===u||void 0===u||u.dispose(),t.abrupt("return",!1);case 20:if(u&&u.value.signatures&&0!==u.value.signatures.length){t.next=27;break}return null===u||void 0===u||u.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),t.abrupt("return",!1);case 27:return this.state=new hf.Active(u.value),this._lastSignatureHelpResult.value=u,this._onChangedHints.fire(this.state.hints),t.abrupt("return",!0);case 31:t.next=38;break;case 33:return t.prev=33,t.t0=t.catch(13),e===this.triggerId&&(this.state=hf.Default),Object(ie.e)(t.t0),t.abrupt("return",!1);case 38:case"end":return t.stop()}}),t,this,[[13,33]])})))}},{key:"getLastActiveHints",value:function(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}},{key:"onModelChanged",value:function(){this.cancel(),this.triggerChars=new Xl.b,this.retriggerChars=new Xl.b;var e=this.editor.getModel();if(e){var t,n=Object(Ee.a)(_t.z.ordered(e));try{for(n.s();!(t=n.n()).done;){var r,i=t.value,a=Object(Ee.a)(i.signatureHelpTriggerCharacters||[]);try{for(a.s();!(r=a.n()).done;){var o=r.value;this.triggerChars.add(o.charCodeAt(0)),this.retriggerChars.add(o.charCodeAt(0))}}catch(l){a.e(l)}finally{a.f()}var s,u=Object(Ee.a)(i.signatureHelpRetriggerCharacters||[]);try{for(u.s();!(s=u.n()).done;){var c=s.value;this.retriggerChars.add(c.charCodeAt(0))}}catch(l){u.e(l)}finally{u.f()}}}catch(l){n.e(l)}finally{n.f()}}}},{key:"onDidType",value:function(e){if(this.triggerOnType){var t=e.length-1,n=e.charCodeAt(t);(this.triggerChars.has(n)||this.isTriggered&&this.retriggerChars.has(n))&&this.trigger({triggerKind:_t.A.TriggerCharacter,triggerCharacter:e.charAt(t)})}}},{key:"onCursorChange",value:function(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:_t.A.ContentChange})}},{key:"onModelContentChange",value:function(){this.isTriggered&&this.trigger({triggerKind:_t.A.ContentChange})}},{key:"onEditorConfigurationChange",value:function(){this.triggerOnType=this.editor.getOption(70).enabled,this.triggerOnType||this.cancel()}},{key:"dispose",value:function(){this.cancel(!0),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}},{key:"state",get:function(){return this._state},set:function(e){2===this._state.type&&this._state.request.cancel(),this._state=e}},{key:"isTriggered",get:function(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}}]),n}(xe.a);function _f(e,t){switch(t.triggerKind){case _t.A.Invoke:return t;case _t.A.ContentChange:return e;case _t.A.TriggerCharacter:default:return t}}mf.DEFAULT_DELAY=120;var vf=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},yf=function(e,t){return function(n,r){t(n,r,e)}},bf=Ht.$,Df=Object($i.b)("parameter-hints-next",on.b.chevronDown,Q.a("parameterHintsNextIcon","Icon for show next parameter hint.")),Ef=Object($i.b)("parameter-hints-previous",on.b.chevronUp,Q.a("parameterHintsPreviousIcon","Icon for show previous parameter hint.")),Cf=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o;return Object(Y.a)(this,n),(o=t.call(this)).editor=e,o.renderDisposeables=o._register(new xe.b),o.visible=!1,o.announcedLabel=null,o.allowEditorOverflow=!0,o.markdownRenderer=o._register(new wa({editor:e},a,i)),o.model=o._register(new mf(e)),o.keyVisible=pf.Visible.bindTo(r),o.keyMultipleSignatures=pf.MultipleSignatures.bindTo(r),o._register(o.model.onChangedHints((function(e){e?(o.show(),o.render(e)):o.hide()}))),o}return Object(J.a)(n,[{key:"createParamaterHintDOMNodes",value:function(){var e=this,t=bf(".editor-widget.parameter-hints-widget"),n=Ht.append(t,bf(".phwrapper"));n.tabIndex=-1;var r=Ht.append(n,bf(".controls")),i=Ht.append(r,bf(".button"+Ie.d.asCSSSelector(Ef))),a=Ht.append(r,bf(".overloads")),o=Ht.append(r,bf(".button"+Ie.d.asCSSSelector(Df))),s=Object($r.b)(Object($r.a)(i,"click"));this._register(s(this.previous,this));var u=Object($r.b)(Object($r.a)(o,"click"));this._register(u(this.next,this));var c=bf(".body"),l=new Tr.a(c,{});this._register(l),n.appendChild(l.getDomNode());var d=Ht.append(c,bf(".signature")),p=Ht.append(c,bf(".docs"));t.style.userSelect="text",this.domNodes={element:t,signature:d,overloads:a,docs:p,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((function(t){e.visible&&e.editor.layoutContentWidget(e)})));var f=function(){if(e.domNodes){var t=e.editor.getOption(38);e.domNodes.element.style.fontSize="".concat(t.fontSize,"px")}};f(),this._register(rn.b.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function(e){return e.hasChanged(38)})).on(f,null)),this._register(this.editor.onDidLayoutChange((function(t){return e.updateMaxHeight()}))),this.updateMaxHeight()}},{key:"show",value:function(){var e=this;this.visible||(this.domNodes||this.createParamaterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((function(){e.domNodes&&e.domNodes.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}},{key:"hide",value:function(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}},{key:"getPosition",value:function(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}},{key:"render",value:function(e){var t;if(this.renderDisposeables.clear(),this.domNodes){var n=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",n),this.keyMultipleSignatures.set(n),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";var r=e.signatures[e.activeSignature];if(r){var i=Ht.append(this.domNodes.signature,bf(".code")),a=this.editor.getOption(38);i.style.fontSize="".concat(a.fontSize,"px"),i.style.fontFamily=a.fontFamily;var o=r.parameters.length>0,s=null!==(t=r.activeParameter)&&void 0!==t?t:e.activeParameter;if(o)this.renderParameters(i,r,s);else Ht.append(i,bf("span")).textContent=r.label;var u=r.parameters[s];if(null===u||void 0===u?void 0:u.documentation){var c=bf("span.documentation");if("string"===typeof u.documentation)c.textContent=u.documentation;else{var l=this.renderMarkdownDocs(u.documentation);c.appendChild(l.element)}Ht.append(this.domNodes.docs,bf("p",{},c))}if(void 0===r.documentation);else if("string"===typeof r.documentation)Ht.append(this.domNodes.docs,bf("p",{},r.documentation));else{var d=this.renderMarkdownDocs(r.documentation);Ht.append(this.domNodes.docs,d.element)}var p=this.hasDocs(r,u);if(this.domNodes.signature.classList.toggle("has-docs",p),this.domNodes.docs.classList.toggle("empty",!p),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,u){var f=this.getParameterLabel(r,s);this.announcedLabel!==f&&(pe.a(Q.a("hint","{0}, hint",f)),this.announcedLabel=f)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}}}},{key:"renderMarkdownDocs",value:function(e){var t=this,n=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:function(){var e;null===(e=t.domNodes)||void 0===e||e.scrollbar.scanDomNode()}}));return n.element.classList.add("markdown-docs"),n}},{key:"hasDocs",value:function(e,t){return!!(t&&"string"===typeof t.documentation&&Object(Bn.a)(t.documentation).length>0)||(!!(t&&"object"===typeof t.documentation&&Object(Bn.a)(t.documentation).value.length>0)||(!!(e.documentation&&"string"===typeof e.documentation&&Object(Bn.a)(e.documentation).length>0)||!!(e.documentation&&"object"===typeof e.documentation&&Object(Bn.a)(e.documentation.value).length>0)))}},{key:"renderParameters",value:function(e,t,n){var r=this.getParameterLabelOffsets(t,n),i=Object(Ce.a)(r,2),a=i[0],o=i[1],s=document.createElement("span");s.textContent=t.label.substring(0,a);var u=document.createElement("span");u.textContent=t.label.substring(a,o),u.className="parameter active";var c=document.createElement("span");c.textContent=t.label.substring(o),Ht.append(e,s,u,c)}},{key:"getParameterLabel",value:function(e,t){var n=e.parameters[t];return Array.isArray(n.label)?e.label.substring(n.label[0],n.label[1]):n.label}},{key:"getParameterLabelOffsets",value:function(e,t){var n=e.parameters[t];if(n){if(Array.isArray(n.label))return n.label;if(n.label.length){var r=new RegExp("(\\W|^)".concat(Object(ft.u)(n.label),"(?=\\W|$)"),"g");r.test(e.label);var i=r.lastIndex-n.label.length;return i>=0?[i,r.lastIndex]:[0,0]}return[0,0]}return[0,0]}},{key:"next",value:function(){this.editor.focus(),this.model.next()}},{key:"previous",value:function(){this.editor.focus(),this.model.previous()}},{key:"cancel",value:function(){this.model.cancel()}},{key:"getDomNode",value:function(){return this.domNodes||this.createParamaterHintDOMNodes(),this.domNodes.element}},{key:"getId",value:function(){return n.ID}},{key:"trigger",value:function(e){this.model.trigger(e,0)}},{key:"updateMaxHeight",value:function(){if(this.domNodes){var e=Math.max(this.editor.getLayoutInfo().height/4,250),t="".concat(e,"px");this.domNodes.element.style.maxHeight=t;var n=this.domNodes.element.getElementsByClassName("phwrapper");n.length&&(n[0].style.maxHeight=t)}}}]),n}(xe.a);Cf.ID="editor.widget.parameterHintsWidget",Cf=vf([yf(1,te.b),yf(2,Nr.a),yf(3,gr.a)],Cf),Object(Ie.f)((function(e,t){var n=e.getColor(Ne.G);if(n){var r=e.type===Rt.a.HIGH_CONTRAST?2:1;t.addRule(".monaco-editor .parameter-hints-widget { border: ".concat(r,"px solid ").concat(n,"; }")),t.addRule(".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ".concat(n.transparent(.5),"; }")),t.addRule(".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ".concat(n.transparent(.5),"; }"))}var i=e.getColor(Ne.F);i&&t.addRule(".monaco-editor .parameter-hints-widget { background-color: ".concat(i,"; }"));var a=e.getColor(Ne.wc);a&&t.addRule(".monaco-editor .parameter-hints-widget a { color: ".concat(a,"; }"));var o=e.getColor(Ne.H);o&&t.addRule(".monaco-editor .parameter-hints-widget { color: ".concat(o,"; }"));var s=e.getColor(Ne.vc);s&&t.addRule(".monaco-editor .parameter-hints-widget code { background-color: ".concat(s,"; }"))}));var Sf=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},xf=function(e,t){return function(n,r){t(n,r,e)}},kf=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this)).editor=e,i.widget=i._register(r.createInstance(Cf,i.editor)),i}return Object(J.a)(n,[{key:"cancel",value:function(){this.widget.cancel()}},{key:"previous",value:function(){this.widget.previous()}},{key:"next",value:function(){this.widget.next()}},{key:"trigger",value:function(e){this.widget.trigger(e)}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(xe.a);kf.ID="editor.controller.parameterHints",kf=Sf([xf(1,zt.a)],kf);var Tf=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.triggerParameterHints",label:Q.a("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:X.a.hasSignatureHelpProvider,kbOpts:{kbExpr:X.a.editorTextFocus,primary:3082,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=kf.get(t);n&&n.trigger({triggerKind:_t.A.Invoke})}}]),n}($.b);Object($.l)(kf.ID,kf),Object($.j)(Tf);var wf=$.c.bindToContribution(kf.get);Object($.k)(new wf({id:"closeParameterHints",precondition:pf.Visible,handler:function(e){return e.cancel()},kbOpts:{weight:175,kbExpr:X.a.focus,primary:9,secondary:[1033]}})),Object($.k)(new wf({id:"showPrevParameterHint",precondition:te.a.and(pf.Visible,pf.MultipleSignatures),handler:function(e){return e.previous()},kbOpts:{weight:175,kbExpr:X.a.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),Object($.k)(new wf({id:"showNextParameterHint",precondition:te.a.and(pf.Visible,pf.MultipleSignatures),handler:function(e){return e.next()},kbOpts:{weight:175,kbExpr:X.a.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));n(412);var Af=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Of=function(e,t){return function(n,r){t(n,r,e)}},Nf=new te.c("renameInputVisible",!1),If=function(){function e(t,n,r,i,a){var o=this;Object(Y.a)(this,e),this._editor=t,this._acceptKeybindings=n,this._themeService=r,this._keybindingService=i,this._disposables=new xe.b,this.allowEditorOverflow=!0,this._visibleContextKey=Nf.bindTo(a),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((function(e){e.hasChanged(38)&&o._updateFont()}))),this._disposables.add(r.onDidColorThemeChange(this._updateStyles,this))}return Object(J.a)(e,[{key:"dispose",value:function(){this._disposables.dispose(),this._editor.removeContentWidget(this)}},{key:"getId",value:function(){return"__renameInputWidget"}},{key:"getDomNode",value:function(){var e=this;if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",Object(Q.a)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);var t=function(){var t,n,r=Object(Ce.a)(e._acceptKeybindings,2),i=r[0],a=r[1];e._keybindingService.lookupKeybinding(i),e._label.innerText=Object(Q.a)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",null===(t=e._keybindingService.lookupKeybinding(i))||void 0===t?void 0:t.getLabel(),null===(n=e._keybindingService.lookupKeybinding(a))||void 0===n?void 0:n.getLabel())};t(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(t)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}},{key:"_updateStyles",value:function(e){var t,n,r,i;if(this._input&&this._domNode){var a=e.getColor(Ne.zc);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(Ne.Z))&&void 0!==t?t:""),this._domNode.style.boxShadow=a?" 0 0 8px 2px ".concat(a):"",this._domNode.style.color=String(null!==(n=e.getColor(Ne.mb))&&void 0!==n?n:""),this._input.style.backgroundColor=String(null!==(r=e.getColor(Ne.kb))&&void 0!==r?r:"");var o=e.getColor(Ne.lb);this._input.style.borderWidth=o?"1px":"0px",this._input.style.borderStyle=o?"solid":"none",this._input.style.borderColor=null!==(i=null===o||void 0===o?void 0:o.toString())&&void 0!==i?i:"none"}}},{key:"_updateFont",value:function(){if(this._input&&this._label){var e=this._editor.getOption(38);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize="".concat(e.fontSize,"px"),this._label.style.fontSize="".concat(.8*e.fontSize,"px")}}},{key:"getPosition",value:function(){return this._visible?{position:this._position,preference:[2,1]}:null}},{key:"afterRender",value:function(e){e||this.cancelInput(!0)}},{key:"acceptInput",value:function(e){this._currentAcceptInput&&this._currentAcceptInput(e)}},{key:"cancelInput",value:function(e){this._currentCancelInput&&this._currentCancelInput(e)}},{key:"getInput",value:function(e,t,n,r,i,a){var o=this;this._domNode.classList.toggle("preview",i),this._position=new ke.a(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",r.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);var s=new xe.b;return new Promise((function(e){o._currentCancelInput=function(t){return o._currentAcceptInput=void 0,o._currentCancelInput=void 0,e(t),!0},o._currentAcceptInput=function(n){0!==o._input.value.trim().length&&o._input.value!==t?(o._currentAcceptInput=void 0,o._currentCancelInput=void 0,e({newName:o._input.value,wantsPreview:i&&n})):o.cancelInput(!0)},a.onCancellationRequested((function(){return o.cancelInput(!0)})),s.add(o._editor.onDidBlurEditorWidget((function(){return o.cancelInput(!1)}))),o._show()})).finally((function(){s.dispose(),o._hide()}))}},{key:"_show",value:function(){var e=this;this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((function(){e._input.focus(),e._input.setSelectionRange(parseInt(e._input.getAttribute("selectionStart")),parseInt(e._input.getAttribute("selectionEnd")))}),100)}},{key:"_hide",value:function(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}}]),e}();If=Af([Of(2,Ie.b),Of(3,qt.a),Of(4,te.b)],If);var Ff=n(95),Lf=n(51),Pf=n(135),Rf=n(171),Mf=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Bf=function(e,t){return function(n,r){t(n,r,e)}},jf=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Uf=function(){function e(t,n){Object(Y.a)(this,e),this.model=t,this.position=n,this._providerRenameIdx=0,this._providers=_t.x.ordered(t)}return Object(J.a)(e,[{key:"hasProvider",value:function(){return this._providers.length>0}},{key:"resolveRenameLocation",value:function(e){return jf(this,void 0,void 0,K.a.mark((function t(){var n,r,i,a;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],this._providerRenameIdx=0;case 2:if(!(this._providerRenameIdx0?n.join("\n"):void 0});case 21:return t.abrupt("return",{range:new Te.a(this.position.lineNumber,a.startColumn,this.position.lineNumber,a.endColumn),text:a.word,rejectReason:n.length>0?n.join("\n"):void 0});case 22:case"end":return t.stop()}}),t,this)})))}},{key:"provideRenameEdits",value:function(e,t){return jf(this,void 0,void 0,K.a.mark((function n(){return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this._provideRenameEdits(e,this._providerRenameIdx,[],t));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"_provideRenameEdits",value:function(e,t,n,r){return jf(this,void 0,void 0,K.a.mark((function i(){var a,o;return K.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(a=this._providers[t]){i.next=3;break}return i.abrupt("return",{edits:[],rejectReason:n.join("\n")});case 3:return i.next=5,a.provideRenameEdits(this.model,this.position,e,r);case 5:if(o=i.sent){i.next=10;break}return i.abrupt("return",this._provideRenameEdits(e,t+1,n.concat(Q.a("no result","No result.")),r));case 10:if(!o.rejectReason){i.next=12;break}return i.abrupt("return",this._provideRenameEdits(e,t+1,n.concat(o.rejectReason),r));case 12:return i.abrupt("return",o);case 13:case"end":return i.stop()}}),i,this)})))}}]),e}();function Vf(e,t,n){return jf(this,void 0,void 0,K.a.mark((function r(){var i,a;return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=new Uf(e,t),r.next=3,i.resolveRenameLocation(dt.a.None);case 3:if(!(null===(a=r.sent)||void 0===a?void 0:a.rejectReason)){r.next=6;break}return r.abrupt("return",{edits:[],rejectReason:a.rejectReason});case 6:return r.abrupt("return",i.provideRenameEdits(n,dt.a.None));case 7:case"end":return r.stop()}}),r)})))}var zf=function(){function e(t,n,r,i,a,o,s){var u=this;Object(Y.a)(this,e),this.editor=t,this._instaService=n,this._notificationService=r,this._bulkEditService=i,this._progressService=a,this._logService=o,this._configService=s,this._dispoableStore=new xe.b,this._cts=new dt.b,this._renameInputField=this._dispoableStore.add(new Se.b((function(){return u._dispoableStore.add(u._instaService.createInstance(If,u.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))})))}return Object(J.a)(e,[{key:"dispose",value:function(){this._dispoableStore.dispose(),this._cts.dispose(!0)}},{key:"run",value:function(){return jf(this,void 0,void 0,K.a.mark((function e(){var t,n,r,i,a,o,s,u,c,l,d=this;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._cts.dispose(!0),this.editor.hasModel()){e.next=3;break}return e.abrupt("return",void 0);case 3:if(t=this.editor.getPosition(),(n=new Uf(this.editor.getModel(),t)).hasProvider()){e.next=7;break}return e.abrupt("return",void 0);case 7:return this._cts=new mt.b(this.editor,5),e.prev=8,i=n.resolveRenameLocation(this._cts.token),this._progressService.showWhile(i,250),e.next=13,i;case 13:r=e.sent,e.next=20;break;case 16:return e.prev=16,e.t0=e.catch(8),jt.get(this.editor).showMessage(e.t0||Q.a("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),t),e.abrupt("return",void 0);case 20:if(r){e.next=22;break}return e.abrupt("return",void 0);case 22:if(!r.rejectReason){e.next=25;break}return jt.get(this.editor).showMessage(r.rejectReason,t),e.abrupt("return",void 0);case 25:if(!this._cts.token.isCancellationRequested){e.next=27;break}return e.abrupt("return",void 0);case 27:return this._cts.dispose(),this._cts=new mt.b(this.editor,5,r.range),a=this.editor.getSelection(),o=0,s=r.text.length,Te.a.isEmpty(a)||Te.a.spansMultipleLines(a)||!Te.a.containsRange(r.range,a)||(o=Math.max(0,a.startColumn-r.range.startColumn),s=Math.min(r.range.endColumn,a.endColumn)-r.range.startColumn),u=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),e.next=36,this._renameInputField.value.getInput(r.range,r.text,o,s,u,this._cts.token);case 36:if("boolean"!==typeof(c=e.sent)){e.next=40;break}return c&&this.editor.focus(),e.abrupt("return",void 0);case 40:return this.editor.focus(),l=Object(Se.j)(n.provideRenameEdits(c.newName,this._cts.token),this._cts.token).then((function(e){return jf(d,void 0,void 0,K.a.mark((function t(){var n=this;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&this.editor.hasModel()){t.next=2;break}return t.abrupt("return");case 2:if(!e.rejectReason){t.next=5;break}return this._notificationService.info(e.rejectReason),t.abrupt("return");case 5:this._bulkEditService.apply(ht.b.convert(e),{editor:this.editor,showPreview:c.wantsPreview,label:Q.a("label","Renaming '{0}'",null===r||void 0===r?void 0:r.text),quotableLabel:Q.a("quotableLabel","Renaming {0}",null===r||void 0===r?void 0:r.text)}).then((function(e){e.ariaSummary&&Object(pe.a)(Q.a("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",r.text,c.newName,e.ariaSummary))})).catch((function(e){n._notificationService.error(Q.a("rename.failedApply","Rename failed to apply edits")),n._logService.error(e)}));case 6:case"end":return t.stop()}}),t,this)})))}),(function(e){d._notificationService.error(Q.a("rename.failed","Rename failed to compute edits")),d._logService.error(e)})),this._progressService.showWhile(l,250),e.abrupt("return",l);case 44:case"end":return e.stop()}}),e,this,[[8,16]])})))}},{key:"acceptRenameInput",value:function(e){this._renameInputField.value.acceptInput(e)}},{key:"cancelRenameInput",value:function(){this._renameInputField.value.cancelInput(!0)}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();zf.ID="editor.contrib.renameController",zf=Mf([Bf(1,zt.a),Bf(2,mn.a),Bf(3,ht.a),Bf(4,Ct.a),Bf(5,Ff.b),Bf(6,Rf.a)],zf);var Hf=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.rename",label:Q.a("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:te.a.and(X.a.writable,X.a.hasRenameProvider),kbOpts:{kbExpr:X.a.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}return Object(J.a)(n,[{key:"runCommand",value:function(e,t){var r=this,i=e.get(Je.a),a=Array.isArray(t)&&t||[void 0,void 0],o=Object(Ce.a)(a,2),s=o[0],u=o[1];return gt.a.isUri(s)&&ke.a.isIPosition(u)?i.openCodeEditor({resource:s},i.getActiveCodeEditor()).then((function(e){e&&(e.setPosition(u),e.invokeWithinContext((function(t){return r.reportTelemetry(t,e),r.run(t,e)})))}),ie.e):Object(en.a)(Object(tn.a)(n.prototype),"runCommand",this).call(this,e,t)}},{key:"run",value:function(e,t){var n=zf.get(t);return n?n.run():Promise.resolve()}}]),n}($.b);Object($.l)(zf.ID,zf),Object($.j)(Hf);var Wf=$.c.bindToContribution(zf.get);Object($.k)(new Wf({id:"acceptRenameInput",precondition:Nf,handler:function(e){return e.acceptRenameInput(!1)},kbOpts:{weight:199,kbExpr:X.a.focus,primary:3}})),Object($.k)(new Wf({id:"acceptRenameInputWithPreview",precondition:te.a.and(Nf,te.a.has("config.editor.rename.enablePreview")),handler:function(e){return e.acceptRenameInput(!0)},kbOpts:{weight:199,kbExpr:X.a.focus,primary:1027}})),Object($.k)(new Wf({id:"cancelRenameInput",precondition:Nf,handler:function(e){return e.cancelRenameInput()},kbOpts:{weight:199,kbExpr:X.a.focus,primary:9,secondary:[1033]}})),Object($.n)("_executeDocumentRenameProvider",(function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i=0;s--){var l=i.charCodeAt(s);if(s!==o&&(95===l||45===l))break;if(Object(ft.G)(l)&&Object(ft.H)(c))break;c=l}for(s+=1;u0&&0===t.getLineFirstNonWhitespaceColumn(n.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(n.lineNumber)&&e.push({range:new Te.a(n.lineNumber,1,n.lineNumber,t.getLineMaxColumn(n.lineNumber))})}}]),e}(),qf=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Gf=function(){function e(){Object(Y.a)(this,e)}return Object(J.a)(e,[{key:"provideSelectionRanges",value:function(t,n){return qf(this,void 0,void 0,K.a.mark((function r(){var i,a,o,s;return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=[],a=Object(Ee.a)(n),r.prev=2,s=K.a.mark((function n(){var r,a,s;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=o.value,a=[],i.push(a),s=new Map,n.next=6,new Promise((function(n){return e._bracketsRightYield(n,0,t,r,s)}));case 6:return n.next=8,new Promise((function(n){return e._bracketsLeftYield(n,0,t,r,s,a)}));case 8:case"end":return n.stop()}}),n)})),a.s();case 5:if((o=a.n()).done){r.next=9;break}return r.delegateYield(s(),"t0",7);case 7:r.next=5;break;case 9:r.next=14;break;case 11:r.prev=11,r.t1=r.catch(2),a.e(r.t1);case 14:return r.prev=14,a.f(),r.finish(14);case 17:return r.abrupt("return",i);case 18:case"end":return r.stop()}}),r,null,[[2,11,14,17]])})))}}],[{key:"_bracketsRightYield",value:function(t,n,r,i,a){for(var o=new Map,s=Date.now();;){if(n>=e._maxRounds){t();break}if(!i){t();break}var u=r.findNextBracket(i);if(!u){t();break}if(Date.now()-s>e._maxDuration){setTimeout((function(){return e._bracketsRightYield(t,n+1,r,i,a)}));break}var c=u.close[0];if(u.isOpen){var l=o.has(c)?o.get(c):0;o.set(c,l+1)}else{var d=o.has(c)?o.get(c):0;if(d-=1,o.set(c,Math.max(0,d)),d<0){var p=a.get(c);p||(p=new Hi.a,a.set(c,p)),p.push(u.range)}}i=u.range.getEndPosition()}}},{key:"_bracketsLeftYield",value:function(t,n,r,i,a,o){for(var s=new Map,u=Date.now();;){if(n>=e._maxRounds&&0===a.size){t();break}if(!i){t();break}var c=r.findPrevBracket(i);if(!c){t();break}if(Date.now()-u>e._maxDuration){setTimeout((function(){return e._bracketsLeftYield(t,n+1,r,i,a,o)}));break}var l=c.close[0];if(c.isOpen){var d=s.has(l)?s.get(l):0;if(d-=1,s.set(l,Math.max(0,d)),d<0){var p=a.get(l);if(p){var f=p.shift();0===p.size&&a.delete(l);var h=Te.a.fromPositions(c.range.getEndPosition(),f.getStartPosition()),g=Te.a.fromPositions(c.range.getStartPosition(),f.getEndPosition());o.push({range:h}),o.push({range:g}),e._addBracketLeading(r,g,o)}}}else{var m=s.has(l)?s.get(l):0;s.set(l,m+1)}i=c.range.getStartPosition()}}},{key:"_addBracketLeading",value:function(e,t,n){if(t.startLineNumber!==t.endLineNumber){var r=t.startLineNumber,i=e.getLineFirstNonWhitespaceColumn(r);0!==i&&i!==t.startColumn&&(n.push({range:Te.a.fromPositions(new ke.a(r,i),t.getEndPosition())}),n.push({range:Te.a.fromPositions(new ke.a(r,1),t.getEndPosition())}));var a=r-1;if(a>0){var o=e.getLineFirstNonWhitespaceColumn(a);o===t.startColumn&&o!==e.getLineLastNonWhitespaceColumn(a)&&(n.push({range:Te.a.fromPositions(new ke.a(a,o),t.getEndPosition())}),n.push({range:Te.a.fromPositions(new ke.a(a,1),t.getEndPosition())}))}}}}]),e}();Gf._maxDuration=30,Gf._maxRounds=2;var Yf=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Jf=function(){function e(t,n){Object(Y.a)(this,e),this.index=t,this.ranges=n}return Object(J.a)(e,[{key:"mov",value:function(t){var n=this.index+(t?1:-1);if(n<0||n>=this.ranges.length)return this;var r=new e(n,this.ranges);return r.ranges[n].equalsRange(this.ranges[this.index])?r.mov(t):r}}]),e}(),$f=function(){function e(t){Object(Y.a)(this,e),this._editor=t,this._ignoreSelection=!1}return Object(J.a)(e,[{key:"dispose",value:function(){var e;null===(e=this._selectionListener)||void 0===e||e.dispose()}},{key:"run",value:function(e){return Yf(this,void 0,void 0,K.a.mark((function t(){var n,r,i,a=this;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._editor.hasModel()){t.next=2;break}return t.abrupt("return");case 2:if(n=this._editor.getSelections(),r=this._editor.getModel(),_t.y.has(r)){t.next=6;break}return t.abrupt("return");case 6:if(this._state){t.next=9;break}return t.next=9,eh(r,n.map((function(e){return e.getPosition()})),this._editor.getOption(97),dt.a.None).then((function(e){var t;if(ne.m(e)&&e.length===n.length&&a._editor.hasModel()&&ne.g(a._editor.getSelections(),n,(function(e,t){return e.equalsSelection(t)}))){for(var r=function(t){e[t]=e[t].filter((function(e){return e.containsPosition(n[t].getStartPosition())&&e.containsPosition(n[t].getEndPosition())})),e[t].unshift(n[t])},i=0;i1?t-1:0),r=1;r=this.value.length)return{type:14,pos:this.pos,len:0};var t,n=this.pos,r=0,i=this.value.charCodeAt(n);if("number"===typeof(t=e._table[i]))return this.pos+=1,{type:t,pos:n,len:1};if(e.isDigitCharacter(i)){t=8;do{r+=1,i=this.value.charCodeAt(n+r)}while(e.isDigitCharacter(i));return this.pos+=r,{type:t,pos:n,len:r}}if(e.isVariableCharacter(i)){t=9;do{i=this.value.charCodeAt(n+ ++r)}while(e.isVariableCharacter(i)||e.isDigitCharacter(i));return this.pos+=r,{type:t,pos:n,len:r}}t=10;do{r+=1,i=this.value.charCodeAt(n+r)}while(!isNaN(i)&&"undefined"===typeof e._table[i]&&!e.isDigitCharacter(i)&&!e.isVariableCharacter(i));return this.pos+=r,{type:t,pos:n,len:r}}}],[{key:"isDigitCharacter",value:function(e){return e>=48&&e<=57}},{key:"isVariableCharacter",value:function(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}}]),e}();rh._table=(th={},Object(nh.a)(th,36,0),Object(nh.a)(th,58,1),Object(nh.a)(th,44,2),Object(nh.a)(th,123,3),Object(nh.a)(th,125,4),Object(nh.a)(th,92,5),Object(nh.a)(th,47,6),Object(nh.a)(th,124,7),Object(nh.a)(th,43,11),Object(nh.a)(th,45,12),Object(nh.a)(th,63,13),th);var ih=function(){function e(){Object(Y.a)(this,e),this._children=[]}return Object(J.a)(e,[{key:"appendChild",value:function(e){return e instanceof ah&&this._children[this._children.length-1]instanceof ah?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}},{key:"replace",value:function(e,t){var n=e.parent,r=n.children.indexOf(e),i=n.children.slice(0);i.splice.apply(i,[r,1].concat(Object(ct.a)(t))),n._children=i,function e(t,n){var r,i=Object(Ee.a)(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.parent=n,e(a.children,a)}}catch(o){i.e(o)}finally{i.f()}}(t,n)}},{key:"toString",value:function(){return this.children.reduce((function(e,t){return e+t.toString()}),"")}},{key:"len",value:function(){return 0}},{key:"children",get:function(){return this._children}},{key:"snippet",get:function(){for(var e=this;;){if(!e)return;if(e instanceof hh)return e;e=e.parent}}}]),e}(),ah=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).value=e,r}return Object(J.a)(n,[{key:"toString",value:function(){return this.value}},{key:"len",value:function(){return this.value.length}},{key:"clone",value:function(){return new n(this.value)}}]),n}(ih),oh=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return n}(ih),sh=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).index=e,r}return Object(J.a)(n,[{key:"clone",value:function(){var e=new n(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e}},{key:"isFinalTabstop",get:function(){return 0===this.index}},{key:"choice",get:function(){return 1===this._children.length&&this._children[0]instanceof uh?this._children[0]:void 0}}],[{key:"compareByIndex",value:function(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}}]),n}(oh),uh=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){var e;return Object(Y.a)(this,n),(e=t.apply(this,arguments)).options=[],e}return Object(J.a)(n,[{key:"appendChild",value:function(e){return e instanceof ah&&(e.parent=this,this.options.push(e)),this}},{key:"toString",value:function(){return this.options[0].value}},{key:"len",value:function(){return this.options[0].len()}},{key:"clone",value:function(){var e=new n;return this.options.forEach(e.appendChild,e),e}}]),n}(ih),ch=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){var e;return Object(Y.a)(this,n),(e=t.apply(this,arguments)).regexp=new RegExp(""),e}return Object(J.a)(n,[{key:"resolve",value:function(e){var t=this,n=!1,r=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 lh&&Boolean(e.elseValue)}))&&(r=this._replace([])),r}},{key:"_replace",value:function(e){var t,n="",r=Object(Ee.a)(this._children);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i instanceof lh){var a=e[i.index]||"";n+=a=i.resolve(a)}else n+=i.toString()}}catch(o){r.e(o)}finally{r.f()}return n}},{key:"toString",value:function(){return""}},{key:"clone",value:function(){var e=new n;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((function(e){return e.clone()})),e}}]),n}(ih),lh=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o;return Object(Y.a)(this,n),(o=t.call(this)).index=e,o.shorthandName=r,o.ifValue=i,o.elseValue=a,o}return Object(J.a)(n,[{key:"resolve",value:function(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":Boolean(e)&&"string"===typeof this.ifValue?this.ifValue:Boolean(e)||"string"!==typeof this.elseValue?e||"":this.elseValue}},{key:"_toPascalCase",value:function(e){var t=e.match(/[a-z]+/gi);return t?t.map((function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})).join(""):e}},{key:"clone",value:function(){return new n(this.index,this.shorthandName,this.ifValue,this.elseValue)}}]),n}(ih),dh=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).name=e,r}return Object(J.a)(n,[{key:"resolve",value:function(e){var t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new ah(t)],!0)}},{key:"clone",value:function(){var e=new n(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e}}]),n}(oh);function ph(e,t){for(var n=Object(ct.a)(e);n.length>0;){var r=n.shift();if(!t(r))break;n.unshift.apply(n,Object(ct.a)(r.children))}}var fh,hh=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"offset",value:function(e){var t=0,n=!1;return this.walk((function(r){return r===e?(n=!0,!1):(t+=r.len(),!0)})),n?t:-1}},{key:"fullLen",value:function(e){var t=0;return ph([e],(function(e){return t+=e.len(),!0})),t}},{key:"enclosingPlaceholders",value:function(e){for(var t=[],n=e.parent;n;)n instanceof sh&&t.push(n),n=n.parent;return t}},{key:"resolveVariables",value:function(e){var t=this;return this.walk((function(n){return n instanceof dh&&n.resolve(e)&&(t._placeholders=void 0),!0})),this}},{key:"appendChild",value:function(e){return this._placeholders=void 0,Object(en.a)(Object(tn.a)(n.prototype),"appendChild",this).call(this,e)}},{key:"replace",value:function(e,t){return this._placeholders=void 0,Object(en.a)(Object(tn.a)(n.prototype),"replace",this).call(this,e,t)}},{key:"clone",value:function(){var e=new n;return this._children=this.children.map((function(e){return e.clone()})),e}},{key:"walk",value:function(e){ph(this.children,e)}},{key:"placeholderInfo",get:function(){if(!this._placeholders){var e,t=[];this.walk((function(n){return n instanceof sh&&(t.push(n),e=!e||e.index0?i.set(e.index,e.children):a.push(e)),!0}));for(var s=0,u=a;s0&&t),!i.has(0)&&n&&r.appendChild(new sh(0)),r}},{key:"_accept",value: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}},{key:"_backTo",value:function(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}},{key:"_until",value: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 r=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),r}},{key:"_parse",value:function(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}},{key:"_parseEscaped",value: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 ah(t)),!0)}},{key:"_parseTabstopOrVariableName",value: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 sh(Number(t)):new dh(t)),!0):this._backTo(n)}},{key:"_parseComplexPlaceholder",value:function(e){var t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);var r=new sh(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new ah("${"+t+":")),r.children.forEach(e.appendChild,e),!0}else{if(!(r.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n);for(var i=new uh;;){if(this._parseChoiceElement(i)){if(this._accept(2))continue;if(this._accept(7)&&(r.appendChild(i),this._accept(4)))return e.appendChild(r),!0}return this._backTo(n),!1}}}},{key:"_parseChoiceElement",value:function(e){for(var t=this._token,n=[];2!==this._token.type&&7!==this._token.type;){var r=void 0;if(!(r=(r=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:this._accept(void 0,!0)))return this._backTo(t),!1;n.push(r)}return 0===n.length?(this._backTo(t),!1):(e.appendChild(new ah(n.join(""))),!0)}},{key:"_parseComplexVariable",value:function(e){var t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);var r=new dh(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(r)?(e.appendChild(r),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(r),!0):this._backTo(n);for(;;){if(this._accept(4))return e.appendChild(r),!0;if(!this._parse(r))return e.appendChild(new ah("${"+t+":")),r.children.forEach(e.appendChild,e),!0}}},{key:"_parseTransform",value:function(e){for(var t=new ch,n="",r="";!this._accept(6);){var i=void 0;if(i=this._accept(5,!0))n+=i=this._accept(6,!0)||i;else{if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}}for(;!this._accept(6);){var a=void 0;if(a=this._accept(5,!0))a=this._accept(5,!0)||this._accept(6,!0)||a,t.appendChild(new ah(a));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;r+=this._accept(void 0,!0)}try{t.regexp=new RegExp(n,r)}catch(o){return!1}return e.transform=t,!0}},{key:"_parseFormatString",value:function(e){var t=this._token;if(!this._accept(0))return!1;var n=!1;this._accept(3)&&(n=!0);var r=this._accept(8,!0);if(!r)return this._backTo(t),!1;if(!n)return e.appendChild(new lh(Number(r))),!0;if(this._accept(4))return e.appendChild(new lh(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){var i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new lh(Number(r),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){var a=this._until(4);if(a)return e.appendChild(new lh(Number(r),void 0,a,void 0)),!0}else if(this._accept(12)){var o=this._until(4);if(o)return e.appendChild(new lh(Number(r),void 0,void 0,o)),!0}else if(this._accept(13)){var s=this._until(1);if(s){var u=this._until(4);if(u)return e.appendChild(new lh(Number(r),void 0,s,u)),!0}}else{var c=this._until(4);if(c)return e.appendChild(new lh(Number(r),void 0,void 0,c)),!0}return this._backTo(t),!1}},{key:"_parseAnything",value:function(e){return 14!==this._token.type&&(e.appendChild(new ah(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}],[{key:"escape",value:function(e){return e.replace(/\$|}|\\/g,"\\$&")}},{key:"guessNeedsClipboard",value:function(e){return/\${?CLIPBOARD/.test(e)}}]),e}(),mh=n(119),_h=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},vh={Visible:new te.c("suggestWidgetVisible",!1),DetailsVisible:new te.c("suggestWidgetDetailsVisible",!1),MultipleSuggestions:new te.c("suggestWidgetMultipleSuggestions",!1),MakesTextEdit:new te.c("suggestionMakesTextEdit",!0),AcceptSuggestionsOnEnter:new te.c("acceptSuggestionOnEnter",!0),HasInsertAndReplaceRange:new te.c("suggestionHasInsertAndReplaceRange",!1),InsertMode:new te.c("suggestionInsertMode",void 0),CanResolve:new te.c("suggestionCanResolve",!1)},yh=new Fe.b("suggestWidgetStatusBar"),bh=function(){function e(t,n,r,i){Object(Y.a)(this,e),this.position=t,this.completion=n,this.container=r,this.provider=i,this.isInvalid=!1,this.score=so.a.Default,this.distance=0,this.textLabel="string"===typeof n.label?n.label:n.label.name,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=n.sortText&&n.sortText.toLowerCase(),this.filterTextLow=n.filterText&&n.filterText.toLowerCase(),Te.a.isIRange(n.range)?(this.editStart=new ke.a(n.range.startLineNumber,n.range.startColumn),this.editInsertEnd=new ke.a(n.range.endLineNumber,n.range.endColumn),this.editReplaceEnd=new ke.a(n.range.endLineNumber,n.range.endColumn),this.isInvalid=this.isInvalid||Te.a.spansMultipleLines(n.range)||n.range.startLineNumber!==t.lineNumber):(this.editStart=new ke.a(n.range.insert.startLineNumber,n.range.insert.startColumn),this.editInsertEnd=new ke.a(n.range.insert.endLineNumber,n.range.insert.endColumn),this.editReplaceEnd=new ke.a(n.range.replace.endLineNumber,n.range.replace.endColumn),this.isInvalid=this.isInvalid||Te.a.spansMultipleLines(n.range.insert)||Te.a.spansMultipleLines(n.range.replace)||n.range.insert.startLineNumber!==t.lineNumber||n.range.replace.startLineNumber!==t.lineNumber||n.range.insert.startColumn!==n.range.replace.startColumn),"function"!==typeof i.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}return Object(J.a)(e,[{key:"resolve",value:function(e){return _h(this,void 0,void 0,K.a.mark((function t(){var n,r=this;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._resolveCache||(n=e.onCancellationRequested((function(){r._resolveCache=void 0,r._isResolved=!1})),this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((function(e){Object.assign(r.completion,e),r._isResolved=!0,n.dispose()}),(function(e){Object(ie.d)(e)&&(r._resolveCache=void 0,r._isResolved=!1)}))),t.abrupt("return",this._resolveCache);case 2:case"end":return t.stop()}}),t,this)})))}},{key:"isResolved",get:function(){return!!this._isResolved}}]),e}(),Dh=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;Object(Y.a)(this,e),this.snippetSortOrder=t,this.kindFilter=n,this.providerFilter=r};Dh.default=new Dh;var Eh=function e(t,n,r,i){Object(Y.a)(this,e),this.items=t,this.needsClipboard=n,this.durations=r,this.disposable=i};function Ch(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Dh.default,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{triggerKind:0},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:dt.a.None;return _h(this,void 0,void 0,K.a.mark((function a(){var o,s,u,c,l,d,p,f,h,g,m,_,v,y,b=this;return K.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:o=new mh.a(!0),t=t.clone(),s=e.getWordAtPosition(t),u=s?new Te.a(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):Te.a.fromPositions(t),c={replace:u,insert:u.setEndPosition(t.lineNumber,t.column)},l=[],d=new xe.b,p=[],f=!1,h=function(e,r,i){var a,o;if(r){var s,u=Object(Ee.a)(r.suggestions);try{for(u.s();!(s=u.n()).done;){var h=s.value;n.kindFilter.has(h.kind)||(h.range||(h.range=c),h.sortText||(h.sortText="string"===typeof h.label?h.label:h.label.name),!f&&h.insertTextRules&&4&h.insertTextRules&&(f=gh.guessNeedsClipboard(h.insertText)),l.push(new bh(t,h,r,e)))}}catch(g){u.e(g)}finally{u.f()}Object(xe.g)(r)&&d.add(r),p.push({providerName:null!==(a=e._debugDisplayName)&&void 0!==a?a:"unkown_provider",elapsedProvider:null!==(o=r.duration)&&void 0!==o?o:-1,elapsedOverall:i.elapsed()})}},g=_h(b,void 0,void 0,K.a.mark((function a(){var o,s;return K.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return");case 2:if(!(n.providerFilter.size>0)||n.providerFilter.has(fh)){a.next=4;break}return a.abrupt("return");case 4:return o=new mh.a(!0),a.next=7,fh.provideCompletionItems(e,t,r,i);case 7:s=a.sent,h(fh,s,o);case 9:case"end":return a.stop()}}),a)}))),m=Object(Ee.a)(_t.d.orderedGroups(e)),a.prev=12,m.s();case 14:if((_=m.n()).done){a.next=23;break}return v=_.value,y=l.length,a.next=19,Promise.all(v.map((function(a){return _h(b,void 0,void 0,K.a.mark((function o(){var s,u;return K.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!(n.providerFilter.size>0)||n.providerFilter.has(a)){o.next=2;break}return o.abrupt("return");case 2:return o.prev=2,s=new mh.a(!0),o.next=6,a.provideCompletionItems(e,t,r,i);case 6:u=o.sent,h(a,u,s),o.next=13;break;case 10:o.prev=10,o.t0=o.catch(2),Object(ie.f)(o.t0);case 13:case"end":return o.stop()}}),o,null,[[2,10]])})))})));case 19:if(y===l.length&&!i.isCancellationRequested){a.next=21;break}return a.abrupt("break",23);case 21:a.next=14;break;case 23:a.next=28;break;case 25:a.prev=25,a.t0=a.catch(12),m.e(a.t0);case 28:return a.prev=28,m.f(),a.finish(28);case 31:return a.next=33,g;case 33:if(!i.isCancellationRequested){a.next=36;break}return d.dispose(),a.abrupt("return",Promise.reject(Object(ie.a)()));case 36:return a.abrupt("return",new Eh(l.sort(kh(n.snippetSortOrder)),f,{entries:p,elapsed:o.elapsed()},d));case 37:case"end":return a.stop()}}),a,null,[[12,25,28,31]])})))}function Sh(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.completion.labelt.completion.label?1:e.completion.kind-t.completion.kind}var xh=new Map;function kh(e){return xh.get(e)}xh.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return Sh(e,t)})),xh.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return Sh(e,t)})),xh.set(1,Sh),St.a.registerCommand("_executeCompletionItemProvider",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0){var r,i=[],a=Object(Ee.a)(this._placeholderGroups[this._placeholderGroupsIdx]);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(o.transform){for(var s=this._placeholderDecorations.get(o),u=this._editor.getModel().getDecorationRange(s),c=this._editor.getModel().getValueInRange(u),l=o.transform.resolve(c).split(/\r\n|\r|\n/),d=1;d0&&this._editor.executeEdits("snippet.placeholderTransform",i)}var p=!1;!0===t&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,p=!0);var f=this._editor.getModel().changeDecorations((function(t){var r,i=new Set,a=[],o=Object(Ee.a)(n._placeholderGroups[n._placeholderGroupsIdx]);try{for(o.s();!(r=o.n()).done;){var s=r.value,u=n._placeholderDecorations.get(s),c=n._editor.getModel().getDecorationRange(u);a.push(new Z.a(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),p=p&&n._hasPlaceholderBeenCollapsed(s),t.changeDecorationOptions(u,s.isFinalTabstop?e._decor.activeFinal:e._decor.active),i.add(s);var l,d=Object(Ee.a)(n._snippet.enclosingPlaceholders(s));try{for(d.s();!(l=d.n()).done;){var f=l.value,g=n._placeholderDecorations.get(f);t.changeDecorationOptions(g,f.isFinalTabstop?e._decor.activeFinal:e._decor.active),i.add(f)}}catch(h){d.e(h)}finally{d.f()}}}catch(h){o.e(h)}finally{o.f()}var m,_=Object(Ee.a)(n._placeholderDecorations);try{for(_.s();!(m=_.n()).done;){var v=Object(Ce.a)(m.value,2),y=v[0],b=v[1];i.has(y)||t.changeDecorationOptions(b,y.isFinalTabstop?e._decor.inactiveFinal:e._decor.inactive)}}catch(h){_.e(h)}finally{_.f()}return a}));return p?this.move(t):null!==f&&void 0!==f?f:[]}},{key:"_hasPlaceholderBeenCollapsed",value:function(e){for(var t=e;t;){if(t instanceof sh){var n=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(n).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}},{key:"computePossibleSelections",value:function(){var e,t=new Map,n=Object(Ee.a)(this._placeholderGroups);try{for(n.s();!(e=n.n()).done;){var r,i=e.value,a=void 0,o=Object(Ee.a)(i);try{for(o.s();!(r=o.n()).done;){var s=r.value;if(s.isFinalTabstop)break;a||(a=[],t.set(s.index,a));var u=this._placeholderDecorations.get(s),c=this._editor.getModel().getDecorationRange(u);if(!c){t.delete(s.index);break}a.push(c)}}catch(l){o.e(l)}finally{o.f()}}}catch(l){n.e(l)}finally{n.f()}return t}},{key:"merge",value:function(t){var n=this,r=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((function(i){var a,o=Object(Ee.a)(n._placeholderGroups[n._placeholderGroupsIdx]);try{for(o.s();!(a=o.n()).done;){var s=a.value,u=t.shift();console.assert(!u._placeholderDecorations);var c,l=u._snippet.placeholderInfo.last.index,d=Object(Ee.a)(u._snippet.placeholderInfo.all);try{for(d.s();!(c=d.n()).done;){var p=c.value;p.isFinalTabstop?p.index=s.index+(l+1)/n._nestingLevel:p.index=s.index+p.index/n._nestingLevel}}catch(D){d.e(D)}finally{d.f()}n._snippet.replace(s,u._snippet.children);var f=n._placeholderDecorations.get(s);i.removeDecoration(f),n._placeholderDecorations.delete(s);var h,g=Object(Ee.a)(u._snippet.placeholders);try{for(g.s();!(h=g.n()).done;){var m=h.value,_=u._snippet.offset(m),v=u._snippet.fullLen(m),y=Te.a.fromPositions(r.getPositionAt(u._offset+_),r.getPositionAt(u._offset+_+v)),b=i.addDecoration(y,e._decor.inactive);n._placeholderDecorations.set(m,b)}}catch(D){g.e(D)}finally{g.f()}}}catch(D){o.e(D)}finally{o.f()}n._placeholderGroups=Object(ne.k)(n._snippet.placeholders,sh.compareByIndex)}))}},{key:"isAtFirstPlaceholder",get:function(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}},{key:"isAtLastPlaceholder",get:function(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}},{key:"hasPlaceholder",get:function(){return this._snippet.placeholders.length>0}},{key:"choice",get:function(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}}]),e}();Wh._decor={active:Ae.a.register({stickiness:0,className:"snippet-placeholder"}),inactive:Ae.a.register({stickiness:1,className:"snippet-placeholder"}),activeFinal:Ae.a.register({stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:Ae.a.register({stickiness:1,className:"finish-snippet-placeholder"})};var Kh={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},qh=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Kh;Object(Y.a)(this,e),this._templateMerges=[],this._snippets=[],this._editor=t,this._template=n,this._options=r}return Object(J.a)(e,[{key:"dispose",value:function(){Object(xe.f)(this._snippets)}},{key:"_logInfo",value:function(){return'template="'.concat(this._template,'", merged_templates="').concat(this._templateMerges.join(" -> "),'"')}},{key:"insert",value:function(){var t=this;if(this._editor.hasModel()){var n=e.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer),r=n.edits,i=n.snippets;this._snippets=i,this._editor.executeEdits("snippet",r,(function(e){return t._snippets[0].hasPlaceholder?t._move(!0):e.filter((function(e){return!!e.identifier})).map((function(e){return Z.a.fromPositions(e.range.getEndPosition())}))})),this._editor.revealRange(this._editor.getSelections()[0])}}},{key:"merge",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Kh;if(this._editor.hasModel()){this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,t]);var i=e.createEditsAndSnippets(this._editor,t,r.overwriteBefore,r.overwriteAfter,!0,r.adjustWhitespace,r.clipboardText,r.overtypingCapturer),a=i.edits,o=i.snippets;this._editor.executeEdits("snippet",a,(function(e){var t,r=Object(Ee.a)(n._snippets);try{for(r.s();!(t=r.n()).done;){t.value.merge(o)}}catch(i){r.e(i)}finally{r.f()}return console.assert(0===o.length),n._snippets[0].hasPlaceholder?n._move(void 0):e.filter((function(e){return!!e.identifier})).map((function(e){return Z.a.fromPositions(e.range.getEndPosition())}))}))}}},{key:"next",value:function(){var e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}},{key:"prev",value:function(){var e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}},{key:"_move",value:function(e){var t,n=[],r=Object(Ee.a)(this._snippets);try{for(r.s();!(t=r.n()).done;){var i=t.value.move(e);n.push.apply(n,Object(ct.a)(i))}}catch(a){r.e(a)}finally{r.f()}return n}},{key:"isSelectionWithinPlaceholders",value:function(){if(!this.hasPlaceholder)return!1;var e=this._editor.getSelections();if(e.length0}},{key:"isAtFirstPlaceholder",get:function(){return this._snippets[0].isAtFirstPlaceholder}},{key:"isAtLastPlaceholder",get:function(){return this._snippets[0].isAtLastPlaceholder}},{key:"hasPlaceholder",get:function(){return this._snippets[0].hasPlaceholder}},{key:"choice",get:function(){return this._snippets[0].choice}}],[{key:"adjustWhitespace",value:function(e,t,n,r,i){var a,o=e.getLineContent(t.lineNumber),s=Object(ft.y)(o,0,t.column-1);return n.walk((function(t){if(!(t instanceof ah)||t.parent instanceof uh)return!0;var i=t.value.split(/\r\n|\r|\n/);if(r){var o=n.offset(t);if(0===o)i[0]=e.normalizeIndentation(i[0]);else{var u=(a=null!==a&&void 0!==a?a:n.toString()).charCodeAt(o-1);10!==u&&13!==u||(i[0]=e.normalizeIndentation(s+i[0]))}for(var c=1;c0&&y!==p.getLineFirstNonWhitespaceColumn(C.positionLineNumber),!0);w.resolveVariables(new Rh([h,new jh(g,S,b.length,"spread"===t.getOption(65)),new Mh(p,C,S,u),new Uh(p,C),new Vh,new zh(f),new Hh]));var N=p.getOffsetAt(A)+m;m+=w.toString().length-p.getValueLengthInRange(T),c[S]=Os.a.replace(T,w.toString()),c[S].identifier={major:S,minor:0},l[S]=new Wh(t,w,N,O)}}catch(I){D.e(I)}finally{D.f()}return{edits:c,snippets:l}}}]),e}(),Gh=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Yh=function(e,t){return function(n,r){t(n,r,e)}},Jh={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0},$h=function(){function e(t,n,r){Object(Y.a)(this,e),this._editor=t,this._logService=n,this._snippetListener=new xe.b,this._modelVersionId=-1,this._inSnippet=e.InSnippetMode.bindTo(r),this._hasNextTabstop=e.HasNextTabstop.bindTo(r),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(r)}return Object(J.a)(e,[{key:"dispose",value:function(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}},{key:"insert",value:function(e,t){try{this._doInsert(e,"undefined"===typeof t?Jh:Object.assign(Object.assign({},Jh),t))}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}},{key:"_doInsert",value:function(e,t){var n=this;this._editor.hasModel()&&(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new qh(this._editor,e,t),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((function(e){return e.isFlush&&n.cancel()}))),this._snippetListener.add(this._editor.onDidChangeModel((function(){return n.cancel()}))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((function(){return n._updateState()}))))}},{key:"_updateState",value:function(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}},{key:"_handleChoice",value:function(){var e=this;if(this._session&&this._editor.hasModel()){var t,n,r=this._session.choice;if(r){if(this._currentChoice!==r){this._currentChoice=r,this._editor.setSelections(this._editor.getSelections().map((function(e){return Z.a.fromPositions(e.getStartPosition())})));var i=Object(Ce.a)(r.options,1)[0];t=this._editor,n=r.options.map((function(t,n){return{kind:13,label:t.value,insertText:t.value,sortText:"a".repeat(n+1),range:Te.a.fromPositions(e._editor.getPosition(),e._editor.getPosition().delta(0,i.value.length))}})),setTimeout((function(){var e;(e=Th.onlyOnceSuggestions).push.apply(e,Object(ct.a)(n)),t.getContribution("editor.contrib.suggestController").triggerSuggest((new Set).add(Th))}),0)}}else this._currentChoice=void 0}else this._currentChoice=void 0}},{key:"finish",value:function(){for(;this._inSnippet.get();)this.next()}},{key:"cancel",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),null===(e=this._session)||void 0===e||e.dispose(),this._session=void 0,this._modelVersionId=-1,t&&this._editor.setSelections([this._editor.getSelection()])}},{key:"prev",value:function(){this._session&&this._session.prev(),this._updateState()}},{key:"next",value:function(){this._session&&this._session.next(),this._updateState()}},{key:"isInSnippet",value:function(){return Boolean(this._inSnippet.get())}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();$h.ID="snippetController2",$h.InSnippetMode=new te.c("inSnippetMode",!1),$h.HasNextTabstop=new te.c("hasNextTabstop",!1),$h.HasPrevTabstop=new te.c("hasPrevTabstop",!1),$h=Gh([Yh(1,Ff.b),Yh(2,te.b)],$h),Object($.l)($h.ID,$h);var Qh=$.c.bindToContribution($h.get);Object($.k)(new Qh({id:"jumpToNextSnippetPlaceholder",precondition:te.a.and($h.InSnippetMode,$h.HasNextTabstop),handler:function(e){return e.next()},kbOpts:{weight:130,kbExpr:X.a.editorTextFocus,primary:2}})),Object($.k)(new Qh({id:"jumpToPrevSnippetPlaceholder",precondition:te.a.and($h.InSnippetMode,$h.HasPrevTabstop),handler:function(e){return e.prev()},kbOpts:{weight:130,kbExpr:X.a.editorTextFocus,primary:1026}})),Object($.k)(new Qh({id:"leaveSnippet",precondition:$h.InSnippetMode,handler:function(e){return e.cancel(!0)},kbOpts:{weight:130,kbExpr:X.a.editorTextFocus,primary:9,secondary:[1033]}})),Object($.k)(new Qh({id:"acceptSnippet",precondition:$h.InSnippetMode,handler:function(e){return e.finish()}}));var Xh=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Zh=function(e,t){return function(n,r){t(n,r,e)}},eg=function(){function e(t){Object(Y.a)(this,e),this.name=t}return Object(J.a)(e,[{key:"select",value:function(e,t,n){if(0===n.length)return 0;for(var r=n[0].score[0],i=0;iu&&d.type===r[c].completion.kind&&d.insertText===r[c].completion.insertText&&(u=d.touch,s=c),r[c].completion.preselect&&-1===o)return c}return-1!==s?s:-1!==o?o:0}},{key:"toJSON",value:function(){return this._cache.toJSON()}},{key:"fromJSON",value:function(e){this._cache.clear();var t,n=Object(Ee.a)(e);try{for(n.s();!(t=n.n()).done;){var r=Object(Ce.a)(t.value,2),i=r[0],a=r[1];a.touch=0,a.type="number"===typeof a.type?a.type:Object(_t.F)(a.type),this._cache.set(i,a)}}catch(o){n.e(o)}finally{n.f()}this._seq=this._cache.size}}]),n}(eg),rg=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){var e;return Object(Y.a)(this,n),(e=t.call(this,"recentlyUsedByPrefix"))._trie=Yn.c.forStrings(),e._seq=0,e}return Object(J.a)(n,[{key:"memorize",value:function(e,t,n){var r=e.getWordUntilPosition(t).word,i="".concat(e.getLanguageIdentifier().language,"/").concat(r);this._trie.set(i,{type:n.completion.kind,insertText:n.completion.insertText,touch:this._seq++})}},{key:"select",value:function(e,t,r){var i=e.getWordUntilPosition(t).word;if(!i)return Object(en.a)(Object(tn.a)(n.prototype),"select",this).call(this,e,t,r);var a="".concat(e.getLanguageIdentifier().language,"/").concat(i),o=this._trie.get(a);if(o||(o=this._trie.findSubstr(a)),o)for(var s=0;s0){this._seq=e[0][1].touch+1;var t,n=Object(Ee.a)(e);try{for(n.s();!(t=n.n()).done;){var r=Object(Ce.a)(t.value,2),i=r[0],a=r[1];a.type="number"===typeof a.type?a.type:Object(_t.F)(a.type),this._trie.set(i,a)}}catch(o){n.e(o)}finally{n.f()}}}}]),n}(eg),ig=function(){function e(t,n,r){var i=this;Object(Y.a)(this,e),this._storageService=t,this._modeService=n,this._configService=r,this._disposables=new xe.b,this._persistSoon=new Se.d((function(){return i._saveState()}),500),this._disposables.add(t.onWillSaveState((function(e){e.reason===Jn.c.SHUTDOWN&&i._saveState()})))}return Object(J.a)(e,[{key:"dispose",value:function(){this._disposables.dispose(),this._persistSoon.dispose()}},{key:"memorize",value:function(e,t,n){this._withStrategy(e,t).memorize(e,t,n),this._persistSoon.schedule()}},{key:"select",value:function(e,t,n){return this._withStrategy(e,t).select(e,t,n)}},{key:"_withStrategy",value:function(t,n){var r,i,a=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:null===(r=this._modeService.getLanguageIdentifier(t.getLanguageIdAtPosition(n.lineNumber,n.column)))||void 0===r?void 0:r.language,resource:t.uri});if((null===(i=this._strategy)||void 0===i?void 0:i.name)!==a){this._saveState();var o=e._strategyCtors.get(a)||tg;this._strategy=new o;try{var s=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,u=this._storageService.get("".concat(e._storagePrefix,"/").concat(a),s);u&&this._strategy.fromJSON(JSON.parse(u))}catch(c){}}return this._strategy}},{key:"_saveState",value:function(){if(this._strategy){var t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,n=JSON.stringify(this._strategy);this._storageService.store("".concat(e._storagePrefix,"/").concat(this._strategy.name),n,t,1)}}}]),e}();ig._strategyCtors=new Map([["recentlyUsedByPrefix",rg],["recentlyUsed",ng],["first",tg]]),ig._storagePrefix="suggest/memories",ig=Xh([Zh(0,Jn.a),Zh(1,gr.a),Zh(2,dr.a)],ig);var ag=Object(zt.c)("ISuggestMemories");Object(Gn.b)(ag,ig,!0);var og=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},sg=function(e,t){return function(n,r){t(n,r,e)}},ug=function(){function e(t,n){Object(Y.a)(this,e),this._editor=t,this._index=0,this._ckOtherSuggestions=e.OtherSuggestions.bindTo(n)}return Object(J.a)(e,[{key:"dispose",value:function(){this.reset()}},{key:"reset",value:function(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}},{key:"set",value:function(t,n){var r=this,i=t.model,a=t.index;0!==i.items.length?e._moveIndex(!0,i,a)!==a?(this._acceptNext=n,this._model=i,this._index=a,this._listener=this._editor.onDidChangeCursorPosition((function(){r._ignore||r.reset()})),this._ckOtherSuggestions.set(!0)):this.reset():this.reset()}},{key:"next",value:function(){this._move(!0)}},{key:"prev",value:function(){this._move(!1)}},{key:"_move",value:function(t){if(this._model)try{this._ignore=!0,this._index=e._moveIndex(t,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}}],[{key:"_moveIndex",value:function(e,t,n){for(var r=n;(r=(r+t.items.length+(e?1:-1))%t.items.length)!==n&&t.items[r].completion.additionalTextEdits;);return r}}]),e}();ug.OtherSuggestions=new te.c("hasOtherSuggestions",!1),ug=og([sg(1,te.b)],ug);var cg=function(){function e(t,n,r,i,a,o,s){Object(Y.a)(this,e),this.clipboardText=s,this._snippetCompareFn=e._compareCompletionItems,this._items=t,this._column=n,this._wordDistance=i,this._options=a,this._refilterKind=1,this._lineContext=r,"top"===o?this._snippetCompareFn=e._compareCompletionItemsSnippetsUp:"bottom"===o&&(this._snippetCompareFn=e._compareCompletionItemsSnippetsDown)}return Object(J.a)(e,[{key:"adopt",value:function(e){for(var t=[],n=0;n2e3?so.d:so.e,c=0;c=p)l.score=so.a.Default;else if("string"===typeof l.completion.filterText){var m=u(i,a,h,l.completion.filterText,l.filterTextLow,0,!1);if(!m)continue;0===Object(ft.g)(l.completion.filterText,f)?l.score=m:(l.score=Object(so.b)(i,a,h,f,l.labelLow,0),l.score[0]=m[0])}else{var _=u(i,a,h,f,l.labelLow,0,!1);if(!_)continue;l.score=_}}l.idx=c,l.distance=this._wordDistance.distance(l.position,l.completion),s.push(l),e.push(f.length)}}this._filteredItems=s.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?Object(ne.q)(e.length-.85,e,(function(e,t){return e-t})):0}}},{key:"lineContext",get:function(){return this._lineContext},set:function(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDeltat.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}},{key:"_compareCompletionItemsSnippetsDown",value:function(t,n){if(t.completion.kind!==n.completion.kind){if(27===t.completion.kind)return 1;if(27===n.completion.kind)return-1}return e._compareCompletionItems(t,n)}},{key:"_compareCompletionItemsSnippetsUp",value:function(t,n){if(t.completion.kind!==n.completion.kind){if(27===t.completion.kind)return-1;if(27===n.completion.kind)return 1}return e._compareCompletionItems(t,n)}}]),e}(),lg=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},dg=function(){function e(){Object(Y.a)(this,e)}return Object(J.a)(e,null,[{key:"create",value:function(t,n){return lg(this,void 0,void 0,K.a.mark((function r(){var i,a,o,s,u,c,l;return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n.getOption(101).localityBonus){r.next=2;break}return r.abrupt("return",e.None);case 2:if(n.hasModel()){r.next=4;break}return r.abrupt("return",e.None);case 4:if(i=n.getModel(),a=n.getPosition(),t.canComputeWordRanges(i.uri)){r.next=8;break}return r.abrupt("return",e.None);case 8:return r.next=10,(new Gf).provideSelectionRanges(i,[a]);case 10:if(o=r.sent,s=Object(Ce.a)(o,1),0!==(u=s[0]).length){r.next=15;break}return r.abrupt("return",e.None);case 15:return r.next=17,t.computeWordRanges(i.uri,u[0].range);case 17:if(c=r.sent){r.next=20;break}return r.abrupt("return",e.None);case 20:return l=i.getWordUntilPosition(a),delete c[l.word],r.abrupt("return",new(function(e){Object(q.a)(r,e);var t=Object(G.a)(r);function r(){return Object(Y.a)(this,r),t.apply(this,arguments)}return Object(J.a)(r,[{key:"distance",value:function(e,t){if(!a.equals(n.getPosition()))return 0;if(17===t.kind)return 2<<20;var r="string"===typeof t.label?t.label:t.label.name,i=c[r];if(Object(ne.l)(i))return 2<<20;var o,s=Object(ne.c)(i,Te.a.fromPositions(e),Te.a.compareRangesUsingStarts),l=s>=0?i[s]:i[Math.max(0,~s-1)],d=u.length,p=Object(Ee.a)(u);try{for(p.s();!(o=p.n()).done;){var f=o.value;if(!Te.a.containsRange(f.range,l))break;d-=1}}catch(h){p.e(h)}finally{p.f()}return d}}]),r}(e)));case 23:case"end":return r.stop()}}),r)})))}}]),e}();dg.None=new(function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"distance",value:function(){return 0}}]),n}(dg));var pg=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},fg=function(e,t){return function(n,r){t(n,r,e)}},hg=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},gg=function(){function e(t,n,r,i){Object(Y.a)(this,e),this.leadingLineContent=t.getLineContent(n.lineNumber).substr(0,n.column-1),this.leadingWord=t.getWordUntilPosition(n),this.lineNumber=n.lineNumber,this.column=n.column,this.auto=r,this.shy=i}return Object(J.a)(e,null,[{key:"shouldAutoTrigger",value:function(e){if(!e.hasModel())return!1;var t=e.getModel(),n=e.getPosition();t.tokenizeIfCheap(n.lineNumber);var r=t.getWordAtPosition(n);return!!r&&(r.endColumn===n.column&&!!isNaN(Number(r.word)))}}]),e}(),mg=function(){function e(t,n,r,i,a){var o=this;Object(Y.a)(this,e),this._editor=t,this._editorWorkerService=n,this._clipboardService=r,this._telemetryService=i,this._logService=a,this._toDispose=new xe.b,this._quickSuggestDelay=10,this._triggerCharacterListener=new xe.b,this._triggerQuickSuggest=new Se.e,this._state=0,this._completionDisposables=new xe.b,this._onDidCancel=new rn.a,this._onDidTrigger=new rn.a,this._onDidSuggest=new rn.a,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new Z.a(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((function(){o._updateTriggerCharacters(),o.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((function(){o._updateTriggerCharacters(),o.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((function(){o._updateTriggerCharacters(),o._updateQuickSuggest()}))),this._toDispose.add(_t.d.onDidChange((function(){o._updateTriggerCharacters(),o._updateActiveSuggestSession()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((function(e){o._onCursorChange(e)})));var s=!1;this._toDispose.add(this._editor.onDidCompositionStart((function(){s=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((function(){s=!1,o._refilterCompletionItems()}))),this._toDispose.add(this._editor.onDidChangeModelContent((function(){s||o._refilterCompletionItems()}))),this._updateTriggerCharacters(),this._updateQuickSuggest()}return Object(J.a)(e,[{key:"dispose",value:function(){Object(xe.f)(this._triggerCharacterListener),Object(xe.f)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}},{key:"_updateQuickSuggest",value:function(){this._quickSuggestDelay=this._editor.getOption(74),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}},{key:"_updateTriggerCharacters",value:function(){var e=this;if(this._triggerCharacterListener.clear(),!this._editor.getOption(75)&&this._editor.hasModel()&&this._editor.getOption(104)){var t,n=new Map,r=Object(Ee.a)(_t.d.all(this._editor.getModel()));try{for(r.s();!(t=r.n()).done;){var i,a=t.value,o=Object(Ee.a)(a.triggerCharacters||[]);try{for(o.s();!(i=o.n()).done;){var s=i.value,u=n.get(s);u||((u=new Set).add(fh),n.set(s,u)),u.add(a)}}catch(l){o.e(l)}finally{o.f()}}}catch(l){r.e(l)}finally{r.f()}var c=function(t){if(!t){var r=e._editor.getPosition();t=e._editor.getModel().getLineContent(r.lineNumber).substr(0,r.column-1)}var i="";Object(ft.F)(t.charCodeAt(t.length-1))?Object(ft.E)(t.charCodeAt(t.length-2))&&(i=t.substr(t.length-2)):i=t.charAt(t.length-1);var a=n.get(i);if(a){var o=e._completionModel?{items:e._completionModel.adopt(a),clipboardText:e._completionModel.clipboardText}:void 0;e.trigger({auto:!0,shy:!1,triggerCharacter:i},Boolean(e._completionModel),a,o)}};this._triggerCharacterListener.add(this._editor.onDidType(c)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(c))}}},{key:"cancel",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];0!==this._state&&(this._triggerQuickSuggest.cancel(),null===(e=this._requestToken)||void 0===e||e.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:t}))}},{key:"clear",value:function(){this._completionDisposables.clear()}},{key:"_updateActiveSuggestSession",value:function(){0!==this._state&&(this._editor.hasModel()&&_t.d.has(this._editor.getModel())?this.trigger({auto:2===this._state,shy:!1},!0):this.cancel())}},{key:"_onCursorChange",value:function(e){var t=this;if(this._editor.hasModel()){var n=this._editor.getModel(),r=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source)this.cancel();else if(_t.d.has(n))if(0===this._state&&0===e.reason){if(!1===this._editor.getOption(73))return;if(!r.containsRange(this._currentSelection)&&!r.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))return;if(this._editor.getOption(101).snippetsPreventQuickSuggestions&&$h.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet((function(){if(0===t._state&&gg.shouldAutoTrigger(t._editor)&&t._editor.hasModel()){var e=t._editor.getModel(),n=t._editor.getPosition(),r=t._editor.getOption(73);if(!1!==r){if(!0===r);else{e.tokenizeIfCheap(n.lineNumber);var i=e.getLineTokens(n.lineNumber),a=i.getStandardTokenType(i.findTokenIndexAtOffset(Math.max(n.column-1-1,0)));if(!(r.other&&0===a||r.comments&&1===a||r.strings&&2===a))return}t.trigger({auto:!0,shy:!1})}}}),this._quickSuggestDelay)}else 0!==this._state&&3===e.reason&&this._refilterCompletionItems()}}},{key:"_refilterCompletionItems",value:function(){var e=this;Promise.resolve().then((function(){if(0!==e._state&&e._editor.hasModel()){var t=e._editor.getModel(),n=e._editor.getPosition(),r=new gg(t,n,2===e._state,!1);e._onNewContext(r)}}))}},{key:"trigger",value:function(t){var n,r=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;if(this._editor.hasModel()){var s=this._editor.getModel(),u=t.auto,c=new gg(s,this._editor.getPosition(),u,t.shy);this.cancel(i),this._state=u?2:1,this._onDidTrigger.fire({auto:u,shy:t.shy,position:this._editor.getPosition()}),this._context=c;var l={triggerKind:null!==(n=t.triggerKind)&&void 0!==n?n:0};t.triggerCharacter&&(l={triggerKind:1,triggerCharacter:t.triggerCharacter}),this._requestToken=new dt.b;var d=this._editor.getOption(96),p=1;switch(d){case"top":p=0;break;case"bottom":p=2}var f=e._createItemKindFilter(this._editor),h=dg.create(this._editorWorkerService,this._editor),g=Ch(s,this._editor.getPosition(),new Dh(p,f,a),l,this._requestToken.token);Promise.all([g,h]).then((function(e){var n=Object(Ce.a)(e,2),i=n[0],a=n[1];return hg(r,void 0,void 0,K.a.mark((function e(){var n,r,s,c,l,d;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=this._requestToken)||void 0===n||n.dispose(),this._editor.hasModel()){e.next=3;break}return e.abrupt("return");case 3:if((r=null===o||void 0===o?void 0:o.clipboardText)||!i.needsClipboard){e.next=8;break}return e.next=7,this._clipboardService.readText();case 7:r=e.sent;case 8:if(0!==this._state){e.next=10;break}return e.abrupt("return");case 10:s=this._editor.getModel(),c=i.items,o&&(l=kh(p),c=c.concat(o.items).sort(l)),d=new gg(s,this._editor.getPosition(),u,t.shy),this._completionModel=new cg(c,this._context.column,{leadingLineContent:d.leadingLineContent,characterCountDelta:d.column-this._context.column},a,this._editor.getOption(101),this._editor.getOption(96),r),this._completionDisposables.add(i.disposable),this._onNewContext(d),this._reportDurationsTelemetry(i.durations);case 18:case"end":return e.stop()}}),e,this)})))})).catch(ie.e)}}},{key:"_reportDurationsTelemetry",value:function(e){var t=this;this._telemetryGate++%230===0&&setTimeout((function(){t._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),t._logService.debug("suggest.durations.json",e)}))}},{key:"_onNewContext",value:function(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if(Object(ft.y)(e.leadingLineContent)===Object(ft.y)(this._context.leadingLineContent)){if(e.columnthis._context.leadingWord.startColumn){var t,n=new Set(_t.d.all(this._editor.getModel())),r=Object(Ee.a)(this._completionModel.allProvider);try{for(r.s();!(t=r.n()).done;){var i=t.value;n.delete(i)}}catch(l){r.e(l)}finally{r.f()}var a=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,n,{items:a,clipboardText:this._completionModel.clipboardText})}else if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){var o=this._completionModel.incomplete,s=this._completionModel.adopt(o);this.trigger({auto:2===this._state,shy:!1,triggerKind:2},!0,o,{items:s,clipboardText:this._completionModel.clipboardText})}else{var u=this._completionModel.lineContext,c=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(gg.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0)&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:c})}}else this.cancel();else this.cancel()}},{key:"state",get:function(){return this._state}}],[{key:"_createItemKindFilter",value:function(e){var t=new Set;"none"===e.getOption(96)&&t.add(27);var n=e.getOption(101);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),t}}]),e}();mg=pg([fg(1,Zl.a),fg(2,$e.a),fg(3,_n.a),fg(4,Ff.b)],mg);n(414),n(196);var _g=Object(Ne.lc)("symbolIcon.arrayForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),vg=Object(Ne.lc)("symbolIcon.booleanForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),yg=Object(Ne.lc)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(Q.a)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),bg=Object(Ne.lc)("symbolIcon.colorForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Dg=Object(Ne.lc)("symbolIcon.constantForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Eg=Object(Ne.lc)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(Q.a)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Cg=Object(Ne.lc)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(Q.a)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sg=Object(Ne.lc)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(Q.a)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),xg=Object(Ne.lc)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(Q.a)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kg=Object(Ne.lc)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(Q.a)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tg=Object(Ne.lc)("symbolIcon.fileForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),wg=Object(Ne.lc)("symbolIcon.folderForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ag=Object(Ne.lc)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(Q.a)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Og=Object(Ne.lc)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(Q.a)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ng=Object(Ne.lc)("symbolIcon.keyForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ig=Object(Ne.lc)("symbolIcon.keywordForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Fg=Object(Ne.lc)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(Q.a)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Lg=Object(Ne.lc)("symbolIcon.moduleForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Pg=Object(Ne.lc)("symbolIcon.namespaceForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Rg=Object(Ne.lc)("symbolIcon.nullForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Mg=Object(Ne.lc)("symbolIcon.numberForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Bg=Object(Ne.lc)("symbolIcon.objectForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),jg=Object(Ne.lc)("symbolIcon.operatorForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ug=Object(Ne.lc)("symbolIcon.packageForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Vg=Object(Ne.lc)("symbolIcon.propertyForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),zg=Object(Ne.lc)("symbolIcon.referenceForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Hg=Object(Ne.lc)("symbolIcon.snippetForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Wg=Object(Ne.lc)("symbolIcon.stringForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Kg=Object(Ne.lc)("symbolIcon.structForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),qg=Object(Ne.lc)("symbolIcon.textForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Gg=Object(Ne.lc)("symbolIcon.typeParameterForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Yg=Object(Ne.lc)("symbolIcon.unitForeground",{dark:Ne.fb,light:Ne.fb,hc:Ne.fb},Object(Q.a)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Jg=Object(Ne.lc)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(Q.a)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Object(Ie.f)((function(e,t){var n=e.getColor(_g);n&&t.addRule("".concat(on.b.symbolArray.cssSelector," { color: ").concat(n,"; }"));var r=e.getColor(vg);r&&t.addRule("".concat(on.b.symbolBoolean.cssSelector," { color: ").concat(r,"; }"));var i=e.getColor(yg);i&&t.addRule("".concat(on.b.symbolClass.cssSelector," { color: ").concat(i,"; }"));var a=e.getColor(Fg);a&&t.addRule("".concat(on.b.symbolMethod.cssSelector," { color: ").concat(a,"; }"));var o=e.getColor(bg);o&&t.addRule("".concat(on.b.symbolColor.cssSelector," { color: ").concat(o,"; }"));var s=e.getColor(Dg);s&&t.addRule("".concat(on.b.symbolConstant.cssSelector," { color: ").concat(s,"; }"));var u=e.getColor(Eg);u&&t.addRule("".concat(on.b.symbolConstructor.cssSelector," { color: ").concat(u,"; }"));var c=e.getColor(Cg);c&&t.addRule("\n\t\t\t".concat(on.b.symbolValue.cssSelector,",").concat(on.b.symbolEnum.cssSelector," { color: ").concat(c,"; }"));var l=e.getColor(Sg);l&&t.addRule("".concat(on.b.symbolEnumMember.cssSelector," { color: ").concat(l,"; }"));var d=e.getColor(xg);d&&t.addRule("".concat(on.b.symbolEvent.cssSelector," { color: ").concat(d,"; }"));var p=e.getColor(kg);p&&t.addRule("".concat(on.b.symbolField.cssSelector," { color: ").concat(p,"; }"));var f=e.getColor(Tg);f&&t.addRule("".concat(on.b.symbolFile.cssSelector," { color: ").concat(f,"; }"));var h=e.getColor(wg);h&&t.addRule("".concat(on.b.symbolFolder.cssSelector," { color: ").concat(h,"; }"));var g=e.getColor(Ag);g&&t.addRule("".concat(on.b.symbolFunction.cssSelector," { color: ").concat(g,"; }"));var m=e.getColor(Og);m&&t.addRule("".concat(on.b.symbolInterface.cssSelector," { color: ").concat(m,"; }"));var _=e.getColor(Ng);_&&t.addRule("".concat(on.b.symbolKey.cssSelector," { color: ").concat(_,"; }"));var v=e.getColor(Ig);v&&t.addRule("".concat(on.b.symbolKeyword.cssSelector," { color: ").concat(v,"; }"));var y=e.getColor(Lg);y&&t.addRule("".concat(on.b.symbolModule.cssSelector," { color: ").concat(y,"; }"));var b=e.getColor(Pg);b&&t.addRule("".concat(on.b.symbolNamespace.cssSelector," { color: ").concat(b,"; }"));var D=e.getColor(Rg);D&&t.addRule("".concat(on.b.symbolNull.cssSelector," { color: ").concat(D,"; }"));var E=e.getColor(Mg);E&&t.addRule("".concat(on.b.symbolNumber.cssSelector," { color: ").concat(E,"; }"));var C=e.getColor(Bg);C&&t.addRule("".concat(on.b.symbolObject.cssSelector," { color: ").concat(C,"; }"));var S=e.getColor(jg);S&&t.addRule("".concat(on.b.symbolOperator.cssSelector," { color: ").concat(S,"; }"));var x=e.getColor(Ug);x&&t.addRule("".concat(on.b.symbolPackage.cssSelector," { color: ").concat(x,"; }"));var k=e.getColor(Vg);k&&t.addRule("".concat(on.b.symbolProperty.cssSelector," { color: ").concat(k,"; }"));var T=e.getColor(zg);T&&t.addRule("".concat(on.b.symbolReference.cssSelector," { color: ").concat(T,"; }"));var w=e.getColor(Hg);w&&t.addRule("".concat(on.b.symbolSnippet.cssSelector," { color: ").concat(w,"; }"));var A=e.getColor(Wg);A&&t.addRule("".concat(on.b.symbolString.cssSelector," { color: ").concat(A,"; }"));var O=e.getColor(Kg);O&&t.addRule("".concat(on.b.symbolStruct.cssSelector," { color: ").concat(O,"; }"));var N=e.getColor(qg);N&&t.addRule("".concat(on.b.symbolText.cssSelector," { color: ").concat(N,"; }"));var I=e.getColor(Gg);I&&t.addRule("".concat(on.b.symbolTypeParameter.cssSelector," { color: ").concat(I,"; }"));var F=e.getColor(Yg);F&&t.addRule("".concat(on.b.symbolUnit.cssSelector," { color: ").concat(F,"; }"));var L=e.getColor(Jg);L&&t.addRule("".concat(on.b.symbolVariable.cssSelector," { color: ").concat(L,"; }"))}));var $g=n(116),Qg=function(){function e(){var t,n=this;Object(Y.a)(this,e),this._onDidWillResize=new rn.a,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new rn.a,this.onDidResize=this._onDidResize.event,this._sashListener=new xe.b,this._size=new Ht.Dimension(0,0),this._minSize=new Ht.Dimension(0,0),this._maxSize=new Ht.Dimension(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new zr.b(this.domNode,{getVerticalSashLeft:function(){return n._size.width}},{orientation:0}),this._westSash=new zr.b(this.domNode,{getVerticalSashLeft:function(){return 0}},{orientation:0}),this._northSash=new zr.b(this.domNode,{getHorizontalSashTop:function(){return 0}},{orientation:1,orthogonalEdge:zr.a.North}),this._southSash=new zr.b(this.domNode,{getHorizontalSashTop:function(){return n._size.height}},{orientation:1,orthogonalEdge:zr.a.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;var r=0,i=0;this._sashListener.add(rn.b.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((function(){void 0===t&&(n._onDidWillResize.fire(),t=n._size,r=0,i=0)}))),this._sashListener.add(rn.b.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((function(){void 0!==t&&(t=void 0,r=0,i=0,n._onDidResize.fire({dimension:n._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((function(e){t&&(i=e.currentX-e.startX,n.layout(t.height+r,t.width+i),n._onDidResize.fire({dimension:n._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((function(e){t&&(i=-(e.currentX-e.startX),n.layout(t.height+r,t.width+i),n._onDidResize.fire({dimension:n._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((function(e){t&&(r=-(e.currentY-e.startY),n.layout(t.height+r,t.width+i),n._onDidResize.fire({dimension:n._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((function(e){t&&(r=e.currentY-e.startY,n.layout(t.height+r,t.width+i),n._onDidResize.fire({dimension:n._size,done:!1,south:!0}))}))),this._sashListener.add(rn.b.any(this._eastSash.onDidReset,this._westSash.onDidReset)((function(e){n._preferredSize&&(n.layout(n._size.height,n._preferredSize.width),n._onDidResize.fire({dimension:n._size,done:!0}))}))),this._sashListener.add(rn.b.any(this._northSash.onDidReset,this._southSash.onDidReset)((function(e){n._preferredSize&&(n.layout(n._preferredSize.height,n._size.width),n._onDidResize.fire({dimension:n._size,done:!0}))})))}return Object(J.a)(e,[{key:"dispose",value:function(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this.domNode.remove()}},{key:"enableSashes",value:function(e,t,n,r){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=r?3:0}},{key:"layout",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.size.height,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size.width,n=this._minSize,r=n.height,i=n.width,a=this._maxSize,o=a.height,s=a.width;e=Math.max(r,Math.min(o,e)),t=Math.max(i,Math.min(s,t));var u=new Ht.Dimension(t,e);Ht.Dimension.equals(u,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=u,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}},{key:"size",get:function(){return this._size}},{key:"maxSize",set:function(e){this._maxSize=e},get:function(){return this._maxSize}},{key:"minSize",set:function(e){this._minSize=e},get:function(){return this._minSize}},{key:"preferredSize",set:function(e){this._preferredSize=e},get:function(){return this._preferredSize}}]),e}(),Xg=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Zg=function(e,t){return function(n,r){t(n,r,e)}};function em(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}var tm=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this._editor=t,this._onDidClose=new rn.a,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new rn.a,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new xe.b,this._renderDisposeable=new xe.b,this._borderWidth=1,this._size=new Ht.Dimension(330,0),this.domNode=Ht.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=n.createInstance(wa,{editor:t}),this._body=Ht.$(".body"),this._scrollbar=new Tr.a(this._body,{}),Ht.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=Ht.append(this._body,Ht.$(".header")),this._close=Ht.append(this._header,Ht.$("span"+on.b.close.cssSelector)),this._close.title=Q.a("details.close","Close"),this._type=Ht.append(this._header,Ht.$("p.type")),this._docs=Ht.append(this._body,Ht.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((function(e){e.hasChanged(38)&&r._configureFont()})))}return Object(J.a)(e,[{key:"dispose",value:function(){this._disposables.dispose(),this._renderDisposeable.dispose()}},{key:"_configureFont",value:function(){var e=this._editor.getOptions(),t=e.get(38),n=t.fontFamily,r=e.get(102)||t.fontSize,i=e.get(103)||t.lineHeight,a=t.fontWeight,o="".concat(r,"px"),s="".concat(i,"px");this.domNode.style.fontSize=o,this.domNode.style.lineHeight=s,this.domNode.style.fontWeight=a,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=n,this._close.style.height=s,this._close.style.width=s}},{key:"getLayoutInfo",value:function(){var e=this._editor.getOption(103)||this._editor.getOption(38).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}},{key:"renderLoading",value:function(){this._type.textContent=Q.a("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}},{key:"renderItem",value:function(e,t){var n=this;this._renderDisposeable.clear();var r=e.completion,i=r.detail,a=r.documentation;if(t){var o="";o+="score: ".concat(e.score[0]).concat(e.word?", compared '".concat(e.completion.filterText&&(e.completion.filterText,1)||"string"===typeof e.completion.label?e.completion.label:e.completion.label.name,"' with '").concat(e.word,"'"):" (no prefix)","\n"),o+="distance: ".concat(e.distance,", see localityBonus-setting\n"),o+="index: ".concat(e.idx,", based on ").concat(e.completion.sortText&&'sortText: "'.concat(e.completion.sortText,'"')||"label","\n"),o+="commit characters: ".concat(e.completion.commitCharacters,"\n"),a=(new ae).appendCodeblock("empty",o),i="Provider: ".concat(e.provider._debugDisplayName)}if(t||em(e)){if(this.domNode.classList.remove("no-docs","no-type"),i){var s=i.length>1e5?"".concat(i.substr(0,1e5),"\u2026"):i;this._type.textContent=s,this._type.title=s,Ht.show(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(s))}else Ht.clearNode(this._type),this._type.title="",Ht.hide(this._type),this.domNode.classList.add("no-type");if(Ht.clearNode(this._docs),"string"===typeof a)this._docs.classList.remove("markdown-docs"),this._docs.textContent=a;else if(a){this._docs.classList.add("markdown-docs"),Ht.clearNode(this._docs);var u=this._markdownRenderer.render(a);this._docs.appendChild(u.element),this._renderDisposeable.add(u),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((function(){n.layout(n._size.width,n._type.clientHeight+n._docs.clientHeight),n._onDidChangeContents.fire(n)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=function(e){e.preventDefault(),e.stopPropagation()},this._close.onclick=function(e){e.preventDefault(),e.stopPropagation(),n._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}},{key:"clearContents",value:function(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}},{key:"layout",value:function(e,t){var n=new Ht.Dimension(e,t);Ht.Dimension.equals(n,this._size)||(this._size=n,Ht.size(this.domNode,e,t)),this._scrollbar.scanDomNode()}},{key:"scrollDown",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;this._body.scrollTop+=e}},{key:"scrollUp",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;this._body.scrollTop-=e}},{key:"scrollTop",value:function(){this._body.scrollTop=0}},{key:"scrollBottom",value:function(){this._body.scrollTop=this._body.scrollHeight}},{key:"pageDown",value:function(){this.scrollDown(80)}},{key:"pageUp",value:function(){this.scrollUp(80)}},{key:"size",get:function(){return this._size}},{key:"borderWidth",set:function(e){this._borderWidth=e},get:function(){return this._borderWidth}}]),e}();tm=Xg([Zg(1,zt.a)],tm);var nm=function(){function e(t,n){var r,i,a=this;Object(Y.a)(this,e),this.widget=t,this._editor=n,this._disposables=new xe.b,this._added=!1,this._resizable=new Qg,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(t.domNode),this._resizable.enableSashes(!1,!0,!0,!1);var o=0,s=0;this._disposables.add(this._resizable.onDidWillResize((function(){r=a._topLeft,i=a._resizable.size}))),this._disposables.add(this._resizable.onDidResize((function(e){if(r&&i){a.widget.layout(e.dimension.width,e.dimension.height);var t=!1;e.west&&(s=i.width-e.dimension.width,t=!0),e.north&&(o=i.height-e.dimension.height,t=!0),t&&a._applyTopLeft({top:r.top+o,left:r.left+s})}e.done&&(r=void 0,i=void 0,o=0,s=0,a._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((function(){var e;a._anchorBox&&a._placeAtAnchor(a._anchorBox,null!==(e=a._userSize)&&void 0!==e?e:a.widget.size)})))}return Object(J.a)(e,[{key:"dispose",value:function(){this._disposables.dispose(),this.hide()}},{key:"getId",value:function(){return"suggest.details"}},{key:"getDomNode",value:function(){return this._resizable.domNode}},{key:"getPosition",value:function(){return null}},{key:"show",value:function(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}},{key:"hide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}},{key:"placeAtAnchor",value:function(e){var t,n=Ht.getDomNodePagePosition(e);this._anchorBox=n,this._placeAtAnchor(this._anchorBox,null!==(t=this._userSize)&&void 0!==t?t:this.widget.size)}},{key:"_placeAtAnchor",value:function(e,t){var n,r,i,a,o=Ht.getClientArea(document.body),s=this.widget.getLayoutInfo(),u=new Ht.Dimension(220,2*s.lineHeight),c=0,l=e.top,d=e.top+e.height-s.borderHeight,p=o.width-(e.left+e.width+s.borderWidth+s.horizontalPadding);c=-s.borderWidth+e.left+e.width,a=!0,r=(n=new Ht.Dimension(p,o.height-e.top-s.borderHeight-s.verticalPadding)).with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding),t.width>p&&(e.left>p&&(p=e.left-s.borderWidth-s.horizontalPadding,a=!1,c=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),r=(n=n.with(p)).with(void 0,r.height)),e.width>1.3*p&&o.height-(e.top+e.height)>e.height&&(p=e.width,c=e.left,l=-s.borderWidth+e.top+e.height,r=(n=new Ht.Dimension(e.width-s.borderHeight,o.height-e.top-e.height-s.verticalPadding)).with(void 0,e.top-s.verticalPadding),u=u.with(n.width)));var f,h=t.height,g=Math.max(n.height,r.height);h>g&&(h=g),h<=n.height?(i=!0,f=n):(i=!1,f=r),this._applyTopLeft({left:c,top:i?l:d-h}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!i,a,i,!a),this._resizable.minSize=u,this._resizable.maxSize=f,this._resizable.layout(h,Math.min(f.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}},{key:"_applyTopLeft",value:function(e){this._topLeft=e,this.getDomNode().style.left="".concat(this._topLeft.left,"px"),this.getDomNode().style.top="".concat(this._topLeft.top,"px")}}]),e}(),rm=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},im=function(e,t){return function(n,r){t(n,r,e)}},am=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"updateLabel",value:function(){var e=this._keybindingService.lookupKeybinding(this._action.id);if(!e)return Object(en.a)(Object(tn.a)(n.prototype),"updateLabel",this).call(this);this.label&&(this.label.textContent=Object(Q.a)("ddd","{0} ({1})",this._action.label,n.symbolPrintEnter(e)))}}],[{key:"symbolPrintEnter",value:function(e){var t;return null===(t=e.getLabel())||void 0===t?void 0:t.replace(/\benter\b/gi,"\u23ce")}}]),n}(ii),om=function(){function e(t,n,r,i){Object(Y.a)(this,e),this._menuService=r,this._contextKeyService=i,this._menuDisposables=new xe.b,this.element=Ht.append(t,Ht.$(".suggest-status-bar"));var a=function(e){return e instanceof Fe.c?n.createInstance(am,e):void 0};this._leftActions=new Rr.a(this.element,{actionViewItemProvider:a}),this._rightActions=new Rr.a(this.element,{actionViewItemProvider:a}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}return Object(J.a)(e,[{key:"dispose",value:function(){this._menuDisposables.dispose(),this.element.remove()}},{key:"show",value:function(){var e=this,t=this._menuService.createMenu(yh,this._contextKeyService);this._menuDisposables.add(t.onDidChange((function(){return function(){var n,r=[],i=[],a=Object(Ee.a)(t.getActions());try{for(a.s();!(n=a.n()).done;){var o=Object(Ce.a)(n.value,2),s=o[0],u=o[1];"left"===s?r.push.apply(r,Object(ct.a)(u)):i.push.apply(i,Object(ct.a)(u))}}catch(c){a.e(c)}finally{a.f()}e._leftActions.clear(),e._leftActions.push(r),e._rightActions.clear(),e._rightActions.push(i)}()}))),this._menuDisposables.add(t)}},{key:"hide",value:function(){this._menuDisposables.clear()}}]),e}();om=rm([im(1,zt.a),im(2,Fe.a),im(3,te.b)],om);var sm,um=n(153);function cm(e,t,n,r){var i=r===sm.ROOT_FOLDER?["rootfolder-icon"]:r===sm.FOLDER?["folder-icon"]:["file-icon"];if(n){var a;if(n.scheme===Ir.c.data)a=vn.a.parseMetaData(n).get(vn.a.META_DATA_LABEL);else a=lm(Object(vn.c)(n).toLowerCase());if(r===sm.FOLDER)i.push("".concat(a,"-name-folder-icon"));else{if(a){i.push("".concat(a,"-name-file-icon"));for(var o=a.split("."),s=1;s=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},fm=function(e,t){return function(n,r){t(n,r,e)}};function hm(e){return"suggest-aria-id:".concat(e)}var gm=Object($i.b)("suggest-more-info",on.b.chevronRight,Q.a("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),mm=new((dm=function(){function e(){Object(Y.a)(this,e)}return Object(J.a)(e,[{key:"extract",value:function(t,n){if(t.textLabel.match(e._regexStrict))return n[0]=t.textLabel,!0;if(t.completion.detail&&t.completion.detail.match(e._regexStrict))return n[0]=t.completion.detail,!0;if("string"===typeof t.completion.documentation){var r=e._regexRelaxed.exec(t.completion.documentation);if(r&&(0===r.index||r.index+r[0].length===t.completion.documentation.length))return n[0]=r[0],!0}return!1}}]),e}())._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,dm._regexStrict=new RegExp("^".concat(dm._regexRelaxed.source,"$"),"i"),dm),_m=function(){function e(t,n,r,i){Object(Y.a)(this,e),this._editor=t,this._modelService=n,this._modeService=r,this._themeService=i,this._onDidToggleDetails=new rn.a,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}return Object(J.a)(e,[{key:"dispose",value:function(){this._onDidToggleDetails.dispose()}},{key:"renderTemplate",value:function(e){var t=this,n=Object.create(null);n.disposables=new xe.b,n.root=e,n.root.classList.add("show-file-icons"),n.icon=Object(Ht.append)(e,Object(Ht.$)(".icon")),n.colorspan=Object(Ht.append)(n.icon,Object(Ht.$)("span.colorspan"));var r=Object(Ht.append)(e,Object(Ht.$)(".contents")),i=Object(Ht.append)(r,Object(Ht.$)(".main"));n.iconContainer=Object(Ht.append)(i,Object(Ht.$)(".icon-label.codicon")),n.left=Object(Ht.append)(i,Object(Ht.$)("span.left")),n.right=Object(Ht.append)(i,Object(Ht.$)("span.right")),n.iconLabel=new io.a(n.left,{supportHighlights:!0,supportIcons:!0}),n.disposables.add(n.iconLabel),n.parametersLabel=Object(Ht.append)(n.left,Object(Ht.$)("span.signature-label")),n.qualifierLabel=Object(Ht.append)(n.left,Object(Ht.$)("span.qualifier-label")),n.detailsLabel=Object(Ht.append)(n.right,Object(Ht.$)("span.details-label")),n.readMore=Object(Ht.append)(n.right,Object(Ht.$)("span.readMore"+Ie.d.asCSSSelector(gm))),n.readMore.title=Q.a("readMore","Read More");var a=function(){var e=t._editor.getOptions(),r=e.get(38),a=r.fontFamily,o=r.fontFeatureSettings,s=e.get(102)||r.fontSize,u=e.get(103)||r.lineHeight,c=r.fontWeight,l="".concat(s,"px"),d="".concat(u,"px");n.root.style.fontSize=l,n.root.style.fontWeight=c,i.style.fontFamily=a,i.style.fontFeatureSettings=o,i.style.lineHeight=d,n.icon.style.height=d,n.icon.style.width=d,n.readMore.style.height=d,n.readMore.style.width=d};return a(),n.disposables.add(this._editor.onDidChangeConfiguration((function(e){(e.hasChanged(38)||e.hasChanged(102)||e.hasChanged(103))&&a()}))),n}},{key:"renderElement",value:function(e,t,n){var r,i,a,o=this,s=e.completion,u="string"===typeof s.label?s.label:s.label.name;n.root.id=hm(t),n.colorspan.style.backgroundColor="";var c={labelEscapeNewLines:!0,matches:Object(so.c)(e.score)},l=[];if(19===s.kind&&mm.extract(e,l))n.icon.className="icon customcolor",n.iconContainer.className="icon hide",n.colorspan.style.backgroundColor=l[0];else if(20===s.kind&&this._themeService.getFileIconTheme().hasFileIcons){n.icon.className="icon hide",n.iconContainer.className="icon hide";var d=cm(this._modelService,this._modeService,gt.a.from({scheme:"fake",path:u}),sm.FILE),p=cm(this._modelService,this._modeService,gt.a.from({scheme:"fake",path:s.detail}),sm.FILE);c.extraClasses=d.length>p.length?d:p}else if(23===s.kind&&this._themeService.getFileIconTheme().hasFolderIcons)n.icon.className="icon hide",n.iconContainer.className="icon hide",c.extraClasses=Object(ne.j)([cm(this._modelService,this._modeService,gt.a.from({scheme:"fake",path:u}),sm.FOLDER),cm(this._modelService,this._modeService,gt.a.from({scheme:"fake",path:s.detail}),sm.FOLDER)]);else{var f;n.icon.className="icon hide",n.iconContainer.className="",(f=n.iconContainer.classList).add.apply(f,["suggest-icon"].concat(Object(ct.a)(Object(_t.G)(s.kind).split(" "))))}s.tags&&s.tags.indexOf(1)>=0&&(c.extraClasses=(c.extraClasses||[]).concat(["deprecated"]),c.matches=[]),n.iconLabel.setLabel(u,void 0,c),"string"===typeof s.label?(n.parametersLabel.textContent="",n.qualifierLabel.textContent="",n.detailsLabel.textContent=(s.detail||"").replace(/\n.*$/m,""),n.root.classList.add("string-label"),n.root.title=""):(n.parametersLabel.textContent=(s.label.parameters||"").replace(/\n.*$/m,""),n.qualifierLabel.textContent=(s.label.qualifier||"").replace(/\n.*$/m,""),n.detailsLabel.textContent=(s.label.type||"").replace(/\n.*$/m,""),n.root.classList.remove("string-label"),n.root.title="".concat(u).concat(null!==(r=s.label.parameters)&&void 0!==r?r:""," ").concat(null!==(i=s.label.qualifier)&&void 0!==i?i:""," ").concat(null!==(a=s.label.type)&&void 0!==a?a:"")),this._editor.getOption(101).showInlineDetails?Object(Ht.show)(n.detailsLabel):Object(Ht.hide)(n.detailsLabel),em(e)?(n.right.classList.add("can-expand-details"),Object(Ht.show)(n.readMore),n.readMore.onmousedown=function(e){e.stopPropagation(),e.preventDefault()},n.readMore.onclick=function(e){e.stopPropagation(),e.preventDefault(),o._onDidToggleDetails.fire()}):(n.right.classList.remove("can-expand-details"),Object(Ht.hide)(n.readMore),n.readMore.onmousedown=null,n.readMore.onclick=null)}},{key:"disposeTemplate",value:function(e){e.disposables.dispose()}}]),e}();_m=pm([fm(1,vt.a),fm(2,gr.a),fm(3,Ie.b)],_m);var vm=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},ym=function(e,t){return function(n,r){t(n,r,e)}},bm=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Dm=Object(Ne.lc)("editorSuggestWidget.background",{dark:Ne.Z,light:Ne.Z,hc:Ne.Z},Q.a("editorSuggestWidgetBackground","Background color of the suggest widget.")),Em=Object(Ne.lc)("editorSuggestWidget.border",{dark:Ne.ab,light:Ne.ab,hc:Ne.ab},Q.a("editorSuggestWidgetBorder","Border color of the suggest widget.")),Cm=Object(Ne.lc)("editorSuggestWidget.foreground",{dark:Ne.C,light:Ne.C,hc:Ne.C},Q.a("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),Sm=Object(Ne.lc)("editorSuggestWidget.selectedBackground",{dark:Ne.Cb,light:Ne.Cb,hc:Ne.Cb},Q.a("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),xm=Object(Ne.lc)("editorSuggestWidget.highlightForeground",{dark:Ne.Eb,light:Ne.Eb,hc:Ne.Eb},Q.a("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),km=function(){function e(t,n){Object(Y.a)(this,e),this._service=t,this._key="suggestWidget.size/".concat(n.getEditorType(),"/").concat(n instanceof Vr)}return Object(J.a)(e,[{key:"restore",value:function(){var e,t=null!==(e=this._service.get(this._key,0))&&void 0!==e?e:"";try{var n=JSON.parse(t);if(Ht.Dimension.is(n))return Ht.Dimension.lift(n)}catch(r){}}},{key:"store",value:function(e){this._service.store(this._key,JSON.stringify(e),0,1)}},{key:"reset",value:function(){this._service.remove(this._key,0)}}]),e}(),Tm=function(){function e(t,n,r,i,a){var o=this;Object(Y.a)(this,e),this.editor=t,this._storageService=n,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._explainMode=!1,this._showTimeout=new Se.e,this._disposables=new xe.b,this._onDidSelect=new rn.a,this._onDidFocus=new rn.a,this._onDidHide=new rn.a,this._onDidShow=new rn.a,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new rn.a,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new Qg,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new wm(this,t),this._persistedSize=new km(n,t);var s,u=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object(Y.a)(this,e),this.persistedSize=t,this.currentSize=n,this.persistHeight=r,this.persistWidth=i};this._disposables.add(this.element.onDidWillResize((function(){o._contentWidget.lockPreference(),s=new u(o._persistedSize.restore(),o.element.size)}))),this._disposables.add(this.element.onDidResize((function(e){var t,n,r,i;if(o._resize(e.dimension.width,e.dimension.height),s&&(s.persistHeight=s.persistHeight||!!e.north||!!e.south,s.persistWidth=s.persistWidth||!!e.east||!!e.west),e.done){if(s){var a=o.getLayoutInfo(),u=a.itemHeight,c=a.defaultSize,l=Math.round(u/2),d=o.element.size,p=d.width,f=d.height;(!s.persistHeight||Math.abs(s.currentSize.height-f)<=l)&&(f=null!==(n=null===(t=s.persistedSize)||void 0===t?void 0:t.height)&&void 0!==n?n:c.height),(!s.persistWidth||Math.abs(s.currentSize.width-p)<=l)&&(p=null!==(i=null===(r=s.persistedSize)||void 0===r?void 0:r.width)&&void 0!==i?i:c.width),o._persistedSize.store(new Ht.Dimension(p,f))}o._contentWidget.unlockPreference(),s=void 0}}))),this._messageElement=Ht.append(this.element.domNode,Ht.$(".message")),this._listElement=Ht.append(this.element.domNode,Ht.$(".tree"));var c=a.createInstance(tm,this.editor);c.onDidClose(this.toggleDetails,this,this._disposables),this._details=new nm(c,this.editor);var l=function(){return o.element.domNode.classList.toggle("no-icons",!o.editor.getOption(101).showIcons)};l();var d=a.createInstance(_m,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails((function(){return o.toggleDetails()}))),this._list=new $g.c("SuggestWidget",this._listElement,{getHeight:function(e){return o.getLayoutInfo().itemHeight},getTemplateId:function(e){return"suggestion"}},[d],{useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:function(){return"option"},getAriaLabel:function(e){var t="string"===typeof e.completion.label?e.completion.label:e.completion.label.name;if(e.isResolved&&o._isDetailsVisible()){var n=e.completion,r=n.documentation,i=n.detail,a=ft.w("{0}{1}",i||"",r?"string"===typeof r?r:r.value:"");return Q.a("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",t,a)}return t},getWidgetAriaLabel:function(){return Q.a("suggest","Suggest")},getWidgetRole:function(){return"listbox"}}}),this._status=a.createInstance(om,this.element.domNode);var p=function(){return o.element.domNode.classList.toggle("with-status-bar",o.editor.getOption(101).showStatusBar)};p(),this._disposables.add(Object(oo.b)(this._list,i,{listInactiveFocusBackground:Sm,listInactiveFocusOutline:Ne.b})),this._disposables.add(i.onDidColorThemeChange((function(e){return o._onThemeChange(e)}))),this._onThemeChange(i.getColorTheme()),this._disposables.add(this._list.onMouseDown((function(e){return o._onListMouseDownOrTap(e)}))),this._disposables.add(this._list.onTap((function(e){return o._onListMouseDownOrTap(e)}))),this._disposables.add(this._list.onDidChangeSelection((function(e){return o._onListSelection(e)}))),this._disposables.add(this._list.onDidChangeFocus((function(e){return o._onListFocus(e)}))),this._disposables.add(this.editor.onDidChangeCursorSelection((function(){return o._onCursorSelectionChanged()}))),this._disposables.add(this.editor.onDidChangeConfiguration((function(e){e.hasChanged(101)&&(p(),l())}))),this._ctxSuggestWidgetVisible=vh.Visible.bindTo(r),this._ctxSuggestWidgetDetailsVisible=vh.DetailsVisible.bindTo(r),this._ctxSuggestWidgetMultipleSuggestions=vh.MultipleSuggestions.bindTo(r),this._disposables.add(Ht.addStandardDisposableListener(this._details.widget.domNode,"keydown",(function(e){o._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((function(e){return o._onEditorMouseDown(e)})))}return Object(J.a)(e,[{key:"dispose",value:function(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}},{key:"_onEditorMouseDown",value:function(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}},{key:"_onCursorSelectionChanged",value:function(){0!==this._state&&this._contentWidget.layout()}},{key:"_onListMouseDownOrTap",value:function(e){"undefined"!==typeof e.element&&"undefined"!==typeof e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}},{key:"_onListSelection",value:function(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}},{key:"_select",value:function(e,t){var n=this._completionModel;n&&(this._onDidSelect.fire({item:e,index:t,model:n}),this.editor.focus())}},{key:"_onThemeChange",value:function(e){var t=e.getColor(Dm);t&&(this.element.domNode.style.backgroundColor=t.toString(),this._messageElement.style.backgroundColor=t.toString(),this._details.widget.domNode.style.backgroundColor=t.toString());var n=e.getColor(Em);n&&(this.element.domNode.style.borderColor=n.toString(),this._messageElement.style.borderColor=n.toString(),this._status.element.style.borderTopColor=n.toString(),this._details.widget.domNode.style.borderColor=n.toString(),this._detailsBorderColor=n.toString());var r=e.getColor(Ne.eb);r&&(this._detailsFocusBorderColor=r.toString()),this._details.widget.borderWidth="hc"===e.type?2:1}},{key:"_onListFocus",value:function(e){var t,n=this;if(!this._ignoreFocusEvents){if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),void this.editor.setAriaOptions({activeDescendant:void 0});if(this._completionModel){var r=e.elements[0],i=e.indexes[0];r!==this._focusedItem&&(null===(t=this._currentSuggestionDetails)||void 0===t||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=r,this._list.reveal(i),this._currentSuggestionDetails=Object(Se.f)((function(e){return bm(n,void 0,void 0,K.a.mark((function t(){var n,i,a=this;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(Se.g)((function(){a._isDetailsVisible()&&a.showDetails(!0)}),250),e.onCancellationRequested((function(){return n.dispose()})),t.next=4,r.resolve(e);case 4:return i=t.sent,n.dispose(),t.abrupt("return",i);case 7:case"end":return t.stop()}}),t)})))})),this._currentSuggestionDetails.then((function(){i>=n._list.length||r!==n._list.element(i)||(n._ignoreFocusEvents=!0,n._list.splice(i,1,[r]),n._list.setFocus([i]),n._ignoreFocusEvents=!1,n._isDetailsVisible()?n.showDetails(!1):n.element.domNode.classList.remove("docs-side"),n.editor.setAriaOptions({activeDescendant:hm(i)}))})).catch(ie.e)),this._onDidFocus.fire({item:r,index:i,model:this._completionModel})}}}},{key:"_setState",value:function(t){if(this._state!==t)switch(this._state=t,this.element.domNode.classList.toggle("frozen",4===t),this.element.domNode.classList.remove("message"),t){case 0:Ht.hide(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.LOADING_MESSAGE,Ht.hide(this._listElement,this._status.element),Ht.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,Ht.hide(this._listElement,this._status.element),Ht.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:case 4:Ht.hide(this._messageElement),Ht.show(this._listElement,this._status.element),this._show();break;case 5:Ht.hide(this._messageElement),Ht.show(this._listElement,this._status.element),this._details.show(),this._show()}}},{key:"_show",value:function(){var e=this;this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((function(){e.element.domNode.classList.add("visible"),e._onDidShow.fire(e)}),100)}},{key:"showTriggered",value:function(e,t){var n=this;0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=Object(Se.g)((function(){return n._setState(1)}),t)))}},{key:"showSuggestions",value:function(e,t,n,r){var i,a;if(this._contentWidget.setPosition(this.editor.getPosition()),null===(i=this._loadingTimeout)||void 0===i||i.dispose(),null===(a=this._currentSuggestionDetails)||void 0===a||a.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),n&&2!==this._state&&0!==this._state)this._setState(4);else{var o=this._completionModel.items.length,s=0===o;if(this._ctxSuggestWidgetMultipleSuggestions.set(o>1),s)return this._setState(r?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(n?4:3),this._list.reveal(t,0),this._list.setFocus([t]),this._layout(this.element.size),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)}}},{key:"selectNextPage",value:function(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}},{key:"selectNext",value:function(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}},{key:"selectLast",value:function(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}},{key:"selectPreviousPage",value:function(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}},{key:"selectPrevious",value:function(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}},{key:"selectFirst",value:function(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}},{key:"getFocusedItem",value:function(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}},{key:"toggleDetailsFocus",value:function(){5===this._state?(this._setState(3),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._detailsFocusBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsFocusBorderColor))}},{key:"toggleDetails",value:function(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!em(this._list.getFocusedElements()[0])||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}},{key:"showDetails",value:function(e){this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}},{key:"toggleExplainMode",value:function(){this._list.getFocusedElements()[0]&&this._isDetailsVisible()&&(this._explainMode=!this._explainMode,this.showDetails(!1))}},{key:"resetPersistedSize",value:function(){this._persistedSize.reset()}},{key:"hideWidget",value:function(){var e;null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._setState(0),this._onDidHide.fire(this);var t=this._persistedSize.restore(),n=Math.ceil(4.3*this.getLayoutInfo().itemHeight);t&&t.heightu&&(s=u);var c=this._completionModel?this._completionModel.stats.pLabelLen*a.typicalHalfwidthCharacterWidth:s,l=a.statusBarHeight+this._list.contentHeight+a.borderHeight,d=a.itemHeight+a.statusBarHeight,p=Ht.getDomNodePagePosition(this.editor.getDomNode()),f=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),h=p.top+f.top+f.height,g=Math.min(i.height-h-a.verticalPadding,l),m=Math.min(p.top+f.top-a.verticalPadding,l),_=Math.min(Math.max(m,g)+a.borderHeight,l);o===(null===(t=this._cappedHeight)||void 0===t?void 0:t.capped)&&(o=this._cappedHeight.wanted),o_&&(o=_),o>g?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),_=m):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),_=g),this.element.preferredSize=new Ht.Dimension(c,a.defaultSize.height),this.element.maxSize=new Ht.Dimension(u,_),this.element.minSize=new Ht.Dimension(220,d),this._cappedHeight=o===l?{wanted:null!==(r=null===(n=this._cappedHeight)||void 0===n?void 0:n.wanted)&&void 0!==r?r:e.height,capped:o}:void 0}this._resize(s,o)}}},{key:"_resize",value:function(e,t){var n=this.element.maxSize,r=n.width,i=n.height;e=Math.min(r,e),t=Math.min(i,t);var a=this.getLayoutInfo().statusBarHeight;this._list.layout(t-a,e),this._listElement.style.height="".concat(t-a,"px"),this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}},{key:"_positionDetails",value:function(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode)}},{key:"getLayoutInfo",value:function(){var e=this.editor.getOption(38),t=Object(So.b)(this.editor.getOption(103)||e.lineHeight,8,1e3),n=this.editor.getOption(101).showStatusBar&&2!==this._state&&1!==this._state?t:0,r=this._details.widget.borderWidth,i=2*r;return{itemHeight:t,statusBarHeight:n,borderWidth:r,borderHeight:i,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Ht.Dimension(430,n+12*t+i)}}},{key:"_isDetailsVisible",value:function(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}},{key:"_setDetailsVisible",value:function(e){this._storageService.store("expandSuggestionDocs",e,0,0)}}]),e}();Tm.LOADING_MESSAGE=Q.a("suggestWidget.loading","Loading..."),Tm.NO_SUGGESTIONS_MESSAGE=Q.a("suggestWidget.noSuggestions","No suggestions."),Tm=vm([ym(1,Jn.a),ym(2,te.b),ym(3,Ie.b),ym(4,zt.a)],Tm);var wm=function(){function e(t,n){Object(Y.a)(this,e),this._widget=t,this._editor=n,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}return Object(J.a)(e,[{key:"dispose",value:function(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}},{key:"getId",value:function(){return"editor.widget.suggestWidget"}},{key:"getDomNode",value:function(){return this._widget.element.domNode}},{key:"show",value:function(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}},{key:"hide",value:function(){this._hidden||(this._hidden=!0,this.layout())}},{key:"layout",value:function(){this._editor.layoutContentWidget(this)}},{key:"getPosition",value:function(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}},{key:"beforeRender",value:function(){var e=this._widget.element.size,t=e.height,n=e.width,r=this._widget.getLayoutInfo(),i=r.borderWidth,a=r.horizontalPadding;return new Ht.Dimension(n+2*i+a,t+2*i)}},{key:"afterRender",value:function(e){this._widget._afterRender(e)}},{key:"setPreference",value:function(e){this._preferenceLocked||(this._preference=e)}},{key:"lockPreference",value:function(){this._preferenceLocked=!0}},{key:"unlockPreference",value:function(){this._preferenceLocked=!1}},{key:"setPosition",value:function(e){this._position=e}}]),e}();Object(Ie.f)((function(e,t){var n=e.getColor(xm);n&&t.addRule(".monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ".concat(n,"; }"));var r=e.getColor(Cm);r&&t.addRule(".monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ".concat(r,"; }"));var i=e.getColor(Ne.wc);i&&t.addRule(".monaco-editor .suggest-details a { color: ".concat(i,"; }"));var a=e.getColor(Ne.vc);a&&t.addRule(".monaco-editor .suggest-details code { background-color: ".concat(a,"; }"))}));var Am=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Om=function(e,t){return function(n,r){t(n,r,e)}},Nm=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this))._editor=e,i._enabled=!1,i._ckAtEnd=n.AtEnd.bindTo(r),i._register(i._editor.onDidChangeConfiguration((function(e){return e.hasChanged(106)&&i._update()}))),i._update(),i}return Object(J.a)(n,[{key:"dispose",value:function(){var e;Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this),null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}},{key:"_update",value:function(){var e=this,t="on"===this._editor.getOption(106);if(this._enabled!==t)if(this._enabled=t,this._enabled){var n=function(){if(e._editor.hasModel()){var t=e._editor.getModel(),n=e._editor.getSelection(),r=t.getWordAtPosition(n.getStartPosition());r?e._ckAtEnd.set(r.endColumn===n.getStartPosition().column):e._ckAtEnd.set(!1)}else e._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(n),n()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}}]),n}(xe.a);Nm.AtEnd=new te.c("atEndOfWord",!1),Nm=Am([Om(1,te.b)],Nm);var Im=function(){function e(t,n,r){var i=this;Object(Y.a)(this,e),this._disposables=new xe.b,this._disposables.add(n.onDidShow((function(){return i._onItem(n.getFocusedItem())}))),this._disposables.add(n.onDidFocus(this._onItem,this)),this._disposables.add(n.onDidHide(this.reset,this)),this._disposables.add(t.onWillType((function(e){if(i._active&&!n.isFrozen()){var a=e.charCodeAt(e.length-1);i._active.acceptCharacters.has(a)&&t.getOption(0)&&r(i._active.item)}})))}return Object(J.a)(e,[{key:"_onItem",value:function(e){if(e&&Object(ne.m)(e.item.completion.commitCharacters)){if(!this._active||this._active.item.item!==e.item){var t,n=new Xl.b,r=Object(Ee.a)(e.item.completion.commitCharacters);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.length>0&&n.add(i.charCodeAt(0))}}catch(a){r.e(a)}finally{r.f()}this._active={acceptCharacters:n,item:e}}}else this.reset()}},{key:"reset",value:function(){this._active=void 0}},{key:"dispose",value:function(){this._disposables.dispose()}}]),e}(),Fm=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this._disposables=new xe.b,this._lastOvertyped=[],this._empty=!0,this._disposables.add(t.onWillType((function(){if(r._empty&&t.hasModel()){for(var n=t.getSelections(),i=n.length,a=!1,o=0;oe._maxSelectionLength)return;r._lastOvertyped[u]={value:s.getValueInRange(c),multiline:c.startLineNumber!==c.endLineNumber}}r._empty=!1}}}))),this._disposables.add(n.onDidCancel((function(e){r._empty||e.retrigger||(r._empty=!0)})))}return Object(J.a)(e,[{key:"getLastOvertypedInfo",value:function(e){if(!this._empty&&e>=0&&e=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Pm=function(e,t){return function(n,r){t(n,r,e)}},Rm=function(){function e(t,n){if(Object(Y.a)(this,e),this._model=t,this._position=n,t.getLineMaxColumn(n.lineNumber)!==n.column){var r=t.getOffsetAt(n),i=t.getPositionAt(r+1);this._marker=t.deltaDecorations([],[{range:Te.a.fromPositions(n,i),options:{stickiness:1}}])}}return Object(J.a)(e,[{key:"dispose",value:function(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}},{key:"delta",value:function(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){var t=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}]),e}(),Mm=function(){function e(t,n,r,i,a,o){var s=this;Object(Y.a)(this,e),this._memoryService=n,this._commandService=r,this._contextKeyService=i,this._instantiationService=a,this._logService=o,this._lineSuffix=new xe.d,this._toDispose=new xe.b,this.editor=t,this.model=a.createInstance(mg,this.editor);var u=vh.InsertMode.bindTo(i);u.set(t.getOption(101).insertMode),this.model.onDidTrigger((function(){return u.set(t.getOption(101).insertMode)})),this.widget=this._toDispose.add(new Se.b((function(){var e=s._instantiationService.createInstance(Tm,s.editor);s._toDispose.add(e),s._toDispose.add(e.onDidSelect((function(e){return s._insertSuggestion(e,0)}),s));var t=new Im(s.editor,e,(function(e){return s._insertSuggestion(e,2)}));s._toDispose.add(t),s._toDispose.add(s.model.onDidSuggest((function(e){0===e.completionModel.items.length&&t.reset()})));var n=vh.MakesTextEdit.bindTo(s._contextKeyService),r=vh.HasInsertAndReplaceRange.bindTo(s._contextKeyService),i=vh.CanResolve.bindTo(s._contextKeyService);return s._toDispose.add(Object(xe.h)((function(){n.reset(),r.reset(),i.reset()}))),s._toDispose.add(e.onDidFocus((function(e){var t=e.item,a=s.editor.getPosition(),o=t.editStart.column,u=a.column,c=!0;"smart"!==s.editor.getOption(1)||2!==s.model.state||t.completion.command||t.completion.additionalTextEdits||4&t.completion.insertTextRules||u-o!==t.completion.insertText.length||(c=s.editor.getModel().getValueInRange({startLineNumber:a.lineNumber,startColumn:o,endLineNumber:a.lineNumber,endColumn:u})!==t.completion.insertText);n.set(c),r.set(!ke.a.equals(t.editInsertEnd,t.editReplaceEnd)),i.set(Boolean(t.provider.resolveCompletionItem)||Boolean(t.completion.documentation)||t.completion.detail!==t.completion.label)}))),s._toDispose.add(e.onDetailsKeyDown((function(e){e.toKeybinding().equals(new ee.e(!0,!1,!1,!1,33))||Ge.f&&e.toKeybinding().equals(new ee.e(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeybinding().isModifierKey()||s.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new Se.b((function(){return s._toDispose.add(new Fm(s.editor,s.model))}))),this._alternatives=this._toDispose.add(new Se.b((function(){return s._toDispose.add(new ug(s.editor,s._contextKeyService))}))),this._toDispose.add(a.createInstance(Nm,t)),this._toDispose.add(this.model.onDidTrigger((function(e){s.widget.value.showTriggered(e.auto,e.shy?250:50),s._lineSuffix.value=new Rm(s.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((function(e){if(!e.shy){var t=s._memoryService.select(s.editor.getModel(),s.editor.getPosition(),e.completionModel.items);s.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}}))),this._toDispose.add(this.model.onDidCancel((function(e){e.retrigger||s.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((function(){s.model.cancel(),s.model.clear()})));var c=vh.AcceptSuggestionsOnEnter.bindTo(i),l=function(){var e=s.editor.getOption(1);c.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((function(){return l()}))),l()}return Object(J.a)(e,[{key:"dispose",value:function(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}},{key:"_insertSuggestion",value:function(e,t){var n=this;if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(this.editor.hasModel()){var r=this.editor.getModel(),i=r.getAlternativeVersionId(),a=e.item,o=[],s=new dt.b;1&t||this.editor.pushUndoStop();var u=this.getOverwriteInfo(a,Boolean(8&t));if(this._memoryService.memorize(r,this.editor.getPosition(),a),Array.isArray(a.completion.additionalTextEdits)){var c=mt.c.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",a.completion.additionalTextEdits.map((function(e){return Os.a.replace(Te.a.lift(e.range),e.text)}))),c.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!a.isResolved){var l,d=new mh.a(!0),p=r.onDidChangeContent((function(e){if(e.isFlush)return s.cancel(),void p.dispose();var t,n=Object(Ee.a)(e.changes);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=Te.a.getEndPosition(r.range);l&&!ke.a.isBefore(i,l)||(l=i)}}catch(a){n.e(a)}finally{n.f()}})),f=t;t|=2;var h=!1,g=this.editor.onWillType((function(){g.dispose(),h=!0,2&f||n.editor.pushUndoStop()}));o.push(a.resolve(s.token).then((function(){if(!a.completion.additionalTextEdits||s.token.isCancellationRequested)return!1;if(l&&a.completion.additionalTextEdits.some((function(e){return ke.a.isBefore(l,Te.a.getStartPosition(e.range))})))return!1;h&&n.editor.pushUndoStop();var e=mt.c.capture(n.editor);return n.editor.executeEdits("suggestController.additionalTextEdits.async",a.completion.additionalTextEdits.map((function(e){return Os.a.replace(Te.a.lift(e.range),e.text)}))),e.restoreRelativeVerticalPositionOfCursor(n.editor),!h&&2&f||n.editor.pushUndoStop(),!0})).then((function(e){n._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",d.elapsed(),e),p.dispose(),g.dispose()})))}var m=a.completion.insertText;if(4&a.completion.insertTextRules||(m=gh.escape(m)),$h.get(this.editor).insert(m,{overwriteBefore:u.overwriteBefore,overwriteAfter:u.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&a.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),a.completion.command)if(a.completion.command.id===Bm.id)this.model.trigger({auto:!0,shy:!1},!0);else{var _;o.push((_=this._commandService).executeCommand.apply(_,[a.completion.command.id].concat(Object(ct.a)(a.completion.command.arguments?Object(ct.a)(a.completion.command.arguments):[]))).catch(ie.e)),this.model.cancel()}else this.model.cancel();4&t&&this._alternatives.value.set(e,(function(e){for(s.cancel();r.canUndo();){i!==r.getAlternativeVersionId()&&r.undo(),n._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(a),Promise.all(o).finally((function(){n.model.clear(),s.dispose()}))}}},{key:"getOverwriteInfo",value:function(e,t){Object(Bn.b)(this.editor.hasModel());var n="replace"===this.editor.getOption(101).insertMode;t&&(n=!n);var r=e.position.column-e.editStart.column,i=(n?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:r+(this.editor.getPosition().column-e.position.column),overwriteAfter:i+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}},{key:"_alertCompletionItem",value:function(e){var t=e.completion,n="string"===typeof t.label?t.label:t.label.name;if(Object(ne.m)(t.additionalTextEdits)){var r=Q.a("aria.alert.snippet","Accepting '{0}' made {1} additional edits",n,t.additionalTextEdits.length);Object(pe.a)(r)}}},{key:"triggerSuggest",value:function(e){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,e),this.editor.revealLine(this.editor.getPosition().lineNumber,0),this.editor.focus())}},{key:"triggerSuggestAndAcceptBest",value:function(e){var t=this;if(this.editor.hasModel()){var n=this.editor.getPosition(),r=function(){n.equals(t.editor.getPosition())&&t._commandService.executeCommand(e.fallback)};rn.b.once(this.model.onDidTrigger)((function(e){var n=[];rn.b.any(t.model.onDidTrigger,t.model.onDidCancel)((function(){Object(xe.f)(n),r()}),void 0,n),t.model.onDidSuggest((function(e){var i=e.completionModel;if(Object(xe.f)(n),0!==i.items.length){var a=t._memoryService.select(t.editor.getModel(),t.editor.getPosition(),i.items),o=i.items[a];!function(e){if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;var n=t.editor.getPosition(),r=e.editStart.column,i=n.column;return i-r!==e.completion.insertText.length||t.editor.getModel().getValueInRange({startLineNumber:n.lineNumber,startColumn:r,endLineNumber:n.lineNumber,endColumn:i})!==e.completion.insertText}(o)?r():(t.editor.pushUndoStop(),t._insertSuggestion({index:a,item:o,model:i},7))}else r()}),void 0,n)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealLine(n.lineNumber,0),this.editor.focus()}}},{key:"acceptSelectedSuggestion",value:function(e,t){var n=this.widget.value.getFocusedItem(),r=0;e&&(r|=4),t&&(r|=8),this._insertSuggestion(n,r)}},{key:"acceptNextSuggestion",value:function(){this._alternatives.value.next()}},{key:"acceptPrevSuggestion",value:function(){this._alternatives.value.prev()}},{key:"cancelSuggestWidget",value:function(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}},{key:"selectNextSuggestion",value:function(){this.widget.value.selectNext()}},{key:"selectNextPageSuggestion",value:function(){this.widget.value.selectNextPage()}},{key:"selectLastSuggestion",value:function(){this.widget.value.selectLast()}},{key:"selectPrevSuggestion",value:function(){this.widget.value.selectPrevious()}},{key:"selectPrevPageSuggestion",value:function(){this.widget.value.selectPreviousPage()}},{key:"selectFirstSuggestion",value:function(){this.widget.value.selectFirst()}},{key:"toggleSuggestionDetails",value:function(){this.widget.value.toggleDetails()}},{key:"toggleExplainMode",value:function(){this.widget.value.toggleExplainMode()}},{key:"toggleSuggestionFocus",value:function(){this.widget.value.toggleDetailsFocus()}},{key:"resetWidgetSize",value:function(){this.widget.value.resetPersistedSize()}}],[{key:"get",value:function(t){return t.getContribution(e.ID)}}]),e}();Mm.ID="editor.contrib.suggestController",Mm=Lm([Pm(1,ag),Pm(2,St.b),Pm(3,te.b),Pm(4,zt.a),Pm(5,Ff.b)],Mm);var Bm=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.id,label:Q.a("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:te.a.and(X.a.writable,X.a.hasCompletionItemProvider),kbOpts:{kbExpr:X.a.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=Mm.get(t);n&&n.triggerSuggest()}}]),n}($.b);Bm.id="editor.action.triggerSuggest",Object($.l)(Mm.ID,Mm),Object($.j)(Bm);var jm=190,Um=$.c.bindToContribution(Mm.get);Object($.k)(new Um({id:"acceptSelectedSuggestion",precondition:vh.Visible,handler:function(e){e.acceptSelectedSuggestion(!0,!1)}})),jo.a.registerKeybindingRule({id:"acceptSelectedSuggestion",when:te.a.and(vh.Visible,X.a.textInputFocus),primary:2,weight:jm}),jo.a.registerKeybindingRule({id:"acceptSelectedSuggestion",when:te.a.and(vh.Visible,X.a.textInputFocus,vh.AcceptSuggestionsOnEnter,vh.MakesTextEdit),primary:3,weight:jm}),Fe.d.appendMenuItem(yh,{command:{id:"acceptSelectedSuggestion",title:Q.a("accept.insert","Insert")},group:"left",order:1,when:vh.HasInsertAndReplaceRange.toNegated()}),Fe.d.appendMenuItem(yh,{command:{id:"acceptSelectedSuggestion",title:Q.a("accept.insert","Insert")},group:"left",order:1,when:te.a.and(vh.HasInsertAndReplaceRange,vh.InsertMode.isEqualTo("insert"))}),Fe.d.appendMenuItem(yh,{command:{id:"acceptSelectedSuggestion",title:Q.a("accept.replace","Replace")},group:"left",order:1,when:te.a.and(vh.HasInsertAndReplaceRange,vh.InsertMode.isEqualTo("replace"))}),Object($.k)(new Um({id:"acceptAlternativeSelectedSuggestion",precondition:te.a.and(vh.Visible,X.a.textInputFocus),kbOpts:{weight:jm,kbExpr:X.a.textInputFocus,primary:1027,secondary:[1026]},handler:function(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:yh,group:"left",order:2,when:te.a.and(vh.HasInsertAndReplaceRange,vh.InsertMode.isEqualTo("insert")),title:Q.a("accept.replace","Replace")},{menuId:yh,group:"left",order:2,when:te.a.and(vh.HasInsertAndReplaceRange,vh.InsertMode.isEqualTo("replace")),title:Q.a("accept.insert","Insert")}]})),St.a.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),Object($.k)(new Um({id:"hideSuggestWidget",precondition:vh.Visible,handler:function(e){return e.cancelSuggestWidget()},kbOpts:{weight:jm,kbExpr:X.a.textInputFocus,primary:9,secondary:[1033]}})),Object($.k)(new Um({id:"selectNextSuggestion",precondition:te.a.and(vh.Visible,vh.MultipleSuggestions),handler:function(e){return e.selectNextSuggestion()},kbOpts:{weight:jm,kbExpr:X.a.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),Object($.k)(new Um({id:"selectNextPageSuggestion",precondition:te.a.and(vh.Visible,vh.MultipleSuggestions),handler:function(e){return e.selectNextPageSuggestion()},kbOpts:{weight:jm,kbExpr:X.a.textInputFocus,primary:12,secondary:[2060]}})),Object($.k)(new Um({id:"selectLastSuggestion",precondition:te.a.and(vh.Visible,vh.MultipleSuggestions),handler:function(e){return e.selectLastSuggestion()}})),Object($.k)(new Um({id:"selectPrevSuggestion",precondition:te.a.and(vh.Visible,vh.MultipleSuggestions),handler:function(e){return e.selectPrevSuggestion()},kbOpts:{weight:jm,kbExpr:X.a.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),Object($.k)(new Um({id:"selectPrevPageSuggestion",precondition:te.a.and(vh.Visible,vh.MultipleSuggestions),handler:function(e){return e.selectPrevPageSuggestion()},kbOpts:{weight:jm,kbExpr:X.a.textInputFocus,primary:11,secondary:[2059]}})),Object($.k)(new Um({id:"selectFirstSuggestion",precondition:te.a.and(vh.Visible,vh.MultipleSuggestions),handler:function(e){return e.selectFirstSuggestion()}})),Object($.k)(new Um({id:"toggleSuggestionDetails",precondition:vh.Visible,handler:function(e){return e.toggleSuggestionDetails()},kbOpts:{weight:jm,kbExpr:X.a.textInputFocus,primary:2058,mac:{primary:266}},menuOpts:[{menuId:yh,group:"right",order:1,when:te.a.and(vh.DetailsVisible,vh.CanResolve),title:Q.a("detail.more","show less")},{menuId:yh,group:"right",order:1,when:te.a.and(vh.DetailsVisible.toNegated(),vh.CanResolve),title:Q.a("detail.less","show more")}]})),Object($.k)(new Um({id:"toggleExplainMode",precondition:vh.Visible,handler:function(e){return e.toggleExplainMode()},kbOpts:{weight:100,primary:2133}})),Object($.k)(new Um({id:"toggleSuggestionFocus",precondition:vh.Visible,handler:function(e){return e.toggleSuggestionFocus()},kbOpts:{weight:jm,kbExpr:X.a.textInputFocus,primary:2570,mac:{primary:778}}})),Object($.k)(new Um({id:"insertBestCompletion",precondition:te.a.and(X.a.textInputFocus,te.a.equals("config.editor.tabCompletion","on"),Nm.AtEnd,vh.Visible.toNegated(),ug.OtherSuggestions.toNegated(),$h.InSnippetMode.toNegated()),handler:function(e,t){e.triggerSuggestAndAcceptBest(Object(Bn.i)(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:jm,primary:2}})),Object($.k)(new Um({id:"insertNextSuggestion",precondition:te.a.and(X.a.textInputFocus,te.a.equals("config.editor.tabCompletion","on"),ug.OtherSuggestions,vh.Visible.toNegated(),$h.InSnippetMode.toNegated()),handler:function(e){return e.acceptNextSuggestion()},kbOpts:{weight:jm,kbExpr:X.a.textInputFocus,primary:2}})),Object($.k)(new Um({id:"insertPrevSuggestion",precondition:te.a.and(X.a.textInputFocus,te.a.equals("config.editor.tabCompletion","on"),ug.OtherSuggestions,vh.Visible.toNegated(),$h.InSnippetMode.toNegated()),handler:function(e){return e.acceptPrevSuggestion()},kbOpts:{weight:jm,kbExpr:X.a.textInputFocus,primary:1026}})),Object($.j)(function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.resetSuggestSize",label:Q.a("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}return Object(J.a)(n,[{key:"run",value:function(e,t){Mm.get(t).resetWidgetSize()}}]),n}($.b));var Vm=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.forceRetokenize",label:Q.a("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}return Object(J.a)(n,[{key:"run",value:function(e,t){if(t.hasModel()){var n=t.getModel();n.resetTokenization();var r=new mh.a(!0);n.forceTokenization(n.getLineCount()),r.stop(),console.log("tokenization took ".concat(r.elapsed()))}}}]),n}($.b);Object($.j)(Vm);var zm=n(182),Hm=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:n.ID,label:Q.a({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=!zm.b.getTabFocusMode();zm.b.setTabFocusMode(n),n?Object(pe.a)(Q.a("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Object(pe.a)(Q.a("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}]),n}($.b);Hm.ID="editor.action.toggleTabFocusMode",Object($.j)(Hm);var Wm=n(203),Km=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},qm=function(e,t){return function(n,r){t(n,r,e)}},Gm=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Ym="ignoreUnusualLineTerminators";function Jm(e,t,n){e.setModelProperty(t.uri,Ym,n)}function $m(e,t){return e.getModelProperty(t.uri,Ym)}var Qm=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;return Object(Y.a)(this,n),(a=t.call(this))._editor=e,a._dialogService=r,a._codeEditorService=i,a._config=a._editor.getOption(108),a._register(a._editor.onDidChangeConfiguration((function(e){e.hasChanged(108)&&(a._config=a._editor.getOption(108),a._checkForUnusualLineTerminators())}))),a._register(a._editor.onDidChangeModel((function(){a._checkForUnusualLineTerminators()}))),a._register(a._editor.onDidChangeModelContent((function(e){e.isUndoing||a._checkForUnusualLineTerminators()}))),a}return Object(J.a)(n,[{key:"_checkForUnusualLineTerminators",value:function(){return Gm(this,void 0,void 0,K.a.mark((function e(){var t;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("off"!==this._config){e.next=2;break}return e.abrupt("return");case 2:if(this._editor.hasModel()){e.next=4;break}return e.abrupt("return");case 4:if((t=this._editor.getModel()).mightContainUnusualLineTerminators()){e.next=7;break}return e.abrupt("return");case 7:if(!0!==$m(this._codeEditorService,t)){e.next=10;break}return e.abrupt("return");case 10:if(!this._editor.getOption(75)){e.next=12;break}return e.abrupt("return");case 12:if("auto"!==this._config){e.next=15;break}return t.removeUnusualLineTerminators(this._editor.getSelections()),e.abrupt("return");case 15:return e.next=17,this._dialogService.confirm({title:Q.a("unusualLineTerminators.title","Unusual Line Terminators"),message:Q.a("unusualLineTerminators.message","Detected unusual line terminators"),detail:Q.a("unusualLineTerminators.detail","This file contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`."),primaryButton:Q.a("unusualLineTerminators.fix","Fix this file"),secondaryButton:Q.a("unusualLineTerminators.ignore","Ignore problem for this file")});case 17:if(e.sent.confirmed){e.next=21;break}return Jm(this._codeEditorService,t,!0),e.abrupt("return");case 21:t.removeUnusualLineTerminators(this._editor.getSelections());case 22:case"end":return e.stop()}}),e,this)})))}}]),n}(xe.a);Qm.ID="editor.contrib.unusualLineTerminatorsDetector",Qm=Km([qm(1,Wm.a),qm(2,Je.a)],Qm),Object($.l)(Qm.ID,Qm);var Xm=n(225),Zm=n(224),e_=n(208),t_=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},n_=function(e,t){return function(n,r){t(n,r,e)}},r_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o;return Object(Y.a)(this,n),(o=t.call(this))._modelService=r,o._themeService=i,o._configurationService=a,o._editor=e,o._tokenizeViewport=new Se.d((function(){return o._tokenizeViewportNow()}),100),o._outstandingRequests=[],o._register(o._editor.onDidScrollChange((function(){o._tokenizeViewport.schedule()}))),o._register(o._editor.onDidChangeModel((function(){o._cancelAll(),o._tokenizeViewport.schedule()}))),o._register(o._editor.onDidChangeModelContent((function(e){o._cancelAll(),o._tokenizeViewport.schedule()}))),o._register(_t.k.onDidChange((function(){o._cancelAll(),o._tokenizeViewport.schedule()}))),o._register(o._configurationService.onDidChangeConfiguration((function(e){e.affectsConfiguration(Zm.b)&&(o._cancelAll(),o._tokenizeViewport.schedule())}))),o._register(o._themeService.onDidColorThemeChange((function(){o._cancelAll(),o._tokenizeViewport.schedule()}))),o}return Object(J.a)(n,[{key:"_cancelAll",value:function(){var e,t=Object(Ee.a)(this._outstandingRequests);try{for(t.s();!(e=t.n()).done;){e.value.cancel()}}catch(n){t.e(n)}finally{t.f()}this._outstandingRequests=[]}},{key:"_removeOutstandingRequest",value:function(e){for(var t=0,n=this._outstandingRequests.length;t=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},a_=function(e,t){return function(n,r){t(n,r,e)}},o_=Object(Ne.lc)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},Q.a("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),s_=Object(Ne.lc)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},Q.a("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),u_=Object(Ne.lc)("editor.wordHighlightBorder",{light:null,dark:null,hc:Ne.b},Q.a("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),c_=Object(Ne.lc)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:Ne.b},Q.a("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),l_=Object(Ne.lc)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},Q.a("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),d_=Object(Ne.lc)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},Q.a("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),p_=new te.c("hasWordHighlights",!1);function f_(e,t,n){var r=_t.i.ordered(e);return Object(Se.h)(r.map((function(r){return function(){return Promise.resolve(r.provideDocumentHighlights(e,t,n)).then(void 0,ie.f)}})),ne.m)}var h_=function(){function e(t,n,r){var i=this;Object(Y.a)(this,e),this._wordRange=this._getCurrentWordRange(t,n),this.result=Object(Se.f)((function(e){return i._compute(t,n,r,e)}))}return Object(J.a)(e,[{key:"_getCurrentWordRange",value:function(e,t){var n=e.getWordAtPosition(t.getPosition());return n?new Te.a(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):null}},{key:"isValid",value:function(e,t,n){for(var r=t.startLineNumber,i=t.startColumn,a=t.endColumn,o=this._getCurrentWordRange(e,t),s=Boolean(this._wordRange&&this._wordRange.equalsRange(o)),u=0,c=n.length;!s&&u=a&&(s=!0)}return s}},{key:"cancel",value:function(){this.result.cancel()}}]),e}(),g_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_compute",value:function(e,t,n,r){return f_(e,t.getPosition(),r).then((function(e){return e||[]}))}}]),n}(h_),m_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;return Object(Y.a)(this,n),(a=t.call(this,e,r,i))._selectionIsEmpty=r.isEmpty(),a}return Object(J.a)(n,[{key:"_compute",value:function(e,t,n,r){return Object(Se.l)(250,r).then((function(){if(!t.isEmpty())return[];var r=e.getWordAtPosition(t.getPosition());return!r||r.word.length>1e3?[]:e.findMatches(r.word,!0,!1,!0,n,!1).map((function(e){return{range:e.range,kind:_t.h.Text}}))}))}},{key:"isValid",value:function(e,t,r){var i=t.isEmpty();return this._selectionIsEmpty===i&&Object(en.a)(Object(tn.a)(n.prototype),"isValid",this).call(this,e,t,r)}}]),n}(h_);Object($.n)("_executeDocumentHighlights",(function(e,t){return f_(e,t,dt.a.None)}));var __=function(){function e(t,n){var r=this;Object(Y.a)(this,e),this.toUnhook=new xe.b,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=t,this._hasWordHighlights=p_.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(66),this.model=this.editor.getModel(),this.toUnhook.add(t.onDidChangeCursorPosition((function(e){r._ignorePositionChangeEvent||r.occurrencesHighlight&&r._onPositionChanged(e)}))),this.toUnhook.add(t.onDidChangeModelContent((function(e){r._stopAll()}))),this.toUnhook.add(t.onDidChangeConfiguration((function(e){var t=r.editor.getOption(66);r.occurrencesHighlight!==t&&(r.occurrencesHighlight=t,r._stopAll())}))),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}return Object(J.a)(e,[{key:"hasDecorations",value:function(){return this._decorationIds.length>0}},{key:"restore",value:function(){this.occurrencesHighlight&&this._run()}},{key:"_getSortedHighlights",value:function(){var e=this;return ne.d(this._decorationIds.map((function(t){return e.model.getDecorationRange(t)})).sort(Te.a.compareRangesUsingStarts))}},{key:"moveNext",value:function(){var e=this,t=this._getSortedHighlights(),n=(t.findIndex((function(t){return t.containsPosition(e.editor.getPosition())}))+1)%t.length,r=t[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);var i=this._getWord();if(i){var a=this.editor.getModel().getLineContent(r.startLineNumber);Object(pe.a)("".concat(a,", ").concat(n+1," of ").concat(t.length," for '").concat(i.word,"'"))}}finally{this._ignorePositionChangeEvent=!1}}},{key:"moveBack",value:function(){var e=this,t=this._getSortedHighlights(),n=(t.findIndex((function(t){return t.containsPosition(e.editor.getPosition())}))-1+t.length)%t.length,r=t[n];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(r.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(r);var i=this._getWord();if(i){var a=this.editor.getModel().getLineContent(r.startLineNumber);Object(pe.a)("".concat(a,", ").concat(n+1," of ").concat(t.length," for '").concat(i.word,"'"))}}finally{this._ignorePositionChangeEvent=!1}}},{key:"_removeDecorations",value:function(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}},{key:"_stopAll",value:function(){this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}},{key:"_onPositionChanged",value:function(e){this.occurrencesHighlight&&3===e.reason?this._run():this._stopAll()}},{key:"_getWord",value:function(){var e=this.editor.getSelection(),t=e.startLineNumber,n=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:n})}},{key:"_run",value:function(){var e=this,t=this.editor.getSelection();if(t.startLineNumber===t.endLineNumber){var n=t.startColumn,r=t.endColumn,i=this._getWord();if(!i||i.startColumn>n||i.endColumn=n?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((function(){e.renderDecorations()}),n-t)}},{key:"renderDecorations",value:function(){this.renderDecorationsTimer=-1;var t,n=[],r=Object(Ee.a)(this.workerRequestValue);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.range&&n.push({range:i.range,options:e._getDecorationOptions(i.kind)})}}catch(a){r.e(a)}finally{r.f()}this._decorationIds=this.editor.deltaDecorations(this._decorationIds,n),this._hasWordHighlights.set(this.hasDecorations())}},{key:"dispose",value:function(){this._stopAll(),this.toUnhook.dispose()}}],[{key:"_getDecorationOptions",value:function(e){return e===_t.h.Write?this._WRITE_OPTIONS:e===_t.h.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}}]),e}();__._WRITE_OPTIONS=Ae.a.register({stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Object(Ie.g)(d_),position:we.d.Center}}),__._TEXT_OPTIONS=Ae.a.register({stickiness:1,className:"selectionHighlight",overviewRuler:{color:Object(Ie.g)(Ne.bc),position:we.d.Center}}),__._REGULAR_OPTIONS=Ae.a.register({stickiness:1,className:"wordHighlight",overviewRuler:{color:Object(Ie.g)(l_),position:we.d.Center}});var v_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;Object(Y.a)(this,n),(i=t.call(this)).wordHighlighter=null;var a=function(){e.hasModel()&&(i.wordHighlighter=new __(e,r))};return i._register(e.onDidChangeModel((function(e){i.wordHighlighter&&(i.wordHighlighter.dispose(),i.wordHighlighter=null),a()}))),a(),i}return Object(J.a)(n,[{key:"saveViewState",value:function(){return!(!this.wordHighlighter||!this.wordHighlighter.hasDecorations())}},{key:"moveNext",value:function(){this.wordHighlighter&&this.wordHighlighter.moveNext()}},{key:"moveBack",value:function(){this.wordHighlighter&&this.wordHighlighter.moveBack()}},{key:"restoreViewState",value:function(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}},{key:"dispose",value:function(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(xe.a);v_.ID="editor.contrib.wordHighlighter",v_=i_([a_(1,te.b)],v_);var y_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this,r))._isNext=e,i}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=v_.get(t);n&&(this._isNext?n.moveNext():n.moveBack())}}]),n}($.b),b_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!0,{id:"editor.action.wordHighlight.next",label:Q.a("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:p_,kbOpts:{kbExpr:X.a.editorTextFocus,primary:65,weight:100}})}return n}(y_),D_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,!1,{id:"editor.action.wordHighlight.prev",label:Q.a("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:p_,kbOpts:{kbExpr:X.a.editorTextFocus,primary:1089,weight:100}})}return n}(y_),E_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.wordHighlight.trigger",label:Q.a("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:p_.toNegated(),kbOpts:{kbExpr:X.a.editorTextFocus,primary:0,weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e,t,n){var r=v_.get(t);r&&r.restoreViewState(!0)}}]),n}($.b);Object($.l)(v_.ID,v_),Object($.j)(b_),Object($.j)(D_),Object($.j)(E_),Object(Ie.f)((function(e,t){var n=e.getColor(Ne.U);n&&(t.addRule(".monaco-editor .focused .selectionHighlight { background-color: ".concat(n,"; }")),t.addRule(".monaco-editor .selectionHighlight { background-color: ".concat(n.transparent(.5),"; }")));var r=e.getColor(o_);r&&t.addRule(".monaco-editor .wordHighlight { background-color: ".concat(r,"; }"));var i=e.getColor(s_);i&&t.addRule(".monaco-editor .wordHighlightStrong { background-color: ".concat(i,"; }"));var a=e.getColor(Ne.V);a&&t.addRule(".monaco-editor .selectionHighlight { border: 1px ".concat("hc"===e.type?"dotted":"solid"," ").concat(a,"; box-sizing: border-box; }"));var o=e.getColor(u_);o&&t.addRule(".monaco-editor .wordHighlight { border: 1px ".concat("hc"===e.type?"dashed":"solid"," ").concat(o,"; box-sizing: border-box; }"));var s=e.getColor(c_);s&&t.addRule(".monaco-editor .wordHighlightStrong { border: 1px ".concat("hc"===e.type?"dashed":"solid"," ").concat(s,"; box-sizing: border-box; }"))}));var C_=n(32),S_=n(130),x_=n(115),k_=n(40),T_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this,e))._inSelectionMode=e.inSelectionMode,r._wordNavigationType=e.wordNavigationType,r}return Object(J.a)(n,[{key:"runEditorCommand",value:function(e,t,n){var r=this;if(t.hasModel()){var i=Object(x_.a)(t.getOption(110)),a=t.getModel(),o=t.getSelections().map((function(e){var t=new ke.a(e.positionLineNumber,e.positionColumn),n=r._move(i,a,t,r._wordNavigationType);return r._moveTo(e,n,r._inSelectionMode)}));if(a.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,o.map((function(e){return C_.d.fromModelSelection(e)}))),1===o.length){var s=new ke.a(o[0].positionLineNumber,o[0].positionColumn);t.revealPosition(s,0)}}}},{key:"_moveTo",value:function(e,t,n){return n?new Z.a(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new Z.a(t.lineNumber,t.column,t.lineNumber,t.column)}}]),n}($.c),w_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_move",value:function(e,t,n,r){return S_.a.moveWordLeft(e,t,n,r)}}]),n}(T_),A_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_move",value:function(e,t,n,r){return S_.a.moveWordRight(e,t,n,r)}}]),n}(T_),O_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}return n}(w_),N_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}return n}(w_),I_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:2063,mac:{primary:527},weight:100}})}return n}(w_),F_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}return n}(w_),L_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}return n}(w_),P_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:3087,mac:{primary:1551},weight:100}})}return n}(w_),R_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0,kbOpts:{kbExpr:te.a.and(X.a.textInputFocus,Br.a),win:{primary:2063},weight:101}})}return Object(J.a)(n,[{key:"_move",value:function(e,t,r,i){return Object(en.a)(Object(tn.a)(n.prototype),"_move",this).call(this,Object(x_.a)(k_.g.wordSeparators.defaultValue),t,r,i)}}]),n}(w_),M_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0,kbOpts:{kbExpr:te.a.and(X.a.textInputFocus,Br.a),win:{primary:3087},weight:101}})}return Object(J.a)(n,[{key:"_move",value:function(e,t,r,i){return Object(en.a)(Object(tn.a)(n.prototype),"_move",this).call(this,Object(x_.a)(k_.g.wordSeparators.defaultValue),t,r,i)}}]),n}(w_),B_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}return n}(A_),j_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:2065,mac:{primary:529},weight:100}})}return n}(A_),U_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}return n}(A_),V_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}return n}(A_),z_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:3089,mac:{primary:1553},weight:100}})}return n}(A_),H_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}return n}(A_),W_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0,kbOpts:{kbExpr:te.a.and(X.a.textInputFocus,Br.a),win:{primary:2065},weight:101}})}return Object(J.a)(n,[{key:"_move",value:function(e,t,r,i){return Object(en.a)(Object(tn.a)(n.prototype),"_move",this).call(this,Object(x_.a)(k_.g.wordSeparators.defaultValue),t,r,i)}}]),n}(A_),K_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0,kbOpts:{kbExpr:te.a.and(X.a.textInputFocus,Br.a),win:{primary:3089},weight:101}})}return Object(J.a)(n,[{key:"_move",value:function(e,t,r,i){return Object(en.a)(Object(tn.a)(n.prototype),"_move",this).call(this,Object(x_.a)(k_.g.wordSeparators.defaultValue),t,r,i)}}]),n}(A_),q_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this,e))._whitespaceHeuristics=e.whitespaceHeuristics,r._wordNavigationType=e.wordNavigationType,r}return Object(J.a)(n,[{key:"runEditorCommand",value:function(e,t,n){var r=this;if(t.hasModel()){var i=Object(x_.a)(t.getOption(110)),a=t.getModel(),o=t.getSelections(),s=t.getOption(5),u=t.getOption(7),c=Ns.a.getAutoClosingPairs(a.getLanguageIdentifier().id),l=o.map((function(e){var t=r._delete({wordSeparators:i,model:a,selection:e,whitespaceHeuristics:r._whitespaceHeuristics,autoClosingBrackets:s,autoClosingQuotes:u,autoClosingPairs:c},r._wordNavigationType);return new He.a(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,l),t.pushUndoStop()}}}]),n}($.c),G_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_delete",value:function(e,t){var n=S_.a.deleteWordLeft(e,t);return n||new Te.a(1,1,1,1)}}]),n}(q_),Y_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_delete",value:function(e,t){var n=S_.a.deleteWordRight(e,t);if(n)return n;var r=e.model.getLineCount(),i=e.model.getLineMaxColumn(r);return new Te.a(r,i,r,i)}}]),n}(q_),J_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:X.a.writable})}return n}(G_),$_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:X.a.writable})}return n}(G_),Q_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:X.a.writable,kbOpts:{kbExpr:X.a.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}return n}(G_),X_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:X.a.writable})}return n}(Y_),Z_=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:X.a.writable})}return n}(Y_),ev=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:X.a.writable,kbOpts:{kbExpr:X.a.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}return n}(Y_),tv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"deleteInsideWord",precondition:X.a.writable,label:Q.a("deleteInsideWord","Delete Word"),alias:"Delete Word"})}return Object(J.a)(n,[{key:"run",value:function(e,t,n){if(t.hasModel()){var r=Object(x_.a)(t.getOption(110)),i=t.getModel(),a=t.getSelections().map((function(e){var t=S_.a.deleteInsideWord(r,i,e);return new He.a(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}}]),n}($.b);Object($.k)(new O_),Object($.k)(new N_),Object($.k)(new I_),Object($.k)(new F_),Object($.k)(new L_),Object($.k)(new P_),Object($.k)(new B_),Object($.k)(new j_),Object($.k)(new U_),Object($.k)(new V_),Object($.k)(new z_),Object($.k)(new H_),Object($.k)(new R_),Object($.k)(new M_),Object($.k)(new W_),Object($.k)(new K_),Object($.k)(new J_),Object($.k)(new $_),Object($.k)(new Q_),Object($.k)(new X_),Object($.k)(new Z_),Object($.k)(new ev),Object($.j)(tv);var nv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:X.a.writable,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:769},weight:100}})}return Object(J.a)(n,[{key:"_delete",value:function(e,t){var n=S_.b.deleteWordPartLeft(e);return n||new Te.a(1,1,1,1)}}]),n}(q_),rv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:X.a.writable,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:788},weight:100}})}return Object(J.a)(n,[{key:"_delete",value:function(e,t){var n=S_.b.deleteWordPartRight(e);if(n)return n;var r=e.model.getLineCount(),i=e.model.getLineMaxColumn(r);return new Te.a(r,i,r,i)}}]),n}(q_),iv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_move",value:function(e,t,n,r){return S_.b.moveWordPartLeft(e,t,n)}}]),n}(T_),av=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:783},weight:100}})}return n}(iv);St.a.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");var ov=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}return n}(iv);St.a.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");var sv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.apply(this,arguments)}return Object(J.a)(n,[{key:"_move",value:function(e,t,n,r){return S_.b.moveWordPartRight(e,t,n)}}]),n}(T_),uv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:785},weight:100}})}return n}(sv),cv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:X.a.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}return n}(sv);Object($.k)(new nv),Object($.k)(new rv),Object($.k)(new av),Object($.k)(new ov),Object($.k)(new uv),Object($.k)(new cv);var lv=n(54),dv=(n(415),n(45)),pv=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},fv=function(e,t){return function(n,r){t(n,r,e)}},hv=new te.c("accessibilityHelpWidgetVisible",!1),gv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this))._editor=e,i._widget=i._register(r.createInstance(mv,i._editor)),i}return Object(J.a)(n,[{key:"show",value:function(){this._widget.show()}},{key:"hide",value:function(){this._widget.hide()}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(xe.a);gv.ID="editor.contrib.accessibilityHelpController",gv=pv([fv(1,zt.a)],gv);var mv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a){var o;return Object(Y.a)(this,n),(o=t.call(this))._contextKeyService=r,o._keybindingService=i,o._openerService=a,o._editor=e,o._isVisibleKey=hv.bindTo(o._contextKeyService),o._domNode=Object(dv.b)(document.createElement("div")),o._domNode.setClassName("accessibilityHelpWidget"),o._domNode.setDisplay("none"),o._domNode.setAttribute("role","dialog"),o._domNode.setAttribute("aria-hidden","true"),o._contentDomNode=Object(dv.b)(document.createElement("div")),o._contentDomNode.setAttribute("role","document"),o._domNode.appendChild(o._contentDomNode),o._isVisible=!1,o._register(o._editor.onDidLayoutChange((function(){o._isVisible&&o._layout()}))),o._register(Ht.addStandardDisposableListener(o._contentDomNode.domNode,"keydown",(function(e){if(o._isVisible&&(e.equals(2083)&&(Object(pe.a)(lv.a.emergencyConfOn),o._editor.updateOptions({accessibilitySupport:"on"}),Ht.clearNode(o._contentDomNode.domNode),o._buildContent(),o._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){Object(pe.a)(lv.a.openingDocs);var t=o._editor.getRawOptions().accessibilityHelpUrl;"undefined"===typeof t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),o._openerService.open(gt.a.parse(t)),e.preventDefault(),e.stopPropagation()}}))),o.onblur(o._contentDomNode.domNode,(function(){o.hide()})),o._editor.addOverlayWidget(Object(lt.a)(o)),o}return Object(J.a)(n,[{key:"dispose",value:function(){this._editor.removeOverlayWidget(this),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}},{key:"getId",value:function(){return n.ID}},{key:"getDomNode",value:function(){return this._domNode.domNode}},{key:"getPosition",value:function(){return{preference:null}}},{key:"show",value:function(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}},{key:"_descriptionForCommand",value:function(e,t,n){var r=this._keybindingService.lookupKeybinding(e);return r?ft.w(t,r.getAriaLabel()):ft.w(n,e)}},{key:"_buildContent",value:function(){var e=this._editor.getOptions(),t=this._editor.getSelections(),n=0;if(t){var r=this._editor.getModel();r&&t.forEach((function(e){n+=r.getValueLengthInRange(e)}))}var i=function(e,t){return e&&0!==e.length?1===e.length?t?ft.w(lv.a.singleSelectionRange,e[0].positionLineNumber,e[0].positionColumn,t):ft.w(lv.a.singleSelection,e[0].positionLineNumber,e[0].positionColumn):t?ft.w(lv.a.multiSelectionRange,e.length,t):e.length>0?ft.w(lv.a.multiSelection,e.length):"":lv.a.noSelection}(t,n);e.get(49)?e.get(75)?i+=lv.a.readonlyDiffEditor:i+=lv.a.editableDiffEditor:e.get(75)?i+=lv.a.readonlyEditor:i+=lv.a.editableEditor;var a=Ge.f?lv.a.changeConfigToOnMac:lv.a.changeConfigToOnWinLinux;switch(e.get(2)){case 0:i+="\n\n - "+a;break;case 2:i+="\n\n - "+lv.a.auto_on;break;case 1:i+="\n\n - "+lv.a.auto_off,i+=" "+a}e.get(123)?i+="\n\n - "+this._descriptionForCommand(Hm.ID,lv.a.tabFocusModeOnMsg,lv.a.tabFocusModeOnMsgNoKb):i+="\n\n - "+this._descriptionForCommand(Hm.ID,lv.a.tabFocusModeOffMsg,lv.a.tabFocusModeOffMsgNoKb),i+="\n\n - "+(Ge.f?lv.a.openDocMac:lv.a.openDocWinLinux),i+="\n\n"+lv.a.outroMsg,this._contentDomNode.domNode.appendChild(Object(ga.b)(i)),this._contentDomNode.domNode.setAttribute("aria-label",i)}},{key:"hide",value:function(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,Ht.clearNode(this._contentDomNode.domNode),this._editor.focus())}},{key:"_layout",value:function(){var e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(n.WIDTH,e.width-40)),r=Math.max(5,Math.min(n.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(r);var i=Math.round((e.height-r)/2);this._domNode.setTop(i);var a=Math.round((e.width-t)/2);this._domNode.setLeft(a)}}]),n}(_r.a);mv.ID="editor.contrib.accessibilityHelpWidget",mv.WIDTH=500,mv.HEIGHT=300,mv=pv([fv(1,te.b),fv(2,qt.a),fv(3,Nr.a)],mv);var _v=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.showAccessibilityHelp",label:lv.a.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=gv.get(t);n&&n.show()}}]),n}($.b);Object($.l)(gv.ID,gv),Object($.j)(_v);var vv=$.c.bindToContribution(gv.get);Object($.k)(new vv({id:"closeAccessibilityHelp",precondition:hv,handler:function(e){return e.hide()},kbOpts:{weight:200,kbExpr:X.a.focus,primary:9,secondary:[1033]}})),Object(Ie.f)((function(e,t){var n=e.getColor(Ne.Z);n&&t.addRule(".monaco-editor .accessibilityHelpWidget { background-color: ".concat(n,"; }"));var r=e.getColor(Ne.bb);r&&t.addRule(".monaco-editor .accessibilityHelpWidget { color: ".concat(r,"; }"));var i=e.getColor(Ne.zc);i&&t.addRule(".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ".concat(i,"; }"));var a=e.getColor(Ne.h);a&&t.addRule(".monaco-editor .accessibilityHelpWidget { border: 2px solid ".concat(a,"; }"))}));n(416);var yv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).editor=e,r.widget=null,qe.j&&(r._register(e.onDidChangeConfiguration((function(){return r.update()}))),r.update()),r}return Object(J.a)(n,[{key:"update",value:function(){var e=!this.editor.getOption(75);!this.widget&&e?this.widget=new bv(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}},{key:"dispose",value:function(){Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this),this.widget&&(this.widget.dispose(),this.widget=null)}}]),n}(xe.a);yv.ID="editor.contrib.iPadShowKeyboard";var bv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).editor=e,r._domNode=document.createElement("textarea"),r._domNode.className="iPadShowKeyboard",r._register(Ht.addDisposableListener(r._domNode,"touchstart",(function(e){r.editor.focus()}))),r._register(Ht.addDisposableListener(r._domNode,"focus",(function(e){r.editor.focus()}))),r.editor.addOverlayWidget(Object(lt.a)(r)),r}return Object(J.a)(n,[{key:"dispose",value:function(){this.editor.removeOverlayWidget(this),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}},{key:"getId",value:function(){return n.ID}},{key:"getDomNode",value:function(){return this._domNode}},{key:"getPosition",value:function(){return{preference:1}}}]),n}(xe.a);bv.ID="editor.contrib.ShowKeyboardWidget",Object($.l)(yv.ID,yv);n(417);var Dv=n(86),Ev=n(146),Cv=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Sv=function(e,t){return function(n,r){t(n,r,e)}},xv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i){var a;return Object(Y.a)(this,n),(a=t.call(this))._editor=e,a._modeService=i,a._widget=null,a._register(a._editor.onDidChangeModel((function(e){return a.stop()}))),a._register(a._editor.onDidChangeModelLanguage((function(e){return a.stop()}))),a._register(_t.D.onDidChange((function(e){return a.stop()}))),a._register(a._editor.onKeyUp((function(e){return 9===e.keyCode&&a.stop()}))),a}return Object(J.a)(n,[{key:"dispose",value:function(){this.stop(),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}},{key:"launch",value:function(){this._widget||this._editor.hasModel()&&(this._widget=new Tv(this._editor,this._modeService))}},{key:"stop",value:function(){this._widget&&(this._widget.dispose(),this._widget=null)}}],[{key:"get",value:function(e){return e.getContribution(n.ID)}}]),n}(xe.a);xv.ID="editor.contrib.inspectTokens",xv=Cv([Sv(1,Ev.a),Sv(2,gr.a)],xv);var kv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.inspectTokens",label:lv.c.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=xv.get(t);n&&n.launch()}}]),n}($.b);var Tv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i,a;return Object(Y.a)(this,n),(i=t.call(this)).allowEditorOverflow=!0,i._editor=e,i._modeService=r,i._model=i._editor.getModel(),i._domNode=document.createElement("div"),i._domNode.className="tokens-inspect-widget",i._tokenizationSupport=(a=i._model.getLanguageIdentifier(),_t.D.get(a.language)||{getInitialState:function(){return Dv.c},tokenize:function(e,t,n,r){return Object(Dv.d)(a.language,e,n,r)},tokenize2:function(e,t,n,r){return Object(Dv.e)(a.id,e,n,r)}}),i._compute(i._editor.getPosition()),i._register(i._editor.onDidChangeCursorPosition((function(e){return i._compute(i._editor.getPosition())}))),i._editor.addContentWidget(Object(lt.a)(i)),i}return Object(J.a)(n,[{key:"dispose",value:function(){this._editor.removeContentWidget(this),Object(en.a)(Object(tn.a)(n.prototype),"dispose",this).call(this)}},{key:"getId",value:function(){return n._ID}},{key:"_compute",value:function(e){for(var t=this._getTokensAtLine(e.lineNumber),n=0,r=t.tokens1.length-1;r>=0;r--){var i=t.tokens1[r];if(e.column-1>=i.offset){n=r;break}}for(var a=0,o=t.tokens2.length>>>1;o>=0;o--)if(e.column-1>=t.tokens2[o<<1]){a=o;break}var s=this._model.getLineContent(e.lineNumber),u="";if(n=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Ov=function(e,t){return function(n,r){t(n,r,e)}},Nv=function(){function e(t){Object(Y.a)(this,e),this.quickInputService=t,this.registry=Lf.a.as(wv.b.Quickaccess)}return Object(J.a)(e,[{key:"provide",value:function(t){var n=this,r=new xe.b;r.add(t.onDidAccept((function(){var e=Object(Ce.a)(t.selectedItems,1)[0];e&&n.quickInputService.quickAccess.show(e.prefix,{preserveValue:!0})}))),r.add(t.onDidChangeValue((function(t){var r=n.registry.getQuickAccessProvider(t.substr(e.PREFIX.length));r&&r.prefix&&r.prefix!==e.PREFIX&&n.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})));var i=this.getQuickAccessProviders(),a=i.editorProviders,o=i.globalProviders;return t.items=0===a.length||0===o.length?Object(ct.a)(0===a.length?o:a):[{label:Object(Q.a)("globalCommands","global commands"),type:"separator"}].concat(Object(ct.a)(o),[{label:Object(Q.a)("editorCommands","editor commands"),type:"separator"}],Object(ct.a)(a)),r}},{key:"getQuickAccessProviders",value:function(){var t,n=[],r=[],i=Object(Ee.a)(this.registry.getQuickAccessProviders().sort((function(e,t){return e.prefix.localeCompare(t.prefix)})));try{for(i.s();!(t=i.n()).done;){var a=t.value;if(a.prefix!==e.PREFIX){var o,s=Object(Ee.a)(a.helpEntries);try{for(s.s();!(o=s.n()).done;){var u=o.value,c=u.prefix||a.prefix,l=c||"\u2026";(u.needsEditor?r:n).push({prefix:c,label:l,ariaLabel:Object(Q.a)("helpPickAriaLabel","{0}, {1}",l,u.description),description:u.description})}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){i.e(d)}finally{i.f()}return{editorProviders:r,globalProviders:n}}}]),e}();Nv.PREFIX="?",Nv=Av([Ov(0,rr.a)],Nv),Lf.a.as(wv.b.Quickaccess).registerQuickAccessProvider({ctor:Nv,prefix:"",helpEntries:[{description:lv.e.helpQuickAccessActionLabel,needsEditor:!0}]});var Iv=function(){function e(t){Object(Y.a)(this,e),this.options=t,this.rangeHighlightDecorationId=void 0}return Object(J.a)(e,[{key:"provide",value:function(e,t){var n,r=this,i=new xe.b;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;var a=i.add(new xe.d);return a.value=this.doProvide(e,t),i.add(this.onDidActiveTextEditorControlChange((function(){a.value=void 0,a.value=r.doProvide(e,t)}))),i}},{key:"doProvide",value:function(e,t){var n=this,r=new xe.b,i=this.activeTextEditorControl;if(i&&this.canProvideWithTextEditor(i)){var a={editor:i},o=Object(Xa.a)(i);if(o){var s=Object(Bn.n)(i.saveViewState());r.add(o.onDidChangeCursorPosition((function(){s=Object(Bn.n)(i.saveViewState())}))),a.restoreViewState=function(){s&&i===n.activeTextEditorControl&&i.restoreViewState(s)},r.add(Object($n.a)(t.onCancellationRequested)((function(){var e;return null===(e=a.restoreViewState)||void 0===e?void 0:e.call(a)})))}r.add(Object(xe.h)((function(){return n.clearDecorations(i)}))),r.add(this.provideWithTextEditor(a,e,t))}else r.add(this.provideWithoutTextEditor(e,t));return r}},{key:"canProvideWithTextEditor",value:function(e){return!0}},{key:"gotoLocation",value:function(e,t){var n=e.editor;n.setSelection(t.range),n.revealRangeInCenter(t.range,0),t.preserveFocus||n.focus()}},{key:"getModel",value:function(e){var t;return Object(Xa.c)(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}},{key:"addDecorations",value:function(e,t){var n=this;e.changeDecorations((function(e){var r=[];n.rangeHighlightDecorationId&&(r.push(n.rangeHighlightDecorationId.overviewRulerDecorationId),r.push(n.rangeHighlightDecorationId.rangeHighlightId),n.rangeHighlightDecorationId=void 0);var i=[{range:t,options:{className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{overviewRuler:{color:Object(Ie.g)(Oe.s),position:we.d.Full}}}],a=e.deltaDecorations(r,i),o=Object(Ce.a)(a,2),s=o[0],u=o[1];n.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:u}}))}},{key:"clearDecorations",value:function(e){var t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((function(e){e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}]),e}(),Fv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{canAcceptInBackground:!0})}return Object(J.a)(n,[{key:"provideWithoutTextEditor",value:function(e){var t=Object(Q.a)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,xe.a.None}},{key:"provideWithTextEditor",value:function(e,t,r){var i=this,a=e.editor,o=new xe.b;o.add(t.onDidAccept((function(n){var r=Object(Ce.a)(t.selectedItems,1)[0];if(r){if(!i.isValidLineNumber(a,r.lineNumber))return;i.gotoLocation(e,{range:i.toRange(r.lineNumber,r.column),keyMods:t.keyMods,preserveFocus:n.inBackground}),n.inBackground||t.hide()}})));var s=function(){var e=i.parsePosition(a,t.value.trim().substr(n.PREFIX.length)),r=i.getPickLabel(a,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:r}],t.ariaLabel=r,i.isValidLineNumber(a,e.lineNumber)){var o=i.toRange(e.lineNumber,e.column);a.revealRangeInCenter(o,0),i.addDecorations(a,o)}else i.clearDecorations(a)};s(),o.add(t.onDidChangeValue((function(){return s()})));var u=Object(Xa.a)(a);u&&(2===u.getOptions().get(54).renderType&&(u.updateOptions({lineNumbers:"on"}),o.add(Object(xe.h)((function(){return u.updateOptions({lineNumbers:"relative"})})))));return o}},{key:"toRange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}},{key:"parsePosition",value:function(e,t){var n=t.split(/,|:|#/).map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)})),r=this.lineCount(e)+1;return{lineNumber:n[0]>0?n[0]:r+n[0],column:n[1]}}},{key:"getPickLabel",value:function(e,t,n){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,n)?Object(Q.a)("gotoLineColumnLabel","Go to line {0} and column {1}.",t,n):Object(Q.a)("gotoLineLabel","Go to line {0}.",t);var r=e.getPosition()||{lineNumber:1,column:1},i=this.lineCount(e);return i>1?Object(Q.a)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",r.lineNumber,r.column,i):Object(Q.a)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",r.lineNumber,r.column)}},{key:"isValidLineNumber",value:function(e,t){return!(!t||"number"!==typeof t)&&(t>0&&t<=this.lineCount(e))}},{key:"isValidColumn",value:function(e,t,n){if(!n||"number"!==typeof n)return!1;var r=this.getModel(e);if(!r)return!1;var i={lineNumber:t,column:n};return r.validatePosition(i).equals(i)}},{key:"lineCount",value:function(e){var t,n;return null!==(n=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==n?n:0}}]),n}(Iv);Fv.PREFIX=":";var Lv=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Pv=function(e,t){return function(n,r){t(n,r,e)}},Rv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).editorService=e,r.onDidActiveTextEditorControlChange=rn.b.None,r}return Object(J.a)(n,[{key:"activeTextEditorControl",get:function(){return Object(Bn.n)(this.editorService.getFocusedCodeEditor())}}]),n}(Fv);Rv=Lv([Pv(0,Je.a)],Rv),Lf.a.as(wv.b.Quickaccess).registerQuickAccessProvider({ctor:Rv,prefix:Rv.PREFIX,helpEntries:[{description:lv.b.gotoLineActionLabel,needsEditor:!0}]});var Mv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.gotoLine",label:lv.b.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:2085,mac:{primary:293},weight:100}})}return Object(J.a)(n,[{key:"run",value:function(e){e.get(rr.a).quickAccess.show(Rv.PREFIX)}}]),n}($.b);Object($.j)(Mv);var Bv=[void 0,[]];function jv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=t;return i.values&&i.values.length>1?Uv(e,i.values,n,r):Vv(e,t,n,r)}function Uv(e,t,n,r){var i,a=0,o=[],s=Object(Ee.a)(t);try{for(s.s();!(i=s.n()).done;){var u=Vv(e,i.value,n,r),c=Object(Ce.a)(u,2),l=c[0],d=c[1];if("number"!==typeof l)return Bv;a+=l,o.push.apply(o,Object(ct.a)(d))}}catch(p){s.e(p)}finally{s.f()}return[a,zv(o)]}function Vv(e,t,n,r){var i=Object(so.d)(t.original,t.originalLowercase,n,e,e.toLowerCase(),r,!0);return i?[i[0],Object(so.c)(i)]:Bv}function zv(e){var t,n=e.sort((function(e,t){return e.start-t.start})),r=[],i=void 0,a=Object(Ee.a)(n);try{for(a.s();!(t=a.n()).done;){var o=t.value;i&&Hv(i,o)?(i.start=Math.min(i.start,o.start),i.end=Math.max(i.end,o.end)):(i=o,r.push(o))}}catch(s){a.e(s)}finally{a.f()}return r}function Hv(e,t){return!(e.end=0,s=void 0,u=e.split(" ");if(u.length>1){var c,l=Object(Ee.a)(u);try{for(l.s();!(c=l.n()).done;){var d=c.value,p=qv(d),f=p.pathNormalized,h=p.normalized,g=p.normalizedLowercase;h&&(s||(s=[]),s.push({original:d,originalLowercase:d.toLowerCase(),pathNormalized:f,normalized:h,normalizedLowercase:g}))}}catch(m){l.e(m)}finally{l.f()}}return{original:e,originalLowercase:t,pathNormalized:r,normalized:i,normalizedLowercase:a,values:s,containsPathSeparator:o}}function qv(e){var t;t=Ge.j?e.replace(/\//g,Ah.h):e.replace(/\\/g,Ah.h);var n=Object(ft.T)(t).replace(/\s/g,"");return{pathNormalized:t,normalized:n,normalizedLowercase:n.toLowerCase()}}function Gv(e){return Array.isArray(e)?Kv(e.map((function(e){return e.original})).join(" ")):Kv(e.original)}var Yv=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Jv=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.create(null);return Object(Y.a)(this,n),(e=t.call(this,r)).options=r,r.canAcceptInBackground=!0,e}return Object(J.a)(n,[{key:"provideWithoutTextEditor",value:function(e){return this.provideLabelPick(e,Object(Q.a)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),xe.a.None}},{key:"provideWithTextEditor",value:function(e,t,n){var r=e.editor,i=this.getModel(r);return i?_t.m.has(i)?this.doProvideWithEditorSymbols(e,i,t,n):this.doProvideWithoutEditorSymbols(e,i,t,n):xe.a.None}},{key:"doProvideWithoutEditorSymbols",value:function(e,t,n,r){var i=this,a=new xe.b;return this.provideLabelPick(n,Object(Q.a)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),Yv(i,void 0,void 0,K.a.mark((function i(){return K.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.waitForLanguageSymbolRegistry(t,a);case 2:if(i.sent&&!r.isCancellationRequested){i.next=5;break}return i.abrupt("return");case 5:a.add(this.doProvideWithEditorSymbols(e,t,n,r));case 6:case"end":return i.stop()}}),i,this)}))),a}},{key:"provideLabelPick",value:function(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}},{key:"waitForLanguageSymbolRegistry",value:function(e,t){return Yv(this,void 0,void 0,K.a.mark((function n(){var r,i,a;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!_t.m.has(e)){n.next=2;break}return n.abrupt("return",!0);case 2:return i=new Promise((function(e){return r=e})),a=t.add(_t.m.onDidChange((function(){_t.m.has(e)&&(a.dispose(),r(!0))}))),t.add(Object(xe.h)((function(){return r(!1)}))),n.abrupt("return",i);case 6:case"end":return n.stop()}}),n)})))}},{key:"doProvideWithEditorSymbols",value:function(e,t,r,i){var a=this,o=e.editor,s=new xe.b;s.add(r.onDidAccept((function(t){var n=Object(Ce.a)(r.selectedItems,1)[0];n&&n.range&&(a.gotoLocation(e,{range:n.range.selection,keyMods:r.keyMods,preserveFocus:t.inBackground}),t.inBackground||r.hide())}))),s.add(r.onDidTriggerItemButton((function(t){var n=t.item;n&&n.range&&(a.gotoLocation(e,{range:n.range.selection,keyMods:r.keyMods,forceSideBySide:!0}),r.hide())})));var u=this.getDocumentSymbols(t,i),c=void 0,l=function(){return Yv(a,void 0,void 0,K.a.mark((function e(){var t,a;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null===c||void 0===c||c.dispose(!0),r.busy=!1,c=new dt.b(i),r.busy=!0,e.prev=4,t=Kv(r.value.substr(n.PREFIX.length).trim()),e.next=8,this.doGetSymbolPicks(u,t,void 0,c.token);case 8:if(a=e.sent,!i.isCancellationRequested){e.next=11;break}return e.abrupt("return");case 11:a.length>0?r.items=a:t.original.length>0?this.provideLabelPick(r,Object(Q.a)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(r,Object(Q.a)("noSymbolResults","No editor symbols"));case 12:return e.prev=12,i.isCancellationRequested||(r.busy=!1),e.finish(12);case 15:case"end":return e.stop()}}),e,this,[[4,,12,15]])})))};s.add(r.onDidChangeValue((function(){return l()}))),l();var d=!0;return s.add(r.onDidChangeActive((function(){var e=Object(Ce.a)(r.activeItems,1)[0];if(e&&e.range){if(d)return void(d=!1);o.revealRangeInCenter(e.range.selection,0),a.addDecorations(o,e.range.decoration)}}))),s}},{key:"doGetSymbolPicks",value:function(e,t,r,i){return Yv(this,void 0,void 0,K.a.mark((function a(){var o,s,u,c,l,d,p,f,h,g,m,_,v,y,b,D,E,C,S,x,k,T,w,A,O,N,I,F,L,P,R,M,B,j=this;return K.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,e;case 2:if(o=a.sent,!i.isCancellationRequested){a.next=5;break}return a.abrupt("return",[]);case 5:s=0===t.original.indexOf(n.SCOPE_PREFIX),u=s?1:0,t.values&&t.values.length>1?(c=Gv(t.values[0]),l=Gv(t.values.slice(1))):c=t,d=[],p=0;case 10:if(!(pu)){a.next=36;break}if(E=!1,c!==t&&(C=jv(g,Object.assign(Object.assign({},t),{values:void 0}),u,m),S=Object(Ce.a)(C,2),v=S[0],y=S[1],"number"===typeof v&&(E=!0)),"number"===typeof v){a.next=31;break}if(x=jv(g,c,u,m),k=Object(Ce.a)(x,2),v=k[0],y=k[1],"number"===typeof v){a.next=31;break}return a.abrupt("continue",38);case 31:if(E||!l){a.next=36;break}if(_&&l.original.length>0&&(T=jv(_,l),w=Object(Ce.a)(T,2),b=w[0],D=w[1]),"number"===typeof b){a.next=35;break}return a.abrupt("continue",38);case 35:"number"===typeof v&&(v+=b);case 36:A=f.tags&&f.tags.indexOf(1)>=0,d.push({index:p,kind:f.kind,score:v,label:g,ariaLabel:h,description:_,highlights:A?void 0:{label:y,description:D},range:{selection:Te.a.collapseToStart(f.selectionRange),decoration:f.range},strikethrough:A,buttons:function(){var e,t,n=(null===(e=j.options)||void 0===e?void 0:e.openSideBySideDirection)?null===(t=j.options)||void 0===t?void 0:t.openSideBySideDirection():void 0;if(n)return[{iconClass:"right"===n?on.b.splitHorizontal.classNames:on.b.splitVertical.classNames,tooltip:"right"===n?Object(Q.a)("openToSide","Open to the Side"):Object(Q.a)("openToBottom","Open to the Bottom")}]}()});case 38:p++,a.next=10;break;case 41:if(O=d.sort((function(e,t){return s?j.compareByKindAndScore(e,t):j.compareByScore(e,t)})),N=[],s){I=function(){L&&"number"===typeof F&&P>0&&(L.label=Object(ft.w)(Qv[F]||$v,P))},F=void 0,L=void 0,P=0,R=Object(Ee.a)(O);try{for(R.s();!(M=R.n()).done;)B=M.value,F!==B.kind?(I(),F=B.kind,P=1,L={type:"separator"},N.push(L)):P++,N.push(B)}catch(U){R.e(U)}finally{R.f()}I()}else O.length>0&&(N=[{label:Object(Q.a)("symbols","symbols ({0})",d.length),type:"separator"}].concat(Object(ct.a)(O)));return a.abrupt("return",N);case 45:case"end":return a.stop()}}),a)})))}},{key:"compareByScore",value:function(e,t){if("number"!==typeof e.score&&"number"===typeof t.score)return 1;if("number"===typeof e.score&&"number"!==typeof t.score)return-1;if("number"===typeof e.score&&"number"===typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}},{key:"compareByKindAndScore",value:function(e,t){var n=Qv[e.kind]||$v,r=Qv[t.kind]||$v,i=n.localeCompare(r);return 0===i?this.compareByScore(e,t):i}},{key:"getDocumentSymbols",value:function(e,t){return Yv(this,void 0,void 0,K.a.mark((function n(){var r;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fd.create(e,t);case 2:return r=n.sent,n.abrupt("return",t.isCancellationRequested?[]:r.asListOfDocumentSymbols());case 4:case"end":return n.stop()}}),n)})))}}]),n}(Iv);Jv.PREFIX="@",Jv.SCOPE_PREFIX=":",Jv.PREFIX_BY_CATEGORY="".concat(Jv.PREFIX).concat(Jv.SCOPE_PREFIX);var $v=Object(Q.a)("property","properties ({0})"),Qv=(Wv={},Object(nh.a)(Wv,5,Object(Q.a)("method","methods ({0})")),Object(nh.a)(Wv,11,Object(Q.a)("function","functions ({0})")),Object(nh.a)(Wv,8,Object(Q.a)("_constructor","constructors ({0})")),Object(nh.a)(Wv,12,Object(Q.a)("variable","variables ({0})")),Object(nh.a)(Wv,4,Object(Q.a)("class","classes ({0})")),Object(nh.a)(Wv,22,Object(Q.a)("struct","structs ({0})")),Object(nh.a)(Wv,23,Object(Q.a)("event","events ({0})")),Object(nh.a)(Wv,24,Object(Q.a)("operator","operators ({0})")),Object(nh.a)(Wv,10,Object(Q.a)("interface","interfaces ({0})")),Object(nh.a)(Wv,2,Object(Q.a)("namespace","namespaces ({0})")),Object(nh.a)(Wv,3,Object(Q.a)("package","packages ({0})")),Object(nh.a)(Wv,25,Object(Q.a)("typeParameter","type parameters ({0})")),Object(nh.a)(Wv,1,Object(Q.a)("modules","modules ({0})")),Object(nh.a)(Wv,6,Object(Q.a)("property","properties ({0})")),Object(nh.a)(Wv,9,Object(Q.a)("enum","enumerations ({0})")),Object(nh.a)(Wv,21,Object(Q.a)("enumMember","enumeration members ({0})")),Object(nh.a)(Wv,14,Object(Q.a)("string","strings ({0})")),Object(nh.a)(Wv,0,Object(Q.a)("file","files ({0})")),Object(nh.a)(Wv,17,Object(Q.a)("array","arrays ({0})")),Object(nh.a)(Wv,15,Object(Q.a)("number","numbers ({0})")),Object(nh.a)(Wv,16,Object(Q.a)("boolean","booleans ({0})")),Object(nh.a)(Wv,18,Object(Q.a)("object","objects ({0})")),Object(nh.a)(Wv,19,Object(Q.a)("key","keys ({0})")),Object(nh.a)(Wv,7,Object(Q.a)("field","fields ({0})")),Object(nh.a)(Wv,13,Object(Q.a)("constant","constants ({0})")),Wv),Xv=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Zv=function(e,t){return function(n,r){t(n,r,e)}},ey=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e){var r;return Object(Y.a)(this,n),(r=t.call(this)).editorService=e,r.onDidActiveTextEditorControlChange=rn.b.None,r}return Object(J.a)(n,[{key:"activeTextEditorControl",get:function(){return Object(Bn.n)(this.editorService.getFocusedCodeEditor())}}]),n}(Jv);ey=Xv([Zv(0,Je.a)],ey),Lf.a.as(wv.b.Quickaccess).registerQuickAccessProvider({ctor:ey,prefix:Jv.PREFIX,helpEntries:[{description:lv.f.quickOutlineActionLabel,prefix:Jv.PREFIX,needsEditor:!0},{description:lv.f.quickOutlineByCategoryActionLabel,prefix:Jv.PREFIX_BY_CATEGORY,needsEditor:!0}]});var ty=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.quickOutline",label:lv.f.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:X.a.hasDocumentSymbolProvider,kbOpts:{kbExpr:X.a.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}return Object(J.a)(n,[{key:"run",value:function(e){e.get(rr.a).quickAccess.show(Jv.PREFIX)}}]),n}($.b);Object($.j)(ty);var ny,ry=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))};function iy(e){var t=e;return Array.isArray(t.items)}function ay(e){var t=e;return!!t.picks&&t.additionalPicks instanceof Promise}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(ny||(ny={}));var oy=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r){var i;return Object(Y.a)(this,n),(i=t.call(this)).prefix=e,i.options=r,i}return Object(J.a)(n,[{key:"provide",value:function(e,t){var r,i=this,a=new xe.b;e.canAcceptInBackground=!!(null===(r=this.options)||void 0===r?void 0:r.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;var o=void 0,s=a.add(new xe.d),u=function(){return ry(i,void 0,void 0,K.a.mark((function r(){var i,a,u,c,l,d,p,f,h=this;return K.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=s.value=new xe.b,null===o||void 0===o||o.dispose(!0),e.busy=!1,o=new dt.b(t),a=o.token,u=e.value.substr(this.prefix.length).trim(),c=this.getPicks(u,i,a),l=function(t,n){var r,i,a=void 0;if(iy(t)?(i=t.items,a=t.active):i=t,0===i.length){if(n)return!1;u.length>0&&(null===(r=h.options)||void 0===r?void 0:r.noResultsPick)&&(i=[h.options.noResultsPick])}return e.items=i,a&&(e.activeItems=[a]),!0},null!==c){r.next=11;break}r.next=33;break;case 11:if(!ay(c)){r.next=18;break}return d=!1,p=!1,r.next=16,Promise.all([ry(h,void 0,void 0,K.a.mark((function e(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Se.l)(n.FAST_PICKS_RACE_DELAY);case 2:if(!a.isCancellationRequested){e.next=4;break}return e.abrupt("return");case 4:p||(d=l(c.picks,!0));case 5:case"end":return e.stop()}}),e)}))),ry(h,void 0,void 0,K.a.mark((function t(){var n,r,i,o,s,u,f;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.busy=!0,t.prev=1,t.next=4,c.additionalPicks;case 4:if(n=t.sent,!a.isCancellationRequested){t.next=7;break}return t.abrupt("return");case 7:i=void 0,iy(c.picks)?(r=c.picks.items,i=c.picks.active):r=c.picks,s=void 0,iy(n)?(o=n.items,s=n.active):o=n,(o.length>0||!d)&&(u=void 0,i||s||(f=e.activeItems[0])&&-1!==r.indexOf(f)&&(u=f),l({items:[].concat(Object(ct.a)(r),Object(ct.a)(o)),active:i||s||u}));case 12:return t.prev=12,a.isCancellationRequested||(e.busy=!1),p=!0,t.finish(12);case 16:case"end":return t.stop()}}),t,null,[[1,,12,16]])})))]);case 16:r.next=33;break;case 18:if(c instanceof Promise){r.next=22;break}l(c),r.next=33;break;case 22:return e.busy=!0,r.prev=23,r.next=26,c;case 26:if(f=r.sent,!a.isCancellationRequested){r.next=29;break}return r.abrupt("return");case 29:l(f);case 30:return r.prev=30,a.isCancellationRequested||(e.busy=!1),r.finish(30);case 33:case"end":return r.stop()}}),r,this,[[23,,30,33]])})))};return a.add(e.onDidChangeValue((function(){return u()}))),u(),a.add(e.onDidAccept((function(t){var n=Object(Ce.a)(e.selectedItems,1)[0];"function"===typeof(null===n||void 0===n?void 0:n.accept)&&(t.inBackground||e.hide(),n.accept(e.keyMods,t))}))),a.add(e.onDidTriggerItemButton((function(n){var r=n.button,a=n.item;return ry(i,void 0,void 0,K.a.mark((function n(){var i,o,s,c,l,d,p;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("function"!==typeof a.trigger){n.next=25;break}if(!((s=null!==(o=null===(i=a.buttons)||void 0===i?void 0:i.indexOf(r))&&void 0!==o?o:-1)>=0)){n.next=25;break}if("number"!==typeof(c=a.trigger(s,e.keyMods))){n.next=8;break}n.t0=c,n.next=11;break;case 8:return n.next=10,c;case 10:n.t0=n.sent;case 11:if(l=n.t0,!t.isCancellationRequested){n.next=14;break}return n.abrupt("return");case 14:n.t1=l,n.next=n.t1===ny.NO_ACTION?17:n.t1===ny.CLOSE_PICKER?18:n.t1===ny.REFRESH_PICKER?20:n.t1===ny.REMOVE_ITEM?22:25;break;case 17:return n.abrupt("break",25);case 18:return e.hide(),n.abrupt("break",25);case 20:return u(),n.abrupt("break",25);case 22:return-1!==(d=e.items.indexOf(a))&&((p=e.items.slice()).splice(d,1),e.items=p),n.abrupt("break",25);case 25:case"end":return n.stop()}}),n)})))}))),a}}]),n}(xe.a);function sy(e,t){return t&&(e.stack||e.stacktrace)?Q.a("stackTrace.format","{0}: {1}",cy(e),uy(e.stack)||uy(e.stacktrace)):cy(e)}function uy(e){return Array.isArray(e)?e.join("\n"):e}function cy(e){return"string"===typeof e.code&&"number"===typeof e.errno&&"string"===typeof e.syscall?Q.a("nodeExceptionMessage","A system error occurred ({0})",e.message):e.message||Q.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function ly(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return Q.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){var n=ne.d(e),r=ly(n[0],t);return n.length>1?Q.a("error.moreErrors","{0} ({1} errors in total)",r,n.length):r}if(Bn.j(e))return e;if(e.detail){var i=e.detail;if(i.error)return sy(i.error,t);if(i.exception)return sy(i.exception,t)}return e.stack?sy(e,t):e.message?e.message:Q.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}oy.FAST_PICKS_RACE_DELAY=200;var dy=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},py=function(e,t){return function(n,r){t(n,r,e)}},fy=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},hy=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a,o,s){var u;return Object(Y.a)(this,n),(u=t.call(this,n.PREFIX,e)).options=e,u.instantiationService=r,u.keybindingService=i,u.commandService=a,u.telemetryService=o,u.notificationService=s,u.commandsHistory=u._register(u.instantiationService.createInstance(gy)),u}return Object(J.a)(n,[{key:"getPicks",value:function(e,t,r){return fy(this,void 0,void 0,K.a.mark((function i(){var a,o,s,u,c,l,d,p,f,h,g,m,_,v,y,b,D=this;return K.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.getCommandPicks(t,r);case 2:if(a=i.sent,!r.isCancellationRequested){i.next=5;break}return i.abrupt("return",[]);case 5:o=[],s=Object(Ee.a)(a);try{for(s.s();!(u=s.n()).done;)c=u.value,l=Object(Bn.n)(n.WORD_FILTER(e,c.label)),d=c.commandAlias?Object(Bn.n)(n.WORD_FILTER(e,c.commandAlias)):void 0,l||d?(c.highlights={label:l,detail:this.options.showAlias?d:void 0},o.push(c)):e===c.commandId&&o.push(c)}catch(E){s.e(E)}finally{s.f()}for(p=new Map,f=0,h=o;fr?-1:1:n?-1:r?1:e.label.localeCompare(t.label)})),_=[],v=!1,y=function(e){var t=o[e],n=D.keybindingService.lookupKeybinding(t.commandId),r=n?Object(Q.a)("commandPickAriaLabelWithKeybinding","{0}, {1}",t.label,n.getAriaLabel()):t.label;0===e&&D.commandsHistory.peek(t.commandId)&&(_.push({type:"separator",label:Object(Q.a)("recentlyUsed","recently used")}),v=!0),0!==e&&v&&!D.commandsHistory.peek(t.commandId)&&(_.push({type:"separator",label:Object(Q.a)("morecCommands","other commands")}),v=!1),_.push(Object.assign(Object.assign({},t),{ariaLabel:r,detail:D.options.showAlias&&t.commandAlias!==t.label?t.commandAlias:void 0,keybinding:n,accept:function(){return fy(D,void 0,void 0,K.a.mark((function e(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.commandsHistory.push(t.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:t.commandId,from:"quick open"}),e.prev=2,e.next=5,this.commandService.executeCommand(t.commandId);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),Object(ie.d)(e.t0)||this.notificationService.error(Object(Q.a)("canNotRun","Command '{0}' resulted in an error ({1})",t.label,ly(e.t0)));case 10:case"end":return e.stop()}}),e,this,[[2,7]])})))}}))},b=0;b=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},_y=function(e,t){return function(n,r){t(n,r,e)}},vy=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},yy=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a,o,s){var u;return Object(Y.a)(this,n),(u=t.call(this,{showAlias:!1},e,i,a,o,s)).codeEditorService=r,u}return Object(J.a)(n,[{key:"getCommandPicks",value:function(){return vy(this,void 0,void 0,K.a.mark((function e(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getCodeEditorCommandPicks());case 1:case"end":return e.stop()}}),e,this)})))}},{key:"activeTextEditorControl",get:function(){return Object(Bn.n)(this.codeEditorService.getFocusedCodeEditor())}}]),n}(function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a,o,s){return Object(Y.a)(this,n),t.call(this,e,r,i,a,o,s)}return Object(J.a)(n,[{key:"getCodeEditorCommandPicks",value:function(){var e=this.activeTextEditorControl;if(!e)return[];var t,n=[],r=Object(Ee.a)(e.getSupportedActions());try{for(r.s();!(t=r.n()).done;){var i=t.value;n.push({commandId:i.id,commandAlias:i.alias,label:Object(re.e)(i.label)||i.id})}}catch(a){r.e(a)}finally{r.f()}return n}}]),n}(hy));yy=my([_y(0,zt.a),_y(1,Je.a),_y(2,qt.a),_y(3,St.b),_y(4,_n.a),_y(5,mn.a)],yy),Lf.a.as(wv.b.Quickaccess).registerQuickAccessProvider({ctor:yy,prefix:yy.PREFIX,helpEntries:[{description:lv.d.quickCommandHelp,needsEditor:!0}]});var by=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){return Object(Y.a)(this,n),t.call(this,{id:"editor.action.quickCommand",label:lv.d.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:X.a.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}return Object(J.a)(n,[{key:"run",value:function(e){e.get(rr.a).quickAccess.show(yy.PREFIX)}}]),n}($.b);Object($.j)(by);var Dy=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},Ey=function(e,t){return function(n,r){t(n,r,e)}},Cy=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(e,r,i,a,o,s,u){return Object(Y.a)(this,n),t.call(this,!0,e,r,i,a,o,s,u)}return n}(Wo);Cy=Dy([Ey(1,te.b),Ey(2,Je.a),Ey(3,mn.a),Ey(4,zt.a),Ey(5,Jn.a),Ey(6,dr.a)],Cy),Object($.l)(Wo.ID,Cy);var Sy=function(e){Object(q.a)(n,e);var t=Object(G.a)(n);function n(){var e;return Object(Y.a)(this,n),(e=t.call(this,{id:"editor.action.toggleHighContrast",label:lv.i.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}))._originalThemeName=null,e}return Object(J.a)(n,[{key:"run",value:function(e,t){var n=e.get(Ev.a);this._originalThemeName?(n.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=n.getColorTheme().themeName,n.setTheme("hc-black"))}}]),n}($.b);Object($.j)(Sy)},function(e,t,n){var r=n(418);function i(t,n,a){return"undefined"!==typeof Reflect&&Reflect.get?e.exports=i=Reflect.get:e.exports=i=function(e,t,n){var i=r(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(n):a.value}},i(t,n,a||t)}e.exports=i},function(e,t,n){"use strict";var r=n(266),i=n(313),a=n(315);e.exports=function(e){var t,n,o=e.space,s=e.mustUseProperty||[],u=e.attributes||{},c=e.properties,l=e.transform,d={},p={};for(t in c)n=new a(t,l(u,t),c[t],o),-1!==s.indexOf(t)&&(n.mustUseProperty=!0),d[t]=n,p[r(t)]=t,p[r(n.attribute)]=t;return new i(d,p,o)}},function(e,t,n){"use strict";var r,i,a,o,s=n(164),u=t.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};t.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},t.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};var c=t.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};t.SPECIAL_ELEMENTS=(s(o={},u.HTML,(s(r={},c.ADDRESS,!0),s(r,c.APPLET,!0),s(r,c.AREA,!0),s(r,c.ARTICLE,!0),s(r,c.ASIDE,!0),s(r,c.BASE,!0),s(r,c.BASEFONT,!0),s(r,c.BGSOUND,!0),s(r,c.BLOCKQUOTE,!0),s(r,c.BODY,!0),s(r,c.BR,!0),s(r,c.BUTTON,!0),s(r,c.CAPTION,!0),s(r,c.CENTER,!0),s(r,c.COL,!0),s(r,c.COLGROUP,!0),s(r,c.DD,!0),s(r,c.DETAILS,!0),s(r,c.DIR,!0),s(r,c.DIV,!0),s(r,c.DL,!0),s(r,c.DT,!0),s(r,c.EMBED,!0),s(r,c.FIELDSET,!0),s(r,c.FIGCAPTION,!0),s(r,c.FIGURE,!0),s(r,c.FOOTER,!0),s(r,c.FORM,!0),s(r,c.FRAME,!0),s(r,c.FRAMESET,!0),s(r,c.H1,!0),s(r,c.H2,!0),s(r,c.H3,!0),s(r,c.H4,!0),s(r,c.H5,!0),s(r,c.H6,!0),s(r,c.HEAD,!0),s(r,c.HEADER,!0),s(r,c.HGROUP,!0),s(r,c.HR,!0),s(r,c.HTML,!0),s(r,c.IFRAME,!0),s(r,c.IMG,!0),s(r,c.INPUT,!0),s(r,c.LI,!0),s(r,c.LINK,!0),s(r,c.LISTING,!0),s(r,c.MAIN,!0),s(r,c.MARQUEE,!0),s(r,c.MENU,!0),s(r,c.META,!0),s(r,c.NAV,!0),s(r,c.NOEMBED,!0),s(r,c.NOFRAMES,!0),s(r,c.NOSCRIPT,!0),s(r,c.OBJECT,!0),s(r,c.OL,!0),s(r,c.P,!0),s(r,c.PARAM,!0),s(r,c.PLAINTEXT,!0),s(r,c.PRE,!0),s(r,c.SCRIPT,!0),s(r,c.SECTION,!0),s(r,c.SELECT,!0),s(r,c.SOURCE,!0),s(r,c.STYLE,!0),s(r,c.SUMMARY,!0),s(r,c.TABLE,!0),s(r,c.TBODY,!0),s(r,c.TD,!0),s(r,c.TEMPLATE,!0),s(r,c.TEXTAREA,!0),s(r,c.TFOOT,!0),s(r,c.TH,!0),s(r,c.THEAD,!0),s(r,c.TITLE,!0),s(r,c.TR,!0),s(r,c.TRACK,!0),s(r,c.UL,!0),s(r,c.WBR,!0),s(r,c.XMP,!0),r)),s(o,u.MATHML,(s(i={},c.MI,!0),s(i,c.MO,!0),s(i,c.MN,!0),s(i,c.MS,!0),s(i,c.MTEXT,!0),s(i,c.ANNOTATION_XML,!0),i)),s(o,u.SVG,(s(a={},c.TITLE,!0),s(a,c.FOREIGN_OBJECT,!0),s(a,c.DESC,!0),a)),o)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));n(382),n(383);var r=n(31);function i(e){for(var t=e.definition;t instanceof r.b;)t=t.definition;return".codicon-".concat(e.id,":before { content: '").concat(t.character,"'; }")}},function(e,t,n){"use strict";var r=n(110);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.c})),n.d(t,"d",(function(){return r.d})),n.d(t,"e",(function(){return r.e})),n.d(t,"f",(function(){return r.f})),n.d(t,"g",(function(){return r.g}))},function(e,t,n){"use strict";var r=n(110);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.d})),n.d(t,"d",(function(){return r.e})),n.d(t,"e",(function(){return r.f})),n.d(t,"f",(function(){return r.g}))},function(e,t,n){"use strict";var r=n(110);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.d})),n.d(t,"d",(function(){return r.e})),n.d(t,"e",(function(){return r.f})),n.d(t,"f",(function(){return r.g}))},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),i=n(1),a=n(51),o=n(11),s={JSONContribution:"base.contributions.json"};var u=new(function(){function e(){Object(r.a)(this,e),this._onDidChangeSchema=new o.a,this.schemasById={}}return Object(i.a)(e,[{key:"registerSchema",value:function(e,t){var n;this.schemasById[(n=e,n.length>0&&"#"===n.charAt(n.length-1)?n.substring(0,n.length-1):n)]=t,this._onDidChangeSchema.fire(e)}},{key:"notifySchemaChanged",value:function(e){this._onDidChangeSchema.fire(e)}}]),e}());a.a.add(s.JSONContribution,u)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));n(6);var r=n(0),i=n(1),a=n(28),o=(n(70),Object(a.c)("contextService")),s=function(){function e(t,n){Object(r.a)(this,e),this.raw=n,this.uri=t.uri,this.index=t.index,this.name=t.name}return Object(i.a)(e,[{key:"toJSON",value:function(){return{uri:this.uri,name:this.name,index:this.index}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(28),i=Object(r.c)("dialogService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(12),i=n.n(r),a=n(21),o=n(4),s=n(5),u=n(0),c=n(1),l=(n(386),n(3)),d=n(172),p=n(7),f=n(96),h=n(49),g=n(23),m=n(26),_=n(44),v=n(2),y=n(37),b=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},D=function(){function e(t){Object(u.a)(this,e),this._element=t}return Object(c.a)(e,[{key:"dispose",value:function(){this.disposed=!0}},{key:"element",get:function(){return this._element}},{key:"textContent",set:function(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}},{key:"className",set:function(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}},{key:"empty",set:function(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}}]),e}(),E=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,r){var i;Object(u.a)(this,n),(i=t.call(this)).hoverDelegate=void 0,i.customHovers=new Map,i.domNode=i._register(new D(l.append(e,l.$(".monaco-icon-label")))),i.labelContainer=l.append(i.domNode.element,l.$(".monaco-icon-label-container"));var a=l.append(i.labelContainer,l.$("span.monaco-icon-name-container"));return i.descriptionContainer=i._register(new D(l.append(i.labelContainer,l.$("span.monaco-icon-description-container")))),(null===r||void 0===r?void 0:r.supportHighlights)?i.nameNode=new S(a,!!r.supportIcons):i.nameNode=new C(a),(null===r||void 0===r?void 0:r.supportDescriptionHighlights)?i.descriptionNodeFactory=function(){return new d.a(l.append(i.descriptionContainer.element,l.$("span.label-description")),!!r.supportIcons)}:i.descriptionNodeFactory=function(){return i._register(new D(l.append(i.descriptionContainer.element,l.$("span.label-description"))))},(null===r||void 0===r?void 0:r.hoverDelegate)&&(i.hoverDelegate=r.hoverDelegate),i}return Object(c.a)(n,[{key:"setLabel",value:function(e,t,n){var r=["monaco-icon-label"];n&&(n.extraClasses&&r.push.apply(r,Object(a.a)(n.extraClasses)),n.italic&&r.push("italic"),n.strikethrough&&r.push("strikethrough")),this.domNode.className=r.join(" "),this.setupHover(this.labelContainer,null===n||void 0===n?void 0:n.title),this.nameNode.setLabel(e,n),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof d.a?(this.descriptionNode.set(t||"",n?n.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,null===n||void 0===n?void 0:n.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(null===n||void 0===n?void 0:n.descriptionTitle)||""),this.descriptionNode.empty=!t))}},{key:"setupHover",value:function(e,t){var n=this.customHovers.get(e);if(n&&(n.dispose(),this.customHovers.delete(e)),t)return this.hoverDelegate?this.setupCustomHover(this.hoverDelegate,e,t):this.setupNativeHover(e,t);e.removeAttribute("title")}},{key:"getTooltipForCustom",value:function(e){var t=this;if(Object(m.j)(e))return function(){return b(t,void 0,void 0,i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e);case 1:case"end":return t.stop()}}),t)})))};if(Object(m.g)(e.markdown))return e.markdown;var n=e.markdown;return function(){return b(t,void 0,void 0,i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n);case 1:case"end":return e.stop()}}),e)})))}}},{key:"setupCustomHover",value:function(e,t,r){t.setAttribute("title",""),t.removeAttribute("title");var a,o,s,u=this.getTooltipForCustom(r),c=g.f?1500:500,d=!1;var p=this._register(Object(_.a)(t,l.EventType.MOUSE_OVER,!0)(function(r){var p=this;if(!d){s=new y.b;var f=Object(_.a)(t,l.EventType.MOUSE_LEAVE,!0)(m.bind(t)),h=Object(_.a)(t,l.EventType.MOUSE_DOWN,!0)(m.bind(t));d=!0;var g=Object(_.a)(t,l.EventType.MOUSE_MOVE,!0)(function(e){o=e.x}.bind(t));setTimeout((function(){return b(p,void 0,void 0,i.a.mark((function t(){var r,c;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!d||!u){t.next=10;break}if(a){t.next=9;break}return r={targetElements:[this],dispose:function(){}},a={text:Object(v.a)("iconLabel.loading","Loading..."),target:r,anchorPosition:0},n.adjustXAndShowCustomHover(a,o,e,d),t.next=7,u(s.token);case 7:(c=t.sent)&&(a={text:c,target:r,anchorPosition:0});case 9:n.adjustXAndShowCustomHover(a,o,e,d);case 10:g.dispose();case 11:case"end":return t.stop()}}),t,this)})))}),c)}function m(e){d=!1,a=void 0,s.dispose(!0),f.dispose(),h.dispose()}}.bind(t)));this.customHovers.set(t,p)}},{key:"setupNativeHover",value:function(e,t){var n="";Object(m.j)(t)?n=t:(null===t||void 0===t?void 0:t.markdownNotSupportedFallback)&&(n=t.markdownNotSupportedFallback),e.title=n}}],[{key:"adjustXAndShowCustomHover",value:function(e,t,n,r){e&&r&&(void 0!==t&&(e.target.x=t+10),n.showHover(e))}}]),n}(p.a),C=function(){function e(t){Object(u.a)(this,e),this.container=t,this.label=void 0,this.singleLabel=void 0}return Object(c.a)(e,[{key:"setLabel",value:function(e,t){if(this.label!==e||!Object(h.d)(this.options,t))if(this.label=e,this.options=t,"string"===typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=l.append(this.container,l.$("a.label-name",{id:null===t||void 0===t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n-1;Object(r.a)(this,e),this.items=t,this.start=n,this.end=i,this.index=a}return Object(i.a)(e,[{key:"current",value:function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}},{key:"next",value:function(){return this.index=Math.min(this.index+1,this.end),this.current()}},{key:"previous",value:function(){return this.index=Math.max(this.index-1,this.start-1),this.current()}},{key:"first",value:function(){return this.index=this.start,this.current()}},{key:"last",value:function(){return this.index=this.end-1,this.current()}}]),e}(),D=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;Object(r.a)(this,e),this._initialize(t),this._limit=n,this._onChange()}return Object(i.a)(e,[{key:"add",value:function(e){this._history.delete(e),this._history.add(e),this._onChange()}},{key:"next",value:function(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}},{key:"previous",value:function(){return 0!==this._currentPosition()?this._navigator.previous():null}},{key:"current",value:function(){return this._navigator.current()}},{key:"first",value:function(){return this._navigator.first()}},{key:"last",value:function(){return this._navigator.last()}},{key:"has",value:function(e){return this._history.has(e)}},{key:"_onChange",value:function(){this._reduceToLimit();var e=this._elements;this._navigator=new b(e,0,e.length,e.length)}},{key:"_reduceToLimit",value:function(){var e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}},{key:"_currentPosition",value:function(){var e=this._navigator.current();return e?this._elements.indexOf(e):-1}},{key:"_initialize",value:function(e){this._history=new Set;var t,n=Object(y.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this._history.add(r)}}catch(i){n.e(i)}finally{n.f()}}},{key:"_elements",get:function(){var e=[];return this._history.forEach((function(t){return e.push(t)})),e}}]),e}(),E=n(98),C=n(44),S=d.$,x={inputBackground:_.a.fromHex("#3C3C3C"),inputForeground:_.a.fromHex("#CCCCCC"),inputValidationInfoBorder:_.a.fromHex("#55AAFF"),inputValidationInfoBackground:_.a.fromHex("#063B49"),inputValidationWarningBorder:_.a.fromHex("#B89500"),inputValidationWarningBackground:_.a.fromHex("#352A05"),inputValidationErrorBorder:_.a.fromHex("#BE1100"),inputValidationErrorBackground:_.a.fromHex("#5A1D1D")},k=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,i,o){var s;Object(r.a)(this,n),(s=t.call(this)).state="idle",s.maxHeight=Number.POSITIVE_INFINITY,s._onDidChange=s._register(new g.a),s.onDidChange=s._onDidChange.event,s._onDidHeightChange=s._register(new g.a),s.onDidHeightChange=s._onDidHeightChange.event,s.contextViewProvider=i,s.options=o||Object.create(null),Object(v.f)(s.options,x,!1),s.message=null,s.placeholder=s.options.placeholder||"",s.ariaLabel=s.options.ariaLabel||"",s.inputBackground=s.options.inputBackground,s.inputForeground=s.options.inputForeground,s.inputBorder=s.options.inputBorder,s.inputValidationInfoBorder=s.options.inputValidationInfoBorder,s.inputValidationInfoBackground=s.options.inputValidationInfoBackground,s.inputValidationInfoForeground=s.options.inputValidationInfoForeground,s.inputValidationWarningBorder=s.options.inputValidationWarningBorder,s.inputValidationWarningBackground=s.options.inputValidationWarningBackground,s.inputValidationWarningForeground=s.options.inputValidationWarningForeground,s.inputValidationErrorBorder=s.options.inputValidationErrorBorder,s.inputValidationErrorBackground=s.options.inputValidationErrorBackground,s.inputValidationErrorForeground=s.options.inputValidationErrorForeground,s.options.validationOptions&&(s.validation=s.options.validationOptions.validation),s.element=d.append(e,S(".monaco-inputbox.idle"));var u=s.options.flexibleHeight?"textarea":"input",c=d.append(s.element,S(".ibwrapper"));if(s.input=d.append(c,S(u+".input.empty")),s.input.setAttribute("autocorrect","off"),s.input.setAttribute("autocapitalize","off"),s.input.setAttribute("spellcheck","false"),s.onfocus(s.input,(function(){return s.element.classList.add("synthetic-focus")})),s.onblur(s.input,(function(){return s.element.classList.remove("synthetic-focus")})),s.options.flexibleHeight){s.maxHeight="number"===typeof s.options.flexibleMaxHeight?s.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,s.mirror=d.append(c,S("div.mirror")),s.mirror.innerText="\xa0",s.scrollableElement=new E.b(s.element,{vertical:1}),s.options.flexibleWidth&&(s.input.setAttribute("wrap","off"),s.mirror.style.whiteSpace="pre",s.mirror.style.wordWrap="initial"),d.append(e,s.scrollableElement.getDomNode()),s._register(s.scrollableElement),s._register(s.scrollableElement.onScroll((function(e){return s.input.scrollTop=e.scrollTop})));var l=g.b.filter(Object(C.a)(document,"selectionchange"),(function(){var e=document.getSelection();return(null===e||void 0===e?void 0:e.anchorNode)===c}));s._register(l(s.updateScrollDimensions,Object(a.a)(s))),s._register(s.onDidHeightChange(s.updateScrollDimensions,Object(a.a)(s)))}else s.input.type=s.options.type||"text",s.input.setAttribute("wrap","off");return s.ariaLabel&&s.input.setAttribute("aria-label",s.ariaLabel),s.placeholder&&s.setPlaceHolder(s.placeholder),s.oninput(s.input,(function(){return s.onValueChange()})),s.onblur(s.input,(function(){return s.onBlur()})),s.onfocus(s.input,(function(){return s.onFocus()})),s.ignoreGesture(s.input),setTimeout((function(){return s.updateMirror()}),0),s.options.actions&&(s.actionbar=s._register(new h.a(s.element)),s.actionbar.push(s.options.actions,{icon:!0,label:!1})),s.applyStyles(),s}return Object(i.a)(n,[{key:"onBlur",value:function(){this._hideMessage()}},{key:"onFocus",value:function(){this._showMessage()}},{key:"setPlaceHolder",value:function(e){this.placeholder=e,this.input.setAttribute("placeholder",e),this.input.title=e}},{key:"setAriaLabel",value:function(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}},{key:"getAriaLabel",value:function(){return this.ariaLabel}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"hasFocus",value:function(){return document.activeElement===this.input}},{key:"select",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.input.select(),e&&this.input.setSelectionRange(e.start,e.end)}},{key:"isSelectionAtEnd",value:function(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}},{key:"enable",value:function(){this.input.removeAttribute("disabled")}},{key:"disable",value:function(){this.blur(),this.input.disabled=!0,this._hideMessage()}},{key:"updateScrollDimensions",value:function(){if("number"===typeof this.cachedContentHeight&&"number"===typeof this.cachedHeight&&this.scrollableElement){var e=this.cachedContentHeight,t=this.cachedHeight,n=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:n})}}},{key:"showMessage",value:function(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));var n=this.stylesForType(this.message.type);this.element.style.border=n.border?"1px solid ".concat(n.border):"",(this.hasFocus()||t)&&this._showMessage()}},{key:"hideMessage",value:function(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}},{key:"validate",value:function(){var e=null;return this.validation&&((e=this.validation(this.value))?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null===e||void 0===e?void 0:e.type}},{key:"stylesForType",value:function(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}},{key:"classForType",value:function(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}},{key:"_showMessage",value:function(){var e=this;if(this.contextViewProvider&&this.message){var t,n,r=function(){return t.style.width=d.getTotalWidth(e.element)+"px"};this.contextViewProvider.showContextView({getAnchor:function(){return e.element},anchorAlignment:1,render:function(n){if(!e.message)return null;t=d.append(n,S(".monaco-inputbox-container")),r();var i={inline:!0,className:"monaco-inputbox-message"},a=e.message.formatContent?Object(p.b)(e.message.content,i):Object(p.c)(e.message.content,i);a.classList.add(e.classForType(e.message.type));var o=e.stylesForType(e.message.type);return a.style.backgroundColor=o.background?o.background.toString():"",a.style.color=o.foreground?o.foreground.toString():"",a.style.border=o.border?"1px solid ".concat(o.border):"",d.append(t,a),null},onHide:function(){e.state="closed"},layout:r}),n=3===this.message.type?l.a("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?l.a("alertWarningMessage","Warning: {0}",this.message.content):l.a("alertInfoMessage","Info: {0}",this.message.content),f.a(n),this.state="open"}}},{key:"_hideMessage",value:function(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}},{key:"onValueChange",value:function(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}},{key:"updateMirror",value:function(){if(this.mirror){var e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";e+t?this.mirror.textContent=e+t:this.mirror.innerText="\xa0",this.layout()}}},{key:"style",value:function(e){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()}},{key:"applyStyles",value:function(){var e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",n=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=n?"1px":"",this.element.style.borderStyle=n?"solid":"",this.element.style.borderColor=n}},{key:"layout",value:function(){if(this.mirror){var e=this.cachedContentHeight;this.cachedContentHeight=d.getTotalHeight(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}}},{key:"insertAtCursor",value:function(e){var t=this.inputElement,n=t.selectionStart,r=t.selectionEnd,i=t.value;null!==n&&null!==r&&(this.value=i.substr(0,n)+e+i.substr(r),t.setSelectionRange(n+1,n+1),this.layout())}},{key:"dispose",value:function(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),Object(o.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"inputElement",get:function(){return this.input}},{key:"value",get:function(){return this.input.value},set:function(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}},{key:"height",get:function(){return"number"===typeof this.cachedHeight?this.cachedHeight:d.getTotalHeight(this.element)}},{key:"width",get:function(){return d.getTotalWidth(this.input)},set:function(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){var t=0;if(this.mirror)t=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0);this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}},{key:"paddingRight",set:function(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width="calc(100% - ".concat(e,"px)"):this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}}]),n}(m.a),T=function(e){Object(u.a)(n,e);var t=Object(c.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i,a)).history=new D(a.history,100),o}return Object(i.a)(n,[{key:"addToHistory",value:function(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}},{key:"showNextValue",value:function(){this.history.has(this.value)||this.addToHistory();var e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,f.c(this.value))}},{key:"showPreviousValue",value:function(){this.history.has(this.value)||this.addToHistory();var e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,f.c(this.value))}},{key:"getCurrentValue",value:function(){var e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}},{key:"getPreviousValue",value:function(){return this.history.previous()||this.history.first()}},{key:"getNextValue",value:function(){return this.history.next()||this.history.last()}}]),n}(k)},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return f}));var r=n(22),i=n(0),a=n(1),o=function(){function e(t,n,r,a){Object(i.a)(this,e),this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=a}return Object(a.a)(e,[{key:"getOriginalEnd",value:function(){return this.originalStart+this.originalLength}},{key:"getModifiedEnd",value:function(){return this.modifiedStart+this.modifiedLength}}]),e}(),s=n(145),u=function(){function e(t){Object(i.a)(this,e),this.source=t}return Object(a.a)(e,[{key:"getElements",value:function(){for(var e=this.source,t=new Int32Array(e.length),n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new o(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}},{key:"AddOriginalElement",value:function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}},{key:"AddModifiedElement",value:function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}},{key:"getChanges",value:function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}},{key:"getReverseChanges",value:function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}]),e}(),f=function(){function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Object(i.a)(this,e),this.ContinueProcessingPredicate=a;var o=e._getElements(t),s=Object(r.a)(o,3),u=s[0],c=s[1],l=s[2],d=e._getElements(n),p=Object(r.a)(d,3),f=p[0],h=p[1],g=p[2];this._hasStrings=l&&g,this._originalStringElements=u,this._originalElementsOrHash=c,this._modifiedStringElements=f,this._modifiedElementsOrHash=h,this.m_forwardHistory=[],this.m_reverseHistory=[]}return Object(a.a)(e,[{key:"ElementsAreEqual",value:function(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}},{key:"OriginalElementsAreEqual",value:function(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}},{key:"ModifiedElementsAreEqual",value:function(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}},{key:"ComputeDiff",value:function(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}},{key:"_ComputeDiff",value:function(e,t,n,r,i){var a=[!1],o=this.ComputeDiffRecursive(e,t,n,r,a);return i&&(o=this.PrettifyChanges(o)),{quitEarly:a[0],changes:o}}},{key:"ComputeDiffRecursive",value:function(e,t,n,r,i){for(i[0]=!1;e<=t&&n<=r&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&r>=n&&this.ElementsAreEqual(t,r);)t--,r--;var a;if(e>t||n>r)return n<=r?(l.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a=[new o(e,0,n,r-n+1)]):e<=t?(l.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),a=[new o(e,t-e+1,n,0)]):(l.Assert(e===t+1,"originalStart should only be one more than originalEnd"),l.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),a=[]),a;var s=[0],u=[0],c=this.ComputeRecursionPoint(e,t,n,r,s,u,i),d=s[0],p=u[0];if(null!==c)return c;if(!i[0]){var f=this.ComputeDiffRecursive(e,d,n,p,i),h=[];return h=i[0]?[new o(d+1,t-(d+1)+1,p+1,r-(p+1)+1)]:this.ComputeDiffRecursive(d+1,t,p+1,r,i),this.ConcatenateChanges(f,h)}return[new o(e,t-e+1,n,r-n+1)]}},{key:"WALKTRACE",value:function(e,t,n,r,i,a,s,u,c,l,d,f,h,g,m,_,v,y){var b,D=null,E=new p,C=t,S=n,x=h[0]-_[0]-r,k=-1073741824,T=this.m_forwardHistory.length-1;do{var w=x+e;w===C||w=0&&(e=(c=this.m_forwardHistory[T])[0],C=1,S=c.length-1)}while(--T>=-1);if(b=E.getReverseChanges(),y[0]){var A=h[0]+1,O=_[0]+1;if(null!==b&&b.length>0){var N=b[b.length-1];A=Math.max(A,N.getOriginalEnd()),O=Math.max(O,N.getModifiedEnd())}D=[new o(A,f-A+1,O,m-O+1)]}else{E=new p,C=a,S=s,x=h[0]-_[0]-u,k=1073741824,T=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{var I=x+i;I===C||I=l[I+1]?(g=(d=l[I+1]-1)-x-u,d>k&&E.MarkNextChange(),k=d+1,E.AddOriginalElement(d+1,g+1),x=I+1-i):(g=(d=l[I-1])-x-u,d>k&&E.MarkNextChange(),k=d,E.AddModifiedElement(d+1,g+1),x=I-1-i),T>=0&&(i=(l=this.m_reverseHistory[T])[0],C=1,S=l.length-1)}while(--T>=-1);D=E.getChanges()}return this.ConcatenateChanges(b,D)}},{key:"ComputeRecursionPoint",value:function(e,t,n,r,i,a,s){var u=0,c=0,l=0,p=0,f=0,h=0;e--,n--,i[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var g=t-e+(r-n),m=g+1,_=new Int32Array(m),v=new Int32Array(m),y=r-n,b=t-e,D=e-n,E=t-r,C=(b-y)%2===0;_[y]=e,v[b]=t,s[0]=!1;for(var S=1;S<=g/2+1;S++){var x=0,k=0;l=this.ClipDiagonalBound(y-S,S,y,m),p=this.ClipDiagonalBound(y+S,S,y,m);for(var T=l;T<=p;T+=2){c=(u=T===l||Tx+k&&(x=u,k=c),!C&&Math.abs(T-b)<=S-1&&u>=v[T])return i[0]=u,a[0]=c,w<=v[T]&&S<=1448?this.WALKTRACE(y,l,p,D,b,f,h,E,_,v,u,t,i,c,r,a,C,s):null}var A=(x-e+(k-n)-S)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(x,A))return s[0]=!0,i[0]=x,a[0]=k,A>0&&S<=1448?this.WALKTRACE(y,l,p,D,b,f,h,E,_,v,u,t,i,c,r,a,C,s):(e++,n++,[new o(e,t-e+1,n,r-n+1)]);f=this.ClipDiagonalBound(b-S,S,b,m),h=this.ClipDiagonalBound(b+S,S,b,m);for(var O=f;O<=h;O+=2){c=(u=O===f||O=v[O+1]?v[O+1]-1:v[O-1])-(O-b)-E;for(var N=u;u>e&&c>n&&this.ElementsAreEqual(u,c);)u--,c--;if(v[O]=u,C&&Math.abs(O-y)<=S&&u<=_[O])return i[0]=u,a[0]=c,N>=_[O]&&S<=1448?this.WALKTRACE(y,l,p,D,b,f,h,E,_,v,u,t,i,c,r,a,C,s):null}if(S<=1447){var I=new Int32Array(p-l+2);I[0]=y-l+1,d.Copy2(_,l,I,1,p-l+1),this.m_forwardHistory.push(I),(I=new Int32Array(h-f+2))[0]=b-f+1,d.Copy2(v,f,I,1,h-f+1),this.m_reverseHistory.push(I)}}return this.WALKTRACE(y,l,p,D,b,f,h,E,_,v,u,t,i,c,r,a,C,s)}},{key:"PrettifyChanges",value:function(e){for(var t=0;t0,s=n.modifiedLength>0;n.originalStart+n.originalLength=0;c--){var l=e[c],d=0,p=0;if(c>0){var f=e[c-1];f.originalLength>0&&(d=f.originalStart+f.originalLength),f.modifiedLength>0&&(p=f.modifiedStart+f.modifiedLength)}for(var h=l.originalLength>0,g=l.modifiedLength>0,m=0,_=this._boundaryScore(l.originalStart,l.originalLength,l.modifiedStart,l.modifiedLength),v=1;;v++){var y=l.originalStart-v,b=l.modifiedStart-v;if(y_&&(_=D,m=v)}l.originalStart-=m,l.modifiedStart-=m}if(this._hasStrings)for(var E=1,C=e.length;E0&&p>s&&(s=p,u=l,c=d)}return s>0?[u,c]:null}},{key:"_contiguousSequenceScore",value:function(e,t,n){for(var r=0,i=0;i=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}},{key:"_OriginalRegionIsBoundary",value: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}},{key:"_ModifiedIsBoundary",value:function(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}},{key:"_ModifiedRegionIsBoundary",value: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}},{key:"_boundaryScore",value:function(e,t,n,r){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)}},{key:"ConcatenateChanges",value: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 d.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],d.Copy(t,1,r,e.length,t.length-1),r}var i=new Array(e.length+t.length);return d.Copy(e,0,i,0,e.length),d.Copy(t,0,i,e.length,t.length),i}},{key:"ChangesOverlap",value:function(e,t,n){if(l.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),l.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 r=e.originalStart,i=e.originalLength,a=e.modifiedStart,s=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(i=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(s=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new o(r,i,a,s),!0}return n[0]=null,!1}},{key:"ClipDiagonalBound",value:function(e,t,n,r){if(e>=0&&e0&&"string"===typeof e[0]}},{key:"_getElements",value:function(t){var n=t.getElements();if(e._isStringArray(n)){for(var r=new Int32Array(n.length),i=0,a=n.length;i0?t[0]:null}function E(e){var t=u.k.ordered(e);return t.length>0?t[0]:null}l.a.registerCommand("_provideDocumentSemanticTokensLegend",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r0&&n.push(r("text","\n"));return n};var r=n(144)},function(e,t,n){"use strict";var r,i="";e.exports=function(e,t){if("string"!==typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var n=e.length*t;if(r!==e||"undefined"===typeof r)r=e,i="";else if(i.length>=n)return i.substr(0,n);for(;n>i.length&&t>1;)1&t&&(i+=e),t>>=1,e+=e;return i=(i+=e).substr(0,n)}},function(e,t,n){"use strict";var r=n(110);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.d})),n.d(t,"d",(function(){return r.e})),n.d(t,"e",(function(){return r.f})),n.d(t,"f",(function(){return r.g}))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:0;if(!e||t>200)return e;if("object"===typeof e){switch(e.$mid){case 1:return i.a.revive(e);case 2:return new RegExp(e.source,e.flags)}if(e instanceof r.a||e instanceof Uint8Array)return e;if(Array.isArray(e))for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:o;return c(e,t||o)}function u(e,t,n,r,i,a,o){for(var s="
",u=r,c=0,l=0,d=t.getCount();l0;)f+=o?" ":" ",g--;break;case 60:f+="<";break;case 62:f+=">";break;case 38:f+="&";break;case 0:f+="�";break;case 65279:case 8232:case 8233:case 133:f+="\ufffd";break;case 13:f+="​";break;case 32:f+=o?" ":" ";break;default:f+=String.fromCharCode(h)}}if(s+='').concat(f,""),p>i||u>=i)break}}return s+="
"}function c(e,t){for(var n='
',a=r.Q(e),o=t.getInitialState(),s=0,u=a.length;s0&&(n+="
");var l=t.tokenize2(c,!0,o,0);i.a.convertToEndOffset(l.tokens,c.length);for(var d=new i.a(l.tokens,c).inflate(),p=0,f=0,h=d.getCount();f').concat(r.t(c.substring(p,m)),""),p=m}o=l.endState}return n+="
"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return B})),n.d(t,"b",(function(){return j})),n.d(t,"c",(function(){return U}));var r=n(17),i=n(15),a=n(6),o=n(34),s=n(4),u=n(5),c=n(0),l=n(1),d=n(11),p=n(7),f=n(23),h=n(27),g=n(40),m=n(41),_=n(18),v=n(153),y=n(171),b=n(53),D=n(29),E=n(37),C=n(25),S=n(95),x=n(122),k=n(145),T=n(173),w=n(47),A=n(225),O=n(208),N=function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},I=function(e,t){return function(n,r){t(n,r,e)}};function F(e){return e.toString()}function L(e){for(var t,n=new k.a,r=e.createSnapshot();t=r.read();)n.update(t);return n.digest()}var P=function(){function e(t,n,r){Object(c.a)(this,e),this._modelEventListeners=new p.b,this.model=t,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(t.onWillDispose((function(){return n(t)}))),this._modelEventListeners.add(t.onDidChangeLanguage((function(e){return r(t,e)})))}return Object(l.a)(e,[{key:"_disposeLanguageSelection",value:function(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null),this._languageSelection&&(this._languageSelection.dispose(),this._languageSelection=null)}},{key:"dispose",value:function(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}},{key:"setLanguage",value:function(e){var t=this;this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange((function(){return t.model.setMode(e.languageIdentifier)})),this.model.setMode(e.languageIdentifier)}}]),e}(),R=f.d||f.f?1:2,M=function e(t,n,r,i,a,o,s,u){Object(c.a)(this,e),this.uri=t,this.initialUndoRedoSnapshot=n,this.time=r,this.sharesUndoRedoStack=i,this.heapSize=a,this.sha1=o,this.versionId=s,this.alternativeVersionId=u};var B=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e,r,i,a,s){var u;return Object(c.a)(this,n),(u=t.call(this))._configurationService=e,u._resourcePropertiesService=r,u._themeService=i,u._logService=a,u._undoRedoService=s,u._onModelAdded=u._register(new d.a),u.onModelAdded=u._onModelAdded.event,u._onModelRemoved=u._register(new d.a),u.onModelRemoved=u._onModelRemoved.event,u._onModelModeChanged=u._register(new d.a),u.onModelModeChanged=u._onModelModeChanged.event,u._modelCreationOptionsByLanguageAndResource=Object.create(null),u._models={},u._disposedModels=new Map,u._disposedModelsHeapSize=0,u._semanticStyling=u._register(new z(u._themeService,u._logService)),u._register(u._configurationService.onDidChangeConfiguration((function(){return u._updateModelOptions()}))),u._updateModelOptions(),u._register(new V(Object(o.a)(u),u._themeService,u._configurationService,u._semanticStyling)),u}return Object(l.a)(n,[{key:"_getEOL",value:function(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);var n=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return n&&"auto"!==n?n:3===f.a||2===f.a?"\n":"\r\n"}},{key:"_shouldRestoreUndoStack",value:function(){var e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!==typeof e||e}},{key:"getCreationOptions",value:function(e,t,r){var i=this._modelCreationOptionsByLanguageAndResource[e+t];if(!i){var a=this._configurationService.getValue("editor",{overrideIdentifier:e,resource:t}),o=this._getEOL(t,e);i=n._readModelOptions({editor:a,eol:o},r),this._modelCreationOptionsByLanguageAndResource[e+t]=i}return i}},{key:"_updateModelOptions",value:function(){var e=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);for(var t=Object.keys(this._models),r=0,i=t.length;re){var t=[];for(this._disposedModels.forEach((function(e){e.sharesUndoRedoStack||t.push(e)})),t.sort((function(e,t){return e.time-t.time}));t.length>0&&this._disposedModelsHeapSize>e;){var n=t.shift();this._removeDisposedModel(n.uri),null!==n.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(n.initialUndoRedoSnapshot)}}}},{key:"_createModelData",value:function(e,t,n,r){var i=this,o=this.getCreationOptions(t.language,n,r),s=new m.b(e,o,t,n,this._undoRedoService);if(n&&this._disposedModels.has(F(n))){var u=this._removeDisposedModel(n),c=this._undoRedoService.getElements(n),l=L(s)===u.sha1;if(l||u.sharesUndoRedoStack){var d,p=Object(a.a)(c.past);try{for(p.s();!(d=p.n()).done;){var f=d.value;Object(T.b)(f)&&f.matchesResource(n)&&f.setModel(s)}}catch(b){p.e(b)}finally{p.f()}var h,g=Object(a.a)(c.future);try{for(g.s();!(h=g.n()).done;){var _=h.value;Object(T.b)(_)&&_.matchesResource(n)&&_.setModel(s)}}catch(b){g.e(b)}finally{g.f()}this._undoRedoService.setElementsValidFlag(n,!0,(function(e){return Object(T.b)(e)&&e.matchesResource(n)})),l&&(s._overwriteVersionId(u.versionId),s._overwriteAlternativeVersionId(u.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(u.initialUndoRedoSnapshot))}else null!==u.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(u.initialUndoRedoSnapshot)}var v=F(s.uri);if(this._models[v])throw new Error("ModelService: Cannot add model because it already exists!");var y=new P(s,(function(e){return i._onWillDispose(e)}),(function(e,t){return i._onDidChangeLanguage(e,t)}));return this._models[v]=y,y}},{key:"createModel",value:function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t?(r=this._createModelData(e,t.languageIdentifier,n,i),this.setMode(r.model,t)):r=this._createModelData(e,v.b,n,i),this._onModelAdded.fire(r.model),r.model}},{key:"setMode",value:function(e,t){if(t){var n=this._models[F(e.uri)];n&&n.setLanguage(t)}}},{key:"getModels",value:function(){for(var e=[],t=Object.keys(this._models),n=0,r=t.length;n0||c.future.length>0){var l,d=Object(a.a)(c.past);try{for(d.s();!(l=d.n()).done;){var p=l.value;Object(T.b)(p)&&p.matchesResource(e.uri)&&(s=!0,u+=p.heapSize(e.uri),p.setModel(e.uri))}}catch(y){d.e(y)}finally{d.f()}var f,h=Object(a.a)(c.future);try{for(h.s();!(f=h.n()).done;){var g=f.value;Object(T.b)(g)&&g.matchesResource(e.uri)&&(s=!0,u+=g.heapSize(e.uri),g.setModel(e.uri))}}catch(y){h.e(y)}finally{h.f()}}}var m=n.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(s)if(!o&&u>m){var _=i.model.getInitialUndoRedoSnapshot();null!==_&&this._undoRedoService.restoreSnapshot(_)}else this._ensureDisposedModelsHeapSize(m-u),this._undoRedoService.setElementsValidFlag(e.uri,!1,(function(t){return Object(T.b)(t)&&t.matchesResource(e.uri)})),this._insertDisposedModel(new M(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),o,u,L(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!o){var v=i.model.getInitialUndoRedoSnapshot();null!==v&&this._undoRedoService.restoreSnapshot(v)}delete this._models[r],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageIdentifier().language+e.uri],this._onModelRemoved.fire(e)}},{key:"_onDidChangeLanguage",value:function(e,t){var r=t.oldLanguage,i=e.getLanguageIdentifier().language,a=this.getCreationOptions(r,e.uri,e.isForSimpleWidget),o=this.getCreationOptions(i,e.uri,e.isForSimpleWidget);n._setModelOptionsForModel(e,o,a),this._onModelModeChanged.fire({model:e,oldModeId:r})}}],[{key:"_readModelOptions",value:function(e,t){var n=g.d.tabSize;if(e.editor&&"undefined"!==typeof e.editor.tabSize){var r=parseInt(e.editor.tabSize,10);isNaN(r)||(n=r),n<1&&(n=1)}var i=n;if(e.editor&&"undefined"!==typeof e.editor.indentSize&&"tabSize"!==e.editor.indentSize){var a=parseInt(e.editor.indentSize,10);isNaN(a)||(i=a),i<1&&(i=1)}var o=g.d.insertSpaces;e.editor&&"undefined"!==typeof e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));var s=R,u=e.eol;"\r\n"===u?s=2:"\n"===u&&(s=1);var c=g.d.trimAutoWhitespace;e.editor&&"undefined"!==typeof e.editor.trimAutoWhitespace&&(c="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));var l=g.d.detectIndentation;e.editor&&"undefined"!==typeof e.editor.detectIndentation&&(l="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));var d=g.d.largeFileOptimizations;return e.editor&&"undefined"!==typeof e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations)),{isForSimpleWidget:t,tabSize:n,indentSize:i,insertSpaces:o,detectIndentation:l,defaultEOL:s,trimAutoWhitespace:c,largeFileOptimizations:d}}},{key:"_setModelOptionsForModel",value:function(e,t,n){n&&n.defaultEOL!==t.defaultEOL&&1===e.getLineCount()&&e.setEOL(1===t.defaultEOL?0:1),n&&n.detectIndentation===t.detectIndentation&&n.insertSpaces===t.insertSpaces&&n.tabSize===t.tabSize&&n.indentSize===t.indentSize&&n.trimAutoWhitespace===t.trimAutoWhitespace||(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace}))}}]),n}(p.a);B.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,B=N([I(0,b.a),I(1,y.b),I(2,C.b),I(3,S.b),I(4,x.a)],B);var j="editor.semanticHighlighting";function U(e,t,n){var r,i=null===(r=n.getValue(j,{overrideIdentifier:e.getLanguageIdentifier().language,resource:e.uri}))||void 0===r?void 0:r.enabled;return"boolean"===typeof i?i:t.getColorTheme().semanticHighlighting}var V=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e,r,i,o){var s;Object(c.a)(this,n),(s=t.call(this))._watchers=Object.create(null),s._semanticStyling=o;var u=function(e){s._watchers[e.uri.toString()]=new W(e,r,s._semanticStyling)},l=function(e,t){t.dispose(),delete s._watchers[e.uri.toString()]},d=function(){var t,n=Object(a.a)(e.getModels());try{for(n.s();!(t=n.n()).done;){var o=t.value,c=s._watchers[o.uri.toString()];U(o,r,i)?c||u(o):c&&l(o,c)}}catch(d){n.e(d)}finally{n.f()}};return s._register(e.onModelAdded((function(e){U(e,r,i)&&u(e)}))),s._register(e.onModelRemoved((function(e){var t=s._watchers[e.uri.toString()];t&&l(e,t)}))),s._register(i.onDidChangeConfiguration((function(e){e.affectsConfiguration(j)&&d()}))),s._register(r.onDidColorThemeChange(d)),s}return n}(p.a),z=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e,r){var i;return Object(c.a)(this,n),(i=t.call(this))._themeService=e,i._logService=r,i._caches=new WeakMap,i._register(i._themeService.onDidColorThemeChange((function(){i._caches=new WeakMap}))),i}return Object(l.a)(n,[{key:"get",value:function(e){return this._caches.has(e)||this._caches.set(e,new A.a(e.getLegend(),this._themeService,this._logService)),this._caches.get(e)}}]),n}(p.a),H=function(){function e(t,n,r){Object(c.a)(this,e),this._provider=t,this.resultId=n,this.data=r}return Object(l.a)(e,[{key:"dispose",value:function(){this._provider.releaseDocumentSemanticTokens(this.resultId)}}]),e}(),W=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e,r,i){var o;Object(c.a)(this,n),(o=t.call(this))._isDisposed=!1,o._model=e,o._semanticStyling=i,o._fetchDocumentSemanticTokens=o._register(new D.d((function(){return o._fetchDocumentSemanticTokensNow()}),n.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),o._currentDocumentResponse=null,o._currentDocumentRequestCancellationTokenSource=null,o._documentProvidersChangeListeners=[],o._register(o._model.onDidChangeContent((function(){o._fetchDocumentSemanticTokens.isScheduled()||o._fetchDocumentSemanticTokens.schedule()})));var s=function(){Object(p.f)(o._documentProvidersChangeListeners),o._documentProvidersChangeListeners=[];var t,n=Object(a.a)(_.l.all(e));try{for(n.s();!(t=n.n()).done;){var r=t.value;"function"===typeof r.onDidChange&&o._documentProvidersChangeListeners.push(r.onDidChange((function(){return o._fetchDocumentSemanticTokens.schedule(0)})))}}catch(i){n.e(i)}finally{n.f()}};return s(),o._register(_.l.onDidChange((function(){s(),o._fetchDocumentSemanticTokens.schedule()}))),o._register(r.onDidColorThemeChange((function(e){o._setDocumentSemanticTokens(null,null,null,[]),o._fetchDocumentSemanticTokens.schedule()}))),o._fetchDocumentSemanticTokens.schedule(0),o}return Object(l.a)(n,[{key:"dispose",value:function(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}},{key:"_fetchDocumentSemanticTokensNow",value:function(){var e=this;if(!this._currentDocumentRequestCancellationTokenSource){var t=new E.b,n=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,r=Object(O.b)(this._model,n,t.token);if(r){var i=r.provider,a=r.request;this._currentDocumentRequestCancellationTokenSource=t;var o=[],s=this._model.onDidChangeContent((function(e){o.push(e)})),u=this._semanticStyling.get(i);a.then((function(t){e._currentDocumentRequestCancellationTokenSource=null,s.dispose(),e._setDocumentSemanticTokens(i,t||null,u,o)}),(function(t){t&&(h.d(t)||"string"===typeof t.message&&-1!==t.message.indexOf("busy"))||h.e(t),e._currentDocumentRequestCancellationTokenSource=null,s.dispose(),o.length>0&&(e._fetchDocumentSemanticTokens.isScheduled()||e._fetchDocumentSemanticTokens.schedule())}))}else this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1)}}},{key:"_setDocumentSemanticTokens",value:function(e,t,r,i){var o=this,s=this._currentDocumentResponse,u=function(){i.length>0&&!o._fetchDocumentSemanticTokens.isScheduled()&&o._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&r){if(!t)return this._model.setSemanticTokens(null,!0),void u();if(Object(O.d)(t)){if(!s)return void this._model.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:s.data};else{var c,l=0,d=Object(a.a)(t.edits);try{for(d.s();!(c=d.n()).done;){var p=c.value;l+=(p.data?p.data.length:0)-p.deleteCount}}catch(I){d.e(I)}finally{d.f()}for(var f=s.data,h=new Uint32Array(f.length+l),g=f.length,m=h.length,_=t.edits.length-1;_>=0;_--){var v=t.edits[_],y=g-(v.start+v.deleteCount);y>0&&(n._copy(f,g-y,h,m-y,y),m-=y),v.data&&(n._copy(v.data,0,h,m-v.data.length,v.data.length),m-=v.data.length),g=v.start}g>0&&n._copy(f,0,h,0,g),t={resultId:t.resultId,data:h}}}if(Object(O.c)(t)){this._currentDocumentResponse=new H(e,t.resultId,t.data);var b=Object(A.b)(t,r,this._model.getLanguageIdentifier());if(i.length>0){var D,E=Object(a.a)(i);try{for(E.s();!(D=E.n()).done;){var C,S=D.value,x=Object(a.a)(b);try{for(x.s();!(C=x.n()).done;){var k,T=C.value,w=Object(a.a)(S.changes);try{for(w.s();!(k=w.n()).done;){var N=k.value;T.applyEdit(N.range,N.text)}}catch(I){w.e(I)}finally{w.f()}}}catch(I){x.e(I)}finally{x.f()}}}catch(I){E.e(I)}finally{E.f()}}this._model.setSemanticTokens(b,!0)}else this._model.setSemanticTokens(null,!0);u()}else this._model.setSemanticTokens(null,!1)}}],[{key:"_copy",value:function(e,t,n,r,i){for(var a=0;a0&&l>=1;c>0&&this._logService.getLevel()===s.c.Trace&&(this._logService.trace("SemanticTokensProviderStyling: unknown token modifier index: ".concat(t.toString(2)," for legend: ").concat(JSON.stringify(this._legend.tokenModifiers))),u.push("not-in-legend"));var d=this._themeService.getColorTheme().getTokenStyleMetadata(a,u,n.language);if("undefined"===typeof d)r=2147483647;else{if(r=0,"undefined"!==typeof d.italic)r|=1|(d.italic?1:0)<<11;if("undefined"!==typeof d.bold)r|=2|(d.bold?2:0)<<11;if("undefined"!==typeof d.underline)r|=4|(d.underline?4:0)<<11;if(d.foreground)r|=8|d.foreground<<14;0===r&&(r=2147483647)}}else this._logService.getLevel()===s.c.Trace&&this._logService.trace("SemanticTokensProviderStyling: unknown token type index: ".concat(e," for legend: ").concat(JSON.stringify(this._legend.tokenTypes))),r=2147483647,a="not-in-legend";this._hashTable.add(e,t,n.id,r),this._logService.getLevel()===s.c.Trace&&this._logService.trace("SemanticTokensProviderStyling ".concat(e," (").concat(a,") / ").concat(t," (").concat(u.join(" "),"): foreground ").concat(o.C.getForeground(r),", fontStyle ").concat(o.C.getFontStyle(r).toString(2)))}return r}}]),e}();function l(e,t,n){for(var r=e.data,i=e.data.length/5|0,a=Math.max(Math.ceil(i/1024),400),o=[],s=0,c=1,l=0;sd&&0===r[5*f];)f--;if(f-1===d){for(var h=p;h+1=this._growCount){var o=this._elements;this._currentLengthIndex++,this._currentLength=e._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=55296&&s<=57343){if(s>=55296&&s<=56319&&a+1=56320&&u<=57343){l+=encodeURIComponent(e[a]+e[a+1]),a++;continue}l+="%EF%BF%BD"}else l+=encodeURIComponent(e[a]);return l}i.defaultChars=";/?:@&=+$,-_.!~*'()#",i.componentChars="-_.!~*'()",e.exports=i},function(e,t,n){"use strict";var r=n(312),i=n(314),a=n(317),o=n(318),s=n(321),u=n(503);e.exports=r([a,i,o,s,u])},function(e,t,n){"use strict";var r=0;function i(){return Math.pow(2,++r)}t.boolean=i(),t.booleanish=i(),t.overloadedBoolean=i(),t.number=i(),t.spaceSeparated=i(),t.commaSeparated=i(),t.commaOrSpaceSeparated=i()},function(e,t,n){"use strict";var r=n(312),i=n(314),a=n(317),o=n(318),s=n(321),u=n(504);e.exports=r([a,i,o,s,u])},function(e,t,n){"use strict";var r=n(266),i=n(315),a=n(316),o="data";e.exports=function(e,t){var n=r(t),p=t,f=a;if(n in e.normal)return e.property[e.normal[n]];n.length>4&&n.slice(0,4)===o&&s.test(t)&&("-"===t.charAt(4)?p=function(e){var t=e.slice(5).replace(u,d);return o+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(u.test(t))return e;"-"!==(t=t.replace(c,l)).charAt(0)&&(t="-"+t);return o+t}(t),f=i);return new f(p,t)};var s=/^data[-\w.:]+$/i,u=/-[a-z]/g,c=/[A-Z]/g;function l(e){return"-"+e.toLowerCase()}function d(e){return e.charAt(1).toUpperCase()}},function(e){e.exports=JSON.parse('{"html":"http://www.w3.org/1999/xhtml","mathml":"http://www.w3.org/1998/Math/MathML","svg":"http://www.w3.org/2000/svg","xlink":"http://www.w3.org/1999/xlink","xml":"http://www.w3.org/XML/1998/namespace","xmlns":"http://www.w3.org/2000/xmlns/"}')},function(e,t,n){"use strict";var r=n(88),i=n(93),a=n(773),o=n(269),s=n(774),u=n(270),c=o.CODE_POINTS,l=o.CODE_POINT_SEQUENCES,d={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},p="DATA_STATE",f="RCDATA_STATE",h="RAWTEXT_STATE",g="SCRIPT_DATA_STATE",m="PLAINTEXT_STATE",_="TAG_OPEN_STATE",v="END_TAG_OPEN_STATE",y="TAG_NAME_STATE",b="RCDATA_LESS_THAN_SIGN_STATE",D="RCDATA_END_TAG_OPEN_STATE",E="RCDATA_END_TAG_NAME_STATE",C="RAWTEXT_LESS_THAN_SIGN_STATE",S="RAWTEXT_END_TAG_OPEN_STATE",x="RAWTEXT_END_TAG_NAME_STATE",k="SCRIPT_DATA_LESS_THAN_SIGN_STATE",T="SCRIPT_DATA_END_TAG_OPEN_STATE",w="SCRIPT_DATA_END_TAG_NAME_STATE",A="SCRIPT_DATA_ESCAPE_START_STATE",O="SCRIPT_DATA_ESCAPE_START_DASH_STATE",N="SCRIPT_DATA_ESCAPED_STATE",I="SCRIPT_DATA_ESCAPED_DASH_STATE",F="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",L="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",P="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",R="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",M="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",B="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",j="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",U="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",V="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",z="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",H="BEFORE_ATTRIBUTE_NAME_STATE",W="ATTRIBUTE_NAME_STATE",K="AFTER_ATTRIBUTE_NAME_STATE",q="BEFORE_ATTRIBUTE_VALUE_STATE",G="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",Y="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",J="ATTRIBUTE_VALUE_UNQUOTED_STATE",$="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",Q="SELF_CLOSING_START_TAG_STATE",X="BOGUS_COMMENT_STATE",Z="MARKUP_DECLARATION_OPEN_STATE",ee="COMMENT_START_STATE",te="COMMENT_START_DASH_STATE",ne="COMMENT_STATE",re="COMMENT_LESS_THAN_SIGN_STATE",ie="COMMENT_LESS_THAN_SIGN_BANG_STATE",ae="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",oe="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",se="COMMENT_END_DASH_STATE",ue="COMMENT_END_STATE",ce="COMMENT_END_BANG_STATE",le="DOCTYPE_STATE",de="BEFORE_DOCTYPE_NAME_STATE",pe="DOCTYPE_NAME_STATE",fe="AFTER_DOCTYPE_NAME_STATE",he="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",ge="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",me="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",_e="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",ve="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",ye="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",be="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",De="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",Ee="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",Ce="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",Se="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",xe="BOGUS_DOCTYPE_STATE",ke="CDATA_SECTION_STATE",Te="CDATA_SECTION_BRACKET_STATE",we="CDATA_SECTION_END_STATE",Ae="CHARACTER_REFERENCE_STATE",Oe="NAMED_CHARACTER_REFERENCE_STATE",Ne="AMBIGUOS_AMPERSAND_STATE",Ie="NUMERIC_CHARACTER_REFERENCE_STATE",Fe="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",Le="DECIMAL_CHARACTER_REFERENCE_START_STATE",Pe="HEXADEMICAL_CHARACTER_REFERENCE_STATE",Re="DECIMAL_CHARACTER_REFERENCE_STATE",Me="NUMERIC_CHARACTER_REFERENCE_END_STATE";function Be(e){return e===c.SPACE||e===c.LINE_FEED||e===c.TABULATION||e===c.FORM_FEED}function je(e){return e>=c.DIGIT_0&&e<=c.DIGIT_9}function Ue(e){return e>=c.LATIN_CAPITAL_A&&e<=c.LATIN_CAPITAL_Z}function Ve(e){return e>=c.LATIN_SMALL_A&&e<=c.LATIN_SMALL_Z}function ze(e){return Ve(e)||Ue(e)}function He(e){return ze(e)||je(e)}function We(e){return e>=c.LATIN_CAPITAL_A&&e<=c.LATIN_CAPITAL_F}function Ke(e){return e>=c.LATIN_SMALL_A&&e<=c.LATIN_SMALL_F}function qe(e){return e+32}function Ge(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function Ye(e){return String.fromCharCode(qe(e))}function Je(e,t){for(var n=s[++e],r=++e,i=r+n-1;r<=i;){var a=r+i>>>1,o=s[a];if(ot))return s[a+n];i=a-1}}return-1}var $e=function(){function e(){r(this,e),this.preprocessor=new a,this.tokenQueue=[],this.allowCDATA=!1,this.state=p,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}return i(e,[{key:"_err",value:function(){}},{key:"_errOnNextCodePoint",value:function(e){this._consume(),this._err(e),this._unconsume()}},{key:"getNextToken",value:function(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;var e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}},{key:"write",value:function(e,t){this.active=!0,this.preprocessor.write(e,t)}},{key:"insertHtmlAtCurrentPos",value:function(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}},{key:"_ensureHibernation",value:function(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:e.HIBERNATION_TOKEN}),!0}return!1}},{key:"_consume",value:function(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}},{key:"_unconsume",value:function(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}},{key:"_reconsumeInState",value:function(e){this.state=e,this._unconsume()}},{key:"_consumeSequenceIfMatch",value:function(e,t,n){for(var r=0,i=!0,a=e.length,o=0,s=t,u=void 0;o0&&(s=this._consume(),r++),s===c.EOF){i=!1;break}if(s!==(u=e[o])&&(n||s!==qe(u))){i=!1;break}}if(!i)for(;r--;)this._unconsume();return i}},{key:"_isTempBufferEqualToScriptString",value:function(){if(this.tempBuff.length!==l.SCRIPT_STRING.length)return!1;for(var e=0;e0&&this._err(u.endTagWithAttributes),t.selfClosing&&this._err(u.endTagWithTrailingSolidus)),this.tokenQueue.push(t)}},{key:"_emitCurrentCharacterToken",value:function(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}},{key:"_emitEOFToken",value:function(){this._createEOFToken(),this._emitCurrentToken()}},{key:"_appendCharToCurrentCharacterToken",value:function(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}},{key:"_emitCodePoint",value:function(t){var n=e.CHARACTER_TOKEN;Be(t)?n=e.WHITESPACE_CHARACTER_TOKEN:t===c.NULL&&(n=e.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(n,Ge(t))}},{key:"_emitSeveralCodePoints",value:function(e){for(var t=0;t-1;){var i=s[r],a=i<7;a&&1&i&&(t=2&i?[s[++r],s[++r]]:[s[++r]],n=0);var o=this._consume();if(this.tempBuff.push(o),n++,o===c.EOF)break;r=a?4&i?Je(r,o):-1:o===i?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}},{key:"_isCharacterReferenceInAttribute",value:function(){return this.returnState===G||this.returnState===Y||this.returnState===J}},{key:"_isCharacterReferenceAttributeQuirk",value:function(e){if(!e&&this._isCharacterReferenceInAttribute()){var t=this._consume();return this._unconsume(),t===c.EQUALS_SIGN||He(t)}return!1}},{key:"_flushCodePointsConsumedAsCharacterReference",value:function(){if(this._isCharacterReferenceInAttribute())for(var e=0;e")):e===c.NULL?(this._err(u.unexpectedNullCharacter),this.state=N,this._emitChars(o.REPLACEMENT_CHARACTER)):e===c.EOF?(this._err(u.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=N,this._emitCodePoint(e))}},{key:L,value:function(e){e===c.SOLIDUS?(this.tempBuff=[],this.state=P):ze(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(M)):(this._emitChars("<"),this._reconsumeInState(N))}},{key:P,value:function(e){ze(e)?(this._createEndTagToken(),this._reconsumeInState(R)):(this._emitChars("")):e===c.NULL?(this._err(u.unexpectedNullCharacter),this.state=B,this._emitChars(o.REPLACEMENT_CHARACTER)):e===c.EOF?(this._err(u.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=B,this._emitCodePoint(e))}},{key:V,value:function(e){e===c.SOLIDUS?(this.tempBuff=[],this.state=z,this._emitChars("/")):this._reconsumeInState(B)}},{key:z,value:function(e){Be(e)||e===c.SOLIDUS||e===c.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?N:B,this._emitCodePoint(e)):Ue(e)?(this.tempBuff.push(qe(e)),this._emitCodePoint(e)):Ve(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(B)}},{key:H,value:function(e){Be(e)||(e===c.SOLIDUS||e===c.GREATER_THAN_SIGN||e===c.EOF?this._reconsumeInState(K):e===c.EQUALS_SIGN?(this._err(u.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=W):(this._createAttr(""),this._reconsumeInState(W)))}},{key:W,value:function(e){Be(e)||e===c.SOLIDUS||e===c.GREATER_THAN_SIGN||e===c.EOF?(this._leaveAttrName(K),this._unconsume()):e===c.EQUALS_SIGN?this._leaveAttrName(q):Ue(e)?this.currentAttr.name+=Ye(e):e===c.QUOTATION_MARK||e===c.APOSTROPHE||e===c.LESS_THAN_SIGN?(this._err(u.unexpectedCharacterInAttributeName),this.currentAttr.name+=Ge(e)):e===c.NULL?(this._err(u.unexpectedNullCharacter),this.currentAttr.name+=o.REPLACEMENT_CHARACTER):this.currentAttr.name+=Ge(e)}},{key:K,value:function(e){Be(e)||(e===c.SOLIDUS?this.state=Q:e===c.EQUALS_SIGN?this.state=q:e===c.GREATER_THAN_SIGN?(this.state=p,this._emitCurrentToken()):e===c.EOF?(this._err(u.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(W)))}},{key:q,value:function(e){Be(e)||(e===c.QUOTATION_MARK?this.state=G:e===c.APOSTROPHE?this.state=Y:e===c.GREATER_THAN_SIGN?(this._err(u.missingAttributeValue),this.state=p,this._emitCurrentToken()):this._reconsumeInState(J))}},{key:G,value:function(e){e===c.QUOTATION_MARK?this.state=$:e===c.AMPERSAND?(this.returnState=G,this.state=Ae):e===c.NULL?(this._err(u.unexpectedNullCharacter),this.currentAttr.value+=o.REPLACEMENT_CHARACTER):e===c.EOF?(this._err(u.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ge(e)}},{key:Y,value:function(e){e===c.APOSTROPHE?this.state=$:e===c.AMPERSAND?(this.returnState=Y,this.state=Ae):e===c.NULL?(this._err(u.unexpectedNullCharacter),this.currentAttr.value+=o.REPLACEMENT_CHARACTER):e===c.EOF?(this._err(u.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ge(e)}},{key:J,value:function(e){Be(e)?this._leaveAttrValue(H):e===c.AMPERSAND?(this.returnState=J,this.state=Ae):e===c.GREATER_THAN_SIGN?(this._leaveAttrValue(p),this._emitCurrentToken()):e===c.NULL?(this._err(u.unexpectedNullCharacter),this.currentAttr.value+=o.REPLACEMENT_CHARACTER):e===c.QUOTATION_MARK||e===c.APOSTROPHE||e===c.LESS_THAN_SIGN||e===c.EQUALS_SIGN||e===c.GRAVE_ACCENT?(this._err(u.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=Ge(e)):e===c.EOF?(this._err(u.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ge(e)}},{key:$,value:function(e){Be(e)?this._leaveAttrValue(H):e===c.SOLIDUS?this._leaveAttrValue(Q):e===c.GREATER_THAN_SIGN?(this._leaveAttrValue(p),this._emitCurrentToken()):e===c.EOF?(this._err(u.eofInTag),this._emitEOFToken()):(this._err(u.missingWhitespaceBetweenAttributes),this._reconsumeInState(H))}},{key:Q,value:function(e){e===c.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=p,this._emitCurrentToken()):e===c.EOF?(this._err(u.eofInTag),this._emitEOFToken()):(this._err(u.unexpectedSolidusInTag),this._reconsumeInState(H))}},{key:X,value:function(e){e===c.GREATER_THAN_SIGN?(this.state=p,this._emitCurrentToken()):e===c.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===c.NULL?(this._err(u.unexpectedNullCharacter),this.currentToken.data+=o.REPLACEMENT_CHARACTER):this.currentToken.data+=Ge(e)}},{key:Z,value:function(e){this._consumeSequenceIfMatch(l.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=ee):this._consumeSequenceIfMatch(l.DOCTYPE_STRING,e,!1)?this.state=le:this._consumeSequenceIfMatch(l.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=ke:(this._err(u.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=X):this._ensureHibernation()||(this._err(u.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(X))}},{key:ee,value:function(e){e===c.HYPHEN_MINUS?this.state=te:e===c.GREATER_THAN_SIGN?(this._err(u.abruptClosingOfEmptyComment),this.state=p,this._emitCurrentToken()):this._reconsumeInState(ne)}},{key:te,value:function(e){e===c.HYPHEN_MINUS?this.state=ue:e===c.GREATER_THAN_SIGN?(this._err(u.abruptClosingOfEmptyComment),this.state=p,this._emitCurrentToken()):e===c.EOF?(this._err(u.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ne))}},{key:ne,value:function(e){e===c.HYPHEN_MINUS?this.state=se:e===c.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=re):e===c.NULL?(this._err(u.unexpectedNullCharacter),this.currentToken.data+=o.REPLACEMENT_CHARACTER):e===c.EOF?(this._err(u.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=Ge(e)}},{key:re,value:function(e){e===c.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=ie):e===c.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(ne)}},{key:ie,value:function(e){e===c.HYPHEN_MINUS?this.state=ae:this._reconsumeInState(ne)}},{key:ae,value:function(e){e===c.HYPHEN_MINUS?this.state=oe:this._reconsumeInState(se)}},{key:oe,value:function(e){e!==c.GREATER_THAN_SIGN&&e!==c.EOF&&this._err(u.nestedComment),this._reconsumeInState(ue)}},{key:se,value:function(e){e===c.HYPHEN_MINUS?this.state=ue:e===c.EOF?(this._err(u.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ne))}},{key:ue,value:function(e){e===c.GREATER_THAN_SIGN?(this.state=p,this._emitCurrentToken()):e===c.EXCLAMATION_MARK?this.state=ce:e===c.HYPHEN_MINUS?this.currentToken.data+="-":e===c.EOF?(this._err(u.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(ne))}},{key:ce,value:function(e){e===c.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=se):e===c.GREATER_THAN_SIGN?(this._err(u.incorrectlyClosedComment),this.state=p,this._emitCurrentToken()):e===c.EOF?(this._err(u.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(ne))}},{key:le,value:function(e){Be(e)?this.state=de:e===c.GREATER_THAN_SIGN?this._reconsumeInState(de):e===c.EOF?(this._err(u.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(u.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(de))}},{key:de,value:function(e){Be(e)||(Ue(e)?(this._createDoctypeToken(Ye(e)),this.state=pe):e===c.NULL?(this._err(u.unexpectedNullCharacter),this._createDoctypeToken(o.REPLACEMENT_CHARACTER),this.state=pe):e===c.GREATER_THAN_SIGN?(this._err(u.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=p):e===c.EOF?(this._err(u.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(Ge(e)),this.state=pe))}},{key:pe,value:function(e){Be(e)?this.state=fe:e===c.GREATER_THAN_SIGN?(this.state=p,this._emitCurrentToken()):Ue(e)?this.currentToken.name+=Ye(e):e===c.NULL?(this._err(u.unexpectedNullCharacter),this.currentToken.name+=o.REPLACEMENT_CHARACTER):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=Ge(e)}},{key:fe,value:function(e){Be(e)||(e===c.GREATER_THAN_SIGN?(this.state=p,this._emitCurrentToken()):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(l.PUBLIC_STRING,e,!1)?this.state=he:this._consumeSequenceIfMatch(l.SYSTEM_STRING,e,!1)?this.state=be:this._ensureHibernation()||(this._err(u.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(xe)))}},{key:he,value:function(e){Be(e)?this.state=ge:e===c.QUOTATION_MARK?(this._err(u.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=me):e===c.APOSTROPHE?(this._err(u.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=_e):e===c.GREATER_THAN_SIGN?(this._err(u.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=p,this._emitCurrentToken()):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(u.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(xe))}},{key:ge,value:function(e){Be(e)||(e===c.QUOTATION_MARK?(this.currentToken.publicId="",this.state=me):e===c.APOSTROPHE?(this.currentToken.publicId="",this.state=_e):e===c.GREATER_THAN_SIGN?(this._err(u.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=p,this._emitCurrentToken()):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(u.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(xe)))}},{key:me,value:function(e){e===c.QUOTATION_MARK?this.state=ve:e===c.NULL?(this._err(u.unexpectedNullCharacter),this.currentToken.publicId+=o.REPLACEMENT_CHARACTER):e===c.GREATER_THAN_SIGN?(this._err(u.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=p):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ge(e)}},{key:_e,value:function(e){e===c.APOSTROPHE?this.state=ve:e===c.NULL?(this._err(u.unexpectedNullCharacter),this.currentToken.publicId+=o.REPLACEMENT_CHARACTER):e===c.GREATER_THAN_SIGN?(this._err(u.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=p):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ge(e)}},{key:ve,value:function(e){Be(e)?this.state=ye:e===c.GREATER_THAN_SIGN?(this.state=p,this._emitCurrentToken()):e===c.QUOTATION_MARK?(this._err(u.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=Ee):e===c.APOSTROPHE?(this._err(u.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=Ce):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(u.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(xe))}},{key:ye,value:function(e){Be(e)||(e===c.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=p):e===c.QUOTATION_MARK?(this.currentToken.systemId="",this.state=Ee):e===c.APOSTROPHE?(this.currentToken.systemId="",this.state=Ce):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(u.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(xe)))}},{key:be,value:function(e){Be(e)?this.state=De:e===c.QUOTATION_MARK?(this._err(u.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=Ee):e===c.APOSTROPHE?(this._err(u.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=Ce):e===c.GREATER_THAN_SIGN?(this._err(u.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=p,this._emitCurrentToken()):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(u.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(xe))}},{key:De,value:function(e){Be(e)||(e===c.QUOTATION_MARK?(this.currentToken.systemId="",this.state=Ee):e===c.APOSTROPHE?(this.currentToken.systemId="",this.state=Ce):e===c.GREATER_THAN_SIGN?(this._err(u.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=p,this._emitCurrentToken()):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(u.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(xe)))}},{key:Ee,value:function(e){e===c.QUOTATION_MARK?this.state=Se:e===c.NULL?(this._err(u.unexpectedNullCharacter),this.currentToken.systemId+=o.REPLACEMENT_CHARACTER):e===c.GREATER_THAN_SIGN?(this._err(u.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=p):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ge(e)}},{key:Ce,value:function(e){e===c.APOSTROPHE?this.state=Se:e===c.NULL?(this._err(u.unexpectedNullCharacter),this.currentToken.systemId+=o.REPLACEMENT_CHARACTER):e===c.GREATER_THAN_SIGN?(this._err(u.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=p):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ge(e)}},{key:Se,value:function(e){Be(e)||(e===c.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=p):e===c.EOF?(this._err(u.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(u.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(xe)))}},{key:xe,value:function(e){e===c.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=p):e===c.NULL?this._err(u.unexpectedNullCharacter):e===c.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}},{key:ke,value:function(e){e===c.RIGHT_SQUARE_BRACKET?this.state=Te:e===c.EOF?(this._err(u.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}},{key:Te,value:function(e){e===c.RIGHT_SQUARE_BRACKET?this.state=we:(this._emitChars("]"),this._reconsumeInState(ke))}},{key:we,value:function(e){e===c.GREATER_THAN_SIGN?this.state=p:e===c.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(ke))}},{key:Ae,value:function(e){this.tempBuff=[c.AMPERSAND],e===c.NUMBER_SIGN?(this.tempBuff.push(e),this.state=Ie):He(e)?this._reconsumeInState(Oe):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}},{key:Oe,value:function(e){var t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[c.AMPERSAND];else if(t){var n=this.tempBuff[this.tempBuff.length-1]===c.SEMICOLON;this._isCharacterReferenceAttributeQuirk(n)||(n||this._errOnNextCodePoint(u.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=Ne}},{key:Ne,value:function(e){He(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=Ge(e):this._emitCodePoint(e):(e===c.SEMICOLON&&this._err(u.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}},{key:Ie,value:function(e){this.charRefCode=0,e===c.LATIN_SMALL_X||e===c.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=Fe):this._reconsumeInState(Le)}},{key:Fe,value:function(e){!function(e){return je(e)||We(e)||Ke(e)}(e)?(this._err(u.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState(Pe)}},{key:Le,value:function(e){je(e)?this._reconsumeInState(Re):(this._err(u.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}},{key:Pe,value:function(e){We(e)?this.charRefCode=16*this.charRefCode+e-55:Ke(e)?this.charRefCode=16*this.charRefCode+e-87:je(e)?this.charRefCode=16*this.charRefCode+e-48:e===c.SEMICOLON?this.state=Me:(this._err(u.missingSemicolonAfterCharacterReference),this._reconsumeInState(Me))}},{key:Re,value:function(e){je(e)?this.charRefCode=10*this.charRefCode+e-48:e===c.SEMICOLON?this.state=Me:(this._err(u.missingSemicolonAfterCharacterReference),this._reconsumeInState(Me))}},{key:Me,value:function(){if(this.charRefCode===c.NULL)this._err(u.nullCharacterReference),this.charRefCode=c.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(u.characterReferenceOutsideUnicodeRange),this.charRefCode=c.REPLACEMENT_CHARACTER;else if(o.isSurrogate(this.charRefCode))this._err(u.surrogateCharacterReference),this.charRefCode=c.REPLACEMENT_CHARACTER;else if(o.isUndefinedCodePoint(this.charRefCode))this._err(u.noncharacterCharacterReference);else if(o.isControlCodePoint(this.charRefCode)||this.charRefCode===c.CARRIAGE_RETURN){this._err(u.controlCharacterReference);var e=d[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}]),e}();$e.CHARACTER_TOKEN="CHARACTER_TOKEN",$e.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",$e.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",$e.START_TAG_TOKEN="START_TAG_TOKEN",$e.END_TAG_TOKEN="END_TAG_TOKEN",$e.COMMENT_TOKEN="COMMENT_TOKEN",$e.DOCTYPE_TOKEN="DOCTYPE_TOKEN",$e.EOF_TOKEN="EOF_TOKEN",$e.HIBERNATION_TOKEN="HIBERNATION_TOKEN",$e.MODE={DATA:p,RCDATA:f,RAWTEXT:h,SCRIPT_DATA:g,PLAINTEXT:m},$e.getTokenAttr=function(e,t){for(var n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null},e.exports=$e},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(200),i=n(245);function a(e,t,n){return(a=Object(i.a)()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&Object(r.a)(a,n.prototype),a}).apply(null,arguments)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(6),i=n(14),a=n(187),o=n(60),s=n(70),u=n(29),c="**",l="[/\\\\]",d="[^/\\\\]",p=/\//g;function f(e){switch(e){case 0:return"";case 1:return"".concat(d,"*?");default:return"(?:".concat(l,"|").concat(d,"+").concat(l,"|").concat(l).concat(d,"+)*?")}}function h(e,t){if(!e)return[];var n,i=[],a=!1,o=!1,s="",u=Object(r.a)(e);try{for(u.s();!(n=u.n()).done;){var c=n.value;switch(c){case t:if(!a&&!o){i.push(s),s="";continue}break;case"{":a=!0;break;case"}":a=!1;break;case"[":o=!0;break;case"]":o=!1}s+=c}}catch(l){u.e(l)}finally{u.f()}return s&&i.push(s),i}function g(e){if(!e)return"";var t="",n=h(e,"/");if(n.every((function(e){return e===c})))t=".*";else{var a=!1;n.forEach((function(e,o){if(e!==c){var s,u=!1,p="",m=!1,_="",v=Object(r.a)(e);try{for(v.s();!(s=v.n()).done;){var y=s.value;if("}"!==y&&u)p+=y;else if(!m||"]"===y&&_)switch(y){case"{":u=!0;continue;case"[":m=!0;continue;case"}":var b=h(p,","),D="(?:".concat(b.map((function(e){return g(e)})).join("|"),")");t+=D,u=!1,p="";break;case"]":t+="["+_+"]",m=!1,_="";break;case"?":t+=d;continue;case"*":t+=f(1);continue;default:t+=i.u(y)}else{_+="-"===y?y:"^"!==y&&"!"!==y||_?"/"===y?"":i.u(y):"^"}}}catch(E){v.e(E)}finally{v.f()}o1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return C;if("string"===typeof e||O(e)){var n=x(e,t);if(n===S)return C;var r=function(e,t){return!!n(e,t)};return n.allBasenames&&(r.allBasenames=n.allBasenames),n.allPaths&&(r.allPaths=n.allPaths),r}return N(e,t)}(e)(t,void 0,n)}function O(e){var t=e;return t&&"string"===typeof t.base&&"string"===typeof t.pattern}function N(e,t){var n=I(Object.getOwnPropertyNames(e).map((function(n){return function(e,t,n){if(!1===t)return S;var r=x(e,n);if(r===S)return S;if("boolean"===typeof t)return r;if(t){var i=t.when;if("string"===typeof i){var a=function(t,n,a,o){if(!o||!r(t,n))return null;var s=o(i.replace("$(basename)",a));return Object(u.i)(s)?s.then((function(t){return t?e:null})):s?e:null};return a.requiresSiblings=!0,a}}return r}(n,e[n],t)})).filter((function(e){return e!==S}))),r=n.length;if(!r)return S;if(!n.some((function(e){return!!e.requiresSiblings}))){if(1===r)return n[0];var i=function(e,t){for(var r=0,i=n.length;r0;n--){var a=e.charCodeAt(n-1);if(47===a||92===a)break}t=e.substr(n)}var o=i.indexOf(t);return-1!==o?r[o]:null};s.basenames=i,s.patterns=r,s.allBasenames=i;var u=e.filter((function(e){return!e.basenames}));return u.push(s),u}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var r=n(1),i=n(0),a=n(136),o=function e(t,n){Object(i.a)(this,e),this.index=t,this.remainder=n},s=function(){function e(t){Object(i.a)(this,e),this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return Object(r.a)(e,[{key:"insertValues",value:function(e,t){e=Object(a.a)(e);var n=this.values,r=this.prefixSum,i=t.length;return 0!==i&&(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}},{key:"changeValue",value:function(e,t){return e=Object(a.a)(e),t=Object(a.a)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;var i=n.length-e;return t>=i&&(t=i),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}},{key:"getTotalValue",value:function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)}},{key:"getAccumulatedValue",value:function(e){return e<0?0:(e=Object(a.a)(e),this._getAccumulatedValue(e))}},{key:"_getAccumulatedValue",value: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]}},{key:"getIndexOf",value:function(e){e=Math.floor(e),this.getTotalValue();for(var t=0,n=this.values.length-1,r=0,i=0,a=0;t<=n;)if(r=t+(n-t)/2|0,e<(a=(i=this.prefixSum[r])-this.values[r]))n=r-1;else{if(!(e>=i))break;t=r+1}return new o(r,e-a)}}]),e}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var r=n(0),i=n(1),a=Object.prototype.hasOwnProperty;function o(e,t){var n=function(n){if(a.call(e,n)&&!1===t({key:n,value:e[n]},(function(){delete e[n]})))return{v:void 0}};for(var r in e){var i=n(r);if("object"===typeof i)return i.v}}var s=function(){function e(){Object(r.a)(this,e),this.map=new Map}return Object(i.a)(e,[{key:"add",value:function(e,t){var n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}},{key:"delete",value:function(e,t){var n=this.map.get(e);n&&(n.delete(t),0===n.size&&this.map.delete(e))}},{key:"forEach",value:function(e,t){var n=this.map.get(e);n&&n.forEach(t)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),i=n(1),a=n(17),o=n(15),s=n(4),u=n(5),c=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this)).referenceDomElement=e,o.changeCallback=a,o.width=-1,o.height=-1,o.resizeObserver=null,o.measureReferenceDomElementToken=-1,o.measureReferenceDomElement(!1,i),o}return Object(i.a)(n,[{key:"dispose",value:function(){this.stopObserving(),Object(a.a)(Object(o.a)(n.prototype),"dispose",this).call(this)}},{key:"getWidth",value:function(){return this.width}},{key:"getHeight",value:function(){return this.height}},{key:"startObserving",value:function(){var e=this;"undefined"!==typeof ResizeObserver?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver((function(t){t&&t[0]&&t[0].contentRect?e.observe({width:t[0].contentRect.width,height:t[0].contentRect.height}):e.observe()})),this.resizeObserver.observe(this.referenceDomElement)):-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval((function(){return e.observe()}),100))}},{key:"stopObserving",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}},{key:"observe",value:function(e){this.measureReferenceDomElement(!0,e)}},{key:"measureReferenceDomElement",value:function(e,t){var n=0,r=0;t?(n=t.width,r=t.height):this.referenceDomElement&&(n=this.referenceDomElement.clientWidth,r=this.referenceDomElement.clientHeight),n=Math.max(5,n),r=Math.max(5,r),this.width===n&&this.height===r||(this.width=n,this.height=r,e&&this.changeCallback())}}]),n}(n(7).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n(1),a=function(){function e(t,n,i,a,o,s){Object(r.a)(this,e),this.id=t,this.label=n,this.alias=i,this._precondition=a,this._run=o,this._contextKeyService=s}return Object(i.a)(e,[{key:"isSupported",value:function(){return this._contextKeyService.contextMatchesRules(this._precondition)}},{key:"run",value:function(){return this.isSupported()?this._run():Promise.resolve(void 0)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(28),i=Object(r.c)("markerDecorationsService")},function(e,t,n){(function(t,r){var i=n(164),a=n(156),o=n(231),s=n(232),u=n(165),c=n(175),l=n(88),d=n(93),p=n(193),f=n(155),h=n(124),g=n(133);new Function("return this")(),e.exports=function(){var e={2426:function(e){"use strict";e.exports=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).onlyFirst,t=void 0!==e&&e,n=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(n,t?void 0:"g")}},3584:function(e){"use strict";var t=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t=e.match(/(?:\r?\n)/g)||[];if(0!==t.length){var n=t.filter((function(e){return"\r\n"===e})).length;return n>t.length-n?"\r\n":"\n"}};e.exports=t,e.exports.graceful=function(e){return"string"==typeof e&&t(e)||"\n"}},541:function(e){"use strict";e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},2240:function(e){"use strict";e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},8051:function(e){e.exports=function(e,t){return(t="number"==typeof t?t:1/0)?function e(n,r){return n.reduce((function(n,i){return Array.isArray(i)&&r2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",i=0):i=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),a=s,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=s,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var i={resolve:function(){for(var e,i="",a=!1,o=arguments.length-1;o>=-1&&!a;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=t.cwd()),s=e),n(s),0!==s.length&&(i=s+"/"+i,a=47===s.charCodeAt(0))}return i=r(i,!a),a?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=i.resolve(e))===(t=i.resolve(t)))return"";for(var r=1;rc){if(47===t.charCodeAt(s+d))return t.slice(s+d+1);if(0===d)return t.slice(s+d)}else o>c&&(47===e.charCodeAt(r+d)?l=d:0===d&&(l=0));break}var p=e.charCodeAt(r+d);if(p!==t.charCodeAt(s+d))break;47===p&&(l=d)}var f="";for(d=r+l+1;d<=a;++d)d!==a&&47!==e.charCodeAt(d)||(0===f.length?f+="..":f+="/..");return f.length>0?f+t.slice(s+l):(s+=l,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,i=-1,a=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');n(e);var r,i=0,a=-1,o=!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,u=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!o){i=r+1;break}}else-1===u&&(o=!1,u=r+1),s>=0&&(c===t.charCodeAt(s)?-1==--s&&(a=r):(s=-1,a=u))}return i===a?a=u:-1===a&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===a&&(o=!1,a=r+1);return-1===a?"":e.slice(i,a)},extname:function(e){n(e);for(var t=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===i&&(a=!1,i=s+1),46===u?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!a){r=s+1;break}}return-1===t||-1===i||0===o||1===o&&t===i-1&&t===r+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}("/",e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,i=e.charCodeAt(0),a=47===i;a?(t.root="/",r=1):r=0;for(var o=-1,s=0,u=-1,c=!0,l=e.length-1,d=0;l>=r;--l)if(47!==(i=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===i?-1===o?o=l:1!==d&&(d=1):-1!==o&&(d=-1);else if(!c){s=l+1;break}return-1===o||-1===u||0===d||1===d&&o===u-1&&o===s+1?-1!==u&&(t.base=t.name=0===s&&a?e.slice(1,u):e.slice(s,u)):(0===s&&a?(t.name=e.slice(1,o),t.base=e.slice(1,u)):(t.name=e.slice(s,o),t.base=e.slice(s,u)),t.ext=e.slice(o,u)),s>0?t.dir=e.slice(0,s-1):a&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i},8681:function(e,t,n){var r=n(3102),i=n(7116),a=n(1101).isInlineComment,o=n(3295).interpolation,s=n(5953).isMixinToken,m=n(1330),_=n(5255),v=/(!\s*important)$/i;e.exports=function(e){"use strict";h(n,e);var t=g(n);function n(){var e;l(this,n);for(var r=arguments.length,i=new Array(r),a=0;a3)&&i>0){var o=e.reduce((function(e,t,n){return")"===t[0]?n:e})),s=e.slice(i,o+i).map((function(e){return e[1]})).join(""),l=e.slice(i),d=u(l,1)[0],p=[d[2],d[3]],f=e.slice(o,o+1),h=u(f,1)[0],g=[h[2],h[3]],m=["brackets",s].concat(p,g),_=e.slice(0,i),y=e.slice(o+1);(e=_).push(m),e=e.concat(y)}var b,D=[],E=c(e);try{for(E.s();!(b=E.n()).done;){var C=b.value;if(("!"===C[1]||D.length)&&D.push(C),"important"===C[1])break}}catch(L){E.e(L)}finally{E.f()}if(D.length){var S=D[0],x=e.indexOf(S),k=D[D.length-1],T=[S[2],S[3]],w=[k[4],k[5]],A=["word",D.map((function(e){return e[1]})).join("")].concat(T,w);e.splice(x,D.length,A)}var O=e.findIndex((function(e){return v.test(e[1])}));O>0&&(t=e[O],a=u(t,2)[1],e.splice(O,1));var N,I=c(e.reverse());try{for(I.s();!(N=I.n()).done;){var F=N.value;this.tokenizer.back(F)}}catch(L){I.e(L)}finally{I.f()}this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=n,a&&(this.lastNode.important=!0,this.lastNode.raws.important=a)}},{key:"other",value:function(e){a.bind(this)(e)||p(f(n.prototype),"other",this).call(this,e)}},{key:"rule",value:function(e){var t=e[e.length-1],r=e[e.length-2];if("at-word"===r[0]&&"{"===t[0]&&(this.tokenizer.back(t),o.bind(this)(r))){var i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);var a,s=c(e.reverse());try{for(s.s();!(a=s.n()).done;){var u=a.value;this.tokenizer.back(u)}}catch(l){s.e(l)}finally{s.f()}}else p(f(n.prototype),"rule",this).call(this,e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}},{key:"unknownWord",value:function(e){var t=u(e,1)[0];"each"!==e[0][1]||"("!==e[1][0]?s(t)?this.mixin(e):p(f(n.prototype),"unknownWord",this).call(this,e):this.each(e)}}]),n}(i)},3406:function(e,t,n){var r=n(5701);e.exports=function(e){"use strict";h(n,e);var t=g(n);function n(){return l(this,n),t.apply(this,arguments)}return d(n,[{key:"atrule",value:function(e,t){if(e.mixin||e.variable||e.function){var r=e.function?"":e.raws.identifier||"@",i="".concat(r).concat(e.name),a=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(a=e.value),void 0!==e.raws.afterName?i+=e.raws.afterName:a&&(i+=" "),e.nodes)this.block(e,i+a+o);else{var s=(e.raws.between||"")+o+(t?";":"");this.builder(i+a+s,e)}}else p(f(n.prototype),"atrule",this).call(this,e,t)}},{key:"comment",value:function(e){if(e.inline){var t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("//".concat(t).concat(e.text).concat(r),e)}else p(f(n.prototype),"comment",this).call(this,e)}}]),n}(r)},7371:function(e,t,n){var r=n(2993),i=n(8681),a=n(3406);e.exports={parse:function(e,t){var n=new r(e,t),a=new i(n);return a.parse(),a.root},stringify:function(e,t){new a(t).stringify(e)},nodeToString:function(t){var n="";return e.exports.stringify(t,(function(e){n+=e})),n}}},1330:function(e,t,n){var r=n(1157),i=/^url\((.+)\)/;e.exports=function(e){var t=e.name,n=e.params,a=void 0===n?"":n;if("import"===t&&a.length){e.import=!0;var o=r({css:a});for(e.filename=a.replace(i,"$1");!o.endOfFile();){var s=o.nextToken(),c=u(s,2),l=c[0],d=c[1];if("word"===l&&"url"===d)return;if("brackets"===l){e.options=d,e.filename=a.replace(d,"").trim();break}}}}},1101:function(e,t,n){var r=n(1157),i=n(2993);e.exports={isInlineComment:function(t){if("word"===t[0]&&"//"===t[1].slice(0,2)){for(var n,a=t,o=[];t;){if(/\r?\n/.test(t[1])){if(/['"].*\r?\n/.test(t[1])){o.push(t[1].substring(0,t[1].indexOf("\n")));var s=t[1].substring(t[1].indexOf("\n"));s+=this.input.css.valueOf().substring(this.tokenizer.position()),this.input=new i(s),this.tokenizer=r(this.input)}else this.tokenizer.back(t);break}o.push(t[1]),n=t,t=this.tokenizer.nextToken({ignoreUnclosed:!0})}var u=["comment",o.join(""),a[2],a[3],n[2],n[3]];return this.inlineComment(u),!0}if("/"===t[1]){var c=this.tokenizer.nextToken({ignoreUnclosed:!0});if("comment"===c[0]&&/^\/\*/.test(c[1]))return c[0]="word",c[1]=c[1].slice(1),t[1]="//",this.tokenizer.back(c),e.exports.isInlineComment.bind(this)(t)}return!1}}},3295:function(e){e.exports={interpolation:function(e){var t=e,n=[e],r=["word","{","}"];if(e=this.tokenizer.nextToken(),t[1].length>1||"{"!==e[0])return this.tokenizer.back(e),!1;for(;e&&r.includes(e[0]);)n.push(e),e=this.tokenizer.nextToken();var i=n.map((function(e){return e[1]}));t=n[0];var a=n.pop(),o=[t[2],t[3]],s=[a[4]||a[2],a[5]||a[3]],u=["word",i.join("")].concat(o,s);return this.tokenizer.back(e),this.tokenizer.back(u),!0}}},5953:function(e){var t=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,n=/\.[0-9]/;e.exports={isMixinToken:function(e){var r=u(e,2)[1],i=u(r,1)[0];return("."===i||"#"===i)&&!1===t.test(r)&&!1===n.test(r)}}},5255:function(e){var t=/:$/,n=/^:(\s+)?/;e.exports=function(e){var r=e.name,i=e.params,a=void 0===i?"":i;if(":"===e.name.slice(-1)){if(t.test(r)){var o=r.match(t),s=u(o,1)[0];e.name=r.replace(s,""),e.raws.afterName=s+(e.raws.afterName||""),e.variable=!0,e.value=e.params}if(n.test(a)){var c=a.match(n),l=u(c,1)[0];e.value=a.replace(l,""),e.raws.afterName=(e.raws.afterName||"")+l,e.variable=!0}}}},8322:function(e,t,n){"use strict";t.Z=function(e){return new i.default({nodes:(0,a.parseMediaList)(e),type:"media-query-list",value:e.trim()})};var r,i=(r=n(9066))&&r.__esModule?r:{default:r},a=n(7625)},9066:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(7680))&&r.__esModule?r:{default:r};function a(e){var t=this;this.constructor(e),this.nodes=e.nodes,void 0===this.after&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),void 0===this.before&&(this.before=this.nodes.length>0?this.nodes[0].before:""),void 0===this.sourceIndex&&(this.sourceIndex=this.before.length),this.nodes.forEach((function(e){e.parent=t}))}a.prototype=Object.create(i.default.prototype),a.constructor=i.default,a.prototype.walk=function(e,t){for(var n="string"==typeof e||e instanceof RegExp,r=n?t:e,i="string"==typeof e?new RegExp(e):e,a=0;a0;){var l=e[u];"("===l&&c++,")"===l&&c--,u++}t.unshift(new r.default({type:"url",value:e.substring(0,u).trim(),sourceIndex:o[1].length,before:o[1],after:/^(\s*)/.exec(e.substring(u))[1]})),n=u}for(var d=n;d0&&(n[d-1].after=u.before),void 0===u.type){if(d>0){if("media-feature-expression"===n[d-1].type){u.type="keyword";continue}if("not"===n[d-1].value||"only"===n[d-1].value){u.type="media-type";continue}if("and"===n[d-1].value){u.type="media-feature-expression";continue}"media-type"===n[d-1].type&&(n[d+1]?u.type="media-feature-expression"===n[d+1].type?"keyword":"media-feature-expression":u.type="media-feature-expression")}if(0===d){if(!n[d+1]){u.type="media-type";continue}if(n[d+1]&&("media-feature-expression"===n[d+1].type||"keyword"===n[d+1].type)){u.type="media-type";continue}if(n[d+2]){if("media-feature-expression"===n[d+2].type){u.type="media-type",n[d+1].type="keyword";continue}if("keyword"===n[d+2].type){u.type="keyword",n[d+1].type="media-type";continue}}if(n[d+3]&&"media-feature-expression"===n[d+3].type){u.type="keyword",n[d+1].type="media-type",n[d+2].type="keyword";continue}}}return n}},5822:function(e,t,n){"use strict";var r=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type="decl",n.isNested=!0,n.nodes||(n.nodes=[]),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(n(1204));e.exports=r},1945:function(e,t,n){"use strict";var r=n(2993),i=n(1713);e.exports=function(e,t){var n=new r(e,t),a=new i(n);return a.parse(),a.root}},1713:function(e,t,n){"use strict";var r=n(3102),i=n(7116),a=n(5822),o=n(6256),s=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=i.prototype;return s.createTokenizer=function(){this.tokenizer=o(this.input)},s.rule=function(t){var n=!1,r=0,i="",o=t,s=Array.isArray(o),u=0;for(o=s?o:o[Symbol.iterator]();;){var c;if(s){if(u>=o.length)break;c=o[u++]}else{if((u=o.next()).done)break;c=u.value}var l=c;if(n)"comment"!==l[0]&&"{"!==l[0]&&(i+=l[1]);else{if("space"===l[0]&&-1!==l[1].indexOf("\n"))break;"("===l[0]?r+=1:")"===l[0]?r-=1:0===r&&":"===l[0]&&(n=!0)}}if(!n||""===i.trim()||/^[a-zA-Z-:#]/.test(i))e.prototype.rule.call(this,t);else{t.pop();var d=new a;this.init(d);var p,f=t[t.length-1];for(f[4]?d.source.end={line:f[4],column:f[5]}:d.source.end={line:f[2],column:f[3]};"word"!==t[0][0];)d.raws.before+=t.shift()[1];for(d.source.start={line:t[0][2],column:t[0][3]},d.prop="";t.length;){var h=t[0][0];if(":"===h||"space"===h||"comment"===h)break;d.prop+=t.shift()[1]}for(d.raws.between="";t.length;){if(":"===(p=t.shift())[0]){d.raws.between+=p[1];break}d.raws.between+=p[1]}"_"!==d.prop[0]&&"*"!==d.prop[0]||(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1)),d.raws.between+=this.spacesAndCommentsFromStart(t),this.precheckMissedSemicolon(t);for(var g=t.length-1;g>0;g--){if("!important"===(p=t[g])[1]){d.important=!0;var m=this.stringFrom(t,g);" !important"!==(m=this.spacesFromEnd(t)+m)&&(d.raws.important=m);break}if("important"===p[1]){for(var _=t.slice(0),v="",y=g;y>0;y--){var b=_[y][0];if(0===v.trim().indexOf("!")&&"space"!==b)break;v=_.pop()[1]+v}0===v.trim().indexOf("!")&&(d.important=!0,d.raws.important=v,t=_)}if("space"!==p[0]&&"comment"!==p[0])break}this.raw(d,"value",t),-1!==d.value.indexOf(":")&&this.checkMissedSemicolon(t),this.current=d}},s.comment=function(t){if("inline"===t[6]){var n=new r;this.init(n,t[2],t[3]),n.raws.inline=!0,n.source.end={line:t[4],column:t[5]};var i=t[1].slice(2);if(/^\s*$/.test(i))n.text="",n.raws.left=i,n.raws.right="";else{var a=i.match(/^(\s*)([^]*[^\s])(\s*)$/),o=a[2].replace(/(\*\/|\/\*)/g,"*//*");n.text=o,n.raws.left=a[1],n.raws.right=a[3],n.raws.text=a[2]}}else e.prototype.comment.call(this,t)},s.raw=function(t,n,r){if(e.prototype.raw.call(this,t,n,r),t.raws[n]){var i=t.raws[n].raw;t.raws[n].raw=r.reduce((function(e,t){return"comment"===t[0]&&"inline"===t[6]?e+"/*"+t[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*")+"*/":e+t[1]}),""),i!==t.raws[n].raw&&(t.raws[n].scss=i)}},i}(i);e.exports=s},9235:function(e,t,n){"use strict";var r=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.comment=function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");if(e.raws.inline){var r=e.raws.text||e.text;this.builder("//"+t+r+n,e)}else this.builder("/*"+t+e.text+n+"*/",e)},i.decl=function(t,n){if(t.isNested){var r,i=this.raw(t,"between","colon"),a=t.prop+i+this.rawValue(t,"value");t.important&&(a+=t.raws.important||" !important"),this.builder(a+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}else e.prototype.decl.call(this,t,n)},i.rawValue=function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.scss?r.scss:r.raw:n},r}(n(5701));e.exports=r},4933:function(e,t,n){"use strict";var r=n(9235);e.exports=function(e,t){new r(t).stringify(e)}},304:function(e,t,n){"use strict";var r=n(4933),i=n(1945);e.exports={parse:i,stringify:r}},6256:function(e){"use strict";var t="'".charCodeAt(0),n='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),a="\n".charCodeAt(0),o=" ".charCodeAt(0),s="\f".charCodeAt(0),u="\t".charCodeAt(0),c="\r".charCodeAt(0),l="[".charCodeAt(0),d="]".charCodeAt(0),p="(".charCodeAt(0),f=")".charCodeAt(0),h="{".charCodeAt(0),g="}".charCodeAt(0),m=";".charCodeAt(0),_="*".charCodeAt(0),v=":".charCodeAt(0),y="@".charCodeAt(0),b=",".charCodeAt(0),D="#".charCodeAt(0),E=/[ \n\t\r\f{}()'"\\;/[\]#]/g,C=/[ \n\t\r\f(){}:;@!'"\\\][#]|\/(?=\*)/g,S=/.[\\/("'\n]/,x=/[a-f0-9]/i,k=/[\r\f\n]/g;e.exports=function(e,T){void 0===T&&(T={});var w,A,O,N,I,F,L,P,R,M,B,j,U,V,z=e.css.valueOf(),H=T.ignoreErrors,W=z.length,K=-1,q=1,G=0,Y=[],J=[];function $(t){throw e.error("Unclosed "+t,q,G-K)}function Q(){for(var e=1,i=!1,a=!1;e>0;)A+=1,z.length<=A&&$("interpolation"),w=z.charCodeAt(A),j=z.charCodeAt(A+1),i?a||w!==i?w===r?a=!M:a&&(a=!1):(i=!1,a=!1):w===t||w===n?i=w:w===g?e-=1:w===D&&j===h&&(e+=1)}return{back:function(e){J.push(e)},nextToken:function(){if(J.length)return J.pop();if(!(G>=W)){switch(((w=z.charCodeAt(G))===a||w===s||w===c&&z.charCodeAt(G+1)!==a)&&(K=G,q+=1),w){case a:case o:case u:case c:case s:A=G;do{A+=1,(w=z.charCodeAt(A))===a&&(K=A,q+=1)}while(w===o||w===a||w===u||w===c||w===s);U=["space",z.slice(G,A)],G=A-1;break;case l:U=["[","[",q,G-K];break;case d:U=["]","]",q,G-K];break;case h:U=["{","{",q,G-K];break;case g:U=["}","}",q,G-K];break;case b:U=["word",",",q,G-K,q,G-K+1];break;case v:U=[":",":",q,G-K];break;case m:U=[";",";",q,G-K];break;case p:if(B=Y.length?Y.pop()[1]:"",j=z.charCodeAt(G+1),"url"===B&&j!==t&&j!==n){for(V=1,M=!1,A=G+1;A<=z.length-1;){if((j=z.charCodeAt(A))===r)M=!M;else if(j===p)V+=1;else if(j===f&&0===(V-=1))break;A+=1}F=z.slice(G,A+1),N=F.split("\n"),(I=N.length-1)>0?(P=q+I,R=A-N[I].length):(P=q,R=K),U=["brackets",F,q,G-K,P,A-R],K=R,q=P,G=A}else A=z.indexOf(")",G+1),F=z.slice(G,A+1),-1===A||S.test(F)?U=["(","(",q,G-K]:(U=["brackets",F,q,G-K,q,A-K],G=A);break;case f:U=[")",")",q,G-K];break;case t:case n:for(O=w,A=G,M=!1;A0?(P=q+I,R=A-N[I].length):(P=q,R=K),U=["string",z.slice(G,A+1),q,G-K,P,A-R],K=R,q=P,G=A;break;case y:E.lastIndex=G+1,E.test(z),A=0===E.lastIndex?z.length-1:E.lastIndex-2,U=["at-word",z.slice(G,A+1),q,G-K,q,A-K],G=A;break;case r:for(A=G,L=!0;z.charCodeAt(A+1)===r;)A+=1,L=!L;if(w=z.charCodeAt(A+1),L&&w!==i&&w!==o&&w!==a&&w!==u&&w!==c&&w!==s&&(A+=1,x.test(z.charAt(A)))){for(;x.test(z.charAt(A+1));)A+=1;z.charCodeAt(A+1)===o&&(A+=1)}U=["word",z.slice(G,A+1),q,G-K,q,A-K],G=A;break;default:j=z.charCodeAt(G+1),w===D&&j===h?(A=G,Q(),F=z.slice(G,A+1),N=F.split("\n"),(I=N.length-1)>0?(P=q+I,R=A-N[I].length):(P=q,R=K),U=["word",F,q,G-K,P,A-R],K=R,q=P,G=A):w===i&&j===_?(0===(A=z.indexOf("*/",G+2)+1)&&(H?A=z.length:$("comment")),F=z.slice(G,A+1),N=F.split("\n"),(I=N.length-1)>0?(P=q+I,R=A-N[I].length):(P=q,R=K),U=["comment",F,q,G-K,P,A-R],K=R,q=P,G=A):w===i&&j===i?(k.lastIndex=G+1,k.test(z),A=0===k.lastIndex?z.length-1:k.lastIndex-2,F=z.slice(G,A+1),U=["comment",F,q,G-K,q,A-K,"inline"],G=A):(C.lastIndex=G+1,C.test(z),A=0===C.lastIndex?z.length-1:C.lastIndex-2,U=["word",z.slice(G,A+1),q,G-K,q,A-K],Y.push(U),G=A)}return G++,U}},endOfFile:function(){return 0===J.length&&G>=W}}}},1264:function(e,t,n){"use strict";t.__esModule=!0;var r=_(n(2566)),i=_(n(616)),a=_(n(7835)),o=_(n(478)),s=_(n(4907)),u=_(n(8420)),c=_(n(7523)),l=_(n(4316)),d=_(n(6909)),p=_(n(6279)),f=_(n(439)),h=_(n(9956)),g=_(n(70)),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(8790));function _(e){return e&&e.__esModule?e:{default:e}}var v=function(e){return new r.default(e)};v.attribute=function(e){return new i.default(e)},v.className=function(e){return new a.default(e)},v.combinator=function(e){return new o.default(e)},v.comment=function(e){return new s.default(e)},v.id=function(e){return new u.default(e)},v.nesting=function(e){return new c.default(e)},v.pseudo=function(e){return new l.default(e)},v.root=function(e){return new d.default(e)},v.selector=function(e){return new p.default(e)},v.string=function(e){return new f.default(e)},v.tag=function(e){return new h.default(e)},v.universal=function(e){return new g.default(e)},Object.keys(m).forEach((function(e){"__esModule"!==e&&(v[e]=m[e])})),t.default=v,e.exports=t.default},5269:function(e,t,n){"use strict";t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;n1?(""===i[0]&&(i[0]=!0),a.attribute=this.parseValue(i[2]),a.namespace=this.parseNamespace(i[0])):a.attribute=this.parseValue(r[0]),t=new g.default(a),r[2]){var o=r[2].split(/(\s+i\s*?)$/),s=o[0].trim();t.value=this.lossy?s:o[0],o[1]&&(t.insensitive=!0,this.lossy||(t.raws.insensitive=o[1])),t.quoted="'"===s[0]||'"'===s[0],t.raws.unquoted=t.quoted?s.slice(1,-1):s}this.newNode(t),this.position++},e.prototype.combinator=function(){if("|"===this.currToken[1])return this.namespace();for(var e=new _.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position1&&e.nextToken&&"("===e.nextToken[0]&&e.error("Misplaced parenthesis.")}))}else this.error('Unexpected "'+this.currToken[0]+'" found.')},e.prototype.space=function(){var e=this.currToken;0===this.position||","===this.prevToken[0]||"("===this.prevToken[0]?(this.spaces=this.parseSpace(e[1]),this.position++):this.position===this.tokens.length-1||","===this.nextToken[0]||")"===this.nextToken[0]?(this.current.last.spaces.after=this.parseSpace(e[1]),this.position++):this.combinator()},e.prototype.string=function(){var e=this.currToken;this.newNode(new f.default({value:this.currToken[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++},e.prototype.universal=function(e){var t=this.nextToken;if(t&&"|"===t[1])return this.position++,this.namespace();this.newNode(new m.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),e),this.position++},e.prototype.splitWord=function(e,t){for(var n=this,r=this.nextToken,s=this.currToken[1];r&&"word"===r[0];){this.position++;var u=this.currToken[1];if(s+=u,u.lastIndexOf("\\")===u.length-1){var l=this.nextToken;l&&"space"===l[0]&&(s+=this.parseSpace(l[1]," "),this.position++)}r=this.nextToken}var f=(0,a.default)(s,"."),h=(0,a.default)(s,"#"),g=(0,a.default)(s,"#{");g.length&&(h=h.filter((function(e){return!~g.indexOf(e)})));var m=(0,y.default)((0,o.default)((0,i.default)([[0],f,h])));m.forEach((function(r,i){var a=m[i+1]||s.length,o=s.slice(r,a);if(0===i&&t)return t.call(n,o,m.length);var u=void 0;u=~f.indexOf(r)?new c.default({value:o.slice(1),source:{start:{line:n.currToken[2],column:n.currToken[3]+r},end:{line:n.currToken[4],column:n.currToken[3]+(a-1)}},sourceIndex:n.currToken[6]+m[i]}):~h.indexOf(r)?new d.default({value:o.slice(1),source:{start:{line:n.currToken[2],column:n.currToken[3]+r},end:{line:n.currToken[4],column:n.currToken[3]+(a-1)}},sourceIndex:n.currToken[6]+m[i]}):new p.default({value:o,source:{start:{line:n.currToken[2],column:n.currToken[3]+r},end:{line:n.currToken[4],column:n.currToken[3]+(a-1)}},sourceIndex:n.currToken[6]+m[i]}),n.newNode(u,e)})),this.position++},e.prototype.word=function(e){var t=this.nextToken;return t&&"|"===t[1]?(this.position++,this.namespace()):this.splitWord(e)},e.prototype.loop=function(){for(;this.position1&&void 0!==arguments[1]?arguments[1]:{},n=new a.default({css:e,error:function(e){throw new Error(e)},options:t});return this.res=n,this.func(n),this},i(e,[{key:"result",get:function(){return String(this.res)}}]),e}();t.default=o,e.exports=t.default},616:function(e,t,n){"use strict";t.__esModule=!0;var r,i=(r=n(4379))&&r.__esModule?r:{default:r},a=n(8790),o=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.type=a.ATTRIBUTE,r.raws={},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.toString=function(){var e=[this.spaces.before,"[",this.ns,this.attribute];return this.operator&&e.push(this.operator),this.value&&e.push(this.value),this.raws.insensitive?e.push(this.raws.insensitive):this.insensitive&&e.push(" i"),e.push("]"),e.concat(this.spaces.after).join("")},t}(i.default);t.default=o,e.exports=t.default},7835:function(e,t,n){"use strict";t.__esModule=!0;var r,i=(r=n(4379))&&r.__esModule?r:{default:r},a=n(8790),o=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.type=a.CLASS,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.toString=function(){return[this.spaces.before,this.ns,String("."+this.value),this.spaces.after].join("")},t}(i.default);t.default=o,e.exports=t.default},478:function(e,t,n){"use strict";t.__esModule=!0;var r,i=(r=n(8871))&&r.__esModule?r:{default:r},a=n(8790),o=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.type=a.COMBINATOR,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=o,e.exports=t.default},4907:function(e,t,n){"use strict";t.__esModule=!0;var r,i=(r=n(8871))&&r.__esModule?r:{default:r},a=n(8790),o=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.type=a.COMMENT,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=o,e.exports=t.default},7144:function(e,t,n){"use strict";t.__esModule=!0;var r,i=function(){function e(e,t){for(var n=0;n=e&&(this.indexes[n]=t-1);return this},t.prototype.removeAll=function(){var e=this.nodes,t=Array.isArray(e),n=0;for(e=t?e:e[Symbol.iterator]();;){var r;if(t){if(n>=e.length)break;r=e[n++]}else{if((n=e.next()).done)break;r=n.value}r.parent=void 0}return this.nodes=[],this},t.prototype.empty=function(){return this.removeAll()},t.prototype.insertAfter=function(e,t){var n=this.index(e);this.nodes.splice(n+1,0,t);var r=void 0;for(var i in this.indexes)n<=(r=this.indexes[i])&&(this.indexes[i]=r+this.nodes.length);return this},t.prototype.insertBefore=function(e,t){var n=this.index(e);this.nodes.splice(n,0,t);var r=void 0;for(var i in this.indexes)n<=(r=this.indexes[i])&&(this.indexes[i]=r+this.nodes.length);return this},t.prototype.each=function(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var t=this.lastEach;if(this.indexes[t]=0,this.length){for(var n=void 0,r=void 0;this.indexes[t]0&&void 0!==arguments[0]?arguments[0]:{};for(var n in r(this,e),t)this[n]=t[n];var i=t.spaces,a=(i=void 0===i?{}:i).before,o=void 0===a?"":a,s=i.after,u=void 0===s?"":s;this.spaces={before:o,after:u}}return e.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.prototype.replaceWith=function(){if(this.parent){for(var e in arguments)this.parent.insertBefore(this,arguments[e]);this.remove()}return this},e.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},e.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},e.prototype.clone=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=i(this);for(var n in e)t[n]=e[n];return t},e.prototype.toString=function(){return[this.spaces.before,String(this.value),this.spaces.after].join("")},e}();t.default=a,e.exports=t.default},4316:function(e,t,n){"use strict";t.__esModule=!0;var r,i=(r=n(7144))&&r.__esModule?r:{default:r},a=n(8790),o=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.type=a.PSEUDO,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.toString=function(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.spaces.before,String(this.value),e,this.spaces.after].join("")},t}(i.default);t.default=o,e.exports=t.default},6909:function(e,t,n){"use strict";t.__esModule=!0;var r,i=(r=n(7144))&&r.__esModule?r:{default:r},a=n(8790),o=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.type=a.ROOT,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.toString=function(){var e=this.reduce((function(e,t){var n=String(t);return n?e+n+",":""}),"").slice(0,-1);return this.trailingComma?e+",":e},t}(i.default);t.default=o,e.exports=t.default},6279:function(e,t,n){"use strict";t.__esModule=!0;var r,i=(r=n(7144))&&r.__esModule?r:{default:r},a=n(8790),o=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.type=a.SELECTOR,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=o,e.exports=t.default},439:function(e,t,n){"use strict";t.__esModule=!0;var r,i=(r=n(8871))&&r.__esModule?r:{default:r},a=n(8790),o=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.type=a.STRING,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=o,e.exports=t.default},9956:function(e,t,n){"use strict";t.__esModule=!0;var r,i=(r=n(4379))&&r.__esModule?r:{default:r},a=n(8790),o=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.type=a.TAG,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=o,e.exports=t.default},8790:function(e,t){"use strict";t.__esModule=!0,t.TAG="tag",t.STRING="string",t.SELECTOR="selector",t.ROOT="root",t.PSEUDO="pseudo",t.NESTING="nesting",t.ID="id",t.COMMENT="comment",t.COMBINATOR="combinator",t.CLASS="class",t.ATTRIBUTE="attribute",t.UNIVERSAL="universal"},70:function(e,t,n){"use strict";t.__esModule=!0;var r,i=(r=n(4379))&&r.__esModule?r:{default:r},a=n(8790),o=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.type=a.UNIVERSAL,r.value="*",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);t.default=o,e.exports=t.default},9788:function(e,t){"use strict";t.__esModule=!0,t.default=function(e){return e.sort((function(e,t){return e-t}))},e.exports=t.default},6554:function(e,t){"use strict";t.__esModule=!0,t.default=function(e){for(var t=[],i=e.css.valueOf(),a=void 0,o=void 0,s=void 0,u=void 0,c=void 0,l=void 0,d=void 0,p=void 0,f=void 0,h=void 0,g=void 0,m=i.length,_=-1,v=1,y=0,b=function(t,n){if(!e.safe)throw e.error("Unclosed "+t,v,y-_,y);o=(i+=n).length-1};y0?(p=v+c,f=o-u[c].length):(p=v,f=_),t.push(["comment",l,v,y-_,p,o-f,y]),_=f,v=p,y=o):(r.lastIndex=y+1,r.test(i),o=0===r.lastIndex?i.length-1:r.lastIndex-2,t.push(["word",i.slice(y,o+1),v,y-_,v,o-_,y]),y=o)}y++}return t};var n=/[ \n\t\r\{\(\)'"\\;/]/g,r=/[ \n\t\r\(\)\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g;e.exports=t.default},5294:function(e,t,n){"use strict";var r=n(4196),i=function(e){h(n,e);var t=g(n);function n(e){var r;return l(this,n),(r=t.call(this,e)).type="atword",r}return d(n,[{key:"toString",value:function(){return this.quoted&&this.raws.quote,[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}}]),n}(r);r.registerWalker(i),e.exports=i},8709:function(e,t,n){"use strict";var r=n(4196),i=function(e){h(n,e);var t=g(n);function n(e){var r;return l(this,n),(r=t.call(this,e)).type="colon",r}return n}(n(1466));r.registerWalker(i),e.exports=i},3627:function(e,t,n){"use strict";var r=n(4196),i=function(e){h(n,e);var t=g(n);function n(e){var r;return l(this,n),(r=t.call(this,e)).type="comma",r}return n}(n(1466));r.registerWalker(i),e.exports=i},4384:function(e,t,n){"use strict";var r=n(4196),i=function(e){h(n,e);var t=g(n);function n(e){var r;return l(this,n),(r=t.call(this,e)).type="comment",r.inline=Object(e).inline||!1,r}return d(n,[{key:"toString",value:function(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}}]),n}(n(1466));r.registerWalker(i),e.exports=i},4196:function(e,t,n){"use strict";var r=function(e){h(n,e);var t=g(n);function n(e){var r;return l(this,n),(r=t.call(this,e)).nodes||(r.nodes=[]),r}return d(n,[{key:"push",value:function(e){return e.parent=this,this.nodes.push(e),this}},{key:"each",value:function(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t,n,r=this.lastEach;if(this.indexes[r]=0,this.nodes){for(;this.indexes[r]=e&&(this.indexes[n]=t-1);return this}},{key:"removeAll",value:function(){var e,t=c(this.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(n){t.e(n)}finally{t.f()}return this.nodes=[],this}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"index",value:function(e){return"number"==typeof e?e:this.nodes.indexOf(e)}},{key:"toString",value:function(){var e=this.nodes.map(String).join("");return this.value&&(e=this.value+e),this.raws.before&&(e=this.raws.before+e),this.raws.after&&(e+=this.raws.after),e}},{key:"first",get:function(){if(this.nodes)return this.nodes[0]}},{key:"last",get:function(){if(this.nodes)return this.nodes[this.nodes.length-1]}}]),n}(n(1466));r.registerWalker=function(e){var t="walk"+e.name;t.lastIndexOf("s")!==t.length-1&&(t+="s"),r.prototype[t]||(r.prototype[t]=function(t){return this.walkType(e,t)})},e.exports=r},9645:function(e){"use strict";var t=function(e){h(n,e);var t=g(n);function n(e){var r;return l(this,n),(r=t.call(this,e)).name=r.constructor.name,r.message=e||"An error ocurred while parsing.","function"==typeof Error.captureStackTrace?Error.captureStackTrace(o(r),r.constructor):r.stack=new Error(e).stack,r}return n}(s(Error));e.exports=t},5128:function(e){"use strict";var t=function(e){h(n,e);var t=g(n);function n(e){var r;return l(this,n),(r=t.call(this,e)).name=r.constructor.name,r.message=e||"An error ocurred while tokzenizing.","function"==typeof Error.captureStackTrace?Error.captureStackTrace(o(r),r.constructor):r.stack=new Error(e).stack,r}return n}(s(Error));e.exports=t},4320:function(e,t,n){"use strict";var r=n(4196),i=function(e){h(n,e);var t=g(n);function n(e){var r;return l(this,n),(r=t.call(this,e)).type="func",r.unbalanced=-1,r}return n}(r);r.registerWalker(i),e.exports=i},9962:function(e,t,n){"use strict";var r=n(3784),i=n(5294),a=n(8709),o=n(3627),s=n(4384),u=n(4320),c=n(3074),l=n(7214),d=n(1238),p=n(9672),f=n(1369),h=n(2057),g=n(6593),m=function(e,t){return new r(e,t)};m.atword=function(e){return new i(e)},m.colon=function(e){return new a(Object.assign({value:":"},e))},m.comma=function(e){return new o(Object.assign({value:","},e))},m.comment=function(e){return new s(e)},m.func=function(e){return new u(e)},m.number=function(e){return new c(e)},m.operator=function(e){return new l(e)},m.paren=function(e){return new d(Object.assign({value:"("},e))},m.string=function(e){return new p(Object.assign({quote:"'"},e))},m.value=function(e){return new h(e)},m.word=function(e){return new g(e)},m.unicodeRange=function(e){return new f(e)},e.exports=m},1466:function(e){"use strict";var t=function e(t,n){var r=new t.constructor;for(var i in t)if(t.hasOwnProperty(i)){var a=t[i],o=typeof a;"parent"===i&&"object"===o?n&&(r[i]=n):"source"===i?r[i]=a:a instanceof Array?r[i]=a.map((function(t){return e(t,r)})):"before"!==i&&"after"!==i&&"between"!==i&&"semicolon"!==i&&("object"===o&&null!==a&&(a=e(a)),r[i]=a)}return r};e.exports=function(){function e(t){for(var n in l(this,e),t=t||{},this.raws={before:"",after:""},t)this[n]=t[n]}return d(e,[{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"toString",value:function(){return[this.raws.before,String(this.value),this.raws.after].join("")}},{key:"clone",value:function(e){e=e||{};var n=t(this);for(var r in e)n[r]=e[r];return n}},{key:"cloneBefore",value:function(e){e=e||{};var t=this.clone(e);return this.parent.insertBefore(this,t),t}},{key:"cloneAfter",value:function(e){e=e||{};var t=this.clone(e);return this.parent.insertAfter(this,t),t}},{key:"replaceWith",value:function(){var e=Array.prototype.slice.call(arguments);if(this.parent){var t,n=c(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.parent.insertBefore(this,r)}}catch(i){n.e(i)}finally{n.f()}this.remove()}return this}},{key:"moveTo",value:function(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.append(this),this}},{key:"moveBefore",value:function(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.parent.insertBefore(e,this),this}},{key:"moveAfter",value:function(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.parent.insertAfter(e,this),this}},{key:"next",value:function(){var e=this.parent.index(this);return this.parent.nodes[e+1]}},{key:"prev",value:function(){var e=this.parent.index(this);return this.parent.nodes[e-1]}},{key:"toJSON",value:function(){var e={};for(var t in this)if(this.hasOwnProperty(t)&&"parent"!==t){var n=this[t];n instanceof Array?e[t]=n.map((function(e){return"object"==typeof e&&e.toJSON?e.toJSON():e})):"object"==typeof n&&n.toJSON?e[t]=n.toJSON():e[t]=n}return e}},{key:"root",value:function(){for(var e=this;e.parent;)e=e.parent;return e}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"positionInside",value:function(e){for(var t=this.toString(),n=this.source.start.column,r=this.source.start.line,i=0;i0&&("func"===this.current.type&&"calc"===this.current.value?("space"!==this.prevToken[0]&&"("!==this.prevToken[0]||"space"!==this.nextToken[0]&&"word"!==this.nextToken[0]||"word"===this.nextToken[0]&&"operator"!==this.current.last.type&&"("!==this.current.last.value)&&this.error("Syntax Error",this.currToken):"space"!==this.nextToken[0]&&"operator"!==this.nextToken[0]&&"operator"!==this.prevToken[0]||this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&"operator"===this.current.last.type)&&"word"===this.nextToken[0])return this.word()}else if("word"===this.nextToken[0])return this.word();return e=new f({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(e)}},{key:"parseTokens",value:function(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"word":this.word();break;case"operator":this.operator();break;case"string":this.string();break;case"unicoderange":this.unicodeRange();break;default:this.word()}}},{key:"parenOpen",value:function(){for(var e,t=1,n=this.position+1,r=this.currToken;n=this.tokens.length-1&&!this.current.unbalanced||(this.current.unbalanced--,this.current.unbalanced<0&&this.error("Expected opening parenthesis",e),!this.current.unbalanced&&this.cache.length&&(this.current=this.cache.pop()))}},{key:"space",value:function(){var e=this.currToken;this.position===this.tokens.length-1||","===this.nextToken[0]||")"===this.nextToken[0]?(this.current.last.raws.after+=e[1],this.position++):(this.spaces=e[1],this.position++)}},{key:"unicodeRange",value:function(){var e=this.currToken;this.newNode(new _({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}},{key:"splitWord",value:function(){var e,t,n,r=this,i=this.nextToken,o=this.currToken[1],s=/^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/;if(!/^(?!\#([a-z0-9]+))[\#\{\}]/gi.test(o))for(;i&&"word"===i[0];){this.position++;var u=this.currToken[1];o+=u,i=this.nextToken}e=b(o,"@"),n=D(y([[0],e])),(t=n.sort((function(e,t){return e-t}))).forEach((function(n,u){var l,d=t[u+1]||o.length,f=o.slice(n,d);if(~e.indexOf(n))l=new a({value:f.slice(1),source:{start:{line:r.currToken[2],column:r.currToken[3]+n},end:{line:r.currToken[4],column:r.currToken[3]+(d-1)}},sourceIndex:r.currToken[6]+t[u]});else if(s.test(r.currToken[1])){var h=f.replace(s,"");l=new p({value:f.replace(h,""),source:{start:{line:r.currToken[2],column:r.currToken[3]+n},end:{line:r.currToken[4],column:r.currToken[3]+(d-1)}},sourceIndex:r.currToken[6]+t[u],unit:h})}else"Word"===(l=new(i&&"("===i[0]?c:m)({value:f,source:{start:{line:r.currToken[2],column:r.currToken[3]+n},end:{line:r.currToken[4],column:r.currToken[3]+(d-1)}},sourceIndex:r.currToken[6]+t[u]})).constructor.name?(l.isHex=/^#(.+)/.test(f),l.isColor=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(f)):r.cache.push(r.current);r.newNode(l)})),this.position++}},{key:"string",value:function(){var e,t=this.currToken,n=this.currToken[1],r=/^(\"|\')/,i=r.test(n),a="";i&&(a=n.match(r)[0],n=n.slice(1,n.length-1)),(e=new g({value:n,source:{start:{line:t[2],column:t[3]},end:{line:t[4],column:t[5]}},sourceIndex:t[6],quoted:i})).raws.quote=a,this.newNode(e),this.position++}},{key:"word",value:function(){return this.splitWord()}},{key:"newNode",value:function(e){return this.spaces&&(e.raws.before+=this.spaces,this.spaces=""),this.current.append(e)}},{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}]),e}()},4343:function(e,t,n){"use strict";var r=n(4196);e.exports=function(e){h(n,e);var t=g(n);function n(e){var r;return l(this,n),(r=t.call(this,e)).type="root",r}return n}(r)},9672:function(e,t,n){"use strict";var r=n(4196),i=function(e){h(n,e);var t=g(n);function n(e){var r;return l(this,n),(r=t.call(this,e)).type="string",r}return d(n,[{key:"toString",value:function(){var e=this.quoted?this.raws.quote:"";return[this.raws.before,e,this.value+"",e,this.raws.after].join("")}}]),n}(n(1466));r.registerWalker(i),e.exports=i},2481:function(e,t,n){"use strict";var r="{".charCodeAt(0),i="}".charCodeAt(0),a="(".charCodeAt(0),o=")".charCodeAt(0),s="'".charCodeAt(0),u='"'.charCodeAt(0),c="\\".charCodeAt(0),l="/".charCodeAt(0),d=".".charCodeAt(0),p=",".charCodeAt(0),f=":".charCodeAt(0),h="*".charCodeAt(0),g="-".charCodeAt(0),m="+".charCodeAt(0),_="#".charCodeAt(0),v="\n".charCodeAt(0),y=" ".charCodeAt(0),b="\f".charCodeAt(0),D="\t".charCodeAt(0),E="\r".charCodeAt(0),C="@".charCodeAt(0),S="e".charCodeAt(0),x="E".charCodeAt(0),k="0".charCodeAt(0),T="9".charCodeAt(0),w="u".charCodeAt(0),A="U".charCodeAt(0),O=/[ \n\t\r\{\(\)'"\\;,/]/g,N=/[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g,I=/[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g,F=/^[a-z0-9]/i,L=/^[a-f0-9?\-]/i,P=n(1758),R=n(5128);e.exports=function(e,t){t=t||{};var n,M,B,j,U,V,z,H,W,K,q,G=[],Y=e.valueOf(),J=Y.length,$=-1,Q=1,X=0,Z=0,ee=null;function te(e){var t=P.format("Unclosed %s at line: %d, column: %d, token: %d",e,Q,X-$,X);throw new R(t)}for(;X0&&"word"===G[G.length-1][0]&&"url"===G[G.length-1][1],G.push(["(","(",Q,X-$,Q,M-$,X]);break;case o:Z--,ee=ee&&Z>0,G.push([")",")",Q,X-$,Q,M-$,X]);break;case s:case u:B=n===s?"'":'"',M=X;do{for(W=!1,-1===(M=Y.indexOf(B,M+1))&&te("quote"),K=M;Y.charCodeAt(K-1)===c;)K-=1,W=!W}while(W);G.push(["string",Y.slice(X,M+1),Q,X-$,Q,M-$,X]),X=M;break;case C:O.lastIndex=X+1,O.test(Y),M=0===O.lastIndex?Y.length-1:O.lastIndex-2,G.push(["atword",Y.slice(X,M+1),Q,X-$,Q,M-$,X]),X=M;break;case c:M=X,n=Y.charCodeAt(M+1),G.push(["word",Y.slice(X,M+1),Q,X-$,Q,M-$,X]),X=M;break;case m:case g:case h:if(M=X+1,q=Y.slice(X+1,M+1),Y.slice(X-1,X),n===g&&q.charCodeAt(0)===g){M++,G.push(["word",Y.slice(X,M),Q,X-$,Q,M-$,X]),X=M-1;break}G.push(["operator",Y.slice(X,M),Q,X-$,Q,M-$,X]),X=M-1;break;default:if(n===l&&(Y.charCodeAt(X+1)===h||t.loose&&!ee&&Y.charCodeAt(X+1)===l)){if(Y.charCodeAt(X+1)===h)0===(M=Y.indexOf("*/",X+2)+1)&&te("comment");else{var ne=Y.indexOf("\n",X+2);M=-1!==ne?ne-1:J}(U=(j=(V=Y.slice(X,M+1)).split("\n")).length-1)>0?(z=Q+U,H=M-j[U].length):(z=Q,H=$),G.push(["comment",V,Q,X-$,z,M-H,X]),$=H,Q=z,X=M}else if(n!==_||F.test(Y.slice(X+1,X+2)))if(n!==w&&n!==A||Y.charCodeAt(X+1)!==m)if(n===l)M=X+1,G.push(["operator",Y.slice(X,M),Q,X-$,Q,M-$,X]),X=M-1;else{var re=N;if(n>=k&&n<=T&&(re=I),re.lastIndex=X+1,re.test(Y),M=0===re.lastIndex?Y.length-1:re.lastIndex-2,re===I||n===d){var ie=Y.charCodeAt(M),ae=Y.charCodeAt(M+1),oe=Y.charCodeAt(M+2);(ie===S||ie===x)&&(ae===g||ae===m)&&oe>=k&&oe<=T&&(I.lastIndex=M+2,I.test(Y),M=0===I.lastIndex?Y.length-1:I.lastIndex-2)}G.push(["word",Y.slice(X,M+1),Q,X-$,Q,M-$,X]),X=M}else{M=X+2;do{M+=1,n=Y.charCodeAt(M)}while(M=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e&&(this.indexes[n]=t-1);return this},f.removeAll=function(){for(var e,t=o(this.nodes);!(e=t()).done;)e.value.parent=void 0;return this.nodes=[],this},f.replaceValues=function(e,t,n){return n||(n=t,t={}),this.walkDecls((function(r){t.props&&-1===t.props.indexOf(r.prop)||t.fast&&-1===r.value.indexOf(t.fast)||(r.value=r.value.replace(e,n))})),this},f.every=function(e){return this.nodes.every(e)},f.some=function(e){return this.nodes.some(e)},f.index=function(e){return"number"==typeof e?e:this.nodes.indexOf(e)},f.normalize=function(e,t){var a=this;if("string"==typeof e)e=c(n(7057)(e).nodes);else if(Array.isArray(e))for(var s,u=o(e=e.slice(0));!(s=u()).done;){var l=s.value;l.parent&&l.parent.removeChild(l,"ignore")}else if("root"===e.type)for(var d,p=o(e=e.nodes.slice(0));!(d=p()).done;){var f=d.value;f.parent&&f.parent.removeChild(f,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new r.default(e)]}else if(e.selector)e=[new(n(6621))(e)];else if(e.name)e=[new(n(8940))(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new i.default(e)]}return e.map((function(e){return e.parent&&e.parent.removeChild(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/[^\s]/g,"")),e.parent=a,e}))},l=s,(d=[{key:"first",get:function(){if(this.nodes)return this.nodes[0]}},{key:"last",get:function(){if(this.nodes)return this.nodes[this.nodes.length-1]}}])&&u(l.prototype,d),p&&u(l,p),s}(a(n(1714)).default);t.default=l,e.exports=t.default},1667:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=o(n(825)),i=o(n(7027)),a=o(n(5208));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,d(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)})(e)}function u(e,t,n){return(u=c()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&l(i,n.prototype),i}).apply(null,arguments)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){var t,n;function o(t,n,r,i,a,s){var u;return(u=e.call(this,t)||this).name="CssSyntaxError",u.reason=t,a&&(u.file=a),i&&(u.source=i),s&&(u.plugin=s),void 0!==n&&void 0!==r&&(u.line=n,u.column=r),u.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(u),o),u}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=o.prototype;return s.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},s.showSourceCode=function(e){var t=this;if(!this.source)return"";var n=this.source;a.default&&(void 0===e&&(e=r.default.stdout),e&&(n=(0,a.default)(n)));var o=n.split(/\r?\n/),s=Math.max(this.line-3,0),u=Math.min(this.line+2,o.length),c=String(u).length;function l(t){return e&&i.default.red?i.default.red.bold(t):t}function d(t){return e&&i.default.gray?i.default.gray(t):t}return o.slice(s,u).map((function(e,n){var r=s+1+n,i=" "+(" "+r).slice(-c)+" | ";if(r===t.line){var a=d(i.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return l(">")+d(i)+e+"\n "+a+l("^")}return" "+d(i)+e})).join("\n")},s.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},o}(s(Error));t.default=p,e.exports=t.default},6417:function(e,t,n){"use strict";var r;t.__esModule=!0,t.default=void 0;var i=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type="decl",n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(((r=n(1714))&&r.__esModule?r:{default:r}).default);t.default=i,e.exports=t.default},2993:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=o(n(6391)),i=o(n(1667)),a=o(n(3353));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var n=0;n"),this.map&&(this.map.file=this.from)}var t,n,o,c=e.prototype;return c.error=function(e,t,n,r){var a;void 0===r&&(r={});var o=this.origin(t,n);return(a=o?new i.default(e,o.line,o.column,o.source,o.file,r.plugin):new i.default(e,t,n,this.css,this.file,r.plugin)).input={line:t,column:n,source:this.css},this.file&&(a.input.file=this.file),a},c.origin=function(e,t){if(!this.map)return!1;var n=this.map.consumer(),r=n.originalPositionFor({line:e,column:t});if(!r.source)return!1;var i={file:this.mapResolve(r.source),line:r.line,column:r.column},a=n.sourceContentFor(r.source);return a&&(i.source=a),i},c.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:r.default.resolve(this.map.consumer().sourceRoot||".",e)},t=e,(n=[{key:"from",get:function(){return this.file||this.id}}])&&s(t.prototype,n),o&&s(t,o),e}();t.default=c,e.exports=t.default},6992:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(8991)),i=s(n(6157)),a=(s(n(6574)),s(n(6865))),o=s(n(7057));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=this.processor.plugins.length)return this.processed=!0,e();try{var r=this.processor.plugins[this.plugin],i=this.run(r);this.plugin+=1,d(i)?i.then((function(){n.asyncTick(e,t)})).catch((function(e){n.handleError(e,r),n.processed=!0,t(e)})):this.asyncTick(e,t)}catch(e){this.processed=!0,t(e)}},c.async=function(){var e=this;return this.processed?new Promise((function(t,n){e.error?n(e.error):t(e.stringify())})):(this.processing||(this.processing=new Promise((function(t,n){if(e.error)return n(e.error);e.plugin=0,e.asyncTick(t,n)})).then((function(){return e.processed=!0,e.stringify()}))),this.processing)},c.sync=function(){if(this.processed)return this.result;if(this.processed=!0,this.processing)throw new Error("Use process(css).then(cb) to work with async plugins");if(this.error)throw this.error;for(var e,t=u(this.result.processor.plugins);!(e=t()).done;){var n=e.value;if(d(this.run(n)))throw new Error("Use process(css).then(cb) to work with async plugins")}return this.result},c.run=function(e){this.result.lastPlugin=e;try{return e(this.result.root,this.result)}catch(n){throw this.handleError(n,e),n}},c.stringify=function(){if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=i.default;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new r.default(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result},t=e,(n=[{key:"processor",get:function(){return this.result.processor}},{key:"opts",get:function(){return this.result.opts}},{key:"css",get:function(){return this.stringify().css}},{key:"content",get:function(){return this.stringify().content}},{key:"map",get:function(){return this.stringify().map}},{key:"root",get:function(){return this.sync().root}},{key:"messages",get:function(){return this.sync().messages}}])&&l(t.prototype,n),s&&l(t,s),e}();t.default=p,e.exports=t.default},6136:function(e,t){"use strict";t.__esModule=!0,t.default=void 0;var n={split:function(e,t,n){for(var r=[],i="",a=!1,o=0,s=!1,u=!1,c=0;c0&&(o-=1):0===o&&-1!==t.indexOf(l)&&(a=!0),a?(""!==i&&r.push(i.trim()),i="",a=!1):i+=l}return(n||""!==i)&&r.push(i.trim()),r},space:function(e){return n.split(e,[" ","\n","\t"])},comma:function(e){return n.split(e,[","],!0)}},r=n;t.default=r,e.exports=t.default},8991:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var i=o(n(2447)),a=o(n(6391));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},t.previous=function(){var e=this;return this.previousMaps||(this.previousMaps=[],this.root.walk((function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;-1===e.previousMaps.indexOf(n)&&e.previousMaps.push(n)}}))),this.previousMaps},t.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((function(e){return e.inline})))},t.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((function(e){return e.withContent()}))},t.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)},t.setSourcesContent=function(){var e=this,t={};this.root.walk((function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.relative(r);e.map.setSourceContent(i,n.source.input.css)}}}))},t.applyPrevMaps=function(){for(var e,t=s(this.previous());!(e=t()).done;){var n=e.value,r=this.relative(n.file),o=n.root||a.default.dirname(n.file),u=void 0;!1===this.mapOpts.sourcesContent?(u=new i.default.SourceMapConsumer(n.text)).sourcesContent&&(u.sourcesContent=u.sourcesContent.map((function(){return null}))):u=n.consumer(),this.map.applySourceMap(u,r,this.relative(o))}},t.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((function(e){return e.annotation})))},t.toBase64=function(e){return r?r.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},t.addAnnotation=function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:this.outputFile()+".map";var t="\n";-1!==this.css.indexOf("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"},t.outputFile=function(){return this.opts.to?this.relative(this.opts.to):this.opts.from?this.relative(this.opts.from):"to.css"},t.generateMap=function(){return this.generateString(),this.isSourcesContent()&&this.setSourcesContent(),this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.relative=function(e){if(0===e.indexOf("<"))return e;if(/^\w+:\/\//.test(e))return e;var t=this.opts.to?a.default.dirname(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(t=a.default.dirname(a.default.resolve(t,this.mapOpts.annotation))),e=a.default.relative(t,e),"\\"===a.default.sep?e.replace(/\\/g,"/"):e},t.sourcePath=function(e){return this.mapOpts.from?this.mapOpts.from:this.relative(e.source.input.from)},t.generateString=function(){var e=this;this.css="",this.map=new i.default.SourceMapGenerator({file:this.outputFile()});var t,n,r=1,a=1;this.stringify(this.root,(function(i,o,s){if(e.css+=i,o&&"end"!==s&&(o.source&&o.source.start?e.map.addMapping({source:e.sourcePath(o),generated:{line:r,column:a-1},original:{line:o.source.start.line,column:o.source.start.column-1}}):e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:r,column:a-1}})),(t=i.match(/\n/g))?(r+=t.length,n=i.lastIndexOf("\n"),a=i.length-n):a+=i.length,o&&"start"!==s){var u=o.parent||{raws:{}};("decl"!==o.type||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?e.map.addMapping({source:e.sourcePath(o),generated:{line:r,column:a-2},original:{line:o.source.end.line,column:o.source.end.column-1}}):e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:r,column:a-1}}))}}))},t.generate=function(){if(this.clearAnnotation(),this.isMap())return this.generateMap();var e="";return this.stringify(this.root,(function(t){e+=t})),[e]},e}();t.default=c,e.exports=t.default},1714:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=o(n(1667)),i=o(n(5701)),a=o(n(6157));function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=new e.constructor;for(var r in e)if(e.hasOwnProperty(r)){var i=e[r],a=typeof i;"parent"===r&&"object"===a?t&&(n[r]=t):"source"===r?n[r]=i:i instanceof Array?n[r]=i.map((function(e){return s(e,n)})):("object"===a&&null!==i&&(i=s(i)),n[r]=i)}return n}var u=function(){function e(e){for(var t in void 0===e&&(e={}),this.raws={},e)this[t]=e[t]}var t=e.prototype;return t.error=function(e,t){if(void 0===t&&(t={}),this.source){var n=this.positionBy(t);return this.source.input.error(e,n.line,n.column,t)}return new r.default(e)},t.warn=function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.toString=function(e){void 0===e&&(e=a.default),e.stringify&&(e=e.stringify);var t="";return e(this,(function(e){t+=e})),t},t.clone=function(e){void 0===e&&(e={});var t=s(this);for(var n in e)t[n]=e[n];return t},t.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.replaceWith=function(){if(this.parent){for(var e=arguments.length,t=new Array(e),n=0;n0&&this.unclosedBracket(i),t&&r){for(;o.length&&("space"===(s=o[o.length-1][0])||"comment"===s);)this.tokenizer.back(o.pop());this.decl(o)}else this.unknownWord(o)},t.rule=function(e){e.pop();var t=new u.default;this.init(t,e[0][2],e[0][3]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t},t.decl=function(e){var t=new r.default;this.init(t);var n,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),i[4]?t.source.end={line:i[4],column:i[5]}:t.source.end={line:i[2],column:i[3]};"word"!==e[0][0];)1===e.length&&this.unknownWord(e),t.raws.before+=e.shift()[1];for(t.source.start={line:e[0][2],column:e[0][3]},t.prop="";e.length;){var a=e[0][0];if(":"===a||"space"===a||"comment"===a)break;t.prop+=e.shift()[1]}for(t.raws.between="";e.length;){if(":"===(n=e.shift())[0]){t.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),t.raws.between+=n[1]}"_"!==t.prop[0]&&"*"!==t.prop[0]||(t.raws.before+=t.prop[0],t.prop=t.prop.slice(1)),t.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(var o=e.length-1;o>0;o--){if("!important"===(n=e[o])[1].toLowerCase()){t.important=!0;var s=this.stringFrom(e,o);" !important"!==(s=this.spacesFromEnd(e)+s)&&(t.raws.important=s);break}if("important"===n[1].toLowerCase()){for(var u=e.slice(0),c="",l=o;l>0;l--){var d=u[l][0];if(0===c.trim().indexOf("!")&&"space"!==d)break;c=u.pop()[1]+c}0===c.trim().indexOf("!")&&(t.important=!0,t.raws.important=c,e=u)}if("space"!==n[0]&&"comment"!==n[0])break}this.raw(t,"value",e),-1!==t.value.indexOf(":")&&this.checkMissedSemicolon(e)},t.atrule=function(e){var t,n,r=new o.default;r.name=e[1].slice(1),""===r.name&&this.unnamedAtrule(r,e),this.init(r,e[2],e[3]);for(var i=!1,a=!1,s=[];!this.tokenizer.endOfFile();){if(";"===(e=this.tokenizer.nextToken())[0]){r.source.end={line:e[2],column:e[3]},this.semicolon=!0;break}if("{"===e[0]){a=!0;break}if("}"===e[0]){if(s.length>0){for(t=s[n=s.length-1];t&&"space"===t[0];)t=s[--n];t&&(r.source.end={line:t[4],column:t[5]})}this.end(e);break}if(s.push(e),this.tokenizer.endOfFile()){i=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(r.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(r,"params",s),i&&(e=s[s.length-1],r.source.end={line:e[4],column:e[5]},this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),a&&(r.nodes=[],this.current=r)},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end={line:e[2],column:e[3]},this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},t.init=function(e,t,n){this.current.push(e),e.source={start:{line:t,column:n},input:this.input},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},t.raw=function(e,t,n){for(var r,i,a,o,s=n.length,u="",c=!0,l=/^([.|#])?([\w])+/i,d=0;d=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon",n[2],n[3])}},e}();t.default=l,e.exports=t.default},3353:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var i=s(n(2447)),a=s(n(6391)),o=s(n(7545));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);r&&(this.text=r)}var t=e.prototype;return t.consumer=function(){return this.consumerCache||(this.consumerCache=new i.default.SourceMapConsumer(this.text)),this.consumerCache},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},t.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},t.getAnnotationURL=function(e){return e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//)[1].trim()},t.loadAnnotation=function(e){var t=e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//gm);if(t&&t.length>0){var n=t[t.length-1];n&&(this.annotation=this.getAnnotationURL(n))}},t.decodeInline=function(e){var t,n="data:application/json,";if(this.startWith(e,n))return decodeURIComponent(e.substr(n.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),r?r.from(t,"base64").toString():window.atob(t);var i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)},t.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"==typeof t){var n=t(e);if(n&&o.default.existsSync&&o.default.existsSync(n))return o.default.readFileSync(n,"utf-8").toString().trim();throw new Error("Unable to load previous source map: "+n.toString())}if(t instanceof i.default.SourceMapConsumer)return i.default.SourceMapGenerator.fromSourceMap(t).toString();if(t instanceof i.default.SourceMapGenerator)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var r=this.annotation;return e&&(r=a.default.join(a.default.dirname(e),r)),this.root=a.default.dirname(r),!(!o.default.existsSync||!o.default.existsSync(r))&&o.default.readFileSync(r,"utf-8").toString().trim()}},t.isMap=function(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings)},e}();t.default=u,e.exports=t.default},9429:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(6992))&&r.__esModule?r:{default:r};function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),e.prototype.removeChild.call(this,t)},o.normalize=function(t,n,r){var a=e.prototype.normalize.call(this,t);if(n)if("prepend"===r)this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(var o,s=i(a);!(o=s()).done;)o.value.raws.before=n.raws.before;return a},o.toResult=function(e){return void 0===e&&(e={}),new(n(6992))(new(n(9429)),this,e).stringify()},a}(((r=n(1204))&&r.__esModule?r:{default:r}).default);t.default=o,e.exports=t.default},6621:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=a(n(1204)),i=a(n(6136));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var n=0;n0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r0&&void 0!==e.raws.after)return-1!==(t=e.raws.after).indexOf("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/[^\s]/g,"")),t},t.rawBeforeOpen=function(e){var t;return e.walk((function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1})),t},t.rawColon=function(e){var t;return e.walkDecls((function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t},t.beforeAfter=function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(-1!==n.indexOf("\n")){var a=this.raw(e,null,"indent");if(a.length)for(var o=0;o=V)){var t=!!e&&e.ignoreUnclosed;switch(((x=j.charCodeAt(W))===o||x===u||x===l&&j.charCodeAt(W+1)!==o)&&(z=W,H+=1),x){case o:case s:case c:case l:case u:k=W;do{k+=1,(x=j.charCodeAt(k))===o&&(z=k,H+=1)}while(x===s||x===o||x===c||x===l||x===u);B=["space",j.slice(W,k)],W=k-1;break;case d:case p:case g:case m:case y:case _:case h:var Y=String.fromCharCode(x);B=[Y,Y,H,W-z];break;case f:if(R=K.length?K.pop()[1]:"",M=j.charCodeAt(W+1),"url"===R&&M!==n&&M!==r&&M!==s&&M!==o&&M!==c&&M!==u&&M!==l){k=W;do{if(L=!1,-1===(k=j.indexOf(")",k+1))){if(U||t){k=W;break}G("bracket")}for(P=k;j.charCodeAt(P-1)===i;)P-=1,L=!L}while(L);B=["brackets",j.slice(W,k+1),H,W-z,H,k-z],W=k}else k=j.indexOf(")",W+1),O=j.slice(W,k+1),-1===k||C.test(O)?B=["(","(",H,W-z]:(B=["brackets",O,H,W-z,H,k-z],W=k);break;case n:case r:T=x===n?"'":'"',k=W;do{if(L=!1,-1===(k=j.indexOf(T,k+1))){if(U||t){k=W+1;break}G("string")}for(P=k;j.charCodeAt(P-1)===i;)P-=1,L=!L}while(L);O=j.slice(W,k+1),w=O.split("\n"),(A=w.length-1)>0?(I=H+A,F=k-w[A].length):(I=H,F=z),B=["string",j.slice(W,k+1),H,W-z,I,k-F],z=F,H=I,W=k;break;case b:D.lastIndex=W+1,D.test(j),k=0===D.lastIndex?j.length-1:D.lastIndex-2,B=["at-word",j.slice(W,k+1),H,W-z,H,k-z],W=k;break;case i:for(k=W,N=!0;j.charCodeAt(k+1)===i;)k+=1,N=!N;if(x=j.charCodeAt(k+1),N&&x!==a&&x!==s&&x!==o&&x!==c&&x!==l&&x!==u&&(k+=1,S.test(j.charAt(k)))){for(;S.test(j.charAt(k+1));)k+=1;j.charCodeAt(k+1)===s&&(k+=1)}B=["word",j.slice(W,k+1),H,W-z,H,k-z],W=k;break;default:x===a&&j.charCodeAt(W+1)===v?(0===(k=j.indexOf("*/",W+2)+1)&&(U||t?k=j.length:G("comment")),O=j.slice(W,k+1),w=O.split("\n"),(A=w.length-1)>0?(I=H+A,F=k-w[A].length):(I=H,F=z),B=["comment",O,H,W-z,I,k-F],z=F,H=I,W=k):(E.lastIndex=W+1,E.test(j),k=0===E.lastIndex?j.length-1:E.lastIndex-2,B=["word",j.slice(W,k+1),H,W-z,H,k-z],K.push(B),W=k)}return W++,B}},endOfFile:function(){return 0===q.length&&W>=V},position:function(){return W}}};var n="'".charCodeAt(0),r='"'.charCodeAt(0),i="\\".charCodeAt(0),a="/".charCodeAt(0),o="\n".charCodeAt(0),s=" ".charCodeAt(0),u="\f".charCodeAt(0),c="\t".charCodeAt(0),l="\r".charCodeAt(0),d="[".charCodeAt(0),p="]".charCodeAt(0),f="(".charCodeAt(0),h=")".charCodeAt(0),g="{".charCodeAt(0),m="}".charCodeAt(0),_=";".charCodeAt(0),v="*".charCodeAt(0),y=":".charCodeAt(0),b="@".charCodeAt(0),D=/[ \n\t\r\f{}()'"\\;/[\]#]/g,E=/[ \n\t\r\f(){}:;@!'"\\\][#]|\/(?=\*)/g,C=/.[\\/("'\n]/,S=/[a-f0-9]/i;e.exports=t.default},6574:function(e,t){"use strict";t.__esModule=!0,t.default=function(e){n[e]||(n[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};var n={};e.exports=t.default},1662:function(e,t){"use strict";t.__esModule=!0,t.default=void 0;var n=function(){function e(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var n=t.node.positionBy(t);this.line=n.line,this.column=n.column}for(var r in t)this[r]=t[r]}return e.prototype.toString=function(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}();t.default=n,e.exports=t.default},6210:function(e,t,n){var r=n(895),i=n(8523),a=i.MAX_LENGTH,o=i.MAX_SAFE_INTEGER,s=n(3443),u=s.re,c=s.t,p=n(8337).compareIdentifiers,f=function(){"use strict";function e(t,n){if(l(this,e),n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError("Invalid Version: ".concat(t));if(t.length>a)throw new TypeError("version is longer than ".concat(a," characters"));r("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var i=t.trim().match(n.loose?u[c.LOOSE]:u[c.FULL]);if(!i)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}();e.exports=f},2828:function(e,t,n){var r=n(6210);e.exports=function(e,t,n){return new r(e,n).compare(new r(t,n))}},9195:function(e,t,n){var r=n(2828);e.exports=function(e,t,n){return r(e,t,n)>=0}},3725:function(e,t,n){var r=n(2828);e.exports=function(e,t,n){return r(e,t,n)<0}},8523:function(e){var t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},895:function(e){var n="object"==typeof t&&Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0})&&Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).NODE_DEBUG&&/\bsemver\b/i.test(Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).NODE_DEBUG)?function(){for(var e,t=arguments.length,n=new Array(t),r=0;r)?=?)"),c("XRANGEIDENTIFIERLOOSE","".concat(o[s.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),c("XRANGEIDENTIFIER","".concat(o[s.NUMERICIDENTIFIER],"|x|X|\\*")),c("XRANGEPLAIN","[v=\\s]*(".concat(o[s.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(o[s.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(o[s.XRANGEIDENTIFIER],")")+"(?:".concat(o[s.PRERELEASE],")?").concat(o[s.BUILD],"?")+")?)?"),c("XRANGEPLAINLOOSE","[v=\\s]*(".concat(o[s.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(o[s.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(o[s.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(o[s.PRERELEASELOOSE],")?").concat(o[s.BUILD],"?")+")?)?"),c("XRANGE","^".concat(o[s.GTLT],"\\s*").concat(o[s.XRANGEPLAIN],"$")),c("XRANGELOOSE","^".concat(o[s.GTLT],"\\s*").concat(o[s.XRANGEPLAINLOOSE],"$")),c("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(r,"})")+"(?:\\.(\\d{1,".concat(r,"}))?")+"(?:\\.(\\d{1,".concat(r,"}))?")+"(?:$|[^\\d])"),c("COERCERTL",o[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM","(\\s*)".concat(o[s.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",c("TILDE","^".concat(o[s.LONETILDE]).concat(o[s.XRANGEPLAIN],"$")),c("TILDELOOSE","^".concat(o[s.LONETILDE]).concat(o[s.XRANGEPLAINLOOSE],"$")),c("LONECARET","(?:\\^)"),c("CARETTRIM","(\\s*)".concat(o[s.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",c("CARET","^".concat(o[s.LONECARET]).concat(o[s.XRANGEPLAIN],"$")),c("CARETLOOSE","^".concat(o[s.LONECARET]).concat(o[s.XRANGEPLAINLOOSE],"$")),c("COMPARATORLOOSE","^".concat(o[s.GTLT],"\\s*(").concat(o[s.LOOSEPLAIN],")$|^$")),c("COMPARATOR","^".concat(o[s.GTLT],"\\s*(").concat(o[s.FULLPLAIN],")$|^$")),c("COMPARATORTRIM","(\\s*)".concat(o[s.GTLT],"\\s*(").concat(o[s.LOOSEPLAIN],"|").concat(o[s.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE","^\\s*(".concat(o[s.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(o[s.XRANGEPLAIN],")")+"\\s*$"),c("HYPHENRANGELOOSE","^\\s*(".concat(o[s.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(o[s.XRANGEPLAINLOOSE],")")+"\\s*$"),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},6715:function(e,t,n){var r=n(7837),i=Object.prototype.hasOwnProperty,a="undefined"!=typeof Map;function o(){this._array=[],this._set=a?new Map:Object.create(null)}o.fromArray=function(e,t){for(var n=new o,r=0,i=e.length;r=0)return t}else{var n=r.toSetString(e);if(i.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e>>=5)>0&&(t|=32),n+=r.encode(t)}while(i>0);return n},t.decode=function(e,t,n){var i,a,o,s,u=e.length,c=0,l=0;do{if(t>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&a),c+=(a&=31)<>1,1==(1&o)?-s:s),n.rest=t}},4122:function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e0?r-u>1?n(u,r,i,a,o,s):s==t.LEAST_UPPER_BOUND?r1?n(e,u,i,a,o,s):s==t.LEAST_UPPER_BOUND?u:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,i,a){if(0===r.length)return-1;var o=n(-1,r.length,e,r,i,a||t.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(r[o],r[o-1],!0);)--o;return o}},1028:function(e,t,n){var r=n(7837);function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){var t,n,i,a,o,s;n=e,i=(t=this._last).generatedLine,a=n.generatedLine,o=t.generatedColumn,s=n.generatedColumn,a>i||a==i&&s>=o||r.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.H=i},6711:function(e,t){function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function r(e,t,i,a){if(i=0){var s=this._originalMappings[o];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)a.push({line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)a.push({line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return a},t.SourceMapConsumer=u,c.prototype=Object.create(u.prototype),c.prototype.consumer=u,c.prototype._findSourceIndex=function(e){var t,n=e;if(null!=this.sourceRoot&&(n=r.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(t=0;t1&&(n.source=g+a[1],g+=a[1],n.originalLine=f+a[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=h+a[3],h=n.originalColumn,a.length>4&&(n.name=m+a[4],m+=a[4])),E.push(n),"number"==typeof n.originalLine&&D.push(n)}s(E,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=E,s(D,r.compareByOriginalPositions),this.__originalMappings=D},c.prototype._findMapping=function(e,t,n,r,a,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return i.search(e,t,a,o)},c.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var a=r.getArg(i,"source",null);null!==a&&(a=this._sources.at(a),a=r.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var o=r.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:a,line:r.getArg(i,"originalLine",null),column:r.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},c.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i,a=e;if(null!=this.sourceRoot&&(a=r.relative(this.sourceRoot,a)),null!=this.sourceRoot&&(i=r.urlParse(this.sourceRoot))){var o=a.replace(/^file:\/\//,"");if("file"==i.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!i.path||"/"==i.path)&&this._sources.has("/"+a))return this.sourcesContent[this._sources.indexOf("/"+a)]}if(t)return null;throw new Error('"'+a+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(e){var t=r.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var n={source:t,originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(e,"bias",u.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===n.source)return{line:r.getArg(a,"generatedLine",null),column:r.getArg(a,"generatedColumn",null),lastColumn:r.getArg(a,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},d.prototype=Object.create(u.prototype),d.prototype.constructor=u,d.prototype._version=3,Object.defineProperty(d.prototype,"sources",{get:function(){for(var e=[],t=0;t0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},s.prototype._serializeMappings=function(){for(var e,t,n,a,o=0,s=1,u=0,c=0,l=0,d=0,p="",f=this._mappings.toArray(),h=0,g=f.length;h0){if(!i.compareByGeneratedPositionsInflated(t,f[h-1]))continue;e+=","}e+=r.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(a=this._sources.indexOf(t.source),e+=r.encode(a-d),d=a,e+=r.encode(t.originalLine-1-c),c=t.originalLine-1,e+=r.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-l),l=n)),p+=e}return p},s.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=i.relative(t,e));var n=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},s.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=s},6270:function(e,t,n){var r=n(2400).SourceMapGenerator,i=n(7837),a=/(\r?\n)/,o="$$$isSourceNode$$$";function s(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[o]=!0,null!=r&&this.add(r)}s.fromStringWithSourceMap=function(e,t,n){var r=new s,o=e.split(a),u=0,c=function(){return e()+(e()||"");function e(){return u=0;t--)this.prepend(e[t]);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},s.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n=0;l--)"."===(o=u[l])?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return""===(n=u.join("/"))&&(n=s?"/":"."),r?(r.path=n,a(r)):n}function s(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),s=i(e);if(s&&(e=s.path||"/"),n&&!n.scheme)return s&&(n.scheme=s.scheme),a(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var u="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=u,a(s)):u}t.urlParse=i,t.urlGenerate=a,t.normalize=o,t.join=s,t.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var u=!("__proto__"in Object.create(null));function c(e){return e}function l(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function d(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=u?c:function(e){return l(e)?"$"+e:e},t.fromSetString=u?c:function(e){return l(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=d(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:d(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=d(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:d(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=d(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var r=i(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var u=r.path.lastIndexOf("/");u>=0&&(r.path=r.path.substring(0,u+1))}t=s(a(r),t)}return o(t)}},2447:function(e,t,n){t.SourceMapGenerator=n(2400).SourceMapGenerator,t.SourceMapConsumer=n(8985).SourceMapConsumer,t.SourceNode=n(6270).SourceNode},6549:function(e,t,n){"use strict";var r=n(9992),i=n(4450),a=n(541),o=function(e){if("string"!=typeof(e=e.replace(a()," "))||0===e.length)return 0;e=r(e);for(var t=0,n=0;n=127&&o<=159||o>=768&&o<=879||(o>65535&&n++,t+=i(o)?2:1)}return t};e.exports=o,e.exports.default=o},4450:function(e){"use strict";var t=function(e){return!Number.isNaN(e)&&e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)};e.exports=t,e.exports.default=t},9992:function(e,t,n){"use strict";var r=n(2426);e.exports=function(e){return"string"==typeof e?e.replace(r(),""):e}},3210:function(e){"use strict";e.exports=function(e,t,n){return 0===e.length?e:t?(n||e.sort(t),function(e,t){for(var n=1,r=e.length,i=e[0],a=e[0],o=1;o=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"},convertEndOfLineToChars:function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}},countEndOfLineChars:function(e,t){var n;if("\n"===t)n=/\n/g;else if("\r"===t)n=/\r/g;else{if("\r\n"!==t)throw new Error('Unexpected "eol" '.concat(JSON.stringify(t),"."));n=/\r\n/g}var r=e.match(n);return r?r.length:0},normalizeEndOfLine:function(e){return e.replace(/\r\n?/g,"\n")}}},47:function(e){"use strict";e.exports=function(e,t){var n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n}},9428:function(e,t,n){"use strict";var r=n(6549),i=n(2240),a=n(4652),o=n(7290).getSupportInfo,s=/[^\x20-\x7F]/;function u(e){return function(t,n,r){var i=r&&r.backwards;if(!1===n)return!1;for(var a=t.length,o=n;o>=0&&o(n.match(o.regex)||[]).length?o.quote:a.quote),s}function C(e,t,n){var r='"'===t?"'":'"',i=e.replace(/\\([\S\s])|(["'])/g,(function(e,i,a){return i===r?i:a===t?"\\"+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)}));return t+i+t}function S(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,"JSXText"===e.type&&(t.printed=!0)}e.exports={inferParserByLanguage:function(e,t){var n=o({plugins:t.plugins}).languages,r=n.find((function(t){return t.name.toLowerCase()===e}))||n.find((function(t){var n=t.aliases;return Array.isArray(n)&&n.includes(e)}))||n.find((function(t){var n=t.extensions;return Array.isArray(n)&&n.includes(".".concat(e))}));return r&&r.parsers[0]},replaceEndOfLineWith:function(e,t){var n,r=[],i=c(e.split("\n"));try{for(i.s();!(n=i.n()).done;){var a=n.value;0!==r.length&&r.push(t),r.push(a)}}catch(o){i.e(o)}finally{i.f()}return r},getStringWidth:function(e){return e?s.test(e)?r(e):e.length:0},getMaxContinuousCount:function(e,t){var n=e.match(new RegExp("(".concat(i(t),")+"),"g"));return null===n?0:n.reduce((function(e,n){return Math.max(e,n.length/t.length)}),0)},getMinNotPresentContinuousCount:function(e,t){var n=e.match(new RegExp("(".concat(i(t),")+"),"g"));if(null===n)return 0;var r,a=new Map,o=0,s=c(n);try{for(s.s();!(r=s.n()).done;){var u=r.value.length/t.length;a.set(u,!0),u>o&&(o=u)}}catch(d){s.e(d)}finally{s.f()}for(var l=1;l0){for(var o=0;o0&&p(s),m()):g()}function g(){u>0&&f(u),m()}function m(){s=0,u=0}}function m(e){if(0===e.length)return 0;for(var t=0;e.length>0&&"string"==typeof e[e.length-1]&&e[e.length-1].match(/^[\t ]*$/);)t+=e.pop().length;if(e.length&&"string"==typeof e[e.length-1]){var n=e[e.length-1].replace(/[\t ]*$/,"");t+=e[e.length-1].length-n.length,e[e.length-1]=n}return t}function _(e,t,n,a,o){for(var s=t.length,c=[e],l=[];n>=0;)if(0!==c.length){var d=c.pop(),p=u(d,3),g=p[0],_=p[1],v=p[2];if("string"==typeof v)l.push(v),n-=i(v);else switch(v.type){case"concat":for(var y=v.parts.length-1;y>=0;y--)c.push([g,_,v.parts[y]]);break;case"indent":c.push([f(g,a),_,v.contents]);break;case"align":c.push([h(g,v.n,a),_,v.contents]);break;case"trim":n+=m(l);break;case"group":if(o&&v.break)return!1;c.push([g,v.break?1:_,v.contents]),v.id&&(r[v.id]=c[c.length-1][1]);break;case"fill":for(var b=v.parts.length-1;b>=0;b--)c.push([g,_,v.parts[b]]);break;case"if-break":var D=v.groupId?r[v.groupId]:_;1===D&&v.breakContents&&c.push([g,_,v.breakContents]),2===D&&v.flatContents&&c.push([g,_,v.flatContents]);break;case"line":switch(_){case 2:if(!v.hard){v.soft||(l.push(" "),n-=1);break}return!0;case 1:return!0}}}else{if(0===s)return!0;c.push(t[s-1]),s--}return!1}e.exports={printDocToString:function(e,t){r={};for(var n=t.printWidth,s=o(t.endOfLine),c=0,g=[[{value:"",length:0,queue:[]},1,e]],v=[],y=!1,b=[];0!==g.length;){var D=g.pop(),E=u(D,3),C=E[0],S=E[1],x=E[2];if("string"==typeof x){var k="\n"!==s&&x.includes("\n")?x.replace(/\n/g,s):x;v.push(k),c+=i(k)}else switch(x.type){case"cursor":v.push(p.placeholder);break;case"concat":for(var T=x.parts.length-1;T>=0;T--)g.push([C,S,x.parts[T]]);break;case"indent":g.push([f(C,t),S,x.contents]);break;case"align":g.push([h(C,x.n,t),S,x.contents]);break;case"trim":c-=m(v);break;case"group":switch(S){case 2:if(!y){g.push([C,x.break?1:2,x.contents]);break}case 1:y=!1;var w=[C,2,x.contents],A=n-c;if(!x.break&&_(w,g,A,t))g.push(w);else if(x.expandedStates){var O=x.expandedStates[x.expandedStates.length-1];if(x.break){g.push([C,1,O]);break}for(var N=1;N=x.expandedStates.length){g.push([C,1,O]);break}var I=[C,2,x.expandedStates[N]];if(_(I,g,A,t)){g.push(I);break}}}else g.push([C,1,x.contents])}x.id&&(r[x.id]=g[g.length-1][1]);break;case"fill":var F=n-c,L=x.parts;if(0===L.length)break;var P=u(L,2),R=P[0],M=P[1],B=[C,2,R],j=[C,1,R],U=_(B,[],F,t,!0);if(1===L.length){U?g.push(B):g.push(j);break}var V=[C,2,M],z=[C,1,M];if(2===L.length){U?(g.push(V),g.push(B)):(g.push(z),g.push(j));break}L.splice(0,2);var H=[C,S,d(L)],W=L[0];_([C,2,l([R,M,W])],[],F,t,!0)?(g.push(H),g.push(V),g.push(B)):U?(g.push(H),g.push(z),g.push(B)):(g.push(H),g.push(z),g.push(j));break;case"if-break":var K=x.groupId?r[x.groupId]:S;1===K&&x.breakContents&&g.push([C,S,x.breakContents]),2===K&&x.flatContents&&g.push([C,S,x.flatContents]);break;case"line-suffix":b.push([C,S,x.contents]);break;case"line-suffix-boundary":b.length>0&&g.push([C,S,{type:"line",hard:!0}]);break;case"line":switch(S){case 2:if(!x.hard){x.soft||(v.push(" "),c+=1);break}y=!0;case 1:if(b.length){g.push([C,S,x]),g.push.apply(g,a(b.reverse())),b=[];break}x.literal?C.root?(v.push(s,C.root.value),c=C.root.length):(v.push(s),c=0):(c-=m(v),v.push(s+C.value),c=C.length)}}0===g.length&&b.length&&(g.push.apply(g,a(b.reverse())),b=[])}var q=v.indexOf(p.placeholder);if(-1!==q){var G=v.indexOf(p.placeholder,q+1),Y=v.slice(0,q).join(""),J=v.slice(q+1,G).join("");return{formatted:Y+J+v.slice(G+1).join(""),cursorNodeStart:Y.length,cursorNodeText:J}}return{formatted:v.join("")}}}},630:function(e,t,n){"use strict";var r=n(5558),i=r.literalline,o=r.concat,s={};function u(e,t,n,r){for(var i=[e];0!==i.length;){var a=i.pop();if(a!==s){if(n&&i.push(a,s),!t||!1!==t(a))if("concat"===a.type||"fill"===a.type)for(var o=a.parts.length-1;o>=0;--o)i.push(a.parts[o]);else if("if-break"===a.type)a.flatContents&&i.push(a.flatContents),a.breakContents&&i.push(a.breakContents);else if("group"===a.type&&a.expandedStates)if(r)for(var u=a.expandedStates.length-1;u>=0;--u)i.push(a.expandedStates[u]);else i.push(a.contents);else a.contents&&i.push(a.contents)}else n(i.pop())}}function c(e,t){if("concat"===e.type||"fill"===e.type){var n=e.parts.map((function(e){return c(e,t)}));return t(Object.assign({},e,{parts:n}))}if("if-break"===e.type){var r=e.breakContents&&c(e.breakContents,t),i=e.flatContents&&c(e.flatContents,t);return t(Object.assign({},e,{breakContents:r,flatContents:i}))}if(e.contents){var a=c(e.contents,t);return t(Object.assign({},e,{contents:a}))}return t(e)}function l(e,t,n){var r=n,i=!1;return u(e,(function(e){var n=t(e);if(void 0!==n&&(i=!0,r=n),i)return!1})),r}function d(e){return"string"!=typeof e&&("line"===e.type||void 0)}function p(e){return!("group"!==e.type||!e.break)||!("line"!==e.type||!e.hard)||"break-parent"===e.type||void 0}function f(e){if(e.length>0){var t=e[e.length-1];t.expandedStates||(t.break=!0)}return null}function h(e){return"line"!==e.type||e.hard?"if-break"===e.type?e.flatContents||"":e:e.soft?"":" "}function g(e){for(var t=[],n=e.filter(Boolean);0!==n.length;){var r=n.shift();r&&("concat"!==r.type?0===t.length||"string"!=typeof t[t.length-1]||"string"!=typeof r?t.push(r):t[t.length-1]+=r:n.unshift.apply(n,a(r.parts)))}return t}e.exports={isEmpty:function(e){return"string"==typeof e&&0===e.length},willBreak:function(e){return l(e,p,!1)},isLineNext:function(e){return l(e,d,!1)},traverseDoc:u,findInDoc:l,mapDoc:c,propagateBreaks:function(e){var t=new Set,n=[];u(e,(function(e){if("break-parent"===e.type&&f(n),"group"===e.type){if(n.push(e),t.has(e))return!1;t.add(e)}}),(function(e){"group"===e.type&&n.pop().break&&f(n)}),!0)},removeLines:function(e){return c(e,h)},stripTrailingHardline:function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("concat"===t.type&&0!==t.parts.length){var r=n?function(e){for(var t,n=e.parts,r=e.parts.length;r>0&&!t;r--)t=n[r-1];return"group"===t.type&&(n=t.contents.parts),n}(t):t.parts,i=r[r.length-1];if("concat"===i.type)return 2===i.parts.length&&i.parts[0].hard&&"break-parent"===i.parts[1].type?{type:"concat",parts:r.slice(0,-1)}:{type:"concat",parts:t.parts.slice(0,-1).concat(e(i))}}return t},normalizeParts:g,normalizeDoc:function(e){return c(e,(function(e){return e.parts?Object.assign({},e,{parts:g(e.parts)}):e}))},replaceNewlinesWithLiterallines:function(e){return c(e,(function(e){return"string"==typeof e&&e.includes("\n")?o(e.split(/(\n)/g).map((function(e,t){return t%2==0?e:i}))):e}))}}},3091:function(e,t,n){"use strict";e.exports={builders:n(5558),printer:n(9765),utils:n(630),debug:n(3839)}},9355:function(e,t,n){"use strict";var r=n(6920),i=n(9428),a=i.getLast,o=i.skipEverythingButNewLine;function s(e,t){return"number"==typeof e.sourceIndex?e.sourceIndex:e.source?r(e.source.start,t)-1:null}function c(e,t){if("css-comment"===e.type&&e.inline)return o(t,e.source.startOffset);var n=e.nodes&&a(e.nodes);return n&&e.source&&!e.source.end&&(e=n),e.source&&e.source.end?r(e.source.end,t):null}function l(e,t,n){for(var r in e.source&&(e.source.startOffset=s(e,n)+t,e.source.endOffset=c(e,n)+t),e){var i=e[r];"source"!==r&&i&&"object"==typeof i&&l(i,t,n)}}function d(e){var t=e.source.startOffset;return"string"==typeof e.prop&&(t+=e.prop.length),"css-atrule"===e.type&&"string"==typeof e.name&&(t+=1+e.name.length+e.raws.afterName.match(/^\s*:?\s*/)[0].length),"css-atrule"!==e.type&&e.raws&&"string"==typeof e.raws.between&&(t+=e.raws.between.length),t}e.exports={locStart:function(e){return e.source.startOffset},locEnd:function(e){return e.source.endOffset},calculateLoc:function e(t,n){for(var r in t.source&&(t.source.startOffset=s(t,n),t.source.endOffset=c(t,n)),t){var i=t[r];"source"!==r&&i&&"object"==typeof i&&("value-root"===i.type||"value-unknown"===i.type?l(i,d(t),i.text||i.value):e(i,n))}},replaceQuotesInInlineComments:function(e){for(var t,n="initial",r="initial",i=!1,a=[],o=0;o0&&r.groups.push(o),a}function E(e){return"paren_group"!==e.type||e.open||e.close||1!==e.groups.length?"comma_group"===e.type&&1===e.groups.length?E(e.groups[0]):"paren_group"===e.type||"comma_group"===e.type?Object.assign({},e,{groups:e.groups.map(E)}):e:E(e.groups[0])}function C(e,t,n){if(e&&"object"==typeof e)for(var r in delete e.parent,e)C(e[r],t,n),"type"===r&&"string"==typeof e[r]&&(e[r].startsWith(t)||n&&n.test(e[r])||(e[r]=t+e[r]));return e}function S(e){if(e&&"object"==typeof e){for(var t in delete e.parent,e)S(e[t]);Array.isArray(e)||!e.value||e.type||(e.type="unknown")}return e}function x(e,t){if(e&&"object"==typeof e){for(var n in e)"parent"!==n&&(x(e[n],t),"nodes"===n&&(e.group=E(D(e,t)),delete e[n]));delete e.parent}return e}function k(e,t){var r=n(9962),i=null;try{i=r(e,{loose:!0}).parse()}catch(t){return{type:"value-unknown",value:e}}return i.text=e,C(x(i,t),"value-",/^selector-/)}function T(e){if(/\/\/|\/\*/.test(e))return{type:"selector-unknown",value:e.trim()};var t=n(1264),r=null;try{t((function(e){r=e})).process(e)}catch(t){return{type:"selector-unknown",value:e}}return C(r,"selector-")}function w(e){var t=n(8322).Z,r=null;try{r=t(e)}catch(t){return{type:"selector-unknown",value:e}}return C(S(r),"media-")}var A=/(\s*?)(!default).*$/,O=/(\s*?)(!global).*$/;function N(e,t){if(e&&"object"==typeof e){for(var n in delete e.parent,e)N(e[n],t);if(!e.type)return e;e.raws||(e.raws={});var r="";"string"==typeof e.selector&&(r=e.raws.selector?e.raws.selector.scss?e.raws.selector.scss:e.raws.selector.raw:e.selector,e.raws.between&&e.raws.between.trim().length>0&&(r+=e.raws.between),e.raws.selector=r);var i="";"string"==typeof e.value&&(i=(i=e.raws.value?e.raws.value.scss?e.raws.value.scss:e.raws.value.raw:e.value).trim(),e.raws.value=i);var a="";if("string"==typeof e.params&&(a=e.raws.params?e.raws.params.scss?e.raws.params.scss:e.raws.params.raw:e.params,e.raws.afterName&&e.raws.afterName.trim().length>0&&(a=e.raws.afterName+a),e.raws.between&&e.raws.between.trim().length>0&&(a+=e.raws.between),a=a.trim(),e.raws.params=a),r.trim().length>0)return r.startsWith("@")&&r.endsWith(":")?e:e.mixin?(e.selector=k(r,t),e):(d(e)&&(e.isSCSSNesterProperty=!0),e.selector=T(r),e);if(i.length>0){var o=i.match(A);o&&(i=i.slice(0,o.index),e.scssDefault=!0,"!default"!==o[0].trim()&&(e.raws.scssDefault=o[0]));var s=i.match(O);if(s&&(i=i.slice(0,s.index),e.scssGlobal=!0,"!global"!==s[0].trim()&&(e.raws.scssGlobal=s[0])),i.startsWith("progid:"))return{type:"value-unknown",value:i};e.value=k(i,t)}if(c(t)&&"css-decl"===e.type&&i.startsWith("extend(")&&(e.extend||(e.extend=":"===e.raws.between),e.extend&&!e.selector&&(delete e.value,e.selector=T(i.slice("extend(".length,-1)))),"css-atrule"===e.type){if(c(t)){if(e.mixin){var u=e.raws.identifier+e.name+e.raws.afterName+e.raws.params;return e.selector=T(u),delete e.params,e}if(e.function)return e}if("css"===t.parser&&"custom-selector"===e.name){var l=e.params.match(/:--\S+?\s+/)[0].trim();return e.customSelector=l,e.selector=T(e.params.slice(l.length).trim()),delete e.params,e}if(c(t)){if(e.name.includes(":")&&!e.params){e.variable=!0;var p=e.name.split(":");e.name=p[0],e.value=k(p.slice(1).join(":"),t)}if(!["page","nest"].includes(e.name)&&e.params&&":"===e.params[0]&&(e.variable=!0,e.value=k(e.params.slice(1),t),e.raws.afterName+=":"),e.variable)return delete e.params,e}}if("css-atrule"===e.type&&a.length>0){var f=e.name,h=e.name.toLowerCase();return"warn"===f||"error"===f?(e.params={type:"media-unknown",value:a},e):"extend"===f||"nest"===f?(e.selector=T(a),delete e.params,e):"at-root"===f?(/^\(\s*(without|with)\s*:[\S\s]+\)$/.test(a)?e.params=k(a,t):(e.selector=T(a),delete e.params),e):"import"===h?(e.import=!0,delete e.filename,e.params=k(a,t),e):["namespace","supports","if","else","for","each","while","debug","mixin","include","function","return","define-mixin","add-mixin"].includes(f)?(a=(a=a.replace(/(\$\S+?)\s+?\.{3}/,"$1...")).replace(/^(?!if)(\S+)\s+\(/,"$1("),e.value=k(a,t),delete e.params,e):["media","custom-media"].includes(h)?a.includes("#{")?{type:"media-unknown",value:a}:(e.params=w(a),e):(e.params=a,e)}}return e}function I(e,t,n){var a,o=i(t),s=o.frontMatter;t=o.content;try{a=e(t)}catch(e){var u=e.name,c=e.reason,l=e.line,d=e.column;if("number"!=typeof l)throw e;throw r("".concat(u,": ").concat(c),{start:{line:l,column:d}})}return a=N(C(a,"css-"),n),v(a,t),s&&(s.source={startOffset:0,endOffset:s.raw.length},a.nodes.unshift(s)),a}function F(e,t,r){var i=n(7371);return I((function(e){return i.parse(y(e))}),e,r)}function L(e,t,r){return I(n(304).parse,e,r)}var P={astFormat:"postcss",hasPragma:a,locStart:g,locEnd:m};e.exports={parsers:{css:Object.assign({},P,{parse:function(e,t,n){for(var r,i=0,a=l(n.parser,e)?[L,F]:[F,L];i0;t--)if("word"===e[t].type&&"{"===e[t].value&&"word"===e[t-1].type&&e[t-1].value.endsWith("#"))return!0;return!1},hasStringOrFunction:function(e){if(e&&e.length)for(var t=0;t","<=",">="].includes(e.value)},isEqualityOperatorNode:function(e){return"value-word"===e.type&&["==","!="].includes(e.value)},isMultiplicationNode:i,isDivisionNode:a,isAdditionNode:o,isSubtractionNode:s,isModuloNode:u,isMathOperatorNode:function(e){return i(e)||a(e)||o(e)||s(e)||u(e)},isEachKeywordNode:function(e){return"value-word"===e.type&&"in"===e.value},isForKeywordNode:function(e){return"value-word"===e.type&&["from","through","end"].includes(e.value)},isURLFunctionNode:function(e){return"value-func"===e.type&&"url"===e.value.toLowerCase()},isIfElseKeywordNode:function(e){return"value-word"===e.type&&["and","or","not"].includes(e.value)},hasComposesNode:function(e){return e.value&&"value-root"===e.value.type&&e.value.group&&"value-value"===e.value.group.type&&"composes"===e.prop.toLowerCase()},hasParensAroundNode:function(e){return e.value&&e.value.group&&e.value.group.group&&"value-paren_group"===e.value.group.group.type&&null!==e.value.group.group.open&&null!==e.value.group.group.close},hasEmptyRawBefore:function(e){return e.raws&&""===e.raws.before},isSCSSNestedPropertyNode:function(e){return!!e.selector&&e.selector.replace(/\/\*.*?\*\//,"").replace(/\/\/.*?\n/,"").trim().endsWith(":")},isDetachedRulesetCallNode:function(e){return e.raws&&e.raws.params&&/^\(\s*\)$/.test(e.raws.params)},isTemplatePlaceholderNode:function(e){return e.name.startsWith("prettier-placeholder")},isTemplatePropNode:function(e){return e.prop.startsWith("@prettier-placeholder")},isPostcssSimpleVarNode:function(e,t){return"$$"===e.value&&"value-func"===e.type&&t&&"value-word"===t.type&&!t.raws.before},isKeyValuePairNode:c,isKeyValuePairInParenGroupNode:l,isSCSSMapItemNode:function(e){var t=e.getValue();if(0===t.groups.length)return!1;var n=e.getParentNode(1);if(!(l(t)||n&&l(n)))return!1;var i=r(e,"css-decl");return!!(i&&i.prop&&i.prop.startsWith("$"))||!!l(n)||"value-func"===n.type},isInlineValueCommentNode:function(e){return"value-comment"===e.type&&e.inline},isHashNode:function(e){return"value-word"===e.type&&"#"===e.value},isLeftCurlyBraceNode:function(e){return"value-word"===e.type&&"{"===e.value},isRightCurlyBraceNode:function(e){return"value-word"===e.type&&"}"===e.value},isWordNode:function(e){return["value-word","value-atword"].includes(e.type)},isColonNode:function(e){return"value-colon"===e.type},isMediaAndSupportsKeywords:function(e){return e.value&&["not","and","or"].includes(e.value.toLowerCase())},isColorAdjusterFuncNode:function(e){return"value-func"===e.type&&t.has(e.value.toLowerCase())},lastLineHasInlineComment:function(e){return/\/\//.test(e.split(/[\n\r]/).pop())},stringifyNode:function e(t){if(t.groups)return(t.open&&t.open.value?t.open.value:"")+t.groups.reduce((function(n,r,i){return n+e(r)+("comma_group"===t.groups[0].type&&i!==t.groups.length-1?",":"")}),"")+(t.close&&t.close.value?t.close.value:"");var n=t.raws&&t.raws.before?t.raws.before:"",r=t.raws&&t.raws.quote?t.raws.quote:"";return n+r+("atword"===t.type?"@":"")+(t.value?t.value:"")+r+(t.unit?t.unit:"")+(t.group?e(t.group):"")+(t.raws&&t.raws.after?t.raws.after:"")},isAtWordPlaceholderNode:function(e){return e&&"value-atword"===e.type&&e.value.startsWith("prettier-placeholder-")}}},3831:function(e,t,n){"use strict";var r=n(9234),i=r.parseWithComments,a=r.strip,o=r.extract,s=r.print,u=n(9428).getShebang,c=n(7933).normalizeEndOfLine;function l(e){var t=u(e);t&&(e=e.slice(t.length+1));var n=o(e),r=i(n);return{shebang:t,text:e,pragmas:r.pragmas,comments:r.comments}}e.exports={hasPragma:function(e){var t=Object.keys(l(e).pragmas);return t.includes("prettier")||t.includes("format")},insertPragma:function(e){var t=l(e),n=t.shebang,r=t.text,i=t.pragmas,o=t.comments,u=a(r),d=s({pragmas:Object.assign({format:""},i),comments:o.trimStart()});return(n?"".concat(n,"\n"):"")+c(d)+(u.startsWith("\n")?"\n":"\n\n")+u}}},8988:function(e,t,n){"use strict";function r(){var e=c(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]);return r=function(){return e},e}function i(){var e=c(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]);return i=function(){return e},e}function a(){var e=c(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]);return a=function(){return e},e}function o(){var e=c(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]);return o=function(){return e},e}function s(){var e=c(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "]);return s=function(){return e},e}function u(){var e=c(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]);return u=function(){return e},e}function c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var l=n(5311).outdent,d="Config",p="Editor",f="Other",h="Global",g="Special",m={cursorOffset:{since:"1.4.0",category:g,type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:l(u()),cliCategory:p},endOfLine:{since:"1.15.0",category:h,type:"choice",default:[{since:"1.15.0",value:"auto"},{since:"2.0.0",value:"lf"}],description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:l(s())}]},filepath:{since:"1.4.0",category:g,type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:f,cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{since:"1.8.0",category:g,type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:f},parser:{since:"0.0.10",category:h,type:"choice",default:[{since:"0.0.10",value:"babylon"},{since:"1.13.0",value:void 0}],description:"Which parser to use.",exception:function(e){return"string"==typeof e||"function"==typeof e},choices:[{value:"flow",description:"Flow"},{value:"babel",since:"1.16.0",description:"JavaScript"},{value:"babel-flow",since:"1.16.0",description:"Flow"},{value:"babel-ts",since:"2.0.0",description:"TypeScript"},{value:"typescript",since:"1.4.0",description:"TypeScript"},{value:"espree",since:"2.2.0",description:"JavaScript"},{value:"meriyah",since:"2.2.0",description:"JavaScript"},{value:"css",since:"1.7.1",description:"CSS"},{value:"less",since:"1.7.1",description:"Less"},{value:"scss",since:"1.7.1",description:"SCSS"},{value:"json",since:"1.5.0",description:"JSON"},{value:"json5",since:"1.13.0",description:"JSON5"},{value:"json-stringify",since:"1.13.0",description:"JSON.stringify"},{value:"graphql",since:"1.5.0",description:"GraphQL"},{value:"markdown",since:"1.8.0",description:"Markdown"},{value:"mdx",since:"1.15.0",description:"MDX"},{value:"vue",since:"1.10.0",description:"Vue"},{value:"yaml",since:"1.14.0",description:"YAML"},{value:"glimmer",since:null,description:"Handlebars"},{value:"html",since:"1.15.0",description:"HTML"},{value:"angular",since:"1.15.0",description:"Angular"},{value:"lwc",since:"1.17.0",description:"Lightning Web Components"}]},plugins:{since:"1.10.0",type:"path",array:!0,default:[{value:[]}],category:h,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:function(e){return"string"==typeof e||"object"==typeof e},cliName:"plugin",cliCategory:d},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:h,description:l(o()),exception:function(e){return"string"==typeof e||"object"==typeof e},cliName:"plugin-search-dir",cliCategory:d},printWidth:{since:"0.0.0",category:h,type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{since:"1.4.0",category:g,type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:l(a()),cliCategory:p},rangeStart:{since:"1.4.0",category:g,type:"int",default:0,range:{start:0,end:1/0,step:1},description:l(i()),cliCategory:p},requirePragma:{since:"1.7.0",category:g,type:"boolean",default:!1,description:l(r()),cliCategory:f},tabWidth:{type:"int",category:h,default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{since:"1.0.0",category:h,type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:h,type:"choice",default:[{since:"2.1.0",value:"auto"}],description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};e.exports={CATEGORY_CONFIG:d,CATEGORY_EDITOR:p,CATEGORY_FORMAT:"Format",CATEGORY_OTHER:f,CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:h,CATEGORY_SPECIAL:g,options:m}},7290:function(e,t,n){"use strict";var r={compare:n(2828),lt:n(3725),gte:n(9195)},i=n(9077),o=n(306).i8,s=n(8988).options;e.exports={getSupportInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.plugins,n=void 0===t?[]:t,u=e.showUnreleased,l=void 0!==u&&u,d=e.showDeprecated,p=void 0!==d&&d,f=e.showInternal,h=void 0!==f&&f,g=o.split("-",1)[0],m=n.reduce((function(e,t){return e.concat(t.languages||[])}),[]).filter(v),_=i(Object.assign.apply(Object,[{}].concat(a(n.map((function(e){return e.options}))),[s])),"name").filter((function(e){return v(e)&&y(e)})).sort((function(e,t){return e.name===t.name?0:e.name=0||(i[n]=e[n]);return i}(e,["cliName","cliCategory","cliDescription"])})).map((function(e){e=Object.assign({},e),Array.isArray(e.default)&&(e.default=1===e.default.length?e.default[0].value:e.default.filter(v).sort((function(e,t){return r.compare(t.since,e.since)}))[0].value),Array.isArray(e.choices)&&(e.choices=e.choices.filter((function(e){return v(e)&&y(e)})),"parser"===e.name&&function(e,t,n){var r,i=new Set(e.choices.map((function(e){return e.value}))),a=c(t);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(o.parsers){var s,u=c(o.parsers);try{var l=function(){var t=s.value;if(!i.has(t)){i.add(t);var r=n.find((function(e){return e.parsers&&e.parsers[t]})),a=o.name;r&&r.name&&(a+=" (plugin: ".concat(r.name,")")),e.choices.push({value:t,description:a})}};for(u.s();!(s=u.n()).done;)l()}catch(d){u.e(d)}finally{u.f()}}}}catch(d){a.e(d)}finally{a.f()}}(e,m,n));var t=n.filter((function(t){return t.defaultOptions&&void 0!==t.defaultOptions[e.name]})).reduce((function(t,n){return t[n.name]=n.defaultOptions[e.name],t}),{});return Object.assign({},e,{pluginDefaults:t})}));return{languages:m,options:_};function v(e){return l||!("since"in e)||e.since&&r.gte(g,e.since)}function y(e){return p||!("deprecated"in e)||e.deprecated&&r.lt(g,e.deprecated)}}}},9077:function(e){"use strict";e.exports=function(e,t){return Object.entries(e).map((function(e){var n=u(e,2),r=n[0],a=n[1];return Object.assign(i({},t,r),a)}))}},3405:function(e,t,n){"use strict";var r=n(2240),i=n(3091).builders,a=i.hardline,o=i.concat,s=i.markAsRoot,c={"---":"yaml","+++":"toml"};e.exports={parse:function(e){var t=Object.keys(c).map(r).join("|"),n=e.match(new RegExp("^(".concat(t,")([^\\n]*)\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));if(null===n)return{frontMatter:null,content:e};var i=u(n,4),a=i[0],o=i[1],s=i[2],l=i[3],d=c[o];return"toml"!==d&&s&&s.trim()&&(d=s.trim()),{frontMatter:{type:"front-matter",lang:d,value:l,raw:a.replace(/\n$/,"")},content:a.replace(/[^\n]/g," ")+e.slice(a.length)}},print:function(e,t){if("yaml"===e.lang){var n=e.value.trim(),r=n?t(n,{parser:"yaml"},{stripTrailingHardline:!0}):"";return s(o(["---",a,r,r?a:"","---"]))}}}},4652:function(e){"use strict";e.exports=function(e){return e[e.length-1]}},6920:function(e){"use strict";e.exports=function(e,t){for(var n=0,r=0;r1)for(var n=1;n-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),u)};function u(n){return 40===n?e.attempt(h,t,i?t:c)(n):91===n?e.attempt(g,t,i?e.attempt(m,t,c):c)(n):i?t(n):c(n)}function c(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){var n,a,u,c,l,d,p,f=e.length,h=0;for(;f--;)if(c=e[f][1],l){if("link"===c.type||"labelLink"===c.type&&c._inactive)break;"enter"===e[f][0]&&"labelLink"===c.type&&(c._inactive=!0)}else if(d){if("enter"===e[f][0]&&("labelImage"===c.type||"labelLink"===c.type)&&!c._balanced&&(l=f,"labelLink"!==c.type)){h=2;break}}else"labelEnd"===c.type&&(d=f);return n={type:"labelLink"===e[l][1].type?"link":"image",start:o(e[l][1].start),end:o(e[e.length-1][1].end)},a={type:"label",start:o(e[l][1].start),end:o(e[d][1].end)},u={type:"labelText",start:o(e[l+h+2][1].end),end:o(e[d-2][1].start)},p=i(p=[["enter",n,t],["enter",a,t]],e.slice(l+1,l+h+3)),p=i(p,[["enter",u,t]]),p=i(p,s(t.parser.constructs.insideSpan.null,e.slice(l+h+4,d-3),t)),p=i(p,[["exit",u,t],e[d-2],e[d-1],["exit",a,t]]),p=i(p,e.slice(d+1)),p=i(p,[["exit",n,t]]),r(e,l,e.length,p),e},resolveAll:function(e){var t,n=-1;for(;++n=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||r.indexOf(e)>-1}},function(e,t,n){"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},function(e,t,n){"use strict";var r=n(88),i=n(93),a=n(124),o=n(133),s=function(e){a(n,e);var t=o(n);function n(e,i){var a;return r(this,n),(a=t.call(this,e)).posTracker=null,a.onParseError=i.onParseError,a}return i(n,[{key:"_setErrorLocation",value:function(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}},{key:"_reportError",value:function(e){var t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}},{key:"_getOverriddenMethods",value:function(e){return{_err:function(t){e._reportError(t)}}}}]),n}(n(169));e.exports=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(0),i=n(1),a=n(17),o=n(15),s=n(4),u=n(5),c=n(207),l=n(11),d=n(7),p=n(49),f=n(8),h={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},g=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,n),(i=t.call(this))._onDidUpdate=i._register(new l.a),i._editor=e,i._options=p.f(a,h,!1),i.disposed=!1,i.nextIdx=-1,i.ranges=[],i.ignoreSelectionChange=!1,i.revealFirst=Boolean(i._options.alwaysRevealFirst),i._register(i._editor.onDidDispose((function(){return i.dispose()}))),i._register(i._editor.onDidUpdateDiff((function(){return i._onDiffUpdated()}))),i._options.followsCaret&&i._register(i._editor.getModifiedEditor().onDidChangeCursorPosition((function(e){i.ignoreSelectionChange||(i.nextIdx=-1)}))),i._options.alwaysRevealFirst&&i._register(i._editor.getModifiedEditor().onDidChangeModel((function(e){i.revealFirst=!0}))),i._init(),i}return Object(i.a)(n,[{key:"_init",value:function(){this._editor.getLineChanges()}},{key:"_onDiffUpdated",value:function(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}},{key:"_compute",value: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 f.a(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):t.ranges.push({rhs:!0,range:new f.a(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)}},{key:"_initIdx",value:function(e){var t=!1,n=this._editor.getPosition();if(n){for(var r=0,i=this.ranges.length;r=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var r=n.range.getStartPosition();this._editor.setPosition(r),this._editor.revealPositionInCenter(r,t)}finally{this.ignoreSelectionChange=!1}}}},{key:"canNavigate",value:function(){return this.ranges&&this.ranges.length>0}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._move(!0,e)}},{key:"previous",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._move(!1,e)}},{key:"dispose",value:function(){Object(a.a)(Object(o.a)(n.prototype),"dispose",this).call(this),this.ranges=[],this.disposed=!0}}]),n}(d.a)},function(e,t,n){"use strict";var r=n(425),i=n(426),a=n(258),o=n(427),s=n(428),u=n(430);e.exports=function e(){var t=[],n=s(),i={},v=!1,y=-1;return b.data=function(e,t){if("string"===typeof e)return 2===arguments.length?(g("data",v),i[e]=t,b):l.call(i,e)&&i[e]||null;if(e)return g("data",v),i=e,b;return i},b.freeze=D,b.attachers=t,b.use=function(e){var n;if(g("use",v),null===e||void 0===e);else if("function"===typeof e)l.apply(null,arguments);else{if("object"!==typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?u(e):r(e)}n&&(i.settings=a(i.settings||{},n));return b;function r(e){u(e.plugins),e.settings&&(n=a(n||{},e.settings))}function s(e){if("function"===typeof e)l(e);else{if("object"!==typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?l.apply(null,e):r(e)}}function u(e){var t,n;if(null===e||void 0===e);else{if("object"!==typeof e||!("length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(t=e.length,n=-1;++nd)&&(d=D),0!==E&&(0===h||Eg)&&(g=C)}var S=document.createElement("div");S.className="diff-review-row";var x=document.createElement("div");x.className="diff-review-cell diff-review-summary";var k=d-l+1,T=g-h+1;x.appendChild(document.createTextNode("".concat(s+1,"/").concat(this._diffs.length,": @@ -").concat(l,",").concat(k," +").concat(h,",").concat(T," @@"))),S.setAttribute("data-line",String(h));var w=function(e){return 0===e?p.a("no_lines_changed","no lines changed"):1===e?p.a("one_line_changed","1 line changed"):p.a("more_lines_changed","{0} lines changed",e)},A=w(k),O=w(T);S.setAttribute("aria-label",p.a({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",s+1,this._diffs.length,l,A,h,O)),S.appendChild(x),S.setAttribute("role","listitem"),c.appendChild(S);for(var N=t.get(53),I=h,F=0,L=u.length;F0){var v=e[a-1];m=0===v.originalEndLineNumber?v.originalStartLineNumber+1:v.originalEndLineNumber+1,_=0===v.modifiedEndLineNumber?v.modifiedStartLineNumber+1:v.modifiedEndLineNumber+1}var y=h-3+1,b=g-3+1;if(yx){var O=x-w;w+=O,A+=O}if(A>k){var N=k-A;w+=N,A+=N}p[f++]=new B(C,w,S,A),r[i++]=new j(p)}for(var I=r[0].entries,F=[],L=0,P=1,R=r.length;Po.modifiedStartLineNumber?p.a("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):p.a("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"),void 0,!0,(function(){return se(Object(i.a)(c),void 0,void 0,oe.a.mark((function e(){var t,n;return oe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Y.a(o.originalStartLineNumber,1,o.originalEndLineNumber+1,1),n=o.originalModel.getValueInRange(t),e.next=4,this._clipboardService.writeText(n);case 4:case"end":return e.stop()}}),e,this)})))})));var m=0,_=void 0;o.originalEndLineNumber>o.modifiedStartLineNumber&&(_=new x.a("diff.clipboard.copyDeletedLineContent",p.a("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",o.originalStartLineNumber),void 0,!0,(function(){return se(Object(i.a)(c),void 0,void 0,oe.a.mark((function e(){var t;return oe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.originalModel.getLineContent(o.originalStartLineNumber+m),e.next=3,this._clipboardService.writeText(t);case 3:case"end":return e.stop()}}),e,this)})))})),g.push(_)),a.getOption(75)||g.push(new x.a("diff.inline.revertChange",p.a("diff.inline.revertChange.label","Revert this change"),void 0,!0,(function(){return se(Object(i.a)(c),void 0,void 0,oe.a.mark((function e(){var t,n,r,i;return oe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=new Y.a(o.originalStartLineNumber,1,o.originalEndLineNumber,o.originalModel.getLineMaxColumn(o.originalEndLineNumber)),n=o.originalModel.getValueInRange(t),0===o.modifiedEndLineNumber?(r=a.getModel().getLineMaxColumn(o.modifiedStartLineNumber),a.executeEdits("diffEditor",[{range:new Y.a(o.modifiedStartLineNumber,r,o.modifiedStartLineNumber,r),text:h+n}])):(i=a.getModel().getLineMaxColumn(o.modifiedEndLineNumber),a.executeEdits("diffEditor",[{range:new Y.a(o.modifiedStartLineNumber,1,o.modifiedEndLineNumber,i),text:n}]));case 3:case"end":return e.stop()}}),e)})))})));var v=function(e,t){c._contextMenuService.showContextMenu({getAnchor:function(){return{x:e,y:t}},getActions:function(){return _&&(_.label=p.a("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",o.originalStartLineNumber+m)),g},autoSelectFirstItem:!0})};return c._register(f.addStandardDisposableListener(c._diffActions,"mousedown",(function(e){var t=f.getDomNodePagePosition(c._diffActions),n=t.top,r=t.height,i=Math.floor(d/3);e.preventDefault(),v(e.posx,n+r+i)}))),c._register(a.onMouseMove((function(e){8===e.target.type||5===e.target.type?e.target.detail.viewZoneId===c._viewZoneId?(c.visibility=!0,m=c._updateLightBulbPosition(c._marginDomNode,e.event.browserEvent.y,d)):c.visibility=!1:c.visibility=!1}))),c._register(a.onMouseDown((function(e){e.event.rightButton&&(8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===c._viewZoneId&&(e.event.preventDefault(),m=c._updateLightBulbPosition(c._marginDomNode,e.event.browserEvent.y,d),v(e.event.posx,e.event.posy+d)))}))),c}return Object(d.a)(n,[{key:"_updateLightBulbPosition",value:function(e,t,n){var r=t-f.getDomNodePagePosition(e).top,i=Math.floor(r/n),a=i*n;if(this._diffActions.style.top="".concat(a,"px"),this.diff.viewLineCounts)for(var o=0,s=0;s=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},ge=function(e,t){return function(n,r){t(n,r,e)}},me=function(){function e(t,n){Object(l.a)(this,e),this._contextMenuService=t,this._clipboardService=n,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}return Object(d.a)(e,[{key:"getForeignViewZones",value:function(e){var t=this;return e.filter((function(e){return!t._zonesMap[String(e.id)]}))}},{key:"clean",value:function(e){var t=this;this._zones.length>0&&e.changeViewZones((function(e){var n,r=Object(c.a)(t._zones);try{for(r.s();!(n=r.n()).done;){var i=n.value;e.removeZone(i)}}catch(a){r.e(a)}finally{r.f()}})),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}},{key:"apply",value:function(e,t,n,r){var i=this,a=r?b.c.capture(e):null;e.changeViewZones((function(t){var r,a=Object(c.a)(i._zones);try{for(a.s();!(r=a.n()).done;){var o=r.value;t.removeZone(o)}}catch(h){a.e(h)}finally{a.f()}var s,u=Object(c.a)(i._inlineDiffMargins);try{for(u.s();!(s=u.n()).done;){s.value.dispose()}}catch(h){u.e(h)}finally{u.f()}i._zones=[],i._zonesMap={},i._inlineDiffMargins=[];for(var l=0,d=n.zones.length;l1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealLine(e,t)}},{key:"revealLineInCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealLineInCenter(e,t)}},{key:"revealLineInCenterIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}},{key:"revealLineNearTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealLineNearTop(e,t)}},{key:"revealPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealPosition(e,t)}},{key:"revealPositionInCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealPositionInCenter(e,t)}},{key:"revealPositionInCenterIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}},{key:"revealPositionNearTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealPositionNearTop(e,t)}},{key:"getSelection",value:function(){return this._modifiedEditor.getSelection()}},{key:"getSelections",value:function(){return this._modifiedEditor.getSelections()}},{key:"setSelection",value:function(e){this._modifiedEditor.setSelection(e)}},{key:"setSelections",value:function(e){this._modifiedEditor.setSelections(e)}},{key:"revealLines",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._modifiedEditor.revealLines(e,t,n)}},{key:"revealLinesInCenter",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._modifiedEditor.revealLinesInCenter(e,t,n)}},{key:"revealLinesInCenterIfOutsideViewport",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,n)}},{key:"revealLinesNearTop",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._modifiedEditor.revealLinesNearTop(e,t,n)}},{key:"revealRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this._modifiedEditor.revealRange(e,t,n,r)}},{key:"revealRangeInCenter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealRangeInCenter(e,t)}},{key:"revealRangeInCenterIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}},{key:"revealRangeNearTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealRangeNearTop(e,t)}},{key:"revealRangeNearTopIfOutsideViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}},{key:"revealRangeAtTop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._modifiedEditor.revealRangeAtTop(e,t)}},{key:"getSupportedActions",value:function(){return this._modifiedEditor.getSupportedActions()}},{key:"saveViewState",value:function(){return{original:this._originalEditor.saveViewState(),modified:this._modifiedEditor.saveViewState()}}},{key:"restoreViewState",value:function(e){if(e&&e.original&&e.modified){var t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}},{key:"layout",value:function(e){this._elementSizeObserver.observe(e)}},{key:"focus",value:function(){this._modifiedEditor.focus()}},{key:"hasTextFocus",value:function(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}},{key:"trigger",value:function(e,t,n){this._modifiedEditor.trigger(e,t,n)}},{key:"changeDecorations",value:function(e){return this._modifiedEditor.changeDecorations(e)}},{key:"_onDidContainerSizeChanged",value:function(){this._doLayout()}},{key:"_getReviewHeight",value:function(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}},{key:"_layoutOverviewRulers",value:function(){if(this._renderOverviewRuler&&this._originalOverviewRuler&&this._modifiedOverviewRuler){var e=this._elementSizeObserver.getHeight(),t=this._getReviewHeight(),r=n.ENTIRE_DIFF_OVERVIEW_WIDTH-2*n.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:n.ONE_OVERVIEW_WIDTH,right:r+n.ONE_OVERVIEW_WIDTH,height:e-t}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:n.ONE_OVERVIEW_WIDTH,height:e-t}))}}},{key:"_onViewZonesChanged",value:function(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}},{key:"_beginUpdateDecorationsSoon",value:function(){var e=this;-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((function(){return e._beginUpdateDecorations()}),n.UPDATE_DIFF_DECORATIONS_DELAY)}},{key:"_beginUpdateDecorations",value:function(){var e=this;this._beginUpdateDecorationsTimeout=-1;var t=this._originalEditor.getModel(),r=this._modifiedEditor.getModel();if(t&&r){this._diffComputationToken++;var i=this._diffComputationToken;this._setState(1),this._editorWorkerService.canComputeDiff(t.uri,r.uri)?this._editorWorkerService.computeDiff(t.uri,r.uri,this._ignoreTrimWhitespace,this._maxComputationTime).then((function(n){i===e._diffComputationToken&&t===e._originalEditor.getModel()&&r===e._modifiedEditor.getModel()&&(e._setState(2),e._diffComputationResult=n,e._updateDecorationsRunner.schedule(),e._onDidUpdateDiff.fire())}),(function(n){i===e._diffComputationToken&&t===e._originalEditor.getModel()&&r===e._modifiedEditor.getModel()&&(e._setState(2),e._diffComputationResult=null,e._updateDecorationsRunner.schedule())})):n._equals(t.uri,this._lastOriginalWarning)&&n._equals(r.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=r.uri,this._notificationService.warn(p.a("diff.tooLarge","Cannot compare files because one file is too large.")))}}},{key:"_cleanViewZonesAndDecorations",value:function(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}},{key:"_updateDecorations",value:function(){if(this._originalEditor.getModel()&&this._modifiedEditor.getModel()){var e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),n=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),r=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,this._renderIndicators,t,n);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,r.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,r.modified,!0)}finally{this._currentlyChangingViewZones=!1}}}},{key:"_adjustOptionsForSubEditor",value:function(e){var t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=t.scrollbar||{},t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap||(t.minimap={}),t.minimap.enabled=!1,t}},{key:"_adjustOptionsForLeftHandSide",value:function(e){var t=this._adjustOptionsForSubEditor(e);return this._renderSideBySide?t.wordWrapOverride1=this._diffWordWrap:t.wordWrapOverride1="off",t.readOnly=!this._originalIsEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}},{key:"_adjustOptionsForRightHandSide",value:function(e){var t=this._adjustOptionsForSubEditor(e);return t.wordWrapOverride1=this._diffWordWrap,t.revealHorizontalRightPadding=T.g.revealHorizontalRightPadding.defaultValue+n.ENTIRE_DIFF_OVERVIEW_WIDTH,t.scrollbar.verticalHasArrows=!1,t.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}},{key:"doLayout",value:function(){this._elementSizeObserver.observe(),this._doLayout()}},{key:"_doLayout",value:function(){var e=this._elementSizeObserver.getWidth(),t=this._elementSizeObserver.getHeight(),r=this._getReviewHeight(),i=this._strategy.layout();this._originalDomNode.style.width=i+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=e-i+"px",this._modifiedDomNode.style.left=i+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=t-r+"px",this._overviewDomElement.style.width=n.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=e-n.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(n.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:i,height:t-r}),this._modifiedEditor.layout({width:e-i-(this._renderOverviewRuler?n.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:t-r}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(t-r,e,r),this._layoutOverviewViewport()}},{key:"_layoutOverviewViewport",value:function(){var e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}},{key:"_computeOverviewViewport",value:function(){var e=this._modifiedEditor.getLayoutInfo();if(!e)return null;var t=this._modifiedEditor.getScrollTop(),n=this._modifiedEditor.getScrollHeight(),r=Math.max(0,e.height),i=Math.max(0,r-0),a=n>0?i/n:0;return{height:Math.max(0,Math.floor(e.height*a)),top:Math.floor(t*a)}}},{key:"_createDataSource",value:function(){var e=this;return{getWidth:function(){return e._elementSizeObserver.getWidth()},getHeight:function(){return e._elementSizeObserver.getHeight()-e._getReviewHeight()},getOptions:function(){return{renderOverviewRuler:e._renderOverviewRuler}},getContainerDomNode:function(){return e._containerDomElement},relayoutEditors:function(){e._doLayout()},getOriginalEditor:function(){return e._originalEditor},getModifiedEditor:function(){return e._modifiedEditor}}}},{key:"_setStrategy",value:function(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}},{key:"_getLineChangeAtOrBeforeLineNumber",value:function(e,t){var n=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===n.length||e=s?r=a+1:(r=a,i=a)}return n[r]}},{key:"_getEquivalentLineForOriginalLineNumber",value:function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.originalStartLineNumber}));if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),r=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),i=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,a=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,o=e-n;return o<=i?r+Math.min(o,a):r+a-i+o}},{key:"_getEquivalentLineForModifiedLineNumber",value:function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.modifiedStartLineNumber}));if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),r=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),i=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,a=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,o=e-r;return o<=a?n+Math.min(o,i):n+i-a+o}},{key:"getDiffLineInformationForOriginal",value:function(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}},{key:"getDiffLineInformationForModified",value:function(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}}],[{key:"_getClassName",value:function(e,t){var n="monaco-diff-editor monaco-editor-background ";return t&&(n+="side-by-side "),n+=Object(P.e)(e.type)}},{key:"_equals",value:function(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}}]),n}(v.a);De.ONE_OVERVIEW_WIDTH=15,De.ENTIRE_DIFF_OVERVIEW_WIDTH=30,De.UPDATE_DIFF_DECORATIONS_DELAY=200,De=he([ge(3,ce.a),ge(4,X.a),ge(5,F.b),ge(6,te.a),ge(7,D.a),ge(8,P.b),ge(9,re.a),ge(10,ie.a),ge(11,de.a)],De);var Ee=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this))._dataSource=e,r._insertColor=null,r._removeColor=null,r}return Object(d.a)(n,[{key:"applyColors",value:function(e){var t=(e.getColor(L.n)||L.j).transparent(2),n=(e.getColor(L.p)||L.k).transparent(2),r=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,r}},{key:"getEditorsDiffDecorations",value:function(e,t,n,r,i){i=i.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber})),r=r.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber}));var a=this._getViewZones(e,r,i,n),o=this._getOriginalEditorDecorations(e,t,n),s=this._getModifiedEditorDecorations(e,t,n);return{original:{decorations:o.decorations,overviewZones:o.overviewZones,zones:a.original},modified:{decorations:s.decorations,overviewZones:s.overviewZones,zones:a.modified}}}}]),n}(v.a),Ce=function(){function e(t){Object(l.a)(this,e),this._source=t,this._index=-1,this.current=null,this.advance()}return Object(d.a)(e,[{key:"advance",value:function(){this._index++,this._index0){var n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},y=new Ce(this._modifiedForeignVZ),b=new Ce(this._originalForeignVZ),D=1,E=1,C=0,S=this._lineChanges.length;C<=S;C++){var x=C0?-1:0),h=x.modifiedStartLineNumber+(x.modifiedEndLineNumber>0?-1:0),p=x.originalEndLineNumber>0?e._getViewLineCount(this._originalEditor,x.originalStartLineNumber,x.originalEndLineNumber):0,d=x.modifiedEndLineNumber>0?e._getViewLineCount(this._modifiedEditor,x.modifiedStartLineNumber,x.modifiedEndLineNumber):0,g=Math.max(x.originalStartLineNumber,x.originalEndLineNumber),m=Math.max(x.modifiedStartLineNumber,x.modifiedEndLineNumber)):(g=f+=1e7+p,m=h+=1e7+d);var k=[],T=[];if(a){var w=void 0;w=x?x.originalEndLineNumber>0?x.originalStartLineNumber-D:x.modifiedStartLineNumber-E:o.getLineCount()-D;for(var A=0;AF&&T.push({afterLineNumber:N,heightInLines:I-F,domNode:null,marginDomNode:null})}x&&(D=(x.originalEndLineNumber>0?x.originalEndLineNumber:x.originalStartLineNumber)+1,E=(x.modifiedEndLineNumber>0?x.modifiedEndLineNumber:x.modifiedStartLineNumber)+1)}for(;y.current&&y.current.afterLineNumber<=m;){var L=void 0;L=y.current.afterLineNumber<=h?f-h+y.current.afterLineNumber:g;var P=null;x&&x.modifiedStartLineNumber<=y.current.afterLineNumber&&y.current.afterLineNumber<=x.modifiedEndLineNumber&&(P=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),k.push({afterLineNumber:L,heightInLines:y.current.height/n,domNode:null,marginDomNode:P}),y.advance()}for(;b.current&&b.current.afterLineNumber<=g;){var R=void 0;R=b.current.afterLineNumber<=f?h-f+b.current.afterLineNumber:m,T.push({afterLineNumber:R,heightInLines:b.current.height/t,domNode:null}),b.advance()}if(null!==x&&Ie(x)){var M=this._produceOriginalFromDiff(x,p,d);M&&k.push(M)}if(null!==x&&Fe(x)){var B=this._produceModifiedFromDiff(x,p,d);B&&T.push(B)}var j=0,U=0;for(k=k.sort(_),T=T.sort(_);j=z.heightInLines?(V.heightInLines-=z.heightInLines,U++):(z.heightInLines-=V.heightInLines,j++)}for(;j0&&void 0!==arguments[0]?arguments[0]:this._sashRatio,t=this._dataSource.getWidth(),r=t-(this._dataSource.getOptions().renderOverviewRuler?De.ENTIRE_DIFF_OVERVIEW_WIDTH:0),i=Math.floor((e||.5)*r),a=Math.floor(.5*r);return i=this._disableSash?a:i||a,r>2*n.MINIMUM_EDITOR_WIDTH?(ir-n.MINIMUM_EDITOR_WIDTH&&(i=r-n.MINIMUM_EDITOR_WIDTH)):i=a,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition}},{key:"_onSashDragStart",value:function(){this._startSashPosition=this._sashPosition}},{key:"_onSashDrag",value:function(e){var t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?De.ENTIRE_DIFF_OVERVIEW_WIDTH:0),n=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=n/t,this._dataSource.relayoutEditors()}},{key:"_onSashDragEnd",value:function(){this._sash.layout()}},{key:"_onSashReset",value:function(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}},{key:"getVerticalSashTop",value:function(e){return 0}},{key:"getVerticalSashLeft",value:function(e){return this._sashPosition}},{key:"getVerticalSashHeight",value:function(e){return this._dataSource.getHeight()}},{key:"_getViewZones",value:function(e,t,n){var r=this._dataSource.getOriginalEditor(),i=this._dataSource.getModifiedEditor();return new we(e,t,n,r,i).getViewZones()}},{key:"_getOriginalEditorDecorations",value:function(e,t,n){var r,i=this._dataSource.getOriginalEditor(),a=String(this._removeColor),o={decorations:[],overviewZones:[]},s=i.getModel(),u=i._getViewModel(),l=Object(c.a)(e);try{for(l.s();!(r=l.n()).done;){var d=r.value;if(Fe(d)){o.decorations.push({range:new Y.a(d.originalStartLineNumber,1,d.originalEndLineNumber,1073741824),options:n?ke.lineDeleteWithSign:ke.lineDelete}),Ie(d)&&d.charChanges||o.decorations.push(xe(d.originalStartLineNumber,1,d.originalEndLineNumber,1073741824,ke.charDeleteWholeLine));var p=Pe(s,u,d.originalStartLineNumber,d.originalEndLineNumber);if(o.overviewZones.push(new Z.a(p.startLineNumber,p.endLineNumber,a)),d.charChanges){var f,h=Object(c.a)(d.charChanges);try{for(h.s();!(f=h.n()).done;){var g=f.value;if(Fe(g))if(t)for(var m=g.originalStartLineNumber;m<=g.originalEndLineNumber;m++){var _=void 0,v=void 0;_=m===g.originalStartLineNumber?g.originalStartColumn:s.getLineFirstNonWhitespaceColumn(m),v=m===g.originalEndLineNumber?g.originalEndColumn:s.getLineLastNonWhitespaceColumn(m),o.decorations.push(xe(m,_,m,v,ke.charDelete))}else o.decorations.push(xe(g.originalStartLineNumber,g.originalStartColumn,g.originalEndLineNumber,g.originalEndColumn,ke.charDelete))}}catch(y){h.e(y)}finally{h.f()}}}}}catch(y){l.e(y)}finally{l.f()}return o}},{key:"_getModifiedEditorDecorations",value:function(e,t,n){var r,i=this._dataSource.getModifiedEditor(),a=String(this._insertColor),o={decorations:[],overviewZones:[]},s=i.getModel(),u=i._getViewModel(),l=Object(c.a)(e);try{for(l.s();!(r=l.n()).done;){var d=r.value;if(Ie(d)){o.decorations.push({range:new Y.a(d.modifiedStartLineNumber,1,d.modifiedEndLineNumber,1073741824),options:n?ke.lineInsertWithSign:ke.lineInsert}),Fe(d)&&d.charChanges||o.decorations.push(xe(d.modifiedStartLineNumber,1,d.modifiedEndLineNumber,1073741824,ke.charInsertWholeLine));var p=Pe(s,u,d.modifiedStartLineNumber,d.modifiedEndLineNumber);if(o.overviewZones.push(new Z.a(p.startLineNumber,p.endLineNumber,a)),d.charChanges){var f,h=Object(c.a)(d.charChanges);try{for(h.s();!(f=h.n()).done;){var g=f.value;if(Ie(g))if(t)for(var m=g.modifiedStartLineNumber;m<=g.modifiedEndLineNumber;m++){var _=void 0,v=void 0;_=m===g.modifiedStartLineNumber?g.modifiedStartColumn:s.getLineFirstNonWhitespaceColumn(m),v=m===g.modifiedEndLineNumber?g.modifiedEndColumn:s.getLineLastNonWhitespaceColumn(m),o.decorations.push(xe(m,_,m,v,ke.charInsert))}else o.decorations.push(xe(g.modifiedStartLineNumber,g.modifiedStartColumn,g.modifiedEndLineNumber,g.modifiedEndColumn,ke.charInsert))}}catch(y){h.e(y)}finally{h.f()}}}}}catch(y){l.e(y)}finally{l.f()}return o}}]),n}(Ee);Te.MINIMUM_EDITOR_WIDTH=100;var we=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e,r,i,a,o){return Object(l.a)(this,n),t.call(this,e,r,i,a,o)}return Object(d.a)(n,[{key:"_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion",value:function(){return null}},{key:"_produceOriginalFromDiff",value:function(e,t,n){return n>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null}},{key:"_produceModifiedFromDiff",value:function(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null}}]),n}(Se),Ae=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e,r){var i;return Object(l.a)(this,n),(i=t.call(this,e))._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,i._register(e.getOriginalEditor().onDidLayoutChange((function(t){i._decorationsLeft!==t.decorationsLeft&&(i._decorationsLeft=t.decorationsLeft,e.relayoutEditors())}))),i}return Object(d.a)(n,[{key:"setEnableSplitViewResizing",value:function(e){}},{key:"_getViewZones",value:function(e,t,n,r){var i=this._dataSource.getOriginalEditor(),a=this._dataSource.getModifiedEditor();return new Oe(e,t,n,i,a,r).getViewZones()}},{key:"_getOriginalEditorDecorations",value:function(e,t,n){var r,i=String(this._removeColor),a={decorations:[],overviewZones:[]},o=this._dataSource.getOriginalEditor(),s=o.getModel(),u=o._getViewModel(),l=Object(c.a)(e);try{for(l.s();!(r=l.n()).done;){var d=r.value;if(Fe(d)){a.decorations.push({range:new Y.a(d.originalStartLineNumber,1,d.originalEndLineNumber,1073741824),options:ke.lineDeleteMargin});var p=Pe(s,u,d.originalStartLineNumber,d.originalEndLineNumber);a.overviewZones.push(new Z.a(p.startLineNumber,p.endLineNumber,i))}}}catch(f){l.e(f)}finally{l.f()}return a}},{key:"_getModifiedEditorDecorations",value:function(e,t,n){var r,i=this._dataSource.getModifiedEditor(),a=String(this._insertColor),o={decorations:[],overviewZones:[]},s=i.getModel(),u=i._getViewModel(),l=Object(c.a)(e);try{for(l.s();!(r=l.n()).done;){var d=r.value;if(Ie(d)){o.decorations.push({range:new Y.a(d.modifiedStartLineNumber,1,d.modifiedEndLineNumber,1073741824),options:n?ke.lineInsertWithSign:ke.lineInsert});var p=Pe(s,u,d.modifiedStartLineNumber,d.modifiedEndLineNumber);if(o.overviewZones.push(new Z.a(p.startLineNumber,p.endLineNumber,a)),d.charChanges){var f,h=Object(c.a)(d.charChanges);try{for(h.s();!(f=h.n()).done;){var g=f.value;if(Ie(g))if(t)for(var m=g.modifiedStartLineNumber;m<=g.modifiedEndLineNumber;m++){var _=void 0,v=void 0;_=m===g.modifiedStartLineNumber?g.modifiedStartColumn:s.getLineFirstNonWhitespaceColumn(m),v=m===g.modifiedEndLineNumber?g.modifiedEndColumn:s.getLineLastNonWhitespaceColumn(m),o.decorations.push(xe(m,_,m,v,ke.charInsert))}else o.decorations.push(xe(g.modifiedStartLineNumber,g.modifiedStartColumn,g.modifiedEndLineNumber,g.modifiedEndColumn,ke.charInsert))}}catch(y){h.e(y)}finally{h.f()}}else o.decorations.push(xe(d.modifiedStartLineNumber,1,d.modifiedEndLineNumber,1073741824,ke.charInsertWholeLine))}}}catch(y){l.e(y)}finally{l.f()}return o}},{key:"layout",value:function(){return Math.max(5,this._decorationsLeft)}}]),n}(Ee),Oe=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e,r,i,a,o,s){var u;return Object(l.a)(this,n),(u=t.call(this,e,r,i,a,o))._originalModel=a.getModel(),u._renderIndicators=s,u._pendingLineChange=[],u._pendingViewZones=[],u._lineBreaksComputer=u._modifiedEditor._getViewModel().createLineBreaksComputer(),u}return Object(d.a)(n,[{key:"getViewZones",value:function(){var e=Object(a.a)(Object(o.a)(n.prototype),"getViewZones",this).call(this);return this._finalize(e),e}},{key:"_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion",value:function(){var e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}},{key:"_produceOriginalFromDiff",value:function(e,t,n){var r=document.createElement("div");return r.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n,domNode:document.createElement("div"),marginDomNode:r}}},{key:"_produceModifiedFromDiff",value:function(e,t,n){var r=document.createElement("div");r.className="view-lines line-delete ".concat(fe.a);var i=document.createElement("div");i.className="inline-deleted-margin-view-zone";for(var a={shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:r,marginDomNode:i,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}},o=e.originalStartLineNumber;o<=e.originalEndLineNumber;o++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(o),null);return this._pendingLineChange.push(e),this._pendingViewZones.push(a),a}},{key:"_finalize",value:function(e){for(var t=this._modifiedEditor.getOptions(),n=this._modifiedEditor.getModel().getOptions().tabSize,r=t.get(38),i=t.get(26),a=r.typicalHalfwidthCharacterWidth,o=t.get(88),s=this._originalModel.mightContainNonBasicASCII(),u=this._originalModel.mightContainRTL(),l=t.get(53),d=t.get(124).decorationsWidth,p=t.get(100),f=t.get(83),h=t.get(77),g=t.get(39),m=this._lineBreaksComputer.finalize(),_=0,v=0;v0,A=Object(J.a)(1e4),O=0,N=0,F=null,L=b.originalStartLineNumber;L<=b.originalEndLineNumber;L++){var P=L-b.originalStartLineNumber,R=this._originalModel.getLineTokens(L),M=R.getLineContent(),B=m[_++],j=ee.a.filter(S,L,1,M.length+1);if(B){var U,V=0,z=Object(c.a)(B.breakOffsets);try{for(z.s();!(U=z.n()).done;){var H=U.value,W=R.sliceAndInflate(V,H,0),K=M.substring(V,H);O=Math.max(O,this._renderOriginalLine(N++,K,W,ee.a.extractWrapped(j,V,H),w,s,u,r,i,l,d,p,f,h,g,n,A,C)),V=H}}catch(X){z.e(X)}finally{z.f()}for(F||(F=[]);F.length');var v=I.e.isBasicASCII(t,a),y=I.e.containsRTL(t,v,o),b=Object(N.d)(new N.c(s.isMonospace&&!u,s.canUseHalfwidthRightwardsArrow,t,!1,v,y,0,n,r,g,0,s.spaceWidth,s.middotWidth,s.wsmiddotWidth,d,p,f,h!==T.e.OFF,null),m);if(m.appendASCIIString(""),this._renderIndicators){var D=document.createElement("div");D.className="delete-sign ".concat(P.d.asClassName(ye)),D.setAttribute("style","position:absolute;top:".concat(e*c,"px;width:").concat(l,"px;height:").concat(c,"px;right:0;")),_.appendChild(D)}var E=b.characterMapping.getAbsoluteOffsets();return E.length>0?E[E.length-1]:0}}]),n}(Se);function Ne(e,t){return Object(T.n)(e,t,["off","on","inherit"])}function Ie(e){return e.modifiedEndLineNumber>0}function Fe(e){return e.originalEndLineNumber>0}function Le(){var e=document.createElement("div");return e.className="diagonal-fill",e}function Pe(e,t,n,r){var i=e.getLineCount();return n=Math.min(i,Math.max(1,n)),r=Math.min(i,Math.max(1,r)),t.coordinatesConverter.convertModelRangeToViewRange(new Y.a(n,e.getLineMinColumn(n),r,e.getLineMaxColumn(r)))}Object(P.f)((function(e,t){var n=e.getColor(L.n);n&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ".concat(n,"; }")),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ".concat(n,"; }")),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: ".concat(n,"; }")));var r=e.getColor(L.p);r&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ".concat(r,"; }")),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ".concat(r,"; }")),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: ".concat(r,"; }")));var i=e.getColor(L.o);i&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ".concat("hc"===e.type?"dashed":"solid"," ").concat(i,"; }"));var a=e.getColor(L.q);a&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ".concat("hc"===e.type?"dashed":"solid"," ").concat(a,"; }"));var o=e.getColor(L.nc);o&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ".concat(o,"; }"));var s=e.getColor(L.l);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ".concat(s,"; }"));var u=e.getColor(L.pc);u&&t.addRule("\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ".concat(u,";\n\t\t\t}\n\t\t"));var c=e.getColor(L.qc);c&&t.addRule("\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ".concat(c,";\n\t\t\t}\n\t\t"));var l=e.getColor(L.oc);l&&t.addRule("\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ".concat(l,";\n\t\t\t}\n\t\t"));var d=e.getColor(L.m);t.addRule("\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t".concat(d," 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t").concat(d," 50%, ").concat(d," 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t"))}))},function(e,t,n){var r=n(12);e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";function r(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:90;return e.length<=t?e:e.substring(0,t)+"..."}},{key:"sleep",value:function(e){return new Promise((function(t,n){setTimeout((function(){t()}),1e3*e)}))}}],(n=null)&&r(t.prototype,n),i&&r(t,i),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"EditorKit",(function(){return c}));var i=n(2),a=n(8);function o(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,u,"next",e)}function u(e){o(a,r,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){for(var n=0;n0){var n=!1,r=!0,i=!1,a=void 0;try{for(var o,s=function(){var r=o.value,i=t.find((function(e){return e.uuid==r}));if(!i)return"continue";n=!0,e.fileIdsPendingAssociation.splice(e.fileIdsPendingAssociation.indexOf(r),1);var a=c.a.insertionSyntaxForFileDescriptor(i);e.delegate.insertRawText(a)},u=e.fileIdsPendingAssociation.slice()[Symbol.iterator]();!(r=(o=u.next()).done);r=!0)s()}catch(l){i=!0,a=l}finally{try{r||null==u.return||u.return()}finally{if(i)throw a}}n&&e.textExpander.searchPatterns()}t.length>0&&e.fileLoader.loadFilesafeElements()})),this.filesafe.addNewFileDescriptorHandler((function(t){e.fileIdsPendingAssociation.push(t.uuid)})),this.fileLoader=new s.a({filesafe:this.filesafe,getElementsBySelector:this.delegate.getElementsBySelector,insertElement:this.delegate.insertElement,preprocessElement:this.delegate.preprocessElement}),this.textExpander=new u.a({afterExpand:function(){e.fileLoader.loadFilesafeElements()},getCurrentLineText:this.delegate.getCurrentLineText,getPreviousLineText:this.delegate.getPreviousLineText,replaceText:this.delegate.replaceText,patterns:[{regex:c.a.FilesafeSyntaxPattern,callback:function(e){return c.a.expandedFilesafeSyntax(e)}}]})}},{key:"connectToBridge",value:function(){var e=this;this.componentManager=new a.a(null,(function(){document.documentElement.classList.add(e.componentManager.platform)})),this.componentManager.coallesedSavingDelay=this.coallesedSavingDelay,this.componentManager.streamContextItem((function(t){var n=!0;if(e.note&&e.note.uuid==t.uuid&&(n=!1),e.supportsFilesafe){var r=e.FilesafeClass.getSFItemClass();e.note=new r(t),e.filesafe.setCurrentNote(e.note)}else e.note=t;if(!t.isMetadataUpdate){var i=t.content.text;"html"==e.mode&&n&&(/<[a-z][\s\S]*>/i.test(i)||(e.ignoreNextTextChange=!0)),e.previousText=i,e.supportsFilesafe&&(e.needsFilesafeElementLoad=!0,i=c.a.expandedFilesafeSyntax(i)),e.delegate.setEditorRawText(i),n&&e.delegate.clearUndoHistory()}}))}},{key:"onEditorKeyUp",value:function(e){var t=e.key,n=e.isSpace,r=e.isEnter;this.textExpander.onKeyUp({key:t,isSpace:n,isEnter:r})}},{key:"onEditorPaste",value:function(){this.textExpander.onKeyUp({isPaste:!0})}},{key:"onEditorValueChanged",value:function(e){var t=this;if(this.needsFilesafeElementLoad&&(this.needsFilesafeElementLoad=!1,this.fileLoader.loadFilesafeElements()),this.ignoreNextTextChange)this.ignoreNextTextChange=!1;else{if(this.supportsFilesafe&&(e=c.a.collapseFilesafeSyntax(e),this.previousText==e))return;this.previousText=e;var n=this.note;n&&this.componentManager.saveItemWithPresave(n,(function(){if(n.content.text=e,t.delegate.generateCustomPreview){var r=t.delegate.generateCustomPreview(e);r.html&&(n.content.preview_html=r.html),r.plain&&(n.content.preview_plain=r.plain)}else{if("html"==t.mode){var i=c.a.removeFilesafeSyntaxFromHtml(e);i=o.a.truncateString(o.a.htmlToText(i)),n.content.preview_plain=i.length>0?i:" "}else n.content.preview_plain=e;n.content.preview_html=null}}))}}},{key:"canUploadFiles",value:function(){var e=this.filesafe.getAllCredentials(),t=this.filesafe.getAllIntegrations();return e.length>0&&t.length>0}},{key:"uploadJSFileObject",value:function(){var e=d(r.mark((function e(t){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.fileLoader.insertStatusAtCursor("Processing file..."),e.abrupt("return",this.filesafe.encryptAndUploadJavaScriptFileObject(t).then((function(e){i.fileLoader.removeCursorStatus(n)})));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}])&&p(t.prototype,i),l&&p(t,l),e}()},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n0&&this.requestPermissions(this.initialPermissions);var t=!0,n=!1,r=void 0;try{for(var i,a=this.messageQueue[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;this.postMessage(o.action,o.data,o.callback)}}catch(s){n=!0,r=s}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}this.messageQueue=[],this.loggingEnabled&&console.log("onReadyData",e),this.activateThemes(e.activeThemeUrls||[]),this.onReadyCallback&&this.onReadyCallback()}},{key:"getSelfComponentUUID",value:function(){return this.uuid}},{key:"isRunningInDesktopApplication",value:function(){return"desktop"===this.environment}},{key:"setComponentDataValueForKey",value:function(e,t){this.componentData[e]=t,this.postMessage("set-component-data",{componentData:this.componentData},(function(e){}))}},{key:"clearComponentData",value:function(){this.componentData={},this.postMessage("set-component-data",{componentData:this.componentData},(function(e){}))}},{key:"componentDataValueForKey",value:function(e){return this.componentData[e]}},{key:"postMessage",value:function(e,t,n){if(this.sessionKey){var r={action:e,data:t,messageId:this.generateUUID(),sessionKey:this.sessionKey,api:"component"},i=JSON.parse(JSON.stringify(r));i.callback=n,this.sentMessages.push(i),this.isMobile&&(r=JSON.stringify(r)),this.loggingEnabled&&console.log("Posting message:",r),window.parent.postMessage(r,this.origin)}else this.messageQueue.push({action:e,data:t,callback:n})}},{key:"setSize",value:function(e,t,n){this.postMessage("set-size",{type:e,width:t,height:n},(function(e){}))}},{key:"requestPermissions",value:function(e,t){this.postMessage("request-permissions",{permissions:e},function(e){t&&t()}.bind(this))}},{key:"streamItems",value:function(e,t){Array.isArray(e)||(e=[e]),this.postMessage("stream-items",{content_types:e},function(e){t(e.items)}.bind(this))}},{key:"streamContextItem",value:function(e){var t=this;this.postMessage("stream-context-item",null,(function(n){var r=n.item;(!t.lastStreamedItem||t.lastStreamedItem.uuid!==r.uuid)&&t.pendingSaveTimeout&&(clearTimeout(t.pendingSaveTimeout),t._performSavingOfItems(t.pendingSaveParams),t.pendingSaveTimeout=null,t.pendingSaveParams=null),t.lastStreamedItem=r,e(t.lastStreamedItem)}))}},{key:"selectItem",value:function(e){this.postMessage("select-item",{item:this.jsonObjectForItem(e)})}},{key:"createItem",value:function(e,t){this.postMessage("create-item",{item:this.jsonObjectForItem(e)},function(e){var n=e.item;!n&&e.items&&e.items.length>0&&(n=e.items[0]),this.associateItem(n),t&&t(n)}.bind(this))}},{key:"createItems",value:function(e,t){var n=this,r=e.map((function(e){return n.jsonObjectForItem(e)}));this.postMessage("create-items",{items:r},function(e){t&&t(e.items)}.bind(this))}},{key:"associateItem",value:function(e){this.postMessage("associate-item",{item:this.jsonObjectForItem(e)})}},{key:"deassociateItem",value:function(e){this.postMessage("deassociate-item",{item:this.jsonObjectForItem(e)})}},{key:"clearSelection",value:function(){this.postMessage("clear-selection",{content_type:"Tag"})}},{key:"deleteItem",value:function(e,t){this.deleteItems([e],t)}},{key:"deleteItems",value:function(e,t){var n={items:e.map(function(e){return this.jsonObjectForItem(e)}.bind(this))};this.postMessage("delete-items",n,(function(e){t&&t(e)}))}},{key:"sendCustomEvent",value:function(e,t,n){this.postMessage(e,t,function(e){n&&n(e)}.bind(this))}},{key:"saveItem",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.saveItems([e],t,n)}},{key:"saveItemWithPresave",value:function(e,t,n){this.saveItemsWithPresave([e],t,n)}},{key:"saveItemsWithPresave",value:function(e,t,n){this.saveItems(e,n,!1,t)}},{key:"_performSavingOfItems",value:function(e){var t=e.items,n=e.presave,r=e.callback;n&&n();var i=[],a=!0,o=!1,s=void 0;try{for(var u,c=t[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var l=u.value;i.push(this.jsonObjectForItem(l))}}catch(d){o=!0,s=d}finally{try{!a&&c.return&&c.return()}finally{if(o)throw s}}this.postMessage("save-items",{items:i},(function(e){r&&r()}))}},{key:"saveItems",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments[3];if(this.pendingSaveItems||(this.pendingSaveItems=[]),1!=this.coallesedSaving||r)this._performSavingOfItems({items:e,presave:i,callback:t});else{this.pendingSaveTimeout&&clearTimeout(this.pendingSaveTimeout);var a=e.map((function(e){return e.uuid})),o=this.pendingSaveItems.filter((function(e){return!a.includes(e.uuid)}));this.pendingSaveItems=o.concat(e),this.pendingSaveParams={items:this.pendingSaveItems,presave:i,callback:t},this.pendingSaveTimeout=setTimeout((function(){n._performSavingOfItems(n.pendingSaveParams),n.pendingSaveItems=[],n.pendingSaveTimeout=null,n.pendingSaveParams=null}),this.coallesedSavingDelay)}}},{key:"jsonObjectForItem",value:function(e){var t=Object.assign({},e);return t.children=null,t.parent=null,t}},{key:"getItemAppDataValue",value:function(e,t){var n=e.content.appData&&e.content.appData["org.standardnotes.sn"];return n?n[t]:null}},{key:"activateThemes",value:function(e){if(this.loggingEnabled&&console.log("Incoming themes",e),this.activeThemes.sort().toString()!=e.sort().toString()){var t=e||[],n=[],r=!0,i=!1,a=void 0;try{for(var o,s=this.activeThemes[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value;e.includes(u)?t=t.filter((function(e){return e!=u})):n.push(u)}}catch(E){i=!0,a=E}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}this.loggingEnabled&&(console.log("Deactivating themes:",n),console.log("Activating themes:",t));var c=!0,l=!1,d=void 0;try{for(var p,f=n[Symbol.iterator]();!(c=(p=f.next()).done);c=!0){var h=p.value;this.deactivateTheme(h)}}catch(E){l=!0,d=E}finally{try{!c&&f.return&&f.return()}finally{if(l)throw d}}this.activeThemes=e;var g=!0,m=!1,_=void 0;try{for(var v,y=t[Symbol.iterator]();!(g=(v=y.next()).done);g=!0){var b=v.value;if(b){var D=document.createElement("link");D.id=btoa(b),D.href=b,D.type="text/css",D.rel="stylesheet",D.media="screen,print",D.className="custom-theme",document.getElementsByTagName("head")[0].appendChild(D)}}}catch(E){m=!0,_=E}finally{try{!g&&y.return&&y.return()}finally{if(m)throw _}}}}},{key:"themeElementForUrl",value:function(e){return Array.from(document.getElementsByClassName("custom-theme")).slice().find((function(t){return t.id==btoa(e)}))}},{key:"deactivateTheme",value:function(e){var t=this.themeElementForUrl(e);t&&(t.disabled=!0,t.parentNode.removeChild(t))}},{key:"generateUUID",value:function(){var e=window.crypto||window.msCrypto;if(e){var t=new Uint32Array(4);e.getRandomValues(t);var n=-1;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){n++;var r=t[n>>3]>>n%8*4&15;return("x"==e?r:3&r|8).toString(16)}))}var r=(new Date).getTime();return window.performance&&"function"===typeof window.performance.now&&(r+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=(r+16*Math.random())%16|0;return r=Math.floor(r/16),("x"==e?t:3&t|8).toString(16)}))}}]),e}();"undefined"!=typeof e&&"undefined"!=typeof e.exports&&(e.exports=i),window&&(window.ComponentManager=i)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(0);function a(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function o(e,t){for(var n=0;n0)){e.next=17;break}return e.abrupt("return",{success:!1});case 17:return l=function(){g.currentlyLoadingIds.splice(g.currentlyLoadingIds.indexOf(n),1)},this.currentlyLoadingIds.push(n),this.setStatus("Downloading ".concat(o,"..."),t,n,a),e.next=22,i.a.sleep(.05);case 22:return e.next=24,this.filesafe.downloadFileFromDescriptor(u).catch((function(e){g.setStatus("Unable to download ".concat(o," ").concat(n,"."),t,n,a)}));case 24:if(d=e.sent){e.next=27;break}return e.abrupt("return");case 27:return this.setStatus("Decrypting ".concat(o,"..."),t,n,a),e.next=30,i.a.sleep(.05);case 30:return e.next=32,this.filesafe.decryptFile({fileDescriptor:u,fileItem:d}).catch((function(e){g.setStatus("Unable to decrypt ".concat(o," ").concat(n,"."),t,n,a)}));case 32:if(p=e.sent){e.next=35;break}return e.abrupt("return");case 35:return this.setStatus(null,t,n),e.next=38,i.a.sleep(.05);case 38:return f=u.content.fileType,h=this.filesafe.createTemporaryFileUrl({base64Data:p.decryptedData,dataType:f}),this.insertMediaElement({url:h,fsid:n,fileType:f,fsname:a,fsElement:t}),l(),this.uuidToFileTempUrlAndTypeMapping[n]={url:h,fileType:f,fsname:a},e.abrupt("return",{success:!0});case 44:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){a(o,r,i,s,u,"next",e)}function u(e){a(o,r,i,s,u,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}()},{key:"insertMediaElement",value:function(e){var t,n=e.url,r=e.fsid,i=e.fsname,a=e.fileType,o=e.fsElement,s=this.fileTypeForElementType(a);return t="img"==s?this.createImageElement({url:n,fsid:r,fsname:i,fsElement:o}):"video"==s?this.createVideoElement({url:n,fsid:r,fileType:a,fsname:i,fsElement:o}):"audio"==s?this.createAudioElement({url:n,fsid:r,fsname:i}):this.createDownloadElement({url:n,fsid:r,fileType:a,fsname:i,fsElement:o}),this.insertElementNearElement(t,o),o.remove(),!0}},{key:"wrapElementInTag",value:function(e){var t=e.element,n=e.tagName,r=e.fsid,i=e.fsname,a=document.createElement(n);return a.setAttribute("fsid",r),a.setAttribute("fsname",i),a.setAttribute("fscollapsable",!0),a.setAttribute("contenteditable",!0),a.append(t),a}},{key:"basicwrapElementInTag",value:function(e,t){var n=document.createElement(t);return n.append(e),n}},{key:"createImageElement",value:function(e){var t=e.url,n=e.fsid,r=e.fsname,i=e.fsElement,a=document.createElement("img");return a.setAttribute("src",t),a.setAttribute("srcset","".concat(t," 2x")),a.setAttribute("fsid",n),a.setAttribute("fsname",r),a.setAttribute("fscollapsable",!0),i.getAttribute("width")&&(a.setAttribute("width",i.getAttribute("width")),a.setAttribute("height",i.getAttribute("height"))),a}},{key:"createVideoElement",value:function(e){var t=e.url,n=e.fsid,r=e.fileType,i=e.fsname,a=e.fsElement,o=document.createElement("video");o.setAttribute("controls",!0),o.setAttribute("fsid",n),o.setAttribute("fsname",i),o.setAttribute("fscollapsable",!0),a.getAttribute("width")&&(o.setAttribute("width",a.getAttribute("width")),o.setAttribute("height",a.getAttribute("height")));var s=document.createElement("source");return s.setAttribute("src",t),s.setAttribute("type",r),o.append(s),this.wrapElementInTag({element:o,tagName:"p",fsid:n,fsname:i})}},{key:"createDownloadElement",value:function(e){var t=e.url,n=e.fsid,r=(e.fileType,e.fsname),i=(e.fsElement,document.createElement("a"));return i.setAttribute("fsid",n),i.setAttribute("fsname",r),i.setAttribute("ghost","true"),i.setAttribute("fscollapsable",!0),i.setAttribute("href",t),i.textContent="".concat(r),i}},{key:"createAudioElement",value:function(e){var t=e.url,n=e.fsid,r=e.fsname,i=document.createElement("audio");return i.setAttribute("src",t),i.setAttribute("controls",!0),i.setAttribute("fsid",n),i.setAttribute("fsname",r),i.setAttribute("fscollapsable",!0),this.wrapElementInTag({element:i,tagName:"p",fsid:n,fsname:r})}},{key:"setStatus",value:function(e,t,n,r,i){if(n){var a=this.statusElementMapping[n];a&&(a.remove(),delete this.statusElementMapping[n])}if(e){var o=document.createElement("label");return o.setAttribute("id",n),o.setAttribute("ghost","true"),o.setAttribute("contenteditable",!1),o.style.fontWeight="bold",o.textContent=e,i&&(o.style.userSelect="all"),o=this.insertElementNearElement(o,t),n&&(this.statusElementMapping[n]=o),o}}},{key:"insertStatusAtCursor",value:function(e){var t=Math.random().toString(36).substring(7);return this.setStatus(e,null,t),t}},{key:"removeCursorStatus",value:function(e){var t=this.getElementsBySelector("#".concat(e));t.length>0&&t[0].remove()}},{key:"insertElementNearElement",value:function(e,t){var n=this.preprocessElement(e),r="child";if("figure"==n.tagName.toLowerCase()){var i=t.closest("p");i&&(t=i,r="afterend")}return this.insertElement(n,t,r),n}}])&&o(t.prototype,n),s&&o(t,s),e}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.searchPreviousLine;e=n?this.getPreviousLineText():this.getCurrentLineText();var r=!0,i=!1,a=void 0;try{for(var o,s=this.patterns[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value,c=u.regex.exec(e);if(c){var l=c[0];if(l){var d=u.callback(l);this.replaceSelection(u.regex,d,n)}}}}catch(p){i=!0,a=p}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}}},{key:"replaceSelection",value:function(e,t,n){this.beforeExpand&&this.beforeExpand(),this.replaceText({regex:e,replacement:t,previousLine:n}),this.afterExpand&&this.afterExpand()}}])&&r(t.prototype,n),i&&r(t,i),e}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n","")).replace("

","")).replace("[","").replace("]","")).split(":"),n=t[1],r=t[2],i=t[3],a="";if(i){var o=i.split("x");a="width=".concat(o[0]," height=").concat(o[1])}return"

")}},{key:"collapseFilesafeSyntax",value:function(e){var t=(new DOMParser).parseFromString(e,"text/html"),n=t.querySelectorAll("*[fscollapsable]"),r=!0,i=!1,a=void 0;try{for(var o,s=n[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value,c=u.getAttribute("fsid"),l=u.getAttribute("fsname"),d=u.getAttribute("width"),p=u.getAttribute("height"),f=["FileSafe",c,l];if(d||p){var h="".concat(d,"x").concat(p);f.push(h)}var g="

[".concat(f.join(":"),"]

");u.insertAdjacentHTML("afterend",g),u.remove()}}catch(m){i=!0,a=m}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return t.querySelectorAll("*[ghost]").forEach((function(e){e.remove()})),t.body.innerHTML}}],(n=null)&&r(t.prototype,n),i&&r(t,i),e}();o=/(

)?\[FileSafe[^\]]*\](<\/p>)?/g,(a="FilesafeSyntaxPattern")in(i=s)?Object.defineProperty(i,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[a]=o},function(e,t){e.exports=n(353)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function e(t){var n=t.insertRawText,r=t.onReceiveNote,i=t.setEditorRawText,a=t.getCurrentLineText,o=t.getPreviousLineText,s=t.replaceText,u=t.getElementsBySelector,c=t.insertElement,l=t.preprocessElement,d=t.clearUndoHistory,p=t.generateCustomPreview;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.insertRawText=n,this.onReceiveNote=r,this.setEditorRawText=i,this.getCurrentLineText=a,this.getPreviousLineText=o,this.replaceText=s,this.getElementsBySelector=u,this.insertElement=c,this.preprocessElement=l,this.clearUndoHistory=d,this.generateCustomPreview=p}}])},function(e,t,n){e.exports=function(){"use strict";function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function a(e,t){return e(t={exports:{}},t.exports),t.exports}var o=a((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function n(t){e.exports.defaults=t}e.exports={defaults:t(),getDefaults:t,changeDefaults:n}})),s=(o.defaults,o.getDefaults,o.changeDefaults,/[&<>"']/),u=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,d={"&":"&","<":"<",">":">",'"':""","'":"'"},p=function(e){return d[e]};function f(e,t){if(t){if(s.test(e))return e.replace(u,p)}else if(c.test(e))return e.replace(l,p);return e}var h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(h,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var m=/(^|[^\[])\^/g;function _(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(m,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var v=/[^\w:]/g,y=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(e,t,n){if(e){var r;try{r=decodeURIComponent(g(n)).replace(v,"").toLowerCase()}catch(i){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!y.test(n)&&(n=x(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(i){return null}return n}var D={},E=/^[^:]+:\/*[^/]*$/,C=/^([^:]+:)[\s\S]*$/,S=/^([^:]+:\/*[^/]*)[\s\S]*$/;function x(e,t){D[" "+e]||(E.test(e)?D[" "+e]=e+"/":D[" "+e]=w(e,"/",!0));var n=-1===(e=D[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(C,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(S,"$1")+t:e+t}function k(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}var I={escape:f,unescape:g,edit:_,cleanUrl:b,resolveUrl:x,noopTest:{exec:function(){}},merge:k,splitCells:T,rtrim:w,findClosingBracket:A,checkSanitizeDeprecation:O,repeatString:N},F=o.defaults,L=I.rtrim,P=I.splitCells,R=I.escape,M=I.findClosingBracket;function B(e,t,n){var r=t.href,i=t.title?R(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:a}:{type:"image",raw:n,href:r,title:i,text:R(a)}}function j(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}var U=function(){function e(e){this.options=e||F}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:L(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=j(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:P(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,i,a,o,s,u,c=t[0],l=t[2],d=l.length>1,p=")"===l[l.length-1],f={type:"list",raw:c,ordered:d,start:d?+l.slice(0,-1):"",loose:!1,items:[]},h=t[0].match(this.rules.block.item),g=!1,m=h.length,_=0;_1||this.options.smartLists&&i!==l)&&(a=h.slice(_+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-a.length),_=m-1)),o=g||/\n\n(?!\s*$)/.test(n),_!==m-1&&(g="\n"===n.charAt(n.length-1),o||(o=g)),o&&(f.loose=!0),u=void 0,(s=/^\[[ xX]\] /.test(n))&&(u=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:u,loose:o,text:n});return f}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):R(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:P(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):R(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=M(t[2],"()");if(n>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]=""}var i=t[2],a="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o?(i=o[1],a=o[3]):a=""}else a=t[3]?t[3].slice(1,-1):"";return B(t,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return B(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,a="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(a.lastIndex=0;null!=(r=a.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,a="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(a.lastIndex=0;null!=(r=a.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=R(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=R(this.options.mangle?t(i[1]):i[1])):n=R(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=R(this.options.mangle?t(n[0]):n[0]));else{var a;do{a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(a!==n[0]);r=R(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):R(i[0]):i[0]:R(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),V=I.noopTest,z=I.edit,H=I.merge,W={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:V,table:V,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};W.def=z(W.def).replace("label",W._label).replace("title",W._title).getRegex(),W.bullet=/(?:[*+-]|\d{1,9}[.)])/,W.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,W.item=z(W.item,"gm").replace(/bull/g,W.bullet).getRegex(),W.list=z(W.list).replace(/bull/g,W.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+W.def.source+")").getRegex(),W._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",W._comment=/|$)/,W.html=z(W.html,"i").replace("comment",W._comment).replace("tag",W._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),W.paragraph=z(W._paragraph).replace("hr",W.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",W._tag).getRegex(),W.blockquote=z(W.blockquote).replace("paragraph",W.paragraph).getRegex(),W.normal=H({},W),W.gfm=H({},W.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),W.gfm.nptable=z(W.gfm.nptable).replace("hr",W.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",W._tag).getRegex(),W.gfm.table=z(W.gfm.table).replace("hr",W.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",W._tag).getRegex(),W.pedantic=H({},W.normal,{html:z("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",W._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+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:V,paragraph:z(W.normal._paragraph).replace("hr",W.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",W.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var K={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:V,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:V,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};K.punctuation=z(K.punctuation).replace(/punctuation/g,K._punctuation).getRegex(),K._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",K._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",K._comment=z(W._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),K.em.start=z(K.em.start).replace(/punctuation/g,K._punctuation).getRegex(),K.em.middle=z(K.em.middle).replace(/punctuation/g,K._punctuation).replace(/overlapSkip/g,K._overlapSkip).getRegex(),K.em.endAst=z(K.em.endAst,"g").replace(/punctuation/g,K._punctuation).getRegex(),K.em.endUnd=z(K.em.endUnd,"g").replace(/punctuation/g,K._punctuation).getRegex(),K.strong.start=z(K.strong.start).replace(/punctuation/g,K._punctuation).getRegex(),K.strong.middle=z(K.strong.middle).replace(/punctuation/g,K._punctuation).replace(/overlapSkip/g,K._overlapSkip).getRegex(),K.strong.endAst=z(K.strong.endAst,"g").replace(/punctuation/g,K._punctuation).getRegex(),K.strong.endUnd=z(K.strong.endUnd,"g").replace(/punctuation/g,K._punctuation).getRegex(),K.blockSkip=z(K._blockSkip,"g").getRegex(),K.overlapSkip=z(K._overlapSkip,"g").getRegex(),K._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,K._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,K._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])?)+(?![-_])/,K.autolink=z(K.autolink).replace("scheme",K._scheme).replace("email",K._email).getRegex(),K._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,K.tag=z(K.tag).replace("comment",K._comment).replace("attribute",K._attribute).getRegex(),K._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,K._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,K._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,K.link=z(K.link).replace("label",K._label).replace("href",K._href).replace("title",K._title).getRegex(),K.reflink=z(K.reflink).replace("label",K._label).getRegex(),K.reflinkSearch=z(K.reflinkSearch,"g").replace("reflink",K.reflink).replace("nolink",K.nolink).getRegex(),K.normal=H({},K),K.pedantic=H({},K.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:z(/^!?\[(label)\]\((.*?)\)/).replace("label",K._label).getRegex(),reflink:z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",K._label).getRegex()}),K.gfm=H({},K.normal,{escape:z(K.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:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Z=function(){function e(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||G,this.options.tokenizer=this.options.tokenizer||new U,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:Y.normal,inline:J.normal};this.options.pedantic?(t.block=Y.pedantic,t.inline=J.pedantic):this.options.gfm&&(t.block=Y.gfm,this.options.breaks?t.inline=J.breaks:t.inline=J.gfm),this.tokenizer.rules=t}e.lex=function(t,n){return new e(n).lex(t)},e.lexInline=function(t,n){return new e(n).inlineTokens(t)};var n=e.prototype;return n.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},n.blockTokens=function(e,t,n){var r,i,a,o;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((o=t[t.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),a=r.items.length,i=0;i0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+$("a",o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+$("a",o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(a=this.tokenizer.escape(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.tag(e,n,r))e=e.substring(a.raw.length),n=a.inLink,r=a.inRawBlock,t.push(a);else if(a=this.tokenizer.link(e))e=e.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),t.push(a);else if(a=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),t.push(a);else if(a=this.tokenizer.strong(e,s,i))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.em(e,s,i))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.codespan(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.br(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.del(e))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.autolink(e,X))e=e.substring(a.raw.length),t.push(a);else if(n||!(a=this.tokenizer.url(e,X))){if(a=this.tokenizer.inlineText(e,r,Q))e=e.substring(a.raw.length),i=a.raw.slice(-1),t.push(a);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(a.raw.length),t.push(a);return t},t(e,null,[{key:"rules",get:function(){return{block:Y,inline:J}}}]),e}(),ee=o.defaults,te=I.cleanUrl,ne=I.escape,re=function(){function e(e){this.options=e||ee}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'

'+(n?e:ne(e,!0))+"
\n":"
"+(n?e:ne(e,!0))+"
\n"},t.blockquote=function(e){return"
\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
\n":"
\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=te(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"},t.image=function(e,t,n){if(null===(e=te(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},t.text=function(e){return e},e}(),ie=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),ae=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),oe=o.defaults,se=I.unescape,ue=function(){function e(e){this.options=e||oe,this.options.renderer=this.options.renderer||new re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ie,this.slugger=new ae}e.parse=function(t,n){return new e(n).parse(t)},e.parseInline=function(t,n){return new e(n).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,a,o,s,u,c,l,d,p,f,h,g,m,_,v,y,b="",D=e.length;for(n=0;n0&&"text"===m.tokens[0].type?(m.tokens[0].text=y+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=y+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:y}):g+=y),g+=this.parse(m.tokens,h),l+=this.renderer.listitem(g,v,_);b+=this.renderer.list(l,p,f);continue;case"html":b+=this.renderer.html(d.text);continue;case"paragraph":b+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(l=d.tokens?this.parseInline(d.tokens):d.text;n+1An error occurred:

    "+de(u.message+"",!0)+"
    ";throw u}}return ge.options=ge.setOptions=function(e){return ce(ge.defaults,e),fe(ge.defaults),ge},ge.getDefaults=pe,ge.defaults=he,ge.use=function(e){var t=ce({},e);if(e.renderer&&function(){var n=ge.defaults.renderer||new re,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,a=new Array(i),o=0;oAn error occurred:

    "+de(r.message+"",!0)+"
    ";throw r}},ge.Parser=ue,ge.parser=ue.parse,ge.Renderer=re,ge.TextRenderer=ie,ge.Lexer=Z,ge.lexer=Z.lex,ge.Tokenizer=U,ge.Slugger=ae,ge.parse=ge,ge}()},function(e,t,n){"use strict";(function(e){var r=n(355),i=n(356),a=n(357);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function h(e,t){if(u.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return V(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return w(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function _(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"===typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var a,o=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=n;as&&(n=s-u),a=n;a>=0;a--){for(var d=!0,p=0;pi&&(r=i):r=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(l=c);break;case 2:128===(192&(a=e[i+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[i+1],o=e[i+2],128===(192&a)&&128===(192&o)&&(u=(15&c)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128===(192&a)&&128===(192&o)&&128===(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=d}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,i),l=e.slice(t,n),d=0;di)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return D(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function w(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,n,r,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function P(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function R(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,r,a){return a||R(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,a){return a||R(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],i=1,a=0;++a=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||F(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):P(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):P(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);F(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);F(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):P(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):P(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(a=t;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(163))},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r=n(283),i=n(284),a=n(229),o=n(286);e.exports=function(e){return r(e)||i(e)||a(e)||o()}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);np?n(r):(e.consume(r),_):41===r?f--?(e.consume(r),_):(e.exit("chunkString"),e.exit(l),e.exit(c),e.exit(o),t(r)):null===r||i(r)?f?n(r):(e.exit("chunkString"),e.exit(l),e.exit(c),e.exit(o),t(r)):a(r)?n(r):(e.consume(r),92===r?v:_)}function v(t){return 40===t||41===t||92===t?(e.consume(t),_):_(t)}}},function(e,t,n){"use strict";var r=n(97),i=n(166);e.exports=function(e,t,n,a,o,s){var u,c=this,l=0;return function(t){return e.enter(a),e.enter(o),e.consume(t),e.exit(o),e.enter(s),d};function d(i){return null===i||91===i||93===i&&!u||94===i&&!l&&"_hiddenFootnoteSupport"in c.parser.constructs||l>999?n(i):93===i?(e.exit(s),e.enter(o),e.consume(i),e.exit(o),e.exit(a),t):r(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(i))}function p(t){return null===t||91===t||93===t||r(t)||l++>999?(e.exit("chunkString"),d(t)):(e.consume(t),u=u||!i(t),92===t?f:p)}function f(t){return 91===t||92===t||93===t?(e.consume(t),l++,p):p(t)}}},function(e,t,n){"use strict";var r=n(97),i=n(166),a=n(94);e.exports=function(e,t){var n;return function o(s){if(r(s))return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,o;if(i(s))return a(e,o,n?"linePrefix":"lineSuffix")(s);return t(s)}}},function(e,t,n){"use strict";var r=n(97),i=n(94);e.exports=function(e,t,n,a,o,s){var u;return function(t){return e.enter(a),e.enter(o),e.consume(t),e.exit(o),u=40===t?41:t,c};function c(n){return n===u?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),t):(e.enter(s),l(n))}function l(t){return t===u?(e.exit(s),c(u)):null===t?n(t):r(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return t===u||null===t||r(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?p:d)}function p(t){return t===u||92===t?(e.consume(t),d):d(t)}}},function(e,t,n){"use strict";var r=n(97),i=n(166),a=n(94),o={name:"thematicBreak",tokenize:function(e,t,n){var o,s=0;return function(t){return e.enter("thematicBreak"),o=t,u(t)};function u(l){return l===o?(e.enter("thematicBreakSequence"),c(l)):i(l)?a(e,u,"whitespace")(l):s<3||null!==l&&!r(l)?n(l):(e.exit("thematicBreak"),t(l))}function c(t){return t===o?(e.consume(t),s++,c):(e.exit("thematicBreakSequence"),u(t))}}};e.exports=o},function(e,t,n){"use strict";var r=n(168);e.exports=function(e,t){return function(e){return t;function t(t){var n=t&&a(t);return n&&i.call(e,n)?e[n]:null}}(function(e){var t={};if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return r(e,"definition",n),t;function n(e){var n=a(e.identifier);i.call(t,n)||(t[n]=e)}}(e))};var i={}.hasOwnProperty;function a(e){return e.toUpperCase()}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=t&&t.type;if(!i)throw new Error("Expected node, got `"+t+"`");r=a.call(e.handlers,i)?e.handlers[i]:e.passThrough&&e.passThrough.indexOf(i)>-1?s:e.unknownHandler;return("function"===typeof r?r:o)(e,t,n)};var r=n(144),i=n(134),a={}.hasOwnProperty;function o(e,t){return function(e){var t=e.data||{};if(a.call(t,"hName")||a.call(t,"hProperties")||a.call(t,"hChildren"))return!1;return"value"in e}(t)?e.augment(t,r("text",t.value)):e(t,"div",i(e,t))}function s(e,t){var n;return t.children?((n=Object.assign({},t)).children=i(e,t),n):t}},function(e,t,n){"use strict";e.exports=function(e,t){return e(t,"hr")}},function(e,t,n){"use strict";e.exports=function(e,t){var n,a,o={},s=t.ordered?"ol":"ul",u=-1;"number"===typeof t.start&&1!==t.start&&(o.start=t.start);n=i(e,t),a=n.length;for(;++u=f||u+1?@[\]^`{|}~\u2019]/g;function s(){if(!(this instanceof s))return new s;this.reset()}function u(e,t){return"string"!==typeof e?"":(t||(e=e.toLowerCase()),e.trim().replace(o,"").replace(r(),"").replace(a,"-"))}s.prototype.slug=function(e,t){for(var n=this,r=u(e,!0===t),a=r;i.call(n.occurrences,r);)n.occurrences[a]++,r=a+"-"+n.occurrences[a];return n.occurrences[r]=0,r},s.prototype.reset=function(){this.occurrences=Object.create(null)},s.slug=u},function(e,t,n){"use strict";e.exports=function(e){return new RegExp("^("+e+")$","i")}},function(e,t,n){"use strict";var r=n(216),i=n(762),a=n(763);e.exports=function(e){var t,n,i,a,o=e.children||[],s=f(e),c=v(e,{}),l=-1;if("text"===e.type||"comment"===e.type)return g(e,{whiteSpace:c,breakBefore:!0,breakAfter:!0});t=[];for(;++la&&(a=i):i&&(a&&n.push(r("\n",a)),a=0,n.push(i));return n.join("")};var o=/\n/g,s=/[\t ]+/g,u=i("br"),c=i("p"),l=i(["th","td"]),d=i("tr"),p=i(["datalist","head","noembed","noframes","rp","script","style","template","title","noscript",function(e){return(e.properties||{}).hidden},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),f=i(["caption","html","body","address","blockquote","center","dialog","div","figure","figcaption","footer","form,","header","hr","legend","listing","main","p","plaintext","pre","xmp","article","aside","h1","h2","h3","h4","h5","h6","hgroup","nav","section","dir","dd","dl","dt","menu","ol","ul"]);function h(e,t,n,r){return"element"===e.type?function(e,t,n,r){var i,o,s=v(e,r),g=e.children||[],m=-1,_=[];if(p(e))return _;u(e)||d(e)&&a(n,e,d)?o="\n":c(e)?(i=2,o=2):f(e)&&(i=1,o=1);for(;++m0;n--){var r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===q.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(r).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(r);break}}}(this,e)}},{key:"_processInputToken",value:function(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===I.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(z.nonVoidHtmlElementStartTagWithTrailingSolidus)}},{key:"_isIntegrationPoint",value:function(e,t){var n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),i=this.treeAdapter.getAttrList(e);return V.isIntegrationPoint(n,r,i,t)}},{key:"_reconstructActiveFormattingElements",value:function(){var e=this.activeFormattingElements.length;if(e){var t=e,n=null;do{if(t--,(n=this.activeFormattingElements.entries[t]).type===L.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}}while(t>0);for(var r=t;r=0;e--){var n=this.openElements.items[e];0===e&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));var r=this.treeAdapter.getTagName(n),i=ye[r];if(i){this.insertionMode=i;break}if(!(t||r!==K.TD&&r!==K.TH)){this.insertionMode=le;break}if(!t&&r===K.HEAD){this.insertionMode=Z;break}if(r===K.SELECT){this._resetInsertionModeForSelect(e);break}if(r===K.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(r===K.HTML){this.insertionMode=this.headElement?te:X;break}if(t){this.insertionMode=ne;break}}}},{key:"_resetInsertionModeForSelect",value:function(e){if(e>0)for(var t=e-1;t>0;t--){var n=this.openElements.items[t],r=this.treeAdapter.getTagName(n);if(r===K.TEMPLATE)break;if(r===K.TABLE)return void(this.insertionMode=pe)}this.insertionMode=de}},{key:"_pushTmplInsertionMode",value:function(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}},{key:"_popTmplInsertionMode",value:function(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}},{key:"_isElementCausesFosterParenting",value:function(e){var t=this.treeAdapter.getTagName(e);return t===K.TABLE||t===K.TBODY||t===K.TFOOT||t===K.THEAD||t===K.TR}},{key:"_shouldFosterParentOnInsertion",value:function(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}},{key:"_findFosterParentingLocation",value:function(){for(var e={parent:null,beforeElement:null},t=this.openElements.stackTop;t>=0;t--){var n=this.openElements.items[t],r=this.treeAdapter.getTagName(n),i=this.treeAdapter.getNamespaceURI(n);if(r===K.TEMPLATE&&i===q.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}if(r===K.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}},{key:"_fosterParentElement",value:function(e){var t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}},{key:"_fosterParentText",value:function(e){var t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}},{key:"_isSpecialElement",value:function(e){var t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return W.SPECIAL_ELEMENTS[n][t]}}]),e}();function Ce(e,t){var n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagName)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):at(e,t),n}function Se(e,t){for(var n=null,r=e.openElements.stackTop;r>=0;r--){var i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i)&&(n=i)}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function xe(e,t,n){for(var r=t,i=e.openElements.getCommonAncestor(t),a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);var s=e.activeFormattingElements.getElementEntry(o),u=s&&a>=3;!s||u?(u&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(o)):(o=ke(e,s),r===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function ke(e,t){var n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Te(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else{var r=e.treeAdapter.getTagName(t),i=e.treeAdapter.getNamespaceURI(t);r===K.TEMPLATE&&i===q.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function we(e,t,n){var r=e.treeAdapter.getNamespaceURI(n.element),i=n.token,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a)}function Ae(e,t){for(var n,r=0;r<8&&(n=Ce(e,t));r++){var i=Se(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;var a=xe(e,i,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),Te(e,o,a),we(e,i,n)}}function Oe(){}function Ne(e){e._err(z.misplacedDoctype)}function Ie(e,t){e._appendCommentNode(t,e.openElements.currentTmplContent||e.openElements.current)}function Fe(e,t){e._appendCommentNode(t,e.document)}function Le(e,t){e._insertCharacters(t)}function Pe(e){e.stopped=!0}function Re(e,t){e._err(z.missingDoctype,{beforeToken:!0}),e.treeAdapter.setDocumentMode(e.document,W.DOCUMENT_MODE.QUIRKS),e.insertionMode=Q,e._processToken(t)}function Me(e,t){e._insertFakeRootElement(),e.insertionMode=X,e._processToken(t)}function Be(e,t){e._insertFakeElement(K.HEAD),e.headElement=e.openElements.current,e.insertionMode=Z,e._processToken(t)}function je(e,t){var n=t.tagName;n===K.HTML?nt(e,t):n===K.BASE||n===K.BASEFONT||n===K.BGSOUND||n===K.LINK||n===K.META?(e._appendElement(t,q.HTML),t.ackSelfClosing=!0):n===K.TITLE?e._switchToTextParsing(t,I.MODE.RCDATA):n===K.NOSCRIPT?e.options.scriptingEnabled?e._switchToTextParsing(t,I.MODE.RAWTEXT):(e._insertElement(t,q.HTML),e.insertionMode=ee):n===K.NOFRAMES||n===K.STYLE?e._switchToTextParsing(t,I.MODE.RAWTEXT):n===K.SCRIPT?e._switchToTextParsing(t,I.MODE.SCRIPT_DATA):n===K.TEMPLATE?(e._insertTemplate(t,q.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=fe,e._pushTmplInsertionMode(fe)):n===K.HEAD?e._err(z.misplacedStartTagForHeadElement):Ve(e,t)}function Ue(e,t){var n=t.tagName;n===K.HEAD?(e.openElements.pop(),e.insertionMode=te):n===K.BODY||n===K.BR||n===K.HTML?Ve(e,t):n===K.TEMPLATE&&e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==K.TEMPLATE&&e._err(z.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(K.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(z.endTagWithoutMatchingOpenElement)}function Ve(e,t){e.openElements.pop(),e.insertionMode=te,e._processToken(t)}function ze(e,t){var n=t.type===I.EOF_TOKEN?z.openElementsLeftAfterEof:z.disallowedContentInNoscriptInHead;e._err(n),e.openElements.pop(),e.insertionMode=Z,e._processToken(t)}function He(e,t){e._insertFakeElement(K.BODY),e.insertionMode=ne,e._processToken(t)}function We(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ke(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function qe(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,q.HTML)}function Ge(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,q.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ye(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Je(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function $e(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,q.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Qe(e,t){e._appendElement(t,q.HTML),t.ackSelfClosing=!0}function Xe(e,t){e._switchToTextParsing(t,I.MODE.RAWTEXT)}function Ze(e,t){e.openElements.currentTagName===K.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML)}function et(e,t){e.openElements.hasInScope(K.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,q.HTML)}function tt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML)}function nt(e,t){var n=t.tagName;switch(n.length){case 1:n===K.I||n===K.S||n===K.B||n===K.U?Ye(e,t):n===K.P?qe(e,t):n===K.A?function(e,t){var n=e.activeFormattingElements.getElementEntryInScopeWithTagName(K.A);n&&(Ae(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):tt(e,t);break;case 2:n===K.DL||n===K.OL||n===K.UL?qe(e,t):n===K.H1||n===K.H2||n===K.H3||n===K.H4||n===K.H5||n===K.H6?function(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement();var n=e.openElements.currentTagName;n!==K.H1&&n!==K.H2&&n!==K.H3&&n!==K.H4&&n!==K.H5&&n!==K.H6||e.openElements.pop(),e._insertElement(t,q.HTML)}(e,t):n===K.LI||n===K.DD||n===K.DT?function(e,t){e.framesetOk=!1;for(var n=t.tagName,r=e.openElements.stackTop;r>=0;r--){var i=e.openElements.items[r],a=e.treeAdapter.getTagName(i),o=null;if(n===K.LI&&a===K.LI?o=K.LI:n!==K.DD&&n!==K.DT||a!==K.DD&&a!==K.DT||(o=a),o){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(a!==K.ADDRESS&&a!==K.DIV&&a!==K.P&&e._isSpecialElement(i))break}e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,q.HTML)}(e,t):n===K.EM||n===K.TT?Ye(e,t):n===K.BR?$e(e,t):n===K.HR?function(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._appendElement(t,q.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t):n===K.RB?et(e,t):n===K.RT||n===K.RP?function(e,t){e.openElements.hasInScope(K.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(K.RTC),e._insertElement(t,q.HTML)}(e,t):n!==K.TH&&n!==K.TD&&n!==K.TR&&tt(e,t);break;case 3:n===K.DIV||n===K.DIR||n===K.NAV?qe(e,t):n===K.PRE?Ge(e,t):n===K.BIG?Ye(e,t):n===K.IMG||n===K.WBR?$e(e,t):n===K.XMP?function(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,I.MODE.RAWTEXT)}(e,t):n===K.SVG?function(e,t){e._reconstructActiveFormattingElements(),V.adjustTokenSVGAttrs(t),V.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,q.SVG):e._insertElement(t,q.SVG),t.ackSelfClosing=!0}(e,t):n===K.RTC?et(e,t):n!==K.COL&&tt(e,t);break;case 4:n===K.HTML?function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t):n===K.BASE||n===K.LINK||n===K.META?je(e,t):n===K.BODY?function(e,t){var n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t):n===K.MAIN||n===K.MENU?qe(e,t):n===K.FORM?function(e,t){var n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,q.HTML),n||(e.formElement=e.openElements.current))}(e,t):n===K.CODE||n===K.FONT?Ye(e,t):n===K.NOBR?function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(K.NOBR)&&(Ae(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,q.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):n===K.AREA?$e(e,t):n===K.MATH?function(e,t){e._reconstructActiveFormattingElements(),V.adjustTokenMathMLAttrs(t),V.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,q.MATHML):e._insertElement(t,q.MATHML),t.ackSelfClosing=!0}(e,t):n===K.MENU?function(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,q.HTML)}(e,t):n!==K.HEAD&&tt(e,t);break;case 5:n===K.STYLE||n===K.TITLE?je(e,t):n===K.ASIDE?qe(e,t):n===K.SMALL?Ye(e,t):n===K.TABLE?function(e,t){e.treeAdapter.getDocumentMode(e.document)!==W.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,q.HTML),e.framesetOk=!1,e.insertionMode=ie}(e,t):n===K.EMBED?$e(e,t):n===K.INPUT?function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,q.HTML);var n=I.getTokenAttr(t,G.TYPE);n&&n.toLowerCase()===J||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t):n===K.PARAM||n===K.TRACK?Qe(e,t):n===K.IMAGE?function(e,t){t.tagName=K.IMG,$e(e,t)}(e,t):n!==K.FRAME&&n!==K.TBODY&&n!==K.TFOOT&&n!==K.THEAD&&tt(e,t);break;case 6:n===K.SCRIPT?je(e,t):n===K.CENTER||n===K.FIGURE||n===K.FOOTER||n===K.HEADER||n===K.HGROUP||n===K.DIALOG?qe(e,t):n===K.BUTTON?function(e,t){e.openElements.hasInScope(K.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(K.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.framesetOk=!1}(e,t):n===K.STRIKE||n===K.STRONG?Ye(e,t):n===K.APPLET||n===K.OBJECT?Je(e,t):n===K.KEYGEN?$e(e,t):n===K.SOURCE?Qe(e,t):n===K.IFRAME?function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,I.MODE.RAWTEXT)}(e,t):n===K.SELECT?function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,q.HTML),e.framesetOk=!1,e.insertionMode===ie||e.insertionMode===oe||e.insertionMode===ue||e.insertionMode===ce||e.insertionMode===le?e.insertionMode=pe:e.insertionMode=de}(e,t):n===K.OPTION?Ze(e,t):tt(e,t);break;case 7:n===K.BGSOUND?je(e,t):n===K.DETAILS||n===K.ADDRESS||n===K.ARTICLE||n===K.SECTION||n===K.SUMMARY?qe(e,t):n===K.LISTING?Ge(e,t):n===K.MARQUEE?Je(e,t):n===K.NOEMBED?Xe(e,t):n!==K.CAPTION&&tt(e,t);break;case 8:n===K.BASEFONT?je(e,t):n===K.FRAMESET?function(e,t){var n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,q.HTML),e.insertionMode=ge)}(e,t):n===K.FIELDSET?qe(e,t):n===K.TEXTAREA?function(e,t){e._insertElement(t,q.HTML),e.skipNextNewLine=!0,e.tokenizer.state=I.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=re}(e,t):n===K.TEMPLATE?je(e,t):n===K.NOSCRIPT?e.options.scriptingEnabled?Xe(e,t):tt(e,t):n===K.OPTGROUP?Ze(e,t):n!==K.COLGROUP&&tt(e,t);break;case 9:n===K.PLAINTEXT?function(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,q.HTML),e.tokenizer.state=I.MODE.PLAINTEXT}(e,t):tt(e,t);break;case 10:n===K.BLOCKQUOTE||n===K.FIGCAPTION?qe(e,t):tt(e,t);break;default:tt(e,t)}}function rt(e,t){var n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function it(e,t){var n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function at(e,t){for(var n=t.tagName,r=e.openElements.stackTop;r>0;r--){var i=e.openElements.items[r];if(e.treeAdapter.getTagName(i)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(i);break}if(e._isSpecialElement(i))break}}function ot(e,t){var n=t.tagName;switch(n.length){case 1:n===K.A||n===K.B||n===K.I||n===K.S||n===K.U?Ae(e,t):n===K.P?function(e){e.openElements.hasInButtonScope(K.P)||e._insertFakeElement(K.P),e._closePElement()}(e):at(e,t);break;case 2:n===K.DL||n===K.UL||n===K.OL?rt(e,t):n===K.LI?function(e){e.openElements.hasInListItemScope(K.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(K.LI),e.openElements.popUntilTagNamePopped(K.LI))}(e):n===K.DD||n===K.DT?function(e,t){var n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t):n===K.H1||n===K.H2||n===K.H3||n===K.H4||n===K.H5||n===K.H6?function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e):n===K.BR?function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(K.BR),e.openElements.pop(),e.framesetOk=!1}(e):n===K.EM||n===K.TT?Ae(e,t):at(e,t);break;case 3:n===K.BIG?Ae(e,t):n===K.DIR||n===K.DIV||n===K.NAV||n===K.PRE?rt(e,t):at(e,t);break;case 4:n===K.BODY?function(e){e.openElements.hasInScope(K.BODY)&&(e.insertionMode=he)}(e):n===K.HTML?function(e,t){e.openElements.hasInScope(K.BODY)&&(e.insertionMode=he,e._processToken(t))}(e,t):n===K.FORM?function(e){var t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(K.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(K.FORM):e.openElements.remove(n))}(e):n===K.CODE||n===K.FONT||n===K.NOBR?Ae(e,t):n===K.MAIN||n===K.MENU?rt(e,t):at(e,t);break;case 5:n===K.ASIDE?rt(e,t):n===K.SMALL?Ae(e,t):at(e,t);break;case 6:n===K.CENTER||n===K.FIGURE||n===K.FOOTER||n===K.HEADER||n===K.HGROUP||n===K.DIALOG?rt(e,t):n===K.APPLET||n===K.OBJECT?it(e,t):n===K.STRIKE||n===K.STRONG?Ae(e,t):at(e,t);break;case 7:n===K.ADDRESS||n===K.ARTICLE||n===K.DETAILS||n===K.SECTION||n===K.SUMMARY||n===K.LISTING?rt(e,t):n===K.MARQUEE?it(e,t):at(e,t);break;case 8:n===K.FIELDSET?rt(e,t):n===K.TEMPLATE?Ue(e,t):at(e,t);break;case 10:n===K.BLOCKQUOTE||n===K.FIGCAPTION?rt(e,t):at(e,t);break;default:at(e,t)}}function st(e,t){e.tmplInsertionModeStackTop>-1?mt(e,t):e.stopped=!0}function ut(e,t){var n=e.openElements.currentTagName;n===K.TABLE||n===K.TBODY||n===K.TFOOT||n===K.THEAD||n===K.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=ae,e._processToken(t)):dt(e,t)}function ct(e,t){var n=t.tagName;switch(n.length){case 2:n===K.TD||n===K.TH||n===K.TR?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.TBODY),e.insertionMode=ue,e._processToken(t)}(e,t):dt(e,t);break;case 3:n===K.COL?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.COLGROUP),e.insertionMode=se,e._processToken(t)}(e,t):dt(e,t);break;case 4:n===K.FORM?function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,q.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t):dt(e,t);break;case 5:n===K.TABLE?function(e,t){e.openElements.hasInTableScope(K.TABLE)&&(e.openElements.popUntilTagNamePopped(K.TABLE),e._resetInsertionMode(),e._processToken(t))}(e,t):n===K.STYLE?je(e,t):n===K.TBODY||n===K.TFOOT||n===K.THEAD?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,q.HTML),e.insertionMode=ue}(e,t):n===K.INPUT?function(e,t){var n=I.getTokenAttr(t,G.TYPE);n&&n.toLowerCase()===J?e._appendElement(t,q.HTML):dt(e,t),t.ackSelfClosing=!0}(e,t):dt(e,t);break;case 6:n===K.SCRIPT?je(e,t):dt(e,t);break;case 7:n===K.CAPTION?function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,q.HTML),e.insertionMode=oe}(e,t):dt(e,t);break;case 8:n===K.COLGROUP?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,q.HTML),e.insertionMode=se}(e,t):n===K.TEMPLATE?je(e,t):dt(e,t);break;default:dt(e,t)}}function lt(e,t){var n=t.tagName;n===K.TABLE?e.openElements.hasInTableScope(K.TABLE)&&(e.openElements.popUntilTagNamePopped(K.TABLE),e._resetInsertionMode()):n===K.TEMPLATE?Ue(e,t):n!==K.BODY&&n!==K.CAPTION&&n!==K.COL&&n!==K.COLGROUP&&n!==K.HTML&&n!==K.TBODY&&n!==K.TD&&n!==K.TFOOT&&n!==K.TH&&n!==K.THEAD&&n!==K.TR&&dt(e,t)}function dt(e,t){var n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n}function pt(e,t){var n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0?(e.openElements.popUntilTagNamePopped(K.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0}function _t(e,t){e.insertionMode=ne,e._processToken(t)}function vt(e,t){e.insertionMode=ne,e._processToken(t)}e.exports=Ee},function(e,t,n){"use strict";var r=n(88),i=n(93),a=n(124),o=n(133),s=n(169),u=n(242),c=n(333),l=function(e){a(n,e);var t=o(n);function n(e){var i;return r(this,n),(i=t.call(this,e)).tokenizer=e,i.posTracker=s.install(e.preprocessor,c),i.currentAttrLocation=null,i.ctLoc=null,i}return i(n,[{key:"_getCurrentLocation",value:function(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}},{key:"_attachCurrentAttrLocationInfo",value:function(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;var e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}},{key:"_getOverriddenMethods",value:function(e,t){var n={_createStartTagToken:function(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken:function(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken:function(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken:function(n){t._createDoctypeToken.call(this,n),this.currentToken.location=e.ctLoc},_createCharacterToken:function(n,r){t._createCharacterToken.call(this,n,r),this.currentCharacterToken.location=e.ctLoc},_createEOFToken:function(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr:function(n){t._createAttr.call(this,n),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName:function(n){t._leaveAttrName.call(this,n),e._attachCurrentAttrLocationInfo()},_leaveAttrValue:function(n){t._leaveAttrValue.call(this,n),e._attachCurrentAttrLocationInfo()},_emitCurrentToken:function(){var n=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=n.startLine,this.currentCharacterToken.location.endCol=n.startCol,this.currentCharacterToken.location.endOffset=n.startOffset),this.currentToken.type===u.EOF_TOKEN?(n.endLine=n.startLine,n.endCol=n.startCol,n.endOffset=n.startOffset):(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col+1,n.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken:function(){var n=this.currentCharacterToken&&this.currentCharacterToken.location;n&&-1===n.endOffset&&(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col,n.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys(u.MODE).forEach((function(r){var i=u.MODE[r];n[i]=function(n){e.ctLoc=e._getCurrentLocation(),t[i].call(this,n)}})),n}}]),n}(s);e.exports=l},function(e,t,n){"use strict";var r=n(88),i=n(93),a=n(124),o=n(133),s=function(e){a(n,e);var t=o(n);function n(e){var i;return r(this,n),(i=t.call(this,e)).preprocessor=e,i.isEol=!1,i.lineStartPos=0,i.droppedBufferSize=0,i.offset=0,i.col=0,i.line=1,i}return i(n,[{key:"_getOverriddenMethods",value:function(e,t){return{advance:function(){var n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),("\n"===r||"\r"===r&&"\n"!==this.html[n+1])&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat:function(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk:function(){var n=this.pos;t.dropParsedChunk.call(this);var r=n-this.pos;e.lineStartPos-=r,e.droppedBufferSize+=r,e.offset=e.droppedBufferSize+this.pos}}}}]),n}(n(169));e.exports=s},function(e,t,n){"use strict";e.exports=function(e,t){var n=t||{};function a(t){var n=a.invalid,o=a.handlers;return t&&i.call(t,e)&&(n=i.call(o,t[e])?o[t[e]]:a.unknown),(n||r).apply(this,arguments)}return a.handlers=n.handlers||{},a.invalid=n.invalid,a.unknown=n.unknown,a};var r=Function.prototype,i={}.hasOwnProperty},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(348)},function(e,t,n){(function(t){var r=n(231),i=n(193),a=n(155),o=n(124),s=n(133),u=n(175),c=n(164),l=n(165),d=n(156),p=n(88),f=n(93);e.exports=function(){"use strict";var e=function(e,t){var n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n},n=function(e){return"string"==typeof e?e.replace(function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).onlyFirst,t=void 0!==e&&e,n=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(n,t?void 0:"g")}(),""):e},h=function(e){return!Number.isNaN(e)&&e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)},g=h,m=h;g.default=m;var _=function(e){if("string"!=typeof(e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===e.length)return 0;e=n(e);for(var t=0,r=0;r=127&&i<=159||i>=768&&i<=879||(i>65535&&r++,t+=g(i)?2:1)}return t},v=_,y=_;v.default=y;var b=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function D(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var E="undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function C(){throw new Error("setTimeout has not been defined")}function S(){throw new Error("clearTimeout has not been defined")}var x=C,k=S;function T(e){if(x===setTimeout)return setTimeout(e,0);if((x===C||!x)&&setTimeout)return x=setTimeout,setTimeout(e,0);try{return x(e,0)}catch(n){try{return x.call(null,e,0)}catch(n){return x.call(this,e,0)}}}"function"==typeof E.setTimeout&&(x=setTimeout),"function"==typeof E.clearTimeout&&(k=clearTimeout);var w,A=[],O=!1,N=-1;function I(){O&&w&&(O=!1,w.length?A=w.concat(A):N=-1,A.length&&F())}function F(){if(!O){var e=T(I);O=!0;for(var t=A.length;t;){for(w=A,A=[];++N1)for(var n=1;n)?=?)"),s("XRANGEIDENTIFIERLOOSE","".concat(i[a.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),s("XRANGEIDENTIFIER","".concat(i[a.NUMERICIDENTIFIER],"|x|X|\\*")),s("XRANGEPLAIN","[v=\\s]*(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:".concat(i[a.PRERELEASE],")?").concat(i[a.BUILD],"?")+")?)?"),s("XRANGEPLAINLOOSE","[v=\\s]*(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(i[a.PRERELEASELOOSE],")?").concat(i[a.BUILD],"?")+")?)?"),s("XRANGE","^".concat(i[a.GTLT],"\\s*").concat(i[a.XRANGEPLAIN],"$")),s("XRANGELOOSE","^".concat(i[a.GTLT],"\\s*").concat(i[a.XRANGEPLAINLOOSE],"$")),s("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:$|[^\\d])"),s("COERCERTL",i[a.COERCE],!0),s("LONETILDE","(?:~>?)"),s("TILDETRIM","(\\s*)".concat(i[a.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",s("TILDE","^".concat(i[a.LONETILDE]).concat(i[a.XRANGEPLAIN],"$")),s("TILDELOOSE","^".concat(i[a.LONETILDE]).concat(i[a.XRANGEPLAINLOOSE],"$")),s("LONECARET","(?:\\^)"),s("CARETTRIM","(\\s*)".concat(i[a.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",s("CARET","^".concat(i[a.LONECARET]).concat(i[a.XRANGEPLAIN],"$")),s("CARETLOOSE","^".concat(i[a.LONECARET]).concat(i[a.XRANGEPLAINLOOSE],"$")),s("COMPARATORLOOSE","^".concat(i[a.GTLT],"\\s*(").concat(i[a.LOOSEPLAIN],")$|^$")),s("COMPARATOR","^".concat(i[a.GTLT],"\\s*(").concat(i[a.FULLPLAIN],")$|^$")),s("COMPARATORTRIM","(\\s*)".concat(i[a.GTLT],"\\s*(").concat(i[a.LOOSEPLAIN],"|").concat(i[a.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",s("HYPHENRANGE","^\\s*(".concat(i[a.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(i[a.XRANGEPLAIN],")")+"\\s*$"),s("HYPHENRANGELOOSE","^\\s*(".concat(i[a.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(i[a.XRANGEPLAINLOOSE],")")+"\\s*$"),s("STAR","(<|>)?=?\\s*\\*"),s("GTE0","^\\s*>=\\s*0.0.0\\s*$"),s("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")})),X=/^[0-9]+$/,Z=function(e,t){var n=X.test(e),r=X.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:ete)throw new TypeError("version is longer than ".concat(te," characters"));G("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var r=t.trim().match(n.loose?re[ie.LOOSE]:re[ie.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>ne||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ne||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ne||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}(),se=function(e,t,n){return new oe(e,n).compare(new oe(t,n))},ue=function(e,t,n){return se(e,t,n)<0},ce=function(e,t,n){return se(e,t,n)>=0},le="2.2.1";function de(){var e=D(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]);return de=function(){return e},e}function pe(){var e=D(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]);return pe=function(){return e},e}function fe(){var e=D(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]);return fe=function(){return e},e}function he(){var e=D(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]);return he=function(){return e},e}function ge(){var e=D(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "]);return ge=function(){return e},e}function me(){var e=D(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]);return me=function(){return e},e}var _e=J((function(e,t){function n(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:{},r=n.plugins,i=void 0===r?[]:r,a=n.showUnreleased,o=void 0!==a&&a,s=n.showDeprecated,p=void 0!==s&&s,f=n.showInternal,h=void 0!==f&&f,g=xe.split("-",1)[0],m=i.reduce((function(e,t){return e.concat(t.languages||[])}),[]).filter(v),_=(e=Object.assign.apply(Object,[{}].concat(d(i.map((function(e){return e.options}))),[ke])),t="name",Object.entries(e).map((function(e){var n=l(e,2),r=n[0],i=n[1];return Object.assign(c({},t,r),i)}))).filter((function(e){return v(e)&&y(e)})).sort((function(e,t){return e.name===t.name?0:e.name=0||(i[n]=e[n]);return i}(e,["cliName","cliCategory","cliDescription"])})).map((function(e){e=Object.assign({},e),Array.isArray(e.default)&&(e.default=1===e.default.length?e.default[0].value:e.default.filter(v).sort((function(e,t){return Se.compare(t.since,e.since)}))[0].value),Array.isArray(e.choices)&&(e.choices=e.choices.filter((function(e){return v(e)&&y(e)})),"parser"===e.name&&function(e,t,n){var r,i=new Set(e.choices.map((function(e){return e.value}))),a=u(t);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(o.parsers){var s,c=u(o.parsers);try{var l=function(){var t=s.value;if(!i.has(t)){i.add(t);var r=n.find((function(e){return e.parsers&&e.parsers[t]})),a=o.name;r&&r.name&&(a+=" (plugin: ".concat(r.name,")")),e.choices.push({value:t,description:a})}};for(c.s();!(s=c.n()).done;)l()}catch(d){c.e(d)}finally{c.f()}}}}catch(d){a.e(d)}finally{a.f()}}(e,m,i));var t=i.filter((function(t){return t.defaultOptions&&void 0!==t.defaultOptions[e.name]})).reduce((function(t,n){return t[n.name]=n.defaultOptions[e.name],t}),{});return Object.assign({},e,{pluginDefaults:t})}));return{languages:m,options:_};function v(e){return o||!("since"in e)||e.since&&Se.gte(g,e.since)}function y(e){return p||!("deprecated"in e)||e.deprecated&&Se.lt(g,e.deprecated)}},we=/[^\x20-\x7F]/;function Ae(e){return function(t,n,r){var i=r&&r.backwards;if(!1===n)return!1;for(var a=t.length,o=n;o>=0&&o(n.match(o.regex)||[]).length?o.quote:a.quote),s}function He(e,t,n){var r='"'===t?"'":'"',i=e.replace(/\\([\S\s])|(["'])/g,(function(e,i,a){return i===r?i:a===t?"\\"+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)}));return t+i+t}function We(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,"JSXText"===e.type&&(t.printed=!0)}var Ke={inferParserByLanguage:function(e,t){var n=Te({plugins:t.plugins}).languages,r=n.find((function(t){return t.name.toLowerCase()===e}))||n.find((function(t){var n=t.aliases;return Array.isArray(n)&&n.includes(e)}))||n.find((function(t){var n=t.extensions;return Array.isArray(n)&&n.includes(".".concat(e))}));return r&&r.parsers[0]},replaceEndOfLineWith:function(e,t){var n,r=[],i=u(e.split("\n"));try{for(i.s();!(n=i.n()).done;){var a=n.value;0!==r.length&&r.push(t),r.push(a)}}catch(o){i.e(o)}finally{i.f()}return r},getStringWidth:function(e){return e?we.test(e)?v(e):e.length:0},getMaxContinuousCount:function(e,t){var n=e.match(new RegExp("(".concat(b(t),")+"),"g"));return null===n?0:n.reduce((function(e,n){return Math.max(e,n.length/t.length)}),0)},getMinNotPresentContinuousCount:function(e,t){var n=e.match(new RegExp("(".concat(b(t),")+"),"g"));if(null===n)return 0;var r,i=new Map,a=0,o=u(n);try{for(o.s();!(r=o.n()).done;){var s=r.value.length/t.length;i.set(s,!0),s>a&&(a=s)}}catch(l){o.e(l)}finally{o.f()}for(var c=1;ct.length-n?"\r\n":"\n"}},Ye=Ge;Ye.graceful=function(e){return"string"==typeof e&&Ge(e)||"\n"};var Je=$(qe),$e=J((function(e,t){function n(){var e=Je;return n=function(){return e},e}function r(){var e,t=(e=Ye)&&e.__esModule?e:{default:e};return r=function(){return t},t}Object.defineProperty(t,"__esModule",{value:!0}),t.extract=function(e){var t=e.match(o);return t?t[0].trimLeft():""},t.strip=function(e){var t=e.match(o);return t&&t[0]?e.substring(t[0].length):e},t.parse=function(e){return f(e).pragmas},t.parseWithComments=f,t.print=function(e){var t=e.comments,i=void 0===t?"":t,a=e.pragmas,o=void 0===a?{}:a,s=(0,r().default)(i)||n().EOL,u=" *",c=Object.keys(o),l=c.map((function(e){return h(e,o[e])})).reduce((function(e,t){return e.concat(t)}),[]).map((function(e){return" * "+e+s})).join("");if(!i){if(0===c.length)return"";if(1===c.length&&!Array.isArray(o[c[0]])){var d=o[c[0]];return"".concat("/**"," ").concat(h(c[0],d)[0]).concat(" */")}}var p=i.split(s).map((function(e){return"".concat(u," ").concat(e)})).join(s)+s;return"/**"+s+(i?p:"")+(i&&c.length?u+s:"")+l+" */"};var i=/\*\/$/,a=/^\/\*\*/,o=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,s=/(^|\s+)\/\/([^\r\n]*)/g,u=/^(\r?\n)+/,c=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,l=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,d=/(\r?\n|^) *\* ?/g,p=[];function f(e){var t=(0,r().default)(e)||n().EOL;e=e.replace(a,"").replace(i,"").replace(d,"$1");for(var o="";o!==e;)o=e,e=e.replace(c,"".concat(t,"$1 $2").concat(t));e=e.replace(u,"").trimRight();for(var f,h=Object.create(null),g=e.replace(l,"").replace(u,"").trimRight();f=l.exec(e);){var m=f[2].replace(s,"");"string"==typeof h[f[1]]||Array.isArray(h[f[1]])?h[f[1]]=p.concat(h[f[1]],m):h[f[1]]=m}return{comments:g,pragmas:h}}function h(e,t){return p.concat(t).map((function(t){return"@".concat(e," ").concat(t).trim()}))}})),Qe={guessEndOfLine:function(e){var t=e.indexOf("\r");return t>=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"},convertEndOfLineToChars:function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}},countEndOfLineChars:function(e,t){var n;if("\n"===t)n=/\n/g;else if("\r"===t)n=/\r/g;else{if("\r\n"!==t)throw new Error('Unexpected "eol" '.concat(JSON.stringify(t),"."));n=/\r\n/g}var r=e.match(n);return r?r.length:0},normalizeEndOfLine:function(e){return e.replace(/\r\n?/g,"\n")}},Xe=$e.parseWithComments,Ze=$e.strip,et=$e.extract,tt=$e.print,nt=Ke.getShebang,rt=Qe.normalizeEndOfLine;function it(e){var t=nt(e);t&&(e=e.slice(t.length+1));var n=et(e),r=Xe(n);return{shebang:t,text:e,pragmas:r.pragmas,comments:r.comments}}var at={hasPragma:function(e){var t=Object.keys(it(e).pragmas);return t.includes("prettier")||t.includes("format")},insertPragma:function(e){var t=it(e),n=t.shebang,r=t.text,i=t.pragmas,a=t.comments,o=Ze(r),s=tt({pragmas:Object.assign({format:""},i),comments:a.trimStart()});return(n?"".concat(n,"\n"):"")+rt(s)+(o.startsWith("\n")?"\n":"\n\n")+o}};function ot(e,t){if(!(t||{}).ignoreDecorators){var n=e.declaration&&e.declaration.decorators||e.decorators;if(n&&n.length>0)return ot(n[0])}return e.range?e.range[0]:e.start}function st(e){var t=e.range?e.range[1]:e.end;return e.typeAnnotation?Math.max(t,st(e.typeAnnotation)):t}function ut(e,t){return ot(e)===ot(t)}var ct={locStart:ot,locEnd:st,composeLoc:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=ot(e);return[n,"number"==typeof t?n+t:st(t)]},hasSameLocStart:ut,hasSameLoc:function(e,t){return ut(e,t)&&function(e,t){return st(e)===st(t)}(e,t)}},lt=J((function(e){!function(){function t(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function n(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}e.exports={isExpression:function(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1},isStatement:t,isIterationStatement:function(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1},isSourceElement:function(e){return t(e)||null!=e&&"FunctionDeclaration"===e.type},isProblematicIfStatement:function(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=n(t)}while(t);return!1},trailingStatement:n}}()})),dt=J((function(e){!function(){var t,n,r,i,a,o;function s(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}for(n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},t={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},r=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],i=new Array(128),o=0;o<128;++o)i[o]=o>=97&&o<=122||o>=65&&o<=90||36===o||95===o;for(a=new Array(128),o=0;o<128;++o)a[o]=o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||36===o||95===o;e.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&r.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(e){return e<128?i[e]:n.NonAsciiIdentifierStart.test(s(e))},isIdentifierPartES5:function(e){return e<128?a[e]:n.NonAsciiIdentifierPart.test(s(e))},isIdentifierStartES6:function(e){return e<128?i[e]:t.NonAsciiIdentifierStart.test(s(e))},isIdentifierPartES6:function(e){return e<128?a[e]:t.NonAsciiIdentifierPart.test(s(e))}}}()})),pt=J((function(e){!function(){var t=dt;function n(e,t){return!(!t&&"yield"===e)&&r(e,t)}function r(e,t){if(t&&function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function i(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function o(e){var n,r,i;if(0===e.length)return!1;if(i=e.charCodeAt(0),!t.isIdentifierStartES5(i))return!1;for(n=1,r=e.length;n=r)return!1;if(!(56320<=(a=e.charCodeAt(n))&&a<=57343))return!1;i=1024*(i-55296)+(a-56320)+65536}if(!o(i))return!1;o=t.isIdentifierPartES6}return!0}e.exports={isKeywordES5:n,isKeywordES6:r,isReservedWordES5:i,isReservedWordES6:a,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:o,isIdentifierNameES6:s,isIdentifierES5:function(e,t){return o(e)&&!i(e,t)},isIdentifierES6:function(e,t){return s(e)&&!a(e,t)}}}()})),ft=J((function(e,t){t.ast=lt,t.code=dt,t.keyword=pt})).keyword.isIdentifierNameES5,ht=Ke.getLast,gt=Ke.hasNewline,mt=Ke.hasNewlineInRange,_t=Ke.skipWhitespace,vt=ct.locStart,yt=ct.locEnd,bt=ct.hasSameLocStart,Dt="(?:(?=.)\\s)",Et=new RegExp("^".concat(Dt,"*:")),Ct=new RegExp("^".concat(Dt,"*::"));function St(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e))return e.some((function(e){return St(e,t)}));var n=t(e);return"boolean"==typeof n?n:Object.keys(e).some((function(n){return St(e[n],t)}))}function xt(e){return"AssignmentExpression"===e.type||"BinaryExpression"===e.type||"LogicalExpression"===e.type||"NGPipeExpression"===e.type||"ConditionalExpression"===e.type||"CallExpression"===e.type||"OptionalCallExpression"===e.type||"MemberExpression"===e.type||"OptionalMemberExpression"===e.type||"SequenceExpression"===e.type||"TaggedTemplateExpression"===e.type||"BindExpression"===e.type||"UpdateExpression"===e.type&&!e.prefix||"TSAsExpression"===e.type||"TSNonNullExpression"===e.type}function kt(e){return"Block"===e.type||"CommentBlock"===e.type||"MultiLine"===e.type}var Tt=new Set(["ExportDefaultDeclaration","ExportDefaultSpecifier","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration"]);function wt(e){return e&&Tt.has(e.type)}function At(e){return"BooleanLiteral"===e.type||"DirectiveLiteral"===e.type||"Literal"===e.type||"NullLiteral"===e.type||"NumericLiteral"===e.type||"BigIntLiteral"===e.type||"DecimalLiteral"===e.type||"RegExpLiteral"===e.type||"StringLiteral"===e.type||"TemplateLiteral"===e.type||"TSTypeLiteral"===e.type||"JSXText"===e.type}function Ot(e){return"NumericLiteral"===e.type||"Literal"===e.type&&"number"==typeof e.value}function Nt(e){return"StringLiteral"===e.type||"Literal"===e.type&&"string"==typeof e.value}function It(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type}function Ft(e){return!("CallExpression"!==e.type&&"OptionalCallExpression"!==e.type||"Identifier"!==e.callee.type||"async"!==e.callee.name&&"inject"!==e.callee.name&&"fakeAsync"!==e.callee.name)}function Lt(e){return"JSXElement"===e.type||"JSXFragment"===e.type}function Pt(e){return"get"===e.kind||"set"===e.kind}function Rt(e){return Pt(e)||bt(e,e.value)}var Mt=new Set(["BinaryExpression","LogicalExpression","NGPipeExpression"]),Bt=new Set(["AnyTypeAnnotation","TSAnyKeyword","NullLiteralTypeAnnotation","TSNullKeyword","ThisTypeAnnotation","TSThisType","NumberTypeAnnotation","TSNumberKeyword","VoidTypeAnnotation","TSVoidKeyword","BooleanTypeAnnotation","TSBooleanKeyword","BigIntTypeAnnotation","TSBigIntKeyword","SymbolTypeAnnotation","TSSymbolKeyword","StringTypeAnnotation","TSStringKeyword","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType","EmptyTypeAnnotation","MixedTypeAnnotation","TSNeverKeyword","TSObjectKeyword","TSUndefinedKeyword","TSUnknownKeyword"]),jt=/^(skip|[fx]?(it|describe|test))$/;function Ut(e){return"CallExpression"===e.type||"OptionalCallExpression"===e.type}var Vt=new RegExp("([ \n\r\t]+)"),zt=new RegExp("[^ \n\r\t]");function Ht(e){return At(e)&&(zt.test(Gt(e))||!/\n/.test(Gt(e)))}function Wt(e,t){return Lt(t)?rn(t):t.comments&&t.comments.some((function(t){return t.leading&>(e,yt(t))}))}function Kt(e){return/^(\d+|\d+\.\d+)$/.test(e)}function qt(e){return e.quasis.some((function(e){return e.value.raw.includes("\n")}))}function Gt(e){return e.extra?e.extra.raw:e.raw}var Yt={"==":!0,"!=":!0,"===":!0,"!==":!0},Jt={"*":!0,"/":!0,"%":!0},$t={">>":!0,">>>":!0,"<<":!0},Qt={};function Xt(e){return Qt[e]}[["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((function(e,t){e.forEach((function(e){Qt[e]=t}))}));var Zt=new WeakMap;function en(e){if(Zt.has(e))return Zt.get(e);var t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push.apply(t,d(e.parameters)):Array.isArray(e.params)&&t.push.apply(t,d(e.params)),e.rest&&t.push(e.rest),Zt.set(e,t),t}var tn=new WeakMap;function nn(e){return"prettier-ignore"===e.value.trim()}function rn(e){return e&&(e.comments&&e.comments.length>0&&e.comments.some((function(e){return nn(e)&&!e.unignore}))||e.prettierIgnore)}function an(e){return rn(e.getValue())}var on={classChildNeedsASIProtection:function(e){if(e){if(e.static||e.accessibility)return!1;if(!e.computed){var t=e.key&&e.key.name;if("in"===t||"instanceof"===t)return!0}switch(e.type){case"ClassProperty":case"FieldDefinition":case"TSAbstractClassProperty":return e.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":var n=e.value?e.value.async:e.async,r=e.value?e.value.generator:e.generator;return!n&&"get"!==e.kind&&"set"!==e.kind&&!(!e.computed&&!r);case"TSIndexSignature":return!0;default:return!1}}},classPropMayCauseASIProblems:function(e){var t=e.getNode();if("ClassProperty"!==t.type&&"FieldDefinition"!==t.type)return!1;var n=t.key&&t.key.name;return!("static"!==n&&"get"!==n&&"set"!==n||t.value||t.typeAnnotation)||void 0},getFunctionParameters:en,iterateFunctionParametersPath:function(e,t){var n=e.getValue(),r=0,i=function(e){return t(e,r++)};n.this&&e.call(i,"this"),Array.isArray(n.parameters)?e.each(i,"parameters"):Array.isArray(n.params)&&e.each(i,"params"),n.rest&&e.call(i,"rest")},getCallArguments:function(e){if(tn.has(e))return tn.get(e);var t="ImportExpression"===e.type?[e.source]:e.arguments;return tn.set(e,t),t},iterateCallArgumentsPath:function(e,t){"ImportExpression"===e.getValue().type?e.call((function(e){return t(e,0)}),"source"):e.each(t,"arguments")},hasRestParameter:function(e){if(e.rest)return!0;var t=en(e);return t.length>0&&"RestElement"===ht(t).type},getLeftSidePathName:function(e,t){if(t.expressions)return["expressions",0];if(t.left)return["left"];if(t.test)return["test"];if(t.object)return["object"];if(t.callee)return["callee"];if(t.tag)return["tag"];if(t.argument)return["argument"];if(t.expression)return["expression"];throw new Error("Unexpected node has no left side.")},getParentExportDeclaration:function(e){var t=e.getParentNode();return"declaration"===e.getName()&&wt(t)?t:null},getTypeScriptMappedTypeModifier:function(e,t){return"+"===e?"+"+t:"-"===e?"-"+t:t},hasDanglingComments:function(e){return e.comments&&e.comments.some((function(e){return!e.leading&&!e.trailing}))},hasFlowAnnotationComment:function(e){return e&&kt(e[0])&&Ct.test(e[0].value)},hasFlowShorthandAnnotationComment:function(e){return e.extra&&e.extra.parenthesized&&e.trailingComments&&kt(e.trailingComments[0])&&Et.test(e.trailingComments[0].value)},hasLeadingComment:function(e){return e.comments&&e.comments.some((function(e){return e.leading}))},hasLeadingOwnLineComment:Wt,hasNakedLeftSide:xt,hasNewlineBetweenOrAfterDecorators:function(e,t){return mt(t.originalText,vt(e.decorators[0]),yt(ht(e.decorators)))||gt(t.originalText,yt(ht(e.decorators)))},hasNgSideEffect:function(e){return St(e.getValue(),(function(e){switch(e.type){case void 0:return!1;case"CallExpression":case"OptionalCallExpression":case"AssignmentExpression":return!0}}))},hasNode:St,hasPrettierIgnore:function(e){return an(e)||function(e){var t=e.getValue(),n=e.getParentNode();if(!(n&&t&&Lt(t)&&Lt(n)))return!1;for(var r=null,i=n.children.indexOf(t);i>0;i--){var a=n.children[i-1];if("JSXText"!==a.type||Ht(a)){r=a;break}}return r&&"JSXExpressionContainer"===r.type&&"JSXEmptyExpression"===r.expression.type&&r.expression.comments&&r.expression.comments.some((function(e){return nn(e)}))}(e)},hasTrailingComment:function(e){return e.comments&&e.comments.some((function(e){return e.trailing}))},hasTrailingLineComment:function(e){return e.comments&&e.comments.some((function(e){return e.trailing&&!kt(e)}))},hasIgnoreComment:an,hasNodeIgnoreComment:rn,identity:function(e){return e},isBinaryish:function(e){return Mt.has(e.type)},isBlockComment:kt,isLineComment:function(e){return"Line"===e.type||"CommentLine"===e.type||"SingleLine"===e.type||"HashbangComment"===e.type||"HTMLOpen"===e.type||"HTMLClose"===e.type},isPrettierIgnoreComment:nn,isCallOrOptionalCallExpression:Ut,isEmptyJSXElement:function(e){if(0===e.children.length)return!0;if(e.children.length>1)return!1;var t=e.children[0];return At(t)&&!Ht(t)},isExportDeclaration:wt,isFlowAnnotationComment:function(e,t){var n=vt(t),r=_t(e,yt(t));return!1!==r&&"/*"===e.slice(n,n+2)&&"*/"===e.slice(r,r+2)},isFunctionCompositionArgs:function(e){if(e.length<=1)return!1;var t,n=0,r=u(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(It(i)){if((n+=1)>1)return!0}else if(Ut(i)){var a,o=u(i.arguments);try{for(o.s();!(a=o.n()).done;)if(It(a.value))return!0}catch(s){o.e(s)}finally{o.f()}}}}catch(s){r.e(s)}finally{r.f()}return!1},isFunctionNotation:Rt,isFunctionOrArrowExpression:It,isGetterOrSetter:Pt,isJestEachTemplateLiteral:function(e,t){var n=/^[fx]?(describe|it|test)$/;return"TaggedTemplateExpression"===t.type&&t.quasi===e&&"MemberExpression"===t.tag.type&&"Identifier"===t.tag.property.type&&"each"===t.tag.property.name&&("Identifier"===t.tag.object.type&&n.test(t.tag.object.name)||"MemberExpression"===t.tag.object.type&&"Identifier"===t.tag.object.property.type&&("only"===t.tag.object.property.name||"skip"===t.tag.object.property.name)&&"Identifier"===t.tag.object.object.type&&n.test(t.tag.object.object.name))},isJSXNode:Lt,isJSXWhitespaceExpression:function(e){return"JSXExpressionContainer"===e.type&&At(e.expression)&&" "===e.expression.value&&!e.expression.comments},isLastStatement:function(e){var t=e.getParentNode();if(!t)return!0;var n=e.getValue(),r=(t.body||t.consequent).filter((function(e){return"EmptyStatement"!==e.type}));return r[r.length-1]===n},isLiteral:At,isLongCurriedCallExpression:function(e){var t=e.getValue(),n=e.getParentNode();return Ut(t)&&Ut(n)&&n.callee===t&&t.arguments.length>n.arguments.length&&n.arguments.length>0},isSimpleCallArgument:function e(t,n){if(n>=2)return!1;var r=function(t){return e(t,n+1)},i="Literal"===t.type&&"regex"in t&&t.regex.pattern||"RegExpLiteral"===t.type&&t.pattern;return!(i&&i.length>5)&&("Literal"===t.type||"BigIntLiteral"===t.type||"DecimalLiteral"===t.type||"BooleanLiteral"===t.type||"NullLiteral"===t.type||"NumericLiteral"===t.type||"RegExpLiteral"===t.type||"StringLiteral"===t.type||"Identifier"===t.type||"ThisExpression"===t.type||"Super"===t.type||"PrivateName"===t.type||"ArgumentPlaceholder"===t.type||"Import"===t.type||("TemplateLiteral"===t.type?t.expressions.every(r):"ObjectExpression"===t.type?t.properties.every((function(e){return!e.computed&&(e.shorthand||e.value&&r(e.value))})):"ArrayExpression"===t.type?t.elements.every((function(e){return null===e||r(e)})):"ImportExpression"===t.type?r(t.source):"CallExpression"===t.type||"OptionalCallExpression"===t.type||"NewExpression"===t.type?e(t.callee,n)&&t.arguments.every(r):"MemberExpression"===t.type||"OptionalMemberExpression"===t.type?e(t.object,n)&&e(t.property,n):"UnaryExpression"!==t.type||"!"!==t.operator&&"-"!==t.operator?"TSNonNullExpression"===t.type&&e(t.expression,n):e(t.argument,n)))},isMeaningfulJSXText:Ht,isMemberExpressionChain:function e(t){return("MemberExpression"===t.type||"OptionalMemberExpression"===t.type)&&("Identifier"===t.object.type||e(t.object))},isMemberish:function(e){return"MemberExpression"===e.type||"OptionalMemberExpression"===e.type||"BindExpression"===e.type&&Boolean(e.object)},isNgForOf:function(e,t,n){return"NGMicrosyntaxKeyedExpression"===e.type&&"of"===e.key.name&&1===t&&"NGMicrosyntaxLet"===n.body[0].type&&null===n.body[0].value},isNumericLiteral:Ot,isObjectType:function(e){return"ObjectTypeAnnotation"===e.type||"TSTypeLiteral"===e.type},isObjectTypePropertyAFunction:function(e){return!("ObjectTypeProperty"!==e.type&&"ObjectTypeInternalSlot"!==e.type||"FunctionTypeAnnotation"!==e.value.type||e.static||Rt(e))},isSimpleType:function(e){return!!e&&(!("GenericTypeAnnotation"!==e.type&&"TSTypeReference"!==e.type||e.typeParameters)||!!Bt.has(e.type))},isSimpleNumber:Kt,isSimpleTemplateLiteral:function(e){var t="expressions";"TSTemplateLiteralType"===e.type&&(t="types");var n=e[t];return 0!==n.length&&n.every((function(e){if(e.comments)return!1;if("Identifier"===e.type||"ThisExpression"===e.type)return!0;if("MemberExpression"===e.type||"OptionalMemberExpression"===e.type){for(var t=e;"MemberExpression"===t.type||"OptionalMemberExpression"===t.type;){if("Identifier"!==t.property.type&&"Literal"!==t.property.type&&"StringLiteral"!==t.property.type&&"NumericLiteral"!==t.property.type)return!1;if((t=t.object).comments)return!1}return"Identifier"===t.type||"ThisExpression"===t.type}return!1}))},isStringLiteral:Nt,isStringPropSafeToUnquote:function(e,t){return"json"!==t.parser&&Nt(e.key)&&Gt(e.key).slice(1,-1)===e.key.value&&(ft(e.key.value)&&!(("typescript"===t.parser||"babel-ts"===t.parser)&&"ClassProperty"===e.type)||Kt(e.key.value)&&String(Number(e.key.value))===e.key.value&&("babel"===t.parser||"espree"===t.parser||"meriyah"===t.parser))},isTemplateOnItsOwnLine:function(e,t){return("TemplateLiteral"===e.type&&qt(e)||"TaggedTemplateExpression"===e.type&&qt(e.quasi))&&!gt(t,vt(e),{backwards:!0})},isTestCall:function e(t,n){if("CallExpression"!==t.type)return!1;if(1===t.arguments.length){if(Ft(t)&&n&&e(n))return It(t.arguments[0]);if("Identifier"===(r=t).callee.type&&/^(before|after)(Each|All)$/.test(r.callee.name)&&1===r.arguments.length)return Ft(t.arguments[0])}else if((2===t.arguments.length||3===t.arguments.length)&&("Identifier"===t.callee.type&&jt.test(t.callee.name)||function(e){return("MemberExpression"===e.callee.type||"OptionalMemberExpression"===e.callee.type)&&"Identifier"===e.callee.object.type&&"Identifier"===e.callee.property.type&&jt.test(e.callee.object.name)&&("only"===e.callee.property.name||"skip"===e.callee.property.name)}(t))&&(function(e){return"TemplateLiteral"===e.type}(t.arguments[0])||Nt(t.arguments[0])))return!(t.arguments[2]&&!Ot(t.arguments[2]))&&((2===t.arguments.length?It(t.arguments[1]):function(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type}(t.arguments[1])&&en(t.arguments[1]).length<=1)||Ft(t.arguments[1]));var r;return!1},isTheOnlyJSXElementInMarkdown:function(e,t){if("markdown"!==e.parentParser&&"mdx"!==e.parentParser)return!1;var n=t.getNode();if(!n.expression||!Lt(n.expression))return!1;var r=t.getParentNode();return"Program"===r.type&&1===r.body.length},isTSXFile:function(e){return e.filepath&&/\.tsx$/i.test(e.filepath)},isTypeAnnotationAFunction:function(e){return!("TypeAnnotation"!==e.type&&"TSTypeAnnotation"!==e.type||"FunctionTypeAnnotation"!==e.typeAnnotation.type||e.static||bt(e,e.typeAnnotation))},matchJsxWhitespaceRegex:Vt,needsHardlineAfterDanglingComment:function(e){if(!e.comments)return!1;var t=ht(e.comments.filter((function(e){return!e.leading&&!e.trailing})));return t&&!kt(t)},rawText:Gt,returnArgumentHasLeadingComment:function(e,t){if(Wt(e.originalText,t))return!0;if(xt(t))for(var n,r=t;n=(i=r).expressions?i.expressions[0]:i.left||i.test||i.callee||i.object||i.tag||i.argument||i.expression;)if(r=n,Wt(e.originalText,r))return!0;var i;return!1},shouldPrintComma:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"es5";return"es5"===e.trailingComma&&"es5"===t||"all"===e.trailingComma&&("all"===t||"es5"===t)},isBitwiseOperator:function(e){return!!$t[e]||"|"===e||"^"===e||"&"===e},shouldFlatten:function(e,t){return Xt(t)===Xt(e)&&"**"!==e&&(!Yt[e]||!Yt[t])&&!("%"===t&&Jt[e]||"%"===e&&Jt[t])&&(t===e||!Jt[t]||!Jt[e])&&(!$t[e]||!$t[t])},startsWithNoLookaheadToken:function e(t,n){switch((t=function(e){for(;e.left;)e=e.left;return e}(t)).type){case"FunctionExpression":case"ClassExpression":case"DoExpression":return n;case"ObjectExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return e(t.object,n);case"TaggedTemplateExpression":return"FunctionExpression"!==t.tag.type&&e(t.tag,n);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==t.callee.type&&e(t.callee,n);case"ConditionalExpression":return e(t.test,n);case"UpdateExpression":return!t.prefix&&e(t.argument,n);case"BindExpression":return t.object&&e(t.object,n);case"SequenceExpression":return e(t.expressions[0],n);case"TSAsExpression":return e(t.expression,n);default:return!1}},getPrecedence:Xt},sn=Ke.getLast,un=Ke.hasNewline,cn=Ke.getNextNonSpaceNonCommentCharacterIndexWithStartIndex,ln=Ke.getNextNonSpaceNonCommentCharacter,dn=Ke.hasNewlineInRange,pn=Ke.addLeadingComment,fn=Ke.addTrailingComment,hn=Ke.addDanglingComment,gn=Ke.getNextNonSpaceNonCommentCharacterIndex,mn=on.isBlockComment,_n=on.getFunctionParameters,vn=on.isPrettierIgnoreComment,yn=on.isJSXNode,bn=on.hasFlowShorthandAnnotationComment,Dn=on.hasFlowAnnotationComment,En=on.hasIgnoreComment,Cn=ct.locStart,Sn=ct.locEnd;function xn(e,t){var n=(e.body||e.properties).find((function(e){return"EmptyStatement"!==e.type}));n?pn(n,t):hn(e,t)}function kn(e,t){"BlockStatement"===e.type?xn(e,t):pn(e,t)}function Tn(e,t){var n=e.precedingNode,r=e.enclosingNode,i=e.followingNode;return!(!r||"IfStatement"!==r.type||!i)&&(")"===ln(t,e,Sn)?(fn(n,e),!0):n===r.consequent&&i===r.alternate?("BlockStatement"===n.type?fn(n,e):hn(r,e),!0):"BlockStatement"===i.type?(xn(i,e),!0):"IfStatement"===i.type?(kn(i.consequent,e),!0):r.consequent===i&&(pn(i,e),!0))}function wn(e,t){var n=e.precedingNode,r=e.enclosingNode,i=e.followingNode;return!(!r||"WhileStatement"!==r.type||!i)&&(")"===ln(t,e,Sn)?(fn(n,e),!0):"BlockStatement"===i.type?(xn(i,e),!0):r.body===i&&(pn(i,e),!0))}function An(e){var t=e.precedingNode,n=e.enclosingNode,r=e.followingNode;return!(!n||"TryStatement"!==n.type&&"CatchClause"!==n.type||!r)&&("CatchClause"===n.type&&t?(fn(t,e),!0):"BlockStatement"===r.type?(xn(r,e),!0):"TryStatement"===r.type?(kn(r.finalizer,e),!0):"CatchClause"===r.type&&(kn(r.body,e),!0))}function On(e){var t=e.precedingNode,n=e.enclosingNode,r=e.followingNode;if(n&&("ClassDeclaration"===n.type||"ClassExpression"===n.type||"DeclareClass"===n.type||"DeclareInterface"===n.type||"InterfaceDeclaration"===n.type||"TSInterfaceDeclaration"===n.type)){if(n.decorators&&n.decorators.length>0&&(!r||"Decorator"!==r.type))return fn(n.decorators[n.decorators.length-1],e),!0;if(n.body&&r===n.body)return xn(n.body,e),!0;if(r)for(var i=0,a=["implements","extends","mixins"];ia)return xn(i,e),!0}return!1}function Fn(e){var t=e.enclosingNode;return!(!t||"ImportSpecifier"!==t.type)&&(pn(t,e),!0)}function Ln(e){var t=e.enclosingNode;return!(!t||"LabeledStatement"!==t.type)&&(pn(t,e),!0)}function Pn(e,t,n){var r=e.enclosingNode;return t&&t.body&&0===t.body.length?(n?hn(t,e):pn(t,e),!0):!(!r||"Program"!==r.type||0!==r.body.length||!r.directives||0!==r.directives.length)&&(n?hn(r,e):pn(r,e),!0)}function Rn(e){var t=e.enclosingNode,n=e.followingNode;if(vn(e)&&t&&"TSMappedType"===t.type&&n&&"TSTypeParameter"===n.type&&n.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function Mn(e){return"ArrowFunctionExpression"===e.type||"FunctionExpression"===e.type||"FunctionDeclaration"===e.type||"ObjectMethod"===e.type||"ClassMethod"===e.type||"TSDeclareFunction"===e.type||"TSCallSignatureDeclaration"===e.type||"TSConstructSignatureDeclaration"===e.type||"TSMethodSignature"===e.type||"TSConstructorType"===e.type||"TSFunctionType"===e.type||"TSDeclareMethod"===e.type}function Bn(e){return mn(e)&&"*"===e.value[0]&&/@type\b/.test(e.value)}var jn={handleOwnLineComment:function(e,t,n,r,i){return Rn(e)||In(e,t)||function(e){var t=e.enclosingNode,n=e.followingNode;return!(!t||"MemberExpression"!==t.type&&"OptionalMemberExpression"!==t.type||!n||"Identifier"!==n.type)&&(pn(t,e),!0)}(e)||Tn(e,t)||wn(e,t)||An(e)||On(e)||Fn(e)||function(e){var t=e.enclosingNode;return!(!t||"ForInStatement"!==t.type&&"ForOfStatement"!==t.type)&&(pn(t,e),!0)}(e)||function(e){var t=e.precedingNode,n=e.enclosingNode,r=e.followingNode;return!n||"UnionTypeAnnotation"!==n.type&&"TSUnionType"!==n.type?(r&&("UnionTypeAnnotation"===r.type||"TSUnionType"===r.type)&&vn(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1):(vn(e)&&(r.prettierIgnore=!0,e.unignore=!0),!!t&&(fn(t,e),!0))}(e)||Pn(e,r,i)||function(e,t){var n=e.precedingNode,r=e.enclosingNode;return!!(n&&"ImportSpecifier"===n.type&&r&&"ImportDeclaration"===r.type&&un(t,Sn(e)))&&(fn(n,e),!0)}(e,t)||function(e){var t=e.enclosingNode;return!(!t||"AssignmentPattern"!==t.type)&&(pn(t,e),!0)}(e)||Nn(e,t)||Ln(e)},handleEndOfLineComment:function(e,t,n,r,i){return function(e){var t=e.followingNode;return!(!t||!Bn(e))&&(pn(t,e),!0)}(e)||In(e,t)||function(e,t){var n=e.precedingNode,r=e.enclosingNode,i=e.followingNode,a=n&&!dn(t,Sn(n),Cn(e));return!(n&&a||!r||"ConditionalExpression"!==r.type&&"TSConditionalType"!==r.type||!i)&&(pn(i,e),!0)}(e,t)||Fn(e)||Tn(e,t)||wn(e,t)||An(e)||On(e)||Ln(e)||function(e){var t=e.precedingNode,n=e.enclosingNode;return!!(n&&("CallExpression"===n.type||"OptionalCallExpression"===n.type)&&t&&n.callee===t&&n.arguments.length>0)&&(pn(n.arguments[0],e),!0)}(e)||function(e){var t=e.enclosingNode;return!(!t||"Property"!==t.type&&"ObjectProperty"!==t.type)&&(pn(t,e),!0)}(e)||Pn(e,r,i)||function(e){var t=e.enclosingNode;return!(!t||"TypeAlias"!==t.type)&&(pn(t,e),!0)}(e)||function(e){var t=e.enclosingNode,n=e.followingNode;return!(!t||"VariableDeclarator"!==t.type&&"AssignmentExpression"!==t.type||!n||"ObjectExpression"!==n.type&&"ArrayExpression"!==n.type&&"TemplateLiteral"!==n.type&&"TaggedTemplateExpression"!==n.type&&!mn(e))&&(pn(n,e),!0)}(e)},handleRemainingComment:function(e,t,n,r,i){return!!(Rn(e)||Tn(e,t)||wn(e,t)||function(e){var t=e.precedingNode,n=e.enclosingNode;return!(!n||"ObjectProperty"!==n.type&&"Property"!==n.type||!n.shorthand||n.key!==t||"AssignmentPattern"!==n.value.type)&&(fn(n.value.left,e),!0)}(e)||function(e,t){if(")"!==ln(t,e,Sn))return!1;var n=e.enclosingNode;return n&&(Mn(n)&&0===_n(n).length||("CallExpression"===n.type||"OptionalCallExpression"===n.type||"NewExpression"===n.type)&&0===n.arguments.length)?(hn(n,e),!0):!(!n||"MethodDefinition"!==n.type||0!==_n(n.value).length)&&(hn(n.value,e),!0)}(e,t)||Nn(e,t)||Pn(e,r,i)||function(e,t){var n=e.enclosingNode;if(!n||"ArrowFunctionExpression"!==n.type)return!1;var r=gn(t,e,Sn);return!1!==r&&"=>"===t.slice(r,r+2)&&(hn(n,e),!0)}(e,t)||function(e,t){if("("!==ln(t,e,Sn))return!1;var n=e.precedingNode,r=e.enclosingNode;return!(!n||!r||"FunctionDeclaration"!==r.type&&"FunctionExpression"!==r.type&&"ClassMethod"!==r.type&&"MethodDefinition"!==r.type&&"ObjectMethod"!==r.type)&&(fn(n,e),!0)}(e,t)||function(e){var t=e.precedingNode,n=e.enclosingNode,r=e.followingNode;return!(!n||"TSMappedType"!==n.type)&&(r&&"TSTypeParameter"===r.type&&r.name?(pn(r.name,e),!0):!(!t||"TSTypeParameter"!==t.type||!t.constraint)&&(fn(t.constraint,e),!0))}(e)||function(e){var t=e.enclosingNode;return!(!t||"ContinueStatement"!==t.type&&"BreakStatement"!==t.type||t.label)&&(fn(t,e),!0)}(e)||function(e,t){var n=e.enclosingNode;return!(e.followingNode||!n||"TSMethodSignature"!==n.type&&"TSDeclareFunction"!==n.type&&"TSAbstractMethodDefinition"!==n.type||";"!==ln(t,e,Sn))&&(fn(n,e),!0)}(e,t))},hasLeadingComment:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};return e.leadingComments?e.leadingComments.some(t):!!e.comments&&e.comments.some((function(e){return e.leading&&t(e)}))},isTypeCastComment:Bn,getGapRegex:function(e){if(e&&"BinaryExpression"!==e.type&&"LogicalExpression"!==e.type)return/^[\s&(|]*$/},getCommentChildNodes:function(e,t){if(("typescript"===t.parser||"flow"===t.parser||"espree"===t.parser||"meriyah"===t.parser)&&"MethodDefinition"===e.type&&e.value&&"FunctionExpression"===e.value.type&&0===_n(e.value).length&&!e.value.returnType&&(!e.value.typeParameters||0===e.value.typeParameters.length)&&e.value.body)return[].concat(d(e.decorators||[]),[e.key,e.value.body])},willPrintOwnComments:function(e){var t=e.getValue(),n=e.getParentNode();return(t&&(yn(t)||bn(t)||n&&("CallExpression"===n.type||"OptionalCallExpression"===n.type)&&(Dn(t.leadingComments)||Dn(t.trailingComments)))||n&&("JSXSpreadAttribute"===n.type||"JSXSpreadChild"===n.type||"UnionTypeAnnotation"===n.type||"TSUnionType"===n.type||("ClassDeclaration"===n.type||"ClassExpression"===n.type)&&n.superClass===t))&&(!En(e)||"UnionTypeAnnotation"===n.type||"TSUnionType"===n.type)}},Un=Ke.getLast,Vn=Ke.getNextNonSpaceNonCommentCharacter,zn=Ke.getShebang,Hn=ct.composeLoc,Wn=ct.locStart,Kn=ct.locEnd,qn=jn.isTypeCastComment;function Gn(e){return"CallExpression"===e.type?(e.type="OptionalCallExpression",e.callee=Gn(e.callee)):"MemberExpression"===e.type?(e.type="OptionalMemberExpression",e.object=Gn(e.object)):"TSNonNullExpression"===e.type&&(e.expression=Gn(e.expression)),e}function Yn(e,t){var n;if(Array.isArray(e))n=e.entries();else{if(!e||"object"!=typeof e||"string"!=typeof e.type)return e;n=Object.entries(e)}var r,i=u(n);try{for(i.s();!(r=i.n()).done;){var a=l(r.value,2),o=a[0],s=a[1];e[o]=Yn(s,t)}}catch(c){i.e(c)}finally{i.f()}return Array.isArray(e)?e:t(e)||e}function Jn(e){return"LogicalExpression"===e.type&&"LogicalExpression"===e.right.type&&e.operator===e.right.operator}function $n(e){return Jn(e)?$n({type:"LogicalExpression",operator:e.operator,left:$n({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:Hn(e.left,e.right.left)}),right:e.right.right,range:Hn(e)}):e}var Qn=function(t,n){if("typescript"!==n.parser&&"flow"!==n.parser&&"espree"!==n.parser||function(e,t){var n=zn(t.originalText);n&&e.comments.unshift({type:"Line",value:n.slice(2),range:[0,n.length]})}(t,n),"typescript"===n.parser&&n.originalText.includes("@")){var r=n.tsParseResult,i=r.esTreeNodeToTSNodeMap,a=r.tsNodeToESTreeNodeMap;t=Yn(t,(function(t){var n=i.get(t);if(n){var r=n.decorators;if(Array.isArray(r)){var o=a.get(n);if(o===t){var s=o.decorators;if(!Array.isArray(s)||s.length!==r.length||r.some((function(e){var t=a.get(e);return!t||!s.includes(t)}))){var u=o.loc,c=u.start,l=u.end;throw e("Leading decorators must be attached to a class declaration",{start:{line:c.line,column:c.column+1},end:{line:l.line,column:l.column+1}})}}}}}))}if("typescript"!==n.parser&&"flow"!==n.parser&&"espree"!==n.parser&&"meriyah"!==n.parser){var o=new Set;t=Yn(t,(function(e){e.leadingComments&&e.leadingComments.some(qn)&&o.add(Wn(e))})),t=Yn(t,(function(e){if("ParenthesizedExpression"===e.type){var t=e.expression;if("TypeCastExpression"===t.type)return t.range=e.range,t;var n=Wn(e);if(!o.has(n))return t.extra=Object.assign({},t.extra,{parenthesized:!0}),t}}))}return Yn(t,(function(e){switch(e.type){case"ChainExpression":return Gn(e.expression);case"LogicalExpression":if(Jn(e))return $n(e);break;case"VariableDeclaration":var t=Un(e.declarations);t&&t.init&&function(e,t){";"!==n.originalText[Kn(t)]&&(e.range=Hn(e,t))}(e,t);break;case"TSParenthesizedType":return e.typeAnnotation.range=Hn(e),e.typeAnnotation;case"TSUnionType":case"TSIntersectionType":if(1===e.types.length){var r=l(e.types,1)[0];return r.range=Hn(e),r}break;case"TSTypeParameter":"string"==typeof e.name&&(e.name={type:"Identifier",name:e.name,range:Hn(e,e.name.length)});break;case"SequenceExpression":var i=Un(e.expressions);Kn(e)>Kn(i)&&(e.range=Hn(e,i));break;case"ClassProperty":e.key&&"TSPrivateIdentifier"===e.key.type&&"?"===Vn(n.originalText,e.key,Kn)&&(e.optional=!0)}}))},Xn=J((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=!0,u=!0,c=!0,h=!0,g=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(this,e),this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.updateContext=void 0,this.label=t,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.rightAssociative=!!n.rightAssociative,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=null!=n.binop?n.binop:null,this.updateContext=null},m=new Map;function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.keyword=e;var n=new g(e,t);return m.set(e,n),n}function v(e,t){return new g(e,{beforeExpr:n,binop:t})}var y={num:new g("num",{startsExpr:u}),bigint:new g("bigint",{startsExpr:u}),decimal:new g("decimal",{startsExpr:u}),regexp:new g("regexp",{startsExpr:u}),string:new g("string",{startsExpr:u}),name:new g("name",{startsExpr:u}),eof:new g("eof"),bracketL:new g("[",{beforeExpr:n,startsExpr:u}),bracketHashL:new g("#[",{beforeExpr:n,startsExpr:u}),bracketBarL:new g("[|",{beforeExpr:n,startsExpr:u}),bracketR:new g("]"),bracketBarR:new g("|]"),braceL:new g("{",{beforeExpr:n,startsExpr:u}),braceBarL:new g("{|",{beforeExpr:n,startsExpr:u}),braceHashL:new g("#{",{beforeExpr:n,startsExpr:u}),braceR:new g("}"),braceBarR:new g("|}"),parenL:new g("(",{beforeExpr:n,startsExpr:u}),parenR:new g(")"),comma:new g(",",{beforeExpr:n}),semi:new g(";",{beforeExpr:n}),colon:new g(":",{beforeExpr:n}),doubleColon:new g("::",{beforeExpr:n}),dot:new g("."),question:new g("?",{beforeExpr:n}),questionDot:new g("?."),arrow:new g("=>",{beforeExpr:n}),template:new g("template"),ellipsis:new g("...",{beforeExpr:n}),backQuote:new g("`",{startsExpr:u}),dollarBraceL:new g("${",{beforeExpr:n,startsExpr:u}),at:new g("@"),hash:new g("#",{startsExpr:u}),interpreterDirective:new g("#!..."),eq:new g("=",{beforeExpr:n,isAssign:!0}),assign:new g("_=",{beforeExpr:n,isAssign:!0}),incDec:new g("++/--",{prefix:h,postfix:!0,startsExpr:u}),bang:new g("!",{beforeExpr:n,prefix:h,startsExpr:u}),tilde:new g("~",{beforeExpr:n,prefix:h,startsExpr:u}),pipeline:v("|>",0),nullishCoalescing:v("??",1),logicalOR:v("||",1),logicalAND:v("&&",2),bitwiseOR:v("|",3),bitwiseXOR:v("^",4),bitwiseAND:v("&",5),equality:v("==/!=/===/!==",6),relational:v("/<=/>=",7),bitShift:v("<>/>>>",8),plusMin:new g("+/-",{beforeExpr:n,binop:9,prefix:h,startsExpr:u}),modulo:new g("%",{beforeExpr:n,binop:10,startsExpr:u}),star:new g("*",{binop:10}),slash:v("/",10),exponent:new g("**",{beforeExpr:n,binop:11,rightAssociative:!0}),_break:_("break"),_case:_("case",{beforeExpr:n}),_catch:_("catch"),_continue:_("continue"),_debugger:_("debugger"),_default:_("default",{beforeExpr:n}),_do:_("do",{isLoop:c,beforeExpr:n}),_else:_("else",{beforeExpr:n}),_finally:_("finally"),_for:_("for",{isLoop:c}),_function:_("function",{startsExpr:u}),_if:_("if"),_return:_("return",{beforeExpr:n}),_switch:_("switch"),_throw:_("throw",{beforeExpr:n,prefix:h,startsExpr:u}),_try:_("try"),_var:_("var"),_const:_("const"),_while:_("while",{isLoop:c}),_with:_("with"),_new:_("new",{beforeExpr:n,startsExpr:u}),_this:_("this",{startsExpr:u}),_super:_("super",{startsExpr:u}),_class:_("class",{startsExpr:u}),_extends:_("extends",{beforeExpr:n}),_export:_("export"),_import:_("import",{startsExpr:u}),_null:_("null",{startsExpr:u}),_true:_("true",{startsExpr:u}),_false:_("false",{startsExpr:u}),_in:_("in",{beforeExpr:n,binop:7}),_instanceof:_("instanceof",{beforeExpr:n,binop:7}),_typeof:_("typeof",{beforeExpr:n,prefix:h,startsExpr:u}),_void:_("void",{beforeExpr:n,prefix:h,startsExpr:u}),_delete:_("delete",{beforeExpr:n,prefix:h,startsExpr:u})},b=128,D=128,E=1024,C=64,S=/\r\n?|[\n\u2028\u2029]/,x=new RegExp(S.source,"g");function k(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}var T=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function w(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var A=function e(t,n){p(this,e),this.line=void 0,this.column=void 0,this.line=t,this.column=n},O=function e(t,n){p(this,e),this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=n};function N(e){return e[e.length-1]}var I=Object.freeze({AccessorIsGenerator:"A %0ter cannot be a generator",ArgumentsInClass:"'arguments' is only allowed in functions and class methods",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function",AwaitExpressionFormalParameter:"await is not allowed in async function parameters",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules",AwaitNotInAsyncFunction:"'await' is only allowed within async functions",BadGetterArity:"getter must not have any formal parameters",BadSetterArity:"setter must have exactly one formal parameter",BadSetterRestParameter:"setter function argument must not be a rest parameter",ConstructorClassField:"Classes may not have a field named 'constructor'",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'",ConstructorIsAccessor:"Class constructor may not be an accessor",ConstructorIsAsync:"Constructor can't be an async function",ConstructorIsGenerator:"Constructor can't be a generator",DeclarationMissingInitializer:"%0 require an initialization value",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",DecoratorSemicolon:"Decorators must not be followed by a semicolon",DecoratorStaticBlock:"Decorators can't be used with a static block",DeletePrivateField:"Deleting a private field is not allowed",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:"`%0` has already been exported. Exported identifiers must be unique.",DuplicateProto:"Redefinition of __proto__ property",DuplicateRegExpFlags:"Duplicate regular expression flag",DuplicateStaticBlock:"Duplicate static block in the same class",ElementAfterRest:"Rest element must be last element",EscapedCharNotAnIdentifier:"Invalid Unicode escape",ExportBindingIsString:"A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { %0 as '%1' } from 'some-module'`?",ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block",IllegalBreakContinue:"Unsyntactic %0",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"'return' outside of function",ImportBindingIsString:'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments",ImportCallArity:"import() requires exactly %0",ImportCallNotNewExpression:"Cannot use new with import(...)",ImportCallSpreadArgument:"... is not allowed in import()",ImportMetaOutsideModule:"import.meta may appear only with 'sourceType: \"module\"'",ImportOutsideModule:"'import' and 'export' may appear only with 'sourceType: \"module\"'",InvalidBigIntLiteral:"Invalid BigIntLiteral",InvalidCodePoint:"Code point out of bounds",InvalidDecimal:"Invalid decimal",InvalidDigit:"Expected number in radix %0",InvalidEscapeSequence:"Bad character escape sequence",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template",InvalidEscapedReservedWord:"Escape sequence in keyword %0",InvalidIdentifier:"Invalid identifier %0",InvalidLhs:"Invalid left-hand side in %0",InvalidLhsBinding:"Binding invalid left-hand side in %0",InvalidNumber:"Invalid number",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'",InvalidOrUnexpectedToken:"Unexpected character '%0'",InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern",InvalidPrivateFieldResolution:"Private name #%0 is not defined",InvalidPropertyBindingPattern:"Binding member expression",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions",InvalidRestAssignmentPattern:"Invalid rest operator's argument",LabelRedeclaration:"Label '%0' is already declared",LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'",MalformedRegExpFlags:"Invalid regular expression flag",MissingClassName:"A class name is required",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values",ModuleAttributesWithDuplicateKeys:'Duplicate key "%0" is not allowed in module attributes',ModuleExportNameHasLoneSurrogate:"An export name cannot include a lone surrogate, found '\\u%0'",ModuleExportUndefined:"Export '%0' is not defined",MultipleDefaultsInSwitch:"Multiple default clauses",NewlineAfterThrow:"Illegal newline after throw",NoCatchOrFinally:"Missing catch or finally clause",NumberIdentifier:"Identifier directly after number",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences",ObsoleteAwaitStar:"await* has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"constructors in/after an Optional Chain are not allowed",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain",ParamDupe:"Argument name clash",PatternHasAccessor:"Object pattern can't contain getter or setter",PatternHasMethod:"Object pattern can't contain methods",PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding",PrimaryTopicRequiresSmartPipeline:"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.",PrivateInExpectedIn:"Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`)",PrivateNameRedeclaration:"Duplicate private name #%0",RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'",RecordNoProto:"'__proto__' is not allowed in Record expressions",RestTrailingComma:"Unexpected trailing comma after rest element",SloppyFunction:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",StaticPrototype:"Classes may not have static property named prototype",StrictDelete:"Deleting local variable in strict mode",StrictEvalArguments:"Assigning to '%0' in strict mode",StrictEvalArgumentsBinding:"Binding '%0' in strict mode",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode",StrictWith:"'with' in strict mode",SuperNotAllowed:"super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super",TrailingDecorator:"Decorators must be attached to a class element",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal',UnexpectedDigitAfterHash:"Unexpected digit after hash token",UnexpectedImportExport:"'import' and 'export' may only appear at the top level",UnexpectedKeyword:"Unexpected keyword '%0'",UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context",UnexpectedNewTarget:"new.target can only be used in functions",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits",UnexpectedPrivateField:"Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",UnexpectedReservedWord:"Unexpected reserved word '%0'",UnexpectedSuper:"super is only allowed in object methods and classes",UnexpectedToken:"Unexpected token '%0'",UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"import can only be used in import() or import.meta",UnsupportedMetaProperty:"The only valid meta property for %0 is %0.%1",UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties",UnsupportedSuper:"super can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop])",UnterminatedComment:"Unterminated comment",UnterminatedRegExp:"Unterminated regular expression",UnterminatedString:"Unterminated string constant",UnterminatedTemplate:"Unterminated template",VarRedeclaration:"Identifier '%0' has already been declared",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator",YieldInParameter:"Yield expression is not allowed in formal parameters",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0"});function F(e){return null!=e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}var L=function e(t,n,r,i){p(this,e),this.token=void 0,this.isExpr=void 0,this.preserveSpace=void 0,this.override=void 0,this.token=t,this.isExpr=!!n,this.preserveSpace=!!r,this.override=i},P={braceStatement:new L("{",!1),braceExpression:new L("{",!0),recordExpression:new L("#{",!0),templateQuasi:new L("${",!1),parenStatement:new L("(",!1),parenExpression:new L("(",!0),template:new L("`",!0,!0,(function(e){return e.readTmplToken()})),functionExpression:new L("function",!0),functionStatement:new L("function",!1)};y.parenR.updateContext=y.braceR.updateContext=function(){if(1!==this.state.context.length){var e=this.state.context.pop();e===P.braceStatement&&"function"===this.curContext().token&&(e=this.state.context.pop()),this.state.exprAllowed=!e.isExpr}else this.state.exprAllowed=!0},y.name.updateContext=function(e){var t=!1;e!==y.dot&&("of"!==this.state.value||this.state.exprAllowed||e===y._function||e===y._class||(t=!0)),this.state.exprAllowed=t,this.state.isIterator&&(this.state.isIterator=!1)},y.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?P.braceStatement:P.braceExpression),this.state.exprAllowed=!0},y.dollarBraceL.updateContext=function(){this.state.context.push(P.templateQuasi),this.state.exprAllowed=!0},y.parenL.updateContext=function(e){var t=e===y._if||e===y._for||e===y._with||e===y._while;this.state.context.push(t?P.parenStatement:P.parenExpression),this.state.exprAllowed=!0},y.incDec.updateContext=function(){},y._function.updateContext=y._class.updateContext=function(e){!e.beforeExpr||e===y.semi||e===y._else||e===y._return&&this.hasPrecedingLineBreak()||(e===y.colon||e===y.braceL)&&this.curContext()===P.b_stat?this.state.context.push(P.functionStatement):this.state.context.push(P.functionExpression),this.state.exprAllowed=!1},y.backQuote.updateContext=function(){this.curContext()===P.template?this.state.context.pop():this.state.context.push(P.template),this.state.exprAllowed=!1},y.braceHashL.updateContext=function(){this.state.context.push(P.recordExpression),this.state.exprAllowed=!0};var R="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08c7\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\u9ffc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7ca\ua7f5-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",M="\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf\u1ac0\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f",B=new RegExp("["+R+"]"),j=new RegExp("["+R+M+"]");R=M=null;var U=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],V=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function z(e,t){for(var n=65536,r=0,i=t.length;re)return!1;if((n+=t[r+1])>=e)return!0}return!1}function H(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&B.test(String.fromCharCode(e)):z(e,U)))}function W(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&j.test(String.fromCharCode(e)):z(e,U)||z(e,V))))}var K=["implements","interface","let","package","private","protected","public","static","yield"],q=["eval","arguments"],G=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),Y=new Set(K),J=new Set(q);function $(e,t){return t&&"await"===e||"enum"===e}function Q(e,t){return $(e,t)||Y.has(e)}function X(e){return J.has(e)}function Z(e,t){return Q(e,t)||X(e)}function ee(e){return G.has(e)}var te=/^in(stanceof)?$/,ne=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),re=Object.freeze({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module",AssignReservedType:"Cannot overwrite reserved type %0",DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement",EnumBooleanMemberNotInitialized:"Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",EnumDuplicateMemberName:"Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",EnumInconsistentMemberValues:"Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",EnumInvalidExplicitType:"Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",EnumInvalidExplicitTypeUnknownSupplied:"Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",EnumInvalidMemberInitializerPrimaryType:"Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",EnumInvalidMemberInitializerSymbolType:"Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",EnumInvalidMemberInitializerUnknownType:"The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",EnumInvalidMemberName:"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",EnumNumberMemberNotInitialized:"Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",EnumStringMemberInconsistentlyInitailized:"String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions",InexactVariance:"Explicit inexact syntax cannot have variance",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`",NestedFlowComment:"Cannot have a flow comment inside another flow comment",OptionalBindingPattern:"A binding pattern parameter cannot be optional in an implementation signature.",SpreadVariance:"Spread properties cannot have variance",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object",UnexpectedReservedType:"Unexpected reserved type %0",UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint"',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`",UnsupportedDeclareExportKind:"`declare export %0` is not supported. Use `%1` instead",UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module",UnterminatedFlowComment:"Unterminated flow-comment"});function ie(e){return"type"===e.importKind||"typeof"===e.importKind}function ae(e){return(e.type===y.name||!!e.type.keyword)&&"from"!==e.value}var oe={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"},se=/\*?\s*@((?:no)?flow)\b/,ue={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",lang:"\u2329",rang:"\u232a",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},ce=/^[\da-fA-F]+$/,le=/^\d+$/,de=Object.freeze({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression",MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>",MissingClosingTagElement:"Expected corresponding JSX closing tag for <%0>",UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text",UnterminatedJsxContent:"Unterminated JSX contents",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"});function pe(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function fe(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return fe(e.object)+"."+fe(e.property);throw new Error("Node had unexpected type: "+e.type)}P.j_oTag=new L("...",!0,!0),y.jsxName=new g("jsxName"),y.jsxText=new g("jsxText",{beforeExpr:!0}),y.jsxTagStart=new g("jsxTagStart",{startsExpr:!0}),y.jsxTagEnd=new g("jsxTagEnd"),y.jsxTagStart.updateContext=function(){this.state.context.push(P.j_expr),this.state.context.push(P.j_oTag),this.state.exprAllowed=!1},y.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===P.j_oTag&&e===y.slash||t===P.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===P.j_expr):this.state.exprAllowed=!0};var he=function e(t){p(this,e),this.flags=void 0,this.var=[],this.lexical=[],this.functions=[],this.flags=t},ge=function(){function e(t,n){p(this,e),this.scopeStack=[],this.undefinedExports=new Map,this.undefinedPrivateNames=new Map,this.raise=t,this.inModule=n}return f(e,[{key:"createScope",value:function(e){return new he(e)}},{key:"enter",value:function(e){this.scopeStack.push(this.createScope(e))}},{key:"exit",value:function(){this.scopeStack.pop()}},{key:"treatFunctionsAsVarInScope",value:function(e){return!!(2&e.flags||!this.inModule&&1&e.flags)}},{key:"declareName",value:function(e,t,n){var r=this.currentScope();if(8&t||16&t)this.checkRedeclarationInScope(r,e,t,n),16&t?r.functions.push(e):r.lexical.push(e),8&t&&this.maybeExportDefined(r,e);else if(4&t)for(var i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,e,t,n),r.var.push(e),this.maybeExportDefined(r,e),!(131&r.flags));--i);this.inModule&&1&r.flags&&this.undefinedExports.delete(e)}},{key:"maybeExportDefined",value:function(e,t){this.inModule&&1&e.flags&&this.undefinedExports.delete(t)}},{key:"checkRedeclarationInScope",value:function(e,t,n,r){this.isRedeclaredInScope(e,t,n)&&this.raise(r,I.VarRedeclaration,t)}},{key:"isRedeclaredInScope",value:function(e,t,n){return!!(1&n)&&(8&n?e.lexical.indexOf(t)>-1||e.functions.indexOf(t)>-1||e.var.indexOf(t)>-1:16&n?e.lexical.indexOf(t)>-1||!this.treatFunctionsAsVarInScope(e)&&e.var.indexOf(t)>-1:e.lexical.indexOf(t)>-1&&!(8&e.flags&&e.lexical[0]===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.indexOf(t)>-1)}},{key:"checkLocalExport",value:function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&-1===this.scopeStack[0].functions.indexOf(e.name)&&this.undefinedExports.set(e.name,e.start)}},{key:"currentScope",value:function(){return this.scopeStack[this.scopeStack.length-1]}},{key:"currentVarScope",value:function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(131&t.flags)return t}}},{key:"currentThisScope",value:function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if((131&t.flags||64&t.flags)&&!(4&t.flags))return t}}},{key:"inFunction",get:function(){return(2&this.currentVarScope().flags)>0}},{key:"allowSuper",get:function(){return(16&this.currentThisScope().flags)>0}},{key:"allowDirectSuper",get:function(){return(32&this.currentThisScope().flags)>0}},{key:"inClass",get:function(){return(64&this.currentThisScope().flags)>0}},{key:"inNonArrowFunction",get:function(){return(2&this.currentThisScope().flags)>0}},{key:"treatFunctionsAsVar",get:function(){return this.treatFunctionsAsVarInScope(this.currentScope())}}]),e}(),me=function(e){o(n,e);var t=s(n);function n(){var e;p(this,n);for(var r=arguments.length,i=new Array(r),a=0;a-1?!(256&r)||!!(512&r)!==e.constEnums.indexOf(t)>-1:r&D&&e.classes.indexOf(t)>-1?e.lexical.indexOf(t)>-1&&!!(1&r):!!(2&r&&e.types.indexOf(t)>-1)||i(a(n.prototype),"isRedeclaredInScope",this).apply(this,arguments)}},{key:"checkLocalExport",value:function(e){-1===this.scopeStack[0].types.indexOf(e.name)&&-1===this.scopeStack[0].exportOnlyBindings.indexOf(e.name)&&i(a(n.prototype),"checkLocalExport",this).call(this,e)}}]),n}(ge),ve=function(){function e(){p(this,e),this.stacks=[]}return f(e,[{key:"enter",value:function(e){this.stacks.push(e)}},{key:"exit",value:function(){this.stacks.pop()}},{key:"currentFlags",value:function(){return this.stacks[this.stacks.length-1]}},{key:"hasAwait",get:function(){return(2&this.currentFlags())>0}},{key:"hasYield",get:function(){return(1&this.currentFlags())>0}},{key:"hasReturn",get:function(){return(4&this.currentFlags())>0}},{key:"hasIn",get:function(){return(8&this.currentFlags())>0}}]),e}();function ye(e,t){return(e?2:0)|(t?1:0)}function be(e){if(null==e)throw new Error("Unexpected ".concat(e," value."));return e}function De(e){if(!e)throw new Error("Assert fail")}var Ee=Object.freeze({ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateModifier:"Duplicate modifier: '%0'",EmptyHeritageClauseType:"'%0' list cannot be empty.",EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier",IndexSignatureHasAccessibility:"Index signatures cannot have an accessibility modifier ('%0')",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier",IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MixedLabeledAndUnlabeledElements:"Tuple members must all have names or all not have names.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:"Private elements cannot have an accessibility modifier ('%0')",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0"});function Ce(e,t){return e.some((function(e){return Array.isArray(e)?e[0]===t:e===t}))}function Se(e,t,n){var r=e.find((function(e){return Array.isArray(e)?e[0]===t:e===t}));return r&&Array.isArray(r)?r[1][n]:null}y.placeholder=new g("%%",{startsExpr:!0});var xe=["minimal","smart","fsharp"],ke=["hash","bar"],Te={estree:function(e){return function(e){o(n,e);var t=s(n);function n(){return p(this,n),t.apply(this,arguments)}return f(n,[{key:"estreeParseRegExpLiteral",value:function(e){var t=e.pattern,n=e.flags,r=null;try{r=new RegExp(t,n)}catch(t){}var i=this.estreeParseLiteral(r);return i.regex={pattern:t,flags:n},i}},{key:"estreeParseBigIntLiteral",value:function(e){var t="undefined"!=typeof BigInt?BigInt(e):null,n=this.estreeParseLiteral(t);return n.bigint=String(n.value||e),n}},{key:"estreeParseDecimalLiteral",value:function(e){var t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}},{key:"estreeParseLiteral",value:function(e){return this.parseLiteral(e,"Literal")}},{key:"directiveToStmt",value:function(e){var t=e.value,n=this.startNodeAt(e.start,e.loc.start),r=this.startNodeAt(t.start,t.loc.start);return r.value=t.value,r.raw=t.extra.raw,n.expression=this.finishNodeAt(r,"Literal",t.end,t.loc.end),n.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(n,"ExpressionStatement",e.end,e.loc.end)}},{key:"initFunction",value:function(e,t){i(a(n.prototype),"initFunction",this).call(this,e,t),e.expression=!1}},{key:"checkDeclaration",value:function(e){F(e)?this.checkDeclaration(e.value):i(a(n.prototype),"checkDeclaration",this).call(this,e)}},{key:"getObjectOrClassMethodParams",value:function(e){return e.value.params}},{key:"checkLVal",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,u=arguments.length>4?arguments[4]:void 0;switch(e.type){case"ObjectPattern":e.properties.forEach((function(e){t.checkLVal("Property"===e.type?e.value:e,r,o,"object destructuring pattern",u)}));break;default:i(a(n.prototype),"checkLVal",this).call(this,e,r,o,s,u)}}},{key:"checkProto",value:function(e,t,r,o){e.method||i(a(n.prototype),"checkProto",this).call(this,e,t,r,o)}},{key:"isValidDirective",value:function(e){var t;return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!(null==(t=e.expression.extra)?void 0:t.parenthesized)}},{key:"stmtToDirective",value:function(e){var t=i(a(n.prototype),"stmtToDirective",this).call(this,e),r=e.expression.value;return t.value.value=r,t}},{key:"parseBlockBody",value:function(e,t,r,o){var s=this;i(a(n.prototype),"parseBlockBody",this).call(this,e,t,r,o);var u=e.directives.map((function(e){return s.directiveToStmt(e)}));e.body=u.concat(e.body),delete e.directives}},{key:"pushClassMethod",value:function(e,t,n,r,i,a){this.parseMethod(t,n,r,i,a,"ClassMethod",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}},{key:"parseExprAtom",value:function(e){switch(this.state.type){case y.num:case y.string:return this.estreeParseLiteral(this.state.value);case y.regexp:return this.estreeParseRegExpLiteral(this.state.value);case y.bigint:return this.estreeParseBigIntLiteral(this.state.value);case y.decimal:return this.estreeParseDecimalLiteral(this.state.value);case y._null:return this.estreeParseLiteral(null);case y._true:return this.estreeParseLiteral(!0);case y._false:return this.estreeParseLiteral(!1);default:return i(a(n.prototype),"parseExprAtom",this).call(this,e)}}},{key:"parseLiteral",value:function(e,t,r,o){var s=i(a(n.prototype),"parseLiteral",this).call(this,e,t,r,o);return s.raw=s.extra.raw,delete s.extra,s}},{key:"parseFunctionBody",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i(a(n.prototype),"parseFunctionBody",this).call(this,e,t,r),e.expression="BlockStatement"!==e.body.type}},{key:"parseMethod",value:function(e,t,r,o,s,u){var c=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=this.startNode();return l.kind=e.kind,(l=i(a(n.prototype),"parseMethod",this).call(this,l,t,r,o,s,u,c)).type="FunctionExpression",delete l.kind,e.value=l,u="ClassMethod"===u?"MethodDefinition":u,this.finishNode(e,u)}},{key:"parseObjectMethod",value:function(e,t,r,o,s){var u=i(a(n.prototype),"parseObjectMethod",this).call(this,e,t,r,o,s);return u&&(u.type="Property","method"===u.kind&&(u.kind="init"),u.shorthand=!1),u}},{key:"parseObjectProperty",value:function(e,t,r,o,s){var u=i(a(n.prototype),"parseObjectProperty",this).call(this,e,t,r,o,s);return u&&(u.kind="init",u.type="Property"),u}},{key:"toAssignable",value:function(e){return F(e)?(this.toAssignable(e.value),e):i(a(n.prototype),"toAssignable",this).call(this,e)}},{key:"toAssignableObjectExpressionProp",value:function(e,t){if("get"===e.kind||"set"===e.kind)throw this.raise(e.key.start,I.PatternHasAccessor);if(e.method)throw this.raise(e.key.start,I.PatternHasMethod);i(a(n.prototype),"toAssignableObjectExpressionProp",this).call(this,e,t)}},{key:"finishCallExpression",value:function(e,t){return i(a(n.prototype),"finishCallExpression",this).call(this,e,t),"Import"===e.callee.type&&(e.type="ImportExpression",e.source=e.arguments[0],delete e.arguments,delete e.callee),e}},{key:"toReferencedArguments",value:function(e){"ImportExpression"!==e.type&&i(a(n.prototype),"toReferencedArguments",this).call(this,e)}},{key:"parseExport",value:function(e){switch(i(a(n.prototype),"parseExport",this).call(this,e),e.type){case"ExportAllDeclaration":e.exported=null;break;case"ExportNamedDeclaration":1===e.specifiers.length&&"ExportNamespaceSpecifier"===e.specifiers[0].type&&(e.type="ExportAllDeclaration",e.exported=e.specifiers[0].exported,delete e.specifiers)}return e}},{key:"parseSubscript",value:function(e,t,r,o,s){var u=i(a(n.prototype),"parseSubscript",this).call(this,e,t,r,o,s);if(s.optionalChainMember){if("OptionalMemberExpression"!==u.type&&"OptionalCallExpression"!==u.type||(u.type=u.type.substring(8)),s.stop){var c=this.startNodeAtNode(u);return c.expression=u,this.finishNode(c,"ChainExpression")}}else"MemberExpression"!==u.type&&"CallExpression"!==u.type||(u.optional=!1);return u}}]),n}(e)},jsx:function(e){return function(e){o(n,e);var t=s(n);function n(){return p(this,n),t.apply(this,arguments)}return f(n,[{key:"jsxReadToken",value:function(){for(var e="",t=this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,de.UnterminatedJsxContent);var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(y.jsxTagStart)):i(a(n.prototype),"getTokenFromCode",this).call(this,r):(e+=this.input.slice(t,this.state.pos),this.finishToken(y.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:k(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}},{key:"jsxReadNewLine",value:function(e){var t,n=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===n&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(n),++this.state.curLine,this.state.lineStart=this.state.pos,t}},{key:"jsxReadString",value:function(e){for(var t="",n=++this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,I.UnterminatedString);var r=this.input.charCodeAt(this.state.pos);if(r===e)break;38===r?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadEntity(),n=this.state.pos):k(r)?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadNewLine(!1),n=this.state.pos):++this.state.pos}return t+=this.input.slice(n,this.state.pos++),this.finishToken(y.string,t)}},{key:"jsxReadEntity",value:function(){for(var e,t="",n=0,r=this.input[this.state.pos],i=++this.state.pos;this.state.pos1&&void 0!==arguments[1]&&arguments[1];if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:9,e.id.start),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.implements=[],e.mixins=[],this.eat(y._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(y.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(y.comma))}if(this.isContextual("implements")){this.next();do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(y.comma))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}},{key:"flowParseInterfaceExtends",value:function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}},{key:"flowParseInterface",value:function(e){return this.flowParseInterfaceish(e),this.finishNode(e,"InterfaceDeclaration")}},{key:"checkNotUnderscore",value:function(e){"_"===e&&this.raise(this.state.start,re.UnexpectedReservedUnderscore)}},{key:"checkReservedType",value:function(e,t,n){ne.has(e)&&this.raise(t,n?re.AssignReservedType:re.UnexpectedReservedType,e)}},{key:"flowParseRestrictedIdentifier",value:function(e,t){return this.checkReservedType(this.state.value,this.state.start,t),this.parseIdentifier(e)}},{key:"flowParseTypeAlias",value:function(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,9,e.id.start),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(y.eq),this.semicolon(),this.finishNode(e,"TypeAlias")}},{key:"flowParseOpaqueType",value:function(e,t){return this.expectContextual("type"),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,9,e.id.start),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(y.colon)&&(e.supertype=this.flowParseTypeInitialiser(y.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(y.eq)),this.semicolon(),this.finishNode(e,"OpaqueType")}},{key:"flowParseTypeParameter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.state.start,n=this.startNode(),r=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return n.name=i.name,n.variance=r,n.bound=i.typeAnnotation,this.match(y.eq)?(this.eat(y.eq),n.default=this.flowParseType()):e&&this.raise(t,re.MissingTypeParamDefault),this.finishNode(n,"TypeParameter")}},{key:"flowParseTypeParameterDeclaration",value:function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(y.jsxTagStart)?this.next():this.unexpected();var n=!1;do{var r=this.flowParseTypeParameter(n);t.params.push(r),r.default&&(n=!0),this.isRelational(">")||this.expect(y.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}},{key:"flowParseTypeParameterInstantiation",value:function(){var e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expectRelational("<");var n=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(y.comma);return this.state.noAnonFunctionType=n,this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}},{key:"flowParseTypeParameterInstantiationCallOrNew",value:function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.isRelational(">")||this.expect(y.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}},{key:"flowParseInterfaceType",value:function(){var e=this.startNode();if(this.expectContextual("interface"),e.extends=[],this.eat(y._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(y.comma));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}},{key:"flowParseObjectPropertyKey",value:function(){return this.match(y.num)||this.match(y.string)?this.parseExprAtom():this.parseIdentifier(!0)}},{key:"flowParseObjectTypeIndexer",value:function(e,t,n){return e.static=t,this.lookahead().type===y.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(y.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=n,this.finishNode(e,"ObjectTypeIndexer")}},{key:"flowParseObjectTypeInternalSlot",value:function(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(y.bracketR),this.expect(y.bracketR),this.isRelational("<")||this.match(y.parenL)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start))):(e.method=!1,this.eat(y.question)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}},{key:"flowParseObjectTypeMethodish",value:function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(y.parenL);!this.match(y.parenR)&&!this.match(y.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(y.parenR)||this.expect(y.comma);return this.eat(y.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(y.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}},{key:"flowParseObjectTypeCallProperty",value:function(e,t){var n=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(n),this.finishNode(e,"ObjectTypeCallProperty")}},{key:"flowParseObjectType",value:function(e){var t=e.allowStatic,n=e.allowExact,r=e.allowSpread,i=e.allowProto,a=e.allowInexact,o=this.state.inType;this.state.inType=!0;var s,u,c=this.startNode();c.callProperties=[],c.properties=[],c.indexers=[],c.internalSlots=[];var l=!1;for(n&&this.match(y.braceBarL)?(this.expect(y.braceBarL),s=y.braceBarR,u=!0):(this.expect(y.braceL),s=y.braceR,u=!1),c.exact=u;!this.match(s);){var d=!1,p=null,f=null,h=this.startNode();if(i&&this.isContextual("proto")){var g=this.lookahead();g.type!==y.colon&&g.type!==y.question&&(this.next(),p=this.state.start,t=!1)}if(t&&this.isContextual("static")){var m=this.lookahead();m.type!==y.colon&&m.type!==y.question&&(this.next(),d=!0)}var _=this.flowParseVariance();if(this.eat(y.bracketL))null!=p&&this.unexpected(p),this.eat(y.bracketL)?(_&&this.unexpected(_.start),c.internalSlots.push(this.flowParseObjectTypeInternalSlot(h,d))):c.indexers.push(this.flowParseObjectTypeIndexer(h,d,_));else if(this.match(y.parenL)||this.isRelational("<"))null!=p&&this.unexpected(p),_&&this.unexpected(_.start),c.callProperties.push(this.flowParseObjectTypeCallProperty(h,d));else{var v="init";if(this.isContextual("get")||this.isContextual("set")){var b=this.lookahead();b.type!==y.name&&b.type!==y.string&&b.type!==y.num||(v=this.state.value,this.next())}var D=this.flowParseObjectTypeProperty(h,d,p,_,v,r,null!=a?a:!u);null===D?(l=!0,f=this.state.lastTokStart):c.properties.push(D)}this.flowObjectTypeSemicolon(),!f||this.match(y.braceR)||this.match(y.braceBarR)||this.raise(f,re.UnexpectedExplicitInexactInObject)}this.expect(s),r&&(c.inexact=l);var E=this.finishNode(c,"ObjectTypeAnnotation");return this.state.inType=o,E}},{key:"flowParseObjectTypeProperty",value:function(e,t,n,r,i,a,o){if(this.eat(y.ellipsis))return this.match(y.comma)||this.match(y.semi)||this.match(y.braceR)||this.match(y.braceBarR)?(a?o||this.raise(this.state.lastTokStart,re.InexactInsideExact):this.raise(this.state.lastTokStart,re.InexactInsideNonObject),r&&this.raise(r.start,re.InexactVariance),null):(a||this.raise(this.state.lastTokStart,re.UnexpectedSpreadType),null!=n&&this.unexpected(n),r&&this.raise(r.start,re.SpreadVariance),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=n,e.kind=i;var s=!1;return this.isRelational("<")||this.match(y.parenL)?(e.method=!0,null!=n&&this.unexpected(n),r&&this.unexpected(r.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start)),"get"!==i&&"set"!==i||this.flowCheckGetterSetterParams(e)):("init"!==i&&this.unexpected(),e.method=!1,this.eat(y.question)&&(s=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=s,this.finishNode(e,"ObjectTypeProperty")}},{key:"flowCheckGetterSetterParams",value:function(e){var t="get"===e.kind?0:1,n=e.start;e.value.params.length+(e.value.rest?1:0)!==t&&("get"===e.kind?this.raise(n,I.BadGetterArity):this.raise(n,I.BadSetterArity)),"set"===e.kind&&e.value.rest&&this.raise(n,I.BadSetterRestParameter)}},{key:"flowObjectTypeSemicolon",value:function(){this.eat(y.semi)||this.eat(y.comma)||this.match(y.braceR)||this.match(y.braceBarR)||this.unexpected()}},{key:"flowParseQualifiedTypeIdentifier",value:function(e,t,n){e=e||this.state.start,t=t||this.state.startLoc;for(var r=n||this.flowParseRestrictedIdentifier(!0);this.eat(y.dot);){var i=this.startNodeAt(e,t);i.qualification=r,i.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(i,"QualifiedTypeIdentifier")}return r}},{key:"flowParseGenericType",value:function(e,t,n){var r=this.startNodeAt(e,t);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t,n),this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}},{key:"flowParseTypeofType",value:function(){var e=this.startNode();return this.expect(y._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}},{key:"flowParseTupleType",value:function(){var e=this.startNode();for(e.types=[],this.expect(y.bracketL);this.state.pos0&&void 0!==arguments[0]?arguments[0]:[],t=null;!this.match(y.parenR)&&!this.match(y.ellipsis);)e.push(this.flowParseFunctionTypeParam()),this.match(y.parenR)||this.expect(y.comma);return this.eat(y.ellipsis)&&(t=this.flowParseFunctionTypeParam()),{params:e,rest:t}}},{key:"flowIdentToTypeAnnotation",value:function(e,t,n,r){switch(r.name){case"any":return this.finishNode(n,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(n,"BooleanTypeAnnotation");case"mixed":return this.finishNode(n,"MixedTypeAnnotation");case"empty":return this.finishNode(n,"EmptyTypeAnnotation");case"number":return this.finishNode(n,"NumberTypeAnnotation");case"string":return this.finishNode(n,"StringTypeAnnotation");case"symbol":return this.finishNode(n,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(e,t,r)}}},{key:"flowParsePrimaryType",value:function(){var e,t,r=this.state.start,o=this.state.startLoc,s=this.startNode(),u=!1,c=this.state.noAnonFunctionType;switch(this.state.type){case y.name:return this.isContextual("interface")?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,o,s,this.parseIdentifier());case y.braceL:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case y.braceBarL:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case y.bracketL:return this.state.noAnonFunctionType=!1,t=this.flowParseTupleType(),this.state.noAnonFunctionType=c,t;case y.relational:if("<"===this.state.value)return s.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(y.parenL),e=this.flowParseFunctionTypeParams(),s.params=e.params,s.rest=e.rest,this.expect(y.parenR),this.expect(y.arrow),s.returnType=this.flowParseType(),this.finishNode(s,"FunctionTypeAnnotation");break;case y.parenL:if(this.next(),!this.match(y.parenR)&&!this.match(y.ellipsis))if(this.match(y.name)){var l=this.lookahead().type;u=l!==y.question&&l!==y.colon}else u=!0;if(u){if(this.state.noAnonFunctionType=!1,t=this.flowParseType(),this.state.noAnonFunctionType=c,this.state.noAnonFunctionType||!(this.match(y.comma)||this.match(y.parenR)&&this.lookahead().type===y.arrow))return this.expect(y.parenR),t;this.eat(y.comma)}return e=t?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(t)]):this.flowParseFunctionTypeParams(),s.params=e.params,s.rest=e.rest,this.expect(y.parenR),this.expect(y.arrow),s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation");case y.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case y._true:case y._false:return s.value=this.match(y._true),this.next(),this.finishNode(s,"BooleanLiteralTypeAnnotation");case y.plusMin:if("-"===this.state.value){if(this.next(),this.match(y.num))return this.parseLiteral(-this.state.value,"NumberLiteralTypeAnnotation",s.start,s.loc.start);if(this.match(y.bigint))return this.parseLiteral(-this.state.value,"BigIntLiteralTypeAnnotation",s.start,s.loc.start);throw this.raise(this.state.start,re.UnexpectedSubtractionOperand)}throw this.unexpected();case y.num:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case y.bigint:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case y._void:return this.next(),this.finishNode(s,"VoidTypeAnnotation");case y._null:return this.next(),this.finishNode(s,"NullLiteralTypeAnnotation");case y._this:return this.next(),this.finishNode(s,"ThisTypeAnnotation");case y.star:return this.next(),this.finishNode(s,"ExistsTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType();if(this.state.type.keyword){var d=this.state.type.label;return this.next(),i(a(n.prototype),"createIdentifier",this).call(this,s,d)}}throw this.unexpected()}},{key:"flowParsePostfixType",value:function(){for(var e=this.state.start,t=this.state.startLoc,n=this.flowParsePrimaryType();this.match(y.bracketL)&&!this.canInsertSemicolon();){var r=this.startNodeAt(e,t);r.elementType=n,this.expect(y.bracketL),this.expect(y.bracketR),n=this.finishNode(r,"ArrayTypeAnnotation")}return n}},{key:"flowParsePrefixType",value:function(){var e=this.startNode();return this.eat(y.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}},{key:"flowParseAnonFunctionWithoutParens",value:function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(y.arrow)){var t=this.startNodeAt(e.start,e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}},{key:"flowParseIntersectionType",value:function(){var e=this.startNode();this.eat(y.bitwiseAND);var t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(y.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")}},{key:"flowParseUnionType",value:function(){var e=this.startNode();this.eat(y.bitwiseOR);var t=this.flowParseIntersectionType();for(e.types=[t];this.eat(y.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")}},{key:"flowParseType",value:function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,this.state.exprAllowed=this.state.exprAllowed||this.state.noAnonFunctionType,t}},{key:"flowParseTypeOrImplicitInstantiation",value:function(){if(this.state.type===y.name&&"_"===this.state.value){var e=this.state.start,t=this.state.startLoc,n=this.parseIdentifier();return this.flowParseGenericType(e,t,n)}return this.flowParseType()}},{key:"flowParseTypeAnnotation",value:function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}},{key:"flowParseTypeAnnotatableIdentifier",value:function(e){var t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(y.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}},{key:"typeCastToParameter",value:function(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.end,e.typeAnnotation.loc.end),e.expression}},{key:"flowParseVariance",value:function(){var e=null;return this.match(y.plusMin)&&(e=this.startNode(),"+"===this.state.value?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")),e}},{key:"parseFunctionBody",value:function(e,t){var r=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t?this.forwardNoArrowParamsConversionAt(e,(function(){return i(a(n.prototype),"parseFunctionBody",r).call(r,e,!0,o)})):i(a(n.prototype),"parseFunctionBody",this).call(this,e,!1,o)}},{key:"parseFunctionBodyAndFinish",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.match(y.colon)){var o,s,u=this.startNode();o=this.flowParseTypeAndPredicateInitialiser(),s=l(o,2),u.typeAnnotation=s[0],e.predicate=s[1],e.returnType=u.typeAnnotation?this.finishNode(u,"TypeAnnotation"):null}i(a(n.prototype),"parseFunctionBodyAndFinish",this).call(this,e,t,r)}},{key:"parseStatement",value:function(e,t){if(this.state.strict&&this.match(y.name)&&"interface"===this.state.value){var r=this.lookahead();if(r.type===y.name||ee(r.value)){var o=this.startNode();return this.next(),this.flowParseInterface(o)}}else if(this.shouldParseEnums()&&this.isContextual("enum")){var s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}var u=i(a(n.prototype),"parseStatement",this).call(this,e,t);return void 0!==this.flowPragma||this.isValidDirective(u)||(this.flowPragma=null),u}},{key:"parseExpressionStatement",value:function(e,t){if("Identifier"===t.type)if("declare"===t.name){if(this.match(y._class)||this.match(y.name)||this.match(y._function)||this.match(y._var)||this.match(y._export))return this.flowParseDeclare(e)}else if(this.match(y.name)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return i(a(n.prototype),"parseExpressionStatement",this).call(this,e,t)}},{key:"shouldParseExportDeclaration",value:function(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||this.shouldParseEnums()&&this.isContextual("enum")||i(a(n.prototype),"shouldParseExportDeclaration",this).call(this)}},{key:"isExportDefaultSpecifier",value:function(){return(!this.match(y.name)||!("type"===this.state.value||"interface"===this.state.value||"opaque"===this.state.value||this.shouldParseEnums()&&"enum"===this.state.value))&&i(a(n.prototype),"isExportDefaultSpecifier",this).call(this)}},{key:"parseExportDefaultExpression",value:function(){if(this.shouldParseEnums()&&this.isContextual("enum")){var e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return i(a(n.prototype),"parseExportDefaultExpression",this).call(this)}},{key:"parseConditional",value:function(e,t,r,o){var s=this;if(!this.match(y.question))return e;if(o){var u=this.tryParse((function(){return i(a(n.prototype),"parseConditional",s).call(s,e,t,r)}));return u.node?(u.error&&(this.state=u.failState),u.node):(o.start=u.error.pos||this.state.start,e)}this.expect(y.question);var c=this.state.clone(),p=this.state.noArrowAt,f=this.startNodeAt(t,r),h=this.tryParseConditionalConsequent(),g=h.consequent,m=h.failed,_=this.getArrowLikeExpressions(g),v=l(_,2),b=v[0],D=v[1];if(m||D.length>0){var E,C=d(p);if(D.length>0){var S,x,k;this.state=c,this.state.noArrowAt=C;for(var T=0;T1&&this.raise(c.start,re.AmbiguousConditionalArrow),m&&1===b.length&&(this.state=c,this.state.noArrowAt=C.concat(b[0].start),g=(E=this.tryParseConditionalConsequent()).consequent,m=E.failed)}return this.getArrowLikeExpressions(g,!0),this.state.noArrowAt=p,this.expect(y.colon),f.test=e,f.consequent=g,f.alternate=this.forwardNoArrowParamsConversionAt(f,(function(){return s.parseMaybeAssign(void 0,void 0,void 0)})),this.finishNode(f,"ConditionalExpression")}},{key:"tryParseConditionalConsequent",value:function(){this.state.noArrowParamsConversionAt.push(this.state.start);var e=this.parseMaybeAssignAllowIn(),t=!this.match(y.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}},{key:"getArrowLikeExpressions",value:function(e,t){for(var n=this,r=[e],i=[];0!==r.length;){var a=r.pop();"ArrowFunctionExpression"===a.type?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):i.push(a),r.push(a.body)):"ConditionalExpression"===a.type&&(r.push(a.consequent),r.push(a.alternate))}return t?(i.forEach((function(e){return n.finishArrowValidation(e)})),[i,[]]):function(e,t){for(var n=[],r=[],i=0;i1||!t)&&this.raise(i.typeAnnotation.start,re.TypeCastInPattern)}return e}},{key:"parseArrayLike",value:function(e,t,r,o){var s=i(a(n.prototype),"parseArrayLike",this).call(this,e,t,r,o);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(s.elements),s}},{key:"checkLVal",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;if("TypeCastExpression"!==e.type)return i(a(n.prototype),"checkLVal",this).call(this,e,t,r,o)}},{key:"parseClassProperty",value:function(e){return this.match(y.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),i(a(n.prototype),"parseClassProperty",this).call(this,e)}},{key:"parseClassPrivateProperty",value:function(e){return this.match(y.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),i(a(n.prototype),"parseClassPrivateProperty",this).call(this,e)}},{key:"isClassMethod",value:function(){return this.isRelational("<")||i(a(n.prototype),"isClassMethod",this).call(this)}},{key:"isClassProperty",value:function(){return this.match(y.colon)||i(a(n.prototype),"isClassProperty",this).call(this)}},{key:"isNonstaticConstructor",value:function(e){return!this.match(y.colon)&&i(a(n.prototype),"isNonstaticConstructor",this).call(this,e)}},{key:"pushClassMethod",value:function(e,t,r,o,s,u){t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),i(a(n.prototype),"pushClassMethod",this).call(this,e,t,r,o,s,u)}},{key:"pushClassPrivateMethod",value:function(e,t,r,o){t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),i(a(n.prototype),"pushClassPrivateMethod",this).call(this,e,t,r,o)}},{key:"parseClassSuper",value:function(e){if(i(a(n.prototype),"parseClassSuper",this).call(this,e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var t=e.implements=[];do{var r=this.startNode();r.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,t.push(this.finishNode(r,"ClassImplements"))}while(this.eat(y.comma))}}},{key:"parsePropertyName",value:function(e,t){var r=this.flowParseVariance(),o=i(a(n.prototype),"parsePropertyName",this).call(this,e,t);return e.variance=r,o}},{key:"parseObjPropValue",value:function(e,t,r,o,s,u,c,l){var d;e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&!c&&(d=this.flowParseTypeParameterDeclaration(),this.match(y.parenL)||this.unexpected()),i(a(n.prototype),"parseObjPropValue",this).call(this,e,t,r,o,s,u,c,l),d&&((e.value||e).typeParameters=d)}},{key:"parseAssignableListItemTypes",value:function(e){return this.eat(y.question)&&("Identifier"!==e.type&&this.raise(e.start,re.OptionalBindingPattern),e.optional=!0),this.match(y.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.resetEndLocation(e),e}},{key:"parseMaybeDefault",value:function(e,t,r){var o=i(a(n.prototype),"parseMaybeDefault",this).call(this,e,t,r);return"AssignmentPattern"===o.type&&o.typeAnnotation&&o.right.starte.length){for(var i=0;i=d){for(var p=0,f=o.defaultedMembers;p=d){for(var g=0,m=o.defaultedMembers;g")}throw new Error("Unreachable")}},{key:"tsParseList",value:function(e,t){for(var n=[];!this.tsIsListTerminator(e);)n.push(t());return n}},{key:"tsParseDelimitedList",value:function(e,t){return be(this.tsParseDelimitedListWorker(e,t,!0))}},{key:"tsParseDelimitedListWorker",value:function(e,t,n){for(var r=[];!this.tsIsListTerminator(e);){var i=t();if(null==i)return;if(r.push(i),!this.eat(y.comma)){if(this.tsIsListTerminator(e))break;return void(n&&this.expect(y.comma))}}return r}},{key:"tsParseBracketedList",value:function(e,t,n,r){r||(n?this.expect(y.bracketL):this.expectRelational("<"));var i=this.tsParseDelimitedList(e,t);return n?this.expect(y.bracketR):this.expectRelational(">"),i}},{key:"tsParseImportType",value:function(){var e=this.startNode();return this.expect(y._import),this.expect(y.parenL),this.match(y.string)||this.raise(this.state.start,Ee.UnsupportedImportTypeArgument),e.argument=this.parseExprAtom(),this.expect(y.parenR),this.eat(y.dot)&&(e.qualifier=this.tsParseEntityName(!0)),this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}},{key:"tsParseEntityName",value:function(e){for(var t=this.parseIdentifier();this.eat(y.dot);){var n=this.startNodeAtNode(t);n.left=t,n.right=this.parseIdentifier(e),t=this.finishNode(n,"TSQualifiedName")}return t}},{key:"tsParseTypeReference",value:function(){var e=this.startNode();return e.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}},{key:"tsParseThisTypePredicate",value:function(e){this.next();var t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(t,"TSTypePredicate")}},{key:"tsParseThisTypeNode",value:function(){var e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}},{key:"tsParseTypeQuery",value:function(){var e=this.startNode();return this.expect(y._typeof),this.match(y._import)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(!0),this.finishNode(e,"TSTypeQuery")}},{key:"tsParseTypeParameter",value:function(){var e=this.startNode();return e.name=this.parseIdentifierName(e.start),e.constraint=this.tsEatThenParseType(y._extends),e.default=this.tsEatThenParseType(y.eq),this.finishNode(e,"TSTypeParameter")}},{key:"tsTryParseTypeParameters",value:function(){if(this.isRelational("<"))return this.tsParseTypeParameters()}},{key:"tsParseTypeParameters",value:function(){var e=this.startNode();return this.isRelational("<")||this.match(y.jsxTagStart)?this.next():this.unexpected(),e.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),0===e.params.length&&this.raise(e.start,Ee.EmptyTypeParameters),this.finishNode(e,"TSTypeParameterDeclaration")}},{key:"tsTryNextParseConstantContext",value:function(){return this.lookahead().type===y._const?(this.next(),this.tsParseTypeReference()):null}},{key:"tsFillSignature",value:function(e,t){var n=e===y.arrow;t.typeParameters=this.tsTryParseTypeParameters(),this.expect(y.parenL),t.parameters=this.tsParseBindingListForSignature(),(n||this.match(e))&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))}},{key:"tsParseBindingListForSignature",value:function(){var e=this;return this.parseBindingList(y.parenR,41).map((function(t){return"Identifier"!==t.type&&"RestElement"!==t.type&&"ObjectPattern"!==t.type&&"ArrayPattern"!==t.type&&e.raise(t.start,Ee.UnsupportedSignatureParameterKind,t.type),t}))}},{key:"tsParseTypeMemberSemicolon",value:function(){this.eat(y.comma)||this.semicolon()}},{key:"tsParseSignatureMember",value:function(e,t){return this.tsFillSignature(y.colon,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}},{key:"tsIsUnambiguouslyIndexSignature",value:function(){return this.next(),this.eat(y.name)&&this.match(y.colon)}},{key:"tsTryParseIndexSignature",value:function(e){if(this.match(y.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))){this.expect(y.bracketL);var t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(y.bracketR),e.parameters=[t];var n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}}},{key:"tsParsePropertyOrMethodSignature",value:function(e,t){this.eat(y.question)&&(e.optional=!0);var n=e;if(t||!this.match(y.parenL)&&!this.isRelational("<")){var r=n;t&&(r.readonly=!0);var i=this.tsTryParseTypeAnnotation();return i&&(r.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSPropertySignature")}var a=n;return this.tsFillSignature(y.colon,a),this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSMethodSignature")}},{key:"tsParseTypeMember",value:function(){var e=this.startNode();if(this.match(y.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(y._new)){var t=this.startNode();return this.next(),this.match(y.parenL)||this.isRelational("<")?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}var n=!!this.tsParseModifier(["readonly"]),r=this.tsTryParseIndexSignature(e);return r?(n&&(e.readonly=!0),r):(this.parsePropertyName(e,!1),this.tsParsePropertyOrMethodSignature(e,n))}},{key:"tsParseTypeLiteral",value:function(){var e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}},{key:"tsParseObjectTypeMembers",value:function(){this.expect(y.braceL);var e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(y.braceR),e}},{key:"tsIsStartOfMappedType",value:function(){return this.next(),this.eat(y.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(y.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(y._in))))}},{key:"tsParseMappedTypeParameter",value:function(){var e=this.startNode();return e.name=this.parseIdentifierName(e.start),e.constraint=this.tsExpectThenParseType(y._in),this.finishNode(e,"TSTypeParameter")}},{key:"tsParseMappedType",value:function(){var e=this.startNode();return this.expect(y.braceL),this.match(y.plusMin)?(e.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(e.readonly=!0),this.expect(y.bracketL),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual("as")?this.tsParseType():null,this.expect(y.bracketR),this.match(y.plusMin)?(e.optional=this.state.value,this.next(),this.expect(y.question)):this.eat(y.question)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(y.braceR),this.finishNode(e,"TSMappedType")}},{key:"tsParseTupleType",value:function(){var e=this,t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);var n=!1,r=null;return t.elementTypes.forEach((function(t){var i,a=t.type;!n||"TSRestType"===a||"TSOptionalType"===a||"TSNamedTupleMember"===a&&t.optional||e.raise(t.start,Ee.OptionalTypeBeforeRequired),n=n||"TSNamedTupleMember"===a&&t.optional||"TSOptionalType"===a,"TSRestType"===a&&(a=(t=t.typeAnnotation).type);var o="TSNamedTupleMember"===a;(r=null!=(i=r)?i:o)!==o&&e.raise(t.start,Ee.MixedLabeledAndUnlabeledElements)})),this.finishNode(t,"TSTupleType")}},{key:"tsParseTupleElementType",value:function(){var e=this.state,t=e.start,n=e.startLoc,r=this.eat(y.ellipsis),i=this.tsParseType(),a=this.eat(y.question);if(this.eat(y.colon)){var o=this.startNodeAtNode(i);o.optional=a,"TSTypeReference"!==i.type||i.typeParameters||"Identifier"!==i.typeName.type?(this.raise(i.start,Ee.InvalidTupleMemberLabel),o.label=i):o.label=i.typeName,o.elementType=this.tsParseType(),i=this.finishNode(o,"TSNamedTupleMember")}else if(a){var s=this.startNodeAtNode(i);s.typeAnnotation=i,i=this.finishNode(s,"TSOptionalType")}if(r){var u=this.startNodeAt(t,n);u.typeAnnotation=i,i=this.finishNode(u,"TSRestType")}return i}},{key:"tsParseParenthesizedType",value:function(){var e=this.startNode();return this.expect(y.parenL),e.typeAnnotation=this.tsParseType(),this.expect(y.parenR),this.finishNode(e,"TSParenthesizedType")}},{key:"tsParseFunctionOrConstructorType",value:function(e){var t=this.startNode();return"TSConstructorType"===e&&this.expect(y._new),this.tsFillSignature(y.arrow,t),this.finishNode(t,e)}},{key:"tsParseLiteralTypeNode",value:function(){var e=this,t=this.startNode();return t.literal=function(){switch(e.state.type){case y.num:case y.bigint:case y.string:case y._true:case y._false:return e.parseExprAtom();default:throw e.unexpected()}}(),this.finishNode(t,"TSLiteralType")}},{key:"tsParseTemplateLiteralType",value:function(){var e=this.startNode();return e.literal=this.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}},{key:"parseTemplateSubstitution",value:function(){return this.state.inType?this.tsParseType():i(a(n.prototype),"parseTemplateSubstitution",this).call(this)}},{key:"tsParseThisTypeOrThisTypePredicate",value:function(){var e=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}},{key:"tsParseNonArrayType",value:function(){switch(this.state.type){case y.name:case y._void:case y._null:var e=this.match(y._void)?"TSVoidKeyword":this.match(y._null)?"TSNullKeyword":function(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==e&&46!==this.lookaheadCharCode()){var t=this.startNode();return this.next(),this.finishNode(t,e)}return this.tsParseTypeReference();case y.string:case y.num:case y.bigint:case y._true:case y._false:return this.tsParseLiteralTypeNode();case y.plusMin:if("-"===this.state.value){var n=this.startNode(),r=this.lookahead();if(r.type!==y.num&&r.type!==y.bigint)throw this.unexpected();return n.literal=this.parseMaybeUnary(),this.finishNode(n,"TSLiteralType")}break;case y._this:return this.tsParseThisTypeOrThisTypePredicate();case y._typeof:return this.tsParseTypeQuery();case y._import:return this.tsParseImportType();case y.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case y.bracketL:return this.tsParseTupleType();case y.parenL:return this.tsParseParenthesizedType();case y.backQuote:return this.tsParseTemplateLiteralType()}throw this.unexpected()}},{key:"tsParseArrayTypeOrHigher",value:function(){for(var e=this.tsParseNonArrayType();!this.hasPrecedingLineBreak()&&this.eat(y.bracketL);)if(this.match(y.bracketR)){var t=this.startNodeAtNode(e);t.elementType=e,this.expect(y.bracketR),e=this.finishNode(t,"TSArrayType")}else{var n=this.startNodeAtNode(e);n.objectType=e,n.indexType=this.tsParseType(),this.expect(y.bracketR),e=this.finishNode(n,"TSIndexedAccessType")}return e}},{key:"tsParseTypeOperator",value:function(e){var t=this.startNode();return this.expectContextual(e),t.operator=e,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===e&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}},{key:"tsCheckTypeAnnotationForReadOnly",value:function(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(e.start,Ee.UnexpectedReadonly)}}},{key:"tsParseInferType",value:function(){var e=this.startNode();this.expectContextual("infer");var t=this.startNode();return t.name=this.parseIdentifierName(t.start),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}},{key:"tsParseTypeOperatorOrHigher",value:function(){var e=this,t=["keyof","unique","readonly"].find((function(t){return e.isContextual(t)}));return t?this.tsParseTypeOperator(t):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()}},{key:"tsParseUnionOrIntersectionType",value:function(e,t,n){this.eat(n);var r=t();if(this.match(n)){for(var i=[r];this.eat(n);)i.push(t());var a=this.startNodeAtNode(r);a.types=i,r=this.finishNode(a,e)}return r}},{key:"tsParseIntersectionTypeOrHigher",value:function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),y.bitwiseAND)}},{key:"tsParseUnionTypeOrHigher",value:function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),y.bitwiseOR)}},{key:"tsIsStartOfFunctionType",value:function(){return!!this.isRelational("<")||this.match(y.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}},{key:"tsSkipParameterStart",value:function(){if(this.match(y.name)||this.match(y._this))return this.next(),!0;if(this.match(y.braceL)){var e=1;for(this.next();e>0;)this.match(y.braceL)?++e:this.match(y.braceR)&&--e,this.next();return!0}if(this.match(y.bracketL)){var t=1;for(this.next();t>0;)this.match(y.bracketL)?++t:this.match(y.bracketR)&&--t,this.next();return!0}return!1}},{key:"tsIsUnambiguouslyStartOfFunctionType",value:function(){if(this.next(),this.match(y.parenR)||this.match(y.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(y.colon)||this.match(y.comma)||this.match(y.question)||this.match(y.eq))return!0;if(this.match(y.parenR)&&(this.next(),this.match(y.arrow)))return!0}return!1}},{key:"tsParseTypeOrTypePredicateAnnotation",value:function(e){var t=this;return this.tsInType((function(){var n=t.startNode();t.expect(e);var r=!!t.tsTryParse(t.tsParseTypePredicateAsserts.bind(t));if(r&&t.match(y._this)){var i=t.tsParseThisTypeOrThisTypePredicate();if("TSThisType"===i.type){var a=t.startNodeAtNode(n);a.parameterName=i,a.asserts=!0,i=t.finishNode(a,"TSTypePredicate")}else i.asserts=!0;return n.typeAnnotation=i,t.finishNode(n,"TSTypeAnnotation")}var o=t.tsIsIdentifier()&&t.tsTryParse(t.tsParseTypePredicatePrefix.bind(t));if(!o){if(!r)return t.tsParseTypeAnnotation(!1,n);var s=t.startNodeAtNode(n);return s.parameterName=t.parseIdentifier(),s.asserts=r,n.typeAnnotation=t.finishNode(s,"TSTypePredicate"),t.finishNode(n,"TSTypeAnnotation")}var u=t.tsParseTypeAnnotation(!1),c=t.startNodeAtNode(n);return c.parameterName=o,c.typeAnnotation=u,c.asserts=r,n.typeAnnotation=t.finishNode(c,"TSTypePredicate"),t.finishNode(n,"TSTypeAnnotation")}))}},{key:"tsTryParseTypeOrTypePredicateAnnotation",value:function(){return this.match(y.colon)?this.tsParseTypeOrTypePredicateAnnotation(y.colon):void 0}},{key:"tsTryParseTypeAnnotation",value:function(){return this.match(y.colon)?this.tsParseTypeAnnotation():void 0}},{key:"tsTryParseType",value:function(){return this.tsEatThenParseType(y.colon)}},{key:"tsParseTypePredicatePrefix",value:function(){var e=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),e}},{key:"tsParseTypePredicateAsserts",value:function(){if(!this.match(y.name)||"asserts"!==this.state.value||this.hasPrecedingLineBreak())return!1;var e=this.state.containsEsc;return this.next(),!(!this.match(y.name)&&!this.match(y._this))&&(e&&this.raise(this.state.lastTokStart,I.InvalidEscapedReservedWord,"asserts"),!0)}},{key:"tsParseTypeAnnotation",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.startNode();return this.tsInType((function(){t&&e.expect(y.colon),n.typeAnnotation=e.tsParseType()})),this.finishNode(n,"TSTypeAnnotation")}},{key:"tsParseType",value:function(){De(this.state.inType);var e=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(y._extends))return e;var t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsParseNonConditionalType(),this.expect(y.question),t.trueType=this.tsParseType(),this.expect(y.colon),t.falseType=this.tsParseType(),this.finishNode(t,"TSConditionalType")}},{key:"tsParseNonConditionalType",value:function(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(y._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()}},{key:"tsParseTypeAssertion",value:function(){var e=this.startNode(),t=this.tsTryNextParseConstantContext();return e.typeAnnotation=t||this.tsNextThenParseType(),this.expectRelational(">"),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}},{key:"tsParseHeritageClause",value:function(e){var t=this.state.start,n=this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this));return n.length||this.raise(t,Ee.EmptyHeritageClauseType,e),n}},{key:"tsParseExpressionWithTypeArguments",value:function(){var e=this.startNode();return e.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}},{key:"tsParseInterfaceDeclaration",value:function(e){e.id=this.parseIdentifier(),this.checkLVal(e.id,130,void 0,"typescript interface declaration"),e.typeParameters=this.tsTryParseTypeParameters(),this.eat(y._extends)&&(e.extends=this.tsParseHeritageClause("extends"));var t=this.startNode();return t.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(t,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}},{key:"tsParseTypeAliasDeclaration",value:function(e){var t=this;return e.id=this.parseIdentifier(),this.checkLVal(e.id,2,void 0,"typescript type alias"),e.typeParameters=this.tsTryParseTypeParameters(),e.typeAnnotation=this.tsInType((function(){if(t.expect(y.eq),t.isContextual("intrinsic")&&t.lookahead().type!==y.dot){var e=t.startNode();return t.next(),t.finishNode(e,"TSIntrinsicKeyword")}return t.tsParseType()})),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}},{key:"tsInNoContext",value:function(e){var t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}},{key:"tsInType",value:function(e){var t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}},{key:"tsEatThenParseType",value:function(e){return this.match(e)?this.tsNextThenParseType():void 0}},{key:"tsExpectThenParseType",value:function(e){var t=this;return this.tsDoThenParseType((function(){return t.expect(e)}))}},{key:"tsNextThenParseType",value:function(){var e=this;return this.tsDoThenParseType((function(){return e.next()}))}},{key:"tsDoThenParseType",value:function(e){var t=this;return this.tsInType((function(){return e(),t.tsParseType()}))}},{key:"tsParseEnumMember",value:function(){var e=this.startNode();return e.id=this.match(y.string)?this.parseExprAtom():this.parseIdentifier(!0),this.eat(y.eq)&&(e.initializer=this.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}},{key:"tsParseEnumDeclaration",value:function(e,t){return t&&(e.const=!0),e.id=this.parseIdentifier(),this.checkLVal(e.id,t?779:267,void 0,"typescript enum declaration"),this.expect(y.braceL),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(y.braceR),this.finishNode(e,"TSEnumDeclaration")}},{key:"tsParseModuleBlock",value:function(){var e=this.startNode();return this.scope.enter(0),this.expect(y.braceL),this.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,y.braceR),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}},{key:"tsParseModuleOrNamespaceDeclaration",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.id=this.parseIdentifier(),t||this.checkLVal(e.id,1024,null,"module or namespace declaration"),this.eat(y.dot)){var n=this.startNode();this.tsParseModuleOrNamespaceDeclaration(n,!0),e.body=n}else this.scope.enter(b),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}},{key:"tsParseAmbientExternalModuleDeclaration",value:function(e){return this.isContextual("global")?(e.global=!0,e.id=this.parseIdentifier()):this.match(y.string)?e.id=this.parseExprAtom():this.unexpected(),this.match(y.braceL)?(this.scope.enter(b),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}},{key:"tsParseImportEqualsDeclaration",value:function(e,t){return e.isExport=t||!1,e.id=this.parseIdentifier(),this.checkLVal(e.id,9,void 0,"import equals declaration"),this.expect(y.eq),e.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}},{key:"tsIsExternalModuleReference",value:function(){return this.isContextual("require")&&40===this.lookaheadCharCode()}},{key:"tsParseModuleReference",value:function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}},{key:"tsParseExternalModuleReference",value:function(){var e=this.startNode();if(this.expectContextual("require"),this.expect(y.parenL),!this.match(y.string))throw this.unexpected();return e.expression=this.parseExprAtom(),this.expect(y.parenR),this.finishNode(e,"TSExternalModuleReference")}},{key:"tsLookAhead",value:function(e){var t=this.state.clone(),n=e();return this.state=t,n}},{key:"tsTryParseAndCatch",value:function(e){var t=this.tryParse((function(t){return e()||t()}));if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}},{key:"tsTryParse",value:function(e){var t=this.state.clone(),n=e();return void 0!==n&&!1!==n?n:void(this.state=t)}},{key:"tsTryParseDeclare",value:function(e){var t=this;if(!this.isLineTerminator()){var n,r=this.state.type;return this.isContextual("let")&&(r=y._var,n="let"),this.tsInDeclareContext((function(){switch(r){case y._function:return e.declare=!0,t.parseFunctionStatement(e,!1,!0);case y._class:return e.declare=!0,t.parseClass(e,!0,!1);case y._const:if(t.match(y._const)&&t.isLookaheadContextual("enum"))return t.expect(y._const),t.expectContextual("enum"),t.tsParseEnumDeclaration(e,!0);case y._var:return n=n||t.state.value,t.parseVarStatement(e,n);case y.name:var i=t.state.value;return"global"===i?t.tsParseAmbientExternalModuleDeclaration(e):t.tsParseDeclaration(e,i,!0)}}))}}},{key:"tsTryParseExportDeclaration",value:function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)}},{key:"tsParseExpressionStatement",value:function(e,t){switch(t.name){case"declare":var n=this.tsTryParseDeclare(e);if(n)return n.declare=!0,n;break;case"global":if(this.match(y.braceL)){this.scope.enter(b),this.prodParam.enter(0);var r=e;return r.global=!0,r.id=t,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1)}}},{key:"tsParseDeclaration",value:function(e,t,n){switch(t){case"abstract":if(this.tsCheckLineTerminatorAndMatch(y._class,n)){var r=e;return r.abstract=!0,n&&(this.next(),this.match(y._class)||this.unexpected(null,y._class)),this.parseClass(r,!0,!1)}break;case"enum":if(n||this.match(y.name))return n&&this.next(),this.tsParseEnumDeclaration(e,!1);break;case"interface":if(this.tsCheckLineTerminatorAndMatch(y.name,n))return n&&this.next(),this.tsParseInterfaceDeclaration(e);break;case"module":if(n&&this.next(),this.match(y.string))return this.tsParseAmbientExternalModuleDeclaration(e);if(this.tsCheckLineTerminatorAndMatch(y.name,n))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"namespace":if(this.tsCheckLineTerminatorAndMatch(y.name,n))return n&&this.next(),this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminatorAndMatch(y.name,n))return n&&this.next(),this.tsParseTypeAliasDeclaration(e)}}},{key:"tsCheckLineTerminatorAndMatch",value:function(e,t){return(t||this.match(e))&&!this.isLineTerminator()}},{key:"tsTryParseGenericAsyncArrowFunction",value:function(e,t){var r=this;if(this.isRelational("<")){var o=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;var s=this.tsTryParseAndCatch((function(){var o=r.startNodeAt(e,t);return o.typeParameters=r.tsParseTypeParameters(),i(a(n.prototype),"parseFunctionParams",r).call(r,o),o.returnType=r.tsTryParseTypeOrTypePredicateAnnotation(),r.expect(y.arrow),o}));return this.state.maybeInArrowParameters=o,s?this.parseArrowExpression(s,null,!0):void 0}}},{key:"tsParseTypeArguments",value:function(){var e=this,t=this.startNode();return t.params=this.tsInType((function(){return e.tsInNoContext((function(){return e.expectRelational("<"),e.tsParseDelimitedList("TypeParametersOrArguments",e.tsParseType.bind(e))}))})),0===t.params.length&&this.raise(t.start,Ee.EmptyTypeArguments),this.state.exprAllowed=!1,this.expectRelational(">"),this.finishNode(t,"TSTypeParameterInstantiation")}},{key:"tsIsDeclarationStart",value:function(){if(this.match(y.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1}},{key:"isExportDefaultSpecifier",value:function(){return!this.tsIsDeclarationStart()&&i(a(n.prototype),"isExportDefaultSpecifier",this).call(this)}},{key:"parseAssignableListItem",value:function(e,t){var n,r=this.state.start,i=this.state.startLoc,a=!1;void 0!==e&&(n=this.parseAccessModifier(),a=!!this.tsParseModifier(["readonly"]),!1===e&&(n||a)&&this.raise(r,Ee.UnexpectedParameterModifier));var o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o);var s=this.parseMaybeDefault(o.start,o.loc.start,o);if(n||a){var u=this.startNodeAt(r,i);return t.length&&(u.decorators=t),n&&(u.accessibility=n),a&&(u.readonly=a),"Identifier"!==s.type&&"AssignmentPattern"!==s.type&&this.raise(u.start,Ee.UnsupportedParameterPropertyKind),u.parameter=s,this.finishNode(u,"TSParameterProperty")}return t.length&&(o.decorators=t),s}},{key:"parseFunctionBodyAndFinish",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.match(y.colon)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(y.colon));var o="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t?"TSDeclareMethod":void 0;o&&!this.match(y.braceL)&&this.isLineTerminator()?this.finishNode(e,o):"TSDeclareFunction"===o&&this.state.isDeclareContext&&(this.raise(e.start,Ee.DeclareFunctionHasImplementation),e.declare)?i(a(n.prototype),"parseFunctionBodyAndFinish",this).call(this,e,o,r):i(a(n.prototype),"parseFunctionBodyAndFinish",this).call(this,e,t,r)}},{key:"registerFunctionStatementId",value:function(e){!e.body&&e.id?this.checkLVal(e.id,1024,null,"function name"):i(a(n.prototype),"registerFunctionStatementId",this).apply(this,arguments)}},{key:"tsCheckForInvalidTypeCasts",value:function(e){var t=this;e.forEach((function(e){"TSTypeCastExpression"===(null==e?void 0:e.type)&&t.raise(e.typeAnnotation.start,Ee.UnexpectedTypeAnnotation)}))}},{key:"toReferencedList",value:function(e,t){return this.tsCheckForInvalidTypeCasts(e),e}},{key:"parseArrayLike",value:function(){for(var e,t=arguments.length,r=new Array(t),o=0;oo&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){var s=this.startNodeAt(t,r);s.expression=e;var u=this.tsTryNextParseConstantContext();return s.typeAnnotation=u||this.tsNextThenParseType(),this.finishNode(s,"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(s,t,r,o)}return i(a(n.prototype),"parseExprOp",this).call(this,e,t,r,o)}},{key:"checkReservedWord",value:function(e,t,n,r){}},{key:"checkDuplicateExports",value:function(){}},{key:"parseImport",value:function(e){if(this.match(y.name)||this.match(y.star)||this.match(y.braceL)){var t=this.lookahead();if(this.match(y.name)&&t.type===y.eq)return this.tsParseImportEqualsDeclaration(e);!this.isContextual("type")||t.type===y.comma||t.type===y.name&&"from"===t.value||(e.importKind="type",this.next())}e.importKind||(e.importKind="value");var r=i(a(n.prototype),"parseImport",this).call(this,e);return"type"===r.importKind&&r.specifiers.length>1&&"ImportDefaultSpecifier"===r.specifiers[0].type&&this.raise(r.start,"A type-only import can specify a default import or named bindings, but not both."),r}},{key:"parseExport",value:function(e){if(this.match(y._import))return this.expect(y._import),this.tsParseImportEqualsDeclaration(e,!0);if(this.eat(y.eq)){var t=e;return t.expression=this.parseExpression(),this.semicolon(),this.finishNode(t,"TSExportAssignment")}if(this.eatContextual("as")){var r=e;return this.expectContextual("namespace"),r.id=this.parseIdentifier(),this.semicolon(),this.finishNode(r,"TSNamespaceExportDeclaration")}return this.isContextual("type")&&this.lookahead().type===y.braceL?(this.next(),e.exportKind="type"):e.exportKind="value",i(a(n.prototype),"parseExport",this).call(this,e)}},{key:"isAbstractClass",value:function(){return this.isContextual("abstract")&&this.lookahead().type===y._class}},{key:"parseExportDefaultExpression",value:function(){if(this.isAbstractClass()){var e=this.startNode();return this.next(),this.parseClass(e,!0,!0),e.abstract=!0,e}if("interface"===this.state.value){var t=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(t)return t}return i(a(n.prototype),"parseExportDefaultExpression",this).call(this)}},{key:"parseStatementContent",value:function(e,t){if(this.state.type===y._const){var r=this.lookahead();if(r.type===y.name&&"enum"===r.value){var o=this.startNode();return this.expect(y._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(o,!0)}}return i(a(n.prototype),"parseStatementContent",this).call(this,e,t)}},{key:"parseAccessModifier",value:function(){return this.tsParseModifier(["public","protected","private"])}},{key:"parseClassMember",value:function(e,t,r){var o=this;this.tsParseModifiers(t,["declare"]);var s=this.parseAccessModifier();s&&(t.accessibility=s),this.tsParseModifiers(t,["declare"]);var u=function(){i(a(n.prototype),"parseClassMember",o).call(o,e,t,r)};t.declare?this.tsInDeclareContext(u):u()}},{key:"parseClassMemberWithIsStatic",value:function(e,t,r,o){this.tsParseModifiers(t,["abstract","readonly","declare"]);var s=this.tsTryParseIndexSignature(t);if(s)return e.body.push(s),t.abstract&&this.raise(t.start,Ee.IndexSignatureHasAbstract),o&&this.raise(t.start,Ee.IndexSignatureHasStatic),t.accessibility&&this.raise(t.start,Ee.IndexSignatureHasAccessibility,t.accessibility),void(t.declare&&this.raise(t.start,Ee.IndexSignatureHasDeclare));i(a(n.prototype),"parseClassMemberWithIsStatic",this).call(this,e,t,r,o)}},{key:"parsePostMemberNameModifiers",value:function(e){this.eat(y.question)&&(e.optional=!0),e.readonly&&this.match(y.parenL)&&this.raise(e.start,Ee.ClassMethodHasReadonly),e.declare&&this.match(y.parenL)&&this.raise(e.start,Ee.ClassMethodHasDeclare)}},{key:"parseExpressionStatement",value:function(e,t){return("Identifier"===t.type?this.tsParseExpressionStatement(e,t):void 0)||i(a(n.prototype),"parseExpressionStatement",this).call(this,e,t)}},{key:"shouldParseExportDeclaration",value:function(){return!!this.tsIsDeclarationStart()||i(a(n.prototype),"shouldParseExportDeclaration",this).call(this)}},{key:"parseConditional",value:function(e,t,r,o){var s=this;if(!o||!this.match(y.question))return i(a(n.prototype),"parseConditional",this).call(this,e,t,r,o);var u=this.tryParse((function(){return i(a(n.prototype),"parseConditional",s).call(s,e,t,r)}));return u.node?(u.error&&(this.state=u.failState),u.node):(o.start=u.error.pos||this.state.start,e)}},{key:"parseParenItem",value:function(e,t,r){if(e=i(a(n.prototype),"parseParenItem",this).call(this,e,t,r),this.eat(y.question)&&(e.optional=!0,this.resetEndLocation(e)),this.match(y.colon)){var o=this.startNodeAt(t,r);return o.expression=e,o.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(o,"TSTypeCastExpression")}return e}},{key:"parseExportDeclaration",value:function(e){var t,r=this.state.start,o=this.state.startLoc,s=this.eatContextual("declare");return this.match(y.name)&&(t=this.tsTryParseExportDeclaration()),t||(t=i(a(n.prototype),"parseExportDeclaration",this).call(this,e)),t&&("TSInterfaceDeclaration"===t.type||"TSTypeAliasDeclaration"===t.type||s)&&(e.exportKind="type"),t&&s&&(this.resetStartLocation(t,r,o),t.declare=!0),t}},{key:"parseClassId",value:function(e,t,r){if(t&&!r||!this.isContextual("implements")){i(a(n.prototype),"parseClassId",this).call(this,e,t,r,e.declare?1024:139);var o=this.tsTryParseTypeParameters();o&&(e.typeParameters=o)}}},{key:"parseClassPropertyAnnotation",value:function(e){!e.optional&&this.eat(y.bang)&&(e.definite=!0);var t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}},{key:"parseClassProperty",value:function(e){return this.parseClassPropertyAnnotation(e),this.state.isDeclareContext&&this.match(y.eq)&&this.raise(this.state.start,Ee.DeclareClassFieldHasInitializer),i(a(n.prototype),"parseClassProperty",this).call(this,e)}},{key:"parseClassPrivateProperty",value:function(e){return e.abstract&&this.raise(e.start,Ee.PrivateElementHasAbstract),e.accessibility&&this.raise(e.start,Ee.PrivateElementHasAccessibility,e.accessibility),this.parseClassPropertyAnnotation(e),i(a(n.prototype),"parseClassPrivateProperty",this).call(this,e)}},{key:"pushClassMethod",value:function(e,t,r,o,s,u){var c=this.tsTryParseTypeParameters();c&&s&&this.raise(c.start,Ee.ConstructorHasTypeParameters),c&&(t.typeParameters=c),i(a(n.prototype),"pushClassMethod",this).call(this,e,t,r,o,s,u)}},{key:"pushClassPrivateMethod",value:function(e,t,r,o){var s=this.tsTryParseTypeParameters();s&&(t.typeParameters=s),i(a(n.prototype),"pushClassPrivateMethod",this).call(this,e,t,r,o)}},{key:"parseClassSuper",value:function(e){i(a(n.prototype),"parseClassSuper",this).call(this,e),e.superClass&&this.isRelational("<")&&(e.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(e.implements=this.tsParseHeritageClause("implements"))}},{key:"parseObjPropValue",value:function(e){for(var t,r=this.tsTryParseTypeParameters(),o=arguments.length,s=new Array(o>1?o-1:0),u=1;u1&&void 0!==arguments[1]?arguments[1]:64,r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;switch(e.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(e.parameter,t,r,"parameter property");case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return void this.checkLVal(e.expression,t,r,o);default:return void i(a(n.prototype),"checkLVal",this).call(this,e,t,r,o)}}},{key:"parseBindingAtom",value:function(){switch(this.state.type){case y._this:return this.parseIdentifier(!0);default:return i(a(n.prototype),"parseBindingAtom",this).call(this)}}},{key:"parseMaybeDecoratorArguments",value:function(e){if(this.isRelational("<")){var t=this.tsParseTypeArguments();if(this.match(y.parenL)){var r=i(a(n.prototype),"parseMaybeDecoratorArguments",this).call(this,e);return r.typeParameters=t,r}this.unexpected(this.state.start,y.parenL)}return i(a(n.prototype),"parseMaybeDecoratorArguments",this).call(this,e)}},{key:"isClassMethod",value:function(){return this.isRelational("<")||i(a(n.prototype),"isClassMethod",this).call(this)}},{key:"isClassProperty",value:function(){return this.match(y.bang)||this.match(y.colon)||i(a(n.prototype),"isClassProperty",this).call(this)}},{key:"parseMaybeDefault",value:function(){for(var e,t=arguments.length,r=new Array(t),o=0;o0)||i(a(n.prototype),"maybeParseExportDefaultSpecifier",this).apply(this,arguments)}},{key:"checkExport",value:function(e){var t=e.specifiers;(null==t?void 0:t.length)&&(e.specifiers=t.filter((function(e){return"Placeholder"===e.exported.type}))),i(a(n.prototype),"checkExport",this).call(this,e),e.specifiers=t}},{key:"parseImport",value:function(e){var t=this.parsePlaceholder("Identifier");if(!t)return i(a(n.prototype),"parseImport",this).apply(this,arguments);if(e.specifiers=[],!this.isContextual("from")&&!this.match(y.comma))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");var r=this.startNodeAtNode(t);return r.local=t,this.finishNode(r,"ImportDefaultSpecifier"),e.specifiers.push(r),this.eat(y.comma)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual("from"),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}},{key:"parseImportSource",value:function(){return this.parsePlaceholder("StringLiteral")||i(a(n.prototype),"parseImportSource",this).apply(this,arguments)}}]),n}(e)}},we=Object.keys(Te),Ae={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1},Oe=function(){function e(){p(this,e),this.strict=void 0,this.curLine=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.maybeInArrowParameters=!1,this.inPipeline=!1,this.inType=!1,this.noAnonFunctionType=!1,this.inPropertyName=!1,this.hasFlowComment=!1,this.isIterator=!1,this.isDeclareContext=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.decoratorStack=[[]],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=0,this.lineStart=0,this.type=y.eof,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.lastTokEnd=0,this.context=[P.braceStatement],this.exprAllowed=!0,this.containsEsc=!1,this.octalPositions=[],this.exportedIdentifiers=[],this.tokensLength=0}return f(e,[{key:"init",value:function(e){this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.curLine=e.startLine,this.startLoc=this.endLoc=this.curPosition()}},{key:"curPosition",value:function(){return new A(this.curLine,this.pos-this.lineStart)}},{key:"clone",value:function(t){for(var n=new e,r=Object.keys(this),i=0,a=r.length;i=48&&e<=57},Ie=new Set(["g","m","s","i","y","u"]),Fe={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},Le={bin:[48,49]};Le.oct=[].concat(d(Le.bin),[50,51,52,53,54,55]),Le.dec=[].concat(d(Le.oct),[56,57]),Le.hex=[].concat(d(Le.dec),[65,66,67,68,69,70,97,98,99,100,101,102]);var Pe=function e(t){p(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new O(t.startLoc,t.endLoc)},Re=function e(){p(this,e),this.shorthandAssign=-1,this.doubleProto=-1},Me=function(){function e(t,n,r){p(this,e),this.type=void 0,this.start=void 0,this.end=void 0,this.loc=void 0,this.range=void 0,this.leadingComments=void 0,this.trailingComments=void 0,this.innerComments=void 0,this.extra=void 0,this.type="",this.start=n,this.end=0,this.loc=new O(r),(null==t?void 0:t.options.ranges)&&(this.range=[n,0]),(null==t?void 0:t.filename)&&(this.loc.filename=t.filename)}return f(e,[{key:"__clone",value:function(){for(var t=new e,n=Object.keys(this),r=0,i=n.length;r0&&void 0!==arguments[0]?arguments[0]:0;p(this,e),this.type=void 0,this.type=t}return f(e,[{key:"canBeArrowParameterDeclaration",value:function(){return 2===this.type||1===this.type}},{key:"isCertainlyParameterDeclaration",value:function(){return 3===this.type}}]),e}(),Ue=function(e){o(n,e);var t=s(n);function n(e){var r;return p(this,n),(r=t.call(this,e)).errors=new Map,r}return f(n,[{key:"recordDeclarationError",value:function(e,t){this.errors.set(e,t)}},{key:"clearDeclarationError",value:function(e){this.errors.delete(e)}},{key:"iterateErrors",value:function(e){this.errors.forEach(e)}}]),n}(je),Ve=function(){function e(t){p(this,e),this.stack=[new je],this.raise=t}return f(e,[{key:"enter",value:function(e){this.stack.push(e)}},{key:"exit",value:function(){this.stack.pop()}},{key:"recordParameterInitializerError",value:function(e,t){for(var n=this.stack,r=n.length-1,i=n[r];!i.isCertainlyParameterDeclaration();){if(!i.canBeArrowParameterDeclaration())return;i.recordDeclarationError(e,t),i=n[--r]}this.raise(e,t)}},{key:"recordAsyncArrowParametersError",value:function(e,t){for(var n=this.stack,r=n.length-1,i=n[r];i.canBeArrowParameterDeclaration();)2===i.type&&i.recordDeclarationError(e,t),i=n[--r]}},{key:"validateAsPattern",value:function(){var e=this,t=this.stack,n=t[t.length-1];n.canBeArrowParameterDeclaration()&&n.iterateErrors((function(n,r){e.raise(r,n);for(var i=t.length-2,a=t[i];a.canBeArrowParameterDeclaration();)a.clearDeclarationError(r),a=t[--i]}))}}]),e}();function ze(){return new je}var He={kind:"loop"},We={kind:"switch"},Ke=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,qe=function e(){p(this,e),this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map},Ge=function(){function e(t){p(this,e),this.stack=[],this.undefinedPrivateNames=new Map,this.raise=t}return f(e,[{key:"current",value:function(){return this.stack[this.stack.length-1]}},{key:"enter",value:function(){this.stack.push(new qe)}},{key:"exit",value:function(){for(var e=this.stack.pop(),t=this.current(),n=0,r=Array.from(e.undefinedPrivateNames);n0)for(var n=0,r=Array.from(this.scope.undefinedExports);n-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.match(y._var)||this.match(y._const)||n){var r=this.startNode(),i=n?"let":this.state.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),(this.match(y._in)||this.isContextual("of"))&&1===r.declarations.length?this.parseForIn(e,r,t):(t>-1&&this.unexpected(t),this.parseFor(e,r))}var a=new Re,o=this.parseExpression(!0,a);if(this.match(y._in)||this.isContextual("of")){this.toAssignable(o);var s=this.isContextual("of")?"for-of statement":"for-in statement";return this.checkLVal(o,void 0,void 0,s),this.parseForIn(e,o,t)}return this.checkExpressionErrors(a,!0),t>-1&&this.unexpected(t),this.parseFor(e,o)}},{key:"parseFunctionStatement",value:function(e,t,n){return this.next(),this.parseFunction(e,1|(n?0:2),t)}},{key:"parseIfStatement",value:function(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(y._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")}},{key:"parseReturnStatement",value:function(e){return this.prodParam.hasReturn||this.options.allowReturnOutsideFunction||this.raise(this.state.start,I.IllegalReturn),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}},{key:"parseSwitchStatement",value:function(e){this.next(),e.discriminant=this.parseHeaderExpression();var t,n,r=e.cases=[];for(this.expect(y.braceL),this.state.labels.push(We),this.scope.enter(0);!this.match(y.braceR);)if(this.match(y._case)||this.match(y._default)){var i=this.match(y._case);t&&this.finishNode(t,"SwitchCase"),r.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(n&&this.raise(this.state.lastTokStart,I.MultipleDefaultsInSwitch),n=!0,t.test=null),this.expect(y.colon)}else t?t.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}},{key:"parseThrowStatement",value:function(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(this.state.lastTokEnd,I.NewlineAfterThrow),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}},{key:"parseCatchClauseParam",value:function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.scope.enter(t?8:0),this.checkLVal(e,9,null,"catch clause"),e}},{key:"parseTryStatement",value:function(e){var t=this;if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(y._catch)){var n=this.startNode();this.next(),this.match(y.parenL)?(this.expect(y.parenL),n.param=this.parseCatchClauseParam(),this.expect(y.parenR)):(n.param=null,this.scope.enter(0)),n.body=this.withTopicForbiddingContext((function(){return t.parseBlock(!1,!1)})),this.scope.exit(),e.handler=this.finishNode(n,"CatchClause")}return e.finalizer=this.eat(y._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,I.NoCatchOrFinally),this.finishNode(e,"TryStatement")}},{key:"parseVarStatement",value:function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")}},{key:"parseWhileStatement",value:function(e){var t=this;return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(He),e.body=this.withTopicForbiddingContext((function(){return t.parseStatement("while")})),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}},{key:"parseWithStatement",value:function(e){var t=this;return this.state.strict&&this.raise(this.state.start,I.StrictWith),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withTopicForbiddingContext((function(){return t.parseStatement("with")})),this.finishNode(e,"WithStatement")}},{key:"parseEmptyStatement",value:function(e){return this.next(),this.finishNode(e,"EmptyStatement")}},{key:"parseLabeledStatement",value:function(e,t,n,r){for(var i=0,a=this.state.labels;i=0;s--){var u=this.state.labels[s];if(u.statementStart!==e.start)break;u.statementStart=this.state.start,u.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.state.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")}},{key:"parseExpressionStatement",value:function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}},{key:"parseBlock",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,r=this.startNode();return this.expect(y.braceL),t&&this.scope.enter(0),this.parseBlockBody(r,e,!1,y.braceR,n),t&&this.scope.exit(),this.finishNode(r,"BlockStatement")}},{key:"isValidDirective",value:function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}},{key:"parseBlockBody",value:function(e,t,n,r,i){var a=e.body=[],o=e.directives=[];this.parseBlockOrModuleBlockBody(a,t?o:void 0,n,r,i)}},{key:"parseBlockOrModuleBlockBody",value:function(e,t,n,r,i){for(var a=[],o=this.state.strict,s=!1,u=!1;!this.match(r);){!u&&this.state.octalPositions.length&&a.push.apply(a,d(this.state.octalPositions));var c=this.parseStatement(null,n);if(t&&!u&&this.isValidDirective(c)){var l=this.stmtToDirective(c);t.push(l),s||"use strict"!==l.value.value||(s=!0,this.setStrict(!0))}else u=!0,e.push(c)}if(this.state.strict&&a.length)for(var p=0;p-1&&this.unexpected(n):e.await=n>-1,"VariableDeclaration"!==t.type||null==t.declarations[0].init||i&&!this.state.strict&&"var"===t.kind&&"Identifier"===t.declarations[0].id.type?"AssignmentPattern"===t.type&&this.raise(t.start,I.InvalidLhs,"for-loop"):this.raise(t.start,I.ForInOfLoopInitializer,i?"for-in":"for-of"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(y.parenR),e.body=this.withTopicForbiddingContext((function(){return r.parseStatement("for")})),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")}},{key:"parseVar",value:function(e,t,n){var r=e.declarations=[],i=this.hasPlugin("typescript");for(e.kind=n;;){var a=this.startNode();if(this.parseVarId(a,n),this.eat(y.eq)?a.init=t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():("const"!==n||this.match(y._in)||this.isContextual("of")?"Identifier"===a.id.type||t&&(this.match(y._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,I.DeclarationMissingInitializer,"Complex binding patterns"):i||this.raise(this.state.lastTokEnd,I.DeclarationMissingInitializer,"Const declarations"),a.init=null),r.push(this.finishNode(a,"VariableDeclarator")),!this.eat(y.comma))break}return e}},{key:"parseVarId",value:function(e,t){e.id=this.parseBindingAtom(),this.checkLVal(e.id,"var"===t?5:9,void 0,"variable declaration","var"!==t)}},{key:"parseFunction",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=1&n,a=2&n,o=!(!i||4&n);this.initFunction(e,r),this.match(y.star)&&a&&this.raise(this.state.start,I.GeneratorInSingleStatementContext),e.generator=this.eat(y.star),i&&(e.id=this.parseFunctionId(o));var s=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(ye(r,e.generator)),i||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withTopicForbiddingContext((function(){t.parseFunctionBodyAndFinish(e,i?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),i&&!a&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=s,e}},{key:"parseFunctionId",value:function(e){return e||this.match(y.name)?this.parseIdentifier():null}},{key:"parseFunctionParams",value:function(e,t){this.expect(y.parenL),this.expressionScope.enter(new je(3)),e.params=this.parseBindingList(y.parenR,41,!1,t),this.expressionScope.exit()}},{key:"registerFunctionStatementId",value:function(e){e.id&&this.scope.declareName(e.id.name,this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:9:17,e.id.start)}},{key:"parseClass",value:function(e,t,n){this.next(),this.takeDecorators(e);var r=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,n),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,r),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}},{key:"isClassProperty",value:function(){return this.match(y.eq)||this.match(y.semi)||this.match(y.braceR)}},{key:"isClassMethod",value:function(){return this.match(y.parenL)}},{key:"isNonstaticConstructor",value:function(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)}},{key:"parseClassBody",value:function(e,t){var n=this;this.classScope.enter();var r={constructorAllowsSuper:e,hadConstructor:!1,hadStaticBlock:!1},i=[],a=this.startNode();if(a.body=[],this.expect(y.braceL),this.withTopicForbiddingContext((function(){for(;!n.match(y.braceR);)if(n.eat(y.semi)){if(i.length>0)throw n.raise(n.state.lastTokEnd,I.DecoratorSemicolon)}else if(n.match(y.at))i.push(n.parseDecorator());else{var e=n.startNode();i.length&&(e.decorators=i,n.resetStartLocationFromNode(e,i[0]),i=[]),n.parseClassMember(a,e,r),"constructor"===e.kind&&e.decorators&&e.decorators.length>0&&n.raise(e.start,I.DecoratorConstructor)}})),this.state.strict=t,this.next(),i.length)throw this.raise(this.state.start,I.TrailingDecorator);return this.classScope.exit(),this.finishNode(a,"ClassBody")}},{key:"parseClassMemberFromModifier",value:function(e,t){var n=this.parseIdentifier(!0);if(this.isClassMethod()){var r=t;return r.kind="method",r.computed=!1,r.key=n,r.static=!1,this.pushClassMethod(e,r,!1,!1,!1,!1),!0}if(this.isClassProperty()){var i=t;return i.computed=!1,i.key=n,i.static=!1,e.body.push(this.parseClassProperty(i)),!0}return!1}},{key:"parseClassMember",value:function(e,t,n){var r=this.isContextual("static");if(r){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(y.braceL))return void this.parseClassStaticBlock(e,t,n)}this.parseClassMemberWithIsStatic(e,t,n,r)}},{key:"parseClassMemberWithIsStatic",value:function(e,t,n,r){var i=t,a=t,o=t,s=t,u=i,c=i;if(t.static=r,this.eat(y.star))return u.kind="method",this.parseClassElementName(u),"PrivateName"===u.key.type?void this.pushClassPrivateMethod(e,a,!0,!1):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,I.ConstructorIsGenerator),void this.pushClassMethod(e,i,!0,!1,!1,!1));var l=this.state.containsEsc,d=this.parseClassElementName(t),p="PrivateName"===d.type,f="Identifier"===d.type,h=this.state.start;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(u.kind="method",p)return void this.pushClassPrivateMethod(e,a,!1,!1);var g=this.isNonstaticConstructor(i),m=!1;g&&(i.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(d.start,I.DuplicateConstructor),n.hadConstructor=!0,m=n.constructorAllowsSuper),this.pushClassMethod(e,i,!1,!1,g,m)}else if(this.isClassProperty())p?this.pushClassPrivateProperty(e,s):this.pushClassProperty(e,o);else if(!f||"async"!==d.name||l||this.isLineTerminator())!f||"get"!==d.name&&"set"!==d.name||l||this.match(y.star)&&this.isLineTerminator()?this.isLineTerminator()?p?this.pushClassPrivateProperty(e,s):this.pushClassProperty(e,o):this.unexpected():(u.kind=d.name,this.parseClassElementName(i),"PrivateName"===u.key.type?this.pushClassPrivateMethod(e,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,I.ConstructorIsAccessor),this.pushClassMethod(e,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i));else{var _=this.eat(y.star);c.optional&&this.unexpected(h),u.kind="method",this.parseClassElementName(u),this.parsePostMemberNameModifiers(c),"PrivateName"===u.key.type?this.pushClassPrivateMethod(e,a,_,!0):(this.isNonstaticConstructor(i)&&this.raise(i.key.start,I.ConstructorIsAsync),this.pushClassMethod(e,i,_,!0,!1,!1))}}},{key:"parseClassElementName",value:function(e){var t=this.parsePropertyName(e,!0);return e.computed||!e.static||"prototype"!==t.name&&"prototype"!==t.value||this.raise(t.start,I.StaticPrototype),"PrivateName"===t.type&&"constructor"===t.id.name&&this.raise(t.start,I.ConstructorClassPrivateField),t}},{key:"parseClassStaticBlock",value:function(e,t,n){var r;this.expectPlugin("classStaticBlock",t.start),this.scope.enter(80),this.expressionScope.enter(ze());var i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);var a=t.body=[];this.parseBlockOrModuleBlockBody(a,void 0,!1,y.braceR),this.prodParam.exit(),this.expressionScope.exit(),this.scope.exit(),this.state.labels=i,e.body.push(this.finishNode(t,"StaticBlock")),n.hadStaticBlock&&this.raise(t.start,I.DuplicateStaticBlock),(null==(r=t.decorators)?void 0:r.length)&&this.raise(t.start,I.DecoratorStaticBlock),n.hadStaticBlock=!0}},{key:"pushClassProperty",value:function(e,t){t.computed||"constructor"!==t.key.name&&"constructor"!==t.key.value||this.raise(t.key.start,I.ConstructorClassField),e.body.push(this.parseClassProperty(t))}},{key:"pushClassPrivateProperty",value:function(e,t){this.expectPlugin("classPrivateProperties",t.key.start);var n=this.parseClassPrivateProperty(t);e.body.push(n),this.classScope.declarePrivateName(n.key.id.name,0,n.key.start)}},{key:"pushClassMethod",value:function(e,t,n,r,i,a){e.body.push(this.parseMethod(t,n,r,i,a,"ClassMethod",!0))}},{key:"pushClassPrivateMethod",value:function(e,t,n,r){this.expectPlugin("classPrivateMethods",t.key.start);var i=this.parseMethod(t,n,r,!1,!1,"ClassPrivateMethod",!0);e.body.push(i);var a="get"===i.kind?i.static?6:2:"set"===i.kind?i.static?5:1:0;this.classScope.declarePrivateName(i.key.id.name,a,i.key.start)}},{key:"parsePostMemberNameModifiers",value:function(e){}},{key:"parseClassPrivateProperty",value:function(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}},{key:"parseClassProperty",value:function(e){return e.typeAnnotation&&!this.match(y.eq)||this.expectPlugin("classProperties"),this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}},{key:"parseInitializer",value:function(e){this.scope.enter(80),this.expressionScope.enter(ze()),this.prodParam.enter(0),e.value=this.eat(y.eq)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}},{key:"parseClassId",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:139;this.match(y.name)?(e.id=this.parseIdentifier(),t&&this.checkLVal(e.id,r,void 0,"class name")):n||!t?e.id=null:this.unexpected(null,I.MissingClassName)}},{key:"parseClassSuper",value:function(e){e.superClass=this.eat(y._extends)?this.parseExprSubscripts():null}},{key:"parseExport",value:function(e){var t=this.maybeParseExportDefaultSpecifier(e),n=!t||this.eat(y.comma),r=n&&this.eatExportStar(e),i=r&&this.maybeParseExportNamespaceSpecifier(e),a=n&&(!i||this.eat(y.comma)),o=t||r;if(r&&!i)return t&&this.unexpected(),this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");var s,u=this.maybeParseExportNamedSpecifiers(e);if(t&&n&&!r&&!u||i&&a&&!u)throw this.unexpected(null,y.braceL);if(o||u?(s=!1,this.parseExportFrom(e,o)):s=this.maybeParseExportDeclaration(e),o||u||s)return this.checkExport(e,!0,!1,!!e.source),this.finishNode(e,"ExportNamedDeclaration");if(this.eat(y._default))return e.declaration=this.parseExportDefaultExpression(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration");throw this.unexpected(null,y.braceL)}},{key:"eatExportStar",value:function(e){return this.eat(y.star)}},{key:"maybeParseExportDefaultSpecifier",value:function(e){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");var t=this.startNode();return t.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(t,"ExportDefaultSpecifier")],!0}return!1}},{key:"maybeParseExportNamespaceSpecifier",value:function(e){if(this.isContextual("as")){e.specifiers||(e.specifiers=[]);var t=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}},{key:"maybeParseExportNamedSpecifiers",value:function(e){var t;return!!this.match(y.braceL)&&(e.specifiers||(e.specifiers=[]),(t=e.specifiers).push.apply(t,d(this.parseExportSpecifiers())),e.source=null,e.declaration=null,!0)}},{key:"maybeParseExportDeclaration",value:function(e){return!!this.shouldParseExportDeclaration()&&(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e),!0)}},{key:"isAsyncFunction",value:function(){if(!this.isContextual("async"))return!1;var e=this.nextTokenStart();return!S.test(this.input.slice(this.state.pos,e))&&this.isUnparsedContextual(e,"function")}},{key:"parseExportDefaultExpression",value:function(){var e=this.startNode(),t=this.isAsyncFunction();if(this.match(y._function)||t)return this.next(),t&&this.next(),this.parseFunction(e,5,t);if(this.match(y._class))return this.parseClass(e,!0,!0);if(this.match(y.at))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,I.DecoratorBeforeExport),this.parseDecorators(!1),this.parseClass(e,!0,!0);if(this.match(y._const)||this.match(y._var)||this.isLet())throw this.raise(this.state.start,I.UnsupportedDefaultExport);var n=this.parseMaybeAssignAllowIn();return this.semicolon(),n}},{key:"parseExportDeclaration",value:function(e){return this.parseStatement(null)}},{key:"isExportDefaultSpecifier",value:function(){if(this.match(y.name)){var e=this.state.value;if("async"===e&&!this.state.containsEsc||"let"===e)return!1;if(("type"===e||"interface"===e)&&!this.state.containsEsc){var t=this.lookahead();if(t.type===y.name&&"from"!==t.value||t.type===y.braceL)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(y._default))return!1;var n=this.nextTokenStart(),r=this.isUnparsedContextual(n,"from");if(44===this.input.charCodeAt(n)||this.match(y.name)&&r)return!0;if(this.match(y._default)&&r){var i=this.input.charCodeAt(this.nextTokenStartSince(n+4));return 34===i||39===i}return!1}},{key:"parseExportFrom",value:function(e,t){if(this.eatContextual("from")){e.source=this.parseImportSource(),this.checkExport(e);var n=this.maybeParseImportAssertions();n&&(e.assertions=n)}else t?this.unexpected():e.source=null;this.semicolon()}},{key:"shouldParseExportDeclaration",value:function(){if(this.match(y.at)&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;this.unexpected(this.state.start,I.DecoratorBeforeExport)}return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isLet()||this.isAsyncFunction()}},{key:"checkExport",value:function(e,t,n,r){if(t)if(n){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var i,a=e.declaration;"Identifier"!==a.type||"from"!==a.name||a.end-a.start!=4||(null==(i=a.extra)?void 0:i.parenthesized)||this.raise(a.start,I.ExportDefaultFromAsIdentifier)}}else if(e.specifiers&&e.specifiers.length)for(var o=0,s=e.specifiers;o-1&&this.raise(e.start,"default"===t?I.DuplicateDefaultExport:I.DuplicateExport,t),this.state.exportedIdentifiers.push(t)}},{key:"parseExportSpecifiers",value:function(){var e=[],t=!0;for(this.expect(y.braceL);!this.eat(y.braceR);){if(t)t=!1;else if(this.expect(y.comma),this.eat(y.braceR))break;var n=this.startNode();n.local=this.parseModuleExportName(),n.exported=this.eatContextual("as")?this.parseModuleExportName():n.local.__clone(),e.push(this.finishNode(n,"ExportSpecifier"))}return e}},{key:"parseModuleExportName",value:function(){if(this.match(y.string)){this.expectPlugin("moduleStringNames");var e=this.parseLiteral(this.state.value,"StringLiteral"),t=e.value.match(Ke);return t&&this.raise(e.start,I.ModuleExportNameHasLoneSurrogate,t[0].charCodeAt(0).toString(16)),e}return this.parseIdentifier(!0)}},{key:"parseImport",value:function(e){if(e.specifiers=[],!this.match(y.string)){var t=!this.maybeParseDefaultImportSpecifier(e)||this.eat(y.comma),n=t&&this.maybeParseStarImportSpecifier(e);t&&!n&&this.parseNamedImportSpecifiers(e),this.expectContextual("from")}e.source=this.parseImportSource();var r=this.maybeParseImportAssertions();if(r)e.assertions=r;else{var i=this.maybeParseModuleAttributes();i&&(e.attributes=i)}return this.semicolon(),this.finishNode(e,"ImportDeclaration")}},{key:"parseImportSource",value:function(){return this.match(y.string)||this.unexpected(),this.parseExprAtom()}},{key:"shouldParseDefaultImport",value:function(e){return this.match(y.name)}},{key:"parseImportSpecifierLocal",value:function(e,t,n,r){t.local=this.parseIdentifier(),this.checkLVal(t.local,9,void 0,r),e.specifiers.push(this.finishNode(t,n))}},{key:"parseAssertEntries",value:function(){var e=[],t=new Set;do{if(this.match(y.braceR))break;var n=this.startNode(),r=this.state.value;if(this.match(y.string)?n.key=this.parseLiteral(r,"StringLiteral"):n.key=this.parseIdentifier(!0),this.expect(y.colon),"type"!==r&&this.raise(n.key.start,I.ModuleAttributeDifferentFromType,r),t.has(r)&&this.raise(n.key.start,I.ModuleAttributesWithDuplicateKeys,r),t.add(r),!this.match(y.string))throw this.unexpected(this.state.start,I.ModuleAttributeInvalidValue);n.value=this.parseLiteral(this.state.value,"StringLiteral"),this.finishNode(n,"ImportAttribute"),e.push(n)}while(this.eat(y.comma));return e}},{key:"maybeParseModuleAttributes",value:function(){if(!this.match(y._with)||this.hasPrecedingLineBreak())return this.hasPlugin("moduleAttributes")?[]:null;this.expectPlugin("moduleAttributes"),this.next();var e=[],t=new Set;do{var n=this.startNode();if(n.key=this.parseIdentifier(!0),"type"!==n.key.name&&this.raise(n.key.start,I.ModuleAttributeDifferentFromType,n.key.name),t.has(n.key.name)&&this.raise(n.key.start,I.ModuleAttributesWithDuplicateKeys,n.key.name),t.add(n.key.name),this.expect(y.colon),!this.match(y.string))throw this.unexpected(this.state.start,I.ModuleAttributeInvalidValue);n.value=this.parseLiteral(this.state.value,"StringLiteral"),this.finishNode(n,"ImportAttribute"),e.push(n)}while(this.eat(y.comma));return e}},{key:"maybeParseImportAssertions",value:function(){if(!this.isContextual("assert")||this.hasPrecedingLineBreak())return this.hasPlugin("importAssertions")?[]:null;this.expectPlugin("importAssertions"),this.next(),this.eat(y.braceL);var e=this.parseAssertEntries();return this.eat(y.braceR),e}},{key:"maybeParseDefaultImportSpecifier",value:function(e){return!!this.shouldParseDefaultImport(e)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier","default import specifier"),!0)}},{key:"maybeParseStarImportSpecifier",value:function(e){if(this.match(y.star)){var t=this.startNode();return this.next(),this.expectContextual("as"),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier","import namespace specifier"),!0}return!1}},{key:"parseNamedImportSpecifiers",value:function(e){var t=!0;for(this.expect(y.braceL);!this.eat(y.braceR);){if(t)t=!1;else{if(this.eat(y.colon))throw this.raise(this.state.start,I.DestructureNamedImport);if(this.expect(y.comma),this.eat(y.braceR))break}this.parseImportSpecifier(e)}}},{key:"parseImportSpecifier",value:function(e){var t=this.startNode();if(t.imported=this.parseModuleExportName(),this.eatContextual("as"))t.local=this.parseIdentifier();else{var n=t.imported;if("StringLiteral"===n.type)throw this.raise(t.start,I.ImportBindingIsString,n.value);this.checkReservedWord(n.name,t.start,!0,!0),t.local=n.__clone()}this.checkLVal(t.local,9,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))}}]),n}(function(e){o(n,e);var t=s(n);function n(){return p(this,n),t.apply(this,arguments)}return f(n,[{key:"checkProto",value:function(e,t,n,r){if("SpreadElement"!==e.type&&"ObjectMethod"!==e.type&&!e.computed&&!e.shorthand){var i=e.key;if("__proto__"===("Identifier"===i.type?i.name:i.value)){if(t)return void this.raise(i.start,I.RecordNoProto);n.used&&(r?-1===r.doubleProto&&(r.doubleProto=i.start):this.raise(i.start,I.DuplicateProto)),n.used=!0}}}},{key:"shouldExitDescending",value:function(e,t){return"ArrowFunctionExpression"===e.type&&e.start===t}},{key:"getExpression",value:function(){var e=0;this.hasPlugin("topLevelAwait")&&this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e),this.nextToken();var t=this.parseExpression();return this.match(y.eof)||this.unexpected(),t.comments=this.state.comments,t.errors=this.state.errors,t}},{key:"parseExpression",value:function(e,t){var n=this;return e?this.disallowInAnd((function(){return n.parseExpressionBase(t)})):this.allowInAnd((function(){return n.parseExpressionBase(t)}))}},{key:"parseExpressionBase",value:function(e){var t=this.state.start,n=this.state.startLoc,r=this.parseMaybeAssign(e);if(this.match(y.comma)){var i=this.startNodeAt(t,n);for(i.expressions=[r];this.eat(y.comma);)i.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return r}},{key:"parseMaybeAssignDisallowIn",value:function(e,t,n){var r=this;return this.disallowInAnd((function(){return r.parseMaybeAssign(e,t,n)}))}},{key:"parseMaybeAssignAllowIn",value:function(e,t,n){var r=this;return this.allowInAnd((function(){return r.parseMaybeAssign(e,t,n)}))}},{key:"parseMaybeAssign",value:function(e,t,n){var r,i=this.state.start,a=this.state.startLoc;if(this.isContextual("yield")&&this.prodParam.hasYield){this.state.exprAllowed=!0;var o=this.parseYield();return t&&(o=t.call(this,o,i,a)),o}e?r=!1:(e=new Re,r=!0),(this.match(y.parenL)||this.match(y.name))&&(this.state.potentialArrowAt=this.state.start);var s=this.parseMaybeConditional(e,n);if(t&&(s=t.call(this,s,i,a)),this.state.type.isAssign){var u=this.startNodeAt(i,a),c=this.state.value;return u.operator=c,this.match(y.eq)?(u.left=this.toAssignable(s),e.doubleProto=-1):u.left=s,e.shorthandAssign>=u.left.start&&(e.shorthandAssign=-1),this.checkLVal(s,void 0,void 0,"assignment expression"),this.next(),u.right=this.parseMaybeAssign(),this.finishNode(u,"AssignmentExpression")}return r&&this.checkExpressionErrors(e,!0),s}},{key:"parseMaybeConditional",value:function(e,t){var n=this.state.start,r=this.state.startLoc,i=this.state.potentialArrowAt,a=this.parseExprOps(e);return this.shouldExitDescending(a,i)?a:this.parseConditional(a,n,r,t)}},{key:"parseConditional",value:function(e,t,n,r){if(this.eat(y.question)){var i=this.startNodeAt(t,n);return i.test=e,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(y.colon),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return e}},{key:"parseExprOps",value:function(e){var t=this.state.start,n=this.state.startLoc,r=this.state.potentialArrowAt,i=this.parseMaybeUnary(e);return this.shouldExitDescending(i,r)?i:this.parseExprOp(i,t,n,-1)}},{key:"parseExprOp",value:function(e,t,n,r){var i=this.state.type.binop;if(null!=i&&(this.prodParam.hasIn||!this.match(y._in))&&i>r){var a=this.state.type;if(a===y.pipeline){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.state.inPipeline=!0,this.checkPipelineAtInfixOperator(e,t)}var o=this.startNodeAt(t,n);o.left=e,o.operator=this.state.value,a!==y.exponent||"UnaryExpression"!==e.type||!this.options.createParenthesizedExpressions&&e.extra&&e.extra.parenthesized||this.raise(e.argument.start,I.UnexpectedTokenUnaryExponentiation);var s=a===y.logicalOR||a===y.logicalAND,u=a===y.nullishCoalescing;if(u&&(i=y.logicalAND.binop),this.next(),a===y.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(y.name)&&"await"===this.state.value&&this.prodParam.hasAwait)throw this.raise(this.state.start,I.UnexpectedAwaitAfterPipelineBody);o.right=this.parseExprOpRightExpr(a,i),this.finishNode(o,s||u?"LogicalExpression":"BinaryExpression");var c=this.state.type;if(u&&(c===y.logicalOR||c===y.logicalAND)||s&&c===y.nullishCoalescing)throw this.raise(this.state.start,I.MixingCoalesceWithLogical);return this.parseExprOp(o,t,n,r)}return e}},{key:"parseExprOpRightExpr",value:function(e,t){var n=this,r=this.state.start,i=this.state.startLoc;switch(e){case y.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"smart":return this.withTopicPermittingContext((function(){return n.parseSmartPipelineBody(n.parseExprOpBaseRightExpr(e,t),r,i)}));case"fsharp":return this.withSoloAwaitPermittingContext((function(){return n.parseFSharpPipelineBody(t)}))}default:return this.parseExprOpBaseRightExpr(e,t)}}},{key:"parseExprOpBaseRightExpr",value:function(e,t){var n=this.state.start,r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),n,r,e.rightAssociative?t-1:t)}},{key:"parseMaybeUnary",value:function(e){if(this.isContextual("await")&&this.isAwaitAllowed())return this.parseAwait();var t=this.match(y.incDec),n=this.startNode();if(this.state.type.prefix){n.operator=this.state.value,n.prefix=!0,this.match(y._throw)&&this.expectPlugin("throwExpressions");var r=this.match(y._delete);if(this.next(),n.argument=this.parseMaybeUnary(),this.checkExpressionErrors(e,!0),this.state.strict&&r){var i=n.argument;"Identifier"===i.type?this.raise(n.start,I.StrictDelete):"MemberExpression"!==i.type&&"OptionalMemberExpression"!==i.type||"PrivateName"!==i.property.type||this.raise(n.start,I.DeletePrivateField)}if(!t)return this.finishNode(n,"UnaryExpression")}return this.parseUpdate(n,t,e)}},{key:"parseUpdate",value:function(e,t,n){if(t)return this.checkLVal(e.argument,void 0,void 0,"prefix operation"),this.finishNode(e,"UpdateExpression");var r=this.state.start,i=this.state.startLoc,a=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(r,i);o.operator=this.state.value,o.prefix=!1,o.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),this.next(),a=this.finishNode(o,"UpdateExpression")}return a}},{key:"parseExprSubscripts",value:function(e){var t=this.state.start,n=this.state.startLoc,r=this.state.potentialArrowAt,i=this.parseExprAtom(e);return this.shouldExitDescending(i,r)?i:this.parseSubscripts(i,t,n)}},{key:"parseSubscripts",value:function(e,t,n,r){var i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,n,r,i),i.maybeAsyncArrow=!1}while(!i.stop);return e}},{key:"parseSubscript",value:function(e,t,n,r,i){if(!r&&this.eat(y.doubleColon))return this.parseBind(e,t,n,r,i);if(this.match(y.backQuote))return this.parseTaggedTemplateExpression(e,t,n,i);var a=!1;if(this.match(y.questionDot)){if(i.optionalChainMember=a=!0,r&&40===this.lookaheadCharCode())return i.stop=!0,e;this.next()}return!r&&this.match(y.parenL)?this.parseCoverCallAndAsyncArrowHead(e,t,n,i,a):a||this.match(y.bracketL)||this.eat(y.dot)?this.parseMember(e,t,n,i,a):(i.stop=!0,e)}},{key:"parseMember",value:function(e,t,n,r,i){var a=this.startNodeAt(t,n),o=this.eat(y.bracketL);a.object=e,a.computed=o;var s=o?this.parseExpression():this.parseMaybePrivateName(!0);return"PrivateName"===s.type&&("Super"===a.object.type&&this.raise(t,I.SuperPrivateField),this.classScope.usePrivateName(s.id.name,s.start)),a.property=s,o&&this.expect(y.bracketR),r.optionalChainMember?(a.optional=i,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}},{key:"parseBind",value:function(e,t,n,r,i){var a=this.startNodeAt(t,n);return a.object=e,a.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),t,n,r)}},{key:"parseCoverCallAndAsyncArrowHead",value:function(e,t,n,r,i){var a=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0,this.next();var o=this.startNodeAt(t,n);return o.callee=e,r.maybeAsyncArrow&&this.expressionScope.enter(new Ue(2)),r.optionalChainMember&&(o.optional=i),o.arguments=i?this.parseCallExpressionArguments(y.parenR,!1):this.parseCallExpressionArguments(y.parenR,r.maybeAsyncArrow,"Import"===e.type,"Super"!==e.type,o),this.finishCallExpression(o,r.optionalChainMember),r.maybeAsyncArrow&&this.shouldParseAsyncArrow()&&!i?(r.stop=!0,this.expressionScope.validateAsPattern(),this.expressionScope.exit(),o=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,n),o)):(r.maybeAsyncArrow&&this.expressionScope.exit(),this.toReferencedArguments(o)),this.state.maybeInArrowParameters=a,o}},{key:"toReferencedArguments",value:function(e,t){this.toReferencedListDeep(e.arguments,t)}},{key:"parseTaggedTemplateExpression",value:function(e,t,n,r){var i=this.startNodeAt(t,n);return i.tag=e,i.quasi=this.parseTemplate(!0),r.optionalChainMember&&this.raise(t,I.OptionalChainingNoTemplate),this.finishNode(i,"TaggedTemplateExpression")}},{key:"atPossibleAsyncArrow",value:function(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&e.start===this.state.potentialArrowAt}},{key:"finishCallExpression",value:function(e,t){if("Import"===e.callee.type)if(2===e.arguments.length&&(this.hasPlugin("moduleAttributes")||this.expectPlugin("importAssertions")),0===e.arguments.length||e.arguments.length>2)this.raise(e.start,I.ImportCallArity,this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?"one or two arguments":"one argument");else for(var n=0,r=e.arguments;n1?((t=this.startNodeAt(u,c)).expressions=l,this.finishNodeAt(t,"SequenceExpression",m,_)):t=l[0],!this.options.createParenthesizedExpressions)return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",n),t;var E=this.startNodeAt(n,r);return E.expression=t,this.finishNode(E,"ParenthesizedExpression"),E}},{key:"shouldParseArrow",value:function(){return!this.canInsertSemicolon()}},{key:"parseArrow",value:function(e){if(this.eat(y.arrow))return e}},{key:"parseParenItem",value:function(e,t,n){return e}},{key:"parseNewOrNewTarget",value:function(){var e=this.startNode();if(this.next(),this.match(y.dot)){var t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();var n=this.parseMetaProperty(e,t,"target");if(!this.scope.inNonArrowFunction&&!this.scope.inClass){var r=I.UnexpectedNewTarget;this.hasPlugin("classProperties")&&(r+=" or class properties"),this.raise(n.start,r)}return n}return this.parseNew(e)}},{key:"parseNew",value:function(e){return e.callee=this.parseNoCallExpr(),"Import"===e.callee.type?this.raise(e.callee.start,I.ImportCallNotNewExpression):"OptionalMemberExpression"===e.callee.type||"OptionalCallExpression"===e.callee.type?this.raise(this.state.lastTokEnd,I.OptionalChainingNoNew):this.eat(y.questionDot)&&this.raise(this.state.start,I.OptionalChainingNoNew),this.parseNewArguments(e),this.finishNode(e,"NewExpression")}},{key:"parseNewArguments",value:function(e){if(this.eat(y.parenL)){var t=this.parseExprList(y.parenR);this.toReferencedList(t),e.arguments=t}else e.arguments=[]}},{key:"parseTemplateElement",value:function(e){var t=this.startNode();return null===this.state.value&&(e||this.raise(this.state.start+1,I.InvalidEscapeSequenceTemplate)),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(y.backQuote),this.finishNode(t,"TemplateElement")}},{key:"parseTemplate",value:function(e){var t=this.startNode();this.next(),t.expressions=[];var n=this.parseTemplateElement(e);for(t.quasis=[n];!n.tail;)this.expect(y.dollarBraceL),t.expressions.push(this.parseTemplateSubstitution()),this.expect(y.braceR),t.quasis.push(n=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")}},{key:"parseTemplateSubstitution",value:function(){return this.parseExpression()}},{key:"parseObjectLike",value:function(e,t,n,r){n&&this.expectPlugin("recordAndTuple");var i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;var a=Object.create(null),o=!0,s=this.startNode();for(s.properties=[],this.next();!this.match(e);){if(o)o=!1;else if(this.expect(y.comma),this.match(e)){this.addExtra(s,"trailingComma",this.state.lastTokStart);break}var u=this.parsePropertyDefinition(t,r);t||this.checkProto(u,n,a,r),n&&"ObjectProperty"!==u.type&&"SpreadElement"!==u.type&&this.raise(u.start,I.InvalidRecordProperty),u.shorthand&&this.addExtra(u,"shorthand",!0),s.properties.push(u)}this.state.exprAllowed=!1,this.next(),this.state.inFSharpPipelineDirectBody=i;var c="ObjectExpression";return t?c="ObjectPattern":n&&(c="RecordExpression"),this.finishNode(s,c)}},{key:"maybeAsyncOrAccessorProp",value:function(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(y.bracketL)||this.match(y.star))}},{key:"parsePropertyDefinition",value:function(e,t){var n=[];if(this.match(y.at))for(this.hasPlugin("decorators")&&this.raise(this.state.start,I.UnsupportedPropertyDecorator);this.match(y.at);)n.push(this.parseDecorator());var r,i,a=this.startNode(),o=!1,s=!1,u=!1;if(this.match(y.ellipsis))return n.length&&this.unexpected(),e?(this.next(),a.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(a,"RestElement")):this.parseSpread();n.length&&(a.decorators=n,n=[]),a.method=!1,(e||t)&&(r=this.state.start,i=this.state.startLoc),e||(o=this.eat(y.star));var c=this.state.containsEsc,l=this.parsePropertyName(a,!1);if(!e&&!o&&!c&&this.maybeAsyncOrAccessorProp(a)){var d=l.name;"async"!==d||this.hasPrecedingLineBreak()||(s=!0,o=this.eat(y.star),this.parsePropertyName(a,!1)),"get"!==d&&"set"!==d||(u=!0,a.kind=d,this.match(y.star)&&(o=!0,this.raise(this.state.pos,I.AccessorIsGenerator,d),this.next()),this.parsePropertyName(a,!1))}return this.parseObjPropValue(a,r,i,o,s,e,u,t),a}},{key:"getGetterSetterExpectedParamCount",value:function(e){return"get"===e.kind?0:1}},{key:"getObjectOrClassMethodParams",value:function(e){return e.params}},{key:"checkGetterSetterParams",value:function(e){var t,n=this.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e),i=e.start;r.length!==n&&("get"===e.kind?this.raise(i,I.BadGetterArity):this.raise(i,I.BadSetterArity)),"set"===e.kind&&"RestElement"===(null==(t=r[r.length-1])?void 0:t.type)&&this.raise(i,I.BadSetterRestParameter)}},{key:"parseObjectMethod",value:function(e,t,n,r,i){return i?(this.parseMethod(e,t,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(e),e):n||t||this.match(y.parenL)?(r&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,n,!1,!1,"ObjectMethod")):void 0}},{key:"parseObjectProperty",value:function(e,t,n,r,i){return e.shorthand=!1,this.eat(y.colon)?(e.value=r?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!1),r?e.value=this.parseMaybeDefault(t,n,e.key.__clone()):this.match(y.eq)&&i?(-1===i.shorthandAssign&&(i.shorthandAssign=this.state.start),e.value=this.parseMaybeDefault(t,n,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))}},{key:"parseObjPropValue",value:function(e,t,n,r,i,a,o,s){var u=this.parseObjectMethod(e,r,i,a,o)||this.parseObjectProperty(e,t,n,a,s);return u||this.unexpected(),u}},{key:"parsePropertyName",value:function(e,t){if(this.eat(y.bracketL))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(y.bracketR);else{var n=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(y.num)||this.match(y.string)||this.match(y.bigint)||this.match(y.decimal)?this.parseExprAtom():this.parseMaybePrivateName(t),"PrivateName"!==e.key.type&&(e.computed=!1),this.state.inPropertyName=n}return e.key}},{key:"initFunction",value:function(e,t){e.id=null,e.generator=!1,e.async=!!t}},{key:"parseMethod",value:function(e,t,n,r,i,a){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6];this.initFunction(e,n),e.generator=!!t;var s=r;return this.scope.enter(18|(o?64:0)|(i?32:0)),this.prodParam.enter(ye(n,e.generator)),this.parseFunctionParams(e,s),this.parseFunctionBodyAndFinish(e,a,!0),this.prodParam.exit(),this.scope.exit(),e}},{key:"parseArrayLike",value:function(e,t,n,r){n&&this.expectPlugin("recordAndTuple");var i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;var a=this.startNode();return this.next(),a.elements=this.parseExprList(e,!n,r,a),this.state.inFSharpPipelineDirectBody=i,this.finishNode(a,n?"TupleExpression":"ArrayExpression")}},{key:"parseArrowExpression",value:function(e,t,n,r){this.scope.enter(6);var i=ye(n,!1);!this.match(y.bracketL)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(e,n);var a=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(e,"ArrowFunctionExpression")}},{key:"setArrowFunctionParameters",value:function(e,t,n){e.params=this.toAssignableList(t,n)}},{key:"parseFunctionBodyAndFinish",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.parseFunctionBody(e,!1,n),this.finishNode(e,t)}},{key:"parseFunctionBody",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t&&!this.match(y.braceL);if(this.expressionScope.enter(ze()),i)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{var a=this.state.strict,o=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,(function(i){var o=!n.isSimpleParamList(e.params);if(i&&o){var s="method"!==e.kind&&"constructor"!==e.kind||!e.key?e.start:e.key.end;n.raise(s,I.IllegalLanguageModeDirective)}var u=!a&&n.state.strict;n.checkParams(e,!(n.state.strict||t||r||o),t,u),n.state.strict&&e.id&&n.checkLVal(e.id,65,void 0,"function name",void 0,u)})),this.prodParam.exit(),this.expressionScope.exit(),this.state.labels=o}}},{key:"isSimpleParamList",value:function(e){for(var t=0,n=e.length;t3&&void 0!==arguments[3])||arguments[3],i=Object.create(null),a=0;a=1}},{key:"topicReferenceWasUsedInCurrentTopicContext",value:function(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}},{key:"parseFSharpPipelineBody",value:function(e){var t=this.state.start,n=this.state.startLoc;this.state.potentialArrowAt=this.state.start;var r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;var i=this.parseExprOp(this.parseMaybeUnary(),t,n,e);return this.state.inFSharpPipelineDirectBody=r,i}}]),n}(function(e){o(n,e);var t=s(n);function n(){return p(this,n),t.apply(this,arguments)}return f(n,[{key:"toAssignable",value:function(e){var t,n,r=void 0;switch(("ParenthesizedExpression"===e.type||(null==(t=e.extra)?void 0:t.parenthesized))&&"Identifier"!==(r=Be(e)).type&&"MemberExpression"!==r.type&&this.raise(e.start,I.InvalidParenthesizedAssignment),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var i=0,a=e.properties.length,o=a-1;i1&&void 0!==arguments[1]?arguments[1]:64,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];switch(e.type){case"Identifier":if(this.state.strict&&(a?Z(e.name,this.inModule):X(e.name))&&this.raise(e.start,t===C?I.StrictEvalArguments:I.StrictEvalArgumentsBinding,e.name),n){var o="_".concat(e.name);n[o]?this.raise(e.start,I.ParamDupe):n[o]=!0}i&&"let"===e.name&&this.raise(e.start,I.LetInLexicalBinding),t&C||this.scope.declareName(e.name,t,e.start);break;case"MemberExpression":t!==C&&this.raise(e.start,I.InvalidPropertyBindingPattern);break;case"ObjectPattern":for(var s=0,u=e.properties;s1&&void 0!==arguments[1]?arguments[1]:this.state.lastTokEnd,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.state.lastTokEndLoc;e.end=t,e.loc.end=n,this.options.ranges&&(e.range[1]=t)}},{key:"resetStartLocationFromNode",value:function(e,t){this.resetStartLocation(e,t.start,t.loc.start)}}]),n}(function(e){o(n,e);var t=s(n);function n(){return p(this,n),t.apply(this,arguments)}return f(n,[{key:"addExtra",value:function(e,t,n){e&&((e.extra=e.extra||{})[t]=n)}},{key:"isRelational",value:function(e){return this.match(y.relational)&&this.state.value===e}},{key:"expectRelational",value:function(e){this.isRelational(e)?this.next():this.unexpected(null,y.relational)}},{key:"isContextual",value:function(e){return this.match(y.name)&&this.state.value===e&&!this.state.containsEsc}},{key:"isUnparsedContextual",value:function(e,t){var n=e+t.length;return this.input.slice(e,n)===t&&(n===this.input.length||!W(this.input.charCodeAt(n)))}},{key:"isLookaheadContextual",value:function(e){var t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}},{key:"eatContextual",value:function(e){return this.isContextual(e)&&this.eat(y.name)}},{key:"expectContextual",value:function(e,t){this.eatContextual(e)||this.unexpected(null,t)}},{key:"canInsertSemicolon",value:function(){return this.match(y.eof)||this.match(y.braceR)||this.hasPrecedingLineBreak()}},{key:"hasPrecedingLineBreak",value:function(){return S.test(this.input.slice(this.state.lastTokEnd,this.state.start))}},{key:"isLineTerminator",value:function(){return this.eat(y.semi)||this.canInsertSemicolon()}},{key:"semicolon",value:function(){this.isLineTerminator()||this.unexpected(null,y.semi)}},{key:"expect",value:function(e,t){this.eat(e)||this.unexpected(t,e)}},{key:"assertNoSpace",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected space.";this.state.start>this.state.lastTokEnd&&this.raise(this.state.lastTokEnd,e)}},{key:"unexpected",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";throw"string"!=typeof t&&(t='Unexpected token, expected "'.concat(t.label,'"')),this.raise(null!=e?e:this.state.start,t)}},{key:"expectPlugin",value:function(e,t){if(!this.hasPlugin(e))throw this.raiseWithData(null!=t?t:this.state.start,{missingPlugin:[e]},"This experimental syntax requires enabling the parser plugin: '".concat(e,"'"));return!0}},{key:"expectOnePlugin",value:function(e,t){var n=this;if(!e.some((function(e){return n.hasPlugin(e)})))throw this.raiseWithData(null!=t?t:this.state.start,{missingPlugin:e},"This experimental syntax requires enabling one of the following parser plugin(s): '".concat(e.join(", "),"'"))}},{key:"tryParse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state.clone(),n={node:null};try{var r=e((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;throw n.node=e,n}));if(this.state.errors.length>t.errors.length){var i=this.state;return this.state=t,{node:r,error:i.errors[t.errors.length],thrown:!1,aborted:!1,failState:i}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){var a=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:a};if(e===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:a};throw e}}},{key:"checkExpressionErrors",value:function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.unexpected(n),r>=0&&this.raise(r,I.DuplicateProto)}},{key:"isLiteralPropertyName",value:function(){return this.match(y.name)||!!this.state.type.keyword||this.match(y.string)||this.match(y.num)||this.match(y.bigint)||this.match(y.decimal)}}]),n}(function(e){o(n,e);var t=s(n);function n(e,r){var i;return p(this,n),(i=t.call(this)).isLookahead=void 0,i.tokens=[],i.state=new Oe,i.state.init(e),i.input=r,i.length=r.length,i.isLookahead=!1,i}return f(n,[{key:"pushToken",value:function(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}},{key:"next",value:function(){this.isLookahead||(this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Pe(this.state))),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}},{key:"eat",value:function(e){return!!this.match(e)&&(this.next(),!0)}},{key:"match",value:function(e){return this.state.type===e}},{key:"lookahead",value:function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state;return this.state=e,t}},{key:"nextTokenStart",value:function(){return this.nextTokenStartSince(this.state.pos)}},{key:"nextTokenStartSince",value:function(e){return T.lastIndex=e,e+T.exec(this.input)[0].length}},{key:"lookaheadCharCode",value:function(){return this.input.charCodeAt(this.nextTokenStart())}},{key:"setStrict",value:function(e){if(this.state.strict=e,this.match(y.num)||this.match(y.string)){for(this.state.pos=this.state.start;this.state.pos=this.length)this.finishToken(y.eof);else{var t=null==e?void 0:e.override;t?t(this):this.getTokenFromCode(this.input.codePointAt(this.state.pos))}}},{key:"pushComment",value:function(e,t,n,r,i,a){var o={type:e?"CommentBlock":"CommentLine",value:t,start:n,end:r,loc:new O(i,a)};this.options.tokens&&this.pushToken(o),this.state.comments.push(o),this.addComment(o)}},{key:"skipBlockComment",value:function(){var e,t=this.state.curPosition(),n=this.state.pos,r=this.input.indexOf("*/",this.state.pos+2);if(-1===r)throw this.raise(n,I.UnterminatedComment);for(this.state.pos=r+2,x.lastIndex=n;(e=x.exec(this.input))&&e.index=48&&t<=57)throw this.raise(this.state.pos,I.UnexpectedDigitAfterHash);if(123===t||91===t&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"hash"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,123===t?I.RecordExpressionHashIncorrectStartSyntaxType:I.TupleExpressionHashIncorrectStartSyntaxType);123===t?this.finishToken(y.braceHashL):this.finishToken(y.bracketHashL),this.state.pos+=2}else this.finishOp(y.hash,1)}}},{key:"readToken_dot",value:function(){var e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(y.ellipsis)):(++this.state.pos,this.finishToken(y.dot))}},{key:"readToken_slash",value:function(){if(this.state.exprAllowed&&!this.state.inType)return++this.state.pos,void this.readRegexp();61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(y.assign,2):this.finishOp(y.slash,1)}},{key:"readToken_interpreter",value:function(){if(0!==this.state.pos||this.length<2)return!1;var e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;var t=this.state.pos;for(this.state.pos+=1;!k(e)&&++this.state.pos=48&&t<=57?(++this.state.pos,this.finishToken(y.question)):(this.state.pos+=2,this.finishToken(y.questionDot))}},{key:"getTokenFromCode",value:function(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(y.parenL);case 41:return++this.state.pos,void this.finishToken(y.parenR);case 59:return++this.state.pos,void this.finishToken(y.semi);case 44:return++this.state.pos,void this.finishToken(y.comma);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,I.TupleExpressionBarIncorrectStartSyntaxType);this.finishToken(y.bracketBarL),this.state.pos+=2}else++this.state.pos,this.finishToken(y.bracketL);return;case 93:return++this.state.pos,void this.finishToken(y.bracketR);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,I.RecordExpressionBarIncorrectStartSyntaxType);this.finishToken(y.braceBarL),this.state.pos+=2}else++this.state.pos,this.finishToken(y.braceL);return;case 125:return++this.state.pos,void this.finishToken(y.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(y.doubleColon,2):(++this.state.pos,this.finishToken(y.colon)));case 63:return void this.readToken_question();case 96:return++this.state.pos,void this.finishToken(y.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return void this.readRadixNumber(16);if(111===t||79===t)return void this.readRadixNumber(8);if(98===t||66===t)return void this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:case 62:return void this.readToken_lt_gt(e);case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(y.tilde,1);case 64:return++this.state.pos,void this.finishToken(y.at);case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(H(e))return void this.readWord()}throw this.raise(this.state.pos,I.InvalidOrUnexpectedToken,String.fromCodePoint(e))}},{key:"finishOp",value:function(e,t){var n=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,n)}},{key:"readRegexp",value:function(){for(var e,t,n=this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(n,I.UnterminatedRegExp);var r=this.input.charAt(this.state.pos);if(S.test(r))throw this.raise(n,I.UnterminatedRegExp);if(e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.state.pos}var i=this.input.slice(n,this.state.pos);++this.state.pos;for(var a="";this.state.pos-1&&this.raise(this.state.pos+1,I.DuplicateRegExpFlags);else{if(!W(s)&&92!==s)break;this.raise(this.state.pos+1,I.MalformedRegExpFlags)}++this.state.pos,a+=o}this.finishToken(y.regexp,{pattern:i,flags:a})}},{key:"readInt",value:function(e,t,n){for(var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=this.state.pos,a=16===e?Fe.hex:Fe.decBinOct,o=16===e?Le.hex:10===e?Le.dec:8===e?Le.oct:Le.bin,s=!1,u=0,c=0,l=null==t?1/0:t;c=97?d-97+10:d>=65?d-65+10:Ne(d)?d-48:1/0)>=e)if(this.options.errorRecovery&&p<=9)p=0,this.raise(this.state.start+c+2,I.InvalidDigit,e);else{if(!n)break;p=0,s=!0}++this.state.pos,u=u*e+p}else{var f=this.input.charCodeAt(this.state.pos-1),h=this.input.charCodeAt(this.state.pos+1);(-1===o.indexOf(h)||a.indexOf(f)>-1||a.indexOf(h)>-1||Number.isNaN(h))&&this.raise(this.state.pos,I.UnexpectedNumericSeparator),r||this.raise(this.state.pos,I.NumericSeparatorInEscapeSequence),++this.state.pos}}return this.state.pos===i||null!=t&&this.state.pos-i!==t||s?null:u}},{key:"readRadixNumber",value:function(e){var t=this.state.pos,n=!1;this.state.pos+=2;var r=this.readInt(e);null==r&&this.raise(this.state.start+2,I.InvalidDigit,e);var i=this.input.charCodeAt(this.state.pos);if(110===i)++this.state.pos,n=!0;else if(109===i)throw this.raise(t,I.InvalidDecimal);if(H(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,I.NumberIdentifier);if(n){var a=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(y.bigint,a)}else this.finishToken(y.num,r)}},{key:"readNumber",value:function(e){var t=this.state.pos,n=!1,r=!1,i=!1,a=!1,o=!1;e||null!==this.readInt(10)||this.raise(t,I.InvalidNumber);var s=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(s){var u=this.input.slice(t,this.state.pos);if(this.state.strict)this.raise(t,I.StrictOctalLiteral);else{var c=u.indexOf("_");c>0&&this.raise(c+t,I.ZeroDigitNumericSeparator)}o=s&&!/[89]/.test(u)}var l=this.input.charCodeAt(this.state.pos);if(46!==l||o||(++this.state.pos,this.readInt(10),n=!0,l=this.input.charCodeAt(this.state.pos)),69!==l&&101!==l||o||(43!==(l=this.input.charCodeAt(++this.state.pos))&&45!==l||++this.state.pos,null===this.readInt(10)&&this.raise(t,I.InvalidOrMissingExponent),n=!0,a=!0,l=this.input.charCodeAt(this.state.pos)),110===l&&((n||s)&&this.raise(t,I.InvalidBigIntLiteral),++this.state.pos,r=!0),109===l&&(this.expectPlugin("decimal",this.state.pos),(a||s)&&this.raise(t,I.InvalidDecimal),++this.state.pos,i=!0),H(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,I.NumberIdentifier);var d=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(r)this.finishToken(y.bigint,d);else if(i)this.finishToken(y.decimal,d);else{var p=o?parseInt(d,8):parseFloat(d);this.finishToken(y.num,p)}}},{key:"readCodePoint",value:function(e){var t;if(123===this.input.charCodeAt(this.state.pos)){var n=++this.state.pos;if(t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,!0,e),++this.state.pos,null!==t&&t>1114111){if(!e)return null;this.raise(n,I.InvalidCodePoint)}}else t=this.readHexChar(4,!1,e);return t}},{key:"readString",value:function(e){for(var t="",n=++this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,I.UnterminatedString);var r=this.input.charCodeAt(this.state.pos);if(r===e)break;if(92===r)t+=this.input.slice(n,this.state.pos),t+=this.readEscapedChar(!1),n=this.state.pos;else if(8232===r||8233===r)++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;else{if(k(r))throw this.raise(this.state.start,I.UnterminatedString);++this.state.pos}}t+=this.input.slice(n,this.state.pos++),this.finishToken(y.string,t)}},{key:"readTmplToken",value:function(){for(var e="",t=this.state.pos,n=!1;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,I.UnterminatedTemplate);var r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(y.template)?36===r?(this.state.pos+=2,void this.finishToken(y.dollarBraceL)):(++this.state.pos,void this.finishToken(y.backQuote)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(y.template,n?null:e));if(92===r){e+=this.input.slice(t,this.state.pos);var i=this.readEscapedChar(!0);null===i?n=!0:e+=i,t=this.state.pos}else if(k(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}}},{key:"readEscapedChar",value:function(e){var t=!e,n=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,n){case 110:return"\n";case 114:return"\r";case 120:var r=this.readHexChar(2,!1,t);return null===r?null:String.fromCharCode(r);case 117:var i=this.readCodePoint(t);return null===i?null:String.fromCodePoint(i);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return"";case 56:case 57:if(e)return null;this.state.strict&&this.raise(this.state.pos-1,I.StrictNumericEscape);default:if(n>=48&&n<=55){var a=this.state.pos-1,o=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],s=parseInt(o,8);s>255&&(o=o.slice(0,-1),s=parseInt(o,8)),this.state.pos+=o.length-1;var u=this.input.charCodeAt(this.state.pos);if("0"!==o||56===u||57===u){if(e)return null;this.state.strict?this.raise(a,I.StrictNumericEscape):this.state.octalPositions.push(a)}return String.fromCharCode(s)}return String.fromCharCode(n)}}},{key:"readHexChar",value:function(e,t,n){var r=this.state.pos,i=this.readInt(16,e,t,!1);return null===i&&(n?this.raise(r,I.InvalidEscapeSequence):this.state.pos=r-1),i}},{key:"readWord1",value:function(){var e="";this.state.containsEsc=!1;for(var t=this.state.pos,n=this.state.pos;this.state.pos2?n-2:0),i=2;i3?r-3:0),a=3;a0;)r=t[--i];if(null!==r){for(var a=0;a0?r.trailingComments=o:void 0!==r.trailingComments&&(r.trailingComments=[])}}}},{key:"processComment",value:function(e){if(!("Program"===e.type&&e.body.length>0)){var t,n,r,i,a,o=this.state.commentStack;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(r=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(o.length>0){var s=N(o);s.trailingComments&&s.trailingComments[0].start>=e.end&&(r=s.trailingComments,delete s.trailingComments)}for(o.length>0&&N(o).start>=e.start&&(t=o.pop());o.length>0&&N(o).start>=e.start;)n=o.pop();if(!n&&t&&(n=t),t)switch(e.type){case"ObjectExpression":this.adjustCommentsAfterTrailingComma(e,e.properties);break;case"ObjectPattern":this.adjustCommentsAfterTrailingComma(e,e.properties,!0);break;case"CallExpression":this.adjustCommentsAfterTrailingComma(e,e.arguments);break;case"ArrayExpression":this.adjustCommentsAfterTrailingComma(e,e.elements);break;case"ArrayPattern":this.adjustCommentsAfterTrailingComma(e,e.elements,!0)}else this.state.commentPreviousNode&&("ImportSpecifier"===this.state.commentPreviousNode.type&&"ImportSpecifier"!==e.type||"ExportSpecifier"===this.state.commentPreviousNode.type&&"ExportSpecifier"!==e.type)&&this.adjustCommentsAfterTrailingComma(e,[this.state.commentPreviousNode]);if(n){if(n.leadingComments)if(n!==e&&n.leadingComments.length>0&&N(n.leadingComments).end<=e.start)e.leadingComments=n.leadingComments,delete n.leadingComments;else for(i=n.leadingComments.length-2;i>=0;--i)if(n.leadingComments[i].end<=e.start){e.leadingComments=n.leadingComments.splice(0,i+1);break}}else if(this.state.leadingComments.length>0)if(N(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(a=0;a0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(i=0;ie.start);i++);var u=this.state.leadingComments.slice(0,i);u.length&&(e.leadingComments=u),0===(r=this.state.leadingComments.slice(i)).length&&(r=null)}if(this.state.commentPreviousNode=e,r)if(r.length&&r[0].start>=e.start&&N(r).end<=e.end)e.innerComments=r;else{var c=r.findIndex((function(t){return t.end>=e.end}));c>0?(e.innerComments=r.slice(0,c),e.trailingComments=r.slice(c)):e.trailingComments=r}o.push(e)}}}]),n}(function(){function e(){p(this,e),this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}return f(e,[{key:"hasPlugin",value:function(e){return this.plugins.has(e)}},{key:"getPluginOption",value:function(e,t){if(this.hasPlugin(e))return this.plugins.get(e)[t]}}]),e}())))))))));function Je(e,t){var n=Ye;return(null==e?void 0:e.plugins)&&(function(e){if(Ce(e,"decorators")){if(Ce(e,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");var t=Se(e,"decorators","decoratorsBeforeExport");if(null==t)throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.");if("boolean"!=typeof t)throw new Error("'decoratorsBeforeExport' must be a boolean.")}if(Ce(e,"flow")&&Ce(e,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Ce(e,"placeholders")&&Ce(e,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Ce(e,"pipelineOperator")&&!xe.includes(Se(e,"pipelineOperator","proposal")))throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: "+xe.map((function(e){return"'".concat(e,"'")})).join(", "));if(Ce(e,"moduleAttributes")){if(Ce(e,"importAssertions"))throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");if("may-2020"!==Se(e,"moduleAttributes","version"))throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(Ce(e,"recordAndTuple")&&!ke.includes(Se(e,"recordAndTuple","syntaxType")))throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: "+ke.map((function(e){return"'".concat(e,"'")})).join(", "))}(e.plugins),n=function(e){var t=we.filter((function(t){return Ce(e,t)})),n=t.join("/"),r=$e[n];if(!r){r=Ye;for(var i=0;i1?n-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:{};if("babel"===a.parser&&function(e,t){if(t.filepath&&t.filepath.endsWith(".js.flow"))return!0;var n=er(e);n&&(e=e.slice(n.length));var r=Zn(e,0);return!1!==r&&(e=e.slice(0,r)),ir.test(e)}(n,a))return a.parser="babel-flow",sr(n,i,a);var o,s=Xn,c="script"===a.__babelSourceType?"script":"module";try{o=function(e,t){for(var n,r=0;r"),r,[["pipelineOperator",{proposal:"smart"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]]).map((function(e){return function(e){var t=e.sourceType,n=e.extraPlugins;return{sourceType:t,allowAwaitOutsideFunction:!0,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,plugins:["doExpressions","classProperties","exportDefaultFrom","functionBind","functionSent","classPrivateProperties","throwExpressions","classPrivateMethods","v8intrinsic","partialApplication",["decorators",{decoratorsBeforeExport:!1}],"privateIn","importAssertions",["recordAndTuple",{syntaxType:"hash"}],"decimal","moduleStringNames","classStaticBlock"].concat(d(void 0===n?[]:n)),tokens:!0,ranges:!0}}({sourceType:c,extraPlugins:e})})))}catch(t){var l=t.message,p=t.loc;throw e(l.replace(/ \(.*\)/,""),{start:{line:p?p.line:0,column:p?p.column+1:0}})}return Qn(o,Object.assign({},a,{originalText:n}))}}var or=ar("parse",["jsx","flow"]),sr=ar("parse",["jsx",["flow",{all:!0,enums:!0}]]),ur=ar("parse",["jsx","typescript"],["typescript"]),cr=ar("parseExpression",["jsx"]),lr=new Set(["Did not expect a type annotation here.","The only accepted module attribute is `type`","Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`"]);function dr(e){var t=e.errors.find((function(e){return function(e){var t=e.message.match(/(.*?)\s*\(\d+:\d+\)/),n=l(t,2)[1];return lr.has(n)}(e)}));if(t)throw t;return e}function pr(t,n){switch(t.type){case"ArrayExpression":return t.elements.forEach(r);case"ObjectExpression":return t.properties.forEach(r);case"ObjectProperty":if(t.computed)throw i("computed");if(t.shorthand)throw i("shorthand");return[t.key,t.value].forEach(r);case"UnaryExpression":switch(t.operator){case"+":case"-":return r(t.argument);default:throw i("operator")}case"Identifier":if(n&&"ObjectProperty"===n.type&&n.key===t)return;throw i();case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":return;default:throw i()}function r(e){return pr(e,t)}function i(n){var r=n?"".concat(t.type," with ").concat(n,"=").concat(JSON.stringify(t[n])):t.type;return e("".concat(r," is not allowed in JSON."),{start:{line:t.loc.start.line,column:t.loc.start.column+1}})}}var fr={parse:or,astFormat:"estree",hasPragma:tr,locStart:nr,locEnd:rr},hr=Object.assign({},fr,{parse:sr}),gr=Object.assign({},fr,{parse:ur}),mr=Object.assign({},fr,{parse:cr});return{parsers:{babel:fr,"babel-flow":hr,"babel-ts":gr,json:Object.assign({},mr,{hasPragma:function(){return!0}}),json5:mr,"json-stringify":{parse:function(e,t,n){var r=cr(e,t,n);return r.comments.forEach(pr),pr(r),r},astFormat:"estree-json",locStart:nr,locEnd:rr},__js_expression:mr,__vue_expression:mr,__vue_event_binding:fr}}}()}).call(this,n(163))},function(e,t,n){var r=n(165);e.exports=function(){"use strict";var e=function(e,t){var n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n},t={hasPragma:function(e){return/^\s*#[^\S\n]*@(format|prettier)\s*(\n|$)/.test(e)},insertPragma:function(e){return"# @format\n\n"+e}},n={locStart:function(e){return"number"==typeof e.start?e.start:e.loc&&e.loc.start},locEnd:function(e){return"number"==typeof e.end?e.end:e.loc&&e.loc.end}};function i(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var a=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SYMBOL_TO_STRING_TAG=t.SYMBOL_ASYNC_ITERATOR=t.SYMBOL_ITERATOR=void 0;var n="function"==typeof Symbol&&null!=Symbol.iterator?Symbol.iterator:"@@iterator";t.SYMBOL_ITERATOR=n;var r="function"==typeof Symbol&&null!=Symbol.asyncIterator?Symbol.asyncIterator:"@@asyncIterator";t.SYMBOL_ASYNC_ITERATOR=r;var i="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";t.SYMBOL_TO_STRING_TAG=i})),o=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=n})),s=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a(e,[])};var n,r=(n=o)&&n.__esModule?n:{default:n};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){switch(i(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),i=function(e){var t=e[String(r.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==i){var o=i.call(e);if(o!==e)return"string"==typeof o?o:a(o,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}})),u=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(t)}})),c=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(e,t){return e instanceof t}})),l=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isSource=function(e){return(0,i.default)(e,d)},t.Source=void 0;var n=o(s),r=o(u),i=o(c);function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||(0,r.default)(0,"Body must be a string. Received: ".concat((0,n.default)(e),".")),this.body=e,this.name=t,this.locationOffset=i,this.locationOffset.line>0||(0,r.default)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,r.default)(0,"column in locationOffset is 1-indexed and must be positive.")}var t,i,o;return t=e,(i=[{key:a.SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}])&&l(t.prototype,i),o&&l(t,o),e}();t.Source=d})),d=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=function(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,a=t+1;(n=r.exec(e.body))&&n.index120){for(var h=Math.floor(l/80),g=l%80,m=[],_=0;_",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});t.TokenKind=n})),g=i((function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"==n(e)&&null!==e}})),m=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.printError=v,t.GraphQLError=void 0;var n,r=(n=g)&&n.__esModule?n:{default:n};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;no&&n(t[s-1]);)--s;return t.slice(o,s).join("\n")},t.getBlockStringIndentation=r,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],a='"'===e[e.length-1],o="\\"===e[e.length-1],s=!r||a||o||n,u="";return!s||r&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}})),E=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPunctuatorTokenKind=function(e){return e===h.TokenKind.BANG||e===h.TokenKind.DOLLAR||e===h.TokenKind.AMP||e===h.TokenKind.PAREN_L||e===h.TokenKind.PAREN_R||e===h.TokenKind.SPREAD||e===h.TokenKind.COLON||e===h.TokenKind.EQUALS||e===h.TokenKind.AT||e===h.TokenKind.BRACKET_L||e===h.TokenKind.BRACKET_R||e===h.TokenKind.BRACE_L||e===h.TokenKind.PIPE||e===h.TokenKind.BRACE_R},t.Lexer=void 0;var n=function(){function e(e){var t=new b.Token(h.TokenKind.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==h.TokenKind.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=i(this,e)}while(e.kind===h.TokenKind.COMMENT);return e},e}();function r(e){return isNaN(e)?h.TokenKind.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function i(e,t){for(var n=e.source,r=n.body,i=r.length,u=t.end;u31||9===a));return new b.Token(h.TokenKind.COMMENT,t,s,n,r,i,o.slice(t+1,s))}function s(e,t,n,i,a,o){var s=e.body,c=n,l=t,d=!1;if(45===c&&(c=s.charCodeAt(++l)),48===c){if((c=s.charCodeAt(++l))>=48&&c<=57)throw(0,_.syntaxError)(e,l,"Invalid number, unexpected digit after 0: ".concat(r(c),"."))}else l=u(e,l,c),c=s.charCodeAt(l);if(46===c&&(d=!0,c=s.charCodeAt(++l),l=u(e,l,c),c=s.charCodeAt(l)),69!==c&&101!==c||(d=!0,43!==(c=s.charCodeAt(++l))&&45!==c||(c=s.charCodeAt(++l)),l=u(e,l,c),c=s.charCodeAt(l)),46===c||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(c))throw(0,_.syntaxError)(e,l,"Invalid number, expected digit but got: ".concat(r(c),"."));return new b.Token(d?h.TokenKind.FLOAT:h.TokenKind.INT,t,l,i,a,o,s.slice(t,l))}function u(e,t,n){var i=e.body,a=t,o=n;if(o>=48&&o<=57){do{o=i.charCodeAt(++a)}while(o>=48&&o<=57);return a}throw(0,_.syntaxError)(e,a,"Invalid number, expected digit but got: ".concat(r(o),"."))}function c(e,t,n,i,a){for(var o,s,u,c,l=e.body,p=t+1,f=p,g=0,m="";p=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function p(e,t,n,r,i){for(var a=e.body,o=a.length,s=t+1,u=0;s!==o&&!isNaN(u=a.charCodeAt(s))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new b.Token(h.TokenKind.NAME,t,s,n,r,i,a.slice(t,s))}t.Lexer=n})),C=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveLocation=void 0;var n=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});t.DirectiveLocation=n})),S=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e,t){return new n(e,t).parseDocument()},t.parseValue=function(e,t){var r=new n(e,t);r.expectToken(h.TokenKind.SOF);var i=r.parseValueLiteral(!1);return r.expectToken(h.TokenKind.EOF),i},t.parseType=function(e,t){var r=new n(e,t);r.expectToken(h.TokenKind.SOF);var i=r.parseTypeReference();return r.expectToken(h.TokenKind.EOF),i},t.Parser=void 0;var n=function(){function e(e,t){var n=(0,l.isSource)(e)?e:new l.Source(e);this._lexer=new E.Lexer(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(h.TokenKind.NAME);return{kind:f.Kind.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:f.Kind.DOCUMENT,definitions:this.many(h.TokenKind.SOF,this.parseDefinition,h.TokenKind.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(h.TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(h.TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(h.TokenKind.BRACE_L))return{kind:f.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(h.TokenKind.NAME)&&(t=this.parseName()),{kind:f.Kind.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(h.TokenKind.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(h.TokenKind.PAREN_L,this.parseVariableDefinition,h.TokenKind.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:f.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(h.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(h.TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(h.TokenKind.DOLLAR),{kind:f.Kind.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:f.Kind.SELECTION_SET,selections:this.many(h.TokenKind.BRACE_L,this.parseSelection,h.TokenKind.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(h.TokenKind.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(h.TokenKind.COLON)?(e=r,t=this.parseName()):t=r,{kind:f.Kind.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(h.TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(h.TokenKind.PAREN_L,t,h.TokenKind.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(h.TokenKind.COLON),{kind:f.Kind.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:f.Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(h.TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(h.TokenKind.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(h.TokenKind.NAME)?{kind:f.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:f.Kind.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:f.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:f.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case h.TokenKind.BRACKET_L:return this.parseList(e);case h.TokenKind.BRACE_L:return this.parseObject(e);case h.TokenKind.INT:return this._lexer.advance(),{kind:f.Kind.INT,value:t.value,loc:this.loc(t)};case h.TokenKind.FLOAT:return this._lexer.advance(),{kind:f.Kind.FLOAT,value:t.value,loc:this.loc(t)};case h.TokenKind.STRING:case h.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case h.TokenKind.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:f.Kind.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:f.Kind.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:f.Kind.NULL,loc:this.loc(t)};default:return{kind:f.Kind.ENUM,value:t.value,loc:this.loc(t)}}case h.TokenKind.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:f.Kind.STRING,value:e.value,block:e.kind===h.TokenKind.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:f.Kind.LIST,values:this.any(h.TokenKind.BRACKET_L,(function(){return t.parseValueLiteral(e)}),h.TokenKind.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:f.Kind.OBJECT,fields:this.any(h.TokenKind.BRACE_L,(function(){return t.parseObjectField(e)}),h.TokenKind.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(h.TokenKind.COLON),{kind:f.Kind.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(h.TokenKind.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(h.TokenKind.AT),{kind:f.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(h.TokenKind.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(h.TokenKind.BRACKET_R),e={kind:f.Kind.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(h.TokenKind.BANG)?{kind:f.Kind.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:f.Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===h.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(h.TokenKind.STRING)||this.peek(h.TokenKind.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(h.TokenKind.BRACE_L,this.parseOperationTypeDefinition,h.TokenKind.BRACE_R);return{kind:f.Kind.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(h.TokenKind.COLON);var n=this.parseNamedType();return{kind:f.Kind.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:f.Kind.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:f.Kind.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(h.TokenKind.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(h.TokenKind.AMP)||this.peek(h.TokenKind.NAME));return t}return this.delimitedMany(h.TokenKind.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(h.TokenKind.BRACE_L)&&this._lexer.lookahead().kind===h.TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(h.TokenKind.BRACE_L,this.parseFieldDefinition,h.TokenKind.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(h.TokenKind.COLON);var i=this.parseTypeReference(),a=this.parseDirectives(!0);return{kind:f.Kind.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:a,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(h.TokenKind.PAREN_L,this.parseInputValueDef,h.TokenKind.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(h.TokenKind.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(h.TokenKind.EQUALS)&&(r=this.parseValueLiteral(!0));var a=this.parseDirectives(!0);return{kind:f.Kind.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:a,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:f.Kind.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:f.Kind.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(h.TokenKind.EQUALS)?this.delimitedMany(h.TokenKind.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:f.Kind.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(h.TokenKind.BRACE_L,this.parseEnumValueDefinition,h.TokenKind.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:f.Kind.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:f.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(h.TokenKind.BRACE_L,this.parseInputValueDef,h.TokenKind.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===h.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(h.TokenKind.BRACE_L,this.parseOperationTypeDefinition,h.TokenKind.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:f.Kind.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:f.Kind.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:f.Kind.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:f.Kind.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:f.Kind.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:f.Kind.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:f.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(h.TokenKind.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var a=this.parseDirectiveLocations();return{kind:f.Kind.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:a,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(h.TokenKind.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==C.DirectiveLocation[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new b.Location(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw(0,_.syntaxError)(this._lexer.source,t.start,"Expected ".concat(i(e),", found ").concat(r(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==h.TokenKind.NAME||t.value!==e)throw(0,_.syntaxError)(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(r(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===h.TokenKind.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return(0,_.syntaxError)(this._lexer.source,t.start,"Unexpected ".concat(r(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function r(e){var t=e.value;return i(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function i(e){return(0,E.isPunctuatorTokenKind)(e)?'"'.concat(e,'"'):e}t.Parser=n})),x=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,s=void 0,u=Array.isArray(e),c=[e],l=-1,d=[],p=void 0,f=void 0,h=void 0,g=[],m=[],_=e;do{var v=++l===c.length,y=v&&0!==d.length;if(v){if(f=0===m.length?void 0:g[g.length-1],p=h,h=m.pop(),y){if(u)p=p.slice();else{for(var D={},E=0,C=Object.keys(p);E80&&(l=c+o("(\n",s(i(r,"\n")),"\n)")),i([l,i(a," "),u]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+o(" ",i(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return i(["...",o("on ",t),i(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,a=e.directives,s=e.selectionSet;return"fragment ".concat(t).concat(o("(",i(r,", "),")")," ")+"on ".concat(n," ").concat(o("",i(a," ")," "))+s},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,D.printBlockString)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+i(e.values,", ")+"]"},ObjectValue:function(e){return"{"+i(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+o("(",i(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:r((function(e){var t=e.directives,n=e.operationTypes;return i(["schema",i(t," "),a(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:r((function(e){return i(["scalar",e.name,i(e.directives," ")]," ")})),ObjectTypeDefinition:r((function(e){var t=e.name,n=e.interfaces,r=e.directives,s=e.fields;return i(["type",t,o("implements ",i(n," & ")),i(r," "),a(s)]," ")})),FieldDefinition:r((function(e){var t=e.name,n=e.arguments,r=e.type,a=e.directives;return t+(c(n)?o("(\n",s(i(n,"\n")),"\n)"):o("(",i(n,", "),")"))+": "+r+o(" ",i(a," "))})),InputValueDefinition:r((function(e){var t=e.name,n=e.type,r=e.defaultValue,a=e.directives;return i([t+": "+n,o("= ",r),i(a," ")]," ")})),InterfaceTypeDefinition:r((function(e){var t=e.name,n=e.interfaces,r=e.directives,s=e.fields;return i(["interface",t,o("implements ",i(n," & ")),i(r," "),a(s)]," ")})),UnionTypeDefinition:r((function(e){var t=e.name,n=e.directives,r=e.types;return i(["union",t,i(n," "),r&&0!==r.length?"= "+i(r," | "):""]," ")})),EnumTypeDefinition:r((function(e){var t=e.name,n=e.directives,r=e.values;return i(["enum",t,i(n," "),a(r)]," ")})),EnumValueDefinition:r((function(e){return i([e.name,i(e.directives," ")]," ")})),InputObjectTypeDefinition:r((function(e){var t=e.name,n=e.directives,r=e.fields;return i(["input",t,i(n," "),a(r)]," ")})),DirectiveDefinition:r((function(e){var t=e.name,n=e.arguments,r=e.repeatable,a=e.locations;return"directive @"+t+(c(n)?o("(\n",s(i(n,"\n")),"\n)"):o("(",i(n,", "),")"))+(r?" repeatable":"")+" on "+i(a," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return i(["extend schema",i(t," "),a(n)]," ")},ScalarTypeExtension:function(e){return i(["extend scalar",e.name,i(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,s=e.fields;return i(["extend type",t,o("implements ",i(n," & ")),i(r," "),a(s)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,s=e.fields;return i(["extend interface",t,o("implements ",i(n," & ")),i(r," "),a(s)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return i(["extend union",t,i(n," "),r&&0!==r.length?"= "+i(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return i(["extend enum",t,i(n," "),a(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return i(["extend input",t,i(n," "),a(r)]," ")}};function r(e){return function(t){return i([t.description,e(t)],"\n")}}function i(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function a(e){return o("{\n",s(i(e,"\n")),"\n}")}function o(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function s(e){return o(" ",e.replace(/\n/g,"\n "))}function u(e){return-1!==e.indexOf("\n")}function c(e){return null!=e&&e.some(u)}})),T=i((function(e,t){function n(e){return e.kind===f.Kind.OPERATION_DEFINITION||e.kind===f.Kind.FRAGMENT_DEFINITION}function r(e){return e.kind===f.Kind.SCHEMA_DEFINITION||i(e)||e.kind===f.Kind.DIRECTIVE_DEFINITION}function i(e){return e.kind===f.Kind.SCALAR_TYPE_DEFINITION||e.kind===f.Kind.OBJECT_TYPE_DEFINITION||e.kind===f.Kind.INTERFACE_TYPE_DEFINITION||e.kind===f.Kind.UNION_TYPE_DEFINITION||e.kind===f.Kind.ENUM_TYPE_DEFINITION||e.kind===f.Kind.INPUT_OBJECT_TYPE_DEFINITION}function a(e){return e.kind===f.Kind.SCHEMA_EXTENSION||o(e)}function o(e){return e.kind===f.Kind.SCALAR_TYPE_EXTENSION||e.kind===f.Kind.OBJECT_TYPE_EXTENSION||e.kind===f.Kind.INTERFACE_TYPE_EXTENSION||e.kind===f.Kind.UNION_TYPE_EXTENSION||e.kind===f.Kind.ENUM_TYPE_EXTENSION||e.kind===f.Kind.INPUT_OBJECT_TYPE_EXTENSION}Object.defineProperty(t,"__esModule",{value:!0}),t.isDefinitionNode=function(e){return n(e)||r(e)||a(e)},t.isExecutableDefinitionNode=n,t.isSelectionNode=function(e){return e.kind===f.Kind.FIELD||e.kind===f.Kind.FRAGMENT_SPREAD||e.kind===f.Kind.INLINE_FRAGMENT},t.isValueNode=function(e){return e.kind===f.Kind.VARIABLE||e.kind===f.Kind.INT||e.kind===f.Kind.FLOAT||e.kind===f.Kind.STRING||e.kind===f.Kind.BOOLEAN||e.kind===f.Kind.NULL||e.kind===f.Kind.ENUM||e.kind===f.Kind.LIST||e.kind===f.Kind.OBJECT},t.isTypeNode=function(e){return e.kind===f.Kind.NAMED_TYPE||e.kind===f.Kind.LIST_TYPE||e.kind===f.Kind.NON_NULL_TYPE},t.isTypeSystemDefinitionNode=r,t.isTypeDefinitionNode=i,t.isTypeSystemExtensionNode=a,t.isTypeExtensionNode=o})),w=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return l.Source}}),Object.defineProperty(t,"getLocation",{enumerable:!0,get:function(){return d.getLocation}}),Object.defineProperty(t,"printLocation",{enumerable:!0,get:function(){return p.printLocation}}),Object.defineProperty(t,"printSourceLocation",{enumerable:!0,get:function(){return p.printSourceLocation}}),Object.defineProperty(t,"Kind",{enumerable:!0,get:function(){return f.Kind}}),Object.defineProperty(t,"TokenKind",{enumerable:!0,get:function(){return h.TokenKind}}),Object.defineProperty(t,"Lexer",{enumerable:!0,get:function(){return E.Lexer}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return S.parse}}),Object.defineProperty(t,"parseValue",{enumerable:!0,get:function(){return S.parseValue}}),Object.defineProperty(t,"parseType",{enumerable:!0,get:function(){return S.parseType}}),Object.defineProperty(t,"print",{enumerable:!0,get:function(){return k.print}}),Object.defineProperty(t,"visit",{enumerable:!0,get:function(){return x.visit}}),Object.defineProperty(t,"visitInParallel",{enumerable:!0,get:function(){return x.visitInParallel}}),Object.defineProperty(t,"getVisitFn",{enumerable:!0,get:function(){return x.getVisitFn}}),Object.defineProperty(t,"BREAK",{enumerable:!0,get:function(){return x.BREAK}}),Object.defineProperty(t,"Location",{enumerable:!0,get:function(){return b.Location}}),Object.defineProperty(t,"Token",{enumerable:!0,get:function(){return b.Token}}),Object.defineProperty(t,"isDefinitionNode",{enumerable:!0,get:function(){return T.isDefinitionNode}}),Object.defineProperty(t,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return T.isExecutableDefinitionNode}}),Object.defineProperty(t,"isSelectionNode",{enumerable:!0,get:function(){return T.isSelectionNode}}),Object.defineProperty(t,"isValueNode",{enumerable:!0,get:function(){return T.isValueNode}}),Object.defineProperty(t,"isTypeNode",{enumerable:!0,get:function(){return T.isTypeNode}}),Object.defineProperty(t,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return T.isTypeSystemDefinitionNode}}),Object.defineProperty(t,"isTypeDefinitionNode",{enumerable:!0,get:function(){return T.isTypeDefinitionNode}}),Object.defineProperty(t,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return T.isTypeSystemExtensionNode}}),Object.defineProperty(t,"isTypeExtensionNode",{enumerable:!0,get:function(){return T.isTypeExtensionNode}}),Object.defineProperty(t,"DirectiveLocation",{enumerable:!0,get:function(){return C.DirectiveLocation}})})),A=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.locatedError=function(e,t,n){var i,a=e instanceof Error?e:new Error("Unexpected error value: "+(0,r.default)(e));return Array.isArray(a.path)?a:new m.GraphQLError(a.message,null!==(i=a.nodes)&&void 0!==i?i:t,a.source,a.positions,n,a)};var n,r=(n=s)&&n.__esModule?n:{default:n}})),O=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatError=function(e){var t;e||(0,r.default)(0,"Received null or undefined error.");var n=null!==(t=e.message)&&void 0!==t?t:"An unknown error occurred.",i=e.locations,a=e.path,o=e.extensions;return o?{message:n,locations:i,path:a,extensions:o}:{message:n,locations:i,path:a}};var n,r=(n=u)&&n.__esModule?n:{default:n}})),N=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"GraphQLError",{enumerable:!0,get:function(){return m.GraphQLError}}),Object.defineProperty(t,"printError",{enumerable:!0,get:function(){return m.printError}}),Object.defineProperty(t,"syntaxError",{enumerable:!0,get:function(){return _.syntaxError}}),Object.defineProperty(t,"locatedError",{enumerable:!0,get:function(){return A.locatedError}}),Object.defineProperty(t,"formatError",{enumerable:!0,get:function(){return O.formatError}})})),I=t.hasPragma,F=n.locStart,L=n.locEnd;function P(e){if(e&&"object"==typeof e)for(var t in delete e.startToken,delete e.endToken,delete e.prev,delete e.next,e)P(e[t]);return e}return{parsers:{graphql:{parse:function(t){var n=w;try{var a=function(e,t){var n={allowLegacySDLImplementsInterfaces:!1,experimentalFragmentVariables:!0};try{return e(t,n)}catch(i){return n.allowLegacySDLImplementsInterfaces=!0,e(t,n)}}(n.parse,t);return a.comments=function(e){for(var t=[],n=e.loc.startToken.next;""!==n.kind;)"Comment"===n.kind&&(Object.assign(n,{column:n.column-1}),t.push(n)),n=n.next;return t}(a),P(a),a}catch(t){if(t instanceof N.GraphQLError){var o=t.message,s=r(t.locations,1)[0];throw e(o,{start:s})}throw t}},astFormat:"graphql",hasPragma:I,locStart:F,locEnd:L}}}}()},function(e,t,n){(function(t){var r=n(230),i=n(193),a=n(155),o=n(124),s=n(133),u=n(175),c=n(156),l=n(164),d=n(165),p=n(88),f=n(93);e.exports=function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof t?t:"undefined"!=typeof self?self:{};function n(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var h=n((function(e,t){function n(e){return t.$0<=e&&e<=t.$9}Object.defineProperty(t,"__esModule",{value:!0}),t.$EOF=0,t.$BSPACE=8,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63,t.$0=48,t.$7=55,t.$9=57,t.$A=65,t.$E=69,t.$F=70,t.$X=88,t.$Z=90,t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93,t.$CARET=94,t.$_=95,t.$a=97,t.$b=98,t.$e=101,t.$f=102,t.$n=110,t.$r=114,t.$t=116,t.$u=117,t.$v=118,t.$x=120,t.$z=122,t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125,t.$NBSP=160,t.$PIPE=124,t.$TILDA=126,t.$AT=64,t.$BT=96,t.isWhitespace=function(e){return e>=t.$TAB&&e<=t.$SPACE||e==t.$NBSP},t.isDigit=n,t.isAsciiLetter=function(e){return e>=t.$a&&e<=t.$z||e>=t.$A&&e<=t.$Z},t.isAsciiHexDigit=function(e){return e>=t.$a&&e<=t.$f||e>=t.$A&&e<=t.$F||n(e)},t.isNewLine=function(e){return e===t.$LF||e===t.$CR},t.isOctalDigit=function(e){return t.$0<=e&&e<=t.$7}})),g=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n,r){p(this,e),this.filePath=t,this.name=n,this.members=r}return f(e,[{key:"assertNoMembers",value:function(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got ".concat(JSON.stringify(this),"."))}}]),e}();t.StaticSymbol=n,t.StaticSymbolCache=function(){function e(){p(this,e),this.cache=new Map}return f(e,[{key:"get",value:function(e,t,r){var i=(r=r||[]).length?".".concat(r.join(".")):"",a='"'.concat(e,'".').concat(t).concat(i),o=this.cache.get(a);return o||(o=new n(e,t,r),this.cache.set(a,o)),o}}]),e}()})),m=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=/-+([a-z0-9])/g;function i(e,t,n){var r=e.indexOf(t);return-1==r?n:[e.slice(0,r).trim(),e.slice(r+1).trim()]}function a(e,t,n){return Array.isArray(e)?t.visitArray(e,n):"object"==typeof(r=e)&&null!==r&&Object.getPrototypeOf(r)===u?t.visitStringMap(e,n):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?t.visitPrimitive(e,n):t.visitOther(e,n);var r}n.dashCaseToCamelCase=function(e){return e.replace(r,(function(){for(var e=arguments.length,t=new Array(e),n=0;n=55296&&r<=56319&&e.length>n+1){var i=e.charCodeAt(n+1);i>=56320&&i<=57343&&(n++,r=(r-55296<<10)+i-56320+65536)}r<=127?t+=String.fromCharCode(r):r<=2047?t+=String.fromCharCode(r>>6&31|192,63&r|128):r<=65535?t+=String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128):r<=2097151&&(t+=String.fromCharCode(r>>18&7|240,r>>12&63|128,r>>6&63|128,63&r|128))}return t},n.stringify=function e(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(e).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);if(!t.toString)return"object";var n=t.toString();if(null==n)return""+n;var r=n.indexOf("\n");return-1===r?n:n.substring(0,r)},n.resolveForwardRef=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e},n.isPromise=c,n.Version=function(){function e(t){p(this,e),this.full=t;var n=t.split(".");this.major=n[0],this.minor=n[1],this.patch=n.slice(2).join(".")}return e}();var l="undefined"!=typeof window&&window,d="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,h=void 0!==e&&e||l||d;n.global=h})),_=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function r(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=r;var i,a=0;function o(e){if(!e||!e.reference)return null;var t=e.reference;if(t instanceof g.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;var n=m.stringify(t);return n.indexOf("(")>=0?(n="anonymous_".concat(a++),t.__anonymousType=n):n=r(n),n}t.identifierName=o,t.identifierModuleUrl=function(e){var t=e.reference;return t instanceof g.StaticSymbol?t.filePath:"./".concat(m.stringify(t))},t.viewClassName=function(e,t){return"View_".concat(o({reference:e}),"_").concat(t)},t.rendererTypeName=function(e){return"RenderType_".concat(o({reference:e}))},t.hostViewClassName=function(e){return"HostView_".concat(o({reference:e}))},t.componentFactoryName=function(e){return"".concat(o({reference:e}),"NgFactory")},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(i=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?r(e.value):o(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value},t.CompileStylesheetMetadata=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.moduleUrl,r=t.styles,i=t.styleUrls;p(this,e),this.moduleUrl=n||null,this.styles=u(r),this.styleUrls=u(i)}return e}(),t.CompileTemplateMetadata=function(){function e(t){var n=t.encapsulation,r=t.template,i=t.templateUrl,a=t.htmlAst,o=t.styles,s=t.styleUrls,l=t.externalStylesheets,d=t.animations,f=t.ngContentSelectors,h=t.interpolation,g=t.isInline,m=t.preserveWhitespaces;if(p(this,e),this.encapsulation=n,this.template=r,this.templateUrl=i,this.htmlAst=a,this.styles=u(o),this.styleUrls=u(s),this.externalStylesheets=u(l),this.animations=d?c(d):[],this.ngContentSelectors=f||[],h&&2!=h.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=h,this.isInline=g,this.preserveWhitespaces=m}return f(e,[{key:"toSummary",value:function(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}}]),e}();var s=function(){function e(t){var n=t.isHost,r=t.type,i=t.isComponent,a=t.selector,o=t.exportAs,s=t.changeDetection,c=t.inputs,l=t.outputs,d=t.hostListeners,f=t.hostProperties,h=t.hostAttributes,g=t.providers,m=t.viewProviders,_=t.queries,v=t.guards,y=t.viewQueries,b=t.entryComponents,D=t.template,E=t.componentViewType,C=t.rendererType,S=t.componentFactory;p(this,e),this.isHost=!!n,this.type=r,this.isComponent=i,this.selector=a,this.exportAs=o,this.changeDetection=s,this.inputs=c,this.outputs=l,this.hostListeners=d,this.hostProperties=f,this.hostAttributes=h,this.providers=u(g),this.viewProviders=u(m),this.queries=u(_),this.guards=v,this.viewQueries=u(y),this.entryComponents=u(b),this.template=D,this.componentViewType=E,this.rendererType=C,this.componentFactory=S}return f(e,null,[{key:"create",value:function(t){var r=t.isHost,i=t.type,a=t.isComponent,o=t.selector,s=t.exportAs,u=t.changeDetection,c=t.inputs,l=t.outputs,d=t.host,p=t.providers,f=t.viewProviders,h=t.queries,g=t.guards,_=t.viewQueries,v=t.entryComponents,y=t.template,b=t.componentViewType,D=t.rendererType,E=t.componentFactory,C={},S={},x={};null!=d&&Object.keys(d).forEach((function(e){var t=d[e],r=e.match(n);null===r?x[e]=t:null!=r[1]?S[r[1]]=t:null!=r[2]&&(C[r[2]]=t)}));var k={};null!=c&&c.forEach((function(e){var t=m.splitAtColon(e,[e,e]);k[t[0]]=t[1]}));var T={};return null!=l&&l.forEach((function(e){var t=m.splitAtColon(e,[e,e]);T[t[0]]=t[1]})),new e({isHost:r,type:i,isComponent:!!a,selector:o,exportAs:s,changeDetection:u,inputs:k,outputs:T,hostListeners:C,hostProperties:S,hostAttributes:x,providers:p,viewProviders:f,queries:h,guards:g,viewQueries:_,entryComponents:v,template:y,componentViewType:b,rendererType:D,componentFactory:E})}}]),f(e,[{key:"toSummary",value:function(){return{summaryKind:i.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}}}]),e}();function u(e){return e||[]}function c(e){return e.reduce((function(e,t){var n=Array.isArray(t)?c(t):t;return e.concat(n)}),[])}function l(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}t.CompileDirectiveMetadata=s,t.CompilePipeMetadata=function(){function e(t){var n=t.type,r=t.name,i=t.pure;p(this,e),this.type=n,this.name=r,this.pure=!!i}return f(e,[{key:"toSummary",value:function(){return{summaryKind:i.Pipe,type:this.type,name:this.name,pure:this.pure}}}]),e}(),t.CompileShallowModuleMetadata=function(){function e(){p(this,e)}return e}(),t.CompileNgModuleMetadata=function(){function e(t){var n=t.type,r=t.providers,i=t.declaredDirectives,a=t.exportedDirectives,o=t.declaredPipes,s=t.exportedPipes,c=t.entryComponents,l=t.bootstrapComponents,d=t.importedModules,f=t.exportedModules,h=t.schemas,g=t.transitiveModule,m=t.id;p(this,e),this.type=n||null,this.declaredDirectives=u(i),this.exportedDirectives=u(a),this.declaredPipes=u(o),this.exportedPipes=u(s),this.providers=u(r),this.entryComponents=u(c),this.bootstrapComponents=u(l),this.importedModules=u(d),this.exportedModules=u(f),this.schemas=u(h),this.id=m||null,this.transitiveModule=g||null}return f(e,[{key:"toSummary",value:function(){var e=this.transitiveModule;return{summaryKind:i.NgModule,type:this.type,entryComponents:e.entryComponents,providers:e.providers,modules:e.modules,exportedDirectives:e.exportedDirectives,exportedPipes:e.exportedPipes}}}]),e}(),t.TransitiveCompileNgModuleMetadata=function(){function e(){p(this,e),this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}return f(e,[{key:"addProvider",value:function(e,t){this.providers.push({provider:e,module:t})}},{key:"addDirective",value:function(e){this.directivesSet.has(e.reference)||(this.directivesSet.add(e.reference),this.directives.push(e))}},{key:"addExportedDirective",value:function(e){this.exportedDirectivesSet.has(e.reference)||(this.exportedDirectivesSet.add(e.reference),this.exportedDirectives.push(e))}},{key:"addPipe",value:function(e){this.pipesSet.has(e.reference)||(this.pipesSet.add(e.reference),this.pipes.push(e))}},{key:"addExportedPipe",value:function(e){this.exportedPipesSet.has(e.reference)||(this.exportedPipesSet.add(e.reference),this.exportedPipes.push(e))}},{key:"addModule",value:function(e){this.modulesSet.has(e.reference)||(this.modulesSet.add(e.reference),this.modules.push(e))}},{key:"addEntryComponent",value:function(e){this.entryComponentsSet.has(e.componentType)||(this.entryComponentsSet.add(e.componentType),this.entryComponents.push(e))}}]),e}(),t.ProviderMeta=function(){function e(t,n){var r=n.useClass,i=n.useValue,a=n.useExisting,o=n.useFactory,s=n.deps,u=n.multi;p(this,e),this.token=t,this.useClass=r||null,this.useValue=i,this.useExisting=a,this.useFactory=o||null,this.dependencies=s||null,this.multi=!!u}return e}(),t.flatten=c,t.templateSourceUrl=function(e,t,n){var r;return r=n.isInline?t.type.reference instanceof g.StaticSymbol?"".concat(t.type.reference.filePath,".").concat(t.type.reference.name,".html"):"".concat(o(e),"/").concat(o(t.type),".html"):n.templateUrl,t.type.reference instanceof g.StaticSymbol?r:l(r)},t.sharedStylesheetJitUrl=function(e,t){var n=e.moduleUrl.split(/\/\\/g),r=n[n.length-1];return l("css/".concat(t).concat(r,".ngstyle.js"))},t.ngModuleJitUrl=function(e){return l("".concat(o(e.type),"/module.ngfactory.js"))},t.templateJitUrl=function(e,t){return l("".concat(o(e),"/").concat(o(t.type),".ngfactory.js"))}})),v=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n,r,i){p(this,e),this.file=t,this.offset=n,this.line=r,this.col=i}return f(e,[{key:"toString",value:function(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url}},{key:"moveBy",value:function(t){for(var n=this.file.content,r=n.length,i=this.offset,a=this.line,o=this.col;i>0&&t<0;)if(i--,t++,n.charCodeAt(i)==h.$LF){a--;var s=n.substr(0,i-1).lastIndexOf(String.fromCharCode(h.$LF));o=s>0?i-s:i}else o--;for(;i0;){var u=n.charCodeAt(i);i++,t--,u==h.$LF?(a++,o=0):o++}return new e(this.file,i,a,o)}},{key:"getContext",value:function(e,t){var n=this.file.content,r=this.offset;if(null!=r){r>n.length-1&&(r=n.length-1);for(var i=r,a=0,o=0;a0&&(a++,"\n"!=n[--r]||++o!=t););for(a=0,o=0;a2&&void 0!==arguments[2]?arguments[2]:null;p(this,e),this.start=t,this.end=n,this.details=r}return f(e,[{key:"toString",value:function(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}]),e}();t.ParseSourceSpan=a,t.EMPTY_PARSE_LOCATION=new n(new r("",""),0,0,0),t.EMPTY_SOURCE_SPAN=new a(t.EMPTY_PARSE_LOCATION,t.EMPTY_PARSE_LOCATION),function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(i=t.ParseErrorLevel||(t.ParseErrorLevel={})),t.ParseError=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.ERROR;p(this,e),this.span=t,this.msg=n,this.level=r}return f(e,[{key:"contextualMessage",value:function(){var e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(i[this.level]," ->]").concat(e.after,'")'):this.msg}},{key:"toString",value:function(){var e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e)}}]),e}(),t.typeSourceSpan=function(e,t){var i=_.identifierModuleUrl(t),o=null!=i?"in ".concat(e," ").concat(_.identifierName(t)," in ").concat(i):"in ".concat(e," ").concat(_.identifierName(t)),s=new r("",o);return new a(new n(s,-1,-1,-1),new n(s,-1,-1,-1))},t.r3JitTypeSourceSpan=function(e,t,i){var o="in ".concat(e," ").concat(t," in ").concat(i),s=new r("",o);return new a(new n(s,-1,-1,-1),new n(s,-1,-1,-1))}})),y=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function b(e){return{type:"concat",parts:e}}function D(e){return{type:"indent",contents:e}}function E(e,t){return{type:"align",contents:t,n:e}}function C(e,t){return{type:"group",id:(t=t||{}).id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}var S={type:"break-parent"},x=b([{type:"line",hard:!0},S]),k=b([{type:"line",hard:!0,literal:!0},S]),T={concat:b,join:function(e,t){for(var n=[],r=0;r0){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{}).onlyFirst,t=void 0!==e&&e,n=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(n,t?void 0:"g")}(),""):e},A=function(e){return!Number.isNaN(e)&&e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)},O=A,N=A;O.default=N;var I=function(e){if("string"!=typeof(e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===e.length)return 0;e=w(e);for(var t=0,n=0;n=127&&r<=159||r>=768&&r<=879||(r>65535&&n++,t+=O(r)?2:1)}return t},F=I,L=I;function P(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}F.default=L;var R="undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function M(){throw new Error("setTimeout has not been defined")}function B(){throw new Error("clearTimeout has not been defined")}var j=M,U=B;function V(e){if(j===setTimeout)return setTimeout(e,0);if((j===M||!j)&&setTimeout)return j=setTimeout,setTimeout(e,0);try{return j(e,0)}catch(n){try{return j.call(null,e,0)}catch(n){return j.call(this,e,0)}}}"function"==typeof R.setTimeout&&(j=setTimeout),"function"==typeof R.clearTimeout&&(U=clearTimeout);var z,H=[],W=!1,K=-1;function q(){W&&z&&(W=!1,z.length?H=z.concat(H):K=-1,H.length&&G())}function G(){if(!W){var e=V(q);W=!0;for(var t=H.length;t;){for(z=H,H=[];++K1)for(var n=1;n)?=?)"),s("XRANGEIDENTIFIERLOOSE","".concat(i[a.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),s("XRANGEIDENTIFIER","".concat(i[a.NUMERICIDENTIFIER],"|x|X|\\*")),s("XRANGEPLAIN","[v=\\s]*(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:".concat(i[a.PRERELEASE],")?").concat(i[a.BUILD],"?")+")?)?"),s("XRANGEPLAINLOOSE","[v=\\s]*(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(i[a.PRERELEASELOOSE],")?").concat(i[a.BUILD],"?")+")?)?"),s("XRANGE","^".concat(i[a.GTLT],"\\s*").concat(i[a.XRANGEPLAIN],"$")),s("XRANGELOOSE","^".concat(i[a.GTLT],"\\s*").concat(i[a.XRANGEPLAINLOOSE],"$")),s("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:$|[^\\d])"),s("COERCERTL",i[a.COERCE],!0),s("LONETILDE","(?:~>?)"),s("TILDETRIM","(\\s*)".concat(i[a.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",s("TILDE","^".concat(i[a.LONETILDE]).concat(i[a.XRANGEPLAIN],"$")),s("TILDELOOSE","^".concat(i[a.LONETILDE]).concat(i[a.XRANGEPLAINLOOSE],"$")),s("LONECARET","(?:\\^)"),s("CARETTRIM","(\\s*)".concat(i[a.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",s("CARET","^".concat(i[a.LONECARET]).concat(i[a.XRANGEPLAIN],"$")),s("CARETLOOSE","^".concat(i[a.LONECARET]).concat(i[a.XRANGEPLAINLOOSE],"$")),s("COMPARATORLOOSE","^".concat(i[a.GTLT],"\\s*(").concat(i[a.LOOSEPLAIN],")$|^$")),s("COMPARATOR","^".concat(i[a.GTLT],"\\s*(").concat(i[a.FULLPLAIN],")$|^$")),s("COMPARATORTRIM","(\\s*)".concat(i[a.GTLT],"\\s*(").concat(i[a.LOOSEPLAIN],"|").concat(i[a.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",s("HYPHENRANGE","^\\s*(".concat(i[a.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(i[a.XRANGEPLAIN],")")+"\\s*$"),s("HYPHENRANGELOOSE","^\\s*(".concat(i[a.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(i[a.XRANGEPLAINLOOSE],")")+"\\s*$"),s("STAR","(<|>)?=?\\s*\\*"),s("GTE0","^\\s*>=\\s*0.0.0\\s*$"),s("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")})),le=/^[0-9]+$/,de=function(e,t){var n=le.test(e),r=le.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:efe)throw new TypeError("version is longer than ".concat(fe," characters"));se("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var r=t.trim().match(n.loose?ge[me.LOOSE]:ge[me.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>he||this.major<0)throw new TypeError("Invalid major version");if(this.minor>he||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>he||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}(),ye=function(e,t,n){return new ve(e,n).compare(new ve(t,n))},be=function(e,t,n){return ye(e,t,n)<0},De=function(e,t,n){return ye(e,t,n)>=0},Ee="2.2.1";function Ce(){var e=P(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]);return Ce=function(){return e},e}function Se(){var e=P(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]);return Se=function(){return e},e}function xe(){var e=P(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]);return xe=function(){return e},e}function ke(){var e=P(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]);return ke=function(){return e},e}function Te(){var e=P(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "]);return Te=function(){return e},e}function we(){var e=P(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]);return we=function(){return e},e}var Ae=n((function(e,t){function n(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.plugins,n=void 0===t?[]:t,r=e.showUnreleased,i=void 0!==r&&r,a=e.showDeprecated,o=void 0!==a&&a,s=e.showInternal,p=void 0!==s&&s,f=Me.split("-",1)[0],h=n.reduce((function(e,t){return e.concat(t.languages||[])}),[]).filter(m),g=function(e,t){return Object.entries(e).map((function(e){var n=d(e,2),r=n[0],i=n[1];return Object.assign(l({},t,r),i)}))}(Object.assign.apply(Object,[{}].concat(c(n.map((function(e){return e.options}))),[Be])),"name").filter((function(e){return m(e)&&_(e)})).sort((function(e,t){return e.name===t.name?0:e.name=0||(i[n]=e[n]);return i}(e,["cliName","cliCategory","cliDescription"])})).map((function(e){e=Object.assign({},e),Array.isArray(e.default)&&(e.default=1===e.default.length?e.default[0].value:e.default.filter(m).sort((function(e,t){return Re.compare(t.since,e.since)}))[0].value),Array.isArray(e.choices)&&(e.choices=e.choices.filter((function(e){return m(e)&&_(e)})),"parser"===e.name&&function(e,t,n){var r,i=new Set(e.choices.map((function(e){return e.value}))),a=u(t);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(o.parsers){var s,c=u(o.parsers);try{var l=function(){var t=s.value;if(!i.has(t)){i.add(t);var r=n.find((function(e){return e.parsers&&e.parsers[t]})),a=o.name;r&&r.name&&(a+=" (plugin: ".concat(r.name,")")),e.choices.push({value:t,description:a})}};for(c.s();!(s=c.n()).done;)l()}catch(d){c.e(d)}finally{c.f()}}}}catch(d){a.e(d)}finally{a.f()}}(e,h,n));var t=n.filter((function(t){return t.defaultOptions&&void 0!==t.defaultOptions[e.name]})).reduce((function(t,n){return t[n.name]=n.defaultOptions[e.name],t}),{});return Object.assign({},e,{pluginDefaults:t})}));return{languages:h,options:g};function m(e){return i||!("since"in e)||e.since&&Re.gte(f,e.since)}function _(e){return o||!("deprecated"in e)||e.deprecated&&Re.lt(f,e.deprecated)}},Ue=/[^\x20-\x7F]/;function Ve(e){return function(t,n,r){var i=r&&r.backwards;if(!1===n)return!1;for(var a=t.length,o=n;o>=0&&o(n.match(o.regex)||[]).length?o.quote:a.quote),s}function tt(e,t,n){var r='"'===t?"'":'"',i=e.replace(/\\([\S\s])|(["'])/g,(function(e,i,a){return i===r?i:a===t?"\\"+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)}));return t+i+t}function nt(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,"JSXText"===e.type&&(t.printed=!0)}var rt,it={inferParserByLanguage:function(e,t){var n=je({plugins:t.plugins}).languages,r=n.find((function(t){return t.name.toLowerCase()===e}))||n.find((function(t){var n=t.aliases;return Array.isArray(n)&&n.includes(e)}))||n.find((function(t){var n=t.extensions;return Array.isArray(n)&&n.includes(".".concat(e))}));return r&&r.parsers[0]},replaceEndOfLineWith:function(e,t){var n,r=[],i=u(e.split("\n"));try{for(i.s();!(n=i.n()).done;){var a=n.value;0!==r.length&&r.push(t),r.push(a)}}catch(o){i.e(o)}finally{i.f()}return r},getStringWidth:function(e){return e?Ue.test(e)?F(e):e.length:0},getMaxContinuousCount:function(e,t){var n=e.match(new RegExp("(".concat(y(t),")+"),"g"));return null===n?0:n.reduce((function(e,n){return Math.max(e,n.length/t.length)}),0)},getMinNotPresentContinuousCount:function(e,t){var n=e.match(new RegExp("(".concat(y(t),")+"),"g"));if(null===n)return 0;var r,i=new Map,a=0,o=u(n);try{for(o.s();!(r=o.n()).done;){var s=r.value.length/t.length;i.set(s,!0),s>a&&(a=s)}}catch(l){o.e(l)}finally{o.f()}for(var c=1;c=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"},convertEndOfLineToChars:function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}},countEndOfLineChars:function(e,t){var n;if("\n"===t)n=/\n/g;else if("\r"===t)n=/\r/g;else{if("\r\n"!==t)throw new Error('Unexpected "eol" '.concat(JSON.stringify(t),"."));n=/\r\n/g}var r=e.match(n);return r?r.length:0},normalizeEndOfLine:function(e){return e.replace(/\r\n?/g,"\n")}},ot=it.getStringWidth,st=at.convertEndOfLineToChars,ut=T.concat,ct=T.fill,lt=T.cursor;function dt(e,t){return ft(e,{type:"indent"},t)}function pt(e,t,n){return t===-1/0?e.root||{value:"",length:0,queue:[]}:t<0?ft(e,{type:"dedent"},n):t?"root"===t.type?Object.assign({},e,{root:e}):ft(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},n):e}function ft(e,t,n){var r,i="dedent"===t.type?e.queue.slice(0,-1):e.queue.concat(t),a="",o=0,s=0,c=0,l=u(i);try{for(l.s();!(r=l.n()).done;){var d=r.value;switch(d.type){case"indent":h(),n.useTabs?p(1):f(n.tabWidth);break;case"stringAlign":h(),a+=d.n,o+=d.n.length;break;case"numberAlign":s+=1,c+=d.n;break;default:throw new Error("Unexpected type '".concat(d.type,"'"))}}}catch(_){l.e(_)}finally{l.f()}return g(),Object.assign({},e,{value:a,length:o,queue:i});function p(e){a+="\t".repeat(e),o+=n.tabWidth*e}function f(e){a+=" ".repeat(e),o+=e}function h(){n.useTabs?(s>0&&p(s),m()):g()}function g(){c>0&&f(c),m()}function m(){s=0,c=0}}function ht(e){if(0===e.length)return 0;for(var t=0;e.length>0&&"string"==typeof e[e.length-1]&&e[e.length-1].match(/^[\t ]*$/);)t+=e.pop().length;if(e.length&&"string"==typeof e[e.length-1]){var n=e[e.length-1].replace(/[\t ]*$/,"");t+=e[e.length-1].length-n.length,e[e.length-1]=n}return t}function gt(e,t,n,r,i){for(var a=t.length,o=[e],s=[];n>=0;)if(0!==o.length){var u=o.pop(),c=d(u,3),l=c[0],p=c[1],f=c[2];if("string"==typeof f)s.push(f),n-=ot(f);else switch(f.type){case"concat":for(var h=f.parts.length-1;h>=0;h--)o.push([l,p,f.parts[h]]);break;case"indent":o.push([dt(l,r),p,f.contents]);break;case"align":o.push([pt(l,f.n,r),p,f.contents]);break;case"trim":n+=ht(s);break;case"group":if(i&&f.break)return!1;o.push([l,f.break?1:p,f.contents]),f.id&&(rt[f.id]=o[o.length-1][1]);break;case"fill":for(var g=f.parts.length-1;g>=0;g--)o.push([l,p,f.parts[g]]);break;case"if-break":var m=f.groupId?rt[f.groupId]:p;1===m&&f.breakContents&&o.push([l,p,f.breakContents]),2===m&&f.flatContents&&o.push([l,p,f.flatContents]);break;case"line":switch(p){case 2:if(!f.hard){f.soft||(s.push(" "),n-=1);break}return!0;case 1:return!0}}}else{if(0===a)return!0;o.push(t[a-1]),a--}return!1}var mt={printDocToString:function(e,t){rt={};for(var n=t.printWidth,r=st(t.endOfLine),i=0,a=[[{value:"",length:0,queue:[]},1,e]],o=[],s=!1,u=[];0!==a.length;){var l=a.pop(),p=d(l,3),f=p[0],h=p[1],g=p[2];if("string"==typeof g){var m="\n"!==r&&g.includes("\n")?g.replace(/\n/g,r):g;o.push(m),i+=ot(m)}else switch(g.type){case"cursor":o.push(lt.placeholder);break;case"concat":for(var _=g.parts.length-1;_>=0;_--)a.push([f,h,g.parts[_]]);break;case"indent":a.push([dt(f,t),h,g.contents]);break;case"align":a.push([pt(f,g.n,t),h,g.contents]);break;case"trim":i-=ht(o);break;case"group":switch(h){case 2:if(!s){a.push([f,g.break?1:2,g.contents]);break}case 1:s=!1;var v=[f,2,g.contents],y=n-i;if(!g.break&>(v,a,y,t))a.push(v);else if(g.expandedStates){var b=g.expandedStates[g.expandedStates.length-1];if(g.break){a.push([f,1,b]);break}for(var D=1;D=g.expandedStates.length){a.push([f,1,b]);break}var E=[f,2,g.expandedStates[D]];if(gt(E,a,y,t)){a.push(E);break}}}else a.push([f,1,g.contents])}g.id&&(rt[g.id]=a[a.length-1][1]);break;case"fill":var C=n-i,S=g.parts;if(0===S.length)break;var x=d(S,2),k=x[0],T=x[1],w=[f,2,k],A=[f,1,k],O=gt(w,[],C,t,!0);if(1===S.length){O?a.push(w):a.push(A);break}var N=[f,2,T],I=[f,1,T];if(2===S.length){O?(a.push(N),a.push(w)):(a.push(I),a.push(A));break}S.splice(0,2);var F=[f,h,ct(S)],L=S[0];gt([f,2,ut([k,T,L])],[],C,t,!0)?(a.push(F),a.push(N),a.push(w)):O?(a.push(F),a.push(I),a.push(w)):(a.push(F),a.push(I),a.push(A));break;case"if-break":var P=g.groupId?rt[g.groupId]:h;1===P&&g.breakContents&&a.push([f,h,g.breakContents]),2===P&&g.flatContents&&a.push([f,h,g.flatContents]);break;case"line-suffix":u.push([f,h,g.contents]);break;case"line-suffix-boundary":u.length>0&&a.push([f,h,{type:"line",hard:!0}]);break;case"line":switch(h){case 2:if(!g.hard){g.soft||(o.push(" "),i+=1);break}s=!0;case 1:if(u.length){a.push([f,h,g]),a.push.apply(a,c(u.reverse())),u=[];break}g.literal?f.root?(o.push(r,f.root.value),i=f.root.length):(o.push(r),i=0):(i-=ht(o),o.push(r+f.value),i=f.length)}}0===a.length&&u.length&&(a.push.apply(a,c(u.reverse())),u=[])}var R=o.indexOf(lt.placeholder);if(-1!==R){var M=o.indexOf(lt.placeholder,R+1),B=o.slice(0,R).join(""),j=o.slice(R+1,M).join("");return{formatted:B+j+o.slice(M+1).join(""),cursorNodeStart:B.length,cursorNodeText:j}}return{formatted:o.join("")}}},_t=T.literalline,vt=T.concat,yt={};function bt(e,t,n,r){for(var i=[e];0!==i.length;){var a=i.pop();if(a!==yt){if(n&&i.push(a,yt),!t||!1!==t(a))if("concat"===a.type||"fill"===a.type)for(var o=a.parts.length-1;o>=0;--o)i.push(a.parts[o]);else if("if-break"===a.type)a.flatContents&&i.push(a.flatContents),a.breakContents&&i.push(a.breakContents);else if("group"===a.type&&a.expandedStates)if(r)for(var s=a.expandedStates.length-1;s>=0;--s)i.push(a.expandedStates[s]);else i.push(a.contents);else a.contents&&i.push(a.contents)}else n(i.pop())}}function Dt(e,t){if("concat"===e.type||"fill"===e.type){var n=e.parts.map((function(e){return Dt(e,t)}));return t(Object.assign({},e,{parts:n}))}if("if-break"===e.type){var r=e.breakContents&&Dt(e.breakContents,t),i=e.flatContents&&Dt(e.flatContents,t);return t(Object.assign({},e,{breakContents:r,flatContents:i}))}if(e.contents){var a=Dt(e.contents,t);return t(Object.assign({},e,{contents:a}))}return t(e)}function Et(e,t,n){var r=n,i=!1;return bt(e,(function(e){var n=t(e);if(void 0!==n&&(i=!0,r=n),i)return!1})),r}function Ct(e){return"string"!=typeof e&&("line"===e.type||void 0)}function St(e){return!("group"!==e.type||!e.break)||!("line"!==e.type||!e.hard)||"break-parent"===e.type||void 0}function xt(e){if(e.length>0){var t=e[e.length-1];t.expandedStates||(t.break=!0)}return null}function kt(e){return"line"!==e.type||e.hard?"if-break"===e.type?e.flatContents||"":e:e.soft?"":" "}function Tt(e){for(var t=[],n=e.filter(Boolean);0!==n.length;){var r=n.shift();r&&("concat"!==r.type?0===t.length||"string"!=typeof t[t.length-1]||"string"!=typeof r?t.push(r):t[t.length-1]+=r:n.unshift.apply(n,c(r.parts)))}return t}function wt(e){if("concat"===e.type){for(var t=[],n=0;n1&&void 0!==arguments[1]&&arguments[1];if("concat"===t.type&&0!==t.parts.length){var r=n?function(e){for(var t,n=e.parts,r=e.parts.length;r>0&&!t;r--)t=n[r-1];return"group"===t.type&&(n=t.contents.parts),n}(t):t.parts,i=r[r.length-1];if("concat"===i.type)return 2===i.parts.length&&i.parts[0].hard&&"break-parent"===i.parts[1].type?{type:"concat",parts:r.slice(0,-1)}:{type:"concat",parts:t.parts.slice(0,-1).concat(e(i))}}return t},normalizeParts:Tt,normalizeDoc:function(e){return Dt(e,(function(e){return e.parts?Object.assign({},e,{parts:Tt(e.parts)}):e}))},replaceNewlinesWithLiterallines:function(e){return Dt(e,(function(e){return"string"==typeof e&&e.includes("\n")?vt(e.split(/(\n)/g).map((function(e,t){return t%2==0?e:_t}))):e}))}},debug:{printDocToDebug:function(e){return At(wt(e))}}}.builders,Nt=Ot.hardline,It=Ot.concat,Ft=Ot.markAsRoot,Lt={"---":"yaml","+++":"toml"},Pt={parse:function(e){var t=Object.keys(Lt).map(y).join("|"),n=e.match(new RegExp("^(".concat(t,")([^\\n]*)\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));if(null===n)return{frontMatter:null,content:e};var r=d(n,4),i=r[0],a=r[1],o=r[2],s=r[3],u=Lt[a];return"toml"!==u&&o&&o.trim()&&(u=o.trim()),{frontMatter:{type:"front-matter",lang:u,value:s,raw:i.replace(/\n$/,"")},content:i.replace(/[^\n]/g," ")+e.slice(i.length)}},print:function(e,t){if("yaml"===e.lang){var n=e.value.trim(),r=n?t(n,{parser:"yaml"},{stripTrailingHardline:!0}):"";return Ft(It(["---",Nt,r,r?Nt:"","---"]))}}},Rt=function(e,t){var n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n},Mt={"*":["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","slot","spellcheck","style","tabindex","title","translate"],a:["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],abbr:["title"],applet:["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],area:["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],base:["href","target"],basefont:["color","face","size"],bdo:["dir"],blockquote:["cite"],body:["alink","background","bgcolor","link","text","vlink"],br:["clear"],button:["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],canvas:["height","width"],caption:["align"],col:["align","char","charoff","span","valign","width"],colgroup:["align","char","charoff","span","valign","width"],data:["value"],del:["cite","datetime"],details:["open"],dfn:["title"],dialog:["open"],dir:["compact"],div:["align"],dl:["compact"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],font:["color","face","size"],form:["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],frame:["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],frameset:["cols","rows"],h1:["align"],h2:["align"],h3:["align"],h4:["align"],h5:["align"],h6:["align"],head:["profile"],hr:["align","noshade","size","width"],html:["manifest","version"],iframe:["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],img:["align","alt","border","crossorigin","decoding","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],input:["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value","width"],ins:["cite","datetime"],isindex:["prompt"],label:["accesskey","for","form"],legend:["accesskey","align"],li:["type","value"],link:["as","charset","color","crossorigin","disabled","href","hreflang","imagesizes","imagesrcset","integrity","media","nonce","referrerpolicy","rel","rev","sizes","target","title","type"],map:["name"],menu:["compact"],meta:["charset","content","http-equiv","name","scheme"],meter:["high","low","max","min","optimum","value"],object:["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","tabindex","type","typemustmatch","usemap","vspace","width"],ol:["compact","reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["for","form","name"],p:["align"],param:["name","type","value","valuetype"],pre:["width"],progress:["max","value"],q:["cite"],script:["async","charset","crossorigin","defer","integrity","language","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","autofocus","disabled","form","multiple","name","required","size","tabindex"],slot:["name"],source:["media","sizes","src","srcset","type"],style:["media","nonce","title","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],tbody:["align","char","charoff","valign"],td:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],textarea:["accesskey","autocomplete","autofocus","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","tabindex","wrap"],tfoot:["align","char","charoff","valign"],th:["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"],thead:["align","char","charoff","valign"],time:["datetime"],tr:["align","bgcolor","char","charoff","valign"],track:["default","kind","label","src","srclang"],ul:["compact","type"],video:["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"]},Bt=it.inferParserByLanguage,jt=it.isFrontMatterNode,Ut={CSS_DISPLAY_TAGS:{area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",fieldset:"block",button:"inline-block",details:"block",summary:"block",dialog:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},CSS_DISPLAY_DEFAULT:"inline",CSS_WHITE_SPACE_TAGS:{listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"},CSS_WHITE_SPACE_DEFAULT:"normal"},Vt=Ut.CSS_DISPLAY_TAGS,zt=Ut.CSS_DISPLAY_DEFAULT,Ht=Ut.CSS_WHITE_SPACE_TAGS,Wt=Ut.CSS_WHITE_SPACE_DEFAULT,Kt=Jt(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]),qt=function(e,t){for(var n=Object.create(null),r=0,i=Object.keys(e);re.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function on(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function sn(e){var t=e.attrMap,n=t.type,r=t.lang;return"module"===n||"text/javascript"===n||"text/babel"===n||"application/javascript"===n||"jsx"===r?"babel":"application/x-typescript"===n||"ts"===r||"tsx"===r?"typescript":"text/markdown"===n?"markdown":"text/html"===n?"html":n&&(n.endsWith("json")||n.endsWith("importmap"))?"json":"text/x-handlebars-template"===n?"glimmer":void 0}function un(e){return"block"===e||"list-item"===e||e.startsWith("table")}function cn(e){return dn(e).startsWith("pre")}function ln(e){return"element"===e.type&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}function dn(e){return"element"===e.type&&(!e.namespace||ln(e))&&Ht[e.name]||Wt}var pn=new Set(["template","style","script"]);function fn(e,t){return hn(e,t)&&!pn.has(e.fullName)}function hn(e,t){return"vue"===t.parser&&"element"===e.type&&"root"===e.parent.type&&"html"!==e.fullName.toLowerCase()}function gn(e,t){return hn(e,t)&&(fn(e,t)||e.attrMap.lang&&"html"!==e.attrMap.lang)}var mn={HTML_ELEMENT_ATTRIBUTES:qt,HTML_TAGS:Kt,htmlTrim:function(e){return function(e){return e.replace(/^[\t\n\f\r ]+/,"")}(Yt(e))},htmlTrimPreserveIndentation:function(e){return function(e){return e.replace(/^[\t\f\r ]*?\n/g,"")}(Yt(e))},splitByHtmlWhitespace:function(e){return e.split(/[\t\n\f\r ]+/)},hasHtmlWhitespace:function(e){return/[\t\n\f\r ]/.test(e)},getLeadingAndTrailingHtmlWhitespace:function(e){var t=e.match(/^([\t\n\f\r ]*)([\S\s]*?)([\t\n\f\r ]*)$/),n=d(t,4),r=n[1],i=n[2];return{leadingWhitespace:r,trailingWhitespace:n[3],text:i}},canHaveInterpolation:function(e){return e.children&&!Xt(e)},countChars:function(e,t){for(var n=0,r=0;r=0;r--){var i=e.stack[r];i&&"object"==typeof i&&!Array.isArray(i)&&t(i)&&n++}return n},dedentString:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){var t,n,r=1/0,i=u(e.split("\n"));try{for(i.s();!(t=i.n()).done;){var a=t.value;if(0!==a.length){if(!Gt.has(a[0]))return 0;var o=(n=a,n.match(/^[\t\n\f\r ]*/)[0]).length;a.length!==o&&o/.test(e)},insertPragma:function(e){return"\x3c!-- @format --\x3e\n\n"+e.replace(/^\s*\n/,"")}},vn={attrs:!0,children:!0};function yn(e,t){var n=e.map(t);return n.some((function(t,n){return t!==e[n]}))?n:e}function bn(e,t){var n=Object.keys(t).reduce((function(e,n){return e[n]={value:t[n],enumerable:!1},e}),{});Object.defineProperties(e,n)}var Dn={Node:function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e);for(var n=0,r=Object.keys(t);n)([\S\s]*?)",Gt:"\u226b",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",hArr:"\u21d4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",Hfr:"\u210c",hfr:"\ud835\udd25",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",Hopf:"\u210d",hopf:"\ud835\udd59",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210b",hscr:"\ud835\udcbd",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",Ifr:"\u2111",ifr:"\ud835\udd26",Igrave:"\xcc",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",Int:"\u222c",int:"\u222b",intcal:"\u22ba",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\ud835\udd40",iopf:"\ud835\udd5a",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",Iscr:"\u2110",iscr:"\ud835\udcbe",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\ud835\udd0d",jfr:"\ud835\udd27",jmath:"\u0237",Jopf:"\ud835\udd41",jopf:"\ud835\udd5b",Jscr:"\ud835\udca5",jscr:"\ud835\udcbf",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\ud835\udd0e",kfr:"\ud835\udd28",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\ud835\udd42",kopf:"\ud835\udd5c",Kscr:"\ud835\udca6",kscr:"\ud835\udcc0",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",Lang:"\u27ea",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",Larr:"\u219e",lArr:"\u21d0",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",lAtail:"\u291b",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lBarr:"\u290e",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",Leftarrow:"\u21d0",leftarrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\ud835\udd0f",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22d8",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lnE:"\u2268",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftarrow:"\u27f5",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\ud835\udd43",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\ud835\udcc1",Lsh:"\u21b0",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",LT:"<",Lt:"\u226a",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\ud835\udd44",mopf:"\ud835\udd5e",mp:"\u2213",Mscr:"\u2133",mscr:"\ud835\udcc2",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21d7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\ud835\udd11",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlArr:"\u21cd",nlarr:"\u219a",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21cd",nleftarrow:"\u219a",nLeftrightarrow:"\u21ce",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",nopf:"\ud835\udd5f",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nRightarrow:"\u21cf",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\ud835\udca9",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nVDash:"\u22af",nVdash:"\u22ae",nvDash:"\u22ad",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwArr:"\u21d6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",Ocirc:"\xd4",ocirc:"\xf4",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\ud835\udd12",ofr:"\ud835\udd2c",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\ud835\udd46",oopf:"\ud835\udd60",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",Or:"\u2a54",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\ud835\udcaa",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",Otimes:"\u2a37",otimes:"\u2297",otimesas:"\u2a36",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\ud835\udd13",pfr:"\ud835\udd2d",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",Popf:"\u2119",popf:"\ud835\udd61",pound:"\xa3",Pr:"\u2abb",pr:"\u227a",prap:"\u2ab7",prcue:"\u227c",prE:"\u2ab3",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportion:"\u2237",Proportional:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\ud835\udcab",pscr:"\ud835\udcc5",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\ud835\udd14",qfr:"\ud835\udd2e",qint:"\u2a0c",Qopf:"\u211a",qopf:"\ud835\udd62",qprime:"\u2057",Qscr:"\ud835\udcac",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",QUOT:'"',quot:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",Rang:"\u27eb",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",Rarr:"\u21a0",rArr:"\u21d2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",rAtail:"\u291c",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",RBarr:"\u2910",rBarr:"\u290f",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",Re:"\u211c",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",REG:"\xae",reg:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",Rfr:"\u211c",rfr:"\ud835\udd2f",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u03f1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",Rightarrow:"\u21d2",rightarrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",Ropf:"\u211d",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",Rscr:"\u211b",rscr:"\ud835\udcc7",Rsh:"\u21b1",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",Sc:"\u2abc",sc:"\u227b",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227d",scE:"\u2ab4",sce:"\u2ab0",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",searhk:"\u2925",seArr:"\u21d8",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\ud835\udd16",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",Sopf:"\ud835\udd4a",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",Square:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",Sscr:"\ud835\udcae",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",Sub:"\u22d0",sub:"\u2282",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",Subset:"\u22d0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",Sum:"\u2211",sum:"\u2211",sung:"\u266a",Sup:"\u22d1",sup:"\u2283",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",Supset:"\u22d1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swArr:"\u21d9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:"\t",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\ud835\udd17",tfr:"\ud835\udd31",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",Tilde:"\u223c",tilde:"\u02dc",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",Topf:"\ud835\udd4b",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\ud835\udcaf",tscr:"\ud835\udcc9",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",Uarr:"\u219f",uArr:"\u21d1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\ud835\udd18",ufr:"\ud835\udd32",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\ud835\udd4c",uopf:"\ud835\udd66",UpArrow:"\u2191",Uparrow:"\u21d1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",Updownarrow:"\u21d5",updownarrow:"\u2195",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",upsi:"\u03c5",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTee:"\u22a5",UpTeeArrow:"\u21a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\ud835\udcb0",uscr:"\ud835\udcca",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",vArr:"\u21d5",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",Vbar:"\u2aeb",vBar:"\u2ae8",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22ab",Vdash:"\u22a9",vDash:"\u22a8",vdash:"\u22a2",Vdashl:"\u2ae6",Vee:"\u22c1",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\ud835\udd4d",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\ud835\udcb1",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",Wedge:"\u22c0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\ud835\udd1a",wfr:"\ud835\udd34",Wopf:"\ud835\udd4e",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\ud835\udcb2",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\ud835\udd1b",xfr:"\ud835\udd35",xhArr:"\u27fa",xharr:"\u27f7",Xi:"\u039e",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",Xopf:"\ud835\udd4f",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",Xscr:"\ud835\udcb3",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\ud835\udd1c",yfr:"\ud835\udd36",YIcy:"\u0407",yicy:"\u0457",Yopf:"\ud835\udd50",yopf:"\ud835\udd6a",Yscr:"\ud835\udcb4",yscr:"\ud835\udcce",YUcy:"\u042e",yucy:"\u044e",Yuml:"\u0178",yuml:"\xff",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",Zfr:"\u2128",zfr:"\ud835\udd37",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",Zopf:"\u2124",zopf:"\ud835\udd6b",Zscr:"\ud835\udcb5",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"},t.NGSP_UNICODE="\ue500",t.NAMED_ENTITIES.ngsp=t.NGSP_UNICODE})),Tn=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n,r,i=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.closedByChildren,i=n.implicitNamespacePrefix,a=n.contentType,o=void 0===a?kn.TagContentType.PARSABLE_DATA:a,s=n.closedByParent,u=void 0!==s&&s,c=n.isVoid,l=void 0!==c&&c,d=n.ignoreFirstLf,f=void 0!==d&&d;p(this,e),this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,r&&r.length>0&&r.forEach((function(e){return t.closedByChildren[e]=!0})),this.isVoid=l,this.closedByParent=u||l,this.implicitNamespacePrefix=i||null,this.contentType=o,this.ignoreFirstLf=f}return f(e,[{key:"isClosedByChild",value:function(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}]),e}();t.HtmlTagDefinition=i,t.getHtmlTagDefinition=function(e){return r||(n=new i,r={base:new i({isVoid:!0}),meta:new i({isVoid:!0}),area:new i({isVoid:!0}),embed:new i({isVoid:!0}),link:new i({isVoid:!0}),img:new i({isVoid:!0}),input:new i({isVoid:!0}),param:new i({isVoid:!0}),hr:new i({isVoid:!0}),br:new i({isVoid:!0}),source:new i({isVoid:!0}),track:new i({isVoid:!0}),wbr:new i({isVoid:!0}),p:new i({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new i({closedByChildren:["tbody","tfoot"]}),tbody:new i({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new i({closedByChildren:["tbody"],closedByParent:!0}),tr:new i({closedByChildren:["tr"],closedByParent:!0}),td:new i({closedByChildren:["td","th"],closedByParent:!0}),th:new i({closedByChildren:["td","th"],closedByParent:!0}),col:new i({isVoid:!0}),svg:new i({implicitNamespacePrefix:"svg"}),math:new i({implicitNamespacePrefix:"math"}),li:new i({closedByChildren:["li"],closedByParent:!0}),dt:new i({closedByChildren:["dt","dd"]}),dd:new i({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new i({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new i({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new i({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new i({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new i({closedByChildren:["optgroup"],closedByParent:!0}),option:new i({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new i({ignoreFirstLf:!0}),listing:new i({ignoreFirstLf:!0}),style:new i({contentType:kn.TagContentType.RAW_TEXT}),script:new i({contentType:kn.TagContentType.RAW_TEXT}),title:new i({contentType:kn.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new i({contentType:kn.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),r[e]||n}})),wn=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AstPath=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;p(this,e),this.path=t,this.position=n}return f(e,[{key:"parentOf",value:function(e){return e&&this.path[this.path.indexOf(e)-1]}},{key:"childOf",value:function(e){return this.path[this.path.indexOf(e)+1]}},{key:"first",value:function(e){for(var t=this.path.length-1;t>=0;t--){var n=this.path[t];if(n instanceof e)return n}}},{key:"push",value:function(e){this.path.push(e)}},{key:"pop",value:function(){return this.path.pop()}},{key:"empty",get:function(){return!this.path||!this.path.length}},{key:"head",get:function(){return this.path[0]}},{key:"tail",get:function(){return this.path[this.path.length-1]}}]),e}()})),An=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Text=function(){function e(t,n,r){p(this,e),this.value=t,this.sourceSpan=n,this.i18n=r}return f(e,[{key:"visit",value:function(e,t){return e.visitText(this,t)}}]),e}(),t.CDATA=function(){function e(t,n){p(this,e),this.value=t,this.sourceSpan=n}return f(e,[{key:"visit",value:function(e,t){return e.visitCdata(this,t)}}]),e}(),t.Expansion=function(){function e(t,n,r,i,a,o){p(this,e),this.switchValue=t,this.type=n,this.cases=r,this.sourceSpan=i,this.switchValueSourceSpan=a,this.i18n=o}return f(e,[{key:"visit",value:function(e,t){return e.visitExpansion(this,t)}}]),e}(),t.ExpansionCase=function(){function e(t,n,r,i,a){p(this,e),this.value=t,this.expression=n,this.sourceSpan=r,this.valueSourceSpan=i,this.expSourceSpan=a}return f(e,[{key:"visit",value:function(e,t){return e.visitExpansionCase(this,t)}}]),e}(),t.Attribute=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;p(this,e),this.name=t,this.value=n,this.sourceSpan=r,this.valueSpan=i,this.nameSpan=a,this.i18n=o}return f(e,[{key:"visit",value:function(e,t){return e.visitAttribute(this,t)}}]),e}();var n=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;p(this,e),this.name=t,this.attrs=n,this.children=r,this.sourceSpan=i,this.startSourceSpan=a,this.endSourceSpan=o,this.nameSpan=s,this.i18n=u}return f(e,[{key:"visit",value:function(e,t){return e.visitElement(this,t)}}]),e}();function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=[],i=e.visit?function(t){return e.visit(t,n)||t.visit(e,n)}:function(t){return t.visit(e,n)};return t.forEach((function(e){var t=i(e);t&&r.push(t)})),r}t.Element=n,t.Comment=function(){function e(t,n){p(this,e),this.value=t,this.sourceSpan=n}return f(e,[{key:"visit",value:function(e,t){return e.visitComment(this,t)}}]),e}(),t.DocType=function(){function e(t,n){p(this,e),this.value=t,this.sourceSpan=n}return f(e,[{key:"visit",value:function(e,t){return e.visitDocType(this,t)}}]),e}(),t.visitAll=r;var i=function(){function e(){p(this,e)}return f(e,[{key:"visitElement",value:function(e,t){this.visitChildren(t,(function(t){t(e.attrs),t(e.children)}))}},{key:"visitAttribute",value:function(e,t){}},{key:"visitText",value:function(e,t){}},{key:"visitCdata",value:function(e,t){}},{key:"visitComment",value:function(e,t){}},{key:"visitDocType",value:function(e,t){}},{key:"visitExpansion",value:function(e,t){return this.visitChildren(t,(function(t){t(e.cases)}))}},{key:"visitExpansionCase",value:function(e,t){}},{key:"visitChildren",value:function(e,t){var n=[],i=this;return t((function(t){t&&n.push(r(i,t,e))})),Array.prototype.concat.apply([],n)}}]),e}();function a(e){var t=e.sourceSpan.start.offset,r=e.sourceSpan.end.offset;return e instanceof n&&(e.endSourceSpan?r=e.endSourceSpan.end.offset:e.children&&e.children.length&&(r=a(e.children[e.children.length-1]).end)),{start:t,end:r}}t.RecursiveVisitor=i,t.findNode=function(e,t){var n=[];return r(new(function(e){o(i,e);var r=s(i);function i(){return p(this,i),r.apply(this,arguments)}return f(i,[{key:"visit",value:function(e,r){var i=a(e);if(!(i.start<=t&&t]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];t.assertInterpolationSymbols=function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected '".concat(e,"' to be an array, [start, end]."));if(null!=t){var r=t[0],i=t[1];n.forEach((function(e){if(e.test(r)||e.test(i))throw new Error("['".concat(r,"', '").concat(i,"'] contains unusable interpolation symbol."))}))}}})),Nn=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n){p(this,e),this.start=t,this.end=n}return f(e,null,[{key:"fromArray",value:function(n){return n?(On.assertInterpolationSymbols("interpolation",n),new e(n[0],n[1])):t.DEFAULT_INTERPOLATION_CONFIG}}]),e}();t.InterpolationConfig=n,t.DEFAULT_INTERPOLATION_CONFIG=new n("{{","}}")})),In=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n,u=h;!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_QUOTE=12]="ATTR_QUOTE",e[e.ATTR_VALUE=13]="ATTR_VALUE",e[e.DOC_TYPE_START=14]="DOC_TYPE_START",e[e.DOC_TYPE_END=15]="DOC_TYPE_END",e[e.EXPANSION_FORM_START=16]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=17]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=18]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=19]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=20]="EXPANSION_FORM_END",e[e.EOF=21]="EOF"}(n=t.TokenType||(t.TokenType={}));var c=function e(t,n,r){p(this,e),this.type=t,this.parts=n,this.sourceSpan=r};t.Token=c;var l=function(e){o(n,e);var t=s(n);function n(e,r,i){var a;return p(this,n),(a=t.call(this,i,e)).tokenType=r,a}return n}(v.ParseError);t.TokenError=l;var g=function e(t,n){p(this,e),this.tokens=t,this.errors=n};t.TokenizeResult=g,t.tokenize=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new D(new v.ParseSourceFile(e,t),n,r).tokenize()};var m=/\r\n?/g;function _(e){var t=e===u.$EOF?"EOF":String.fromCharCode(e);return'Unexpected character "'.concat(t,'"')}function y(e){return'Unknown entity "'.concat(e,'" - use the "&#;" or "&#x;" syntax')}var b=function e(t){p(this,e),this.error=t},D=function(){function r(e,t,n){p(this,r),this._getTagContentType=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||Nn.DEFAULT_INTERPOLATION_CONFIG,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map((function(e){return e.codePointAt(0)||0})),this._canSelfClose=n.canSelfClose||!1,this._allowHtmComponentClosingTags=n.allowHtmComponentClosingTags||!1;var i=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new w(e,i):new T(e,i);try{this._cursor.init()}catch(e){this.handleError(e)}}return f(r,[{key:"_processCarriageReturns",value:function(e){return e.replace(m,"\n")}},{key:"tokenize",value:function(){for(;this._cursor.peek()!==u.$EOF;){var t=this._cursor.clone();try{if(this._attemptCharCode(u.$LT))if(this._attemptCharCode(u.$BANG))this._attemptStr("[CDATA[")?this._consumeCdata(t):this._attemptStr("--")?this._consumeComment(t):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(t):this._consumeBogusComment(t);else if(this._attemptCharCode(u.$SLASH))this._consumeTagClose(t);else{var r=this._cursor.clone();this._attemptCharCode(u.$QUESTION)?(this._cursor=r,this._consumeBogusComment(t)):this._consumeTagOpen(t)}else this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}return this._beginToken(n.EOF),this._endToken([]),new g(function(e){for(var t=[],r=void 0,i=0;i1&&void 0!==arguments[1]?arguments[1]:this._cursor.clone();this._currentTokenStart=t,this._currentTokenType=e}},{key:"_endToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._cursor.clone();if(null===this._currentTokenStart)throw new l("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new l("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));var n=new c(this._currentTokenType,e,this._cursor.getSpan(this._currentTokenStart,this._leadingTriviaCodePoints));return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}},{key:"_createError",value:function(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var n=new l(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new b(n)}},{key:"handleError",value:function(e){if(e instanceof A&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),!(e instanceof b))throw e;this.errors.push(e.error)}},{key:"_attemptCharCode",value:function(e){return this._cursor.peek()===e&&(this._cursor.advance(),!0)}},{key:"_attemptCharCodeCaseInsensitive",value:function(e){return t=e,k(this._cursor.peek())==k(t)&&(this._cursor.advance(),!0);var t}},{key:"_requireCharCode",value:function(e){var t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(_(this._cursor.peek()),this._cursor.getSpan(t))}},{key:"_attemptStr",value:function(e){var t=e.length;if(this._cursor.charsLeft()")})),this._beginToken(n.CDATA_END),this._requireStr("]]>"),this._endToken([])}},{key:"_consumeDocType",value:function(e){var t=this;this._beginToken(n.DOC_TYPE_START,e),this._endToken([]),this._consumeRawText(!1,(function(){return t._cursor.peek()===u.$GT})),this._beginToken(n.DOC_TYPE_END),this._cursor.advance(),this._endToken([])}},{key:"_consumePrefixAndName",value:function(){for(var e,t,n=this._cursor.clone(),r="";this._cursor.peek()!==u.$COLON&&!(((e=this._cursor.peek())u.$9));)this._cursor.advance();return this._cursor.peek()===u.$COLON?(r=this._cursor.getChars(n),this._cursor.advance(),t=this._cursor.clone()):t=n,this._requireCharCodeUntilFn(C,""===r?0:1),[r,this._cursor.getChars(t)]}},{key:"_consumeTagOpen",value:function(e){var t,r,i,a=this.tokens.length,o=this._cursor.clone(),s=[];try{if(!u.isAsciiLetter(this._cursor.peek()))throw this._createError(_(this._cursor.peek()),this._cursor.getSpan(e));for(r=(i=this._consumeTagOpenStart(e)).parts[0],t=i.parts[1],this._attemptCharCodeUntilFn(E);this._cursor.peek()!==u.$SLASH&&this._cursor.peek()!==u.$GT;){var c=this._consumeAttributeName(),l=d(c,2),p=l[0],f=l[1];if(this._attemptCharCodeUntilFn(E),this._attemptCharCode(u.$EQ)){this._attemptCharCodeUntilFn(E);var h=this._consumeAttributeValue();s.push({prefix:p,name:f,value:h})}else s.push({prefix:p,name:f});this._attemptCharCodeUntilFn(E)}this._consumeTagOpenEnd()}catch(t){if(t instanceof b)return this._cursor=o,i&&(this.tokens.length=a),this._beginToken(n.TEXT,e),void this._endToken(["<"]);throw t}if(!this._canSelfClose||this.tokens[this.tokens.length-1].type!==n.TAG_OPEN_END_VOID){var g=this._getTagContentType(t,r,this._fullNameStack.length>0,s);this._handleFullNameStackForTagOpen(r,t),g===kn.TagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(r,t,!1):g===kn.TagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,t,!0)}}},{key:"_consumeRawTextWithTagClose",value:function(e,t,r){var i=this;this._consumeRawText(r,(function(){return!!i._attemptCharCode(u.$LT)&&!!i._attemptCharCode(u.$SLASH)&&(i._attemptCharCodeUntilFn(E),!!i._attemptStrCaseInsensitive(e?"".concat(e,":").concat(t):t)&&(i._attemptCharCodeUntilFn(E),i._attemptCharCode(u.$GT)))})),this._beginToken(n.TAG_CLOSE),this._requireCharCodeUntilFn((function(e){return e===u.$GT}),3),this._cursor.advance(),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}},{key:"_consumeTagOpenStart",value:function(e){this._beginToken(n.TAG_OPEN_START,e);var t=this._consumePrefixAndName();return this._endToken(t)}},{key:"_consumeAttributeName",value:function(){var e=this._cursor.peek();if(e===u.$SQ||e===u.$DQ)throw this._createError(_(e),this._cursor.getSpan());this._beginToken(n.ATTR_NAME);var t=this._consumePrefixAndName();return this._endToken(t),t}},{key:"_consumeAttributeValue",value:function(){var e;if(this._cursor.peek()===u.$SQ||this._cursor.peek()===u.$DQ){this._beginToken(n.ATTR_QUOTE);var t=this._cursor.peek();this._cursor.advance(),this._endToken([String.fromCodePoint(t)]),this._beginToken(n.ATTR_VALUE);for(var r=[];this._cursor.peek()!==t;)r.push(this._readChar(!0));e=this._processCarriageReturns(r.join("")),this._endToken([e]),this._beginToken(n.ATTR_QUOTE),this._cursor.advance(),this._endToken([String.fromCodePoint(t)])}else{this._beginToken(n.ATTR_VALUE);var i=this._cursor.clone();this._requireCharCodeUntilFn(C,1),e=this._processCarriageReturns(this._cursor.getChars(i)),this._endToken([e])}return e}},{key:"_consumeTagOpenEnd",value:function(){var e=this._attemptCharCode(u.$SLASH)?n.TAG_OPEN_END_VOID:n.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(u.$GT),this._endToken([])}},{key:"_consumeTagClose",value:function(e){if(this._beginToken(n.TAG_CLOSE,e),this._attemptCharCodeUntilFn(E),this._allowHtmComponentClosingTags&&this._attemptCharCode(u.$SLASH))this._attemptCharCodeUntilFn(E),this._requireCharCode(u.$GT),this._endToken([]);else{var t=this._consumePrefixAndName(),r=d(t,2),i=r[0],a=r[1];this._attemptCharCodeUntilFn(E),this._requireCharCode(u.$GT),this._endToken([i,a]),this._handleFullNameStackForTagClose(i,a)}}},{key:"_consumeExpansionFormStart",value:function(){this._beginToken(n.EXPANSION_FORM_START),this._requireCharCode(u.$LBRACE),this._endToken([]),this._expansionCaseStack.push(n.EXPANSION_FORM_START),this._beginToken(n.RAW_TEXT);var e=this._readUntil(u.$COMMA);this._endToken([e]),this._requireCharCode(u.$COMMA),this._attemptCharCodeUntilFn(E),this._beginToken(n.RAW_TEXT);var t=this._readUntil(u.$COMMA);this._endToken([t]),this._requireCharCode(u.$COMMA),this._attemptCharCodeUntilFn(E)}},{key:"_consumeExpansionCaseStart",value:function(){this._beginToken(n.EXPANSION_CASE_VALUE);var e=this._readUntil(u.$LBRACE).trim();this._endToken([e]),this._attemptCharCodeUntilFn(E),this._beginToken(n.EXPANSION_CASE_EXP_START),this._requireCharCode(u.$LBRACE),this._endToken([]),this._attemptCharCodeUntilFn(E),this._expansionCaseStack.push(n.EXPANSION_CASE_EXP_START)}},{key:"_consumeExpansionCaseEnd",value:function(){this._beginToken(n.EXPANSION_CASE_EXP_END),this._requireCharCode(u.$RBRACE),this._endToken([]),this._attemptCharCodeUntilFn(E),this._expansionCaseStack.pop()}},{key:"_consumeExpansionFormEnd",value:function(){this._beginToken(n.EXPANSION_FORM_END),this._requireCharCode(u.$RBRACE),this._endToken([]),this._expansionCaseStack.pop()}},{key:"_consumeText",value:function(){var e=this._cursor.clone();this._beginToken(n.TEXT,e);var t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}},{key:"_isTextEnd",value:function(){if(this._cursor.peek()===u.$LT||this._cursor.peek()===u.$EOF)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(this.isExpansionFormStart())return!0;if(this._cursor.peek()===u.$RBRACE&&this._isInExpansionCase())return!0}return!1}},{key:"_readUntil",value:function(e){var t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}},{key:"_isInExpansionCase",value:function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===n.EXPANSION_CASE_EXP_START}},{key:"_isInExpansionForm",value:function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===n.EXPANSION_FORM_START}},{key:"isExpansionFormStart",value:function(){if(this._cursor.peek()!==u.$LBRACE)return!1;if(this._interpolationConfig){var e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}},{key:"_handleFullNameStackForTagOpen",value:function(e,t){var n=kn.mergeNsAndName(e,t);0!==this._fullNameStack.length&&this._fullNameStack[this._fullNameStack.length-1]!==n||this._fullNameStack.push(n)}},{key:"_handleFullNameStackForTagClose",value:function(e,t){var n=kn.mergeNsAndName(e,t);0!==this._fullNameStack.length&&this._fullNameStack[this._fullNameStack.length-1]===n&&this._fullNameStack.pop()}}]),r}();function E(e){return!u.isWhitespace(e)||e===u.$EOF}function C(e){return u.isWhitespace(e)||e===u.$GT||e===u.$SLASH||e===u.$SQ||e===u.$DQ||e===u.$EQ}function S(e){return e==u.$SEMICOLON||e==u.$EOF||!u.isAsciiHexDigit(e)}function x(e){return e==u.$SEMICOLON||e==u.$EOF||!u.isAsciiLetter(e)}function k(e){return e>=u.$a&&e<=u.$z?e-u.$a+u.$A:e}var T=function(){function e(t,n){if(p(this,e),t instanceof e)this.file=t.file,this.input=t.input,this.end=t.end,this.state=Object.assign({},t.state);else{if(!n)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=t,this.input=t.content,this.end=n.endPos,this.state={peek:-1,offset:n.startPos,line:n.startLine,column:n.startCol}}}return f(e,[{key:"clone",value:function(){return new e(this)}},{key:"peek",value:function(){return this.state.peek}},{key:"charsLeft",value:function(){return this.end-this.state.offset}},{key:"diff",value:function(e){return this.state.offset-e.state.offset}},{key:"advance",value:function(){this.advanceState(this.state)}},{key:"init",value:function(){this.updatePeek(this.state)}},{key:"getSpan",value:function(e,t){if(e=e||this,t)for(e=e.clone();this.diff(e)>0&&-1!==t.indexOf(e.peek());)e.advance();return new v.ParseSourceSpan(new v.ParseLocation(e.file,e.state.offset,e.state.line,e.state.column),new v.ParseLocation(this.file,this.state.offset,this.state.line,this.state.column))}},{key:"getChars",value:function(e){return this.input.substring(e.state.offset,this.state.offset)}},{key:"charAt",value:function(e){return this.input.charCodeAt(e)}},{key:"advanceState",value:function(e){if(e.offset>=this.end)throw this.state=e,new A('Unexpected character "EOF"',this);var t=this.charAt(e.offset);t===u.$LF?(e.line++,e.column=0):u.isNewLine(t)||e.column++,e.offset++,this.updatePeek(e)}},{key:"updatePeek",value:function(e){e.peek=e.offset>=this.end?u.$EOF:this.charAt(e.offset)}}]),e}(),w=function(e){o(n,e);var t=s(n);function n(e,i){var a;return p(this,n),e instanceof n?(a=t.call(this,e)).internalState=Object.assign({},e.internalState):(a=t.call(this,e,i)).internalState=a.state,r(a)}return f(n,[{key:"advance",value:function(){this.state=this.internalState,i(a(n.prototype),"advance",this).call(this),this.processEscapeSequence()}},{key:"init",value:function(){i(a(n.prototype),"init",this).call(this),this.processEscapeSequence()}},{key:"clone",value:function(){return new n(this)}},{key:"getChars",value:function(e){for(var t=e.clone(),n="";t.internalState.offset3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,s=function(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0)return this._errors=this._errors.concat(o.errors),null;var s=new v.ParseSourceSpan(t.sourceSpan.start,a.sourceSpan.end),u=new v.ParseSourceSpan(r.sourceSpan.start,a.sourceSpan.end);return new An.ExpansionCase(t.parts[0],o.rootNodes,s,t.sourceSpan,u)}},{key:"_collectExpansionExpTokens",value:function(e){for(var t=[],r=[In.TokenType.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==In.TokenType.EXPANSION_FORM_START&&this._peek.type!==In.TokenType.EXPANSION_CASE_EXP_START||r.push(this._peek.type),this._peek.type===In.TokenType.EXPANSION_CASE_EXP_END){if(!a(r,In.TokenType.EXPANSION_CASE_EXP_START))return this._errors.push(n.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(r.pop(),0==r.length)return t}if(this._peek.type===In.TokenType.EXPANSION_FORM_END){if(!a(r,In.TokenType.EXPANSION_FORM_START))return this._errors.push(n.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.pop()}if(this._peek.type===In.TokenType.EOF)return this._errors.push(n.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}},{key:"_getText",value:function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var n=this._getParentElement();null!=n&&0==n.children.length&&this.getTagDefinition(n.name).ignoreFirstLf&&(t=t.substring(1))}return t}},{key:"_consumeText",value:function(e){var t=this._getText(e);t.length>0&&this._addToParent(new An.Text(t,e.sourceSpan))}},{key:"_closeVoidElement",value:function(){var e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}},{key:"_consumeStartTag",value:function(e){for(var t=e.parts[0],r=e.parts[1],i=[];this._peek.type===In.TokenType.ATTR_NAME;)i.push(this._consumeAttr(this._advance()));var a=this._getElementFullName(t,r,this._getParentElement()),o=!1;if(this._peek.type===In.TokenType.TAG_OPEN_END_VOID){this._advance(),o=!0;var s=this.getTagDefinition(a);this.canSelfClose||s.canSelfClose||null!==kn.getNsPrefix(a)||s.isVoid||this._errors.push(n.create(a,e.sourceSpan,'Only void and foreign elements can be self closed "'.concat(e.parts[1],'"')))}else this._peek.type===In.TokenType.TAG_OPEN_END&&(this._advance(),o=!1);var u=this._peek.sourceSpan.start,c=new v.ParseSourceSpan(e.sourceSpan.start,u),l=new v.ParseSourceSpan(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),d=new An.Element(a,i,[],c,c,void 0,l);this._pushElement(d),o&&(this._popElement(a),d.endSourceSpan=c)}},{key:"_pushElement",value:function(e){var t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)}},{key:"_consumeEndTag",value:function(e){var t=this.allowHtmComponentClosingTags&&0===e.parts.length?null:this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());if(this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),t&&this.getTagDefinition(t).isVoid)this._errors.push(n.create(t,e.sourceSpan,'Void elements do not have end tags "'.concat(e.parts[1],'"')));else if(!this._popElement(t)){var r='Unexpected closing tag "'.concat(t,'". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags');this._errors.push(n.create(t,e.sourceSpan,r))}}},{key:"_popElement",value:function(e){for(var t=this._elementStack.length-1;t>=0;t--){var n=this._elementStack[t];if(!e||(kn.getNsPrefix(n.name)?n.name==e:n.name.toLowerCase()==e.toLowerCase()))return this._elementStack.splice(t,this._elementStack.length-t),!0;if(!this.getTagDefinition(n.name).closedByParent)return!1}return!1}},{key:"_consumeAttr",value:function(e){var t=kn.mergeNsAndName(e.parts[0],e.parts[1]),n=e.sourceSpan.end,r="",i=void 0,a=void 0;if(this._peek.type===In.TokenType.ATTR_QUOTE&&(a=this._advance().sourceSpan.start),this._peek.type===In.TokenType.ATTR_VALUE){var o=this._advance();r=o.parts[0],n=o.sourceSpan.end,i=o.sourceSpan}return this._peek.type===In.TokenType.ATTR_QUOTE&&(n=this._advance().sourceSpan.end,i=new v.ParseSourceSpan(a,n)),new An.Attribute(t,r,new v.ParseSourceSpan(e.sourceSpan.start,n),i,e.sourceSpan)}},{key:"_getParentElement",value:function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}},{key:"_getParentElementSkippingContainers",value:function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if(!kn.isNgContainer(this._elementStack[t].name))return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:null,container:e}}},{key:"_addToParent",value:function(e){var t=this._getParentElement();null!=t?t.children.push(e):this._rootNodes.push(e)}},{key:"_insertBeforeContainer",value:function(e,t,n){if(t){if(e){var r=e.children.indexOf(t);e.children[r]=n}else this._rootNodes.push(n);n.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,n)}else this._addToParent(n),this._elementStack.push(n)}},{key:"_getElementFullName",value:function(e,t,n){return""===e&&""===(e=this.getTagDefinition(t).implicitNamespacePrefix||"")&&null!=n&&(e=kn.getNsPrefix(n.name)),kn.mergeNsAndName(e,t)}}]),e}();function a(e,t){return e.length>0&&e[e.length-1]===t}})),Ln=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=Fn;t.ParseTreeResult=n.ParseTreeResult,t.TreeError=n.TreeError;var r=function(e){o(n,e);var t=s(n);function n(){return p(this,n),t.call(this,Tn.getHtmlTagDefinition)}return f(n,[{key:"parse",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;return i(a(r.prototype),"parse",this).call(this,e,t,n,r,o)}}]),n}(Fn.Parser);t.HtmlParser=r})),Pn=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TagContentType=kn.TagContentType;var n=null;t.parse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.canSelfClose,i=void 0!==r&&r,a=t.allowHtmComponentClosingTags,o=void 0!==a&&a,s=t.isTagNameCaseSensitive,u=void 0!==s&&s,c=t.getTagContentType;return(n||(n=new Ln.HtmlParser),n).parse(e,"angular-html-parser",{tokenizeExpansionForms:!1,interpolationConfig:void 0,canSelfClose:i,allowHtmComponentClosingTags:o},u,c)}})),Rn=v.ParseSourceSpan,Mn=v.ParseLocation,Bn=v.ParseSourceFile,jn=Pt.parse,Un=it.inferParserByLanguage,Vn=mn.HTML_ELEMENT_ATTRIBUTES,zn=mn.HTML_TAGS,Hn=mn.isUnknownNamespace,Wn=_n.hasPragma,Kn=Dn.Node,qn=Sn.parseIeConditionalComment,Gn=xn.locStart,Yn=xn.locEnd;function Jn(e,t,n){var r=t.recognizeSelfClosing,i=t.normalizeTagName,a=t.normalizeAttributeName,c=t.allowHtmComponentClosingTags,l=t.isTagNameCaseSensitive,d=t.getTagContentType,h=Pn,g=An.RecursiveVisitor,m=An.visitAll,_=An.Attribute,y=An.CDATA,b=An.Comment,D=An.DocType,E=An.Element,C=An.Text,S=v.ParseSourceSpan,x=Tn.getHtmlTagDefinition,k=h.parse(e,{canSelfClose:r,allowHtmComponentClosingTags:c,isTagNameCaseSensitive:l,getTagContentType:d}),T=k.rootNodes,w=k.errors,A="vue"===n.parser&&T.some((function(e){return e instanceof D&&"html"===e.value||e instanceof E&&"html"===e.name.toLowerCase()}));if("vue"!==n.parser||A){if(A){r=!0,i=!0,a=!0,c=!0,l=!1;var O=h.parse(e,{canSelfClose:r,allowHtmComponentClosingTags:c,isTagNameCaseSensitive:l});T=O.rootNodes,w=O.errors}}else{var N=function(e){if(!e)return!1;if("template"!==e.name)return!1;var t=e.attrs.find((function(e){return"lang"===e.name})),r=t&&t.value;return null==r||"html"===Un(r,n)};if(T.some(N))for(var I,F=function(){return h.parse(e,{canSelfClose:r,allowHtmComponentClosingTags:c,isTagNameCaseSensitive:l})},L=function(){return I||(I=F())},P=function(e){return L().rootNodes.find((function(t){var n=t.startSourceSpan;return n&&n.start.offset===e.startSourceSpan.start.offset}))},R=0;R3&&void 0!==arguments[3]&&!arguments[3]?{frontMatter:null,content:e}:jn(e),i=r.frontMatter,a=r.content,o=new Bn(e,t.filepath),s=new Mn(o,0,0,0),u=s.moveBy(e.length),c={type:"root",sourceSpan:new Rn(s,u),children:Jn(a,n,t)};if(i){var l=new Mn(o,0,0,0),d=l.moveBy(i.raw.length);i.sourceSpan=new Rn(l,d),c.children.unshift(i)}var p=new Kn(c),f=function(r,i){var a=i.offset,o=$n(e.slice(0,a).replace(/[^\n\r]/g," ")+r,t,n,!1);o.sourceSpan=new Rn(i,o.children[o.children.length-1].sourceSpan.end);var s=o.children[0];return s.length===a?o.children.shift():(s.sourceSpan=new Rn(s.sourceSpan.start.moveBy(a),s.sourceSpan.end),s.value=s.value.slice(a)),o};return p.map((function(e){if("comment"===e.type){var t=qn(e,f);if(t)return t}return e}))}function Qn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.recognizeSelfClosing,n=void 0!==t&&t,r=e.normalizeTagName,i=void 0!==r&&r,a=e.normalizeAttributeName,o=void 0!==a&&a,s=e.allowHtmComponentClosingTags,u=void 0!==s&&s,c=e.isTagNameCaseSensitive,l=void 0!==c&&c,d=e.getTagContentType;return{parse:function(e,t,r){return $n(e,r,{recognizeSelfClosing:n,normalizeTagName:i,normalizeAttributeName:o,allowHtmComponentClosingTags:u,isTagNameCaseSensitive:l,getTagContentType:d})},hasPragma:Wn,astFormat:"html",locStart:Gn,locEnd:Yn}}return{parsers:{html:Qn({recognizeSelfClosing:!0,normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0}),angular:Qn(),vue:Qn({recognizeSelfClosing:!0,isTagNameCaseSensitive:!0,getTagContentType:function(e,t,n,r){if("html"!==e.toLowerCase()&&!n&&("template"!==e||r.some((function(e){var t=e.name,n=e.value;return"lang"===t&&"html"!==n}))))return Pn.TagContentType.RAW_TEXT}}),lwc:Qn()}}}()}).call(this,n(163))},function(e,t,n){(function(t){var r=n(424),i=n(175),a=n(164),o=n(165),s=n(156),u=n(88),c=n(93);e.exports=function(){"use strict";var e=function(){for(var e={},t=0;tt)return{line:n+1,column:t-(e[n-1]||0)+1,offset:t};return{}}}function b(e){return function(t){var n=t&&t.line,r=t&&t.column;return isNaN(n)||isNaN(r)||!(n-1 in e)?-1:(e[n-2]||0)+r-1||0}}var D=function(e,t){return function(n){for(var r,i=0,a=n.indexOf(E),o=e[t],s=[];-1!==a;)s.push(n.slice(i,a)),i=a+1,(r=n.charAt(i))&&-1!==o.indexOf(r)||s.push(E),a=n.indexOf(E,i+1);return s.push(n.slice(i)),s.join("")}},E="\\",C={AElig:"\xc6",AMP:"&",Aacute:"\xc1",Acirc:"\xc2",Agrave:"\xc0",Aring:"\xc5",Atilde:"\xc3",Auml:"\xc4",COPY:"\xa9",Ccedil:"\xc7",ETH:"\xd0",Eacute:"\xc9",Ecirc:"\xca",Egrave:"\xc8",Euml:"\xcb",GT:">",Iacute:"\xcd",Icirc:"\xce",Igrave:"\xcc",Iuml:"\xcf",LT:"<",Ntilde:"\xd1",Oacute:"\xd3",Ocirc:"\xd4",Ograve:"\xd2",Oslash:"\xd8",Otilde:"\xd5",Ouml:"\xd6",QUOT:'"',REG:"\xae",THORN:"\xde",Uacute:"\xda",Ucirc:"\xdb",Ugrave:"\xd9",Uuml:"\xdc",Yacute:"\xdd",aacute:"\xe1",acirc:"\xe2",acute:"\xb4",aelig:"\xe6",agrave:"\xe0",amp:"&",aring:"\xe5",atilde:"\xe3",auml:"\xe4",brvbar:"\xa6",ccedil:"\xe7",cedil:"\xb8",cent:"\xa2",copy:"\xa9",curren:"\xa4",deg:"\xb0",divide:"\xf7",eacute:"\xe9",ecirc:"\xea",egrave:"\xe8",eth:"\xf0",euml:"\xeb",frac12:"\xbd",frac14:"\xbc",frac34:"\xbe",gt:">",iacute:"\xed",icirc:"\xee",iexcl:"\xa1",igrave:"\xec",iquest:"\xbf",iuml:"\xef",laquo:"\xab",lt:"<",macr:"\xaf",micro:"\xb5",middot:"\xb7",nbsp:"\xa0",not:"\xac",ntilde:"\xf1",oacute:"\xf3",ocirc:"\xf4",ograve:"\xf2",ordf:"\xaa",ordm:"\xba",oslash:"\xf8",otilde:"\xf5",ouml:"\xf6",para:"\xb6",plusmn:"\xb1",pound:"\xa3",quot:'"',raquo:"\xbb",reg:"\xae",sect:"\xa7",shy:"\xad",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",szlig:"\xdf",thorn:"\xfe",times:"\xd7",uacute:"\xfa",ucirc:"\xfb",ugrave:"\xf9",uml:"\xa8",uuml:"\xfc",yacute:"\xfd",yen:"\xa5",yuml:"\xff"},S={0:"\ufffd",128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"},x=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57},k=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57},T=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90},w=function(e){return T(e)||x(e)},A={AEli:"\xc6",AElig:"\xc6",AM:"&",AMP:"&",Aacut:"\xc1",Aacute:"\xc1",Abreve:"\u0102",Acir:"\xc2",Acirc:"\xc2",Acy:"\u0410",Afr:"\ud835\udd04",Agrav:"\xc0",Agrave:"\xc0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2a53",Aogon:"\u0104",Aopf:"\ud835\udd38",ApplyFunction:"\u2061",Arin:"\xc5",Aring:"\xc5",Ascr:"\ud835\udc9c",Assign:"\u2254",Atild:"\xc3",Atilde:"\xc3",Aum:"\xc4",Auml:"\xc4",Backslash:"\u2216",Barv:"\u2ae7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212c",Beta:"\u0392",Bfr:"\ud835\udd05",Bopf:"\ud835\udd39",Breve:"\u02d8",Bscr:"\u212c",Bumpeq:"\u224e",CHcy:"\u0427",COP:"\xa9",COPY:"\xa9",Cacute:"\u0106",Cap:"\u22d2",CapitalDifferentialD:"\u2145",Cayleys:"\u212d",Ccaron:"\u010c",Ccedi:"\xc7",Ccedil:"\xc7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010a",Cedilla:"\xb8",CenterDot:"\xb7",Cfr:"\u212d",Chi:"\u03a7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2a74",Congruent:"\u2261",Conint:"\u222f",ContourIntegral:"\u222e",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2a2f",Cscr:"\ud835\udc9e",Cup:"\u22d3",CupCap:"\u224d",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040f",Dagger:"\u2021",Darr:"\u21a1",Dashv:"\u2ae4",Dcaron:"\u010e",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\ud835\udd07",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",Diamond:"\u22c4",DifferentialD:"\u2146",Dopf:"\ud835\udd3b",Dot:"\xa8",DotDot:"\u20dc",DotEqual:"\u2250",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",Downarrow:"\u21d3",Dscr:"\ud835\udc9f",Dstrok:"\u0110",ENG:"\u014a",ET:"\xd0",ETH:"\xd0",Eacut:"\xc9",Eacute:"\xc9",Ecaron:"\u011a",Ecir:"\xca",Ecirc:"\xca",Ecy:"\u042d",Edot:"\u0116",Efr:"\ud835\udd08",Egrav:"\xc8",Egrave:"\xc8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25fb",EmptyVerySmallSquare:"\u25ab",Eogon:"\u0118",Eopf:"\ud835\udd3c",Epsilon:"\u0395",Equal:"\u2a75",EqualTilde:"\u2242",Equilibrium:"\u21cc",Escr:"\u2130",Esim:"\u2a73",Eta:"\u0397",Eum:"\xcb",Euml:"\xcb",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\ud835\udd09",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",Fopf:"\ud835\udd3d",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",G:">",GT:">",Gamma:"\u0393",Gammad:"\u03dc",Gbreve:"\u011e",Gcedil:"\u0122",Gcirc:"\u011c",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\ud835\udd0a",Gg:"\u22d9",Gopf:"\ud835\udd3e",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",Gt:"\u226b",HARDcy:"\u042a",Hacek:"\u02c7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210c",HilbertSpace:"\u210b",Hopf:"\u210d",HorizontalLine:"\u2500",Hscr:"\u210b",Hstrok:"\u0126",HumpDownHump:"\u224e",HumpEqual:"\u224f",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacut:"\xcd",Iacute:"\xcd",Icir:"\xce",Icirc:"\xce",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrav:"\xcc",Igrave:"\xcc",Im:"\u2111",Imacr:"\u012a",ImaginaryI:"\u2148",Implies:"\u21d2",Int:"\u222c",Integral:"\u222b",Intersection:"\u22c2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012e",Iopf:"\ud835\udd40",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Ium:"\xcf",Iuml:"\xcf",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\ud835\udd0d",Jopf:"\ud835\udd41",Jscr:"\ud835\udca5",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040c",Kappa:"\u039a",Kcedil:"\u0136",Kcy:"\u041a",Kfr:"\ud835\udd0e",Kopf:"\ud835\udd42",Kscr:"\ud835\udca6",LJcy:"\u0409",L:"<",LT:"<",Lacute:"\u0139",Lambda:"\u039b",Lang:"\u27ea",Laplacetrf:"\u2112",Larr:"\u219e",Lcaron:"\u013d",Lcedil:"\u013b",Lcy:"\u041b",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",LeftRightArrow:"\u2194",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",Leftarrow:"\u21d0",Leftrightarrow:"\u21d4",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2aa1",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",Lfr:"\ud835\udd0f",Ll:"\u22d8",Lleftarrow:"\u21da",Lmidot:"\u013f",LongLeftArrow:"\u27f5",LongLeftRightArrow:"\u27f7",LongRightArrow:"\u27f6",Longleftarrow:"\u27f8",Longleftrightarrow:"\u27fa",Longrightarrow:"\u27f9",Lopf:"\ud835\udd43",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21b0",Lstrok:"\u0141",Lt:"\u226a",Map:"\u2905",Mcy:"\u041c",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",MinusPlus:"\u2213",Mopf:"\ud835\udd44",Mscr:"\u2133",Mu:"\u039c",NJcy:"\u040a",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041d",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",Nfr:"\ud835\udd11",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",Not:"\u2aec",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\ud835\udca9",Ntild:"\xd1",Ntilde:"\xd1",Nu:"\u039d",OElig:"\u0152",Oacut:"\xd3",Oacute:"\xd3",Ocir:"\xd4",Ocirc:"\xd4",Ocy:"\u041e",Odblac:"\u0150",Ofr:"\ud835\udd12",Ograv:"\xd2",Ograve:"\xd2",Omacr:"\u014c",Omega:"\u03a9",Omicron:"\u039f",Oopf:"\ud835\udd46",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",Or:"\u2a54",Oscr:"\ud835\udcaa",Oslas:"\xd8",Oslash:"\xd8",Otild:"\xd5",Otilde:"\xd5",Otimes:"\u2a37",Oum:"\xd6",Ouml:"\xd6",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",PartialD:"\u2202",Pcy:"\u041f",Pfr:"\ud835\udd13",Phi:"\u03a6",Pi:"\u03a0",PlusMinus:"\xb1",Poincareplane:"\u210c",Popf:"\u2119",Pr:"\u2abb",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",Prime:"\u2033",Product:"\u220f",Proportion:"\u2237",Proportional:"\u221d",Pscr:"\ud835\udcab",Psi:"\u03a8",QUO:'"',QUOT:'"',Qfr:"\ud835\udd14",Qopf:"\u211a",Qscr:"\ud835\udcac",RBarr:"\u2910",RE:"\xae",REG:"\xae",Racute:"\u0154",Rang:"\u27eb",Rarr:"\u21a0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211c",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",Rfr:"\u211c",Rho:"\u03a1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",Rightarrow:"\u21d2",Ropf:"\u211d",RoundImplies:"\u2970",Rrightarrow:"\u21db",Rscr:"\u211b",Rsh:"\u21b1",RuleDelayed:"\u29f4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042c",Sacute:"\u015a",Sc:"\u2abc",Scaron:"\u0160",Scedil:"\u015e",Scirc:"\u015c",Scy:"\u0421",Sfr:"\ud835\udd16",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03a3",SmallCircle:"\u2218",Sopf:"\ud835\udd4a",Sqrt:"\u221a",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\ud835\udcae",Star:"\u22c6",Sub:"\u22d0",Subset:"\u22d0",SubsetEqual:"\u2286",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",SuchThat:"\u220b",Sum:"\u2211",Sup:"\u22d1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22d1",THOR:"\xde",THORN:"\xde",TRADE:"\u2122",TSHcy:"\u040b",TScy:"\u0426",Tab:"\t",Tau:"\u03a4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\ud835\udd17",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\ud835\udd4b",TripleDot:"\u20db",Tscr:"\ud835\udcaf",Tstrok:"\u0166",Uacut:"\xda",Uacute:"\xda",Uarr:"\u219f",Uarrocir:"\u2949",Ubrcy:"\u040e",Ubreve:"\u016c",Ucir:"\xdb",Ucirc:"\xdb",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\ud835\udd18",Ugrav:"\xd9",Ugrave:"\xd9",Umacr:"\u016a",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",Uopf:"\ud835\udd4c",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",UpEquilibrium:"\u296e",UpTee:"\u22a5",UpTeeArrow:"\u21a5",Uparrow:"\u21d1",Updownarrow:"\u21d5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",Upsilon:"\u03a5",Uring:"\u016e",Uscr:"\ud835\udcb0",Utilde:"\u0168",Uum:"\xdc",Uuml:"\xdc",VDash:"\u22ab",Vbar:"\u2aeb",Vcy:"\u0412",Vdash:"\u22a9",Vdashl:"\u2ae6",Vee:"\u22c1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",Vopf:"\ud835\udd4d",Vscr:"\ud835\udcb1",Vvdash:"\u22aa",Wcirc:"\u0174",Wedge:"\u22c0",Wfr:"\ud835\udd1a",Wopf:"\ud835\udd4e",Wscr:"\ud835\udcb2",Xfr:"\ud835\udd1b",Xi:"\u039e",Xopf:"\ud835\udd4f",Xscr:"\ud835\udcb3",YAcy:"\u042f",YIcy:"\u0407",YUcy:"\u042e",Yacut:"\xdd",Yacute:"\xdd",Ycirc:"\u0176",Ycy:"\u042b",Yfr:"\ud835\udd1c",Yopf:"\ud835\udd50",Yscr:"\ud835\udcb4",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017d",Zcy:"\u0417",Zdot:"\u017b",ZeroWidthSpace:"\u200b",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\ud835\udcb5",aacut:"\xe1",aacute:"\xe1",abreve:"\u0103",ac:"\u223e",acE:"\u223e\u0333",acd:"\u223f",acir:"\xe2",acirc:"\xe2",acut:"\xb4",acute:"\xb4",acy:"\u0430",aeli:"\xe6",aelig:"\xe6",af:"\u2061",afr:"\ud835\udd1e",agrav:"\xe0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03b1",amacr:"\u0101",amalg:"\u2a3f",am:"&",amp:"&",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",aogon:"\u0105",aopf:"\ud835\udd52",ap:"\u2248",apE:"\u2a70",apacir:"\u2a6f",ape:"\u224a",apid:"\u224b",apos:"'",approx:"\u2248",approxeq:"\u224a",arin:"\xe5",aring:"\xe5",ascr:"\ud835\udcb6",ast:"*",asymp:"\u2248",asympeq:"\u224d",atild:"\xe3",atilde:"\xe3",aum:"\xe4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",bNot:"\u2aed",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",barvee:"\u22bd",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",beta:"\u03b2",beth:"\u2136",between:"\u226c",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bnot:"\u2310",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255d",boxUR:"\u255a",boxUl:"\u255c",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256c",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256b",boxVl:"\u2562",boxVr:"\u255f",boxbox:"\u29c9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250c",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252c",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxuL:"\u255b",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256a",boxvL:"\u2561",boxvR:"\u255e",boxvh:"\u253c",boxvl:"\u2524",boxvr:"\u251c",bprime:"\u2035",breve:"\u02d8",brvba:"\xa6",brvbar:"\xa6",bscr:"\ud835\udcb7",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",bumpeq:"\u224f",cacute:"\u0107",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",ccaps:"\u2a4d",ccaron:"\u010d",ccedi:"\xe7",ccedil:"\xe7",ccirc:"\u0109",ccups:"\u2a4c",ccupssm:"\u2a50",cdot:"\u010b",cedi:"\xb8",cedil:"\xb8",cemptyv:"\u29b2",cen:"\xa2",cent:"\xa2",centerdot:"\xb7",cfr:"\ud835\udd20",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03c7",cir:"\u25cb",cirE:"\u29c3",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledR:"\xae",circledS:"\u24c8",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",conint:"\u222e",copf:"\ud835\udd54",coprod:"\u2210",cop:"\xa9",copy:"\xa9",copysr:"\u2117",crarr:"\u21b5",cross:"\u2717",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",cup:"\u222a",cupbrcap:"\u2a48",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curre:"\xa4",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",dArr:"\u21d3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",dcaron:"\u010f",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",ddotseq:"\u2a77",de:"\xb0",deg:"\xb0",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",dfr:"\ud835\udd21",dharl:"\u21c3",dharr:"\u21c2",diam:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divid:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",dopf:"\ud835\udd55",dot:"\u02d9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",dscr:"\ud835\udcb9",dscy:"\u0455",dsol:"\u29f6",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",dzcy:"\u045f",dzigrarr:"\u27ff",eDDot:"\u2a77",eDot:"\u2251",eacut:"\xe9",eacute:"\xe9",easter:"\u2a6e",ecaron:"\u011b",ecir:"\xea",ecirc:"\xea",ecolon:"\u2255",ecy:"\u044d",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\ud835\udd22",eg:"\u2a9a",egrav:"\xe8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014b",ensp:"\u2002",eogon:"\u0119",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",equals:"=",equest:"\u225f",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erDot:"\u2253",erarr:"\u2971",escr:"\u212f",esdot:"\u2250",esim:"\u2242",eta:"\u03b7",et:"\xf0",eth:"\xf0",eum:"\xeb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",ffr:"\ud835\udd23",filig:"\ufb01",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",fopf:"\ud835\udd57",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",fpartint:"\u2a0d",frac1:"\xbc",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac3:"\xbe",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",fscr:"\ud835\udcbb",gE:"\u2267",gEl:"\u2a8c",gacute:"\u01f5",gamma:"\u03b3",gammad:"\u03dd",gap:"\u2a86",gbreve:"\u011f",gcirc:"\u011d",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",gfr:"\ud835\udd24",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2a92",gla:"\u2aa5",glj:"\u2aa4",gnE:"\u2269",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",gopf:"\ud835\udd58",grave:"`",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",g:">",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",hArr:"\u21d4",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",hardcy:"\u044a",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",hbar:"\u210f",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",hfr:"\ud835\udd25",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",hopf:"\ud835\udd59",horbar:"\u2015",hscr:"\ud835\udcbd",hslash:"\u210f",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacut:"\xed",iacute:"\xed",ic:"\u2063",icir:"\xee",icirc:"\xee",icy:"\u0438",iecy:"\u0435",iexc:"\xa1",iexcl:"\xa1",iff:"\u21d4",ifr:"\ud835\udd26",igrav:"\xec",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012b",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",int:"\u222b",intcal:"\u22ba",integers:"\u2124",intercal:"\u22ba",intlarhk:"\u2a17",intprod:"\u2a3c",iocy:"\u0451",iogon:"\u012f",iopf:"\ud835\udd5a",iota:"\u03b9",iprod:"\u2a3c",iques:"\xbf",iquest:"\xbf",iscr:"\ud835\udcbe",isin:"\u2208",isinE:"\u22f9",isindot:"\u22f5",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",ium:"\xef",iuml:"\xef",jcirc:"\u0135",jcy:"\u0439",jfr:"\ud835\udd27",jmath:"\u0237",jopf:"\ud835\udd5b",jscr:"\ud835\udcbf",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03ba",kappav:"\u03f0",kcedil:"\u0137",kcy:"\u043a",kfr:"\ud835\udd28",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045c",kopf:"\ud835\udd5c",kscr:"\ud835\udcc0",lAarr:"\u21da",lArr:"\u21d0",lAtail:"\u291b",lBarr:"\u290e",lE:"\u2266",lEg:"\u2a8b",lHar:"\u2962",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",lambda:"\u03bb",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",laqu:"\xab",laquo:"\xab",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",lcaron:"\u013e",lcedil:"\u013c",lceil:"\u2308",lcub:"{",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21a2",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",leftthreetimes:"\u22cb",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297c",lfloor:"\u230a",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",llhard:"\u296b",lltri:"\u25fa",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnE:"\u2268",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",longleftarrow:"\u27f5",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\ud835\udcc1",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",lstrok:"\u0142",l:"<",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltrPar:"\u2996",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",mDDot:"\u223a",mac:"\xaf",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",mcy:"\u043c",mdash:"\u2014",measuredangle:"\u2221",mfr:"\ud835\udd2a",mho:"\u2127",micr:"\xb5",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middo:"\xb7",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",mopf:"\ud835\udd5e",mp:"\u2213",mscr:"\ud835\udcc2",mstpos:"\u223e",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nGg:"\u22d9\u0338",nGt:"\u226b\u20d2",nGtv:"\u226b\u0338",nLeftarrow:"\u21cd",nLeftrightarrow:"\u21ce",nLl:"\u22d8\u0338",nLt:"\u226a\u20d2",nLtv:"\u226a\u0338",nRightarrow:"\u21cf",nVDash:"\u22af",nVdash:"\u22ae",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbs:"\xa0",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",neArr:"\u21d7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",ngsim:"\u2275",ngt:"\u226f",ngtr:"\u226f",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",njcy:"\u045a",nlArr:"\u21cd",nlE:"\u2266\u0338",nlarr:"\u219a",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219a",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nlsim:"\u2274",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nmid:"\u2224",nopf:"\ud835\udd5f",no:"\xac",not:"\xac",notin:"\u2209",notinE:"\u22f9\u0338",notindot:"\u22f5\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",ntild:"\xf1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22ad",nvHarr:"\u2904",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwArr:"\u21d6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24c8",oacut:"\xf3",oacute:"\xf3",oast:"\u229b",ocir:"\xf4",ocirc:"\xf4",ocy:"\u043e",odash:"\u229d",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",oelig:"\u0153",ofcir:"\u29bf",ofr:"\ud835\udd2c",ogon:"\u02db",ograv:"\xf2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",omacr:"\u014d",omega:"\u03c9",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",oopf:"\ud835\udd60",opar:"\u29b7",operp:"\u29b9",oplus:"\u2295",or:"\u2228",orarr:"\u21bb",ord:"\xba",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oscr:"\u2134",oslas:"\xf8",oslash:"\xf8",osol:"\u2298",otild:"\xf5",otilde:"\xf5",otimes:"\u2297",otimesas:"\u2a36",oum:"\xf6",ouml:"\xf6",ovbar:"\u233d",par:"\xb6",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",pfr:"\ud835\udd2d",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",plusm:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",pointint:"\u2a15",popf:"\ud835\udd61",poun:"\xa3",pound:"\xa3",pr:"\u227a",prE:"\u2ab3",prap:"\u2ab7",prcue:"\u227c",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",prime:"\u2032",primes:"\u2119",prnE:"\u2ab5",prnap:"\u2ab9",prnsim:"\u22e8",prod:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",pscr:"\ud835\udcc5",psi:"\u03c8",puncsp:"\u2008",qfr:"\ud835\udd2e",qint:"\u2a0c",qopf:"\ud835\udd62",qprime:"\u2057",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",quo:'"',quot:'"',rAarr:"\u21db",rArr:"\u21d2",rAtail:"\u291c",rBarr:"\u290f",rHar:"\u2964",race:"\u223d\u0331",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raqu:"\xbb",raquo:"\xbb",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21a3",rarrw:"\u219d",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",re:"\xae",reg:"\xae",rfisht:"\u297d",rfloor:"\u230b",rfr:"\ud835\udd2f",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",rho:"\u03c1",rhov:"\u03f1",rightarrow:"\u2192",rightarrowtail:"\u21a3",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",rightthreetimes:"\u22cc",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",rsaquo:"\u203a",rscr:"\ud835\udcc7",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",ruluhar:"\u2968",rx:"\u211e",sacute:"\u015b",sbquo:"\u201a",sc:"\u227b",scE:"\u2ab4",scap:"\u2ab8",scaron:"\u0161",sccue:"\u227d",sce:"\u2ab0",scedil:"\u015f",scirc:"\u015d",scnE:"\u2ab6",scnap:"\u2aba",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",seArr:"\u21d8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sec:"\xa7",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",sh:"\xad",shy:"\xad",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",square:"\u25a1",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",sub:"\u2282",subE:"\u2ac5",subdot:"\u2abd",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",sum:"\u2211",sung:"\u266a",sup:"\u2283",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supE:"\u2ac6",supdot:"\u2abe",supdsub:"\u2ad8",supe:"\u2287",supedot:"\u2ac4",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swArr:"\u21d9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szli:"\xdf",szlig:"\xdf",target:"\u2316",tau:"\u03c4",tbrk:"\u23b4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",tfr:"\ud835\udd31",there4:"\u2234",therefore:"\u2234",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223c",thor:"\xfe",thorn:"\xfe",tilde:"\u02dc",time:"\xd7",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",tscr:"\ud835\udcc9",tscy:"\u0446",tshcy:"\u045b",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",uArr:"\u21d1",uHar:"\u2963",uacut:"\xfa",uacute:"\xfa",uarr:"\u2191",ubrcy:"\u045e",ubreve:"\u016d",ucir:"\xfb",ucirc:"\xfb",ucy:"\u0443",udarr:"\u21c5",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",ufr:"\ud835\udd32",ugrav:"\xf9",ugrave:"\xf9",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",umacr:"\u016b",um:"\xa8",uml:"\xa8",uogon:"\u0173",uopf:"\ud835\udd66",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",upsi:"\u03c5",upsih:"\u03d2",upsilon:"\u03c5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",uring:"\u016f",urtri:"\u25f9",uscr:"\ud835\udcca",utdot:"\u22f0",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",uum:"\xfc",uuml:"\xfc",uwangle:"\u29a7",vArr:"\u21d5",vBar:"\u2ae8",vBarv:"\u2ae9",vDash:"\u22a8",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",vcy:"\u0432",vdash:"\u22a2",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",verbar:"|",vert:"|",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",vzigzag:"\u299a",wcirc:"\u0175",wedbar:"\u2a5f",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\ud835\udd34",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",xfr:"\ud835\udd35",xhArr:"\u27fa",xharr:"\u27f7",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",yacut:"\xfd",yacute:"\xfd",yacy:"\u044f",ycirc:"\u0177",ycy:"\u044b",ye:"\xa5",yen:"\xa5",yfr:"\ud835\udd36",yicy:"\u0457",yopf:"\ud835\udd6a",yscr:"\ud835\udcce",yucy:"\u044e",yum:"\xff",yuml:"\xff",zacute:"\u017a",zcaron:"\u017e",zcy:"\u0437",zdot:"\u017c",zeetrf:"\u2128",zeta:"\u03b6",zfr:"\ud835\udd37",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\ud835\udd6b",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"},O=function(e){return!!N.call(A,e)&&A[e]},N={}.hasOwnProperty,I=function(e,t){var n,r,i={};for(r in t||(t={}),R)n=t[r],i[r]=null==n?R[r]:n;return(i.position.indent||i.position.start)&&(i.indent=i.position.indent||[],i.position=i.position.start),function(e,t){var n,r,i,a,o,s,u,c,l,d,p,f,h,g,m,_,v,y,b,D=t.additional,E=t.nonTerminated,x=t.text,k=t.reference,T=t.warning,A=t.textContext,N=t.referenceContext,I=t.warningContext,R=t.position,K=t.indent||[],q=e.length,G=0,Y=-1,J=R.column||1,$=R.line||1,Q="",X=[];for("string"==typeof D&&(D=D.charCodeAt(0)),_=Z(),c=T?ee:P,G--,q++;++G65535&&(d+=L((s-=65536)>>>10|55296),s=56320|1023&s),s=d+L(s))):g!==M&&c(4,y)),s?(te(),_=Z(),G=b-1,J+=b-h+1,X.push(s),(v=Z()).offset++,k&&k.call(N,s,{start:_,end:v},e.slice(h-1,b)),_=v):(a=e.slice(h-1,b),Q+=a,J+=a.length,G=b-1)}else 10===o&&($++,Y++,J=0),o==o?(Q+=L(o),J++):te();return X.join("");function Z(){return{line:$,column:J,offset:G+(R.offset||0)}}function ee(e,t){var n=Z();n.column+=t,n.offset+=t,T.call(I,z[e],n,e)}function te(){Q&&(X.push(Q),x&&x.call(A,Q,{start:_,end:Z()}),Q="")}}(e,i)},F={}.hasOwnProperty,L=String.fromCharCode,P=Function.prototype,R={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},M="named",B="hexadecimal",j="decimal",U={hexadecimal:16,decimal:10},V={};V.named=w,V[j]=x,V[B]=k;var z={};function H(e){return e>=55296&&e<=57343||e>1114111}function W(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}z[1]="Named character references must be terminated by a semicolon",z[2]="Numeric character references must be terminated by a semicolon",z[3]="Named character references cannot be empty",z[4]="Numeric character references cannot be empty",z[5]="Named character references must be known",z[6]="Numeric character references cannot be disallowed",z[7]="Numeric character references cannot be outside the permissible Unicode range";var K=function(t){return r.raw=i,r;function n(e){for(var n=t.offset,r=e.line,i=[];++r&&r in n;)i.push((n[r]||0)+1);return{start:e,indent:i}}function r(e,r,i){I(e,{position:n(r),warning:a,text:i,reference:i,textContext:t,referenceContext:t})}function i(t,r,i){return I(t,e(i,{position:n(r),warning:a}))}function a(e,n,r){3!==r&&t.file.message(e,n)}},q=function(e){return function(t,n){var r,i,a,o,s,u=this,c=u.offset,l=[],d=u[e+"Methods"],p=u[e+"Tokenizers"],f=n.line,h=n.column;if(!t)return l;for(E.now=_,E.file=u.file,g("");t;){for(r=-1,i=d.length,o=!1;++r"],X=Q.concat(["~","|"]),Z=X.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);function ee(e){var t=e||{};return t.commonmark?Z:t.gfm?X:Q}ee.default=Q,ee.gfm=X,ee.commonmark=Z;var te={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},ne=function(t){var n,r,i=this,a=i.options;if(null==t)t={};else{if("object"!=typeof t)throw new Error("Invalid value `"+t+"` for setting `options`");t=e(t)}for(n in te){if(null==(r=t[n])&&(r=a[n]),"blocks"!==n&&"boolean"!=typeof r||"blocks"===n&&"object"!=typeof r)throw new Error("Invalid value `"+r+"` for setting `options."+n+"`");t[n]=r}return i.options=t,i.escape=$(t),i},re=ie;function ie(e){if("string"==typeof e)return function(e){return t;function t(t){return Boolean(t&&t.type===e)}}(e);if(null==e)return se;if("object"==typeof e)return("length"in e?oe:ae)(e);if("function"==typeof e)return e;throw new Error("Expected function, string, or object as test")}function ae(e){return function(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function oe(e){var t=function(e){for(var t=[],n=e.length,r=-1;++ri&&s=n)return ke.substr(0,n);for(;n>ke.length&&t>1;)1&t&&(ke+=e),t>>=1,e+=e;return ke=(ke+=e).substr(0,n)},we=function(e){for(var t=String(e),n=t.length;"\n"===t.charAt(--n););return t.slice(0,n+1)},Ae=function(e,t,n){for(var r,i,a,o=-1,s=t.length,u="",c="",l="",d="";++o=4)){for(c="";y"===t.charAt(E)){if(n)return!0;for(E=0;E"===t.charAt(E)?(E++,l=!0," "===t.charAt(E)&&E++):E=c,s=t.slice(E,o),!l&&!Pe(s)){E=c;break}if(!l&&(a=t.slice(E),Re(g,h,p,[e,a,!0])))break;u=c===E?s:t.slice(c,o),D.push(E-c),y.push(u),b.push(s),E=o+1}for(E=-1,v=D.length,r=e(y.join("\n"));++E6)&&a&&(o||t.charAt(u+1)!==Ve)){for(s=t.length+1,i="";++u=3&&(!r||"\n"===r)?(c+=o,!!n||e(c)({type:"thematicBreak"})):void 0;o+=r}},He=function(e){for(var t,n=0,r=0,i=e.charAt(n),a={},o=0;"\t"===i||" "===i;){for(r+=t="\t"===i?4:1,t>1&&(r=Math.floor(r/t)*t);o0&&r.indent=y.indent&&(k=!0),o=t.charAt(I),d=null,!k){if("*"===o||"+"===o||"-"===o)d=o,I++,r++;else{for(i="";I=y.indent||r>4):k=!0,l=!1,I=c;if(f=t.slice(c,u),p=c===I?f:t.slice(I,u),("*"===d||"_"===d||"-"===d)&&O.thematicBreak.call(T,e,f,!0))break;if(h=g,g=!l&&!Pe(p).length,k&&y)y.value=y.value.concat(v,f),_=_.concat(v,f),v=[];else if(l)0!==v.length&&(P=!0,y.value.push(""),y.trail=v.concat()),y={value:[f],indent:r,trail:[]},m.push(y),_=_.concat(v,f),v=[];else if(g){if(h&&!w)break;v.push(f)}else{if(h)break;if(Re(N,O,T,[e,f,!0]))break;y.value=y.value.concat(v,f),_=_.concat(v,f),v=[]}I=u+1}for(E=e(_.join(Ge)).reset({type:"list",ordered:a,start:L,spread:P,children:[]}),b=T.enterList(),D=T.enterBlock(),I=-1,F=m.length;++I=3){l--;break}d+=a}for(r="",i="";++l`\\u0000-\\u0020]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",at="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",ot={openCloseTag:new RegExp("^(?:"+it+"|"+at+")"),tag:new RegExp("^(?:"+it+"|"+at+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)")},st=function(e,t,n){for(var r,i,a,o,s,u,c,l=this.options.blocks.join("|"),d=new RegExp("^|$))","i"),p=t.length,f=0,h=[[ut,ct,!0],[lt,dt,!0],[pt,ft,!0],[ht,gt,!0],[mt,_t,!0],[d,vt,!0],[yt,vt,!1]];f|$))/i,ct=/<\/(script|pre|style)>/i,lt=/^/,pt=/^<\?/,ft=/\?>/,ht=/^/,mt=/^/,vt=/^$/,yt=new RegExp(ot.openCloseTag.source+"\\s*$"),bt=function(e){return Et.test("number"==typeof e?Dt(e):e.charAt(0))},Dt=String.fromCharCode,Et=/\s/,Ct=function(e){return String(e).replace(/\s+/g," ")},St=function(e){return Ct(e).toLowerCase()},xt=function(e,t,n){for(var r,i,a,o,s,u,c,l,d=this,p=d.options.commonmark,f=0,h=t.length,g="";f"!==e&&"["!==e&&e!==At}function Nt(e){return"["!==e&&e!==At&&!bt(e)}Ot.delimiter=">";var It=function(e,t,n){var r,i,a,o,s,u,c,l,d,p,f,h,g,m,_,v,y,b,D,E,C,S;if(this.options.gfm){for(r=0,v=0,u=t.length+1,c=[];rE){if(v<2)return;break}c.push(t.slice(r,E)),v++,r=E+1}for(o=c.join(Ft),r=0,u=(i=c.splice(1,1)[0]||[]).length,v--,a=!1,f=[];r1&&(d?(o+=l.slice(0,-1),l=l.charAt(l.length-1)):(o+=l,l="")),m=e.now(),e(o)({type:"tableCell",children:this.tokenizeInline(h,m)},s)),e(l+d),l="",h=""):(l&&(h+=l,l=""),h+=d,"\\"===d&&r!==u-2&&(h+=y.charAt(r+1),r++)),g=!1,r++):(h?l+=d:e(d),r++);_||e(Ft+i)}return D}}},Ft="\n",Lt="left",Pt=function(e,t,n){for(var r,i,a,o,s,u=this,c=u.options.commonmark,l=u.blockTokenizers,d=u.interruptParagraph,p=t.indexOf(Rt),f=t.length;p=4&&a!==Rt){p=t.indexOf(Rt,p+1);continue}}if(i=t.slice(p+1),Re(d,l,u,[e,i,!0]))break;if(r=p,-1!==(p=t.indexOf(Rt,p+1))&&""===Pe(t.slice(r,p))){p=r;break}}return i=t.slice(0,p),!!n||(s=e.now(),e(i=we(i))({type:"paragraph",children:u.tokenizeInline(i,s)}))},Rt="\n",Mt=function(e,t){return e.indexOf("\\",t)},Bt=jt;function jt(e,t,n){var r,i;if("\\"===t.charAt(0)&&(r=t.charAt(1),-1!==this.escape.indexOf(r)))return!!n||(i="\n"===r?{type:"break"}:{type:"text",value:r},e("\\"+r)(i))}jt.locator=Mt;var Ut=function(e,t){return e.indexOf("<",t)},Vt=Wt;Wt.locator=Ut,Wt.notInLink=!0;var zt="mailto:",Ht=zt.length;function Wt(e,t,n){var r,i,a,o,s,u=this,c="",l=t.length,d=0,p="",f=!1,h="";if("<"===t.charAt(0)){for(d++,c="<";d"===r||"@"===r||":"===r&&"/"===t.charAt(d+1)));)p+=r,d++;if(p){if(h+=p,p="",h+=r=t.charAt(d),d++,"@"===r)f=!0;else{if(":"!==r||"/"!==t.charAt(d+1))return;h+="/",d++}for(;d"!==r);)p+=r,d++;if(r=t.charAt(d),p&&">"===r)return!!n||(a=h+=p,c+=h+r,(i=e.now()).column++,i.offset++,f&&(h.slice(0,Ht).toLowerCase()===zt?(a=a.slice(Ht),i.column+=Ht,i.offset+=Ht):h=zt+h),o=u.inlineTokenizers,u.inlineTokenizers={text:o.text},s=u.enterLink(),a=u.tokenizeInline(a,i),u.inlineTokenizers=o,s(),e(c)({type:"link",title:null,url:I(h,{nonTerminated:!1}),children:a}))}}}var Kt=function(e,t){var n,r=String(e),i=0;if("string"!=typeof t||1!==t.length)throw new Error("Expected character");for(n=r.indexOf(t);-1!==n;)i++,n=r.indexOf(t,n+1);return i},qt=function(e,t){var n,r,i,a=-1;if(!this.options.gfm)return a;for(r=Gt.length,n=-1;++nd;)o=s+u.lastIndexOf(")"),u=t.slice(s,o),p--;if(59===t.charCodeAt(o-1)&&(o--,T(t.charCodeAt(o-1)))){for(l=o-2;T(t.charCodeAt(l));)l--;38===t.charCodeAt(l)&&(o=l)}return f=t.slice(0,o),g=I(f,{nonTerminated:!1}),E&&(g="http://"+g),m=_.enterLink(),_.inlineTokenizers={text:y.text},h=_.tokenizeInline(f,e.now()),_.inlineTokenizers=y,m(),e(f)({type:"link",title:null,url:g,children:h})}}}Jt.locator=qt,Jt.notInLink=!0;var $t=function e(t,n){var r,i;if(!this.options.gfm)return-1;if(-1===(r=t.indexOf("@",n)))return-1;if((i=r)===n||!Qt(t.charCodeAt(i-1)))return e.call(this,t,r+1);for(;i>n&&Qt(t.charCodeAt(i-1));)i--;return i};function Qt(e){return x(e)||T(e)||43===e||45===e||46===e||95===e}var Xt=Zt;function Zt(e,t,n){var r,i,a,o,s=this,u=s.options.gfm,c=s.inlineTokenizers,l=0,d=t.length,p=-1;if(u){for(r=t.charCodeAt(l);x(r)||T(r)||43===r||45===r||46===r||95===r;)r=t.charCodeAt(++l);if(0!==l&&64===r){for(l++;l/i;function an(e,t,n){var r,i,a=this,o=t.length;if(!("<"!==t.charAt(0)||o<3)&&(r=t.charAt(1),(T(r)||"?"===r||"!"===r||"/"===r)&&(i=t.match(en))))return!!n||(i=i[0],!a.inLink&&nn.test(i)?a.inLink=!0:a.inLink&&rn.test(i)&&(a.inLink=!1),e(i)({type:"html",value:i}))}var on=function(e,t){var n=e.indexOf("[",t),r=e.indexOf("![",t);return-1===r||n=a&&(a=0):a=i}else if(S===ln)C++,u+=t.charAt(C);else if(a&&!T||"["!==S){if((!a||T)&&"]"===S){if(!g){if(t.charAt(C+1)!==un)return;u+=un,r=!0,C++;break}g--}}else g++;m+=u,u="",C++}if(r){for(d=m,E+=m+u,C++;C"!==(S=t.charAt(C));){if(k&&"\n"===S)return;m+=S,C++}if(">"!==t.charAt(C))return;E+="<"+m+">",_=m,C++}else{for(S=null,u="";C2&&(32===o||10===o)&&(32===s||10===s)){for(l++,c--;lt&&" "===e.charAt(n-1);)n--;return n},Rn=Mn;function Mn(e,t,n){for(var r,i=t.length,a=-1,o="";++aa.length;o&&a.push(r);try{t=e.apply(null,a)}catch(e){if(o&&n)throw e;return r(e)}o||(t&&"function"==typeof t.then?t.then(i,r):t instanceof Error?r(t):i(t))};function r(){n||(n=!0,t.apply(null,arguments))}function i(e){r(null,e)}},ir=or;or.wrap=rr;var ar=[].slice;function or(){var e=[],t={run:function(){var t=-1,n=ar.call(arguments,0,-1),r=arguments[arguments.length-1];if("function"!=typeof r)throw new Error("Expected function as last argument, not "+r);function i(a){var o=e[++t],s=ar.call(arguments,0).slice(1),u=n.length,c=-1;if(a)r(a);else{for(;++c1)for(var n=1;n2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",i=0):i=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),a=s,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=s,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var Hr={resolve:function(){for(var e,t="",n=!1,r=arguments.length-1;r>=-1&&!n;r--){var i;r>=0?i=arguments[r]:(void 0===e&&(e=Ur.cwd()),i=e),Vr(i),0!==i.length&&(t=i+"/"+t,n=47===i.charCodeAt(0))}return t=zr(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(Vr(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=zr(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return Vr(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":Hr.normalize(e)},relative:function(e,t){if(Vr(e),Vr(t),e===t)return"";if((e=Hr.resolve(e))===(t=Hr.resolve(t)))return"";for(var n=1;ns){if(47===t.charCodeAt(a+c))return t.slice(a+c+1);if(0===c)return t.slice(a+c)}else i>s&&(47===e.charCodeAt(n+c)?u=c:0===c&&(u=0));break}var l=e.charCodeAt(n+c);if(l!==t.charCodeAt(a+c))break;47===l&&(u=c)}var d="";for(c=n+u+1;c<=r;++c)c!==r&&47!==e.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+t.slice(a+u):(a+=u,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(Vr(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Vr(e);var n,r=0,i=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var o=t.length-1,s=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(47===u){if(!a){r=n+1;break}}else-1===s&&(a=!1,s=n+1),o>=0&&(u===t.charCodeAt(o)?-1==--o&&(i=n):(o=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){r=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){Vr(e);for(var t=-1,n=0,r=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){n=o+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}("/",e)},parse:function(e){Vr(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0),i=47===r;i?(t.root="/",n=1):n=0;for(var a=-1,o=0,s=-1,u=!0,c=e.length-1,l=0;c>=n;--c)if(47!==(r=e.charCodeAt(c)))-1===s&&(u=!1,s=c+1),46===r?-1===a?a=c:1!==l&&(l=1):-1!==a&&(l=-1);else if(!u){o=c+1;break}return-1===a||-1===s||0===l||1===l&&a===s-1&&a===o+1?-1!==s&&(t.base=t.name=0===o&&i?e.slice(1,s):e.slice(o,s)):(0===o&&i?(t.name=e.slice(1,a),t.base=e.slice(1,s)):(t.name=e.slice(o,a),t.base=e.slice(o,s)),t.ext=e.slice(a,s)),o>0?t.dir=e.slice(0,o-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Hr.posix=Hr;var Wr=Hr,Kr=d(Object.freeze(Object.assign(Object.create(null),Wr,{default:Wr,__moduleExports:Wr}))),qr=function(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var n=Kr.basename(e,Kr.extname(e))+t;return Kr.join(Kr.dirname(e),n)},Gr=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},Yr=Xr,Jr={}.hasOwnProperty,$r=Xr.prototype,Qr=["history","path","basename","stem","extname","dirname"];function Xr(e){var t,n,r;if(e){if("string"==typeof e||Gr(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof Xr))return new Xr(e);for(this.data={},this.messages=[],this.history=[],this.cwd=Ur.cwd(),n=-1,r=Qr.length;++n57)&&(!p||o===mi)){u=h-1,h++,p&&h++,c=h;break}}else 92===a&&(h++,o=n.charCodeAt(h+1));h++}if(void 0!==c)return!!r||(l=n.slice(s,u+1),e(n.slice(0,c))({type:"inlineMath",value:l,data:{hName:"span",hProperties:{className:_i.concat(p&&t.inlineMathDouble?[vi]:[])},hChildren:[{type:"text",value:l}]}}))}}}a.locator=i,n.inlineTokenizers.math=a,r.splice(r.indexOf("text"),0,"math")}(t,e),hi.isRemarkCompiler(n)&&function(e){function t(e){var t="$";return(e.data&&e.data.hProperties&&e.data.hProperties.className||[]).includes(vi)&&(t="$$"),t+e.value+t}e.prototype.visitors.inlineMath=t}(n)},mi=36,_i=["math","math-inline"],vi="math-display",yi=function(){var e=this.Parser,t=this.Compiler;hi.isRemarkParser(e)&&function(e){var t=e.prototype,n=t.blockMethods,r=t.interruptParagraph,i=t.interruptList,a=t.interruptBlockquote;function o(e,t,n){for(var r,i,a,o,s,u,c,l,d,p,f,h=t.length,g=0;gp&&t.charCodeAt(o-1)===bi;)o--;for(;o>p&&t.charCodeAt(o-1)===Di;)d++,o--;for(u<=d&&t.indexOf("$",p)===o&&(l=!0,f=o);p<=f&&p-gp&&t.charCodeAt(f-1)===bi;)f--;if(l&&p===f||i.push(t.slice(p,f)),l)break;g=a+1,a=-1===(a=t.indexOf(Ei,g+1))?h:a}return i=i.join("\n"),e(t.slice(0,a))({type:"math",value:i,data:{hName:"div",hProperties:{className:Ci.concat()},hChildren:[{type:"text",value:i}]}})}}}t.blockTokenizers.math=o,n.splice(n.indexOf("fencedCode")+1,0,"math"),r.splice(r.indexOf("fencedCode")+1,0,["math"]),i.splice(i.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"])}(e),hi.isRemarkCompiler(t)&&function(e){function t(e){return"$$\n"+e.value+"\n$$"}e.prototype.visitors.math=t}(t)},bi=32,Di=36,Ei="\n",Ci=["math","math-display"],Si=function(e){var t=e||{};yi.call(this,t),gi.call(this,t)},xi=function(e){var t=this.Parser,n=this.Compiler;(function(e){return Boolean(e&&e.prototype&&e.prototype.blockTokenizers)})(t)&&function(e,t){for(var n,r=t||{},i=e.prototype,a=i.blockTokenizers,o=i.inlineTokenizers,s=i.blockMethods,u=i.inlineMethods,c=a.definition,l=o.reference,d=[],p=-1,f=s.length;++p4&&(f=void 0,h=D);else{if(f<4&&m&&(m.contentStart===m.contentEnd||Fi(v,a,_,[e,t.slice(D,1024),!0])))break;f=void 0,h=D}D++}for(D=-1,b=g.length;b>0&&(m=g[b-1]).contentStart===m.contentEnd;)b--;for(c=e(t.slice(0,m.contentEnd));++D0){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{}).onlyFirst,t=void 0!==e&&e,n=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(n,t?void 0:"g")}(),""):e},Wi=function(e){return!Number.isNaN(e)&&e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)},Ki=Wi,qi=Wi;Ki.default=qi;var Gi=function(e){if("string"!=typeof(e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===e.length)return 0;e=Hi(e);for(var t=0,n=0;n=127&&r<=159||r>=768&&r<=879||(r>65535&&n++,t+=Ki(r)?2:1)}return t},Yi=Gi,Ji=Gi;function $i(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Yi.default=Ji;var Qi="object"==typeof Ur&&Ur.env&&Ur.env.NODE_DEBUG&&/\bsemver\b/i.test(Ur.env.NODE_DEBUG)?function(){for(var e,t=arguments.length,n=new Array(t),r=0;r)?=?)"),s("XRANGEIDENTIFIERLOOSE","".concat(i[a.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),s("XRANGEIDENTIFIER","".concat(i[a.NUMERICIDENTIFIER],"|x|X|\\*")),s("XRANGEPLAIN","[v=\\s]*(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:".concat(i[a.PRERELEASE],")?").concat(i[a.BUILD],"?")+")?)?"),s("XRANGEPLAINLOOSE","[v=\\s]*(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(i[a.PRERELEASELOOSE],")?").concat(i[a.BUILD],"?")+")?)?"),s("XRANGE","^".concat(i[a.GTLT],"\\s*").concat(i[a.XRANGEPLAIN],"$")),s("XRANGELOOSE","^".concat(i[a.GTLT],"\\s*").concat(i[a.XRANGEPLAINLOOSE],"$")),s("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:$|[^\\d])"),s("COERCERTL",i[a.COERCE],!0),s("LONETILDE","(?:~>?)"),s("TILDETRIM","(\\s*)".concat(i[a.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",s("TILDE","^".concat(i[a.LONETILDE]).concat(i[a.XRANGEPLAIN],"$")),s("TILDELOOSE","^".concat(i[a.LONETILDE]).concat(i[a.XRANGEPLAINLOOSE],"$")),s("LONECARET","(?:\\^)"),s("CARETTRIM","(\\s*)".concat(i[a.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",s("CARET","^".concat(i[a.LONECARET]).concat(i[a.XRANGEPLAIN],"$")),s("CARETLOOSE","^".concat(i[a.LONECARET]).concat(i[a.XRANGEPLAINLOOSE],"$")),s("COMPARATORLOOSE","^".concat(i[a.GTLT],"\\s*(").concat(i[a.LOOSEPLAIN],")$|^$")),s("COMPARATOR","^".concat(i[a.GTLT],"\\s*(").concat(i[a.FULLPLAIN],")$|^$")),s("COMPARATORTRIM","(\\s*)".concat(i[a.GTLT],"\\s*(").concat(i[a.LOOSEPLAIN],"|").concat(i[a.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",s("HYPHENRANGE","^\\s*(".concat(i[a.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(i[a.XRANGEPLAIN],")")+"\\s*$"),s("HYPHENRANGELOOSE","^\\s*(".concat(i[a.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(i[a.XRANGEPLAINLOOSE],")")+"\\s*$"),s("STAR","(<|>)?=?\\s*\\*"),s("GTE0","^\\s*>=\\s*0.0.0\\s*$"),s("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")})),ea=/^[0-9]+$/,ta=function(e,t){var n=ea.test(e),r=ea.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:era)throw new TypeError("version is longer than ".concat(ra," characters"));Qi("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var r=t.trim().match(n.loose?aa[oa.LOOSE]:aa[oa.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>ia||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ia||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ia||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}(),ca=function(e,t,n){return new ua(e,n).compare(new ua(t,n))},la=function(e,t,n){return ca(e,t,n)<0},da=function(e,t,n){return ca(e,t,n)>=0},pa="2.2.1";function fa(){var e=$i(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]);return fa=function(){return e},e}function ha(){var e=$i(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]);return ha=function(){return e},e}function ga(){var e=$i(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]);return ga=function(){return e},e}function ma(){var e=$i(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]);return ma=function(){return e},e}function _a(){var e=$i(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "]);return _a=function(){return e},e}function va(){var e=$i(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]);return va=function(){return e},e}var ya=l((function(e,t){function n(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:{},r=n.plugins,u=void 0===r?[]:r,c=n.showUnreleased,l=void 0!==c&&c,d=n.showDeprecated,p=void 0!==d&&d,f=n.showInternal,h=void 0!==f&&f,g=Ta.split("-",1)[0],m=u.reduce((function(e,t){return e.concat(t.languages||[])}),[]).filter(v),_=(e=Object.assign.apply(Object,[{}].concat(s(u.map((function(e){return e.options}))),[wa])),t="name",Object.entries(e).map((function(e){var n=o(e,2),r=n[0],i=n[1];return Object.assign(a({},t,r),i)}))).filter((function(e){return v(e)&&y(e)})).sort((function(e,t){return e.name===t.name?0:e.name=0||(i[n]=e[n]);return i}(e,["cliName","cliCategory","cliDescription"])})).map((function(e){e=Object.assign({},e),Array.isArray(e.default)&&(e.default=1===e.default.length?e.default[0].value:e.default.filter(v).sort((function(e,t){return ka.compare(t.since,e.since)}))[0].value),Array.isArray(e.choices)&&(e.choices=e.choices.filter((function(e){return v(e)&&y(e)})),"parser"===e.name&&function(e,t,n){var r,a=new Set(e.choices.map((function(e){return e.value}))),o=i(t);try{for(o.s();!(r=o.n()).done;){var s=r.value;if(s.parsers){var u,c=i(s.parsers);try{var l=function(){var t=u.value;if(!a.has(t)){a.add(t);var r=n.find((function(e){return e.parsers&&e.parsers[t]})),i=s.name;r&&r.name&&(i+=" (plugin: ".concat(r.name,")")),e.choices.push({value:t,description:i})}};for(c.s();!(u=c.n()).done;)l()}catch(d){c.e(d)}finally{c.f()}}}}catch(d){o.e(d)}finally{o.f()}}(e,m,u));var t=u.filter((function(t){return t.defaultOptions&&void 0!==t.defaultOptions[e.name]})).reduce((function(t,n){return t[n.name]=n.defaultOptions[e.name],t}),{});return Object.assign({},e,{pluginDefaults:t})}));return{languages:m,options:_};function v(e){return l||!("since"in e)||e.since&&ka.gte(g,e.since)}function y(e){return p||!("deprecated"in e)||e.deprecated&&ka.lt(g,e.deprecated)}},Oa=/[^\x20-\x7F]/;function Na(e){return function(t,n,r){var i=r&&r.backwards;if(!1===n)return!1;for(var a=t.length,o=n;o>=0&&o(n.match(o.regex)||[]).length?o.quote:a.quote),s}function Ka(e,t,n){var r='"'===t?"'":'"',i=e.replace(/\\([\S\s])|(["'])/g,(function(e,i,a){return i===r?i:a===t?"\\"+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)}));return t+i+t}function qa(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,"JSXText"===e.type&&(t.printed=!0)}var Ga,Ya={inferParserByLanguage:function(e,t){var n=Aa({plugins:t.plugins}).languages,r=n.find((function(t){return t.name.toLowerCase()===e}))||n.find((function(t){var n=t.aliases;return Array.isArray(n)&&n.includes(e)}))||n.find((function(t){var n=t.extensions;return Array.isArray(n)&&n.includes(".".concat(e))}));return r&&r.parsers[0]},replaceEndOfLineWith:function(e,t){var n,r=[],a=i(e.split("\n"));try{for(a.s();!(n=a.n()).done;){var o=n.value;0!==r.length&&r.push(t),r.push(o)}}catch(s){a.e(s)}finally{a.f()}return r},getStringWidth:function(e){return e?Oa.test(e)?Yi(e):e.length:0},getMaxContinuousCount:function(e,t){var n=e.match(new RegExp("(".concat(Li(t),")+"),"g"));return null===n?0:n.reduce((function(e,n){return Math.max(e,n.length/t.length)}),0)},getMinNotPresentContinuousCount:function(e,t){var n=e.match(new RegExp("(".concat(Li(t),")+"),"g"));if(null===n)return 0;var r,a=new Map,o=0,s=i(n);try{for(s.s();!(r=s.n()).done;){var u=r.value.length/t.length;a.set(u,!0),u>o&&(o=u)}}catch(l){s.e(l)}finally{s.f()}for(var c=1;c=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"},convertEndOfLineToChars:function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}},countEndOfLineChars:function(e,t){var n;if("\n"===t)n=/\n/g;else if("\r"===t)n=/\r/g;else{if("\r\n"!==t)throw new Error('Unexpected "eol" '.concat(JSON.stringify(t),"."));n=/\r\n/g}var r=e.match(n);return r?r.length:0},normalizeEndOfLine:function(e){return e.replace(/\r\n?/g,"\n")}},$a=Ya.getStringWidth,Qa=Ja.convertEndOfLineToChars,Xa=zi.concat,Za=zi.fill,eo=zi.cursor;function to(e,t){return ro(e,{type:"indent"},t)}function no(e,t,n){return t===-1/0?e.root||{value:"",length:0,queue:[]}:t<0?ro(e,{type:"dedent"},n):t?"root"===t.type?Object.assign({},e,{root:e}):ro(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},n):e}function ro(e,t,n){var r,a="dedent"===t.type?e.queue.slice(0,-1):e.queue.concat(t),o="",s=0,u=0,c=0,l=i(a);try{for(l.s();!(r=l.n()).done;){var d=r.value;switch(d.type){case"indent":h(),n.useTabs?p(1):f(n.tabWidth);break;case"stringAlign":h(),o+=d.n,s+=d.n.length;break;case"numberAlign":u+=1,c+=d.n;break;default:throw new Error("Unexpected type '".concat(d.type,"'"))}}}catch(_){l.e(_)}finally{l.f()}return g(),Object.assign({},e,{value:o,length:s,queue:a});function p(e){o+="\t".repeat(e),s+=n.tabWidth*e}function f(e){o+=" ".repeat(e),s+=e}function h(){n.useTabs?(u>0&&p(u),m()):g()}function g(){c>0&&f(c),m()}function m(){u=0,c=0}}function io(e){if(0===e.length)return 0;for(var t=0;e.length>0&&"string"==typeof e[e.length-1]&&e[e.length-1].match(/^[\t ]*$/);)t+=e.pop().length;if(e.length&&"string"==typeof e[e.length-1]){var n=e[e.length-1].replace(/[\t ]*$/,"");t+=e[e.length-1].length-n.length,e[e.length-1]=n}return t}function ao(e,t,n,r,i){for(var a=t.length,s=[e],u=[];n>=0;)if(0!==s.length){var c=s.pop(),l=o(c,3),d=l[0],p=l[1],f=l[2];if("string"==typeof f)u.push(f),n-=$a(f);else switch(f.type){case"concat":for(var h=f.parts.length-1;h>=0;h--)s.push([d,p,f.parts[h]]);break;case"indent":s.push([to(d,r),p,f.contents]);break;case"align":s.push([no(d,f.n,r),p,f.contents]);break;case"trim":n+=io(u);break;case"group":if(i&&f.break)return!1;s.push([d,f.break?1:p,f.contents]),f.id&&(Ga[f.id]=s[s.length-1][1]);break;case"fill":for(var g=f.parts.length-1;g>=0;g--)s.push([d,p,f.parts[g]]);break;case"if-break":var m=f.groupId?Ga[f.groupId]:p;1===m&&f.breakContents&&s.push([d,p,f.breakContents]),2===m&&f.flatContents&&s.push([d,p,f.flatContents]);break;case"line":switch(p){case 2:if(!f.hard){f.soft||(u.push(" "),n-=1);break}return!0;case 1:return!0}}}else{if(0===a)return!0;s.push(t[a-1]),a--}return!1}var oo={printDocToString:function(e,t){Ga={};for(var n=t.printWidth,r=Qa(t.endOfLine),i=0,a=[[{value:"",length:0,queue:[]},1,e]],u=[],c=!1,l=[];0!==a.length;){var d=a.pop(),p=o(d,3),f=p[0],h=p[1],g=p[2];if("string"==typeof g){var m="\n"!==r&&g.includes("\n")?g.replace(/\n/g,r):g;u.push(m),i+=$a(m)}else switch(g.type){case"cursor":u.push(eo.placeholder);break;case"concat":for(var _=g.parts.length-1;_>=0;_--)a.push([f,h,g.parts[_]]);break;case"indent":a.push([to(f,t),h,g.contents]);break;case"align":a.push([no(f,g.n,t),h,g.contents]);break;case"trim":i-=io(u);break;case"group":switch(h){case 2:if(!c){a.push([f,g.break?1:2,g.contents]);break}case 1:c=!1;var v=[f,2,g.contents],y=n-i;if(!g.break&&ao(v,a,y,t))a.push(v);else if(g.expandedStates){var b=g.expandedStates[g.expandedStates.length-1];if(g.break){a.push([f,1,b]);break}for(var D=1;D=g.expandedStates.length){a.push([f,1,b]);break}var E=[f,2,g.expandedStates[D]];if(ao(E,a,y,t)){a.push(E);break}}}else a.push([f,1,g.contents])}g.id&&(Ga[g.id]=a[a.length-1][1]);break;case"fill":var C=n-i,S=g.parts;if(0===S.length)break;var x=o(S,2),k=x[0],T=x[1],w=[f,2,k],A=[f,1,k],O=ao(w,[],C,t,!0);if(1===S.length){O?a.push(w):a.push(A);break}var N=[f,2,T],I=[f,1,T];if(2===S.length){O?(a.push(N),a.push(w)):(a.push(I),a.push(A));break}S.splice(0,2);var F=[f,h,Za(S)],L=S[0];ao([f,2,Xa([k,T,L])],[],C,t,!0)?(a.push(F),a.push(N),a.push(w)):O?(a.push(F),a.push(I),a.push(w)):(a.push(F),a.push(I),a.push(A));break;case"if-break":var P=g.groupId?Ga[g.groupId]:h;1===P&&g.breakContents&&a.push([f,h,g.breakContents]),2===P&&g.flatContents&&a.push([f,h,g.flatContents]);break;case"line-suffix":l.push([f,h,g.contents]);break;case"line-suffix-boundary":l.length>0&&a.push([f,h,{type:"line",hard:!0}]);break;case"line":switch(h){case 2:if(!g.hard){g.soft||(u.push(" "),i+=1);break}c=!0;case 1:if(l.length){a.push([f,h,g]),a.push.apply(a,s(l.reverse())),l=[];break}g.literal?f.root?(u.push(r,f.root.value),i=f.root.length):(u.push(r),i=0):(i-=io(u),u.push(r+f.value),i=f.length)}}0===a.length&&l.length&&(a.push.apply(a,s(l.reverse())),l=[])}var R=u.indexOf(eo.placeholder);if(-1!==R){var M=u.indexOf(eo.placeholder,R+1),B=u.slice(0,R).join(""),j=u.slice(R+1,M).join("");return{formatted:B+j+u.slice(M+1).join(""),cursorNodeStart:B.length,cursorNodeText:j}}return{formatted:u.join("")}}},so=zi.literalline,uo=zi.concat,co={};function lo(e,t,n,r){for(var i=[e];0!==i.length;){var a=i.pop();if(a!==co){if(n&&i.push(a,co),!t||!1!==t(a))if("concat"===a.type||"fill"===a.type)for(var o=a.parts.length-1;o>=0;--o)i.push(a.parts[o]);else if("if-break"===a.type)a.flatContents&&i.push(a.flatContents),a.breakContents&&i.push(a.breakContents);else if("group"===a.type&&a.expandedStates)if(r)for(var s=a.expandedStates.length-1;s>=0;--s)i.push(a.expandedStates[s]);else i.push(a.contents);else a.contents&&i.push(a.contents)}else n(i.pop())}}function po(e,t){if("concat"===e.type||"fill"===e.type){var n=e.parts.map((function(e){return po(e,t)}));return t(Object.assign({},e,{parts:n}))}if("if-break"===e.type){var r=e.breakContents&&po(e.breakContents,t),i=e.flatContents&&po(e.flatContents,t);return t(Object.assign({},e,{breakContents:r,flatContents:i}))}if(e.contents){var a=po(e.contents,t);return t(Object.assign({},e,{contents:a}))}return t(e)}function fo(e,t,n){var r=n,i=!1;return lo(e,(function(e){var n=t(e);if(void 0!==n&&(i=!0,r=n),i)return!1})),r}function ho(e){return"string"!=typeof e&&("line"===e.type||void 0)}function go(e){return!("group"!==e.type||!e.break)||!("line"!==e.type||!e.hard)||"break-parent"===e.type||void 0}function mo(e){if(e.length>0){var t=e[e.length-1];t.expandedStates||(t.break=!0)}return null}function _o(e){return"line"!==e.type||e.hard?"if-break"===e.type?e.flatContents||"":e:e.soft?"":" "}function vo(e){for(var t=[],n=e.filter(Boolean);0!==n.length;){var r=n.shift();r&&("concat"!==r.type?0===t.length||"string"!=typeof t[t.length-1]||"string"!=typeof r?t.push(r):t[t.length-1]+=r:n.unshift.apply(n,s(r.parts)))}return t}function yo(e){if("concat"===e.type){for(var t=[],n=0;n1&&void 0!==arguments[1]&&arguments[1];if("concat"===t.type&&0!==t.parts.length){var r=n?function(e){for(var t,n=e.parts,r=e.parts.length;r>0&&!t;r--)t=n[r-1];return"group"===t.type&&(n=t.contents.parts),n}(t):t.parts,i=r[r.length-1];if("concat"===i.type)return 2===i.parts.length&&i.parts[0].hard&&"break-parent"===i.parts[1].type?{type:"concat",parts:r.slice(0,-1)}:{type:"concat",parts:t.parts.slice(0,-1).concat(e(i))}}return t},normalizeParts:vo,normalizeDoc:function(e){return po(e,(function(e){return e.parts?Object.assign({},e,{parts:vo(e.parts)}):e}))},replaceNewlinesWithLiterallines:function(e){return po(e,(function(e){return"string"==typeof e&&e.includes("\n")?uo(e.split(/(\n)/g).map((function(e,t){return t%2==0?e:so}))):e}))}},debug:{printDocToDebug:function(e){return bo(yo(e))}}}.builders,Eo=Do.hardline,Co=Do.concat,So=Do.markAsRoot,xo={"---":"yaml","+++":"toml"},ko={parse:function(e){var t=Object.keys(xo).map(Li).join("|"),n=e.match(new RegExp("^(".concat(t,")([^\\n]*)\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));if(null===n)return{frontMatter:null,content:e};var r=o(n,4),i=r[0],a=r[1],s=r[2],u=r[3],c=xo[a];return"toml"!==c&&s&&s.trim()&&(c=s.trim()),{frontMatter:{type:"front-matter",lang:c,value:u,raw:i.replace(/\n$/,"")},content:i.replace(/[^\n]/g," ")+e.slice(i.length)}},print:function(e,t){if("yaml"===e.lang){var n=e.value.trim(),r=n?t(n,{parser:"yaml"},{stripTrailingHardline:!0}):"";return So(Co(["---",Eo,r,r?Eo:"","---"]))}}},To=ko.parse,wo=["format","prettier"];function Ao(e){var t="@(".concat(wo.join("|"),")"),n=new RegExp(["\x3c!--\\s*".concat(t,"\\s*--\x3e"),"\x3c!--.*\r?\n[\\s\\S]*(^|\n)[^\\S\n]*".concat(t,"[^\\S\n]*($|\n)[\\s\\S]*\n.*--\x3e")].join("|"),"m"),r=e.match(n);return r&&0===r.index}var Oo={startWithPragma:Ao,hasPragma:function(e){return Ao(To(e).content.trimStart())},insertPragma:function(e){var t=To(e),n="\x3c!-- @".concat(wo[0]," --\x3e");return t.frontMatter?"".concat(t.frontMatter.raw,"\n\n").concat(n,"\n\n").concat(t.content):"".concat(n,"\n\n").concat(t.content)}},No={locStart:function(e){return e.position.start.offset},locEnd:function(e){return e.position.end.offset}},Io=Ya.getLast,Fo=No.locStart,Lo=No.locEnd,Po={cjkPattern:"(?:[\\u02ea-\\u02eb\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u3000-\\u303f\\u3041-\\u3096\\u3099-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u3190-\\u3191\\u3196-\\u31ba\\u31c0-\\u31e3\\u31f0-\\u321e\\u322a-\\u3247\\u3260-\\u327e\\u328a-\\u32b0\\u32c0-\\u32cb\\u32d0-\\u3370\\u337b-\\u337f\\u33e0-\\u33fe\\u3400-\\u4db5\\u4e00-\\u9fef\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufe10-\\ufe1f\\ufe30-\\ufe6f\\uff00-\\uffef]|[\\ud840-\\ud868\\ud86a-\\ud86c\\ud86f-\\ud872\\ud874-\\ud879][\\udc00-\\udfff]|\\ud82c[\\udc00-\\udd1e\\udd50-\\udd52\\udd64-\\udd67]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\uded6\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf34\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d])(?:[\\ufe00-\\ufe0f]|\\udb40[\\udd00-\\uddef])?",kPattern:"[\\u1100-\\u11ff\\u3001-\\u3003\\u3008-\\u3011\\u3013-\\u301f\\u302e-\\u3030\\u3037\\u30fb\\u3131-\\u318e\\u3200-\\u321e\\u3260-\\u327e\\ua960-\\ua97c\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ufe45-\\ufe46\\uff61-\\uff65\\uffa0-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]",punctuationPattern:"[\\u0021-\\u002f\\u003a-\\u0040\\u005b-\\u0060\\u007b-\\u007e\\u00a1\\u00a7\\u00ab\\u00b6-\\u00b7\\u00bb\\u00bf\\u037e\\u0387\\u055a-\\u055f\\u0589-\\u058a\\u05be\\u05c0\\u05c3\\u05c6\\u05f3-\\u05f4\\u0609-\\u060a\\u060c-\\u060d\\u061b\\u061e-\\u061f\\u066a-\\u066d\\u06d4\\u0700-\\u070d\\u07f7-\\u07f9\\u0830-\\u083e\\u085e\\u0964-\\u0965\\u0970\\u09fd\\u0a76\\u0af0\\u0c77\\u0c84\\u0df4\\u0e4f\\u0e5a-\\u0e5b\\u0f04-\\u0f12\\u0f14\\u0f3a-\\u0f3d\\u0f85\\u0fd0-\\u0fd4\\u0fd9-\\u0fda\\u104a-\\u104f\\u10fb\\u1360-\\u1368\\u1400\\u166e\\u169b-\\u169c\\u16eb-\\u16ed\\u1735-\\u1736\\u17d4-\\u17d6\\u17d8-\\u17da\\u1800-\\u180a\\u1944-\\u1945\\u1a1e-\\u1a1f\\u1aa0-\\u1aa6\\u1aa8-\\u1aad\\u1b5a-\\u1b60\\u1bfc-\\u1bff\\u1c3b-\\u1c3f\\u1c7e-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205e\\u207d-\\u207e\\u208d-\\u208e\\u2308-\\u230b\\u2329-\\u232a\\u2768-\\u2775\\u27c5-\\u27c6\\u27e6-\\u27ef\\u2983-\\u2998\\u29d8-\\u29db\\u29fc-\\u29fd\\u2cf9-\\u2cfc\\u2cfe-\\u2cff\\u2d70\\u2e00-\\u2e2e\\u2e30-\\u2e4f\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301f\\u3030\\u303d\\u30a0\\u30fb\\ua4fe-\\ua4ff\\ua60d-\\ua60f\\ua673\\ua67e\\ua6f2-\\ua6f7\\ua874-\\ua877\\ua8ce-\\ua8cf\\ua8f8-\\ua8fa\\ua8fc\\ua92e-\\ua92f\\ua95f\\ua9c1-\\ua9cd\\ua9de-\\ua9df\\uaa5c-\\uaa5f\\uaade-\\uaadf\\uaaf0-\\uaaf1\\uabeb\\ufd3e-\\ufd3f\\ufe10-\\ufe19\\ufe30-\\ufe52\\ufe54-\\ufe61\\ufe63\\ufe68\\ufe6a-\\ufe6b\\uff01-\\uff03\\uff05-\\uff0a\\uff0c-\\uff0f\\uff1a-\\uff1b\\uff1f-\\uff20\\uff3b-\\uff3d\\uff3f\\uff5b\\uff5d\\uff5f-\\uff65]|\\ud800[\\udd00-\\udd02\\udf9f\\udfd0]|\\ud801[\\udd6f]|\\ud802[\\udc57\\udd1f\\udd3f\\ude50-\\ude58\\ude7f\\udef0-\\udef6\\udf39-\\udf3f\\udf99-\\udf9c]|\\ud803[\\udf55-\\udf59]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc8\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udf3c-\\udf3e]|\\ud806[\\udc3b\\udde2\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71\\udef7-\\udef8\\udfff]|\\ud809[\\udc70-\\udc74]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud81b[\\ude97-\\ude9a\\udfe2]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]"},Ro=Po.cjkPattern,Mo=Po.kPattern,Bo=Po.punctuationPattern,jo=["liquidNode","inlineCode","emphasis","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"],Uo=jo.concat(["tableCell","paragraph","heading"]),Vo=new RegExp(Mo),zo=new RegExp(Bo);function Ho(e,t){var n=t.slice(e.position.start.offset,e.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/),r=o(n,4);return{numberText:r[1],marker:r[2],leadingSpaces:r[3]}}var Wo={mapAst:function(e,t){return function e(n,r,i){i=i||[];var a=Object.assign({},t(n,r,i));return a.children&&(a.children=a.children.map((function(t,n){return e(t,n,[a].concat(i))}))),a}(e,null,null)},splitText:function(e,t){var n="non-cjk",r="cj-letter",i="cjk-punctuation",a=[];return("preserve"===t.proseWrap?e:e.replace(new RegExp("(".concat(Ro,")\n(").concat(Ro,")"),"g"),"$1$2")).split(/([\t\n ]+)/).forEach((function(e,t,s){t%2!=1?(0!==t&&t!==s.length-1||""!==e)&&e.split(new RegExp("(".concat(Ro,")"))).forEach((function(e,t,a){(0!==t&&t!==a.length-1||""!==e)&&(t%2!=0?o(zo.test(e)?{type:"word",value:e,kind:i,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:e,kind:Vo.test(e)?"k-letter":r,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1}):""!==e&&o({type:"word",value:e,kind:n,hasLeadingPunctuation:zo.test(e[0]),hasTrailingPunctuation:zo.test(Io(e))}))})):a.push({type:"whitespace",value:/\n/.test(e)?"\n":" "})})),a;function o(e){var t,o,s=Io(a);s&&"word"===s.type&&(s.kind===n&&e.kind===r&&!s.hasTrailingPunctuation||s.kind===r&&e.kind===n&&!e.hasLeadingPunctuation?a.push({type:"whitespace",value:" "}):(t=n,o=i,s.kind===t&&e.kind===o||s.kind===o&&e.kind===t||[s.value,e.value].some((function(e){return/\u3000/.test(e)}))||a.push({type:"whitespace",value:""}))),a.push(e)}},punctuationPattern:Bo,getFencedCodeBlockValue:function(e,t){var n=e.value;return e.position.end.offset===t.length&&n.endsWith("\n")&&t.endsWith("\n")?n.slice(0,-1):n},getOrderedListItemInfo:Ho,hasGitDiffFriendlyOrderedList:function(e,t){if(!e.ordered)return!1;if(e.children.length<2)return!1;var n=Number(Ho(e.children[0],t.originalText).numberText),r=Number(Ho(e.children[1],t.originalText).numberText);if(0===n&&e.children.length>2){var i=Number(Ho(e.children[2],t.originalText).numberText);return 1===r&&1===i}return 1===r},INLINE_NODE_TYPES:jo,INLINE_NODE_WRAPPER_TYPES:Uo,isAutolink:function(e){if(!e||"link"!==e.type||1!==e.children.length)return!1;var t=e.children[0];return t&&Fo(e)===Fo(t)&&Lo(e)===Lo(t)}},Ko=/^import\s/,qo=/^export\s/,Go=function(e){return Ko.test(e)},Yo=function(e){return qo.test(e)},Jo=function(e,t){var n=t.indexOf("\n\n"),r=t.slice(0,n);if(Yo(r)||Go(r))return e(r)({type:Yo(r)?"export":"import",value:r})};Jo.locator=function(e){return Yo(e)||Go(e)?-1:1};var $o={esSyntax:function(){var e=this.Parser,t=e.prototype.blockTokenizers,n=e.prototype.blockMethods;t.esSyntax=Jo,n.splice(n.indexOf("paragraph"),0,"esSyntax")},BLOCKS_REGEX:"[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*|",COMMENT_REGEX:"\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e"},Qo=ko.parse,Xo=No.locStart,Zo=No.locEnd,es=Wo.mapAst,ts=Wo.INLINE_NODE_WRAPPER_TYPES;function ns(e){var t=e.isMDX;return function(e){var n=ii().use(Hn,Object.assign({commonmark:!0},t&&{blocks:[$o.BLOCKS_REGEX]})).use(xi).use(as).use(Si).use(t?$o.esSyntax:rs).use(os).use(t?is:rs).use(ss).use(us);return n.runSync(n.parse(e))}}function rs(e){return e}function is(){return function(e){return es(e,(function(e,t,n){var r=o(n,1)[0];return"html"!==e.type||e.value.match($o.COMMENT_REGEX)||ts.includes(r.type)?e:Object.assign({},e,{type:"jsx"})}))}}function as(){var e=this.Parser.prototype;function t(e,t){var n=Qo(t);if(n.frontMatter)return e(n.frontMatter.raw)(n.frontMatter)}e.blockMethods=["frontMatter"].concat(e.blockMethods),e.blockTokenizers.frontMatter=t,t.onlyAtStart=!0}function os(){var e=this.Parser.prototype,t=e.inlineMethods;function n(e,t){var n=t.match(/^({%[\S\s]*?%}|{{[\S\s]*?}})/);if(n)return e(n[0])({type:"liquidNode",value:n[0]})}t.splice(t.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=n,n.locator=function(e,t){return e.indexOf("{",t)}}function ss(){var e="wikiLink",t=r(/^\[\[([\s\S]+?)\]\]/,{linkContents:1}),n=this.Parser.prototype,i=n.inlineMethods;function a(n,r){var i=t.exec(r);if(i){var a=i.groups.linkContents.trim();return n(i[0])({type:e,value:a})}}i.splice(i.indexOf("link"),0,e),n.inlineTokenizers.wikiLink=a,a.locator=function(e,t){return e.indexOf("[",t)}}function us(){var e=this.Parser.prototype,t=e.blockTokenizers.list;function n(e,t,n){return"listItem"===t.type&&(t.loose=t.spread||"\n"===e.charAt(e.length-1),t.loose&&(n.loose=!0)),t}e.blockTokenizers.list=function(e,r,i){function a(t){var r=e(t);function i(e,i){return r(n(t,e,i),i)}return i.reset=function(e,i){return r.reset(n(t,e,i),i)},i}return a.now=e.now,t.call(this,a,r,i)}}var cs={astFormat:"mdast",hasPragma:Oo.hasPragma,locStart:Xo,locEnd:Zo},ls=Object.assign({},cs,{parse:ns({isMDX:!1})});return{parsers:{remark:ls,markdown:ls,mdx:Object.assign({},cs,{parse:ns({isMDX:!0})})}}}()}).call(this,n(163))},function(e,t,n){(function(t){var r=n(175),i=n(164),a=n(165),o=n(156),s=n(88),u=n(93);e.exports=function(){"use strict";var e=function(e,t){var n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n},n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof t?t:"undefined"!=typeof self?self:{};function c(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return d(null==t&&n.path)}},n.exports),n.exports}function l(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var p=Object.freeze({__proto__:null,default:{EOL:"\n",platform:function(){return"browser"},cpus:function(){return[{model:"Prettier"}]}}}),f=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t=e.match(/(?:\r?\n)/g)||[];if(0!==t.length){var n=t.filter((function(e){return"\r\n"===e})).length;return n>t.length-n?"\r\n":"\n"}},h=f;h.graceful=function(e){return"string"==typeof e&&f(e)||"\n"};var g=l(p),m=c((function(e,t){function n(){var e=g;return n=function(){return e},e}function r(){var e,t=(e=h)&&e.__esModule?e:{default:e};return r=function(){return t},t}Object.defineProperty(t,"__esModule",{value:!0}),t.extract=function(e){var t=e.match(o);return t?t[0].trimLeft():""},t.strip=function(e){var t=e.match(o);return t&&t[0]?e.substring(t[0].length):e},t.parse=function(e){return f(e).pragmas},t.parseWithComments=f,t.print=function(e){var t=e.comments,i=void 0===t?"":t,a=e.pragmas,o=void 0===a?{}:a,s=(0,r().default)(i)||n().EOL,u=" *",c=Object.keys(o),l=c.map((function(e){return m(e,o[e])})).reduce((function(e,t){return e.concat(t)}),[]).map((function(e){return" * "+e+s})).join("");if(!i){if(0===c.length)return"";if(1===c.length&&!Array.isArray(o[c[0]])){var d=o[c[0]];return"".concat("/**"," ").concat(m(c[0],d)[0]).concat(" */")}}var p=i.split(s).map((function(e){return"".concat(u," ").concat(e)})).join(s)+s;return"/**"+s+(i?p:"")+(i&&c.length?u+s:"")+l+" */"};var i=/\*\/$/,a=/^\/\*\*/,o=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,s=/(^|\s+)\/\/([^\r\n]*)/g,u=/^(\r?\n)+/,c=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,l=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,d=/(\r?\n|^) *\* ?/g,p=[];function f(e){var t=(0,r().default)(e)||n().EOL;e=e.replace(a,"").replace(i,"").replace(d,"$1");for(var o="";o!==e;)o=e,e=e.replace(c,"".concat(t,"$1 $2").concat(t));e=e.replace(u,"").trimRight();for(var f,h=Object.create(null),g=e.replace(l,"").replace(u,"").trimRight();f=l.exec(e);){var m=f[2].replace(s,"");"string"==typeof h[f[1]]||Array.isArray(h[f[1]])?h[f[1]]=p.concat(h[f[1]],m):h[f[1]]=m}return{comments:g,pragmas:h}}function m(e,t){return p.concat(t).map((function(t){return"@".concat(e," ").concat(t).trim()}))}})),_=function(e){return"string"==typeof e?e.replace(function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).onlyFirst,t=void 0!==e&&e,n=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(n,t?void 0:"g")}(),""):e},v=function(e){return!Number.isNaN(e)&&e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)},y=v,b=v;y.default=b;var D=function(e){if("string"!=typeof(e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===e.length)return 0;e=_(e);for(var t=0,n=0;n=127&&r<=159||r>=768&&r<=879||(r>65535&&n++,t+=y(r)?2:1)}return t},E=D,C=D;E.default=C;var S=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function x(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var k="undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function T(){throw new Error("setTimeout has not been defined")}function w(){throw new Error("clearTimeout has not been defined")}var A=T,O=w;function N(e){if(A===setTimeout)return setTimeout(e,0);if((A===T||!A)&&setTimeout)return A=setTimeout,setTimeout(e,0);try{return A(e,0)}catch(n){try{return A.call(null,e,0)}catch(n){return A.call(this,e,0)}}}"function"==typeof k.setTimeout&&(A=setTimeout),"function"==typeof k.clearTimeout&&(O=clearTimeout);var I,F=[],L=!1,P=-1;function R(){L&&I&&(L=!1,I.length?F=I.concat(F):P=-1,F.length&&M())}function M(){if(!L){var e=N(R);L=!0;for(var t=F.length;t;){for(I=F,F=[];++P1)for(var n=1;n)?=?)"),s("XRANGEIDENTIFIERLOOSE","".concat(i[a.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),s("XRANGEIDENTIFIER","".concat(i[a.NUMERICIDENTIFIER],"|x|X|\\*")),s("XRANGEPLAIN","[v=\\s]*(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIER],")")+"(?:".concat(i[a.PRERELEASE],")?").concat(i[a.BUILD],"?")+")?)?"),s("XRANGEPLAINLOOSE","[v=\\s]*(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(i[a.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(i[a.PRERELEASELOOSE],")?").concat(i[a.BUILD],"?")+")?)?"),s("XRANGE","^".concat(i[a.GTLT],"\\s*").concat(i[a.XRANGEPLAIN],"$")),s("XRANGELOOSE","^".concat(i[a.GTLT],"\\s*").concat(i[a.XRANGEPLAINLOOSE],"$")),s("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:$|[^\\d])"),s("COERCERTL",i[a.COERCE],!0),s("LONETILDE","(?:~>?)"),s("TILDETRIM","(\\s*)".concat(i[a.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",s("TILDE","^".concat(i[a.LONETILDE]).concat(i[a.XRANGEPLAIN],"$")),s("TILDELOOSE","^".concat(i[a.LONETILDE]).concat(i[a.XRANGEPLAINLOOSE],"$")),s("LONECARET","(?:\\^)"),s("CARETTRIM","(\\s*)".concat(i[a.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",s("CARET","^".concat(i[a.LONECARET]).concat(i[a.XRANGEPLAIN],"$")),s("CARETLOOSE","^".concat(i[a.LONECARET]).concat(i[a.XRANGEPLAINLOOSE],"$")),s("COMPARATORLOOSE","^".concat(i[a.GTLT],"\\s*(").concat(i[a.LOOSEPLAIN],")$|^$")),s("COMPARATOR","^".concat(i[a.GTLT],"\\s*(").concat(i[a.FULLPLAIN],")$|^$")),s("COMPARATORTRIM","(\\s*)".concat(i[a.GTLT],"\\s*(").concat(i[a.LOOSEPLAIN],"|").concat(i[a.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",s("HYPHENRANGE","^\\s*(".concat(i[a.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(i[a.XRANGEPLAIN],")")+"\\s*$"),s("HYPHENRANGELOOSE","^\\s*(".concat(i[a.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(i[a.XRANGEPLAINLOOSE],")")+"\\s*$"),s("STAR","(<|>)?=?\\s*\\*"),s("GTE0","^\\s*>=\\s*0.0.0\\s*$"),s("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")})),te=/^[0-9]+$/,ne=function(e,t){var n=te.test(e),r=te.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:eie)throw new TypeError("version is longer than ".concat(ie," characters"));X("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var r=t.trim().match(n.loose?oe[se.LOOSE]:oe[se.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>ae||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ae||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ae||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}(),le=function(e,t,n){return new ce(e,n).compare(new ce(t,n))},de=function(e,t,n){return le(e,t,n)<0},pe=function(e,t,n){return le(e,t,n)>=0},fe="2.2.1";function he(){var e=x(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]);return he=function(){return e},e}function ge(){var e=x(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]);return ge=function(){return e},e}function me(){var e=x(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]);return me=function(){return e},e}function _e(){var e=x(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]);return _e=function(){return e},e}function ve(){var e=x(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "]);return ve=function(){return e},e}function ye(){var e=x(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]);return ye=function(){return e},e}var be=c((function(e,t){function n(){for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:{},s=n.plugins,u=void 0===s?[]:s,c=n.showUnreleased,l=void 0!==c&&c,d=n.showDeprecated,p=void 0!==d&&d,f=n.showInternal,h=void 0!==f&&f,g=we.split("-",1)[0],m=u.reduce((function(e,t){return e.concat(t.languages||[])}),[]).filter(v),_=(e=Object.assign.apply(Object,[{}].concat(o(u.map((function(e){return e.options}))),[Ae])),t="name",Object.entries(e).map((function(e){var n=a(e,2),r=n[0],o=n[1];return Object.assign(i({},t,r),o)}))).filter((function(e){return v(e)&&y(e)})).sort((function(e,t){return e.name===t.name?0:e.name=0||(i[n]=e[n]);return i}(e,["cliName","cliCategory","cliDescription"])})).map((function(e){e=Object.assign({},e),Array.isArray(e.default)&&(e.default=1===e.default.length?e.default[0].value:e.default.filter(v).sort((function(e,t){return Te.compare(t.since,e.since)}))[0].value),Array.isArray(e.choices)&&(e.choices=e.choices.filter((function(e){return v(e)&&y(e)})),"parser"===e.name&&function(e,t,n){var i,a=new Set(e.choices.map((function(e){return e.value}))),o=r(t);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.parsers){var u,c=r(s.parsers);try{var l=function(){var t=u.value;if(!a.has(t)){a.add(t);var r=n.find((function(e){return e.parsers&&e.parsers[t]})),i=s.name;r&&r.name&&(i+=" (plugin: ".concat(r.name,")")),e.choices.push({value:t,description:i})}};for(c.s();!(u=c.n()).done;)l()}catch(d){c.e(d)}finally{c.f()}}}}catch(d){o.e(d)}finally{o.f()}}(e,m,u));var t=u.filter((function(t){return t.defaultOptions&&void 0!==t.defaultOptions[e.name]})).reduce((function(t,n){return t[n.name]=n.defaultOptions[e.name],t}),{});return Object.assign({},e,{pluginDefaults:t})}));return{languages:m,options:_};function v(e){return l||!("since"in e)||e.since&&Te.gte(g,e.since)}function y(e){return p||!("deprecated"in e)||e.deprecated&&Te.lt(g,e.deprecated)}},Ne=/[^\x20-\x7F]/;function Ie(e){return function(t,n,r){var i=r&&r.backwards;if(!1===n)return!1;for(var a=t.length,o=n;o>=0&&o(n.match(o.regex)||[]).length?o.quote:a.quote),s}function qe(e,t,n){var r='"'===t?"'":'"',i=e.replace(/\\([\S\s])|(["'])/g,(function(e,i,a){return i===r?i:a===t?"\\"+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)}));return t+i+t}function Ge(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,"JSXText"===e.type&&(t.printed=!0)}var Ye={inferParserByLanguage:function(e,t){var n=Oe({plugins:t.plugins}).languages,r=n.find((function(t){return t.name.toLowerCase()===e}))||n.find((function(t){var n=t.aliases;return Array.isArray(n)&&n.includes(e)}))||n.find((function(t){var n=t.extensions;return Array.isArray(n)&&n.includes(".".concat(e))}));return r&&r.parsers[0]},replaceEndOfLineWith:function(e,t){var n,i=[],a=r(e.split("\n"));try{for(a.s();!(n=a.n()).done;){var o=n.value;0!==i.length&&i.push(t),i.push(o)}}catch(s){a.e(s)}finally{a.f()}return i},getStringWidth:function(e){return e?Ne.test(e)?E(e):e.length:0},getMaxContinuousCount:function(e,t){var n=e.match(new RegExp("(".concat(S(t),")+"),"g"));return null===n?0:n.reduce((function(e,n){return Math.max(e,n.length/t.length)}),0)},getMinNotPresentContinuousCount:function(e,t){var n=e.match(new RegExp("(".concat(S(t),")+"),"g"));if(null===n)return 0;var i,a=new Map,o=0,s=r(n);try{for(s.s();!(i=s.n()).done;){var u=i.value.length/t.length;a.set(u,!0),u>o&&(o=u)}}catch(l){s.e(l)}finally{s.f()}for(var c=1;c=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"},convertEndOfLineToChars:function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}},countEndOfLineChars:function(e,t){var n;if("\n"===t)n=/\n/g;else if("\r"===t)n=/\r/g;else{if("\r\n"!==t)throw new Error('Unexpected "eol" '.concat(JSON.stringify(t),"."));n=/\r\n/g}var r=e.match(n);return r?r.length:0},normalizeEndOfLine:function(e){return e.replace(/\r\n?/g,"\n")}},$e=m.parseWithComments,Qe=m.strip,Xe=m.extract,Ze=m.print,et=Ye.getShebang,tt=Je.normalizeEndOfLine;function nt(e){var t=et(e);t&&(e=e.slice(t.length+1));var n=Xe(e),r=$e(n);return{shebang:t,text:e,pragmas:r.pragmas,comments:r.comments}}var rt={hasPragma:function(e){var t=Object.keys(nt(e).pragmas);return t.includes("prettier")||t.includes("format")},insertPragma:function(e){var t=nt(e),n=t.shebang,r=t.text,i=t.pragmas,a=t.comments,o=Qe(r),s=Ze({pragmas:Object.assign({format:""},i),comments:a.trimStart()});return(n?"".concat(n,"\n"):"")+tt(s)+(o.startsWith("\n")?"\n":"\n\n")+o}};function it(e,t){if(!(t||{}).ignoreDecorators){var n=e.declaration&&e.declaration.decorators||e.decorators;if(n&&n.length>0)return it(n[0])}return e.range?e.range[0]:e.start}function at(e){var t=e.range?e.range[1]:e.end;return e.typeAnnotation?Math.max(t,at(e.typeAnnotation)):t}function ot(e,t){return it(e)===it(t)}var st={locStart:it,locEnd:at,composeLoc:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=it(e);return[n,"number"==typeof t?n+t:at(t)]},hasSameLocStart:ot,hasSameLoc:function(e,t){return ot(e,t)&&function(e,t){return at(e)===at(t)}(e,t)}},ut=c((function(e){!function(){function t(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function n(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}e.exports={isExpression:function(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1},isStatement:t,isIterationStatement:function(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1},isSourceElement:function(e){return t(e)||null!=e&&"FunctionDeclaration"===e.type},isProblematicIfStatement:function(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=n(t)}while(t);return!1},trailingStatement:n}}()})),ct=c((function(e){!function(){var t,n,r,i,a,o;function s(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}for(n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},t={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},r=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],i=new Array(128),o=0;o<128;++o)i[o]=o>=97&&o<=122||o>=65&&o<=90||36===o||95===o;for(a=new Array(128),o=0;o<128;++o)a[o]=o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||36===o||95===o;e.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&r.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(e){return e<128?i[e]:n.NonAsciiIdentifierStart.test(s(e))},isIdentifierPartES5:function(e){return e<128?a[e]:n.NonAsciiIdentifierPart.test(s(e))},isIdentifierStartES6:function(e){return e<128?i[e]:t.NonAsciiIdentifierStart.test(s(e))},isIdentifierPartES6:function(e){return e<128?a[e]:t.NonAsciiIdentifierPart.test(s(e))}}}()})),lt=c((function(e){!function(){var t=ct;function n(e,t){return!(!t&&"yield"===e)&&r(e,t)}function r(e,t){if(t&&function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function i(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function o(e){var n,r,i;if(0===e.length)return!1;if(i=e.charCodeAt(0),!t.isIdentifierStartES5(i))return!1;for(n=1,r=e.length;n=r)return!1;if(!(56320<=(a=e.charCodeAt(n))&&a<=57343))return!1;i=1024*(i-55296)+(a-56320)+65536}if(!o(i))return!1;o=t.isIdentifierPartES6}return!0}e.exports={isKeywordES5:n,isKeywordES6:r,isReservedWordES5:i,isReservedWordES6:a,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:o,isIdentifierNameES6:s,isIdentifierES5:function(e,t){return o(e)&&!i(e,t)},isIdentifierES6:function(e,t){return s(e)&&!a(e,t)}}}()})),dt=c((function(e,t){t.ast=ut,t.code=ct,t.keyword=lt})).keyword.isIdentifierNameES5,pt=Ye.getLast,ft=Ye.hasNewline,ht=Ye.hasNewlineInRange,gt=Ye.skipWhitespace,mt=st.locStart,_t=st.locEnd,vt=st.hasSameLocStart,yt="(?:(?=.)\\s)",bt=new RegExp("^".concat(yt,"*:")),Dt=new RegExp("^".concat(yt,"*::"));function Et(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e))return e.some((function(e){return Et(e,t)}));var n=t(e);return"boolean"==typeof n?n:Object.keys(e).some((function(n){return Et(e[n],t)}))}function Ct(e){return"AssignmentExpression"===e.type||"BinaryExpression"===e.type||"LogicalExpression"===e.type||"NGPipeExpression"===e.type||"ConditionalExpression"===e.type||"CallExpression"===e.type||"OptionalCallExpression"===e.type||"MemberExpression"===e.type||"OptionalMemberExpression"===e.type||"SequenceExpression"===e.type||"TaggedTemplateExpression"===e.type||"BindExpression"===e.type||"UpdateExpression"===e.type&&!e.prefix||"TSAsExpression"===e.type||"TSNonNullExpression"===e.type}function St(e){return e.expressions?e.expressions[0]:e.left||e.test||e.callee||e.object||e.tag||e.argument||e.expression}function xt(e){return"Block"===e.type||"CommentBlock"===e.type||"MultiLine"===e.type}var kt=new Set(["ExportDefaultDeclaration","ExportDefaultSpecifier","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration"]);function Tt(e){return e&&kt.has(e.type)}function wt(e){return"BooleanLiteral"===e.type||"DirectiveLiteral"===e.type||"Literal"===e.type||"NullLiteral"===e.type||"NumericLiteral"===e.type||"BigIntLiteral"===e.type||"DecimalLiteral"===e.type||"RegExpLiteral"===e.type||"StringLiteral"===e.type||"TemplateLiteral"===e.type||"TSTypeLiteral"===e.type||"JSXText"===e.type}function At(e){return"NumericLiteral"===e.type||"Literal"===e.type&&"number"==typeof e.value}function Ot(e){return"StringLiteral"===e.type||"Literal"===e.type&&"string"==typeof e.value}function Nt(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type}function It(e){return!("CallExpression"!==e.type&&"OptionalCallExpression"!==e.type||"Identifier"!==e.callee.type||"async"!==e.callee.name&&"inject"!==e.callee.name&&"fakeAsync"!==e.callee.name)}function Ft(e){return"JSXElement"===e.type||"JSXFragment"===e.type}function Lt(e){return"get"===e.kind||"set"===e.kind}function Pt(e){return Lt(e)||vt(e,e.value)}var Rt=new Set(["BinaryExpression","LogicalExpression","NGPipeExpression"]),Mt=new Set(["AnyTypeAnnotation","TSAnyKeyword","NullLiteralTypeAnnotation","TSNullKeyword","ThisTypeAnnotation","TSThisType","NumberTypeAnnotation","TSNumberKeyword","VoidTypeAnnotation","TSVoidKeyword","BooleanTypeAnnotation","TSBooleanKeyword","BigIntTypeAnnotation","TSBigIntKeyword","SymbolTypeAnnotation","TSSymbolKeyword","StringTypeAnnotation","TSStringKeyword","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType","EmptyTypeAnnotation","MixedTypeAnnotation","TSNeverKeyword","TSObjectKeyword","TSUndefinedKeyword","TSUnknownKeyword"]),Bt=/^(skip|[fx]?(it|describe|test))$/;function jt(e){return"CallExpression"===e.type||"OptionalCallExpression"===e.type}var Ut=new RegExp("([ \n\r\t]+)"),Vt=new RegExp("[^ \n\r\t]");function zt(e){return wt(e)&&(Vt.test(qt(e))||!/\n/.test(qt(e)))}function Ht(e,t){return Ft(t)?nn(t):t.comments&&t.comments.some((function(t){return t.leading&&ft(e,_t(t))}))}function Wt(e){return/^(\d+|\d+\.\d+)$/.test(e)}function Kt(e){return e.quasis.some((function(e){return e.value.raw.includes("\n")}))}function qt(e){return e.extra?e.extra.raw:e.raw}var Gt={"==":!0,"!=":!0,"===":!0,"!==":!0},Yt={"*":!0,"/":!0,"%":!0},Jt={">>":!0,">>>":!0,"<<":!0},$t={};function Qt(e){return $t[e]}[["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((function(e,t){e.forEach((function(e){$t[e]=t}))}));var Xt=new WeakMap;function Zt(e){if(Xt.has(e))return Xt.get(e);var t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push.apply(t,o(e.parameters)):Array.isArray(e.params)&&t.push.apply(t,o(e.params)),e.rest&&t.push(e.rest),Xt.set(e,t),t}var en=new WeakMap;function tn(e){return"prettier-ignore"===e.value.trim()}function nn(e){return e&&(e.comments&&e.comments.length>0&&e.comments.some((function(e){return tn(e)&&!e.unignore}))||e.prettierIgnore)}function rn(e){return nn(e.getValue())}var an={classChildNeedsASIProtection:function(e){if(e){if(e.static||e.accessibility)return!1;if(!e.computed){var t=e.key&&e.key.name;if("in"===t||"instanceof"===t)return!0}switch(e.type){case"ClassProperty":case"FieldDefinition":case"TSAbstractClassProperty":return e.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":var n=e.value?e.value.async:e.async,r=e.value?e.value.generator:e.generator;return!n&&"get"!==e.kind&&"set"!==e.kind&&!(!e.computed&&!r);case"TSIndexSignature":return!0;default:return!1}}},classPropMayCauseASIProblems:function(e){var t=e.getNode();if("ClassProperty"!==t.type&&"FieldDefinition"!==t.type)return!1;var n=t.key&&t.key.name;return!("static"!==n&&"get"!==n&&"set"!==n||t.value||t.typeAnnotation)||void 0},getFunctionParameters:Zt,iterateFunctionParametersPath:function(e,t){var n=e.getValue(),r=0,i=function(e){return t(e,r++)};n.this&&e.call(i,"this"),Array.isArray(n.parameters)?e.each(i,"parameters"):Array.isArray(n.params)&&e.each(i,"params"),n.rest&&e.call(i,"rest")},getCallArguments:function(e){if(en.has(e))return en.get(e);var t="ImportExpression"===e.type?[e.source]:e.arguments;return en.set(e,t),t},iterateCallArgumentsPath:function(e,t){"ImportExpression"===e.getValue().type?e.call((function(e){return t(e,0)}),"source"):e.each(t,"arguments")},hasRestParameter:function(e){if(e.rest)return!0;var t=Zt(e);return t.length>0&&"RestElement"===pt(t).type},getLeftSidePathName:function(e,t){if(t.expressions)return["expressions",0];if(t.left)return["left"];if(t.test)return["test"];if(t.object)return["object"];if(t.callee)return["callee"];if(t.tag)return["tag"];if(t.argument)return["argument"];if(t.expression)return["expression"];throw new Error("Unexpected node has no left side.")},getParentExportDeclaration:function(e){var t=e.getParentNode();return"declaration"===e.getName()&&Tt(t)?t:null},getTypeScriptMappedTypeModifier:function(e,t){return"+"===e?"+"+t:"-"===e?"-"+t:t},hasDanglingComments:function(e){return e.comments&&e.comments.some((function(e){return!e.leading&&!e.trailing}))},hasFlowAnnotationComment:function(e){return e&&xt(e[0])&&Dt.test(e[0].value)},hasFlowShorthandAnnotationComment:function(e){return e.extra&&e.extra.parenthesized&&e.trailingComments&&xt(e.trailingComments[0])&&bt.test(e.trailingComments[0].value)},hasLeadingComment:function(e){return e.comments&&e.comments.some((function(e){return e.leading}))},hasLeadingOwnLineComment:Ht,hasNakedLeftSide:Ct,hasNewlineBetweenOrAfterDecorators:function(e,t){return ht(t.originalText,mt(e.decorators[0]),_t(pt(e.decorators)))||ft(t.originalText,_t(pt(e.decorators)))},hasNgSideEffect:function(e){return Et(e.getValue(),(function(e){switch(e.type){case void 0:return!1;case"CallExpression":case"OptionalCallExpression":case"AssignmentExpression":return!0}}))},hasNode:Et,hasPrettierIgnore:function(e){return rn(e)||function(e){var t=e.getValue(),n=e.getParentNode();if(!(n&&t&&Ft(t)&&Ft(n)))return!1;for(var r=null,i=n.children.indexOf(t);i>0;i--){var a=n.children[i-1];if("JSXText"!==a.type||zt(a)){r=a;break}}return r&&"JSXExpressionContainer"===r.type&&"JSXEmptyExpression"===r.expression.type&&r.expression.comments&&r.expression.comments.some((function(e){return tn(e)}))}(e)},hasTrailingComment:function(e){return e.comments&&e.comments.some((function(e){return e.trailing}))},hasTrailingLineComment:function(e){return e.comments&&e.comments.some((function(e){return e.trailing&&!xt(e)}))},hasIgnoreComment:rn,hasNodeIgnoreComment:nn,identity:function(e){return e},isBinaryish:function(e){return Rt.has(e.type)},isBlockComment:xt,isLineComment:function(e){return"Line"===e.type||"CommentLine"===e.type||"SingleLine"===e.type||"HashbangComment"===e.type||"HTMLOpen"===e.type||"HTMLClose"===e.type},isPrettierIgnoreComment:tn,isCallOrOptionalCallExpression:jt,isEmptyJSXElement:function(e){if(0===e.children.length)return!0;if(e.children.length>1)return!1;var t=e.children[0];return wt(t)&&!zt(t)},isExportDeclaration:Tt,isFlowAnnotationComment:function(e,t){var n=mt(t),r=gt(e,_t(t));return!1!==r&&"/*"===e.slice(n,n+2)&&"*/"===e.slice(r,r+2)},isFunctionCompositionArgs:function(e){if(e.length<=1)return!1;var t,n=0,i=r(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(Nt(a)){if((n+=1)>1)return!0}else if(jt(a)){var o,s=r(a.arguments);try{for(s.s();!(o=s.n()).done;)if(Nt(o.value))return!0}catch(u){s.e(u)}finally{s.f()}}}}catch(u){i.e(u)}finally{i.f()}return!1},isFunctionNotation:Pt,isFunctionOrArrowExpression:Nt,isGetterOrSetter:Lt,isJestEachTemplateLiteral:function(e,t){var n=/^[fx]?(describe|it|test)$/;return"TaggedTemplateExpression"===t.type&&t.quasi===e&&"MemberExpression"===t.tag.type&&"Identifier"===t.tag.property.type&&"each"===t.tag.property.name&&("Identifier"===t.tag.object.type&&n.test(t.tag.object.name)||"MemberExpression"===t.tag.object.type&&"Identifier"===t.tag.object.property.type&&("only"===t.tag.object.property.name||"skip"===t.tag.object.property.name)&&"Identifier"===t.tag.object.object.type&&n.test(t.tag.object.object.name))},isJSXNode:Ft,isJSXWhitespaceExpression:function(e){return"JSXExpressionContainer"===e.type&&wt(e.expression)&&" "===e.expression.value&&!e.expression.comments},isLastStatement:function(e){var t=e.getParentNode();if(!t)return!0;var n=e.getValue(),r=(t.body||t.consequent).filter((function(e){return"EmptyStatement"!==e.type}));return r[r.length-1]===n},isLiteral:wt,isLongCurriedCallExpression:function(e){var t=e.getValue(),n=e.getParentNode();return jt(t)&&jt(n)&&n.callee===t&&t.arguments.length>n.arguments.length&&n.arguments.length>0},isSimpleCallArgument:function e(t,n){if(n>=2)return!1;var r=function(t){return e(t,n+1)},i="Literal"===t.type&&"regex"in t&&t.regex.pattern||"RegExpLiteral"===t.type&&t.pattern;return!(i&&i.length>5)&&("Literal"===t.type||"BigIntLiteral"===t.type||"DecimalLiteral"===t.type||"BooleanLiteral"===t.type||"NullLiteral"===t.type||"NumericLiteral"===t.type||"RegExpLiteral"===t.type||"StringLiteral"===t.type||"Identifier"===t.type||"ThisExpression"===t.type||"Super"===t.type||"PrivateName"===t.type||"ArgumentPlaceholder"===t.type||"Import"===t.type||("TemplateLiteral"===t.type?t.expressions.every(r):"ObjectExpression"===t.type?t.properties.every((function(e){return!e.computed&&(e.shorthand||e.value&&r(e.value))})):"ArrayExpression"===t.type?t.elements.every((function(e){return null===e||r(e)})):"ImportExpression"===t.type?r(t.source):"CallExpression"===t.type||"OptionalCallExpression"===t.type||"NewExpression"===t.type?e(t.callee,n)&&t.arguments.every(r):"MemberExpression"===t.type||"OptionalMemberExpression"===t.type?e(t.object,n)&&e(t.property,n):"UnaryExpression"!==t.type||"!"!==t.operator&&"-"!==t.operator?"TSNonNullExpression"===t.type&&e(t.expression,n):e(t.argument,n)))},isMeaningfulJSXText:zt,isMemberExpressionChain:function e(t){return("MemberExpression"===t.type||"OptionalMemberExpression"===t.type)&&("Identifier"===t.object.type||e(t.object))},isMemberish:function(e){return"MemberExpression"===e.type||"OptionalMemberExpression"===e.type||"BindExpression"===e.type&&Boolean(e.object)},isNgForOf:function(e,t,n){return"NGMicrosyntaxKeyedExpression"===e.type&&"of"===e.key.name&&1===t&&"NGMicrosyntaxLet"===n.body[0].type&&null===n.body[0].value},isNumericLiteral:At,isObjectType:function(e){return"ObjectTypeAnnotation"===e.type||"TSTypeLiteral"===e.type},isObjectTypePropertyAFunction:function(e){return!("ObjectTypeProperty"!==e.type&&"ObjectTypeInternalSlot"!==e.type||"FunctionTypeAnnotation"!==e.value.type||e.static||Pt(e))},isSimpleType:function(e){return!!e&&(!("GenericTypeAnnotation"!==e.type&&"TSTypeReference"!==e.type||e.typeParameters)||!!Mt.has(e.type))},isSimpleNumber:Wt,isSimpleTemplateLiteral:function(e){var t="expressions";"TSTemplateLiteralType"===e.type&&(t="types");var n=e[t];return 0!==n.length&&n.every((function(e){if(e.comments)return!1;if("Identifier"===e.type||"ThisExpression"===e.type)return!0;if("MemberExpression"===e.type||"OptionalMemberExpression"===e.type){for(var t=e;"MemberExpression"===t.type||"OptionalMemberExpression"===t.type;){if("Identifier"!==t.property.type&&"Literal"!==t.property.type&&"StringLiteral"!==t.property.type&&"NumericLiteral"!==t.property.type)return!1;if((t=t.object).comments)return!1}return"Identifier"===t.type||"ThisExpression"===t.type}return!1}))},isStringLiteral:Ot,isStringPropSafeToUnquote:function(e,t){return"json"!==t.parser&&Ot(e.key)&&qt(e.key).slice(1,-1)===e.key.value&&(dt(e.key.value)&&!(("typescript"===t.parser||"babel-ts"===t.parser)&&"ClassProperty"===e.type)||Wt(e.key.value)&&String(Number(e.key.value))===e.key.value&&("babel"===t.parser||"espree"===t.parser||"meriyah"===t.parser))},isTemplateOnItsOwnLine:function(e,t){return("TemplateLiteral"===e.type&&Kt(e)||"TaggedTemplateExpression"===e.type&&Kt(e.quasi))&&!ft(t,mt(e),{backwards:!0})},isTestCall:function e(t,n){if("CallExpression"!==t.type)return!1;if(1===t.arguments.length){if(It(t)&&n&&e(n))return Nt(t.arguments[0]);if(function(e){return"Identifier"===e.callee.type&&/^(before|after)(Each|All)$/.test(e.callee.name)&&1===e.arguments.length}(t))return It(t.arguments[0])}else if((2===t.arguments.length||3===t.arguments.length)&&("Identifier"===t.callee.type&&Bt.test(t.callee.name)||function(e){return("MemberExpression"===e.callee.type||"OptionalMemberExpression"===e.callee.type)&&"Identifier"===e.callee.object.type&&"Identifier"===e.callee.property.type&&Bt.test(e.callee.object.name)&&("only"===e.callee.property.name||"skip"===e.callee.property.name)}(t))&&(function(e){return"TemplateLiteral"===e.type}(t.arguments[0])||Ot(t.arguments[0])))return!(t.arguments[2]&&!At(t.arguments[2]))&&((2===t.arguments.length?Nt(t.arguments[1]):function(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type}(t.arguments[1])&&Zt(t.arguments[1]).length<=1)||It(t.arguments[1]));return!1},isTheOnlyJSXElementInMarkdown:function(e,t){if("markdown"!==e.parentParser&&"mdx"!==e.parentParser)return!1;var n=t.getNode();if(!n.expression||!Ft(n.expression))return!1;var r=t.getParentNode();return"Program"===r.type&&1===r.body.length},isTSXFile:function(e){return e.filepath&&/\.tsx$/i.test(e.filepath)},isTypeAnnotationAFunction:function(e){return!("TypeAnnotation"!==e.type&&"TSTypeAnnotation"!==e.type||"FunctionTypeAnnotation"!==e.typeAnnotation.type||e.static||vt(e,e.typeAnnotation))},matchJsxWhitespaceRegex:Ut,needsHardlineAfterDanglingComment:function(e){if(!e.comments)return!1;var t=pt(e.comments.filter((function(e){return!e.leading&&!e.trailing})));return t&&!xt(t)},rawText:qt,returnArgumentHasLeadingComment:function(e,t){if(Ht(e.originalText,t))return!0;if(Ct(t))for(var n,r=t;n=St(r);)if(r=n,Ht(e.originalText,r))return!0;return!1},shouldPrintComma:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"es5";return"es5"===e.trailingComma&&"es5"===t||"all"===e.trailingComma&&("all"===t||"es5"===t)},isBitwiseOperator:function(e){return!!Jt[e]||"|"===e||"^"===e||"&"===e},shouldFlatten:function(e,t){return Qt(t)===Qt(e)&&"**"!==e&&(!Gt[e]||!Gt[t])&&!("%"===t&&Yt[e]||"%"===e&&Yt[t])&&(t===e||!Yt[t]||!Yt[e])&&(!Jt[e]||!Jt[t])},startsWithNoLookaheadToken:function e(t,n){switch((t=function(e){for(;e.left;)e=e.left;return e}(t)).type){case"FunctionExpression":case"ClassExpression":case"DoExpression":return n;case"ObjectExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return e(t.object,n);case"TaggedTemplateExpression":return"FunctionExpression"!==t.tag.type&&e(t.tag,n);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==t.callee.type&&e(t.callee,n);case"ConditionalExpression":return e(t.test,n);case"UpdateExpression":return!t.prefix&&e(t.argument,n);case"BindExpression":return t.object&&e(t.object,n);case"SequenceExpression":return e(t.expressions[0],n);case"TSAsExpression":return e(t.expression,n);default:return!1}},getPrecedence:Qt},on=Ye.getLast,sn=Ye.hasNewline,un=Ye.getNextNonSpaceNonCommentCharacterIndexWithStartIndex,cn=Ye.getNextNonSpaceNonCommentCharacter,ln=Ye.hasNewlineInRange,dn=Ye.addLeadingComment,pn=Ye.addTrailingComment,fn=Ye.addDanglingComment,hn=Ye.getNextNonSpaceNonCommentCharacterIndex,gn=an.isBlockComment,mn=an.getFunctionParameters,_n=an.isPrettierIgnoreComment,vn=an.isJSXNode,yn=an.hasFlowShorthandAnnotationComment,bn=an.hasFlowAnnotationComment,Dn=an.hasIgnoreComment,En=st.locStart,Cn=st.locEnd;function Sn(e,t){var n=(e.body||e.properties).find((function(e){return"EmptyStatement"!==e.type}));n?dn(n,t):fn(e,t)}function xn(e,t){"BlockStatement"===e.type?Sn(e,t):dn(e,t)}function kn(e,t){var n=e.precedingNode,r=e.enclosingNode,i=e.followingNode;return!(!r||"IfStatement"!==r.type||!i)&&(")"===cn(t,e,Cn)?(pn(n,e),!0):n===r.consequent&&i===r.alternate?("BlockStatement"===n.type?pn(n,e):fn(r,e),!0):"BlockStatement"===i.type?(Sn(i,e),!0):"IfStatement"===i.type?(xn(i.consequent,e),!0):r.consequent===i&&(dn(i,e),!0))}function Tn(e,t){var n=e.precedingNode,r=e.enclosingNode,i=e.followingNode;return!(!r||"WhileStatement"!==r.type||!i)&&(")"===cn(t,e,Cn)?(pn(n,e),!0):"BlockStatement"===i.type?(Sn(i,e),!0):r.body===i&&(dn(i,e),!0))}function wn(e){var t=e.precedingNode,n=e.enclosingNode,r=e.followingNode;return!(!n||"TryStatement"!==n.type&&"CatchClause"!==n.type||!r)&&("CatchClause"===n.type&&t?(pn(t,e),!0):"BlockStatement"===r.type?(Sn(r,e),!0):"TryStatement"===r.type?(xn(r.finalizer,e),!0):"CatchClause"===r.type&&(xn(r.body,e),!0))}function An(e){var t=e.precedingNode,n=e.enclosingNode,r=e.followingNode;if(n&&("ClassDeclaration"===n.type||"ClassExpression"===n.type||"DeclareClass"===n.type||"DeclareInterface"===n.type||"InterfaceDeclaration"===n.type||"TSInterfaceDeclaration"===n.type)){if(n.decorators&&n.decorators.length>0&&(!r||"Decorator"!==r.type))return pn(n.decorators[n.decorators.length-1],e),!0;if(n.body&&r===n.body)return Sn(n.body,e),!0;if(r)for(var i=0,a=["implements","extends","mixins"];ia)return Sn(i,e),!0}return!1}function In(e){var t=e.enclosingNode;return!(!t||"ImportSpecifier"!==t.type)&&(dn(t,e),!0)}function Fn(e){var t=e.enclosingNode;return!(!t||"LabeledStatement"!==t.type)&&(dn(t,e),!0)}function Ln(e,t,n){var r=e.enclosingNode;return t&&t.body&&0===t.body.length?(n?fn(t,e):dn(t,e),!0):!(!r||"Program"!==r.type||0!==r.body.length||!r.directives||0!==r.directives.length)&&(n?fn(r,e):dn(r,e),!0)}function Pn(e){var t=e.enclosingNode,n=e.followingNode;if(_n(e)&&t&&"TSMappedType"===t.type&&n&&"TSTypeParameter"===n.type&&n.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function Rn(e){return"ArrowFunctionExpression"===e.type||"FunctionExpression"===e.type||"FunctionDeclaration"===e.type||"ObjectMethod"===e.type||"ClassMethod"===e.type||"TSDeclareFunction"===e.type||"TSCallSignatureDeclaration"===e.type||"TSConstructSignatureDeclaration"===e.type||"TSMethodSignature"===e.type||"TSConstructorType"===e.type||"TSFunctionType"===e.type||"TSDeclareMethod"===e.type}function Mn(e){return gn(e)&&"*"===e.value[0]&&/@type\b/.test(e.value)}var Bn={handleOwnLineComment:function(e,t,n,r,i){return Pn(e)||Nn(e,t)||function(e){var t=e.enclosingNode,n=e.followingNode;return!(!t||"MemberExpression"!==t.type&&"OptionalMemberExpression"!==t.type||!n||"Identifier"!==n.type)&&(dn(t,e),!0)}(e)||kn(e,t)||Tn(e,t)||wn(e)||An(e)||In(e)||function(e){var t=e.enclosingNode;return!(!t||"ForInStatement"!==t.type&&"ForOfStatement"!==t.type)&&(dn(t,e),!0)}(e)||function(e){var t=e.precedingNode,n=e.enclosingNode,r=e.followingNode;return!n||"UnionTypeAnnotation"!==n.type&&"TSUnionType"!==n.type?(r&&("UnionTypeAnnotation"===r.type||"TSUnionType"===r.type)&&_n(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1):(_n(e)&&(r.prettierIgnore=!0,e.unignore=!0),!!t&&(pn(t,e),!0))}(e)||Ln(e,r,i)||function(e,t){var n=e.precedingNode,r=e.enclosingNode;return!!(n&&"ImportSpecifier"===n.type&&r&&"ImportDeclaration"===r.type&&sn(t,Cn(e)))&&(pn(n,e),!0)}(e,t)||function(e){var t=e.enclosingNode;return!(!t||"AssignmentPattern"!==t.type)&&(dn(t,e),!0)}(e)||On(e,t)||Fn(e)},handleEndOfLineComment:function(e,t,n,r,i){return function(e){var t=e.followingNode;return!(!t||!Mn(e))&&(dn(t,e),!0)}(e)||Nn(e,t)||function(e,t){var n=e.precedingNode,r=e.enclosingNode,i=e.followingNode,a=n&&!ln(t,Cn(n),En(e));return!(n&&a||!r||"ConditionalExpression"!==r.type&&"TSConditionalType"!==r.type||!i)&&(dn(i,e),!0)}(e,t)||In(e)||kn(e,t)||Tn(e,t)||wn(e)||An(e)||Fn(e)||function(e){var t=e.precedingNode,n=e.enclosingNode;return!!(n&&("CallExpression"===n.type||"OptionalCallExpression"===n.type)&&t&&n.callee===t&&n.arguments.length>0)&&(dn(n.arguments[0],e),!0)}(e)||function(e){var t=e.enclosingNode;return!(!t||"Property"!==t.type&&"ObjectProperty"!==t.type)&&(dn(t,e),!0)}(e)||Ln(e,r,i)||function(e){var t=e.enclosingNode;return!(!t||"TypeAlias"!==t.type)&&(dn(t,e),!0)}(e)||function(e){var t=e.enclosingNode,n=e.followingNode;return!(!t||"VariableDeclarator"!==t.type&&"AssignmentExpression"!==t.type||!n||"ObjectExpression"!==n.type&&"ArrayExpression"!==n.type&&"TemplateLiteral"!==n.type&&"TaggedTemplateExpression"!==n.type&&!gn(e))&&(dn(n,e),!0)}(e)},handleRemainingComment:function(e,t,n,r,i){return!!(Pn(e)||kn(e,t)||Tn(e,t)||function(e){var t=e.precedingNode,n=e.enclosingNode;return!(!n||"ObjectProperty"!==n.type&&"Property"!==n.type||!n.shorthand||n.key!==t||"AssignmentPattern"!==n.value.type)&&(pn(n.value.left,e),!0)}(e)||function(e,t){if(")"!==cn(t,e,Cn))return!1;var n=e.enclosingNode;return n&&(Rn(n)&&0===mn(n).length||("CallExpression"===n.type||"OptionalCallExpression"===n.type||"NewExpression"===n.type)&&0===n.arguments.length)?(fn(n,e),!0):!(!n||"MethodDefinition"!==n.type||0!==mn(n.value).length)&&(fn(n.value,e),!0)}(e,t)||On(e,t)||Ln(e,r,i)||function(e,t){var n=e.enclosingNode;if(!n||"ArrowFunctionExpression"!==n.type)return!1;var r=hn(t,e,Cn);return!1!==r&&"=>"===t.slice(r,r+2)&&(fn(n,e),!0)}(e,t)||function(e,t){if("("!==cn(t,e,Cn))return!1;var n=e.precedingNode,r=e.enclosingNode;return!(!n||!r||"FunctionDeclaration"!==r.type&&"FunctionExpression"!==r.type&&"ClassMethod"!==r.type&&"MethodDefinition"!==r.type&&"ObjectMethod"!==r.type)&&(pn(n,e),!0)}(e,t)||function(e){var t=e.precedingNode,n=e.enclosingNode,r=e.followingNode;return!(!n||"TSMappedType"!==n.type)&&(r&&"TSTypeParameter"===r.type&&r.name?(dn(r.name,e),!0):!(!t||"TSTypeParameter"!==t.type||!t.constraint)&&(pn(t.constraint,e),!0))}(e)||function(e){var t=e.enclosingNode;return!(!t||"ContinueStatement"!==t.type&&"BreakStatement"!==t.type||t.label)&&(pn(t,e),!0)}(e)||function(e,t){var n=e.enclosingNode;return!(e.followingNode||!n||"TSMethodSignature"!==n.type&&"TSDeclareFunction"!==n.type&&"TSAbstractMethodDefinition"!==n.type||";"!==cn(t,e,Cn))&&(pn(n,e),!0)}(e,t))},hasLeadingComment:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};return e.leadingComments?e.leadingComments.some(t):!!e.comments&&e.comments.some((function(e){return e.leading&&t(e)}))},isTypeCastComment:Mn,getGapRegex:function(e){if(e&&"BinaryExpression"!==e.type&&"LogicalExpression"!==e.type)return/^[\s&(|]*$/},getCommentChildNodes:function(e,t){if(("typescript"===t.parser||"flow"===t.parser||"espree"===t.parser||"meriyah"===t.parser)&&"MethodDefinition"===e.type&&e.value&&"FunctionExpression"===e.value.type&&0===mn(e.value).length&&!e.value.returnType&&(!e.value.typeParameters||0===e.value.typeParameters.length)&&e.value.body)return[].concat(o(e.decorators||[]),[e.key,e.value.body])},willPrintOwnComments:function(e){var t=e.getValue(),n=e.getParentNode();return(t&&(vn(t)||yn(t)||n&&("CallExpression"===n.type||"OptionalCallExpression"===n.type)&&(bn(t.leadingComments)||bn(t.trailingComments)))||n&&("JSXSpreadAttribute"===n.type||"JSXSpreadChild"===n.type||"UnionTypeAnnotation"===n.type||"TSUnionType"===n.type||("ClassDeclaration"===n.type||"ClassExpression"===n.type)&&n.superClass===t))&&(!Dn(e)||"UnionTypeAnnotation"===n.type||"TSUnionType"===n.type)}},jn=Ye.getLast,Un=Ye.getNextNonSpaceNonCommentCharacter,Vn=Ye.getShebang,zn=st.composeLoc,Hn=st.locStart,Wn=st.locEnd,Kn=Bn.isTypeCastComment;function qn(e){return"CallExpression"===e.type?(e.type="OptionalCallExpression",e.callee=qn(e.callee)):"MemberExpression"===e.type?(e.type="OptionalMemberExpression",e.object=qn(e.object)):"TSNonNullExpression"===e.type&&(e.expression=qn(e.expression)),e}function Gn(e,t){var n;if(Array.isArray(e))n=e.entries();else{if(!e||"object"!=typeof e||"string"!=typeof e.type)return e;n=Object.entries(e)}var i,o=r(n);try{for(o.s();!(i=o.n()).done;){var s=a(i.value,2),u=s[0],c=s[1];e[u]=Gn(c,t)}}catch(l){o.e(l)}finally{o.f()}return Array.isArray(e)?e:t(e)||e}function Yn(e){return"LogicalExpression"===e.type&&"LogicalExpression"===e.right.type&&e.operator===e.right.operator}function Jn(e){return Yn(e)?Jn({type:"LogicalExpression",operator:e.operator,left:Jn({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:zn(e.left,e.right.left)}),right:e.right.right,range:zn(e)}):e}var $n=function(t,n){if("typescript"!==n.parser&&"flow"!==n.parser&&"espree"!==n.parser||function(e,t){var n=Vn(t.originalText);n&&e.comments.unshift({type:"Line",value:n.slice(2),range:[0,n.length]})}(t,n),"typescript"===n.parser&&n.originalText.includes("@")){var r=n.tsParseResult,i=r.esTreeNodeToTSNodeMap,o=r.tsNodeToESTreeNodeMap;t=Gn(t,(function(t){var n=i.get(t);if(n){var r=n.decorators;if(Array.isArray(r)){var a=o.get(n);if(a===t){var s=a.decorators;if(!Array.isArray(s)||s.length!==r.length||r.some((function(e){var t=o.get(e);return!t||!s.includes(t)}))){var u=a.loc,c=u.start,l=u.end;throw e("Leading decorators must be attached to a class declaration",{start:{line:c.line,column:c.column+1},end:{line:l.line,column:l.column+1}})}}}}}))}if("typescript"!==n.parser&&"flow"!==n.parser&&"espree"!==n.parser&&"meriyah"!==n.parser){var s=new Set;t=Gn(t,(function(e){e.leadingComments&&e.leadingComments.some(Kn)&&s.add(Hn(e))})),t=Gn(t,(function(e){if("ParenthesizedExpression"===e.type){var t=e.expression;if("TypeCastExpression"===t.type)return t.range=e.range,t;var n=Hn(e);if(!s.has(n))return t.extra=Object.assign({},t.extra,{parenthesized:!0}),t}}))}return Gn(t,(function(e){switch(e.type){case"ChainExpression":return qn(e.expression);case"LogicalExpression":if(Yn(e))return Jn(e);break;case"VariableDeclaration":var t=jn(e.declarations);t&&t.init&&function(e,t){";"!==n.originalText[Wn(t)]&&(e.range=zn(e,t))}(e,t);break;case"TSParenthesizedType":return e.typeAnnotation.range=zn(e),e.typeAnnotation;case"TSUnionType":case"TSIntersectionType":if(1===e.types.length){var r=a(e.types,1)[0];return r.range=zn(e),r}break;case"TSTypeParameter":"string"==typeof e.name&&(e.name={type:"Identifier",name:e.name,range:zn(e,e.name.length)});break;case"SequenceExpression":var i=jn(e.expressions);Wn(e)>Wn(i)&&(e.range=zn(e,i));break;case"ClassProperty":e.key&&"TSPrivateIdentifier"===e.key.type&&"?"===Un(n.originalText,e.key,Wn)&&(e.optional=!0)}}))},Qn=1e3,Xn=60*Qn,Zn=60*Xn,er=24*Zn,tr=7*er,nr=365.25*er,rr=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*nr;case"weeks":case"week":case"w":return n*tr;case"days":case"day":case"d":return n*er;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Zn;case"minutes":case"minute":case"mins":case"min":case"m":return n*Xn;case"seconds":case"second":case"secs":case"sec":case"s":return n*Qn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===n&&isFinite(e))return t.long?function(e){var t=Math.abs(e);return t>=er?ir(e,t,er,"day"):t>=Zn?ir(e,t,Zn,"hour"):t>=Xn?ir(e,t,Xn,"minute"):t>=Qn?ir(e,t,Qn,"second"):e+" ms"}(e):function(e){var t=Math.abs(e);return t>=er?Math.round(e/er)+"d":t>=Zn?Math.round(e/Zn)+"h":t>=Xn?Math.round(e/Xn)+"m":t>=Qn?Math.round(e/Qn)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ir(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}var ar,or=function(e){function t(e){for(var t=0,r=0;r=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=or(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}})),ur={isatty:function(){return!1}},cr=Object.freeze({__proto__:null,default:ur}),lr=Object.freeze({__proto__:null,default:{}}),dr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Q.argv,n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r=2,has16m:e>=3}}function gr(e,t){if(0===ar)return 0;if(dr("color=16m")||dr("color=full")||dr("color=truecolor"))return 3;if(dr("color=256"))return 2;if(e&&!t&&void 0===ar)return 0;var n=ar||0;if("dumb"===fr.TERM)return n;if("win32"===Q.platform){var r=g.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in fr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(e){return e in fr}))||"codeship"===fr.CI_NAME?1:n;if("TEAMCITY_VERSION"in fr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(fr.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in fr)return 1;if("truecolor"===fr.COLORTERM)return 3;if("TERM_PROGRAM"in fr){var i=parseInt((fr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(fr.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(fr.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(fr.TERM)||"COLORTERM"in fr?1:n}dr("no-color")||dr("no-colors")||dr("color=false")||dr("color=never")?ar=0:(dr("color")||dr("colors")||dr("color=true")||dr("color=always"))&&(ar=1),"FORCE_COLOR"in fr&&(ar="true"===fr.FORCE_COLOR?1:"false"===fr.FORCE_COLOR?0:0===fr.FORCE_COLOR.length?1:Math.min(parseInt(fr.FORCE_COLOR,10),3));var mr={supportsColor:function(e){return hr(gr(e,e&&e.isTTY))},stdout:hr(gr(!0,pr.isatty(1))),stderr:hr(gr(!0,pr.isatty(2)))},_r=l(lr),vr=(c((function(e,t){t.init=function(e){e.inspectOpts={};for(var n=Object.keys(t.inspectOpts),r=0;r=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(Q.env).filter((function(e){return/^debug_/i.test(e)})).reduce((function(e,t){var n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()})),r=Q.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=or(t);var r=e.exports.formatters;r.o=function(e){return this.inspectOpts.colors=this.useColors,_r.inspect(e,this.inspectOpts).replace(/\s*\n\s*/g," ")},r.O=function(e){return this.inspectOpts.colors=this.useColors,_r.inspect(e,this.inspectOpts)}})),c((function(e){void 0===Q||Q.type,e.exports=sr}))),yr={"{":"}","(":")","[":"]"},br=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/,Dr=/\\(.)|(^!|[*?{}()[\]]|\(\?)/,Er=function(e,t){if("string"!=typeof e||""===e)return!1;if(function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}(e))return!0;var n,r=br;for(t&&!1===t.strict&&(r=Dr);n=r.exec(e);){if(n[2])return!0;var i=n.index+n[0].length,a=n[1],o=a?yr[a]:null;if(a&&o){var s=e.indexOf(o,i);-1!==s&&(i=s+1)}e=e.slice(i)}return!1},Cr=Z.MAX_LENGTH,Sr=ee.re,xr=ee.t,kr=function(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ce)return e;if("string"!=typeof e)return null;if(e.length>Cr)return null;if(!(t.loose?Sr[xr.LOOSE]:Sr[xr.FULL]).test(e))return null;try{return new ce(e,t)}catch(e){return null}},Tr=function(e,t){var n=kr(e,t);return n?n.version:null},wr=function(e,t){var n=kr(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},Ar=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new ce(e,n).inc(t,r).version}catch(e){return null}},Or=function(e,t,n){return 0===le(e,t,n)},Nr=function(e,t){if(Or(e,t))return null;var n=kr(e),r=kr(t),i=n.prerelease.length||r.prerelease.length,a=i?"pre":"",o=i?"prerelease":"";for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return a+s;return o},Ir=function(e,t){return new ce(e,t).major},Fr=function(e,t){return new ce(e,t).minor},Lr=function(e,t){return new ce(e,t).patch},Pr=function(e,t){var n=kr(e,t);return n&&n.prerelease.length?n.prerelease:null},Rr=function(e,t,n){return le(t,e,n)},Mr=function(e,t){return le(e,t,!0)},Br=function(e,t,n){var r=new ce(e,n),i=new ce(t,n);return r.compare(i)||r.compareBuild(i)},jr=function(e,t){return e.sort((function(e,n){return Br(e,n,t)}))},Ur=function(e,t){return e.sort((function(e,n){return Br(n,e,t)}))},Vr=function(e,t,n){return le(e,t,n)>0},zr=function(e,t,n){return 0!==le(e,t,n)},Hr=function(e,t,n){return le(e,t,n)<=0},Wr=function(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return Or(e,n,r);case"!=":return zr(e,n,r);case">":return Vr(e,n,r);case">=":return pe(e,n,r);case"<":return de(e,n,r);case"<=":return Hr(e,n,r);default:throw new TypeError("Invalid operator: ".concat(t))}},Kr=ee.re,qr=ee.t,Gr=function(e,t){if(e instanceof ce)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var r;(r=Kr[qr.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),Kr[qr.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;Kr[qr.COERCERTL].lastIndex=-1}else n=e.match(Kr[qr.COERCE]);return null===n?null:kr("".concat(n[2],".").concat(n[3]||"0",".").concat(n[4]||"0"),t)},Yr=function(){function e(t,n){var r=this;if(s(this,e),n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof hi)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((function(e){return r.parseRange(e.trim())})).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(t));this.format()}return u(e,[{key:"format",value:function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(e){var t=this,n=this.options.loose;e=e.trim();var r=n?Jr[$r.HYPHENRANGELOOSE]:Jr[$r.HYPHENRANGE];e=e.replace(r,di(this.options.includePrerelease)),X("hyphen replace",e),e=e.replace(Jr[$r.COMPARATORTRIM],Qr),X("comparator trim",e,Jr[$r.COMPARATORTRIM]),e=(e=(e=e.replace(Jr[$r.TILDETRIM],Xr)).replace(Jr[$r.CARETTRIM],Zr)).split(/\s+/).join(" ");var i=n?Jr[$r.COMPARATORLOOSE]:Jr[$r.COMPARATOR];return e.split(" ").map((function(e){return ti(e,t.options)})).join(" ").split(/\s+/).map((function(e){return li(e,t.options)})).filter(this.options.loose?function(e){return!!e.match(i)}:function(){return!0}).map((function(e){return new hi(e,t.options)}))}},{key:"intersects",value:function(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((function(e){return ei(e,n)&&t.set.some((function(t){return ei(t,n)&&e.every((function(e){return t.every((function(t){return e.intersects(t,n)}))}))}))}))}},{key:"test",value:function(e){if(!e)return!1;if("string"==typeof e)try{e=new ce(e,this.options)}catch(e){return!1}for(var t=0;t=".concat(n,".").concat(i,".0").concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".0").concat(r," <").concat(+n+1,".0.0-0"):o?(X("replaceCaret pr",o),s="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(a,"-").concat(o," <").concat(n,".").concat(i,".").concat(+a+1,"-0"):">=".concat(n,".").concat(i,".").concat(a,"-").concat(o," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(a,"-").concat(o," <").concat(+n+1,".0.0-0")):(X("no pr"),s="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(a).concat(r," <").concat(n,".").concat(i,".").concat(+a+1,"-0"):">=".concat(n,".").concat(i,".").concat(a).concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(a," <").concat(+n+1,".0.0-0")),X("caret return",s),s}))},si=function(e,t){return X("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return ui(e,t)})).join(" ")},ui=function(e,t){e=e.trim();var n=t.loose?Jr[$r.XRANGELOOSE]:Jr[$r.XRANGE];return e.replace(n,(function(n,r,i,a,o,s){X("xRange",e,n,r,i,a,o,s);var u=ni(i),c=u||ni(a),l=c||ni(o),d=l;return"="===r&&d&&(r=""),s=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(c&&(a=0),o=0,">"===r?(r=">=",c?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===r&&(r="<",c?i=+i+1:a=+a+1),"<"===r&&(s="-0"),n="".concat(r+i,".").concat(a,".").concat(o).concat(s)):c?n=">=".concat(i,".0.0").concat(s," <").concat(+i+1,".0.0-0"):l&&(n=">=".concat(i,".").concat(a,".0").concat(s," <").concat(i,".").concat(+a+1,".0-0")),X("xRange return",n),n}))},ci=function(e,t){return X("replaceStars",e,t),e.trim().replace(Jr[$r.STAR],"")},li=function(e,t){return X("replaceGTE0",e,t),e.trim().replace(Jr[t.includePrerelease?$r.GTE0PRE:$r.GTE0],"")},di=function(e){return function(t,n,r,i,a,o,s,u,c,l,d,p,f){return n=ni(r)?"":ni(i)?">=".concat(r,".0.0").concat(e?"-0":""):ni(a)?">=".concat(r,".").concat(i,".0").concat(e?"-0":""):o?">=".concat(n):">=".concat(n).concat(e?"-0":""),u=ni(c)?"":ni(l)?"<".concat(+c+1,".0.0-0"):ni(d)?"<".concat(c,".").concat(+l+1,".0-0"):p?"<=".concat(c,".").concat(l,".").concat(d,"-").concat(p):e?"<".concat(c,".").concat(l,".").concat(+d+1,"-0"):"<=".concat(u),"".concat(n," ").concat(u).trim()}},pi=function(e,t,n){for(var r=0;r0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0},fi=Symbol("SemVer ANY"),hi=function(){function e(t,n){if(s(this,e),n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),t instanceof e){if(t.loose===!!n.loose)return t;t=t.value}X("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===fi?this.value="":this.value=this.operator+this.semver.version,X("comp",this)}return u(e,null,[{key:"ANY",get:function(){return fi}}]),u(e,[{key:"parse",value:function(e){var t=this.options.loose?gi[mi.COMPARATORLOOSE]:gi[mi.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new ce(n[2],this.options.loose):this.semver=fi}},{key:"toString",value:function(){return this.value}},{key:"test",value:function(e){if(X("Comparator.test",e,this.options.loose),this.semver===fi||e===fi)return!0;if("string"==typeof e)try{e=new ce(e,this.options)}catch(e){return!1}return Wr(e,this.operator,this.semver,this.options)}},{key:"intersects",value:function(t,n){if(!(t instanceof e))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new Yr(t.value,n).test(this.value);if(""===t.operator)return""===t.value||new Yr(this.value,n).test(t.semver);var r=!(">="!==this.operator&&">"!==this.operator||">="!==t.operator&&">"!==t.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==t.operator&&"<"!==t.operator),a=this.semver.version===t.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==t.operator&&"<="!==t.operator),s=Wr(this.semver,"<",t.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),u=Wr(this.semver,">",t.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return r||i||a&&o||s||u}}]),e}(),gi=ee.re,mi=ee.t,_i=function(e,t,n){try{t=new Yr(t,n)}catch(e){return!1}return t.test(e)},vi=function(e,t){return new Yr(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},yi=function(e,t,n){var r=null,i=null,a=null;try{a=new Yr(t,n)}catch(e){return null}return e.forEach((function(e){a.test(e)&&(r&&-1!==i.compare(e)||(i=new ce(r=e,n)))})),r},bi=function(e,t,n){var r=null,i=null,a=null;try{a=new Yr(t,n)}catch(e){return null}return e.forEach((function(e){a.test(e)&&(r&&1!==i.compare(e)||(i=new ce(r=e,n)))})),r},Di=function(e,t){e=new Yr(e,t);var n=new ce("0.0.0");if(e.test(n))return n;if(n=new ce("0.0.0-0"),e.test(n))return n;n=null;for(var r=0;r":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!Vr(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: ".concat(e.operator))}}));return n&&e.test(n)?n:null},Ei=function(e,t){try{return new Yr(e,t).range||"*"}catch(e){return null}},Ci=hi.ANY,Si=function(e,t,n,r){var i,a,o,s,u;switch(e=new ce(e,r),t=new Yr(t,r),n){case">":i=Vr,a=Hr,o=de,s=">",u=">=";break;case"<":i=de,a=pe,o=Vr,s="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(_i(e,t,r))return!1;for(var c=function(n){var c=t.set[n],l=null,d=null;return c.forEach((function(e){e.semver===Ci&&(e=new hi(">=0.0.0")),l=l||e,d=d||e,i(e.semver,l.semver,r)?l=e:o(e.semver,d.semver,r)&&(d=e)})),l.operator===s||l.operator===u?{v:!1}:d.operator&&d.operator!==s||!a(e,d.semver)?d.operator===u&&o(e,d.semver)?{v:!1}:void 0:{v:!1}},l=0;l",n)},ki=function(e,t,n){return Si(e,t,"<",n)},Ti=function(e,t,n){return e=new Yr(e,n),t=new Yr(t,n),e.intersects(t)},wi=hi.ANY,Ai=function(e,t,n){if(1===e.length&&e[0].semver===wi)return 1===t.length&&t[0].semver===wi;var i,a,o,s,u,c,l=new Set,d=r(e);try{for(d.s();!(c=d.n()).done;){var p=c.value;">"===p.operator||">="===p.operator?i=Oi(i,p,n):"<"===p.operator||"<="===p.operator?a=Ni(a,p,n):l.add(p.semver)}}catch(E){d.e(E)}finally{d.f()}if(l.size>1)return null;if(i&&a){if((o=le(i.semver,a.semver,n))>0)return null;if(0===o&&(">="!==i.operator||"<="!==a.operator))return null}var f,h=r(l);try{for(h.s();!(f=h.n()).done;){var g=f.value;if(i&&!_i(g,String(i),n))return null;if(a&&!_i(g,String(a),n))return null;var m,_=r(t);try{for(_.s();!(m=_.n()).done;){var v=m.value;if(!_i(g,String(v),n))return!1}}catch(E){_.e(E)}finally{_.f()}return!0}}catch(E){h.e(E)}finally{h.f()}var y,b=r(t);try{for(b.s();!(y=b.n()).done;){var D=y.value;if(u=u||">"===D.operator||">="===D.operator,s=s||"<"===D.operator||"<="===D.operator,i)if(">"===D.operator||">="===D.operator){if(Oi(i,D,n)===D)return!1}else if(">="===i.operator&&!_i(i.semver,String(D),n))return!1;if(a)if("<"===D.operator||"<="===D.operator){if(Ni(a,D,n)===D)return!1}else if("<="===a.operator&&!_i(a.semver,String(D),n))return!1;if(!D.operator&&(a||i)&&0!==o)return!1}}catch(E){b.e(E)}finally{b.f()}return!(i&&s&&!a&&0!==o)&&!(a&&u&&!i&&0!==o)},Oi=function(e,t,n){if(!e)return t;var r=le(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},Ni=function(e,t,n){if(!e)return t;var r=le(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e},Ii=function(e,t,n){e=new Yr(e,n),t=new Yr(t,n);var i,a=!1,o=r(e.set);try{e:for(o.s();!(i=o.n()).done;){var s,u=i.value,c=r(t.set);try{for(c.s();!(s=c.n()).done;){var l=s.value,d=Ai(u,l,n);if(a=a||null!==d,d)continue e}}catch(p){c.e(p)}finally{c.f()}if(a)return!1}}catch(p){o.e(p)}finally{o.f()}return!0},Fi={re:ee.re,src:ee.src,tokens:ee.t,SEMVER_SPEC_VERSION:Z.SEMVER_SPEC_VERSION,SemVer:ce,compareIdentifiers:re.compareIdentifiers,rcompareIdentifiers:re.rcompareIdentifiers,parse:kr,valid:Tr,clean:wr,inc:Ar,diff:Nr,major:Ir,minor:Fr,patch:Lr,prerelease:Pr,compare:le,rcompare:Rr,compareLoose:Mr,compareBuild:Br,sort:jr,rsort:Ur,gt:Vr,lt:de,eq:Or,neq:zr,gte:pe,lte:Hr,cmp:Wr,coerce:Gr,Comparator:hi,Range:Yr,satisfies:_i,toComparators:vi,maxSatisfying:yi,minSatisfying:bi,minVersion:Di,validRange:Ei,outside:Si,gtr:xi,ltr:ki,intersects:Ti,simplifyRange:function(e,t,n){var i,o=[],s=null,u=null,c=e.sort((function(e,t){return le(e,t,n)})),l=r(c);try{for(l.s();!(i=l.n()).done;){var d=i.value;_i(d,t,n)?(u=d,s||(s=d)):(u&&o.push([s,u]),u=null,s=null)}}catch(b){l.e(b)}finally{l.f()}s&&o.push([s,null]);for(var p=[],f=0,h=o;f=".concat(m)):p.push("*")}var v=p.join(" || "),y="string"==typeof t.raw?t.raw:String(t);return v.length2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",i=0):i=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),a=s,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=s,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var Vi={resolve:function(){for(var e,t="",n=!1,r=arguments.length-1;r>=-1&&!n;r--){var i;r>=0?i=arguments[r]:(void 0===e&&(e=Q.cwd()),i=e),ji(i),0!==i.length&&(t=i+"/"+t,n=47===i.charCodeAt(0))}return t=Ui(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(ji(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=Ui(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return ji(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":Vi.normalize(e)},relative:function(e,t){if(ji(e),ji(t),e===t)return"";if((e=Vi.resolve(e))===(t=Vi.resolve(t)))return"";for(var n=1;ns){if(47===t.charCodeAt(a+c))return t.slice(a+c+1);if(0===c)return t.slice(a+c)}else i>s&&(47===e.charCodeAt(n+c)?u=c:0===c&&(u=0));break}var l=e.charCodeAt(n+c);if(l!==t.charCodeAt(a+c))break;47===l&&(u=c)}var d="";for(c=n+u+1;c<=r;++c)c!==r&&47!==e.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+t.slice(a+u):(a+=u,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(ji(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');ji(e);var n,r=0,i=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var o=t.length-1,s=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(47===u){if(!a){r=n+1;break}}else-1===s&&(a=!1,s=n+1),o>=0&&(u===t.charCodeAt(o)?-1==--o&&(i=n):(o=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){r=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){ji(e);for(var t=-1,n=0,r=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){n=o+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}("/",e)},parse:function(e){ji(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0),i=47===r;i?(t.root="/",n=1):n=0;for(var a=-1,o=0,s=-1,u=!0,c=e.length-1,l=0;c>=n;--c)if(47!==(r=e.charCodeAt(c)))-1===s&&(u=!1,s=c+1),46===r?-1===a?a=c:1!==l&&(l=1):-1!==a&&(l=-1);else if(!u){o=c+1;break}return-1===a||-1===s||0===l||1===l&&a===s-1&&a===o+1?-1!==s&&(t.base=t.name=0===o&&i?e.slice(1,s):e.slice(o,s)):(0===o&&i?(t.name=e.slice(1,a),t.base=e.slice(1,s)):(t.name=e.slice(o,a),t.base=e.slice(o,s)),t.ext=e.slice(a,s)),o>0?t.dir=e.slice(0,o-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Vi.posix=Vi;var zi=Vi,Hi=Object.freeze(Object.assign(Object.create(null),zi,{default:zi,__moduleExports:zi})),Wi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Ki=function(e){if(0<=e&&e>>=5)>0&&(t|=32),n+=Ki(t)}while(r>0);return n},Yi=function(e,t,n){var r,i,a,o,s=e.length,u=0,c=0;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=qi(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));r=!!(32&i),u+=(i&=31)<>1,1==(1&a)?-o:o),n.rest=t},Ji=c((function(e,t){t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var n=e,r=i(e);if(r){if(!r.path)return e;n=r.path}for(var o,s=t.isAbsolute(n),u=n.split(/\/+/),c=0,l=u.length-1;l>=0;l--)"."===(o=u[l])?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return""===(n=u.join("/"))&&(n=s?"/":"."),r?(r.path=n,a(r)):n}function s(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),s=i(e);if(s&&(e=s.path||"/"),n&&!n.scheme)return s&&(n.scheme=s.scheme),a(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var u="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=u,a(s)):u}t.urlParse=i,t.urlGenerate=a,t.normalize=o,t.join=s,t.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var u=!("__proto__"in Object.create(null));function c(e){return e}function l(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function d(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=u?c:function(e){return l(e)?"$"+e:e},t.fromSetString=u?c:function(e){return l(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=d(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:d(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=d(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:d(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=d(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var r=i(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var u=r.path.lastIndexOf("/");u>=0&&(r.path=r.path.substring(0,u+1))}t=s(a(r),t)}return o(t)}})),$i=Object.prototype.hasOwnProperty,Qi="undefined"!=typeof Map;function Xi(){this._array=[],this._set=Qi?new Map:Object.create(null)}Xi.fromArray=function(e,t){for(var n=new Xi,r=0,i=e.length;r=0)return t}else{var n=Ji.toSetString(e);if($i.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},Xi.prototype.at=function(e){if(e>=0&&er||i==r&&o>=a||Ji.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},ea.prototype.toArray=function(){return this._sorted||(this._array.sort(Ji.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};var ta=Zi.ArraySet,na={MappingList:ea}.MappingList;function ra(e){e||(e={}),this._file=Ji.getArg(e,"file",null),this._sourceRoot=Ji.getArg(e,"sourceRoot",null),this._skipValidation=Ji.getArg(e,"skipValidation",!1),this._sources=new ta,this._names=new ta,this._mappings=new na,this._sourcesContents=null}ra.prototype._version=3,ra.fromSourceMap=function(e){var t=e.sourceRoot,n=new ra({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=Ji.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){var i=r;null!==t&&(i=Ji.relative(t,r)),n._sources.has(i)||n._sources.add(i);var a=e.sourceContentFor(r);null!=a&&n.setSourceContent(r,a)})),n},ra.prototype.addMapping=function(e){var t=Ji.getArg(e,"generated"),n=Ji.getArg(e,"original",null),r=Ji.getArg(e,"source",null),i=Ji.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},ra.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=Ji.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ji.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[Ji.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},ra.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var i=this._sourceRoot;null!=i&&(r=Ji.relative(i,r));var a=new ta,o=new ta;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=n&&(t.source=Ji.join(n,t.source)),null!=i&&(t.source=Ji.relative(i,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name))}var u=t.source;null==u||a.has(u)||a.add(u);var c=t.name;null==c||o.has(c)||o.add(c)}),this),this._sources=a,this._names=o,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=Ji.join(n,t)),null!=i&&(t=Ji.relative(i,t)),this.setSourceContent(t,r))}),this)},ra.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},ra.prototype._serializeMappings=function(){for(var e,t,n,r,i=0,a=1,o=0,s=0,u=0,c=0,l="",d=this._mappings.toArray(),p=0,f=d.length;p0){if(!Ji.compareByGeneratedPositionsInflated(t,d[p-1]))continue;e+=","}e+=Gi(t.generatedColumn-i),i=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=Gi(r-c),c=r,e+=Gi(t.originalLine-1-s),s=t.originalLine-1,e+=Gi(t.originalColumn-o),o=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=Gi(n-u),u=n)),l+=e}return l},ra.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=Ji.relative(t,e));var n=Ji.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},ra.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},ra.prototype.toString=function(){return JSON.stringify(this.toJSON())};var ia={SourceMapGenerator:ra},aa=c((function(e,t){function n(e,r,i,a,o,s){var u=Math.floor((r-e)/2)+e,c=o(i,a[u],!0);return 0===c?u:c>0?r-u>1?n(u,r,i,a,o,s):s==t.LEAST_UPPER_BOUND?r1?n(e,u,i,a,o,s):s==t.LEAST_UPPER_BOUND?u:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,i,a){if(0===r.length)return-1;var o=n(-1,r.length,e,r,i,a||t.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(r[o],r[o-1],!0);)--o;return o}}));function oa(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function sa(e,t,n,r){if(n=0){var a=this._originalMappings[i];if(void 0===e.column)for(var o=a.originalLine;a&&a.originalLine===o;)r.push({line:Ji.getArg(a,"generatedLine",null),column:Ji.getArg(a,"generatedColumn",null),lastColumn:Ji.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i];else for(var s=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==s;)r.push({line:Ji.getArg(a,"generatedLine",null),column:Ji.getArg(a,"generatedColumn",null),lastColumn:Ji.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i]}return r};var da=la;function pa(e,t){var n=e;"string"==typeof e&&(n=Ji.parseSourceMapInput(e));var r=Ji.getArg(n,"version"),i=Ji.getArg(n,"sources"),a=Ji.getArg(n,"names",[]),o=Ji.getArg(n,"sourceRoot",null),s=Ji.getArg(n,"sourcesContent",null),u=Ji.getArg(n,"mappings"),c=Ji.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);o&&(o=Ji.normalize(o)),i=i.map(String).map(Ji.normalize).map((function(e){return o&&Ji.isAbsolute(o)&&Ji.isAbsolute(e)?Ji.relative(o,e):e})),this._names=ua.fromArray(a.map(String),!0),this._sources=ua.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map((function(e){return Ji.computeSourceURL(o,e,t)})),this.sourceRoot=o,this.sourcesContent=s,this._mappings=u,this._sourceMapURL=t,this.file=c}function fa(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}pa.prototype=Object.create(la.prototype),pa.prototype.consumer=la,pa.prototype._findSourceIndex=function(e){var t,n=e;if(null!=this.sourceRoot&&(n=Ji.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(t=0;t1&&(n.source=d+i[1],d+=i[1],n.originalLine=c+i[2],c=n.originalLine,n.originalLine+=1,n.originalColumn=l+i[3],l=n.originalColumn,i.length>4&&(n.name=p+i[4],p+=i[4])),v.push(n),"number"==typeof n.originalLine&&_.push(n)}ca(v,Ji.compareByGeneratedPositionsDeflated),this.__generatedMappings=v,ca(_,Ji.compareByOriginalPositions),this.__originalMappings=_},pa.prototype._findMapping=function(e,t,n,r,i,a){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return aa.search(e,t,i,a)},pa.prototype.computeColumnSpans=function(){for(var e=0;e=0){var r=this._generatedMappings[n];if(r.generatedLine===t.generatedLine){var i=Ji.getArg(r,"source",null);null!==i&&(i=this._sources.at(i),i=Ji.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=Ji.getArg(r,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:Ji.getArg(r,"originalLine",null),column:Ji.getArg(r,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},pa.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},pa.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var r,i=e;if(null!=this.sourceRoot&&(i=Ji.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(r=Ji.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!r.path||"/"==r.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')},pa.prototype.generatedPositionFor=function(e){var t=Ji.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var n={source:t,originalLine:Ji.getArg(e,"line"),originalColumn:Ji.getArg(e,"column")},r=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Ji.compareByOriginalPositions,Ji.getArg(e,"bias",la.GREATEST_LOWER_BOUND));if(r>=0){var i=this._originalMappings[r];if(i.source===n.source)return{line:Ji.getArg(i,"generatedLine",null),column:Ji.getArg(i,"generatedColumn",null),lastColumn:Ji.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};var ha=pa;function ga(e,t){var n=e;"string"==typeof e&&(n=Ji.parseSourceMapInput(e));var r=Ji.getArg(n,"version"),i=Ji.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new ua,this._names=new ua;var a={line:-1,column:0};this._sections=i.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=Ji.getArg(e,"offset"),r=Ji.getArg(n,"line"),i=Ji.getArg(n,"column");if(r=0;t--)this.prepend(e[t]);else{if(!e[ya]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},ba.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n>18&63]+Ea[i>>12&63]+Ea[i>>6&63]+Ea[63&i]);return a.join("")}function wa(e){var t;xa||ka();for(var n=e.length,r=n%3,i="",a=[],o=16383,s=0,u=n-r;su?u:s+o));return 1===r?(t=e[n-1],i+=Ea[t>>2],i+=Ea[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=Ea[t>>10],i+=Ea[t>>4&63],i+=Ea[t<<2&63],i+="="),a.push(i),a.join("")}function Aa(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<>1,l=-7,d=n?i-1:0,p=n?-1:1,f=e[t+d];for(d+=p,a=f&(1<<-l)-1,f>>=-l,l+=s;l>0;a=256*a+e[t+d],d+=p,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=r;l>0;o=256*o+e[t+d],d+=p,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=c}return(f?-1:1)*o*Math.pow(2,a-r)}function Oa(e,t,n,r,i,a){var o,s,u,c=8*a-i-1,l=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,h=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+d>=1?p/u:p*Math.pow(2,1-d))*u>=2&&(o++,u/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(t*u-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=h,s/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=h,o/=256,c-=8);e[n+f-h]|=128*g}var Na={}.toString,Ia=Array.isArray||function(e){return"[object Array]"==Na.call(e)};function Fa(){return Pa.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function La(e,t){if(Fa()=Fa())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Fa().toString(16)+" bytes");return 0|e}function Va(e){return!(null==e||!e._isBuffer)}function za(e,t){if(Va(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return mo(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return _o(e).length;default:if(r)return mo(e).length;t=(""+t).toLowerCase(),r=!0}}function Ha(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return io(this,t,n);case"utf8":case"utf-8":return eo(this,t,n);case"ascii":return no(this,t,n);case"latin1":case"binary":return ro(this,t,n);case"base64":return Za(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ao(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function Wa(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Ka(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=Pa.from(t,r)),Va(t))return 0===t.length?-1:qa(e,t,n,r,i);if("number"==typeof t)return t&=255,Pa.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):qa(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function qa(e,t,n,r,i){var a,o=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=n;as&&(n=s-u),a=n;a>=0;a--){for(var d=!0,p=0;pi&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function Za(e,t,n){return 0===t&&n===e.length?wa(e):wa(e.slice(t,n))}function eo(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&c)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=d}return function(e){var t=e.length;if(t<=to)return String.fromCharCode.apply(String,e);for(var n="",r=0;r0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},Pa.prototype.compare=function(e,t,n,r,i){if(!Va(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),u=this.slice(r,i),c=e.slice(t,n),l=0;li)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return Ga(this,e,t,n);case"utf8":case"utf-8":return Ya(this,e,t,n);case"ascii":return Ja(this,e,t,n);case"latin1":case"binary":return $a(this,e,t,n);case"base64":return Qa(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xa(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},Pa.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var to=4096;function no(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function so(e,t,n,r,i,a){if(!Va(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function uo(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function co(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function lo(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function po(e,t,n,r,i){return i||lo(e,0,n,4),Oa(e,t,n,r,23,4),n+4}function fo(e,t,n,r,i){return i||lo(e,0,n,8),Oa(e,t,n,r,52,8),n+8}Pa.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},Pa.prototype.readUInt8=function(e,t){return t||oo(e,1,this.length),this[e]},Pa.prototype.readUInt16LE=function(e,t){return t||oo(e,2,this.length),this[e]|this[e+1]<<8},Pa.prototype.readUInt16BE=function(e,t){return t||oo(e,2,this.length),this[e]<<8|this[e+1]},Pa.prototype.readUInt32LE=function(e,t){return t||oo(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Pa.prototype.readUInt32BE=function(e,t){return t||oo(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Pa.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||oo(e,t,this.length);for(var r=this[e],i=1,a=0;++a=(i*=128)&&(r-=Math.pow(2,8*t)),r},Pa.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||oo(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},Pa.prototype.readInt8=function(e,t){return t||oo(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Pa.prototype.readInt16LE=function(e,t){t||oo(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Pa.prototype.readInt16BE=function(e,t){t||oo(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Pa.prototype.readInt32LE=function(e,t){return t||oo(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Pa.prototype.readInt32BE=function(e,t){return t||oo(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Pa.prototype.readFloatLE=function(e,t){return t||oo(e,4,this.length),Aa(this,e,!0,23,4)},Pa.prototype.readFloatBE=function(e,t){return t||oo(e,4,this.length),Aa(this,e,!1,23,4)},Pa.prototype.readDoubleLE=function(e,t){return t||oo(e,8,this.length),Aa(this,e,!0,52,8)},Pa.prototype.readDoubleBE=function(e,t){return t||oo(e,8,this.length),Aa(this,e,!1,52,8)},Pa.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||so(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},Pa.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||so(this,e,t,1,255,0),Pa.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Pa.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||so(this,e,t,2,65535,0),Pa.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):uo(this,e,t,!0),t+2},Pa.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||so(this,e,t,2,65535,0),Pa.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):uo(this,e,t,!1),t+2},Pa.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||so(this,e,t,4,4294967295,0),Pa.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):co(this,e,t,!0),t+4},Pa.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||so(this,e,t,4,4294967295,0),Pa.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):co(this,e,t,!1),t+4},Pa.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);so(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},Pa.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);so(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},Pa.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||so(this,e,t,1,127,-128),Pa.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Pa.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||so(this,e,t,2,32767,-32768),Pa.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):uo(this,e,t,!0),t+2},Pa.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||so(this,e,t,2,32767,-32768),Pa.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):uo(this,e,t,!1),t+2},Pa.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||so(this,e,t,4,2147483647,-2147483648),Pa.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):co(this,e,t,!0),t+4},Pa.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||so(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Pa.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):co(this,e,t,!1),t+4},Pa.prototype.writeFloatLE=function(e,t,n){return po(this,e,t,!0,n)},Pa.prototype.writeFloatBE=function(e,t,n){return po(this,e,t,!1,n)},Pa.prototype.writeDoubleLE=function(e,t,n){return fo(this,e,t,!0,n)},Pa.prototype.writeDoubleBE=function(e,t,n){return fo(this,e,t,!1,n)},Pa.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!Pa.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function _o(e){return function(e){var t,n,r,i,a,o;xa||ka();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new Sa(3*s/4-a),r=a>0?s-4:s;var u=0;for(t=0,n=0;t>16&255,o[u++]=i>>8&255,o[u++]=255&i;return 2===a?(i=Ca[e.charCodeAt(t)]<<2|Ca[e.charCodeAt(t+1)]>>4,o[u++]=255&i):1===a&&(i=Ca[e.charCodeAt(t)]<<10|Ca[e.charCodeAt(t+1)]<<4|Ca[e.charCodeAt(t+2)]>>2,o[u++]=i>>8&255,o[u++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ho,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function vo(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function yo(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var bo=Object.prototype.toString,Do="function"==typeof Pa.alloc&&"function"==typeof Pa.allocUnsafe&&"function"==typeof Pa.from,Eo=function(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return r=e,"ArrayBuffer"===bo.call(r).slice(8,-1)?function(e,t,n){t>>>=0;var r=e.byteLength-t;if(r<0)throw new RangeError("'offset' is out of bounds");if(void 0===n)n=r;else if((n>>>=0)>r)throw new RangeError("'length' is out of bounds");return Do?Pa.from(e.slice(t,t+n)):new Pa(new Uint8Array(e.slice(t,t+n)))}(e,t,n):"string"==typeof e?function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Pa.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return Do?Pa.from(e,t):new Pa(e,t)}(e,t):Do?Pa.from(e):new Pa(e);var r},Co=l(Hi),So=l(Bi),xo=(c((function(e,t){var n,r=Da.SourceMapConsumer,i=Co;try{(n=So).existsSync&&n.readFileSync||(n=null)}catch(e){}function a(e,t){return e.require(t)}var o=!1,s=!1,u=!1,c="auto",l={},d={},p=/^data:application\/json[^,]+base64,/,f=[],h=[];function g(){return"browser"===c||"node"!==c&&"undefined"!=typeof window&&"function"==typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function m(e){return function(t){for(var n=0;n";var n=this.getLineNumber();if(null!=n){t+=":"+n;var r=this.getColumnNumber();r&&(t+=":"+r)}}var i="",a=this.getFunctionName(),o=!0,s=this.isConstructor();if(this.isToplevel()||s)s?i+="new "+(a||""):a?i+=a:(i+=t,o=!1);else{var u=this.getTypeName();"[object Object]"===u&&(u="null");var c=this.getMethodName();a?(u&&0!=a.indexOf(u)&&(i+=u+"."),i+=a,c&&a.indexOf("."+c)!=a.length-c.length-1&&(i+=" [as "+c+"]")):i+=u+"."+(c||"")}return o&&(i+=" ("+t+")"),i}function C(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){t[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]})),t.toString=E,t}function S(e,t){if(void 0===t&&(t={nextPosition:null,curPosition:null}),e.isNative())return t.curPosition=null,e;var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var r=e.getLineNumber(),i=e.getColumnNumber()-1,a=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/.test(Q.version)?0:62;1===r&&i>a&&!g()&&!e.isEval()&&(i-=a);var o=b({source:n,line:r,column:i});t.curPosition=o;var s=(e=C(e)).getFunctionName;return e.getFunctionName=function(){return null==t.nextPosition?s():t.nextPosition.name||s()},e.getFileName=function(){return o.source},e.getLineNumber=function(){return o.line},e.getColumnNumber=function(){return o.column+1},e.getScriptNameOrSourceURL=function(){return o.source},e}var u=e.isEval()&&e.getEvalOrigin();return u?(u=D(u),(e=C(e)).getEvalOrigin=function(){return u},e):e}function x(e,t){u&&(l={},d={});for(var n=(e.name||"Error")+": "+(e.message||""),r={nextPosition:null,curPosition:null},i=[],a=t.length-1;a>=0;a--)i.push("\n at "+S(t[a],r)),r.nextPosition=r.curPosition;return r.curPosition=r.nextPosition=null,n+i.reverse().join("")}function k(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var r=t[1],i=+t[2],a=+t[3],o=l[r];if(!o&&n&&n.existsSync(r))try{o=n.readFileSync(r,"utf8")}catch(e){o=""}if(o){var s=o.split(/(?:\r\n|\r|\n)/)[i-1];if(s)return r+":"+i+"\n"+s+"\n"+new Array(a).join(" ")+"^"}}return null}function T(e){var t=k(e);Q.stderr._handle&&Q.stderr._handle.setBlocking&&Q.stderr._handle.setBlocking(!0),t&&(console.error(),console.error(t)),console.error(e.stack),Q.exit(1)}h.push((function(e){var t,n=function(e){var t;if(g())try{var n=new XMLHttpRequest;n.open("GET",e,!1),n.send(null),t=4===n.readyState?n.responseText:null;var r=n.getResponseHeader("SourceMap")||n.getResponseHeader("X-SourceMap");if(r)return r}catch(e){}t=_(e);for(var i,a,o=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/gm;a=o.exec(t);)i=a;return i?i[1]:null}(e);if(!n)return null;if(p.test(n)){var r=n.slice(n.indexOf(",")+1);t=Eo(r,"base64").toString(),n=e}else n=v(e,n),t=_(n);return t?{url:n,map:t}:null}));var w=f.slice(0),A=h.slice(0);t.wrapCallSite=S,t.getErrorSource=k,t.mapSourcePosition=b,t.retrieveSourceMap=y,t.install=function(t){if((t=t||{}).environment&&(c=t.environment,-1===["node","browser","auto"].indexOf(c)))throw new Error("environment "+c+" was unknown. Available options are {auto, browser, node}");if(t.retrieveFile&&(t.overrideRetrieveFile&&(f.length=0),f.unshift(t.retrieveFile)),t.retrieveSourceMap&&(t.overrideRetrieveSourceMap&&(h.length=0),h.unshift(t.retrieveSourceMap)),t.hookRequire&&!g()){var n=a(e,"module"),r=n.prototype._compile;r.__sourceMapSupport||(n.prototype._compile=function(e,t){return l[t]=e,d[t]=void 0,r.call(this,e,t)},n.prototype._compile.__sourceMapSupport=!0)}if(u||(u="emptyCacheBetweenOperations"in t&&t.emptyCacheBetweenOperations),o||(o=!0,Error.prepareStackTrace=x),!s){var i=!("handleUncaughtExceptions"in t)||t.handleUncaughtExceptions;try{!1===a(e,"worker_threads").isMainThread&&(i=!1)}catch(e){}i&&"object"==typeof Q&&null!==Q&&"function"==typeof Q.on&&(s=!0,p=Q.emit,Q.emit=function(e){if("uncaughtException"===e){var t=arguments[1]&&arguments[1].stack,n=this.listeners(e).length>0;if(t&&!n)return T(arguments[1])}return p.apply(this,arguments)})}var p},t.resetRetrieveHandlers=function(){f.length=0,h.length=0,f=w.slice(0),h=A.slice(0),y=m(h),_=m(f)}})),l(Li)),ko=c((function(e){var t=n&&n.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0;for(var n=0,r=e;n>1);switch(r(n(e[u],u),t)){case-1:o=u+1;break;case 0:return u;case 1:s=u-1}}return~o}function v(e,t,n,r,i){if(e&&e.length>0){var a=e.length;if(a>0){var o=void 0===r||r<0?0:r,s=void 0===i||o+i>a-1?a-1:o+i,u=void 0;for(arguments.length<=2?(u=e[o],o++):u=n;o<=s;)u=t(u,e[o],o),o++;return u}}return n}e.Map=n("Map","tryGetNativeMap","createMapShim"),e.Set=n("Set","tryGetNativeSet","createSetShim"),e.getIterator=r,e.emptyArray=[],e.emptyMap=new e.Map,e.emptySet=new e.Set,e.createMap=function(){return new e.Map},e.createMapFromTemplate=function(t){var n=new e.Map;for(var r in t)y.call(t,r)&&n.set(r,t[r]);return n},e.length=function(e){return e?e.length:0},e.forEach=function(e,t){if(e)for(var n=0;n=0;n--){var r=t(e[n],n);if(r)return r}},e.firstDefined=function(e,t){if(void 0!==e)for(var n=0;n=0;n--){var r=e[n];if(t(r,n))return r}},e.findIndex=function(e,t,n){for(var r=n||0;r=0;r--)if(t(e[r],r))return r;return-1},e.findMap=function(t,n){for(var r=0;r0&&e.Debug.assertGreaterThanOrEqual(r(n[o],n[o-1]),0);t:for(var s=a;as&&e.Debug.assertGreaterThanOrEqual(r(t[a],t[a-1]),0),r(n[o],t[a])){case-1:i.push(n[o]);continue e;case 0:continue e;case 1:continue t}}return i},e.sum=function(e,t){for(var n=0,r=0,i=e;rt?1:0}function B(e,t){return P(e,t)}e.toFileNameLowerCase=F,e.notImplemented=function(){throw new Error("Not implemented")},e.memoize=function(e){var t;return function(){return e&&(t=e(),e=void 0),t}},e.memoizeOne=function(t){var n=new e.Map;return function(e){var r=typeof e+":"+e,i=n.get(r);return void 0!==i||n.has(r)||(i=t(e),n.set(r,i)),i}},e.compose=function(e,t,n,r,i){if(i){for(var a=[],o=0;o0?1:0}function i(e){var t=new Intl.Collator(e,{usage:"sort",sensitivity:"variant"}).compare;return function(e,n){return r(e,n,t)}}function a(e){return void 0!==e?o():function(e,n){return r(e,n,t)};function t(e,t){return e.localeCompare(t)}}function o(){return function(t,n){return r(t,n,e)};function e(e,n){return t(e.toUpperCase(),n.toUpperCase())||t(e,n)}function t(e,t){return et?1:0}}}();function z(e,t,n){for(var r=new Array(t.length+1),i=new Array(t.length+1),a=n+1,o=0;o<=t.length;o++)r[o]=o;for(o=1;o<=e.length;o++){var s=e.charCodeAt(o-1),u=o>n?o-n:1,c=t.length>n+o?n+o:t.length;i[0]=o;for(var l=o,d=1;dn)return;var f=r;r=i,i=f}var h=r[t.length];return h>n?void 0:h}function H(e,t){var n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}function W(e,t){for(var n=t;n=n.length+r.length&&G(t,n)&&H(t,r)}function J(e,t,n,r){for(var i=0,a=e[r];ii&&(i=u.prefix.length,r=s)}return r},e.startsWith=G,e.removePrefix=function(e,t){return G(e,t)?e.substr(t.length):e},e.tryRemovePrefix=function(e,t,n){return void 0===n&&(n=O),G(n(e),n(t))?e.substring(t.length):void 0},e.and=function(e,t){return function(n){return e(n)&&t(n)}},e.or=function(){for(var e=[],t=0;t=e}function p(t,r){return!!d(t)||(l[r]={level:t,assertion:n[r]},n[r]=e.noop,!1)}function f(e,t){var n=new Error(e?"Debug Failure. "+e:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(n,t||f),n}function h(e,t,n,r){e||(t=t?"False expression: "+t:"False expression.",n&&(t+="\r\nVerbose Debug Information: "+("string"==typeof n?n:n())),f(t,r||h))}function g(e,t,n){null==e&&f(t,n||g)}function m(e,t,n){return g(e,t,n||m),e}function _(e,t,n){for(var r=0,i=e;r0&&0===i[0][0]?i[0][1]:"0";if(r){for(var a="",o=t,s=0,u=i;st)break;0!==l&&l&t&&(a=a+(a?"|":"")+d,o&=~l)}if(0===o)return a}else for(var p=0,f=i;pr)for(var i=0,o=e.getOwnKeys(l);i=u.level&&(n[s]=u,l[s]=void 0)}},n.shouldAssert=d,n.fail=f,n.failBadSyntaxKind=function e(t,n,r){return f((n||"Unexpected node.")+"\r\nNode "+D(t.kind)+" was unexpected.",r||e)},n.assert=h,n.assertEqual=function e(t,n,r,i,a){t!==n&&f("Expected "+t+" === "+n+". "+(r?i?r+" "+i:r:""),a||e)},n.assertLessThan=function e(t,n,r,i){t>=n&&f("Expected "+t+" < "+n+". "+(r||""),i||e)},n.assertLessThanOrEqual=function e(t,n,r){t>n&&f("Expected "+t+" <= "+n,r||e)},n.assertGreaterThanOrEqual=function e(t,n,r){t= "+n,r||e)},n.assertIsDefined=g,n.checkDefined=m,n.assertDefined=m,n.assertEachIsDefined=_,n.checkEachDefined=v,n.assertEachDefined=v,n.assertNever=function t(n,r,i){return void 0===r&&(r="Illegal value:"),f(r+" "+("object"==typeof n&&e.hasProperty(n,"kind")&&e.hasProperty(n,"pos")&&D?"SyntaxKind: "+D(n.kind):JSON.stringify(n)),i||t)},n.assertEachNode=function t(n,r,i,a){p(1,"assertEachNode")&&h(void 0===r||e.every(n,r),i||"Unexpected node.",(function(){return"Node array did not pass test '"+y(r)+"'."}),a||t)},n.assertNode=function e(t,n,r,i){p(1,"assertNode")&&h(void 0!==t&&(void 0===n||n(t)),r||"Unexpected node.",(function(){return"Node "+D(t.kind)+" did not pass test '"+y(n)+"'."}),i||e)},n.assertNotNode=function e(t,n,r,i){p(1,"assertNotNode")&&h(void 0===t||void 0===n||!n(t),r||"Unexpected node.",(function(){return"Node "+D(t.kind)+" should not have passed test '"+y(n)+"'."}),i||e)},n.assertOptionalNode=function e(t,n,r,i){p(1,"assertOptionalNode")&&h(void 0===n||void 0===t||n(t),r||"Unexpected node.",(function(){return"Node "+D(t.kind)+" did not pass test '"+y(n)+"'."}),i||e)},n.assertOptionalToken=function e(t,n,r,i){p(1,"assertOptionalToken")&&h(void 0===n||void 0===t||t.kind===n,r||"Unexpected node.",(function(){return"Node "+D(t.kind)+" was not a '"+D(n)+"' token."}),i||e)},n.assertMissingNode=function e(t,n,r){p(1,"assertMissingNode")&&h(void 0===t,n||"Unexpected node.",(function(){return"Node "+D(t.kind)+" was unexpected'."}),r||e)},n.getFunctionName=y,n.formatSymbol=function(t){return"{ name: "+e.unescapeLeadingUnderscores(t.escapedName)+"; flags: "+k(t.flags)+"; declarations: "+e.map(t.declarations,(function(e){return D(e.kind)}))+" }"},n.formatEnum=b,n.formatSyntaxKind=D,n.formatNodeFlags=E,n.formatModifierFlags=C,n.formatTransformFlags=S,n.formatEmitFlags=x,n.formatSymbolFlags=k,n.formatTypeFlags=T,n.formatObjectFlags=w,n.formatFlowFlags=A;var O,N,I,F=!1;function L(e){return function(){if(M(),!O)throw new Error("Debugging helpers could not be loaded.");return O}().formatControlFlowGraph(e)}function P(t){"__debugFlowFlags"in t||Object.defineProperties(t,{__tsDebuggerDisplay:{value:function(){var e=2&this.flags?"FlowStart":4&this.flags?"FlowBranchLabel":8&this.flags?"FlowLoopLabel":16&this.flags?"FlowAssignment":32&this.flags?"FlowTrueCondition":64&this.flags?"FlowFalseCondition":128&this.flags?"FlowSwitchClause":256&this.flags?"FlowArrayMutation":512&this.flags?"FlowCall":1024&this.flags?"FlowReduceLabel":1&this.flags?"FlowUnreachable":"UnknownFlow",t=-2048&this.flags;return e+(t?" ("+A(t)+")":"")}},__debugFlowFlags:{get:function(){return b(this.flags,e.FlowFlags,!0)}},__debugToString:{value:function(){return L(this)}}})}function R(e){"__tsDebuggerDisplay"in e||Object.defineProperties(e,{__tsDebuggerDisplay:{value:function(e){return"NodeArray "+String(e).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/,"]")}}})}function M(){if(!F){var t,n;Object.defineProperties(e.objectAllocator.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value:function(){var t=33554432&this.flags?"TransientSymbol":"Symbol",n=-33554433&this.flags;return t+" '"+e.symbolName(this)+"'"+(n?" ("+k(n)+")":"")}},__debugFlags:{get:function(){return k(this.flags)}}}),Object.defineProperties(e.objectAllocator.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value:function(){var t=98304&this.flags?"NullableType":384&this.flags?"LiteralType "+JSON.stringify(this.value):2048&this.flags?"LiteralType "+(this.value.negative?"-":"")+this.value.base10Value+"n":8192&this.flags?"UniqueESSymbolType":32&this.flags?"EnumType":67359327&this.flags?"IntrinsicType "+this.intrinsicName:1048576&this.flags?"UnionType":2097152&this.flags?"IntersectionType":4194304&this.flags?"IndexType":8388608&this.flags?"IndexedAccessType":16777216&this.flags?"ConditionalType":33554432&this.flags?"SubstitutionType":262144&this.flags?"TypeParameter":524288&this.flags?3&this.objectFlags?"InterfaceType":4&this.objectFlags?"TypeReference":8&this.objectFlags?"TupleType":16&this.objectFlags?"AnonymousType":32&this.objectFlags?"MappedType":2048&this.objectFlags?"ReverseMappedType":256&this.objectFlags?"EvolvingArrayType":"ObjectType":"Type",n=524288&this.flags?-2368&this.objectFlags:0;return t+(this.symbol?" '"+e.symbolName(this.symbol)+"'":"")+(n?" ("+w(n)+")":"")}},__debugFlags:{get:function(){return T(this.flags)}},__debugObjectFlags:{get:function(){return 524288&this.flags?w(this.objectFlags):""}},__debugTypeToString:{value:function(){var e=(void 0===t&&"function"==typeof WeakMap&&(t=new WeakMap),t),n=null==e?void 0:e.get(this);return void 0===n&&(n=this.checker.typeToString(this),null==e||e.set(this,n)),n}}});for(var r=0,i=[e.objectAllocator.getNodeConstructor(),e.objectAllocator.getIdentifierConstructor(),e.objectAllocator.getTokenConstructor(),e.objectAllocator.getSourceFileConstructor()];r=0;return d?function(e,t,n,r){var i=B(e,!0,t,n,r);return function(){throw new TypeError(i)}}(t,s,l,n.message):p?function(e,t,n,r){var i=!1;return function(){i||(c.warn(B(e,!1,t,n,r)),i=!0)}}(t,s,l,n.message):e.noop}n.printControlFlowGraph=function(e){return console.log(L(e))},n.formatControlFlowGraph=L,n.attachFlowNodeDebugInfo=function(e){F&&("function"==typeof Object.setPrototypeOf?(N||P(N=Object.create(Object.prototype)),Object.setPrototypeOf(e,N)):P(e))},n.attachNodeArrayDebugInfo=function(e){F&&("function"==typeof Object.setPrototypeOf?(I||R(I=Object.create(Array.prototype)),Object.setPrototypeOf(e,I)):R(e))},n.enableDebugInfo=M,n.deprecate=function(e,t){return function(e,t){return function(){return e(),t.apply(this,arguments)}}(j(y(e),t),e)}}(e.Debug||(e.Debug={}))}(u||(u={})),function(e){var t=/^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i,n=/^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i,r=/^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i,i=/^(0|[1-9]\d*)$/,a=function(){function t(t,i,a,s,u){if(void 0===i&&(i=0),void 0===a&&(a=0),void 0===s&&(s=""),void 0===u&&(u=""),"string"==typeof t){var c=e.Debug.checkDefined(o(t),"Invalid version");t=c.major,i=c.minor,a=c.patch,s=c.prerelease,u=c.build}e.Debug.assert(t>=0,"Invalid argument: major"),e.Debug.assert(i>=0,"Invalid argument: minor"),e.Debug.assert(a>=0,"Invalid argument: patch"),e.Debug.assert(!s||n.test(s),"Invalid argument: prerelease"),e.Debug.assert(!u||r.test(u),"Invalid argument: build"),this.major=t,this.minor=i,this.patch=a,this.prerelease=s?s.split("."):e.emptyArray,this.build=u?u.split("."):e.emptyArray}return t.tryParse=function(e){var n=o(e);if(n)return new t(n.major,n.minor,n.patch,n.prerelease,n.build)},t.prototype.compareTo=function(t){return this===t?0:void 0===t?1:e.compareValues(this.major,t.major)||e.compareValues(this.minor,t.minor)||e.compareValues(this.patch,t.patch)||function(t,n){if(t===n)return 0;if(0===t.length)return 0===n.length?0:1;if(0===n.length)return-1;for(var r=Math.min(t.length,n.length),a=0;a|>=|=)?\s*([a-z0-9-+.*]+)$/i;function f(e){for(var t=[],n=0,r=e.trim().split(u);n=",r.version)),_(i.major)||n.push(_(i.minor)?v("<",i.version.increment("major")):_(i.patch)?v("<",i.version.increment("minor")):v("<=",i.version)),!0)}function m(e,t,n){var r=h(t);if(!r)return!1;var i=r.version,o=r.major,s=r.minor,u=r.patch;if(_(o))"<"!==e&&">"!==e||n.push(v("<",a.zero));else switch(e){case"~":n.push(v(">=",i)),n.push(v("<",i.increment(_(s)?"major":"minor")));break;case"^":n.push(v(">=",i)),n.push(v("<",i.increment(i.major>0||_(s)?"major":i.minor>0||_(u)?"minor":"patch")));break;case"<":case">=":n.push(v(e,i));break;case"<=":case">":n.push(_(s)?v("<="===e?"<":">=",i.increment("major")):_(u)?v("<="===e?"<":">=",i.increment("minor")):v(e,i));break;case"=":case void 0:_(s)||_(u)?(n.push(v(">=",i)),n.push(v("<",i.increment(_(s)?"major":"minor")))):n.push(v("=",i));break;default:return!1}return!0}function _(e){return"*"===e||"x"===e||"X"===e}function v(e,t){return{operator:e,operand:t}}function y(e,t){for(var n=0,r=t;n":return i>0;case">=":return i>=0;case"=":return 0===i;default:return e.Debug.assertNever(n)}}function D(t){return e.map(t,E).join(" ")}function E(e){return""+e.operator+e.operand}}(u||(u={})),function(e){function t(e,t){return"object"==typeof e&&"number"==typeof e.timeOrigin&&"function"==typeof e.mark&&"function"==typeof e.measure&&"function"==typeof e.now&&"function"==typeof t}var n=function(){if("object"==typeof performance&&"function"==typeof PerformanceObserver&&t(performance,PerformanceObserver))return{performance:performance,PerformanceObserver:PerformanceObserver}}()||function(){try{var n=xo,r=n.performance,i=n.PerformanceObserver;if(t(r,i)){var a=new e.Version("999.999.999");return new e.VersionRange("<12.16.3 || 13 <13.13").test(a)?{performance:{get timeOrigin(){return r.timeOrigin},now:function(){return r.now()},mark:function(e){return r.mark(e)},measure:function(e,t,n){void 0===t&&(t="nodeStart"),void 0===n&&(n="__performance.measure-fix__",r.mark(n)),r.measure(e,t,n),"__performance.measure-fix__"===n&&r.clearMarks("__performance.measure-fix__")}},PerformanceObserver:i}:{performance:r,PerformanceObserver:i}}}catch(e){}}(),r=null==n?void 0:n.performance;e.tryGetNativePerformanceHooks=function(){return n},e.timestamp=r?function(){return r.now()}:Date.now?Date.now:function(){return+new Date}}(u||(u={})),function(e){!function(t){var n,r,i;function a(t,n,r){var i=0;return{enter:function(){1==++i&&u(n)},exit:function(){0==--i?(u(r),c(t,n,r)):i<0&&e.Debug.fail("enter/exit count does not match.")}}}t.createTimerIf=function(e,n,r,i){return e?a(n,r,i):t.nullTimer},t.createTimer=a,t.nullTimer={enter:e.noop,exit:e.noop};var o=new e.Map,s=new e.Map;function u(e){null==i||i.mark(e)}function c(e,t,n){null==i||i.measure(e,t,n)}function l(e){for(var t=0,n=e.getEntriesByType("mark");t0);var t=u.pop(),n=t.phase,r=t.name,a=t.args,o=t.time;c("X",n,r,a,'"dur":'+(1e3*e.timestamp()-o),o)}},t.dumpLegend=function(){a&&(e.Debug.assert(n),n.writeFileSync(a,JSON.stringify(s)))}}(e.tracing||(e.tracing={}))}(u||(u={})),function(e){!function(e){e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NumericLiteral=8]="NumericLiteral",e[e.BigIntLiteral=9]="BigIntLiteral",e[e.StringLiteral=10]="StringLiteral",e[e.JsxText=11]="JsxText",e[e.JsxTextAllWhiteSpaces=12]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=13]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=14]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=15]="TemplateHead",e[e.TemplateMiddle=16]="TemplateMiddle",e[e.TemplateTail=17]="TemplateTail",e[e.OpenBraceToken=18]="OpenBraceToken",e[e.CloseBraceToken=19]="CloseBraceToken",e[e.OpenParenToken=20]="OpenParenToken",e[e.CloseParenToken=21]="CloseParenToken",e[e.OpenBracketToken=22]="OpenBracketToken",e[e.CloseBracketToken=23]="CloseBracketToken",e[e.DotToken=24]="DotToken",e[e.DotDotDotToken=25]="DotDotDotToken",e[e.SemicolonToken=26]="SemicolonToken",e[e.CommaToken=27]="CommaToken",e[e.QuestionDotToken=28]="QuestionDotToken",e[e.LessThanToken=29]="LessThanToken",e[e.LessThanSlashToken=30]="LessThanSlashToken",e[e.GreaterThanToken=31]="GreaterThanToken",e[e.LessThanEqualsToken=32]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=33]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=34]="EqualsEqualsToken",e[e.ExclamationEqualsToken=35]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=36]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=37]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=38]="EqualsGreaterThanToken",e[e.PlusToken=39]="PlusToken",e[e.MinusToken=40]="MinusToken",e[e.AsteriskToken=41]="AsteriskToken",e[e.AsteriskAsteriskToken=42]="AsteriskAsteriskToken",e[e.SlashToken=43]="SlashToken",e[e.PercentToken=44]="PercentToken",e[e.PlusPlusToken=45]="PlusPlusToken",e[e.MinusMinusToken=46]="MinusMinusToken",e[e.LessThanLessThanToken=47]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=48]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=49]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=50]="AmpersandToken",e[e.BarToken=51]="BarToken",e[e.CaretToken=52]="CaretToken",e[e.ExclamationToken=53]="ExclamationToken",e[e.TildeToken=54]="TildeToken",e[e.AmpersandAmpersandToken=55]="AmpersandAmpersandToken",e[e.BarBarToken=56]="BarBarToken",e[e.QuestionToken=57]="QuestionToken",e[e.ColonToken=58]="ColonToken",e[e.AtToken=59]="AtToken",e[e.QuestionQuestionToken=60]="QuestionQuestionToken",e[e.BacktickToken=61]="BacktickToken",e[e.EqualsToken=62]="EqualsToken",e[e.PlusEqualsToken=63]="PlusEqualsToken",e[e.MinusEqualsToken=64]="MinusEqualsToken",e[e.AsteriskEqualsToken=65]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=66]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=67]="SlashEqualsToken",e[e.PercentEqualsToken=68]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=69]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=70]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=71]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=72]="AmpersandEqualsToken",e[e.BarEqualsToken=73]="BarEqualsToken",e[e.BarBarEqualsToken=74]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=75]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=76]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=77]="CaretEqualsToken",e[e.Identifier=78]="Identifier",e[e.PrivateIdentifier=79]="PrivateIdentifier",e[e.BreakKeyword=80]="BreakKeyword",e[e.CaseKeyword=81]="CaseKeyword",e[e.CatchKeyword=82]="CatchKeyword",e[e.ClassKeyword=83]="ClassKeyword",e[e.ConstKeyword=84]="ConstKeyword",e[e.ContinueKeyword=85]="ContinueKeyword",e[e.DebuggerKeyword=86]="DebuggerKeyword",e[e.DefaultKeyword=87]="DefaultKeyword",e[e.DeleteKeyword=88]="DeleteKeyword",e[e.DoKeyword=89]="DoKeyword",e[e.ElseKeyword=90]="ElseKeyword",e[e.EnumKeyword=91]="EnumKeyword",e[e.ExportKeyword=92]="ExportKeyword",e[e.ExtendsKeyword=93]="ExtendsKeyword",e[e.FalseKeyword=94]="FalseKeyword",e[e.FinallyKeyword=95]="FinallyKeyword",e[e.ForKeyword=96]="ForKeyword",e[e.FunctionKeyword=97]="FunctionKeyword",e[e.IfKeyword=98]="IfKeyword",e[e.ImportKeyword=99]="ImportKeyword",e[e.InKeyword=100]="InKeyword",e[e.InstanceOfKeyword=101]="InstanceOfKeyword",e[e.NewKeyword=102]="NewKeyword",e[e.NullKeyword=103]="NullKeyword",e[e.ReturnKeyword=104]="ReturnKeyword",e[e.SuperKeyword=105]="SuperKeyword",e[e.SwitchKeyword=106]="SwitchKeyword",e[e.ThisKeyword=107]="ThisKeyword",e[e.ThrowKeyword=108]="ThrowKeyword",e[e.TrueKeyword=109]="TrueKeyword",e[e.TryKeyword=110]="TryKeyword",e[e.TypeOfKeyword=111]="TypeOfKeyword",e[e.VarKeyword=112]="VarKeyword",e[e.VoidKeyword=113]="VoidKeyword",e[e.WhileKeyword=114]="WhileKeyword",e[e.WithKeyword=115]="WithKeyword",e[e.ImplementsKeyword=116]="ImplementsKeyword",e[e.InterfaceKeyword=117]="InterfaceKeyword",e[e.LetKeyword=118]="LetKeyword",e[e.PackageKeyword=119]="PackageKeyword",e[e.PrivateKeyword=120]="PrivateKeyword",e[e.ProtectedKeyword=121]="ProtectedKeyword",e[e.PublicKeyword=122]="PublicKeyword",e[e.StaticKeyword=123]="StaticKeyword",e[e.YieldKeyword=124]="YieldKeyword",e[e.AbstractKeyword=125]="AbstractKeyword",e[e.AsKeyword=126]="AsKeyword",e[e.AssertsKeyword=127]="AssertsKeyword",e[e.AnyKeyword=128]="AnyKeyword",e[e.AsyncKeyword=129]="AsyncKeyword",e[e.AwaitKeyword=130]="AwaitKeyword",e[e.BooleanKeyword=131]="BooleanKeyword",e[e.ConstructorKeyword=132]="ConstructorKeyword",e[e.DeclareKeyword=133]="DeclareKeyword",e[e.GetKeyword=134]="GetKeyword",e[e.InferKeyword=135]="InferKeyword",e[e.IntrinsicKeyword=136]="IntrinsicKeyword",e[e.IsKeyword=137]="IsKeyword",e[e.KeyOfKeyword=138]="KeyOfKeyword",e[e.ModuleKeyword=139]="ModuleKeyword",e[e.NamespaceKeyword=140]="NamespaceKeyword",e[e.NeverKeyword=141]="NeverKeyword",e[e.ReadonlyKeyword=142]="ReadonlyKeyword",e[e.RequireKeyword=143]="RequireKeyword",e[e.NumberKeyword=144]="NumberKeyword",e[e.ObjectKeyword=145]="ObjectKeyword",e[e.SetKeyword=146]="SetKeyword",e[e.StringKeyword=147]="StringKeyword",e[e.SymbolKeyword=148]="SymbolKeyword",e[e.TypeKeyword=149]="TypeKeyword",e[e.UndefinedKeyword=150]="UndefinedKeyword",e[e.UniqueKeyword=151]="UniqueKeyword",e[e.UnknownKeyword=152]="UnknownKeyword",e[e.FromKeyword=153]="FromKeyword",e[e.GlobalKeyword=154]="GlobalKeyword",e[e.BigIntKeyword=155]="BigIntKeyword",e[e.OfKeyword=156]="OfKeyword",e[e.QualifiedName=157]="QualifiedName",e[e.ComputedPropertyName=158]="ComputedPropertyName",e[e.TypeParameter=159]="TypeParameter",e[e.Parameter=160]="Parameter",e[e.Decorator=161]="Decorator",e[e.PropertySignature=162]="PropertySignature",e[e.PropertyDeclaration=163]="PropertyDeclaration",e[e.MethodSignature=164]="MethodSignature",e[e.MethodDeclaration=165]="MethodDeclaration",e[e.Constructor=166]="Constructor",e[e.GetAccessor=167]="GetAccessor",e[e.SetAccessor=168]="SetAccessor",e[e.CallSignature=169]="CallSignature",e[e.ConstructSignature=170]="ConstructSignature",e[e.IndexSignature=171]="IndexSignature",e[e.TypePredicate=172]="TypePredicate",e[e.TypeReference=173]="TypeReference",e[e.FunctionType=174]="FunctionType",e[e.ConstructorType=175]="ConstructorType",e[e.TypeQuery=176]="TypeQuery",e[e.TypeLiteral=177]="TypeLiteral",e[e.ArrayType=178]="ArrayType",e[e.TupleType=179]="TupleType",e[e.OptionalType=180]="OptionalType",e[e.RestType=181]="RestType",e[e.UnionType=182]="UnionType",e[e.IntersectionType=183]="IntersectionType",e[e.ConditionalType=184]="ConditionalType",e[e.InferType=185]="InferType",e[e.ParenthesizedType=186]="ParenthesizedType",e[e.ThisType=187]="ThisType",e[e.TypeOperator=188]="TypeOperator",e[e.IndexedAccessType=189]="IndexedAccessType",e[e.MappedType=190]="MappedType",e[e.LiteralType=191]="LiteralType",e[e.NamedTupleMember=192]="NamedTupleMember",e[e.TemplateLiteralType=193]="TemplateLiteralType",e[e.TemplateLiteralTypeSpan=194]="TemplateLiteralTypeSpan",e[e.ImportType=195]="ImportType",e[e.ObjectBindingPattern=196]="ObjectBindingPattern",e[e.ArrayBindingPattern=197]="ArrayBindingPattern",e[e.BindingElement=198]="BindingElement",e[e.ArrayLiteralExpression=199]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=200]="ObjectLiteralExpression",e[e.PropertyAccessExpression=201]="PropertyAccessExpression",e[e.ElementAccessExpression=202]="ElementAccessExpression",e[e.CallExpression=203]="CallExpression",e[e.NewExpression=204]="NewExpression",e[e.TaggedTemplateExpression=205]="TaggedTemplateExpression",e[e.TypeAssertionExpression=206]="TypeAssertionExpression",e[e.ParenthesizedExpression=207]="ParenthesizedExpression",e[e.FunctionExpression=208]="FunctionExpression",e[e.ArrowFunction=209]="ArrowFunction",e[e.DeleteExpression=210]="DeleteExpression",e[e.TypeOfExpression=211]="TypeOfExpression",e[e.VoidExpression=212]="VoidExpression",e[e.AwaitExpression=213]="AwaitExpression",e[e.PrefixUnaryExpression=214]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=215]="PostfixUnaryExpression",e[e.BinaryExpression=216]="BinaryExpression",e[e.ConditionalExpression=217]="ConditionalExpression",e[e.TemplateExpression=218]="TemplateExpression",e[e.YieldExpression=219]="YieldExpression",e[e.SpreadElement=220]="SpreadElement",e[e.ClassExpression=221]="ClassExpression",e[e.OmittedExpression=222]="OmittedExpression",e[e.ExpressionWithTypeArguments=223]="ExpressionWithTypeArguments",e[e.AsExpression=224]="AsExpression",e[e.NonNullExpression=225]="NonNullExpression",e[e.MetaProperty=226]="MetaProperty",e[e.SyntheticExpression=227]="SyntheticExpression",e[e.TemplateSpan=228]="TemplateSpan",e[e.SemicolonClassElement=229]="SemicolonClassElement",e[e.Block=230]="Block",e[e.EmptyStatement=231]="EmptyStatement",e[e.VariableStatement=232]="VariableStatement",e[e.ExpressionStatement=233]="ExpressionStatement",e[e.IfStatement=234]="IfStatement",e[e.DoStatement=235]="DoStatement",e[e.WhileStatement=236]="WhileStatement",e[e.ForStatement=237]="ForStatement",e[e.ForInStatement=238]="ForInStatement",e[e.ForOfStatement=239]="ForOfStatement",e[e.ContinueStatement=240]="ContinueStatement",e[e.BreakStatement=241]="BreakStatement",e[e.ReturnStatement=242]="ReturnStatement",e[e.WithStatement=243]="WithStatement",e[e.SwitchStatement=244]="SwitchStatement",e[e.LabeledStatement=245]="LabeledStatement",e[e.ThrowStatement=246]="ThrowStatement",e[e.TryStatement=247]="TryStatement",e[e.DebuggerStatement=248]="DebuggerStatement",e[e.VariableDeclaration=249]="VariableDeclaration",e[e.VariableDeclarationList=250]="VariableDeclarationList",e[e.FunctionDeclaration=251]="FunctionDeclaration",e[e.ClassDeclaration=252]="ClassDeclaration",e[e.InterfaceDeclaration=253]="InterfaceDeclaration",e[e.TypeAliasDeclaration=254]="TypeAliasDeclaration",e[e.EnumDeclaration=255]="EnumDeclaration",e[e.ModuleDeclaration=256]="ModuleDeclaration",e[e.ModuleBlock=257]="ModuleBlock",e[e.CaseBlock=258]="CaseBlock",e[e.NamespaceExportDeclaration=259]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=260]="ImportEqualsDeclaration",e[e.ImportDeclaration=261]="ImportDeclaration",e[e.ImportClause=262]="ImportClause",e[e.NamespaceImport=263]="NamespaceImport",e[e.NamedImports=264]="NamedImports",e[e.ImportSpecifier=265]="ImportSpecifier",e[e.ExportAssignment=266]="ExportAssignment",e[e.ExportDeclaration=267]="ExportDeclaration",e[e.NamedExports=268]="NamedExports",e[e.NamespaceExport=269]="NamespaceExport",e[e.ExportSpecifier=270]="ExportSpecifier",e[e.MissingDeclaration=271]="MissingDeclaration",e[e.ExternalModuleReference=272]="ExternalModuleReference",e[e.JsxElement=273]="JsxElement",e[e.JsxSelfClosingElement=274]="JsxSelfClosingElement",e[e.JsxOpeningElement=275]="JsxOpeningElement",e[e.JsxClosingElement=276]="JsxClosingElement",e[e.JsxFragment=277]="JsxFragment",e[e.JsxOpeningFragment=278]="JsxOpeningFragment",e[e.JsxClosingFragment=279]="JsxClosingFragment",e[e.JsxAttribute=280]="JsxAttribute",e[e.JsxAttributes=281]="JsxAttributes",e[e.JsxSpreadAttribute=282]="JsxSpreadAttribute",e[e.JsxExpression=283]="JsxExpression",e[e.CaseClause=284]="CaseClause",e[e.DefaultClause=285]="DefaultClause",e[e.HeritageClause=286]="HeritageClause",e[e.CatchClause=287]="CatchClause",e[e.PropertyAssignment=288]="PropertyAssignment",e[e.ShorthandPropertyAssignment=289]="ShorthandPropertyAssignment",e[e.SpreadAssignment=290]="SpreadAssignment",e[e.EnumMember=291]="EnumMember",e[e.UnparsedPrologue=292]="UnparsedPrologue",e[e.UnparsedPrepend=293]="UnparsedPrepend",e[e.UnparsedText=294]="UnparsedText",e[e.UnparsedInternalText=295]="UnparsedInternalText",e[e.UnparsedSyntheticReference=296]="UnparsedSyntheticReference",e[e.SourceFile=297]="SourceFile",e[e.Bundle=298]="Bundle",e[e.UnparsedSource=299]="UnparsedSource",e[e.InputFiles=300]="InputFiles",e[e.JSDocTypeExpression=301]="JSDocTypeExpression",e[e.JSDocNameReference=302]="JSDocNameReference",e[e.JSDocAllType=303]="JSDocAllType",e[e.JSDocUnknownType=304]="JSDocUnknownType",e[e.JSDocNullableType=305]="JSDocNullableType",e[e.JSDocNonNullableType=306]="JSDocNonNullableType",e[e.JSDocOptionalType=307]="JSDocOptionalType",e[e.JSDocFunctionType=308]="JSDocFunctionType",e[e.JSDocVariadicType=309]="JSDocVariadicType",e[e.JSDocNamepathType=310]="JSDocNamepathType",e[e.JSDocComment=311]="JSDocComment",e[e.JSDocTypeLiteral=312]="JSDocTypeLiteral",e[e.JSDocSignature=313]="JSDocSignature",e[e.JSDocTag=314]="JSDocTag",e[e.JSDocAugmentsTag=315]="JSDocAugmentsTag",e[e.JSDocImplementsTag=316]="JSDocImplementsTag",e[e.JSDocAuthorTag=317]="JSDocAuthorTag",e[e.JSDocDeprecatedTag=318]="JSDocDeprecatedTag",e[e.JSDocClassTag=319]="JSDocClassTag",e[e.JSDocPublicTag=320]="JSDocPublicTag",e[e.JSDocPrivateTag=321]="JSDocPrivateTag",e[e.JSDocProtectedTag=322]="JSDocProtectedTag",e[e.JSDocReadonlyTag=323]="JSDocReadonlyTag",e[e.JSDocCallbackTag=324]="JSDocCallbackTag",e[e.JSDocEnumTag=325]="JSDocEnumTag",e[e.JSDocParameterTag=326]="JSDocParameterTag",e[e.JSDocReturnTag=327]="JSDocReturnTag",e[e.JSDocThisTag=328]="JSDocThisTag",e[e.JSDocTypeTag=329]="JSDocTypeTag",e[e.JSDocTemplateTag=330]="JSDocTemplateTag",e[e.JSDocTypedefTag=331]="JSDocTypedefTag",e[e.JSDocSeeTag=332]="JSDocSeeTag",e[e.JSDocPropertyTag=333]="JSDocPropertyTag",e[e.SyntaxList=334]="SyntaxList",e[e.NotEmittedStatement=335]="NotEmittedStatement",e[e.PartiallyEmittedExpression=336]="PartiallyEmittedExpression",e[e.CommaListExpression=337]="CommaListExpression",e[e.MergeDeclarationMarker=338]="MergeDeclarationMarker",e[e.EndOfDeclarationMarker=339]="EndOfDeclarationMarker",e[e.SyntheticReferenceExpression=340]="SyntheticReferenceExpression",e[e.Count=341]="Count",e[e.FirstAssignment=62]="FirstAssignment",e[e.LastAssignment=77]="LastAssignment",e[e.FirstCompoundAssignment=63]="FirstCompoundAssignment",e[e.LastCompoundAssignment=77]="LastCompoundAssignment",e[e.FirstReservedWord=80]="FirstReservedWord",e[e.LastReservedWord=115]="LastReservedWord",e[e.FirstKeyword=80]="FirstKeyword",e[e.LastKeyword=156]="LastKeyword",e[e.FirstFutureReservedWord=116]="FirstFutureReservedWord",e[e.LastFutureReservedWord=124]="LastFutureReservedWord",e[e.FirstTypeNode=172]="FirstTypeNode",e[e.LastTypeNode=195]="LastTypeNode",e[e.FirstPunctuation=18]="FirstPunctuation",e[e.LastPunctuation=77]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=156]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=8]="FirstLiteralToken",e[e.LastLiteralToken=14]="LastLiteralToken",e[e.FirstTemplateToken=14]="FirstTemplateToken",e[e.LastTemplateToken=17]="LastTemplateToken",e[e.FirstBinaryOperator=29]="FirstBinaryOperator",e[e.LastBinaryOperator=77]="LastBinaryOperator",e[e.FirstStatement=232]="FirstStatement",e[e.LastStatement=248]="LastStatement",e[e.FirstNode=157]="FirstNode",e[e.FirstJSDocNode=301]="FirstJSDocNode",e[e.LastJSDocNode=333]="LastJSDocNode",e[e.FirstJSDocTagNode=314]="FirstJSDocTagNode",e[e.LastJSDocTagNode=333]="LastJSDocTagNode",e[e.FirstContextualKeyword=125]="FirstContextualKeyword",e[e.LastContextualKeyword=156]="LastContextualKeyword"}(e.SyntaxKind||(e.SyntaxKind={})),function(e){e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.NestedNamespace=4]="NestedNamespace",e[e.Synthesized=8]="Synthesized",e[e.Namespace=16]="Namespace",e[e.OptionalChain=32]="OptionalChain",e[e.ExportContext=64]="ExportContext",e[e.ContainsThis=128]="ContainsThis",e[e.HasImplicitReturn=256]="HasImplicitReturn",e[e.HasExplicitReturn=512]="HasExplicitReturn",e[e.GlobalAugmentation=1024]="GlobalAugmentation",e[e.HasAsyncFunctions=2048]="HasAsyncFunctions",e[e.DisallowInContext=4096]="DisallowInContext",e[e.YieldContext=8192]="YieldContext",e[e.DecoratorContext=16384]="DecoratorContext",e[e.AwaitContext=32768]="AwaitContext",e[e.ThisNodeHasError=65536]="ThisNodeHasError",e[e.JavaScriptFile=131072]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=262144]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=524288]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=1048576]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=2097152]="PossiblyContainsImportMeta",e[e.JSDoc=4194304]="JSDoc",e[e.Ambient=8388608]="Ambient",e[e.InWithStatement=16777216]="InWithStatement",e[e.JsonFile=33554432]="JsonFile",e[e.TypeCached=67108864]="TypeCached",e[e.Deprecated=134217728]="Deprecated",e[e.BlockScoped=3]="BlockScoped",e[e.ReachabilityCheckFlags=768]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=2816]="ReachabilityAndEmitFlags",e[e.ContextFlags=25358336]="ContextFlags",e[e.TypeExcludesFlags=40960]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=3145728]="PermanentlySetIncrementalFlags"}(e.NodeFlags||(e.NodeFlags={})),function(e){e[e.None=0]="None",e[e.Export=1]="Export",e[e.Ambient=2]="Ambient",e[e.Public=4]="Public",e[e.Private=8]="Private",e[e.Protected=16]="Protected",e[e.Static=32]="Static",e[e.Readonly=64]="Readonly",e[e.Abstract=128]="Abstract",e[e.Async=256]="Async",e[e.Default=512]="Default",e[e.Const=2048]="Const",e[e.HasComputedJSDocModifiers=4096]="HasComputedJSDocModifiers",e[e.Deprecated=8192]="Deprecated",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=28]="AccessibilityModifier",e[e.ParameterPropertyModifier=92]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=24]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=2270]="TypeScriptModifier",e[e.ExportDefault=513]="ExportDefault",e[e.All=11263]="All"}(e.ModifierFlags||(e.ModifierFlags={})),function(e){e[e.None=0]="None",e[e.IntrinsicNamedElement=1]="IntrinsicNamedElement",e[e.IntrinsicIndexedElement=2]="IntrinsicIndexedElement",e[e.IntrinsicElement=3]="IntrinsicElement"}(e.JsxFlags||(e.JsxFlags={})),function(e){e[e.Succeeded=1]="Succeeded",e[e.Failed=2]="Failed",e[e.Reported=4]="Reported",e[e.ReportsUnmeasurable=8]="ReportsUnmeasurable",e[e.ReportsUnreliable=16]="ReportsUnreliable",e[e.ReportsMask=24]="ReportsMask"}(e.RelationComparisonResult||(e.RelationComparisonResult={})),function(e){e[e.None=0]="None",e[e.Auto=1]="Auto",e[e.Loop=2]="Loop",e[e.Unique=3]="Unique",e[e.Node=4]="Node",e[e.KindMask=7]="KindMask",e[e.ReservedInNestedScopes=8]="ReservedInNestedScopes",e[e.Optimistic=16]="Optimistic",e[e.FileLevel=32]="FileLevel",e[e.AllowNameSubstitution=64]="AllowNameSubstitution"}(e.GeneratedIdentifierFlags||(e.GeneratedIdentifierFlags={})),function(e){e[e.None=0]="None",e[e.PrecedingLineBreak=1]="PrecedingLineBreak",e[e.PrecedingJSDocComment=2]="PrecedingJSDocComment",e[e.Unterminated=4]="Unterminated",e[e.ExtendedUnicodeEscape=8]="ExtendedUnicodeEscape",e[e.Scientific=16]="Scientific",e[e.Octal=32]="Octal",e[e.HexSpecifier=64]="HexSpecifier",e[e.BinarySpecifier=128]="BinarySpecifier",e[e.OctalSpecifier=256]="OctalSpecifier",e[e.ContainsSeparator=512]="ContainsSeparator",e[e.UnicodeEscape=1024]="UnicodeEscape",e[e.ContainsInvalidEscape=2048]="ContainsInvalidEscape",e[e.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",e[e.NumericLiteralFlags=1008]="NumericLiteralFlags",e[e.TemplateLiteralLikeFlags=2048]="TemplateLiteralLikeFlags"}(e.TokenFlags||(e.TokenFlags={})),function(e){e[e.Unreachable=1]="Unreachable",e[e.Start=2]="Start",e[e.BranchLabel=4]="BranchLabel",e[e.LoopLabel=8]="LoopLabel",e[e.Assignment=16]="Assignment",e[e.TrueCondition=32]="TrueCondition",e[e.FalseCondition=64]="FalseCondition",e[e.SwitchClause=128]="SwitchClause",e[e.ArrayMutation=256]="ArrayMutation",e[e.Call=512]="Call",e[e.ReduceLabel=1024]="ReduceLabel",e[e.Referenced=2048]="Referenced",e[e.Shared=4096]="Shared",e[e.Label=12]="Label",e[e.Condition=96]="Condition"}(e.FlowFlags||(e.FlowFlags={})),function(e){e[e.ExpectError=0]="ExpectError",e[e.Ignore=1]="Ignore"}(e.CommentDirectiveType||(e.CommentDirectiveType={}));var t,n=function(){};e.OperationCanceledException=n,function(e){e[e.Import=0]="Import",e[e.ReferenceFile=1]="ReferenceFile",e[e.TypeReferenceDirective=2]="TypeReferenceDirective"}(e.RefFileKind||(e.RefFileKind={})),function(e){e[e.Not=0]="Not",e[e.SafeModules=1]="SafeModules",e[e.Completely=2]="Completely"}(e.StructureIsReused||(e.StructureIsReused={})),function(e){e[e.Success=0]="Success",e[e.DiagnosticsPresent_OutputsSkipped=1]="DiagnosticsPresent_OutputsSkipped",e[e.DiagnosticsPresent_OutputsGenerated=2]="DiagnosticsPresent_OutputsGenerated",e[e.InvalidProject_OutputsSkipped=3]="InvalidProject_OutputsSkipped",e[e.ProjectReferenceCycle_OutputsSkipped=4]="ProjectReferenceCycle_OutputsSkipped",e[e.ProjectReferenceCycle_OutputsSkupped=4]="ProjectReferenceCycle_OutputsSkupped"}(e.ExitStatus||(e.ExitStatus={})),function(e){e[e.None=0]="None",e[e.Literal=1]="Literal",e[e.Subtype=2]="Subtype"}(e.UnionReduction||(e.UnionReduction={})),function(e){e[e.None=0]="None",e[e.Signature=1]="Signature",e[e.NoConstraints=2]="NoConstraints",e[e.Completions=4]="Completions",e[e.SkipBindingPatterns=8]="SkipBindingPatterns"}(e.ContextFlags||(e.ContextFlags={})),function(e){e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.ForbidIndexedAccessSymbolReferences=16]="ForbidIndexedAccessSymbolReferences",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.UseOnlyExternalAliasing=128]="UseOnlyExternalAliasing",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.WriteTypeParametersInQualifiedName=512]="WriteTypeParametersInQualifiedName",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",e[e.NoTypeReduction=536870912]="NoTypeReduction",e[e.NoUndefinedOptionalParameterType=1073741824]="NoUndefinedOptionalParameterType",e[e.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",e[e.AllowQualifedNameInPlaceOfIdentifier=65536]="AllowQualifedNameInPlaceOfIdentifier",e[e.AllowAnonymousIdentifier=131072]="AllowAnonymousIdentifier",e[e.AllowEmptyUnionOrIntersection=262144]="AllowEmptyUnionOrIntersection",e[e.AllowEmptyTuple=524288]="AllowEmptyTuple",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AllowEmptyIndexInfoType=2097152]="AllowEmptyIndexInfoType",e[e.AllowNodeModulesRelativePaths=67108864]="AllowNodeModulesRelativePaths",e[e.DoNotIncludeSymbolChain=134217728]="DoNotIncludeSymbolChain",e[e.IgnoreErrors=70221824]="IgnoreErrors",e[e.InObjectTypeLiteral=4194304]="InObjectTypeLiteral",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.InInitialEntityName=16777216]="InInitialEntityName",e[e.InReverseMappedType=33554432]="InReverseMappedType"}(e.NodeBuilderFlags||(e.NodeBuilderFlags={})),function(e){e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",e[e.NoTypeReduction=536870912]="NoTypeReduction",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AddUndefined=131072]="AddUndefined",e[e.WriteArrowStyleSignature=262144]="WriteArrowStyleSignature",e[e.InArrayType=524288]="InArrayType",e[e.InElementType=2097152]="InElementType",e[e.InFirstTypeArgument=4194304]="InFirstTypeArgument",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.WriteOwnNameForAnyLike=0]="WriteOwnNameForAnyLike",e[e.NodeBuilderFlagsMask=814775659]="NodeBuilderFlagsMask"}(e.TypeFormatFlags||(e.TypeFormatFlags={})),function(e){e[e.None=0]="None",e[e.WriteTypeParametersOrArguments=1]="WriteTypeParametersOrArguments",e[e.UseOnlyExternalAliasing=2]="UseOnlyExternalAliasing",e[e.AllowAnyNodeKind=4]="AllowAnyNodeKind",e[e.UseAliasDefinedOutsideCurrentScope=8]="UseAliasDefinedOutsideCurrentScope",e[e.DoNotIncludeSymbolChain=16]="DoNotIncludeSymbolChain"}(e.SymbolFormatFlags||(e.SymbolFormatFlags={})),function(e){e[e.Accessible=0]="Accessible",e[e.NotAccessible=1]="NotAccessible",e[e.CannotBeNamed=2]="CannotBeNamed"}(e.SymbolAccessibility||(e.SymbolAccessibility={})),function(e){e[e.UnionOrIntersection=0]="UnionOrIntersection",e[e.Spread=1]="Spread"}(e.SyntheticSymbolKind||(e.SyntheticSymbolKind={})),function(e){e[e.This=0]="This",e[e.Identifier=1]="Identifier",e[e.AssertsThis=2]="AssertsThis",e[e.AssertsIdentifier=3]="AssertsIdentifier"}(e.TypePredicateKind||(e.TypePredicateKind={})),function(e){e[e.Unknown=0]="Unknown",e[e.TypeWithConstructSignatureAndValue=1]="TypeWithConstructSignatureAndValue",e[e.VoidNullableOrNeverType=2]="VoidNullableOrNeverType",e[e.NumberLikeType=3]="NumberLikeType",e[e.BigIntLikeType=4]="BigIntLikeType",e[e.StringLikeType=5]="StringLikeType",e[e.BooleanType=6]="BooleanType",e[e.ArrayLikeType=7]="ArrayLikeType",e[e.ESSymbolType=8]="ESSymbolType",e[e.Promise=9]="Promise",e[e.TypeWithCallSignature=10]="TypeWithCallSignature",e[e.ObjectType=11]="ObjectType"}(e.TypeReferenceSerializationKind||(e.TypeReferenceSerializationKind={})),function(e){e[e.None=0]="None",e[e.FunctionScopedVariable=1]="FunctionScopedVariable",e[e.BlockScopedVariable=2]="BlockScopedVariable",e[e.Property=4]="Property",e[e.EnumMember=8]="EnumMember",e[e.Function=16]="Function",e[e.Class=32]="Class",e[e.Interface=64]="Interface",e[e.ConstEnum=128]="ConstEnum",e[e.RegularEnum=256]="RegularEnum",e[e.ValueModule=512]="ValueModule",e[e.NamespaceModule=1024]="NamespaceModule",e[e.TypeLiteral=2048]="TypeLiteral",e[e.ObjectLiteral=4096]="ObjectLiteral",e[e.Method=8192]="Method",e[e.Constructor=16384]="Constructor",e[e.GetAccessor=32768]="GetAccessor",e[e.SetAccessor=65536]="SetAccessor",e[e.Signature=131072]="Signature",e[e.TypeParameter=262144]="TypeParameter",e[e.TypeAlias=524288]="TypeAlias",e[e.ExportValue=1048576]="ExportValue",e[e.Alias=2097152]="Alias",e[e.Prototype=4194304]="Prototype",e[e.ExportStar=8388608]="ExportStar",e[e.Optional=16777216]="Optional",e[e.Transient=33554432]="Transient",e[e.Assignment=67108864]="Assignment",e[e.ModuleExports=134217728]="ModuleExports",e[e.All=67108863]="All",e[e.Enum=384]="Enum",e[e.Variable=3]="Variable",e[e.Value=111551]="Value",e[e.Type=788968]="Type",e[e.Namespace=1920]="Namespace",e[e.Module=1536]="Module",e[e.Accessor=98304]="Accessor",e[e.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",e[e.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",e[e.ParameterExcludes=111551]="ParameterExcludes",e[e.PropertyExcludes=0]="PropertyExcludes",e[e.EnumMemberExcludes=900095]="EnumMemberExcludes",e[e.FunctionExcludes=110991]="FunctionExcludes",e[e.ClassExcludes=899503]="ClassExcludes",e[e.InterfaceExcludes=788872]="InterfaceExcludes",e[e.RegularEnumExcludes=899327]="RegularEnumExcludes",e[e.ConstEnumExcludes=899967]="ConstEnumExcludes",e[e.ValueModuleExcludes=110735]="ValueModuleExcludes",e[e.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",e[e.MethodExcludes=103359]="MethodExcludes",e[e.GetAccessorExcludes=46015]="GetAccessorExcludes",e[e.SetAccessorExcludes=78783]="SetAccessorExcludes",e[e.TypeParameterExcludes=526824]="TypeParameterExcludes",e[e.TypeAliasExcludes=788968]="TypeAliasExcludes",e[e.AliasExcludes=2097152]="AliasExcludes",e[e.ModuleMember=2623475]="ModuleMember",e[e.ExportHasLocal=944]="ExportHasLocal",e[e.BlockScoped=418]="BlockScoped",e[e.PropertyOrAccessor=98308]="PropertyOrAccessor",e[e.ClassMember=106500]="ClassMember",e[e.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",e[e.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",e[e.Classifiable=2885600]="Classifiable",e[e.LateBindingContainer=6256]="LateBindingContainer"}(e.SymbolFlags||(e.SymbolFlags={})),function(e){e[e.Numeric=0]="Numeric",e[e.Literal=1]="Literal"}(e.EnumKind||(e.EnumKind={})),function(e){e[e.Instantiated=1]="Instantiated",e[e.SyntheticProperty=2]="SyntheticProperty",e[e.SyntheticMethod=4]="SyntheticMethod",e[e.Readonly=8]="Readonly",e[e.ReadPartial=16]="ReadPartial",e[e.WritePartial=32]="WritePartial",e[e.HasNonUniformType=64]="HasNonUniformType",e[e.HasLiteralType=128]="HasLiteralType",e[e.ContainsPublic=256]="ContainsPublic",e[e.ContainsProtected=512]="ContainsProtected",e[e.ContainsPrivate=1024]="ContainsPrivate",e[e.ContainsStatic=2048]="ContainsStatic",e[e.Late=4096]="Late",e[e.ReverseMapped=8192]="ReverseMapped",e[e.OptionalParameter=16384]="OptionalParameter",e[e.RestParameter=32768]="RestParameter",e[e.DeferredType=65536]="DeferredType",e[e.HasNeverType=131072]="HasNeverType",e[e.Mapped=262144]="Mapped",e[e.StripOptional=524288]="StripOptional",e[e.Synthetic=6]="Synthetic",e[e.Discriminant=192]="Discriminant",e[e.Partial=48]="Partial"}(e.CheckFlags||(e.CheckFlags={})),function(e){e.Call="__call",e.Constructor="__constructor",e.New="__new",e.Index="__index",e.ExportStar="__export",e.Global="__global",e.Missing="__missing",e.Type="__type",e.Object="__object",e.JSXAttributes="__jsxAttributes",e.Class="__class",e.Function="__function",e.Computed="__computed",e.Resolving="__resolving__",e.ExportEquals="export=",e.Default="default",e.This="this"}(e.InternalSymbolName||(e.InternalSymbolName={})),function(e){e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=256]="SuperInstance",e[e.SuperStatic=512]="SuperStatic",e[e.ContextChecked=1024]="ContextChecked",e[e.AsyncMethodWithSuper=2048]="AsyncMethodWithSuper",e[e.AsyncMethodWithSuperBinding=4096]="AsyncMethodWithSuperBinding",e[e.CaptureArguments=8192]="CaptureArguments",e[e.EnumValuesComputed=16384]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=32768]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=65536]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=131072]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=262144]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=524288]="BlockScopedBindingInLoop",e[e.ClassWithBodyScopedClassBinding=1048576]="ClassWithBodyScopedClassBinding",e[e.BodyScopedClassBinding=2097152]="BodyScopedClassBinding",e[e.NeedsLoopOutParameter=4194304]="NeedsLoopOutParameter",e[e.AssignmentsMarked=8388608]="AssignmentsMarked",e[e.ClassWithConstructorReference=16777216]="ClassWithConstructorReference",e[e.ConstructorReferenceInClass=33554432]="ConstructorReferenceInClass",e[e.ContainsClassWithPrivateIdentifiers=67108864]="ContainsClassWithPrivateIdentifiers"}(e.NodeCheckFlags||(e.NodeCheckFlags={})),function(e){e[e.Any=1]="Any",e[e.Unknown=2]="Unknown",e[e.String=4]="String",e[e.Number=8]="Number",e[e.Boolean=16]="Boolean",e[e.Enum=32]="Enum",e[e.BigInt=64]="BigInt",e[e.StringLiteral=128]="StringLiteral",e[e.NumberLiteral=256]="NumberLiteral",e[e.BooleanLiteral=512]="BooleanLiteral",e[e.EnumLiteral=1024]="EnumLiteral",e[e.BigIntLiteral=2048]="BigIntLiteral",e[e.ESSymbol=4096]="ESSymbol",e[e.UniqueESSymbol=8192]="UniqueESSymbol",e[e.Void=16384]="Void",e[e.Undefined=32768]="Undefined",e[e.Null=65536]="Null",e[e.Never=131072]="Never",e[e.TypeParameter=262144]="TypeParameter",e[e.Object=524288]="Object",e[e.Union=1048576]="Union",e[e.Intersection=2097152]="Intersection",e[e.Index=4194304]="Index",e[e.IndexedAccess=8388608]="IndexedAccess",e[e.Conditional=16777216]="Conditional",e[e.Substitution=33554432]="Substitution",e[e.NonPrimitive=67108864]="NonPrimitive",e[e.TemplateLiteral=134217728]="TemplateLiteral",e[e.StringMapping=268435456]="StringMapping",e[e.AnyOrUnknown=3]="AnyOrUnknown",e[e.Nullable=98304]="Nullable",e[e.Literal=2944]="Literal",e[e.Unit=109440]="Unit",e[e.StringOrNumberLiteral=384]="StringOrNumberLiteral",e[e.StringOrNumberLiteralOrUnique=8576]="StringOrNumberLiteralOrUnique",e[e.DefinitelyFalsy=117632]="DefinitelyFalsy",e[e.PossiblyFalsy=117724]="PossiblyFalsy",e[e.Intrinsic=67359327]="Intrinsic",e[e.Primitive=131068]="Primitive",e[e.StringLike=402653316]="StringLike",e[e.NumberLike=296]="NumberLike",e[e.BigIntLike=2112]="BigIntLike",e[e.BooleanLike=528]="BooleanLike",e[e.EnumLike=1056]="EnumLike",e[e.ESSymbolLike=12288]="ESSymbolLike",e[e.VoidLike=49152]="VoidLike",e[e.DisjointDomains=469892092]="DisjointDomains",e[e.UnionOrIntersection=3145728]="UnionOrIntersection",e[e.StructuredType=3670016]="StructuredType",e[e.TypeVariable=8650752]="TypeVariable",e[e.InstantiableNonPrimitive=58982400]="InstantiableNonPrimitive",e[e.InstantiablePrimitive=406847488]="InstantiablePrimitive",e[e.Instantiable=465829888]="Instantiable",e[e.StructuredOrInstantiable=469499904]="StructuredOrInstantiable",e[e.ObjectFlagsType=3899393]="ObjectFlagsType",e[e.Simplifiable=25165824]="Simplifiable",e[e.Substructure=469237760]="Substructure",e[e.Narrowable=536624127]="Narrowable",e[e.NotPrimitiveUnion=469647395]="NotPrimitiveUnion",e[e.IncludesMask=205258751]="IncludesMask",e[e.IncludesStructuredOrInstantiable=262144]="IncludesStructuredOrInstantiable",e[e.IncludesNonWideningType=4194304]="IncludesNonWideningType",e[e.IncludesWildcard=8388608]="IncludesWildcard",e[e.IncludesEmptyObject=16777216]="IncludesEmptyObject"}(e.TypeFlags||(e.TypeFlags={})),function(e){e[e.Class=1]="Class",e[e.Interface=2]="Interface",e[e.Reference=4]="Reference",e[e.Tuple=8]="Tuple",e[e.Anonymous=16]="Anonymous",e[e.Mapped=32]="Mapped",e[e.Instantiated=64]="Instantiated",e[e.ObjectLiteral=128]="ObjectLiteral",e[e.EvolvingArray=256]="EvolvingArray",e[e.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",e[e.ContainsSpread=1024]="ContainsSpread",e[e.ReverseMapped=2048]="ReverseMapped",e[e.JsxAttributes=4096]="JsxAttributes",e[e.MarkerType=8192]="MarkerType",e[e.JSLiteral=16384]="JSLiteral",e[e.FreshLiteral=32768]="FreshLiteral",e[e.ArrayLiteral=65536]="ArrayLiteral",e[e.ObjectRestType=131072]="ObjectRestType",e[e.PrimitiveUnion=262144]="PrimitiveUnion",e[e.ContainsWideningType=524288]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=1048576]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=2097152]="NonInferrableType",e[e.IsGenericObjectTypeComputed=4194304]="IsGenericObjectTypeComputed",e[e.IsGenericObjectType=8388608]="IsGenericObjectType",e[e.IsGenericIndexTypeComputed=16777216]="IsGenericIndexTypeComputed",e[e.IsGenericIndexType=33554432]="IsGenericIndexType",e[e.CouldContainTypeVariablesComputed=67108864]="CouldContainTypeVariablesComputed",e[e.CouldContainTypeVariables=134217728]="CouldContainTypeVariables",e[e.ContainsIntersections=268435456]="ContainsIntersections",e[e.IsNeverIntersectionComputed=268435456]="IsNeverIntersectionComputed",e[e.IsNeverIntersection=536870912]="IsNeverIntersection",e[e.IsClassInstanceClone=1073741824]="IsClassInstanceClone",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=1572864]="RequiresWidening",e[e.PropagatingFlags=3670016]="PropagatingFlags",e[e.ObjectTypeKindMask=2367]="ObjectTypeKindMask"}(e.ObjectFlags||(e.ObjectFlags={})),function(e){e[e.Invariant=0]="Invariant",e[e.Covariant=1]="Covariant",e[e.Contravariant=2]="Contravariant",e[e.Bivariant=3]="Bivariant",e[e.Independent=4]="Independent",e[e.VarianceMask=7]="VarianceMask",e[e.Unmeasurable=8]="Unmeasurable",e[e.Unreliable=16]="Unreliable",e[e.AllowsStructuralFallback=24]="AllowsStructuralFallback"}(e.VarianceFlags||(e.VarianceFlags={})),function(e){e[e.Required=1]="Required",e[e.Optional=2]="Optional",e[e.Rest=4]="Rest",e[e.Variadic=8]="Variadic",e[e.Variable=12]="Variable"}(e.ElementFlags||(e.ElementFlags={})),function(e){e[e.Component=0]="Component",e[e.Function=1]="Function",e[e.Mixed=2]="Mixed"}(e.JsxReferenceKind||(e.JsxReferenceKind={})),function(e){e[e.Call=0]="Call",e[e.Construct=1]="Construct"}(e.SignatureKind||(e.SignatureKind={})),function(e){e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.IsInnerCallChain=4]="IsInnerCallChain",e[e.IsOuterCallChain=8]="IsOuterCallChain",e[e.IsUntypedSignatureInJSFile=16]="IsUntypedSignatureInJSFile",e[e.PropagatingFlags=19]="PropagatingFlags",e[e.CallChainFlags=12]="CallChainFlags"}(e.SignatureFlags||(e.SignatureFlags={})),function(e){e[e.String=0]="String",e[e.Number=1]="Number"}(e.IndexKind||(e.IndexKind={})),function(e){e[e.Simple=0]="Simple",e[e.Array=1]="Array",e[e.Function=2]="Function",e[e.Composite=3]="Composite",e[e.Merged=4]="Merged"}(e.TypeMapKind||(e.TypeMapKind={})),function(e){e[e.NakedTypeVariable=1]="NakedTypeVariable",e[e.SpeculativeTuple=2]="SpeculativeTuple",e[e.HomomorphicMappedType=4]="HomomorphicMappedType",e[e.PartialHomomorphicMappedType=8]="PartialHomomorphicMappedType",e[e.MappedTypeConstraint=16]="MappedTypeConstraint",e[e.ContravariantConditional=32]="ContravariantConditional",e[e.ReturnType=64]="ReturnType",e[e.LiteralKeyof=128]="LiteralKeyof",e[e.NoConstraints=256]="NoConstraints",e[e.AlwaysStrict=512]="AlwaysStrict",e[e.MaxValue=1024]="MaxValue",e[e.PriorityImpliesCombination=208]="PriorityImpliesCombination",e[e.Circularity=-1]="Circularity"}(e.InferencePriority||(e.InferencePriority={})),function(e){e[e.None=0]="None",e[e.NoDefault=1]="NoDefault",e[e.AnyDefault=2]="AnyDefault",e[e.SkippedGenericFunction=4]="SkippedGenericFunction"}(e.InferenceFlags||(e.InferenceFlags={})),function(e){e[e.False=0]="False",e[e.Unknown=1]="Unknown",e[e.Maybe=3]="Maybe",e[e.True=-1]="True"}(e.Ternary||(e.Ternary={})),function(e){e[e.None=0]="None",e[e.ExportsProperty=1]="ExportsProperty",e[e.ModuleExports=2]="ModuleExports",e[e.PrototypeProperty=3]="PrototypeProperty",e[e.ThisProperty=4]="ThisProperty",e[e.Property=5]="Property",e[e.Prototype=6]="Prototype",e[e.ObjectDefinePropertyValue=7]="ObjectDefinePropertyValue",e[e.ObjectDefinePropertyExports=8]="ObjectDefinePropertyExports",e[e.ObjectDefinePrototypeProperty=9]="ObjectDefinePrototypeProperty"}(e.AssignmentDeclarationKind||(e.AssignmentDeclarationKind={})),function(e){e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message"}(t=e.DiagnosticCategory||(e.DiagnosticCategory={})),e.diagnosticCategoryName=function(e,n){void 0===n&&(n=!0);var r=t[e.category];return n?r.toLowerCase():r},function(e){e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs"}(e.ModuleResolutionKind||(e.ModuleResolutionKind={})),function(e){e[e.FixedPollingInterval=0]="FixedPollingInterval",e[e.PriorityPollingInterval=1]="PriorityPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.UseFsEvents=3]="UseFsEvents",e[e.UseFsEventsOnParentDirectory=4]="UseFsEventsOnParentDirectory"}(e.WatchFileKind||(e.WatchFileKind={})),function(e){e[e.UseFsEvents=0]="UseFsEvents",e[e.FixedPollingInterval=1]="FixedPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling"}(e.WatchDirectoryKind||(e.WatchDirectoryKind={})),function(e){e[e.FixedInterval=0]="FixedInterval",e[e.PriorityInterval=1]="PriorityInterval",e[e.DynamicPriority=2]="DynamicPriority"}(e.PollingWatchKind||(e.PollingWatchKind={})),function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ES2020=6]="ES2020",e[e.ESNext=99]="ESNext"}(e.ModuleKind||(e.ModuleKind={})),function(e){e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev"}(e.JsxEmit||(e.JsxEmit={})),function(e){e[e.Remove=0]="Remove",e[e.Preserve=1]="Preserve",e[e.Error=2]="Error"}(e.ImportsNotUsedAsValues||(e.ImportsNotUsedAsValues={})),function(e){e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed"}(e.NewLineKind||(e.NewLineKind={})),function(e){e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX",e[e.External=5]="External",e[e.JSON=6]="JSON",e[e.Deferred=7]="Deferred"}(e.ScriptKind||(e.ScriptKind={})),function(e){e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest"}(e.ScriptTarget||(e.ScriptTarget={})),function(e){e[e.Standard=0]="Standard",e[e.JSX=1]="JSX"}(e.LanguageVariant||(e.LanguageVariant={})),function(e){e[e.None=0]="None",e[e.Recursive=1]="Recursive"}(e.WatchDirectoryFlags||(e.WatchDirectoryFlags={})),function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.backtick=96]="backtick",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.hash=35]="hash",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(e.CharacterCodes||(e.CharacterCodes={})),function(e){e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo"}(e.Extension||(e.Extension={})),function(e){e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2020=8]="ContainsES2020",e[e.ContainsES2019=16]="ContainsES2019",e[e.ContainsES2018=32]="ContainsES2018",e[e.ContainsES2017=64]="ContainsES2017",e[e.ContainsES2016=128]="ContainsES2016",e[e.ContainsES2015=256]="ContainsES2015",e[e.ContainsGenerator=512]="ContainsGenerator",e[e.ContainsDestructuringAssignment=1024]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=2048]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=4096]="ContainsLexicalThis",e[e.ContainsRestOrSpread=8192]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=16384]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=32768]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=65536]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=131072]="ContainsBindingPattern",e[e.ContainsYield=262144]="ContainsYield",e[e.ContainsAwait=524288]="ContainsAwait",e[e.ContainsHoistedDeclarationOrCompletion=1048576]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=2097152]="ContainsDynamicImport",e[e.ContainsClassFields=4194304]="ContainsClassFields",e[e.ContainsPossibleTopLevelAwait=8388608]="ContainsPossibleTopLevelAwait",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2020=8]="AssertES2020",e[e.AssertES2019=16]="AssertES2019",e[e.AssertES2018=32]="AssertES2018",e[e.AssertES2017=64]="AssertES2017",e[e.AssertES2016=128]="AssertES2016",e[e.AssertES2015=256]="AssertES2015",e[e.AssertGenerator=512]="AssertGenerator",e[e.AssertDestructuringAssignment=1024]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=536870912]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=536870912]="PropertyAccessExcludes",e[e.NodeExcludes=536870912]="NodeExcludes",e[e.ArrowFunctionExcludes=547309568]="ArrowFunctionExcludes",e[e.FunctionExcludes=547313664]="FunctionExcludes",e[e.ConstructorExcludes=547311616]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=538923008]="MethodOrAccessorExcludes",e[e.PropertyExcludes=536875008]="PropertyExcludes",e[e.ClassExcludes=536905728]="ClassExcludes",e[e.ModuleExcludes=546379776]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=536922112]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=536879104]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=537018368]="VariableDeclarationListExcludes",e[e.ParameterExcludes=536870912]="ParameterExcludes",e[e.CatchClauseExcludes=536887296]="CatchClauseExcludes",e[e.BindingPatternExcludes=536879104]="BindingPatternExcludes",e[e.PropertyNamePropagatingFlags=4096]="PropertyNamePropagatingFlags"}(e.TransformFlags||(e.TransformFlags={})),function(e){e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.AdviseOnEmitNode=2]="AdviseOnEmitNode",e[e.NoSubstitution=4]="NoSubstitution",e[e.CapturesThis=8]="CapturesThis",e[e.NoLeadingSourceMap=16]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=32]="NoTrailingSourceMap",e[e.NoSourceMap=48]="NoSourceMap",e[e.NoNestedSourceMaps=64]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=128]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=256]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=384]="NoTokenSourceMaps",e[e.NoLeadingComments=512]="NoLeadingComments",e[e.NoTrailingComments=1024]="NoTrailingComments",e[e.NoComments=1536]="NoComments",e[e.NoNestedComments=2048]="NoNestedComments",e[e.HelperName=4096]="HelperName",e[e.ExportName=8192]="ExportName",e[e.LocalName=16384]="LocalName",e[e.InternalName=32768]="InternalName",e[e.Indented=65536]="Indented",e[e.NoIndentation=131072]="NoIndentation",e[e.AsyncFunctionBody=262144]="AsyncFunctionBody",e[e.ReuseTempVariableScope=524288]="ReuseTempVariableScope",e[e.CustomPrologue=1048576]="CustomPrologue",e[e.NoHoisting=2097152]="NoHoisting",e[e.HasEndOfDeclarationMarker=4194304]="HasEndOfDeclarationMarker",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e[e.TypeScriptClassWrapper=33554432]="TypeScriptClassWrapper",e[e.NeverApplyImportHelper=67108864]="NeverApplyImportHelper",e[e.IgnoreSourceNewlines=134217728]="IgnoreSourceNewlines"}(e.EmitFlags||(e.EmitFlags={})),function(e){e[e.Extends=1]="Extends",e[e.Assign=2]="Assign",e[e.Rest=4]="Rest",e[e.Decorate=8]="Decorate",e[e.Metadata=16]="Metadata",e[e.Param=32]="Param",e[e.Awaiter=64]="Awaiter",e[e.Generator=128]="Generator",e[e.Values=256]="Values",e[e.Read=512]="Read",e[e.Spread=1024]="Spread",e[e.SpreadArrays=2048]="SpreadArrays",e[e.Await=4096]="Await",e[e.AsyncGenerator=8192]="AsyncGenerator",e[e.AsyncDelegator=16384]="AsyncDelegator",e[e.AsyncValues=32768]="AsyncValues",e[e.ExportStar=65536]="ExportStar",e[e.ImportStar=131072]="ImportStar",e[e.ImportDefault=262144]="ImportDefault",e[e.MakeTemplateObject=524288]="MakeTemplateObject",e[e.ClassPrivateFieldGet=1048576]="ClassPrivateFieldGet",e[e.ClassPrivateFieldSet=2097152]="ClassPrivateFieldSet",e[e.CreateBinding=4194304]="CreateBinding",e[e.FirstEmitHelper=1]="FirstEmitHelper",e[e.LastEmitHelper=4194304]="LastEmitHelper",e[e.ForOfIncludes=256]="ForOfIncludes",e[e.ForAwaitOfIncludes=32768]="ForAwaitOfIncludes",e[e.AsyncGeneratorIncludes=12288]="AsyncGeneratorIncludes",e[e.AsyncDelegatorIncludes=53248]="AsyncDelegatorIncludes",e[e.SpreadIncludes=1536]="SpreadIncludes"}(e.ExternalEmitHelpers||(e.ExternalEmitHelpers={})),function(e){e[e.SourceFile=0]="SourceFile",e[e.Expression=1]="Expression",e[e.IdentifierName=2]="IdentifierName",e[e.MappedTypeParameter=3]="MappedTypeParameter",e[e.Unspecified=4]="Unspecified",e[e.EmbeddedStatement=5]="EmbeddedStatement",e[e.JsxAttributeValue=6]="JsxAttributeValue"}(e.EmitHint||(e.EmitHint={})),function(e){e[e.Parentheses=1]="Parentheses",e[e.TypeAssertions=2]="TypeAssertions",e[e.NonNullAssertions=4]="NonNullAssertions",e[e.PartiallyEmittedExpressions=8]="PartiallyEmittedExpressions",e[e.Assertions=6]="Assertions",e[e.All=15]="All"}(e.OuterExpressionKinds||(e.OuterExpressionKinds={})),function(e){e[e.None=0]="None",e[e.InParameters=1]="InParameters",e[e.VariablesHoistedInParameters=2]="VariablesHoistedInParameters"}(e.LexicalEnvironmentFlags||(e.LexicalEnvironmentFlags={})),function(e){e.Prologue="prologue",e.EmitHelpers="emitHelpers",e.NoDefaultLib="no-default-lib",e.Reference="reference",e.Type="type",e.Lib="lib",e.Prepend="prepend",e.Text="text",e.Internal="internal"}(e.BundleFileSectionKind||(e.BundleFileSectionKind={})),function(e){e[e.None=0]="None",e[e.SingleLine=0]="SingleLine",e[e.MultiLine=1]="MultiLine",e[e.PreserveLines=2]="PreserveLines",e[e.LinesMask=3]="LinesMask",e[e.NotDelimited=0]="NotDelimited",e[e.BarDelimited=4]="BarDelimited",e[e.AmpersandDelimited=8]="AmpersandDelimited",e[e.CommaDelimited=16]="CommaDelimited",e[e.AsteriskDelimited=32]="AsteriskDelimited",e[e.DelimitersMask=60]="DelimitersMask",e[e.AllowTrailingComma=64]="AllowTrailingComma",e[e.Indented=128]="Indented",e[e.SpaceBetweenBraces=256]="SpaceBetweenBraces",e[e.SpaceBetweenSiblings=512]="SpaceBetweenSiblings",e[e.Braces=1024]="Braces",e[e.Parenthesis=2048]="Parenthesis",e[e.AngleBrackets=4096]="AngleBrackets",e[e.SquareBrackets=8192]="SquareBrackets",e[e.BracketsMask=15360]="BracketsMask",e[e.OptionalIfUndefined=16384]="OptionalIfUndefined",e[e.OptionalIfEmpty=32768]="OptionalIfEmpty",e[e.Optional=49152]="Optional",e[e.PreferNewLine=65536]="PreferNewLine",e[e.NoTrailingNewLine=131072]="NoTrailingNewLine",e[e.NoInterveningComments=262144]="NoInterveningComments",e[e.NoSpaceIfEmpty=524288]="NoSpaceIfEmpty",e[e.SingleElement=1048576]="SingleElement",e[e.SpaceAfterList=2097152]="SpaceAfterList",e[e.Modifiers=262656]="Modifiers",e[e.HeritageClauses=512]="HeritageClauses",e[e.SingleLineTypeLiteralMembers=768]="SingleLineTypeLiteralMembers",e[e.MultiLineTypeLiteralMembers=32897]="MultiLineTypeLiteralMembers",e[e.SingleLineTupleTypeElements=528]="SingleLineTupleTypeElements",e[e.MultiLineTupleTypeElements=657]="MultiLineTupleTypeElements",e[e.UnionTypeConstituents=516]="UnionTypeConstituents",e[e.IntersectionTypeConstituents=520]="IntersectionTypeConstituents",e[e.ObjectBindingPatternElements=525136]="ObjectBindingPatternElements",e[e.ArrayBindingPatternElements=524880]="ArrayBindingPatternElements",e[e.ObjectLiteralExpressionProperties=526226]="ObjectLiteralExpressionProperties",e[e.ArrayLiteralExpressionElements=8914]="ArrayLiteralExpressionElements",e[e.CommaListElements=528]="CommaListElements",e[e.CallExpressionArguments=2576]="CallExpressionArguments",e[e.NewExpressionArguments=18960]="NewExpressionArguments",e[e.TemplateExpressionSpans=262144]="TemplateExpressionSpans",e[e.SingleLineBlockStatements=768]="SingleLineBlockStatements",e[e.MultiLineBlockStatements=129]="MultiLineBlockStatements",e[e.VariableDeclarationList=528]="VariableDeclarationList",e[e.SingleLineFunctionBodyStatements=768]="SingleLineFunctionBodyStatements",e[e.MultiLineFunctionBodyStatements=1]="MultiLineFunctionBodyStatements",e[e.ClassHeritageClauses=0]="ClassHeritageClauses",e[e.ClassMembers=129]="ClassMembers",e[e.InterfaceMembers=129]="InterfaceMembers",e[e.EnumMembers=145]="EnumMembers",e[e.CaseBlockClauses=129]="CaseBlockClauses",e[e.NamedImportsOrExportsElements=525136]="NamedImportsOrExportsElements",e[e.JsxElementOrFragmentChildren=262144]="JsxElementOrFragmentChildren",e[e.JsxElementAttributes=262656]="JsxElementAttributes",e[e.CaseOrDefaultClauseStatements=163969]="CaseOrDefaultClauseStatements",e[e.HeritageClauseTypes=528]="HeritageClauseTypes",e[e.SourceFileStatements=131073]="SourceFileStatements",e[e.Decorators=2146305]="Decorators",e[e.TypeArguments=53776]="TypeArguments",e[e.TypeParameters=53776]="TypeParameters",e[e.Parameters=2576]="Parameters",e[e.IndexSignatureParameters=8848]="IndexSignatureParameters",e[e.JSDocComment=33]="JSDocComment"}(e.ListFormat||(e.ListFormat={})),function(e){e[e.None=0]="None",e[e.TripleSlashXML=1]="TripleSlashXML",e[e.SingleLine=2]="SingleLine",e[e.MultiLine=4]="MultiLine",e[e.All=7]="All",e[e.Default=7]="Default"}(e.PragmaKindFlags||(e.PragmaKindFlags={})),e.commentPragmas={reference:{args:[{name:"types",optional:!0,captureSpan:!0},{name:"lib",optional:!0,captureSpan:!0},{name:"path",optional:!0,captureSpan:!0},{name:"no-default-lib",optional:!0}],kind:1},"amd-dependency":{args:[{name:"path"},{name:"name",optional:!0}],kind:1},"amd-module":{args:[{name:"name"}],kind:1},"ts-check":{kind:2},"ts-nocheck":{kind:2},jsx:{args:[{name:"factory"}],kind:4},jsxfrag:{args:[{name:"factory"}],kind:4},jsximportsource:{args:[{name:"factory"}],kind:4},jsxruntime:{args:[{name:"factory"}],kind:4}}}(u||(u={})),function(e){e.directorySeparator="/";var n=/\\/g;function r(e){return 47===e||92===e}function i(e){return l(e)>0}function a(e){return 0!==l(e)}function o(e){return/^\.\.?($|[\\/])/.test(e)}function s(t,n){return t.length>n.length&&e.endsWith(t,n)}function u(e){return e.length>0&&r(e.charCodeAt(e.length-1))}function c(e){return e>=97&&e<=122||e>=65&&e<=90}function l(t){if(!t)return 0;var n=t.charCodeAt(0);if(47===n||92===n){if(t.charCodeAt(1)!==n)return 1;var r=t.indexOf(47===n?e.directorySeparator:"\\",2);return r<0?t.length:r+1}if(c(n)&&58===t.charCodeAt(1)){var i=t.charCodeAt(2);if(47===i||92===i)return 3;if(2===t.length)return 2}var a=t.indexOf("://");if(-1!==a){var o=a+"://".length,s=t.indexOf(e.directorySeparator,o);if(-1!==s){var u=t.slice(0,a),l=t.slice(o,s);if("file"===u&&(""===l||"localhost"===l)&&c(t.charCodeAt(s+1))){var d=function(e,t){var n=e.charCodeAt(t);if(58===n)return t+1;if(37===n&&51===e.charCodeAt(t+1)){var r=e.charCodeAt(t+2);if(97===r||65===r)return t+3}return-1}(t,s+2);if(-1!==d){if(47===t.charCodeAt(d))return~(d+1);if(d===t.length)return~d}}return~(s+1)}return~t.length}return 0}function d(e){var t=l(e);return t<0?~t:t}function p(t){var n=d(t=v(t));return n===t.length?t:(t=x(t)).slice(0,Math.max(n,t.lastIndexOf(e.directorySeparator)))}function f(t,n,r){if(d(t=v(t))===t.length)return"";var i=(t=x(t)).slice(Math.max(d(t),t.lastIndexOf(e.directorySeparator)+1)),a=void 0!==n&&void 0!==r?g(i,n,r):void 0;return a?i.slice(0,i.length-a.length):i}function h(t,n,r){if(e.startsWith(n,".")||(n="."+n),t.length>=n.length&&46===t.charCodeAt(t.length-n.length)){var i=t.slice(t.length-n.length);if(r(i,n))return i}}function g(t,n,r){if(n)return function(e,t,n){if("string"==typeof t)return h(e,t,n)||"";for(var r=0,i=t;r=0?i.substring(a):""}function m(n,r){return void 0===r&&(r=""),function(n,r){var i=n.substring(0,r),a=n.substring(r).split(e.directorySeparator);return a.length&&!e.lastOrUndefined(a)&&a.pop(),t([i],a)}(n=b(r,n),d(n))}function _(t){return 0===t.length?"":(t[0]&&k(t[0]))+t.slice(1).join(e.directorySeparator)}function v(t){return t.replace(n,e.directorySeparator)}function y(t){if(!e.some(t))return[];for(var n=[t[0]],r=1;r1){if(".."!==n[n.length-1]){n.pop();continue}}else if(n[0])continue;n.push(i)}}return n}function b(e){for(var t=[],n=1;n0&&t===e.length},e.pathIsAbsolute=a,e.pathIsRelative=o,e.pathIsBareSpecifier=function(e){return!a(e)&&!o(e)},e.hasExtension=function(t){return e.stringContains(f(t),".")},e.fileExtensionIs=s,e.fileExtensionIsOneOf=function(e,t){for(var n=0,r=t;n0==d(n)>0,"Paths must either both be absolute or both be relative");var i="function"==typeof r?r:e.identity;return _(O(t,n,"boolean"==typeof r&&r?e.equateStringsCaseInsensitive:e.equateStringsCaseSensitive,i))}function I(t,n,r,a,o){var s=O(D(r,t),D(r,n),e.equateStringsCaseSensitive,a),u=s[0];if(o&&i(u)){var c=u.charAt(0)===e.directorySeparator?"file://":"file:///";s[0]=c+u}return _(s)}e.comparePathsCaseSensitive=function(t,n){return A(t,n,e.compareStringsCaseSensitive)},e.comparePathsCaseInsensitive=function(t,n){return A(t,n,e.compareStringsCaseInsensitive)},e.comparePaths=function(t,n,r,i){return"string"==typeof r?(t=b(r,t),n=b(r,n)):"boolean"==typeof r&&(i=r),A(t,n,e.getStringComparer(i))},e.containsPath=function(t,n,r,i){if("string"==typeof r?(t=b(r,t),n=b(r,n)):"boolean"==typeof r&&(i=r),void 0===t||void 0===n)return!1;if(t===n)return!0;var a=y(m(t)),o=y(m(n));if(o.length0;p(),s--){var l=t[a];if(l)if(l.isClosed)t[a]=void 0;else{c++;var d=f(l,y(l.fileName));l.isClosed?t[a]=void 0:d?(l.unchangedPolls=0,t!==r&&(t[a]=void 0,m(l))):l.unchangedPolls!==e.unchangedPollThresholds[n]?l.unchangedPolls++:t===r?(l.unchangedPolls=1,t[a]=void 0,g(l,i.Low)):n!==i.High&&(l.unchangedPolls++,t[a]=void 0,g(l,n===i.Low?i.Medium:i.High)),t[a]&&(u type. Did you mean to write 'Promise<{0}>'?"),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:t(1066,e.DiagnosticCategory.Error,"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066","In ambient enum declarations member initializer must be constant expression."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:t(1068,e.DiagnosticCategory.Error,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:t(1069,e.DiagnosticCategory.Error,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),_0_modifier_cannot_appear_on_a_type_member:t(1070,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:t(1071,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),A_0_modifier_cannot_be_used_with_an_import_declaration:t(1079,e.DiagnosticCategory.Error,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration."),Invalid_reference_directive_syntax:t(1084,e.DiagnosticCategory.Error,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0:t(1085,e.DiagnosticCategory.Error,"Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085","Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."),_0_modifier_cannot_appear_on_a_constructor_declaration:t(1089,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:t(1090,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:t(1091,e.DiagnosticCategory.Error,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement."),Type_parameters_cannot_appear_on_a_constructor_declaration:t(1092,e.DiagnosticCategory.Error,"Type_parameters_cannot_appear_on_a_constructor_declaration_1092","Type parameters cannot appear on a constructor declaration."),Type_annotation_cannot_appear_on_a_constructor_declaration:t(1093,e.DiagnosticCategory.Error,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:t(1094,e.DiagnosticCategory.Error,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:t(1095,e.DiagnosticCategory.Error,"A_set_accessor_cannot_have_a_return_type_annotation_1095","A 'set' accessor cannot have a return type annotation."),An_index_signature_must_have_exactly_one_parameter:t(1096,e.DiagnosticCategory.Error,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:t(1097,e.DiagnosticCategory.Error,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:t(1098,e.DiagnosticCategory.Error,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:t(1099,e.DiagnosticCategory.Error,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:t(1100,e.DiagnosticCategory.Error,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:t(1101,e.DiagnosticCategory.Error,"with_statements_are_not_allowed_in_strict_mode_1101","'with' statements are not allowed in strict mode."),delete_cannot_be_called_on_an_identifier_in_strict_mode:t(1102,e.DiagnosticCategory.Error,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator:t(1103,e.DiagnosticCategory.Error,"A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103","A 'for-await-of' statement is only allowed within an async function or async generator."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:t(1104,e.DiagnosticCategory.Error,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:t(1105,e.DiagnosticCategory.Error,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),Jump_target_cannot_cross_function_boundary:t(1107,e.DiagnosticCategory.Error,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:t(1108,e.DiagnosticCategory.Error,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Expression_expected:t(1109,e.DiagnosticCategory.Error,"Expression_expected_1109","Expression expected."),Type_expected:t(1110,e.DiagnosticCategory.Error,"Type_expected_1110","Type expected."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:t(1113,e.DiagnosticCategory.Error,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Duplicate_label_0:t(1114,e.DiagnosticCategory.Error,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:t(1115,e.DiagnosticCategory.Error,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:t(1116,e.DiagnosticCategory.Error,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode:t(1117,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117","An object literal cannot have multiple properties with the same name in strict mode."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:t(1118,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name."),An_object_literal_cannot_have_property_and_accessor_with_the_same_name:t(1119,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name."),An_export_assignment_cannot_have_modifiers:t(1120,e.DiagnosticCategory.Error,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_in_strict_mode:t(1121,e.DiagnosticCategory.Error,"Octal_literals_are_not_allowed_in_strict_mode_1121","Octal literals are not allowed in strict mode."),Variable_declaration_list_cannot_be_empty:t(1123,e.DiagnosticCategory.Error,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:t(1124,e.DiagnosticCategory.Error,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:t(1125,e.DiagnosticCategory.Error,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:t(1126,e.DiagnosticCategory.Error,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:t(1127,e.DiagnosticCategory.Error,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:t(1128,e.DiagnosticCategory.Error,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:t(1129,e.DiagnosticCategory.Error,"Statement_expected_1129","Statement expected."),case_or_default_expected:t(1130,e.DiagnosticCategory.Error,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:t(1131,e.DiagnosticCategory.Error,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:t(1132,e.DiagnosticCategory.Error,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:t(1134,e.DiagnosticCategory.Error,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:t(1135,e.DiagnosticCategory.Error,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:t(1136,e.DiagnosticCategory.Error,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:t(1137,e.DiagnosticCategory.Error,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:t(1138,e.DiagnosticCategory.Error,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:t(1139,e.DiagnosticCategory.Error,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:t(1140,e.DiagnosticCategory.Error,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:t(1141,e.DiagnosticCategory.Error,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:t(1142,e.DiagnosticCategory.Error,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:t(1144,e.DiagnosticCategory.Error,"or_expected_1144","'{' or ';' expected."),Declaration_expected:t(1146,e.DiagnosticCategory.Error,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:t(1147,e.DiagnosticCategory.Error,"Import_declarations_in_a_namespace_cannot_reference_a_module_1147","Import declarations in a namespace cannot reference a module."),Cannot_use_imports_exports_or_module_augmentations_when_module_is_none:t(1148,e.DiagnosticCategory.Error,"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148","Cannot use imports, exports, or module augmentations when '--module' is 'none'."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:t(1149,e.DiagnosticCategory.Error,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),const_declarations_must_be_initialized:t(1155,e.DiagnosticCategory.Error,"const_declarations_must_be_initialized_1155","'const' declarations must be initialized."),const_declarations_can_only_be_declared_inside_a_block:t(1156,e.DiagnosticCategory.Error,"const_declarations_can_only_be_declared_inside_a_block_1156","'const' declarations can only be declared inside a block."),let_declarations_can_only_be_declared_inside_a_block:t(1157,e.DiagnosticCategory.Error,"let_declarations_can_only_be_declared_inside_a_block_1157","'let' declarations can only be declared inside a block."),Unterminated_template_literal:t(1160,e.DiagnosticCategory.Error,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:t(1161,e.DiagnosticCategory.Error,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:t(1162,e.DiagnosticCategory.Error,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional."),A_yield_expression_is_only_allowed_in_a_generator_body:t(1163,e.DiagnosticCategory.Error,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body."),Computed_property_names_are_not_allowed_in_enums:t(1164,e.DiagnosticCategory.Error,"Computed_property_names_are_not_allowed_in_enums_1164","Computed property names are not allowed in enums."),A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1165,e.DiagnosticCategory.Error,"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165","A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1166,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_1166","A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1168,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168","A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1169,e.DiagnosticCategory.Error,"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169","A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1170,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170","A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_comma_expression_is_not_allowed_in_a_computed_property_name:t(1171,e.DiagnosticCategory.Error,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name."),extends_clause_already_seen:t(1172,e.DiagnosticCategory.Error,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:t(1173,e.DiagnosticCategory.Error,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:t(1174,e.DiagnosticCategory.Error,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:t(1175,e.DiagnosticCategory.Error,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:t(1176,e.DiagnosticCategory.Error,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:t(1177,e.DiagnosticCategory.Error,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:t(1178,e.DiagnosticCategory.Error,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:t(1179,e.DiagnosticCategory.Error,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:t(1180,e.DiagnosticCategory.Error,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:t(1181,e.DiagnosticCategory.Error,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:t(1182,e.DiagnosticCategory.Error,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:t(1183,e.DiagnosticCategory.Error,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:t(1184,e.DiagnosticCategory.Error,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:t(1185,e.DiagnosticCategory.Error,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:t(1186,e.DiagnosticCategory.Error,"A_rest_element_cannot_have_an_initializer_1186","A rest element cannot have an initializer."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:t(1187,e.DiagnosticCategory.Error,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:t(1188,e.DiagnosticCategory.Error,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:t(1189,e.DiagnosticCategory.Error,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:t(1190,e.DiagnosticCategory.Error,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer."),An_import_declaration_cannot_have_modifiers:t(1191,e.DiagnosticCategory.Error,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:t(1192,e.DiagnosticCategory.Error,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:t(1193,e.DiagnosticCategory.Error,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:t(1194,e.DiagnosticCategory.Error,"Export_declarations_are_not_permitted_in_a_namespace_1194","Export declarations are not permitted in a namespace."),export_Asterisk_does_not_re_export_a_default:t(1195,e.DiagnosticCategory.Error,"export_Asterisk_does_not_re_export_a_default_1195","'export *' does not re-export a default."),Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified:t(1196,e.DiagnosticCategory.Error,"Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196","Catch clause variable type annotation must be 'any' or 'unknown' if specified."),Catch_clause_variable_cannot_have_an_initializer:t(1197,e.DiagnosticCategory.Error,"Catch_clause_variable_cannot_have_an_initializer_1197","Catch clause variable cannot have an initializer."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:t(1198,e.DiagnosticCategory.Error,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unterminated_Unicode_escape_sequence:t(1199,e.DiagnosticCategory.Error,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:t(1200,e.DiagnosticCategory.Error,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow."),Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:t(1202,e.DiagnosticCategory.Error,"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202","Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."),Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead:t(1203,e.DiagnosticCategory.Error,"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203","Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type:t(1205,e.DiagnosticCategory.Error,"Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205","Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'."),Decorators_are_not_valid_here:t(1206,e.DiagnosticCategory.Error,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:t(1207,e.DiagnosticCategory.Error,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name."),_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module:t(1208,e.DiagnosticCategory.Error,"_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_imp_1208","'{0}' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module."),Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode:t(1210,e.DiagnosticCategory.Error,"Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210","Invalid use of '{0}'. Class definitions are automatically in strict mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:t(1211,e.DiagnosticCategory.Error,"A_class_declaration_without_the_default_modifier_must_have_a_name_1211","A class declaration without the 'default' modifier must have a name."),Identifier_expected_0_is_a_reserved_word_in_strict_mode:t(1212,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:t(1213,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:t(1214,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."),Invalid_use_of_0_Modules_are_automatically_in_strict_mode:t(1215,e.DiagnosticCategory.Error,"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215","Invalid use of '{0}'. Modules are automatically in strict mode."),Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules:t(1216,e.DiagnosticCategory.Error,"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216","Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),Export_assignment_is_not_supported_when_module_flag_is_system:t(1218,e.DiagnosticCategory.Error,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning:t(1219,e.DiagnosticCategory.Error,"Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219","Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning."),Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher:t(1220,e.DiagnosticCategory.Error,"Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220","Generators are only available when targeting ECMAScript 2015 or higher."),Generators_are_not_allowed_in_an_ambient_context:t(1221,e.DiagnosticCategory.Error,"Generators_are_not_allowed_in_an_ambient_context_1221","Generators are not allowed in an ambient context."),An_overload_signature_cannot_be_declared_as_a_generator:t(1222,e.DiagnosticCategory.Error,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:t(1223,e.DiagnosticCategory.Error,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:t(1224,e.DiagnosticCategory.Error,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:t(1225,e.DiagnosticCategory.Error,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:t(1226,e.DiagnosticCategory.Error,"Type_predicate_0_is_not_assignable_to_1_1226","Type predicate '{0}' is not assignable to '{1}'."),Parameter_0_is_not_in_the_same_position_as_parameter_1:t(1227,e.DiagnosticCategory.Error,"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227","Parameter '{0}' is not in the same position as parameter '{1}'."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:t(1228,e.DiagnosticCategory.Error,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:t(1229,e.DiagnosticCategory.Error,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:t(1230,e.DiagnosticCategory.Error,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),An_export_assignment_can_only_be_used_in_a_module:t(1231,e.DiagnosticCategory.Error,"An_export_assignment_can_only_be_used_in_a_module_1231","An export assignment can only be used in a module."),An_import_declaration_can_only_be_used_in_a_namespace_or_module:t(1232,e.DiagnosticCategory.Error,"An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232","An import declaration can only be used in a namespace or module."),An_export_declaration_can_only_be_used_in_a_module:t(1233,e.DiagnosticCategory.Error,"An_export_declaration_can_only_be_used_in_a_module_1233","An export declaration can only be used in a module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:t(1234,e.DiagnosticCategory.Error,"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234","An ambient module declaration is only allowed at the top level in a file."),A_namespace_declaration_is_only_allowed_in_a_namespace_or_module:t(1235,e.DiagnosticCategory.Error,"A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235","A namespace declaration is only allowed in a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:t(1236,e.DiagnosticCategory.Error,"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236","The return type of a property decorator function must be either 'void' or 'any'."),The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:t(1237,e.DiagnosticCategory.Error,"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237","The return type of a parameter decorator function must be either 'void' or 'any'."),Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:t(1238,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238","Unable to resolve signature of class decorator when called as an expression."),Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:t(1239,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239","Unable to resolve signature of parameter decorator when called as an expression."),Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:t(1240,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240","Unable to resolve signature of property decorator when called as an expression."),Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:t(1241,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241","Unable to resolve signature of method decorator when called as an expression."),abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration:t(1242,e.DiagnosticCategory.Error,"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","'abstract' modifier can only appear on a class, method, or property declaration."),_0_modifier_cannot_be_used_with_1_modifier:t(1243,e.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier."),Abstract_methods_can_only_appear_within_an_abstract_class:t(1244,e.DiagnosticCategory.Error,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class."),Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:t(1245,e.DiagnosticCategory.Error,"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245","Method '{0}' cannot have an implementation because it is marked abstract."),An_interface_property_cannot_have_an_initializer:t(1246,e.DiagnosticCategory.Error,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:t(1247,e.DiagnosticCategory.Error,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_class_member_cannot_have_the_0_keyword:t(1248,e.DiagnosticCategory.Error,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword."),A_decorator_can_only_decorate_a_method_implementation_not_an_overload:t(1249,e.DiagnosticCategory.Error,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5:t(1250,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode:t(1251,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode:t(1252,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."),_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag:t(1253,e.DiagnosticCategory.Error,"_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253","'{0}' tag cannot be used independently as a top level JSDoc tag."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:t(1254,e.DiagnosticCategory.Error,"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254","A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),A_definite_assignment_assertion_is_not_permitted_in_this_context:t(1255,e.DiagnosticCategory.Error,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_rest_element_must_be_last_in_a_tuple_type:t(1256,e.DiagnosticCategory.Error,"A_rest_element_must_be_last_in_a_tuple_type_1256","A rest element must be last in a tuple type."),A_required_element_cannot_follow_an_optional_element:t(1257,e.DiagnosticCategory.Error,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),Module_0_can_only_be_default_imported_using_the_1_flag:t(1259,e.DiagnosticCategory.Error,"Module_0_can_only_be_default_imported_using_the_1_flag_1259","Module '{0}' can only be default-imported using the '{1}' flag"),Keywords_cannot_contain_escape_characters:t(1260,e.DiagnosticCategory.Error,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:t(1261,e.DiagnosticCategory.Error,"Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261","Already included file name '{0}' differs from file name '{1}' only in casing."),Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module:t(1262,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262","Identifier expected. '{0}' is a reserved word at the top-level of a module."),Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:t(1263,e.DiagnosticCategory.Error,"Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263","Declarations with initializers cannot also have definite assignment assertions."),Declarations_with_definite_assignment_assertions_must_also_have_type_annotations:t(1264,e.DiagnosticCategory.Error,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations."),with_statements_are_not_allowed_in_an_async_function_block:t(1300,e.DiagnosticCategory.Error,"with_statements_are_not_allowed_in_an_async_function_block_1300","'with' statements are not allowed in an async function block."),await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:t(1308,e.DiagnosticCategory.Error,"await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308","'await' expressions are only allowed within async functions and at the top levels of modules."),Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern:t(1312,e.DiagnosticCategory.Error,"Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312","Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),The_body_of_an_if_statement_cannot_be_the_empty_statement:t(1313,e.DiagnosticCategory.Error,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Global_module_exports_may_only_appear_in_module_files:t(1314,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_in_module_files_1314","Global module exports may only appear in module files."),Global_module_exports_may_only_appear_in_declaration_files:t(1315,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_in_declaration_files_1315","Global module exports may only appear in declaration files."),Global_module_exports_may_only_appear_at_top_level:t(1316,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_at_top_level_1316","Global module exports may only appear at top level."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:t(1317,e.DiagnosticCategory.Error,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),An_abstract_accessor_cannot_have_an_implementation:t(1318,e.DiagnosticCategory.Error,"An_abstract_accessor_cannot_have_an_implementation_1318","An abstract accessor cannot have an implementation."),A_default_export_can_only_be_used_in_an_ECMAScript_style_module:t(1319,e.DiagnosticCategory.Error,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module."),Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1320,e.DiagnosticCategory.Error,"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320","Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1321,e.DiagnosticCategory.Error,"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321","Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1322,e.DiagnosticCategory.Error,"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322","Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system_or_umd:t(1323,e.DiagnosticCategory.Error,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323","Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'esnext', 'commonjs', 'amd', 'system', or 'umd'."),Dynamic_import_must_have_one_specifier_as_an_argument:t(1324,e.DiagnosticCategory.Error,"Dynamic_import_must_have_one_specifier_as_an_argument_1324","Dynamic import must have one specifier as an argument."),Specifier_of_dynamic_import_cannot_be_spread_element:t(1325,e.DiagnosticCategory.Error,"Specifier_of_dynamic_import_cannot_be_spread_element_1325","Specifier of dynamic import cannot be spread element."),Dynamic_import_cannot_have_type_arguments:t(1326,e.DiagnosticCategory.Error,"Dynamic_import_cannot_have_type_arguments_1326","Dynamic import cannot have type arguments."),String_literal_with_double_quotes_expected:t(1327,e.DiagnosticCategory.Error,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:t(1328,e.DiagnosticCategory.Error,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0:t(1329,e.DiagnosticCategory.Error,"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329","'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly:t(1330,e.DiagnosticCategory.Error,"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330","A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."),A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly:t(1331,e.DiagnosticCategory.Error,"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331","A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."),A_variable_whose_type_is_a_unique_symbol_type_must_be_const:t(1332,e.DiagnosticCategory.Error,"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332","A variable whose type is a 'unique symbol' type must be 'const'."),unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name:t(1333,e.DiagnosticCategory.Error,"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333","'unique symbol' types may not be used on a variable declaration with a binding name."),unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement:t(1334,e.DiagnosticCategory.Error,"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334","'unique symbol' types are only allowed on variables in a variable statement."),unique_symbol_types_are_not_allowed_here:t(1335,e.DiagnosticCategory.Error,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead:t(1336,e.DiagnosticCategory.Error,"An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336","An index signature parameter type cannot be a type alias. Consider writing '[{0}: {1}]: {2}' instead."),An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead:t(1337,e.DiagnosticCategory.Error,"An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337","An index signature parameter type cannot be a union type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:t(1338,e.DiagnosticCategory.Error,"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338","'infer' declarations are only permitted in the 'extends' clause of a conditional type."),Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:t(1339,e.DiagnosticCategory.Error,"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339","Module '{0}' does not refer to a value, but is used as a value here."),Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0:t(1340,e.DiagnosticCategory.Error,"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340","Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),Type_arguments_cannot_be_used_here:t(1342,e.DiagnosticCategory.Error,"Type_arguments_cannot_be_used_here_1342","Type arguments cannot be used here."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_esnext_or_system:t(1343,e.DiagnosticCategory.Error,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_esnext_or_system_1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'."),A_label_is_not_allowed_here:t(1344,e.DiagnosticCategory.Error,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:t(1345,e.DiagnosticCategory.Error,"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345","An expression of type 'void' cannot be tested for truthiness."),This_parameter_is_not_allowed_with_use_strict_directive:t(1346,e.DiagnosticCategory.Error,"This_parameter_is_not_allowed_with_use_strict_directive_1346","This parameter is not allowed with 'use strict' directive."),use_strict_directive_cannot_be_used_with_non_simple_parameter_list:t(1347,e.DiagnosticCategory.Error,"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347","'use strict' directive cannot be used with non-simple parameter list."),Non_simple_parameter_declared_here:t(1348,e.DiagnosticCategory.Error,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:t(1349,e.DiagnosticCategory.Error,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:t(1350,e.DiagnosticCategory.Message,"Print_the_final_configuration_instead_of_building_1350","Print the final configuration instead of building."),An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal:t(1351,e.DiagnosticCategory.Error,"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351","An identifier or keyword cannot immediately follow a numeric literal."),A_bigint_literal_cannot_use_exponential_notation:t(1352,e.DiagnosticCategory.Error,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:t(1353,e.DiagnosticCategory.Error,"A_bigint_literal_must_be_an_integer_1353","A bigint literal must be an integer."),readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types:t(1354,e.DiagnosticCategory.Error,"readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354","'readonly' type modifier is only permitted on array and tuple literal types."),A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals:t(1355,e.DiagnosticCategory.Error,"A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355","A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."),Did_you_mean_to_mark_this_function_as_async:t(1356,e.DiagnosticCategory.Error,"Did_you_mean_to_mark_this_function_as_async_1356","Did you mean to mark this function as 'async'?"),An_enum_member_name_must_be_followed_by_a_or:t(1357,e.DiagnosticCategory.Error,"An_enum_member_name_must_be_followed_by_a_or_1357","An enum member name must be followed by a ',', '=', or '}'."),Tagged_template_expressions_are_not_permitted_in_an_optional_chain:t(1358,e.DiagnosticCategory.Error,"Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358","Tagged template expressions are not permitted in an optional chain."),Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:t(1359,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359","Identifier expected. '{0}' is a reserved word that cannot be used here."),Did_you_mean_to_parenthesize_this_function_type:t(1360,e.DiagnosticCategory.Error,"Did_you_mean_to_parenthesize_this_function_type_1360","Did you mean to parenthesize this function type?"),_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type:t(1361,e.DiagnosticCategory.Error,"_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361","'{0}' cannot be used as a value because it was imported using 'import type'."),_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:t(1362,e.DiagnosticCategory.Error,"_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362","'{0}' cannot be used as a value because it was exported using 'export type'."),A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both:t(1363,e.DiagnosticCategory.Error,"A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363","A type-only import can specify a default import or named bindings, but not both."),Convert_to_type_only_export:t(1364,e.DiagnosticCategory.Message,"Convert_to_type_only_export_1364","Convert to type-only export"),Convert_all_re_exported_types_to_type_only_exports:t(1365,e.DiagnosticCategory.Message,"Convert_all_re_exported_types_to_type_only_exports_1365","Convert all re-exported types to type-only exports"),Split_into_two_separate_import_declarations:t(1366,e.DiagnosticCategory.Message,"Split_into_two_separate_import_declarations_1366","Split into two separate import declarations"),Split_all_invalid_type_only_imports:t(1367,e.DiagnosticCategory.Message,"Split_all_invalid_type_only_imports_1367","Split all invalid type-only imports"),Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types:t(1368,e.DiagnosticCategory.Message,"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368","Specify emit/checking behavior for imports that are only used for types"),Did_you_mean_0:t(1369,e.DiagnosticCategory.Message,"Did_you_mean_0_1369","Did you mean '{0}'?"),Only_ECMAScript_imports_may_use_import_type:t(1370,e.DiagnosticCategory.Error,"Only_ECMAScript_imports_may_use_import_type_1370","Only ECMAScript imports may use 'import type'."),This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is_set_to_error:t(1371,e.DiagnosticCategory.Error,"This_import_is_never_used_as_a_value_and_must_use_import_type_because_the_importsNotUsedAsValues_is__1371","This import is never used as a value and must use 'import type' because the 'importsNotUsedAsValues' is set to 'error'."),Convert_to_type_only_import:t(1373,e.DiagnosticCategory.Message,"Convert_to_type_only_import_1373","Convert to type-only import"),Convert_all_imports_not_used_as_a_value_to_type_only_imports:t(1374,e.DiagnosticCategory.Message,"Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374","Convert all imports not used as a value to type-only imports"),await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module:t(1375,e.DiagnosticCategory.Error,"await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375","'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),_0_was_imported_here:t(1376,e.DiagnosticCategory.Message,"_0_was_imported_here_1376","'{0}' was imported here."),_0_was_exported_here:t(1377,e.DiagnosticCategory.Message,"_0_was_exported_here_1377","'{0}' was exported here."),Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher:t(1378,e.DiagnosticCategory.Error,"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378","Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."),An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:t(1379,e.DiagnosticCategory.Error,"An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379","An import alias cannot reference a declaration that was exported using 'export type'."),An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type:t(1380,e.DiagnosticCategory.Error,"An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380","An import alias cannot reference a declaration that was imported using 'import type'."),Unexpected_token_Did_you_mean_or_rbrace:t(1381,e.DiagnosticCategory.Error,"Unexpected_token_Did_you_mean_or_rbrace_1381","Unexpected token. Did you mean `{'}'}` or `}`?"),Unexpected_token_Did_you_mean_or_gt:t(1382,e.DiagnosticCategory.Error,"Unexpected_token_Did_you_mean_or_gt_1382","Unexpected token. Did you mean `{'>'}` or `>`?"),Only_named_exports_may_use_export_type:t(1383,e.DiagnosticCategory.Error,"Only_named_exports_may_use_export_type_1383","Only named exports may use 'export type'."),A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list:t(1384,e.DiagnosticCategory.Error,"A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list_1384","A 'new' expression with type arguments must always be followed by a parenthesized argument list."),Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:t(1385,e.DiagnosticCategory.Error,"Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385","Function type notation must be parenthesized when used in a union type."),Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:t(1386,e.DiagnosticCategory.Error,"Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386","Constructor type notation must be parenthesized when used in a union type."),Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:t(1387,e.DiagnosticCategory.Error,"Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387","Function type notation must be parenthesized when used in an intersection type."),Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:t(1388,e.DiagnosticCategory.Error,"Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388","Constructor type notation must be parenthesized when used in an intersection type."),_0_is_not_allowed_as_a_variable_declaration_name:t(1389,e.DiagnosticCategory.Error,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),The_types_of_0_are_incompatible_between_these_types:t(2200,e.DiagnosticCategory.Error,"The_types_of_0_are_incompatible_between_these_types_2200","The types of '{0}' are incompatible between these types."),The_types_returned_by_0_are_incompatible_between_these_types:t(2201,e.DiagnosticCategory.Error,"The_types_returned_by_0_are_incompatible_between_these_types_2201","The types returned by '{0}' are incompatible between these types."),Call_signature_return_types_0_and_1_are_incompatible:t(2202,e.DiagnosticCategory.Error,"Call_signature_return_types_0_and_1_are_incompatible_2202","Call signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Construct_signature_return_types_0_and_1_are_incompatible:t(2203,e.DiagnosticCategory.Error,"Construct_signature_return_types_0_and_1_are_incompatible_2203","Construct signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:t(2204,e.DiagnosticCategory.Error,"Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204","Call signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:t(2205,e.DiagnosticCategory.Error,"Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205","Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Duplicate_identifier_0:t(2300,e.DiagnosticCategory.Error,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:t(2301,e.DiagnosticCategory.Error,"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301","Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),Static_members_cannot_reference_class_type_parameters:t(2302,e.DiagnosticCategory.Error,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:t(2303,e.DiagnosticCategory.Error,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:t(2304,e.DiagnosticCategory.Error,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:t(2305,e.DiagnosticCategory.Error,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:t(2306,e.DiagnosticCategory.Error,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0_or_its_corresponding_type_declarations:t(2307,e.DiagnosticCategory.Error,"Cannot_find_module_0_or_its_corresponding_type_declarations_2307","Cannot find module '{0}' or its corresponding type declarations."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:t(2308,e.DiagnosticCategory.Error,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:t(2309,e.DiagnosticCategory.Error,"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309","An export assignment cannot be used in a module with other exported elements."),Type_0_recursively_references_itself_as_a_base_type:t(2310,e.DiagnosticCategory.Error,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),A_class_may_only_extend_another_class:t(2311,e.DiagnosticCategory.Error,"A_class_may_only_extend_another_class_2311","A class may only extend another class."),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:t(2312,e.DiagnosticCategory.Error,"An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312","An interface can only extend an object type or intersection of object types with statically known members."),Type_parameter_0_has_a_circular_constraint:t(2313,e.DiagnosticCategory.Error,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:t(2314,e.DiagnosticCategory.Error,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:t(2315,e.DiagnosticCategory.Error,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:t(2316,e.DiagnosticCategory.Error,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:t(2317,e.DiagnosticCategory.Error,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:t(2318,e.DiagnosticCategory.Error,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:t(2319,e.DiagnosticCategory.Error,"Named_property_0_of_types_1_and_2_are_not_identical_2319","Named property '{0}' of types '{1}' and '{2}' are not identical."),Interface_0_cannot_simultaneously_extend_types_1_and_2:t(2320,e.DiagnosticCategory.Error,"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320","Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."),Excessive_stack_depth_comparing_types_0_and_1:t(2321,e.DiagnosticCategory.Error,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),Type_0_is_not_assignable_to_type_1:t(2322,e.DiagnosticCategory.Error,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:t(2323,e.DiagnosticCategory.Error,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:t(2324,e.DiagnosticCategory.Error,"Property_0_is_missing_in_type_1_2324","Property '{0}' is missing in type '{1}'."),Property_0_is_private_in_type_1_but_not_in_type_2:t(2325,e.DiagnosticCategory.Error,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Types_of_property_0_are_incompatible:t(2326,e.DiagnosticCategory.Error,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Property_0_is_optional_in_type_1_but_required_in_type_2:t(2327,e.DiagnosticCategory.Error,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Types_of_parameters_0_and_1_are_incompatible:t(2328,e.DiagnosticCategory.Error,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_is_missing_in_type_0:t(2329,e.DiagnosticCategory.Error,"Index_signature_is_missing_in_type_0_2329","Index signature is missing in type '{0}'."),Index_signatures_are_incompatible:t(2330,e.DiagnosticCategory.Error,"Index_signatures_are_incompatible_2330","Index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:t(2331,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_module_or_namespace_body_2331","'this' cannot be referenced in a module or namespace body."),this_cannot_be_referenced_in_current_location:t(2332,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_constructor_arguments:t(2333,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_constructor_arguments_2333","'this' cannot be referenced in constructor arguments."),this_cannot_be_referenced_in_a_static_property_initializer:t(2334,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_static_property_initializer_2334","'this' cannot be referenced in a static property initializer."),super_can_only_be_referenced_in_a_derived_class:t(2335,e.DiagnosticCategory.Error,"super_can_only_be_referenced_in_a_derived_class_2335","'super' can only be referenced in a derived class."),super_cannot_be_referenced_in_constructor_arguments:t(2336,e.DiagnosticCategory.Error,"super_cannot_be_referenced_in_constructor_arguments_2336","'super' cannot be referenced in constructor arguments."),Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:t(2337,e.DiagnosticCategory.Error,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors."),super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:t(2338,e.DiagnosticCategory.Error,"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338","'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."),Property_0_does_not_exist_on_type_1:t(2339,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:t(2340,e.DiagnosticCategory.Error,"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340","Only public and protected methods of the base class are accessible via the 'super' keyword."),Property_0_is_private_and_only_accessible_within_class_1:t(2341,e.DiagnosticCategory.Error,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),An_index_expression_argument_must_be_of_type_string_number_symbol_or_any:t(2342,e.DiagnosticCategory.Error,"An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342","An index expression argument must be of type 'string', 'number', 'symbol', or 'any'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:t(2343,e.DiagnosticCategory.Error,"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343","This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."),Type_0_does_not_satisfy_the_constraint_1:t(2344,e.DiagnosticCategory.Error,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:t(2345,e.DiagnosticCategory.Error,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),Call_target_does_not_contain_any_signatures:t(2346,e.DiagnosticCategory.Error,"Call_target_does_not_contain_any_signatures_2346","Call target does not contain any signatures."),Untyped_function_calls_may_not_accept_type_arguments:t(2347,e.DiagnosticCategory.Error,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:t(2348,e.DiagnosticCategory.Error,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),This_expression_is_not_callable:t(2349,e.DiagnosticCategory.Error,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:t(2350,e.DiagnosticCategory.Error,"Only_a_void_function_can_be_called_with_the_new_keyword_2350","Only a void function can be called with the 'new' keyword."),This_expression_is_not_constructable:t(2351,e.DiagnosticCategory.Error,"This_expression_is_not_constructable_2351","This expression is not constructable."),Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first:t(2352,e.DiagnosticCategory.Error,"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352","Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:t(2353,e.DiagnosticCategory.Error,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found:t(2354,e.DiagnosticCategory.Error,"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354","This syntax requires an imported helper but module '{0}' cannot be found."),A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value:t(2355,e.DiagnosticCategory.Error,"A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'void' nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:t(2356,e.DiagnosticCategory.Error,"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:t(2357,e.DiagnosticCategory.Error,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:t(2358,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type:t(2359,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359","The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."),The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol:t(2360,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360","The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'."),The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:t(2361,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361","The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:t(2362,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:t(2363,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:t(2364,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Operator_0_cannot_be_applied_to_types_1_and_2:t(2365,e.DiagnosticCategory.Error,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:t(2366,e.DiagnosticCategory.Error,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap:t(2367,e.DiagnosticCategory.Error,"This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367","This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap."),Type_parameter_name_cannot_be_0:t(2368,e.DiagnosticCategory.Error,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:t(2369,e.DiagnosticCategory.Error,"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369","A parameter property is only allowed in a constructor implementation."),A_rest_parameter_must_be_of_an_array_type:t(2370,e.DiagnosticCategory.Error,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:t(2371,e.DiagnosticCategory.Error,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),Parameter_0_cannot_reference_itself:t(2372,e.DiagnosticCategory.Error,"Parameter_0_cannot_reference_itself_2372","Parameter '{0}' cannot reference itself."),Parameter_0_cannot_reference_identifier_1_declared_after_it:t(2373,e.DiagnosticCategory.Error,"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_string_index_signature:t(2374,e.DiagnosticCategory.Error,"Duplicate_string_index_signature_2374","Duplicate string index signature."),Duplicate_number_index_signature:t(2375,e.DiagnosticCategory.Error,"Duplicate_number_index_signature_2375","Duplicate number index signature."),A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_parameter_properties_or_private_identifiers:t(2376,e.DiagnosticCategory.Error,"A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376","A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers."),Constructors_for_derived_classes_must_contain_a_super_call:t(2377,e.DiagnosticCategory.Error,"Constructors_for_derived_classes_must_contain_a_super_call_2377","Constructors for derived classes must contain a 'super' call."),A_get_accessor_must_return_a_value:t(2378,e.DiagnosticCategory.Error,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Getter_and_setter_accessors_do_not_agree_in_visibility:t(2379,e.DiagnosticCategory.Error,"Getter_and_setter_accessors_do_not_agree_in_visibility_2379","Getter and setter accessors do not agree in visibility."),get_and_set_accessor_must_have_the_same_type:t(2380,e.DiagnosticCategory.Error,"get_and_set_accessor_must_have_the_same_type_2380","'get' and 'set' accessor must have the same type."),A_signature_with_an_implementation_cannot_use_a_string_literal_type:t(2381,e.DiagnosticCategory.Error,"A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381","A signature with an implementation cannot use a string literal type."),Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature:t(2382,e.DiagnosticCategory.Error,"Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382","Specialized overload signature is not assignable to any non-specialized signature."),Overload_signatures_must_all_be_exported_or_non_exported:t(2383,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_exported_or_non_exported_2383","Overload signatures must all be exported or non-exported."),Overload_signatures_must_all_be_ambient_or_non_ambient:t(2384,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_ambient_or_non_ambient_2384","Overload signatures must all be ambient or non-ambient."),Overload_signatures_must_all_be_public_private_or_protected:t(2385,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Overload_signatures_must_all_be_optional_or_required:t(2386,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:t(2387,e.DiagnosticCategory.Error,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:t(2388,e.DiagnosticCategory.Error,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:t(2389,e.DiagnosticCategory.Error,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:t(2390,e.DiagnosticCategory.Error,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:t(2391,e.DiagnosticCategory.Error,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Multiple_constructor_implementations_are_not_allowed:t(2392,e.DiagnosticCategory.Error,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:t(2393,e.DiagnosticCategory.Error,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:t(2394,e.DiagnosticCategory.Error,"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394","This overload signature is not compatible with its implementation signature."),Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:t(2395,e.DiagnosticCategory.Error,"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395","Individual declarations in merged declaration '{0}' must be all exported or all local."),Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:t(2396,e.DiagnosticCategory.Error,"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396","Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."),Declaration_name_conflicts_with_built_in_global_identifier_0:t(2397,e.DiagnosticCategory.Error,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),constructor_cannot_be_used_as_a_parameter_property_name:t(2398,e.DiagnosticCategory.Error,"constructor_cannot_be_used_as_a_parameter_property_name_2398","'constructor' cannot be used as a parameter property name."),Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:t(2399,e.DiagnosticCategory.Error,"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399","Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:t(2400,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400","Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference:t(2401,e.DiagnosticCategory.Error,"Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference_2401","Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:t(2402,e.DiagnosticCategory.Error,"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402","Expression resolves to '_super' that compiler uses to capture base class reference."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:t(2403,e.DiagnosticCategory.Error,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:t(2404,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:t(2405,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:t(2406,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:t(2407,e.DiagnosticCategory.Error,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),Setters_cannot_return_a_value:t(2408,e.DiagnosticCategory.Error,"Setters_cannot_return_a_value_2408","Setters cannot return a value."),Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:t(2409,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409","Return type of constructor signature must be assignable to the instance type of the class."),The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any:t(2410,e.DiagnosticCategory.Error,"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410","The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),Property_0_of_type_1_is_not_assignable_to_string_index_type_2:t(2411,e.DiagnosticCategory.Error,"Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411","Property '{0}' of type '{1}' is not assignable to string index type '{2}'."),Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2:t(2412,e.DiagnosticCategory.Error,"Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412","Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'."),Numeric_index_type_0_is_not_assignable_to_string_index_type_1:t(2413,e.DiagnosticCategory.Error,"Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413","Numeric index type '{0}' is not assignable to string index type '{1}'."),Class_name_cannot_be_0:t(2414,e.DiagnosticCategory.Error,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:t(2415,e.DiagnosticCategory.Error,"Class_0_incorrectly_extends_base_class_1_2415","Class '{0}' incorrectly extends base class '{1}'."),Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2:t(2416,e.DiagnosticCategory.Error,"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416","Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),Class_static_side_0_incorrectly_extends_base_class_static_side_1:t(2417,e.DiagnosticCategory.Error,"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417","Class static side '{0}' incorrectly extends base class static side '{1}'."),Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:t(2418,e.DiagnosticCategory.Error,"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418","Type of computed property's value is '{0}', which is not assignable to type '{1}'."),Types_of_construct_signatures_are_incompatible:t(2419,e.DiagnosticCategory.Error,"Types_of_construct_signatures_are_incompatible_2419","Types of construct signatures are incompatible."),Class_0_incorrectly_implements_interface_1:t(2420,e.DiagnosticCategory.Error,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members:t(2422,e.DiagnosticCategory.Error,"A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422","A class can only implement an object type or intersection of object types with statically known members."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:t(2423,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:t(2425,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:t(2426,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."),Interface_name_cannot_be_0:t(2427,e.DiagnosticCategory.Error,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:t(2428,e.DiagnosticCategory.Error,"All_declarations_of_0_must_have_identical_type_parameters_2428","All declarations of '{0}' must have identical type parameters."),Interface_0_incorrectly_extends_interface_1:t(2430,e.DiagnosticCategory.Error,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:t(2431,e.DiagnosticCategory.Error,"Enum_name_cannot_be_0_2431","Enum name cannot be '{0}'."),In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:t(2432,e.DiagnosticCategory.Error,"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432","In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."),A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:t(2433,e.DiagnosticCategory.Error,"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433","A namespace declaration cannot be in a different file from a class or function with which it is merged."),A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:t(2434,e.DiagnosticCategory.Error,"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434","A namespace declaration cannot be located prior to a class or function with which it is merged."),Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:t(2435,e.DiagnosticCategory.Error,"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435","Ambient modules cannot be nested in other modules or namespaces."),Ambient_module_declaration_cannot_specify_relative_module_name:t(2436,e.DiagnosticCategory.Error,"Ambient_module_declaration_cannot_specify_relative_module_name_2436","Ambient module declaration cannot specify relative module name."),Module_0_is_hidden_by_a_local_declaration_with_the_same_name:t(2437,e.DiagnosticCategory.Error,"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437","Module '{0}' is hidden by a local declaration with the same name."),Import_name_cannot_be_0:t(2438,e.DiagnosticCategory.Error,"Import_name_cannot_be_0_2438","Import name cannot be '{0}'."),Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:t(2439,e.DiagnosticCategory.Error,"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439","Import or export declaration in an ambient module declaration cannot reference module through relative module name."),Import_declaration_conflicts_with_local_declaration_of_0:t(2440,e.DiagnosticCategory.Error,"Import_declaration_conflicts_with_local_declaration_of_0_2440","Import declaration conflicts with local declaration of '{0}'."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:t(2441,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."),Types_have_separate_declarations_of_a_private_property_0:t(2442,e.DiagnosticCategory.Error,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:t(2443,e.DiagnosticCategory.Error,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:t(2444,e.DiagnosticCategory.Error,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:t(2445,e.DiagnosticCategory.Error,"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445","Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1:t(2446,e.DiagnosticCategory.Error,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:t(2447,e.DiagnosticCategory.Error,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),Block_scoped_variable_0_used_before_its_declaration:t(2448,e.DiagnosticCategory.Error,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:t(2449,e.DiagnosticCategory.Error,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:t(2450,e.DiagnosticCategory.Error,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:t(2451,e.DiagnosticCategory.Error,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:t(2452,e.DiagnosticCategory.Error,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly:t(2453,e.DiagnosticCategory.Error,"The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453","The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly."),Variable_0_is_used_before_being_assigned:t(2454,e.DiagnosticCategory.Error,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0:t(2455,e.DiagnosticCategory.Error,"Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455","Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'."),Type_alias_0_circularly_references_itself:t(2456,e.DiagnosticCategory.Error,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:t(2457,e.DiagnosticCategory.Error,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:t(2458,e.DiagnosticCategory.Error,"An_AMD_module_cannot_have_multiple_name_assignments_2458","An AMD module cannot have multiple name assignments."),Module_0_declares_1_locally_but_it_is_not_exported:t(2459,e.DiagnosticCategory.Error,"Module_0_declares_1_locally_but_it_is_not_exported_2459","Module '{0}' declares '{1}' locally, but it is not exported."),Module_0_declares_1_locally_but_it_is_exported_as_2:t(2460,e.DiagnosticCategory.Error,"Module_0_declares_1_locally_but_it_is_exported_as_2_2460","Module '{0}' declares '{1}' locally, but it is exported as '{2}'."),Type_0_is_not_an_array_type:t(2461,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_rest_element_must_be_last_in_a_destructuring_pattern:t(2462,e.DiagnosticCategory.Error,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern."),A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:t(2463,e.DiagnosticCategory.Error,"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463","A binding pattern parameter cannot be optional in an implementation signature."),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:t(2464,e.DiagnosticCategory.Error,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),this_cannot_be_referenced_in_a_computed_property_name:t(2465,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_computed_property_name_2465","'this' cannot be referenced in a computed property name."),super_cannot_be_referenced_in_a_computed_property_name:t(2466,e.DiagnosticCategory.Error,"super_cannot_be_referenced_in_a_computed_property_name_2466","'super' cannot be referenced in a computed property name."),A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:t(2467,e.DiagnosticCategory.Error,"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467","A computed property name cannot reference a type parameter from its containing type."),Cannot_find_global_value_0:t(2468,e.DiagnosticCategory.Error,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:t(2469,e.DiagnosticCategory.Error,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object:t(2470,e.DiagnosticCategory.Error,"Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470","'Symbol' reference does not refer to the global Symbol constructor object."),A_computed_property_name_of_the_form_0_must_be_of_type_symbol:t(2471,e.DiagnosticCategory.Error,"A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471","A computed property name of the form '{0}' must be of type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:t(2472,e.DiagnosticCategory.Error,"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472","Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),Enum_declarations_must_all_be_const_or_non_const:t(2473,e.DiagnosticCategory.Error,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values:t(2474,e.DiagnosticCategory.Error,"const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474","const enum member initializers can only contain literal values and other computed enum values."),const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query:t(2475,e.DiagnosticCategory.Error,"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475","'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."),A_const_enum_member_can_only_be_accessed_using_a_string_literal:t(2476,e.DiagnosticCategory.Error,"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476","A const enum member can only be accessed using a string literal."),const_enum_member_initializer_was_evaluated_to_a_non_finite_value:t(2477,e.DiagnosticCategory.Error,"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477","'const' enum member initializer was evaluated to a non-finite value."),const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:t(2478,e.DiagnosticCategory.Error,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),Property_0_does_not_exist_on_const_enum_1:t(2479,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_const_enum_1_2479","Property '{0}' does not exist on 'const' enum '{1}'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:t(2480,e.DiagnosticCategory.Error,"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","'let' is not allowed to be used as a name in 'let' or 'const' declarations."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:t(2481,e.DiagnosticCategory.Error,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:t(2483,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation."),Export_declaration_conflicts_with_exported_declaration_of_0:t(2484,e.DiagnosticCategory.Error,"Export_declaration_conflicts_with_exported_declaration_of_0_2484","Export declaration conflicts with exported declaration of '{0}'."),The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access:t(2487,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access."),Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2488,e.DiagnosticCategory.Error,"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488","Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."),An_iterator_must_have_a_next_method:t(2489,e.DiagnosticCategory.Error,"An_iterator_must_have_a_next_method_2489","An iterator must have a 'next()' method."),The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property:t(2490,e.DiagnosticCategory.Error,"The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490","The type returned by the '{0}()' method of an iterator must have a 'value' property."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:t(2491,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern."),Cannot_redeclare_identifier_0_in_catch_clause:t(2492,e.DiagnosticCategory.Error,"Cannot_redeclare_identifier_0_in_catch_clause_2492","Cannot redeclare identifier '{0}' in catch clause."),Tuple_type_0_of_length_1_has_no_element_at_index_2:t(2493,e.DiagnosticCategory.Error,"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493","Tuple type '{0}' of length '{1}' has no element at index '{2}'."),Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:t(2494,e.DiagnosticCategory.Error,"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494","Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."),Type_0_is_not_an_array_type_or_a_string_type:t(2495,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression:t(2496,e.DiagnosticCategory.Error,"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496","The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression."),This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export:t(2497,e.DiagnosticCategory.Error,"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497","This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."),Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:t(2498,e.DiagnosticCategory.Error,"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498","Module '{0}' uses 'export =' and cannot be used with 'export *'."),An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:t(2499,e.DiagnosticCategory.Error,"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499","An interface can only extend an identifier/qualified-name with optional type arguments."),A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:t(2500,e.DiagnosticCategory.Error,"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500","A class can only implement an identifier/qualified-name with optional type arguments."),A_rest_element_cannot_contain_a_binding_pattern:t(2501,e.DiagnosticCategory.Error,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:t(2502,e.DiagnosticCategory.Error,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Cannot_find_namespace_0:t(2503,e.DiagnosticCategory.Error,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:t(2504,e.DiagnosticCategory.Error,"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504","Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."),A_generator_cannot_have_a_void_type_annotation:t(2505,e.DiagnosticCategory.Error,"A_generator_cannot_have_a_void_type_annotation_2505","A generator cannot have a 'void' type annotation."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:t(2506,e.DiagnosticCategory.Error,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:t(2507,e.DiagnosticCategory.Error,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),No_base_constructor_has_the_specified_number_of_type_arguments:t(2508,e.DiagnosticCategory.Error,"No_base_constructor_has_the_specified_number_of_type_arguments_2508","No base constructor has the specified number of type arguments."),Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members:t(2509,e.DiagnosticCategory.Error,"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509","Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."),Base_constructors_must_all_have_the_same_return_type:t(2510,e.DiagnosticCategory.Error,"Base_constructors_must_all_have_the_same_return_type_2510","Base constructors must all have the same return type."),Cannot_create_an_instance_of_an_abstract_class:t(2511,e.DiagnosticCategory.Error,"Cannot_create_an_instance_of_an_abstract_class_2511","Cannot create an instance of an abstract class."),Overload_signatures_must_all_be_abstract_or_non_abstract:t(2512,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_abstract_or_non_abstract_2512","Overload signatures must all be abstract or non-abstract."),Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:t(2513,e.DiagnosticCategory.Error,"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513","Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),Classes_containing_abstract_methods_must_be_marked_abstract:t(2514,e.DiagnosticCategory.Error,"Classes_containing_abstract_methods_must_be_marked_abstract_2514","Classes containing abstract methods must be marked abstract."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:t(2515,e.DiagnosticCategory.Error,"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515","Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."),All_declarations_of_an_abstract_method_must_be_consecutive:t(2516,e.DiagnosticCategory.Error,"All_declarations_of_an_abstract_method_must_be_consecutive_2516","All declarations of an abstract method must be consecutive."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:t(2517,e.DiagnosticCategory.Error,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:t(2518,e.DiagnosticCategory.Error,"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518","A 'this'-based type guard is not compatible with a parameter-based type guard."),An_async_iterator_must_have_a_next_method:t(2519,e.DiagnosticCategory.Error,"An_async_iterator_must_have_a_next_method_2519","An async iterator must have a 'next()' method."),Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:t(2520,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions:t(2521,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521","Expression resolves to variable declaration '{0}' that compiler uses to support async functions."),The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method:t(2522,e.DiagnosticCategory.Error,"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522","The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."),yield_expressions_cannot_be_used_in_a_parameter_initializer:t(2523,e.DiagnosticCategory.Error,"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523","'yield' expressions cannot be used in a parameter initializer."),await_expressions_cannot_be_used_in_a_parameter_initializer:t(2524,e.DiagnosticCategory.Error,"await_expressions_cannot_be_used_in_a_parameter_initializer_2524","'await' expressions cannot be used in a parameter initializer."),Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value:t(2525,e.DiagnosticCategory.Error,"Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525","Initializer provides no value for this binding element and the binding element has no default value."),A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:t(2526,e.DiagnosticCategory.Error,"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526","A 'this' type is available only in a non-static member of a class or interface."),The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary:t(2527,e.DiagnosticCategory.Error,"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527","The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."),A_module_cannot_have_multiple_default_exports:t(2528,e.DiagnosticCategory.Error,"A_module_cannot_have_multiple_default_exports_2528","A module cannot have multiple default exports."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:t(2529,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."),Property_0_is_incompatible_with_index_signature:t(2530,e.DiagnosticCategory.Error,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:t(2531,e.DiagnosticCategory.Error,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:t(2532,e.DiagnosticCategory.Error,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:t(2533,e.DiagnosticCategory.Error,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:t(2534,e.DiagnosticCategory.Error,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Enum_type_0_has_members_with_initializers_that_are_not_literals:t(2535,e.DiagnosticCategory.Error,"Enum_type_0_has_members_with_initializers_that_are_not_literals_2535","Enum type '{0}' has members with initializers that are not literals."),Type_0_cannot_be_used_to_index_type_1:t(2536,e.DiagnosticCategory.Error,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:t(2537,e.DiagnosticCategory.Error,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_cannot_be_used_as_an_index_type:t(2538,e.DiagnosticCategory.Error,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Cannot_assign_to_0_because_it_is_not_a_variable:t(2539,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Cannot_assign_to_0_because_it_is_a_read_only_property:t(2540,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),The_target_of_an_assignment_must_be_a_variable_or_a_property_access:t(2541,e.DiagnosticCategory.Error,"The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541","The target of an assignment must be a variable or a property access."),Index_signature_in_type_0_only_permits_reading:t(2542,e.DiagnosticCategory.Error,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference:t(2543,e.DiagnosticCategory.Error,"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543","Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference:t(2544,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544","Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any:t(2545,e.DiagnosticCategory.Error,"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545","A mixin class must have a constructor with a single rest parameter of type 'any[]'."),The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:t(2547,e.DiagnosticCategory.Error,"The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547","The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2548,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2549,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later:t(2550,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550","Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the `lib` compiler option to '{2}' or later."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:t(2551,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Cannot_find_name_0_Did_you_mean_1:t(2552,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),Computed_values_are_not_permitted_in_an_enum_with_string_valued_members:t(2553,e.DiagnosticCategory.Error,"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553","Computed values are not permitted in an enum with string valued members."),Expected_0_arguments_but_got_1:t(2554,e.DiagnosticCategory.Error,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:t(2555,e.DiagnosticCategory.Error,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),Expected_0_arguments_but_got_1_or_more:t(2556,e.DiagnosticCategory.Error,"Expected_0_arguments_but_got_1_or_more_2556","Expected {0} arguments, but got {1} or more."),Expected_at_least_0_arguments_but_got_1_or_more:t(2557,e.DiagnosticCategory.Error,"Expected_at_least_0_arguments_but_got_1_or_more_2557","Expected at least {0} arguments, but got {1} or more."),Expected_0_type_arguments_but_got_1:t(2558,e.DiagnosticCategory.Error,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),Type_0_has_no_properties_in_common_with_type_1:t(2559,e.DiagnosticCategory.Error,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:t(2560,e.DiagnosticCategory.Error,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:t(2561,e.DiagnosticCategory.Error,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Base_class_expressions_cannot_reference_class_type_parameters:t(2562,e.DiagnosticCategory.Error,"Base_class_expressions_cannot_reference_class_type_parameters_2562","Base class expressions cannot reference class type parameters."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:t(2563,e.DiagnosticCategory.Error,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor:t(2564,e.DiagnosticCategory.Error,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564","Property '{0}' has no initializer and is not definitely assigned in the constructor."),Property_0_is_used_before_being_assigned:t(2565,e.DiagnosticCategory.Error,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:t(2566,e.DiagnosticCategory.Error,"A_rest_element_cannot_have_a_property_name_2566","A rest element cannot have a property name."),Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:t(2567,e.DiagnosticCategory.Error,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators:t(2569,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569","Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators."),Object_is_of_type_unknown:t(2571,e.DiagnosticCategory.Error,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),Rest_signatures_are_incompatible:t(2572,e.DiagnosticCategory.Error,"Rest_signatures_are_incompatible_2572","Rest signatures are incompatible."),Property_0_is_incompatible_with_rest_element_type:t(2573,e.DiagnosticCategory.Error,"Property_0_is_incompatible_with_rest_element_type_2573","Property '{0}' is incompatible with rest element type."),A_rest_element_type_must_be_an_array_type:t(2574,e.DiagnosticCategory.Error,"A_rest_element_type_must_be_an_array_type_2574","A rest element type must be an array type."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:t(2575,e.DiagnosticCategory.Error,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),Property_0_is_a_static_member_of_type_1:t(2576,e.DiagnosticCategory.Error,"Property_0_is_a_static_member_of_type_1_2576","Property '{0}' is a static member of type '{1}'."),Return_type_annotation_circularly_references_itself:t(2577,e.DiagnosticCategory.Error,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Unused_ts_expect_error_directive:t(2578,e.DiagnosticCategory.Error,"Unused_ts_expect_error_directive_2578","Unused '@ts-expect-error' directive."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode:t(2580,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery:t(2581,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha:t(2582,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later:t(2583,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583","Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to '{1}' or later."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom:t(2584,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584","Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:t(2585,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585","'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later."),Enum_type_0_circularly_references_itself:t(2586,e.DiagnosticCategory.Error,"Enum_type_0_circularly_references_itself_2586","Enum type '{0}' circularly references itself."),JSDoc_type_0_circularly_references_itself:t(2587,e.DiagnosticCategory.Error,"JSDoc_type_0_circularly_references_itself_2587","JSDoc type '{0}' circularly references itself."),Cannot_assign_to_0_because_it_is_a_constant:t(2588,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_a_constant_2588","Cannot assign to '{0}' because it is a constant."),Type_instantiation_is_excessively_deep_and_possibly_infinite:t(2589,e.DiagnosticCategory.Error,"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589","Type instantiation is excessively deep and possibly infinite."),Expression_produces_a_union_type_that_is_too_complex_to_represent:t(2590,e.DiagnosticCategory.Error,"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590","Expression produces a union type that is too complex to represent."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:t(2591,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add `node` to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:t(2592,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add `jquery` to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:t(2593,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig."),This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:t(2594,e.DiagnosticCategory.Error,"This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594","This module is declared with using 'export =', and can only be used with a default import when using the '{0}' flag."),_0_can_only_be_imported_by_using_a_default_import:t(2595,e.DiagnosticCategory.Error,"_0_can_only_be_imported_by_using_a_default_import_2595","'{0}' can only be imported by using a default import."),_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:t(2596,e.DiagnosticCategory.Error,"_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596","'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:t(2597,e.DiagnosticCategory.Error,"_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597","'{0}' can only be imported by using a 'require' call or by using a default import."),_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:t(2598,e.DiagnosticCategory.Error,"_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598","'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."),JSX_element_attributes_type_0_may_not_be_a_union_type:t(2600,e.DiagnosticCategory.Error,"JSX_element_attributes_type_0_may_not_be_a_union_type_2600","JSX element attributes type '{0}' may not be a union type."),The_return_type_of_a_JSX_element_constructor_must_return_an_object_type:t(2601,e.DiagnosticCategory.Error,"The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601","The return type of a JSX element constructor must return an object type."),JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:t(2602,e.DiagnosticCategory.Error,"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602","JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),Property_0_in_type_1_is_not_assignable_to_type_2:t(2603,e.DiagnosticCategory.Error,"Property_0_in_type_1_is_not_assignable_to_type_2_2603","Property '{0}' in type '{1}' is not assignable to type '{2}'."),JSX_element_type_0_does_not_have_any_construct_or_call_signatures:t(2604,e.DiagnosticCategory.Error,"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604","JSX element type '{0}' does not have any construct or call signatures."),JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements:t(2605,e.DiagnosticCategory.Error,"JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605","JSX element type '{0}' is not a constructor function for JSX elements."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:t(2606,e.DiagnosticCategory.Error,"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606","Property '{0}' of JSX spread attribute is not assignable to target property."),JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:t(2607,e.DiagnosticCategory.Error,"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607","JSX element class does not support attributes because it does not have a '{0}' property."),The_global_type_JSX_0_may_not_have_more_than_one_property:t(2608,e.DiagnosticCategory.Error,"The_global_type_JSX_0_may_not_have_more_than_one_property_2608","The global type 'JSX.{0}' may not have more than one property."),JSX_spread_child_must_be_an_array_type:t(2609,e.DiagnosticCategory.Error,"JSX_spread_child_must_be_an_array_type_2609","JSX spread child must be an array type."),_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property:t(2610,e.DiagnosticCategory.Error,"_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610","'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."),_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor:t(2611,e.DiagnosticCategory.Error,"_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611","'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."),Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration:t(2612,e.DiagnosticCategory.Error,"Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612","Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."),Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead:t(2613,e.DiagnosticCategory.Error,"Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613","Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"),Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead:t(2614,e.DiagnosticCategory.Error,"Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614","Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"),Type_of_property_0_circularly_references_itself_in_mapped_type_1:t(2615,e.DiagnosticCategory.Error,"Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615","Type of property '{0}' circularly references itself in mapped type '{1}'."),_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:t(2616,e.DiagnosticCategory.Error,"_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616","'{0}' can only be imported by using 'import {1} = require({2})' or a default import."),_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import:t(2617,e.DiagnosticCategory.Error,"_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617","'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."),Source_has_0_element_s_but_target_requires_1:t(2618,e.DiagnosticCategory.Error,"Source_has_0_element_s_but_target_requires_1_2618","Source has {0} element(s) but target requires {1}."),Source_has_0_element_s_but_target_allows_only_1:t(2619,e.DiagnosticCategory.Error,"Source_has_0_element_s_but_target_allows_only_1_2619","Source has {0} element(s) but target allows only {1}."),Target_requires_0_element_s_but_source_may_have_fewer:t(2620,e.DiagnosticCategory.Error,"Target_requires_0_element_s_but_source_may_have_fewer_2620","Target requires {0} element(s) but source may have fewer."),Target_allows_only_0_element_s_but_source_may_have_more:t(2621,e.DiagnosticCategory.Error,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Element_at_index_0_is_variadic_in_one_type_but_not_in_the_other:t(2622,e.DiagnosticCategory.Error,"Element_at_index_0_is_variadic_in_one_type_but_not_in_the_other_2622","Element at index {0} is variadic in one type but not in the other."),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:t(2649,e.DiagnosticCategory.Error,"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649","Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:t(2651,e.DiagnosticCategory.Error,"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651","A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:t(2652,e.DiagnosticCategory.Error,"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652","Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:t(2653,e.DiagnosticCategory.Error,"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653","Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition:t(2654,e.DiagnosticCategory.Error,"Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654","Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition."),Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition:t(2656,e.DiagnosticCategory.Error,"Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656","Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition."),JSX_expressions_must_have_one_parent_element:t(2657,e.DiagnosticCategory.Error,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:t(2658,e.DiagnosticCategory.Error,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:t(2659,e.DiagnosticCategory.Error,"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659","'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:t(2660,e.DiagnosticCategory.Error,"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","'super' can only be referenced in members of derived classes or object literal expressions."),Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module:t(2661,e.DiagnosticCategory.Error,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module."),Cannot_find_name_0_Did_you_mean_the_static_member_1_0:t(2662,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662","Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"),Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:t(2663,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663","Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"),Invalid_module_name_in_augmentation_module_0_cannot_be_found:t(2664,e.DiagnosticCategory.Error,"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664","Invalid module name in augmentation, module '{0}' cannot be found."),Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented:t(2665,e.DiagnosticCategory.Error,"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665","Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."),Exports_and_export_assignments_are_not_permitted_in_module_augmentations:t(2666,e.DiagnosticCategory.Error,"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666","Exports and export assignments are not permitted in module augmentations."),Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:t(2667,e.DiagnosticCategory.Error,"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667","Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."),export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:t(2668,e.DiagnosticCategory.Error,"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668","'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."),Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:t(2669,e.DiagnosticCategory.Error,"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669","Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."),Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:t(2670,e.DiagnosticCategory.Error,"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670","Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."),Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:t(2671,e.DiagnosticCategory.Error,"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671","Cannot augment module '{0}' because it resolves to a non-module entity."),Cannot_assign_a_0_constructor_type_to_a_1_constructor_type:t(2672,e.DiagnosticCategory.Error,"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672","Cannot assign a '{0}' constructor type to a '{1}' constructor type."),Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration:t(2673,e.DiagnosticCategory.Error,"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673","Constructor of class '{0}' is private and only accessible within the class declaration."),Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration:t(2674,e.DiagnosticCategory.Error,"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674","Constructor of class '{0}' is protected and only accessible within the class declaration."),Cannot_extend_a_class_0_Class_constructor_is_marked_as_private:t(2675,e.DiagnosticCategory.Error,"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675","Cannot extend a class '{0}'. Class constructor is marked as private."),Accessors_must_both_be_abstract_or_non_abstract:t(2676,e.DiagnosticCategory.Error,"Accessors_must_both_be_abstract_or_non_abstract_2676","Accessors must both be abstract or non-abstract."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:t(2677,e.DiagnosticCategory.Error,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Type_0_is_not_comparable_to_type_1:t(2678,e.DiagnosticCategory.Error,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void:t(2679,e.DiagnosticCategory.Error,"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679","A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),A_0_parameter_must_be_the_first_parameter:t(2680,e.DiagnosticCategory.Error,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:t(2681,e.DiagnosticCategory.Error,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),get_and_set_accessor_must_have_the_same_this_type:t(2682,e.DiagnosticCategory.Error,"get_and_set_accessor_must_have_the_same_this_type_2682","'get' and 'set' accessor must have the same 'this' type."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:t(2683,e.DiagnosticCategory.Error,"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683","'this' implicitly has type 'any' because it does not have a type annotation."),The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1:t(2684,e.DiagnosticCategory.Error,"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684","The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),The_this_types_of_each_signature_are_incompatible:t(2685,e.DiagnosticCategory.Error,"The_this_types_of_each_signature_are_incompatible_2685","The 'this' types of each signature are incompatible."),_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead:t(2686,e.DiagnosticCategory.Error,"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686","'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."),All_declarations_of_0_must_have_identical_modifiers:t(2687,e.DiagnosticCategory.Error,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:t(2688,e.DiagnosticCategory.Error,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:t(2689,e.DiagnosticCategory.Error,"Cannot_extend_an_interface_0_Did_you_mean_implements_2689","Cannot extend an interface '{0}'. Did you mean 'implements'?"),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0:t(2690,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690","'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"),An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead:t(2691,e.DiagnosticCategory.Error,"An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691","An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:t(2692,e.DiagnosticCategory.Error,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:t(2693,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Namespace_0_has_no_exported_member_1:t(2694,e.DiagnosticCategory.Error,"Namespace_0_has_no_exported_member_1_2694","Namespace '{0}' has no exported member '{1}'."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:t(2695,e.DiagnosticCategory.Error,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:t(2696,e.DiagnosticCategory.Error,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:t(2697,e.DiagnosticCategory.Error,"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697","An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."),Spread_types_may_only_be_created_from_object_types:t(2698,e.DiagnosticCategory.Error,"Spread_types_may_only_be_created_from_object_types_2698","Spread types may only be created from object types."),Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1:t(2699,e.DiagnosticCategory.Error,"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699","Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),Rest_types_may_only_be_created_from_object_types:t(2700,e.DiagnosticCategory.Error,"Rest_types_may_only_be_created_from_object_types_2700","Rest types may only be created from object types."),The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:t(2701,e.DiagnosticCategory.Error,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignment must be a variable or a property access."),_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here:t(2702,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702","'{0}' only refers to a type, but is being used as a namespace here."),The_operand_of_a_delete_operator_must_be_a_property_reference:t(2703,e.DiagnosticCategory.Error,"The_operand_of_a_delete_operator_must_be_a_property_reference_2703","The operand of a 'delete' operator must be a property reference."),The_operand_of_a_delete_operator_cannot_be_a_read_only_property:t(2704,e.DiagnosticCategory.Error,"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704","The operand of a 'delete' operator cannot be a read-only property."),An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:t(2705,e.DiagnosticCategory.Error,"An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705","An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."),Required_type_parameters_may_not_follow_optional_type_parameters:t(2706,e.DiagnosticCategory.Error,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Generic_type_0_requires_between_1_and_2_type_arguments:t(2707,e.DiagnosticCategory.Error,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Cannot_use_namespace_0_as_a_value:t(2708,e.DiagnosticCategory.Error,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:t(2709,e.DiagnosticCategory.Error,"Cannot_use_namespace_0_as_a_type_2709","Cannot use namespace '{0}' as a type."),_0_are_specified_twice_The_attribute_named_0_will_be_overwritten:t(2710,e.DiagnosticCategory.Error,"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710","'{0}' are specified twice. The attribute named '{0}' will be overwritten."),A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:t(2711,e.DiagnosticCategory.Error,"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711","A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."),A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:t(2712,e.DiagnosticCategory.Error,"A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712","A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."),Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1:t(2713,e.DiagnosticCategory.Error,"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713","Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"),The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context:t(2714,e.DiagnosticCategory.Error,"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714","The expression of an export assignment must be an identifier or qualified name in an ambient context."),Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor:t(2715,e.DiagnosticCategory.Error,"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715","Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),Type_parameter_0_has_a_circular_default:t(2716,e.DiagnosticCategory.Error,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:t(2717,e.DiagnosticCategory.Error,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Duplicate_property_0:t(2718,e.DiagnosticCategory.Error,"Duplicate_property_0_2718","Duplicate property '{0}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:t(2719,e.DiagnosticCategory.Error,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:t(2720,e.DiagnosticCategory.Error,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Cannot_invoke_an_object_which_is_possibly_null:t(2721,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:t(2722,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:t(2723,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),_0_has_no_exported_member_named_1_Did_you_mean_2:t(2724,e.DiagnosticCategory.Error,"_0_has_no_exported_member_named_1_Did_you_mean_2_2724","'{0}' has no exported member named '{1}'. Did you mean '{2}'?"),Class_name_cannot_be_Object_when_targeting_ES5_with_module_0:t(2725,e.DiagnosticCategory.Error,"Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725","Class name cannot be 'Object' when targeting ES5 with module {0}."),Cannot_find_lib_definition_for_0:t(2726,e.DiagnosticCategory.Error,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:t(2727,e.DiagnosticCategory.Error,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),_0_is_declared_here:t(2728,e.DiagnosticCategory.Message,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:t(2729,e.DiagnosticCategory.Error,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:t(2730,e.DiagnosticCategory.Error,"An_arrow_function_cannot_have_a_this_parameter_2730","An arrow function cannot have a 'this' parameter."),Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String:t(2731,e.DiagnosticCategory.Error,"Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731","Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension:t(2732,e.DiagnosticCategory.Error,"Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732","Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."),Property_0_was_also_declared_here:t(2733,e.DiagnosticCategory.Error,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Are_you_missing_a_semicolon:t(2734,e.DiagnosticCategory.Error,"Are_you_missing_a_semicolon_2734","Are you missing a semicolon?"),Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1:t(2735,e.DiagnosticCategory.Error,"Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735","Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),Operator_0_cannot_be_applied_to_type_1:t(2736,e.DiagnosticCategory.Error,"Operator_0_cannot_be_applied_to_type_1_2736","Operator '{0}' cannot be applied to type '{1}'."),BigInt_literals_are_not_available_when_targeting_lower_than_ES2020:t(2737,e.DiagnosticCategory.Error,"BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737","BigInt literals are not available when targeting lower than ES2020."),An_outer_value_of_this_is_shadowed_by_this_container:t(2738,e.DiagnosticCategory.Message,"An_outer_value_of_this_is_shadowed_by_this_container_2738","An outer value of 'this' is shadowed by this container."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2:t(2739,e.DiagnosticCategory.Error,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739","Type '{0}' is missing the following properties from type '{1}': {2}"),Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more:t(2740,e.DiagnosticCategory.Error,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740","Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."),Property_0_is_missing_in_type_1_but_required_in_type_2:t(2741,e.DiagnosticCategory.Error,"Property_0_is_missing_in_type_1_but_required_in_type_2_2741","Property '{0}' is missing in type '{1}' but required in type '{2}'."),The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary:t(2742,e.DiagnosticCategory.Error,"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742","The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."),No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments:t(2743,e.DiagnosticCategory.Error,"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743","No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."),Type_parameter_defaults_can_only_reference_previously_declared_type_parameters:t(2744,e.DiagnosticCategory.Error,"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744","Type parameter defaults can only reference previously declared type parameters."),This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided:t(2745,e.DiagnosticCategory.Error,"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745","This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."),This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided:t(2746,e.DiagnosticCategory.Error,"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746","This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."),_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2:t(2747,e.DiagnosticCategory.Error,"_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747","'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided:t(2748,e.DiagnosticCategory.Error,"Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748","Cannot access ambient const enums when the '--isolatedModules' flag is provided."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:t(2749,e.DiagnosticCategory.Error,"_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749","'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"),The_implementation_signature_is_declared_here:t(2750,e.DiagnosticCategory.Error,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:t(2751,e.DiagnosticCategory.Error,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:t(2752,e.DiagnosticCategory.Error,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:t(2753,e.DiagnosticCategory.Error,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:t(2754,e.DiagnosticCategory.Error,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:t(2755,e.DiagnosticCategory.Error,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:t(2756,e.DiagnosticCategory.Error,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:t(2757,e.DiagnosticCategory.Error,"Type_0_has_no_call_signatures_2757","Type '{0}' has no call signatures."),Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:t(2758,e.DiagnosticCategory.Error,"Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758","Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."),No_constituent_of_type_0_is_constructable:t(2759,e.DiagnosticCategory.Error,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:t(2760,e.DiagnosticCategory.Error,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:t(2761,e.DiagnosticCategory.Error,"Type_0_has_no_construct_signatures_2761","Type '{0}' has no construct signatures."),Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other:t(2762,e.DiagnosticCategory.Error,"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762","Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:t(2763,e.DiagnosticCategory.Error,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:t(2764,e.DiagnosticCategory.Error,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:t(2765,e.DiagnosticCategory.Error,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."),Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:t(2766,e.DiagnosticCategory.Error,"Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766","Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."),The_0_property_of_an_iterator_must_be_a_method:t(2767,e.DiagnosticCategory.Error,"The_0_property_of_an_iterator_must_be_a_method_2767","The '{0}' property of an iterator must be a method."),The_0_property_of_an_async_iterator_must_be_a_method:t(2768,e.DiagnosticCategory.Error,"The_0_property_of_an_async_iterator_must_be_a_method_2768","The '{0}' property of an async iterator must be a method."),No_overload_matches_this_call:t(2769,e.DiagnosticCategory.Error,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:t(2770,e.DiagnosticCategory.Error,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:t(2771,e.DiagnosticCategory.Error,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:t(2772,e.DiagnosticCategory.Error,"Overload_0_of_1_2_gave_the_following_error_2772","Overload {0} of {1}, '{2}', gave the following error."),Did_you_forget_to_use_await:t(2773,e.DiagnosticCategory.Error,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead:t(2774,e.DiagnosticCategory.Error,"This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774","This condition will always return true since the function is always defined. Did you mean to call it instead?"),Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation:t(2775,e.DiagnosticCategory.Error,"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775","Assertions require every name in the call target to be declared with an explicit type annotation."),Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name:t(2776,e.DiagnosticCategory.Error,"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776","Assertions require the call target to be an identifier or qualified name."),The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access:t(2777,e.DiagnosticCategory.Error,"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777","The operand of an increment or decrement operator may not be an optional property access."),The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:t(2778,e.DiagnosticCategory.Error,"The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778","The target of an object rest assignment may not be an optional property access."),The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access:t(2779,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779","The left-hand side of an assignment expression may not be an optional property access."),The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access:t(2780,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780","The left-hand side of a 'for...in' statement may not be an optional property access."),The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access:t(2781,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781","The left-hand side of a 'for...of' statement may not be an optional property access."),_0_needs_an_explicit_type_annotation:t(2782,e.DiagnosticCategory.Message,"_0_needs_an_explicit_type_annotation_2782","'{0}' needs an explicit type annotation."),_0_is_specified_more_than_once_so_this_usage_will_be_overwritten:t(2783,e.DiagnosticCategory.Error,"_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783","'{0}' is specified more than once, so this usage will be overwritten."),get_and_set_accessors_cannot_declare_this_parameters:t(2784,e.DiagnosticCategory.Error,"get_and_set_accessors_cannot_declare_this_parameters_2784","'get' and 'set' accessors cannot declare 'this' parameters."),This_spread_always_overwrites_this_property:t(2785,e.DiagnosticCategory.Error,"This_spread_always_overwrites_this_property_2785","This spread always overwrites this property."),_0_cannot_be_used_as_a_JSX_component:t(2786,e.DiagnosticCategory.Error,"_0_cannot_be_used_as_a_JSX_component_2786","'{0}' cannot be used as a JSX component."),Its_return_type_0_is_not_a_valid_JSX_element:t(2787,e.DiagnosticCategory.Error,"Its_return_type_0_is_not_a_valid_JSX_element_2787","Its return type '{0}' is not a valid JSX element."),Its_instance_type_0_is_not_a_valid_JSX_element:t(2788,e.DiagnosticCategory.Error,"Its_instance_type_0_is_not_a_valid_JSX_element_2788","Its instance type '{0}' is not a valid JSX element."),Its_element_type_0_is_not_a_valid_JSX_element:t(2789,e.DiagnosticCategory.Error,"Its_element_type_0_is_not_a_valid_JSX_element_2789","Its element type '{0}' is not a valid JSX element."),The_operand_of_a_delete_operator_must_be_optional:t(2790,e.DiagnosticCategory.Error,"The_operand_of_a_delete_operator_must_be_optional_2790","The operand of a 'delete' operator must be optional."),Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later:t(2791,e.DiagnosticCategory.Error,"Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791","Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."),Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option:t(2792,e.DiagnosticCategory.Error,"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_th_2792","Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?"),The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible:t(2793,e.DiagnosticCategory.Error,"The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793","The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."),Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise:t(2794,e.DiagnosticCategory.Error,"Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794","Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"),The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types:t(2795,e.DiagnosticCategory.Error,"The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795","The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."),It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked:t(2796,e.DiagnosticCategory.Error,"It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796","It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."),Import_declaration_0_is_using_private_name_1:t(4e3,e.DiagnosticCategory.Error,"Import_declaration_0_is_using_private_name_1_4000","Import declaration '{0}' is using private name '{1}'."),Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:t(4002,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002","Type parameter '{0}' of exported class has or is using private name '{1}'."),Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:t(4004,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004","Type parameter '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:t(4006,e.DiagnosticCategory.Error,"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006","Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:t(4008,e.DiagnosticCategory.Error,"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008","Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t(4010,e.DiagnosticCategory.Error,"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010","Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t(4012,e.DiagnosticCategory.Error,"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012","Type parameter '{0}' of public method from exported class has or is using private name '{1}'."),Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:t(4014,e.DiagnosticCategory.Error,"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014","Type parameter '{0}' of method from exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:t(4016,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016","Type parameter '{0}' of exported function has or is using private name '{1}'."),Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:t(4019,e.DiagnosticCategory.Error,"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019","Implements clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_0_has_or_is_using_private_name_1:t(4020,e.DiagnosticCategory.Error,"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020","'extends' clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_has_or_is_using_private_name_0:t(4021,e.DiagnosticCategory.Error,"extends_clause_of_exported_class_has_or_is_using_private_name_0_4021","'extends' clause of exported class has or is using private name '{0}'."),extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:t(4022,e.DiagnosticCategory.Error,"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022","'extends' clause of exported interface '{0}' has or is using private name '{1}'."),Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4023,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023","Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."),Exported_variable_0_has_or_is_using_name_1_from_private_module_2:t(4024,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024","Exported variable '{0}' has or is using name '{1}' from private module '{2}'."),Exported_variable_0_has_or_is_using_private_name_1:t(4025,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_private_name_1_4025","Exported variable '{0}' has or is using private name '{1}'."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4026,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026","Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4027,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027","Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:t(4028,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028","Public static property '{0}' of exported class has or is using private name '{1}'."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4029,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029","Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4030,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030","Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_property_0_of_exported_class_has_or_is_using_private_name_1:t(4031,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031","Public property '{0}' of exported class has or is using private name '{1}'."),Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4032,e.DiagnosticCategory.Error,"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032","Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Property_0_of_exported_interface_has_or_is_using_private_name_1:t(4033,e.DiagnosticCategory.Error,"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033","Property '{0}' of exported interface has or is using private name '{1}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4034,e.DiagnosticCategory.Error,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034","Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:t(4035,e.DiagnosticCategory.Error,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035","Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4036,e.DiagnosticCategory.Error,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036","Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:t(4037,e.DiagnosticCategory.Error,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037","Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4038,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038","Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4039,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039","Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:t(4040,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040","Return type of public static getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4041,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041","Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4042,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042","Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1:t(4043,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043","Return type of public getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4044,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044","Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:t(4045,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045","Return type of constructor signature from exported interface has or is using private name '{0}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4046,e.DiagnosticCategory.Error,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046","Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:t(4047,e.DiagnosticCategory.Error,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047","Return type of call signature from exported interface has or is using private name '{0}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4048,e.DiagnosticCategory.Error,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048","Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:t(4049,e.DiagnosticCategory.Error,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049","Return type of index signature from exported interface has or is using private name '{0}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4050,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050","Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:t(4051,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051","Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:t(4052,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052","Return type of public static method from exported class has or is using private name '{0}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4053,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053","Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:t(4054,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054","Return type of public method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:t(4055,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055","Return type of public method from exported class has or is using private name '{0}'."),Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4056,e.DiagnosticCategory.Error,"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056","Return type of method from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:t(4057,e.DiagnosticCategory.Error,"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057","Return type of method from exported interface has or is using private name '{0}'."),Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4058,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058","Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:t(4059,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059","Return type of exported function has or is using name '{0}' from private module '{1}'."),Return_type_of_exported_function_has_or_is_using_private_name_0:t(4060,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_private_name_0_4060","Return type of exported function has or is using private name '{0}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4061,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061","Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4062,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062","Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:t(4063,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063","Parameter '{0}' of constructor from exported class has or is using private name '{1}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4064,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064","Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:t(4065,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065","Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4066,e.DiagnosticCategory.Error,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066","Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:t(4067,e.DiagnosticCategory.Error,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067","Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4068,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068","Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4069,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069","Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t(4070,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070","Parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4071,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071","Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4072,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072","Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t(4073,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073","Parameter '{0}' of public method from exported class has or is using private name '{1}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4074,e.DiagnosticCategory.Error,"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074","Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:t(4075,e.DiagnosticCategory.Error,"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075","Parameter '{0}' of method from exported interface has or is using private name '{1}'."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4076,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076","Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:t(4077,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077","Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."),Parameter_0_of_exported_function_has_or_is_using_private_name_1:t(4078,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078","Parameter '{0}' of exported function has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1:t(4081,e.DiagnosticCategory.Error,"Exported_type_alias_0_has_or_is_using_private_name_1_4081","Exported type alias '{0}' has or is using private name '{1}'."),Default_export_of_the_module_has_or_is_using_private_name_0:t(4082,e.DiagnosticCategory.Error,"Default_export_of_the_module_has_or_is_using_private_name_0_4082","Default export of the module has or is using private name '{0}'."),Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1:t(4083,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083","Type parameter '{0}' of exported type alias has or is using private name '{1}'."),Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict:t(4090,e.DiagnosticCategory.Error,"Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090","Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4091,e.DiagnosticCategory.Error,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091","Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1:t(4092,e.DiagnosticCategory.Error,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092","Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),Property_0_of_exported_class_expression_may_not_be_private_or_protected:t(4094,e.DiagnosticCategory.Error,"Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094","Property '{0}' of exported class expression may not be private or protected."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4095,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095","Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4096,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096","Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:t(4097,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097","Public static method '{0}' of exported class has or is using private name '{1}'."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4098,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098","Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4099,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099","Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_method_0_of_exported_class_has_or_is_using_private_name_1:t(4100,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100","Public method '{0}' of exported class has or is using private name '{1}'."),Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4101,e.DiagnosticCategory.Error,"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101","Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Method_0_of_exported_interface_has_or_is_using_private_name_1:t(4102,e.DiagnosticCategory.Error,"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102","Method '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1:t(4103,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103","Type parameter '{0}' of exported mapped object type is using private name '{1}'."),The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1:t(4104,e.DiagnosticCategory.Error,"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104","The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."),Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter:t(4105,e.DiagnosticCategory.Error,"Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105","Private or protected member '{0}' cannot be accessed on a type parameter."),Parameter_0_of_accessor_has_or_is_using_private_name_1:t(4106,e.DiagnosticCategory.Error,"Parameter_0_of_accessor_has_or_is_using_private_name_1_4106","Parameter '{0}' of accessor has or is using private name '{1}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:t(4107,e.DiagnosticCategory.Error,"Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107","Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4108,e.DiagnosticCategory.Error,"Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108","Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."),Type_arguments_for_0_circularly_reference_themselves:t(4109,e.DiagnosticCategory.Error,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:t(4110,e.DiagnosticCategory.Error,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),The_current_host_does_not_support_the_0_option:t(5001,e.DiagnosticCategory.Error,"The_current_host_does_not_support_the_0_option_5001","The current host does not support the '{0}' option."),Cannot_find_the_common_subdirectory_path_for_the_input_files:t(5009,e.DiagnosticCategory.Error,"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009","Cannot find the common subdirectory path for the input files."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:t(5010,e.DiagnosticCategory.Error,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),Cannot_read_file_0_Colon_1:t(5012,e.DiagnosticCategory.Error,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Failed_to_parse_file_0_Colon_1:t(5014,e.DiagnosticCategory.Error,"Failed_to_parse_file_0_Colon_1_5014","Failed to parse file '{0}': {1}."),Unknown_compiler_option_0:t(5023,e.DiagnosticCategory.Error,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:t(5024,e.DiagnosticCategory.Error,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),Unknown_compiler_option_0_Did_you_mean_1:t(5025,e.DiagnosticCategory.Error,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Could_not_write_file_0_Colon_1:t(5033,e.DiagnosticCategory.Error,"Could_not_write_file_0_Colon_1_5033","Could not write file '{0}': {1}."),Option_project_cannot_be_mixed_with_source_files_on_a_command_line:t(5042,e.DiagnosticCategory.Error,"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042","Option 'project' cannot be mixed with source files on a command line."),Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:t(5047,e.DiagnosticCategory.Error,"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047","Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."),Option_0_cannot_be_specified_when_option_target_is_ES3:t(5048,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_when_option_target_is_ES3_5048","Option '{0}' cannot be specified when option 'target' is 'ES3'."),Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:t(5051,e.DiagnosticCategory.Error,"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051","Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."),Option_0_cannot_be_specified_without_specifying_option_1:t(5052,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_without_specifying_option_1_5052","Option '{0}' cannot be specified without specifying option '{1}'."),Option_0_cannot_be_specified_with_option_1:t(5053,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_with_option_1_5053","Option '{0}' cannot be specified with option '{1}'."),A_tsconfig_json_file_is_already_defined_at_Colon_0:t(5054,e.DiagnosticCategory.Error,"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054","A 'tsconfig.json' file is already defined at: '{0}'."),Cannot_write_file_0_because_it_would_overwrite_input_file:t(5055,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_would_overwrite_input_file_5055","Cannot write file '{0}' because it would overwrite input file."),Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:t(5056,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056","Cannot write file '{0}' because it would be overwritten by multiple input files."),Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:t(5057,e.DiagnosticCategory.Error,"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057","Cannot find a tsconfig.json file at the specified directory: '{0}'."),The_specified_path_does_not_exist_Colon_0:t(5058,e.DiagnosticCategory.Error,"The_specified_path_does_not_exist_Colon_0_5058","The specified path does not exist: '{0}'."),Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier:t(5059,e.DiagnosticCategory.Error,"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059","Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."),Pattern_0_can_have_at_most_one_Asterisk_character:t(5061,e.DiagnosticCategory.Error,"Pattern_0_can_have_at_most_one_Asterisk_character_5061","Pattern '{0}' can have at most one '*' character."),Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character:t(5062,e.DiagnosticCategory.Error,"Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062","Substitution '{0}' in pattern '{1}' can have at most one '*' character."),Substitutions_for_pattern_0_should_be_an_array:t(5063,e.DiagnosticCategory.Error,"Substitutions_for_pattern_0_should_be_an_array_5063","Substitutions for pattern '{0}' should be an array."),Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2:t(5064,e.DiagnosticCategory.Error,"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064","Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:t(5065,e.DiagnosticCategory.Error,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Substitutions_for_pattern_0_shouldn_t_be_an_empty_array:t(5066,e.DiagnosticCategory.Error,"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066","Substitutions for pattern '{0}' shouldn't be an empty array."),Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name:t(5067,e.DiagnosticCategory.Error,"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067","Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig:t(5068,e.DiagnosticCategory.Error,"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068","Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),Option_0_cannot_be_specified_without_specifying_option_1_or_option_2:t(5069,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069","Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy:t(5070,e.DiagnosticCategory.Error,"Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070","Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."),Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext:t(5071,e.DiagnosticCategory.Error,"Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071","Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."),Unknown_build_option_0:t(5072,e.DiagnosticCategory.Error,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:t(5073,e.DiagnosticCategory.Error,"Build_option_0_requires_a_value_of_type_1_5073","Build option '{0}' requires a value of type {1}."),Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified:t(5074,e.DiagnosticCategory.Error,"Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074","Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified."),_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2:t(5075,e.DiagnosticCategory.Error,"_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075","'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."),_0_and_1_operations_cannot_be_mixed_without_parentheses:t(5076,e.DiagnosticCategory.Error,"_0_and_1_operations_cannot_be_mixed_without_parentheses_5076","'{0}' and '{1}' operations cannot be mixed without parentheses."),Unknown_build_option_0_Did_you_mean_1:t(5077,e.DiagnosticCategory.Error,"Unknown_build_option_0_Did_you_mean_1_5077","Unknown build option '{0}'. Did you mean '{1}'?"),Unknown_watch_option_0:t(5078,e.DiagnosticCategory.Error,"Unknown_watch_option_0_5078","Unknown watch option '{0}'."),Unknown_watch_option_0_Did_you_mean_1:t(5079,e.DiagnosticCategory.Error,"Unknown_watch_option_0_Did_you_mean_1_5079","Unknown watch option '{0}'. Did you mean '{1}'?"),Watch_option_0_requires_a_value_of_type_1:t(5080,e.DiagnosticCategory.Error,"Watch_option_0_requires_a_value_of_type_1_5080","Watch option '{0}' requires a value of type {1}."),Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0:t(5081,e.DiagnosticCategory.Error,"Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081","Cannot find a tsconfig.json file at the current directory: {0}."),_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1:t(5082,e.DiagnosticCategory.Error,"_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082","'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."),Cannot_read_file_0:t(5083,e.DiagnosticCategory.Error,"Cannot_read_file_0_5083","Cannot read file '{0}'."),Tuple_members_must_all_have_names_or_all_not_have_names:t(5084,e.DiagnosticCategory.Error,"Tuple_members_must_all_have_names_or_all_not_have_names_5084","Tuple members must all have names or all not have names."),A_tuple_member_cannot_be_both_optional_and_rest:t(5085,e.DiagnosticCategory.Error,"A_tuple_member_cannot_be_both_optional_and_rest_5085","A tuple member cannot be both optional and rest."),A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type:t(5086,e.DiagnosticCategory.Error,"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086","A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."),A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type:t(5087,e.DiagnosticCategory.Error,"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087","A labeled tuple element is declared as rest with a `...` before the name, rather than before the type."),The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary:t(5088,e.DiagnosticCategory.Error,"The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088","The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."),Option_0_cannot_be_specified_when_option_jsx_is_1:t(5089,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_when_option_jsx_is_1_5089","Option '{0}' cannot be specified when option 'jsx' is '{1}'."),Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash:t(5090,e.DiagnosticCategory.Error,"Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090","Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"),Generates_a_sourcemap_for_each_corresponding_d_ts_file:t(6e3,e.DiagnosticCategory.Message,"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000","Generates a sourcemap for each corresponding '.d.ts' file."),Concatenate_and_emit_output_to_single_file:t(6001,e.DiagnosticCategory.Message,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:t(6002,e.DiagnosticCategory.Message,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:t(6003,e.DiagnosticCategory.Message,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:t(6004,e.DiagnosticCategory.Message,"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004","Specify the location where debugger should locate TypeScript files instead of source locations."),Watch_input_files:t(6005,e.DiagnosticCategory.Message,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:t(6006,e.DiagnosticCategory.Message,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:t(6007,e.DiagnosticCategory.Message,"Do_not_erase_const_enum_declarations_in_generated_code_6007","Do not erase const enum declarations in generated code."),Do_not_emit_outputs_if_any_errors_were_reported:t(6008,e.DiagnosticCategory.Message,"Do_not_emit_outputs_if_any_errors_were_reported_6008","Do not emit outputs if any errors were reported."),Do_not_emit_comments_to_output:t(6009,e.DiagnosticCategory.Message,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:t(6010,e.DiagnosticCategory.Message,"Do_not_emit_outputs_6010","Do not emit outputs."),Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:t(6011,e.DiagnosticCategory.Message,"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."),Skip_type_checking_of_declaration_files:t(6012,e.DiagnosticCategory.Message,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:t(6013,e.DiagnosticCategory.Message,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:t(6014,e.DiagnosticCategory.Message,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_ESNEXT:t(6015,e.DiagnosticCategory.Message,"Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015","Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'."),Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext:t(6016,e.DiagnosticCategory.Message,"Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016","Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'."),Print_this_message:t(6017,e.DiagnosticCategory.Message,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:t(6019,e.DiagnosticCategory.Message,"Print_the_compiler_s_version_6019","Print the compiler's version."),Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json:t(6020,e.DiagnosticCategory.Message,"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020","Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),Syntax_Colon_0:t(6023,e.DiagnosticCategory.Message,"Syntax_Colon_0_6023","Syntax: {0}"),options:t(6024,e.DiagnosticCategory.Message,"options_6024","options"),file:t(6025,e.DiagnosticCategory.Message,"file_6025","file"),Examples_Colon_0:t(6026,e.DiagnosticCategory.Message,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:t(6027,e.DiagnosticCategory.Message,"Options_Colon_6027","Options:"),Version_0:t(6029,e.DiagnosticCategory.Message,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:t(6030,e.DiagnosticCategory.Message,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:t(6031,e.DiagnosticCategory.Message,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:t(6032,e.DiagnosticCategory.Message,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:t(6034,e.DiagnosticCategory.Message,"KIND_6034","KIND"),FILE:t(6035,e.DiagnosticCategory.Message,"FILE_6035","FILE"),VERSION:t(6036,e.DiagnosticCategory.Message,"VERSION_6036","VERSION"),LOCATION:t(6037,e.DiagnosticCategory.Message,"LOCATION_6037","LOCATION"),DIRECTORY:t(6038,e.DiagnosticCategory.Message,"DIRECTORY_6038","DIRECTORY"),STRATEGY:t(6039,e.DiagnosticCategory.Message,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:t(6040,e.DiagnosticCategory.Message,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Generates_corresponding_map_file:t(6043,e.DiagnosticCategory.Message,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:t(6044,e.DiagnosticCategory.Error,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:t(6045,e.DiagnosticCategory.Error,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:t(6046,e.DiagnosticCategory.Error,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:t(6048,e.DiagnosticCategory.Error,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form or -. For example '{0}' or '{1}'."),Unsupported_locale_0:t(6049,e.DiagnosticCategory.Error,"Unsupported_locale_0_6049","Unsupported locale '{0}'."),Unable_to_open_file_0:t(6050,e.DiagnosticCategory.Error,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:t(6051,e.DiagnosticCategory.Error,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:t(6052,e.DiagnosticCategory.Message,"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052","Raise error on expressions and declarations with an implied 'any' type."),File_0_not_found:t(6053,e.DiagnosticCategory.Error,"File_0_not_found_6053","File '{0}' not found."),File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1:t(6054,e.DiagnosticCategory.Error,"File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054","File '{0}' has an unsupported extension. The only supported extensions are {1}."),Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:t(6055,e.DiagnosticCategory.Message,"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055","Suppress noImplicitAny errors for indexing objects lacking index signatures."),Do_not_emit_declarations_for_code_that_has_an_internal_annotation:t(6056,e.DiagnosticCategory.Message,"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056","Do not emit declarations for code that has an '@internal' annotation."),Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:t(6058,e.DiagnosticCategory.Message,"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058","Specify the root directory of input files. Use to control the output directory structure with --outDir."),File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:t(6059,e.DiagnosticCategory.Error,"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059","File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."),Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:t(6060,e.DiagnosticCategory.Message,"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060","Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."),NEWLINE:t(6061,e.DiagnosticCategory.Message,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line:t(6064,e.DiagnosticCategory.Error,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."),Enables_experimental_support_for_ES7_decorators:t(6065,e.DiagnosticCategory.Message,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:t(6066,e.DiagnosticCategory.Message,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Enables_experimental_support_for_ES7_async_functions:t(6068,e.DiagnosticCategory.Message,"Enables_experimental_support_for_ES7_async_functions_6068","Enables experimental support for ES7 async functions."),Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6:t(6069,e.DiagnosticCategory.Message,"Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069","Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:t(6070,e.DiagnosticCategory.Message,"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070","Initializes a TypeScript project and creates a tsconfig.json file."),Successfully_created_a_tsconfig_json_file:t(6071,e.DiagnosticCategory.Message,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:t(6072,e.DiagnosticCategory.Message,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:t(6073,e.DiagnosticCategory.Message,"Stylize_errors_and_messages_using_color_and_context_experimental_6073","Stylize errors and messages using color and context (experimental)."),Do_not_report_errors_on_unused_labels:t(6074,e.DiagnosticCategory.Message,"Do_not_report_errors_on_unused_labels_6074","Do not report errors on unused labels."),Report_error_when_not_all_code_paths_in_function_return_a_value:t(6075,e.DiagnosticCategory.Message,"Report_error_when_not_all_code_paths_in_function_return_a_value_6075","Report error when not all code paths in function return a value."),Report_errors_for_fallthrough_cases_in_switch_statement:t(6076,e.DiagnosticCategory.Message,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:t(6077,e.DiagnosticCategory.Message,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:t(6078,e.DiagnosticCategory.Message,"Disallow_inconsistently_cased_references_to_the_same_file_6078","Disallow inconsistently-cased references to the same file."),Specify_library_files_to_be_included_in_the_compilation:t(6079,e.DiagnosticCategory.Message,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation_Colon_preserve_react_native_or_react:t(6080,e.DiagnosticCategory.Message,"Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080","Specify JSX code generation: 'preserve', 'react-native', or 'react'."),File_0_has_an_unsupported_extension_so_skipping_it:t(6081,e.DiagnosticCategory.Message,"File_0_has_an_unsupported_extension_so_skipping_it_6081","File '{0}' has an unsupported extension, so skipping it."),Only_amd_and_system_modules_are_supported_alongside_0:t(6082,e.DiagnosticCategory.Error,"Only_amd_and_system_modules_are_supported_alongside_0_6082","Only 'amd' and 'system' modules are supported alongside --{0}."),Base_directory_to_resolve_non_absolute_module_names:t(6083,e.DiagnosticCategory.Message,"Base_directory_to_resolve_non_absolute_module_names_6083","Base directory to resolve non-absolute module names."),Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit:t(6084,e.DiagnosticCategory.Message,"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084","[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),Enable_tracing_of_the_name_resolution_process:t(6085,e.DiagnosticCategory.Message,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:t(6086,e.DiagnosticCategory.Message,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:t(6087,e.DiagnosticCategory.Message,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:t(6088,e.DiagnosticCategory.Message,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Module_name_0_was_successfully_resolved_to_1:t(6089,e.DiagnosticCategory.Message,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:t(6090,e.DiagnosticCategory.Message,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0:t(6091,e.DiagnosticCategory.Message,"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091","'paths' option is specified, looking for a pattern to match module name '{0}'."),Module_name_0_matched_pattern_1:t(6092,e.DiagnosticCategory.Message,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:t(6093,e.DiagnosticCategory.Message,"Trying_substitution_0_candidate_module_location_Colon_1_6093","Trying substitution '{0}', candidate module location: '{1}'."),Resolving_module_name_0_relative_to_base_url_1_2:t(6094,e.DiagnosticCategory.Message,"Resolving_module_name_0_relative_to_base_url_1_2_6094","Resolving module name '{0}' relative to base url '{1}' - '{2}'."),Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1:t(6095,e.DiagnosticCategory.Message,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095","Loading module as file / folder, candidate module location '{0}', target file type '{1}'."),File_0_does_not_exist:t(6096,e.DiagnosticCategory.Message,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exist_use_it_as_a_name_resolution_result:t(6097,e.DiagnosticCategory.Message,"File_0_exist_use_it_as_a_name_resolution_result_6097","File '{0}' exist - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_type_1:t(6098,e.DiagnosticCategory.Message,"Loading_module_0_from_node_modules_folder_target_file_type_1_6098","Loading module '{0}' from 'node_modules' folder, target file type '{1}'."),Found_package_json_at_0:t(6099,e.DiagnosticCategory.Message,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:t(6100,e.DiagnosticCategory.Message,"package_json_does_not_have_a_0_field_6100","'package.json' does not have a '{0}' field."),package_json_has_0_field_1_that_references_2:t(6101,e.DiagnosticCategory.Message,"package_json_has_0_field_1_that_references_2_6101","'package.json' has '{0}' field '{1}' that references '{2}'."),Allow_javascript_files_to_be_compiled:t(6102,e.DiagnosticCategory.Message,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Option_0_should_have_array_of_strings_as_a_value:t(6103,e.DiagnosticCategory.Error,"Option_0_should_have_array_of_strings_as_a_value_6103","Option '{0}' should have array of strings as a value."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:t(6104,e.DiagnosticCategory.Message,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Expected_type_of_0_field_in_package_json_to_be_1_got_2:t(6105,e.DiagnosticCategory.Message,"Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105","Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."),baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1:t(6106,e.DiagnosticCategory.Message,"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106","'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:t(6107,e.DiagnosticCategory.Message,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Longest_matching_prefix_for_0_is_1:t(6108,e.DiagnosticCategory.Message,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:t(6109,e.DiagnosticCategory.Message,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:t(6110,e.DiagnosticCategory.Message,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:t(6111,e.DiagnosticCategory.Message,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:t(6112,e.DiagnosticCategory.Message,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:t(6113,e.DiagnosticCategory.Message,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:t(6114,e.DiagnosticCategory.Error,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Raise_error_on_this_expressions_with_an_implied_any_type:t(6115,e.DiagnosticCategory.Message,"Raise_error_on_this_expressions_with_an_implied_any_type_6115","Raise error on 'this' expressions with an implied 'any' type."),Resolving_type_reference_directive_0_containing_file_1_root_directory_2:t(6116,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Resolving_using_primary_search_paths:t(6117,e.DiagnosticCategory.Message,"Resolving_using_primary_search_paths_6117","Resolving using primary search paths..."),Resolving_from_node_modules_folder:t(6118,e.DiagnosticCategory.Message,"Resolving_from_node_modules_folder_6118","Resolving from node_modules folder..."),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:t(6119,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119","======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),Type_reference_directive_0_was_not_resolved:t(6120,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:t(6121,e.DiagnosticCategory.Message,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:t(6122,e.DiagnosticCategory.Message,"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122","Root directory cannot be determined, skipping primary search paths."),Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set:t(6123,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123","======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"),Type_declaration_files_to_be_included_in_compilation:t(6124,e.DiagnosticCategory.Message,"Type_declaration_files_to_be_included_in_compilation_6124","Type declaration files to be included in compilation."),Looking_up_in_node_modules_folder_initial_location_0:t(6125,e.DiagnosticCategory.Message,"Looking_up_in_node_modules_folder_initial_location_0_6125","Looking up in 'node_modules' folder, initial location '{0}'."),Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder:t(6126,e.DiagnosticCategory.Message,"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126","Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1:t(6127,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127","======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set:t(6128,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128","======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"),Resolving_real_path_for_0_result_1:t(6130,e.DiagnosticCategory.Message,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system:t(6131,e.DiagnosticCategory.Error,"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131","Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."),File_name_0_has_a_1_extension_stripping_it:t(6132,e.DiagnosticCategory.Message,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),_0_is_declared_but_its_value_is_never_read:t(6133,e.DiagnosticCategory.Error,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),Report_errors_on_unused_locals:t(6134,e.DiagnosticCategory.Message,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:t(6135,e.DiagnosticCategory.Message,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:t(6136,e.DiagnosticCategory.Message,"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136","The maximum dependency depth to search under node_modules and load JavaScript files."),Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1:t(6137,e.DiagnosticCategory.Error,"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137","Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."),Property_0_is_declared_but_its_value_is_never_read:t(6138,e.DiagnosticCategory.Error,"Property_0_is_declared_but_its_value_is_never_read_6138","Property '{0}' is declared but its value is never read.",!0),Import_emit_helpers_from_tslib:t(6139,e.DiagnosticCategory.Message,"Import_emit_helpers_from_tslib_6139","Import emit helpers from 'tslib'."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:t(6140,e.DiagnosticCategory.Error,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Parse_in_strict_mode_and_emit_use_strict_for_each_source_file:t(6141,e.DiagnosticCategory.Message,"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141",'Parse in strict mode and emit "use strict" for each source file.'),Module_0_was_resolved_to_1_but_jsx_is_not_set:t(6142,e.DiagnosticCategory.Error,"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142","Module '{0}' was resolved to '{1}', but '--jsx' is not set."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:t(6144,e.DiagnosticCategory.Message,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified:t(6145,e.DiagnosticCategory.Message,"Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145","Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."),Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h:t(6146,e.DiagnosticCategory.Message,"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146","Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."),Resolution_for_module_0_was_found_in_cache_from_location_1:t(6147,e.DiagnosticCategory.Message,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Directory_0_does_not_exist_skipping_all_lookups_in_it:t(6148,e.DiagnosticCategory.Message,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:t(6149,e.DiagnosticCategory.Message,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:t(6150,e.DiagnosticCategory.Message,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:t(6151,e.DiagnosticCategory.Message,"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151","Emit a single file with source maps instead of having a separate file."),Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set:t(6152,e.DiagnosticCategory.Message,"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152","Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."),Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule:t(6153,e.DiagnosticCategory.Message,"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153","Transpile each file as a separate module (similar to 'ts.transpileModule')."),Print_names_of_generated_files_part_of_the_compilation:t(6154,e.DiagnosticCategory.Message,"Print_names_of_generated_files_part_of_the_compilation_6154","Print names of generated files part of the compilation."),Print_names_of_files_part_of_the_compilation:t(6155,e.DiagnosticCategory.Message,"Print_names_of_files_part_of_the_compilation_6155","Print names of files part of the compilation."),The_locale_used_when_displaying_messages_to_the_user_e_g_en_us:t(6156,e.DiagnosticCategory.Message,"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156","The locale used when displaying messages to the user (e.g. 'en-us')"),Do_not_generate_custom_helper_functions_like_extends_in_compiled_output:t(6157,e.DiagnosticCategory.Message,"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157","Do not generate custom helper functions like '__extends' in compiled output."),Do_not_include_the_default_library_file_lib_d_ts:t(6158,e.DiagnosticCategory.Message,"Do_not_include_the_default_library_file_lib_d_ts_6158","Do not include the default library file (lib.d.ts)."),Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files:t(6159,e.DiagnosticCategory.Message,"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159","Do not add triple-slash references or imported modules to the list of compiled files."),Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files:t(6160,e.DiagnosticCategory.Message,"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160","[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."),List_of_folders_to_include_type_definitions_from:t(6161,e.DiagnosticCategory.Message,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:t(6162,e.DiagnosticCategory.Message,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:t(6163,e.DiagnosticCategory.Message,"The_character_set_of_the_input_files_6163","The character set of the input files."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:t(6164,e.DiagnosticCategory.Message,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Do_not_truncate_error_messages:t(6165,e.DiagnosticCategory.Message,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:t(6166,e.DiagnosticCategory.Message,"Output_directory_for_generated_declaration_files_6166","Output directory for generated declaration files."),A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl:t(6167,e.DiagnosticCategory.Message,"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167","A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime:t(6168,e.DiagnosticCategory.Message,"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168","List of root folders whose combined content represents the structure of the project at runtime."),Show_all_compiler_options:t(6169,e.DiagnosticCategory.Message,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:t(6170,e.DiagnosticCategory.Message,"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170","[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),Command_line_Options:t(6171,e.DiagnosticCategory.Message,"Command_line_Options_6171","Command-line Options"),Basic_Options:t(6172,e.DiagnosticCategory.Message,"Basic_Options_6172","Basic Options"),Strict_Type_Checking_Options:t(6173,e.DiagnosticCategory.Message,"Strict_Type_Checking_Options_6173","Strict Type-Checking Options"),Module_Resolution_Options:t(6174,e.DiagnosticCategory.Message,"Module_Resolution_Options_6174","Module Resolution Options"),Source_Map_Options:t(6175,e.DiagnosticCategory.Message,"Source_Map_Options_6175","Source Map Options"),Additional_Checks:t(6176,e.DiagnosticCategory.Message,"Additional_Checks_6176","Additional Checks"),Experimental_Options:t(6177,e.DiagnosticCategory.Message,"Experimental_Options_6177","Experimental Options"),Advanced_Options:t(6178,e.DiagnosticCategory.Message,"Advanced_Options_6178","Advanced Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3:t(6179,e.DiagnosticCategory.Message,"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179","Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."),Enable_all_strict_type_checking_options:t(6180,e.DiagnosticCategory.Message,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),List_of_language_service_plugins:t(6181,e.DiagnosticCategory.Message,"List_of_language_service_plugins_6181","List of language service plugins."),Scoped_package_detected_looking_in_0:t(6182,e.DiagnosticCategory.Message,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_to_file_1_from_old_program:t(6183,e.DiagnosticCategory.Message,"Reusing_resolution_of_module_0_to_file_1_from_old_program_6183","Reusing resolution of module '{0}' to file '{1}' from old program."),Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program:t(6184,e.DiagnosticCategory.Message,"Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184","Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program."),Disable_strict_checking_of_generic_signatures_in_function_types:t(6185,e.DiagnosticCategory.Message,"Disable_strict_checking_of_generic_signatures_in_function_types_6185","Disable strict checking of generic signatures in function types."),Enable_strict_checking_of_function_types:t(6186,e.DiagnosticCategory.Message,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:t(6187,e.DiagnosticCategory.Message,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:t(6188,e.DiagnosticCategory.Error,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:t(6189,e.DiagnosticCategory.Error,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen:t(6191,e.DiagnosticCategory.Message,"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191","Whether to keep outdated console output in watch mode instead of clearing the screen."),All_imports_in_import_declaration_are_unused:t(6192,e.DiagnosticCategory.Error,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:t(6193,e.DiagnosticCategory.Message,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:t(6194,e.DiagnosticCategory.Message,"Found_0_errors_Watching_for_file_changes_6194","Found {0} errors. Watching for file changes."),Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols:t(6195,e.DiagnosticCategory.Message,"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195","Resolve 'keyof' to string valued property names only (no numbers or symbols)."),_0_is_declared_but_never_used:t(6196,e.DiagnosticCategory.Error,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:t(6197,e.DiagnosticCategory.Message,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:t(6198,e.DiagnosticCategory.Error,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:t(6199,e.DiagnosticCategory.Error,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:t(6200,e.DiagnosticCategory.Error,"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200","Definitions of the following identifiers conflict with those in another file: {0}"),Conflicts_are_in_this_file:t(6201,e.DiagnosticCategory.Message,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:t(6202,e.DiagnosticCategory.Error,"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202","Project references may not form a circular graph. Cycle detected: {0}"),_0_was_also_declared_here:t(6203,e.DiagnosticCategory.Message,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:t(6204,e.DiagnosticCategory.Message,"and_here_6204","and here."),All_type_parameters_are_unused:t(6205,e.DiagnosticCategory.Error,"All_type_parameters_are_unused_6205","All type parameters are unused."),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:t(6206,e.DiagnosticCategory.Message,"package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206","'package.json' has a 'typesVersions' field with version-specific path mappings."),package_json_does_not_have_a_typesVersions_entry_that_matches_version_0:t(6207,e.DiagnosticCategory.Message,"package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207","'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2:t(6208,e.DiagnosticCategory.Message,"package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208","'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."),package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range:t(6209,e.DiagnosticCategory.Message,"package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209","'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."),An_argument_for_0_was_not_provided:t(6210,e.DiagnosticCategory.Message,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:t(6211,e.DiagnosticCategory.Message,"An_argument_matching_this_binding_pattern_was_not_provided_6211","An argument matching this binding pattern was not provided."),Did_you_mean_to_call_this_expression:t(6212,e.DiagnosticCategory.Message,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:t(6213,e.DiagnosticCategory.Message,"Did_you_mean_to_use_new_with_this_expression_6213","Did you mean to use 'new' with this expression?"),Enable_strict_bind_call_and_apply_methods_on_functions:t(6214,e.DiagnosticCategory.Message,"Enable_strict_bind_call_and_apply_methods_on_functions_6214","Enable strict 'bind', 'call', and 'apply' methods on functions."),Using_compiler_options_of_project_reference_redirect_0:t(6215,e.DiagnosticCategory.Message,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:t(6216,e.DiagnosticCategory.Message,"Found_1_error_6216","Found 1 error."),Found_0_errors:t(6217,e.DiagnosticCategory.Message,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:t(6218,e.DiagnosticCategory.Message,"Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218","======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3:t(6219,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219","======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"),package_json_had_a_falsy_0_field:t(6220,e.DiagnosticCategory.Message,"package_json_had_a_falsy_0_field_6220","'package.json' had a falsy '{0}' field."),Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects:t(6221,e.DiagnosticCategory.Message,"Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221","Disable use of source files instead of declaration files from referenced projects."),Emit_class_fields_with_Define_instead_of_Set:t(6222,e.DiagnosticCategory.Message,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:t(6223,e.DiagnosticCategory.Message,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Disable_solution_searching_for_this_project:t(6224,e.DiagnosticCategory.Message,"Disable_solution_searching_for_this_project_6224","Disable solution searching for this project."),Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_UseFsEvents_UseFsEventsOnParentDirectory:t(6225,e.DiagnosticCategory.Message,"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225","Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling:t(6226,e.DiagnosticCategory.Message,"Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226","Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'."),Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority:t(6227,e.DiagnosticCategory.Message,"Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227","Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'."),Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively:t(6228,e.DiagnosticCategory.Message,"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228","Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively."),Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3:t(6229,e.DiagnosticCategory.Error,"Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229","Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line:t(6230,e.DiagnosticCategory.Error,"Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230","Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."),Could_not_resolve_the_path_0_with_the_extensions_Colon_1:t(6231,e.DiagnosticCategory.Error,"Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231","Could not resolve the path '{0}' with the extensions: {1}."),Declaration_augments_declaration_in_another_file_This_cannot_be_serialized:t(6232,e.DiagnosticCategory.Error,"Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232","Declaration augments declaration in another file. This cannot be serialized."),This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file:t(6233,e.DiagnosticCategory.Error,"This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233","This is the declaration being augmented. Consider moving the augmenting declaration into the same file."),This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without:t(6234,e.DiagnosticCategory.Error,"This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234","This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"),Disable_loading_referenced_projects:t(6235,e.DiagnosticCategory.Message,"Disable_loading_referenced_projects_6235","Disable loading referenced projects."),Arguments_for_the_rest_parameter_0_were_not_provided:t(6236,e.DiagnosticCategory.Error,"Arguments_for_the_rest_parameter_0_were_not_provided_6236","Arguments for the rest parameter '{0}' were not provided."),Generates_an_event_trace_and_a_list_of_types:t(6237,e.DiagnosticCategory.Message,"Generates_an_event_trace_and_a_list_of_types_6237","Generates an event trace and a list of types."),Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react:t(6238,e.DiagnosticCategory.Error,"Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238","Specify the module specifier to be used to import the `jsx` and `jsxs` factory functions from. eg, react"),Projects_to_reference:t(6300,e.DiagnosticCategory.Message,"Projects_to_reference_6300","Projects to reference"),Enable_project_compilation:t(6302,e.DiagnosticCategory.Message,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:t(6304,e.DiagnosticCategory.Error,"Composite_projects_may_not_disable_declaration_emit_6304","Composite projects may not disable declaration emit."),Output_file_0_has_not_been_built_from_source_file_1:t(6305,e.DiagnosticCategory.Error,"Output_file_0_has_not_been_built_from_source_file_1_6305","Output file '{0}' has not been built from source file '{1}'."),Referenced_project_0_must_have_setting_composite_Colon_true:t(6306,e.DiagnosticCategory.Error,"Referenced_project_0_must_have_setting_composite_Colon_true_6306","Referenced project '{0}' must have setting \"composite\": true."),File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern:t(6307,e.DiagnosticCategory.Error,"File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307","File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."),Cannot_prepend_project_0_because_it_does_not_have_outFile_set:t(6308,e.DiagnosticCategory.Error,"Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308","Cannot prepend project '{0}' because it does not have 'outFile' set"),Output_file_0_from_project_1_does_not_exist:t(6309,e.DiagnosticCategory.Error,"Output_file_0_from_project_1_does_not_exist_6309","Output file '{0}' from project '{1}' does not exist"),Referenced_project_0_may_not_disable_emit:t(6310,e.DiagnosticCategory.Error,"Referenced_project_0_may_not_disable_emit_6310","Referenced project '{0}' may not disable emit."),Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2:t(6350,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350","Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2:t(6351,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:t(6352,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352","Project '{0}' is out of date because output file '{1}' does not exist"),Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date:t(6353,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353","Project '{0}' is out of date because its dependency '{1}' is out of date"),Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies:t(6354,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354","Project '{0}' is up to date with .d.ts files from its dependencies"),Projects_in_this_build_Colon_0:t(6355,e.DiagnosticCategory.Message,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:t(6356,e.DiagnosticCategory.Message,"A_non_dry_build_would_delete_the_following_files_Colon_0_6356","A non-dry build would delete the following files: {0}"),A_non_dry_build_would_build_project_0:t(6357,e.DiagnosticCategory.Message,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:t(6358,e.DiagnosticCategory.Message,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:t(6359,e.DiagnosticCategory.Message,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),delete_this_Project_0_is_up_to_date_because_it_was_previously_built:t(6360,e.DiagnosticCategory.Message,"delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360","delete this - Project '{0}' is up to date because it was previously built"),Project_0_is_up_to_date:t(6361,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:t(6362,e.DiagnosticCategory.Message,"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362","Skipping build of project '{0}' because its dependency '{1}' has errors"),Project_0_can_t_be_built_because_its_dependency_1_has_errors:t(6363,e.DiagnosticCategory.Message,"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363","Project '{0}' can't be built because its dependency '{1}' has errors"),Build_one_or_more_projects_and_their_dependencies_if_out_of_date:t(6364,e.DiagnosticCategory.Message,"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364","Build one or more projects and their dependencies, if out of date"),Delete_the_outputs_of_all_projects:t(6365,e.DiagnosticCategory.Message,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects"),Enable_verbose_logging:t(6366,e.DiagnosticCategory.Message,"Enable_verbose_logging_6366","Enable verbose logging"),Show_what_would_be_built_or_deleted_if_specified_with_clean:t(6367,e.DiagnosticCategory.Message,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Build_all_projects_including_those_that_appear_to_be_up_to_date:t(6368,e.DiagnosticCategory.Message,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6368","Build all projects, including those that appear to be up to date"),Option_build_must_be_the_first_command_line_argument:t(6369,e.DiagnosticCategory.Error,"Option_build_must_be_the_first_command_line_argument_6369","Option '--build' must be the first command line argument."),Options_0_and_1_cannot_be_combined:t(6370,e.DiagnosticCategory.Error,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:t(6371,e.DiagnosticCategory.Message,"Updating_unchanged_output_timestamps_of_project_0_6371","Updating unchanged output timestamps of project '{0}'..."),Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed:t(6372,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372","Project '{0}' is out of date because output of its dependency '{1}' has changed"),Updating_output_of_project_0:t(6373,e.DiagnosticCategory.Message,"Updating_output_of_project_0_6373","Updating output of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:t(6374,e.DiagnosticCategory.Message,"A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374","A non-dry build would update timestamps for output of project '{0}'"),A_non_dry_build_would_update_output_of_project_0:t(6375,e.DiagnosticCategory.Message,"A_non_dry_build_would_update_output_of_project_0_6375","A non-dry build would update output of project '{0}'"),Cannot_update_output_of_project_0_because_there_was_error_reading_file_1:t(6376,e.DiagnosticCategory.Message,"Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376","Cannot update output of project '{0}' because there was error reading file '{1}'"),Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1:t(6377,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377","Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"),Enable_incremental_compilation:t(6378,e.DiagnosticCategory.Message,"Enable_incremental_compilation_6378","Enable incremental compilation"),Composite_projects_may_not_disable_incremental_compilation:t(6379,e.DiagnosticCategory.Error,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:t(6380,e.DiagnosticCategory.Message,"Specify_file_to_store_incremental_compilation_information_6380","Specify file to store incremental compilation information"),Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2:t(6381,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381","Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),Skipping_build_of_project_0_because_its_dependency_1_was_not_built:t(6382,e.DiagnosticCategory.Message,"Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382","Skipping build of project '{0}' because its dependency '{1}' was not built"),Project_0_can_t_be_built_because_its_dependency_1_was_not_built:t(6383,e.DiagnosticCategory.Message,"Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383","Project '{0}' can't be built because its dependency '{1}' was not built"),Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:t(6384,e.DiagnosticCategory.Message,"Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384","Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."),_0_is_deprecated:t(6385,e.DiagnosticCategory.Suggestion,"_0_is_deprecated_6385","'{0}' is deprecated",void 0,void 0,!0),Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found:t(6386,e.DiagnosticCategory.Message,"Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386","Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:t(6500,e.DiagnosticCategory.Message,"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500","The expected type comes from property '{0}' which is declared here on type '{1}'"),The_expected_type_comes_from_this_index_signature:t(6501,e.DiagnosticCategory.Message,"The_expected_type_comes_from_this_index_signature_6501","The expected type comes from this index signature."),The_expected_type_comes_from_the_return_type_of_this_signature:t(6502,e.DiagnosticCategory.Message,"The_expected_type_comes_from_the_return_type_of_this_signature_6502","The expected type comes from the return type of this signature."),Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing:t(6503,e.DiagnosticCategory.Message,"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503","Print names of files that are part of the compilation and then stop processing."),File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option:t(6504,e.DiagnosticCategory.Error,"File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504","File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"),Include_undefined_in_index_signature_results:t(6800,e.DiagnosticCategory.Message,"Include_undefined_in_index_signature_results_6800","Include 'undefined' in index signature results"),Variable_0_implicitly_has_an_1_type:t(7005,e.DiagnosticCategory.Error,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:t(7006,e.DiagnosticCategory.Error,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:t(7008,e.DiagnosticCategory.Error,"Member_0_implicitly_has_an_1_type_7008","Member '{0}' implicitly has an '{1}' type."),new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:t(7009,e.DiagnosticCategory.Error,"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009","'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:t(7010,e.DiagnosticCategory.Error,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010","'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:t(7011,e.DiagnosticCategory.Error,"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011","Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:t(7013,e.DiagnosticCategory.Error,"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013","Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:t(7014,e.DiagnosticCategory.Error,"Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014","Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:t(7015,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type:t(7016,e.DiagnosticCategory.Error,"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature:t(7017,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017","Element implicitly has an 'any' type because type '{0}' has no index signature."),Object_literal_s_property_0_implicitly_has_an_1_type:t(7018,e.DiagnosticCategory.Error,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Rest_parameter_0_implicitly_has_an_any_type:t(7019,e.DiagnosticCategory.Error,"Rest_parameter_0_implicitly_has_an_any_type_7019","Rest parameter '{0}' implicitly has an 'any[]' type."),Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:t(7020,e.DiagnosticCategory.Error,"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020","Call signature, which lacks return-type annotation, implicitly has an 'any' return type."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:t(7022,e.DiagnosticCategory.Error,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:t(7023,e.DiagnosticCategory.Error,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:t(7024,e.DiagnosticCategory.Error,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation:t(7025,e.DiagnosticCategory.Error,"Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025","Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."),JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:t(7026,e.DiagnosticCategory.Error,"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."),Unreachable_code_detected:t(7027,e.DiagnosticCategory.Error,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:t(7028,e.DiagnosticCategory.Error,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:t(7029,e.DiagnosticCategory.Error,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:t(7030,e.DiagnosticCategory.Error,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:t(7031,e.DiagnosticCategory.Error,"Binding_element_0_implicitly_has_an_1_type_7031","Binding element '{0}' implicitly has an '{1}' type."),Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation:t(7032,e.DiagnosticCategory.Error,"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032","Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."),Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation:t(7033,e.DiagnosticCategory.Error,"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033","Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."),Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined:t(7034,e.DiagnosticCategory.Error,"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034","Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."),Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0:t(7035,e.DiagnosticCategory.Error,"Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035","Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"),Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0:t(7036,e.DiagnosticCategory.Error,"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Dynamic import's specifier must be of type 'string', but here has type '{0}'."),Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports:t(7037,e.DiagnosticCategory.Message,"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037","Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead:t(7038,e.DiagnosticCategory.Message,"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038","Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),Mapped_object_type_implicitly_has_an_any_template_type:t(7039,e.DiagnosticCategory.Error,"Mapped_object_type_implicitly_has_an_any_template_type_7039","Mapped object type implicitly has an 'any' template type."),If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1:t(7040,e.DiagnosticCategory.Error,"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040","If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`"),The_containing_arrow_function_captures_the_global_value_of_this:t(7041,e.DiagnosticCategory.Error,"The_containing_arrow_function_captures_the_global_value_of_this_7041","The containing arrow function captures the global value of 'this'."),Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used:t(7042,e.DiagnosticCategory.Error,"Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042","Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."),Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:t(7043,e.DiagnosticCategory.Suggestion,"Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043","Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:t(7044,e.DiagnosticCategory.Suggestion,"Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044","Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:t(7045,e.DiagnosticCategory.Suggestion,"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045","Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage:t(7046,e.DiagnosticCategory.Suggestion,"Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046","Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."),Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:t(7047,e.DiagnosticCategory.Suggestion,"Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047","Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage:t(7048,e.DiagnosticCategory.Suggestion,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048","Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage:t(7049,e.DiagnosticCategory.Suggestion,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049","Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."),_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage:t(7050,e.DiagnosticCategory.Suggestion,"_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050","'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."),Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1:t(7051,e.DiagnosticCategory.Error,"Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051","Parameter has a name but no type. Did you mean '{0}: {1}'?"),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1:t(7052,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052","Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"),Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1:t(7053,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053","Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."),No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1:t(7054,e.DiagnosticCategory.Error,"No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054","No index signature with a parameter of type '{0}' was found on type '{1}'."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:t(7055,e.DiagnosticCategory.Error,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055","'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."),The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed:t(7056,e.DiagnosticCategory.Error,"The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056","The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."),You_cannot_rename_this_element:t(8e3,e.DiagnosticCategory.Error,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:t(8001,e.DiagnosticCategory.Error,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),import_can_only_be_used_in_TypeScript_files:t(8002,e.DiagnosticCategory.Error,"import_can_only_be_used_in_TypeScript_files_8002","'import ... =' can only be used in TypeScript files."),export_can_only_be_used_in_TypeScript_files:t(8003,e.DiagnosticCategory.Error,"export_can_only_be_used_in_TypeScript_files_8003","'export =' can only be used in TypeScript files."),Type_parameter_declarations_can_only_be_used_in_TypeScript_files:t(8004,e.DiagnosticCategory.Error,"Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004","Type parameter declarations can only be used in TypeScript files."),implements_clauses_can_only_be_used_in_TypeScript_files:t(8005,e.DiagnosticCategory.Error,"implements_clauses_can_only_be_used_in_TypeScript_files_8005","'implements' clauses can only be used in TypeScript files."),_0_declarations_can_only_be_used_in_TypeScript_files:t(8006,e.DiagnosticCategory.Error,"_0_declarations_can_only_be_used_in_TypeScript_files_8006","'{0}' declarations can only be used in TypeScript files."),Type_aliases_can_only_be_used_in_TypeScript_files:t(8008,e.DiagnosticCategory.Error,"Type_aliases_can_only_be_used_in_TypeScript_files_8008","Type aliases can only be used in TypeScript files."),The_0_modifier_can_only_be_used_in_TypeScript_files:t(8009,e.DiagnosticCategory.Error,"The_0_modifier_can_only_be_used_in_TypeScript_files_8009","The '{0}' modifier can only be used in TypeScript files."),Type_annotations_can_only_be_used_in_TypeScript_files:t(8010,e.DiagnosticCategory.Error,"Type_annotations_can_only_be_used_in_TypeScript_files_8010","Type annotations can only be used in TypeScript files."),Type_arguments_can_only_be_used_in_TypeScript_files:t(8011,e.DiagnosticCategory.Error,"Type_arguments_can_only_be_used_in_TypeScript_files_8011","Type arguments can only be used in TypeScript files."),Parameter_modifiers_can_only_be_used_in_TypeScript_files:t(8012,e.DiagnosticCategory.Error,"Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012","Parameter modifiers can only be used in TypeScript files."),Non_null_assertions_can_only_be_used_in_TypeScript_files:t(8013,e.DiagnosticCategory.Error,"Non_null_assertions_can_only_be_used_in_TypeScript_files_8013","Non-null assertions can only be used in TypeScript files."),Type_assertion_expressions_can_only_be_used_in_TypeScript_files:t(8016,e.DiagnosticCategory.Error,"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016","Type assertion expressions can only be used in TypeScript files."),Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0:t(8017,e.DiagnosticCategory.Error,"Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017","Octal literal types must use ES2015 syntax. Use the syntax '{0}'."),Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0:t(8018,e.DiagnosticCategory.Error,"Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018","Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."),Report_errors_in_js_files:t(8019,e.DiagnosticCategory.Message,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:t(8020,e.DiagnosticCategory.Error,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","JSDoc types can only be used inside documentation comments."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:t(8021,e.DiagnosticCategory.Error,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),JSDoc_0_is_not_attached_to_a_class:t(8022,e.DiagnosticCategory.Error,"JSDoc_0_is_not_attached_to_a_class_8022","JSDoc '@{0}' is not attached to a class."),JSDoc_0_1_does_not_match_the_extends_2_clause:t(8023,e.DiagnosticCategory.Error,"JSDoc_0_1_does_not_match_the_extends_2_clause_8023","JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:t(8024,e.DiagnosticCategory.Error,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),Class_declarations_cannot_have_more_than_one_augments_or_extends_tag:t(8025,e.DiagnosticCategory.Error,"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025","Class declarations cannot have more than one `@augments` or `@extends` tag."),Expected_0_type_arguments_provide_these_with_an_extends_tag:t(8026,e.DiagnosticCategory.Error,"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026","Expected {0} type arguments; provide these with an '@extends' tag."),Expected_0_1_type_arguments_provide_these_with_an_extends_tag:t(8027,e.DiagnosticCategory.Error,"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027","Expected {0}-{1} type arguments; provide these with an '@extends' tag."),JSDoc_may_only_appear_in_the_last_parameter_of_a_signature:t(8028,e.DiagnosticCategory.Error,"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028","JSDoc '...' may only appear in the last parameter of a signature."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:t(8029,e.DiagnosticCategory.Error,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),The_type_of_a_function_declaration_must_match_the_function_s_signature:t(8030,e.DiagnosticCategory.Error,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),You_cannot_rename_a_module_via_a_global_import:t(8031,e.DiagnosticCategory.Error,"You_cannot_rename_a_module_via_a_global_import_8031","You cannot rename a module via a global import."),Qualified_name_0_is_not_allowed_without_a_leading_param_object_1:t(8032,e.DiagnosticCategory.Error,"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032","Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags:t(8033,e.DiagnosticCategory.Error,"A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033","A JSDoc '@typedef' comment may not contain multiple '@type' tags."),The_tag_was_first_specified_here:t(8034,e.DiagnosticCategory.Error,"The_tag_was_first_specified_here_8034","The tag was first specified here."),Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause:t(9002,e.DiagnosticCategory.Error,"Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002","Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause."),class_expressions_are_not_currently_supported:t(9003,e.DiagnosticCategory.Error,"class_expressions_are_not_currently_supported_9003","'class' expressions are not currently supported."),Language_service_is_disabled:t(9004,e.DiagnosticCategory.Error,"Language_service_is_disabled_9004","Language service is disabled."),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:t(9005,e.DiagnosticCategory.Error,"Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005","Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:t(9006,e.DiagnosticCategory.Error,"Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006","Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),JSX_attributes_must_only_be_assigned_a_non_empty_expression:t(17e3,e.DiagnosticCategory.Error,"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000","JSX attributes must only be assigned a non-empty 'expression'."),JSX_elements_cannot_have_multiple_attributes_with_the_same_name:t(17001,e.DiagnosticCategory.Error,"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001","JSX elements cannot have multiple attributes with the same name."),Expected_corresponding_JSX_closing_tag_for_0:t(17002,e.DiagnosticCategory.Error,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),JSX_attribute_expected:t(17003,e.DiagnosticCategory.Error,"JSX_attribute_expected_17003","JSX attribute expected."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:t(17004,e.DiagnosticCategory.Error,"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004","Cannot use JSX unless the '--jsx' flag is provided."),A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:t(17005,e.DiagnosticCategory.Error,"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005","A constructor cannot contain a 'super' call when its class extends 'null'."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:t(17006,e.DiagnosticCategory.Error,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:t(17007,e.DiagnosticCategory.Error,"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007","A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),JSX_element_0_has_no_corresponding_closing_tag:t(17008,e.DiagnosticCategory.Error,"JSX_element_0_has_no_corresponding_closing_tag_17008","JSX element '{0}' has no corresponding closing tag."),super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:t(17009,e.DiagnosticCategory.Error,"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009","'super' must be called before accessing 'this' in the constructor of a derived class."),Unknown_type_acquisition_option_0:t(17010,e.DiagnosticCategory.Error,"Unknown_type_acquisition_option_0_17010","Unknown type acquisition option '{0}'."),super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class:t(17011,e.DiagnosticCategory.Error,"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011","'super' must be called before accessing a property of 'super' in the constructor of a derived class."),_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2:t(17012,e.DiagnosticCategory.Error,"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012","'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"),Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor:t(17013,e.DiagnosticCategory.Error,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."),JSX_fragment_has_no_corresponding_closing_tag:t(17014,e.DiagnosticCategory.Error,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:t(17015,e.DiagnosticCategory.Error,"Expected_corresponding_closing_tag_for_JSX_fragment_17015","Expected corresponding closing tag for JSX fragment."),The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option:t(17016,e.DiagnosticCategory.Error,"The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016","The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."),An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments:t(17017,e.DiagnosticCategory.Error,"An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017","An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."),Unknown_type_acquisition_option_0_Did_you_mean_1:t(17018,e.DiagnosticCategory.Error,"Unknown_type_acquisition_option_0_Did_you_mean_1_17018","Unknown type acquisition option '{0}'. Did you mean '{1}'?"),Circularity_detected_while_resolving_configuration_Colon_0:t(18e3,e.DiagnosticCategory.Error,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not:t(18001,e.DiagnosticCategory.Error,"A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001","A path in an 'extends' option must be relative or rooted, but '{0}' is not."),The_files_list_in_config_file_0_is_empty:t(18002,e.DiagnosticCategory.Error,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:t(18003,e.DiagnosticCategory.Error,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module:t(80001,e.DiagnosticCategory.Suggestion,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module_80001","File is a CommonJS module; it may be converted to an ES6 module."),This_constructor_function_may_be_converted_to_a_class_declaration:t(80002,e.DiagnosticCategory.Suggestion,"This_constructor_function_may_be_converted_to_a_class_declaration_80002","This constructor function may be converted to a class declaration."),Import_may_be_converted_to_a_default_import:t(80003,e.DiagnosticCategory.Suggestion,"Import_may_be_converted_to_a_default_import_80003","Import may be converted to a default import."),JSDoc_types_may_be_moved_to_TypeScript_types:t(80004,e.DiagnosticCategory.Suggestion,"JSDoc_types_may_be_moved_to_TypeScript_types_80004","JSDoc types may be moved to TypeScript types."),require_call_may_be_converted_to_an_import:t(80005,e.DiagnosticCategory.Suggestion,"require_call_may_be_converted_to_an_import_80005","'require' call may be converted to an import."),This_may_be_converted_to_an_async_function:t(80006,e.DiagnosticCategory.Suggestion,"This_may_be_converted_to_an_async_function_80006","This may be converted to an async function."),await_has_no_effect_on_the_type_of_this_expression:t(80007,e.DiagnosticCategory.Suggestion,"await_has_no_effect_on_the_type_of_this_expression_80007","'await' has no effect on the type of this expression."),Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers:t(80008,e.DiagnosticCategory.Suggestion,"Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008","Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."),Add_missing_super_call:t(90001,e.DiagnosticCategory.Message,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:t(90002,e.DiagnosticCategory.Message,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:t(90003,e.DiagnosticCategory.Message,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_unused_declaration_for_Colon_0:t(90004,e.DiagnosticCategory.Message,"Remove_unused_declaration_for_Colon_0_90004","Remove unused declaration for: '{0}'"),Remove_import_from_0:t(90005,e.DiagnosticCategory.Message,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:t(90006,e.DiagnosticCategory.Message,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:t(90007,e.DiagnosticCategory.Message,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:t(90008,e.DiagnosticCategory.Message,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_variable_statement:t(90010,e.DiagnosticCategory.Message,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:t(90011,e.DiagnosticCategory.Message,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:t(90012,e.DiagnosticCategory.Message,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_module_1:t(90013,e.DiagnosticCategory.Message,"Import_0_from_module_1_90013","Import '{0}' from module \"{1}\""),Change_0_to_1:t(90014,e.DiagnosticCategory.Message,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Add_0_to_existing_import_declaration_from_1:t(90015,e.DiagnosticCategory.Message,"Add_0_to_existing_import_declaration_from_1_90015","Add '{0}' to existing import declaration from \"{1}\""),Declare_property_0:t(90016,e.DiagnosticCategory.Message,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:t(90017,e.DiagnosticCategory.Message,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:t(90018,e.DiagnosticCategory.Message,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:t(90019,e.DiagnosticCategory.Message,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:t(90020,e.DiagnosticCategory.Message,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:t(90021,e.DiagnosticCategory.Message,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:t(90022,e.DiagnosticCategory.Message,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:t(90023,e.DiagnosticCategory.Message,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:t(90024,e.DiagnosticCategory.Message,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:t(90025,e.DiagnosticCategory.Message,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:t(90026,e.DiagnosticCategory.Message,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:t(90027,e.DiagnosticCategory.Message,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:t(90028,e.DiagnosticCategory.Message,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:t(90029,e.DiagnosticCategory.Message,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:t(90030,e.DiagnosticCategory.Message,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:t(90031,e.DiagnosticCategory.Message,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Import_default_0_from_module_1:t(90032,e.DiagnosticCategory.Message,"Import_default_0_from_module_1_90032","Import default '{0}' from module \"{1}\""),Add_default_import_0_to_existing_import_declaration_from_1:t(90033,e.DiagnosticCategory.Message,"Add_default_import_0_to_existing_import_declaration_from_1_90033","Add default import '{0}' to existing import declaration from \"{1}\""),Add_parameter_name:t(90034,e.DiagnosticCategory.Message,"Add_parameter_name_90034","Add parameter name"),Declare_private_property_0:t(90035,e.DiagnosticCategory.Message,"Declare_private_property_0_90035","Declare private property '{0}'"),Replace_0_with_Promise_1:t(90036,e.DiagnosticCategory.Message,"Replace_0_with_Promise_1_90036","Replace '{0}' with 'Promise<{1}>'"),Fix_all_incorrect_return_type_of_an_async_functions:t(90037,e.DiagnosticCategory.Message,"Fix_all_incorrect_return_type_of_an_async_functions_90037","Fix all incorrect return type of an async functions"),Declare_private_method_0:t(90038,e.DiagnosticCategory.Message,"Declare_private_method_0_90038","Declare private method '{0}'"),Remove_unused_destructuring_declaration:t(90039,e.DiagnosticCategory.Message,"Remove_unused_destructuring_declaration_90039","Remove unused destructuring declaration"),Remove_unused_declarations_for_Colon_0:t(90041,e.DiagnosticCategory.Message,"Remove_unused_declarations_for_Colon_0_90041","Remove unused declarations for: '{0}'"),Declare_a_private_field_named_0:t(90053,e.DiagnosticCategory.Message,"Declare_a_private_field_named_0_90053","Declare a private field named '{0}'."),Convert_function_to_an_ES2015_class:t(95001,e.DiagnosticCategory.Message,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_function_0_to_class:t(95002,e.DiagnosticCategory.Message,"Convert_function_0_to_class_95002","Convert function '{0}' to class"),Convert_0_to_1_in_0:t(95003,e.DiagnosticCategory.Message,"Convert_0_to_1_in_0_95003","Convert '{0}' to '{1} in {0}'"),Extract_to_0_in_1:t(95004,e.DiagnosticCategory.Message,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:t(95005,e.DiagnosticCategory.Message,"Extract_function_95005","Extract function"),Extract_constant:t(95006,e.DiagnosticCategory.Message,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:t(95007,e.DiagnosticCategory.Message,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:t(95008,e.DiagnosticCategory.Message,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:t(95009,e.DiagnosticCategory.Message,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Annotate_with_types_from_JSDoc:t(95010,e.DiagnosticCategory.Message,"Annotate_with_types_from_JSDoc_95010","Annotate with types from JSDoc"),Infer_type_of_0_from_usage:t(95011,e.DiagnosticCategory.Message,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:t(95012,e.DiagnosticCategory.Message,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:t(95013,e.DiagnosticCategory.Message,"Convert_to_default_import_95013","Convert to default import"),Install_0:t(95014,e.DiagnosticCategory.Message,"Install_0_95014","Install '{0}'"),Replace_import_with_0:t(95015,e.DiagnosticCategory.Message,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:t(95016,e.DiagnosticCategory.Message,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES6_module:t(95017,e.DiagnosticCategory.Message,"Convert_to_ES6_module_95017","Convert to ES6 module"),Add_undefined_type_to_property_0:t(95018,e.DiagnosticCategory.Message,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:t(95019,e.DiagnosticCategory.Message,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:t(95020,e.DiagnosticCategory.Message,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Convert_all_type_literals_to_mapped_type:t(95021,e.DiagnosticCategory.Message,"Convert_all_type_literals_to_mapped_type_95021","Convert all type literals to mapped type"),Add_all_missing_members:t(95022,e.DiagnosticCategory.Message,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:t(95023,e.DiagnosticCategory.Message,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:t(95024,e.DiagnosticCategory.Message,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:t(95025,e.DiagnosticCategory.Message,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:t(95026,e.DiagnosticCategory.Message,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:t(95027,e.DiagnosticCategory.Message,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:t(95028,e.DiagnosticCategory.Message,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:t(95029,e.DiagnosticCategory.Message,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:t(95030,e.DiagnosticCategory.Message,"Change_all_jsdoc_style_types_to_TypeScript_95030","Change all jsdoc-style types to TypeScript"),Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types:t(95031,e.DiagnosticCategory.Message,"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031","Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"),Implement_all_unimplemented_interfaces:t(95032,e.DiagnosticCategory.Message,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:t(95033,e.DiagnosticCategory.Message,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:t(95034,e.DiagnosticCategory.Message,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:t(95035,e.DiagnosticCategory.Message,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:t(95036,e.DiagnosticCategory.Message,"Make_all_super_calls_the_first_statement_in_their_constructor_95036","Make all 'super()' calls the first statement in their constructor"),Add_qualifier_to_all_unresolved_variables_matching_a_member_name:t(95037,e.DiagnosticCategory.Message,"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037","Add qualifier to all unresolved variables matching a member name"),Change_all_extended_interfaces_to_implements:t(95038,e.DiagnosticCategory.Message,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:t(95039,e.DiagnosticCategory.Message,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:t(95040,e.DiagnosticCategory.Message,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:t(95041,e.DiagnosticCategory.Message,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:t(95042,e.DiagnosticCategory.Message,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:t(95043,e.DiagnosticCategory.Message,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:t(95044,e.DiagnosticCategory.Message,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:t(95045,e.DiagnosticCategory.Message,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:t(95046,e.DiagnosticCategory.Message,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:t(95047,e.DiagnosticCategory.Message,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:t(95048,e.DiagnosticCategory.Message,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:t(95049,e.DiagnosticCategory.Message,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:t(95050,e.DiagnosticCategory.Message,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:t(95051,e.DiagnosticCategory.Message,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:t(95052,e.DiagnosticCategory.Message,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:t(95053,e.DiagnosticCategory.Message,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:t(95054,e.DiagnosticCategory.Message,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:t(95055,e.DiagnosticCategory.Message,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:t(95056,e.DiagnosticCategory.Message,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:t(95057,e.DiagnosticCategory.Message,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:t(95058,e.DiagnosticCategory.Message,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:t(95059,e.DiagnosticCategory.Message,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:t(95060,e.DiagnosticCategory.Message,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:t(95061,e.DiagnosticCategory.Message,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:t(95062,e.DiagnosticCategory.Message,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:t(95063,e.DiagnosticCategory.Message,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:t(95064,e.DiagnosticCategory.Message,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:t(95065,e.DiagnosticCategory.Message,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:t(95066,e.DiagnosticCategory.Message,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_missing_call_parentheses:t(95067,e.DiagnosticCategory.Message,"Add_missing_call_parentheses_95067","Add missing call parentheses"),Add_all_missing_call_parentheses:t(95068,e.DiagnosticCategory.Message,"Add_all_missing_call_parentheses_95068","Add all missing call parentheses"),Add_unknown_conversion_for_non_overlapping_types:t(95069,e.DiagnosticCategory.Message,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:t(95070,e.DiagnosticCategory.Message,"Add_unknown_to_all_conversions_of_non_overlapping_types_95070","Add 'unknown' to all conversions of non-overlapping types"),Add_missing_new_operator_to_call:t(95071,e.DiagnosticCategory.Message,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:t(95072,e.DiagnosticCategory.Message,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:t(95073,e.DiagnosticCategory.Message,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:t(95074,e.DiagnosticCategory.Message,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:t(95075,e.DiagnosticCategory.Message,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Allow_accessing_UMD_globals_from_modules:t(95076,e.DiagnosticCategory.Message,"Allow_accessing_UMD_globals_from_modules_95076","Allow accessing UMD globals from modules."),Extract_type:t(95077,e.DiagnosticCategory.Message,"Extract_type_95077","Extract type"),Extract_to_type_alias:t(95078,e.DiagnosticCategory.Message,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:t(95079,e.DiagnosticCategory.Message,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:t(95080,e.DiagnosticCategory.Message,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:t(95081,e.DiagnosticCategory.Message,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:t(95082,e.DiagnosticCategory.Message,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:t(95083,e.DiagnosticCategory.Message,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:t(95084,e.DiagnosticCategory.Message,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:t(95085,e.DiagnosticCategory.Message,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:t(95086,e.DiagnosticCategory.Message,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:t(95087,e.DiagnosticCategory.Message,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:t(95088,e.DiagnosticCategory.Message,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:t(95089,e.DiagnosticCategory.Message,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:t(95090,e.DiagnosticCategory.Message,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:t(95091,e.DiagnosticCategory.Message,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:t(95092,e.DiagnosticCategory.Message,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:t(95093,e.DiagnosticCategory.Message,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:t(95094,e.DiagnosticCategory.Message,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:t(95095,e.DiagnosticCategory.Message,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),Convert_to_template_string:t(95096,e.DiagnosticCategory.Message,"Convert_to_template_string_95096","Convert to template string"),Add_export_to_make_this_file_into_a_module:t(95097,e.DiagnosticCategory.Message,"Add_export_to_make_this_file_into_a_module_95097","Add 'export {}' to make this file into a module"),Set_the_target_option_in_your_configuration_file_to_0:t(95098,e.DiagnosticCategory.Message,"Set_the_target_option_in_your_configuration_file_to_0_95098","Set the 'target' option in your configuration file to '{0}'"),Set_the_module_option_in_your_configuration_file_to_0:t(95099,e.DiagnosticCategory.Message,"Set_the_module_option_in_your_configuration_file_to_0_95099","Set the 'module' option in your configuration file to '{0}'"),Convert_invalid_character_to_its_html_entity_code:t(95100,e.DiagnosticCategory.Message,"Convert_invalid_character_to_its_html_entity_code_95100","Convert invalid character to its html entity code"),Convert_all_invalid_characters_to_HTML_entity_code:t(95101,e.DiagnosticCategory.Message,"Convert_all_invalid_characters_to_HTML_entity_code_95101","Convert all invalid characters to HTML entity code"),Add_class_tag:t(95102,e.DiagnosticCategory.Message,"Add_class_tag_95102","Add '@class' tag"),Add_this_tag:t(95103,e.DiagnosticCategory.Message,"Add_this_tag_95103","Add '@this' tag"),Add_this_parameter:t(95104,e.DiagnosticCategory.Message,"Add_this_parameter_95104","Add 'this' parameter."),Convert_function_expression_0_to_arrow_function:t(95105,e.DiagnosticCategory.Message,"Convert_function_expression_0_to_arrow_function_95105","Convert function expression '{0}' to arrow function"),Convert_function_declaration_0_to_arrow_function:t(95106,e.DiagnosticCategory.Message,"Convert_function_declaration_0_to_arrow_function_95106","Convert function declaration '{0}' to arrow function"),Fix_all_implicit_this_errors:t(95107,e.DiagnosticCategory.Message,"Fix_all_implicit_this_errors_95107","Fix all implicit-'this' errors"),Wrap_invalid_character_in_an_expression_container:t(95108,e.DiagnosticCategory.Message,"Wrap_invalid_character_in_an_expression_container_95108","Wrap invalid character in an expression container"),Wrap_all_invalid_characters_in_an_expression_container:t(95109,e.DiagnosticCategory.Message,"Wrap_all_invalid_characters_in_an_expression_container_95109","Wrap all invalid characters in an expression container"),Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file:t(95110,e.DiagnosticCategory.Message,"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file_95110","Visit https://aka.ms/tsconfig.json to read more about this file"),Add_a_return_statement:t(95111,e.DiagnosticCategory.Message,"Add_a_return_statement_95111","Add a return statement"),Remove_braces_from_arrow_function_body:t(95112,e.DiagnosticCategory.Message,"Remove_braces_from_arrow_function_body_95112","Remove braces from arrow function body"),Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal:t(95113,e.DiagnosticCategory.Message,"Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113","Wrap the following body with parentheses which should be an object literal"),Add_all_missing_return_statement:t(95114,e.DiagnosticCategory.Message,"Add_all_missing_return_statement_95114","Add all missing return statement"),Remove_braces_from_all_arrow_function_bodies_with_relevant_issues:t(95115,e.DiagnosticCategory.Message,"Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115","Remove braces from all arrow function bodies with relevant issues"),Wrap_all_object_literal_with_parentheses:t(95116,e.DiagnosticCategory.Message,"Wrap_all_object_literal_with_parentheses_95116","Wrap all object literal with parentheses"),Move_labeled_tuple_element_modifiers_to_labels:t(95117,e.DiagnosticCategory.Message,"Move_labeled_tuple_element_modifiers_to_labels_95117","Move labeled tuple element modifiers to labels"),Convert_overload_list_to_single_signature:t(95118,e.DiagnosticCategory.Message,"Convert_overload_list_to_single_signature_95118","Convert overload list to single signature"),Generate_get_and_set_accessors_for_all_overriding_properties:t(95119,e.DiagnosticCategory.Message,"Generate_get_and_set_accessors_for_all_overriding_properties_95119","Generate 'get' and 'set' accessors for all overriding properties"),Wrap_in_JSX_fragment:t(95120,e.DiagnosticCategory.Message,"Wrap_in_JSX_fragment_95120","Wrap in JSX fragment"),Wrap_all_unparented_JSX_in_JSX_fragment:t(95121,e.DiagnosticCategory.Message,"Wrap_all_unparented_JSX_in_JSX_fragment_95121","Wrap all unparented JSX in JSX fragment"),Convert_arrow_function_or_function_expression:t(95122,e.DiagnosticCategory.Message,"Convert_arrow_function_or_function_expression_95122","Convert arrow function or function expression"),Convert_to_anonymous_function:t(95123,e.DiagnosticCategory.Message,"Convert_to_anonymous_function_95123","Convert to anonymous function"),Convert_to_named_function:t(95124,e.DiagnosticCategory.Message,"Convert_to_named_function_95124","Convert to named function"),Convert_to_arrow_function:t(95125,e.DiagnosticCategory.Message,"Convert_to_arrow_function_95125","Convert to arrow function"),Remove_parentheses:t(95126,e.DiagnosticCategory.Message,"Remove_parentheses_95126","Remove parentheses"),Could_not_find_a_containing_arrow_function:t(95127,e.DiagnosticCategory.Message,"Could_not_find_a_containing_arrow_function_95127","Could not find a containing arrow function"),Containing_function_is_not_an_arrow_function:t(95128,e.DiagnosticCategory.Message,"Containing_function_is_not_an_arrow_function_95128","Containing function is not an arrow function"),Could_not_find_export_statement:t(95129,e.DiagnosticCategory.Message,"Could_not_find_export_statement_95129","Could not find export statement"),This_file_already_has_a_default_export:t(95130,e.DiagnosticCategory.Message,"This_file_already_has_a_default_export_95130","This file already has a default export"),Could_not_find_import_clause:t(95131,e.DiagnosticCategory.Message,"Could_not_find_import_clause_95131","Could not find import clause"),Could_not_find_namespace_import_or_named_imports:t(95132,e.DiagnosticCategory.Message,"Could_not_find_namespace_import_or_named_imports_95132","Could not find namespace import or named imports"),Selection_is_not_a_valid_type_node:t(95133,e.DiagnosticCategory.Message,"Selection_is_not_a_valid_type_node_95133","Selection is not a valid type node"),No_type_could_be_extracted_from_this_type_node:t(95134,e.DiagnosticCategory.Message,"No_type_could_be_extracted_from_this_type_node_95134","No type could be extracted from this type node"),Could_not_find_property_for_which_to_generate_accessor:t(95135,e.DiagnosticCategory.Message,"Could_not_find_property_for_which_to_generate_accessor_95135","Could not find property for which to generate accessor"),Name_is_not_valid:t(95136,e.DiagnosticCategory.Message,"Name_is_not_valid_95136","Name is not valid"),Can_only_convert_property_with_modifier:t(95137,e.DiagnosticCategory.Message,"Can_only_convert_property_with_modifier_95137","Can only convert property with modifier"),Switch_each_misused_0_to_1:t(95138,e.DiagnosticCategory.Message,"Switch_each_misused_0_to_1_95138","Switch each misused '{0}' to '{1}'"),Convert_to_optional_chain_expression:t(95139,e.DiagnosticCategory.Message,"Convert_to_optional_chain_expression_95139","Convert to optional chain expression"),Could_not_find_convertible_access_expression:t(95140,e.DiagnosticCategory.Message,"Could_not_find_convertible_access_expression_95140","Could not find convertible access expression"),Could_not_find_matching_access_expressions:t(95141,e.DiagnosticCategory.Message,"Could_not_find_matching_access_expressions_95141","Could not find matching access expressions"),Can_only_convert_logical_AND_access_chains:t(95142,e.DiagnosticCategory.Message,"Can_only_convert_logical_AND_access_chains_95142","Can only convert logical AND access chains"),Add_void_to_Promise_resolved_without_a_value:t(95143,e.DiagnosticCategory.Message,"Add_void_to_Promise_resolved_without_a_value_95143","Add 'void' to Promise resolved without a value"),Add_void_to_all_Promises_resolved_without_a_value:t(95144,e.DiagnosticCategory.Message,"Add_void_to_all_Promises_resolved_without_a_value_95144","Add 'void' to all Promises resolved without a value"),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:t(18004,e.DiagnosticCategory.Error,"No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004","No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),Classes_may_not_have_a_field_named_constructor:t(18006,e.DiagnosticCategory.Error,"Classes_may_not_have_a_field_named_constructor_18006","Classes may not have a field named 'constructor'."),JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array:t(18007,e.DiagnosticCategory.Error,"JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007","JSX expressions may not use the comma operator. Did you mean to write an array?"),Private_identifiers_cannot_be_used_as_parameters:t(18009,e.DiagnosticCategory.Error,"Private_identifiers_cannot_be_used_as_parameters_18009","Private identifiers cannot be used as parameters."),An_accessibility_modifier_cannot_be_used_with_a_private_identifier:t(18010,e.DiagnosticCategory.Error,"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010","An accessibility modifier cannot be used with a private identifier."),The_operand_of_a_delete_operator_cannot_be_a_private_identifier:t(18011,e.DiagnosticCategory.Error,"The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011","The operand of a 'delete' operator cannot be a private identifier."),constructor_is_a_reserved_word:t(18012,e.DiagnosticCategory.Error,"constructor_is_a_reserved_word_18012","'#constructor' is a reserved word."),Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier:t(18013,e.DiagnosticCategory.Error,"Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013","Property '{0}' is not accessible outside class '{1}' because it has a private identifier."),The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling:t(18014,e.DiagnosticCategory.Error,"The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014","The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."),Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2:t(18015,e.DiagnosticCategory.Error,"Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015","Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."),Private_identifiers_are_not_allowed_outside_class_bodies:t(18016,e.DiagnosticCategory.Error,"Private_identifiers_are_not_allowed_outside_class_bodies_18016","Private identifiers are not allowed outside class bodies."),The_shadowing_declaration_of_0_is_defined_here:t(18017,e.DiagnosticCategory.Error,"The_shadowing_declaration_of_0_is_defined_here_18017","The shadowing declaration of '{0}' is defined here"),The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here:t(18018,e.DiagnosticCategory.Error,"The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018","The declaration of '{0}' that you probably intended to use is defined here"),_0_modifier_cannot_be_used_with_a_private_identifier:t(18019,e.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier."),A_method_cannot_be_named_with_a_private_identifier:t(18022,e.DiagnosticCategory.Error,"A_method_cannot_be_named_with_a_private_identifier_18022","A method cannot be named with a private identifier."),An_accessor_cannot_be_named_with_a_private_identifier:t(18023,e.DiagnosticCategory.Error,"An_accessor_cannot_be_named_with_a_private_identifier_18023","An accessor cannot be named with a private identifier."),An_enum_member_cannot_be_named_with_a_private_identifier:t(18024,e.DiagnosticCategory.Error,"An_enum_member_cannot_be_named_with_a_private_identifier_18024","An enum member cannot be named with a private identifier."),can_only_be_used_at_the_start_of_a_file:t(18026,e.DiagnosticCategory.Error,"can_only_be_used_at_the_start_of_a_file_18026","'#!' can only be used at the start of a file."),Compiler_reserves_name_0_when_emitting_private_identifier_downlevel:t(18027,e.DiagnosticCategory.Error,"Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027","Compiler reserves name '{0}' when emitting private identifier downlevel."),Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher:t(18028,e.DiagnosticCategory.Error,"Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028","Private identifiers are only available when targeting ECMAScript 2015 and higher."),Private_identifiers_are_not_allowed_in_variable_declarations:t(18029,e.DiagnosticCategory.Error,"Private_identifiers_are_not_allowed_in_variable_declarations_18029","Private identifiers are not allowed in variable declarations."),An_optional_chain_cannot_contain_private_identifiers:t(18030,e.DiagnosticCategory.Error,"An_optional_chain_cannot_contain_private_identifiers_18030","An optional chain cannot contain private identifiers."),The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents:t(18031,e.DiagnosticCategory.Error,"The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031","The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."),The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some:t(18032,e.DiagnosticCategory.Error,"The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032","The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."),Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhaustiveness_checks_consider_using_an_object_literal_instead:t(18033,e.DiagnosticCategory.Error,"Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033","Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead."),Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment:t(18034,e.DiagnosticCategory.Message,"Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034","Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."),Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name:t(18035,e.DiagnosticCategory.Error,"Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035","Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name.")}}(u||(u={})),function(e){var t;function n(e){return e>=78}e.tokenIsIdentifierOrKeyword=n,e.tokenIsIdentifierOrKeywordOrGreaterThan=function(e){return 31===e||n(e)};var i=((t={abstract:125,any:128,as:126,asserts:127,bigint:155,boolean:131,break:80,case:81,catch:82,class:83,continue:85,const:84}).constructor=132,t.debugger=86,t.declare=133,t.default=87,t.delete=88,t.do=89,t.else=90,t.enum=91,t.export=92,t.extends=93,t.false=94,t.finally=95,t.for=96,t.from=153,t.function=97,t.get=134,t.if=98,t.implements=116,t.import=99,t.in=100,t.infer=135,t.instanceof=101,t.interface=117,t.intrinsic=136,t.is=137,t.keyof=138,t.let=118,t.module=139,t.namespace=140,t.never=141,t.new=102,t.null=103,t.number=144,t.object=145,t.package=119,t.private=120,t.protected=121,t.public=122,t.readonly=142,t.require=143,t.global=154,t.return=104,t.set=146,t.static=123,t.string=147,t.super=105,t.switch=106,t.symbol=148,t.this=107,t.throw=108,t.true=109,t.try=110,t.type=149,t.typeof=111,t.undefined=150,t.unique=151,t.unknown=152,t.var=112,t.void=113,t.while=114,t.with=115,t.yield=124,t.async=129,t.await=130,t.of=156,t),a=new e.Map(e.getEntries(i)),o=new e.Map(e.getEntries(r(r({},i),{"{":18,"}":19,"(":20,")":21,"[":22,"]":23,".":24,"...":25,";":26,",":27,"<":29,">":31,"<=":32,">=":33,"==":34,"!=":35,"===":36,"!==":37,"=>":38,"+":39,"-":40,"**":42,"*":41,"/":43,"%":44,"++":45,"--":46,"<<":47,">":48,">>>":49,"&":50,"|":51,"^":52,"!":53,"~":54,"&&":55,"||":56,"?":57,"??":60,"?.":28,":":58,"=":62,"+=":63,"-=":64,"*=":65,"**=":66,"/=":67,"%=":68,"<<=":69,">>=":70,">>>=":71,"&=":72,"|=":73,"^=":77,"||=":74,"&&=":75,"??=":76,"@":59,"`":61}))),s=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1569,1594,1600,1610,1649,1747,1749,1749,1765,1766,1786,1788,1808,1808,1810,1836,1920,1957,2309,2361,2365,2365,2384,2384,2392,2401,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2784,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2877,2877,2908,2909,2911,2913,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3294,3294,3296,3297,3333,3340,3342,3344,3346,3368,3370,3385,3424,3425,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3805,3840,3840,3904,3911,3913,3946,3976,3979,4096,4129,4131,4135,4137,4138,4176,4181,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6067,6176,6263,6272,6312,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8319,8319,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12329,12337,12341,12344,12346,12353,12436,12445,12446,12449,12538,12540,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65138,65140,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],u=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,768,846,864,866,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1155,1158,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1425,1441,1443,1465,1467,1469,1471,1471,1473,1474,1476,1476,1488,1514,1520,1522,1569,1594,1600,1621,1632,1641,1648,1747,1749,1756,1759,1768,1770,1773,1776,1788,1808,1836,1840,1866,1920,1968,2305,2307,2309,2361,2364,2381,2384,2388,2392,2403,2406,2415,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2492,2494,2500,2503,2504,2507,2509,2519,2519,2524,2525,2527,2531,2534,2545,2562,2562,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2649,2652,2654,2654,2662,2676,2689,2691,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2784,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2876,2883,2887,2888,2891,2893,2902,2903,2908,2909,2911,2913,2918,2927,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3006,3010,3014,3016,3018,3021,3031,3031,3047,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3134,3140,3142,3144,3146,3149,3157,3158,3168,3169,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3262,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3297,3302,3311,3330,3331,3333,3340,3342,3344,3346,3368,3370,3385,3390,3395,3398,3400,3402,3405,3415,3415,3424,3425,3430,3439,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3805,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3946,3953,3972,3974,3979,3984,3991,3993,4028,4038,4038,4096,4129,4131,4135,4137,4138,4140,4146,4150,4153,4160,4169,4176,4185,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,4969,4977,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6099,6112,6121,6160,6169,6176,6263,6272,6313,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8255,8256,8319,8319,8400,8412,8417,8417,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12335,12337,12341,12344,12346,12353,12436,12441,12442,12445,12446,12449,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65056,65059,65075,65076,65101,65103,65136,65138,65140,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500],c=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],l=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],d=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2208,2228,2230,2237,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312,6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12443,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12730,12784,12799,13312,19893,19968,40943,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42653,42656,42735,42775,42783,42786,42888,42891,42943,42946,42950,42999,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488,43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43879,43888,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66335,66349,66378,66384,66421,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66736,66771,66776,66811,66816,66855,66864,66915,67072,67382,67392,67413,67424,67431,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68899,69376,69404,69415,69415,69424,69445,69600,69622,69635,69687,69763,69807,69840,69864,69891,69926,69956,69956,69968,70002,70006,70006,70019,70066,70081,70084,70106,70106,70108,70108,70144,70161,70163,70187,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708,70727,70730,70751,70751,70784,70831,70852,70853,70855,70855,71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352,71424,71450,71680,71723,71840,71903,71935,71935,72096,72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250,72272,72272,72284,72329,72349,72349,72384,72440,72704,72712,72714,72750,72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030,73030,73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73728,74649,74752,74862,74880,75075,77824,78894,82944,83526,92160,92728,92736,92766,92880,92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208,100343,100352,101106,110592,110878,110928,110930,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,123136,123180,123191,123197,123214,123214,123584,123627,124928,125124,125184,125251,125259,125259,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173782,173824,177972,177984,178205,178208,183969,183984,191456,194560,195101],p=[48,57,65,90,95,95,97,122,170,170,181,181,183,183,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,895,895,902,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1327,1329,1366,1369,1369,1376,1416,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1519,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2045,2045,2048,2093,2112,2139,2144,2154,2208,2228,2230,2237,2259,2273,2275,2403,2406,2415,2417,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2556,2556,2558,2558,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2809,2815,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3072,3084,3086,3088,3090,3112,3114,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3162,3168,3171,3174,3183,3200,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3328,3331,3333,3340,3342,3344,3346,3396,3398,3400,3402,3406,3412,3415,3423,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3558,3567,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4969,4977,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6264,6272,6314,6320,6389,6400,6430,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6618,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6832,6845,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7296,7304,7312,7354,7357,7359,7376,7378,7380,7418,7424,7673,7675,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12730,12784,12799,13312,19893,19968,40943,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42737,42775,42783,42786,42888,42891,42943,42946,42950,42999,43047,43072,43123,43136,43205,43216,43225,43232,43255,43259,43259,43261,43309,43312,43347,43360,43388,43392,43456,43471,43481,43488,43518,43520,43574,43584,43597,43600,43609,43616,43638,43642,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43879,43888,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65071,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66045,66045,66176,66204,66208,66256,66272,66272,66304,66335,66349,66378,66384,66426,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66720,66729,66736,66771,66776,66811,66816,66855,66864,66915,67072,67382,67392,67413,67424,67431,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68099,68101,68102,68108,68115,68117,68119,68121,68149,68152,68154,68159,68159,68192,68220,68224,68252,68288,68295,68297,68326,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68903,68912,68921,69376,69404,69415,69415,69424,69456,69600,69622,69632,69702,69734,69743,69759,69818,69840,69864,69872,69881,69888,69940,69942,69951,69956,69958,69968,70003,70006,70006,70016,70084,70089,70092,70096,70106,70108,70108,70144,70161,70163,70199,70206,70206,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70378,70384,70393,70400,70403,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70459,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70730,70736,70745,70750,70751,70784,70853,70855,70855,70864,70873,71040,71093,71096,71104,71128,71133,71168,71232,71236,71236,71248,71257,71296,71352,71360,71369,71424,71450,71453,71467,71472,71481,71680,71738,71840,71913,71935,71935,72096,72103,72106,72151,72154,72161,72163,72164,72192,72254,72263,72263,72272,72345,72349,72349,72384,72440,72704,72712,72714,72758,72760,72768,72784,72793,72818,72847,72850,72871,72873,72886,72960,72966,72968,72969,72971,73014,73018,73018,73020,73021,73023,73031,73040,73049,73056,73061,73063,73064,73066,73102,73104,73105,73107,73112,73120,73129,73440,73462,73728,74649,74752,74862,74880,75075,77824,78894,82944,83526,92160,92728,92736,92766,92768,92777,92880,92909,92912,92916,92928,92982,92992,92995,93008,93017,93027,93047,93053,93071,93760,93823,93952,94026,94031,94087,94095,94111,94176,94177,94179,94179,94208,100343,100352,101106,110592,110878,110928,110930,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,113821,113822,119141,119145,119149,119154,119163,119170,119173,119179,119210,119213,119362,119364,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,120782,120831,121344,121398,121403,121452,121461,121461,121476,121476,121499,121503,121505,121519,122880,122886,122888,122904,122907,122913,122915,122916,122918,122922,123136,123180,123184,123197,123200,123209,123214,123214,123584,123641,124928,125124,125136,125142,125184,125259,125264,125273,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173782,173824,177972,177984,178205,178208,183969,183984,191456,194560,195101,917760,917999],f=/^\s*\/\/\/?\s*@(ts-expect-error|ts-ignore)/,h=/^\s*(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;function g(e,t){if(e=2?d:1===t?c:s)}e.isUnicodeIdentifierStart=m;var _,v=(_=[],o.forEach((function(e,t){_[e]=t})),_);function y(e){for(var t=new Array,n=0,r=0;n127&&k(i)&&(t.push(r),r=n)}}return t.push(r),t}function b(t,n,r,i,a){(n<0||n>=t.length)&&(a?n=n<0?0:n>=t.length?t.length-1:n:e.Debug.fail("Bad line number. Line: "+n+", lineStarts.length: "+t.length+" , line map is correct? "+(void 0!==i?e.arraysEqual(t,y(i)):"unknown")));var o=t[n]+r;return a?o>t[n+1]?t[n+1]:"string"==typeof i&&o>i.length?i.length:o:(n=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function k(e){return 10===e||13===e||8232===e||8233===e}function T(e){return e>=48&&e<=57}function w(e){return T(e)||e>=65&&e<=70||e>=97&&e<=102}function A(e){return e>=48&&e<=55}e.tokenToString=function(e){return v[e]},e.stringToToken=function(e){return o.get(e)},e.computeLineStarts=y,e.getPositionOfLineAndCharacter=function(e,t,n,r){return e.getPositionOfLineAndCharacter?e.getPositionOfLineAndCharacter(t,n,r):b(D(e),t,n,e.text,r)},e.computePositionOfLineAndCharacter=b,e.getLineStarts=D,e.computeLineAndCharacterOfPosition=E,e.computeLineOfPosition=C,e.getLinesBetweenPositions=function(e,t,n){if(t===n)return 0;var r=D(e),i=Math.min(t,n),a=i===n,o=a?t:n,s=C(r,i),u=C(r,o,s);return a?s-u:u-s},e.getLineAndCharacterOfPosition=function(e,t){return E(D(e),t)},e.isWhiteSpaceLike=S,e.isWhiteSpaceSingleLine=x,e.isLineBreak=k,e.isOctalDigit=A,e.couldStartTrivia=function(e,t){var n=e.charCodeAt(t);switch(n){case 13:case 10:case 9:case 11:case 12:case 32:case 47:case 60:case 124:case 61:case 62:return!0;case 35:return 0===t;default:return n>127}},e.skipTrivia=function(t,n,r,i){if(void 0===i&&(i=!1),e.positionIsSynthesized(n))return n;for(;;){var a=t.charCodeAt(n);switch(a){case 13:10===t.charCodeAt(n+1)&&n++;case 10:if(n++,r)return n;continue;case 9:case 11:case 12:case 32:n++;continue;case 47:if(i)break;if(47===t.charCodeAt(n+1)){for(n+=2;n127&&S(a)){n++;continue}}return n}};var O="<<<<<<<".length;function N(t,n){if(e.Debug.assert(n>=0),0===n||k(t.charCodeAt(n-1))){var r=t.charCodeAt(n);if(n+O=0&&n127&&S(g)){d&&k(g)&&(l=!0),n++;continue}break e}}return d&&(f=i(s,u,c,l,a,f)),f}function M(e,t,n,r,i){return R(!0,e,t,!1,n,r,i)}function B(e,t,n,r,i){return R(!0,e,t,!0,n,r,i)}function j(e,t,n,r,i,a){return a||(a=[]),a.push({kind:n,pos:e,end:t,hasTrailingNewLine:r}),a}function U(e){var t=F.exec(e);if(t)return t[0]}function V(e,t){return e>=65&&e<=90||e>=97&&e<=122||36===e||95===e||e>127&&m(e,t)}function z(e,t,n){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||36===e||95===e||1===n&&(45===e||58===e)||e>127&&function(e,t){return g(e,t>=2?p:1===t?l:u)}(e,t)}e.isShebangTrivia=L,e.scanShebangTrivia=P,e.forEachLeadingCommentRange=function(e,t,n,r){return R(!1,e,t,!1,n,r)},e.forEachTrailingCommentRange=function(e,t,n,r){return R(!1,e,t,!0,n,r)},e.reduceEachLeadingCommentRange=M,e.reduceEachTrailingCommentRange=B,e.getLeadingCommentRanges=function(e,t){return M(e,t,j,void 0,void 0)},e.getTrailingCommentRanges=function(e,t){return B(e,t,j,void 0,void 0)},e.getShebang=U,e.isIdentifierStart=V,e.isIdentifierPart=z,e.isIdentifierText=function(e,t,n){var r=H(e,0);if(!V(r,t))return!1;for(var i=W(r);i115},isReservedWord:function(){return m>=80&&m<=115},isUnterminated:function(){return 0!=(4&v)},getCommentDirectives:function(){return y},getNumericLiteralFlags:function(){return 1008&v},getTokenFlags:function(){return v},reScanGreaterToken:function(){if(31===m){if(62===b.charCodeAt(l))return 62===b.charCodeAt(l+1)?61===b.charCodeAt(l+2)?(l+=3,m=71):(l+=2,m=49):61===b.charCodeAt(l+1)?(l+=2,m=70):(l++,m=48);if(61===b.charCodeAt(l))return l++,m=33}return m},reScanAsteriskEqualsToken:function(){return e.Debug.assert(65===m,"'reScanAsteriskEqualsToken' should only be called on a '*='"),l=g+1,m=62},reScanSlashToken:function(){if(43===m||67===m){for(var n=g+1,r=!1,i=!1;;){if(n>=d){v|=4,C(e.Diagnostics.Unterminated_regular_expression_literal);break}var a=b.charCodeAt(n);if(k(a)){v|=4,C(e.Diagnostics.Unterminated_regular_expression_literal);break}if(r)r=!1;else{if(47===a&&!i){n++;break}91===a?i=!0:92===a?r=!0:93===a&&(i=!1)}n++}for(;n=d)return m=1;var e=H(b,l);switch(l+=W(e),e){case 9:case 11:case 12:case 32:for(;l=0&&V(n,t))return l+=3,v|=8,_=$()+Z(),m=ee();var r=Q();return r>=0&&V(r,t)?(l+=6,v|=1024,_=String.fromCharCode(r)+Z(),m=ee()):(l++,m=0)}if(V(e,t)){for(var i=e;l=65&&s<=70)s+=32;else if(!(s>=48&&s<=57||s>=97&&s<=102))break;i.push(s),l++,o=!1}}return i.length=d){r+=b.substring(i,l),v|=4,C(e.Diagnostics.Unterminated_string_literal);break}var a=b.charCodeAt(l);if(a===n){r+=b.substring(i,l),l++;break}if(92!==a||t){if(k(a)&&!t){r+=b.substring(i,l),v|=4,C(e.Diagnostics.Unterminated_string_literal);break}l++}else r+=b.substring(i,l),r+=Y(),i=l}return r}function G(t){for(var n,r=96===b.charCodeAt(l),i=++l,a="";;){if(l>=d){a+=b.substring(i,l),v|=4,C(e.Diagnostics.Unterminated_template_literal),n=r?14:17;break}var o=b.charCodeAt(l);if(96===o){a+=b.substring(i,l),l++,n=r?14:17;break}if(36===o&&l+1=d)return C(e.Diagnostics.Unexpected_end_of_text),"";var r=b.charCodeAt(l);switch(l++,r){case 48:return t&&l=0?String.fromCharCode(n):(C(e.Diagnostics.Hexadecimal_digit_expected),"")}function $(){var t=j(1,!1),n=t?parseInt(t,16):-1,r=!1;return n<0?(C(e.Diagnostics.Hexadecimal_digit_expected),r=!0):n>1114111&&(C(e.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),r=!0),l>=d?(C(e.Diagnostics.Unexpected_end_of_text),r=!0):125===b.charCodeAt(l)?l++:(C(e.Diagnostics.Unterminated_Unicode_escape_sequence),r=!0),r?"":q(n)}function Q(){if(l+5=2&&117===H(b,l+1)&&123===H(b,l+2)){var e=l;l+=3;var n=j(1,!1),r=n?parseInt(n,16):-1;return l=e,r}return-1}function Z(){for(var e="",n=l;l=0&&z(r,t)){l+=3,v|=8,e+=$(),n=l;continue}if(!((r=Q())>=0&&z(r,t)))break;v|=1024,e+=b.substring(n,l),e+=q(r),n=l+=6}}return e+b.substring(n,l)}function ee(){var e=_.length;if(e>=2&&e<=12){var t=_.charCodeAt(0);if(t>=97&&t<=122){var n=a.get(_);if(void 0!==n)return m=n}}return m=78}function te(t){for(var n="",r=!1,i=!1;;){var a=b.charCodeAt(l);if(95!==a){if(r=!0,!T(a)||a-48>=t)break;n+=b[l],l++,i=!1}else v|=512,r?(r=!1,i=!0):C(i?e.Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted:e.Diagnostics.Numeric_separators_are_not_allowed_here,l,1),l++}return 95===b.charCodeAt(l-1)&&C(e.Diagnostics.Numeric_separators_are_not_allowed_here,l-1,1),n}function ne(){if(110===b.charCodeAt(l))return _+="n",384&v&&(_=e.parsePseudoBigInt(_)+"n"),l++,9;var t=128&v?parseInt(_.slice(2),2):256&v?parseInt(_.slice(2),8):+_;return _=""+t,8}function re(){var n;p=l,v=0;for(var a=!1;;){if(g=l,l>=d)return m=1;var o=H(b,l);if(35===o&&0===l&&L(b,l)){if(l=P(b,l),r)continue;return m=6}switch(o){case 10:case 13:if(v|=1,r){l++;continue}return 13===o&&l+1=0&&V(E,t))return l+=3,v|=8,_=$()+Z(),m=ee();var S=Q();return S>=0&&V(S,t)?(l+=6,v|=1024,_=String.fromCharCode(S)+Z(),m=ee()):(C(e.Diagnostics.Invalid_character),l++,m=0);case 35:if(0!==l&&"!"===b[l+1])return C(e.Diagnostics.can_only_be_used_at_the_start_of_a_file),l++,m=0;if(l++,V(o=b.charCodeAt(l),t)){for(l++;l=d)return m=1;var t=b.charCodeAt(l);if(60===t)return 47===b.charCodeAt(l+1)?(l+=2,m=30):(l++,m=29);if(123===t)return l++,m=18;for(var n=0,r=-1;l0&&r++,k(t)&&0===n?n=-1:S(t)||(n=l),l++}var i=-1===r?l:r;return _=b.substring(p,i),-1===n?12:11}function oe(){switch(p=l,b.charCodeAt(l)){case 34:case 39:return _=K(!0),m=10;default:return re()}}function se(e,t){var n=l,r=p,i=g,a=m,o=_,s=v,u=e();return u&&!t||(l=n,p=r,g=i,m=a,_=o,v=s),u}function ue(e,t,n){b=e||"",d=void 0===n?b.length:t+n,ce(t||0)}function ce(t){e.Debug.assert(t>=0),l=t,p=t,g=t,m=0,_=void 0,v=0}};var H=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var r=e.charCodeAt(t);if(r>=55296&&r<=56319&&n>t+1){var i=e.charCodeAt(t+1);if(i>=56320&&i<=57343)return 1024*(r-55296)+i-56320+65536}return r}};function W(e){return e>=65536?2:1}var K=String.fromCodePoint?function(e){return String.fromCodePoint(e)}:function(t){if(e.Debug.assert(0<=t&&t<=1114111),t<=65535)return String.fromCharCode(t);var n=Math.floor((t-65536)/1024)+55296,r=(t-65536)%1024+56320;return String.fromCharCode(n,r)};function q(e){return K(e)}e.utf16EncodeAsString=q}(u||(u={})),function(e){function t(e){return e.start+e.length}function n(e){return 0===e.length}function r(e,t){var n=a(e,t);return n&&0===n.length?void 0:n}function i(e,t,n,r){return n<=e+t&&n+r>=e}function a(e,n){var r=Math.max(e.start,n.start),i=Math.min(t(e),t(n));return r<=i?s(r,i):void 0}function o(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function s(e,t){return o(e,t-e)}function u(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}function c(t){return!!$(t)&&e.every(t.elements,l)}function l(t){return!!e.isOmittedExpression(t)||c(t.name)}function d(t){for(var n=t.parent;e.isBindingElement(n.parent);)n=n.parent.parent;return n.parent}function p(t,n){e.isBindingElement(t)&&(t=d(t));var r=n(t);return 249===t.kind&&(t=t.parent),t&&250===t.kind&&(r|=n(t),t=t.parent),t&&232===t.kind&&(r|=n(t)),r}function f(e){return 0==(8&e.flags)}function h(e){var t=e;return t.length>=3&&95===t.charCodeAt(0)&&95===t.charCodeAt(1)&&95===t.charCodeAt(2)?t.substr(1):t}function g(e){return h(e.escapedText)}function m(t){var n=t.parent.parent;if(n){if(ae(n))return _(n);switch(n.kind){case 232:if(n.declarationList&&n.declarationList.declarations[0])return _(n.declarationList.declarations[0]);break;case 233:var r=n.expression;switch(216===r.kind&&62===r.operatorToken.kind&&(r=r.left),r.kind){case 201:return r.name;case 202:var i=r.argumentExpression;if(e.isIdentifier(i))return i}break;case 207:return _(n.expression);case 245:if(ae(n.statement)||te(n.statement))return _(n.statement)}}}function _(t){var n=D(t);return n&&e.isIdentifier(n)?n:void 0}function v(e){return e.name||m(e)}function y(e){return!!e.name}function b(t){switch(t.kind){case 78:return t;case 333:case 326:var n=t.name;if(157===n.kind)return n.right;break;case 203:case 216:var r=t;switch(e.getAssignmentDeclarationKind(r)){case 1:case 4:case 5:case 3:return e.getElementOrPropertyAccessArgumentExpressionOrName(r.left);case 7:case 8:case 9:return r.arguments[1];default:return}case 331:return v(t);case 325:return m(t);case 266:var i=t.expression;return e.isIdentifier(i)?i:void 0;case 202:var a=t;if(e.isBindableStaticElementAccessExpression(a))return a.argumentExpression}return t.name}function D(t){if(void 0!==t)return b(t)||(e.isFunctionExpression(t)||e.isClassExpression(t)?E(t):void 0)}function E(t){if(t.parent){if(e.isPropertyAssignment(t.parent)||e.isBindingElement(t.parent))return t.parent.name;if(e.isBinaryExpression(t.parent)&&t===t.parent.right){if(e.isIdentifier(t.parent.left))return t.parent.left;if(e.isAccessExpression(t.parent.left))return e.getElementOrPropertyAccessArgumentExpressionOrName(t.parent.left)}else if(e.isVariableDeclaration(t.parent)&&e.isIdentifier(t.parent.name))return t.parent.name}}function C(t,n){if(t.name){if(e.isIdentifier(t.name)){var r=t.name.escapedText;return A(t.parent,n).filter((function(t){return e.isJSDocParameterTag(t)&&e.isIdentifier(t.name)&&t.name.escapedText===r}))}var i=t.parent.parameters.indexOf(t);e.Debug.assert(i>-1,"Parameters should always be in their parents' parameter list");var a=A(t.parent,n).filter(e.isJSDocParameterTag);if(i=157}function B(e){return 8<=e&&e<=14}function j(e){return 14<=e&&e<=17}function U(t){return e.isPropertyDeclaration(t)&&e.isPrivateIdentifier(t.name)}function V(e){switch(e){case 125:case 129:case 84:case 133:case 87:case 92:case 122:case 120:case 121:case 142:case 123:return!0}return!1}function z(t){return!!(92&e.modifierToFlag(t))}function H(e){return e&&K(e.kind)}function W(e){switch(e){case 251:case 165:case 166:case 167:case 168:case 208:case 209:return!0;default:return!1}}function K(e){switch(e){case 164:case 169:case 313:case 170:case 171:case 174:case 308:case 175:return!0;default:return W(e)}}function q(e){var t=e.kind;return 166===t||163===t||165===t||167===t||168===t||171===t||229===t}function G(e){return e&&(252===e.kind||221===e.kind)}function Y(e){var t=e.kind;return 170===t||169===t||162===t||164===t||171===t}function J(e){var t=e.kind;return 288===t||289===t||290===t||165===t||167===t||168===t}function $(e){if(e){var t=e.kind;return 197===t||196===t}return!1}function Q(e){switch(e.kind){case 196:case 200:return!0}return!1}function X(e){switch(e.kind){case 197:case 199:return!0}return!1}function Z(e){switch(e){case 201:case 202:case 204:case 203:case 273:case 274:case 277:case 205:case 199:case 207:case 200:case 221:case 208:case 78:case 13:case 8:case 9:case 10:case 14:case 218:case 94:case 103:case 107:case 109:case 105:case 225:case 226:case 99:return!0;default:return!1}}function ee(e){switch(e){case 214:case 215:case 210:case 211:case 212:case 213:case 206:return!0;default:return Z(e)}}function te(e){return function(e){switch(e){case 217:case 219:case 209:case 216:case 220:case 224:case 222:case 337:case 336:return!0;default:return ee(e)}}(P(e).kind)}function ne(t){return e.isExportAssignment(t)||e.isExportDeclaration(t)}function re(e){return 251===e||271===e||252===e||253===e||254===e||255===e||256===e||261===e||260===e||267===e||266===e||259===e}function ie(e){return 241===e||240===e||248===e||235===e||233===e||231===e||238===e||239===e||237===e||234===e||245===e||242===e||244===e||246===e||247===e||232===e||236===e||243===e||335===e||339===e||338===e}function ae(t){return 159===t.kind?t.parent&&330!==t.parent.kind||e.isInJSFile(t):209===(n=t.kind)||198===n||252===n||221===n||166===n||255===n||291===n||270===n||251===n||208===n||167===n||262===n||260===n||265===n||253===n||280===n||165===n||164===n||256===n||259===n||263===n||269===n||160===n||288===n||163===n||162===n||168===n||289===n||254===n||159===n||249===n||331===n||324===n||333===n;var n}function oe(e){return e.kind>=314&&e.kind<=333}e.isExternalModuleNameRelative=function(t){return e.pathIsRelative(t)||e.isRootedDiskPath(t)},e.sortAndDeduplicateDiagnostics=function(t){return e.sortAndDeduplicate(t,e.compareDiagnostics)},e.getDefaultLibFileName=function(e){switch(e.target){case 99:return"lib.esnext.full.d.ts";case 7:return"lib.es2020.full.d.ts";case 6:return"lib.es2019.full.d.ts";case 5:return"lib.es2018.full.d.ts";case 4:return"lib.es2017.full.d.ts";case 3:return"lib.es2016.full.d.ts";case 2:return"lib.es6.d.ts";default:return"lib.d.ts"}},e.textSpanEnd=t,e.textSpanIsEmpty=n,e.textSpanContainsPosition=function(e,n){return n>=e.start&&n=e.pos&&t<=e.end},e.textSpanContainsTextSpan=function(e,n){return n.start>=e.start&&t(n)<=t(e)},e.textSpanOverlapsWith=function(e,t){return void 0!==r(e,t)},e.textSpanOverlap=r,e.textSpanIntersectsWithTextSpan=function(e,t){return i(e.start,e.length,t.start,t.length)},e.textSpanIntersectsWith=function(e,t,n){return i(e.start,e.length,t,n)},e.decodedTextSpanIntersectsWith=i,e.textSpanIntersectsWithPosition=function(e,n){return n<=t(e)&&n>=e.start},e.textSpanIntersection=a,e.createTextSpan=o,e.createTextSpanFromBounds=s,e.textChangeRangeNewSpan=function(e){return o(e.span.start,e.newLength)},e.textChangeRangeIsUnchanged=function(e){return n(e.span)&&0===e.newLength},e.createTextChangeRange=u,e.unchangedTextChangeRange=u(o(0,0),0),e.collapseTextChangeRangesAcrossMultipleVersions=function(n){if(0===n.length)return e.unchangedTextChangeRange;if(1===n.length)return n[0];for(var r=n[0],i=r.span.start,a=t(r.span),o=i+r.newLength,c=1;c=2&&95===e.charCodeAt(0)&&95===e.charCodeAt(1)?"_"+e:e},e.unescapeLeadingUnderscores=h,e.idText=g,e.symbolName=function(e){return e.valueDeclaration&&U(e.valueDeclaration)?g(e.valueDeclaration.name):h(e.escapedName)},e.nodeHasName=function t(n,r){return!(!y(n)||!e.isIdentifier(n.name)||g(n.name)!==g(r))||!(!e.isVariableStatement(n)||!e.some(n.declarationList.declarations,(function(e){return t(e,r)})))},e.getNameOfJSDocTypedef=v,e.isNamedDeclaration=y,e.getNonAssignedNameOfDeclaration=b,e.getNameOfDeclaration=D,e.getAssignedName=E,e.getJSDocParameterTags=S,e.getJSDocParameterTagsNoCache=function(e){return C(e,!0)},e.getJSDocTypeParameterTags=function(e){return x(e,!1)},e.getJSDocTypeParameterTagsNoCache=function(e){return x(e,!0)},e.hasJSDocParameterTags=function(t){return!!N(t,e.isJSDocParameterTag)},e.getJSDocAugmentsTag=function(t){return N(t,e.isJSDocAugmentsTag)},e.getJSDocImplementsTags=function(t){return I(t,e.isJSDocImplementsTag)},e.getJSDocClassTag=function(t){return N(t,e.isJSDocClassTag)},e.getJSDocPublicTag=function(t){return N(t,e.isJSDocPublicTag)},e.getJSDocPublicTagNoCache=function(t){return N(t,e.isJSDocPublicTag,!0)},e.getJSDocPrivateTag=function(t){return N(t,e.isJSDocPrivateTag)},e.getJSDocPrivateTagNoCache=function(t){return N(t,e.isJSDocPrivateTag,!0)},e.getJSDocProtectedTag=function(t){return N(t,e.isJSDocProtectedTag)},e.getJSDocProtectedTagNoCache=function(t){return N(t,e.isJSDocProtectedTag,!0)},e.getJSDocReadonlyTag=function(t){return N(t,e.isJSDocReadonlyTag)},e.getJSDocReadonlyTagNoCache=function(t){return N(t,e.isJSDocReadonlyTag,!0)},e.getJSDocDeprecatedTag=function(t){return N(t,e.isJSDocDeprecatedTag)},e.getJSDocDeprecatedTagNoCache=function(t){return N(t,e.isJSDocDeprecatedTag,!0)},e.getJSDocEnumTag=function(t){return N(t,e.isJSDocEnumTag)},e.getJSDocThisTag=function(t){return N(t,e.isJSDocThisTag)},e.getJSDocReturnTag=k,e.getJSDocTemplateTag=function(t){return N(t,e.isJSDocTemplateTag)},e.getJSDocTypeTag=T,e.getJSDocType=w,e.getJSDocReturnType=function(t){var n=k(t);if(n&&n.typeExpression)return n.typeExpression.type;var r=T(t);if(r&&r.typeExpression){var i=r.typeExpression.type;if(e.isTypeLiteralNode(i)){var a=e.find(i.members,e.isCallSignatureDeclaration);return a&&a.type}if(e.isFunctionTypeNode(i)||e.isJSDocFunctionType(i))return i.type}},e.getJSDocTags=O,e.getJSDocTagsNoCache=function(e){return A(e,!0)},e.getAllJSDocTags=I,e.getAllJSDocTagsOfKind=function(e,t){return O(e).filter((function(e){return e.kind===t}))},e.getEffectiveTypeParameterDeclarations=function(t){if(e.isJSDocSignature(t))return e.emptyArray;if(e.isJSDocTypeAlias(t))return e.Debug.assert(311===t.parent.kind),e.flatMap(t.parent.tags,(function(t){return e.isJSDocTemplateTag(t)?t.typeParameters:void 0}));if(t.typeParameters)return t.typeParameters;if(e.isInJSFile(t)){var n=e.getJSDocTypeParameterDeclarations(t);if(n.length)return n;var r=w(t);if(r&&e.isFunctionTypeNode(r)&&r.typeParameters)return r.typeParameters}return e.emptyArray},e.getEffectiveConstraintOfTypeParameter=function(t){return t.constraint?t.constraint:e.isJSDocTemplateTag(t.parent)&&t===t.parent.typeParameters[0]?t.parent.constraint:void 0},e.isIdentifierOrPrivateIdentifier=function(e){return 78===e.kind||79===e.kind},e.isGetOrSetAccessorDeclaration=function(e){return 168===e.kind||167===e.kind},e.isPropertyAccessChain=function(t){return e.isPropertyAccessExpression(t)&&!!(32&t.flags)},e.isElementAccessChain=function(t){return e.isElementAccessExpression(t)&&!!(32&t.flags)},e.isCallChain=function(t){return e.isCallExpression(t)&&!!(32&t.flags)},e.isOptionalChain=F,e.isOptionalChainRoot=L,e.isExpressionOfOptionalChainRoot=function(e){return L(e.parent)&&e.parent.expression===e},e.isOutermostOptionalChain=function(e){return!F(e.parent)||L(e.parent)||e!==e.parent.expression},e.isNullishCoalesce=function(e){return 216===e.kind&&60===e.operatorToken.kind},e.isConstTypeReference=function(t){return e.isTypeReferenceNode(t)&&e.isIdentifier(t.typeName)&&"const"===t.typeName.escapedText&&!t.typeArguments},e.skipPartiallyEmittedExpressions=P,e.isNonNullChain=function(t){return e.isNonNullExpression(t)&&!!(32&t.flags)},e.isBreakOrContinueStatement=function(e){return 241===e.kind||240===e.kind},e.isNamedExportBindings=function(e){return 269===e.kind||268===e.kind},e.isUnparsedTextLike=R,e.isUnparsedNode=function(e){return R(e)||292===e.kind||296===e.kind},e.isJSDocPropertyLikeTag=function(e){return 333===e.kind||326===e.kind},e.isNode=function(e){return M(e.kind)},e.isNodeKind=M,e.isToken=function(e){return e.kind>=0&&e.kind<=156},e.isNodeArray=function(e){return e.hasOwnProperty("pos")&&e.hasOwnProperty("end")},e.isLiteralKind=B,e.isLiteralExpression=function(e){return B(e.kind)},e.isTemplateLiteralKind=j,e.isTemplateLiteralToken=function(e){return j(e.kind)},e.isTemplateMiddleOrTemplateTail=function(e){var t=e.kind;return 16===t||17===t},e.isImportOrExportSpecifier=function(t){return e.isImportSpecifier(t)||e.isExportSpecifier(t)},e.isTypeOnlyImportOrExportDeclaration=function(e){switch(e.kind){case 265:case 270:return e.parent.parent.isTypeOnly;case 263:return e.parent.isTypeOnly;case 262:return e.isTypeOnly;default:return!1}},e.isStringTextContainingNode=function(e){return 10===e.kind||j(e.kind)},e.isGeneratedIdentifier=function(t){return e.isIdentifier(t)&&(7&t.autoGenerateFlags)>0},e.isPrivateIdentifierPropertyDeclaration=U,e.isPrivateIdentifierPropertyAccessExpression=function(t){return e.isPropertyAccessExpression(t)&&e.isPrivateIdentifier(t.name)},e.isModifierKind=V,e.isParameterPropertyModifier=z,e.isClassMemberModifier=function(e){return z(e)||123===e},e.isModifier=function(e){return V(e.kind)},e.isEntityName=function(e){var t=e.kind;return 157===t||78===t},e.isPropertyName=function(e){var t=e.kind;return 78===t||79===t||10===t||8===t||158===t},e.isBindingName=function(e){var t=e.kind;return 78===t||196===t||197===t},e.isFunctionLike=H,e.isFunctionLikeDeclaration=function(e){return e&&W(e.kind)},e.isFunctionLikeKind=K,e.isFunctionOrModuleBlock=function(t){return e.isSourceFile(t)||e.isModuleBlock(t)||e.isBlock(t)&&H(t.parent)},e.isClassElement=q,e.isClassLike=G,e.isAccessor=function(e){return e&&(167===e.kind||168===e.kind)},e.isMethodOrAccessor=function(e){switch(e.kind){case 165:case 167:case 168:return!0;default:return!1}},e.isTypeElement=Y,e.isClassOrTypeElement=function(e){return Y(e)||q(e)},e.isObjectLiteralElementLike=J,e.isTypeNode=function(t){return e.isTypeNodeKind(t.kind)},e.isFunctionOrConstructorTypeNode=function(e){switch(e.kind){case 174:case 175:return!0}return!1},e.isBindingPattern=$,e.isAssignmentPattern=function(e){var t=e.kind;return 199===t||200===t},e.isArrayBindingElement=function(e){var t=e.kind;return 198===t||222===t},e.isDeclarationBindingElement=function(e){switch(e.kind){case 249:case 160:case 198:return!0}return!1},e.isBindingOrAssignmentPattern=function(e){return Q(e)||X(e)},e.isObjectBindingOrAssignmentPattern=Q,e.isArrayBindingOrAssignmentPattern=X,e.isPropertyAccessOrQualifiedNameOrImportTypeNode=function(e){var t=e.kind;return 201===t||157===t||195===t},e.isPropertyAccessOrQualifiedName=function(e){var t=e.kind;return 201===t||157===t},e.isCallLikeExpression=function(e){switch(e.kind){case 275:case 274:case 203:case 204:case 205:case 161:return!0;default:return!1}},e.isCallOrNewExpression=function(e){return 203===e.kind||204===e.kind},e.isTemplateLiteral=function(e){var t=e.kind;return 218===t||14===t},e.isLeftHandSideExpression=function(e){return Z(P(e).kind)},e.isUnaryExpression=function(e){return ee(P(e).kind)},e.isUnaryExpressionWithWrite=function(e){switch(e.kind){case 215:return!0;case 214:return 45===e.operator||46===e.operator;default:return!1}},e.isExpression=te,e.isAssertionExpression=function(e){var t=e.kind;return 206===t||224===t},e.isNotEmittedOrPartiallyEmittedNode=function(t){return e.isNotEmittedStatement(t)||e.isPartiallyEmittedExpression(t)},e.isIterationStatement=function e(t,n){switch(t.kind){case 237:case 238:case 239:case 235:case 236:return!0;case 245:return n&&e(t.statement,n)}return!1},e.isScopeMarker=ne,e.hasScopeMarker=function(t){return e.some(t,ne)},e.needsScopeMarker=function(t){return!(e.isAnyImportOrReExport(t)||e.isExportAssignment(t)||e.hasSyntacticModifier(t,1)||e.isAmbientModule(t))},e.isExternalModuleIndicator=function(t){return e.isAnyImportOrReExport(t)||e.isExportAssignment(t)||e.hasSyntacticModifier(t,1)},e.isForInOrOfStatement=function(e){return 238===e.kind||239===e.kind},e.isConciseBody=function(t){return e.isBlock(t)||te(t)},e.isFunctionBody=function(t){return e.isBlock(t)},e.isForInitializer=function(t){return e.isVariableDeclarationList(t)||te(t)},e.isModuleBody=function(e){var t=e.kind;return 257===t||256===t||78===t},e.isNamespaceBody=function(e){var t=e.kind;return 257===t||256===t},e.isJSDocNamespaceBody=function(e){var t=e.kind;return 78===t||256===t},e.isNamedImportBindings=function(e){var t=e.kind;return 264===t||263===t},e.isModuleOrEnumDeclaration=function(e){return 256===e.kind||255===e.kind},e.isDeclaration=ae,e.isDeclarationStatement=function(e){return re(e.kind)},e.isStatementButNotDeclaration=function(e){return ie(e.kind)},e.isStatement=function(t){var n=t.kind;return ie(n)||re(n)||function(t){return 230===t.kind&&(void 0===t.parent||247!==t.parent.kind&&287!==t.parent.kind)&&!e.isFunctionBlock(t)}(t)},e.isStatementOrBlock=function(e){var t=e.kind;return ie(t)||re(t)||230===t},e.isModuleReference=function(e){var t=e.kind;return 272===t||157===t||78===t},e.isJsxTagNameExpression=function(e){var t=e.kind;return 107===t||78===t||201===t},e.isJsxChild=function(e){var t=e.kind;return 273===t||283===t||274===t||11===t||277===t},e.isJsxAttributeLike=function(e){var t=e.kind;return 280===t||282===t},e.isStringLiteralOrJsxExpression=function(e){var t=e.kind;return 10===t||283===t},e.isJsxOpeningLikeElement=function(e){var t=e.kind;return 275===t||274===t},e.isCaseOrDefaultClause=function(e){var t=e.kind;return 284===t||285===t},e.isJSDocNode=function(e){return e.kind>=301&&e.kind<=333},e.isJSDocCommentContainingNode=function(t){return 311===t.kind||310===t.kind||oe(t)||e.isJSDocTypeLiteral(t)||e.isJSDocSignature(t)},e.isJSDocTag=oe,e.isSetAccessor=function(e){return 168===e.kind},e.isGetAccessor=function(e){return 167===e.kind},e.hasJSDocNodes=function(e){var t=e.jsDoc;return!!t&&t.length>0},e.hasType=function(e){return!!e.type},e.hasInitializer=function(e){return!!e.initializer},e.hasOnlyExpressionInitializer=function(e){switch(e.kind){case 249:case 160:case 198:case 162:case 163:case 288:case 291:return!0;default:return!1}},e.isObjectLiteralElement=function(e){return 280===e.kind||282===e.kind||J(e)},e.isTypeReferenceType=function(e){return 173===e.kind||223===e.kind};var se=1073741823;e.guessIndentation=function(t){for(var n=se,r=0,i=t;r=0);var r=e.getLineStarts(n),i=t,a=n.text;if(i+1===r.length)return a.length-1;var o=r[i],s=r[i+1]-1;for(e.Debug.assert(e.isLineBreak(a.charCodeAt(s)));o<=s&&e.isLineBreak(a.charCodeAt(s));)s--;return s}function d(e){return void 0===e||e.pos===e.end&&e.pos>=0&&1!==e.kind}function p(e){return!d(e)}function f(e,n,r){if(void 0===n||0===n.length)return e;for(var i=0;i0?_(t._children[0],n,r):e.skipTrivia((n||c(t)).text,t.pos)}function v(e,t,n){return void 0===n&&(n=!1),y(e.text,t,n)}function y(t,n,r){if(void 0===r&&(r=!1),d(n))return"";var i=t.substring(r?n.pos:e.skipTrivia(t,n.pos),n.end);return function(t){return!!e.findAncestor(t,e.isJSDocTypeExpression)}(n)&&(i=i.replace(/(^|\r?\n|\r)\s*\*\s*/g,"$1")),i}function b(e,t){return void 0===t&&(t=!1),v(c(e),e,t)}function D(e){return e.pos}function E(e){var t=e.emitNode;return t&&t.flags||0}function C(e){var t=mt(e);return 249===t.kind&&287===t.parent.kind}function S(t){return e.isModuleDeclaration(t)&&(10===t.name.kind||k(t))}function x(t){return e.isModuleDeclaration(t)||e.isIdentifier(t)}function k(e){return!!(1024&e.flags)}function T(e){return S(e)&&w(e)}function w(t){switch(t.parent.kind){case 297:return e.isExternalModule(t.parent);case 257:return S(t.parent.parent)&&e.isSourceFile(t.parent.parent.parent)&&!e.isExternalModule(t.parent.parent.parent)}return!1}function A(t,n){switch(t.kind){case 297:case 258:case 287:case 256:case 237:case 238:case 239:case 166:case 165:case 167:case 168:case 251:case 208:case 209:return!0;case 230:return!e.isFunctionLike(n)}return!1}function O(t){switch(t.kind){case 169:case 170:case 164:case 171:case 174:case 175:case 308:case 252:case 221:case 253:case 254:case 330:case 251:case 165:case 166:case 167:case 168:case 208:case 209:return!0;default:return e.assertType(t),!1}}function N(e){switch(e.kind){case 261:case 260:return!0;default:return!1}}function I(e){return e&&0!==s(e)?b(e):"(Missing)"}function F(t){switch(t.kind){case 78:case 79:return t.escapedText;case 10:case 8:case 14:return e.escapeLeadingUnderscores(t.text);case 158:return ot(t.expression)?e.escapeLeadingUnderscores(t.expression.text):e.Debug.fail("Text of property name cannot be read from non-literal-valued ComputedPropertyNames");default:return e.Debug.assertNever(t)}}function L(t){switch(t.kind){case 107:return"this";case 79:case 78:return 0===s(t)?e.idText(t):b(t);case 157:return L(t.left)+"."+L(t.right);case 201:return e.isIdentifier(t.name)||e.isPrivateIdentifier(t.name)?L(t.expression)+"."+L(t.name):e.Debug.assertNever(t.name);default:return e.Debug.assertNever(t)}}function P(e,t,n,r,i,a,o){var s=M(e,t);return ir(e,s.start,s.length,n,r,i,a,o)}function R(t,n){var r=e.createScanner(t.languageVersion,!0,t.languageVariant,t.text,void 0,n);r.scan();var i=r.getTokenPos();return e.createTextSpanFromBounds(i,r.getTextPos())}function M(t,n){var r=n;switch(n.kind){case 297:var i=e.skipTrivia(t.text,0,!1);return i===t.text.length?e.createTextSpan(0,0):R(t,i);case 249:case 198:case 252:case 221:case 253:case 256:case 255:case 291:case 251:case 208:case 165:case 167:case 168:case 254:case 163:case 162:r=n.name;break;case 209:return function(t,n){var r=e.skipTrivia(t.text,n.pos);if(n.body&&230===n.body.kind){var i=e.getLineAndCharacterOfPosition(t,n.body.pos).line;if(i0?n.statements[0].pos:n.end;return e.createTextSpanFromBounds(a,o)}if(void 0===r)return R(t,n.pos);e.Debug.assert(!e.isJSDoc(r));var s=d(r),u=s||e.isJsxText(n)?r.pos:e.skipTrivia(t.text,r.pos);return s?(e.Debug.assert(u===r.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),e.Debug.assert(u===r.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(e.Debug.assert(u>=r.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),e.Debug.assert(u<=r.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),e.createTextSpanFromBounds(u,r.end)}function B(e){return 6===e.scriptKind}function j(t){return!!(2&e.getCombinedNodeFlags(t))}function U(e){return 203===e.kind&&99===e.expression.kind}function V(t){return e.isImportTypeNode(t)&&e.isLiteralTypeNode(t.argument)&&e.isStringLiteral(t.argument.literal)}function z(e){return 233===e.kind&&10===e.expression.kind}function H(e){return!!(1048576&E(e))}function W(t){return e.isIdentifier(t.name)&&!t.initializer}e.changesAffectModuleResolution=function(e,t){return e.configFilePath!==t.configFilePath||o(e,t)},e.optionsHaveModuleResolutionChanges=o,e.forEachAncestor=function(t,n){for(;;){var r=n(t);if("quit"===r)return;if(void 0!==r)return r;if(e.isSourceFile(t))return;t=t.parent}},e.forEachEntry=function(e,t){for(var n=e.entries(),r=n.next();!r.done;r=n.next()){var i=r.value,a=i[0],o=t(i[1],a);if(o)return o}},e.forEachKey=function(e,t){for(var n=e.keys(),r=n.next();!r.done;r=n.next()){var i=t(r.value);if(i)return i}},e.copyEntries=function(e,t){e.forEach((function(e,n){t.set(n,e)}))},e.usingSingleLineStringWriter=function(e){var t=a.getText();try{return e(a),a.getText()}finally{a.clear(),a.writeKeyword(t)}},e.getFullWidth=s,e.getResolvedModule=function(e,t){return e&&e.resolvedModules&&e.resolvedModules.get(t)},e.setResolvedModule=function(t,n,r){t.resolvedModules||(t.resolvedModules=new e.Map),t.resolvedModules.set(n,r)},e.setResolvedTypeReferenceDirective=function(t,n,r){t.resolvedTypeReferenceDirectiveNames||(t.resolvedTypeReferenceDirectiveNames=new e.Map),t.resolvedTypeReferenceDirectiveNames.set(n,r)},e.projectReferenceIsEqualTo=function(e,t){return e.path===t.path&&!e.prepend==!t.prepend&&!e.circular==!t.circular},e.moduleResolutionIsEqualTo=function(e,t){return e.isExternalLibraryImport===t.isExternalLibraryImport&&e.extension===t.extension&&e.resolvedFileName===t.resolvedFileName&&e.originalPath===t.originalPath&&((n=e.packageId)===(r=t.packageId)||!!n&&!!r&&n.name===r.name&&n.subModuleName===r.subModuleName&&n.version===r.version);var n,r},e.packageIdToString=function(e){var t=e.name,n=e.subModuleName;return(n?t+"/"+n:t)+"@"+e.version},e.typeDirectiveIsEqualTo=function(e,t){return e.resolvedFileName===t.resolvedFileName&&e.primary===t.primary},e.hasChangesInResolutions=function(t,n,r,i){e.Debug.assert(t.length===n.length);for(var a=0;a=0),e.getLineStarts(n)[t]},e.nodePosToString=function(t){var n=c(t),r=e.getLineAndCharacterOfPosition(n,t.pos);return n.fileName+"("+(r.line+1)+","+(r.character+1)+")"},e.getEndLinePosition=l,e.isFileLevelUniqueName=function(e,t,n){return!(n&&n(t)||e.identifiers.has(t))},e.nodeIsMissing=d,e.nodeIsPresent=p,e.insertStatementsAfterStandardPrologue=function(e,t){return f(e,t,z)},e.insertStatementsAfterCustomPrologue=function(e,t){return f(e,t,g)},e.insertStatementAfterStandardPrologue=function(e,t){return h(e,t,z)},e.insertStatementAfterCustomPrologue=function(e,t){return h(e,t,g)},e.isRecognizedTripleSlashComment=function(t,n,r){if(47===t.charCodeAt(n+1)&&n+2=e.ModuleKind.ES2015||!n.noImplicitUseStrict))},e.isBlockScope=A,e.isDeclarationWithTypeParameters=function(t){switch(t.kind){case 324:case 331:case 313:return!0;default:return e.assertType(t),O(t)}},e.isDeclarationWithTypeParameterChildren=O,e.isAnyImportSyntax=N,e.isLateVisibilityPaintedStatement=function(e){switch(e.kind){case 261:case 260:case 232:case 252:case 251:case 256:case 254:case 253:case 255:return!0;default:return!1}},e.isAnyImportOrReExport=function(t){return N(t)||e.isExportDeclaration(t)},e.getEnclosingBlockScopeContainer=function(t){return e.findAncestor(t.parent,(function(e){return A(e,e.parent)}))},e.declarationNameToString=I,e.getNameFromIndexInfo=function(e){return e.declaration?I(e.declaration.parameters[0].name):void 0},e.isComputedNonLiteralName=function(e){return 158===e.kind&&!ot(e.expression)},e.getTextOfPropertyName=F,e.entityNameToString=L,e.createDiagnosticForNode=function(e,t,n,r,i,a){return P(c(e),e,t,n,r,i,a)},e.createDiagnosticForNodeArray=function(t,n,r,i,a,o,s){var u=e.skipTrivia(t.text,n.pos);return ir(t,u,n.end-u,r,i,a,o,s)},e.createDiagnosticForNodeInSourceFile=P,e.createDiagnosticForNodeFromMessageChain=function(e,t,n){var r=c(e),i=M(r,e);return{file:r,start:i.start,length:i.length,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:n}},e.createDiagnosticForFileFromMessageChain=function(e,t,n){return{file:e,start:0,length:0,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:n}},e.createDiagnosticForRange=function(e,t,n){return{file:e,start:t.pos,length:t.end-t.pos,code:n.code,category:n.category,messageText:n.message}},e.getSpanOfTokenAtPosition=R,e.getErrorSpanForNode=M,e.isExternalOrCommonJsModule=function(e){return void 0!==(e.externalModuleIndicator||e.commonJsModuleIndicator)},e.isJsonSourceFile=B,e.isEnumConst=function(t){return!!(2048&e.getCombinedModifierFlags(t))},e.isDeclarationReadonly=function(t){return!(!(64&e.getCombinedModifierFlags(t))||e.isParameterPropertyDeclaration(t,t.parent))},e.isVarConst=j,e.isLet=function(t){return!!(1&e.getCombinedNodeFlags(t))},e.isSuperCall=function(e){return 203===e.kind&&105===e.expression.kind},e.isImportCall=U,e.isImportMeta=function(t){return e.isMetaProperty(t)&&99===t.keywordToken&&"meta"===t.name.escapedText},e.isLiteralImportTypeNode=V,e.isPrologueDirective=z,e.isCustomPrologue=H,e.isHoistedFunction=function(t){return H(t)&&e.isFunctionDeclaration(t)},e.isHoistedVariableStatement=function(t){return H(t)&&e.isVariableStatement(t)&&e.every(t.declarationList.declarations,W)},e.getLeadingCommentRangesOfNode=function(t,n){return 11!==t.kind?e.getLeadingCommentRanges(n.text,t.pos):void 0},e.getJSDocCommentRanges=function(t,n){var r=160===t.kind||159===t.kind||208===t.kind||209===t.kind||207===t.kind?e.concatenate(e.getTrailingCommentRanges(n,t.pos),e.getLeadingCommentRanges(n,t.pos)):e.getLeadingCommentRanges(n,t.pos);return e.filter(r,(function(e){return 42===n.charCodeAt(e.pos+1)&&42===n.charCodeAt(e.pos+2)&&47!==n.charCodeAt(e.pos+3)}))},e.fullTripleSlashReferencePathRegEx=/^(\/\/\/\s*/;var K=/^(\/\/\/\s*/;e.fullTripleSlashAMDReferencePathRegEx=/^(\/\/\/\s*/;var q=/^(\/\/\/\s*/;function G(t){if(172<=t.kind&&t.kind<=195)return!0;switch(t.kind){case 128:case 152:case 144:case 155:case 147:case 131:case 148:case 145:case 150:case 141:return!0;case 113:return 212!==t.parent.kind;case 223:return!xn(t);case 159:return 190===t.parent.kind||185===t.parent.kind;case 78:(157===t.parent.kind&&t.parent.right===t||201===t.parent.kind&&t.parent.name===t)&&(t=t.parent),e.Debug.assert(78===t.kind||157===t.kind||201===t.kind,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 157:case 201:case 107:var n=t.parent;if(176===n.kind)return!1;if(195===n.kind)return!n.isTypeOf;if(172<=n.kind&&n.kind<=195)return!0;switch(n.kind){case 223:return!xn(n);case 159:case 330:return t===n.constraint;case 163:case 162:case 160:case 249:return t===n.type;case 251:case 208:case 209:case 166:case 165:case 164:case 167:case 168:return t===n.type;case 169:case 170:case 171:case 206:return t===n.type;case 203:case 204:return e.contains(n.typeArguments,t);case 205:return!1}}return!1}function Y(e){if(e)switch(e.kind){case 198:case 291:case 160:case 288:case 163:case 162:case 289:case 249:return!0}return!1}function J(e){return 250===e.parent.kind&&232===e.parent.parent.kind}function $(e,t,n){return e.properties.filter((function(e){if(288===e.kind){var r=F(e.name);return t===r||!!n&&n===r}return!1}))}function Q(t){if(t&&t.statements.length){var n=t.statements[0].expression;return e.tryCast(n,e.isObjectLiteralExpression)}}function X(t,n){var r=Q(t);return r?$(r,n):e.emptyArray}function Z(t,n){for(e.Debug.assert(297!==t.kind);;){if(!(t=t.parent))return e.Debug.fail();switch(t.kind){case 158:if(e.isClassLike(t.parent.parent))return t;t=t.parent;break;case 161:160===t.parent.kind&&e.isClassElement(t.parent.parent)?t=t.parent.parent:e.isClassElement(t.parent)&&(t=t.parent);break;case 209:if(!n)continue;case 251:case 208:case 256:case 163:case 162:case 165:case 164:case 166:case 167:case 168:case 169:case 170:case 171:case 255:case 297:return t}}}function ee(e){var t=e.kind;return(201===t||202===t)&&105===e.expression.kind}function te(t,n,r){if(e.isNamedDeclaration(t)&&e.isPrivateIdentifier(t.name))return!1;switch(t.kind){case 252:return!0;case 163:return 252===n.kind;case 167:case 168:case 165:return void 0!==t.body&&252===n.kind;case 160:return void 0!==n.body&&(166===n.kind||165===n.kind||168===n.kind)&&252===r.kind}return!1}function ne(e,t,n){return void 0!==e.decorators&&te(e,t,n)}function re(e,t,n){return ne(e,t,n)||ie(e,t)}function ie(t,n){switch(t.kind){case 252:return e.some(t.members,(function(e){return re(e,t,n)}));case 165:case 168:return e.some(t.parameters,(function(e){return ne(e,t,n)}));default:return!1}}function ae(e){var t=e.parent;return(275===t.kind||274===t.kind||276===t.kind)&&t.tagName===e}function oe(e){switch(e.kind){case 105:case 103:case 109:case 94:case 13:case 199:case 200:case 201:case 202:case 203:case 204:case 205:case 224:case 206:case 225:case 207:case 208:case 221:case 209:case 212:case 210:case 211:case 214:case 215:case 216:case 217:case 220:case 218:case 222:case 273:case 274:case 277:case 219:case 213:case 226:return!0;case 157:for(;157===e.parent.kind;)e=e.parent;return 176===e.parent.kind||ae(e);case 78:if(176===e.parent.kind||ae(e))return!0;case 8:case 9:case 10:case 14:case 107:return se(e);default:return!1}}function se(e){var t=e.parent;switch(t.kind){case 249:case 160:case 163:case 162:case 291:case 288:case 198:return t.initializer===e;case 233:case 234:case 235:case 236:case 242:case 243:case 244:case 284:case 246:return t.expression===e;case 237:var n=t;return n.initializer===e&&250!==n.initializer.kind||n.condition===e||n.incrementor===e;case 238:case 239:var r=t;return r.initializer===e&&250!==r.initializer.kind||r.expression===e;case 206:case 224:case 228:case 158:return e===t.expression;case 161:case 283:case 282:case 290:return!0;case 223:return t.expression===e&&xn(t);case 289:return t.objectAssignmentInitializer===e;default:return oe(t)}}function ue(e){for(;157===e.kind||78===e.kind;)e=e.parent;return 176===e.kind}function ce(e){return 260===e.kind&&272===e.moduleReference.kind}function le(e){return de(e)}function de(e){return!!e&&!!(131072&e.flags)}function pe(t,n){if(203!==t.kind)return!1;var r=t,i=r.expression,a=r.arguments;if(78!==i.kind||"require"!==i.escapedText)return!1;if(1!==a.length)return!1;var o=a[0];return!n||e.isStringLiteralLike(o)}function fe(t,n){return 198===t.kind&&(t=t.parent.parent),e.isVariableDeclaration(t)&&!!t.initializer&&pe(qn(t.initializer),n)}function he(t){return e.isBinaryExpression(t)||Kn(t)||e.isIdentifier(t)||e.isCallExpression(t)}function ge(t){return de(t)&&t.initializer&&e.isBinaryExpression(t.initializer)&&(56===t.initializer.operatorToken.kind||60===t.initializer.operatorToken.kind)&&t.name&&kn(t.name)&&_e(t.name,t.initializer.left)?t.initializer.right:t.initializer}function me(t,n){if(e.isCallExpression(t)){var r=Ye(t.expression);return 208===r.kind||209===r.kind?t:void 0}return 208===t.kind||221===t.kind||209===t.kind||e.isObjectLiteralExpression(t)&&(0===t.properties.length||n)?t:void 0}function _e(t,n){if(pt(t)&&pt(n))return ft(t)===ft(n);if(e.isIdentifier(t)&&Se(n)&&(107===n.expression.kind||e.isIdentifier(n.expression)&&("window"===n.expression.escapedText||"self"===n.expression.escapedText||"global"===n.expression.escapedText))){var r=Ae(n);return e.isPrivateIdentifier(r)&&e.Debug.fail("Unexpected PrivateIdentifier in name expression with literal-like access."),_e(t,r)}return!(!Se(t)||!Se(n))&&Ne(t)===Ne(n)&&_e(t.expression,n.expression)}function ve(e){for(;Sn(e,!0);)e=e.right;return e}function ye(t){return e.isIdentifier(t)&&"exports"===t.escapedText}function be(t){return e.isIdentifier(t)&&"module"===t.escapedText}function De(t){return(e.isPropertyAccessExpression(t)||xe(t))&&be(t.expression)&&"exports"===Ne(t)}function Ee(t){var n=function(t){if(e.isCallExpression(t)){if(!Ce(t))return 0;var n=t.arguments[0];return ye(n)||De(n)?8:ke(n)&&"prototype"===Ne(n)?9:7}return 62!==t.operatorToken.kind||!Kn(t.left)||function(t){return e.isVoidExpression(t)&&e.isNumericLiteral(t.expression)&&"0"===t.expression.text}(ve(t))?0:we(t.left.expression,!0)&&"prototype"===Ne(t.left)&&e.isObjectLiteralExpression(Fe(t))?6:Ie(t.left)}(t);return 5===n||de(t)?n:0}function Ce(t){return 3===e.length(t.arguments)&&e.isPropertyAccessExpression(t.expression)&&e.isIdentifier(t.expression.expression)&&"Object"===e.idText(t.expression.expression)&&"defineProperty"===e.idText(t.expression.name)&&ot(t.arguments[1])&&we(t.arguments[0],!0)}function Se(t){return e.isPropertyAccessExpression(t)||xe(t)}function xe(t){return e.isElementAccessExpression(t)&&(ot(t.argumentExpression)||lt(t.argumentExpression))}function ke(t,n){return e.isPropertyAccessExpression(t)&&(!n&&107===t.expression.kind||e.isIdentifier(t.name)&&we(t.expression,!0))||Te(t,n)}function Te(e,t){return xe(e)&&(!t&&107===e.expression.kind||kn(e.expression)||ke(e.expression,!0))}function we(e,t){return kn(e)||ke(e,t)}function Ae(t){return e.isPropertyAccessExpression(t)?t.name:t.argumentExpression}function Oe(t){if(e.isPropertyAccessExpression(t))return t.name;var n=Ye(t.argumentExpression);return e.isNumericLiteral(n)||e.isStringLiteralLike(n)?n:t}function Ne(t){var n=Oe(t);if(n){if(e.isIdentifier(n))return n.escapedText;if(e.isStringLiteralLike(n)||e.isNumericLiteral(n))return e.escapeLeadingUnderscores(n.text)}if(e.isElementAccessExpression(t)&<(t.argumentExpression))return ht(e.idText(t.argumentExpression.name))}function Ie(t){if(107===t.expression.kind)return 4;if(De(t))return 2;if(we(t.expression,!0)){if(wn(t.expression))return 3;for(var n=t;!e.isIdentifier(n.expression);)n=n.expression;var r=n.expression;if(("exports"===r.escapedText||"module"===r.escapedText&&"exports"===Ne(n))&&ke(t))return 1;if(we(t,!0)||e.isElementAccessExpression(t)&&ct(t))return 5}return 0}function Fe(t){for(;e.isBinaryExpression(t.right);)t=t.right;return t.right}function Le(t){switch(t.parent.kind){case 261:case 267:return t.parent;case 272:return t.parent.parent;case 203:return U(t.parent)||pe(t.parent,!1)?t.parent:void 0;case 191:return e.Debug.assert(e.isStringLiteral(t)),e.tryCast(t.parent.parent,e.isImportTypeNode);default:return}}function Pe(e){return 331===e.kind||324===e.kind||325===e.kind}function Re(t){return e.isExpressionStatement(t)&&e.isBinaryExpression(t.expression)&&0!==Ee(t.expression)&&e.isBinaryExpression(t.expression.right)&&(56===t.expression.right.operatorToken.kind||60===t.expression.right.operatorToken.kind)?t.expression.right.right:void 0}function Me(e){switch(e.kind){case 232:var t=Be(e);return t&&t.initializer;case 163:case 288:return e.initializer}}function Be(t){return e.isVariableStatement(t)?e.firstOrUndefined(t.declarationList.declarations):void 0}function je(t){return e.isModuleDeclaration(t)&&t.body&&256===t.body.kind?t.body:void 0}function Ue(t){var n=t.parent;return 288===n.kind||266===n.kind||163===n.kind||233===n.kind&&201===t.kind||je(n)||e.isBinaryExpression(t)&&62===t.operatorToken.kind?n:n.parent&&(Be(n.parent)===t||e.isBinaryExpression(n)&&62===n.operatorToken.kind)?n.parent:n.parent&&n.parent.parent&&(Be(n.parent.parent)||Me(n.parent.parent)===t||Re(n.parent.parent))?n.parent.parent:void 0}function Ve(t){var n=ze(t);return n&&e.isFunctionLike(n)?n:void 0}function ze(t){var n=He(t);return Re(n)||function(t){return e.isExpressionStatement(t)&&e.isBinaryExpression(t.expression)&&62===t.expression.operatorToken.kind?ve(t.expression):void 0}(n)||Me(n)||Be(n)||je(n)||n}function He(t){return e.Debug.checkDefined(e.findAncestor(t.parent,e.isJSDoc)).parent}function We(t){var n=e.isJSDocParameterTag(t)?t.typeExpression&&t.typeExpression.type:t.type;return void 0!==t.dotDotDotToken||!!n&&309===n.kind}function Ke(e){for(var t=e.parent;;){switch(t.kind){case 216:var n=t.operatorToken.kind;return Dn(n)&&t.left===e?62===n||bn(n)?1:2:0;case 214:case 215:var r=t.operator;return 45===r||46===r?2:0;case 238:case 239:return t.initializer===e?1:0;case 207:case 199:case 220:case 225:e=t;break;case 289:if(t.name!==e)return 0;e=t.parent;break;case 288:if(t.name===e)return 0;e=t.parent;break;default:return 0}t=e.parent}}function qe(e,t){for(;e&&e.kind===t;)e=e.parent;return e}function Ge(e){return qe(e,207)}function Ye(t){return e.skipOuterExpressions(t,1)}function Je(t){return kn(t)||e.isClassExpression(t)}function $e(e){return Je(Qe(e))}function Qe(t){return e.isExportAssignment(t)?t.expression:t.right}function Xe(t){var n=Ze(t);if(n&&de(t)){var r=e.getJSDocAugmentsTag(t);if(r)return r.class}return n}function Ze(e){var t=nt(e.heritageClauses,93);return t&&t.types.length>0?t.types[0]:void 0}function et(t){if(de(t))return e.getJSDocImplementsTags(t).map((function(e){return e.class}));var n=nt(t.heritageClauses,116);return null==n?void 0:n.types}function tt(e){var t=nt(e.heritageClauses,93);return t?t.types:void 0}function nt(e,t){if(e)for(var n=0,r=e;n0&&e.every(t.declarationList.declarations,(function(e){return fe(e,n)}))},e.isSingleOrDoubleQuote=function(e){return 39===e||34===e},e.isStringDoubleQuoted=function(e,t){return 34===v(t,e).charCodeAt(0)},e.isAssignmentDeclaration=he,e.getEffectiveInitializer=ge,e.getDeclaredExpandoInitializer=function(e){var t=ge(e);return t&&me(t,wn(e.name))},e.getAssignedExpandoInitializer=function(t){if(t&&t.parent&&e.isBinaryExpression(t.parent)&&62===t.parent.operatorToken.kind){var n=wn(t.parent.left);return me(t.parent.right,n)||function(t,n,r){var i=e.isBinaryExpression(n)&&(56===n.operatorToken.kind||60===n.operatorToken.kind)&&me(n.right,r);if(i&&_e(t,n.left))return i}(t.parent.left,t.parent.right,n)}if(t&&e.isCallExpression(t)&&Ce(t)){var r=function(t,n){return e.forEach(t.properties,(function(t){return e.isPropertyAssignment(t)&&e.isIdentifier(t.name)&&"value"===t.name.escapedText&&t.initializer&&me(t.initializer,n)}))}(t.arguments[2],"prototype"===t.arguments[1].text);if(r)return r}},e.getExpandoInitializer=me,e.isDefaultedExpandoInitializer=function(t){var n=e.isVariableDeclaration(t.parent)?t.parent.name:e.isBinaryExpression(t.parent)&&62===t.parent.operatorToken.kind?t.parent.left:void 0;return n&&me(t.right,wn(n))&&kn(n)&&_e(n,t.left)},e.getNameOfExpando=function(t){if(e.isBinaryExpression(t.parent)){var n=56!==t.parent.operatorToken.kind&&60!==t.parent.operatorToken.kind||!e.isBinaryExpression(t.parent.parent)?t.parent:t.parent.parent;if(62===n.operatorToken.kind&&e.isIdentifier(n.left))return n.left}else if(e.isVariableDeclaration(t.parent))return t.parent.name},e.isSameEntityName=_e,e.getRightMostAssignedExpression=ve,e.isExportsIdentifier=ye,e.isModuleIdentifier=be,e.isModuleExportsAccessExpression=De,e.getAssignmentDeclarationKind=Ee,e.isBindableObjectDefinePropertyCall=Ce,e.isLiteralLikeAccess=Se,e.isLiteralLikeElementAccess=xe,e.isBindableStaticAccessExpression=ke,e.isBindableStaticElementAccessExpression=Te,e.isBindableStaticNameExpression=we,e.getNameOrArgument=Ae,e.getElementOrPropertyAccessArgumentExpressionOrName=Oe,e.getElementOrPropertyAccessName=Ne,e.getAssignmentDeclarationPropertyAccessKind=Ie,e.getInitializerOfBinaryExpression=Fe,e.isPrototypePropertyAssignment=function(t){return e.isBinaryExpression(t)&&3===Ee(t)},e.isSpecialPropertyDeclaration=function(t){return de(t)&&t.parent&&233===t.parent.kind&&(!e.isElementAccessExpression(t)||xe(t))&&!!e.getJSDocTypeTag(t.parent)},e.setValueDeclaration=function(e,t){var n=e.valueDeclaration;(!n||(!(8388608&t.flags)||8388608&n.flags)&&he(n)&&!he(t)||n.kind!==t.kind&&x(n))&&(e.valueDeclaration=t)},e.isFunctionSymbol=function(t){if(!t||!t.valueDeclaration)return!1;var n=t.valueDeclaration;return 251===n.kind||e.isVariableDeclaration(n)&&n.initializer&&e.isFunctionLike(n.initializer)},e.importFromModuleSpecifier=function(t){return Le(t)||e.Debug.failBadSyntaxKind(t.parent)},e.tryGetImportFromModuleSpecifier=Le,e.getExternalModuleName=function(t){switch(t.kind){case 261:case 267:return t.moduleSpecifier;case 260:return 272===t.moduleReference.kind?t.moduleReference.expression:void 0;case 195:return V(t)?t.argument.literal:void 0;default:return e.Debug.assertNever(t)}},e.getNamespaceDeclarationNode=function(t){switch(t.kind){case 261:return t.importClause&&e.tryCast(t.importClause.namedBindings,e.isNamespaceImport);case 260:return t;case 267:return t.exportClause&&e.tryCast(t.exportClause,e.isNamespaceExport);default:return e.Debug.assertNever(t)}},e.isDefaultImport=function(e){return 261===e.kind&&!!e.importClause&&!!e.importClause.name},e.forEachImportClauseDeclaration=function(t,n){var r;return t.name&&(r=n(t))||t.namedBindings&&(r=e.isNamespaceImport(t.namedBindings)?n(t.namedBindings):e.forEach(t.namedBindings.elements,n))?r:void 0},e.hasQuestionToken=function(e){if(e)switch(e.kind){case 160:case 165:case 164:case 289:case 288:case 163:case 162:return void 0!==e.questionToken}return!1},e.isJSDocConstructSignature=function(t){var n=e.isJSDocFunctionType(t)?e.firstOrUndefined(t.parameters):void 0,r=e.tryCast(n&&n.name,e.isIdentifier);return!!r&&"new"===r.escapedText},e.isJSDocTypeAlias=Pe,e.isTypeAlias=function(t){return Pe(t)||e.isTypeAliasDeclaration(t)},e.getSingleInitializerOfVariableStatementOrPropertyDeclaration=Me,e.getSingleVariableOfVariableStatement=Be,e.getJSDocCommentsAndTags=function(t,n){var r;Y(t)&&e.hasInitializer(t)&&e.hasJSDocNodes(t.initializer)&&(r=e.append(r,e.last(t.initializer.jsDoc)));for(var i=t;i&&i.parent;){if(e.hasJSDocNodes(i)&&(r=e.append(r,e.last(i.jsDoc))),160===i.kind){r=e.addRange(r,(n?e.getJSDocParameterTagsNoCache:e.getJSDocParameterTags)(i));break}if(159===i.kind){r=e.addRange(r,(n?e.getJSDocTypeParameterTagsNoCache:e.getJSDocTypeParameterTags)(i));break}i=Ue(i)}return r||e.emptyArray},e.getParameterSymbolFromJSDoc=function(t){if(t.symbol)return t.symbol;if(e.isIdentifier(t.name)){var n=t.name.escapedText,r=Ve(t);if(r){var i=e.find(r.parameters,(function(e){return 78===e.name.kind&&e.name.escapedText===n}));return i&&i.symbol}}},e.getHostSignatureFromJSDoc=Ve,e.getEffectiveJSDocHost=ze,e.getJSDocHost=He,e.getTypeParameterFromJsDoc=function(t){var n=t.name.escapedText,r=t.parent.parent.parent.typeParameters;return r&&e.find(r,(function(e){return e.name.escapedText===n}))},e.hasRestParameter=function(t){var n=e.lastOrUndefined(t.parameters);return!!n&&We(n)},e.isRestParameter=We,e.hasTypeArguments=function(e){return!!e.typeArguments},function(e){e[e.None=0]="None",e[e.Definite=1]="Definite",e[e.Compound=2]="Compound"}(e.AssignmentKind||(e.AssignmentKind={})),e.getAssignmentTargetKind=Ke,e.isAssignmentTarget=function(e){return 0!==Ke(e)},e.isNodeWithPossibleHoistedDeclaration=function(e){switch(e.kind){case 230:case 232:case 243:case 234:case 244:case 258:case 284:case 285:case 245:case 237:case 238:case 239:case 235:case 236:case 247:case 287:return!0}return!1},e.isValueSignatureDeclaration=function(t){return e.isFunctionExpression(t)||e.isArrowFunction(t)||e.isMethodOrAccessor(t)||e.isFunctionDeclaration(t)||e.isConstructorDeclaration(t)},e.walkUpParenthesizedTypes=function(e){return qe(e,186)},e.walkUpParenthesizedExpressions=Ge,e.walkUpParenthesizedTypesAndGetParentAndChild=function(e){for(var t;e&&186===e.kind;)t=e,e=e.parent;return[t,e]},e.skipParentheses=Ye,e.isDeleteTarget=function(e){return(201===e.kind||202===e.kind)&&(e=Ge(e.parent))&&210===e.kind},e.isNodeDescendantOf=function(e,t){for(;e;){if(e===t)return!0;e=e.parent}return!1},e.isDeclarationName=function(t){return!e.isSourceFile(t)&&!e.isBindingPattern(t)&&e.isDeclaration(t.parent)&&t.parent.name===t},e.getDeclarationFromName=function(t){var n=t.parent;switch(t.kind){case 10:case 14:case 8:if(e.isComputedPropertyName(n))return n.parent;case 78:if(e.isDeclaration(n))return n.name===t?n:void 0;if(e.isQualifiedName(n)){var r=n.parent;return e.isJSDocParameterTag(r)&&r.name===n?r:void 0}var i=n.parent;return e.isBinaryExpression(i)&&0!==Ee(i)&&(i.left.symbol||i.symbol)&&e.getNameOfDeclaration(i)===t?i:void 0;case 79:return e.isDeclaration(n)&&n.name===t?n:void 0;default:return}},e.isLiteralComputedPropertyDeclarationName=function(t){return ot(t)&&158===t.parent.kind&&e.isDeclaration(t.parent.parent)},e.isIdentifierName=function(e){var t=e.parent;switch(t.kind){case 163:case 162:case 165:case 164:case 167:case 168:case 291:case 288:case 201:return t.name===e;case 157:return t.right===e;case 198:case 265:return t.propertyName===e;case 270:case 280:return!0}return!1},e.isAliasSymbolDeclaration=function(t){return 260===t.kind||259===t.kind||262===t.kind&&!!t.name||263===t.kind||269===t.kind||265===t.kind||270===t.kind||266===t.kind&&$e(t)||e.isBinaryExpression(t)&&2===Ee(t)&&$e(t)||e.isPropertyAccessExpression(t)&&e.isBinaryExpression(t.parent)&&t.parent.left===t&&62===t.parent.operatorToken.kind&&Je(t.parent.right)||289===t.kind||288===t.kind&&Je(t.initializer)},e.getAliasDeclarationFromName=function e(t){switch(t.parent.kind){case 262:case 265:case 263:case 270:case 266:case 260:return t.parent;case 157:do{t=t.parent}while(157===t.parent.kind);return e(t)}},e.isAliasableExpression=Je,e.exportAssignmentIsAlias=$e,e.getExportAssignmentExpression=Qe,e.getPropertyAssignmentAliasLikeExpression=function(e){return 289===e.kind?e.name:288===e.kind?e.initializer:e.parent.right},e.getEffectiveBaseTypeNode=Xe,e.getClassExtendsHeritageElement=Ze,e.getEffectiveImplementsTypeNodes=et,e.getAllSuperTypeNodes=function(t){return e.isInterfaceDeclaration(t)?tt(t)||e.emptyArray:e.isClassLike(t)&&e.concatenate(e.singleElementArray(Xe(t)),et(t))||e.emptyArray},e.getInterfaceBaseTypeNodes=tt,e.getHeritageClause=nt,e.getAncestor=function(e,t){for(;e;){if(e.kind===t)return e;e=e.parent}},e.isKeyword=rt,e.isContextualKeyword=it,e.isNonContextualKeyword=at,e.isFutureReservedKeyword=function(e){return 116<=e&&e<=124},e.isStringANonContextualKeyword=function(t){var n=e.stringToToken(t);return void 0!==n&&at(n)},e.isStringAKeyword=function(t){var n=e.stringToToken(t);return void 0!==n&&rt(n)},e.isIdentifierANonContextualKeyword=function(e){var t=e.originalKeywordKind;return!!t&&!it(t)},e.isTrivia=function(e){return 2<=e&&e<=7},function(e){e[e.Normal=0]="Normal",e[e.Generator=1]="Generator",e[e.Async=2]="Async",e[e.Invalid=4]="Invalid",e[e.AsyncGenerator=3]="AsyncGenerator"}(e.FunctionFlags||(e.FunctionFlags={})),e.getFunctionFlags=function(e){if(!e)return 4;var t=0;switch(e.kind){case 251:case 208:case 165:e.asteriskToken&&(t|=1);case 209:un(e,256)&&(t|=2)}return e.body||(t|=4),t},e.isAsyncFunction=function(e){switch(e.kind){case 251:case 208:case 209:case 165:return void 0!==e.body&&void 0===e.asteriskToken&&un(e,256)}return!1},e.isStringOrNumericLiteralLike=ot,e.isSignedNumericLiteral=st,e.hasDynamicName=ut,e.isDynamicName=ct,e.isWellKnownSymbolSyntactically=lt,e.getPropertyNameForPropertyNameNode=dt,e.isPropertyNameLiteral=pt,e.getTextOfIdentifierOrLiteral=ft,e.getEscapedTextOfIdentifierOrLiteral=function(t){return e.isIdentifierOrPrivateIdentifier(t)?t.escapedText:e.escapeLeadingUnderscores(t.text)},e.getPropertyNameForUniqueESSymbol=function(t){return"__@"+e.getSymbolId(t)+"@"+t.escapedName},e.getPropertyNameForKnownSymbolName=ht,e.getSymbolNameForPrivateIdentifier=function(t,n){return"__#"+e.getSymbolId(t)+"@"+n},e.isKnownSymbol=function(t){return e.startsWith(t.escapedName,"__@")},e.isESSymbolIdentifier=gt,e.isPushOrUnshiftIdentifier=function(e){return"push"===e.escapedText||"unshift"===e.escapedText},e.isParameterDeclaration=function(e){return 160===mt(e).kind},e.getRootDeclaration=mt,e.nodeStartsNewLexicalEnvironment=function(e){var t=e.kind;return 166===t||208===t||251===t||209===t||165===t||167===t||168===t||256===t||297===t},e.nodeIsSynthesized=_t,e.getOriginalSourceFile=function(t){return e.getParseTreeNode(t,e.isSourceFile)||t},function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(e.Associativity||(e.Associativity={})),e.getExpressionAssociativity=function(e){var t=yt(e),n=204===e.kind&&void 0!==e.arguments;return vt(e.kind,t,n)},e.getOperatorAssociativity=vt,e.getExpressionPrecedence=function(e){var t=yt(e),n=204===e.kind&&void 0!==e.arguments;return bt(e.kind,t,n)},e.getOperator=yt,function(e){e[e.Comma=0]="Comma",e[e.Spread=1]="Spread",e[e.Yield=2]="Yield",e[e.Assignment=3]="Assignment",e[e.Conditional=4]="Conditional",e[e.Coalesce=4]="Coalesce",e[e.LogicalOR=5]="LogicalOR",e[e.LogicalAND=6]="LogicalAND",e[e.BitwiseOR=7]="BitwiseOR",e[e.BitwiseXOR=8]="BitwiseXOR",e[e.BitwiseAND=9]="BitwiseAND",e[e.Equality=10]="Equality",e[e.Relational=11]="Relational",e[e.Shift=12]="Shift",e[e.Additive=13]="Additive",e[e.Multiplicative=14]="Multiplicative",e[e.Exponentiation=15]="Exponentiation",e[e.Unary=16]="Unary",e[e.Update=17]="Update",e[e.LeftHandSide=18]="LeftHandSide",e[e.Member=19]="Member",e[e.Primary=20]="Primary",e[e.Highest=20]="Highest",e[e.Lowest=0]="Lowest",e[e.Invalid=-1]="Invalid"}(e.OperatorPrecedence||(e.OperatorPrecedence={})),e.getOperatorPrecedence=bt,e.getBinaryOperatorPrecedence=Dt,e.getSemanticJsxChildren=function(t){return e.filter(t,(function(e){switch(e.kind){case 283:return!!e.expression;case 11:return!e.containsOnlyTriviaWhiteSpaces;default:return!0}}))},e.createDiagnosticCollection=function(){var t=[],n=[],r=new e.Map,i=!1;return{add:function(a){var o;a.file?(o=r.get(a.file.fileName))||(o=[],r.set(a.file.fileName,o),e.insertSorted(n,a.file.fileName,e.compareStringsCaseSensitive)):(i&&(i=!1,t=t.slice()),o=t),e.insertSorted(o,a,sr)},lookup:function(n){var i;if(i=n.file?r.get(n.file.fileName):t){var a=e.binarySearch(i,n,e.identity,ur);return a>=0?i[a]:void 0}},getGlobalDiagnostics:function(){return i=!0,t},getDiagnostics:function(i){if(i)return r.get(i)||[];var a=e.flatMapToMutable(n,(function(e){return r.get(e)}));return t.length?(a.unshift.apply(a,t),a):a},reattachFileDiagnostics:function(t){e.forEach(r.get(t.fileName),(function(e){return e.file=t}))}}};var Et=/\$\{/g;e.hasInvalidEscape=function(t){return t&&!!(e.isNoSubstitutionTemplateLiteral(t)?t.templateFlags:t.head.templateFlags||e.some(t.templateSpans,(function(e){return!!e.literal.templateFlags})))};var Ct=/[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,St=/[\\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,xt=/[\\`]/g,kt=new e.Map(e.getEntries({"\t":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","\x85":"\\u0085"}));function Tt(e){return"\\u"+("0000"+e.toString(16).toUpperCase()).slice(-4)}function wt(e,t,n){if(0===e.charCodeAt(0)){var r=n.charCodeAt(t+e.length);return r>=48&&r<=57?"\\x00":"\\0"}return kt.get(e)||Tt(e.charCodeAt(0))}function At(e,t){var n=96===t?xt:39===t?St:Ct;return e.replace(n,wt)}e.escapeString=At;var Ot=/[^\u0000-\u007F]/g;function Nt(e,t){return e=At(e,t),Ot.test(e)?e.replace(Ot,(function(e){return Tt(e.charCodeAt(0))})):e}e.escapeNonAsciiString=Nt;var It=/[\"\u0000-\u001f\u2028\u2029\u0085]/g,Ft=/[\'\u0000-\u001f\u2028\u2029\u0085]/g,Lt=new e.Map(e.getEntries({'"':""","'":"'"}));function Pt(e){return 0===e.charCodeAt(0)?"�":Lt.get(e)||"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"}function Rt(e,t){var n=39===t?Ft:It;return e.replace(n,Pt)}e.escapeJsxAttributeString=Rt,e.stripQuotes=function(e){var t,n=e.length;return n>=2&&e.charCodeAt(0)===e.charCodeAt(n-1)&&(39===(t=e.charCodeAt(0))||34===t||96===t)?e.substring(1,n-1):e},e.isIntrinsicJsxName=function(t){var n=t.charCodeAt(0);return n>=97&&n<=122||e.stringContains(t,"-")};var Mt=[""," "];function Bt(e){for(var t=Mt[1],n=Mt.length;n<=e;n++)Mt.push(Mt[n-1]+t);return Mt[e]}function jt(){return Mt[1].length}function Ut(e){return!!e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames()}function Vt(e,t,n){return t.moduleName||zt(e,t.fileName,n&&n.fileName)}function zt(t,n,r){var i=function(e){return t.getCanonicalFileName(e)},a=e.toPath(r?e.getDirectoryPath(r):t.getCommonSourceDirectory(),t.getCurrentDirectory(),i),o=e.getNormalizedAbsolutePath(n,t.getCurrentDirectory()),s=Hr(e.getRelativePathToDirectoryOrUrl(a,o,a,i,!1));return r?e.ensurePathIsNonModuleName(s):s}function Ht(e,t,n,r,i){var a=t.declarationDir||t.outDir;return Hr(a?Gt(e,a,n,r,i):e)+".d.ts"}function Wt(e){return e.outFile||e.out}function Kt(e,t,n){return!(t.getCompilerOptions().noEmitForJsFiles&&le(e))&&!e.isDeclarationFile&&!t.isSourceFileFromExternalLibrary(e)&&!(B(e)&&t.getResolvedProjectReferenceToRedirect(e.fileName))&&(n||!t.isSourceOfProjectReferenceRedirect(e.fileName))}function qt(e,t,n){return Gt(e,n,t.getCurrentDirectory(),t.getCommonSourceDirectory(),(function(e){return t.getCanonicalFileName(e)}))}function Gt(t,n,r,i,a){var o=e.getNormalizedAbsolutePath(t,r);return o=0===a(o).indexOf(a(i))?o.substring(i.length):o,e.combinePaths(n,o)}function Yt(t,n,r){t.length>e.getRootLength(t)&&!r(t)&&(Yt(e.getDirectoryPath(t),n,r),n(t))}function Jt(t,n){return e.computeLineOfPosition(t,n)}function $t(e){if(e&&e.parameters.length>0){var t=2===e.parameters.length&&Qt(e.parameters[0]);return e.parameters[t?1:0]}}function Qt(e){return Xt(e.name)}function Xt(e){return!!e&&78===e.kind&&Zt(e)}function Zt(e){return 107===e.originalKeywordKind}function en(t){if(de(t)||!e.isFunctionDeclaration(t)){var n=t.type;return n||!de(t)?n:e.isJSDocPropertyLikeTag(t)?t.typeExpression&&t.typeExpression.type:e.getJSDocType(t)}}function tn(e,t,n,r){nn(e,t,n.pos,r)}function nn(e,t,n,r){r&&r.length&&n!==r[0].pos&&Jt(e,n)!==Jt(e,r[0].pos)&&t.writeLine()}function rn(e,t,n,r,i,a,o,s){if(r&&r.length>0){i&&n.writeSpace(" ");for(var u=!1,c=0,l=r;c=0&&e.kind<=156?0:(536870912&e.modifierFlagsCache||(e.modifierFlagsCache=536870912|_n(e)),!t||4096&e.modifierFlagsCache||!n&&!de(e)||!e.parent||(e.modifierFlagsCache|=4096|mn(e)),-536875009&e.modifierFlagsCache)}function hn(e){return fn(e,!0)}function gn(e){return fn(e,!1)}function mn(t){var n=0;return t.parent&&!e.isParameter(t)&&(de(t)&&(e.getJSDocPublicTagNoCache(t)&&(n|=4),e.getJSDocPrivateTagNoCache(t)&&(n|=8),e.getJSDocProtectedTagNoCache(t)&&(n|=16),e.getJSDocReadonlyTagNoCache(t)&&(n|=64)),e.getJSDocDeprecatedTagNoCache(t)&&(n|=8192)),n}function _n(e){var t=vn(e.modifiers);return(4&e.flags||78===e.kind&&e.isInJSDocNamespace)&&(t|=1),t}function vn(e){var t=0;if(e)for(var n=0,r=e;n=62&&e<=77}function En(e){var t=Cn(e);return t&&!t.isImplements?t.class:void 0}function Cn(t){return e.isExpressionWithTypeArguments(t)&&e.isHeritageClause(t.parent)&&e.isClassLike(t.parent.parent)?{class:t.parent.parent,isImplements:116===t.parent.token}:void 0}function Sn(t,n){return e.isBinaryExpression(t)&&(n?62===t.operatorToken.kind:Dn(t.operatorToken.kind))&&e.isLeftHandSideExpression(t.left)}function xn(e){return void 0!==En(e)}function kn(e){return 78===e.kind||Tn(e)}function Tn(t){return e.isPropertyAccessExpression(t)&&e.isIdentifier(t.name)&&kn(t.expression)}function wn(e){return ke(e)&&"prototype"===Ne(e)}e.getIndentString=Bt,e.getIndentSize=jt,e.createTextWriter=function(t){var n,r,i,a,o,s=!1;function u(t){var r=e.computeLineStarts(t);r.length>1?(a=a+r.length-1,o=n.length-t.length+e.last(r),i=o-n.length==0):i=!1}function c(e){e&&e.length&&(i&&(e=Bt(r)+e,i=!1),n+=e,u(e))}function l(e){e&&(s=!1),c(e)}function d(){n="",r=0,i=!0,a=0,o=0,s=!1}return d(),{write:l,rawWrite:function(e){void 0!==e&&(n+=e,u(e),s=!1)},writeLiteral:function(e){e&&e.length&&l(e)},writeLine:function(e){i&&!e||(a++,o=(n+=t).length,i=!0,s=!1)},increaseIndent:function(){r++},decreaseIndent:function(){r--},getIndent:function(){return r},getTextPos:function(){return n.length},getLine:function(){return a},getColumn:function(){return i?r*jt():n.length-o},getText:function(){return n},isAtStartOfLine:function(){return i},hasTrailingComment:function(){return s},hasTrailingWhitespace:function(){return!!n.length&&e.isWhiteSpaceLike(n.charCodeAt(n.length-1))},clear:d,reportInaccessibleThisError:e.noop,reportPrivateInBaseOfClassExpression:e.noop,reportInaccessibleUniqueSymbolError:e.noop,trackSymbol:e.noop,writeKeyword:l,writeOperator:l,writeParameter:l,writeProperty:l,writePunctuation:l,writeSpace:l,writeStringLiteral:l,writeSymbol:function(e,t){return l(e)},writeTrailingSemicolon:l,writeComment:function(e){e&&(s=!0),c(e)},getTextPosWithWriteLine:function(){return i?n.length:n.length+t.length}}},e.getTrailingSemicolonDeferringWriter=function(e){var t=!1;function n(){t&&(e.writeTrailingSemicolon(";"),t=!1)}return r(r({},e),{writeTrailingSemicolon:function(){t=!0},writeLiteral:function(t){n(),e.writeLiteral(t)},writeStringLiteral:function(t){n(),e.writeStringLiteral(t)},writeSymbol:function(t,r){n(),e.writeSymbol(t,r)},writePunctuation:function(t){n(),e.writePunctuation(t)},writeKeyword:function(t){n(),e.writeKeyword(t)},writeOperator:function(t){n(),e.writeOperator(t)},writeParameter:function(t){n(),e.writeParameter(t)},writeSpace:function(t){n(),e.writeSpace(t)},writeProperty:function(t){n(),e.writeProperty(t)},writeComment:function(t){n(),e.writeComment(t)},writeLine:function(){n(),e.writeLine()},increaseIndent:function(){n(),e.increaseIndent()},decreaseIndent:function(){n(),e.decreaseIndent()}})},e.hostUsesCaseSensitiveFileNames=Ut,e.hostGetCanonicalFileName=function(t){return e.createGetCanonicalFileName(Ut(t))},e.getResolvedExternalModuleName=Vt,e.getExternalModuleNameFromDeclaration=function(e,t,n){var r=t.getExternalModuleFileFromDeclaration(n);if(r&&!r.isDeclarationFile)return Vt(e,r)},e.getExternalModuleNameFromPath=zt,e.getOwnEmitOutputFilePath=function(e,t,n){var r=t.getCompilerOptions();return(r.outDir?Hr(qt(e,t,r.outDir)):Hr(e))+n},e.getDeclarationEmitOutputFilePath=function(e,t){return Ht(e,t.getCompilerOptions(),t.getCurrentDirectory(),t.getCommonSourceDirectory(),(function(e){return t.getCanonicalFileName(e)}))},e.getDeclarationEmitOutputFilePathWorker=Ht,e.outFile=Wt,e.getPathsBasePath=function(t,n){var r,i;if(t.paths)return null!==(r=t.baseUrl)&&void 0!==r?r:e.Debug.checkDefined(t.pathsBasePath||(null===(i=n.getCurrentDirectory)||void 0===i?void 0:i.call(n)),"Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'.")},e.getSourceFilesToEmit=function(t,n,r){var i=t.getCompilerOptions();if(Wt(i)){var a=dr(i),o=i.emitDeclarationOnly||a===e.ModuleKind.AMD||a===e.ModuleKind.System;return e.filter(t.getSourceFiles(),(function(n){return(o||!e.isExternalModule(n))&&Kt(n,t,r)}))}var s=void 0===n?t.getSourceFiles():[n];return e.filter(s,(function(e){return Kt(e,t,r)}))},e.sourceFileMayBeEmitted=Kt,e.getSourceFilePathInNewDir=qt,e.getSourceFilePathInNewDirWorker=Gt,e.writeFile=function(t,n,r,i,a,o){t.writeFile(r,i,a,(function(t){n.add(ar(e.Diagnostics.Could_not_write_file_0_Colon_1,r,t))}),o)},e.writeFileEnsuringDirectories=function(t,n,r,i,a,o){try{i(t,n,r)}catch(s){Yt(e.getDirectoryPath(e.normalizePath(t)),a,o),i(t,n,r)}},e.getLineOfLocalPosition=function(t,n){var r=e.getLineStarts(t);return e.computeLineOfPosition(r,n)},e.getLineOfLocalPositionFromLineMap=Jt,e.getFirstConstructorWithBody=function(t){return e.find(t.members,(function(t){return e.isConstructorDeclaration(t)&&p(t.body)}))},e.getSetAccessorValueParameter=$t,e.getSetAccessorTypeAnnotationNode=function(e){var t=$t(e);return t&&t.type},e.getThisParameter=function(t){if(t.parameters.length&&!e.isJSDocSignature(t)){var n=t.parameters[0];if(Qt(n))return n}},e.parameterIsThisKeyword=Qt,e.isThisIdentifier=Xt,e.identifierIsThisKeyword=Zt,e.getAllAccessorDeclarations=function(t,n){var r,i,a,o;return ut(n)?(r=n,167===n.kind?a=n:168===n.kind?o=n:e.Debug.fail("Accessor has wrong kind")):e.forEach(t,(function(t){e.isAccessor(t)&&un(t,32)===un(n,32)&&dt(t.name)===dt(n.name)&&(r?i||(i=t):r=t,167!==t.kind||a||(a=t),168!==t.kind||o||(o=t))})),{firstAccessor:r,secondAccessor:i,getAccessor:a,setAccessor:o}},e.getEffectiveTypeAnnotationNode=en,e.getTypeAnnotationNode=function(e){return e.type},e.getEffectiveReturnTypeNode=function(t){return e.isJSDocSignature(t)?t.type&&t.type.typeExpression&&t.type.typeExpression.type:t.type||(de(t)?e.getJSDocReturnType(t):void 0)},e.getJSDocTypeParameterDeclarations=function(t){return e.flatMap(e.getJSDocTags(t),(function(t){return function(t){return e.isJSDocTemplateTag(t)&&!(311===t.parent.kind&&t.parent.tags.some(Pe))}(t)?t.typeParameters:void 0}))},e.getEffectiveSetAccessorTypeAnnotationNode=function(e){var t=$t(e);return t&&en(t)},e.emitNewLineBeforeLeadingComments=tn,e.emitNewLineBeforeLeadingCommentsOfPosition=nn,e.emitNewLineBeforeLeadingCommentOfPosition=function(e,t,n,r){n!==r&&Jt(e,n)!==Jt(e,r)&&t.writeLine()},e.emitComments=rn,e.emitDetachedComments=function(t,n,r,i,a,o,s){var u,c;if(s?0===a.pos&&(u=e.filter(e.getLeadingCommentRanges(t,a.pos),(function(e){return m(t,e.pos)}))):u=e.getLeadingCommentRanges(t,a.pos),u){for(var l=[],d=void 0,p=0,f=u;p=g+2)break}l.push(h),d=h}l.length&&(g=Jt(n,e.last(l).end),Jt(n,e.skipTrivia(t,a.pos))>=g+2&&(tn(n,r,a,u),rn(t,n,r,l,!1,!0,o,i),c={nodePos:a.pos,detachedCommentEndPos:e.last(l).end}))}return c},e.writeCommentRange=function(t,n,r,i,a,o){if(42===t.charCodeAt(i+1))for(var s=e.computeLineAndCharacterOfPosition(n,i),u=n.length,c=void 0,l=i,d=s.line;l0){var h=f%jt(),g=Bt((f-h)/jt());for(r.rawWrite(g);h;)r.rawWrite(" "),h--}else r.rawWrite("")}an(t,a,r,o,l,p),l=p}else r.writeComment(t.substring(i,a))},e.hasEffectiveModifiers=function(e){return 0!==hn(e)},e.hasSyntacticModifiers=function(e){return 0!==gn(e)},e.hasEffectiveModifier=sn,e.hasSyntacticModifier=un,e.hasStaticModifier=cn,e.hasEffectiveReadonlyModifier=ln,e.getSelectedEffectiveModifierFlags=dn,e.getSelectedSyntacticModifierFlags=pn,e.getEffectiveModifierFlags=hn,e.getEffectiveModifierFlagsAlwaysIncludeJSDoc=function(e){return fn(e,!0,!0)},e.getSyntacticModifierFlags=gn,e.getEffectiveModifierFlagsNoCache=function(e){return _n(e)|mn(e)},e.getSyntacticModifierFlagsNoCache=_n,e.modifiersToFlags=vn,e.modifierToFlag=yn,e.isLogicalOperator=function(e){return 56===e||55===e||53===e},e.isLogicalOrCoalescingAssignmentOperator=bn,e.isLogicalOrCoalescingAssignmentExpression=function(e){return bn(e.operatorToken.kind)},e.isAssignmentOperator=Dn,e.tryGetClassExtendingExpressionWithTypeArguments=En,e.tryGetClassImplementingOrExtendingExpressionWithTypeArguments=Cn,e.isAssignmentExpression=Sn,e.isDestructuringAssignment=function(e){if(Sn(e,!0)){var t=e.left.kind;return 200===t||199===t}return!1},e.isExpressionWithTypeArgumentsInClassExtendsClause=xn,e.isEntityNameExpression=kn,e.getFirstIdentifier=function(e){switch(e.kind){case 78:return e;case 157:do{e=e.left}while(78!==e.kind);return e;case 201:do{e=e.expression}while(78!==e.kind);return e}},e.isDottedName=function e(t){return 78===t.kind||107===t.kind||105===t.kind||201===t.kind&&e(t.expression)||207===t.kind&&e(t.expression)},e.isPropertyAccessEntityNameExpression=Tn,e.tryGetPropertyAccessOrIdentifierToString=function t(n){if(e.isPropertyAccessExpression(n)){var r=t(n.expression);if(void 0!==r)return r+"."+L(n.name)}else if(e.isIdentifier(n))return e.unescapeLeadingUnderscores(n.escapedText)},e.isPrototypeAccess=wn,e.isRightSideOfQualifiedNameOrPropertyAccess=function(e){return 157===e.parent.kind&&e.parent.right===e||201===e.parent.kind&&e.parent.name===e},e.isEmptyObjectLiteral=function(e){return 200===e.kind&&0===e.properties.length},e.isEmptyArrayLiteral=function(e){return 199===e.kind&&0===e.elements.length},e.getLocalSymbolForExportDefault=function(t){if(function(t){return t&&e.length(t.declarations)>0&&un(t.declarations[0],512)}(t))for(var n=0,r=t.declarations;n>6|192),n.push(63&a|128)):a<65536?(n.push(a>>12|224),n.push(a>>6&63|128),n.push(63&a|128)):a<131072?(n.push(a>>18|240),n.push(a>>12&63|128),n.push(a>>6&63|128),n.push(63&a|128)):e.Debug.assert(!1,"Unexpected code point")}return n}(t),u=0,c=s.length;u>2,r=(3&s[u])<<4|s[u+1]>>4,i=(15&s[u+1])<<2|s[u+2]>>6,a=63&s[u+2],u+1>=c?i=a=64:u+2>=c&&(a=64),o+=On.charAt(n)+On.charAt(r)+On.charAt(i)+On.charAt(a),u+=3;return o}function In(t,n){return void 0===n&&(n=t),e.Debug.assert(n>=t||-1===n),{pos:t,end:n}}function Fn(e,t){return In(t,e.end)}function Ln(e){return e.decorators&&e.decorators.length>0?Fn(e,e.decorators.end):e}function Pn(e,t,n){return Rn(Mn(e,n,!1),t.end,n)}function Rn(t,n,r){return 0===e.getLinesBetweenPositions(r,t,n)}function Mn(t,n,r){return Gr(t.pos)?-1:e.skipTrivia(n.text,t.pos,!1,r)}function Bn(e){return void 0!==e.initializer}function jn(e){return 33554432&e.flags?e.checkFlags:0}function Un(t){var n=t.parent;if(!n)return 0;switch(n.kind){case 207:return Un(n);case 215:case 214:var r=n.operator;return 45===r||46===r?u():0;case 216:var i=n,a=i.left,o=i.operatorToken;return a===t&&Dn(o.kind)?62===o.kind?1:u():0;case 201:return n.name!==t?0:Un(n);case 288:var s=Un(n.parent);return t===n.name?function(t){switch(t){case 0:return 1;case 1:return 0;case 2:return 2;default:return e.Debug.assertNever(t)}}(s):s;case 289:return t===n.objectAssignmentInitializer?0:Un(n.parent);case 199:return Un(n);default:return 0}function u(){return n.parent&&233===function(e){for(;207===e.kind;)e=e.parent;return e}(n.parent).kind?1:2}}function Vn(e,t,n){var r=n.onDeleteValue,i=n.onExistingValue;e.forEach((function(n,a){var o=t.get(a);void 0===o?(e.delete(a),r(n,a)):i&&i(n,o,a)}))}function zn(e){if(32&e.flags){var t=Hn(e);return!!t&&un(t,128)}return!1}function Hn(t){return e.find(t.declarations,e.isClassLike)}function Wn(e){return 3899393&e.flags?e.objectFlags:0}function Kn(e){return 201===e.kind||202===e.kind}function qn(e){for(;Kn(e);)e=e.expression;return e}function Gn(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=void 0,this.mergeId=void 0,this.parent=void 0}function Yn(t,n){this.flags=n,(e.Debug.isDebugging||e.tracing.isTracing())&&(this.checker=t)}function Jn(t,n){this.flags=n,e.Debug.isDebugging&&(this.checker=t)}function $n(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0}function Qn(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0}function Xn(e,t,n){this.pos=t,this.end=n,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.flowNode=void 0}function Zn(e,t,n){this.fileName=e,this.text=t,this.skipTrivia=n||function(e){return e}}function er(t,n,r){return void 0===r&&(r=0),t.replace(/{(\d+)}/g,(function(t,i){return""+e.Debug.checkDefined(n[+i+r])}))}function tr(t){return e.localizedDiagnosticMessages&&e.localizedDiagnosticMessages[t.key]||t.message}function nr(e){return void 0===e.file&&void 0!==e.start&&void 0!==e.length&&"string"==typeof e.fileName}function rr(t,n){var r=n.fileName||"",i=n.text.length;e.Debug.assertEqual(t.fileName,r),e.Debug.assertLessThanOrEqual(t.start,i),e.Debug.assertLessThanOrEqual(t.start+t.length,i);var a={file:n,start:t.start,length:t.length,messageText:t.messageText,category:t.category,code:t.code,reportsUnnecessary:t.reportsUnnecessary};if(t.relatedInformation){a.relatedInformation=[];for(var o=0,s=t.relatedInformation;o4&&(a=er(a,arguments,4)),{file:t,start:n,length:r,messageText:a,category:i.category,code:i.code,reportsUnnecessary:i.reportsUnnecessary,reportsDeprecated:i.reportsDeprecated}}function ar(e){var t=tr(e);return arguments.length>1&&(t=er(t,arguments,1)),{file:void 0,start:void 0,length:void 0,messageText:t,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated}}function or(e){return e.file?e.file.path:void 0}function sr(t,n){return ur(t,n)||function(t,n){return t.relatedInformation||n.relatedInformation?t.relatedInformation&&n.relatedInformation?e.compareValues(t.relatedInformation.length,n.relatedInformation.length)||e.forEach(t.relatedInformation,(function(e,t){return sr(e,n.relatedInformation[t])}))||0:t.relatedInformation?-1:1:0}(t,n)||0}function ur(t,n){return e.compareStringsCaseSensitive(or(t),or(n))||e.compareValues(t.start,n.start)||e.compareValues(t.length,n.length)||e.compareValues(t.code,n.code)||cr(t.messageText,n.messageText)||0}function cr(t,n){if("string"==typeof t&&"string"==typeof n)return e.compareStringsCaseSensitive(t,n);if("string"==typeof t)return-1;if("string"==typeof n)return 1;var r=e.compareStringsCaseSensitive(t.messageText,n.messageText);if(r)return r;if(!t.next&&!n.next)return 0;if(!t.next)return-1;if(!n.next)return 1;for(var i=Math.min(t.next.length,n.next.length),a=0;an.next.length?1:0}function lr(e){return e.target||0}function dr(t){return"number"==typeof t.module?t.module:lr(t)>=2?e.ModuleKind.ES2015:e.ModuleKind.CommonJS}function pr(e){return!(!e.declaration&&!e.composite)}function fr(e,t){return void 0===e[t]?!!e.strict:!!e[t]}function hr(e){return void 0===e.allowJs?!!e.checkJs:e.allowJs}function gr(e,t){return t.strictFlag?fr(e,t.name):e[t.name]}function mr(e){for(var t=!1,n=0;n>4&3,l=(15&o)<<4|s>>2&15,d=(3&s)<<6|63&u;0===l&&0!==s?r.push(c):0===d&&0!==u?r.push(c,l):r.push(c,l,d),i+=4}return function(e){for(var t="",n=0,r=e.length;n0?Fn(e,e.modifiers.end):Ln(e)},e.isCollapsedRange=function(e){return e.pos===e.end},e.createTokenRange=function(t,n){return In(t,t+e.tokenToString(n).length)},e.rangeIsOnSingleLine=function(e,t){return Pn(e,e,t)},e.rangeStartPositionsAreOnSameLine=function(e,t,n){return Rn(Mn(e,n,!1),Mn(t,n,!1),n)},e.rangeEndPositionsAreOnSameLine=function(e,t,n){return Rn(e.end,t.end,n)},e.rangeStartIsOnSameLineAsRangeEnd=Pn,e.rangeEndIsOnSameLineAsRangeStart=function(e,t,n){return Rn(e.end,Mn(t,n,!1),n)},e.getLinesBetweenRangeEndAndRangeStart=function(t,n,r,i){var a=Mn(n,r,i);return e.getLinesBetweenPositions(r,t.end,a)},e.getLinesBetweenRangeEndPositions=function(t,n,r){return e.getLinesBetweenPositions(r,t.end,n.end)},e.isNodeArrayMultiLine=function(e,t){return!Rn(e.pos,e.end,t)},e.positionsAreOnSameLine=Rn,e.getStartPositionOfRange=Mn,e.getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter=function(t,n,r,i){var a=e.skipTrivia(r.text,t,!1,i),o=function(t,n,r){for(void 0===n&&(n=0);t-- >n;)if(!e.isWhiteSpaceLike(r.text.charCodeAt(t)))return t}(a,n,r);return e.getLinesBetweenPositions(r,null!=o?o:n,a)},e.getLinesBetweenPositionAndNextNonWhitespaceCharacter=function(t,n,r,i){var a=e.skipTrivia(r.text,t,!1,i);return e.getLinesBetweenPositions(r,t,Math.min(n,a))},e.isDeclarationNameOfEnumOrNamespace=function(t){var n=e.getParseTreeNode(t);if(n)switch(n.parent.kind){case 255:case 256:return n===n.parent.name}return!1},e.getInitializedVariables=function(t){return e.filter(t.declarations,Bn)},e.isWatchSet=function(e){return e.watch&&e.hasOwnProperty("watch")},e.closeFileWatcher=function(e){e.close()},e.getCheckFlags=jn,e.getDeclarationModifierFlagsFromSymbol=function(t){if(t.valueDeclaration){var n=e.getCombinedModifierFlags(t.valueDeclaration);return t.parent&&32&t.parent.flags?n:-29&n}if(6&jn(t)){var r=t.checkFlags;return(1024&r?8:256&r?4:16)|(2048&r?32:0)}return 4194304&t.flags?36:0},e.skipAlias=function(e,t){return 2097152&e.flags?t.getAliasedSymbol(e):e},e.getCombinedLocalAndExportSymbolFlags=function(e){return e.exportSymbol?e.exportSymbol.flags|e.flags:e.flags},e.isWriteOnlyAccess=function(e){return 1===Un(e)},e.isWriteAccess=function(e){return 0!==Un(e)},function(e){e[e.Read=0]="Read",e[e.Write=1]="Write",e[e.ReadWrite=2]="ReadWrite"}(An||(An={})),e.compareDataObjects=function e(t,n){if(!t||!n||Object.keys(t).length!==Object.keys(n).length)return!1;for(var r in t)if("object"==typeof t[r]){if(!e(t[r],n[r]))return!1}else if("function"!=typeof t[r]&&t[r]!==n[r])return!1;return!0},e.clearMap=function(e,t){e.forEach(t),e.clear()},e.mutateMapSkippingNewValues=Vn,e.mutateMap=function(e,t,n){Vn(e,t,n);var r=n.createNewValue;t.forEach((function(t,n){e.has(n)||e.set(n,r(n,t))}))},e.isAbstractConstructorType=function(e){return!!(16&Wn(e))&&!!e.symbol&&zn(e.symbol)},e.isAbstractConstructorSymbol=zn,e.getClassLikeDeclarationOfSymbol=Hn,e.getObjectFlags=Wn,e.typeHasCallOrConstructSignatures=function(e,t){return 0!==t.getSignaturesOfType(e,0).length||0!==t.getSignaturesOfType(e,1).length},e.forSomeAncestorDirectory=function(t,n){return!!e.forEachAncestorDirectory(t,(function(e){return!!n(e)||void 0}))},e.isUMDExportSymbol=function(t){return!!t&&!!t.declarations&&!!t.declarations[0]&&e.isNamespaceExportDeclaration(t.declarations[0])},e.showModuleSpecifier=function(t){var n=t.moduleSpecifier;return e.isStringLiteral(n)?n.text:b(n)},e.getLastChild=function(t){var n;return e.forEachChild(t,(function(e){p(e)&&(n=e)}),(function(e){for(var t=e.length-1;t>=0;t--)if(p(e[t])){n=e[t];break}})),n},e.addToSeen=function(e,t,n){return void 0===n&&(n=!0),t=String(t),!e.has(t)&&(e.set(t,n),!0)},e.isObjectTypeDeclaration=function(t){return e.isClassLike(t)||e.isInterfaceDeclaration(t)||e.isTypeLiteralNode(t)},e.isTypeNodeKind=function(e){return e>=172&&e<=195||128===e||152===e||144===e||155===e||145===e||131===e||147===e||148===e||113===e||150===e||141===e||223===e||303===e||304===e||305===e||306===e||307===e||308===e||309===e},e.isAccessExpression=Kn,e.getNameOfAccessExpression=function(t){return 201===t.kind?t.name:(e.Debug.assert(202===t.kind),t.argumentExpression)},e.isBundleFileTextLike=function(e){switch(e.kind){case"text":case"internal":return!0;default:return!1}},e.isNamedImportsOrExports=function(e){return 264===e.kind||268===e.kind},e.getLeftmostAccessExpression=qn,e.getLeftmostExpression=function(e,t){for(;;){switch(e.kind){case 215:e=e.operand;continue;case 216:e=e.left;continue;case 217:e=e.condition;continue;case 205:e=e.tag;continue;case 203:if(t)return e;case 224:case 202:case 201:case 225:case 336:e=e.expression;continue}return e}},e.objectAllocator={getNodeConstructor:function(){return $n},getTokenConstructor:function(){return Qn},getIdentifierConstructor:function(){return Xn},getPrivateIdentifierConstructor:function(){return $n},getSourceFileConstructor:function(){return $n},getSymbolConstructor:function(){return Gn},getTypeConstructor:function(){return Yn},getSignatureConstructor:function(){return Jn},getSourceMapSourceConstructor:function(){return Zn}},e.setObjectAllocator=function(t){e.objectAllocator=t},e.formatStringFromArgs=er,e.setLocalizedDiagnosticMessages=function(t){e.localizedDiagnosticMessages=t},e.getLocaleSpecificMessage=tr,e.createDetachedDiagnostic=function(t,n,r,i){e.Debug.assertGreaterThanOrEqual(n,0),e.Debug.assertGreaterThanOrEqual(r,0);var a=tr(i);return arguments.length>4&&(a=er(a,arguments,4)),{file:void 0,start:n,length:r,messageText:a,category:i.category,code:i.code,reportsUnnecessary:i.reportsUnnecessary,fileName:t}},e.attachFileToDiagnostics=function(e,t){for(var n=[],r=0,i=e;r2&&(n=er(n,arguments,2)),n},e.createCompilerDiagnostic=ar,e.createCompilerDiagnosticFromMessageChain=function(e){return{file:void 0,start:void 0,length:void 0,code:e.code,category:e.category,messageText:e.next?e:e.messageText}},e.chainDiagnosticMessages=function(e,t){var n=tr(t);return arguments.length>2&&(n=er(n,arguments,2)),{messageText:n,category:t.category,code:t.code,next:void 0===e||Array.isArray(e)?e:[e]}},e.concatenateDiagnosticMessageChains=function(e,t){for(var n=e;n.next;)n=n.next[0];n.next=[t]},e.compareDiagnostics=sr,e.compareDiagnosticsSkipRelatedInformation=ur,e.getLanguageVariant=function(e){return 4===e||2===e||1===e||6===e?1:0},e.getEmitScriptTarget=lr,e.getEmitModuleKind=dr,e.getEmitModuleResolutionKind=function(t){var n=t.moduleResolution;return void 0===n&&(n=dr(t)===e.ModuleKind.CommonJS?e.ModuleResolutionKind.NodeJs:e.ModuleResolutionKind.Classic),n},e.hasJsonModuleEmitEnabled=function(t){switch(dr(t)){case e.ModuleKind.CommonJS:case e.ModuleKind.AMD:case e.ModuleKind.ES2015:case e.ModuleKind.ES2020:case e.ModuleKind.ESNext:return!0;default:return!1}},e.unreachableCodeIsError=function(e){return!1===e.allowUnreachableCode},e.unusedLabelIsError=function(e){return!1===e.allowUnusedLabels},e.getAreDeclarationMapsEnabled=function(e){return!(!pr(e)||!e.declarationMap)},e.getAllowSyntheticDefaultImports=function(t){var n=dr(t);return void 0!==t.allowSyntheticDefaultImports?t.allowSyntheticDefaultImports:t.esModuleInterop||n===e.ModuleKind.System},e.getEmitDeclarations=pr,e.isIncrementalCompilation=function(e){return!(!e.incremental&&!e.composite)},e.getStrictOptionValue=fr,e.getAllowJSCompilerOption=hr,e.compilerOptionsAffectSemanticDiagnostics=function(t,n){return n!==t&&e.semanticDiagnosticsOptionDeclarations.some((function(e){return!$r(gr(n,e),gr(t,e))}))},e.compilerOptionsAffectEmit=function(t,n){return n!==t&&e.affectsEmitOptionDeclarations.some((function(e){return!$r(gr(n,e),gr(t,e))}))},e.getCompilerOptionValue=gr,e.getJSXTransformEnabled=function(e){var t=e.jsx;return 2===t||4===t||5===t},e.getJSXImplicitImportBase=function(t,n){var r=null==n?void 0:n.pragmas.get("jsximportsource"),i=e.isArray(r)?r[0]:r;return 4===t.jsx||5===t.jsx||t.jsxImportSource||i?(null==i?void 0:i.arguments.factory)||t.jsxImportSource||"react":void 0},e.getJSXRuntimeImport=function(e,t){return e?e+"/"+(5===t.jsx?"jsx-dev-runtime":"jsx-runtime"):void 0},e.hasZeroOrOneAsteriskCharacter=mr,e.createSymlinkCache=_r,e.discoverProbableSymlinks=function(t,n,r){for(var i=_r(),a=0,o=e.flatten(e.mapDefined(t,(function(t){return t.resolvedModules&&e.compact(e.arrayFrom(e.mapIterator(t.resolvedModules.values(),(function(e){return e&&e.originalPath&&e.resolvedFileName!==e.originalPath?[e.resolvedFileName,e.originalPath]:void 0}))))})));a0;)u+=")?",p--;return u}}(t,n,r,Tr[r])}))}function Or(e){return!/[.*?]/.test(e)}function Nr(e,t){return"*"===e?t:"?"===e?"[^/]":"\\"+e}function Ir(t,n,r,i,a){t=e.normalizePath(t),a=e.normalizePath(a);var o=e.combinePaths(a,t);return{includeFilePatterns:e.map(Ar(r,o,"files"),(function(e){return"^"+e+"$"})),includeFilePattern:wr(r,o,"files"),includeDirectoryPattern:wr(r,o,"directories"),excludePattern:wr(n,o,"exclude"),basePaths:Lr(t,r,i)}}function Fr(e,t){return new RegExp(e,t?"":"i")}function Lr(t,n,r){var i=[t];if(n){for(var a=[],o=0,s=n;o=0;r--)if(e.fileExtensionIs(t,n[r]))return Vr(r,n);return 0},e.adjustExtensionPriority=Vr,e.getNextLowestExtensionPriority=function(e,t){return e<2?2:t.length};var zr=[".d.ts",".ts",".js",".tsx",".jsx",".json"];function Hr(e){for(var t=0,n=zr;t=0)}function Yr(e){return".ts"===e||".tsx"===e||".d.ts"===e}function Jr(t){return e.find(zr,(function(n){return e.fileExtensionIs(t,n)}))}function $r(t,n){return t===n||"object"==typeof t&&null!==t&&"object"==typeof n&&null!==n&&e.equalOwnProperties(t,n,$r)}function Qr(e,t){return e.pos=t,e}function Xr(e,t){return e.end=t,e}function Zr(e,t,n){return Xr(Qr(e,t),n)}function ei(e,t){return e&&t&&(e.parent=t),e}e.removeFileExtension=Hr,e.tryRemoveExtension=Wr,e.removeExtension=Kr,e.changeExtension=function(t,n){return e.changeAnyExtension(t,n,zr,!1)},e.tryParsePattern=qr,e.positionIsSynthesized=Gr,e.extensionIsTS=Yr,e.resolutionExtensionIsTSOrJson=function(e){return Yr(e)||".json"===e},e.extensionFromPath=function(t){var n=Jr(t);return void 0!==n?n:e.Debug.fail("File "+t+" has unknown extension.")},e.isAnySupportedFileExtension=function(e){return void 0!==Jr(e)},e.tryGetExtensionFromPath=Jr,e.isCheckJsEnabledForFile=function(e,t){return e.checkJsDirective?e.checkJsDirective.enabled:t.checkJs},e.emptyFileSystemEntries={files:e.emptyArray,directories:e.emptyArray},e.matchPatternOrExact=function(t,n){for(var r=[],i=0,a=t;ii&&(i=o)}return{min:r,max:i}},e.rangeOfNode=function(e){return{pos:_(e),end:e.end}},e.rangeOfTypeParameters=function(e){return{pos:e.pos-1,end:e.end+1}},e.skipTypeChecking=function(e,t,n){return t.skipLibCheck&&e.isDeclarationFile||t.skipDefaultLibCheck&&e.hasNoDefaultLib||n.isSourceOfProjectReferenceRedirect(e.fileName)},e.isJsonEqual=$r,e.parsePseudoBigInt=function(e){var t;switch(e.charCodeAt(1)){case 98:case 66:t=1;break;case 111:case 79:t=3;break;case 120:case 88:t=4;break;default:for(var n=e.length-1,r=0;48===e.charCodeAt(r);)r++;return e.slice(r,n)||"0"}for(var i=e.length-1,a=(i-2)*t,o=new Uint16Array((a>>>4)+(15&a?1:0)),s=i-1,u=0;s>=2;s--,u+=t){var c=u>>>4,l=e.charCodeAt(s),d=(l<=57?l-48:10+l-(l<=70?65:97))<<(15&u);o[c]|=d;var p=d>>>16;p&&(o[c+1]|=p)}for(var f="",h=o.length-1,g=!0;g;){var m=0;for(g=!1,c=h;c>=0;c--){var _=m<<16|o[c],v=_/10|0;o[c]=v,m=_-10*v,v&&!g&&(h=c,g=!0)}f=m+f}return f},e.pseudoBigIntToString=function(e){var t=e.negative,n=e.base10Value;return(t&&"0"!==n?"-":"")+n},e.isValidTypeOnlyAliasUseSite=function(t){return!!(8388608&t.flags)||ue(t)||function(t){if(78!==t.kind)return!1;var n=e.findAncestor(t.parent,(function(e){switch(e.kind){case 286:return!0;case 201:case 223:return!1;default:return"quit"}}));return 116===(null==n?void 0:n.token)||253===(null==n?void 0:n.parent.kind)}(t)||function(e){for(;78===e.kind||201===e.kind;)e=e.parent;if(158!==e.kind)return!1;if(un(e.parent,128))return!0;var t=e.parent.parent.kind;return 253===t||177===t}(t)||!oe(t)},e.typeOnlyDeclarationIsExport=function(e){return 270===e.kind},e.isIdentifierTypeReference=function(t){return e.isTypeReferenceNode(t)&&e.isIdentifier(t.typeName)},e.arrayIsHomogeneous=function(t,n){if(void 0===n&&(n=e.equateValues),t.length<2)return!0;for(var r=t[0],i=1,a=t.length;i3)return!0;var c=e.getExpressionPrecedence(u);switch(e.compareValues(c,o)){case-1:return!(!i&&1===s&&219===r.kind);case 1:return!1;case 0:if(i)return 1===s;if(e.isBinaryExpression(u)&&u.operatorToken.kind===t){if(function(e){return 41===e||51===e||50===e||52===e}(t))return!1;if(39===t){var l=a?n(a):0;if(e.isLiteralKind(l)&&l===n(u))return!1}}return 0===e.getExpressionAssociativity(u)}}(r,i,a,o)?t.createParenthesizedExpression(i):i}function i(n){var r=e.skipPartiallyEmittedExpressions(n);return e.isLeftHandSideExpression(r)&&(204!==r.kind||r.arguments)?n:e.setTextRange(t.createParenthesizedExpression(n),n)}function a(n){var r=e.skipPartiallyEmittedExpressions(n);return e.getExpressionPrecedence(r)>e.getOperatorPrecedence(216,27)?n:e.setTextRange(t.createParenthesizedExpression(n),n)}function o(e){return 184===e.kind?t.createParenthesizedType(e):e}function s(e){switch(e.kind){case 182:case 183:case 174:case 175:return t.createParenthesizedType(e)}return o(e)}function u(n,r){return 0===r&&e.isFunctionOrConstructorTypeNode(n)&&n.typeParameters?t.createParenthesizedType(n):n}},e.nullParenthesizerRules={parenthesizeLeftSideOfBinary:function(e,t){return t},parenthesizeRightSideOfBinary:function(e,t,n){return n},parenthesizeExpressionOfComputedPropertyName:e.identity,parenthesizeConditionOfConditionalExpression:e.identity,parenthesizeBranchOfConditionalExpression:e.identity,parenthesizeExpressionOfExportDefault:e.identity,parenthesizeExpressionOfNew:function(t){return e.cast(t,e.isLeftHandSideExpression)},parenthesizeLeftSideOfAccess:function(t){return e.cast(t,e.isLeftHandSideExpression)},parenthesizeOperandOfPostfixUnary:function(t){return e.cast(t,e.isLeftHandSideExpression)},parenthesizeOperandOfPrefixUnary:function(t){return e.cast(t,e.isUnaryExpression)},parenthesizeExpressionsOfCommaDelimitedList:function(t){return e.cast(t,e.isNodeArray)},parenthesizeExpressionForDisallowedComma:e.identity,parenthesizeExpressionOfExpressionStatement:e.identity,parenthesizeConciseBodyOfArrowFunction:e.identity,parenthesizeMemberOfConditionalType:e.identity,parenthesizeMemberOfElementType:e.identity,parenthesizeElementTypeOfArrayType:e.identity,parenthesizeConstituentTypesOfUnionOrIntersectionType:function(t){return e.cast(t,e.isNodeArray)},parenthesizeTypeArguments:function(t){return t&&e.cast(t,e.isNodeArray)}}}(u||(u={})),function(e){e.createNodeConverters=function(t){return{convertToFunctionBlock:function(n,r){if(e.isBlock(n))return n;var i=t.createReturnStatement(n);e.setTextRange(i,n);var a=t.createBlock([i],r);return e.setTextRange(a,n),a},convertToFunctionExpression:function(n){if(!n.body)return e.Debug.fail("Cannot convert a FunctionDeclaration without a body");var r=t.createFunctionExpression(n.modifiers,n.asteriskToken,n.name,n.typeParameters,n.parameters,n.type,n.body);return e.setOriginalNode(r,n),e.setTextRange(r,n),e.getStartsOnNewLine(n)&&e.setStartsOnNewLine(r,!0),r},convertToArrayAssignmentElement:n,convertToObjectAssignmentElement:r,convertToAssignmentPattern:i,convertToObjectAssignmentPattern:a,convertToArrayAssignmentPattern:o,convertToAssignmentElementTarget:s};function n(n){if(e.isBindingElement(n)){if(n.dotDotDotToken)return e.Debug.assertNode(n.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(t.createSpreadElement(n.name),n),n);var r=s(n.name);return n.initializer?e.setOriginalNode(e.setTextRange(t.createAssignment(r,n.initializer),n),n):r}return e.cast(n,e.isExpression)}function r(n){if(e.isBindingElement(n)){if(n.dotDotDotToken)return e.Debug.assertNode(n.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(t.createSpreadAssignment(n.name),n),n);if(n.propertyName){var r=s(n.name);return e.setOriginalNode(e.setTextRange(t.createPropertyAssignment(n.propertyName,n.initializer?t.createAssignment(r,n.initializer):r),n),n)}return e.Debug.assertNode(n.name,e.isIdentifier),e.setOriginalNode(e.setTextRange(t.createShorthandPropertyAssignment(n.name,n.initializer),n),n)}return e.cast(n,e.isObjectLiteralElementLike)}function i(e){switch(e.kind){case 197:case 199:return o(e);case 196:case 200:return a(e)}}function a(n){return e.isObjectBindingPattern(n)?e.setOriginalNode(e.setTextRange(t.createObjectLiteralExpression(e.map(n.elements,r)),n),n):e.cast(n,e.isObjectLiteralExpression)}function o(r){return e.isArrayBindingPattern(r)?e.setOriginalNode(e.setTextRange(t.createArrayLiteralExpression(e.map(r.elements,n)),r),r):e.cast(r,e.isArrayLiteralExpression)}function s(t){return e.isBindingPattern(t)?i(t):e.cast(t,e.isExpression)}},e.nullNodeConverters={convertToFunctionBlock:e.notImplemented,convertToFunctionExpression:e.notImplemented,convertToArrayAssignmentElement:e.notImplemented,convertToObjectAssignmentElement:e.notImplemented,convertToAssignmentPattern:e.notImplemented,convertToObjectAssignmentPattern:e.notImplemented,convertToArrayAssignmentPattern:e.notImplemented,convertToAssignmentElementTarget:e.notImplemented}}(u||(u={})),function(e){var n,r=0;function i(i,f){var h=8&i?a:o,g=e.memoize((function(){return 1&i?e.nullParenthesizerRules:e.createParenthesizerRules(w)})),m=e.memoize((function(){return 2&i?e.nullNodeConverters:e.createNodeConverters(w)})),_=e.memoizeOne((function(e){return function(t,n){return Ot(t,e,n)}})),y=e.memoizeOne((function(e){return function(t){return wt(e,t)}})),b=e.memoizeOne((function(e){return function(t){return At(t,e)}})),D=e.memoizeOne((function(e){return function(){return function(e){return O(e)}(e)}})),E=e.memoizeOne((function(e){return function(t){return Jn(e,t)}})),C=e.memoizeOne((function(e){return function(t,n){return function(e,t,n){return t.type!==n?h(Jn(e,n),t):t}(e,t,n)}})),S=e.memoizeOne((function(e){return function(t,n){return dr(e,t,n)}})),x=e.memoizeOne((function(e){return function(t,n,r){return function(e,t,n,r){return void 0===n&&(n=er(t)),t.tagName!==n||t.comment!==r?h(dr(e,n,r),t):t}(e,t,n,r)}})),k=e.memoizeOne((function(e){return function(t,n,r){return pr(e,t,n,r)}})),T=e.memoizeOne((function(e){return function(t,n,r,i){return function(e,t,n,r,i){return void 0===n&&(n=er(t)),t.tagName!==n||t.typeExpression!==r||t.comment!==i?h(pr(e,n,r,i),t):t}(e,t,n,r,i)}})),w={get parenthesizer(){return g()},get converters(){return m()},createNodeArray:A,createNumericLiteral:H,createBigIntLiteral:W,createStringLiteral:q,createStringLiteralFromNode:function(t){var n=K(e.getTextOfIdentifierOrLiteral(t),void 0);return n.textSourceNode=t,n},createRegularExpressionLiteral:G,createLiteralLikeNode:function(e,t){switch(e){case 8:return H(t,0);case 9:return W(t);case 10:return q(t,void 0);case 11:return br(t,!1);case 12:return br(t,!0);case 13:return G(t);case 14:return Pt(e,t,void 0,0)}},createIdentifier:$,updateIdentifier:function(t,n){return t.typeArguments!==n?h($(e.idText(t),n),t):t},createTempVariable:Q,createLoopVariable:function(){return J("",2)},createUniqueName:function(t,n){return void 0===n&&(n=0),e.Debug.assert(!(7&n),"Argument out of range: flags"),e.Debug.assert(32!=(48&n),"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"),J(t,3|n)},getGeneratedNameForNode:X,createPrivateIdentifier:function(t){e.startsWith(t,"#")||e.Debug.fail("First character of private identifier must be #: "+t);var n=f.createBasePrivateIdentifierNode(79);return n.escapedText=e.escapeLeadingUnderscores(t),n.transformFlags|=4194304,n},createToken:ee,createSuper:function(){return ee(105)},createThis:te,createNull:function(){return ee(103)},createTrue:ne,createFalse:re,createModifier:ie,createModifiersFromModifierFlags:ae,createQualifiedName:oe,updateQualifiedName:function(e,t,n){return e.left!==t||e.right!==n?h(oe(t,n),e):e},createComputedPropertyName:se,updateComputedPropertyName:function(e,t){return e.expression!==t?h(se(t),e):e},createTypeParameterDeclaration:ue,updateTypeParameterDeclaration:function(e,t,n,r){return e.name!==t||e.constraint!==n||e.default!==r?h(ue(t,n,r),e):e},createParameterDeclaration:ce,updateParameterDeclaration:le,createDecorator:de,updateDecorator:function(e,t){return e.expression!==t?h(de(t),e):e},createPropertySignature:pe,updatePropertySignature:fe,createPropertyDeclaration:he,updatePropertyDeclaration:ge,createMethodSignature:me,updateMethodSignature:_e,createMethodDeclaration:ve,updateMethodDeclaration:ye,createConstructorDeclaration:be,updateConstructorDeclaration:De,createGetAccessorDeclaration:Ee,updateGetAccessorDeclaration:Ce,createSetAccessorDeclaration:Se,updateSetAccessorDeclaration:xe,createCallSignature:ke,updateCallSignature:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?P(ke(t,n,r),e):e},createConstructSignature:Te,updateConstructSignature:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?P(Te(t,n,r),e):e},createIndexSignature:we,updateIndexSignature:Ae,createTemplateLiteralTypeSpan:Oe,updateTemplateLiteralTypeSpan:function(e,t,n){return e.type!==t||e.literal!==n?h(Oe(t,n),e):e},createKeywordTypeNode:function(e){return ee(e)},createTypePredicateNode:Ne,updateTypePredicateNode:function(e,t,n,r){return e.assertsModifier!==t||e.parameterName!==n||e.type!==r?h(Ne(t,n,r),e):e},createTypeReferenceNode:Ie,updateTypeReferenceNode:function(e,t,n){return e.typeName!==t||e.typeArguments!==n?h(Ie(t,n),e):e},createFunctionTypeNode:Fe,updateFunctionTypeNode:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?P(Fe(t,n,r),e):e},createConstructorTypeNode:Le,updateConstructorTypeNode:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?P(Le(t,n,r),e):e},createTypeQueryNode:Pe,updateTypeQueryNode:function(e,t){return e.exprName!==t?h(Pe(t),e):e},createTypeLiteralNode:Re,updateTypeLiteralNode:function(e,t){return e.members!==t?h(Re(t),e):e},createArrayTypeNode:Me,updateArrayTypeNode:function(e,t){return e.elementType!==t?h(Me(t),e):e},createTupleTypeNode:Be,updateTupleTypeNode:function(e,t){return e.elements!==t?h(Be(t),e):e},createNamedTupleMember:je,updateNamedTupleMember:function(e,t,n,r,i){return e.dotDotDotToken!==t||e.name!==n||e.questionToken!==r||e.type!==i?h(je(t,n,r,i),e):e},createOptionalTypeNode:Ue,updateOptionalTypeNode:function(e,t){return e.type!==t?h(Ue(t),e):e},createRestTypeNode:Ve,updateRestTypeNode:function(e,t){return e.type!==t?h(Ve(t),e):e},createUnionTypeNode:function(e){return ze(182,e)},updateUnionTypeNode:function(e,t){return He(e,t)},createIntersectionTypeNode:function(e){return ze(183,e)},updateIntersectionTypeNode:function(e,t){return He(e,t)},createConditionalTypeNode:We,updateConditionalTypeNode:function(e,t,n,r,i){return e.checkType!==t||e.extendsType!==n||e.trueType!==r||e.falseType!==i?h(We(t,n,r,i),e):e},createInferTypeNode:Ke,updateInferTypeNode:function(e,t){return e.typeParameter!==t?h(Ke(t),e):e},createImportTypeNode:Ge,updateImportTypeNode:function(e,t,n,r,i){return void 0===i&&(i=e.isTypeOf),e.argument!==t||e.qualifier!==n||e.typeArguments!==r||e.isTypeOf!==i?h(Ge(t,n,r,i),e):e},createParenthesizedType:Ye,updateParenthesizedType:function(e,t){return e.type!==t?h(Ye(t),e):e},createThisTypeNode:function(){var e=O(187);return e.transformFlags=1,e},createTypeOperatorNode:Je,updateTypeOperatorNode:function(e,t){return e.type!==t?h(Je(e.operator,t),e):e},createIndexedAccessTypeNode:$e,updateIndexedAccessTypeNode:function(e,t,n){return e.objectType!==t||e.indexType!==n?h($e(t,n),e):e},createMappedTypeNode:Qe,updateMappedTypeNode:function(e,t,n,r,i,a){return e.readonlyToken!==t||e.typeParameter!==n||e.nameType!==r||e.questionToken!==i||e.type!==a?h(Qe(t,n,r,i,a),e):e},createLiteralTypeNode:Xe,updateLiteralTypeNode:function(e,t){return e.literal!==t?h(Xe(t),e):e},createTemplateLiteralType:qe,updateTemplateLiteralType:function(e,t,n){return e.head!==t||e.templateSpans!==n?h(qe(t,n),e):e},createObjectBindingPattern:Ze,updateObjectBindingPattern:function(e,t){return e.elements!==t?h(Ze(t),e):e},createArrayBindingPattern:et,updateArrayBindingPattern:function(e,t){return e.elements!==t?h(et(t),e):e},createBindingElement:tt,updateBindingElement:function(e,t,n,r,i){return e.propertyName!==n||e.dotDotDotToken!==t||e.name!==r||e.initializer!==i?h(tt(t,n,r,i),e):e},createArrayLiteralExpression:rt,updateArrayLiteralExpression:function(e,t){return e.elements!==t?h(rt(t,e.multiLine),e):e},createObjectLiteralExpression:it,updateObjectLiteralExpression:function(e,t){return e.properties!==t?h(it(t,e.multiLine),e):e},createPropertyAccessExpression:4&i?function(t,n){return e.setEmitFlags(at(t,n),131072)}:at,updatePropertyAccessExpression:function(t,n,r){return e.isPropertyAccessChain(t)?st(t,n,t.questionDotToken,e.cast(r,e.isIdentifier)):t.expression!==n||t.name!==r?h(at(n,r),t):t},createPropertyAccessChain:4&i?function(t,n,r){return e.setEmitFlags(ot(t,n,r),131072)}:ot,updatePropertyAccessChain:st,createElementAccessExpression:ut,updateElementAccessExpression:function(t,n,r){return e.isElementAccessChain(t)?lt(t,n,t.questionDotToken,r):t.expression!==n||t.argumentExpression!==r?h(ut(n,r),t):t},createElementAccessChain:ct,updateElementAccessChain:lt,createCallExpression:dt,updateCallExpression:function(t,n,r,i){return e.isCallChain(t)?ft(t,n,t.questionDotToken,r,i):t.expression!==n||t.typeArguments!==r||t.arguments!==i?h(dt(n,r,i),t):t},createCallChain:pt,updateCallChain:ft,createNewExpression:ht,updateNewExpression:function(e,t,n,r){return e.expression!==t||e.typeArguments!==n||e.arguments!==r?h(ht(t,n,r),e):e},createTaggedTemplateExpression:gt,updateTaggedTemplateExpression:function(e,t,n,r){return e.tag!==t||e.typeArguments!==n||e.template!==r?h(gt(t,n,r),e):e},createTypeAssertion:mt,updateTypeAssertion:_t,createParenthesizedExpression:vt,updateParenthesizedExpression:yt,createFunctionExpression:bt,updateFunctionExpression:Dt,createArrowFunction:Et,updateArrowFunction:Ct,createDeleteExpression:St,updateDeleteExpression:function(e,t){return e.expression!==t?h(St(t),e):e},createTypeOfExpression:xt,updateTypeOfExpression:function(e,t){return e.expression!==t?h(xt(t),e):e},createVoidExpression:kt,updateVoidExpression:function(e,t){return e.expression!==t?h(kt(t),e):e},createAwaitExpression:Tt,updateAwaitExpression:function(e,t){return e.expression!==t?h(Tt(t),e):e},createPrefixUnaryExpression:wt,updatePrefixUnaryExpression:function(e,t){return e.operand!==t?h(wt(e.operator,t),e):e},createPostfixUnaryExpression:At,updatePostfixUnaryExpression:function(e,t){return e.operand!==t?h(At(t,e.operator),e):e},createBinaryExpression:Ot,updateBinaryExpression:function(e,t,n,r){return e.left!==t||e.operatorToken!==n||e.right!==r?h(Ot(t,n,r),e):e},createConditionalExpression:It,updateConditionalExpression:function(e,t,n,r,i,a){return e.condition!==t||e.questionToken!==n||e.whenTrue!==r||e.colonToken!==i||e.whenFalse!==a?h(It(t,n,r,i,a),e):e},createTemplateExpression:Ft,updateTemplateExpression:function(e,t,n){return e.head!==t||e.templateSpans!==n?h(Ft(t,n),e):e},createTemplateHead:function(e,t,n){return Lt(15,e,t,n)},createTemplateMiddle:function(e,t,n){return Lt(16,e,t,n)},createTemplateTail:function(e,t,n){return Lt(17,e,t,n)},createNoSubstitutionTemplateLiteral:function(e,t,n){return Lt(14,e,t,n)},createTemplateLiteralLikeNode:Pt,createYieldExpression:Rt,updateYieldExpression:function(e,t,n){return e.expression!==n||e.asteriskToken!==t?h(Rt(t,n),e):e},createSpreadElement:Mt,updateSpreadElement:function(e,t){return e.expression!==t?h(Mt(t),e):e},createClassExpression:Bt,updateClassExpression:jt,createOmittedExpression:function(){return nt(222)},createExpressionWithTypeArguments:Ut,updateExpressionWithTypeArguments:function(e,t,n){return e.expression!==t||e.typeArguments!==n?h(Ut(t,n),e):e},createAsExpression:Vt,updateAsExpression:zt,createNonNullExpression:Ht,updateNonNullExpression:Wt,createNonNullChain:Kt,updateNonNullChain:qt,createMetaProperty:Gt,updateMetaProperty:function(e,t){return e.name!==t?h(Gt(e.keywordToken,t),e):e},createTemplateSpan:Yt,updateTemplateSpan:function(e,t,n){return e.expression!==t||e.literal!==n?h(Yt(t,n),e):e},createSemicolonClassElement:function(){var e=O(229);return e.transformFlags|=256,e},createBlock:Jt,updateBlock:function(e,t){return e.statements!==t?h(Jt(t,e.multiLine),e):e},createVariableStatement:$t,updateVariableStatement:Qt,createEmptyStatement:Xt,createExpressionStatement:Zt,updateExpressionStatement:function(e,t){return e.expression!==t?h(Zt(t),e):e},createIfStatement:en,updateIfStatement:function(e,t,n,r){return e.expression!==t||e.thenStatement!==n||e.elseStatement!==r?h(en(t,n,r),e):e},createDoStatement:tn,updateDoStatement:function(e,t,n){return e.statement!==t||e.expression!==n?h(tn(t,n),e):e},createWhileStatement:nn,updateWhileStatement:function(e,t,n){return e.expression!==t||e.statement!==n?h(nn(t,n),e):e},createForStatement:rn,updateForStatement:function(e,t,n,r,i){return e.initializer!==t||e.condition!==n||e.incrementor!==r||e.statement!==i?h(rn(t,n,r,i),e):e},createForInStatement:an,updateForInStatement:function(e,t,n,r){return e.initializer!==t||e.expression!==n||e.statement!==r?h(an(t,n,r),e):e},createForOfStatement:on,updateForOfStatement:function(e,t,n,r,i){return e.awaitModifier!==t||e.initializer!==n||e.expression!==r||e.statement!==i?h(on(t,n,r,i),e):e},createContinueStatement:sn,updateContinueStatement:function(e,t){return e.label!==t?h(sn(t),e):e},createBreakStatement:un,updateBreakStatement:function(e,t){return e.label!==t?h(un(t),e):e},createReturnStatement:cn,updateReturnStatement:function(e,t){return e.expression!==t?h(cn(t),e):e},createWithStatement:ln,updateWithStatement:function(e,t,n){return e.expression!==t||e.statement!==n?h(ln(t,n),e):e},createSwitchStatement:dn,updateSwitchStatement:function(e,t,n){return e.expression!==t||e.caseBlock!==n?h(dn(t,n),e):e},createLabeledStatement:pn,updateLabeledStatement:fn,createThrowStatement:hn,updateThrowStatement:function(e,t){return e.expression!==t?h(hn(t),e):e},createTryStatement:gn,updateTryStatement:function(e,t,n,r){return e.tryBlock!==t||e.catchClause!==n||e.finallyBlock!==r?h(gn(t,n,r),e):e},createDebuggerStatement:function(){return O(248)},createVariableDeclaration:mn,updateVariableDeclaration:function(e,t,n,r,i){return e.name!==t||e.type!==r||e.exclamationToken!==n||e.initializer!==i?h(mn(t,n,r,i),e):e},createVariableDeclarationList:_n,updateVariableDeclarationList:function(e,t){return e.declarations!==t?h(_n(t,e.flags),e):e},createFunctionDeclaration:vn,updateFunctionDeclaration:yn,createClassDeclaration:bn,updateClassDeclaration:Dn,createInterfaceDeclaration:En,updateInterfaceDeclaration:Cn,createTypeAliasDeclaration:Sn,updateTypeAliasDeclaration:xn,createEnumDeclaration:kn,updateEnumDeclaration:Tn,createModuleDeclaration:wn,updateModuleDeclaration:An,createModuleBlock:On,updateModuleBlock:function(e,t){return e.statements!==t?h(On(t),e):e},createCaseBlock:Nn,updateCaseBlock:function(e,t){return e.clauses!==t?h(Nn(t),e):e},createNamespaceExportDeclaration:In,updateNamespaceExportDeclaration:function(e,t){return e.name!==t?h(In(t),e):e},createImportEqualsDeclaration:Fn,updateImportEqualsDeclaration:Ln,createImportDeclaration:Pn,updateImportDeclaration:Rn,createImportClause:Mn,updateImportClause:function(e,t,n,r){return e.isTypeOnly!==t||e.name!==n||e.namedBindings!==r?h(Mn(t,n,r),e):e},createNamespaceImport:Bn,updateNamespaceImport:function(e,t){return e.name!==t?h(Bn(t),e):e},createNamespaceExport:jn,updateNamespaceExport:function(e,t){return e.name!==t?h(jn(t),e):e},createNamedImports:Un,updateNamedImports:function(e,t){return e.elements!==t?h(Un(t),e):e},createImportSpecifier:Vn,updateImportSpecifier:function(e,t,n){return e.propertyName!==t||e.name!==n?h(Vn(t,n),e):e},createExportAssignment:zn,updateExportAssignment:Hn,createExportDeclaration:Wn,updateExportDeclaration:Kn,createNamedExports:qn,updateNamedExports:function(e,t){return e.elements!==t?h(qn(t),e):e},createExportSpecifier:Gn,updateExportSpecifier:function(e,t,n){return e.propertyName!==t||e.name!==n?h(Gn(t,n),e):e},createMissingDeclaration:function(){return N(271,void 0,void 0)},createExternalModuleReference:Yn,updateExternalModuleReference:function(e,t){return e.expression!==t?h(Yn(t),e):e},get createJSDocAllType(){return D(303)},get createJSDocUnknownType(){return D(304)},get createJSDocNonNullableType(){return E(306)},get updateJSDocNonNullableType(){return C(306)},get createJSDocNullableType(){return E(305)},get updateJSDocNullableType(){return C(305)},get createJSDocOptionalType(){return E(307)},get updateJSDocOptionalType(){return C(307)},get createJSDocVariadicType(){return E(309)},get updateJSDocVariadicType(){return C(309)},get createJSDocNamepathType(){return E(310)},get updateJSDocNamepathType(){return C(310)},createJSDocFunctionType:$n,updateJSDocFunctionType:function(e,t,n){return e.parameters!==t||e.type!==n?h($n(t,n),e):e},createJSDocTypeLiteral:Qn,updateJSDocTypeLiteral:function(e,t,n){return e.jsDocPropertyTags!==t||e.isArrayType!==n?h(Qn(t,n),e):e},createJSDocTypeExpression:Xn,updateJSDocTypeExpression:function(e,t){return e.type!==t?h(Xn(t),e):e},createJSDocSignature:Zn,updateJSDocSignature:function(e,t,n,r){return e.typeParameters!==t||e.parameters!==n||e.type!==r?h(Zn(t,n,r),e):e},createJSDocTemplateTag:nr,updateJSDocTemplateTag:function(e,t,n,r,i){return void 0===t&&(t=er(e)),e.tagName!==t||e.constraint!==n||e.typeParameters!==r||e.comment!==i?h(nr(t,n,r,i),e):e},createJSDocTypedefTag:rr,updateJSDocTypedefTag:function(e,t,n,r,i){return void 0===t&&(t=er(e)),e.tagName!==t||e.typeExpression!==n||e.fullName!==r||e.comment!==i?h(rr(t,n,r,i),e):e},createJSDocParameterTag:ir,updateJSDocParameterTag:function(e,t,n,r,i,a,o){return void 0===t&&(t=er(e)),e.tagName!==t||e.name!==n||e.isBracketed!==r||e.typeExpression!==i||e.isNameFirst!==a||e.comment!==o?h(ir(t,n,r,i,a,o),e):e},createJSDocPropertyTag:ar,updateJSDocPropertyTag:function(e,t,n,r,i,a,o){return void 0===t&&(t=er(e)),e.tagName!==t||e.name!==n||e.isBracketed!==r||e.typeExpression!==i||e.isNameFirst!==a||e.comment!==o?h(ar(t,n,r,i,a,o),e):e},createJSDocCallbackTag:or,updateJSDocCallbackTag:function(e,t,n,r,i){return void 0===t&&(t=er(e)),e.tagName!==t||e.typeExpression!==n||e.fullName!==r||e.comment!==i?h(or(t,n,r,i),e):e},createJSDocAugmentsTag:sr,updateJSDocAugmentsTag:function(e,t,n,r){return void 0===t&&(t=er(e)),e.tagName!==t||e.class!==n||e.comment!==r?h(sr(t,n,r),e):e},createJSDocImplementsTag:ur,updateJSDocImplementsTag:function(e,t,n,r){return void 0===t&&(t=er(e)),e.tagName!==t||e.class!==n||e.comment!==r?h(ur(t,n,r),e):e},createJSDocSeeTag:cr,updateJSDocSeeTag:function(e,t,n,r){return e.tagName!==t||e.name!==n||e.comment!==r?h(cr(t,n,r),e):e},createJSDocNameReference:lr,updateJSDocNameReference:function(e,t){return e.name!==t?h(lr(t),e):e},get createJSDocTypeTag(){return k(329)},get updateJSDocTypeTag(){return T(329)},get createJSDocReturnTag(){return k(327)},get updateJSDocReturnTag(){return T(327)},get createJSDocThisTag(){return k(328)},get updateJSDocThisTag(){return T(328)},get createJSDocEnumTag(){return k(325)},get updateJSDocEnumTag(){return T(325)},get createJSDocAuthorTag(){return S(317)},get updateJSDocAuthorTag(){return x(317)},get createJSDocClassTag(){return S(319)},get updateJSDocClassTag(){return x(319)},get createJSDocPublicTag(){return S(320)},get updateJSDocPublicTag(){return x(320)},get createJSDocPrivateTag(){return S(321)},get updateJSDocPrivateTag(){return x(321)},get createJSDocProtectedTag(){return S(322)},get updateJSDocProtectedTag(){return x(322)},get createJSDocReadonlyTag(){return S(323)},get updateJSDocReadonlyTag(){return x(323)},get createJSDocDeprecatedTag(){return S(318)},get updateJSDocDeprecatedTag(){return x(318)},createJSDocUnknownTag:fr,updateJSDocUnknownTag:function(e,t,n){return e.tagName!==t||e.comment!==n?h(fr(t,n),e):e},createJSDocComment:hr,updateJSDocComment:function(e,t,n){return e.comment!==t||e.tags!==n?h(hr(t,n),e):e},createJsxElement:gr,updateJsxElement:function(e,t,n,r){return e.openingElement!==t||e.children!==n||e.closingElement!==r?h(gr(t,n,r),e):e},createJsxSelfClosingElement:mr,updateJsxSelfClosingElement:function(e,t,n,r){return e.tagName!==t||e.typeArguments!==n||e.attributes!==r?h(mr(t,n,r),e):e},createJsxOpeningElement:_r,updateJsxOpeningElement:function(e,t,n,r){return e.tagName!==t||e.typeArguments!==n||e.attributes!==r?h(_r(t,n,r),e):e},createJsxClosingElement:vr,updateJsxClosingElement:function(e,t){return e.tagName!==t?h(vr(t),e):e},createJsxFragment:yr,createJsxText:br,updateJsxText:function(e,t,n){return e.text!==t||e.containsOnlyTriviaWhiteSpaces!==n?h(br(t,n),e):e},createJsxOpeningFragment:function(){var e=O(278);return e.transformFlags|=2,e},createJsxJsxClosingFragment:function(){var e=O(279);return e.transformFlags|=2,e},updateJsxFragment:function(e,t,n,r){return e.openingFragment!==t||e.children!==n||e.closingFragment!==r?h(yr(t,n,r),e):e},createJsxAttribute:Dr,updateJsxAttribute:function(e,t,n){return e.name!==t||e.initializer!==n?h(Dr(t,n),e):e},createJsxAttributes:Er,updateJsxAttributes:function(e,t){return e.properties!==t?h(Er(t),e):e},createJsxSpreadAttribute:Cr,updateJsxSpreadAttribute:function(e,t){return e.expression!==t?h(Cr(t),e):e},createJsxExpression:Sr,updateJsxExpression:function(e,t){return e.expression!==t?h(Sr(e.dotDotDotToken,t),e):e},createCaseClause:xr,updateCaseClause:function(e,t,n){return e.expression!==t||e.statements!==n?h(xr(t,n),e):e},createDefaultClause:kr,updateDefaultClause:function(e,t){return e.statements!==t?h(kr(t),e):e},createHeritageClause:Tr,updateHeritageClause:function(e,t){return e.types!==t?h(Tr(e.token,t),e):e},createCatchClause:wr,updateCatchClause:function(e,t,n){return e.variableDeclaration!==t||e.block!==n?h(wr(t,n),e):e},createPropertyAssignment:Ar,updatePropertyAssignment:function(e,t,n){return e.name!==t||e.initializer!==n?function(e,t){return t.decorators&&(e.decorators=t.decorators),t.modifiers&&(e.modifiers=t.modifiers),t.questionToken&&(e.questionToken=t.questionToken),t.exclamationToken&&(e.exclamationToken=t.exclamationToken),h(e,t)}(Ar(t,n),e):e},createShorthandPropertyAssignment:Or,updateShorthandPropertyAssignment:function(e,t,n){return e.name!==t||e.objectAssignmentInitializer!==n?function(e,t){return t.decorators&&(e.decorators=t.decorators),t.modifiers&&(e.modifiers=t.modifiers),t.equalsToken&&(e.equalsToken=t.equalsToken),t.questionToken&&(e.questionToken=t.questionToken),t.exclamationToken&&(e.exclamationToken=t.exclamationToken),h(e,t)}(Or(t,n),e):e},createSpreadAssignment:Nr,updateSpreadAssignment:function(e,t){return e.expression!==t?h(Nr(t),e):e},createEnumMember:Ir,updateEnumMember:function(e,t,n){return e.name!==t||e.initializer!==n?h(Ir(t,n),e):e},createSourceFile:function(e,t,n){var r=f.createBaseSourceFileNode(297);return r.statements=A(e),r.endOfFileToken=t,r.flags|=n,r.fileName="",r.text="",r.languageVersion=0,r.languageVariant=0,r.scriptKind=0,r.isDeclarationFile=!1,r.hasNoDefaultLib=!1,r.transformFlags|=d(r.statements)|l(r.endOfFileToken),r},updateSourceFile:function(t,n,r,i,a,o,s){return void 0===r&&(r=t.isDeclarationFile),void 0===i&&(i=t.referencedFiles),void 0===a&&(a=t.typeReferenceDirectives),void 0===o&&(o=t.hasNoDefaultLib),void 0===s&&(s=t.libReferenceDirectives),t.statements!==n||t.isDeclarationFile!==r||t.referencedFiles!==i||t.typeReferenceDirectives!==a||t.hasNoDefaultLib!==o||t.libReferenceDirectives!==s?h(function(t,n,r,i,a,o,s){var u=f.createBaseSourceFileNode(297);for(var c in t)"emitNode"!==c&&!e.hasProperty(u,c)&&e.hasProperty(t,c)&&(u[c]=t[c]);return u.flags|=t.flags,u.statements=A(n),u.endOfFileToken=t.endOfFileToken,u.isDeclarationFile=r,u.referencedFiles=i,u.typeReferenceDirectives=a,u.hasNoDefaultLib=o,u.libReferenceDirectives=s,u.transformFlags=d(u.statements)|l(u.endOfFileToken),u}(t,n,r,i,a,o,s),t):t},createBundle:Fr,updateBundle:function(t,n,r){return void 0===r&&(r=e.emptyArray),t.sourceFiles!==n||t.prepends!==r?h(Fr(n,r),t):t},createUnparsedSource:function(t,n,r){var i=O(299);return i.prologues=t,i.syntheticReferences=n,i.texts=r,i.fileName="",i.text="",i.referencedFiles=e.emptyArray,i.libReferenceDirectives=e.emptyArray,i.getLineAndCharacterOfPosition=function(t){return e.getLineAndCharacterOfPosition(i,t)},i},createUnparsedPrologue:function(e){return Lr(292,e)},createUnparsedPrepend:function(e,t){var n=Lr(293,e);return n.texts=t,n},createUnparsedTextLike:function(e,t){return Lr(t?295:294,e)},createUnparsedSyntheticReference:function(e){var t=O(296);return t.data=e.data,t.section=e,t},createInputFiles:function(){var e=O(300);return e.javascriptText="",e.declarationText="",e},createSyntheticExpression:function(e,t,n){void 0===t&&(t=!1);var r=O(227);return r.type=e,r.isSpread=t,r.tupleNameSource=n,r},createSyntaxList:function(e){var t=O(334);return t._children=e,t},createNotEmittedStatement:function(t){var n=O(335);return n.original=t,e.setTextRange(n,t),n},createPartiallyEmittedExpression:Pr,updatePartiallyEmittedExpression:Rr,createCommaListExpression:Br,updateCommaListExpression:function(e,t){return e.elements!==t?h(Br(t),e):e},createEndOfDeclarationMarker:function(e){var t=O(339);return t.emitNode={},t.original=e,t},createMergeDeclarationMarker:function(e){var t=O(338);return t.emitNode={},t.original=e,t},createSyntheticReferenceExpression:jr,updateSyntheticReferenceExpression:function(e,t,n){return e.expression!==t||e.thisArg!==n?h(jr(t,n),e):e},cloneNode:Ur,get createComma(){return _(27)},get createAssignment(){return _(62)},get createLogicalOr(){return _(56)},get createLogicalAnd(){return _(55)},get createBitwiseOr(){return _(51)},get createBitwiseXor(){return _(52)},get createBitwiseAnd(){return _(50)},get createStrictEquality(){return _(36)},get createStrictInequality(){return _(37)},get createEquality(){return _(34)},get createInequality(){return _(35)},get createLessThan(){return _(29)},get createLessThanEquals(){return _(32)},get createGreaterThan(){return _(31)},get createGreaterThanEquals(){return _(33)},get createLeftShift(){return _(47)},get createRightShift(){return _(48)},get createUnsignedRightShift(){return _(49)},get createAdd(){return _(39)},get createSubtract(){return _(40)},get createMultiply(){return _(41)},get createDivide(){return _(43)},get createModulo(){return _(44)},get createExponent(){return _(42)},get createPrefixPlus(){return y(39)},get createPrefixMinus(){return y(40)},get createPrefixIncrement(){return y(45)},get createPrefixDecrement(){return y(46)},get createBitwiseNot(){return y(54)},get createLogicalNot(){return y(53)},get createPostfixIncrement(){return b(45)},get createPostfixDecrement(){return b(46)},createImmediatelyInvokedFunctionExpression:function(e,t,n){return dt(bt(void 0,void 0,void 0,void 0,t?[t]:[],void 0,Jt(e,!0)),void 0,n?[n]:[])},createImmediatelyInvokedArrowFunction:function(e,t,n){return dt(Et(void 0,void 0,t?[t]:[],void 0,void 0,Jt(e,!0)),void 0,n?[n]:[])},createVoidZero:Vr,createExportDefault:function(e){return zn(void 0,void 0,!1,e)},createExternalModuleExport:function(e){return Wn(void 0,void 0,!1,qn([Gn(void 0,e)]))},createTypeCheck:function(e,t){return"undefined"===t?w.createStrictEquality(e,Vr()):w.createStrictEquality(xt(e),q(t))},createMethodCall:zr,createGlobalMethodCall:Hr,createFunctionBindCall:function(e,n,r){return zr(e,"bind",t([n],r))},createFunctionCallCall:function(e,n,r){return zr(e,"call",t([n],r))},createFunctionApplyCall:function(e,t,n){return zr(e,"apply",[t,n])},createArraySliceCall:function(e,t){return zr(e,"slice",void 0===t?[]:[ni(t)])},createArrayConcatCall:function(e,t){return zr(e,"concat",t)},createObjectDefinePropertyCall:function(e,t,n){return Hr("Object","defineProperty",[e,ni(t),n])},createPropertyDescriptor:function(t,n){var r=[];Wr(r,"enumerable",ni(t.enumerable)),Wr(r,"configurable",ni(t.configurable));var i=Wr(r,"writable",ni(t.writable));i=Wr(r,"value",t.value)||i;var a=Wr(r,"get",t.get);return a=Wr(r,"set",t.set)||a,e.Debug.assert(!(i&&a),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),it(r,!n)},createCallBinding:function(t,n,r,i){void 0===i&&(i=!1);var a,o,s=e.skipOuterExpressions(t,15);return e.isSuperProperty(s)?(a=te(),o=s):e.isSuperKeyword(s)?(a=te(),o=void 0!==r&&r<2?e.setTextRange($("_super"),s):s):4096&e.getEmitFlags(s)?(a=Vr(),o=g().parenthesizeLeftSideOfAccess(s)):e.isPropertyAccessExpression(s)?Kr(s.expression,i)?(a=Q(n),o=at(e.setTextRange(w.createAssignment(a,s.expression),s.expression),s.name),e.setTextRange(o,s)):(a=s.expression,o=s):e.isElementAccessExpression(s)?Kr(s.expression,i)?(a=Q(n),o=ut(e.setTextRange(w.createAssignment(a,s.expression),s.expression),s.argumentExpression),e.setTextRange(o,s)):(a=s.expression,o=s):(a=Vr(),o=g().parenthesizeLeftSideOfAccess(t)),{target:o,thisArg:a}},inlineExpressions:function(t){return t.length>10?Br(t):e.reduceLeft(t,w.createComma)},getInternalName:function(e,t,n){return qr(e,t,n,49152)},getLocalName:function(e,t,n){return qr(e,t,n,16384)},getExportName:Gr,getDeclarationName:function(e,t,n){return qr(e,t,n)},getNamespaceMemberName:Yr,getExternalModuleOrNamespaceExportName:function(t,n,r,i){return t&&e.hasSyntacticModifier(n,1)?Yr(t,qr(n),r,i):Gr(n,r,i)},restoreOuterExpressions:function t(n,r,i){return void 0===i&&(i=15),n&&e.isOuterExpression(n,i)&&!function(t){return e.isParenthesizedExpression(t)&&e.nodeIsSynthesized(t)&&e.nodeIsSynthesized(e.getSourceMapRange(t))&&e.nodeIsSynthesized(e.getCommentRange(t))&&!e.some(e.getSyntheticLeadingComments(t))&&!e.some(e.getSyntheticTrailingComments(t))}(n)?function(e,t){switch(e.kind){case 207:return yt(e,t);case 206:return _t(e,e.type,t);case 224:return zt(e,t,e.type);case 225:return Wt(e,t);case 336:return Rr(e,t)}}(n,t(n.expression,r)):r},restoreEnclosingLabel:function t(n,r,i){if(!r)return n;var a=fn(r,r.label,e.isLabeledStatement(r.statement)?t(n,r.statement):n);return i&&i(r),a},createUseStrictPrologue:$r,copyPrologue:function(e,t,n,r){return Xr(e,t,Qr(e,t,n),r)},copyStandardPrologue:Qr,copyCustomPrologue:Xr,ensureUseStrict:function(n){return e.findUseStrictPrologue(n)?n:e.setTextRange(A(t([$r()],n)),n)},liftToBlock:function(t){return e.Debug.assert(e.every(t,e.isStatementOrBlock),"Cannot lift nodes to a Block."),e.singleOrUndefined(t)||Jt(t)},mergeLexicalEnvironment:function(n,r){if(!e.some(r))return n;var i=Zr(n,e.isPrologueDirective,0),a=Zr(n,e.isHoistedFunction,i),o=Zr(n,e.isHoistedVariableStatement,a),s=Zr(r,e.isPrologueDirective,0),u=Zr(r,e.isHoistedFunction,s),c=Zr(r,e.isHoistedVariableStatement,u),l=Zr(r,e.isCustomPrologue,c);e.Debug.assert(l===r.length,"Expected declarations to be valid standard or custom prologues");var d=e.isNodeArray(n)?n.slice():n;if(l>c&&d.splice.apply(d,t([o,0],r.slice(c,l))),c>u&&d.splice.apply(d,t([a,0],r.slice(u,c))),u>s&&d.splice.apply(d,t([i,0],r.slice(s,u))),s>0)if(0===i)d.splice.apply(d,t([0,0],r.slice(0,s)));else{for(var p=new e.Map,f=0;f=0;f--){var g=r[f];p.has(g.expression.text)||d.unshift(g)}}return e.isNodeArray(n)?e.setTextRange(A(d,n.hasTrailingComma),n):n},updateModifiers:function(t,n){var r;return"number"==typeof n&&(n=ae(n)),e.isParameter(t)?le(t,t.decorators,n,t.dotDotDotToken,t.name,t.questionToken,t.type,t.initializer):e.isPropertySignature(t)?fe(t,n,t.name,t.questionToken,t.type):e.isPropertyDeclaration(t)?ge(t,t.decorators,n,t.name,null!==(r=t.questionToken)&&void 0!==r?r:t.exclamationToken,t.type,t.initializer):e.isMethodSignature(t)?_e(t,n,t.name,t.questionToken,t.typeParameters,t.parameters,t.type):e.isMethodDeclaration(t)?ye(t,t.decorators,n,t.asteriskToken,t.name,t.questionToken,t.typeParameters,t.parameters,t.type,t.body):e.isConstructorDeclaration(t)?De(t,t.decorators,n,t.parameters,t.body):e.isGetAccessorDeclaration(t)?Ce(t,t.decorators,n,t.name,t.parameters,t.type,t.body):e.isSetAccessorDeclaration(t)?xe(t,t.decorators,n,t.name,t.parameters,t.body):e.isIndexSignatureDeclaration(t)?Ae(t,t.decorators,n,t.parameters,t.type):e.isFunctionExpression(t)?Dt(t,n,t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body):e.isArrowFunction(t)?Ct(t,n,t.typeParameters,t.parameters,t.type,t.equalsGreaterThanToken,t.body):e.isClassExpression(t)?jt(t,t.decorators,n,t.name,t.typeParameters,t.heritageClauses,t.members):e.isVariableStatement(t)?Qt(t,n,t.declarationList):e.isFunctionDeclaration(t)?yn(t,t.decorators,n,t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body):e.isClassDeclaration(t)?Dn(t,t.decorators,n,t.name,t.typeParameters,t.heritageClauses,t.members):e.isInterfaceDeclaration(t)?Cn(t,t.decorators,n,t.name,t.typeParameters,t.heritageClauses,t.members):e.isTypeAliasDeclaration(t)?xn(t,t.decorators,n,t.name,t.typeParameters,t.type):e.isEnumDeclaration(t)?Tn(t,t.decorators,n,t.name,t.members):e.isModuleDeclaration(t)?An(t,t.decorators,n,t.name,t.body):e.isImportEqualsDeclaration(t)?Ln(t,t.decorators,n,t.name,t.moduleReference):e.isImportDeclaration(t)?Rn(t,t.decorators,n,t.importClause,t.moduleSpecifier):e.isExportAssignment(t)?Hn(t,t.decorators,n,t.expression):e.isExportDeclaration(t)?Kn(t,t.decorators,n,t.isTypeOnly,t.exportClause,t.moduleSpecifier):e.Debug.assertNever(t)}};return w;function A(t,n){if(void 0===t||t===e.emptyArray)t=[];else if(e.isNodeArray(t))return void 0===t.transformFlags&&p(t),e.Debug.attachNodeArrayDebugInfo(t),t;var r=t.length,i=r>=1&&r<=4?t.slice():t;return e.setTextRangePosEnd(i,-1,-1),i.hasTrailingComma=!!n,p(i),e.Debug.attachNodeArrayDebugInfo(i),i}function O(e){return f.createBaseNode(e)}function N(e,t,n){var r=O(e);return r.decorators=ei(t),r.modifiers=ei(n),r.transformFlags|=d(r.decorators)|d(r.modifiers),r.symbol=void 0,r.localSymbol=void 0,r.locals=void 0,r.nextContainer=void 0,r}function I(t,n,r,i){var a=N(t,n,r);if(i=ti(i),a.name=i,i)switch(a.kind){case 165:case 167:case 168:case 163:case 288:if(e.isIdentifier(i)){a.transformFlags|=c(i);break}default:a.transformFlags|=l(i)}return a}function F(e,t,n,r,i){var a=I(e,t,n,r);return a.typeParameters=ei(i),a.transformFlags|=d(a.typeParameters),i&&(a.transformFlags|=1),a}function L(e,t,n,r,i,a,o){var s=F(e,t,n,r,i);return s.parameters=A(a),s.type=o,s.transformFlags|=d(s.parameters)|l(s.type),o&&(s.transformFlags|=1),s}function P(e,t){return t.typeArguments&&(e.typeArguments=t.typeArguments),h(e,t)}function R(e,t,n,r,i,a,o,s){var u=L(e,t,n,r,i,a,o);return u.body=s,u.transformFlags|=-8388609&l(u.body),s||(u.transformFlags|=1),u}function M(e,t){return t.exclamationToken&&(e.exclamationToken=t.exclamationToken),t.typeArguments&&(e.typeArguments=t.typeArguments),P(e,t)}function B(e,t,n,r,i,a){var o=F(e,t,n,r,i);return o.heritageClauses=ei(a),o.transformFlags|=d(o.heritageClauses),o}function j(e,t,n,r,i,a,o){var s=B(e,t,n,r,i,a);return s.members=A(o),s.transformFlags|=d(s.members),s}function U(e,t,n,r,i){var a=I(e,t,n,r);return a.initializer=i,a.transformFlags|=l(a.initializer),a}function V(e,t,n,r,i,a){var o=U(e,t,n,r,a);return o.type=i,o.transformFlags|=l(i),i&&(o.transformFlags|=1),o}function z(e,t){var n=Z(e);return n.text=t,n}function H(e,t){void 0===t&&(t=0);var n=z(8,"number"==typeof e?e+"":e);return n.numericLiteralFlags=t,384&t&&(n.transformFlags|=256),n}function W(t){var n=z(9,"string"==typeof t?t:e.pseudoBigIntToString(t)+"n");return n.transformFlags|=4,n}function K(e,t){var n=z(10,e);return n.singleQuote=t,n}function q(e,t,n){var r=K(e,t);return r.hasExtendedUnicodeEscape=n,n&&(r.transformFlags|=256),r}function G(e){return z(13,e)}function Y(t,n){void 0===n&&t&&(n=e.stringToToken(t)),78===n&&(n=void 0);var r=f.createBaseIdentifierNode(78);return r.originalKeywordKind=n,r.escapedText=e.escapeLeadingUnderscores(t),r}function J(e,t){var n=Y(e,void 0);return n.autoGenerateFlags=t,n.autoGenerateId=r,r++,n}function $(e,t,n){var r=Y(e,n);return t&&(r.typeArguments=A(t)),130===r.originalKeywordKind&&(r.transformFlags|=8388608),r}function Q(e,t){var n=1;t&&(n|=8);var r=J("",n);return e&&e(r),r}function X(t,n){void 0===n&&(n=0),e.Debug.assert(!(7&n),"Argument out of range: flags");var r=J(t&&e.isIdentifier(t)?e.idText(t):"",4|n);return r.original=t,r}function Z(e){return f.createBaseTokenNode(e)}function ee(t){e.Debug.assert(t>=0&&t<=156,"Invalid token"),e.Debug.assert(t<=14||t>=17,"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."),e.Debug.assert(t<=8||t>=14,"Invalid token. Use 'createLiteralLikeNode' to create literals."),e.Debug.assert(78!==t,"Invalid token. Use 'createIdentifier' to create identifiers");var n=Z(t),r=0;switch(t){case 129:r=96;break;case 122:case 120:case 121:case 142:case 125:case 133:case 84:case 128:case 144:case 155:case 141:case 145:case 147:case 131:case 148:case 113:case 152:case 150:r=1;break;case 123:case 105:r=256;break;case 107:r=4096}return r&&(n.transformFlags|=r),n}function te(){return ee(107)}function ne(){return ee(109)}function re(){return ee(94)}function ie(e){return ee(e)}function ae(e){var t=[];return 1&e&&t.push(ie(92)),2&e&&t.push(ie(133)),512&e&&t.push(ie(87)),2048&e&&t.push(ie(84)),4&e&&t.push(ie(122)),8&e&&t.push(ie(120)),16&e&&t.push(ie(121)),128&e&&t.push(ie(125)),32&e&&t.push(ie(123)),64&e&&t.push(ie(142)),256&e&&t.push(ie(129)),t}function oe(e,t){var n=O(157);return n.left=e,n.right=ti(t),n.transformFlags|=l(n.left)|c(n.right),n}function se(e){var t=O(158);return t.expression=g().parenthesizeExpressionOfComputedPropertyName(e),t.transformFlags|=33024|l(t.expression),t}function ue(e,t,n){var r=I(159,void 0,void 0,e);return r.constraint=t,r.default=n,r.transformFlags=1,r}function ce(t,n,r,i,a,o,s){var u=V(160,t,n,i,o,s&&g().parenthesizeExpressionForDisallowedComma(s));return u.dotDotDotToken=r,u.questionToken=a,e.isThisIdentifier(u.name)?u.transformFlags=1:(u.transformFlags|=l(u.dotDotDotToken)|l(u.questionToken),a&&(u.transformFlags|=1),92&e.modifiersToFlags(u.modifiers)&&(u.transformFlags|=2048),(s||r)&&(u.transformFlags|=256)),u}function le(e,t,n,r,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.dotDotDotToken!==r||e.name!==i||e.questionToken!==a||e.type!==o||e.initializer!==s?h(ce(t,n,r,i,a,o,s),e):e}function de(e){var t=O(161);return t.expression=g().parenthesizeLeftSideOfAccess(e),t.transformFlags|=2049|l(t.expression),t}function pe(e,t,n,r){var i=I(162,void 0,e,t);return i.type=r,i.questionToken=n,i.transformFlags=1,i}function fe(e,t,n,r,i){return e.modifiers!==t||e.name!==n||e.questionToken!==r||e.type!==i?h(pe(t,n,r,i),e):e}function he(t,n,r,i,a,o){var s=V(163,t,n,r,a,o);return s.questionToken=i&&e.isQuestionToken(i)?i:void 0,s.exclamationToken=i&&e.isExclamationToken(i)?i:void 0,s.transformFlags|=l(s.questionToken)|l(s.exclamationToken)|4194304,(e.isComputedPropertyName(s.name)||e.hasStaticModifier(s)&&s.initializer)&&(s.transformFlags|=2048),(i||2&e.modifiersToFlags(s.modifiers))&&(s.transformFlags|=1),s}function ge(t,n,r,i,a,o,s){return t.decorators!==n||t.modifiers!==r||t.name!==i||t.questionToken!==(void 0!==a&&e.isQuestionToken(a)?a:void 0)||t.exclamationToken!==(void 0!==a&&e.isExclamationToken(a)?a:void 0)||t.type!==o||t.initializer!==s?h(he(n,r,i,a,o,s),t):t}function me(e,t,n,r,i,a){var o=L(164,void 0,e,t,r,i,a);return o.questionToken=n,o.transformFlags=1,o}function _e(e,t,n,r,i,a,o){return e.modifiers!==t||e.name!==n||e.questionToken!==r||e.typeParameters!==i||e.parameters!==a||e.type!==o?P(me(t,n,r,i,a,o),e):e}function ve(t,n,r,i,a,o,s,u,c){var d=R(165,t,n,i,o,s,u,c);return d.asteriskToken=r,d.questionToken=a,d.transformFlags|=l(d.asteriskToken)|l(d.questionToken)|256,a&&(d.transformFlags|=1),256&e.modifiersToFlags(d.modifiers)?d.transformFlags|=r?32:64:r&&(d.transformFlags|=512),d}function ye(e,t,n,r,i,a,o,s,u,c){return e.decorators!==t||e.modifiers!==n||e.asteriskToken!==r||e.name!==i||e.questionToken!==a||e.typeParameters!==o||e.parameters!==s||e.type!==u||e.body!==c?M(ve(t,n,r,i,a,o,s,u,c),e):e}function be(e,t,n,r){var i=R(166,e,t,void 0,void 0,n,void 0,r);return i.transformFlags|=256,i}function De(e,t,n,r,i){return e.decorators!==t||e.modifiers!==n||e.parameters!==r||e.body!==i?M(be(t,n,r,i),e):e}function Ee(e,t,n,r,i,a){return R(167,e,t,n,void 0,r,i,a)}function Ce(e,t,n,r,i,a,o){return e.decorators!==t||e.modifiers!==n||e.name!==r||e.parameters!==i||e.type!==a||e.body!==o?M(Ee(t,n,r,i,a,o),e):e}function Se(e,t,n,r,i){return R(168,e,t,n,void 0,r,void 0,i)}function xe(e,t,n,r,i,a){return e.decorators!==t||e.modifiers!==n||e.name!==r||e.parameters!==i||e.body!==a?M(Se(t,n,r,i,a),e):e}function ke(e,t,n){var r=L(169,void 0,void 0,void 0,e,t,n);return r.transformFlags=1,r}function Te(e,t,n){var r=L(170,void 0,void 0,void 0,e,t,n);return r.transformFlags=1,r}function we(e,t,n,r){var i=L(171,e,t,void 0,void 0,n,r);return i.transformFlags=1,i}function Ae(e,t,n,r,i){return e.parameters!==r||e.type!==i||e.decorators!==t||e.modifiers!==n?P(we(t,n,r,i),e):e}function Oe(e,t){var n=O(194);return n.type=e,n.literal=t,n.transformFlags=1,n}function Ne(e,t,n){var r=O(172);return r.assertsModifier=e,r.parameterName=ti(t),r.type=n,r.transformFlags=1,r}function Ie(e,t){var n=O(173);return n.typeName=ti(e),n.typeArguments=t&&g().parenthesizeTypeArguments(A(t)),n.transformFlags=1,n}function Fe(e,t,n){var r=L(174,void 0,void 0,void 0,e,t,n);return r.transformFlags=1,r}function Le(e,t,n){var r=L(175,void 0,void 0,void 0,e,t,n);return r.transformFlags=1,r}function Pe(e){var t=O(176);return t.exprName=e,t.transformFlags=1,t}function Re(e){var t=O(177);return t.members=A(e),t.transformFlags=1,t}function Me(e){var t=O(178);return t.elementType=g().parenthesizeElementTypeOfArrayType(e),t.transformFlags=1,t}function Be(e){var t=O(179);return t.elements=A(e),t.transformFlags=1,t}function je(e,t,n,r){var i=O(192);return i.dotDotDotToken=e,i.name=t,i.questionToken=n,i.type=r,i.transformFlags=1,i}function Ue(e){var t=O(180);return t.type=g().parenthesizeElementTypeOfArrayType(e),t.transformFlags=1,t}function Ve(e){var t=O(181);return t.type=e,t.transformFlags=1,t}function ze(e,t){var n=O(e);return n.types=g().parenthesizeConstituentTypesOfUnionOrIntersectionType(t),n.transformFlags=1,n}function He(e,t){return e.types!==t?h(ze(e.kind,t),e):e}function We(e,t,n,r){var i=O(184);return i.checkType=g().parenthesizeMemberOfConditionalType(e),i.extendsType=g().parenthesizeMemberOfConditionalType(t),i.trueType=n,i.falseType=r,i.transformFlags=1,i}function Ke(e){var t=O(185);return t.typeParameter=e,t.transformFlags=1,t}function qe(e,t){var n=O(193);return n.head=e,n.templateSpans=A(t),n.transformFlags=1,n}function Ge(e,t,n,r){void 0===r&&(r=!1);var i=O(195);return i.argument=e,i.qualifier=t,i.typeArguments=n&&g().parenthesizeTypeArguments(n),i.isTypeOf=r,i.transformFlags=1,i}function Ye(e){var t=O(186);return t.type=e,t.transformFlags=1,t}function Je(e,t){var n=O(188);return n.operator=e,n.type=g().parenthesizeMemberOfElementType(t),n.transformFlags=1,n}function $e(e,t){var n=O(189);return n.objectType=g().parenthesizeMemberOfElementType(e),n.indexType=t,n.transformFlags=1,n}function Qe(e,t,n,r,i){var a=O(190);return a.readonlyToken=e,a.typeParameter=t,a.nameType=n,a.questionToken=r,a.type=i,a.transformFlags=1,a}function Xe(e){var t=O(191);return t.literal=e,t.transformFlags=1,t}function Ze(e){var t=O(196);return t.elements=A(e),t.transformFlags|=131328|d(t.elements),8192&t.transformFlags&&(t.transformFlags|=16416),t}function et(e){var t=O(197);return t.elements=A(e),t.transformFlags|=131328|d(t.elements),t}function tt(t,n,r,i){var a=U(198,void 0,void 0,r,i);return a.propertyName=ti(n),a.dotDotDotToken=t,a.transformFlags|=256|l(a.dotDotDotToken),a.propertyName&&(a.transformFlags|=e.isIdentifier(a.propertyName)?c(a.propertyName):l(a.propertyName)),t&&(a.transformFlags|=8192),a}function nt(e){return O(e)}function rt(e,t){var n=nt(199);return n.elements=g().parenthesizeExpressionsOfCommaDelimitedList(A(e)),n.multiLine=t,n.transformFlags|=d(n.elements),n}function it(e,t){var n=nt(200);return n.properties=A(e),n.multiLine=t,n.transformFlags|=d(n.properties),n}function at(t,n){var r=nt(201);return r.expression=g().parenthesizeLeftSideOfAccess(t),r.name=ti(n),r.transformFlags=l(r.expression)|(e.isIdentifier(r.name)?c(r.name):l(r.name)),e.isSuperKeyword(t)&&(r.transformFlags|=96),r}function ot(t,n,r){var i=nt(201);return i.flags|=32,i.expression=g().parenthesizeLeftSideOfAccess(t),i.questionDotToken=n,i.name=ti(r),i.transformFlags|=8|l(i.expression)|l(i.questionDotToken)|(e.isIdentifier(i.name)?c(i.name):l(i.name)),i}function st(t,n,r,i){return e.Debug.assert(!!(32&t.flags),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),t.expression!==n||t.questionDotToken!==r||t.name!==i?h(ot(n,r,i),t):t}function ut(t,n){var r=nt(202);return r.expression=g().parenthesizeLeftSideOfAccess(t),r.argumentExpression=ni(n),r.transformFlags|=l(r.expression)|l(r.argumentExpression),e.isSuperKeyword(t)&&(r.transformFlags|=96),r}function ct(e,t,n){var r=nt(202);return r.flags|=32,r.expression=g().parenthesizeLeftSideOfAccess(e),r.questionDotToken=t,r.argumentExpression=ni(n),r.transformFlags|=l(r.expression)|l(r.questionDotToken)|l(r.argumentExpression)|8,r}function lt(t,n,r,i){return e.Debug.assert(!!(32&t.flags),"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),t.expression!==n||t.questionDotToken!==r||t.argumentExpression!==i?h(ct(n,r,i),t):t}function dt(t,n,r){var i=nt(203);return i.expression=g().parenthesizeLeftSideOfAccess(t),i.typeArguments=ei(n),i.arguments=g().parenthesizeExpressionsOfCommaDelimitedList(A(r)),i.transformFlags|=l(i.expression)|d(i.typeArguments)|d(i.arguments),i.typeArguments&&(i.transformFlags|=1),e.isImportKeyword(i.expression)?i.transformFlags|=2097152:e.isSuperProperty(i.expression)&&(i.transformFlags|=4096),i}function pt(t,n,r,i){var a=nt(203);return a.flags|=32,a.expression=g().parenthesizeLeftSideOfAccess(t),a.questionDotToken=n,a.typeArguments=ei(r),a.arguments=g().parenthesizeExpressionsOfCommaDelimitedList(A(i)),a.transformFlags|=l(a.expression)|l(a.questionDotToken)|d(a.typeArguments)|d(a.arguments)|8,a.typeArguments&&(a.transformFlags|=1),e.isSuperProperty(a.expression)&&(a.transformFlags|=4096),a}function ft(t,n,r,i,a){return e.Debug.assert(!!(32&t.flags),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),t.expression!==n||t.questionDotToken!==r||t.typeArguments!==i||t.arguments!==a?h(pt(n,r,i,a),t):t}function ht(e,t,n){var r=nt(204);return r.expression=g().parenthesizeExpressionOfNew(e),r.typeArguments=ei(t),r.arguments=n?g().parenthesizeExpressionsOfCommaDelimitedList(n):void 0,r.transformFlags|=l(r.expression)|d(r.typeArguments)|d(r.arguments)|8,r.typeArguments&&(r.transformFlags|=1),r}function gt(t,n,r){var i=nt(205);return i.tag=g().parenthesizeLeftSideOfAccess(t),i.typeArguments=ei(n),i.template=r,i.transformFlags|=l(i.tag)|d(i.typeArguments)|l(i.template)|256,i.typeArguments&&(i.transformFlags|=1),e.hasInvalidEscape(i.template)&&(i.transformFlags|=32),i}function mt(e,t){var n=nt(206);return n.expression=g().parenthesizeOperandOfPrefixUnary(t),n.type=e,n.transformFlags|=l(n.expression)|l(n.type)|1,n}function _t(e,t,n){return e.type!==t||e.expression!==n?h(mt(t,n),e):e}function vt(e){var t=nt(207);return t.expression=e,t.transformFlags=l(t.expression),t}function yt(e,t){return e.expression!==t?h(vt(t),e):e}function bt(t,n,r,i,a,o,s){var u=R(208,void 0,t,r,i,a,o,s);return u.asteriskToken=n,u.transformFlags|=l(u.asteriskToken),u.typeParameters&&(u.transformFlags|=1),256&e.modifiersToFlags(u.modifiers)?u.asteriskToken?u.transformFlags|=32:u.transformFlags|=64:u.asteriskToken&&(u.transformFlags|=512),u}function Dt(e,t,n,r,i,a,o,s){return e.name!==r||e.modifiers!==t||e.asteriskToken!==n||e.typeParameters!==i||e.parameters!==a||e.type!==o||e.body!==s?M(bt(t,n,r,i,a,o,s),e):e}function Et(t,n,r,i,a,o){var s=R(209,void 0,t,void 0,n,r,i,g().parenthesizeConciseBodyOfArrowFunction(o));return s.equalsGreaterThanToken=null!=a?a:ee(38),s.transformFlags|=256|l(s.equalsGreaterThanToken),256&e.modifiersToFlags(s.modifiers)&&(s.transformFlags|=64),s}function Ct(e,t,n,r,i,a,o){return e.modifiers!==t||e.typeParameters!==n||e.parameters!==r||e.type!==i||e.equalsGreaterThanToken!==a||e.body!==o?M(Et(t,n,r,i,a,o),e):e}function St(e){var t=nt(210);return t.expression=g().parenthesizeOperandOfPrefixUnary(e),t.transformFlags|=l(t.expression),t}function xt(e){var t=nt(211);return t.expression=g().parenthesizeOperandOfPrefixUnary(e),t.transformFlags|=l(t.expression),t}function kt(e){var t=nt(212);return t.expression=g().parenthesizeOperandOfPrefixUnary(e),t.transformFlags|=l(t.expression),t}function Tt(e){var t=nt(213);return t.expression=g().parenthesizeOperandOfPrefixUnary(e),t.transformFlags|=524384|l(t.expression),t}function wt(e,t){var n=nt(214);return n.operator=e,n.operand=g().parenthesizeOperandOfPrefixUnary(t),n.transformFlags|=l(n.operand),n}function At(e,t){var n=nt(215);return n.operator=t,n.operand=g().parenthesizeOperandOfPostfixUnary(e),n.transformFlags=l(n.operand),n}function Ot(t,n,r){var i,a=nt(216),o="number"==typeof(i=n)?ee(i):i,s=o.kind;return a.left=g().parenthesizeLeftSideOfBinary(s,t),a.operatorToken=o,a.right=g().parenthesizeRightSideOfBinary(s,a.left,r),a.transformFlags|=l(a.left)|l(a.operatorToken)|l(a.right),60===s?a.transformFlags|=8:62===s?e.isObjectLiteralExpression(a.left)?a.transformFlags|=1312|Nt(a.left):e.isArrayLiteralExpression(a.left)&&(a.transformFlags|=1280|Nt(a.left)):42===s||66===s?a.transformFlags|=128:e.isLogicalOrCoalescingAssignmentOperator(s)&&(a.transformFlags|=4),a}function Nt(t){if(16384&t.transformFlags)return 16384;if(32&t.transformFlags)for(var n=0,r=e.getElementsOfBindingOrAssignmentPattern(t);n0;default:return!0}}function qr(t,n,r,i){void 0===i&&(i=0);var a=e.getNameOfDeclaration(t);if(a&&e.isIdentifier(a)&&!e.isGeneratedIdentifier(a)){var o=e.setParent(e.setTextRange(Ur(a),a),a.parent);return i|=e.getEmitFlags(a),r||(i|=48),n||(i|=1536),i&&e.setEmitFlags(o,i),o}return X(t)}function Gr(e,t,n){return qr(e,t,n,8192)}function Yr(t,n,r,i){var a=at(t,e.nodeIsSynthesized(n)?n:Ur(n));e.setTextRange(a,n);var o=0;return i||(o|=48),r||(o|=1536),o&&e.setEmitFlags(a,o),a}function Jr(t){return e.isStringLiteral(t.expression)&&"use strict"===t.expression.text}function $r(){return e.startOnNewLine(Zt(q("use strict")))}function Qr(t,n,r){e.Debug.assert(0===n.length,"Prologue directives should be at the first statement in the target statements array");for(var i=!1,a=0,o=t.length;a=172&&e<=195)return-2;switch(e){case 203:case 204:case 199:return 536879104;case 256:return 546379776;case 160:return 536870912;case 209:return 547309568;case 208:case 251:return 547313664;case 250:return 537018368;case 252:case 221:return 536905728;case 166:return 547311616;case 163:return 536875008;case 165:case 167:case 168:return 538923008;case 128:case 144:case 155:case 141:case 147:case 145:case 131:case 148:case 113:case 159:case 162:case 164:case 169:case 170:case 171:case 253:case 254:return-2;case 200:return 536922112;case 287:return 536887296;case 196:case 197:return 536879104;case 206:case 224:case 336:case 207:case 105:return 536870912;case 201:case 202:default:return 536870912}}e.getTransformFlagsSubtreeExclusions=f;var h=e.createBaseNodeFactory();function g(e){return e.flags|=8,e}var m,_={createBaseSourceFileNode:function(e){return g(h.createBaseSourceFileNode(e))},createBaseIdentifierNode:function(e){return g(h.createBaseIdentifierNode(e))},createBasePrivateIdentifierNode:function(e){return g(h.createBasePrivateIdentifierNode(e))},createBaseTokenNode:function(e){return g(h.createBaseTokenNode(e))},createBaseNode:function(e){return g(h.createBaseNode(e))}};function v(t,n){if(t.original=n,n){var r=n.emitNode;r&&(t.emitNode=function(t,n){var r=t.flags,i=t.leadingComments,a=t.trailingComments,o=t.commentRange,s=t.sourceMapRange,u=t.tokenSourceMapRanges,c=t.constantValue,l=t.helpers,d=t.startsOnNewLine;if(n||(n={}),i&&(n.leadingComments=e.addRange(i.slice(),n.leadingComments)),a&&(n.trailingComments=e.addRange(a.slice(),n.trailingComments)),r&&(n.flags=r),o&&(n.commentRange=o),s&&(n.sourceMapRange=s),u&&(n.tokenSourceMapRanges=function(e,t){for(var n in t||(t=[]),e)t[n]=e[n];return t}(u,n.tokenSourceMapRanges)),void 0!==c&&(n.constantValue=c),l)for(var p=0,f=l;p0&&(o[c-u]=l)}u>0&&(o.length-=u)}},e.ignoreSourceNewlines=function(e){return t(e).flags|=134217728,e}}(u||(u={})),function(e){function n(e){for(var t=[],n=1;n=2?r.createCallExpression(r.createPropertyAccessExpression(r.createIdentifier("Object"),"assign"),void 0,t):(n.requestEmitHelper(e.assignHelper),r.createCallExpression(i("__assign"),void 0,t))},createAwaitHelper:function(t){return n.requestEmitHelper(e.awaitHelper),r.createCallExpression(i("__await"),void 0,[t])},createAsyncGeneratorHelper:function(t,a){return n.requestEmitHelper(e.awaitHelper),n.requestEmitHelper(e.asyncGeneratorHelper),(t.emitNode||(t.emitNode={})).flags|=786432,r.createCallExpression(i("__asyncGenerator"),void 0,[a?r.createThis():r.createVoidZero(),r.createIdentifier("arguments"),t])},createAsyncDelegatorHelper:function(t){return n.requestEmitHelper(e.awaitHelper),n.requestEmitHelper(e.asyncDelegator),r.createCallExpression(i("__asyncDelegator"),void 0,[t])},createAsyncValuesHelper:function(t){return n.requestEmitHelper(e.asyncValues),r.createCallExpression(i("__asyncValues"),void 0,[t])},createRestHelper:function(t,a,o,s){n.requestEmitHelper(e.restHelper);for(var u=[],c=0,l=0;l= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };'},e.metadataHelper={name:"typescript:metadata",importName:"__metadata",scoped:!1,priority:3,text:'\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);\n };'},e.paramHelper={name:"typescript:param",importName:"__param",scoped:!1,priority:4,text:"\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"},e.assignHelper={name:"typescript:assign",importName:"__assign",scoped:!1,priority:1,text:"\n var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };"},e.awaitHelper={name:"typescript:await",importName:"__await",scoped:!1,text:"\n var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }"},e.asyncGeneratorHelper={name:"typescript:asyncGenerator",importName:"__asyncGenerator",scoped:!1,dependencies:[e.awaitHelper],text:'\n var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume("next", value); }\n function reject(value) { resume("throw", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };'},e.asyncDelegator={name:"typescript:asyncDelegator",importName:"__asyncDelegator",scoped:!1,dependencies:[e.awaitHelper],text:'\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }\n };'},e.asyncValues={name:"typescript:asyncValues",importName:"__asyncValues",scoped:!1,text:'\n var __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n };'},e.restHelper={name:"typescript:rest",importName:"__rest",scoped:!1,text:'\n var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === "function")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n };'},e.awaiterHelper={name:"typescript:awaiter",importName:"__awaiter",scoped:!1,priority:5,text:'\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };'},e.extendsHelper={name:"typescript:extends",importName:"__extends",scoped:!1,priority:0,text:"\n var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();"},e.templateObjectHelper={name:"typescript:makeTemplateObject",importName:"__makeTemplateObject",scoped:!1,priority:0,text:'\n var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n };'},e.readHelper={name:"typescript:read",importName:"__read",scoped:!1,text:'\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === "function" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i["return"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };'},e.spreadHelper={name:"typescript:spread",importName:"__spread",scoped:!1,dependencies:[e.readHelper],text:"\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };"},e.spreadArraysHelper={name:"typescript:spreadArrays",importName:"__spreadArrays",scoped:!1,text:"\n var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n };"},e.valuesHelper={name:"typescript:values",importName:"__values",scoped:!1,text:'\n var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === "number") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");\n };'},e.generatorHelper={name:"typescript:generator",importName:"__generator",scoped:!1,priority:6,text:'\n var __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError("Generator is already executing.");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };'},e.createBindingHelper={name:"typescript:commonjscreatebinding",importName:"__createBinding",scoped:!1,priority:1,text:"\n var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n }) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n }));"},e.setModuleDefaultHelper={name:"typescript:commonjscreatevalue",importName:"__setModuleDefault",scoped:!1,priority:1,text:'\n var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, "default", { enumerable: true, value: v });\n }) : function(o, v) {\n o["default"] = v;\n });'},e.importStarHelper={name:"typescript:commonjsimportstar",importName:"__importStar",scoped:!1,dependencies:[e.createBindingHelper,e.setModuleDefaultHelper],priority:2,text:'\n var __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n };'},e.importDefaultHelper={name:"typescript:commonjsimportdefault",importName:"__importDefault",scoped:!1,text:'\n var __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n };'},e.exportStarHelper={name:"typescript:export-star",importName:"__exportStar",scoped:!1,dependencies:[e.createBindingHelper],priority:2,text:'\n var __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n };'},e.classPrivateFieldGetHelper={name:"typescript:classPrivateFieldGet",importName:"__classPrivateFieldGet",scoped:!1,text:'\n var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError("attempted to get private field on non-instance");\n }\n return privateMap.get(receiver);\n };'},e.classPrivateFieldSetHelper={name:"typescript:classPrivateFieldSet",importName:"__classPrivateFieldSet",scoped:!1,text:'\n var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError("attempted to set private field on non-instance");\n }\n privateMap.set(receiver, value);\n return value;\n };'},e.getAllUnscopedEmitHelpers=function(){return r||(r=e.arrayToMap([e.decorateHelper,e.metadataHelper,e.paramHelper,e.assignHelper,e.awaitHelper,e.asyncGeneratorHelper,e.asyncDelegator,e.asyncValues,e.restHelper,e.awaiterHelper,e.extendsHelper,e.templateObjectHelper,e.spreadHelper,e.spreadArraysHelper,e.valuesHelper,e.readHelper,e.generatorHelper,e.importStarHelper,e.importDefaultHelper,e.exportStarHelper,e.classPrivateFieldGetHelper,e.classPrivateFieldSetHelper,e.createBindingHelper,e.setModuleDefaultHelper],(function(e){return e.name})))},e.asyncSuperHelper={name:"typescript:async-super",scoped:!0,text:n(i(["\n const "," = name => super[name];"],["\n const "," = name => super[name];"]),"_superIndex")},e.advancedAsyncSuperHelper={name:"typescript:advanced-async-super",scoped:!0,text:n(i(["\n const "," = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"],["\n const "," = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"]),"_superIndex")}}(u||(u={})),function(e){e.isNumericLiteral=function(e){return 8===e.kind},e.isBigIntLiteral=function(e){return 9===e.kind},e.isStringLiteral=function(e){return 10===e.kind},e.isJsxText=function(e){return 11===e.kind},e.isRegularExpressionLiteral=function(e){return 13===e.kind},e.isNoSubstitutionTemplateLiteral=function(e){return 14===e.kind},e.isTemplateHead=function(e){return 15===e.kind},e.isTemplateMiddle=function(e){return 16===e.kind},e.isTemplateTail=function(e){return 17===e.kind},e.isIdentifier=function(e){return 78===e.kind},e.isQualifiedName=function(e){return 157===e.kind},e.isComputedPropertyName=function(e){return 158===e.kind},e.isPrivateIdentifier=function(e){return 79===e.kind},e.isSuperKeyword=function(e){return 105===e.kind},e.isImportKeyword=function(e){return 99===e.kind},e.isCommaToken=function(e){return 27===e.kind},e.isQuestionToken=function(e){return 57===e.kind},e.isExclamationToken=function(e){return 53===e.kind},e.isTypeParameterDeclaration=function(e){return 159===e.kind},e.isParameter=function(e){return 160===e.kind},e.isDecorator=function(e){return 161===e.kind},e.isPropertySignature=function(e){return 162===e.kind},e.isPropertyDeclaration=function(e){return 163===e.kind},e.isMethodSignature=function(e){return 164===e.kind},e.isMethodDeclaration=function(e){return 165===e.kind},e.isConstructorDeclaration=function(e){return 166===e.kind},e.isGetAccessorDeclaration=function(e){return 167===e.kind},e.isSetAccessorDeclaration=function(e){return 168===e.kind},e.isCallSignatureDeclaration=function(e){return 169===e.kind},e.isConstructSignatureDeclaration=function(e){return 170===e.kind},e.isIndexSignatureDeclaration=function(e){return 171===e.kind},e.isTypePredicateNode=function(e){return 172===e.kind},e.isTypeReferenceNode=function(e){return 173===e.kind},e.isFunctionTypeNode=function(e){return 174===e.kind},e.isConstructorTypeNode=function(e){return 175===e.kind},e.isTypeQueryNode=function(e){return 176===e.kind},e.isTypeLiteralNode=function(e){return 177===e.kind},e.isArrayTypeNode=function(e){return 178===e.kind},e.isTupleTypeNode=function(e){return 179===e.kind},e.isNamedTupleMember=function(e){return 192===e.kind},e.isOptionalTypeNode=function(e){return 180===e.kind},e.isRestTypeNode=function(e){return 181===e.kind},e.isUnionTypeNode=function(e){return 182===e.kind},e.isIntersectionTypeNode=function(e){return 183===e.kind},e.isConditionalTypeNode=function(e){return 184===e.kind},e.isInferTypeNode=function(e){return 185===e.kind},e.isParenthesizedTypeNode=function(e){return 186===e.kind},e.isThisTypeNode=function(e){return 187===e.kind},e.isTypeOperatorNode=function(e){return 188===e.kind},e.isIndexedAccessTypeNode=function(e){return 189===e.kind},e.isMappedTypeNode=function(e){return 190===e.kind},e.isLiteralTypeNode=function(e){return 191===e.kind},e.isImportTypeNode=function(e){return 195===e.kind},e.isTemplateLiteralTypeSpan=function(e){return 194===e.kind},e.isTemplateLiteralTypeNode=function(e){return 193===e.kind},e.isObjectBindingPattern=function(e){return 196===e.kind},e.isArrayBindingPattern=function(e){return 197===e.kind},e.isBindingElement=function(e){return 198===e.kind},e.isArrayLiteralExpression=function(e){return 199===e.kind},e.isObjectLiteralExpression=function(e){return 200===e.kind},e.isPropertyAccessExpression=function(e){return 201===e.kind},e.isElementAccessExpression=function(e){return 202===e.kind},e.isCallExpression=function(e){return 203===e.kind},e.isNewExpression=function(e){return 204===e.kind},e.isTaggedTemplateExpression=function(e){return 205===e.kind},e.isTypeAssertionExpression=function(e){return 206===e.kind},e.isParenthesizedExpression=function(e){return 207===e.kind},e.isFunctionExpression=function(e){return 208===e.kind},e.isArrowFunction=function(e){return 209===e.kind},e.isDeleteExpression=function(e){return 210===e.kind},e.isTypeOfExpression=function(e){return 211===e.kind},e.isVoidExpression=function(e){return 212===e.kind},e.isAwaitExpression=function(e){return 213===e.kind},e.isPrefixUnaryExpression=function(e){return 214===e.kind},e.isPostfixUnaryExpression=function(e){return 215===e.kind},e.isBinaryExpression=function(e){return 216===e.kind},e.isConditionalExpression=function(e){return 217===e.kind},e.isTemplateExpression=function(e){return 218===e.kind},e.isYieldExpression=function(e){return 219===e.kind},e.isSpreadElement=function(e){return 220===e.kind},e.isClassExpression=function(e){return 221===e.kind},e.isOmittedExpression=function(e){return 222===e.kind},e.isExpressionWithTypeArguments=function(e){return 223===e.kind},e.isAsExpression=function(e){return 224===e.kind},e.isNonNullExpression=function(e){return 225===e.kind},e.isMetaProperty=function(e){return 226===e.kind},e.isSyntheticExpression=function(e){return 227===e.kind},e.isPartiallyEmittedExpression=function(e){return 336===e.kind},e.isCommaListExpression=function(e){return 337===e.kind},e.isTemplateSpan=function(e){return 228===e.kind},e.isSemicolonClassElement=function(e){return 229===e.kind},e.isBlock=function(e){return 230===e.kind},e.isVariableStatement=function(e){return 232===e.kind},e.isEmptyStatement=function(e){return 231===e.kind},e.isExpressionStatement=function(e){return 233===e.kind},e.isIfStatement=function(e){return 234===e.kind},e.isDoStatement=function(e){return 235===e.kind},e.isWhileStatement=function(e){return 236===e.kind},e.isForStatement=function(e){return 237===e.kind},e.isForInStatement=function(e){return 238===e.kind},e.isForOfStatement=function(e){return 239===e.kind},e.isContinueStatement=function(e){return 240===e.kind},e.isBreakStatement=function(e){return 241===e.kind},e.isReturnStatement=function(e){return 242===e.kind},e.isWithStatement=function(e){return 243===e.kind},e.isSwitchStatement=function(e){return 244===e.kind},e.isLabeledStatement=function(e){return 245===e.kind},e.isThrowStatement=function(e){return 246===e.kind},e.isTryStatement=function(e){return 247===e.kind},e.isDebuggerStatement=function(e){return 248===e.kind},e.isVariableDeclaration=function(e){return 249===e.kind},e.isVariableDeclarationList=function(e){return 250===e.kind},e.isFunctionDeclaration=function(e){return 251===e.kind},e.isClassDeclaration=function(e){return 252===e.kind},e.isInterfaceDeclaration=function(e){return 253===e.kind},e.isTypeAliasDeclaration=function(e){return 254===e.kind},e.isEnumDeclaration=function(e){return 255===e.kind},e.isModuleDeclaration=function(e){return 256===e.kind},e.isModuleBlock=function(e){return 257===e.kind},e.isCaseBlock=function(e){return 258===e.kind},e.isNamespaceExportDeclaration=function(e){return 259===e.kind},e.isImportEqualsDeclaration=function(e){return 260===e.kind},e.isImportDeclaration=function(e){return 261===e.kind},e.isImportClause=function(e){return 262===e.kind},e.isNamespaceImport=function(e){return 263===e.kind},e.isNamespaceExport=function(e){return 269===e.kind},e.isNamedImports=function(e){return 264===e.kind},e.isImportSpecifier=function(e){return 265===e.kind},e.isExportAssignment=function(e){return 266===e.kind},e.isExportDeclaration=function(e){return 267===e.kind},e.isNamedExports=function(e){return 268===e.kind},e.isExportSpecifier=function(e){return 270===e.kind},e.isMissingDeclaration=function(e){return 271===e.kind},e.isNotEmittedStatement=function(e){return 335===e.kind},e.isSyntheticReference=function(e){return 340===e.kind},e.isMergeDeclarationMarker=function(e){return 338===e.kind},e.isEndOfDeclarationMarker=function(e){return 339===e.kind},e.isExternalModuleReference=function(e){return 272===e.kind},e.isJsxElement=function(e){return 273===e.kind},e.isJsxSelfClosingElement=function(e){return 274===e.kind},e.isJsxOpeningElement=function(e){return 275===e.kind},e.isJsxClosingElement=function(e){return 276===e.kind},e.isJsxFragment=function(e){return 277===e.kind},e.isJsxOpeningFragment=function(e){return 278===e.kind},e.isJsxClosingFragment=function(e){return 279===e.kind},e.isJsxAttribute=function(e){return 280===e.kind},e.isJsxAttributes=function(e){return 281===e.kind},e.isJsxSpreadAttribute=function(e){return 282===e.kind},e.isJsxExpression=function(e){return 283===e.kind},e.isCaseClause=function(e){return 284===e.kind},e.isDefaultClause=function(e){return 285===e.kind},e.isHeritageClause=function(e){return 286===e.kind},e.isCatchClause=function(e){return 287===e.kind},e.isPropertyAssignment=function(e){return 288===e.kind},e.isShorthandPropertyAssignment=function(e){return 289===e.kind},e.isSpreadAssignment=function(e){return 290===e.kind},e.isEnumMember=function(e){return 291===e.kind},e.isUnparsedPrepend=function(e){return 293===e.kind},e.isSourceFile=function(e){return 297===e.kind},e.isBundle=function(e){return 298===e.kind},e.isUnparsedSource=function(e){return 299===e.kind},e.isJSDocTypeExpression=function(e){return 301===e.kind},e.isJSDocNameReference=function(e){return 302===e.kind},e.isJSDocAllType=function(e){return 303===e.kind},e.isJSDocUnknownType=function(e){return 304===e.kind},e.isJSDocNullableType=function(e){return 305===e.kind},e.isJSDocNonNullableType=function(e){return 306===e.kind},e.isJSDocOptionalType=function(e){return 307===e.kind},e.isJSDocFunctionType=function(e){return 308===e.kind},e.isJSDocVariadicType=function(e){return 309===e.kind},e.isJSDocNamepathType=function(e){return 310===e.kind},e.isJSDoc=function(e){return 311===e.kind},e.isJSDocTypeLiteral=function(e){return 312===e.kind},e.isJSDocSignature=function(e){return 313===e.kind},e.isJSDocAugmentsTag=function(e){return 315===e.kind},e.isJSDocAuthorTag=function(e){return 317===e.kind},e.isJSDocClassTag=function(e){return 319===e.kind},e.isJSDocCallbackTag=function(e){return 324===e.kind},e.isJSDocPublicTag=function(e){return 320===e.kind},e.isJSDocPrivateTag=function(e){return 321===e.kind},e.isJSDocProtectedTag=function(e){return 322===e.kind},e.isJSDocReadonlyTag=function(e){return 323===e.kind},e.isJSDocDeprecatedTag=function(e){return 318===e.kind},e.isJSDocEnumTag=function(e){return 325===e.kind},e.isJSDocParameterTag=function(e){return 326===e.kind},e.isJSDocReturnTag=function(e){return 327===e.kind},e.isJSDocThisTag=function(e){return 328===e.kind},e.isJSDocTypeTag=function(e){return 329===e.kind},e.isJSDocTemplateTag=function(e){return 330===e.kind},e.isJSDocTypedefTag=function(e){return 331===e.kind},e.isJSDocUnknownTag=function(e){return 314===e.kind},e.isJSDocPropertyTag=function(e){return 333===e.kind},e.isJSDocImplementsTag=function(e){return 316===e.kind},e.isSyntaxList=function(e){return 334===e.kind}}(u||(u={})),function(e){function n(t,n,r,i){if(e.isComputedPropertyName(r))return e.setTextRange(t.createElementAccessExpression(n,r.expression),i);var a=e.setTextRange(e.isIdentifierOrPrivateIdentifier(r)?t.createPropertyAccessExpression(n,r):t.createElementAccessExpression(n,r),r);return e.getOrCreateEmitNode(a).flags|=64,a}function r(t,n){var r=e.parseNodeFactory.createIdentifier(t||"React");return e.setParent(r,e.getParseTreeNode(n)),r}function i(t,n,a){if(e.isQualifiedName(n)){var o=i(t,n.left,a),s=t.createIdentifier(e.idText(n.right));return s.escapedText=n.right.escapedText,t.createPropertyAccessExpression(o,s)}return r(e.idText(n),a)}function a(e,t,n,a){return t?i(e,t,a):e.createPropertyAccessExpression(r(n,a),"createElement")}function o(t,n){return e.isIdentifier(n)?t.createStringLiteralFromNode(n):e.isComputedPropertyName(n)?e.setParent(e.setTextRange(t.cloneNode(n.expression),n.expression),n.expression.parent):e.setParent(e.setTextRange(t.cloneNode(n),n),n.parent)}function s(t){return e.isStringLiteral(t.expression)&&"use strict"===t.expression.text}function u(e,t){switch(void 0===t&&(t=15),e.kind){case 207:return 0!=(1&t);case 206:case 224:return 0!=(2&t);case 225:return 0!=(4&t);case 336:return 0!=(8&t)}return!1}function c(e,t){for(void 0===t&&(t=15);u(e,t);)e=e.expression;return e}function l(t){return e.setStartsOnNewLine(t,!0)}function d(t){var n=e.getOriginalNode(t,e.isSourceFile),r=n&&n.emitNode;return r&&r.externalHelpersModuleName}function p(t,n,r,i,a){if(r.importHelpers&&e.isEffectiveExternalModule(n,r)){var o=d(n);if(o)return o;var s=e.getEmitModuleKind(r),u=(i||r.esModuleInterop&&a)&&s!==e.ModuleKind.System&&s0)if(i||s.push(t.createNull()),a.length>1)for(var u=0,c=a;u0)if(u.length>1)for(var f=0,h=u;f=e.ModuleKind.ES2015&&c<=e.ModuleKind.ESNext){var l=e.getEmitHelpers(r);if(l){for(var d=[],f=0,h=l;ft.checkJsDirective.pos)&&(t.checkJsDirective={enabled:"ts-check"===i,end:e.range.end,pos:e.range.pos})}));break;case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:e.Debug.fail("Unhandled pragma kind")}}))}!function(e){e[e.None=0]="None",e[e.Yield=1]="Yield",e[e.Await=2]="Await",e[e.Type=4]="Type",e[e.IgnoreMissingOpenBrace=16]="IgnoreMissingOpenBrace",e[e.JSDoc=32]="JSDoc"}(t||(t={})),function(e){e[e.TryParse=0]="TryParse",e[e.Lookahead=1]="Lookahead",e[e.Reparse=2]="Reparse"}(n||(n={})),e.parseBaseNodeFactory={createBaseSourceFileNode:function(t){return new(s||(s=e.objectAllocator.getSourceFileConstructor()))(t,-1,-1)},createBaseIdentifierNode:function(t){return new(a||(a=e.objectAllocator.getIdentifierConstructor()))(t,-1,-1)},createBasePrivateIdentifierNode:function(t){return new(o||(o=e.objectAllocator.getPrivateIdentifierConstructor()))(t,-1,-1)},createBaseTokenNode:function(t){return new(i||(i=e.objectAllocator.getTokenConstructor()))(t,-1,-1)},createBaseNode:function(t){return new(r||(r=e.objectAllocator.getNodeConstructor()))(t,-1,-1)}},e.parseNodeFactory=e.createNodeFactory(1,e.parseBaseNodeFactory),e.isJSDocLikeText=p,e.forEachChild=f,e.forEachChildRecursively=function(t,n,r){for(var i=[t];i.length;){var a=i.pop(),o=u(a,s(a));if(o)return o}return;function s(e){var t=[];return f(e,n,n),t;function n(e){t.unshift(e)}}function u(t,a){for(var o=0,s=a;o=0;c--){var l=u[c];if(d=n(l,t)){if("skip"===d)continue;return d}i.push(l)}}else{var d;if(i.push(u),d=n(u,t)){if("skip"===d)continue;return d}}}}},e.createSourceFile=function(t,n,r,i,a){void 0===i&&(i=!1);var o,s=["parse","createSourceFile",{path:t}];return e.tracing.begin.apply(e.tracing,s),e.performance.mark("beforeParse"),e.perfLogger.logStartParseSourceFile(t),o=100===r?u.parseSourceFile(t,n,r,void 0,i,6):u.parseSourceFile(t,n,r,void 0,i,a),e.perfLogger.logStopParseSourceFile(),e.performance.mark("afterParse"),e.performance.measure("Parse","beforeParse","afterParse"),e.tracing.end.apply(e.tracing,s),o},e.parseIsolatedEntityName=function(e,t){return u.parseIsolatedEntityName(e,t)},e.parseJsonText=function(e,t){return u.parseJsonText(e,t)},e.isExternalModule=h,e.updateSourceFile=function(e,t,n,r){void 0===r&&(r=!1);var i=c.updateSourceFile(e,t,n,r);return i.flags|=3145728&e.flags,i},e.parseIsolatedJSDocComment=function(e,t,n){var r=u.JSDocParser.parseIsolatedJSDocComment(e,t,n);return r&&r.jsDoc&&u.fixupParentReferences(r.jsDoc),r},e.parseJSDocTypeExpressionForTests=function(e,t,n){return u.JSDocParser.parseJSDocTypeExpressionForTests(e,t,n)},function(t){var n,r,i,a,o,s=e.createScanner(99,!0),u=20480;function l(e){return w++,e}var d,v,y,b,D,E,C,x,k,T,w,A,O,N,I,F,L,P={createBaseSourceFileNode:function(e){return l(new o(e,0,0))},createBaseIdentifierNode:function(e){return l(new i(e,0,0))},createBasePrivateIdentifierNode:function(e){return l(new a(e,0,0))},createBaseTokenNode:function(e){return l(new r(e,0,0))},createBaseNode:function(e){return l(new n(e,0,0))}},R=e.createNodeFactory(11,P),M=!0,B=!1;function j(t,n,r,i,a){void 0===r&&(r=2),void 0===a&&(a=!1),U(t,n,r,i,6),v=L,De();var o,s,u=me();if(1===ve())o=ze([],u,u),s=je();else{var c=void 0;switch(ve()){case 22:c=Cr();break;case 109:case 94:case 103:c=je();break;case 40:c=Ae((function(){return 8===De()&&58!==De()}))?Xn():xr();break;case 8:case 10:if(Ae((function(){return 58!==De()}))){c=Ft();break}default:c=xr()}var l=R.createExpressionStatement(c);He(l,u),o=ze([l],u),s=Be(1,e.Diagnostics.Unexpected_token)}var d=$(t,2,6,!1,o,s,v);a&&J(d),d.nodeCount=w,d.identifierCount=N,d.identifiers=A,d.parseDiagnostics=e.attachFileToDiagnostics(C,d),x&&(d.jsDocDiagnostics=e.attachFileToDiagnostics(x,d));var p=d;return V(),p}function U(t,u,c,l,p){switch(n=e.objectAllocator.getNodeConstructor(),r=e.objectAllocator.getTokenConstructor(),i=e.objectAllocator.getIdentifierConstructor(),a=e.objectAllocator.getPrivateIdentifierConstructor(),o=e.objectAllocator.getSourceFileConstructor(),d=e.normalizePath(t),y=u,b=c,k=l,D=p,E=e.getLanguageVariant(p),C=[],I=0,A=new e.Map,O=new e.Map,N=0,w=0,v=0,M=!0,D){case 1:case 2:L=131072;break;case 6:L=33685504;break;default:L=0}B=!1,s.setText(y),s.setOnError(ge),s.setScriptTarget(b),s.setLanguageVariant(E)}function V(){s.clearCommentDirectives(),s.setText(""),s.setOnError(void 0),y=void 0,b=void 0,k=void 0,D=void 0,E=void 0,v=0,C=void 0,x=void 0,I=0,A=void 0,F=void 0,M=!0}function z(t,n,r){var i=g(d);i&&(L|=8388608),v=L,De();var a=mt(0,Hr);e.Debug.assert(1===ve());var o=Y(je()),u=$(d,t,r,i,a,o,v);return m(u,y),_(u,(function(t,n,r){C.push(e.createDetachedDiagnostic(d,t,n,r))})),u.commentDirectives=s.getCommentDirectives(),u.nodeCount=w,u.identifierCount=N,u.identifiers=A,u.parseDiagnostics=e.attachFileToDiagnostics(C,u),x&&(u.jsDocDiagnostics=e.attachFileToDiagnostics(x,u)),n&&J(u),u}function H(e,t){return t?Y(e):e}t.parseSourceFile=function(t,n,r,i,a,o){if(void 0===a&&(a=!1),6===(o=e.ensureScriptKind(t,o))){var s=j(t,n,r,i,a);return e.convertToObjectWorker(s,s.parseDiagnostics,!1,void 0,void 0),s.referencedFiles=e.emptyArray,s.typeReferenceDirectives=e.emptyArray,s.libReferenceDirectives=e.emptyArray,s.amdDependencies=e.emptyArray,s.hasNoDefaultLib=!1,s.pragmas=e.emptyMap,s}U(t,n,r,i,o);var u=z(r,a,o);return V(),u},t.parseIsolatedEntityName=function(e,t){U("",e,t,void 0,1),De();var n=xt(!0),r=1===ve()&&!C.length;return V(),r?n:void 0},t.parseJsonText=j;var W,K,q,G=!1;function Y(t){e.Debug.assert(!t.jsDoc);var n=e.mapDefined(e.getJSDocCommentRanges(t,y),(function(e){return q.parseJSDocComment(t,e.pos,e.end-e.pos)}));return n.length&&(t.jsDoc=n),G&&(G=!1,t.flags|=134217728),t}function J(t){e.setParentRecursive(t,!0)}function $(t,n,r,i,a,o,u){var l=R.createSourceFile(a,o,u);return e.setTextRangePosWidth(l,0,y.length),function(t){t.externalModuleIndicator=e.forEach(t.statements,Ri)||function(e){return 2097152&e.flags?Mi(e):void 0}(t)}(l),!i&&h(l)&&8388608&l.transformFlags&&(l=function(t){var n=k,r=c.createSyntaxCursor(t);k={currentNode:function(e){var t=r.currentNode(e);return M&&t&&f(t)&&(t.intersectsChange=!0),t}};var i=[],a=C;C=[];for(var o=0,u=h(t.statements,0),l=function(){var n=t.statements[o],r=t.statements[u];e.addRange(i,t.statements,o,u),o=g(t.statements,u);var c=e.findIndex(a,(function(e){return e.start>=n.pos})),l=c>=0?e.findIndex(a,(function(e){return e.start>=r.pos}),c):-1;c>=0&&e.addRange(C,a,c,l>=0?l:void 0),we((function(){var e=L;for(L|=32768,s.setTextPos(r.pos),De();1!==ve();){var n=s.getStartPos(),a=_t(0,Hr);if(i.push(a),n===s.getStartPos()&&De(),o>=0){var u=t.statements[o];if(a.end===u.pos)break;a.end>u.pos&&(o=g(t.statements,o+1))}}L=e}),2),u=o>=0?h(t.statements,o):-1};-1!==u;)l();if(o>=0){var d=t.statements[o];e.addRange(i,t.statements,o);var p=e.findIndex(a,(function(e){return e.start>=d.pos}));p>=0&&e.addRange(C,a,p)}return k=n,R.updateSourceFile(t,e.setTextRange(R.createNodeArray(i),t.statements));function f(e){return!(32768&e.flags||!(8388608&e.transformFlags))}function h(e,t){for(var n=t;n115}function Ie(){return 78===ve()||(124!==ve()||!se())&&(130!==ve()||!le())&&ve()>115}function Fe(t,n,r){return void 0===r&&(r=!0),ve()===t?(r&&De(),!0):(n?de(n):de(e.Diagnostics._0_expected,e.tokenToString(t)),!1)}function Le(t){return ve()===t?(Ee(),!0):(de(e.Diagnostics._0_expected,e.tokenToString(t)),!1)}function Pe(e){return ve()===e&&(De(),!0)}function Re(e){if(ve()===e)return je()}function Me(e){if(ve()===e)return t=me(),n=ve(),Ee(),He(R.createToken(n),t);var t,n}function Be(t,n,r){return Re(t)||We(t,!1,n||e.Diagnostics._0_expected,r||e.tokenToString(t))}function je(){var e=me(),t=ve();return De(),He(R.createToken(t),e)}function Ue(){return 26===ve()||19===ve()||1===ve()||s.hasPrecedingLineBreak()}function Ve(){return Ue()?(26===ve()&&De(),!0):Fe(26)}function ze(t,n,r,i){var a=R.createNodeArray(t,i);return e.setTextRangePosEnd(a,n,null!=r?r:s.getStartPos()),a}function He(t,n,r){return e.setTextRangePosEnd(t,n,null!=r?r:s.getStartPos()),L&&(t.flags|=L),B&&(B=!1,t.flags|=65536),t}function We(t,n,r,i){n?pe(s.getStartPos(),0,r,i):r&&de(r,i);var a=me();return He(78===t?R.createIdentifier("",void 0,void 0):e.isTemplateLiteralKind(t)?R.createTemplateLiteralLikeNode(t,"","",void 0):8===t?R.createNumericLiteral("",void 0):10===t?R.createStringLiteral("",void 0):271===t?R.createMissingDeclaration():R.createToken(t),a)}function Ke(e){var t=A.get(e);return void 0===t&&A.set(e,t=e),t}function qe(t,n,r){if(N++,t){var i=me(),a=ve(),o=Ke(s.getTokenValue());return ye(),He(R.createIdentifier(o,void 0,a),i)}if(79===ve())return de(r||e.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies),qe(!0);var u=1===ve(),c=s.isReservedWord(),l=s.getTokenText(),d=c?e.Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:e.Diagnostics.Identifier_expected;return We(78,u,n||d,l)}function Ge(e){return qe(Ne(),void 0,e)}function Ye(e,t){return qe(Ie(),e,t)}function Je(t){return qe(e.tokenIsIdentifierOrKeyword(ve()),t)}function $e(){return e.tokenIsIdentifierOrKeyword(ve())||10===ve()||8===ve()}function Qe(e){if(10===ve()||8===ve()){var t=Ft();return t.text=Ke(t.text),t}return e&&22===ve()?function(){var e=me();Fe(22);var t=ie(jn);return Fe(23),He(R.createComputedPropertyName(t),e)}():79===ve()?Ze():Je()}function Xe(){return Qe(!0)}function Ze(){var e,t,n=me(),r=R.createPrivateIdentifier((e=s.getTokenText(),void 0===(t=O.get(e))&&O.set(e,t=e),t));return De(),He(r,n)}function et(e){return ve()===e&&Oe(nt)}function tt(){return De(),!s.hasPrecedingLineBreak()&&at()}function nt(){switch(ve()){case 84:return 91===De();case 92:return De(),87===ve()?Ae(ot):149===ve()?Ae(it):rt();case 87:return ot();case 123:case 134:case 146:return De(),at();default:return tt()}}function rt(){return 41!==ve()&&126!==ve()&&18!==ve()&&at()}function it(){return De(),rt()}function at(){return 22===ve()||18===ve()||41===ve()||25===ve()||$e()}function ot(){return De(),83===ve()||97===ve()||117===ve()||125===ve()&&Ae(Rr)||129===ve()&&Ae(Mr)}function st(t,n){if(vt(t))return!0;switch(t){case 0:case 1:case 3:return!(26===ve()&&n)&&Vr();case 2:return 81===ve()||87===ve();case 4:return Ae(rn);case 5:return Ae(li)||26===ve()&&!n;case 6:return 22===ve()||$e();case 12:switch(ve()){case 22:case 41:case 25:case 24:return!0;default:return $e()}case 18:return $e();case 9:return 22===ve()||25===ve()||$e();case 7:return 18===ve()?Ae(ut):n?Ie()&&!pt():Mn()&&!pt();case 8:return Qr();case 10:return 27===ve()||25===ve()||Qr();case 19:return Ie();case 15:switch(ve()){case 27:case 24:return!0}case 11:return 25===ve()||Bn();case 16:return Kt(!1);case 17:return Kt(!0);case 20:case 21:return 27===ve()||Cn();case 22:return Si();case 23:return e.tokenIsIdentifierOrKeyword(ve());case 13:return e.tokenIsIdentifierOrKeyword(ve())||18===ve();case 14:return!0}return e.Debug.fail("Non-exhaustive case in 'isListElement'.")}function ut(){if(e.Debug.assert(18===ve()),19===De()){var t=De();return 27===t||18===t||93===t||116===t}return!0}function ct(){return De(),Ie()}function lt(){return De(),e.tokenIsIdentifierOrKeyword(ve())}function dt(){return De(),e.tokenIsIdentifierOrKeywordOrGreaterThan(ve())}function pt(){return(116===ve()||93===ve())&&Ae(ft)}function ft(){return De(),Bn()}function ht(){return De(),Cn()}function gt(e){if(1===ve())return!0;switch(e){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:return 19===ve();case 3:return 19===ve()||81===ve()||87===ve();case 7:return 18===ve()||93===ve()||116===ve();case 8:return!!Ue()||!!Jn(ve())||38===ve();case 19:return 31===ve()||20===ve()||18===ve()||93===ve()||116===ve();case 11:return 21===ve()||26===ve();case 15:case 21:case 10:return 23===ve();case 17:case 16:case 18:return 21===ve()||23===ve();case 20:return 27!==ve();case 22:return 18===ve()||19===ve();case 13:return 31===ve()||43===ve();case 14:return 29===ve()&&Ae(Oi);default:return!1}}function mt(e,t){var n=I;I|=1<=0)}function Et(t){return 6===t?e.Diagnostics.An_enum_member_name_must_be_followed_by_a_or:void 0}function Ct(){var e=ze([],me());return e.isMissingList=!0,e}function St(e,t,n,r){if(Fe(n)){var i=Dt(e,t);return Fe(r),i}return Ct()}function xt(e,t){for(var n=me(),r=e?Je(t):Ye(t),i=me();Pe(24);){if(29===ve()){r.jsdocDotPos=i;break}i=me(),r=He(R.createQualifiedName(r,Tt(e,!1)),n)}return r}function kt(e,t){return He(R.createQualifiedName(e,t),e.pos)}function Tt(t,n){if(s.hasPrecedingLineBreak()&&e.tokenIsIdentifierOrKeyword(ve())&&Ae(Pr))return We(78,!0,e.Diagnostics.Identifier_expected);if(79===ve()){var r=Ze();return n?r:We(78,!0,e.Diagnostics.Identifier_expected)}return t?Je():Ye()}function wt(e){var t=me();return He(R.createTemplateExpression(Lt(e),function(e){var t,n=me(),r=[];do{t=It(e),r.push(t)}while(16===t.literal.kind);return ze(r,n)}(e)),t)}function At(){var e=me();return He(R.createTemplateLiteralType(Lt(!1),function(){var e,t=me(),n=[];do{e=Ot(),n.push(e)}while(16===e.literal.kind);return ze(n,t)}()),e)}function Ot(){var e=me();return He(R.createTemplateLiteralTypeSpan(Ln(),Nt(!1)),e)}function Nt(t){return 19===ve()?(function(e){T=s.reScanTemplateToken(e)}(t),n=Pt(ve()),e.Debug.assert(16===n.kind||17===n.kind,"Template fragment has wrong token kind"),n):Be(17,e.Diagnostics._0_expected,e.tokenToString(19));var n}function It(e){var t=me();return He(R.createTemplateSpan(ie(jn),Nt(e)),t)}function Ft(){return Pt(ve())}function Lt(t){t&&Se();var n=Pt(ve());return e.Debug.assert(15===n.kind,"Template head has wrong token kind"),n}function Pt(t){var n=me(),r=e.isTemplateLiteralKind(t)?R.createTemplateLiteralLikeNode(t,s.getTokenValue(),function(e){var t=14===e||17===e,n=s.getTokenText();return n.substring(1,n.length-(s.isUnterminated()?0:t?1:2))}(t),2048&s.getTokenFlags()):8===t?R.createNumericLiteral(s.getTokenValue(),s.getNumericLiteralFlags()):10===t?R.createStringLiteral(s.getTokenValue(),void 0,s.hasExtendedUnicodeEscape()):e.isLiteralKind(t)?R.createLiteralLikeNode(t,s.getTokenValue()):e.Debug.fail();return s.hasExtendedUnicodeEscape()&&(r.hasExtendedUnicodeEscape=!0),s.isUnterminated()&&(r.isUnterminated=!0),De(),He(r,n)}function Rt(){return xt(!0,e.Diagnostics.Type_expected)}function Mt(){if(!s.hasPrecedingLineBreak()&&29===xe())return St(20,Ln,29,31)}function Bt(){var e=me();return He(R.createTypeReferenceNode(Rt(),Mt()),e)}function jt(t){switch(t.kind){case 173:return e.nodeIsMissing(t.typeName);case 174:case 175:var n=t,r=n.parameters,i=n.type;return!!r.isMissingList||jt(i);case 186:return jt(t.type);default:return!1}}function Ut(){var e=me();return De(),He(R.createThisTypeNode(),e)}function Vt(){var e,t=me();return 107!==ve()&&102!==ve()||(e=Je(),Fe(58)),He(R.createParameterDeclaration(void 0,void 0,void 0,e,void 0,zt(),void 0),t)}function zt(){s.setInJSDocType(!0);var e=me();if(Pe(139)){var t=R.createJSDocNamepathType(void 0);e:for(;;)switch(ve()){case 19:case 1:case 27:case 5:break e;default:Ee()}return s.setInJSDocType(!1),He(t,e)}var n=Pe(25),r=In();return s.setInJSDocType(!1),n&&(r=He(R.createJSDocVariadicType(r),e)),62===ve()?(De(),He(R.createJSDocOptionalType(r),e)):r}function Ht(){var e,t,n=me(),r=Ye();Pe(93)&&(Cn()||!Bn()?e=Ln():t=Zn());var i=Pe(62)?Ln():void 0,a=R.createTypeParameterDeclaration(r,e,i);return a.expression=t,He(a,n)}function Wt(){if(29===ve())return St(19,Ht,29,31)}function Kt(t){return 25===ve()||Qr()||e.isModifierKind(ve())||59===ve()||Cn(!t)}function qt(){return Yt(!0)}function Gt(){return Yt(!1)}function Yt(t){var n=me(),r=_e();if(107===ve())return H(He(R.createParameterDeclaration(void 0,void 0,void 0,qe(!0),void 0,Rn(),void 0),n),r);var i=t?ae(fi):fi(),a=M;M=!1;var o=gi(),s=H(He(R.createParameterDeclaration(i,o,Re(25),function(t){var n=Xr(e.Diagnostics.Private_identifiers_cannot_be_used_as_parameters);return 0===e.getFullWidth(n)&&!e.some(t)&&e.isModifierKind(ve())&&De(),n}(o),Re(57),Rn(),Un()),n),r);return M=a,s}function Jt(t,n){if(function(t,n){return 38===t?(Fe(t),!0):!!Pe(58)||!(!n||38!==ve())&&(de(e.Diagnostics._0_expected,e.tokenToString(58)),De(),!0)}(t,n))return In()}function $t(e){var t=se(),n=le();Z(!!(1&e)),te(!!(2&e));var r=32&e?Dt(17,Vt):Dt(16,n?qt:Gt);return Z(t),te(n),r}function Qt(e){if(!Fe(20))return Ct();var t=$t(e);return Fe(21),t}function Xt(){Pe(27)||Ve()}function Zt(e){var t=me(),n=_e();170===e&&Fe(102);var r=Wt(),i=Qt(4),a=Jt(58,!0);return Xt(),H(He(169===e?R.createCallSignature(r,i,a):R.createConstructSignature(r,i,a),t),n)}function en(){return 22===ve()&&Ae(tn)}function tn(){if(De(),25===ve()||23===ve())return!0;if(e.isModifierKind(ve())){if(De(),Ie())return!0}else{if(!Ie())return!1;De()}return 58===ve()||27===ve()||57===ve()&&(De(),58===ve()||27===ve()||23===ve())}function nn(e,t,n,r){var i=St(16,Gt,22,23),a=Rn();return Xt(),H(He(R.createIndexSignature(n,r,i,a),e),t)}function rn(){if(20===ve()||29===ve())return!0;for(var t=!1;e.isModifierKind(ve());)t=!0,De();return 22===ve()||($e()&&(t=!0,De()),!!t&&(20===ve()||29===ve()||57===ve()||58===ve()||27===ve()||Ue()))}function an(){if(20===ve()||29===ve())return Zt(169);if(102===ve()&&Ae(on))return Zt(170);var e=me(),t=_e(),n=gi();return en()?nn(e,t,void 0,n):function(e,t,n){var r,i=Xe(),a=Re(57);if(20===ve()||29===ve()){var o=Wt(),s=Qt(4),u=Jt(58,!0);r=R.createMethodSignature(n,i,a,o,s,u)}else u=Rn(),r=R.createPropertySignature(n,i,a,u),62===ve()&&(r.initializer=Un());return Xt(),H(He(r,e),t)}(e,t,n)}function on(){return De(),20===ve()||29===ve()}function sn(){return 24===De()}function un(){switch(De()){case 20:case 29:case 24:return!0}return!1}function cn(){var e;return Fe(18)?(e=mt(4,an),Fe(19)):e=Ct(),e}function ln(){return De(),39===ve()||40===ve()?142===De():(142===ve()&&De(),22===ve()&&ct()&&100===De())}function dn(){var e,t=me();Fe(18),142!==ve()&&39!==ve()&&40!==ve()||142!==(e=je()).kind&&Fe(142),Fe(22);var n,r=function(){var e=me(),t=Je();Fe(100);var n=Ln();return He(R.createTypeParameterDeclaration(t,n,void 0),e)}(),i=Pe(126)?Ln():void 0;Fe(23),57!==ve()&&39!==ve()&&40!==ve()||57!==(n=je()).kind&&Fe(57);var a=Rn();return Ve(),Fe(19),He(R.createMappedTypeNode(e,r,i,n,a),t)}function pn(){var t=me();if(Pe(25))return He(R.createRestTypeNode(Ln()),t);var n=Ln();if(e.isJSDocNullableType(n)&&n.pos===n.type.pos){var r=R.createOptionalTypeNode(n.type);return e.setTextRange(r,n),r.flags=n.flags,r}return n}function fn(){return 58===De()||57===ve()&&58===De()}function hn(){return 25===ve()?e.tokenIsIdentifierOrKeyword(De())&&fn():e.tokenIsIdentifierOrKeyword(ve())&&fn()}function gn(){if(Ae(hn)){var e=me(),t=_e(),n=Re(25),r=Je(),i=Re(57);Fe(58);var a=pn();return H(He(R.createNamedTupleMember(n,r,i,a),e),t)}return pn()}function mn(){var e=me(),t=_e(),n=Pe(102),r=Wt(),i=Qt(4),a=Jt(38,!1);return H(He(n?R.createConstructorTypeNode(r,i,a):R.createFunctionTypeNode(r,i,a),e),t)}function _n(){var e=je();return 24===ve()?void 0:e}function vn(e){var t=me();e&&De();var n=109===ve()||94===ve()||103===ve()?je():Pt(ve());return e&&(n=He(R.createPrefixUnaryExpression(40,n),t)),He(R.createLiteralTypeNode(n),t)}function yn(){return De(),99===ve()}function bn(){v|=1048576;var e=me(),t=Pe(111);Fe(99),Fe(20);var n=Ln();Fe(21);var r=Pe(24)?Rt():void 0,i=Mt();return He(R.createImportTypeNode(n,r,i,t),e)}function Dn(){return De(),8===ve()||9===ve()}function En(){switch(ve()){case 128:case 152:case 147:case 144:case 155:case 148:case 131:case 150:case 141:case 145:return Oe(_n)||Bt();case 65:s.reScanAsteriskEqualsToken();case 41:return n=me(),De(),He(R.createJSDocAllType(),n);case 60:s.reScanQuestionToken();case 57:return function(){var e=me();return De(),27===ve()||19===ve()||21===ve()||31===ve()||62===ve()||51===ve()?He(R.createJSDocUnknownType(),e):He(R.createJSDocNullableType(Ln()),e)}();case 97:return function(){var e=me(),t=_e();if(Ae(Ai)){De();var n=Qt(36),r=Jt(58,!1);return H(He(R.createJSDocFunctionType(n,r),e),t)}return He(R.createTypeReferenceNode(Je(),void 0),e)}();case 53:return function(){var e=me();return De(),He(R.createJSDocNonNullableType(En()),e)}();case 14:case 10:case 8:case 9:case 109:case 94:case 103:return vn();case 40:return Ae(Dn)?vn(!0):Bt();case 113:return je();case 107:var e=Ut();return 137!==ve()||s.hasPrecedingLineBreak()?e:(t=e,De(),He(R.createTypePredicateNode(void 0,t,Ln()),t.pos));case 111:return Ae(yn)?bn():function(){var e=me();return Fe(111),He(R.createTypeQueryNode(xt(!0)),e)}();case 18:return Ae(ln)?dn():function(){var e=me();return He(R.createTypeLiteralNode(cn()),e)}();case 22:return function(){var e=me();return He(R.createTupleTypeNode(St(21,gn,22,23)),e)}();case 20:return function(){var e=me();Fe(20);var t=Ln();return Fe(21),He(R.createParenthesizedType(t),e)}();case 99:return bn();case 127:return Ae(Pr)?function(){var e=me(),t=Be(127),n=107===ve()?Ut():Ye(),r=Pe(137)?Ln():void 0;return He(R.createTypePredicateNode(t,n,r),e)}():Bt();case 15:return At();default:return Bt()}var t,n}function Cn(e){switch(ve()){case 128:case 152:case 147:case 144:case 155:case 131:case 142:case 148:case 151:case 113:case 150:case 103:case 107:case 111:case 141:case 18:case 22:case 29:case 51:case 50:case 102:case 10:case 8:case 9:case 109:case 94:case 145:case 41:case 57:case 53:case 25:case 135:case 99:case 127:case 14:case 15:return!0;case 97:return!e;case 40:return!e&&Ae(Dn);case 20:return!e&&Ae(Sn);default:return Ie()}}function Sn(){return De(),21===ve()||Kt(!1)||Cn()}function xn(){var e=me();return Fe(135),He(R.createInferTypeNode(function(){var e=me();return He(R.createTypeParameterDeclaration(Ye(),void 0,void 0),e)}()),e)}function kn(){var e=ve();switch(e){case 138:case 151:case 142:return function(e){var t=me();return Fe(e),He(R.createTypeOperatorNode(e,kn()),t)}(e);case 135:return xn()}return function(){for(var e=me(),t=En();!s.hasPrecedingLineBreak();)switch(ve()){case 53:De(),t=He(R.createJSDocNonNullableType(t),e);break;case 57:if(Ae(ht))return t;De(),t=He(R.createJSDocNullableType(t),e);break;case 22:if(Fe(22),Cn()){var n=Ln();Fe(23),t=He(R.createIndexedAccessTypeNode(t,n),e)}else Fe(23),t=He(R.createArrayTypeNode(t),e);break;default:return t}return t}()}function Tn(t){if(On()){var n=mn();return he(n,e.isFunctionTypeNode(n)?t?e.Diagnostics.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:e.Diagnostics.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:t?e.Diagnostics.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:e.Diagnostics.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type),n}}function wn(e,t,n){var r=me(),i=51===e,a=Pe(e),o=a&&Tn(i)||t();if(ve()===e||a){for(var s=[o];Pe(e);)s.push(Tn(i)||t());o=He(n(ze(s,r)),r)}return o}function An(){return wn(50,kn,R.createIntersectionTypeNode)}function On(){return 29===ve()||!(20!==ve()||!Ae(Nn))||102===ve()}function Nn(){if(De(),21===ve()||25===ve())return!0;if(function(){if(e.isModifierKind(ve())&&gi(),Ie()||107===ve())return De(),!0;if(22===ve()||18===ve()){var t=C.length;return Xr(),t===C.length}return!1}()){if(58===ve()||27===ve()||57===ve()||62===ve())return!0;if(21===ve()&&(De(),38===ve()))return!0}return!1}function In(){var e=me(),t=Ie()&&Oe(Fn),n=Ln();return t?He(R.createTypePredicateNode(void 0,t,n),e):n}function Fn(){var e=Ye();if(137===ve()&&!s.hasPrecedingLineBreak())return De(),e}function Ln(){return ne(40960,Pn)}function Pn(e){if(On())return mn();var t=me(),n=wn(51,An,R.createUnionTypeNode);if(!e&&!s.hasPrecedingLineBreak()&&Pe(93)){var r=Pn(!0);Fe(57);var i=Pn();Fe(58);var a=Pn();return He(R.createConditionalTypeNode(n,r,i,a),t)}return n}function Rn(){return Pe(58)?Ln():void 0}function Mn(){switch(ve()){case 107:case 105:case 103:case 109:case 94:case 8:case 9:case 10:case 14:case 15:case 20:case 22:case 18:case 97:case 83:case 102:case 43:case 67:case 78:return!0;case 99:return Ae(un);default:return Ie()}}function Bn(){if(Mn())return!0;switch(ve()){case 39:case 40:case 54:case 53:case 88:case 111:case 113:case 45:case 46:case 29:case 130:case 124:case 79:return!0;default:return!(ue()&&100===ve()||!(e.getBinaryOperatorPrecedence(ve())>0))||Ie()}}function jn(){var e=ce();e&&ee(!1);for(var t,n=me(),r=Vn();t=Re(27);)r=Qn(r,t,Vn(),n);return e&&ee(!0),r}function Un(){return Pe(62)?Vn():void 0}function Vn(){if(124===ve()&&(se()||Ae(Br)))return function(){var e=me();return De(),s.hasPrecedingLineBreak()||41!==ve()&&!Bn()?He(R.createYieldExpression(void 0,void 0),e):He(R.createYieldExpression(Re(41),Vn()),e)}();var t=function(){var e=20===ve()||29===ve()||129===ve()?Ae(Hn):38===ve()?1:0;if(0!==e)return 1===e?qn(!0):Oe(Wn)}()||function(){if(129===ve()&&1===Ae(Kn)){var e=me(),t=mi();return zn(e,Yn(0),t)}}();if(t)return t;var n=me(),r=Yn(0);return 78===r.kind&&38===ve()?zn(n,r,void 0):e.isLeftHandSideExpression(r)&&e.isAssignmentOperator(Ce())?Qn(r,je(),Vn(),n):function(t,n){var r,i=Re(57);return i?He(R.createConditionalExpression(t,i,ne(u,Vn),r=Be(58),e.nodeIsPresent(r)?Vn():We(78,!1,e.Diagnostics._0_expected,e.tokenToString(58))),n):t}(r,n)}function zn(t,n,r){e.Debug.assert(38===ve(),"parseSimpleArrowFunctionExpression should only have been called if we had a =>");var i=R.createParameterDeclaration(void 0,void 0,void 0,n,void 0,void 0,void 0);He(i,n.pos);var a=ze([i],i.pos,i.end),o=Be(38),s=Gn(!!r);return Y(He(R.createArrowFunction(r,void 0,a,void 0,o,s),t))}function Hn(){if(129===ve()){if(De(),s.hasPrecedingLineBreak())return 0;if(20!==ve()&&29!==ve())return 0}var t=ve(),n=De();if(20===t){if(21===n)switch(De()){case 38:case 58:case 18:return 1;default:return 0}if(22===n||18===n)return 2;if(25===n)return 1;if(e.isModifierKind(n)&&129!==n&&Ae(ct))return 1;if(!Ie()&&107!==n)return 0;switch(De()){case 58:return 1;case 57:return De(),58===ve()||27===ve()||62===ve()||21===ve()?1:0;case 27:case 62:case 21:return 2}return 0}return e.Debug.assert(29===t),Ie()?1===E?Ae((function(){var e=De();if(93===e)switch(De()){case 62:case 31:return!1;default:return!0}else if(27===e)return!0;return!1}))?1:0:2:0}function Wn(){var t=s.getTokenPos();if(!(null==F?void 0:F.has(t))){var n=qn(!1);return n||(F||(F=new e.Set)).add(t),n}}function Kn(){if(129===ve()){if(De(),s.hasPrecedingLineBreak()||38===ve())return 0;var e=Yn(0);if(!s.hasPrecedingLineBreak()&&78===e.kind&&38===ve())return 1}return 0}function qn(t){var n,r=me(),i=_e(),a=mi(),o=e.some(a,e.isAsyncModifier)?2:0,s=Wt();if(Fe(20)){if(n=$t(o),!Fe(21)&&!t)return}else{if(!t)return;n=Ct()}var u=Jt(58,!1);if(!u||t||!jt(u)){var c=u&&e.isJSDocFunctionType(u);if(t||38===ve()||!c&&18===ve()){var l=ve(),d=Be(38),p=38===l||18===l?Gn(e.some(a,e.isAsyncModifier)):Ye();return H(He(R.createArrowFunction(a,s,n,u,d,p),r),i)}}}function Gn(e){if(18===ve())return Ar(e?2:0);if(26!==ve()&&97!==ve()&&83!==ve()&&Vr()&&(18===ve()||97===ve()||83===ve()||59===ve()||!Bn()))return Ar(16|(e?2:0));var t=M;M=!1;var n=e?ae(Vn):ne(32768,Vn);return M=t,n}function Yn(e){var t=me();return $n(e,Zn(),t)}function Jn(e){return 100===e||156===e}function $n(t,n,r){for(;;){Ce();var i=e.getBinaryOperatorPrecedence(ve());if(!(42===ve()?i>=t:i>t))break;if(100===ve()&&ue())break;if(126===ve()){if(s.hasPrecedingLineBreak())break;De(),a=n,o=Ln(),n=He(R.createAsExpression(a,o),a.pos)}else n=Qn(n,je(),Yn(i),r)}var a,o;return n}function Qn(e,t,n,r){return He(R.createBinaryExpression(e,t,n),r)}function Xn(){var e=me();return He(R.createPrefixUnaryExpression(ve(),be(er)),e)}function Zn(){if(function(){switch(ve()){case 39:case 40:case 54:case 53:case 88:case 111:case 113:case 130:return!1;case 29:if(1!==E)return!1;default:return!0}}()){var t=me(),n=tr();return 42===ve()?$n(e.getBinaryOperatorPrecedence(ve()),n,t):n}var r=ve(),i=er();if(42===ve()){t=e.skipTrivia(y,i.pos);var a=i.end;206===i.kind?fe(t,a,e.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):fe(t,a,e.Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,e.tokenToString(r))}return i}function er(){switch(ve()){case 39:case 40:case 54:case 53:return Xn();case 88:return e=me(),He(R.createDeleteExpression(be(er)),e);case 111:return function(){var e=me();return He(R.createTypeOfExpression(be(er)),e)}();case 113:return function(){var e=me();return He(R.createVoidExpression(be(er)),e)}();case 29:return function(){var e=me();Fe(29);var t=Ln();Fe(31);var n=er();return He(R.createTypeAssertion(t,n),e)}();case 130:if(130===ve()&&(le()||Ae(Br)))return function(){var e=me();return He(R.createAwaitExpression(be(er)),e)}();default:return tr()}var e}function tr(){if(45===ve()||46===ve()){var t=me();return He(R.createPrefixUnaryExpression(ve(),be(nr)),t)}if(1===E&&29===ve()&&Ae(dt))return ir(!0);var n=nr();if(e.Debug.assert(e.isLeftHandSideExpression(n)),(45===ve()||46===ve())&&!s.hasPrecedingLineBreak()){var r=ve();return De(),He(R.createPostfixUnaryExpression(n,r),n.pos)}return n}function nr(){var t,n=me();return 99===ve()?Ae(on)?(v|=1048576,t=je()):Ae(sn)?(De(),De(),t=He(R.createMetaProperty(99,Je()),n),v|=2097152):t=rr():t=105===ve()?function(){var t=me(),n=je();if(29===ve()){var r=me();void 0!==Oe(yr)&&fe(r,me(),e.Diagnostics.super_may_not_use_type_arguments)}return 20===ve()||24===ve()||22===ve()?n:(Be(24,e.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access),He(R.createPropertyAccessExpression(n,Tt(!0,!0)),t))}():rr(),_r(n,t)}function rr(){return hr(me(),br(),!0)}function ir(t,n){var r,i=me(),a=function(e){var t=me();if(Fe(29),31===ve())return Te(),He(R.createJsxOpeningFragment(),t);var n,r=sr(),i=Ci(),a=function(){var e=me();return He(R.createJsxAttributes(mt(13,cr)),e)}();return 31===ve()?(Te(),n=R.createJsxOpeningElement(r,i,a)):(Fe(43),e?Fe(31):(Fe(31,void 0,!1),Te()),n=R.createJsxSelfClosingElement(r,i,a)),He(n,t)}(t);if(275===a.kind){var o=or(a),s=function(e){var t=me();Fe(30);var n=sr();return e?Fe(31):(Fe(31,void 0,!1),Te()),He(R.createJsxClosingElement(n),t)}(t);S(a.tagName,s.tagName)||he(s,e.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0,e.getTextOfNodeFromSourceText(y,a.tagName)),r=He(R.createJsxElement(a,o,s),i)}else 278===a.kind?r=He(R.createJsxFragment(a,or(a),function(t){var n=me();return Fe(30),e.tokenIsIdentifierOrKeyword(ve())&&he(sr(),e.Diagnostics.Expected_corresponding_closing_tag_for_JSX_fragment),t?Fe(31):(Fe(31,void 0,!1),Te()),He(R.createJsxJsxClosingFragment(),n)}(t)),i):(e.Debug.assert(274===a.kind),r=a);if(t&&29===ve()){var u=void 0===n?r.pos:n,c=Oe((function(){return ir(!0,u)}));if(c){var l=We(27,!1);return e.setTextRangePosWidth(l,c.pos,0),fe(e.skipTrivia(y,u),c.end,e.Diagnostics.JSX_expressions_must_have_one_parent_element),He(R.createBinaryExpression(r,l,c),i)}}return r}function ar(t,n){switch(n){case 1:if(e.isJsxOpeningFragment(t))he(t,e.Diagnostics.JSX_fragment_has_no_corresponding_closing_tag);else{var r=t.tagName;fe(e.skipTrivia(y,r.pos),r.end,e.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag,e.getTextOfNodeFromSourceText(y,t.tagName))}return;case 30:case 7:return;case 11:case 12:return function(){var e=me(),t=R.createJsxText(s.getTokenValue(),12===T);return T=s.scanJsxToken(),He(t,e)}();case 18:return ur(!1);case 29:return ir(!1);default:return e.Debug.assertNever(n)}}function or(e){var t=[],n=me(),r=I;for(I|=16384;;){var i=ar(e,T=s.reScanJsxToken());if(!i)break;t.push(i)}return I=r,ze(t,n)}function sr(){var e=me();ke();for(var t=107===ve()?je():Je();Pe(24);)t=He(R.createPropertyAccessExpression(t,Tt(!0,!1)),e);return t}function ur(e){var t,n,r=me();if(Fe(18))return 19!==ve()&&(t=Re(25),n=jn()),e?Fe(19):Fe(19,void 0,!1)&&Te(),He(R.createJsxExpression(t,n),r)}function cr(){if(18===ve())return function(){var e=me();Fe(18),Fe(25);var t=jn();return Fe(19),He(R.createJsxSpreadAttribute(t),e)}();ke();var e=me();return He(R.createJsxAttribute(Je(),62!==ve()?void 0:10===(T=s.scanJsxAttributeValue())?Ft():ur(!0)),e)}function lr(){return De(),e.tokenIsIdentifierOrKeyword(ve())||22===ve()||gr()}function dr(t){if(32&t.flags)return!0;if(e.isNonNullExpression(t)){for(var n=t.expression;e.isNonNullExpression(n)&&!(32&n.flags);)n=n.expression;if(32&n.flags){for(;e.isNonNullExpression(t);)t.flags|=32,t=t.expression;return!0}}return!1}function pr(t,n,r){var i=Tt(!0,!0),a=r||dr(n),o=a?R.createPropertyAccessChain(n,r,i):R.createPropertyAccessExpression(n,i);return a&&e.isPrivateIdentifier(o.name)&&he(o.name,e.Diagnostics.An_optional_chain_cannot_contain_private_identifiers),He(o,t)}function fr(t,n,r){var i;if(23===ve())i=We(78,!0,e.Diagnostics.An_element_access_expression_should_take_an_argument);else{var a=ie(jn);e.isStringOrNumericLiteralLike(a)&&(a.text=Ke(a.text)),i=a}return Fe(23),He(r||dr(n)?R.createElementAccessChain(n,r,i):R.createElementAccessExpression(n,i),t)}function hr(t,n,r){for(;;){var i=void 0,a=!1;if(r&&28===ve()&&Ae(lr)?(i=Be(28),a=e.tokenIsIdentifierOrKeyword(ve())):a=Pe(24),a)n=pr(t,n,i);else if(i||53!==ve()||s.hasPrecedingLineBreak())if(!i&&ce()||!Pe(22)){if(!gr())return n;n=mr(t,n,i,void 0)}else n=fr(t,n,i);else De(),n=He(R.createNonNullExpression(n),t)}}function gr(){return 14===ve()||15===ve()}function mr(e,t,n,r){var i=R.createTaggedTemplateExpression(t,r,14===ve()?(Se(),Ft()):wt(!0));return(n||32&t.flags)&&(i.flags|=32),i.questionDotToken=n,He(i,e)}function _r(t,n){for(;;){n=hr(t,n,!0);var r=Re(28);if(29===ve()||47===ve()){var i=Oe(yr);if(i){if(gr()){n=mr(t,n,r,i);continue}var a=vr();n=He(r||dr(n)?R.createCallChain(n,r,i,a):R.createCallExpression(n,i,a),t);continue}}else if(20===ve()){a=vr(),n=He(r||dr(n)?R.createCallChain(n,r,void 0,a):R.createCallExpression(n,void 0,a),t);continue}if(r){var o=We(78,!1,e.Diagnostics.Identifier_expected);n=He(R.createPropertyAccessChain(n,r,o),t)}break}return n}function vr(){Fe(20);var e=Dt(11,Er);return Fe(21),e}function yr(){if(29===xe()){De();var e=Dt(20,Ln);if(Fe(31))return e&&function(){switch(ve()){case 20:case 14:case 15:case 24:case 21:case 23:case 58:case 26:case 57:case 34:case 36:case 35:case 37:case 55:case 56:case 60:case 52:case 50:case 51:case 19:case 1:return!0;case 27:case 18:default:return!1}}()?e:void 0}}function br(){switch(ve()){case 8:case 9:case 10:case 14:return Ft();case 107:case 105:case 103:case 109:case 94:return je();case 20:return function(){var e=me(),t=_e();Fe(20);var n=ie(jn);return Fe(21),H(He(R.createParenthesizedExpression(n),e),t)}();case 22:return Cr();case 18:return xr();case 129:if(!Ae(Mr))break;return kr();case 83:return yi(me(),_e(),void 0,void 0,221);case 97:return kr();case 102:return function(){var t=me();if(Fe(102),Pe(24)){var n=Je();return He(R.createMetaProperty(102,n),t)}for(var r,i,a=me(),o=br();;){o=hr(a,o,!1),r=Oe(yr),gr()&&(e.Debug.assert(!!r,"Expected a type argument list; all plain tagged template starts should be consumed in 'parseMemberExpressionRest'"),o=mr(a,o,void 0,r),r=void 0);break}return 20===ve()?i=vr():r&&fe(t,s.getStartPos(),e.Diagnostics.A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list),He(R.createNewExpression(o,r,i),t)}();case 43:case 67:if(13===(T=s.reScanSlashToken()))return Ft();break;case 15:return wt(!1)}return Ye(e.Diagnostics.Expression_expected)}function Dr(){return 25===ve()?function(){var e=me();Fe(25);var t=Vn();return He(R.createSpreadElement(t),e)}():27===ve()?He(R.createOmittedExpression(),me()):Vn()}function Er(){return ne(u,Dr)}function Cr(){var e=me();Fe(22);var t=s.hasPrecedingLineBreak(),n=Dt(15,Dr);return Fe(23),He(R.createArrayLiteralExpression(n,t),e)}function Sr(){var e=me(),t=_e();if(Re(25)){var n=Vn();return H(He(R.createSpreadAssignment(n),e),t)}var r=fi(),i=gi();if(et(134))return ci(e,t,r,i,167);if(et(146))return ci(e,t,r,i,168);var a,o=Re(41),s=Ie(),u=Xe(),c=Re(57),l=Re(53);if(o||20===ve()||29===ve())return oi(e,t,r,i,o,u,c,l);if(s&&58!==ve()){var d=Re(62),p=d?ie(Vn):void 0;(a=R.createShorthandPropertyAssignment(u,p)).equalsToken=d}else{Fe(58);var f=ie(Vn);a=R.createPropertyAssignment(u,f)}return a.decorators=r,a.modifiers=i,a.questionToken=c,a.exclamationToken=l,H(He(a,e),t)}function xr(){var t=me(),n=s.getTokenPos();Fe(18);var r=s.hasPrecedingLineBreak(),i=Dt(12,Sr,!0);if(!Fe(19)){var a=e.lastOrUndefined(C);a&&a.code===e.Diagnostics._0_expected.code&&e.addRelatedInfo(a,e.createDetachedDiagnostic(d,n,1,e.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here))}return He(R.createObjectLiteralExpression(i,r),t)}function kr(){var t=ce();t&&ee(!1);var n=me(),r=_e(),i=gi();Fe(97);var a=Re(41),o=a?1:0,s=e.some(i,e.isAsyncModifier)?2:0,u=o&&s?re(40960,Tr):o?function(e){return re(8192,e)}(Tr):s?ae(Tr):Tr(),c=Wt(),l=Qt(o|s),d=Jt(58,!1),p=Ar(o|s);return t&&ee(!0),H(He(R.createFunctionExpression(i,a,u,c,l,d,p),n),r)}function Tr(){return Ne()?Ge():void 0}function wr(t,n){var r=me(),i=s.getTokenPos();if(Fe(18,n)||t){var a=s.hasPrecedingLineBreak(),o=mt(1,Hr);if(!Fe(19)){var u=e.lastOrUndefined(C);u&&u.code===e.Diagnostics._0_expected.code&&e.addRelatedInfo(u,e.createDetachedDiagnostic(d,i,1,e.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here))}return He(R.createBlock(o,a),r)}return o=Ct(),He(R.createBlock(o,void 0),r)}function Ar(e,t){var n=se();Z(!!(1&e));var r=le();te(!!(2&e));var i=M;M=!1;var a=ce();a&&ee(!1);var o=wr(!!(16&e),t);return a&&ee(!0),M=i,Z(n),te(r),o}function Or(){var e=me();Fe(96);var t,n,r=Re(130);if(Fe(20),26!==ve()&&(t=112===ve()||118===ve()||84===ve()?ti(!0):re(4096,jn)),r?Fe(156):Pe(156)){var i=ie(Vn);Fe(21),n=R.createForOfStatement(r,t,i,Hr())}else if(Pe(100))i=ie(jn),Fe(21),n=R.createForInStatement(t,i,Hr());else{Fe(26);var a=26!==ve()&&21!==ve()?ie(jn):void 0;Fe(26);var o=21!==ve()?ie(jn):void 0;Fe(21),n=R.createForStatement(t,a,o,Hr())}return He(n,e)}function Nr(e){var t=me();Fe(241===e?80:85);var n=Ue()?void 0:Ye();return Ve(),He(241===e?R.createBreakStatement(n):R.createContinueStatement(n),t)}function Ir(){return 81===ve()?function(){var e=me();Fe(81);var t=ie(jn);Fe(58);var n=mt(3,Hr);return He(R.createCaseClause(t,n),e)}():function(){var e=me();Fe(87),Fe(58);var t=mt(3,Hr);return He(R.createDefaultClause(t),e)}()}function Fr(){var e=me();Fe(106),Fe(20);var t=ie(jn);Fe(21);var n=function(){var e=me();Fe(18);var t=mt(2,Ir);return Fe(19),He(R.createCaseBlock(t),e)}();return He(R.createSwitchStatement(t,n),e)}function Lr(){var e=me();Fe(110);var t,n=wr(!1),r=82===ve()?function(){var e,t=me();Fe(82),Pe(20)?(e=ei(),Fe(21)):e=void 0;var n=wr(!1);return He(R.createCatchClause(e,n),t)}():void 0;return r&&95!==ve()||(Fe(95),t=wr(!1)),He(R.createTryStatement(n,r,t),e)}function Pr(){return De(),e.tokenIsIdentifierOrKeyword(ve())&&!s.hasPrecedingLineBreak()}function Rr(){return De(),83===ve()&&!s.hasPrecedingLineBreak()}function Mr(){return De(),97===ve()&&!s.hasPrecedingLineBreak()}function Br(){return De(),(e.tokenIsIdentifierOrKeyword(ve())||8===ve()||9===ve()||10===ve())&&!s.hasPrecedingLineBreak()}function jr(){for(;;)switch(ve()){case 112:case 118:case 84:case 97:case 83:case 91:return!0;case 117:case 149:return De(),!s.hasPrecedingLineBreak()&&Ie();case 139:case 140:return Gr();case 125:case 129:case 133:case 120:case 121:case 122:case 142:if(De(),s.hasPrecedingLineBreak())return!1;continue;case 154:return De(),18===ve()||78===ve()||92===ve();case 99:return De(),10===ve()||41===ve()||18===ve()||e.tokenIsIdentifierOrKeyword(ve());case 92:var t=De();if(149===t&&(t=Ae(De)),62===t||41===t||18===t||87===t||126===t)return!0;continue;case 123:De();continue;default:return!1}}function Ur(){return Ae(jr)}function Vr(){switch(ve()){case 59:case 26:case 18:case 112:case 118:case 97:case 83:case 91:case 98:case 89:case 114:case 96:case 85:case 80:case 104:case 115:case 106:case 108:case 110:case 86:case 82:case 95:return!0;case 99:return Ur()||Ae(un);case 84:case 92:return Ur();case 129:case 133:case 117:case 139:case 140:case 149:case 154:return!0;case 122:case 120:case 121:case 123:case 142:return Ur()||!Ae(Pr);default:return Bn()}}function zr(){return De(),Ie()||18===ve()||22===ve()}function Hr(){switch(ve()){case 26:return t=me(),Fe(26),He(R.createEmptyStatement(),t);case 18:return wr(!1);case 112:return ri(me(),_e(),void 0,void 0);case 118:if(Ae(zr))return ri(me(),_e(),void 0,void 0);break;case 97:return ii(me(),_e(),void 0,void 0);case 83:return vi(me(),_e(),void 0,void 0);case 98:return function(){var e=me();Fe(98),Fe(20);var t=ie(jn);Fe(21);var n=Hr(),r=Pe(90)?Hr():void 0;return He(R.createIfStatement(t,n,r),e)}();case 89:return function(){var e=me();Fe(89);var t=Hr();Fe(114),Fe(20);var n=ie(jn);return Fe(21),Pe(26),He(R.createDoStatement(t,n),e)}();case 114:return function(){var e=me();Fe(114),Fe(20);var t=ie(jn);Fe(21);var n=Hr();return He(R.createWhileStatement(t,n),e)}();case 96:return Or();case 85:return Nr(240);case 80:return Nr(241);case 104:return function(){var e=me();Fe(104);var t=Ue()?void 0:ie(jn);return Ve(),He(R.createReturnStatement(t),e)}();case 115:return function(){var e=me();Fe(115),Fe(20);var t=ie(jn);Fe(21);var n=re(16777216,Hr);return He(R.createWithStatement(t,n),e)}();case 106:return Fr();case 108:return function(){var e=me();Fe(108);var t=s.hasPrecedingLineBreak()?void 0:ie(jn);return void 0===t&&(N++,t=He(R.createIdentifier(""),me())),Ve(),He(R.createThrowStatement(t),e)}();case 110:case 82:case 95:return Lr();case 86:return function(){var e=me();return Fe(86),Ve(),He(R.createDebuggerStatement(),e)}();case 59:return Kr();case 129:case 117:case 149:case 139:case 140:case 133:case 84:case 91:case 92:case 99:case 120:case 121:case 122:case 125:case 123:case 142:case 154:if(Ur())return Kr()}var t;return function(){var t,n=me(),r=_e(),i=20===ve(),a=ie(jn);return e.isIdentifier(a)&&Pe(58)?t=R.createLabeledStatement(a,Hr()):(Ve(),t=R.createExpressionStatement(a),i&&(r=!1)),H(He(t,n),r)}()}function Wr(e){return 133===e.kind}function Kr(){var t=e.some(Ae((function(){return fi(),gi()})),Wr);if(t){var n=re(8388608,(function(){var e=vt(I);if(e)return yt(e)}));if(n)return n}var r=me(),i=_e(),a=fi(),o=gi();if(t){for(var s=0,u=o;s=0),e.Debug.assert(t<=o),e.Debug.assert(o<=a.length),p(a,t)){var u,c,l,f=[];return s.scanRange(t+3,i-5,(function(){var e,n,r,i=1,d=t-(a.lastIndexOf("\n",t)+1)+4;function p(t){e||(e=d),f.push(t),d+=t.length}for(Ee();U(5););U(4)&&(i=0,d=0);e:for(;;){switch(ve()){case 59:0===i||1===i?(g(f),S(b(d)),i=0,e=void 0):p(s.getTokenText());break;case 4:f.push(s.getTokenText()),i=0,d=0;break;case 41:var m=s.getTokenText();1===i||2===i?(i=2,p(m)):(i=1,d+=m.length);break;case 5:var _=s.getTokenText();2===i?f.push(_):void 0!==e&&d+_.length>e&&f.push(_.slice(e-d)),d+=_.length;break;case 1:break e;default:i=2,p(s.getTokenText())}Ee()}return h(f),g(f),n=f.length?f.join(""):void 0,r=u&&ze(u,c,l),He(R.createJSDocComment(n,r),t,o)}))}function h(e){for(;e.length&&("\n"===e[0]||"\r"===e[0]);)e.shift()}function g(e){for(;e.length&&""===e[e.length-1].trim();)e.pop()}function m(){for(;;){if(Ee(),1===ve())return!0;if(5!==ve()&&4!==ve())return!1}}function _(){if(5!==ve()&&4!==ve()||!Ae(m))for(;5===ve()||4===ve();)Ee()}function v(){if((5===ve()||4===ve())&&Ae(m))return"";for(var e=s.hasPrecedingLineBreak(),t=!1,n="";e&&41===ve()||5===ve()||4===ve();)n+=s.getTokenText(),4===ve()?(e=!0,t=!0,n=""):41===ve()&&(e=!1),Ee();return t?n:""}function b(t){e.Debug.assert(59===ve());var i=s.getTokenPos();Ee();var a,o=V(void 0),c=v();switch(o.escapedText){case"author":a=function(e,t,n,r){var i=Oe((function(){return function(){var e=[],t=!1,n=!1,r=s.getToken();e:for(;;){switch(r){case 78:case 5:case 24:case 59:e.push(s.getTokenText());break;case 29:if(t||n)return;t=!0,e.push(s.getTokenText());break;case 31:if(!t||n)return;n=!0,e.push(s.getTokenText()),s.setTextPos(s.getTokenPos()+1);break e;case 4:case 1:break e}r=Ee()}if(t&&n)return 0===e.length?void 0:e.join("")}()}));if(!i){var a=me();return He(R.createJSDocAuthorTag(t,D(e,a,n,r)),e,a)}var o=i;if(Ae((function(){return 4!==De()}))){var u=E(n);u&&(o+=u)}return He(R.createJSDocAuthorTag(t,o),e)}(i,o,t,c);break;case"implements":a=function(e,t,n,r){var i=O(),a=me();return He(R.createJSDocImplementsTag(t,i,D(e,a,n,r)),e,a)}(i,o,t,c);break;case"augments":case"extends":a=function(e,t,n,r){var i=O(),a=me();return He(R.createJSDocAugmentsTag(t,i,D(e,a,n,r)),e,a)}(i,o,t,c);break;case"class":case"constructor":a=I(i,R.createJSDocClassTag,o,t,c);break;case"public":a=I(i,R.createJSDocPublicTag,o,t,c);break;case"private":a=I(i,R.createJSDocPrivateTag,o,t,c);break;case"protected":a=I(i,R.createJSDocProtectedTag,o,t,c);break;case"readonly":a=I(i,R.createJSDocReadonlyTag,o,t,c);break;case"deprecated":G=!0,a=I(i,R.createJSDocDeprecatedTag,o,t,c);break;case"this":a=function(e,t,r,i){var a=n(!0);_();var o=me();return He(R.createJSDocThisTag(t,a,D(e,o,r,i)),e,o)}(i,o,t,c);break;case"enum":a=function(e,t,r,i){var a=n(!0);_();var o=me();return He(R.createJSDocEnumTag(t,a,D(e,o,r,i)),e,o)}(i,o,t,c);break;case"arg":case"argument":case"param":return w(i,o,2,t);case"return":case"returns":a=function(t,n,r,i){e.some(u,e.isJSDocReturnTag)&&fe(n.pos,s.getTokenPos(),e.Diagnostics._0_tag_already_specified,n.escapedText);var a=x(),o=me();return He(R.createJSDocReturnTag(n,a,D(t,o,r,i)),t,o)}(i,o,t,c);break;case"template":a=function(e,t,r,i){var a=18===ve()?n():void 0,o=function(){var e=me(),t=[];do{_(),t.push(j()),v()}while(U(27));return ze(t,e)}(),s=me();return He(R.createJSDocTemplateTag(t,a,o,D(e,s,r,i)),e,s)}(i,o,t,c);break;case"type":a=A(i,o,t,c);break;case"typedef":a=function(t,n,r,i){var a,o=x();v();var s=F();_();var u,c=E(r);if(!o||T(o.type)){for(var l=void 0,p=void 0,f=void 0,h=!1;l=Oe((function(){return P(r)}));)if(h=!0,329===l.kind){if(p){de(e.Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);var g=e.lastOrUndefined(C);g&&e.addRelatedInfo(g,e.createDetachedDiagnostic(d,0,0,e.Diagnostics.The_tag_was_first_specified_here));break}p=l}else f=e.append(f,l);if(h){var m=o&&178===o.type.kind,y=R.createJSDocTypeLiteral(f,m);u=(o=p&&p.typeExpression&&!T(p.typeExpression.type)?p.typeExpression:He(y,t)).end}}return u=u||void 0!==c?me():(null!==(a=null!=s?s:o)&&void 0!==a?a:n).end,c||(c=D(t,u,r,i)),He(R.createJSDocTypedefTag(n,o,s,c),t,u)}(i,o,t,c);break;case"callback":a=function(t,n,r,i){var a=F();_();var o=E(r),s=function(t){for(var n,r,i=me();n=Oe((function(){return M(4,t)}));)r=e.append(r,n);return ze(r||[],i)}(r),u=Oe((function(){if(U(59)){var e=b(r);if(e&&327===e.kind)return e}})),c=He(R.createJSDocSignature(void 0,s,u),t),l=me();return o||(o=D(t,l,r,i)),He(R.createJSDocCallbackTag(n,c,a,o),t,l)}(i,o,t,c);break;case"see":a=function(e,t,n,i){var a=r(),o=me(),s=void 0!==n&&void 0!==i?D(e,o,n,i):void 0;return He(R.createJSDocSeeTag(t,a,s),e,o)}(i,o,t,c);break;default:a=function(e,t,n,r){var i=me();return He(R.createJSDocUnknownTag(t,D(e,i,n,r)),e,i)}(i,o,t,c)}return a}function D(e,t,n,r){return r||(n+=t-e),E(n,r.slice(n))}function E(t,n){var r,i=[],a=0;function o(e){r||(r=t),i.push(e),t+=e.length}void 0!==n&&(""!==n&&o(n),a=1);var u=ve();e:for(;;){switch(u){case 4:a=0,i.push(s.getTokenText()),t=0;break;case 59:if(3===a){i.push(s.getTokenText());break}s.setTextPos(s.getTextPos()-1);case 1:break e;case 5:if(2===a||3===a)o(s.getTokenText());else{var c=s.getTokenText();void 0!==r&&t+c.length>r&&i.push(c.slice(r-t)),t+=c.length}break;case 18:a=2,Ae((function(){return 59===Ee()&&e.tokenIsIdentifierOrKeyword(Ee())&&"link"===s.getTokenText()}))&&(o(s.getTokenText()),Ee(),o(s.getTokenText()),Ee()),o(s.getTokenText());break;case 61:a=3===a?2:3,o(s.getTokenText());break;case 41:if(0===a){a=1,t+=1;break}default:3!==a&&(a=2),o(s.getTokenText())}u=Ee()}return h(i),g(i),0===i.length?void 0:i.join("")}function S(e){e&&(u?u.push(e):(u=[e],c=e.pos),l=e.end)}function x(){return v(),18===ve()?n():void 0}function k(){var t=U(22);t&&_();var n=U(61),r=function(){var e=V();for(Pe(22)&&Fe(23);Pe(24);){var t=V();Pe(22)&&Fe(23),e=kt(e,t)}return e}();return n&&function(t){Me(t)||We(t,!1,e.Diagnostics._0_expected,e.tokenToString(t))}(61),t&&(_(),Re(62)&&jn(),Fe(23)),{name:r,isBracketed:t}}function T(t){switch(t.kind){case 145:return!0;case 178:return T(t.elementType);default:return e.isTypeReferenceNode(t)&&e.isIdentifier(t.typeName)&&"Object"===t.typeName.escapedText&&!t.typeArguments}}function w(t,n,r,i){var a=x(),o=!a;v();var u=k(),c=u.name,l=u.isBracketed;_(),o&&(a=x());var d=E(i+s.getStartPos()-t),p=4!==r&&function(t,n,r,i){if(t&&T(t.type)){for(var a=me(),o=void 0,s=void 0;o=Oe((function(){return M(r,i,n)}));)326!==o.kind&&333!==o.kind||(s=e.append(s,o));if(s){var u=He(R.createJSDocTypeLiteral(s,178===t.type.kind),a);return He(R.createJSDocTypeExpression(u),a)}}}(a,c,r,i);return p&&(a=p,o=!0),He(1===r?R.createJSDocPropertyTag(n,c,l,a,o,d):R.createJSDocParameterTag(n,c,l,a,o,d),t)}function A(t,r,i,a){e.some(u,e.isJSDocTypeTag)&&fe(r.pos,s.getTokenPos(),e.Diagnostics._0_tag_already_specified,r.escapedText);var o=n(!0),c=me(),l=void 0!==i&&void 0!==a?D(t,c,i,a):void 0;return He(R.createJSDocTypeTag(r,o,l),t,c)}function O(){var e=Pe(18),t=me(),n=function(){for(var e=me(),t=V();Pe(24);){var n=V();t=He(R.createPropertyAccessExpression(t,n),e)}return t}(),r=Ci(),i=He(R.createExpressionWithTypeArguments(n,r),t);return e&&Fe(19),i}function I(e,t,n,r,i){var a=me();return He(t(n,D(e,a,r,i)),e,a)}function F(t){var n=s.getTokenPos();if(e.tokenIsIdentifierOrKeyword(ve())){var r=V();if(Pe(24)){var i=F(!0);return He(R.createModuleDeclaration(void 0,void 0,r,i,t?4:void 0),n)}return t&&(r.isInJSDocNamespace=!0),r}}function L(t,n){for(;!e.isIdentifier(t)||!e.isIdentifier(n);){if(e.isIdentifier(t)||e.isIdentifier(n)||t.right.escapedText!==n.right.escapedText)return!1;t=t.left,n=n.left}return t.escapedText===n.escapedText}function P(e){return M(1,e)}function M(t,n,r){for(var i=!0,a=!1;;)switch(Ee()){case 59:if(i){var o=B(t,n);return!(o&&(326===o.kind||333===o.kind)&&4!==t&&r&&(e.isIdentifier(o.name)||!L(r,o.name.left)))&&o}a=!1;break;case 4:i=!0,a=!1;break;case 41:a&&(i=!1),a=!0;break;case 78:i=!1;break;case 1:return!1}}function B(t,n){e.Debug.assert(59===ve());var r=s.getStartPos();Ee();var i,a=V();switch(_(),a.escapedText){case"type":return 1===t&&A(r,a);case"prop":case"property":i=1;break;case"arg":case"argument":case"param":i=6;break;default:return!1}return!!(t&i)&&w(r,a,t,n)}function j(){var t=me(),n=V(e.Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces);return He(R.createTypeParameterDeclaration(n,void 0,void 0),t)}function U(e){return ve()===e&&(Ee(),!0)}function V(t){if(!e.tokenIsIdentifierOrKeyword(ve()))return We(78,!t,t||e.Diagnostics.Identifier_expected);N++;var n=s.getTokenPos(),r=s.getTextPos(),i=ve(),a=Ke(s.getTokenValue()),o=He(R.createIdentifier(a,void 0,i),n,r);return Ee(),o}}t.parseJSDocTypeExpressionForTests=function(t,r,i){U("file.js",t,99,void 0,1),s.setText(t,r,i),T=s.scan();var a=n(),o=$("file.js",99,1,!1,[],R.createToken(1),0),u=e.attachFileToDiagnostics(C,o);return x&&(o.jsDocDiagnostics=e.attachFileToDiagnostics(x,o)),V(),a?{jsDocTypeExpression:a,diagnostics:u}:void 0},t.parseJSDocTypeExpression=n,t.parseJSDocNameReference=r,t.parseIsolatedJSDocComment=function(t,n,r){U("",t,99,void 0,1);var i=re(4194304,(function(){return o(n,r)})),a={languageVariant:0,text:t},s=e.attachFileToDiagnostics(C,a);return V(),i?{jsDoc:i,diagnostics:s}:void 0},t.parseJSDocComment=function(t,n,r){var i=T,a=C.length,s=B,u=re(4194304,(function(){return o(n,r)}));return e.setParent(u,t),131072&L&&(x||(x=[]),x.push.apply(x,C)),T=i,C.length=a,B=s,u},function(e){e[e.BeginningOfLine=0]="BeginningOfLine",e[e.SawAsterisk=1]="SawAsterisk",e[e.SavingComments=2]="SavingComments",e[e.SavingBackticks=3]="SavingBackticks"}(i||(i={})),function(e){e[e.Property=1]="Property",e[e.Parameter=2]="Parameter",e[e.CallbackParameter=4]="CallbackParameter"}(a||(a={}))}(q=t.JSDocParser||(t.JSDocParser={}))}(u||(u={})),function(t){function n(t,n,i,o,s,u){return void(n?l(t):c(t));function c(t){var n="";if(u&&r(t)&&(n=o.substring(t.pos,t.end)),t._children&&(t._children=void 0),e.setTextRangePosEnd(t,t.pos+i,t.end+i),u&&r(t)&&e.Debug.assert(n===s.substring(t.pos,t.end)),f(t,c,l),e.hasJSDocNodes(t))for(var d=0,p=t.jsDoc;d=n,"Adjusting an element that was entirely before the change range"),e.Debug.assert(t.pos<=r,"Adjusting an element that was entirely after the change range"),e.Debug.assert(t.pos<=t.end);var o=Math.min(t.pos,i),s=t.end>=r?t.end+a:Math.min(t.end,i);e.Debug.assert(o<=s),t.parent&&(e.Debug.assertGreaterThanOrEqual(o,t.parent.pos),e.Debug.assertLessThanOrEqual(s,t.parent.end)),e.setTextRangePosEnd(t,o,s)}function a(t,n){if(n){var r=t.pos,i=function(t){e.Debug.assert(t.pos>=r),r=t.end};if(e.hasJSDocNodes(t))for(var a=0,o=t.jsDoc;a=i.pos&&(i=a),nn),!0)})),r){var a=function(t){for(;;){var n=e.getLastChild(t);if(!n)return t;t=n}}(r);a.pos>i.pos&&(i=a)}return i}function s(t,n,r,i){var a=t.text;if(r&&(e.Debug.assert(a.length-r.span.length+r.newLength===n.length),i||e.Debug.shouldAssert(3))){var o=a.substr(0,r.span.start),s=n.substr(0,r.span.start);e.Debug.assert(o===s);var u=a.substring(e.textSpanEnd(r.span),a.length),c=n.substring(e.textSpanEnd(e.textChangeRangeNewSpan(r)),n.length);e.Debug.assert(u===c)}}function c(t){var n=t.statements,r=0;e.Debug.assert(r=t.pos&&e=t.pos&&e0&&a<=r;a++){var s=o(t,i);e.Debug.assert(s.pos<=i);var u=s.pos;i=Math.max(0,u-1)}var c=e.createTextSpanFromBounds(i,e.textSpanEnd(n.span)),l=n.newLength+(n.span.start-i);return e.createTextChangeRange(c,l)}(t,l);s(t,r,m,d),e.Debug.assert(m.span.start<=l.span.start),e.Debug.assert(e.textSpanEnd(m.span)===e.textSpanEnd(l.span)),e.Debug.assert(e.textSpanEnd(e.textChangeRangeNewSpan(m))===e.textSpanEnd(e.textChangeRangeNewSpan(l)));var _=e.textChangeRangeNewSpan(m).length-m.span.length;!function(t,r,o,s,u,c,l,d){return void p(t);function p(t){if(e.Debug.assert(t.pos<=t.end),t.pos>o)n(t,!1,u,c,l,d);else{var g=t.end;if(g>=r){if(t.intersectsChange=!0,t._children=void 0,i(t,r,o,s,u),f(t,p,h),e.hasJSDocNodes(t))for(var m=0,_=t.jsDoc;m<_.length;m++)p(_[m]);a(t,d)}else e.Debug.assert(go)n(t,!0,u,c,l,d);else{var a=t.end;if(a>=r){t.intersectsChange=!0,t._children=void 0,i(t,r,o,s,u);for(var f=0,h=t;fi){_();var m={range:{pos:h.pos+a,end:h.end+a},type:g};c=e.append(c,m),u&&e.Debug.assert(o.substring(h.pos,h.end)===s.substring(m.range.pos,m.range.end))}}return _(),c;function _(){l||(l=!0,c?n&&c.push.apply(c,n):c=n)}}(t.commentDirectives,v.commentDirectives,m.span.start,e.textSpanEnd(m.span),_,h,r,d),v},t.createSyntaxCursor=c,function(e){e[e.Value=-1]="Value"}(l||(l={}))}(c||(c={})),e.isDeclarationFileName=g,e.processCommentPragmas=m,e.processPragmasIntoFields=_;var v=new e.Map;function y(e){if(v.has(e))return v.get(e);var t=new RegExp("(\\s"+e+"\\s*=\\s*)('|\")(.+?)\\2","im");return v.set(e,t),t}var b=/^\/\/\/\s*<(\S+)\s.*?\/>/im,D=/^\/\/\/?\s*@(\S+)\s*(.*)\s*$/im;function E(t,n,r){var i=2===n.kind&&b.exec(r);if(i){var a=i[1].toLowerCase(),o=e.commentPragmas[a];if(!(o&&1&o.kind))return;if(o.args){for(var s={},u=0,c=o.args;u=n.length)break;var o=a;if(34===n.charCodeAt(o)){for(a++;a32;)a++;i.push(n.substring(o,a))}}u(i)}else s.push(n)}}function _(t,n,r,i,a,o){if(i.isTSConfigOnly)"null"===(s=t[n])?(a[i.name]=void 0,n++):"boolean"===i.type?"false"===s?(a[i.name]=!1,n++):("true"===s&&n++,o.push(e.createCompilerDiagnostic(e.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line,i.name))):(o.push(e.createCompilerDiagnostic(e.Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line,i.name)),s&&!e.startsWith(s,"-")&&n++);else if(t[n]||"boolean"===i.type||o.push(e.createCompilerDiagnostic(r.optionTypeMismatchDiagnostic,i.name,B(i))),"null"!==t[n])switch(i.type){case"number":a[i.name]=parseInt(t[n]),n++;break;case"boolean":var s=t[n];a[i.name]="false"!==s,"false"!==s&&"true"!==s||n++;break;case"string":a[i.name]=t[n]||"",n++;break;case"list":var u=f(i,t[n],o);a[i.name]=u||[],u&&n++;break;default:a[i.name]=p(i,t[n],o),n++}else a[i.name]=void 0,n++;return n}function v(e,t){return y(u,e,t)}function y(e,t,n){void 0===n&&(n=!1),t=t.toLowerCase();var r=e(),i=r.optionsNameMap,a=r.shortOptionNames;if(n){var o=a.get(t);void 0!==o&&(t=o)}return i.get(t)}e.libs=o.map((function(e){return e[0]})),e.libMap=new e.Map(o),e.optionsForWatch=[{name:"watchFile",type:new e.Map(e.getEntries({fixedpollinginterval:e.WatchFileKind.FixedPollingInterval,prioritypollinginterval:e.WatchFileKind.PriorityPollingInterval,dynamicprioritypolling:e.WatchFileKind.DynamicPriorityPolling,usefsevents:e.WatchFileKind.UseFsEvents,usefseventsonparentdirectory:e.WatchFileKind.UseFsEventsOnParentDirectory})),category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_UseFsEvents_UseFsEventsOnParentDirectory},{name:"watchDirectory",type:new e.Map(e.getEntries({usefsevents:e.WatchDirectoryKind.UseFsEvents,fixedpollinginterval:e.WatchDirectoryKind.FixedPollingInterval,dynamicprioritypolling:e.WatchDirectoryKind.DynamicPriorityPolling})),category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling},{name:"fallbackPolling",type:new e.Map(e.getEntries({fixedinterval:e.PollingWatchKind.FixedInterval,priorityinterval:e.PollingWatchKind.PriorityInterval,dynamicpriority:e.PollingWatchKind.DynamicPriority})),category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority},{name:"synchronousWatchDirectory",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively}],e.commonOptionsWithBuild=[{name:"help",shortName:"h",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Print_this_message},{name:"help",shortName:"?",type:"boolean"},{name:"watch",shortName:"w",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Watch_input_files},{name:"preserveWatchOutput",type:"boolean",showInSimplifiedHelpView:!1,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen},{name:"listFiles",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Print_names_of_files_part_of_the_compilation},{name:"listEmittedFiles",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Print_names_of_generated_files_part_of_the_compilation},{name:"pretty",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental},{name:"traceResolution",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Enable_tracing_of_the_name_resolution_process},{name:"diagnostics",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Show_diagnostic_information},{name:"extendedDiagnostics",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Show_verbose_diagnostic_information},{name:"generateCpuProfile",type:"string",isFilePath:!0,paramType:e.Diagnostics.FILE_OR_DIRECTORY,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Generates_a_CPU_profile},{name:"generateTrace",type:"string",isFilePath:!0,isCommandLineOnly:!0,paramType:e.Diagnostics.DIRECTORY,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Generates_an_event_trace_and_a_list_of_types},{name:"incremental",shortName:"i",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Enable_incremental_compilation,transpileOptionValue:void 0},{name:"assumeChangesOnlyAffectDirectDependencies",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it},{name:"locale",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us}],e.optionDeclarations=t(e.commonOptionsWithBuild,[{name:"all",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Show_all_compiler_options},{name:"version",shortName:"v",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Print_the_compiler_s_version},{name:"init",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file},{name:"project",shortName:"p",type:"string",isFilePath:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,paramType:e.Diagnostics.FILE_OR_DIRECTORY,description:e.Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json},{name:"build",type:"boolean",shortName:"b",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date},{name:"showConfig",type:"boolean",category:e.Diagnostics.Command_line_Options,isCommandLineOnly:!0,description:e.Diagnostics.Print_the_final_configuration_instead_of_building},{name:"listFilesOnly",type:"boolean",category:e.Diagnostics.Command_line_Options,affectsSemanticDiagnostics:!0,affectsEmit:!0,isCommandLineOnly:!0,description:e.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing},{name:"target",shortName:"t",type:new e.Map(e.getEntries({es3:0,es5:1,es6:2,es2015:2,es2016:3,es2017:4,es2018:5,es2019:6,es2020:7,esnext:99})),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,paramType:e.Diagnostics.VERSION,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_ESNEXT},{name:"module",shortName:"m",type:new e.Map(e.getEntries({none:e.ModuleKind.None,commonjs:e.ModuleKind.CommonJS,amd:e.ModuleKind.AMD,system:e.ModuleKind.System,umd:e.ModuleKind.UMD,es6:e.ModuleKind.ES2015,es2015:e.ModuleKind.ES2015,es2020:e.ModuleKind.ES2020,esnext:e.ModuleKind.ESNext})),affectsModuleResolution:!0,affectsEmit:!0,paramType:e.Diagnostics.KIND,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext},{name:"lib",type:"list",element:{name:"lib",type:e.libMap},affectsModuleResolution:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_library_files_to_be_included_in_the_compilation,transpileOptionValue:void 0},{name:"allowJs",type:"boolean",affectsModuleResolution:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Allow_javascript_files_to_be_compiled},{name:"checkJs",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Report_errors_in_js_files},{name:"jsx",type:n,affectsSourceFile:!0,affectsEmit:!0,affectsModuleResolution:!0,paramType:e.Diagnostics.KIND,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_or_react},{name:"declaration",shortName:"d",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_corresponding_d_ts_file,transpileOptionValue:void 0},{name:"declarationMap",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_a_sourcemap_for_each_corresponding_d_ts_file,transpileOptionValue:void 0},{name:"emitDeclarationOnly",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Only_emit_d_ts_declaration_files,transpileOptionValue:void 0},{name:"sourceMap",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_corresponding_map_file},{name:"outFile",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.FILE,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Concatenate_and_emit_output_to_single_file,transpileOptionValue:void 0},{name:"outDir",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.DIRECTORY,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Redirect_output_structure_to_the_directory},{name:"rootDir",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir},{name:"composite",type:"boolean",affectsEmit:!0,isTSConfigOnly:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Enable_project_compilation,transpileOptionValue:void 0},{name:"tsBuildInfoFile",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.FILE,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_file_to_store_incremental_compilation_information,transpileOptionValue:void 0},{name:"removeComments",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Do_not_emit_comments_to_output},{name:"noEmit",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Do_not_emit_outputs,transpileOptionValue:void 0},{name:"importHelpers",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Import_emit_helpers_from_tslib},{name:"importsNotUsedAsValues",type:new e.Map(e.getEntries({remove:0,preserve:1,error:2})),affectsEmit:!0,affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types},{name:"downlevelIteration",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3},{name:"isolatedModules",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule,transpileOptionValue:!0},{name:"strict",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_all_strict_type_checking_options},{name:"noImplicitAny",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type},{name:"strictNullChecks",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_null_checks},{name:"strictFunctionTypes",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_checking_of_function_types},{name:"strictBindCallApply",type:"boolean",strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_bind_call_and_apply_methods_on_functions},{name:"strictPropertyInitialization",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_checking_of_property_initialization_in_classes},{name:"noImplicitThis",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type},{name:"alwaysStrict",type:"boolean",affectsSourceFile:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file},{name:"noUnusedLocals",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_on_unused_locals},{name:"noUnusedParameters",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_on_unused_parameters},{name:"noImplicitReturns",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value},{name:"noFallthroughCasesInSwitch",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement},{name:"noUncheckedIndexedAccess",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!1,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Include_undefined_in_index_signature_results},{name:"moduleResolution",type:new e.Map(e.getEntries({node:e.ModuleResolutionKind.NodeJs,classic:e.ModuleResolutionKind.Classic})),affectsModuleResolution:!0,paramType:e.Diagnostics.STRATEGY,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6},{name:"baseUrl",type:"string",affectsModuleResolution:!0,isFilePath:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Base_directory_to_resolve_non_absolute_module_names},{name:"paths",type:"object",affectsModuleResolution:!0,isTSConfigOnly:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl,transpileOptionValue:void 0},{name:"rootDirs",type:"list",isTSConfigOnly:!0,element:{name:"rootDirs",type:"string",isFilePath:!0},affectsModuleResolution:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime,transpileOptionValue:void 0},{name:"typeRoots",type:"list",element:{name:"typeRoots",type:"string",isFilePath:!0},affectsModuleResolution:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.List_of_folders_to_include_type_definitions_from},{name:"types",type:"list",element:{name:"types",type:"string"},affectsModuleResolution:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Type_declaration_files_to_be_included_in_compilation,transpileOptionValue:void 0},{name:"allowSyntheticDefaultImports",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking},{name:"esModuleInterop",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports},{name:"preserveSymlinks",type:"boolean",category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Do_not_resolve_the_real_path_of_symlinks},{name:"allowUmdGlobalAccess",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Allow_accessing_UMD_globals_from_modules},{name:"sourceRoot",type:"string",affectsEmit:!0,paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations},{name:"mapRoot",type:"string",affectsEmit:!0,paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations},{name:"inlineSourceMap",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file},{name:"inlineSources",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set},{name:"experimentalDecorators",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Experimental_Options,description:e.Diagnostics.Enables_experimental_support_for_ES7_decorators},{name:"emitDecoratorMetadata",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,category:e.Diagnostics.Experimental_Options,description:e.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators},{name:"jsxFactory",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h},{name:"jsxFragmentFactory",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment},{name:"jsxImportSource",type:"string",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react},{name:"resolveJsonModule",type:"boolean",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Include_modules_imported_with_json_extension},{name:"out",type:"string",affectsEmit:!0,isFilePath:!1,category:e.Diagnostics.Advanced_Options,paramType:e.Diagnostics.FILE,description:e.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file,transpileOptionValue:void 0},{name:"reactNamespace",type:"string",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit},{name:"skipDefaultLibCheck",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files},{name:"charset",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_character_set_of_the_input_files},{name:"emitBOM",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files},{name:"newLine",type:new e.Map(e.getEntries({crlf:0,lf:1})),affectsEmit:!0,paramType:e.Diagnostics.NEWLINE,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix},{name:"noErrorTruncation",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_truncate_error_messages},{name:"noLib",type:"boolean",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts,transpileOptionValue:!0},{name:"noResolve",type:"boolean",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files,transpileOptionValue:!0},{name:"stripInternal",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation},{name:"disableSizeLimit",type:"boolean",affectsSourceFile:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_size_limitations_on_JavaScript_projects},{name:"disableSourceOfProjectReferenceRedirect",type:"boolean",isTSConfigOnly:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects},{name:"disableSolutionSearching",type:"boolean",isTSConfigOnly:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_solution_searching_for_this_project},{name:"disableReferencedProjectLoad",type:"boolean",isTSConfigOnly:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_loading_referenced_projects},{name:"noImplicitUseStrict",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_use_strict_directives_in_module_output},{name:"noEmitHelpers",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output},{name:"noEmitOnError",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,transpileOptionValue:void 0},{name:"preserveConstEnums",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code},{name:"declarationDir",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.DIRECTORY,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Output_directory_for_generated_declaration_files,transpileOptionValue:void 0},{name:"skipLibCheck",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Skip_type_checking_of_declaration_files},{name:"allowUnusedLabels",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_report_errors_on_unused_labels},{name:"allowUnreachableCode",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_report_errors_on_unreachable_code},{name:"suppressExcessPropertyErrors",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Suppress_excess_property_checks_for_object_literals},{name:"suppressImplicitAnyIndexErrors",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures},{name:"forceConsistentCasingInFileNames",type:"boolean",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file},{name:"maxNodeModuleJsDepth",type:"number",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files},{name:"noStrictGenericChecks",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types},{name:"useDefineForClassFields",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Emit_class_fields_with_Define_instead_of_Set},{name:"keyofStringsOnly",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols},{name:"plugins",type:"list",isTSConfigOnly:!0,element:{name:"plugin",type:"object"},description:e.Diagnostics.List_of_language_service_plugins}]),e.semanticDiagnosticsOptionDeclarations=e.optionDeclarations.filter((function(e){return!!e.affectsSemanticDiagnostics})),e.affectsEmitOptionDeclarations=e.optionDeclarations.filter((function(e){return!!e.affectsEmit})),e.moduleResolutionOptionDeclarations=e.optionDeclarations.filter((function(e){return!!e.affectsModuleResolution})),e.sourceFileAffectingCompilerOptions=e.optionDeclarations.filter((function(e){return!!e.affectsSourceFile||!!e.affectsModuleResolution||!!e.affectsBindDiagnostics})),e.transpileOptionValueCompilerOptions=e.optionDeclarations.filter((function(t){return e.hasProperty(t,"transpileOptionValue")})),e.buildOpts=t(e.commonOptionsWithBuild,[{name:"verbose",shortName:"v",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Enable_verbose_logging,type:"boolean"},{name:"dry",shortName:"d",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,type:"boolean"},{name:"force",shortName:"f",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,type:"boolean"},{name:"clean",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Delete_the_outputs_of_all_projects,type:"boolean"}]),e.typeAcquisitionDeclarations=[{name:"enableAutoDiscovery",type:"boolean"},{name:"enable",type:"boolean"},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},{name:"disableFilenameBasedTypeAcquisition",type:"boolean"}],e.createOptionNameMap=s,e.getOptionsNameMap=u,e.defaultInitCompilerOptions={module:e.ModuleKind.CommonJS,target:1,strict:!0,esModuleInterop:!0,forceConsistentCasingInFileNames:!0,skipLibCheck:!0},e.convertEnableAutoDiscoveryToEnable=c,e.createCompilerDiagnosticForInvalidCustomType=l,e.parseCustomTypeOption=p,e.parseListTypeOption=f,e.parseCommandLineWorker=m,e.compilerOptionsDidYouMeanDiagnostics={getOptionsNameMap:u,optionDeclarations:e.optionDeclarations,unknownOptionDiagnostic:e.Diagnostics.Unknown_compiler_option_0,unknownDidYouMeanDiagnostic:e.Diagnostics.Unknown_compiler_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:e.Diagnostics.Compiler_option_0_expects_an_argument},e.parseCommandLine=function(t,n){return m(e.compilerOptionsDidYouMeanDiagnostics,t,n)},e.getOptionFromName=v;var b={getOptionsNameMap:function(){return a||(a=s(e.buildOpts))},optionDeclarations:e.buildOpts,unknownOptionDiagnostic:e.Diagnostics.Unknown_build_option_0,unknownDidYouMeanDiagnostic:e.Diagnostics.Unknown_build_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:e.Diagnostics.Build_option_0_requires_a_value_of_type_1};function D(t,n){var r=e.parseJsonText(t,n);return{config:R(r,r.parseDiagnostics),error:r.parseDiagnostics.length?r.parseDiagnostics[0]:void 0}}function E(t,n){var r=C(t,n);return e.isString(r)?e.parseJsonText(t,r):{fileName:t,parseDiagnostics:[r]}}function C(t,n){var r;try{r=n(t)}catch(n){return e.createCompilerDiagnostic(e.Diagnostics.Cannot_read_file_0_Colon_1,t,n.message)}return void 0===r?e.createCompilerDiagnostic(e.Diagnostics.Cannot_read_file_0,t):r}function S(t){return e.arrayToMap(t,h)}e.parseBuildCommand=function(t){var n=m(b,t),r=n.options,i=n.watchOptions,a=n.fileNames,o=n.errors,s=r;return 0===a.length&&a.push("."),s.clean&&s.force&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"clean","force")),s.clean&&s.verbose&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"clean","verbose")),s.clean&&s.watch&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"clean","watch")),s.watch&&s.dry&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"watch","dry")),{buildOptions:s,watchOptions:i,projects:a,errors:o}},e.getDiagnosticText=function(t){for(var n=[],r=1;r=0)return u.push(e.createCompilerDiagnostic(e.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0,t(s,[d]).join(" -> "))),{raw:n||R(r,u)};var p=n?function(t,n,r,i,a){e.hasProperty(t,"excludes")&&a.push(e.createCompilerDiagnostic(e.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));var o,s=ae(t.compilerOptions,r,a,i),u=se(t.typeAcquisition||t.typingOptions,r,a,i),c=function(e,t,n){return ue(L(),e,t,void 0,I,n)}(t.watchOptions,r,a);if(t.compileOnSave=function(t,n,r){if(!e.hasProperty(t,e.compileOnSaveCommandLineOption.name))return!1;var i=ce(e.compileOnSaveCommandLineOption,t.compileOnSave,n,r);return"boolean"==typeof i&&i}(t,r,a),t.extends)if(e.isString(t.extends)){var l=i?$(i,r):r;o=re(t.extends,n,l,a,e.createCompilerDiagnostic)}else a.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"extends","string"));return{raw:t,options:s,watchOptions:c,typeAcquisition:u,extendedConfigPath:o}}(n,i,a,o,u):function(t,n,r,i,a){var o,s,u,c,l=ie(i),d={onSetValidOptionKeyValueInParent:function(t,n,a){var c;switch(t){case"compilerOptions":c=l;break;case"watchOptions":c=u||(u={});break;case"typeAcquisition":c=o||(o=oe(i));break;case"typingOptions":c=s||(s=oe(i));break;default:e.Debug.fail("Unknown option")}c[n.name]=le(n,r,a)},onSetValidOptionKeyValueInRoot:function(o,s,u,l){switch(o){case"extends":var d=i?$(i,r):r;return void(c=re(u,n,d,a,(function(n,r){return e.createDiagnosticForNodeInSourceFile(t,l,n,r)})))}},onSetUnknownOptionKeyValueInRoot:function(n,r,i,o){"excludes"===n&&a.push(e.createDiagnosticForNodeInSourceFile(t,r,e.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude))}},p=M(t,a,!0,(void 0===N&&(N={name:void 0,type:"object",elementOptions:S([{name:"compilerOptions",type:"object",elementOptions:F(),extraKeyDiagnostics:e.compilerOptionsDidYouMeanDiagnostics},{name:"watchOptions",type:"object",elementOptions:L(),extraKeyDiagnostics:I},{name:"typingOptions",type:"object",elementOptions:P(),extraKeyDiagnostics:k},{name:"typeAcquisition",type:"object",elementOptions:P(),extraKeyDiagnostics:k},{name:"extends",type:"string"},{name:"references",type:"list",element:{name:"references",type:"object"}},{name:"files",type:"list",element:{name:"files",type:"string"}},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},e.compileOnSaveCommandLineOption])}),N),d);return o||(o=s?void 0!==s.enableAutoDiscovery?{enable:s.enableAutoDiscovery,include:s.include,exclude:s.exclude}:s:oe(i)),{raw:p,options:l,watchOptions:u,typeAcquisition:o,extendedConfigPath:c}}(r,i,a,o,u);if((null===(l=p.options)||void 0===l?void 0:l.paths)&&(p.options.pathsBasePath=a),p.extendedConfigPath){s=s.concat([d]);var f=function(t,n,r,i,a,o,s){var u,c,l,d,p=r.useCaseSensitiveFileNames?n:e.toFileNameLowerCase(n);if(s&&(c=s.get(p)))l=c.extendedResult,d=c.extendedConfig;else{if(!(l=E(n,(function(e){return r.readFile(e)}))).parseDiagnostics.length){var f=e.getDirectoryPath(n);if(te(d=ne(void 0,l,r,f,e.getBaseFileName(n),a,o,s))){var h=e.convertToRelativePath(f,i,e.identity),g=function(t){return e.isRootedDiskPath(t)?t:e.combinePaths(h,t)},m=function(t){_[t]&&(_[t]=e.map(_[t],g))},_=d.raw;m("include"),m("exclude"),m("files")}}s&&s.set(p,{extendedResult:l,extendedConfig:d})}if(t&&(t.extendedSourceFiles=[l.fileName],l.extendedSourceFiles&&(u=t.extendedSourceFiles).push.apply(u,l.extendedSourceFiles)),!l.parseDiagnostics.length)return d;o.push.apply(o,l.parseDiagnostics)}(r,p.extendedConfigPath,i,a,s,u,c);if(f&&te(f)){var h=f.raw,g=p.raw,m=function(e){var t=g[e]||h[e];t&&(g[e]=t)};m("include"),m("exclude"),m("files"),void 0===g.compileOnSave&&(g.compileOnSave=h.compileOnSave),p.options=e.assign({},f.options,p.options),p.watchOptions=p.watchOptions&&f.watchOptions?e.assign({},f.watchOptions,p.watchOptions):p.watchOptions||f.watchOptions}}return p}function re(t,n,r,i,a){if(t=e.normalizeSlashes(t),e.isRootedDiskPath(t)||e.startsWith(t,"./")||e.startsWith(t,"../")){var o=e.getNormalizedAbsolutePath(t,r);return n.fileExists(o)||e.endsWith(o,".json")||(o+=".json",n.fileExists(o))?o:void i.push(a(e.Diagnostics.File_0_not_found,t))}var s=e.nodeModuleNameResolver(t,e.combinePaths(r,"tsconfig.json"),{moduleResolution:e.ModuleResolutionKind.NodeJs},n,void 0,void 0,!0);if(s.resolvedModule)return s.resolvedModule.resolvedFileName;i.push(a(e.Diagnostics.File_0_not_found,t))}function ie(t){return t&&"jsconfig.json"===e.getBaseFileName(t)?{allowJs:!0,maxNodeModuleJsDepth:2,allowSyntheticDefaultImports:!0,skipLibCheck:!0,noEmit:!0}:{}}function ae(t,n,r,i){var a=ie(i);return ue(F(),t,n,a,e.compilerOptionsDidYouMeanDiagnostics,r),i&&(a.configFilePath=e.normalizeSlashes(i)),a}function oe(t){return{enable:!!t&&"jsconfig.json"===e.getBaseFileName(t),include:[],exclude:[]}}function se(e,t,n,r){var i=oe(r),a=c(e);return ue(P(),a,t,i,k,n),i}function ue(t,n,r,i,a,o){if(n){for(var s in n){var u=t.get(s);u?(i||(i={}))[u.name]=ce(u,n[s],r,o):o.push(g(s,a,e.createCompilerDiagnostic))}return i}}function ce(t,n,r,i){if(j(t,n)){var a=t.type;return"list"===a&&e.isArray(n)?function(t,n,r,i){return e.filter(e.map(n,(function(e){return ce(t.element,e,r,i)})),(function(e){return!!e}))}(t,n,r,i):e.isString(a)?de(t,r,n):pe(t,n,i)}i.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,t.name,B(t)))}function le(t,n,r){if(!J(r)){if("list"===t.type){var i=t;return i.element.isFilePath||!e.isString(i.element.type)?e.filter(e.map(r,(function(e){return le(i.element,n,e)})),(function(e){return!!e})):r}return e.isString(t.type)?de(t,n,r):t.type.get(e.isString(r)?r.toLowerCase():r)}}function de(t,n,r){return t.isFilePath&&""===(r=e.getNormalizedAbsolutePath(r,n))&&(r="."),r}function pe(e,t,n){if(!J(t)){var r=t.toLowerCase(),i=e.type.get(r);if(void 0!==i)return i;n.push(l(e))}}function fe(e){return"function"==typeof e.trim?e.trim():e.replace(/^[\s]+|[\s]+$/g,"")}e.convertToObject=R,e.convertToObjectWorker=M,e.convertToTSConfig=function(t,n,i){var a=e.createGetCanonicalFileName(i.useCaseSensitiveFileNames),o=e.map(e.filter(t.fileNames,t.configFileSpecs&&t.configFileSpecs.validatedIncludeSpecs?function(t,n,r,i){if(!n)return function(e){return!0};var a=e.getFileMatcherPatterns(t,r,n,i.useCaseSensitiveFileNames,i.getCurrentDirectory()),o=a.excludePattern&&e.getRegexFromPattern(a.excludePattern,i.useCaseSensitiveFileNames),s=a.includeFilePattern&&e.getRegexFromPattern(a.includeFilePattern,i.useCaseSensitiveFileNames);return s?o?function(e){return!(s.test(e)&&!o.test(e))}:function(e){return!s.test(e)}:o?function(e){return o.test(e)}:function(e){return!0}}(n,t.configFileSpecs.validatedIncludeSpecs,t.configFileSpecs.validatedExcludeSpecs,i):function(e){return!0}),(function(t){return e.getRelativePathFromFile(e.getNormalizedAbsolutePath(n,i.getCurrentDirectory()),e.getNormalizedAbsolutePath(t,i.getCurrentDirectory()),a)})),s=W(t.options,{configFilePath:e.getNormalizedAbsolutePath(n,i.getCurrentDirectory()),useCaseSensitiveFileNames:i.useCaseSensitiveFileNames}),u=t.watchOptions&&function(e){return K(e,T())}(t.watchOptions);return r(r({compilerOptions:r(r({},U(s)),{showConfig:void 0,configFile:void 0,configFilePath:void 0,help:void 0,init:void 0,listFiles:void 0,listEmittedFiles:void 0,project:void 0,build:void 0,version:void 0}),watchOptions:u&&U(u),references:e.map(t.projectReferences,(function(e){return r(r({},e),{path:e.originalPath?e.originalPath:"",originalPath:void 0})})),files:e.length(o)?o:void 0},t.configFileSpecs?{include:V(t.configFileSpecs.validatedIncludeSpecs),exclude:t.configFileSpecs.validatedExcludeSpecs}:{}),{compileOnSave:!!t.compileOnSave||void 0})},e.generateTSConfig=function(t,n,r){var i=W(e.extend(t,e.defaultInitCompilerOptions));return function(){for(var t=e.createMultiMap(),u=0,c=e.optionDeclarations;u0)for(var D=function(t){if(e.fileExtensionIs(t,".json")){if(!o){var r=p.filter((function(t){return e.endsWith(t,".json")})),a=e.map(e.getRegularExpressionsForWildcards(r,n,"files"),(function(e){return"^"+e+"$"}));o=a?a.map((function(t){return e.getRegexFromPattern(t,i.useCaseSensitiveFileNames)})):e.emptyArray}if(-1!==e.findIndex(o,(function(e){return e.test(t)}))){var d=s(t);u.has(d)||l.has(d)||l.set(d,t)}return"continue"}if(function(t,n,r,i,a){for(var o=e.getExtensionPriority(t,i),s=e.adjustExtensionPriority(o,i),u=0;us&&(s=l),1===s)return s}return s}break;case 257:var d=0;return e.forEachChild(t,(function(t){var r=a(t,n);switch(r){case 0:return;case 2:return void(d=2);case 1:return d=1,!0;default:e.Debug.assertNever(r)}})),d;case 256:return i(t,n);case 78:if(t.isInJSDocNamespace)return 0}return 1}(t,n);return n.set(r,s),s}function o(t,n){for(var r=t.propertyName||t.name,i=t.parent;i;){if(e.isBlock(i)||e.isModuleBlock(i)||e.isSourceFile(i)){for(var o=void 0,s=0,u=i.statements;so)&&(o=l),1===o)return o}}if(void 0!==o)return o}i=i.parent}return 1}function s(t){return e.Debug.attachFlowNodeDebugInfo(t),t}!function(e){e[e.NonInstantiated=0]="NonInstantiated",e[e.Instantiated=1]="Instantiated",e[e.ConstEnumOnly=2]="ConstEnumOnly"}(e.ModuleInstanceState||(e.ModuleInstanceState={})),e.getModuleInstanceState=i,function(e){e[e.None=0]="None",e[e.IsContainer=1]="IsContainer",e[e.IsBlockScopedContainer=2]="IsBlockScopedContainer",e[e.IsControlFlowContainer=4]="IsControlFlowContainer",e[e.IsFunctionLike=8]="IsFunctionLike",e[e.IsFunctionExpression=16]="IsFunctionExpression",e[e.HasLocals=32]="HasLocals",e[e.IsInterface=64]="IsInterface",e[e.IsObjectLiteralOrClassExpressionMethod=128]="IsObjectLiteralOrClassExpressionMethod"}(n||(n={}));var u=function(){var n,a,o,u,p,f,h,g,m,_,v,y,b,D,E,C,S,x,k,T,w,A,O,N,I=!1,F=0,L={flags:1},P={flags:1};function R(t,r,i,a,o){return e.createDiagnosticForNodeInSourceFile(e.getSourceFileOfNode(t)||n,t,r,i,a,o)}return function(t,r){n=t,a=r,o=e.getEmitScriptTarget(a),A=function(t,n){return!(!e.getStrictOptionValue(n,"alwaysStrict")||t.isDeclarationFile)||!!t.externalModuleIndicator}(n,r),N=new e.Set,F=0,O=e.objectAllocator.getSymbolConstructor(),e.Debug.attachFlowNodeDebugInfo(L),e.Debug.attachFlowNodeDebugInfo(P),n.locals||(Me(n),n.symbolCount=F,n.classifiableNames=N,function(){if(m){for(var t=p,r=g,i=h,a=u,o=v,c=0,d=m;c=232&&t.kind<=248&&!a.allowUnreachableCode&&(t.flowNode=v),t.kind){case 236:!function(e){var t=he(e,Z()),n=X(),r=X();ne(t,v),v=t,pe(e.expression,n,r),v=se(n),fe(e.statement,r,t),ne(t,v),v=se(r)}(t);break;case 235:!function(e){var t=Z(),n=he(e,X()),r=X();ne(t,v),v=t,fe(e.statement,r,n),ne(n,v),v=se(n),pe(e.expression,t,r),v=se(r)}(t);break;case 237:!function(e){var t=he(e,Z()),n=X(),r=X();Me(e.initializer),ne(t,v),v=t,pe(e.condition,n,r),v=se(n),fe(e.statement,r,t),Me(e.incrementor),ne(t,v),v=se(r)}(t);break;case 238:case 239:!function(e){var t=he(e,Z()),n=X();Me(e.expression),ne(t,v),v=t,239===e.kind&&Me(e.awaitModifier),ne(n,v),Me(e.initializer),250!==e.initializer.kind&&ve(e.initializer),fe(e.statement,n,t),ne(t,v),v=se(n)}(t);break;case 234:!function(e){var t=X(),n=X(),r=X();pe(e.expression,t,n),v=se(t),Me(e.thenStatement),ne(r,v),v=se(n),Me(e.elseStatement),ne(r,v),v=se(r)}(t);break;case 242:case 246:!function(e){Me(e.expression),242===e.kind&&(T=!0,D&&ne(D,v)),v=L}(t);break;case 241:case 240:!function(e){if(Me(e.label),e.label){var t=function(e){for(var t=k;t;t=t.next)if(t.name===e)return t}(e.label.escapedText);t&&(t.referenced=!0,ge(e,t.breakTarget,t.continueTarget))}else ge(e,y,b)}(t);break;case 247:!function(t){var n=D,r=S,i=X(),a=X(),o=X();if(t.finallyBlock&&(D=a),ne(o,v),S=o,Me(t.tryBlock),ne(i,v),t.catchClause&&(v=se(o),ne(o=X(),v),S=o,Me(t.catchClause),ne(i,v)),D=n,S=r,t.finallyBlock){var s=X();s.antecedents=e.concatenate(e.concatenate(i.antecedents,o.antecedents),a.antecedents),v=s,Me(t.finallyBlock),1&v.flags?v=L:(D&&a.antecedents&&ne(D,ee(s,a.antecedents,v)),S&&o.antecedents&&ne(S,ee(s,o.antecedents,v)),v=i.antecedents?ee(s,i.antecedents,v):L)}else v=se(i)}(t);break;case 244:!function(t){var n=X();Me(t.expression);var r=y,i=x;y=n,x=v,Me(t.caseBlock),ne(n,v);var a=e.forEach(t.caseBlock.clauses,(function(e){return 285===e.kind}));t.possiblyExhaustive=!a&&!n.antecedents,a||ne(n,ie(x,t,0,0)),y=r,x=i,v=se(n)}(t);break;case 258:!function(e){for(var t=e.clauses,n=G(e.parent.expression),r=L,i=0;i=0;)switch(t=n.expr[r],n.state[r]){case 0:e.setParent(t,u);var i=A;Ve(t);var a=u;u=t,c(1,i,a);break;case 1:if(55===(s=t.operatorToken.kind)||56===s||60===s||e.isLogicalOrCoalescingAssignmentOperator(s)){if(le(t)){var o=X();ye(t,o,o),v=se(o)}else ye(t,E,C);l()}else c(2),d(t.left);break;case 2:27===t.operatorToken.kind&&me(t.left),c(3),d(t.operatorToken);break;case 3:c(4),d(t.right);break;case 4:var s=t.operatorToken.kind;e.isAssignmentOperator(s)&&!e.isAssignmentTarget(t)&&(ve(t.left),62===s&&202===t.left.kind&&Q(t.left.expression)&&(v=ae(256,v,t))),l();break;default:return e.Debug.fail("Invalid state "+n.state[r]+" for bindBinaryExpressionFlow")}function c(e,t,i){n.state[r]=e,void 0!==t&&(n.inStrictMode[r]=t),void 0!==i&&(n.parent[r]=i)}function l(){void 0!==n.inStrictMode[r]&&(A=n.inStrictMode[r],u=n.parent[r]),r--}function d(t){t&&e.isBinaryExpression(t)&&!e.isDestructuringAssignment(t)?(r++,n.expr[r]=t,n.state[r]=0,n.inStrictMode[r]=void 0,n.parent[r]=void 0):Me(t)}}(t);break;case 210:!function(e){K(e),201===e.expression.kind&&ve(e.expression)}(t);break;case 217:!function(e){var t=X(),n=X(),r=X();pe(e.condition,t,n),v=se(t),Me(e.questionToken),Me(e.whenTrue),ne(r,v),v=se(n),Me(e.colonToken),Me(e.whenFalse),ne(r,v),v=se(r)}(t);break;case 249:!function(t){K(t),(t.initializer||e.isForInOrOfStatement(t.parent.parent))&&be(t)}(t);break;case 201:case 202:!function(t){e.isOptionalChain(t)?Ce(t):K(t)}(t);break;case 203:!function(t){if(e.isOptionalChain(t))Ce(t);else{var n=e.skipParentheses(t.expression);208===n.kind||209===n.kind?(W(t.typeArguments),W(t.arguments),Me(t.expression)):(K(t),105===t.expression.kind&&(v=oe(v,t)))}if(201===t.expression.kind){var r=t.expression;e.isIdentifier(r.name)&&Q(r.expression)&&e.isPushOrUnshiftIdentifier(r.name)&&(v=ae(256,v,t))}}(t);break;case 225:!function(t){e.isOptionalChain(t)?Ce(t):K(t)}(t);break;case 331:case 324:case 325:!function(t){e.setParent(t.tagName,t),325!==t.kind&&t.fullName&&(e.setParent(t.fullName,t),e.setParentRecursive(t.fullName,!1))}(t);break;case 297:H(t.statements),Me(t.endOfFileToken);break;case 230:case 257:H(t.statements);break;case 198:!function(t){e.isBindingPattern(t.name)?(W(t.decorators),W(t.modifiers),Me(t.dotDotDotToken),Me(t.propertyName),Me(t.initializer),Me(t.name)):K(t)}(t);break;case 200:case 199:case 288:case 220:I=n;default:K(t)}Be(t),I=n}function G(t){switch(t.kind){case 78:case 79:case 107:case 201:case 202:return J(t);case 203:return function(e){if(e.arguments)for(var t=0,n=e.arguments;t=116&&t.originalKeywordKind<=124?n.bindDiagnostics.push(R(t,function(t){return e.getContainingClass(t)?e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:n.externalModuleIndicator?e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode}(t),e.declarationNameToString(t))):130===t.originalKeywordKind?e.isExternalModule(n)&&e.isInTopLevelContext(t)?n.bindDiagnostics.push(R(t,e.Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module,e.declarationNameToString(t))):32768&t.flags&&n.bindDiagnostics.push(R(t,e.Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,e.declarationNameToString(t))):124===t.originalKeywordKind&&8192&t.flags&&n.bindDiagnostics.push(R(t,e.Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,e.declarationNameToString(t))))}function Ie(t,r){if(r&&78===r.kind){var i=r;if(function(t){return e.isIdentifier(t)&&("eval"===t.escapedText||"arguments"===t.escapedText)}(i)){var a=e.getErrorSpanForNode(n,r);n.bindDiagnostics.push(e.createFileDiagnostic(n,a.start,a.length,function(t){return e.getContainingClass(t)?e.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode:n.externalModuleIndicator?e.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode:e.Diagnostics.Invalid_use_of_0_in_strict_mode}(t),e.idText(i)))}}}function Fe(e){A&&Ie(e,e.name)}function Le(t){if(o<2&&297!==h.kind&&256!==h.kind&&!e.isFunctionLike(h)){var r=e.getErrorSpanForNode(n,t);n.bindDiagnostics.push(e.createFileDiagnostic(n,r.start,r.length,function(t){return e.getContainingClass(t)?e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode:n.externalModuleIndicator?e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode:e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5}(t)))}}function Pe(t,r,i,a,o){var s=e.getSpanOfTokenAtPosition(n,t.pos);n.bindDiagnostics.push(e.createFileDiagnostic(n,s.start,s.length,r,i,a,o))}function Re(t,i,a,o){!function(t,i,a){var o=e.createFileDiagnostic(n,i.pos,i.end-i.pos,a);t?n.bindDiagnostics.push(o):n.bindSuggestionDiagnostics=e.append(n.bindSuggestionDiagnostics,r(r({},o),{category:e.DiagnosticCategory.Suggestion}))}(t,{pos:e.getTokenPosOfNode(i,n),end:a.end},o)}function Me(t){if(t){e.setParent(t,u);var n=A;if(Ve(t),t.kind>156){var r=u;u=t;var i=Se(t);0===i?q(t):function(t,n){var r=p,i=f,a=h;if(1&n?(209!==t.kind&&(f=p),p=h=t,32&n&&(p.locals=e.createSymbolTable()),xe(p)):2&n&&((h=t).locals=void 0),4&n){var o=v,u=y,c=b,l=D,d=S,g=k,m=T,E=16&n&&!e.hasSyntacticModifier(t,256)&&!t.asteriskToken&&!!e.getImmediatelyInvokedFunctionExpression(t);E||(v=s({flags:2}),144&n&&(v.node=t)),D=E||166===t.kind||e.isInJSFile&&(251===t.kind||208===t.kind)?X():void 0,S=void 0,y=void 0,b=void 0,k=void 0,T=!1,q(t),t.flags&=-2817,!(1&v.flags)&&8&n&&e.nodeIsPresent(t.body)&&(t.flags|=256,T&&(t.flags|=512),t.endFlowNode=v),297===t.kind&&(t.flags|=w),D&&(ne(D,v),v=se(D),(166===t.kind||e.isInJSFile&&(251===t.kind||208===t.kind))&&(t.returnFlowNode=v)),E||(v=o),y=u,b=c,D=l,S=d,k=g,T=m}else 64&n?(_=!1,q(t),t.flags=_?128|t.flags:-129&t.flags):q(t);p=r,f=i,h=a}(t,i),u=r}else r=u,1===t.kind&&(u=t),Be(t),u=r;A=n}}function Be(t){if(e.hasJSDocNodes(t))if(e.isInJSFile(t))for(var n=0,r=t.jsDoc;n=2&&(e.isDeclarationStatement(t.statement)||e.isVariableStatement(t.statement))&&Pe(t.label,e.Diagnostics.A_label_is_not_allowed_here)}(t);case 187:return void(_=!0);case 172:break;case 159:return function(t){if(e.isJSDocTemplateTag(t.parent)){var n=e.find(t.parent.parent.tags,e.isJSDocTypeAlias)||e.getHostSignatureFromJSDoc(t.parent);n?(n.locals||(n.locals=e.createSymbolTable()),V(n.locals,void 0,t,262144,526824)):ke(t,262144,526824)}else if(185===t.parent.kind){var r=function(t){var n=e.findAncestor(t,(function(t){return t.parent&&e.isConditionalTypeNode(t.parent)&&t.parent.extendsType===t}));return n&&n.parent}(t.parent);r?(r.locals||(r.locals=e.createSymbolTable()),V(r.locals,void 0,t,262144,526824)):Ae(t,262144,j(t))}else ke(t,262144,526824)}(t);case 160:return it(t);case 249:return rt(t);case 198:return t.flowNode=v,rt(t);case 163:case 162:return function(e){return at(e,4|(e.questionToken?16777216:0),0)}(t);case 288:case 289:return at(t,4,0);case 291:return at(t,8,900095);case 169:case 170:case 171:return ke(t,131072,0);case 165:case 164:return at(t,8192|(t.questionToken?16777216:0),e.isObjectLiteralMethod(t)?0:103359);case 251:return function(t){n.isDeclarationFile||8388608&t.flags||e.isAsyncFunction(t)&&(w|=2048),Fe(t),A?(Le(t),Oe(t,16,110991)):ke(t,16,110991)}(t);case 166:return ke(t,16384,0);case 167:return at(t,32768,46015);case 168:return at(t,65536,78783);case 174:case 308:case 313:case 175:return function(t){var n=M(131072,j(t));B(n,t,131072);var r=M(2048,"__type");B(r,t,2048),r.members=e.createSymbolTable(),r.members.set(n.escapedName,n)}(t);case 177:case 312:case 190:return function(e){return Ae(e,2048,"__type")}(t);case 319:return function(t){K(t);var n=e.getHostSignatureFromJSDoc(t);n&&165!==n.kind&&B(n.symbol,n,32)}(t);case 200:return function(t){var r;if(function(e){e[e.Property=1]="Property",e[e.Accessor=2]="Accessor"}(r||(r={})),A&&!e.isAssignmentTarget(t))for(var i=new e.Map,a=0,o=t.properties;a1&&2097152&v.flags&&(n=e.createSymbolTable()).set("export=",v),L(n),k(l);function b(e){return!!e&&78===e.kind}function D(t){return e.isVariableStatement(t)?e.filter(e.map(t.declarationList.declarations,e.getNameOfDeclaration),b):e.filter([e.getNameOfDeclaration(t)],b)}function E(n){var r=e.find(n,e.isExportAssignment),i=e.findIndex(n,e.isModuleDeclaration),a=-1!==i?n[i]:void 0;if(a&&r&&r.isExportEquals&&e.isIdentifier(r.expression)&&e.isIdentifier(a.name)&&e.idText(a.name)===e.idText(r.expression)&&a.body&&e.isModuleBlock(a.body)){var o=e.filter(n,(function(t){return!!(1&e.getEffectiveModifierFlags(t))})),s=a.name,u=a.body;if(e.length(o)&&(a=e.factory.updateModuleDeclaration(a,a.decorators,a.modifiers,a.name,u=e.factory.updateModuleBlock(u,e.factory.createNodeArray(t(a.body.statements,[e.factory.createExportDeclaration(void 0,void 0,!1,e.factory.createNamedExports(e.map(e.flatMap(o,(function(e){return D(e)})),(function(t){return e.factory.createExportSpecifier(void 0,t)}))),void 0)])))),n=t(n.slice(0,i),[a],n.slice(i+1))),!e.find(n,(function(t){return t!==a&&e.nodeHasName(t,s)}))){l=[];var c=!e.some(u.statements,(function(t){return e.hasSyntacticModifier(t,1)||e.isExportAssignment(t)||e.isExportDeclaration(t)}));e.forEach(u.statements,(function(e){V(e,c?1:0)})),n=t(e.filter(n,(function(e){return e!==a&&e!==r})),l)}}return n}function S(n){var r=e.filter(n,(function(t){return e.isExportDeclaration(t)&&!t.moduleSpecifier&&!!t.exportClause&&e.isNamedExports(t.exportClause)}));if(e.length(r)>1){var i=e.filter(n,(function(t){return!e.isExportDeclaration(t)||!!t.moduleSpecifier||!t.exportClause}));n=t(i,[e.factory.createExportDeclaration(void 0,void 0,!1,e.factory.createNamedExports(e.flatMap(r,(function(t){return e.cast(t.exportClause,e.isNamedExports).elements}))),void 0)])}var a=e.filter(n,(function(t){return e.isExportDeclaration(t)&&!!t.moduleSpecifier&&!!t.exportClause&&e.isNamedExports(t.exportClause)}));if(e.length(a)>1){var o=e.group(a,(function(t){return e.isStringLiteral(t.moduleSpecifier)?">"+t.moduleSpecifier.text:">"}));if(o.length!==a.length)for(var s=function(r){r.length>1&&(n=t(e.filter(n,(function(e){return-1===r.indexOf(e)})),[e.factory.createExportDeclaration(void 0,void 0,!1,e.factory.createNamedExports(e.flatMap(r,(function(t){return e.cast(t.exportClause,e.isNamedExports).elements}))),r[0].moduleSpecifier)]))},u=0,c=o;u=0){var r=t[n],i=e.mapDefined(r.exportClause.elements,(function(n){if(!n.propertyName){var r=e.indicesOf(t),i=e.filter(r,(function(r){return e.nodeHasName(t[r],n.name)}));if(e.length(i)&&e.every(i,(function(e){return A(t[e])}))){for(var a=0,o=i;a0&&e.isSingleOrDoubleQuote(a.charCodeAt(0))?e.stripQuotes(a):a}return"default"===n?n="_default":"export="===n&&(n="_exports"),e.isIdentifierText(n,K)&&!e.isStringANonContextualKeyword(n)?n:"_"+n.replace(/[^a-zA-Z0-9]/g,"_")}function fe(e,t){var n=P(e);return i.remappedSymbolNames.has(n)?i.remappedSymbolNames.get(n):(t=pe(e,t),i.remappedSymbolNames.set(n,t),t)}}(n,i,c)}))}};function i(t,r,i,a){var o,s;e.Debug.assert(void 0===t||0==(8&t.flags));var u={enclosingDeclaration:t,flags:r||0,tracker:i&&i.trackSymbol?i:{trackSymbol:e.noop,moduleResolverHost:134217728&r?{getCommonSourceDirectory:n.getCommonSourceDirectory?function(){return n.getCommonSourceDirectory()}:function(){return""},getSourceFiles:function(){return n.getSourceFiles()},getCurrentDirectory:function(){return n.getCurrentDirectory()},getSymlinkCache:e.maybeBind(n,n.getSymlinkCache),useCaseSensitiveFileNames:e.maybeBind(n,n.useCaseSensitiveFileNames),redirectTargetsMap:n.redirectTargetsMap,getProjectReferenceRedirect:function(e){return n.getProjectReferenceRedirect(e)},isSourceOfProjectReferenceRedirect:function(e){return n.isSourceOfProjectReferenceRedirect(e)},fileExists:function(e){return n.fileExists(e)}}:void 0},encounteredError:!1,visitedTypes:void 0,symbolDepth:void 0,inferTypeParameters:void 0,approximateLength:0},c=a(u);return u.truncating&&1&u.flags&&(null===(s=null===(o=u.tracker)||void 0===o?void 0:o.reportTruncationError)||void 0===s||s.call(o)),u.encounteredError?void 0:c}function a(t){return t.truncating?t.truncating:t.truncating=t.approximateLength>(1&t.flags?e.noTruncationMaximumTruncationLength:e.defaultMaximumTruncationLength)}function s(t,n){o&&o.throwIfCancellationRequested&&o.throwIfCancellationRequested();var r=8388608&n.flags;if(n.flags&=-8388609,!t)return 262144&n.flags?(n.approximateLength+=3,e.factory.createKeywordTypeNode(128)):void(n.encounteredError=!0);if(536870912&n.flags||(t=ou(t)),1&t.flags)return n.approximateLength+=3,e.factory.createKeywordTypeNode(t===Ae?136:128);if(2&t.flags)return e.factory.createKeywordTypeNode(152);if(4&t.flags)return n.approximateLength+=6,e.factory.createKeywordTypeNode(147);if(8&t.flags)return n.approximateLength+=6,e.factory.createKeywordTypeNode(144);if(64&t.flags)return n.approximateLength+=6,e.factory.createKeywordTypeNode(155);if(16&t.flags)return n.approximateLength+=7,e.factory.createKeywordTypeNode(131);if(1024&t.flags&&!(1048576&t.flags)){var i=wi(t.symbol),u=S(i,n,788968);if(Uo(i)===t)return u;var g=e.symbolName(t.symbol);return e.isIdentifierText(g,0)?W(u,e.factory.createTypeReferenceNode(g,void 0)):e.isImportTypeNode(u)?(u.isTypeOf=!0,e.factory.createIndexedAccessTypeNode(u,e.factory.createLiteralTypeNode(e.factory.createStringLiteral(g)))):e.isTypeReferenceNode(u)?e.factory.createIndexedAccessTypeNode(e.factory.createTypeQueryNode(u.typeName),e.factory.createLiteralTypeNode(e.factory.createStringLiteral(g))):e.Debug.fail("Unhandled type node kind returned from `symbolToTypeNode`.")}if(1056&t.flags)return S(t.symbol,n,788968);if(128&t.flags)return n.approximateLength+=t.value.length+2,e.factory.createLiteralTypeNode(e.setEmitFlags(e.factory.createStringLiteral(t.value,!!(268435456&n.flags)),16777216));if(256&t.flags){var m=t.value;return n.approximateLength+=(""+m).length,e.factory.createLiteralTypeNode(m<0?e.factory.createPrefixUnaryExpression(40,e.factory.createNumericLiteral(-m)):e.factory.createNumericLiteral(m))}if(2048&t.flags)return n.approximateLength+=e.pseudoBigIntToString(t.value).length+1,e.factory.createLiteralTypeNode(e.factory.createBigIntLiteral(t.value));if(512&t.flags)return n.approximateLength+=t.intrinsicName.length,e.factory.createLiteralTypeNode("true"===t.intrinsicName?e.factory.createTrue():e.factory.createFalse());if(8192&t.flags){if(!(1048576&n.flags)){if($i(t.symbol,n.enclosingDeclaration))return n.approximateLength+=6,S(t.symbol,n,111551);n.tracker.reportInaccessibleUniqueSymbolError&&n.tracker.reportInaccessibleUniqueSymbolError()}return n.approximateLength+=13,e.factory.createTypeOperatorNode(151,e.factory.createKeywordTypeNode(148))}if(16384&t.flags)return n.approximateLength+=4,e.factory.createKeywordTypeNode(113);if(32768&t.flags)return n.approximateLength+=9,e.factory.createKeywordTypeNode(150);if(65536&t.flags)return n.approximateLength+=4,e.factory.createLiteralTypeNode(e.factory.createNull());if(131072&t.flags)return n.approximateLength+=5,e.factory.createKeywordTypeNode(141);if(4096&t.flags)return n.approximateLength+=6,e.factory.createKeywordTypeNode(148);if(67108864&t.flags)return n.approximateLength+=6,e.factory.createKeywordTypeNode(145);if(Tl(t))return 4194304&n.flags&&(n.encounteredError||32768&n.flags||(n.encounteredError=!0),n.tracker.reportInaccessibleThisError&&n.tracker.reportInaccessibleThisError()),n.approximateLength+=4,e.factory.createThisTypeNode();if(!r&&t.aliasSymbol&&(16384&n.flags||Ji(t.aliasSymbol,n.enclosingDeclaration))){var _=d(t.aliasTypeArguments,n);return!Vi(t.aliasSymbol.escapedName)||32&t.aliasSymbol.flags?S(t.aliasSymbol,n,788968,_):e.factory.createTypeReferenceNode(e.factory.createIdentifier(""),_)}var v=e.getObjectFlags(t);if(4&v)return e.Debug.assert(!!(524288&t.flags)),t.node?V(t,H):H(t);if(262144&t.flags||3&v){if(262144&t.flags&&e.contains(n.inferTypeParameters,t))return n.approximateLength+=e.symbolName(t.symbol).length+6,e.factory.createInferTypeNode(h(t,n,void 0));if(4&n.flags&&262144&t.flags&&!Ji(t.symbol,n.enclosingDeclaration)){var y=k(t,n);return n.approximateLength+=e.idText(y).length,e.factory.createTypeReferenceNode(e.factory.createIdentifier(e.idText(y)),void 0)}return t.symbol?S(t.symbol,n,788968):e.factory.createTypeReferenceNode(e.factory.createIdentifier("?"),void 0)}if(3145728&t.flags){var b=1048576&t.flags?function(e){for(var t=[],n=0,r=0;r0?1048576&t.flags?e.factory.createUnionTypeNode(D):e.factory.createIntersectionTypeNode(D):void(n.encounteredError||262144&n.flags||(n.encounteredError=!0))}if(48&v)return e.Debug.assert(!!(524288&t.flags)),U(t);if(4194304&t.flags){var E=t.type;n.approximateLength+=6;var C=s(E,n);return e.factory.createTypeOperatorNode(138,C)}if(134217728&t.flags){var x=t.texts,T=t.types,w=e.factory.createTemplateHead(x[0]),A=e.factory.createNodeArray(e.map(T,(function(t,r){return e.factory.createTemplateLiteralTypeSpan(s(t,n),(r10)return c(n);n.symbolDepth.set(s,i+1)}n.visitedTypes.add(a);var u=r(t);return n.visitedTypes.delete(a),s&&n.symbolDepth.set(s,i),u}function z(t){if(Rs(t)||t.containsError)return function(t){e.Debug.assert(!!(524288&t.flags));var r,i=t.declaration.readonlyToken?e.factory.createToken(t.declaration.readonlyToken.kind):void 0,a=t.declaration.questionToken?e.factory.createToken(t.declaration.questionToken.kind):void 0;r=Ns(t)?e.factory.createTypeOperatorNode(138,s(Is(t),n)):s(Ts(t),n);var o=h(ks(t),n,r),u=t.declaration.nameType?s(ws(t),n):void 0,c=s(As(t),n),l=e.factory.createMappedTypeNode(i,o,u,a,c);return n.approximateLength+=10,e.setEmitFlags(l,1)}(t);var r=Ms(t);if(!r.properties.length&&!r.stringIndexInfo&&!r.numberIndexInfo){if(!r.callSignatures.length&&!r.constructSignatures.length)return n.approximateLength+=2,e.setEmitFlags(e.factory.createTypeLiteralNode(void 0),1);if(1===r.callSignatures.length&&!r.constructSignatures.length)return f(r.callSignatures[0],174,n);if(1===r.constructSignatures.length&&!r.callSignatures.length)return f(r.constructSignatures[0],175,n)}var i=n.flags;n.flags|=4194304;var o=function(t){if(a(n))return[e.factory.createPropertySignature(void 0,"...",void 0,void 0)];for(var r=[],i=0,o=t.callSignatures;i0){var v=(t.target.typeParameters||e.emptyArray).length;_=d(r.slice(E,v),n)}C=n.flags,n.flags|=16;var y=S(t.symbol,n,788968,_);return n.flags=C,c?W(c,y):y}if(r.length>0){var b=ac(t),D=d(r.slice(0,b),n);if(D){if(t.target.labeledElementDeclarations)for(var E=0;E2)return[s(t[0],n),e.factory.createTypeReferenceNode("... "+(t.length-2)+" more ...",void 0),s(t[t.length-1],n)]}for(var i=64&n.flags?void 0:e.createUnderscoreEscapedMultiMap(),o=[],u=0,c=0,l=t;c0)),a}function b(t,n){var r;return 524384&KD(t).flags&&(r=e.factory.createNodeArray(e.map(bo(t),(function(e){return g(e,n)})))),r}function D(t,n,r){var i;e.Debug.assert(t&&0<=n&&n1?m(a,a.length-1,1):void 0,u=i||D(a,0,n),c=C(a[0],n);!(67108864&n.flags)&&e.getEmitModuleResolutionKind(W)===e.ModuleResolutionKind.NodeJs&&c.indexOf("/node_modules/")>=0&&(n.encounteredError=!0,n.tracker.reportLikelyUnsafeImportRequiredError&&n.tracker.reportLikelyUnsafeImportRequiredError(c));var l=e.factory.createLiteralTypeNode(e.factory.createStringLiteral(c));if(n.tracker.trackExternalModuleSymbolOfImportTypeNode&&n.tracker.trackExternalModuleSymbolOfImportTypeNode(a[0]),n.approximateLength+=c.length+10,!s||e.isEntityName(s))return s&&((h=e.isIdentifier(s)?s:s.right).typeArguments=void 0),e.factory.createImportTypeNode(l,s,u,o);var d=E(s),p=d.objectType.typeName;return e.factory.createIndexedAccessTypeNode(e.factory.createImportTypeNode(l,p,u,o),d.indexType)}var f=m(a,a.length-1,0);if(e.isIndexedAccessTypeNode(f))return f;if(o)return e.factory.createTypeQueryNode(f);var h,g=(h=e.isIdentifier(f)?f:f.right).typeArguments;return h.typeArguments=void 0,e.factory.createTypeReferenceNode(f,g);function m(t,r,a){var o,s=r===t.length-1?i:D(t,r,n),u=t[r],c=t[r-1];if(0===r)n.flags|=16777216,o=ya(u,n),n.approximateLength+=(o?o.length:0)+1,n.flags^=16777216;else if(c&&Ei(c)){var l=Ei(c);e.forEachEntry(l,(function(t,n){if(Ii(t,u)&&!Xo(n)&&"export="!==n)return o=e.unescapeLeadingUnderscores(n),!0}))}if(o||(o=ya(u,n)),n.approximateLength+=o.length+1,!(16&n.flags)&&c&&is(c)&&is(c).get(u.escapedName)&&Ii(is(c).get(u.escapedName),u)){var d=m(t,r-1,a);return e.isIndexedAccessTypeNode(d)?e.factory.createIndexedAccessTypeNode(d,e.factory.createLiteralTypeNode(e.factory.createStringLiteral(o))):e.factory.createIndexedAccessTypeNode(e.factory.createTypeReferenceNode(d,s),e.factory.createLiteralTypeNode(e.factory.createStringLiteral(o)))}var p=e.setEmitFlags(e.factory.createIdentifier(o,s),16777216);return p.symbol=u,r>a?(d=m(t,r-1,a),e.isEntityName(d)?e.factory.createQualifiedName(d,p):e.Debug.fail("Impossible construct - an export of an indexed access cannot be reachable")):p}}function x(e,t,n){var r=Nr(t.enclosingDeclaration,e,788968,void 0,e,!1);return!!r&&!(262144&r.flags&&r===n.symbol)}function k(t,n){var r;if(4&n.flags&&n.typeParameterNames){var i=n.typeParameterNames.get(qc(t));if(i)return i}var a=T(t.symbol,n,788968,!0);if(!(78&a.kind))return e.factory.createIdentifier("(Missing type parameter)");if(4&n.flags){for(var o=a.escapedText,s=0,u=o;(null===(r=n.typeParameterNamesByText)||void 0===r?void 0:r.has(u))||x(u,n,t);)u=o+"_"+ ++s;u!==o&&(a=e.factory.createIdentifier(u,a.typeArguments)),(n.typeParameterNames||(n.typeParameterNames=new e.Map)).set(qc(t),a),(n.typeParameterNamesByText||(n.typeParameterNamesByText=new e.Set)).add(a.escapedText)}return a}function T(t,n,r,i){var a=v(t,n,r);return!i||1===a.length||n.encounteredError||65536&n.flags||(n.encounteredError=!0),function t(r,i){var a=D(r,i,n),o=r[i];0===i&&(n.flags|=16777216);var s=ya(o,n);0===i&&(n.flags^=16777216);var u=e.setEmitFlags(e.factory.createIdentifier(s,a),16777216);return u.symbol=o,i>0?e.factory.createQualifiedName(t(r,i-1),u):u}(a,a.length-1)}function w(t,n,r){var i=v(t,n,r);return function t(r,i){var a=D(r,i,n),o=r[i];0===i&&(n.flags|=16777216);var s=ya(o,n);0===i&&(n.flags^=16777216);var u=s.charCodeAt(0);if(e.isSingleOrDoubleQuote(u)&&e.some(o.declarations,ra))return e.factory.createStringLiteral(C(o,n));var c=35===u?s.length>1&&e.isIdentifierStart(s.charCodeAt(1),K):e.isIdentifierStart(u,K);if(0===i||c){var l=e.setEmitFlags(e.factory.createIdentifier(s,a),16777216);return l.symbol=o,i>0?e.factory.createPropertyAccessExpression(t(r,i-1),l):l}91===u&&(u=(s=s.substring(1,s.length-1)).charCodeAt(0));var d=void 0;return e.isSingleOrDoubleQuote(u)?d=e.factory.createStringLiteral(s.substring(1,s.length-1).replace(/\\./g,(function(e){return e.substring(1)})),39===u):""+ +s===s&&(d=e.factory.createNumericLiteral(+s)),d||((d=e.setEmitFlags(e.factory.createIdentifier(s,a),16777216)).symbol=o),e.factory.createElementAccessExpression(t(r,i-1),d)}(i,i.length-1)}function A(t){var n=e.getNameOfDeclaration(t);return!!n&&e.isStringLiteral(n)}function O(t){var n=e.getNameOfDeclaration(t);return!!(n&&e.isStringLiteral(n)&&(n.singleQuote||!e.nodeIsSynthesized(n)&&e.startsWith(e.getTextOfNode(n,!1),"'")))}function N(t,n){var r=!!e.length(t.declarations)&&e.every(t.declarations,O);return function(t,n,r){var i=xr(t).nameType;if(i){if(384&i.flags){var a=""+i.value;return e.isIdentifierText(a,W.target)||Dm(a)?Dm(a)&&e.startsWith(a,"-")?e.factory.createComputedPropertyName(e.factory.createNumericLiteral(+a)):I(a):e.factory.createStringLiteral(a,!!r)}if(8192&i.flags)return e.factory.createComputedPropertyName(w(i.symbol,n,111551))}}(t,n,r)||(e.isKnownSymbol(t)?e.factory.createComputedPropertyName(e.factory.createPropertyAccessExpression(e.factory.createIdentifier("Symbol"),t.escapedName.substr(3))):I(e.unescapeLeadingUnderscores(t.escapedName),!!e.length(t.declarations)&&e.every(t.declarations,A),r))}function I(t,n,r){return e.isIdentifierText(t,W.target)?e.factory.createIdentifier(t):!n&&Dm(t)&&+t>=0?e.factory.createNumericLiteral(+t):e.factory.createStringLiteral(t,!!r)}function F(t,n){return t.declarations&&e.find(t.declarations,(function(t){return!(!e.getEffectiveTypeAnnotationNode(t)||n&&!e.findAncestor(t,(function(e){return e===n})))}))}function R(t,n){return!(4&e.getObjectFlags(n))||!e.isTypeReferenceNode(t)||e.length(t.typeArguments)>=ku(n.target.typeParameters)}function M(t,n,r,i,a,o){if(n!==Te&&i){var u=F(r,i);if(u&&!e.isFunctionLikeDeclaration(u)){var c=e.getEffectiveTypeAnnotationNode(u);if(ld(c)===n&&R(c,n)){var l=B(t,c,a,o);if(l)return l}}}var d=t.flags;8192&n.flags&&n.symbol===r&&(!t.enclosingDeclaration||e.some(r.declarations,(function(n){return e.getSourceFileOfNode(n)===e.getSourceFileOfNode(t.enclosingDeclaration)})))&&(t.flags|=1048576);var p=s(n,t);return t.flags=d,p}function B(t,r,i,a){o&&o.throwIfCancellationRequested&&o.throwIfCancellationRequested();var u=!1,c=e.getSourceFileOfNode(r),l=e.visitNode(r,(function r(o){var l,d,p;if(e.isJSDocAllType(o)||310===o.kind)return e.factory.createKeywordTypeNode(128);if(e.isJSDocUnknownType(o))return e.factory.createKeywordTypeNode(152);if(e.isJSDocNullableType(o))return e.factory.createUnionTypeNode([e.visitNode(o.type,r),e.factory.createLiteralTypeNode(e.factory.createNull())]);if(e.isJSDocOptionalType(o))return e.factory.createUnionTypeNode([e.visitNode(o.type,r),e.factory.createKeywordTypeNode(150)]);if(e.isJSDocNonNullableType(o))return e.visitNode(o.type,r);if(e.isJSDocVariadicType(o))return e.factory.createArrayTypeNode(e.visitNode(o.type,r));if(e.isJSDocTypeLiteral(o))return e.factory.createTypeLiteralNode(e.map(o.jsDocPropertyTags,(function(n){var i=e.isIdentifier(n.name)?n.name:n.name.right,a=Ta(ld(o),i.escapedText),u=a&&n.typeExpression&&ld(n.typeExpression.type)!==a?s(a,t):void 0;return e.factory.createPropertySignature(void 0,i,n.typeExpression&&e.isJSDocOptionalType(n.typeExpression.type)?e.factory.createToken(57):void 0,u||n.typeExpression&&e.visitNode(n.typeExpression.type,r)||e.factory.createKeywordTypeNode(128))})));if(e.isTypeReferenceNode(o)&&e.isIdentifier(o.typeName)&&""===o.typeName.escapedText)return e.setOriginalNode(e.factory.createKeywordTypeNode(128),o);if((e.isExpressionWithTypeArguments(o)||e.isTypeReferenceNode(o))&&e.isJSDocIndexSignature(o))return e.factory.createTypeLiteralNode([e.factory.createIndexSignature(void 0,void 0,[e.factory.createParameterDeclaration(void 0,void 0,void 0,"x",void 0,e.visitNode(o.typeArguments[0],r))],e.visitNode(o.typeArguments[1],r))]);if(e.isJSDocFunctionType(o))return e.isJSDocConstructSignature(o)?e.factory.createConstructorTypeNode(e.visitNodes(o.typeParameters,r),e.mapDefined(o.parameters,(function(t,n){return t.name&&e.isIdentifier(t.name)&&"new"===t.name.escapedText?void(p=t.type):e.factory.createParameterDeclaration(void 0,void 0,m(t),_(t,n),t.questionToken,e.visitNode(t.type,r),void 0)})),e.visitNode(p||o.type,r)||e.factory.createKeywordTypeNode(128)):e.factory.createFunctionTypeNode(e.visitNodes(o.typeParameters,r),e.map(o.parameters,(function(t,n){return e.factory.createParameterDeclaration(void 0,void 0,m(t),_(t,n),t.questionToken,e.visitNode(t.type,r),void 0)})),e.visitNode(o.type,r)||e.factory.createKeywordTypeNode(128));if(e.isTypeReferenceNode(o)&&e.isInJSDoc(o)&&(!R(o,ld(o))||_c(o)||Ee===cc(uc(o),788968,!0)))return e.setOriginalNode(s(ld(o),t),o);if(e.isLiteralImportTypeNode(o))return e.factory.updateImportTypeNode(o,e.factory.updateLiteralTypeNode(o.argument,function(r,i){if(a){if(t.tracker&&t.tracker.moduleResolverHost){var o=pC(r);if(o){var s={getCanonicalFileName:e.createGetCanonicalFileName(!!n.useCaseSensitiveFileNames),getCurrentDirectory:function(){return t.tracker.moduleResolverHost.getCurrentDirectory()},getCommonSourceDirectory:function(){return t.tracker.moduleResolverHost.getCommonSourceDirectory()}},u=e.getResolvedExternalModuleName(s,o);return e.factory.createStringLiteral(u)}}}else if(t.tracker&&t.tracker.trackExternalModuleSymbolOfImportTypeNode){var c=hi(i,i,void 0);c&&t.tracker.trackExternalModuleSymbolOfImportTypeNode(c)}return i}(o,o.argument.literal)),o.qualifier,e.visitNodes(o.typeArguments,r,e.isTypeNode),o.isTypeOf);if(e.isEntityName(o)||e.isEntityNameExpression(o)){var f=e.getFirstIdentifier(o);if(e.isInJSFile(o)&&(e.isExportsIdentifier(f)||e.isModuleExportsAccessExpression(f.parent)||e.isQualifiedName(f.parent)&&e.isModuleIdentifier(f.parent.left)&&e.isExportsIdentifier(f.parent.right)))return u=!0,o;var h=di(f,67108863,!0,!0);if(h&&(0!==Zi(h,t.enclosingDeclaration,67108863,!1).accessibility?u=!0:(null===(d=null===(l=t.tracker)||void 0===l?void 0:l.trackSymbol)||void 0===d||d.call(l,h,t.enclosingDeclaration,67108863),null==i||i(h)),e.isIdentifier(o))){var g=262144&h.flags?k(Uo(h),t):e.factory.cloneNode(o);return g.symbol=h,e.setEmitFlags(e.setOriginalNode(g,o),16777216)}}return c&&e.isTupleTypeNode(o)&&e.getLineAndCharacterOfPosition(c,o.pos).line===e.getLineAndCharacterOfPosition(c,o.end).line&&e.setEmitFlags(o,1),e.visitEachChild(o,r,e.nullTransformationContext);function m(t){return t.dotDotDotToken||(t.type&&e.isJSDocVariadicType(t.type)?e.factory.createToken(25):void 0)}function _(t,n){return t.name&&e.isIdentifier(t.name)&&"this"===t.name.escapedText?"this":m(t)?"args":"arg"+n}}));if(!u)return l===r?e.setTextRange(e.factory.cloneNode(r),r):l}}(),ie=e.createSymbolTable(),ae=mr(4,"undefined");ae.declarations=[];var oe=mr(1536,"globalThis",8);oe.exports=ie,oe.declarations=[],ie.set(oe.escapedName,oe);var se,ue=mr(4,"arguments"),ce=mr(4,"require"),le={getNodeCount:function(){return e.sum(n.getSourceFiles(),"nodeCount")},getIdentifierCount:function(){return e.sum(n.getSourceFiles(),"identifierCount")},getSymbolCount:function(){return e.sum(n.getSourceFiles(),"symbolCount")+y},getTypeCatalog:function(){return T},getTypeCount:function(){return v},getInstantiationCount:function(){return D},getRelationCacheSizes:function(){return{assignable:ar.size,identity:sr.size,subtype:rr.size,strictSubtype:ir.size}},isUndefinedSymbol:function(e){return e===ae},isArgumentsSymbol:function(e){return e===ue},isUnknownSymbol:function(e){return e===Ee},getMergedSymbol:ki,getDiagnostics:_E,getGlobalDiagnostics:function(){return vE(),Zn.getGlobalDiagnostics()},getRecursionIdentity:Bp,getTypeOfSymbolAtLocation:function(t,n){var r=e.getParseTreeNode(n);return r?function(t,n){if(t=t.exportSymbol||t,78===n.kind&&(e.isRightSideOfQualifiedNameOrPropertyAccess(n)&&(n=n.parent),e.isExpressionNode(n)&&!e.isAssignmentTarget(n))){var r=Ky(n);if(Fi(kr(n).resolvedSymbol)===t)return r}return fo(t)}(t,r):Te},getSymbolsOfParameterPropertyDeclaration:function(t,n){var r=e.getParseTreeNode(t,e.isParameter);return void 0===r?e.Debug.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node."):function(t,n){var r=t.parent,i=t.parent.parent,a=wr(r.locals,n,111551),o=wr(is(i.symbol),n,111551);return a&&o?[a,o]:e.Debug.fail("There should exist two symbols, one as property declaration and one as parameter declaration")}(r,e.escapeLeadingUnderscores(n))},getDeclaredTypeOfSymbol:Uo,getPropertiesOfType:Vs,getPropertyOfType:function(t,n){return du(t,e.escapeLeadingUnderscores(n))},getPrivateIdentifierPropertyOfType:function(t,n,r){var i=e.getParseTreeNode(r);if(i){var a=l_(e.escapeLeadingUnderscores(n),i);return a?d_(t,a):void 0}},getTypeOfPropertyOfType:function(t,n){return Ta(t,e.escapeLeadingUnderscores(n))},getIndexInfoOfType:mu,getSignaturesOfType:fu,getIndexTypeOfType:_u,getBaseTypes:wo,getBaseTypeOfLiteralType:ef,getWidenedType:Lf,getTypeFromTypeNode:function(t){var n=e.getParseTreeNode(t,e.isTypeNode);return n?ld(n):Te},getParameterType:Bv,getPromisedTypeOfPromise:mb,getAwaitedType:function(e){return vb(e)},getReturnTypeOfSignature:Pu,isNullableType:e_,getNullableType:vf,getNonNullableType:bf,getNonOptionalType:Cf,getTypeArguments:ic,typeToTypeNode:re.typeToTypeNode,indexInfoToIndexSignatureDeclaration:re.indexInfoToIndexSignatureDeclaration,signatureToSignatureDeclaration:re.signatureToSignatureDeclaration,symbolToEntityName:re.symbolToEntityName,symbolToExpression:re.symbolToExpression,symbolToTypeParameterDeclarations:re.symbolToTypeParameterDeclarations,symbolToParameterDeclaration:re.symbolToParameterDeclaration,typeParameterToDeclaration:re.typeParameterToDeclaration,getSymbolsInScope:function(t,n){var r=e.getParseTreeNode(t);return r?function(t,n){if(16777216&t.flags)return[];var r=e.createSymbolTable(),i=!1;return a(),r.delete("this"),bu(r);function a(){for(;t;){switch(t.locals&&!Tr(t)&&s(t.locals,n),t.kind){case 297:if(!e.isExternalOrCommonJsModule(t))break;case 256:s(Ti(t).exports,2623475&n);break;case 255:s(Ti(t).exports,8&n);break;case 221:t.name&&o(t.symbol,n);case 252:case 253:i||s(is(Ti(t)),788968&n);break;case 208:t.name&&o(t.symbol,n)}e.introducesArgumentsExoticObject(t)&&o(ue,n),i=e.hasSyntacticModifier(t,32),t=t.parent}s(ie,n)}function o(t,n){if(e.getCombinedLocalAndExportSymbolFlags(t)&n){var i=t.escapedName;r.has(i)||r.set(i,t)}}function s(e,t){t&&e.forEach((function(e){o(e,t)}))}}(r,n):[]},getSymbolAtLocation:function(t){var n=e.getParseTreeNode(t);return n?xE(n,!0):void 0},getShorthandAssignmentValueSymbol:function(t){var n=e.getParseTreeNode(t);return n?function(e){if(e&&289===e.kind)return di(e.name,2208703)}(n):void 0},getExportSpecifierLocalTargetSymbol:function(t){var n=e.getParseTreeNode(t,e.isExportSpecifier);return n?function(t){return e.isExportSpecifier(t)?t.parent.parent.moduleSpecifier?$r(t.parent.parent,t):di(t.propertyName||t.name,2998271):di(t,2998271)}(n):void 0},getExportSymbolOfSymbol:function(e){return ki(e.exportSymbol||e)},getTypeAtLocation:function(t){var n=e.getParseTreeNode(t);return n?kE(n):Te},getTypeOfAssignmentPattern:function(t){var n=e.getParseTreeNode(t,e.isAssignmentPattern);return n&&TE(n)||Te},getPropertySymbolOfDestructuringAssignment:function(t){var n=e.getParseTreeNode(t,e.isIdentifier);return n?function(t){var n=TE(e.cast(t.parent.parent,e.isAssignmentPattern));return n&&du(n,t.escapedText)}(n):void 0},signatureToString:function(t,n,r,i){return sa(t,e.getParseTreeNode(n),r,i)},typeToString:function(t,n,r){return ua(t,e.getParseTreeNode(n),r)},symbolToString:function(t,n,r,i){return oa(t,e.getParseTreeNode(n),r,i)},typePredicateToString:function(t,n,r){return ha(t,e.getParseTreeNode(n),r)},writeSignature:function(t,n,r,i,a){return sa(t,e.getParseTreeNode(n),r,i,a)},writeType:function(t,n,r,i){return ua(t,e.getParseTreeNode(n),r,i)},writeSymbol:function(t,n,r,i,a){return oa(t,e.getParseTreeNode(n),r,i,a)},writeTypePredicate:function(t,n,r,i){return ha(t,e.getParseTreeNode(n),r,i)},getAugmentedPropertiesOfType:NE,getRootSymbols:function t(n){var r=function(t){if(6&e.getCheckFlags(t))return e.mapDefined(xr(t).containingType.types,(function(e){return du(e,t.escapedName)}));if(33554432&t.flags){var n=t,r=n.leftSpread,i=n.rightSpread,a=n.syntheticOrigin;return r?[r,i]:a?[a]:e.singleElementArray(function(e){for(var t,n=e;n=xr(n).target;)t=n;return t}(t))}}(n);return r?e.flatMap(r,t):[n]},getSymbolOfExpando:Dv,getContextualType:function(t,n){var r=e.getParseTreeNode(t,e.isExpression);if(r){var i=e.findAncestor(r,e.isCallLikeExpression),a=i&&kr(i).resolvedSignature;if(4&n&&i){var o=r;do{kr(o).skipDirectInference=!0,o=o.parent}while(o&&o!==i);kr(i).resolvedSignature=void 0}var s=um(r,n);if(4&n&&i){o=r;do{kr(o).skipDirectInference=void 0,o=o.parent}while(o&&o!==i);kr(i).resolvedSignature=a}return s}},getContextualTypeForObjectLiteralElement:function(t){var n=e.getParseTreeNode(t,e.isObjectLiteralElementLike);return n?em(n):void 0},getContextualTypeForArgumentAtIndex:function(t,n){var r=e.getParseTreeNode(t,e.isCallLikeExpression);return r&&Yg(r,n)},getContextualTypeForJsxAttribute:function(t){var n=e.getParseTreeNode(t,e.isJsxAttributeLike);return n&&rm(n)},isContextSensitive:jd,getFullyQualifiedName:li,getResolvedSignature:function(e,t,n){return de(e,t,n,0)},getResolvedSignatureForSignatureHelp:function(e,t,n){return de(e,t,n,16)},getExpandedParameters:ps,hasEffectiveRestParameter:Hv,getConstantValue:function(t){var n=e.getParseTreeNode(t,XE);return n?ZE(n):void 0},isValidPropertyAccess:function(t,n){var r=e.getParseTreeNode(t,e.isPropertyAccessOrQualifiedNameOrImportTypeNode);return!!r&&function(e,t){switch(e.kind){case 201:return S_(e,105===e.expression.kind,t,Lf(Yy(e.expression)));case 157:return S_(e,!1,t,Lf(Yy(e.left)));case 195:return S_(e,!1,t,ld(e))}}(r,e.escapeLeadingUnderscores(n))},isValidPropertyAccessForCompletions:function(t,n,r){var i=e.getParseTreeNode(t,e.isPropertyAccessExpression);return!!i&&function(e,t,n){return S_(e,201===e.kind&&105===e.expression.kind,n.escapedName,t)}(i,n,r)},getSignatureFromDeclaration:function(t){var n=e.getParseTreeNode(t,e.isFunctionLike);return n?wu(n):void 0},isImplementationOfOverload:function(t){var n=e.getParseTreeNode(t,e.isFunctionLike);return n?KE(n):void 0},getImmediateAliasedSymbol:Sm,getAliasedSymbol:ri,getEmitResolver:function(e,t){return _E(e,t),ne},getExportsOfModule:bi,getExportsAndPropertiesOfModule:function(t){var n=bi(t),r=_i(t);return r!==t&&e.addRange(n,Vs(fo(r))),n},getSymbolWalker:e.createGetSymbolWalker((function(e){return Bu(e)||Se}),Lu,Pu,wo,Ms,fo,vh,gu,Hs,e.getFirstIdentifier,ic),getAmbientModules:function(){return mt||(mt=[],ie.forEach((function(e,t){u.test(t)&&mt.push(e)}))),mt},getJsxIntrinsicTagNamesAt:function(t){var n=Fm(O.IntrinsicElements,t);return n?Vs(n):e.emptyArray},isOptionalParameter:function(t){var n=e.getParseTreeNode(t,e.isParameter);return!!n&&Cu(n)},tryGetMemberInModuleExports:function(t,n){return Di(e.escapeLeadingUnderscores(t),n)},tryGetMemberInModuleExportsAndProperties:function(t,n){return function(t,n){var r=Di(t,n);if(r)return r;var i=_i(n);if(i!==n){var a=fo(i);return 131068&a.flags||1&e.getObjectFlags(a)||$p(a)?void 0:du(a,t)}}(e.escapeLeadingUnderscores(t),n)},tryFindAmbientModuleWithoutAugmentations:function(e){return Eu(e,!1)},getApparentType:tu,getUnionType:Xc,isTypeAssignableTo:Jd,createAnonymousType:Wi,createSignature:us,createSymbol:mr,createIndexInfo:Yu,getAnyType:function(){return Se},getStringType:function(){return Re},getNumberType:function(){return Me},createPromiseType:Qv,createArrayType:Fc,getElementTypeOfArrayType:qp,getBooleanType:function(){return He},getFalseType:function(e){return e?je:Ue},getTrueType:function(e){return e?Ve:ze},getVoidType:function(){return Ke},getUndefinedType:function(){return Ne},getNullType:function(){return Le},getESSymbolType:function(){return We},getNeverType:function(){return qe},getOptionalType:function(){return Fe},isSymbolAccessible:Zi,isArrayType:Hp,isTupleType:of,isArrayLikeType:Gp,isTypeInvalidDueToUnionDiscriminant:function(e,t){return t.properties.some((function(t){var n=t.name&&cl(t.name),r=n&&$o(n)?ts(n):void 0,i=void 0===r?void 0:Ta(e,r);return!!i&&Zp(i)&&!Jd(kE(t),i)}))},getAllPossiblePropertiesOfTypes:function(t){var n=Xc(t);if(!(1048576&n.flags))return NE(n);for(var r=e.createSymbolTable(),i=0,a=t;i>",0,Se),dn=us(void 0,void 0,void 0,e.emptyArray,Se,void 0,0,0),pn=us(void 0,void 0,void 0,e.emptyArray,Te,void 0,0,0),fn=us(void 0,void 0,void 0,e.emptyArray,Se,void 0,0,0),hn=us(void 0,void 0,void 0,e.emptyArray,Ge,void 0,0,0),gn=Yu(Re,!0),mn=new e.Map,_n={get yieldType(){return e.Debug.fail("Not supported")},get returnType(){return e.Debug.fail("Not supported")},get nextType(){return e.Debug.fail("Not supported")}},vn=pD(Se,Se,Se),yn=pD(Se,Se,Oe),bn=pD(qe,Se,Ne),Dn={iterableCacheKey:"iterationTypesOfAsyncIterable",iteratorCacheKey:"iterationTypesOfAsyncIterator",iteratorSymbolName:"asyncIterator",getGlobalIteratorType:function(e){return Yt||(Yt=Sc("AsyncIterator",3,e))||ut},getGlobalIterableType:function(e){return Gt||(Gt=Sc("AsyncIterable",1,e))||ut},getGlobalIterableIteratorType:function(e){return Jt||(Jt=Sc("AsyncIterableIterator",1,e))||ut},getGlobalGeneratorType:function(e){return $t||($t=Sc("AsyncGenerator",3,e))||ut},resolveIterationType:vb,mustHaveANextMethodDiagnostic:e.Diagnostics.An_async_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:e.Diagnostics.The_0_property_of_an_async_iterator_must_be_a_method,mustHaveAValueDiagnostic:e.Diagnostics.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property},En={iterableCacheKey:"iterationTypesOfIterable",iteratorCacheKey:"iterationTypesOfIterator",iteratorSymbolName:"iterator",getGlobalIteratorType:function(e){return zt||(zt=Sc("Iterator",3,e))||ut},getGlobalIterableType:Ac,getGlobalIterableIteratorType:function(e){return Ht||(Ht=Sc("IterableIterator",1,e))||ut},getGlobalGeneratorType:function(e){return Wt||(Wt=Sc("Generator",3,e))||ut},resolveIterationType:function(e,t){return e},mustHaveANextMethodDiagnostic:e.Diagnostics.An_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:e.Diagnostics.The_0_property_of_an_iterator_must_be_a_method,mustHaveAValueDiagnostic:e.Diagnostics.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property},Cn=new e.Map,Sn=!1,xn=new e.Map,kn=0,Tn=0,wn=0,An=!1,On=0,Nn=ad(""),In=ad(0),Fn=ad({negative:!1,base10Value:"0"}),Ln=[],Pn=[],Rn=[],Mn=0,Bn=[],jn=[],Un=[],Vn=[],zn=[],Hn=[],Wn=[],Kn=[],qn=[],Gn=[],Yn=[],Jn=[],$n=[],Qn=[],Xn=[],Zn=e.createDiagnosticCollection(),er=e.createDiagnosticCollection(),tr=new e.Map(e.getEntries({string:Re,number:Me,bigint:Be,boolean:He,symbol:We,undefined:Ne})),nr=Xc(e.arrayFrom(C.keys(),ad)),rr=new e.Map,ir=new e.Map,ar=new e.Map,or=new e.Map,sr=new e.Map,ur=new e.Map,cr=e.createSymbolTable();return cr.set(ae.escapedName,ae),function(){for(var t=0,r=n.getSourceFiles();t=5||e.some(o.relatedInformation,(function(t){return 0===e.compareDiagnostics(t,s)||0===e.compareDiagnostics(t,i)})))return"continue";e.addRelatedInfo(o,e.length(o.relatedInformation)?s:i)},u=0,c=i||e.emptyArray;u1)}function xr(e){if(33554432&e.flags)return e;var t=P(e);return jn[t]||(jn[t]=new I)}function kr(e){var t=L(e);return Un[t]||(Un[t]=new F)}function Tr(t){return 297===t.kind&&!e.isExternalOrCommonJsModule(t)}function wr(t,n,r){if(r){var i=ki(t.get(n));if(i){if(e.Debug.assert(0==(1&e.getCheckFlags(i)),"Should never get an instantiated symbol here."),i.flags&r)return i;if(2097152&i.flags){var a=ri(i);if(a===Ee||a.flags&r)return i}}}}function Ar(t,r){var i=e.getSourceFileOfNode(t),a=e.getSourceFileOfNode(r),o=e.getEnclosingBlockScopeContainer(t);if(i!==a){if(q&&(i.externalModuleIndicator||a.externalModuleIndicator)||!e.outFile(W)||yh(r)||8388608&t.flags)return!0;if(c(r,t))return!0;var s=n.getSourceFiles();return s.indexOf(i)<=s.indexOf(a)}if(t.pos<=r.pos&&(!e.isPropertyDeclaration(t)||!e.isThisProperty(r.parent)||t.initializer||t.exclamationToken)){if(198===t.kind){var u=e.getAncestor(r,198);return u?e.findAncestor(u,e.isBindingElement)!==e.findAncestor(t,e.isBindingElement)||t.post.end)&&void 0===e.findAncestor(n,(function(n){if(n===t)return"quit";switch(n.kind){case 209:return!0;case 163:return!r||!(e.isPropertyDeclaration(t)&&n.parent===t.parent||e.isParameterPropertyDeclaration(t,t.parent)&&n.parent===t.parent.parent)||"quit";case 230:switch(n.parent.kind){case 167:case 165:case 168:return!0;default:return!1}default:return!1}}))}}function Or(t,n,r){var i=e.getEmitScriptTarget(W),a=n;if(e.isParameter(r)&&a.body&&t.valueDeclaration.pos>=a.body.pos&&t.valueDeclaration.end<=a.body.end&&i>=2){var o=kr(a);return void 0===o.declarationRequiresScopeChange&&(o.declarationRequiresScopeChange=e.forEach(a.parameters,(function(e){return s(e.name)||!!e.initializer&&s(e.initializer)}))||!1),!o.declarationRequiresScopeChange}return!1;function s(t){switch(t.kind){case 209:case 208:case 251:case 166:return!1;case 165:case 167:case 168:case 288:return s(t.name);case 163:return e.hasStaticModifier(t)?i<99||!W.useDefineForClassFields:s(t.name);default:return e.isNullishCoalesce(t)||e.isOptionalChain(t)?i<7:e.isBindingElement(t)&&t.dotDotDotToken&&e.isObjectBindingPattern(t.parent)?i<4:!e.isTypeNode(t)&&(e.forEachChild(t,s)||!1)}}}function Nr(e,t,n,r,i,a,o,s){return void 0===o&&(o=!1),Ir(e,t,n,r,i,a,o,wr,s)}function Ir(t,n,r,i,a,o,s,u,c){var l,d,p,f,h,g,m=t,_=!1,v=t,y=!1;e:for(;t;){if(t.locals&&!Tr(t)&&(l=u(t.locals,n,r))){var b=!0;if(e.isFunctionLike(t)&&d&&d!==t.body?(r&l.flags&788968&&311!==d.kind&&(b=!!(262144&l.flags)&&(d===t.type||160===d.kind||159===d.kind)),r&l.flags&3&&(Or(l,t,d)?b=!1:1&l.flags&&(b=160===d.kind||d===t.type&&!!e.findAncestor(l.valueDeclaration,e.isParameter)))):184===t.kind&&(b=d===t.trueType),b)break e;l=void 0}switch(_=_||Fr(t,d),t.kind){case 297:if(!e.isExternalOrCommonJsModule(t))break;y=!0;case 256:var D=Ti(t).exports||w;if(297===t.kind||e.isModuleDeclaration(t)&&8388608&t.flags&&!e.isGlobalScopeAugmentation(t)){if(l=D.get("default")){var E=e.getLocalSymbolForExportDefault(l);if(E&&l.flags&r&&E.escapedName===n)break e;l=void 0}var C=D.get(n);if(C&&2097152===C.flags&&(e.getDeclarationOfKind(C,270)||e.getDeclarationOfKind(C,269)))break}if("default"!==n&&(l=u(D,n,2623475&r))){if(!e.isSourceFile(t)||!t.commonJsModuleIndicator||l.declarations.some(e.isJSDocTypeAlias))break e;l=void 0}break;case 255:if(l=u(Ti(t).exports,n,8&r))break e;break;case 163:if(!e.hasSyntacticModifier(t,32)){var S=Pi(t.parent);S&&S.locals&&u(S.locals,n,111551&r)&&(f=t)}break;case 252:case 221:case 253:if(l=u(Ti(t).members||w,n,788968&r)){if(!Rr(l,t)){l=void 0;break}if(d&&e.hasSyntacticModifier(d,32))return void pr(v,e.Diagnostics.Static_members_cannot_reference_class_type_parameters);break e}if(221===t.kind&&32&r){var x=t.name;if(x&&n===x.escapedText){l=t.symbol;break e}}break;case 223:if(d===t.expression&&93===t.parent.token){var k=t.parent.parent;if(e.isClassLike(k)&&(l=u(Ti(k).members,n,788968&r)))return void(i&&pr(v,e.Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters))}break;case 158:if(g=t.parent.parent,(e.isClassLike(g)||253===g.kind)&&(l=u(Ti(g).members,n,788968&r)))return void pr(v,e.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);break;case 209:if(W.target>=2)break;case 165:case 166:case 167:case 168:case 251:if(3&r&&"arguments"===n){l=ue;break e}break;case 208:if(3&r&&"arguments"===n){l=ue;break e}if(16&r){var T=t.name;if(T&&n===T.escapedText){l=t.symbol;break e}}break;case 161:t.parent&&160===t.parent.kind&&(t=t.parent),t.parent&&(e.isClassElement(t.parent)||252===t.parent.kind)&&(t=t.parent);break;case 331:case 324:case 325:t=e.getJSDocHost(t);break;case 160:d&&(d===t.initializer||d===t.name&&e.isBindingPattern(d))&&(h||(h=t));break;case 198:d&&(d===t.initializer||d===t.name&&e.isBindingPattern(d))&&e.isParameterDeclaration(t)&&!h&&(h=t);break;case 185:if(262144&r){var A=t.typeParameter.name;if(A&&n===A.escapedText){l=t.typeParameter.symbol;break e}}}Lr(t)&&(p=t),d=t,t=t.parent}if(!o||!l||p&&l===p.symbol||(l.isReferenced|=r),!l){if(d&&(e.Debug.assert(297===d.kind),d.commonJsModuleIndicator&&"exports"===n&&r&d.symbol.flags))return d.symbol;s||(l=u(ie,n,r))}if(!l&&m&&e.isInJSFile(m)&&m.parent&&e.isRequireCall(m.parent,!1))return ce;if(l){if(i){if(f&&(99!==W.target||!W.useDefineForClassFields)){var O=f.name;return void pr(v,e.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,e.declarationNameToString(O),Pr(a))}if(v&&(2&r||(32&r||384&r)&&111551==(111551&r))){var N=Fi(l);(2&N.flags||32&N.flags||384&N.flags)&&function(t,n){if(e.Debug.assert(!!(2&t.flags||32&t.flags||384&t.flags)),!(67108881&t.flags&&32&t.flags)){var r=e.find(t.declarations,(function(t){return e.isBlockOrCatchScoped(t)||e.isClassLike(t)||255===t.kind}));if(void 0===r)return e.Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration");if(!(8388608&r.flags||Ar(r,n))){var i=void 0,a=e.declarationNameToString(e.getNameOfDeclaration(r));2&t.flags?i=pr(n,e.Diagnostics.Block_scoped_variable_0_used_before_its_declaration,a):32&t.flags?i=pr(n,e.Diagnostics.Class_0_used_before_its_declaration,a):256&t.flags?i=pr(n,e.Diagnostics.Enum_0_used_before_its_declaration,a):(e.Debug.assert(!!(128&t.flags)),W.preserveConstEnums&&(i=pr(n,e.Diagnostics.Enum_0_used_before_its_declaration,a))),i&&e.addRelatedInfo(i,e.createDiagnosticForNode(r,e.Diagnostics._0_is_declared_here,a))}}}(N,v)}if(l&&y&&111551==(111551&r)&&!(4194304&m.flags)){var I=ki(l);e.length(I.declarations)&&e.every(I.declarations,(function(t){return e.isNamespaceExportDeclaration(t)||e.isSourceFile(t)&&!!t.symbol.globalExports}))&&hr(!W.allowUmdGlobalAccess,v,e.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead,e.unescapeLeadingUnderscores(n))}if(l&&h&&!_&&111551==(111551&r)){var F=ki(as(l)),L=e.getRootDeclaration(h);F===Ti(h)?pr(v,e.Diagnostics.Parameter_0_cannot_reference_itself,e.declarationNameToString(h.name)):F.valueDeclaration&&F.valueDeclaration.pos>h.pos&&L.parent.locals&&u(L.parent.locals,F.escapedName,r)===F&&pr(v,e.Diagnostics.Parameter_0_cannot_reference_identifier_1_declared_after_it,e.declarationNameToString(h.name),e.declarationNameToString(v))}l&&v&&111551&r&&2097152&l.flags&&function(t,n,r){if(!e.isValidTypeOnlyAliasUseSite(r)){var i=oi(t);if(i){var a=e.typeOnlyDeclarationIsExport(i),o=a?e.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type:e.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type,s=a?e.Diagnostics._0_was_exported_here:e.Diagnostics._0_was_imported_here,u=e.unescapeLeadingUnderscores(n);e.addRelatedInfo(pr(r,o,u),e.createDiagnosticForNode(i,s,u))}}}(l,n,v)}return l}if(i&&(!v||!(function(t,n,r){if(!e.isIdentifier(t)||t.escapedText!==n||bE(t)||yh(t))return!1;for(var i=e.getThisContainer(t,!1),a=i;a;){if(e.isClassLike(a.parent)){var o=Ti(a.parent);if(!o)break;if(du(fo(o),n))return pr(t,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0,Pr(r),oa(o)),!0;if(a===i&&!e.hasSyntacticModifier(a,32)&&du(Uo(o).thisType,n))return pr(t,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0,Pr(r)),!0}a=a.parent}return!1}(v,n,a)||Mr(v)||function(t,n,r){var i=1920|(e.isInJSFile(t)?111551:0);if(r===i){var a=ni(Nr(t,n,788968&~i,void 0,void 0,!1)),o=t.parent;if(a){if(e.isQualifiedName(o)){e.Debug.assert(o.left===t,"Should only be resolving left side of qualified name as a namespace");var s=o.right.escapedText;if(du(Uo(a),s))return pr(o,e.Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,e.unescapeLeadingUnderscores(n),e.unescapeLeadingUnderscores(s)),!0}return pr(t,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here,e.unescapeLeadingUnderscores(n)),!0}}return!1}(v,n,r)||function(t,n){return!(!jr(n)||270!==t.parent.kind)&&(pr(t,e.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,n),!0)}(v,n)||function(t,n,r){if(111551&r){if(jr(n))return pr(t,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,e.unescapeLeadingUnderscores(n)),!0;var i=ni(Nr(t,n,788544,void 0,void 0,!1));if(i&&!(1024&i.flags)){var a=e.unescapeLeadingUnderscores(n);return function(e){switch(e){case"Promise":case"Symbol":case"Map":case"WeakMap":case"Set":case"WeakSet":return!0}return!1}(n)?pr(t,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later,a):function(t,n){var r=e.findAncestor(t.parent,(function(t){return!e.isComputedPropertyName(t)&&!e.isPropertySignature(t)&&(e.isTypeLiteralNode(t)||"quit")}));if(r&&1===r.members.length){var i=Uo(n);return!!(1048576&i.flags)&&vy(i,384,!0)}return!1}(t,i)?pr(t,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0,a,"K"===a?"P":"K"):pr(t,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,a),!0}}return!1}(v,n,r)||function(t,n,r){if(111127&r){if(ni(Nr(t,n,1024,void 0,void 0,!1)))return pr(t,e.Diagnostics.Cannot_use_namespace_0_as_a_value,e.unescapeLeadingUnderscores(n)),!0}else if(788544&r&&ni(Nr(t,n,1536,void 0,void 0,!1)))return pr(t,e.Diagnostics.Cannot_use_namespace_0_as_a_type,e.unescapeLeadingUnderscores(n)),!0;return!1}(v,n,r)||function(t,n,r){if(788584&r){var i=ni(Nr(t,n,111127,void 0,void 0,!1));if(i&&!(1920&i.flags))return pr(t,e.Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,e.unescapeLeadingUnderscores(n)),!0}return!1}(v,n,r)))){var P=void 0;if(c&&Mn<10&&(P=b_(m,n,r))){var R=oa(P),M=pr(v,c,Pr(a),R);P.valueDeclaration&&e.addRelatedInfo(M,e.createDiagnosticForNode(P.valueDeclaration,e.Diagnostics._0_is_declared_here,R))}if(!P&&a){var B=function(t){for(var n=Pr(t),r=e.getScriptTargetFeatures(),i=0,a=e.getOwnKeys(r);i=e.ModuleKind.ES2015?"allowSyntheticDefaultImports":"esModuleInterop",u=r.exports.get("export=").valueDeclaration,c=pr(t.name,e.Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag,oa(r),s);e.addRelatedInfo(c,e.createDiagnosticForNode(u,e.Diagnostics.This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag,s))}else!function(t,n){var r,i;if(null===(r=t.exports)||void 0===r?void 0:r.has(n.symbol.escapedName))pr(n.name,e.Diagnostics.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead,oa(t),oa(n.symbol));else{var a=pr(n.name,e.Diagnostics.Module_0_has_no_default_export,oa(t)),o=null===(i=t.exports)||void 0===i?void 0:i.get("__export");if(o){var s=e.find(o.declarations,(function(t){var n,r;return!!(e.isExportDeclaration(t)&&t.moduleSpecifier&&(null===(r=null===(n=fi(t,t.moduleSpecifier))||void 0===n?void 0:n.exports)||void 0===r?void 0:r.has("default")))}));s&&e.addRelatedInfo(a,e.createDiagnosticForNode(s,e.Diagnostics.export_Asterisk_does_not_re_export_a_default))}}}(r,t);return ii(t,i,void 0,!1),i}}function $r(n,r,i){var a;void 0===i&&(i=!1);var o=e.getExternalModuleRequireArgument(n)||n.moduleSpecifier,s=fi(n,o),u=!e.isPropertyAccessExpression(r)&&r.propertyName||r.name;if(e.isIdentifier(u)){var c=vi(s,o,i,"default"===u.escapedText&&!(!W.allowSyntheticDefaultImports&&!W.esModuleInterop));if(c&&u.escapedText){if(e.isShorthandAmbientModuleSymbol(s))return s;var l=void 0;l=s&&s.exports&&s.exports.get("export=")?du(fo(c),u.escapedText):function(e,t){if(3&e.flags){var n=e.valueDeclaration.type;if(n)return ni(du(ld(n),t))}}(c,u.escapedText),l=ni(l,i);var d=function(e,t,n,r){if(1536&e.flags){var i=Ei(e).get(t.escapedText),a=ni(i,r);return ii(n,i,a,!1),a}}(c,u,r,i);void 0===d&&"default"===u.escapedText&&Yr(e.find(s.declarations,e.isSourceFile),s,i)&&(d=_i(s,i)||ni(s,i));var p=d&&l&&d!==l?function(t,n){if(t===Ee&&n===Ee)return Ee;if(790504&t.flags)return t;var r=mr(t.flags|n.flags,t.escapedName);return r.declarations=e.deduplicate(e.concatenate(t.declarations,n.declarations),e.equateValues),r.parent=t.parent||n.parent,t.valueDeclaration&&(r.valueDeclaration=t.valueDeclaration),n.members&&(r.members=new e.Map(n.members)),t.exports&&(r.exports=new e.Map(t.exports)),r}(l,d):d||l;if(!p){var f=li(s,n),h=e.declarationNameToString(u),g=D_(u,c);if(void 0!==g){var m=oa(g),_=pr(u,e.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2,f,h,m);g.valueDeclaration&&e.addRelatedInfo(_,e.createDiagnosticForNode(g.valueDeclaration,e.Diagnostics._0_is_declared_here,m))}else(null===(a=s.exports)||void 0===a?void 0:a.has("default"))?pr(u,e.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead,f,h):function(n,r,i,a,o){var s,u=null===(s=a.valueDeclaration.locals)||void 0===s?void 0:s.get(r.escapedText),c=a.exports;if(u){var l=null==c?void 0:c.get("export=");if(l)Ii(l,u)?function(t,n,r,i){q>=e.ModuleKind.ES2015?pr(n,W.esModuleInterop?e.Diagnostics._0_can_only_be_imported_by_using_a_default_import:e.Diagnostics._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,r):e.isInJSFile(t)?pr(n,W.esModuleInterop?e.Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import:e.Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,r):pr(n,W.esModuleInterop?e.Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import:e.Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import,r,r,i)}(n,r,i,o):pr(r,e.Diagnostics.Module_0_has_no_exported_member_1,o,i);else{var d=c?e.find(bu(c),(function(e){return!!Ii(e,u)})):void 0,p=d?pr(r,e.Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2,o,i,oa(d)):pr(r,e.Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported,o,i);e.addRelatedInfo.apply(void 0,t([p],e.map(u.declarations,(function(t,n){return e.createDiagnosticForNode(t,0===n?e.Diagnostics._0_is_declared_here:e.Diagnostics.and_here,i)}))))}}else pr(r,e.Diagnostics.Module_0_has_no_exported_member_1,o,i)}(n,u,h,s,f)}return p}}}function Qr(t){if(e.isVariableDeclaration(t)&&t.initializer&&e.isPropertyAccessExpression(t.initializer))return t.initializer}function Xr(e,t,n){var r=e.parent.parent.moduleSpecifier?$r(e.parent.parent,e,n):di(e.propertyName||e.name,t,!1,n);return ii(e,void 0,r,!1),r}function Zr(t,n){return e.isClassExpression(t)?Oy(t).symbol:e.isEntityName(t)||e.isEntityNameExpression(t)?di(t,901119,!0,n)||(Oy(t),kr(t).resolvedSymbol):void 0}function ei(t,n){switch(void 0===n&&(n=!1),t.kind){case 260:case 249:return Kr(t,n);case 262:return Jr(t,n);case 263:return function(e,t){var n=e.parent.parent.moduleSpecifier,r=fi(e,n),i=vi(r,n,t,!1);return ii(e,r,i,!1),i}(t,n);case 269:return function(e,t){var n=e.parent.moduleSpecifier,r=n&&fi(e,n),i=n&&vi(r,n,t,!1);return ii(e,r,i,!1),i}(t,n);case 265:case 198:return function(t,n){var r=e.isBindingElement(t)?e.getRootDeclaration(t):t.parent.parent.parent,i=Qr(r),a=$r(r,i||t,n),o=t.propertyName||t.name;return i&&a&&e.isIdentifier(o)?du(fo(a),o.escapedText):(ii(t,void 0,a,!1),a)}(t,n);case 270:return Xr(t,901119,n);case 266:case 216:return function(t,n){var r=Zr(e.isExportAssignment(t)?t.expression:t.right,n);return ii(t,void 0,r,!1),r}(t,n);case 259:return function(e,t){var n=_i(e.parent.symbol,t);return ii(e,void 0,n,!1),n}(t,n);case 289:return di(t.name,901119,!0,n);case 288:return function(e,t){return Zr(e.initializer,t)}(t,n);case 202:case 201:return function(t,n){if(e.isBinaryExpression(t.parent)&&t.parent.left===t&&62===t.parent.operatorToken.kind)return Zr(t.parent.right,n)}(t,n);default:return e.Debug.fail()}}function ti(e,t){return void 0===t&&(t=901119),!!e&&(2097152==(e.flags&(2097152|t))||!!(2097152&e.flags&&67108864&e.flags))}function ni(e,t){return!t&&ti(e)?ri(e):e}function ri(t){e.Debug.assert(0!=(2097152&t.flags),"Should only get Alias here.");var n=xr(t);if(n.target)n.target===Ce&&(n.target=Ee);else{n.target=Ce;var r=zr(t);if(!r)return e.Debug.fail();var i=ei(r);n.target===Ce?n.target=i||Ee:pr(r,e.Diagnostics.Circular_definition_of_import_alias_0,oa(t))}return n.target}function ii(t,n,r,i){if(!t||e.isPropertyAccessExpression(t))return!1;var a=Ti(t);if(e.isTypeOnlyImportOrExportDeclaration(t))return xr(a).typeOnlyDeclaration=t,!0;var o=xr(a);return ai(o,n,i)||ai(o,r,i)}function ai(t,n,r){var i,a,o;if(n&&(void 0===t.typeOnlyDeclaration||r&&!1===t.typeOnlyDeclaration)){var s=null!==(a=null===(i=n.exports)||void 0===i?void 0:i.get("export="))&&void 0!==a?a:n,u=s.declarations&&e.find(s.declarations,e.isTypeOnlyImportOrExportDeclaration);t.typeOnlyDeclaration=null!==(o=null!=u?u:xr(s).typeOnlyDeclaration)&&void 0!==o&&o}return!!t.typeOnlyDeclaration}function oi(e){if(2097152&e.flags)return xr(e).typeOnlyDeclaration||void 0}function si(e){var t=Ti(e),n=ri(t);n&&(n===Ee||111551&n.flags&&!HE(n)&&!oi(t))&&ui(t)}function ui(t){var n=xr(t);if(!n.referenced){n.referenced=!0;var r=zr(t);if(!r)return e.Debug.fail();if(e.isInternalModuleImportEqualsDeclaration(r)){var i=ni(t);(i===Ee||111551&i.flags)&&Oy(r.moduleReference)}}}function ci(t,n){return 78===t.kind&&e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),78===t.kind||157===t.parent.kind?di(t,1920,!1,n):(e.Debug.assert(260===t.parent.kind),di(t,901119,!1,n))}function li(e,t){return e.parent?li(e.parent,t)+"."+oa(e):oa(e,t,void 0,20)}function di(t,n,r,i,a){if(!e.nodeIsMissing(t)){var o,s=1920|(e.isInJSFile(t)?111551&n:0);if(78===t.kind){var u=n===s||e.nodeIsSynthesized(t)?e.Diagnostics.Cannot_find_namespace_0:_h(e.getFirstIdentifier(t)),c=e.isInJSFile(t)&&!e.nodeIsSynthesized(t)?function(t,n){if(gc(t.parent)){var r=function(t){if(!e.findAncestor(t,(function(t){return e.isJSDocNode(t)||4194304&t.flags?e.isJSDocTypeAlias(t):"quit"}))){var n=e.getJSDocHost(t);if(e.isExpressionStatement(n)&&e.isBinaryExpression(n.expression)&&3===e.getAssignmentDeclarationKind(n.expression)&&(r=Ti(n.expression.left)))return pi(r);if((e.isObjectLiteralMethod(n)||e.isPropertyAssignment(n))&&e.isBinaryExpression(n.parent.parent)&&6===e.getAssignmentDeclarationKind(n.parent.parent)&&(r=Ti(n.parent.parent.left)))return pi(r);var r,i=e.getEffectiveJSDocHost(t);if(i&&e.isFunctionLike(i))return(r=Ti(i))&&r.valueDeclaration}}(t.parent);if(r)return Nr(r,t.escapedText,n,void 0,t,!0)}}(t,n):void 0;if(!(o=ki(Nr(a||t,t.escapedText,n,r||c?void 0:u,t,!0))))return ki(c)}else{if(157!==t.kind&&201!==t.kind)throw e.Debug.assertNever(t,"Unknown entity name kind.");var l=157===t.kind?t.left:t.expression,d=157===t.kind?t.right:t.name,p=di(l,s,r,!1,a);if(!p||e.nodeIsMissing(d))return;if(p===Ee)return p;if(e.isInJSFile(t)&&p.valueDeclaration&&e.isVariableDeclaration(p.valueDeclaration)&&p.valueDeclaration.initializer&&Tv(p.valueDeclaration.initializer)){var f=p.valueDeclaration.initializer.arguments[0],h=fi(f,f);if(h){var g=_i(h);g&&(p=g)}}if(!(o=ki(wr(Ei(p),d.escapedText,n)))){if(!r){var m=li(p),_=e.declarationNameToString(d),v=D_(d,p);v?pr(d,e.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2,m,_,oa(v)):pr(d,e.Diagnostics.Namespace_0_has_no_exported_member_1,m,_)}return}}return e.Debug.assert(0==(1&e.getCheckFlags(o)),"Should never get an instantiated symbol here."),!e.nodeIsSynthesized(t)&&e.isEntityName(t)&&(2097152&o.flags||266===t.parent.kind)&&ii(e.getAliasDeclarationFromName(t),o,void 0,!0),o.flags&n||i?o:ri(o)}}function pi(t){var n=t.parent.valueDeclaration;if(n)return(e.isAssignmentDeclaration(n)?e.getAssignedExpandoInitializer(n):e.hasOnlyExpressionInitializer(n)?e.getDeclaredExpandoInitializer(n):void 0)||n}function fi(t,n,r){var i=e.getEmitModuleResolutionKind(W)===e.ModuleResolutionKind.Classic?e.Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option:e.Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations;return hi(t,n,r?void 0:i)}function hi(t,n,r,i){return void 0===i&&(i=!1),e.isStringLiteralLike(n)?gi(t,n.text,r,n,i):void 0}function gi(t,r,i,a,o){void 0===o&&(o=!1),e.startsWith(r,"@types/")&&pr(a,e.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1,e.removePrefix(r,"@types/"),r);var s=Eu(r,!0);if(s)return s;var u=e.getSourceFileOfNode(t),c=e.getResolvedModule(u,r),l=c&&e.getResolutionDiagnostic(W,c),d=c&&!l&&n.getSourceFile(c.resolvedFileName);if(d)return d.symbol?(c.isExternalLibraryImport&&!e.resolutionExtensionIsTSOrJson(c.extension)&&mi(!1,a,c,r),ki(d.symbol)):void(i&&pr(a,e.Diagnostics.File_0_is_not_a_module,d.fileName));if(_t){var p=e.findBestPatternMatch(_t,(function(e){return e.pattern}),r);if(p){var f=vt&&vt.get(r);return ki(f||p.symbol)}}if(c&&!e.resolutionExtensionIsTSOrJson(c.extension)&&void 0===l||l===e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type)o?pr(a,e.Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented,r,c.resolvedFileName):mi(X&&!!i,a,c,r);else if(i){if(c){var h=n.getProjectReferenceRedirect(c.resolvedFileName);if(h)return void pr(a,e.Diagnostics.Output_file_0_has_not_been_built_from_source_file_1,h,c.resolvedFileName)}if(l)pr(a,l,r,c.resolvedFileName);else{var g=e.tryExtractTSExtension(r);g?pr(a,e.Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead,g,e.removeExtension(r,g)):!W.resolveJsonModule&&e.fileExtensionIs(r,".json")&&e.getEmitModuleResolutionKind(W)===e.ModuleResolutionKind.NodeJs&&e.hasJsonModuleEmitEnabled(W)?pr(a,e.Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension,r):pr(a,i,r)}}}function mi(t,n,r,i){var a,o=r.packageId,s=r.resolvedFileName,u=!e.isExternalModuleNameRelative(i)&&o?(a=o.name,h().has(e.getTypesPackageName(a))?e.chainDiagnosticMessages(void 0,e.Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1,o.name,e.mangleScopedPackageName(o.name)):e.chainDiagnosticMessages(void 0,e.Diagnostics.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,i,e.mangleScopedPackageName(o.name))):void 0;hr(t,n,e.chainDiagnosticMessages(u,e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,i,s))}function _i(t,n){if(null==t?void 0:t.exports){var r=function(t,n){if(!t||t===Ee||t===n||1===n.exports.size||2097152&t.flags)return t;var r=xr(t);if(r.cjsExportMerged)return r.cjsExportMerged;var i=33554432&t.flags?t:yr(t);return i.flags=512|i.flags,void 0===i.exports&&(i.exports=e.createSymbolTable()),n.exports.forEach((function(e,t){"export="!==t&&i.exports.set(t,i.exports.has(t)?br(i.exports.get(t),e):e)})),xr(i).cjsExportMerged=i,r.cjsExportMerged=i}(ki(ni(t.exports.get("export="),n)),ki(t));return ki(r)||t}}function vi(t,n,r,i){var a=_i(t,r);if(!r&&a){if(!(i||1539&a.flags||e.getDeclarationOfKind(a,297))){var o=q>=e.ModuleKind.ES2015?"allowSyntheticDefaultImports":"esModuleInterop";return pr(n,e.Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export,o),a}if(W.esModuleInterop){var s=n.parent;if(e.isImportDeclaration(s)&&e.getNamespaceDeclarationNode(s)||e.isImportCall(s)){var u=fo(a),c=pu(u,0);if(c&&c.length||(c=pu(u,1)),c&&c.length){var l=kv(u,a,t),d=mr(a.flags,a.escapedName);d.declarations=a.declarations?a.declarations.slice():[],d.parent=a.parent,d.target=a,d.originatingImport=s,a.valueDeclaration&&(d.valueDeclaration=a.valueDeclaration),a.constEnumOnlyModule&&(d.constEnumOnlyModule=!0),a.members&&(d.members=new e.Map(a.members)),a.exports&&(d.exports=new e.Map(a.exports));var p=Ms(l);return d.type=Wi(d,p.members,e.emptyArray,e.emptyArray,p.stringIndexInfo,p.numberIndexInfo),d}}}}return a}function yi(e){return void 0!==e.exports.get("export=")}function bi(e){return bu(Ci(e))}function Di(e,t){var n=Ci(t);if(n)return n.get(e)}function Ei(e){return 6256&e.flags?rs(e,"resolvedExports"):1536&e.flags?Ci(e):e.exports||w}function Ci(e){var t=xr(e);return t.resolvedExports||(t.resolvedExports=xi(e))}function Si(t,n,r,i){n&&n.forEach((function(n,a){if("default"!==a){var o=t.get(a);if(o){if(r&&i&&o&&ni(o)!==ni(n)){var s=r.get(a);s.exportsWithDuplicate?s.exportsWithDuplicate.push(i):s.exportsWithDuplicate=[i]}}else t.set(a,n),r&&i&&r.set(a,{specifierText:e.getTextOfNode(i.moduleSpecifier)})}}))}function xi(t){var n=[];return function t(r){if(r&&r.exports&&e.pushIfUnique(n,r)){var i=new e.Map(r.exports),a=r.exports.get("__export");if(a){for(var o=e.createSymbolTable(),s=new e.Map,u=0,c=a.declarations;u=l?c.substr(0,l-"...".length)+"...":c}function ca(e,t){var n=da(e.symbol)?ua(e,e.symbol.valueDeclaration):ua(e),r=da(t.symbol)?ua(t,t.symbol.valueDeclaration):ua(t);return n===r&&(n=la(e),r=la(t)),[n,r]}function la(e){return ua(e,void 0,64)}function da(t){return t&&t.valueDeclaration&&e.isExpression(t.valueDeclaration)&&!jd(t.valueDeclaration)}function pa(e){return void 0===e&&(e=0),814775659&e}function fa(t){return!!(t.symbol&&32&t.symbol.flags&&(t===No(t.symbol)||1073741824&e.getObjectFlags(t)))}function ha(t,n,r,i){return void 0===r&&(r=16384),i?a(i).getText():e.usingSingleLineStringWriter(a);function a(i){var a=e.factory.createTypePredicateNode(2===t.kind||3===t.kind?e.factory.createToken(127):void 0,1===t.kind||3===t.kind?e.factory.createIdentifier(t.parameterName):e.factory.createThisTypeNode(),t.type&&re.typeToTypeNode(t.type,n,70222336|pa(r))),o=e.createPrinter({removeComments:!0}),s=n&&e.getSourceFileOfNode(n);return o.writeNode(4,a,s,i),i}}function ga(e){return 8===e?"private":16===e?"protected":"public"}function ma(t){return t&&t.parent&&257===t.parent.kind&&e.isExternalModuleAugmentation(t.parent.parent)}function _a(t){return 297===t.kind||e.isAmbientModule(t)}function va(t,n){var r=xr(t).nameType;if(r){if(384&r.flags){var i=""+r.value;return e.isIdentifierText(i,W.target)||Dm(i)?Dm(i)&&e.startsWith(i,"-")?"["+i+"]":i:'"'+e.escapeString(i,34)+'"'}if(8192&r.flags)return"["+ya(r.symbol,n)+"]"}}function ya(t,n){if(n&&"default"===t.escapedName&&!(16384&n.flags)&&(!(16777216&n.flags)||!t.declarations||n.enclosingDeclaration&&e.findAncestor(t.declarations[0],_a)!==e.findAncestor(n.enclosingDeclaration,_a)))return"default";if(t.declarations&&t.declarations.length){var r=e.firstDefined(t.declarations,(function(t){return e.getNameOfDeclaration(t)?t:void 0})),i=r&&e.getNameOfDeclaration(r);if(r&&i){if(e.isCallExpression(r)&&e.isBindableObjectDefinePropertyCall(r))return e.symbolName(t);if(e.isComputedPropertyName(i)&&!(4096&e.getCheckFlags(t))){var a=xr(t).nameType;if(a&&384&a.flags){var o=va(t,n);if(void 0!==o)return o}}return e.declarationNameToString(i)}if(r||(r=t.declarations[0]),r.parent&&249===r.parent.kind)return e.declarationNameToString(r.parent.name);switch(r.kind){case 221:case 208:case 209:return!n||n.encounteredError||131072&n.flags||(n.encounteredError=!0),221===r.kind?"(Anonymous class)":"(Anonymous function)"}}var s=va(t,n);return void 0!==s?s:e.symbolName(t)}function ba(t){if(t){var n=kr(t);return void 0===n.isVisible&&(n.isVisible=!!function(){switch(t.kind){case 324:case 331:case 325:return!!(t.parent&&t.parent.parent&&t.parent.parent.parent&&e.isSourceFile(t.parent.parent.parent));case 198:return ba(t.parent.parent);case 249:if(e.isBindingPattern(t.name)&&!t.name.elements.length)return!1;case 256:case 252:case 253:case 254:case 251:case 255:case 260:if(e.isExternalModuleAugmentation(t))return!0;var n=ka(t);return 1&e.getCombinedModifierFlags(t)||260!==t.kind&&297!==n.kind&&8388608&n.flags?ba(n):Tr(n);case 163:case 162:case 167:case 168:case 165:case 164:if(e.hasEffectiveModifier(t,24))return!1;case 166:case 170:case 169:case 171:case 160:case 257:case 174:case 175:case 177:case 173:case 178:case 179:case 182:case 183:case 186:case 192:return ba(t.parent);case 262:case 263:case 265:return!1;case 159:case 297:case 259:return!0;case 266:default:return!1}}()),n.isVisible}return!1}function Da(t,n){var r,i,a;return t.parent&&266===t.parent.kind?r=Nr(t,t.escapedText,2998271,void 0,t,!1):270===t.parent.kind&&(r=Xr(t.parent,2998271)),r&&((a=new e.Set).add(P(r)),function t(r){e.forEach(r,(function(r){var o=Vr(r)||r;if(n?kr(r).isVisible=!0:(i=i||[],e.pushIfUnique(i,o)),e.isInternalModuleImportEqualsDeclaration(r)){var s=r.moduleReference,u=Nr(r,e.getFirstIdentifier(s).escapedText,901119,void 0,void 0,!1);u&&a&&e.tryAddToSet(a,P(u))&&t(u.declarations)}}))}(r.declarations)),i}function Ea(e,t){var n=Ca(e,t);if(n>=0){for(var r=Ln.length,i=n;i=0;n--){if(Sa(Ln[n],Rn[n]))return-1;if(Ln[n]===e&&Rn[n]===t)return n}return-1}function Sa(t,n){switch(n){case 0:return!!xr(t).type;case 5:return!!kr(t).resolvedEnumType;case 2:return!!xr(t).declaredType;case 1:return!!t.resolvedBaseConstructorType;case 3:return!!t.resolvedReturnType;case 4:return!!t.immediateBaseConstraint;case 6:return!!t.resolvedTypeArguments;case 7:return!!t.baseTypesResolved}return e.Debug.assertNever(n)}function xa(){return Ln.pop(),Rn.pop(),Pn.pop()}function ka(t){return e.findAncestor(e.getRootDeclaration(t),(function(e){switch(e.kind){case 249:case 250:case 265:case 264:case 263:case 262:return!1;default:return!0}})).parent}function Ta(e,t){var n=du(e,t);return n?fo(n):void 0}function wa(e){return e&&0!=(1&e.flags)}function Aa(e){var t=Ti(e);return t&&xr(t).type||Ba(e,!1)}function Oa(t,n,r){if(131072&(t=Xh(t,(function(e){return!(98304&e.flags)}))).flags)return it;if(1048576&t.flags)return eg(t,(function(e){return Oa(e,n,r)}));var i=Xc(e.map(n,cl));if(xl(t)||kl(i)){if(131072&i.flags)return t;var a=en||(en=Cc("Omit",524288,e.Diagnostics.Cannot_find_global_type_0));return a?sc(a,[t,i]):Te}for(var o=e.createSymbolTable(),s=0,u=Vs(t);s=2?(i=Se,Nc(Ac(!0),[i])):Ot;var u=e.map(a,(function(t){return e.isOmittedExpression(t)?Se:Ja(t,n,r)})),c=e.findLastIndex(a,(function(t){return!(t===s||e.isOmittedExpression(t)||mm(t))}),a.length-1)+1,l=Uc(u,e.map(a,(function(e,t){return e===s?4:t>=c?2:1})));return n&&((l=nc(l)).pattern=t,l.objectFlags|=1048576),l}function Qa(t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),196===t.kind?function(t,n,r){var i,a=e.createSymbolTable(),o=1048704;e.forEach(t.elements,(function(e){var t=e.propertyName||e.name;if(e.dotDotDotToken)i=Yu(Se,!1);else{var s=cl(t);if($o(s)){var u=ts(s),c=mr(4|(e.initializer?16777216:0),u);c.type=Ja(e,n,r),c.bindingElement=e,a.set(c.escapedName,c)}else o|=512}}));var s=Wi(void 0,a,e.emptyArray,e.emptyArray,i,void 0);return s.objectFlags|=o,n&&(s.pattern=t,s.objectFlags|=1048576),s}(t,n,r):$a(t,n,r)}function Xa(e,t){return Za(Ba(e,!0),e,t)}function Za(t,n,r){return t?(r&&Bf(n,t),8192&t.flags&&(e.isBindingElement(n)||!n.type)&&t.symbol!==Ti(n)&&(t=We),Lf(t)):(t=e.isParameter(n)&&n.dotDotDotToken?Ot:Se,r&&(eo(n)||Mf(n,t)),t)}function eo(t){var n=e.getRootDeclaration(t);return db(160===n.kind?n.parent:n)}function to(t){var n=e.getEffectiveTypeAnnotationNode(t);if(n)return ld(n)}function no(t){var n=xr(t);if(!n.type){var r=function(t){if(4194304&t.flags)return(n=Uo(wi(t))).typeParameters?tc(n,e.map(n.typeParameters,(function(e){return Se}))):n;var n;if(t===ce)return Se;if(134217728&t.flags){var r=Ti(e.getSourceFileOfNode(t.valueDeclaration)),i=e.createSymbolTable();return i.set("exports",r),Wi(t,i,e.emptyArray,e.emptyArray,void 0,void 0)}var a,o=t.valueDeclaration;if(e.isCatchClauseVariableDeclarationOrBindingElement(o)){var s=o;if(!s.type)return Se;var u=kE(s.type);return wa(u)||u===Oe?u:Te}if(e.isSourceFile(o)&&e.isJsonSourceFile(o))return o.statements.length?Lf(tf(Yy(o.statements[0].expression))):it;if(!Ea(t,0))return 512&t.flags&&!(67108864&t.flags)?co(t):po(t);if(266===o.kind)a=Za(Oy(o.expression),o);else if(e.isBinaryExpression(o)||e.isInJSFile(o)&&(e.isCallExpression(o)||(e.isPropertyAccessExpression(o)||e.isBindableStaticElementAccessExpression(o))&&e.isBinaryExpression(o.parent)))a=Wa(t);else if(e.isPropertyAccessExpression(o)||e.isElementAccessExpression(o)||e.isIdentifier(o)||e.isStringLiteralLike(o)||e.isNumericLiteral(o)||e.isClassDeclaration(o)||e.isFunctionDeclaration(o)||e.isMethodDeclaration(o)&&!e.isObjectLiteralMethod(o)||e.isMethodSignature(o)||e.isSourceFile(o)){if(9136&t.flags)return co(t);a=e.isBinaryExpression(o.parent)?Wa(t):to(o)||Se}else if(e.isPropertyAssignment(o))a=to(o)||My(o);else if(e.isJsxAttribute(o))a=to(o)||Am(o);else if(e.isShorthandPropertyAssignment(o))a=to(o)||Ry(o.name,0);else if(e.isObjectLiteralMethod(o))a=to(o)||By(o,0);else if(e.isParameter(o)||e.isPropertyDeclaration(o)||e.isPropertySignature(o)||e.isVariableDeclaration(o)||e.isBindingElement(o)||e.isJSDocPropertyLikeTag(o))a=Xa(o,!0);else if(e.isEnumDeclaration(o))a=co(t);else if(e.isEnumMember(o))a=lo(t);else{if(!e.isAccessor(o))return e.Debug.fail("Unhandled declaration kind! "+e.Debug.formatSyntaxKind(o.kind)+" for "+e.Debug.formatSymbol(t));a=so(t)}return xa()?a:512&t.flags&&!(67108864&t.flags)?co(t):po(t)}(t);n.type||(n.type=r)}return n.type}function ro(t){if(t)return 167===t.kind?e.getEffectiveReturnTypeNode(t):e.getEffectiveSetAccessorTypeAnnotationNode(t)}function io(e){var t=ro(e);return t&&ld(t)}function ao(e){return Fu(wu(e))}function oo(t){var n=xr(t);return n.type||(n.type=function(t){if(!Ea(t,0))return Te;var n=so(t);return xa()||(n=Se,X&&pr(e.getDeclarationOfKind(t,167),e.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,oa(t))),n}(t))}function so(t){var n=e.getDeclarationOfKind(t,167),r=e.getDeclarationOfKind(t,168);if(n&&e.isInJSFile(n)){var i=Pa(n);if(i)return i}var a=io(n);return a||io(r)||(n&&n.body?ey(n):(r?db(r)||hr(X,r,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation,oa(t)):(e.Debug.assert(!!n,"there must exist a getter as we are current checking either setter or getter in this function"),db(n)||hr(X,n,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation,oa(t))),Se))}function uo(t){var n=ko(No(t));return 8650752&n.flags?n:2097152&n.flags?e.find(n.types,(function(e){return!!(8650752&e.flags)})):void 0}function co(t){var n=xr(t),r=n;if(!n.type){var i=t.valueDeclaration&&Dv(t.valueDeclaration,!1);if(i){var a=bv(t,i);a&&(t=n=a)}r.type=n.type=function(t){var n=t.valueDeclaration;if(1536&t.flags&&e.isShorthandAmbientModuleSymbol(t))return Se;if(n&&(216===n.kind||e.isAccessExpression(n)&&216===n.parent.kind))return Wa(t);if(512&t.flags&&n&&e.isSourceFile(n)&&n.commonJsModuleIndicator){var r=_i(t);if(r!==t){if(!Ea(t,0))return Te;var i=ki(t.exports.get("export=")),a=Wa(i,i===r?void 0:r);return xa()?a:po(t)}}var o=ji(16,t);if(32&t.flags){var s=uo(t);return s?al([o,s]):o}return Y&&16777216&t.flags?yf(o):o}(t)}return n.type}function lo(e){var t=xr(e);return t.type||(t.type=Bo(e))}function po(t){var n=t.valueDeclaration;return e.getEffectiveTypeAnnotationNode(n)?(pr(t.valueDeclaration,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,oa(t)),Te):(X&&(160!==n.kind||n.initializer)&&pr(t.valueDeclaration,e.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,oa(t)),Se)}function fo(t){var n=e.getCheckFlags(t);return 65536&n?function(t){var n=xr(t);return n.type||(e.Debug.assertIsDefined(n.deferralParent),e.Debug.assertIsDefined(n.deferralConstituents),n.type=1048576&n.deferralParent.flags?Xc(n.deferralConstituents):al(n.deferralConstituents)),n.type}(t):1&n?function(e){var t=xr(e);if(!t.type){if(!Ea(e,0))return t.type=Te;var n=Pd(fo(t.target),t.mapper);xa()||(n=po(e)),t.type=n}return t.type}(t):262144&n?function(t){if(!t.type){var n=t.mappedType;if(!Ea(t,0))return n.containsError=!0,Te;var r=Pd(As(n.target||n),Sd(n.mapper,ks(n),t.keyType)),i=Y&&16777216&t.flags&&!my(r,49152)?yf(r):524288&t.checkFlags?Fh(r,524288):r;xa()||(pr(d,e.Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1,oa(t),ua(n)),i=Te),t.type=i}return t.type}(t):8192&n?function(e){return Zf(e.propertyType,e.mappedType,e.constraintType)}(t):7&t.flags?no(t):9136&t.flags?co(t):8&t.flags?lo(t):98304&t.flags?oo(t):2097152&t.flags?function(e){var t=xr(e);if(!t.type){var n=ri(e);t.type=111551&n.flags?fo(n):Te}return t.type}(t):Te}function ho(t,n){return void 0!==t&&void 0!==n&&0!=(4&e.getObjectFlags(t))&&t.target===n}function go(t){return 4&e.getObjectFlags(t)?t.target:t}function mo(t,n){return function t(r){if(7&e.getObjectFlags(r)){var i=go(r);return i===n||e.some(wo(i),t)}return!!(2097152&r.flags)&&e.some(r.types,t)}(t)}function _o(t,n){for(var r=0,i=n;r0)return!0;if(8650752&e.flags){var t=Ys(e);return!!t&&Do(t)}return!1}function Co(t){return e.getEffectiveBaseTypeNode(t.symbol.valueDeclaration)}function So(t,n,r){var i=e.length(n),a=e.isInJSFile(r);return e.filter(fu(t,1),(function(t){return(a||i>=ku(t.typeParameters))&&i<=e.length(t.typeParameters)}))}function xo(t,n,r){var i=So(t,n,r),a=e.map(n,ld);return e.sameMap(i,(function(t){return e.some(t.typeParameters)?ju(t,a,e.isInJSFile(r)):t}))}function ko(t){if(!t.resolvedBaseConstructorType){var n=t.symbol.valueDeclaration,r=e.getEffectiveBaseTypeNode(n),i=Co(t);if(!i)return t.resolvedBaseConstructorType=Ne;if(!Ea(t,1))return Te;var a=Yy(i.expression);if(r&&i!==r&&(e.Debug.assert(!r.typeArguments),Yy(r.expression)),2621440&a.flags&&Ms(a),!xa())return pr(t.symbol.valueDeclaration,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,oa(t.symbol)),t.resolvedBaseConstructorType=Te;if(!(1&a.flags||a===Pe||Eo(a))){var o=pr(i.expression,e.Diagnostics.Type_0_is_not_a_constructor_function_type,ua(a));if(262144&a.flags){var s=Qu(a),u=Oe;if(s){var c=fu(s,1);c[0]&&(u=Pu(c[0]))}e.addRelatedInfo(o,e.createDiagnosticForNode(a.symbol.declarations[0],e.Diagnostics.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1,oa(a.symbol),ua(u)))}return t.resolvedBaseConstructorType=Te}t.resolvedBaseConstructorType=a}return t.resolvedBaseConstructorType}function To(t,n){pr(t,e.Diagnostics.Type_0_recursively_references_itself_as_a_base_type,ua(n,void 0,2))}function wo(t){if(!t.baseTypesResolved){if(Ea(t,7)&&(8&t.objectFlags?t.resolvedBaseTypes=[Ao(t)]:96&t.symbol.flags?(32&t.symbol.flags&&function(t){t.resolvedBaseTypes=e.resolvingEmptyArray;var n=tu(ko(t));if(!(2621441&n.flags))return t.resolvedBaseTypes=e.emptyArray;var r,i=Co(t),a=n.symbol?Uo(n.symbol):void 0;if(n.symbol&&32&n.symbol.flags&&function(e){var t=e.outerTypeParameters;if(t){var n=t.length-1,r=ic(e);return t[n].symbol!==r[n].symbol}return!0}(a))r=oc(i,n.symbol);else if(1&n.flags)r=n;else{var o=xo(n,i.typeArguments,i);if(!o.length)return pr(i.expression,e.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments),t.resolvedBaseTypes=e.emptyArray;r=Pu(o[0])}if(r===Te)return t.resolvedBaseTypes=e.emptyArray;var s=ou(r);if(!Oo(s)){var u=lu(void 0,r),c=e.chainDiagnosticMessages(u,e.Diagnostics.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members,ua(s));return Zn.add(e.createDiagnosticForNodeFromMessageChain(i.expression,c)),t.resolvedBaseTypes=e.emptyArray}if(t===s||mo(s,t))return pr(t.symbol.valueDeclaration,e.Diagnostics.Type_0_recursively_references_itself_as_a_base_type,ua(t,void 0,2)),t.resolvedBaseTypes=e.emptyArray;t.resolvedBaseTypes===e.resolvingEmptyArray&&(t.members=void 0),t.resolvedBaseTypes=[s]}(t),64&t.symbol.flags&&function(t){t.resolvedBaseTypes=t.resolvedBaseTypes||e.emptyArray;for(var n=0,r=t.symbol.declarations;n0)return;for(var i=1;i1&&(r=void 0===r?i:-1);for(var a=0,o=t[i];a1){var l=s.thisParameter,d=e.forEach(u,(function(e){return e.thisParameter}));d&&(l=Tf(d,al(e.mapDefined(u,(function(e){return e.thisParameter&&fo(e.thisParameter)}))))),(c=ls(s,u)).thisParameter=l}(n||(n=[])).push(c)}}}}if(!e.length(n)&&-1!==r){for(var p=t[void 0!==r?r:0],f=p.slice(),h=function(t){if(t!==p){var n=t[0];if(e.Debug.assert(!!n,"getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"),!(f=n.typeParameters&&e.some(f,(function(e){return!!e.typeParameters}))?void 0:e.map(f,(function(t){return function(t,n){var r=t.declaration,i=function(e,t){for(var n=Vv(e),r=Vv(t),i=n>=r?e:t,a=i===e?t:e,o=i===e?n:r,s=Hv(e)||Hv(t),u=s&&!Hv(i),c=new Array(o+(u?1:0)),l=0;l=zv(i)&&l>=zv(a),h=l>=n?void 0:Pv(e,l),g=l>=r?void 0:Pv(t,l),m=mr(1|(f&&!p?16777216:0),(h===g?h:h?g?void 0:h:g)||"arg"+l);m.type=p?Fc(d):d,c[l]=m}if(u){var _=mr(1,"args");_.type=Fc(Bv(a,o)),c[o]=_}return c}(t,n),a=function(e,t){return e&&t?Tf(e,al([fo(e),fo(t)])):e||t}(t.thisParameter,n.thisParameter),o=Math.max(t.minArgumentCount,n.minArgumentCount),s=us(r,t.typeParameters||n.typeParameters,a,i,void 0,void 0,o,19&(t.flags|n.flags));return s.unionSignatures=e.concatenate(t.unionSignatures||[t],[n]),s}(t,n)}))))return"break"}},g=0,m=t;g0})),r=e.map(t,Do);if(n>0&&n===e.countWhere(r,(function(e){return e}))){var i=r.indexOf(!0);r[i]=!1}return r}function Ds(t){for(var n,r,i,a,o=t.types,s=bs(o),u=e.countWhere(s,(function(e){return e})),c=function(c){var l=t.types[c];if(!s[c]){var d=fu(l,1);d.length&&u>0&&(d=e.map(d,(function(e){var t=cs(e);return t.resolvedReturnType=function(e,t,n,r){for(var i=[],a=0;a=d&&o<=p){var f=p?Vu(l,Tu(a,l.typeParameters,d,i)):cs(l);f.typeParameters=t.localTypeParameters,f.resolvedReturnType=t,s.push(f)}}return s}(l)),t.constructSignatures=i}}}function Ss(t){if(4194304&t.flags){var n=tu(t.type);return sf(n)?Kc(n):fl(n)}if(16777216&t.flags){if(t.root.isDistributive){var r=t.checkType,i=Ss(r);if(i!==r)return Ld(t,Cd(t.root.checkType,i,t.mapper))}return t}return 1048576&t.flags?Xc(e.sameMap(t.types,Ss)):2097152&t.flags?al(e.sameMap(t.types,Ss)):t}function xs(t){var n,r,i=e.createSymbolTable();Hi(t,w,e.emptyArray,e.emptyArray,void 0,void 0);var a=ks(t),o=Ts(t),s=ws(t.target||t),u=As(t.target||t),c=tu(Is(t)),l=Fs(t),d=ee?128:8576;if(Ns(t)){for(var p=0,f=Vs(c);p=50)return e.tracing.instant("check","getImmediateBaseConstraint_DepthLimit",{typeId:i.id,originalTypeId:t.id,depth:k}),pr(d,e.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite),n=!0,i.immediateBaseConstraint=lt;var o=void 0;if(Mp(i,r,r.length)||(r.push(i),k++,o=function(t){if(262144&t.flags){var n=Qu(t);return t.isThisType||!n?n:a(n)}if(3145728&t.flags){for(var r=[],i=0,o=u=t.types;i=7))||it:528&n.flags?Tt:12288&n.flags?kc(K>=2):67108864&n.flags?it:4194304&n.flags?Ze:2&n.flags&&!Y?it:n}function nu(e){return ou(tu(ou(e)))}function ru(t,n){for(var r,i,a,o=1048576&t.flags,s=o?0:16777216,u=4,c=0,l=0,d=t.types;l2?(x.checkFlags|=65536,x.deferralParent=t,x.deferralConstituents=y):x.type=o?Xc(y):al(y),x}}function iu(t,n){var r=t.propertyCache||(t.propertyCache=e.createSymbolTable()),i=r.get(n);return i||(i=ru(t,n))&&r.set(n,i),i}function au(t,n){var r=iu(t,n);return!r||16&e.getCheckFlags(r)?void 0:r}function ou(t){return 1048576&t.flags&&268435456&t.objectFlags?t.resolvedReducedType||(t.resolvedReducedType=function(t){var n=e.sameMap(t.types,ou);if(n===t.types)return t;var r=Xc(n);return 1048576&r.flags&&(r.resolvedReducedType=r),r}(t)):2097152&t.flags?(268435456&t.objectFlags||(t.objectFlags|=268435456|(e.some(Us(t),su)?536870912:0)),536870912&t.objectFlags?qe:t):t}function su(e){return uu(e)||cu(e)}function uu(t){return!(16777216&t.flags||192!=(131264&e.getCheckFlags(t))||!(131072&fo(t).flags))}function cu(t){return!t.valueDeclaration&&!!(1024&e.getCheckFlags(t))}function lu(t,n){if(536870912&e.getObjectFlags(n)){var r=e.find(Us(n),uu);if(r)return e.chainDiagnosticMessages(t,e.Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents,ua(n,void 0,536870912),oa(r));var i=e.find(Us(n),cu);if(i)return e.chainDiagnosticMessages(t,e.Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some,ua(n,void 0,536870912),oa(i))}return t}function du(e,t){if(524288&(e=nu(e)).flags){var n=Ms(e),r=n.members.get(t);if(r&&Li(r))return r;var i=n===ct?bt:n.callSignatures.length?Dt:n.constructSignatures.length?Et:void 0;if(i){var a=js(i,t);if(a)return a}return js(yt,t)}if(3145728&e.flags)return au(e,t)}function pu(t,n){if(3670016&t.flags){var r=Ms(t);return 0===n?r.callSignatures:r.constructSignatures}return e.emptyArray}function fu(e,t){return pu(nu(e),t)}function hu(e,t){if(3670016&e.flags){var n=Ms(e);return 0===t?n.stringIndexInfo:n.numberIndexInfo}}function gu(e,t){var n=hu(e,t);return n&&n.type}function mu(e,t){return hu(nu(e),t)}function _u(e,t){return gu(nu(e),t)}function vu(t,n){if(kf(t)){for(var r=[],i=0,a=Vs(t);i=0),r>=zv(n,3)}var i=e.getImmediatelyInvokedFunctionExpression(t.parent);return!!i&&!t.type&&!t.dotDotDotToken&&t.parent.parameters.indexOf(t)>=i.arguments.length}function Su(t){if(!e.isJSDocPropertyLikeTag(t))return!1;var n=t.isBracketed,r=t.typeExpression;return n||!!r&&307===r.type.kind}function xu(e,t,n,r){return{kind:e,parameterName:t,parameterIndex:n,type:r}}function ku(t){var n,r=0;if(t)for(var i=0;i=r&&o<=a){for(var s=t?t.slice():[],u=o;uc.arguments.length&&!h||Du(p)||(o=i.length)}if(!(167!==t.kind&&168!==t.kind||es(t)||u&&s)){var g=167===t.kind?168:167,m=e.getDeclarationOfKind(Ti(t),g);m&&(s=(n=OC(m))&&n.symbol)}var _=166===t.kind?No(ki(t.parent.symbol)):void 0,v=_?_.localTypeParameters:yu(t);(e.hasRestParameter(t)||e.isInJSFile(t)&&function(t,n){if(e.isJSDocSignature(t)||!Ou(t))return!1;var r=e.lastOrUndefined(t.parameters),i=r?e.getJSDocParameterTags(r):e.getJSDocTags(t).filter(e.isJSDocParameterTag),a=e.firstDefined(i,(function(t){return t.typeExpression&&e.isJSDocVariadicType(t.typeExpression.type)?t.typeExpression.type:void 0})),o=mr(3,"args",32768);return o.type=a?Fc(ld(a.type)):Ot,a&&n.pop(),n.push(o),!0}(t,i))&&(a|=1),r.resolvedSignature=us(t,v,s,i,void 0,void 0,o,a)}return r.resolvedSignature}function Au(t){if(e.isInJSFile(t)&&e.isFunctionLikeDeclaration(t)){var n=e.getJSDocTypeTag(t),r=n&&n.typeExpression&&j_(ld(n.typeExpression));return r&&zu(r)}}function Ou(t){var n=kr(t);return void 0===n.containsArgumentsReference&&(8192&n.flags?n.containsArgumentsReference=!0:n.containsArgumentsReference=function t(n){if(!n)return!1;switch(n.kind){case 78:return"arguments"===n.escapedText&&e.isExpressionNode(n);case 163:case 165:case 167:case 168:return 158===n.name.kind&&t(n.name);default:return!e.nodeStartsNewLexicalEnvironment(n)&&!e.isPartOfTypeNode(n)&&!!e.forEachChild(n,t)}}(t.body)),n.containsArgumentsReference}function Nu(t){if(!t)return e.emptyArray;for(var n=[],r=0;r0&&i.body){var a=t.declarations[r-1];if(i.parent===a.parent&&i.kind===a.kind&&i.pos===a.end)continue}n.push(wu(i))}}return n}function Iu(e){var t=fi(e,e);if(t){var n=_i(t);if(n)return fo(n)}return Se}function Fu(e){if(e.thisParameter)return fo(e.thisParameter)}function Lu(t){if(!t.resolvedTypePredicate){if(t.target){var n=Lu(t.target);t.resolvedTypePredicate=n?(o=n,s=t.mapper,xu(o.kind,o.parameterName,o.parameterIndex,Pd(o.type,s))):ln}else if(t.unionSignatures)t.resolvedTypePredicate=function(e){for(var t,n=[],r=0,i=e;r=0}function Bu(e){if(V(e)){var t=fo(e.parameters[e.parameters.length-1]),n=of(t)?cf(t):t;return n&&_u(n,1)}}function ju(e,t,n,r){var i=Uu(e,Tu(t,e.typeParameters,ku(e.typeParameters),n));if(r){var a=U_(Pu(i));if(a){var o=cs(a);o.typeParameters=r;var s=cs(i);return s.resolvedReturnType=Ku(o),s}}return i}function Uu(t,n){var r=t.instantiations||(t.instantiations=new e.Map),i=Zu(n),a=r.get(i);return a||r.set(i,a=Vu(t,n)),a}function Vu(e,t){return kd(e,function(e,t){return gd(e.typeParameters,t)}(e,t),!0)}function zu(e){return e.typeParameters?e.erasedSignatureCache||(e.erasedSignatureCache=function(e){return kd(e,bd(e.typeParameters),!0)}(e)):e}function Hu(t){return t.typeParameters?t.canonicalSignatureCache||(t.canonicalSignatureCache=function(t){return ju(t,e.map(t.typeParameters,(function(e){return e.target&&!Hs(e.target)?e.target:e})),e.isInJSFile(t.declaration))}(t)):t}function Wu(t){var n=t.typeParameters;if(n){var r=bd(n);return kd(t,gd(n,e.map(n,(function(e){return Pd(Ys(e),r)||Oe}))),!0)}return t}function Ku(t){if(!t.isolatedSignatureType){var n=t.declaration?t.declaration.kind:0,r=166===n||170===n||175===n,i=ji(16);i.members=w,i.properties=e.emptyArray,i.callSignatures=r?e.emptyArray:[t],i.constructSignatures=r?[t]:e.emptyArray,t.isolatedSignatureType=i}return t.isolatedSignatureType}function qu(e){return e.members.get("__index")}function Gu(t,n){var r=1===n?144:147,i=qu(t);if(i)for(var a=0,o=i.declarations;a1&&(t+=":"+a),r+=a}return t}function ec(t,n){for(var r=0,i=0,a=t;ii.length)){var u=s&&e.isExpressionWithTypeArguments(t)&&!e.isJSDocAugmentsTag(t.parent);if(pr(t,o===i.length?u?e.Diagnostics.Expected_0_type_arguments_provide_these_with_an_extends_tag:e.Diagnostics.Generic_type_0_requires_1_type_argument_s:u?e.Diagnostics.Expected_0_1_type_arguments_provide_these_with_an_extends_tag:e.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments,ua(r,void 0,2),o,i.length),!s)return Te}return 173===t.kind&&Mc(t,e.length(t.typeArguments)!==i.length)?rc(r,t,void 0):tc(r,e.concatenate(r.outerTypeParameters,Tu(yc(t),i,o,s)))}return mc(t,n)?r:Te}function sc(t,n){var r=Uo(t);if(r===Ae&&N.has(t.escapedName)&&n&&1===n.length)return _l(t,n[0]);var i=xr(t),a=i.typeParameters,o=Zu(n),s=i.instantiations.get(o);return s||i.instantiations.set(o,s=Pd(r,gd(a,Tu(n,a,ku(a),e.isInJSFile(t.valueDeclaration))))),s}function uc(t){switch(t.kind){case 173:return t.typeName;case 223:var n=t.expression;if(e.isEntityNameExpression(n))return n}}function cc(e,t,n){return e&&di(e,t,n)||Ee}function lc(t,n){if(n===Ee)return Te;if(96&(n=function(t){var n=t.valueDeclaration;if(n&&e.isInJSFile(n)&&!(524288&t.flags)&&!e.getExpandoInitializer(n,!1)){var r=e.isVariableDeclaration(n)?e.getDeclaredExpandoInitializer(n):e.getAssignedExpandoInitializer(n);if(r){var i=Ti(r);if(i)return bv(i,t)}}}(n)||n).flags)return oc(t,n);if(524288&n.flags)return function(t,n){var r=Uo(n),i=xr(n).typeParameters;if(i){var a=e.length(t.typeArguments),o=ku(i);return ai.length?(pr(t,o===i.length?e.Diagnostics.Generic_type_0_requires_1_type_argument_s:e.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments,oa(n),o,i.length),Te):sc(n,yc(t))}return mc(t,n)?r:Te}(t,n);var r=Vo(n);return r?mc(t,n)?rd(r):Te:111551&n.flags&&gc(t)?function(e,t){var n=kr(e);if(!n.resolvedJSDocType){var r=fo(t),i=r;if(t.valueDeclaration){var a=195===e.kind&&e.qualifier;r.symbol&&r.symbol!==t&&a&&(i=lc(e,r.symbol))}n.resolvedJSDocType=i}return n.resolvedJSDocType}(t,n)||(cc(uc(t),788968),fo(n)):Te}function dc(e,t){if(3&t.flags||t===e)return e;var n=qc(e)+">"+qc(t),r=ye.get(n);if(r)return r;var i=Ri(33554432);return i.baseType=e,i.substitute=t,ye.set(n,i),i}function pc(e){return 179===e.kind&&1===e.elements.length}function fc(e,t,n){return pc(t)&&pc(n)?fc(e,t.elements[0],n.elements[0]):Ml(ld(t))===e?ld(n):void 0}function hc(t,n){for(var r;n&&!e.isStatement(n)&&311!==n.kind;){var i=n.parent;if(184===i.kind&&n===i.trueType){var a=fc(t,i.checkType,i.extendsType);a&&(r=e.append(r,a))}n=i}return r?dc(t,al(e.append(r,t))):t}function gc(e){return!!(4194304&e.flags)&&(173===e.kind||195===e.kind)}function mc(t,n){return!t.typeArguments||(pr(t,e.Diagnostics.Type_0_is_not_generic,n?oa(n):t.typeName?e.declarationNameToString(t.typeName):c),!1)}function _c(t){if(e.isIdentifier(t.typeName)){var n=t.typeArguments;switch(t.typeName.escapedText){case"String":return mc(t),Re;case"Number":return mc(t),Me;case"Boolean":return mc(t),He;case"Void":return mc(t),Ke;case"Undefined":return mc(t),Ne;case"Null":return mc(t),Le;case"Function":case"function":return mc(t),bt;case"array":return n&&n.length||X?void 0:Ot;case"promise":return n&&n.length||X?void 0:Qv(Se);case"Object":if(n&&2===n.length){if(e.isJSDocIndexSignature(t)){var r=ld(n[0]),i=Yu(ld(n[1]),!1);return Wi(void 0,w,e.emptyArray,e.emptyArray,r===Re?i:void 0,r===Me?i:void 0)}return Se}return mc(t),X?void 0:Se}}}function vc(t){var n=kr(t);if(!n.resolvedType){if(e.isConstTypeReference(t)&&e.isAssertionExpression(t.parent))return n.resolvedSymbol=Ee,n.resolvedType=Oy(t.parent.expression);var r=void 0,i=void 0,a=788968;gc(t)&&((i=_c(t))||((r=cc(uc(t),a,!0))===Ee?r=cc(uc(t),900095):cc(uc(t),a),i=lc(t,r))),i||(i=lc(t,r=cc(uc(t),a))),n.resolvedSymbol=r,n.resolvedType=i}return n.resolvedType}function yc(t){return e.map(t.typeArguments,ld)}function bc(e){var t=kr(e);return t.resolvedType||(t.resolvedType=rd(Lf(Yy(e.exprName)))),t.resolvedType}function Dc(t,n){function r(e){for(var t=0,n=e.declarations;t=0)return ol(e.map(n,(function(e,n){return 8&t.elementFlags[n]?e:Oe})))?eg(n[o],(function(r){return Hc(t,e.replaceElement(n,o,r))})):Te;if(e.findIndex(n,(function(e,n){return!(!(8&t.elementFlags[n])||58982400&e.flags||Rs(e))}))<0)return tc(t,n);for(var s,u=[],c=[],l=[],d=-1,p=function(o){var s=n[o],u=t.elementFlags[o];8&u?58982400&s.flags||Rs(s)?g(s,8,null===(r=t.labeledElementDeclarations)||void 0===r?void 0:r[o]):of(s)?e.forEach(ic(s),(function(e,t){var n;return g(e,s.target.elementFlags[t],null===(n=s.target.labeledElementDeclarations)||void 0===n?void 0:n[t])})):g(Gp(s)&&_u(s,1)||Te,4,null===(i=t.labeledElementDeclarations)||void 0===i?void 0:i[o]):g(s,u,null===(a=t.labeledElementDeclarations)||void 0===a?void 0:a[o])},f=0;f=0){for(var r=d;ri.fixedLength?function(e){var t=cf(e);return t&&Fc(t)}(t)||Uc(e.emptyArray):Uc(ic(t).slice(n,a),i.elementFlags.slice(n,a),!1,i.labeledElementDeclarations&&i.labeledElementDeclarations.slice(n,a))}function Kc(t){return Xc(e.append(e.arrayOf(t.target.fixedLength,(function(e){return ad(""+e)})),fl(t.target.readonly?St:Ct)))}function qc(e){return e.id}function Gc(t,n){return e.binarySearch(t,n,qc,e.compareValues)>=0}function Yc(t,n){var r=e.binarySearch(t,n,qc,e.compareValues);return r<0&&(t.splice(~r,0,n),!0)}function Jc(t,n,r){var i=r.flags;if(1048576&i)return $c(t,n,r.types);if(!(131072&i))if(n|=205258751&i,469499904&i&&(n|=262144),r===ke&&(n|=8388608),!Y&&98304&i)524288&e.getObjectFlags(r)||(n|=4194304);else{var a=t.length,o=a&&r.id>t[a-1].id?~a:e.binarySearch(t,r,qc,e.compareValues);o<0&&t.splice(~o,0,r)}return n}function $c(e,t,n){for(var r=0,i=n;r0;)for(var o=t[--i],s=0,u=t;s(n?25e6:1e6))return e.tracing.instant("check","removeSubtypes_DepthLimit",{typeIds:t.map((function(e){return e.id}))}),pr(d,e.Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent),!1;if(a++,vp(o,c,ir)&&(!(1&e.getObjectFlags(go(o)))||!(1&e.getObjectFlags(go(c)))||$d(o,c))){e.orderedRemoveItemAt(t,i);break}}}return!0}function Xc(t,n,r,i){if(void 0===n&&(n=1),0===t.length)return qe;if(1===t.length)return t[0];var a=[],o=$c(a,0,t);if(0!==n){if(3&o)return 1&o?8388608&o?ke:Se:Oe;switch(n){case 1:11136&o&&function(t,n){for(var r=t.length;r>0;){var i=t[--r];(128&i.flags&&4&n||256&i.flags&&8&n||2048&i.flags&&64&n||8192&i.flags&&4096&n||id(i)&&Gc(t,i.regularType))&&e.orderedRemoveItemAt(t,r)}}(a,o),128&o&&134217728&o&&function(t){var n=e.filter(t,Sl);if(n.length)for(var r=t.length,i=function(){r--;var i=t[r];128&i.flags&&e.some(n,(function(e){return Yd(i,e)}))&&e.orderedRemoveItemAt(t,r)};r>0;)i()}(a);break;case 2:if(!Qc(a,!(262144&o)))return Te}if(0===a.length)return 65536&o?4194304&o?Le:Pe:32768&o?4194304&o?Ne:Ie:qe}return el(a,(469647395&o?0:262144)|(2097152&o?268435456:0),r,i)}function Zc(e,t){return e.kind===t.kind&&e.parameterIndex===t.parameterIndex}function el(e,t,n,r){if(0===e.length)return qe;if(1===e.length)return e[0];var i=Zu(e),a=fe.get(i);return a||(a=Ri(1048576),fe.set(i,a),a.objectFlags=t|ec(e,98304),a.types=e,a.aliasSymbol=n,a.aliasTypeArguments=r),a}function tl(e,t,n){var r=n.flags;return 2097152&r?nl(e,t,n.types):(hp(n)?16777216&t||(t|=16777216,e.set(n.id.toString(),n)):(3&r?n===ke&&(t|=8388608):!Y&&98304&r||e.has(n.id.toString())||(109440&n.flags&&109440&t&&(t|=67108864),e.set(n.id.toString(),n)),t|=205258751&r),t)}function nl(e,t,n){for(var r=0,i=n;r0;){var i=t[--n];if(134217728&i.flags)for(var a=0,o=r;a0;){var i=t[--r];(4&i.flags&&128&n||8&i.flags&&256&n||64&i.flags&&2048&n||4096&i.flags&&8192&n)&&e.orderedRemoveItemAt(t,r)}}(o,a),16777216&a&&524288&a&&e.orderedRemoveItemAt(o,e.findIndex(o,hp)),0===o.length)return Oe;if(1===o.length)return o[0];var s=Zu(o),u=he.get(s);if(!u){if(1048576&a)if(function(t){var n,r=e.findIndex(t,(function(t){return!!(262144&e.getObjectFlags(t))}));if(r<0)return!1;for(var i=r+1;i=1e5)||(e.tracing.instant("check","checkCrossProductUnion_DepthLimit",{typeIds:t.map((function(e){return e.id})),size:n}),pr(d,e.Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent),!1)}function sl(e,t){var n=Ri(4194304);return n.type=e,n.stringsOnly=t,n}function ul(t){return!(!t||!(16777216&t.flags&&!t.root.isDistributive||137363456&t.flags&&e.some(t.types,ul)||272629760&t.flags&&ul(t.type)||8388608&t.flags&&ul(t.indexType)||33554432&t.flags&&ul(t.substitute)))}function cl(t){return e.isPrivateIdentifier(t)?qe:e.isIdentifier(t)?ad(e.unescapeLeadingUnderscores(t.escapedText)):rd(e.isComputedPropertyName(t)?Em(t):Yy(t))}function ll(t,n){if(!(24&e.getDeclarationModifierFlagsFromSymbol(t))){var r=xr(as(t)).nameType;if(!r&&!e.isKnownSymbol(t))if("default"===t.escapedName)r=ad("default");else{var i=t.valueDeclaration&&e.getNameOfDeclaration(t.valueDeclaration);r=i&&cl(i)||ad(e.symbolName(t))}if(r&&r.flags&n)return r}return qe}function dl(t,n){return Xc(e.map(Vs(t),(function(e){return ll(e,n)})))}function pl(e){var t=mu(e,1);return t!==gn?t:void 0}function fl(t,n,r){return void 0===n&&(n=ee),1048576&(t=ou(t)).flags?al(e.map(t.types,(function(e){return fl(e,n,r)}))):2097152&t.flags?Xc(e.map(t.types,(function(e){return fl(e,n,r)}))):58982400&t.flags||sf(t)||Rs(t)&&ul(ws(t))?function(e,t){return t?e.resolvedStringIndexType||(e.resolvedStringIndexType=sl(e,!0)):e.resolvedIndexType||(e.resolvedIndexType=sl(e,!1))}(t,n):32&e.getObjectFlags(t)?function(e,t){var n=Xh(Ts(e),(function(e){return!(t&&5&e.flags)})),r=e.declaration.nameType&&ld(e.declaration.nameType);return r?eg(n,(function(t){return Pd(r,Sd(e.mapper,ks(e),t))})):n}(t,r):t===ke?ke:2&t.flags?qe:131073&t.flags?Ze:n?!r&&mu(t,0)?Re:dl(t,128):!r&&mu(t,0)?Xc([Re,Me,dl(t,8192)]):pl(t)?Xc([Me,dl(t,8320)]):dl(t,8576)}function hl(t){if(ee)return t;var n=Zt||(Zt=Cc("Extract",524288,e.Diagnostics.Cannot_find_global_type_0));return n?sc(n,[t,Re]):Re}function gl(t,n){var r=e.findIndex(n,(function(e){return!!(1179648&e.flags)}));if(r>=0)return ol(n)?eg(n[r],(function(i){return gl(t,e.replaceElement(n,r,i))})):Te;if(e.contains(n,ke))return ke;var i=[],a=[],o=t[0];if(!function e(t,n){for(var r=0;r=0){if(o&&Qh(n,(function(e){return!e.target.hasRestElement}))&&!(8&s)){var g=El(o);of(n)?pr(g,e.Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2,ua(n),ac(n),e.unescapeLeadingUnderscores(p)):pr(g,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.unescapeLeadingUnderscores(p),ua(n))}return E(mu(n,1)),eg(n,(function(e){var t=cf(e)||Ne;return u?Xc([t,Ne]):t}))}}if(!(98304&r.flags)&&_y(r,402665900)){if(131073&n.flags)return n;var m=mu(n,0),_=_y(r,296)&&mu(n,1)||m;if(_)return 1&s&&_===m?void(d&&pr(d,e.Diagnostics.Type_0_cannot_be_used_to_index_type_1,ua(r),ua(t))):o&&!_y(r,12)?(pr(g=El(o),e.Diagnostics.Type_0_cannot_be_used_as_an_index_type,ua(r)),u?Xc([_.type,Ne]):_.type):(E(_),u?Xc([_.type,Ne]):_.type);if(131072&r.flags)return qe;if(vl(n))return Se;if(d&&!yy(n)){if(n.symbol===oe&&void 0!==p&&oe.exports.has(p)&&418&oe.exports.get(p).flags)pr(d,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.unescapeLeadingUnderscores(p),ua(n));else if(X&&!W.suppressImplicitAnyIndexErrors&&!a)if(void 0!==p&&m_(p,n))pr(d,e.Diagnostics.Property_0_is_a_static_member_of_type_1,p,ua(n));else if(_u(n,1))pr(d.argumentExpression,e.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);else{var v=void 0;if(void 0!==p&&(v=y_(p,n)))void 0!==v&&pr(d.argumentExpression,e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2,p,ua(n),v);else{var y=function(t,n,r){function i(e){var n=js(t,e);if(n){var i=j_(fo(n));return!!i&&zv(i)>=1&&Jd(r,Bv(i,0))}return!1}var a=e.isAssignmentTarget(n)?"set":"get";if(i(a)){var o=e.tryGetPropertyAccessOrIdentifierToString(n.expression);return void 0===o?o=a:o+="."+a,o}}(n,d,r);if(void 0!==y)pr(d,e.Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1,ua(n),y);else{var b=void 0;if(1024&r.flags)b=e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_does_not_exist_on_type_1,"["+ua(r)+"]",ua(n));else if(8192&r.flags){var D=li(r.symbol,d);b=e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_does_not_exist_on_type_1,"["+D+"]",ua(n))}else 128&r.flags||256&r.flags?b=e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_does_not_exist_on_type_1,r.value,ua(n)):12&r.flags&&(b=e.chainDiagnosticMessages(void 0,e.Diagnostics.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,ua(r),ua(n)));b=e.chainDiagnosticMessages(b,e.Diagnostics.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1,ua(i),ua(n)),Zn.add(e.createDiagnosticForNodeFromMessageChain(d,b))}}}return}}return vl(n)?Se:(o&&(g=El(o),384&r.flags?pr(g,e.Diagnostics.Property_0_does_not_exist_on_type_1,""+r.value,ua(n)):12&r.flags?pr(g,e.Diagnostics.Type_0_has_no_matching_index_signature_for_type_1,ua(n),ua(r)):pr(g,e.Diagnostics.Type_0_cannot_be_used_as_an_index_type,ua(r))),wa(r)?r:void 0);function E(t){t&&t.isReadonly&&d&&(e.isAssignmentTarget(d)||e.isDeleteTarget(d))&&pr(d,e.Diagnostics.Index_signature_in_type_0_only_permits_reading,ua(n))}}function El(e){return 202===e.kind?e.argumentExpression:189===e.kind?e.indexType:158===e.kind?e.expression:e}function Cl(e){return-1!==tt.types.indexOf(e)||!!(1&e.flags)}function Sl(t){return!!(134217728&t.flags)&&e.every(t.types,Cl)}function xl(t){return 3145728&t.flags?(4194304&t.objectFlags||(t.objectFlags|=4194304|(e.some(t.types,xl)?8388608:0)),!!(8388608&t.objectFlags)):!!(58982400&t.flags)||Rs(t)||sf(t)}function kl(t){return 3145728&t.flags?(16777216&t.objectFlags||(t.objectFlags|=16777216|(e.some(t.types,kl)?33554432:0)),!!(33554432&t.objectFlags)):!!(465829888&t.flags)&&!Sl(t)}function Tl(e){return!!(262144&e.flags&&e.isThisType)}function wl(t,n){return 8388608&t.flags?function(t,n){var r=n?"simplifiedForWriting":"simplifiedForReading";if(t[r])return t[r]===dt?t:t[r];t[r]=dt;var i=function(e){return 33554432&e.flags?e.substitute:e}(wl(t.objectType,n)),a=wl(t.indexType,n),o=function(t,n,r){if(1048576&n.flags){var i=e.map(n.types,(function(e){return wl(Il(t,e),r)}));return r?al(i):Xc(i)}}(i,a,n);if(o)return t[r]=o;if(!(465829888&a.flags)){var s=Al(i,a,n);if(s)return t[r]=s}if(sf(i)&&296&a.flags){var u=df(i,8&a.flags?0:i.target.fixedLength,0,n);if(u)return t[r]=u}return Rs(i)?t[r]=eg(Nl(i,t.indexType),(function(e){return wl(e,n)})):t[r]=t}(t,n):16777216&t.flags?function(e,t){var n=e.checkType,r=e.extendsType,i=jl(e),a=Ul(e);if(131072&a.flags&&Ml(i)===Ml(n)){if(1&n.flags||Jd(Md(n),Md(r)))return wl(i,t);if(Ol(n,r))return qe}else if(131072&i.flags&&Ml(a)===Ml(n)){if(!(1&n.flags)&&Jd(Md(n),Md(r)))return qe;if(1&n.flags||Ol(n,r))return wl(a,t)}return e}(t,n):t}function Al(t,n,r){if(3145728&t.flags){var i=e.map(t.types,(function(e){return wl(Il(e,n),r)}));return 2097152&t.flags||r?al(i):Xc(i)}}function Ol(e,t){return!!(131072&Xc([_s(e,t),qe]).flags)}function Nl(e,t){var n=gd([ks(e)],[t]),r=Dd(e.mapper,n);return Pd(As(e),r)}function Il(e,t,n,r,i,a,o){return void 0===o&&(o=0),Ll(e,t,n,r,o,i,a)||(r?Te:Oe)}function Fl(e,t){return Qh(e,(function(e){if(384&e.flags){var n=ts(e);if(Dm(n)){var r=+n;return r>=0&&r=5e6)return e.tracing.instant("check","instantiateType_DepthLimit",{typeId:t.id,instantiationDepth:x,instantiationCount:E}),pr(d,e.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite),Te;D++,E++,x++;var r=function(t,n){var r=t.flags;if(262144&r)return md(t,n);if(524288&r){var i=t.objectFlags;if(52&i){if(4&i&&!t.node){var a=t.resolvedTypeArguments,o=fd(a,n);return o!==a?zc(t.target,o):t}return function(t,n){var r=4&t.objectFlags?t.node:t.symbol.declarations[0],i=kr(r),a=4&t.objectFlags?i.resolvedType:64&t.objectFlags?t.target:t,o=i.outerTypeParameters;if(!o){var s=vo(r,!0);if(yv(r)){var u=yu(r);s=e.addRange(s,u)}o=s||e.emptyArray,o=(4&a.objectFlags||2048&a.symbol.flags)&&!a.aliasTypeArguments?e.filter(o,(function(e){return wd(e,r)})):o,i.outerTypeParameters=o}if(o.length){var c=Dd(t.mapper,n),l=e.map(o,(function(e){return md(e,c)})),d=Zu(l);a.instantiations||(a.instantiations=new e.Map,a.instantiations.set(Zu(o),a));var p=a.instantiations.get(d);if(!p){var f=gd(o,l);p=4&a.objectFlags?rc(t.target,t.node,f):32&a.objectFlags?Od(a,f):Fd(a,f),a.instantiations.set(d,p)}return p}return t}(t,n)}return t}if(3145728&r){var s=t.types,u=fd(s,n);return u===s?t:2097152&r?al(u,t.aliasSymbol,fd(t.aliasTypeArguments,n)):Xc(u,1,t.aliasSymbol,fd(t.aliasTypeArguments,n))}if(4194304&r)return fl(Pd(t.type,n));if(134217728&r)return gl(t.texts,fd(t.types,n));if(268435456&r)return _l(t.symbol,Pd(t.type,n));if(8388608&r)return Il(Pd(t.objectType,n),Pd(t.indexType,n),t.noUncheckedIndexedAccessCandidate,void 0,t.aliasSymbol,fd(t.aliasTypeArguments,n));if(16777216&r)return Ld(t,Dd(t.mapper,n));if(33554432&r){var c=Pd(t.baseType,n);if(8650752&c.flags)return dc(c,Pd(t.substitute,n));var l=Pd(t.substitute,n);return 3&l.flags||Jd(Md(c),Md(l))?c:l}return t}(t,n);return x--,r}function Rd(e){return 262143&e.flags?e:e.permissiveInstantiation||(e.permissiveInstantiation=Pd(e,rt))}function Md(e){return 262143&e.flags?e:(e.restrictiveInstantiation||(e.restrictiveInstantiation=Pd(e,nt),e.restrictiveInstantiation.restrictiveInstantiation=e.restrictiveInstantiation),e.restrictiveInstantiation)}function Bd(e,t){return e&&Yu(Pd(e.type,t),e.isReadonly,e.declaration)}function jd(t){switch(e.Debug.assert(165!==t.kind||e.isObjectLiteralMethod(t)),t.kind){case 208:case 209:case 165:case 251:return Ud(t);case 200:return e.some(t.properties,jd);case 199:return e.some(t.elements,jd);case 217:return jd(t.whenTrue)||jd(t.whenFalse);case 216:return(56===t.operatorToken.kind||60===t.operatorToken.kind)&&(jd(t.left)||jd(t.right));case 288:return jd(t.initializer);case 207:return jd(t.expression);case 281:return e.some(t.properties,jd)||e.isJsxOpeningElement(t.parent)&&e.some(t.parent.parent.children,jd);case 280:var n=t.initializer;return!!n&&jd(n);case 283:var r=t.expression;return!!r&&jd(r)}return!1}function Ud(t){return(!e.isFunctionDeclaration(t)||e.isInJSFile(t)&&!!Pa(t))&&(Vd(t)||function(t){return!t.typeParameters&&!e.getEffectiveReturnTypeNode(t)&&!!t.body&&230!==t.body.kind&&jd(t.body)}(t))}function Vd(t){if(!t.typeParameters){if(e.some(t.parameters,(function(t){return!e.getEffectiveTypeAnnotationNode(t)})))return!0;if(209!==t.kind){var n=e.firstOrUndefined(t.parameters);if(!n||!e.parameterIsThisKeyword(n))return!0}}return!1}function zd(t){return(e.isInJSFile(t)&&e.isFunctionDeclaration(t)||fm(t)||e.isObjectLiteralMethod(t))&&Ud(t)}function Hd(t){if(524288&t.flags){var n=Ms(t);if(n.constructSignatures.length||n.callSignatures.length){var r=ji(16,t.symbol);return r.members=n.members,r.properties=n.properties,r.callSignatures=e.emptyArray,r.constructSignatures=e.emptyArray,r}}else if(2097152&t.flags)return al(e.map(t.types,Hd));return t}function Wd(e,t){return vp(e,t,sr)}function Kd(e,t){return vp(e,t,sr)?-1:0}function qd(e,t){return vp(e,t,ar)?-1:0}function Gd(e,t){return vp(e,t,rr)?-1:0}function Yd(e,t){return vp(e,t,rr)}function Jd(e,t){return vp(e,t,ar)}function $d(t,n){return 1048576&t.flags?e.every(t.types,(function(e){return $d(e,n)})):1048576&n.flags?e.some(n.types,(function(e){return $d(t,e)})):58982400&t.flags?$d(Ys(t)||Oe,n):n===yt?!!(67633152&t.flags):n===bt?!!(524288&t.flags)&&Nh(t):mo(t,go(n))||Hp(n)&&!Wp(n)&&$d(t,St)}function Qd(e,t){return vp(e,t,or)}function Xd(e,t){return Qd(e,t)||Qd(t,e)}function Zd(e,t,n,r,i,a){return Dp(e,t,ar,n,r,i,a)}function ep(e,t,n,r,i,a){return tp(e,t,ar,n,r,i,a,void 0)}function tp(e,t,n,r,i,a,o,s){return!!vp(e,t,n)||(!r||!rp(i,e,t,n,a,o,s))&&Dp(e,t,n,r,a,o,s)}function np(t){return!!(16777216&t.flags||2097152&t.flags&&e.some(t.types,np))}function rp(t,n,i,o,s,u,c){if(!t||np(i))return!1;if(!Dp(n,i,o,void 0)&&function(t,n,r,i,a,o,s){for(var u=fu(n,0),c=fu(n,1),l=0,d=[c,u];l1,v=Xh(g,$p),y=Xh(g,(function(e){return!$p(e)}));if(_){if(v!==qe){var b=Uc(Om(d,0));l=op(function(t,n){var r,i,o,s,u;return a(this,(function(a){switch(a.label){case 0:if(!e.length(t.children))return[2];r=0,i=0,a.label=1;case 1:return ic:zv(t)>c))return 0;t.typeParameters&&t.typeParameters!==n.typeParameters&&(t=z_(t,n=Hu(n),void 0,s));var l=Vv(t),d=Kv(t),p=Kv(n);if((d||p)&&Pd(d||p,u),d&&p&&l!==c)return 0;var f=n.declaration?n.declaration.kind:0,h=!(3&r)&&J&&165!==f&&164!==f&&166!==f,g=-1,m=Fu(t);if(m&&m!==Ke){var _=Fu(n);if(_){if(!(C=!h&&s(m,_,!1)||s(_,m,i)))return i&&a(e.Diagnostics.The_this_types_of_each_signature_are_incompatible),0;g&=C}}for(var v=d||p?Math.min(l,c):Math.max(l,c),y=d||p?v-1:-1,b=0;b=zv(t)&&b0||IE(u));if(h&&!function(e,t,n){for(var r=0,i=Vs(e);r0&&B(Pu(g[0]),c,!1)||_.length>0&&B(Pu(_[0]),c,!1)?P(e.Diagnostics.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it,ua(u),ua(c)):P(e.Diagnostics.Type_0_has_no_properties_in_common_with_type_1,ua(u),ua(c))}return 0}var v=0,y=I();if(1048576&u.flags?v=i===or?V(u,c,r&&!(131068&u.flags),s):function(e,t,n,r){for(var i=-1,a=e.types,o=0;o0;if(d&&D--,524288&i.flags&&524288&s.flags){var p=l;M(i,s,r),l!==p&&(d=!!l)}if(524288&i.flags&&131068&s.flags)!function(t,n){var r=da(t.symbol)?ua(t,t.symbol.valueDeclaration):ua(t),i=da(n.symbol)?ua(n,n.symbol.valueDeclaration):ua(n);(xt===t&&Re===n||kt===t&&Me===n||Tt===t&&He===n||kc(!1)===t&&We===n)&&P(e.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible,i,r)}(i,s);else if(i.symbol&&524288&i.flags&&yt===i)P(e.Diagnostics.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);else if(c&&2097152&s.flags){var f=s.types,h=Fm(O.IntrinsicAttributes,a),g=Fm(O.IntrinsicClassAttributes,a);if(h!==Te&&g!==Te&&(e.contains(f,h)||e.contains(f,g)))return u}else l=lu(l,n);if(!o&&d)return m=[i,s],u;R(o,i,s)}}}function j(e,t){for(var n=-1,r=0,i=e.types;r25)return e.tracing.instant("check","typeRelatedToDiscriminatedType_DepthLimit",{sourceId:t.id,targetId:n.id,numCombinations:a}),0;for(var u=new Array(r.length),c=new e.Set,l=0;l5?P(e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more,ua(n),ua(r),e.map(m.slice(0,4),(function(e){return oa(e)})).join(", "),m.length-4):P(e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2,ua(n),ua(r),e.map(m,(function(e){return oa(e)})).join(", ")),s&&l&&D++)}function $(t,n,r,a,o){if(i===sr)return function(e,t,n){if(!(524288&e.flags&&524288&t.flags))return 0;var r=q(Bs(e),n),i=q(Bs(t),n);if(r.length!==i.length)return 0;for(var a=-1,o=0,s=r;o0||fu(t,r=1).length>0)return e.find(n.types,(function(e){return fu(e,r).length>0}))}(t,n)||function(t,n){for(var r,i=0,a=0,o=n.types;a=i&&(r=s,i=c)}else Xp(u)&&1>=i&&(r=s,i=1)}return r}(t,n)}function Sp(t,n,r,i,a){for(var o=t.types.map((function(e){})),s=0,u=n;s0&&e.every(n.properties,(function(e){return!!(16777216&e.flags)}))}return!!(2097152&t.flags)&&e.every(t.types,xp)}function kp(t,n,r){var i=tc(t,e.map(t.typeParameters,(function(e){return e===n?r:e})));return i.objectFlags|=8192,i}function Tp(e){var t=xr(e);return wp(t.typeParameters,t,(function(n,r,i){var a=sc(e,fd(t.typeParameters,_d(r,i)));return a.aliasTypeArgumentsContainsMarker=!0,a}))}function wp(t,n,r){var i,a,o;void 0===t&&(t=e.emptyArray);var s=n.variances;if(!s){e.tracing.push("check","getVariancesWorker",{arity:t.length,id:null!==(o=null!==(i=n.id)&&void 0!==i?i:null===(a=n.declaredType)||void 0===a?void 0:a.id)&&void 0!==o?o:-1}),n.variances=e.emptyArray,s=[];for(var u=function(e){var t=!1,i=!1,a=un;un=function(e){return e?i=!0:t=!0};var o=r(n,e,ft),u=r(n,e,ht),c=(Jd(u,o)?1:0)|(Jd(o,u)?2:0);3===c&&Jd(r(n,e,cn),o)&&(c=4),un=a,(t||i)&&(t&&(c|=8),i&&(c|=16)),s.push(c)},c=0,l=t;c":r+="-"+o.id}return r}function Fp(e,t,n,r){if(r===sr&&e.id>t.id){var i=e;e=t,t=i}var a=n?":"+n:"";if(Np(e)&&Np(t)){var o=[];return Ip(e,o)+","+Ip(t,o)+a}return e.id+","+t.id+a}function Lp(t,n){if(!(6&e.getCheckFlags(t)))return n(t);for(var r=0,i=t.containingType.types;r=5){var r=Bp(e);if(r)for(var i=0,a=0;a=5)return!0}return!1}function Bp(t){if(524288&t.flags&&!dh(t)){if(e.getObjectFlags(t)&&t.node)return t.node;if(t.symbol&&!(16&e.getObjectFlags(t)&&32&t.symbol.flags))return t.symbol;if(of(t))return t.target}if(8388608&t.flags){do{t=t.objectType}while(8388608&t.flags);return t}if(16777216&t.flags)return t.root}function jp(e,t){return 0!==Up(e,t,Kd)}function Up(t,n,r){if(t===n)return-1;var i=24&e.getDeclarationModifierFlagsFromSymbol(t);if(i!==(24&e.getDeclarationModifierFlagsFromSymbol(n)))return 0;if(i){if(KD(t)!==KD(n))return 0}else if((16777216&t.flags)!=(16777216&n.flags))return 0;return dy(t)!==dy(n)?0:r(fo(t),fo(n))}function Vp(t,n,r,i,a,o){if(t===n)return-1;if(!function(e,t,n){var r=Vv(e),i=Vv(t),a=zv(e),o=zv(t),s=Hv(e),u=Hv(t);return r===i&&a===o&&s===u||!!(n&&a<=o)}(t,n,r))return 0;if(e.length(t.typeParameters)!==e.length(n.typeParameters))return 0;if(n.typeParameters){for(var s=gd(t.typeParameters,n.typeParameters),u=0;u-1&&(Nr(o,o.name.escapedText,788968,void 0,o.name.escapedText,!0)||o.name.originalKeywordKind&&e.isTypeNodeKind(o.name.originalKeywordKind))){var s="arg"+o.parent.parameters.indexOf(o);return void hr(X,t,e.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1,s,e.declarationNameToString(o.name))}a=t.dotDotDotToken?X?e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type:e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:X?e.Diagnostics.Parameter_0_implicitly_has_an_1_type:e.Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 198:if(a=e.Diagnostics.Binding_element_0_implicitly_has_an_1_type,!X)return;break;case 308:return void pr(t,e.Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,i);case 251:case 165:case 164:case 167:case 168:case 208:case 209:if(X&&!t.name)return void pr(t,3===r?e.Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation:e.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,i);a=X?3===r?e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:e.Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage;break;case 190:return void(X&&pr(t,e.Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type));default:a=X?e.Diagnostics.Variable_0_implicitly_has_an_1_type:e.Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage}hr(X,t,a,e.declarationNameToString(e.getNameOfDeclaration(t)),i)}}function Bf(t,n,r){!(i&&X&&524288&e.getObjectFlags(n))||r&&hm(t)||Rf(n)||Mf(t,n,r)}function jf(e,t,n){var r=Vv(e),i=Vv(t),a=Wv(e),o=Wv(t),s=o?i-1:i,u=a?s:Math.min(r,s),c=Fu(e);if(c){var l=Fu(t);l&&n(c,l)}for(var d=0;d0?u.indexOf(d,c):c0)for(var E=0,C=n;Ee.target.minLength||!t.target.hasRestElement&&(e.target.hasRestElement||t.target.fixedLength0&&4&t.target.elementFlags[s-1]?ic(t)[s-1]:void 0,m=12&n.target.combinedFlags?f?lf(n):Math.min(lf(t),lf(n)):0,_=f?0:m;for(d=0;d1){var n=e.filter(t,dh);if(n.length){var r=Xc(n,2);return e.concatenate(e.filter(t,(function(e){return!dh(e)})),[r])}}return t}(t.candidates),i=function(e){var t=Hs(e);return!!t&&my(16777216&t.flags?Ks(t):t,406978556)}(t.typeParameter),a=!i&&t.topLevel&&(t.isFixed||!$f(Pu(n),t.typeParameter)),o=i?e.sameMap(r,rd):a?e.sameMap(r,tf):r;return Lf(208&t.priority?Xc(o,2):function(t){if(!Y)return zp(t);var n=e.filter(t,(function(e){return!(98304&e.flags)}));return n.length?vf(zp(n),98304&ff(t)):Xc(t,2)}(o))}function hh(t,n){var r=t.inferences[n];if(!r.inferredType){var i=void 0,a=t.signature;if(a){var o=r.candidates?fh(r,a):void 0;if(r.contraCandidates){var s=ph(r);i=!o||131072&o.flags||!Yd(o,s)?s:o}else if(o)i=o;else if(1&t.flags)i=Ge;else{var u=Zs(r.typeParameter);u&&(i=Pd(u,Ed(function(t,n){return vd((function(r){return e.findIndex(t.inferences,(function(e){return e.typeParameter===r}))>=n?Oe:r}))}(t,n),t.nonFixingMapper)))}}else i=nh(r);r.inferredType=i||gh(!!(2&t.flags));var c=Hs(r.typeParameter);if(c){var l=Pd(c,t.nonFixingMapper);i&&t.compareTypes(i,os(l,i))||(r.inferredType=i=l)}}return r.inferredType}function gh(e){return e?Se:Oe}function mh(e){for(var t=[],n=0;n=0&&n.parameterIndex=r&&u-1){var l=a.filter((function(e){return void 0!==e})),d=u=2||0==(34&n.flags)||e.isSourceFile(n.valueDeclaration)||287===n.valueDeclaration.parent.kind)){for(var r=e.getEnclosingBlockScopeContainer(n.valueDeclaration),i=function(t,n){return!!e.findAncestor(t,(function(t){return t===n?"quit":e.isFunctionLike(t)}))}(t.parent,r),a=r,o=!1;a&&!e.nodeStartsNewLexicalEnvironment(a);){if(e.isIterationStatement(a,!1)){o=!0;break}a=a.parent}if(o){if(i){var s=!0;if(e.isForStatement(r)&&(d=e.getAncestor(n.valueDeclaration,250))&&d.parent===r){var u=function(t,n){return e.findAncestor(t,(function(e){return e===n?"quit":e===n.initializer||e===n.condition||e===n.incrementor||e===n.statement}))}(t.parent,r);if(u){var c=kr(u);c.flags|=131072;var l=c.capturedBlockScopeBindings||(c.capturedBlockScopeBindings=[]);e.pushIfUnique(l,n),u===r.initializer&&(s=!1)}}s&&(kr(a).flags|=65536)}var d;e.isForStatement(r)&&(d=e.getAncestor(n.valueDeclaration,250))&&d.parent===r&&function(t,n){for(var r=t;207===r.parent.kind;)r=r.parent;var i=!1;if(e.isAssignmentTarget(r))i=!0;else if(214===r.parent.kind||215===r.parent.kind){var a=r.parent;i=45===a.operator||46===a.operator}return!!i&&!!e.findAncestor(r,(function(e){return e===n?"quit":e===n.statement}))}(t,r)&&(kr(n.valueDeclaration).flags|=4194304),kr(n.valueDeclaration).flags|=524288}i&&(kr(n.valueDeclaration).flags|=262144)}}(t,n);var s=wg(fo(i),t),u=e.getAssignmentTargetKind(t);if(u){if(!(3&i.flags||e.isInJSFile(t)&&512&i.flags))return pr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable,oa(n)),Te;if(dy(i))return 3&i.flags?pr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant,oa(n)):pr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property,oa(n)),Te}var c=2097152&i.flags;if(3&i.flags){if(1===u)return s}else{if(!c)return s;o=e.find(n.declarations,j)}if(!o)return s;for(var l=160===e.getRootDeclaration(o).kind,d=Eg(o),p=Eg(t),f=p!==d,h=t.parent&&t.parent.parent&&e.isSpreadAssignment(t.parent)&&jh(t.parent.parent),g=134217728&n.flags;p!==d&&(208===p.kind||209===p.kind||e.isObjectLiteralOrClassExpressionMethod(p))&&(xg(i)||l&&!Cg(i));)p=Eg(p);var m=l||c||f||h||g||e.isBindingElement(o)||s!==xe&&s!==Nt&&(!Y||0!=(16387&s.flags)||yh(t)||270===t.parent.kind)||225===t.parent.kind||249===o.kind&&o.exclamationToken||8388608&o.flags,_=Dg(t,s,m?l?function(e,t){if(Ea(t.symbol,2)){var n=Y&&160===t.kind&&t.initializer&&32768&hf(e)&&!(32768&hf(Yy(t.initializer)));return xa(),n?Fh(e,524288):e}return po(t.symbol),e}(s,o):s:s===xe||s===Nt?Ne:yf(s),p,!m);if(pg(t)||s!==xe&&s!==Nt){if(!m&&!(32768&hf(s))&&32768&hf(_))return pr(t,e.Diagnostics.Variable_0_is_used_before_being_assigned,oa(n)),s}else if(_===xe||_===Nt)return X&&(pr(e.getNameOfDeclaration(o),e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined,oa(n),ua(_)),pr(t,e.Diagnostics.Variable_0_implicitly_has_an_1_type,oa(n),ua(_))),$b(_);return u?ef(_):_}function Ng(e,t){kr(e).flags|=2,163===t.kind||166===t.kind?kr(t.parent).flags|=4:kr(t).flags|=4}function Ig(t){return e.isSuperCall(t)?t:e.isFunctionLike(t)?void 0:e.forEachChild(t,Ig)}function Fg(e){return ko(Uo(Ti(e)))===Pe}function Lg(t,n,r){var i=n.parent;e.getClassExtendsHeritageElement(i)&&!Fg(i)&&t.flowNode&&!bg(t.flowNode,!1)&&pr(t,r)}function Pg(t){var n=e.getThisContainer(t,!0),r=!1;switch(166===n.kind&&Lg(t,n,e.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class),209===n.kind&&(n=e.getThisContainer(n,!1),r=!0),n.kind){case 256:pr(t,e.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);break;case 255:pr(t,e.Diagnostics.this_cannot_be_referenced_in_current_location);break;case 166:Mg(t,n)&&pr(t,e.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);break;case 163:case 162:!e.hasSyntacticModifier(n,32)||99===W.target&&W.useDefineForClassFields||pr(t,e.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);break;case 158:pr(t,e.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name)}r&&K<2&&Ng(t,n);var i=Rg(t,!0,n);if(Z){var a=fo(oe);if(i===a&&r)pr(t,e.Diagnostics.The_containing_arrow_function_captures_the_global_value_of_this);else if(!i){var o=pr(t,e.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);if(!e.isSourceFile(n)){var s=Rg(n);s&&s!==a&&e.addRelatedInfo(o,e.createDiagnosticForNode(n,e.Diagnostics.An_outer_value_of_this_is_shadowed_by_this_container))}}}return i||Se}function Rg(t,n,r){void 0===n&&(n=!0),void 0===r&&(r=e.getThisContainer(t,!1));var i=e.isInJSFile(t);if(e.isFunctionLike(r)&&(!Wg(t)||e.getThisParameter(r))){var a=ao(r)||i&&function(t){var n=e.getJSDocType(t);if(n&&308===n.kind){var r=n;if(r.parameters.length>0&&r.parameters[0].name&&"this"===r.parameters[0].name.escapedText)return ld(r.parameters[0].type)}var i=e.getJSDocThisTag(t);if(i&&i.typeExpression)return ld(i.typeExpression)}(r);if(!a){var o=function(t){return 208===t.kind&&e.isBinaryExpression(t.parent)&&3===e.getAssignmentDeclarationKind(t.parent)?t.parent.left.expression.expression:165===t.kind&&200===t.parent.kind&&e.isBinaryExpression(t.parent.parent)&&6===e.getAssignmentDeclarationKind(t.parent.parent)?t.parent.parent.left.expression:208===t.kind&&288===t.parent.kind&&200===t.parent.parent.kind&&e.isBinaryExpression(t.parent.parent.parent)&&6===e.getAssignmentDeclarationKind(t.parent.parent.parent)?t.parent.parent.parent.left.expression:208===t.kind&&e.isPropertyAssignment(t.parent)&&e.isIdentifier(t.parent.name)&&("value"===t.parent.name.escapedText||"get"===t.parent.name.escapedText||"set"===t.parent.name.escapedText)&&e.isObjectLiteralExpression(t.parent.parent)&&e.isCallExpression(t.parent.parent.parent)&&t.parent.parent.parent.arguments[2]===t.parent.parent&&9===e.getAssignmentDeclarationKind(t.parent.parent.parent)?t.parent.parent.parent.arguments[0].expression:e.isMethodDeclaration(t)&&e.isIdentifier(t.name)&&("value"===t.name.escapedText||"get"===t.name.escapedText||"set"===t.name.escapedText)&&e.isObjectLiteralExpression(t.parent)&&e.isCallExpression(t.parent.parent)&&t.parent.parent.arguments[2]===t.parent&&9===e.getAssignmentDeclarationKind(t.parent.parent)?t.parent.parent.arguments[0].expression:void 0}(r);if(i&&o){var s=Yy(o).symbol;s&&s.members&&16&s.flags&&(a=Uo(s).thisType)}else yv(r)&&(a=Uo(ki(r.symbol)).thisType);a||(a=Vg(r))}if(a)return Dg(t,a)}if(e.isClassLike(r.parent)){var u=Ti(r.parent);return Dg(t,e.hasSyntacticModifier(r,32)?fo(u):Uo(u).thisType)}if(e.isSourceFile(r)){if(r.commonJsModuleIndicator){var c=Ti(r);return c&&fo(c)}if(r.externalModuleIndicator)return Ne;if(n)return fo(oe)}}function Mg(t,n){return!!e.findAncestor(t,(function(t){return e.isFunctionLikeDeclaration(t)?"quit":160===t.kind&&t.parent===n}))}function Bg(t){var n=203===t.parent.kind&&t.parent.expression===t,r=e.getSuperContainer(t,!0),i=r,a=!1;if(!n)for(;i&&209===i.kind;)i=e.getSuperContainer(i,!0),a=K<2;var o=0;if(!function(t){return!!t&&(n?166===t.kind:!(!e.isClassLike(t.parent)&&200!==t.parent.kind)&&(e.hasSyntacticModifier(t,32)?165===t.kind||164===t.kind||167===t.kind||168===t.kind:165===t.kind||164===t.kind||167===t.kind||168===t.kind||163===t.kind||162===t.kind||166===t.kind))}(i)){var s=e.findAncestor(t,(function(e){return e===i?"quit":158===e.kind}));return s&&158===s.kind?pr(t,e.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name):n?pr(t,e.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):i&&i.parent&&(e.isClassLike(i.parent)||200===i.parent.kind)?pr(t,e.Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class):pr(t,e.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions),Te}if(n||166!==r.kind||Lg(t,i,e.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class),o=e.hasSyntacticModifier(i,32)||n?512:256,kr(t).flags|=o,165===i.kind&&e.hasSyntacticModifier(i,256)&&(e.isSuperProperty(t.parent)&&e.isAssignmentTarget(t.parent)?kr(i).flags|=4096:kr(i).flags|=2048),a&&Ng(t.parent,i),200===i.parent.kind)return K<2?(pr(t,e.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher),Te):Se;var u=i.parent;if(!e.getClassExtendsHeritageElement(u))return pr(t,e.Diagnostics.super_can_only_be_referenced_in_a_derived_class),Te;var c=Uo(Ti(u)),l=c&&wo(c)[0];return l?166===i.kind&&Mg(t,i)?(pr(t,e.Diagnostics.super_cannot_be_referenced_in_constructor_arguments),Te):512===o?ko(c):os(l,c.thisType):Te}function jg(t){return 4&e.getObjectFlags(t)&&t.target===At?ic(t)[0]:void 0}function Ug(t){return eg(t,(function(t){return 2097152&t.flags?e.forEach(t.types,jg):jg(t)}))}function Vg(t){if(209!==t.kind){if(zd(t)){var n=gm(t);if(n){var r=n.thisParameter;if(r)return fo(r)}}var i=e.isInJSFile(t);if(Z||i){var a=function(e){return 165!==e.kind&&167!==e.kind&&168!==e.kind||200!==e.parent.kind?208===e.kind&&288===e.parent.kind?e.parent.parent:void 0:e.parent}(t);if(a){for(var o=am(a),s=a,u=o;u;){var c=Ug(u);if(c)return Pd(c,Gf(cm(a)));if(288!==s.parent.kind)break;u=am(s=s.parent.parent)}return Lf(o?bf(o):Oy(a))}var l=e.walkUpParenthesizedExpressions(t.parent);if(216===l.kind&&62===l.operatorToken.kind){var d=l.left;if(e.isAccessExpression(d)){var p=d.expression;if(i&&e.isIdentifier(p)){var f=e.getSourceFileOfNode(l);if(f.commonJsModuleIndicator&&vh(p)===f.symbol)return}return Lf(Oy(p))}}}}}function zg(t){var n=t.parent;if(zd(n)){var r=e.getImmediatelyInvokedFunctionExpression(n);if(r&&r.arguments){var i=Q_(r),a=n.parameters.indexOf(t);if(t.dotDotDotToken)return K_(i,a,i.length,Se,void 0,0);var o=kr(r),s=o.resolvedSignature;o.resolvedSignature=dn;var u=a=0?void 0:fo(o);if(of(t)){var s=cf(t);if(s&&Dm(n)&&+n>=0)return s}return Dm(n)&&Zg(t,1)||Zg(t,0)}var u}),!0)}function Zg(e,t){return eg(e,(function(e){return gu(e,t)}),!0)}function em(e,t){var n=am(e.parent,t);if(n){if(!es(e)){var r=Xg(n,Ti(e).escapedName);if(r)return r}return ym(e.name)&&Zg(n,1)||Zg(n,0)}}function tm(e,t){return e&&(Xg(e,""+t)||eg(e,(function(e){return lD(1,e,Ne,void 0,!1)}),!0))}function nm(t){var n=t.parent;return e.isJsxAttributeLike(n)?um(t):e.isJsxElement(n)?function(t,n){var r=am(t.openingElement.tagName),i=Bm(Rm(t));if(r&&!wa(r)&&i&&""!==i){var a=e.getSemanticJsxChildren(t.children),o=a.indexOf(n),s=Xg(r,i);return s&&(1===a.length?s:eg(s,(function(e){return Gp(e)?Il(e,ad(o)):e}),!0))}}(n,t):void 0}function rm(t){if(e.isJsxAttribute(t)){var n=am(t.parent);if(!n||wa(n))return;return Xg(n,t.name.escapedText)}return um(t.parent)}function im(e){switch(e.kind){case 10:case 8:case 9:case 14:case 109:case 94:case 103:case 78:case 150:return!0;case 201:case 207:return im(e.expression);case 283:return!e.expression||im(e.expression)}return!1}function am(t,n){var r=om(e.isObjectLiteralMethod(t)?function(t,n){if(e.Debug.assert(e.isObjectLiteralMethod(t)),!(16777216&t.flags))return em(t,n)}(t,n):um(t,n),t,n);if(r&&!(n&&2&n&&8650752&r.flags)){var i=eg(r,tu,!0);if(1048576&i.flags){if(e.isObjectLiteralExpression(t))return function(t,n){return Sp(n,e.map(e.filter(t.properties,(function(e){return!!e.symbol&&288===e.kind&&im(e.initializer)&&kh(n,e.symbol.escapedName)})),(function(e){return[function(){return Yy(e.initializer)},e.symbol.escapedName]})),Jd,n)}(t,i);if(e.isJsxAttributes(t))return function(t,n){return Sp(n,e.map(e.filter(t.properties,(function(e){return!!e.symbol&&280===e.kind&&kh(n,e.symbol.escapedName)&&(!e.initializer||im(e.initializer))})),(function(e){return[e.initializer?function(){return Yy(e.initializer)}:function(){return Ve},e.symbol.escapedName]})),Jd,n)}(t,i)}return i}}function om(t,n,r){if(t&&my(t,465829888)){var i=cm(n);if(i&&e.some(i.inferences,Vy)){if(r&&1&r)return sm(t,i.nonFixingMapper);if(i.returnMapper)return sm(t,i.returnMapper)}}return t}function sm(t,n){return 465829888&t.flags?Pd(t,n):1048576&t.flags?Xc(e.map(t.types,(function(e){return sm(e,n)})),0):2097152&t.flags?al(e.map(t.types,(function(e){return sm(e,n)}))):t}function um(t,n){if(16777216&t.flags);else{if(t.contextualType)return t.contextualType;var r=t.parent;switch(r.kind){case 249:case 160:case 163:case 162:case 198:return function(t,n){var r=t.parent;if(e.hasInitializer(r)&&t===r.initializer){var i=Hg(r);if(i)return i;if(!(8&n)&&e.isBindingPattern(r.name))return Qa(r.name,!0,!1)}}(t,n);case 209:case 242:return function(t){var n=e.getContainingFunction(t);if(n){var r=qg(n);if(r){var i=e.getFunctionFlags(n);if(1&i){var a=mD(r,2&i?2:1,void 0);if(!a)return;r=a.returnType}if(2&i){var o=eg(r,vb);return o&&Xc([o,Xv(o)])}return r}}}(t);case 219:return function(t){var n=e.getContainingFunction(t);if(n){var r=e.getFunctionFlags(n),i=qg(n);if(i)return t.asteriskToken?i:ID(0,i,0!=(2&r))}}(r);case 213:return function(e,t){var n=um(e,t);if(n){var r=vb(n);return r&&Xc([r,Xv(r)])}}(r,n);case 203:if(99===r.expression.kind)return Re;case 204:return Gg(r,t);case 206:case 224:return e.isConstTypeReference(r.type)?function(t){if(e.isCallLikeExpression(t.parent))return Gg(t.parent,t)}(r):ld(r.type);case 216:return Jg(t,n);case 288:case 289:return em(r,n);case 290:return am(r.parent,n);case 199:var i=r;return tm(am(i,n),e.indexOfNode(i.elements,t));case 217:return function(e,t){var n=e.parent;return e===n.whenTrue||e===n.whenFalse?um(n,t):void 0}(t,n);case 228:return e.Debug.assert(218===r.parent.kind),function(e,t){if(205===e.parent.kind)return Gg(e.parent,t)}(r.parent,t);case 207:var a=e.isInJSFile(r)?e.getJSDocTypeTag(r):void 0;return a?ld(a.typeExpression.type):um(r,n);case 283:return nm(r);case 280:case 282:return rm(r);case 275:case 274:return function(t,n){return e.isJsxOpeningElement(t)&&t.parent.contextualType&&4!==n?t.parent.contextualType:Yg(t,0)}(r,n)}}}function cm(t){var n=e.findAncestor(t,(function(e){return!!e.inferenceContext}));return n&&n.inferenceContext}function lm(t,n){return 0!==G_(n)?function(e,t){var n=Gv(e,Oe);n=dm(t,Rm(t),n);var r=Fm(O.IntrinsicAttributes,t);return r!==Te&&(n=_s(r,n)),n}(t,n):function(t,n){var r,i=Rm(n),a=(r=i,Mm(O.ElementAttributesPropertyNameContainer,r)),o=void 0===a?Gv(t,Oe):""===a?Pu(t):function(e,t){if(e.unionSignatures){for(var n=[],r=0,i=e.unionSignatures;r=2)return tc(o,u=Tu([s,r],o.typeParameters,2,e.isInJSFile(t)));if(e.length(o.aliasTypeArguments)>=2){var u=Tu([s,r],o.aliasTypeArguments,2,e.isInJSFile(t));return sc(o.aliasSymbol,u)}}return r}function pm(t,n){var r=fu(t,0);if(1===r.length){var i=r[0];if(!function(t,n){for(var r=0;r0&&(s=Ql(s,P(),t.symbol,g,l),o=[],a=e.createSymbolTable(),_=!1,v=!1),!km(w=ou(Yy(x.expression))))return pr(x,e.Diagnostics.Spread_types_may_only_be_created_from_object_types),Te;i&&Nm(w,i,x),s=Ql(s,w,t.symbol,g,l),E=o.length;continue}e.Debug.assert(167===x.kind||168===x.kind),pE(x)}!T||8576&T.flags?a.set(k.escapedName,k):Jd(T,Xe)&&(Jd(T,Me)?v=!0:_=!0,r&&(m=!0)),o.push(k)}if(c&&290!==t.parent.kind)for(var F=0,L=Vs(u);F0&&(s=Ql(s,P(),t.symbol,g,l),o=[],a=e.createSymbolTable(),_=!1,v=!1),eg(s,(function(e){return e===it?P():e}))):P();function P(){var n=_?Cm(t,E,o,0):void 0,i=v?Cm(t,E,o,1):void 0,s=Wi(t.symbol,a,e.emptyArray,e.emptyArray,n,i);return s.objectFlags|=1048704|g,h&&(s.objectFlags|=16384),m&&(s.objectFlags|=512),r&&(s.pattern=t),s}}function km(t){if(465829888&t.flags){var n=Ys(t);if(void 0!==n)return km(n)}return!!(126615553&t.flags||117632&hf(t)&&km(gf(t))||3145728&t.flags&&e.every(t.types,km))}function Tm(t){return!e.stringContains(t,"-")}function wm(t){return 78===t.kind&&e.isIntrinsicJsxName(t.escapedText)}function Am(e,t){return e.initializer?Ry(e.initializer,t):Ve}function Om(e,t){for(var n=[],r=0,i=e.children;r0&&(s=Ql(s,S(),i.symbol,l,!1),o=e.createSymbolTable()),wa(m=ou(Oy(h.expression,n)))&&(u=!0),km(m)?(s=Ql(s,m,i.symbol,l,!1),a&&Nm(m,a,h)):r=r?al([r,m]):m}u||o.size>0&&(s=Ql(s,S(),i.symbol,l,!1));var v=273===t.parent.kind?t.parent:void 0;if(v&&v.openingElement===t&&v.children.length>0){var y=Om(v,n);if(!u&&d&&""!==d){c&&pr(i,e.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten,e.unescapeLeadingUnderscores(d));var b=am(t.attributes),D=b&&Xg(b,d),E=mr(4,d);E.type=1===y.length?y[0]:D&&$h(D,Jp)?Uc(y):Fc(Xc(y)),E.valueDeclaration=e.factory.createPropertySignature(void 0,e.unescapeLeadingUnderscores(d),void 0,void 0),e.setParent(E.valueDeclaration,i),E.valueDeclaration.symbol=E;var C=e.createSymbolTable();C.set(d,E),s=Ql(s,Wi(i.symbol,C,e.emptyArray,e.emptyArray,void 0,void 0),i.symbol,l,!1)}}return u?Se:r&&s!==at?al([r,s]):r||(s===at?S():s);function S(){l|=te;var t=Wi(i.symbol,o,e.emptyArray,e.emptyArray,void 0,void 0);return t.objectFlags|=1048704|l,t}}(t.parent,n)}function Fm(e,t){var n=Rm(t),r=n&&Ei(n),i=r&&wr(r,e,788968);return i?Uo(i):Te}function Lm(t){var n=kr(t);if(!n.resolvedSymbol){var r=Fm(O.IntrinsicElements,t);if(r!==Te){if(!e.isIdentifier(t.tagName))return e.Debug.fail();var i=du(r,t.tagName.escapedText);return i?(n.jsxFlags|=1,n.resolvedSymbol=i):_u(r,0)?(n.jsxFlags|=2,n.resolvedSymbol=r.symbol):(pr(t,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.idText(t.tagName),"JSX."+O.IntrinsicElements),n.resolvedSymbol=Ee)}return X&&pr(t,e.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists,e.unescapeLeadingUnderscores(O.IntrinsicElements)),n.resolvedSymbol=Ee}return n.resolvedSymbol}function Pm(t){var n=t&&e.getSourceFileOfNode(t),r=n&&kr(n);if(!r||!1!==r.jsxImplicitImportContainer){if(r&&r.jsxImplicitImportContainer)return r.jsxImplicitImportContainer;var i=e.getJSXRuntimeImport(e.getJSXImplicitImportBase(W,n),W);if(i){var a=gi(t,i,e.getEmitModuleResolutionKind(W)===e.ModuleResolutionKind.Classic?e.Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option:e.Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations,t),o=a&&a!==Ee?ki(ni(a)):void 0;return r&&(r.jsxImplicitImportContainer=o||!1),o}}}function Rm(e){var t=e&&kr(e);if(t&&t.jsxNamespace)return t.jsxNamespace;if(!t||!1!==t.jsxNamespace){var n=Pm(e);if(!n||n===Ee){var r=lr(e);n=Nr(e,r,1920,void 0,r,!1)}if(n){var i=ni(wr(Ei(ni(n)),O.JSX,1920));if(i&&i!==Ee)return t&&(t.jsxNamespace=i),i}t&&(t.jsxNamespace=!1)}var a=ni(Cc(O.JSX,1920,void 0));return a!==Ee?a:void 0}function Mm(t,n){var r=n&&wr(n.exports,t,788968),i=r&&Uo(r),a=i&&Vs(i);if(a){if(0===a.length)return"";if(1===a.length)return a[0].escapedName;a.length>1&&pr(r.declarations[0],e.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property,e.unescapeLeadingUnderscores(t))}}function Bm(e){return Mm(O.ElementChildrenAttributeNameContainer,e)}function jm(t,n){if(4&t.flags)return[dn];if(128&t.flags){var r=Um(t,n);return r?[gv(n,r)]:(pr(n,e.Diagnostics.Property_0_does_not_exist_on_type_1,t.value,"JSX."+O.IntrinsicElements),e.emptyArray)}var i=tu(t),a=fu(i,1);return 0===a.length&&(a=fu(i,0)),0===a.length&&1048576&i.flags&&(a=gs(e.map(i.types,(function(e){return jm(e,n)})))),a}function Um(t,n){var r=Fm(O.IntrinsicElements,n);if(r!==Te){var i=t.value,a=du(r,e.escapeLeadingUnderscores(i));return a?fo(a):_u(r,0)||void 0}return Se}function Vm(t){e.Debug.assert(wm(t.tagName));var n=kr(t);if(!n.resolvedJsxElementAttributesType){var r=Lm(t);return 1&n.jsxFlags?n.resolvedJsxElementAttributesType=fo(r):2&n.jsxFlags?n.resolvedJsxElementAttributesType=_u(Uo(r),0):n.resolvedJsxElementAttributesType=Te}return n.resolvedJsxElementAttributesType}function zm(e){var t=Fm(O.ElementClass,e);if(t!==Te)return t}function Hm(e){return Fm(O.Element,e)}function Wm(e){var t=Hm(e);if(t)return Xc([t,Le])}function Km(t){var n,r=e.isJsxOpeningLikeElement(t);if(r&&function(t){DC(t,t.typeArguments);for(var n=new e.Map,r=0,i=t.attributes.properties;r=0)return d>=zv(r)&&(Hv(r)||ds)return!1;if(o||a>=u)return!0;for(var p=a;p=i&&n.length<=r}function j_(e){return V_(e,0,!1)}function U_(e){return V_(e,0,!1)||V_(e,1,!1)}function V_(e,t,n){if(524288&e.flags){var r=Ms(e);if(n||0===r.properties.length&&!r.stringIndexInfo&&!r.numberIndexInfo){if(0===t&&1===r.callSignatures.length&&0===r.constructSignatures.length)return r.callSignatures[0];if(1===t&&1===r.constructSignatures.length&&0===r.callSignatures.length)return r.constructSignatures[0]}}}function z_(t,n,r,i){var a=Vf(t.typeParameters,t,0,i),o=Wv(n),s=r&&(o&&262144&o.flags?r.nonFixingMapper:r.mapper);return jf(s?kd(n,s):n,t,(function(e,t){sh(a.inferences,e,t)})),r||Uf(n,t,(function(e,t){sh(a.inferences,e,t,64)})),ju(t,mh(a),e.isInJSFile(n.declaration))}function H_(t,n,r,i,a){if(e.isJsxOpeningLikeElement(t))return function(e,t,n,r){var i=lm(t,e),a=Ay(e.attributes,i,r,n);return sh(r.inferences,a,i),mh(r)}(t,n,i,a);if(161!==t.kind){var o=um(t,e.every(n.typeParameters,(function(e){return!!Zs(e)}))?8:0);if(o){var s=cm(t),u=Pd(o,Gf(function(t,n){return void 0===n&&(n=0),t&&zf(e.map(t.inferences,qf),t.signature,t.flags|n,t.compareTypes)}(s,1))),c=j_(u),l=c&&c.typeParameters?Ku(Uu(c,c.typeParameters)):u,d=Pu(n);sh(a.inferences,l,d,64);var p=Vf(n.typeParameters,n,a.flags),f=Pd(o,s&&s.returnMapper);sh(p.inferences,f,d),a.returnMapper=e.some(p.inferences,Vy)?Gf(function(t){var n=e.filter(t.inferences,Vy);return n.length?zf(e.map(n,qf),t.signature,t.flags,t.compareTypes):void 0}(p)):void 0}}var h=Kv(n),g=h?Math.min(Vv(n)-1,r.length):r.length;if(h&&262144&h.flags){var m=e.find(a.inferences,(function(e){return e.typeParameter===h}));m&&(m.impliedArity=e.findIndex(r,F_,g)<0?r.length-g:void 0)}var _=Fu(n);if(_){var v=J_(t),y=v?Yy(v):Ke;sh(a.inferences,y,_)}for(var b=0;b=r-1&&F_(d=t[r-1]))return W_(227===d.kind?d.type:Ay(d.expression,i,a,o));for(var s=[],u=[],c=[],l=n;ld&&(d=v)}}if(!l)return!0;for(var y=1/0,b=0,D=i;b0||e.isJsxOpeningElement(t)&&t.parent.children.length>0?[t.attributes]:e.emptyArray;var i=t.arguments||e.emptyArray,a=L_(i);if(a>=0){for(var o=i.slice(0,a),s=function(t){var n=i[t],r=220===n.kind&&(Tn?Yy(n.expression):Oy(n.expression));r&&of(r)?e.forEach(ic(r),(function(e,t){var i,a=r.target.elementFlags[t],s=$_(n,4&a?Fc(e):e,!!(12&a),null===(i=r.target.labeledElementDeclarations)||void 0===i?void 0:i[t]);o.push(s)})):o.push(n)},u=a;us&&(s=f),c-1;c<=o&&y&&c--;var b=_||y?_&&y?e.Diagnostics.Expected_at_least_0_arguments_but_got_1_or_more:_?e.Diagnostics.Expected_at_least_0_arguments_but_got_1:e.Diagnostics.Expected_0_arguments_but_got_1_or_more:1===v&&0===c&&function(t){if(!e.isCallExpression(t)||!e.isIdentifier(t.expression))return!1;var n=Nr(t.expression,t.expression.escapedText,111551,void 0,void 0,!1),r=null==n?void 0:n.valueDeclaration;if(!(r&&e.isParameter(r)&&fm(r.parent)&&e.isNewExpression(r.parent.parent)&&e.isIdentifier(r.parent.parent.expression)))return!1;var i=wc(!1);return!!i&&xE(r.parent.parent.expression,!0)===i}(t)?e.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise:e.Diagnostics.Expected_0_arguments_but_got_1;if(i&&zv(i)>c&&i.declaration){var D=i.declaration.parameters[i.thisParameter?c+1:c];D&&(m=e.createDiagnosticForNode(D,e.isBindingPattern(D.name)?e.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided:e.isRestParameter(D)?e.Diagnostics.Arguments_for_the_rest_parameter_0_were_not_provided:e.Diagnostics.An_argument_for_0_was_not_provided,D.name?e.isBindingPattern(D.name)?void 0:e.idText(e.getFirstIdentifier(D.name)):c))}if(ac&&C?r.indexOf(C):Math.min(o,r.length-1)))}}else g=e.factory.createNodeArray(r.slice(o));var S=e.first(g).pos,x=e.last(g).end;x===S&&x++,e.setTextRangePosEnd(g,S,x);var k=e.createDiagnosticForNodeArray(e.getSourceFileOfNode(t),g,b,v,c);return m?e.addRelatedInfo(k,m):k}function nv(n,r,a,o,s,u){var c,l=205===n.kind,d=161===n.kind,p=e.isJsxOpeningLikeElement(n),f=!a&&i;d||(c=n.typeArguments,(l||p||105!==n.expression.kind)&&e.forEach(c,lE));var h=a||[];if(function(t,n,r){var i,a,o,s,u=0,c=-1;e.Debug.assert(!n.length);for(var l=0,d=t;l1&&(v=q(h,rr,b,E)),v||(v=q(h,ar,b,E)),v)return v;if(f)if(g)if(1===g.length||g.length>3){var C,S=g[g.length-1];g.length>3&&(C=e.chainDiagnosticMessages(C,e.Diagnostics.The_last_overload_gave_the_following_error),C=e.chainDiagnosticMessages(C,e.Diagnostics.No_overload_matches_this_call));var x=Y_(n,y,S,ar,0,!0,(function(){return C}));if(x)for(var k=0,T=x;k3&&e.addRelatedInfo(w,e.createDiagnosticForNode(S.declaration,e.Diagnostics.The_last_overload_is_declared_here)),K(S,w),Zn.add(w)}else e.Debug.fail("No error for last overload signature")}else{for(var A=[],O=0,N=Number.MAX_VALUE,I=0,F=0,L=function(t){var r=Y_(n,y,t,ar,0,!0,(function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.Overload_0_of_1_2_gave_the_following_error,F+1,h.length,sa(t))}));r?(r.length<=N&&(N=r.length,I=F),O=Math.max(O,r.length),A.push(r)):e.Debug.fail("No error for 3 or fewer overload signatures"),F++},P=0,R=g;P1?A[I]:e.flatten(A);e.Debug.assert(M.length>0,"No errors reported for 3 or fewer overload signatures");var B=e.chainDiagnosticMessages(e.map(M,(function(e){return"string"==typeof e.messageText?e:e.messageText})),e.Diagnostics.No_overload_matches_this_call),j=t(e.flatMap(M,(function(e){return e.relatedInformation}))),U=void 0;if(e.every(M,(function(e){return e.start===M[0].start&&e.length===M[0].length&&e.file===M[0].file}))){var H=M[0];U={file:H.file,start:H.start,length:H.length,code:B.code,category:B.category,messageText:B,relatedInformation:j}}else U=e.createDiagnosticForNodeFromMessageChain(n,B,j);K(g[0],U),Zn.add(U)}else if(m)Zn.add(tv(n,[m],y));else if(_)q_(_,n.typeArguments,!0,u);else{var W=e.filter(r,(function(e){return B_(e,c)}));0===W.length?Zn.add(function(t,n,r){var i=r.length;if(1===n.length){var a=ku((d=n[0]).typeParameters),o=e.length(d.typeParameters);return e.createDiagnosticForNodeArray(e.getSourceFileOfNode(t),r,e.Diagnostics.Expected_0_type_arguments_but_got_1,ai?u=Math.min(u,p):o0),pE(t),i||1===n.length||n.some((function(e){return!!e.typeParameters}))?function(t,n,r){var i=function(e,t){for(var n=-1,r=-1,i=0;i=t)return i;o>r&&(r=o,n=i)}return n}(n,void 0===se?r.length:se),a=n[i],o=a.typeParameters;if(!o)return a;var s=O_(t)?t.typeArguments:void 0,u=s?Vu(a,function(e,t,n){for(var r=e.map(kE);r.length>t.length;)r.pop();for(;r.length1?e.find((null===(i=t.declaration)||void 0===i?void 0:i.symbol.declarations)||e.emptyArray,(function(t){return e.isFunctionLikeDeclaration(t)&&e.nodeIsPresent(t.body)})):void 0;if(u){var c=wu(u),l=!c.typeParameters;q([c],ar,l)&&e.addRelatedInfo(n,e.createDiagnosticForNode(u,e.Diagnostics.The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible))}g=a,m=o,_=s}function q(t,r,i,a){if(void 0===a&&(a=!1),g=void 0,m=void 0,_=void 0,i){var o=t[0];if(e.some(c)||!M_(n,y,o,a))return;return Y_(n,y,o,r,0,!1,void 0)?void(g=[o]):o}for(var s=0;s=0&&pr(t.arguments[i],e.Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher)}var a=Zm(t.expression);if(a===Ge)return hn;if((a=tu(a))===Te)return I_(t);if(wa(a))return t.typeArguments&&pr(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),N_(t);var o=fu(a,1);if(o.length){if(!function(t,n){if(!n||!n.declaration)return!0;var r=n.declaration,i=e.getSelectedEffectiveModifierFlags(r,24);if(!i||166!==r.kind)return!0;var a=e.getClassLikeDeclarationOfSymbol(r.parent.symbol),o=Uo(r.parent.symbol);if(!EE(t,a)){var s=e.getContainingClass(t);if(s&&16&i){var u=kE(s);if(cv(r.parent.symbol,u))return!0}return 8&i&&pr(t,e.Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration,ua(o)),16&i&&pr(t,e.Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration,ua(o)),!1}return!0}(t,o[0]))return I_(t);var s=a.symbol&&e.getClassLikeDeclarationOfSymbol(a.symbol);return s&&e.hasSyntacticModifier(s,128)?(pr(t,e.Diagnostics.Cannot_create_an_instance_of_an_abstract_class),I_(t)):nv(t,o,n,r,0)}var u=fu(a,0);if(u.length){var c=nv(t,u,n,r,0);return X||(c.declaration&&!yv(c.declaration)&&Pu(c)!==Ke&&pr(t,e.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword),Fu(c)===Ke&&pr(t,e.Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void)),c}return dv(t.expression,a,1),I_(t)}function cv(t,n){var r=wo(n);if(!e.length(r))return!1;var i=r[0];if(2097152&i.flags){for(var a=bs(i.types),o=0,s=0,u=i.types;s0;if(1048576&n.flags){for(var u=!1,c=0,l=n.types;c=r-1)return n===r-1?a:Fc(Il(a,Me));for(var o=[],s=[],u=[],c=n;c0&&(a=t.parameters.length-1+u)}}if(void 0===a){if(!r&&16&t.flags)return 0;a=t.minArgumentCount}if(i)return a;for(var c=a-1;c>=0&&!(131072&Xh(Bv(t,c),P_).flags);c--)a=c;t.resolvedMinArgumentCount=a}return t.resolvedMinArgumentCount}function Hv(e){if(V(e)){var t=fo(e.parameters[e.parameters.length-1]);return!of(t)||t.target.hasRestElement}return!1}function Wv(e){if(V(e)){var t=fo(e.parameters[e.parameters.length-1]);if(!of(t))return t;if(t.target.hasRestElement)return Wc(t,t.target.fixedLength)}}function Kv(e){var t=Wv(e);return!t||Hp(t)||wa(t)||0!=(131072&ou(t).flags)?void 0:t}function qv(e){return Gv(e,qe)}function Gv(e,t){return e.parameters.length>0?Bv(e,0):t}function Yv(t,n){t.typeParameters=n.typeParameters,n.thisParameter&&(!(a=t.thisParameter)||a.valueDeclaration&&!a.valueDeclaration.type)&&(a||(t.thisParameter=Tf(n.thisParameter,void 0)),Jv(t.thisParameter,fo(n.thisParameter)));for(var r=t.parameters.length-(V(t)?1:0),i=0;i0&&(r=Xc(l,2)):c=qe;var d=function(t,n){var r=[],i=[],a=0!=(2&e.getFunctionFlags(t));return e.forEachYieldExpression(t.body,(function(t){var o,s=t.expression?Yy(t.expression,n):Ie;if(e.pushIfUnique(r,ny(t,s,Se,a)),t.asteriskToken){var u=mD(s,a?19:17,t.expression);o=u&&u.nextType}else o=um(t);o&&e.pushIfUnique(i,o)})),{yieldTypes:r,nextTypes:i}}(t,n),p=d.yieldTypes,f=d.nextTypes;i=e.some(p)?Xc(p,2):void 0,a=e.some(f)?al(f):void 0}else{var h=oy(t,n);if(!h)return 2&o?Zv(t,qe):qe;if(0===h.length)return 2&o?Zv(t,Ke):Ke;r=Xc(h,2)}if(r||i||a){if(i&&Bf(t,i,3),r&&Bf(t,r,1),a&&Bf(t,a,2),r&&Xp(r)||i&&Xp(i)||a&&Xp(a)){var g=hm(t),m=g?g===wu(t)?u?void 0:r:om(Pu(g),t):void 0;u?(i=af(i,m,0,s),r=af(r,m,1,s),a=af(a,m,2,s)):r=function(e,t,n){return e&&Xp(e)&&(e=rf(e,t?n?mb(t):t:void 0)),e}(r,m,s)}i&&(i=Lf(i)),r&&(r=Lf(r)),a&&(a=Lf(a))}return u?ty(i||qe,r||c,a||Kg(2,t)||Oe,s):s?Qv(r||c):r||c}function ty(e,t,n,r){var i=r?Dn:En,a=i.getGlobalGeneratorType(!1);if(e=i.resolveIterationType(e,void 0)||Oe,t=i.resolveIterationType(t,void 0)||Oe,n=i.resolveIterationType(n,void 0)||Oe,a===ut){var o=i.getGlobalIterableIteratorType(!1),s=o!==ut?bD(o,i):void 0,u=s?s.returnType:Se,c=s?s.nextType:Ne;return Jd(t,u)&&Jd(c,n)?o!==ut?Nc(o,[e]):(i.getGlobalIterableIteratorType(!0),it):(i.getGlobalGeneratorType(!0),it)}return Nc(a,[e,t,n])}function ny(t,n,r,i){var a=t.expression||t,o=t.asteriskToken?cD(i?19:17,n,r,a):n;return i?vb(o,a,t.asteriskToken?e.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:e.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):o}function ry(e,t,n,r){var i=0;if(r){for(var a=t;a=0;)switch(t=i.expr[a],i.state[a]){case 0:if(e.isInJSFile(t)&&e.getAssignedExpandoInitializer(t)){c(Yy(t.right,n));break}if(Ty(t),62===(o=t.operatorToken.kind)&&(200===t.left.kind||199===t.left.kind)){c(Cy(t.left,Yy(t.right,n),n,107===t.right.kind));break}l(1),d(t.left);break;case 1:var o,s=r;i.leftType[a]=s,55!==(o=t.operatorToken.kind)&&56!==o&&60!==o||iD(s,t.left),l(2),d(t.right);break;case 2:s=i.leftType[a];var u=r;c(wy(t.left,t.operatorToken,t.right,s,u,t));break;default:return e.Debug.fail("Invalid state "+i.state[a]+" for checkBinaryExpression")}return r;function c(e){r=e,a--}function l(e){i.state[a]=e}function d(t){e.isBinaryExpression(t)?(a++,i.expr[a]=t,i.state[a]=0,i.leftType[a]=void 0):r=Yy(t,n)}}function Ty(t){var n=t.left,r=t.operatorToken,i=t.right;60===r.kind&&(!e.isBinaryExpression(n)||56!==n.operatorToken.kind&&55!==n.operatorToken.kind||zC(n,e.Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses,e.tokenToString(n.operatorToken.kind),e.tokenToString(r.kind)),!e.isBinaryExpression(i)||56!==i.operatorToken.kind&&55!==i.operatorToken.kind||zC(i,e.Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses,e.tokenToString(i.operatorToken.kind),e.tokenToString(r.kind)))}function wy(t,n,r,a,o,s){var u=n.kind;switch(u){case 41:case 42:case 65:case 66:case 43:case 67:case 44:case 68:case 40:case 64:case 47:case 69:case 48:case 70:case 49:case 71:case 51:case 73:case 52:case 77:case 50:case 72:if(a===Ge||o===Ge)return Ge;a=a_(a,t),o=a_(o,r);var c=void 0;if(528&a.flags&&528&o.flags&&void 0!==(c=function(e){switch(e){case 51:case 73:return 56;case 52:case 77:return 37;case 50:case 72:return 55;default:return}}(n.kind)))return pr(s||n,e.Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead,e.tokenToString(n.kind),e.tokenToString(c)),Me;var l,d=cy(t,a,e.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type,!0),p=cy(r,o,e.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type,!0);if(_y(a,3)&&_y(o,3)||!my(a,2112)&&!my(o,2112))l=Me;else if(E(a,o)){switch(u){case 49:case 71:k();break;case 42:case 66:K<3&&pr(s,e.Diagnostics.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later)}l=Be}else k(E),l=Te;return d&&p&&S(l),l;case 39:case 63:if(a===Ge||o===Ge)return Ge;_y(a,402653316)||_y(o,402653316)||(a=a_(a,t),o=a_(o,r));var f=void 0;if(_y(a,296,!0)&&_y(o,296,!0)?f=Me:_y(a,2112,!0)&&_y(o,2112,!0)?f=Be:_y(a,402653316,!0)||_y(o,402653316,!0)?f=Re:(wa(a)||wa(o))&&(f=a===Te||o===Te?Te:Se),f&&!C(u))return f;if(!f){var h=402655727;return k((function(e,t){return _y(e,h)&&_y(t,h)})),Se}return 63===u&&S(f),f;case 29:case 31:case 32:case 33:return C(u)&&(a=ef(a_(a,t)),o=ef(a_(o,r)),x((function(e,t){return Qd(e,t)||Qd(t,e)||Jd(e,et)&&Jd(t,et)}))),He;case 34:case 35:case 36:case 37:return x((function(e,t){return xy(e,t)||xy(t,e)})),He;case 101:return function(t,n,r,i){return r===Ge||i===Ge?Ge:(!wa(r)&&vy(r,131068)&&pr(t,e.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),wa(i)||IE(i)||Yd(i,bt)||pr(n,e.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type),He)}(t,r,a,o);case 100:return function(t,n,r,i){return r===Ge||i===Ge?Ge:(r=a_(r,t),i=a_(i,n),vy(r,402665900)||_y(r,407109632)||pr(t,e.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol),vy(i,126091264)||pr(n,e.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),He)}(t,r,a,o);case 55:case 75:var g=4194304&Ih(a)?Xc([mf(Y?a:ef(o)),o]):a;return 75===u&&S(o),g;case 56:case 74:var m=8388608&Ih(a)?Xc([gf(a),o],2):a;return 74===u&&S(o),m;case 60:case 76:var _=262144&Ih(a)?Xc([bf(a),o],2):a;return 76===u&&S(o),_;case 62:var v=e.isBinaryExpression(t.parent)?e.getAssignmentDeclarationKind(t.parent):0;return function(t,n){if(2===t)for(var r=0,i=Bs(n);r1&&t.charCodeAt(n-1)>=48&&t.charCodeAt(n-1)<=57;)n--;for(var r=t.slice(0,n),i=1;;i++){var a=r+i;if(!zy(e,a))return a}}function Wy(e){var t=j_(e);if(t&&!t.typeParameters)return Pu(t)}function Ky(t){var n=qy(t);if(n)return n;if(67108864&t.flags&&an){var r=an[L(t)];if(r)return r}var i=On,a=Yy(t);return On!==i&&((an||(an=[]))[L(t)]=a,e.setNodeFlags(t,67108864|t.flags)),a}function qy(t){var n=e.skipParentheses(t);if(!e.isCallExpression(n)||105===n.expression.kind||e.isRequireCall(n,!0)||Sv(n)){if(e.isAssertionExpression(n)&&!e.isConstTypeReference(n.type))return ld(n.type);if(8===t.kind||10===t.kind||109===t.kind||94===t.kind)return Yy(t)}else{var r=e.isCallChain(n)?function(e){var t=Yy(e.expression),n=xf(t,e.expression),r=Wy(t);return r&&Sf(r,e,n!==t)}(n):Wy(Zm(n.expression));if(r)return r}}function Gy(e){var t=kr(e);if(t.contextFreeType)return t.contextFreeType;var n=e.contextualType;e.contextualType=Se;try{return t.contextFreeType=Yy(e,4)}finally{e.contextualType=n}}function Yy(t,n,r){e.tracing.push("check","checkExpression",{kind:t.kind,pos:t.pos,end:t.end});var a=d;d=t,E=0;var s=jy(t,function(t,n,r){var a=t.kind;if(o)switch(a){case 221:case 208:case 209:o.throwIfCancellationRequested()}switch(a){case 78:return Og(t);case 107:return Pg(t);case 105:return Bg(t);case 103:return Pe;case 14:case 10:return nd(ad(t.text));case 8:return KC(t),nd(ad(+t.text));case 9:return function(t){!(e.isLiteralTypeNode(t.parent)||e.isPrefixUnaryExpression(t.parent)&&e.isLiteralTypeNode(t.parent.parent))&&K<7&&zC(t,e.Diagnostics.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020)}(t),nd(function(t){return ad({negative:!1,base10Value:e.parsePseudoBigInt(t.text)})}(t));case 109:return Ve;case 94:return je;case 218:return function(t){for(var n=[t.head.text],r=[],i=0,a=t.templateSpans;i=2||!e.hasRestParameter(t)||8388608&t.flags||e.nodeIsMissing(t.body)||e.forEach(t.parameters,(function(t){t.name&&!e.isBindingPattern(t.name)&&t.name.escapedText===ue.escapedName&&dr("noEmit",t,e.Diagnostics.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)}))}(t);var r=e.getEffectiveReturnTypeNode(t);if(X&&!r)switch(t.kind){case 170:pr(t,e.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 169:pr(t,e.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type)}if(r){var a=e.getFunctionFlags(t);if(1==(5&a)){var o=ld(r);if(o===Ke)pr(r,e.Diagnostics.A_generator_cannot_have_a_void_type_annotation);else{var s=ID(0,o,0!=(2&a))||Se;Zd(ty(s,ID(1,o,0!=(2&a))||s,ID(2,o,0!=(2&a))||Oe,!!(2&a)),o,r)}}else 2==(3&a)&&function(t,n){var r=ld(n);if(K>=2){if(r===Te)return;var i=Tc(!0);if(i!==ut&&!ho(r,i))return void pr(n,e.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0,ua(vb(r)||Ke))}else{if(function(t){Db(t&&e.getEntityNameFromTypeNode(t))}(n),r===Te)return;var a=e.getEntityNameFromTypeNode(n);if(void 0===a)return void pr(n,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,ua(r));var o=di(a,111551,!0),s=o?fo(o):Te;if(s===Te)return void(78===a.kind&&"Promise"===a.escapedText&&go(r)===Tc(!1)?pr(n,e.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option):pr(n,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,e.entityNameToString(a)));var u=Ut||(Ut=Sc("PromiseConstructorLike",0,!0))||it;if(u===it)return void pr(n,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,e.entityNameToString(a));if(!Zd(s,u,n,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value))return;var c=a&&e.getFirstIdentifier(a),l=wr(t.locals,c.escapedText,111551);if(l)return void pr(l.valueDeclaration,e.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,e.idText(c),e.entityNameToString(a))}_b(r,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)}(t,r)}171!==t.kind&&308!==t.kind&&Ab(t)}}function Zy(t){for(var n=new e.Map,r=0,i=t.members;r0&&n.declarations[0]!==t)return}var r=qu(Ti(t));if(r)for(var i=!1,a=!1,o=0,s=r.declarations;o=0)return void(n&&pr(n,e.Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));Xn.push(t.id);var s=vb(o,n,r,i);if(Xn.pop(),!s)return;return a.awaitedTypeOfType=s}if(!function(e){var t=Ta(e,"then");return!!t&&fu(Fh(t,2097152),0).length>0}(t))return a.awaitedTypeOfType=t;if(n){if(!r)return e.Debug.fail();pr(n,r,i)}}function bb(t){var n=vv(t);Ev(n,t);var r=Pu(n);if(!(1&r.flags)){var i,a,o=fv(t);switch(t.parent.kind){case 252:i=Xc([fo(Ti(t.parent)),Ke]);break;case 160:i=Ke,a=e.chainDiagnosticMessages(void 0,e.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);break;case 163:i=Ke,a=e.chainDiagnosticMessages(void 0,e.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);break;case 165:case 167:case 168:i=Xc([Ic(kE(t.parent)),Ke]);break;default:return e.Debug.fail()}Zd(r,i,t,o,(function(){return a}))}}function Db(t){if(t){var n=e.getFirstIdentifier(t),r=2097152|(78===t.kind?788968:1920),i=Nr(n,n.escapedText,r,void 0,void 0,!0);i&&2097152&i.flags&&Li(i)&&!HE(ri(i))&&!oi(i)&&ui(i)}}function Eb(t){var n=Cb(t);n&&e.isEntityName(n)&&Db(n)}function Cb(e){if(e)switch(e.kind){case 183:case 182:return Sb(e.types);case 184:return Sb([e.trueType,e.falseType]);case 186:case 192:return Cb(e.type);case 173:return e.typeName}}function Sb(t){for(var n,r=0,i=t;r=e.ModuleKind.ES2015)&&(Wb(t,n,"require")||Wb(t,n,"exports"))&&(!e.isModuleDeclaration(t)||1===e.getModuleInstanceState(t))){var r=ka(t);297===r.kind&&e.isExternalOrCommonJsModule(r)&&dr("noEmit",n,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,e.declarationNameToString(n),e.declarationNameToString(n))}}function Jb(t,n){if(!(K>=4)&&Wb(t,n,"Promise")&&(!e.isModuleDeclaration(t)||1===e.getModuleInstanceState(t))){var r=ka(t);297===r.kind&&e.isExternalOrCommonJsModule(r)&&2048&r.flags&&dr("noEmit",n,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,e.declarationNameToString(n),e.declarationNameToString(n))}}function $b(e){return e===xe?Se:e===Nt?Ot:e}function Qb(t){var n;if(kb(t),e.isBindingElement(t)||lE(t.type),t.name){if(158===t.name.kind&&(Em(t.name),t.initializer&&Oy(t.initializer)),198===t.kind){196===t.parent.kind&&K<99&&fC(t,4),t.propertyName&&158===t.propertyName.kind&&Em(t.propertyName);var r=t.parent.parent,i=Aa(r),a=t.propertyName||t.name;if(i&&!e.isBindingPattern(a)){var o=cl(a);if($o(o)){var s=du(i,ts(o));s&&(C_(s,void 0,!1),Qm(r,!!r.initializer&&105===r.initializer.kind,i,s))}}}if(e.isBindingPattern(t.name)&&(197===t.name.kind&&K<2&&W.downlevelIteration&&fC(t,512),e.forEach(t.name.elements,lE)),t.initializer&&e.isParameterDeclaration(t)&&e.nodeIsMissing(e.getContainingFunction(t).body))pr(t,e.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);else if(e.isBindingPattern(t.name)){var u=t.initializer&&238!==t.parent.parent.kind,c=0===t.name.elements.length;if(u||c){var l=Xa(t);if(u){var d=Oy(t.initializer);Y&&c?o_(d,t):ep(d,Xa(t),t,t.initializer)}c&&(e.isArrayBindingPattern(t.name)?cD(65,l,Ne,t):Y&&o_(l,t))}}else{var p=Ti(t);if(2097152&p.flags&&e.isRequireVariableDeclaration(t,!0))nE(t);else{var f=$b(fo(p));if(t===p.valueDeclaration){var h=e.getEffectiveInitializer(t);h&&(e.isInJSFile(t)&&e.isObjectLiteralExpression(h)&&(0===h.properties.length||e.isPrototypeAccess(t.name))&&(null===(n=p.exports)||void 0===n?void 0:n.size)||238===t.parent.parent.kind||ep(Oy(h),f,t,h,void 0)),p.declarations.length>1&&e.some(p.declarations,(function(n){return n!==t&&e.isVariableLike(n)&&!Zb(n,t)}))&&pr(t.name,e.Diagnostics.All_declarations_of_0_must_have_identical_modifiers,e.declarationNameToString(t.name))}else{var g=$b(Xa(t));f===Te||g===Te||Wd(f,g)||67108864&p.flags||Xb(p.valueDeclaration,f,t,g),t.initializer&&ep(Oy(t.initializer),g,t,t.initializer,void 0),Zb(t,p.valueDeclaration)||pr(t.name,e.Diagnostics.All_declarations_of_0_must_have_identical_modifiers,e.declarationNameToString(t.name))}163!==t.kind&&162!==t.kind&&(hb(t),249!==t.kind&&198!==t.kind||function(t){if(0==(3&e.getCombinedNodeFlags(t))&&!e.isParameterDeclaration(t)&&(249!==t.kind||t.initializer)){var n=Ti(t);if(1&n.flags){if(!e.isIdentifier(t.name))return e.Debug.fail();var r=Nr(t,t.name.escapedText,3,void 0,void 0,!1);if(r&&r!==n&&2&r.flags&&3&Jm(r)){var i=e.getAncestor(r.valueDeclaration,250),a=232===i.parent.kind&&i.parent.parent?i.parent.parent:void 0;if(!a||!(230===a.kind&&e.isFunctionLike(a.parent)||257===a.kind||256===a.kind||297===a.kind)){var o=oa(r);pr(t,e.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1,o,o)}}}}}(t),Yb(t,t.name),Jb(t,t.name),K<99&&Wb(t,t.name,"WeakMap")&&Qn.push(t))}}}}function Xb(t,n,r,i){var a=e.getNameOfDeclaration(r),o=163===r.kind||162===r.kind?e.Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:e.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,s=e.declarationNameToString(a),u=pr(a,o,s,ua(n),ua(i));t&&e.addRelatedInfo(u,e.createDiagnosticForNode(t,e.Diagnostics._0_was_also_declared_here,s))}function Zb(t,n){return 160===t.kind&&249===n.kind||249===t.kind&&160===n.kind||e.hasQuestionToken(t)===e.hasQuestionToken(n)&&e.getSelectedEffectiveModifierFlags(t,504)===e.getSelectedEffectiveModifierFlags(n,504)}function eD(t){e.tracing.push("check","checkVariableDeclaration",{kind:t.kind,pos:t.pos,end:t.end}),function(t){if(238!==t.parent.parent.kind&&239!==t.parent.parent.kind)if(8388608&t.flags)LC(t);else if(!t.initializer){if(e.isBindingPattern(t.name)&&!e.isBindingPattern(t.parent))return zC(t,e.Diagnostics.A_destructuring_declaration_must_have_an_initializer);if(e.isVarConst(t))return zC(t,e.Diagnostics.const_declarations_must_be_initialized)}if(t.exclamationToken&&(232!==t.parent.parent.kind||!t.type||t.initializer||8388608&t.flags)){var n=t.initializer?e.Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions:e.Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations;return zC(t.exclamationToken,n)}var r=e.getEmitModuleKind(W);r=1&&eD(t.declarations[0])}function uD(e){return cD(e.awaitModifier?15:13,Zm(e.expression),Ne,e.expression)}function cD(e,t,n,r){return wa(t)?t:lD(e,t,n,r,!0)||Se}function lD(t,n,r,i,a){var o=0!=(2&t);if(n!==qe){var s=K>=2,u=!s&&W.downlevelIteration,c=W.noUncheckedIndexedAccess&&!!(128&t);if(s||u||o){var l=mD(n,t,s?i:void 0);if(a&&l){var d=8&t?e.Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:32&t?e.Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:64&t?e.Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:16&t?e.Diagnostics.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:void 0;d&&Zd(r,l.nextType,i,d)}if(l||s)return c?Mh(l&&l.yieldType):l&&l.yieldType}var p=n,f=!1,h=!1;if(4&t){if(1048576&p.flags){var g=n.types,m=e.filter(g,(function(e){return!(402653316&e.flags)}));m!==g&&(p=Xc(m,2))}else 402653316&p.flags&&(p=qe);if((h=p!==n)&&(K<1&&i&&(pr(i,e.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher),f=!0),131072&p.flags))return c?Mh(Re):Re}if(!Gp(p)){if(i&&!f){var _=dD(t,0,n,void 0),v=4&t&&!h?u?[e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:_?[e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators,!1]:[e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type,!0]:u?[e.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:_?[e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators,!1]:[e.Diagnostics.Type_0_is_not_an_array_type,!0],y=v[0];gr(i,v[1]&&!!gb(p),y,ua(p))}return h?c?Mh(Re):Re:void 0}var b=_u(p,1);return h&&b?402653316&b.flags&&!W.noUncheckedIndexedAccess?Re:Xc(c?[b,Re,Ne]:[b,Re],2):128&t?Mh(b):b}CD(i,n,o)}function dD(e,t,n,r){if(!wa(n)){var i=mD(n,e,r);return i&&i[U(t)]}}function pD(e,t,n){if(void 0===e&&(e=qe),void 0===t&&(t=qe),void 0===n&&(n=Oe),67359327&e.flags&&180227&t.flags&&180227&n.flags){var r=Zu([e,t,n]),i=mn.get(r);return i||(i={yieldType:e,returnType:t,nextType:n},mn.set(r,i)),i}return{yieldType:e,returnType:t,nextType:n}}function fD(t){for(var n,r,i,a=0,o=t;ar)return!1;for(var l=0;l1)return UC(o.types[1],e.Diagnostics.Classes_can_only_extend_a_single_class);n=!0}else{if(e.Debug.assert(116===o.token),r)return UC(o,e.Diagnostics.implements_clause_already_seen);r=!0}CC(o)}})(t)||vC(t.typeParameters,n)}(t),kb(t),t.name&&(jD(t.name,e.Diagnostics.Class_name_cannot_be_0),Yb(t,t.name),Jb(t,t.name),8388608&t.flags||function(t){1===K&&"Object"===t.escapedText&&q>a;case 49:return i>>>a;case 47:return i<1&&R(t,!!W.preserveConstEnums||!!W.isolatedModules)){var s=function(t){for(var n=0,r=t.declarations;n1)for(var o=0,s=r;o=232&&n<=248&&t.flowNode&&!_g(t.flowNode)&&hr(!1===W.allowUnreachableCode,t,e.Diagnostics.Unreachable_code_detected),n){case 159:return Jy(t);case 160:return $y(t);case 163:return tb(t);case 162:return function(t){return e.isPrivateIdentifier(t.name)&&pr(t,e.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies),tb(t)}(t);case 174:case 175:case 169:case 170:case 171:return Xy(t);case 165:case 164:return function(t){IC(t)||xC(t.name),e.isPrivateIdentifier(t.name)&&pr(t,e.Diagnostics.A_method_cannot_be_named_with_a_private_identifier),wb(t),e.hasSyntacticModifier(t,128)&&165===t.kind&&t.body&&pr(t,e.Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract,e.declarationNameToString(t.name))}(t);case 166:return nb(t);case 167:case 168:return rb(t);case 173:return ub(t);case 172:return function(t){var n=function(e){switch(e.parent.kind){case 209:case 169:case 251:case 208:case 174:case 165:case 164:var t=e.parent;if(e===t.type)return t}}(t);if(n){var r=wu(n),i=Lu(r);if(i){lE(t.type);var a=t.parameterName;if(0===i.kind||2===i.kind)sd(a);else if(i.parameterIndex>=0)V(r)&&i.parameterIndex===r.parameters.length-1?pr(a,e.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter):i.type&&Zd(i.type,fo(r.parameters[i.parameterIndex]),t.type,void 0,(function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type)}));else if(a){for(var o=!1,s=0,u=n.parameters;s0),r.length>1&&pr(r[1],e.Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);var i=Tb(t.class.expression),a=e.getClassExtendsHeritageElement(n);if(a){var o=Tb(a.expression);o&&i.escapedText!==o.escapedText&&pr(i,e.Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause,e.idText(t.tagName),e.idText(i),e.idText(o))}}else pr(n,e.Diagnostics.JSDoc_0_is_not_attached_to_a_class,e.idText(t.tagName))}(t);case 316:return function(t){var n=e.getEffectiveJSDocHost(t);n&&(e.isClassDeclaration(n)||e.isClassExpression(n))||pr(n,e.Diagnostics.JSDoc_0_is_not_attached_to_a_class,e.idText(t.tagName))}(t);case 331:case 324:case 325:return function(t){t.typeExpression||pr(t.name,e.Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags),t.name&&jD(t.name,e.Diagnostics.Type_alias_name_cannot_be_0),lE(t.typeExpression)}(t);case 330:return function(e){lE(e.constraint);for(var t=0,n=e.typeParameters;t-1&&r1){var r=e.isEnumConst(t);e.forEach(n.declarations,(function(t){e.isEnumDeclaration(t)&&e.isEnumConst(t)!==r&&pr(e.getNameOfDeclaration(t),e.Diagnostics.Enum_declarations_must_all_be_const_or_non_const)}))}var a=!1;e.forEach(n.declarations,(function(t){if(255!==t.kind)return!1;var n=t;if(!n.members.length)return!1;var r=n.members[0];r.initializer||(a?pr(r.name,e.Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):a=!0)}))}}}(t);case 256:return ZD(t);case 261:return iE(t);case 260:return function(t){if(!oE(t,e.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)&&(gC(t),e.isInternalModuleImportEqualsDeclaration(t)||tE(t)))if(rE(t),e.hasSyntacticModifier(t,1)&&si(t),272!==t.moduleReference.kind){var n=ri(Ti(t));if(n!==Ee){if(111551&n.flags){var r=e.getFirstIdentifier(t.moduleReference);1920&di(r,112575).flags||pr(r,e.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,e.declarationNameToString(r))}788968&n.flags&&jD(t.name,e.Diagnostics.Import_name_cannot_be_0)}}else q>=e.ModuleKind.ES2015&&!(8388608&t.flags)&&zC(t,e.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}(t);case 267:return aE(t);case 266:return function(t){if(!oE(t,e.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)){var n=297===t.parent.kind?t.parent:t.parent.parent;if(256!==n.kind||e.isAmbientModule(n)){if(!gC(t)&&e.hasEffectiveModifiers(t)&&UC(t,e.Diagnostics.An_export_assignment_cannot_have_modifiers),78===t.expression.kind){var r=t.expression,i=di(r,67108863,!0,!0,t);if(i){Ag(i,r);var a=2097152&i.flags?ri(i):i;(a===Ee||111551&a.flags)&&Oy(t.expression)}else Oy(t.expression);e.getEmitDeclarations(W)&&Da(t.expression,!0)}else Oy(t.expression);cE(n),8388608&t.flags&&!e.isEntityNameExpression(t.expression)&&zC(t.expression,e.Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context),!t.isExportEquals||8388608&t.flags||(q>=e.ModuleKind.ES2015?zC(t,e.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead):q===e.ModuleKind.System&&zC(t,e.Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system))}else t.isExportEquals?pr(t,e.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace):pr(t,e.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module)}}(t);case 231:case 248:return void WC(t);case 271:!function(e){kb(e)}(t)}}(t),d=n}}function dE(t){e.isInJSFile(t)||zC(t,e.Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments)}function pE(t){var n=kr(e.getSourceFileOfNode(t));if(!(1&n.flags)){n.deferredNodes=n.deferredNodes||new e.Map;var r=L(t);n.deferredNodes.set(r,t)}}function fE(t){var n=d;switch(d=t,E=0,t.kind){case 203:case 204:case 205:case 161:case 275:N_(t);break;case 208:case 209:case 165:case 164:!function(t){e.Debug.assert(165!==t.kind||e.isObjectLiteralMethod(t));var n=e.getFunctionFlags(t),r=Ru(t);if(sy(t,r),t.body)if(e.getEffectiveReturnTypeNode(t)||Pu(wu(t)),230===t.body.kind)lE(t.body);else{var i=Yy(t.body),a=r&&PD(r,n);a&&ep(2==(3&n)?_b(i,t.body,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):i,a,t.body,t.body)}}(t);break;case 167:case 168:rb(t);break;case 221:!function(t){e.forEach(t.members,lE),Ab(t)}(t);break;case 274:!function(e){Km(e)}(t);break;case 273:!function(e){Km(e.openingElement),wm(e.closingElement.tagName)?Lm(e.closingElement):Yy(e.closingElement.tagName),Om(e)}(t)}d=n}function hE(t){var r=["check","checkSourceFile",{path:t.path}];e.tracing.begin.apply(e.tracing,r),e.performance.mark("beforeCheck"),function(t){var r=kr(t);if(!(1&r.flags)){if(e.skipTypeChecking(t,W,n))return;!function(t){8388608&t.flags&&function(t){for(var n=0,r=t.statements;n0?e.concatenate(o,a):a}return e.forEach(n.getSourceFiles(),hE),Zn.getDiagnostics()}(t)}finally{o=void 0}}function vE(){if(!i)throw new Error("Trying to get diagnostics from a type checker that does not produce them.")}function yE(e){switch(e.kind){case 159:case 252:case 253:case 254:case 255:case 331:case 324:case 325:return!0;case 262:return e.isTypeOnly;case 265:case 270:return e.parent.parent.isTypeOnly;default:return!1}}function bE(e){for(;157===e.parent.kind;)e=e.parent;return 173===e.parent.kind}function DE(t,n){for(var r;(t=e.getContainingClass(t))&&!(r=n(t)););return r}function EE(e,t){return!!DE(e,(function(e){return e===t}))}function CE(e){return void 0!==function(e){for(;157===e.parent.kind;)e=e.parent;return 260===e.parent.kind?e.parent.moduleReference===e?e.parent:void 0:266===e.parent.kind&&e.parent.expression===e?e.parent:void 0}(e)}function SE(t){if(e.isDeclarationName(t))return Ti(t.parent);if(e.isInJSFile(t)&&201===t.parent.kind&&t.parent===t.parent.parent.left&&!e.isPrivateIdentifier(t)){var n=function(t){switch(e.getAssignmentDeclarationKind(t.parent.parent)){case 1:case 3:return Ti(t.parent);case 4:case 2:case 5:return Ti(t.parent.parent)}}(t);if(n)return n}if(266===t.parent.kind&&e.isEntityNameExpression(t)){var r=di(t,2998271,!0);if(r&&r!==Ee)return r}else if(!e.isPropertyAccessExpression(t)&&!e.isPrivateIdentifier(t)&&CE(t)){var i=e.getAncestor(t,260);return e.Debug.assert(void 0!==i),ci(t,!0)}if(!e.isPropertyAccessExpression(t)&&!e.isPrivateIdentifier(t)){var a=function(t){for(var n=t.parent;e.isQualifiedName(n);)t=n,n=n.parent;if(n&&195===n.kind&&n.qualifier===t)return n}(t);if(a){ld(a);var o=kr(t).resolvedSymbol;return o===Ee?void 0:o}}for(;e.isRightSideOfQualifiedNameOrPropertyAccess(t);)t=t.parent;if(function(e){for(;201===e.parent.kind;)e=e.parent;return 223===e.parent.kind}(t)){var s=0;223===t.parent.kind?(s=788968,e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)&&(s|=111551)):s=1920,s|=2097152;var u=e.isEntityNameExpression(t)?di(t,s):void 0;if(u)return u}if(326===t.parent.kind)return e.getParameterSymbolFromJSDoc(t.parent);if(159===t.parent.kind&&330===t.parent.parent.kind){e.Debug.assert(!e.isInJSFile(t));var c=e.getTypeParameterFromJsDoc(t.parent);return c&&c.symbol}if(e.isExpressionNode(t)){if(e.nodeIsMissing(t))return;if(78===t.kind){if(e.isJSXTagName(t)&&wm(t)){var l=Lm(t.parent);return l===Ee?void 0:l}return di(t,111551,!1,!0)}if(201===t.kind||157===t.kind){var d=kr(t);return d.resolvedSymbol||(201===t.kind?s_(t):u_(t)),d.resolvedSymbol}}else{if(bE(t))return di(t,s=173===t.parent.kind?788968:1920,!1,!0);if(function(e){for(;157===e.parent.kind;)e=e.parent;for(;201===e.parent.kind;)e=e.parent;return 302===e.parent.kind}(t))return di(t,s=901119,!1,!0,e.getHostSignatureFromJSDoc(t))}return 172===t.parent.kind?di(t,1):void 0}function xE(t,n){if(297===t.kind)return e.isExternalModule(t)?ki(t.symbol):void 0;var r=t.parent,i=r.parent;if(!(16777216&t.flags)){if(B(t)){var a=Ti(r);return e.isImportOrExportSpecifier(t.parent)&&t.parent.propertyName===t?Sm(a):a}if(e.isLiteralComputedPropertyDeclarationName(t))return Ti(r.parent);if(78===t.kind){if(CE(t))return SE(t);if(198===r.kind&&196===i.kind&&t===r.propertyName){var o=du(kE(i),t.escapedText);if(o)return o}}switch(t.kind){case 78:case 79:case 201:case 157:return SE(t);case 107:var s=e.getThisContainer(t,!1);if(e.isFunctionLike(s)){var u=wu(s);if(u.thisParameter)return u.thisParameter}if(e.isInExpressionContext(t))return Yy(t).symbol;case 187:return sd(t).symbol;case 105:return Yy(t).symbol;case 132:var c=t.parent;return c&&166===c.kind?c.parent.symbol:void 0;case 10:case 14:if(e.isExternalModuleImportEqualsDeclaration(t.parent.parent)&&e.getExternalModuleImportEqualsDeclarationExpression(t.parent.parent)===t||(261===t.parent.kind||267===t.parent.kind)&&t.parent.moduleSpecifier===t||e.isInJSFile(t)&&e.isRequireCall(t.parent,!1)||e.isImportCall(t.parent)||e.isLiteralTypeNode(t.parent)&&e.isLiteralImportTypeNode(t.parent.parent)&&t.parent.parent.argument===t.parent)return fi(t,t,n);if(e.isCallExpression(r)&&e.isBindableObjectDefinePropertyCall(r)&&r.arguments[1]===t)return Ti(r);case 8:var l=e.isElementAccessExpression(r)?r.argumentExpression===t?Ky(r.expression):void 0:e.isLiteralTypeNode(r)&&e.isIndexedAccessTypeNode(i)?ld(i.objectType):void 0;return l&&du(l,e.escapeLeadingUnderscores(t.text));case 87:case 97:case 38:case 83:return Ti(t.parent);case 195:return e.isLiteralImportTypeNode(t)?xE(t.argument.literal,n):void 0;case 92:return e.isExportAssignment(t.parent)?e.Debug.checkDefined(t.parent.symbol):void 0;default:return}}}function kE(t){if(e.isSourceFile(t)&&!e.isExternalModule(t))return Te;if(16777216&t.flags)return Te;var n,r=e.tryGetClassImplementingOrExtendingExpressionWithTypeArguments(t),i=r&&No(Ti(r.class));if(e.isPartOfTypeNode(t)){var a=ld(t);return i?os(a,i.thisType):a}if(e.isExpressionNode(t))return wE(t);if(i&&!r.isImplements){var o=e.firstOrUndefined(wo(i));return o?os(o,i.thisType):Te}if(yE(t))return Uo(n=Ti(t));if(function(t){return 78===t.kind&&yE(t.parent)&&e.getNameOfDeclaration(t.parent)===t}(t))return(n=xE(t))?Uo(n):Te;if(e.isDeclaration(t))return fo(n=Ti(t));if(B(t))return(n=xE(t))?fo(n):Te;if(e.isBindingPattern(t))return Ba(t.parent,!0)||Te;if(CE(t)&&(n=xE(t))){var s=Uo(n);return s!==Te?s:fo(n)}return Te}function TE(t){if(e.Debug.assert(200===t.kind||199===t.kind),239===t.parent.kind)return Cy(t,uD(t.parent)||Te);if(216===t.parent.kind)return Cy(t,Ky(t.parent.right)||Te);if(288===t.parent.kind){var n=e.cast(t.parent.parent,e.isObjectLiteralExpression);return Dy(n,TE(n)||Te,e.indexOfNode(n.properties,t.parent))}var r=e.cast(t.parent,e.isArrayLiteralExpression),i=TE(r)||Te,a=cD(65,i,Ne,t.parent)||Te;return Ey(r,i,r.elements.indexOf(t),a)}function wE(t){return e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),rd(Ky(t))}function AE(t){var n=Ti(t.parent);return e.hasSyntacticModifier(t,32)?fo(n):Uo(n)}function OE(t){var n=t.name;switch(n.kind){case 78:return ad(e.idText(n));case 8:case 10:return ad(n.text);case 158:var r=Em(n);return _y(r,12288)?r:Re;default:return e.Debug.fail("Unsupported property name.")}}function NE(t){t=tu(t);var n=e.createSymbolTable(Vs(t)),r=fu(t,0).length?Dt:fu(t,1).length?Et:void 0;return r&&e.forEach(Vs(r),(function(e){n.has(e.escapedName)||n.set(e.escapedName,e)})),zi(n)}function IE(t){return e.typeHasCallOrConstructSignatures(t,le)}function FE(t){if(e.isGeneratedIdentifier(t))return!1;var n=e.getParseTreeNode(t,e.isIdentifier);if(!n)return!1;var r=n.parent;return!!r&&!((e.isPropertyAccessExpression(r)||e.isPropertyAssignment(r))&&r.name===n)&&oC(n)===ue}function LE(t){var n=fi(t.parent,t);if(!n||e.isShorthandAmbientModuleSymbol(n))return!0;var r=yi(n),i=xr(n=_i(n));return void 0===i.exportsSomeValue&&(i.exportsSomeValue=r?!!(111551&n.flags):e.forEachEntry(Ci(n),(function(e){return(e=ni(e))&&!!(111551&e.flags)}))),i.exportsSomeValue}function PE(t,n){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var i=oC(r,function(t){return e.isModuleOrEnumDeclaration(t.parent)&&t===t.parent.name}(r));if(i){if(1048576&i.flags){var a=ki(i.exportSymbol);if(!n&&944&a.flags&&!(3&a.flags))return;i=a}var o=wi(i);if(o){if(512&o.flags&&297===o.valueDeclaration.kind){var s=o.valueDeclaration;return s!==e.getSourceFileOfNode(r)?void 0:s}return e.findAncestor(r.parent,(function(t){return e.isModuleOrEnumDeclaration(t)&&Ti(t)===o}))}}}}function RE(t){if(t.generatedImportReference)return t.generatedImportReference;var n=e.getParseTreeNode(t,e.isIdentifier);if(n){var r=oC(n);if(ti(r,111551)&&!oi(r))return zr(r)}}function ME(t){if(418&t.flags&&!e.isSourceFile(t.valueDeclaration)){var n=xr(t);if(void 0===n.isDeclarationWithCollidingName){var r=e.getEnclosingBlockScopeContainer(t.valueDeclaration);if(e.isStatementWithLocals(r)||function(t){return e.isBindingElement(t.valueDeclaration)&&287===e.walkUpBindingElementsAndPatterns(t.valueDeclaration).parent.kind}(t)){var i=kr(t.valueDeclaration);if(Nr(r.parent,t.escapedName,111551,void 0,void 0,!1))n.isDeclarationWithCollidingName=!0;else if(262144&i.flags){var a=524288&i.flags,o=e.isIterationStatement(r,!1),s=230===r.kind&&e.isIterationStatement(r.parent,!1);n.isDeclarationWithCollidingName=!(e.isBlockScopedContainerTopLevel(r)||a&&(o||s))}else n.isDeclarationWithCollidingName=!1}}return n.isDeclarationWithCollidingName}return!1}function BE(t){if(!e.isGeneratedIdentifier(t)){var n=e.getParseTreeNode(t,e.isIdentifier);if(n){var r=oC(n);if(r&&ME(r))return r.valueDeclaration}}}function jE(t){var n=e.getParseTreeNode(t,e.isDeclaration);if(n){var r=Ti(n);if(r)return ME(r)}return!1}function UE(t){switch(t.kind){case 260:return zE(Ti(t)||Ee);case 262:case 263:case 265:case 270:var n=Ti(t)||Ee;return zE(n)&&!oi(n);case 267:var r=t.exportClause;return!!r&&(e.isNamespaceExport(r)||e.some(r.elements,UE));case 266:return!t.expression||78!==t.expression.kind||zE(Ti(t)||Ee)}return!1}function VE(t){var n=e.getParseTreeNode(t,e.isImportEqualsDeclaration);return!(void 0===n||297!==n.parent.kind||!e.isInternalModuleImportEqualsDeclaration(n))&&zE(Ti(n))&&n.moduleReference&&!e.nodeIsMissing(n.moduleReference)}function zE(e){var t=ri(e);return t===Ee||!!(111551&t.flags)&&(W.preserveConstEnums||!HE(t))}function HE(e){return by(e)||!!e.constEnumOnlyModule}function WE(t,n){if(Hr(t)){var r=Ti(t);if(r&&xr(r).referenced)return!0;var i=xr(r).target;if(i&&1&e.getEffectiveModifierFlags(t)&&111551&i.flags&&(W.preserveConstEnums||!HE(i)))return!0}return!!n&&!!e.forEachChild(t,(function(e){return WE(e,n)}))}function KE(t){if(e.nodeIsPresent(t.body)){if(e.isGetAccessor(t)||e.isSetAccessor(t))return!1;var n=Nu(Ti(t));return n.length>1||1===n.length&&n[0].declaration!==t}return!1}function qE(t){return!(!Y||Cu(t)||e.isJSDocParameterTag(t)||!t.initializer||e.hasSyntacticModifier(t,92))}function GE(t){return Y&&Cu(t)&&!t.initializer&&e.hasSyntacticModifier(t,92)}function YE(t){var n=e.getParseTreeNode(t,e.isFunctionDeclaration);if(!n)return!1;var r=Ti(n);return!!(r&&16&r.flags)&&!!e.forEachEntry(Ei(r),(function(t){return 111551&t.flags&&t.valueDeclaration&&e.isPropertyAccessExpression(t.valueDeclaration)}))}function JE(t){var n=e.getParseTreeNode(t,e.isFunctionDeclaration);if(!n)return e.emptyArray;var r=Ti(n);return r&&Vs(fo(r))||e.emptyArray}function $E(e){return kr(e).flags||0}function QE(e){return JD(e.parent),kr(e).enumMemberValue}function XE(e){switch(e.kind){case 291:case 201:case 202:return!0}return!1}function ZE(t){if(291===t.kind)return QE(t);var n=kr(t).resolvedSymbol;if(n&&8&n.flags){var r=n.valueDeclaration;if(e.isEnumConst(r.parent))return QE(r)}}function eC(e){return!!(524288&e.flags)&&fu(e,0).length>0}function tC(t,n){var r,i=e.getParseTreeNode(t,e.isEntityName);if(!i)return e.TypeReferenceSerializationKind.Unknown;if(n&&!(n=e.getParseTreeNode(n)))return e.TypeReferenceSerializationKind.Unknown;var a=di(i,111551,!0,!0,n),o=(null===(r=null==a?void 0:a.declarations)||void 0===r?void 0:r.every(e.isTypeOnlyImportOrExportDeclaration))||!1,s=a&&2097152&a.flags?ri(a):a,u=di(i,788968,!0,!1,n);if(s&&s===u){var c=wc(!1);if(c&&s===c)return e.TypeReferenceSerializationKind.Promise;var l=fo(s);if(l&&Eo(l))return o?e.TypeReferenceSerializationKind.TypeWithCallSignature:e.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue}if(!u)return o?e.TypeReferenceSerializationKind.ObjectType:e.TypeReferenceSerializationKind.Unknown;var d=Uo(u);return d===Te?o?e.TypeReferenceSerializationKind.ObjectType:e.TypeReferenceSerializationKind.Unknown:3&d.flags?e.TypeReferenceSerializationKind.ObjectType:_y(d,245760)?e.TypeReferenceSerializationKind.VoidNullableOrNeverType:_y(d,528)?e.TypeReferenceSerializationKind.BooleanType:_y(d,296)?e.TypeReferenceSerializationKind.NumberLikeType:_y(d,2112)?e.TypeReferenceSerializationKind.BigIntLikeType:_y(d,402653316)?e.TypeReferenceSerializationKind.StringLikeType:of(d)?e.TypeReferenceSerializationKind.ArrayLikeType:_y(d,12288)?e.TypeReferenceSerializationKind.ESSymbolType:eC(d)?e.TypeReferenceSerializationKind.TypeWithCallSignature:Hp(d)?e.TypeReferenceSerializationKind.ArrayLikeType:e.TypeReferenceSerializationKind.ObjectType}function nC(t,n,r,i,a){var o=e.getParseTreeNode(t,e.isVariableLikeOrAccessor);if(!o)return e.factory.createToken(128);var s=Ti(o),u=!s||133120&s.flags?Te:tf(fo(s));return 8192&u.flags&&u.symbol===s&&(r|=1048576),a&&(u=yf(u)),re.typeToTypeNode(u,n,1024|r,i)}function rC(t,n,r,i){var a=e.getParseTreeNode(t,e.isFunctionLike);if(!a)return e.factory.createToken(128);var o=wu(a);return re.typeToTypeNode(Pu(o),n,1024|r,i)}function iC(t,n,r,i){var a=e.getParseTreeNode(t,e.isExpression);if(!a)return e.factory.createToken(128);var o=Lf(wE(a));return re.typeToTypeNode(o,n,1024|r,i)}function aC(t){return ie.has(e.escapeLeadingUnderscores(t))}function oC(t,n){var r=kr(t).resolvedSymbol;if(r)return r;var i=t;if(n){var a=t.parent;e.isDeclaration(a)&&t===a.name&&(i=ka(a))}return Nr(i,t.escapedText,3257279,void 0,void 0,!0)}function sC(t){if(!e.isGeneratedIdentifier(t)){var n=e.getParseTreeNode(t,e.isIdentifier);if(n){var r=oC(n);if(r)return Fi(r).valueDeclaration}}}function uC(t){return!!(e.isDeclarationReadonly(t)||e.isVariableDeclaration(t)&&e.isVarConst(t))&&id(fo(Ti(t)))}function cC(t,n){return function(t,n,r){var i=1024&t.flags?re.symbolToExpression(t.symbol,111551,n,void 0,r):t===Ve?e.factory.createTrue():t===je&&e.factory.createFalse();if(i)return i;var a=t.value;return"object"==typeof a?e.factory.createBigIntLiteral(a):"number"==typeof a?e.factory.createNumericLiteral(a):e.factory.createStringLiteral(a)}(fo(Ti(t)),t,n)}function lC(t){return t?(lr(t),e.getSourceFileOfNode(t).localJsxFactory||sn):sn}function dC(t){if(t){var n=e.getSourceFileOfNode(t);if(n){if(n.localJsxFragmentFactory)return n.localJsxFragmentFactory;var r=n.pragmas.get("jsxfrag"),i=e.isArray(r)?r[0]:r;if(i)return n.localJsxFragmentFactory=e.parseIsolatedEntityName(i.arguments.factory,K),n.localJsxFragmentFactory}}if(W.jsxFragmentFactory)return e.parseIsolatedEntityName(W.jsxFragmentFactory,K)}function pC(t){var n=256===t.kind?e.tryCast(t.name,e.isStringLiteral):e.getExternalModuleName(t),r=hi(n,n,void 0);if(r)return e.getDeclarationOfKind(r,297)}function fC(t,n){if((s&n)!==n&&W.importHelpers){var r=e.getSourceFileOfNode(t);if(e.isEffectiveExternalModule(r,W)&&!(8388608&t.flags)){var i=function(t,n){return l||(l=gi(t,e.externalHelpersModuleNameText,e.Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found,n)||Ee),l}(r,t);if(i!==Ee)for(var a=n&~s,o=1;o<=4194304;o<<=1)if(a&o){var u=hC(o);wr(i.exports,e.escapeLeadingUnderscores(u),111551)||pr(t,e.Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0,e.externalHelpersModuleNameText,u)}s|=n}}}function hC(t){switch(t){case 1:return"__extends";case 2:return"__assign";case 4:return"__rest";case 8:return"__decorate";case 16:return"__metadata";case 32:return"__param";case 64:return"__awaiter";case 128:return"__generator";case 256:return"__values";case 512:return"__read";case 1024:return"__spread";case 2048:return"__spreadArrays";case 4096:return"__await";case 8192:return"__asyncGenerator";case 16384:return"__asyncDelegator";case 32768:return"__asyncValues";case 65536:return"__exportStar";case 131072:return"__importStar";case 262144:return"__importDefault";case 524288:return"__makeTemplateObject";case 1048576:return"__classPrivateFieldGet";case 2097152:return"__classPrivateFieldSet";case 4194304:return"__createBinding";default:return e.Debug.fail("Unrecognized helper")}}function gC(t){return function(t){if(!t.decorators)return!1;if(!e.nodeCanBeDecorated(t,t.parent,t.parent.parent))return 165!==t.kind||e.nodeIsPresent(t.body)?UC(t,e.Diagnostics.Decorators_are_not_valid_here):UC(t,e.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);if(167===t.kind||168===t.kind){var n=e.getAllAccessorDeclarations(t.parent.members,t);if(n.firstAccessor.decorators&&t===n.secondAccessor)return UC(t,e.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}return!1}(t)||function(t){var n,r,i,a,o=function(t){return!!t.modifiers&&(function(t){switch(t.kind){case 167:case 168:case 166:case 163:case 162:case 165:case 164:case 171:case 256:case 261:case 260:case 267:case 266:case 208:case 209:case 160:return!1;default:if(257===t.parent.kind||297===t.parent.kind)return!1;switch(t.kind){case 251:return mC(t,129);case 252:return mC(t,125);case 253:case 232:case 254:return!0;case 255:return mC(t,84);default:return e.Debug.fail(),!1}}}(t)?UC(t,e.Diagnostics.Modifiers_cannot_appear_here):void 0)}(t);if(void 0!==o)return o;for(var s=0,u=0,c=t.modifiers;u1||e.modifiers[0].kind!==t}function _C(t,n){return void 0===n&&(n=e.Diagnostics.Trailing_comma_not_allowed),!(!t||!t.hasTrailingComma)&&VC(t[0],t.end-",".length,",".length,n)}function vC(t,n){if(t&&0===t.length){var r=t.pos-"<".length;return VC(n,r,e.skipTrivia(n.text,t.end)+">".length-r,e.Diagnostics.Type_parameter_list_cannot_be_empty)}return!1}function yC(n){if(K>=3){var r=n.body&&e.isBlock(n.body)&&e.findUseStrictPrologue(n.body.statements);if(r){var i=(o=n.parameters,e.filter(o,(function(t){return!!t.initializer||e.isBindingPattern(t.name)||e.isRestParameter(t)})));if(e.length(i)){e.forEach(i,(function(t){e.addRelatedInfo(pr(t,e.Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive),e.createDiagnosticForNode(r,e.Diagnostics.use_strict_directive_used_here))}));var a=i.map((function(t,n){return 0===n?e.createDiagnosticForNode(t,e.Diagnostics.Non_simple_parameter_declared_here):e.createDiagnosticForNode(t,e.Diagnostics.and_here)}));return e.addRelatedInfo.apply(void 0,t([pr(r,e.Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list)],a)),!0}}}var o;return!1}function bC(t){var n=e.getSourceFileOfNode(t);return gC(t)||vC(t.typeParameters,n)||function(t){for(var n=!1,r=t.length,i=0;i".length-i,e.Diagnostics.Type_argument_list_cannot_be_empty)}return!1}(t,n)}function EC(t){return function(t){if(t)for(var n=0,r=t;n1)return n=238===t.kind?e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement,UC(a.declarations[1],n);var s=o[0];if(s.initializer)return n=238===t.kind?e.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:e.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer,zC(s.name,n);if(s.type)return zC(s,n=238===t.kind?e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:e.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation)}}return!1}function OC(t){if(t.parameters.length===(167===t.kind?1:2))return e.getThisParameter(t)}function NC(t,n){if(function(t){return e.isDynamicName(t)&&!Qo(t)}(t))return zC(t,n)}function IC(t){if(bC(t))return!0;if(165===t.kind){if(200===t.parent.kind){if(t.modifiers&&(1!==t.modifiers.length||129!==e.first(t.modifiers).kind))return UC(t,e.Diagnostics.Modifiers_cannot_appear_here);if(TC(t.questionToken,e.Diagnostics.An_object_member_cannot_be_declared_optional))return!0;if(wC(t.exclamationToken,e.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context))return!0;if(void 0===t.body)return VC(t,t.end-1,";".length,e.Diagnostics._0_expected,"{")}if(kC(t))return!0}if(e.isClassLike(t.parent)){if(8388608&t.flags)return NC(t.name,e.Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(165===t.kind&&!t.body)return NC(t.name,e.Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}else{if(253===t.parent.kind)return NC(t.name,e.Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(177===t.parent.kind)return NC(t.name,e.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}}function FC(t){return e.isStringOrNumericLiteralLike(t)||214===t.kind&&40===t.operator&&8===t.operand.kind}function LC(t){var n,r=t.initializer;if(r){var i=!(FC(r)||function(t){if((e.isPropertyAccessExpression(t)||e.isElementAccessExpression(t)&&FC(t.argumentExpression))&&e.isEntityNameExpression(t.expression))return!!(1024&Oy(t).flags)}(r)||109===r.kind||94===r.kind||(n=r,9===n.kind||214===n.kind&&40===n.operator&&9===n.operand.kind)),a=e.isDeclarationReadonly(t)||e.isVariableDeclaration(t)&&e.isVarConst(t);if(!a||t.type)return zC(r,e.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts);if(i)return zC(r,e.Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference);if(!a||i)return zC(r,e.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts)}}function PC(t){if(78===t.kind){if("__esModule"===e.idText(t))return function(t,n,r,i,a,o){return!jC(e.getSourceFileOfNode(n))&&(dr(t,n,r,i,a,o),!0)}("noEmit",t,e.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules)}else for(var n=0,r=t.elements;n0}function UC(t,n,r,i,a){var o=e.getSourceFileOfNode(t);if(!jC(o)){var s=e.getSpanOfTokenAtPosition(o,t.pos);return Zn.add(e.createFileDiagnostic(o,s.start,s.length,n,r,i,a)),!0}return!1}function VC(t,n,r,i,a,o,s){var u=e.getSourceFileOfNode(t);return!jC(u)&&(Zn.add(e.createFileDiagnostic(u,n,r,i,a,o,s)),!0)}function zC(t,n,r,i,a){return!jC(e.getSourceFileOfNode(t))&&(Zn.add(e.createDiagnosticForNode(t,n,r,i,a)),!0)}function HC(t){return 253!==t.kind&&254!==t.kind&&261!==t.kind&&260!==t.kind&&267!==t.kind&&266!==t.kind&&259!==t.kind&&!e.hasSyntacticModifier(t,515)&&UC(t,e.Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier)}function WC(t){if(8388608&t.flags){if(!kr(t).hasReportedStatementInAmbientContext&&(e.isFunctionLike(t.parent)||e.isAccessor(t.parent)))return kr(t).hasReportedStatementInAmbientContext=UC(t,e.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);if(230===t.parent.kind||257===t.parent.kind||297===t.parent.kind){var n=kr(t.parent);if(!n.hasReportedStatementInAmbientContext)return n.hasReportedStatementInAmbientContext=UC(t,e.Diagnostics.Statements_are_not_allowed_in_ambient_contexts)}}return!1}function KC(t){if(32&t.numericLiteralFlags){var n=void 0;if(K>=1?n=e.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0:e.isChildOfNodeWithKind(t,191)?n=e.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0:e.isChildOfNodeWithKind(t,291)&&(n=e.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0),n){var r=e.isPrefixUnaryExpression(t.parent)&&40===t.parent.operator,i=(r?"-":"")+"0o"+t.text;return zC(r?t.parent:t,n,i)}}return function(t){if(!(16&t.numericLiteralFlags||t.text.length<=15||-1!==t.text.indexOf("."))){var n=+e.getTextOfNode(t);n<=Math.pow(2,53)-1&&n+1>n||fr(!1,e.createDiagnosticForNode(t,e.Diagnostics.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers))}}(t),!1}function qC(t,n,r,i){if(1048576&n.flags&&2621440&t.flags){var a=Vs(t);if(a){var o=Th(a,n);if(o)return Sp(n,e.map(o,(function(e){return[function(){return fo(e)},e.escapedName]})),r,void 0,i)}}}},function(e){e.JSX="JSX",e.IntrinsicElements="IntrinsicElements",e.ElementClass="ElementClass",e.ElementAttributesPropertyNameContainer="ElementAttributesProperty",e.ElementChildrenAttributeNameContainer="ElementChildrenAttribute",e.Element="Element",e.IntrinsicAttributes="IntrinsicAttributes",e.IntrinsicClassAttributes="IntrinsicClassAttributes",e.LibraryManagedAttributes="LibraryManagedAttributes"}(O||(O={})),e.signatureHasRestParameter=V,e.signatureHasLiteralTypes=z}(u||(u={})),function(e){var t=e.or(e.isTypeNode,e.isTypeParameterDeclaration);function n(t,n,r,i){if(void 0===t||void 0===n)return t;var a,o=n(t);return o===t?t:void 0!==o?(a=e.isArray(o)?(i||u)(o):o,e.Debug.assertNode(a,r),a):void 0}function r(t,n,r,i,a){if(void 0===t||void 0===n)return t;var o,s,u=t.length;(void 0===i||i<0)&&(i=0),(void 0===a||a>u-i)&&(a=u-i);var c=-1,l=-1;(i>0||a=2&&(s=function(t,n){for(var r,i=0;i0&&f<=156||187===f)return o;var h=c.factory;switch(f){case 78:return h.updateIdentifier(o,l(o.typeArguments,u,t));case 157:return h.updateQualifiedName(o,p(o.left,u,e.isEntityName),p(o.right,u,e.isIdentifier));case 158:return h.updateComputedPropertyName(o,p(o.expression,u,e.isExpression));case 159:return h.updateTypeParameterDeclaration(o,p(o.name,u,e.isIdentifier),p(o.constraint,u,e.isTypeNode),p(o.default,u,e.isTypeNode));case 160:return h.updateParameterDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.dotDotDotToken,d,e.isToken),p(o.name,u,e.isBindingName),p(o.questionToken,d,e.isToken),p(o.type,u,e.isTypeNode),p(o.initializer,u,e.isExpression));case 161:return h.updateDecorator(o,p(o.expression,u,e.isExpression));case 162:return h.updatePropertySignature(o,l(o.modifiers,u,e.isToken),p(o.name,u,e.isPropertyName),p(o.questionToken,d,e.isToken),p(o.type,u,e.isTypeNode));case 163:return h.updatePropertyDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.name,u,e.isPropertyName),p(o.questionToken||o.exclamationToken,d,e.isToken),p(o.type,u,e.isTypeNode),p(o.initializer,u,e.isExpression));case 164:return h.updateMethodSignature(o,l(o.modifiers,u,e.isModifier),p(o.name,u,e.isPropertyName),p(o.questionToken,d,e.isToken),l(o.typeParameters,u,e.isTypeParameterDeclaration),l(o.parameters,u,e.isParameterDeclaration),p(o.type,u,e.isTypeNode));case 165:return h.updateMethodDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.asteriskToken,d,e.isToken),p(o.name,u,e.isPropertyName),p(o.questionToken,d,e.isToken),l(o.typeParameters,u,e.isTypeParameterDeclaration),a(o.parameters,u,c,l),p(o.type,u,e.isTypeNode),s(o.body,u,c,p));case 166:return h.updateConstructorDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),a(o.parameters,u,c,l),s(o.body,u,c,p));case 167:return h.updateGetAccessorDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.name,u,e.isPropertyName),a(o.parameters,u,c,l),p(o.type,u,e.isTypeNode),s(o.body,u,c,p));case 168:return h.updateSetAccessorDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.name,u,e.isPropertyName),a(o.parameters,u,c,l),s(o.body,u,c,p));case 169:return h.updateCallSignature(o,l(o.typeParameters,u,e.isTypeParameterDeclaration),l(o.parameters,u,e.isParameterDeclaration),p(o.type,u,e.isTypeNode));case 170:return h.updateConstructSignature(o,l(o.typeParameters,u,e.isTypeParameterDeclaration),l(o.parameters,u,e.isParameterDeclaration),p(o.type,u,e.isTypeNode));case 171:return h.updateIndexSignature(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),l(o.parameters,u,e.isParameterDeclaration),p(o.type,u,e.isTypeNode));case 172:return h.updateTypePredicateNode(o,p(o.assertsModifier,u),p(o.parameterName,u),p(o.type,u,e.isTypeNode));case 173:return h.updateTypeReferenceNode(o,p(o.typeName,u,e.isEntityName),l(o.typeArguments,u,e.isTypeNode));case 174:return h.updateFunctionTypeNode(o,l(o.typeParameters,u,e.isTypeParameterDeclaration),l(o.parameters,u,e.isParameterDeclaration),p(o.type,u,e.isTypeNode));case 175:return h.updateConstructorTypeNode(o,l(o.typeParameters,u,e.isTypeParameterDeclaration),l(o.parameters,u,e.isParameterDeclaration),p(o.type,u,e.isTypeNode));case 176:return h.updateTypeQueryNode(o,p(o.exprName,u,e.isEntityName));case 177:return h.updateTypeLiteralNode(o,l(o.members,u,e.isTypeElement));case 178:return h.updateArrayTypeNode(o,p(o.elementType,u,e.isTypeNode));case 179:return h.updateTupleTypeNode(o,l(o.elements,u,e.isTypeNode));case 180:return h.updateOptionalTypeNode(o,p(o.type,u,e.isTypeNode));case 181:return h.updateRestTypeNode(o,p(o.type,u,e.isTypeNode));case 182:return h.updateUnionTypeNode(o,l(o.types,u,e.isTypeNode));case 183:return h.updateIntersectionTypeNode(o,l(o.types,u,e.isTypeNode));case 184:return h.updateConditionalTypeNode(o,p(o.checkType,u,e.isTypeNode),p(o.extendsType,u,e.isTypeNode),p(o.trueType,u,e.isTypeNode),p(o.falseType,u,e.isTypeNode));case 185:return h.updateInferTypeNode(o,p(o.typeParameter,u,e.isTypeParameterDeclaration));case 195:return h.updateImportTypeNode(o,p(o.argument,u,e.isTypeNode),p(o.qualifier,u,e.isEntityName),r(o.typeArguments,u,e.isTypeNode),o.isTypeOf);case 192:return h.updateNamedTupleMember(o,n(o.dotDotDotToken,u,e.isToken),n(o.name,u,e.isIdentifier),n(o.questionToken,u,e.isToken),n(o.type,u,e.isTypeNode));case 186:return h.updateParenthesizedType(o,p(o.type,u,e.isTypeNode));case 188:return h.updateTypeOperatorNode(o,p(o.type,u,e.isTypeNode));case 189:return h.updateIndexedAccessTypeNode(o,p(o.objectType,u,e.isTypeNode),p(o.indexType,u,e.isTypeNode));case 190:return h.updateMappedTypeNode(o,p(o.readonlyToken,d,e.isToken),p(o.typeParameter,u,e.isTypeParameterDeclaration),p(o.nameType,u,e.isTypeNode),p(o.questionToken,d,e.isToken),p(o.type,u,e.isTypeNode));case 191:return h.updateLiteralTypeNode(o,p(o.literal,u,e.isExpression));case 193:return h.updateTemplateLiteralType(o,p(o.head,u,e.isTemplateHead),l(o.templateSpans,u,e.isTemplateLiteralTypeSpan));case 194:return h.updateTemplateLiteralTypeSpan(o,p(o.type,u,e.isTypeNode),p(o.literal,u,e.isTemplateMiddleOrTemplateTail));case 196:return h.updateObjectBindingPattern(o,l(o.elements,u,e.isBindingElement));case 197:return h.updateArrayBindingPattern(o,l(o.elements,u,e.isArrayBindingElement));case 198:return h.updateBindingElement(o,p(o.dotDotDotToken,d,e.isToken),p(o.propertyName,u,e.isPropertyName),p(o.name,u,e.isBindingName),p(o.initializer,u,e.isExpression));case 199:return h.updateArrayLiteralExpression(o,l(o.elements,u,e.isExpression));case 200:return h.updateObjectLiteralExpression(o,l(o.properties,u,e.isObjectLiteralElementLike));case 201:return 32&o.flags?h.updatePropertyAccessChain(o,p(o.expression,u,e.isExpression),p(o.questionDotToken,d,e.isToken),p(o.name,u,e.isIdentifier)):h.updatePropertyAccessExpression(o,p(o.expression,u,e.isExpression),p(o.name,u,e.isIdentifierOrPrivateIdentifier));case 202:return 32&o.flags?h.updateElementAccessChain(o,p(o.expression,u,e.isExpression),p(o.questionDotToken,d,e.isToken),p(o.argumentExpression,u,e.isExpression)):h.updateElementAccessExpression(o,p(o.expression,u,e.isExpression),p(o.argumentExpression,u,e.isExpression));case 203:return 32&o.flags?h.updateCallChain(o,p(o.expression,u,e.isExpression),p(o.questionDotToken,d,e.isToken),l(o.typeArguments,u,e.isTypeNode),l(o.arguments,u,e.isExpression)):h.updateCallExpression(o,p(o.expression,u,e.isExpression),l(o.typeArguments,u,e.isTypeNode),l(o.arguments,u,e.isExpression));case 204:return h.updateNewExpression(o,p(o.expression,u,e.isExpression),l(o.typeArguments,u,e.isTypeNode),l(o.arguments,u,e.isExpression));case 205:return h.updateTaggedTemplateExpression(o,p(o.tag,u,e.isExpression),r(o.typeArguments,u,e.isExpression),p(o.template,u,e.isTemplateLiteral));case 206:return h.updateTypeAssertion(o,p(o.type,u,e.isTypeNode),p(o.expression,u,e.isExpression));case 207:return h.updateParenthesizedExpression(o,p(o.expression,u,e.isExpression));case 208:return h.updateFunctionExpression(o,l(o.modifiers,u,e.isModifier),p(o.asteriskToken,d,e.isToken),p(o.name,u,e.isIdentifier),l(o.typeParameters,u,e.isTypeParameterDeclaration),a(o.parameters,u,c,l),p(o.type,u,e.isTypeNode),s(o.body,u,c,p));case 209:return h.updateArrowFunction(o,l(o.modifiers,u,e.isModifier),l(o.typeParameters,u,e.isTypeParameterDeclaration),a(o.parameters,u,c,l),p(o.type,u,e.isTypeNode),p(o.equalsGreaterThanToken,d,e.isToken),s(o.body,u,c,p));case 210:return h.updateDeleteExpression(o,p(o.expression,u,e.isExpression));case 211:return h.updateTypeOfExpression(o,p(o.expression,u,e.isExpression));case 212:return h.updateVoidExpression(o,p(o.expression,u,e.isExpression));case 213:return h.updateAwaitExpression(o,p(o.expression,u,e.isExpression));case 214:return h.updatePrefixUnaryExpression(o,p(o.operand,u,e.isExpression));case 215:return h.updatePostfixUnaryExpression(o,p(o.operand,u,e.isExpression));case 216:return h.updateBinaryExpression(o,p(o.left,u,e.isExpression),p(o.operatorToken,d,e.isToken),p(o.right,u,e.isExpression));case 217:return h.updateConditionalExpression(o,p(o.condition,u,e.isExpression),p(o.questionToken,d,e.isToken),p(o.whenTrue,u,e.isExpression),p(o.colonToken,d,e.isToken),p(o.whenFalse,u,e.isExpression));case 218:return h.updateTemplateExpression(o,p(o.head,u,e.isTemplateHead),l(o.templateSpans,u,e.isTemplateSpan));case 219:return h.updateYieldExpression(o,p(o.asteriskToken,d,e.isToken),p(o.expression,u,e.isExpression));case 220:return h.updateSpreadElement(o,p(o.expression,u,e.isExpression));case 221:return h.updateClassExpression(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.name,u,e.isIdentifier),l(o.typeParameters,u,e.isTypeParameterDeclaration),l(o.heritageClauses,u,e.isHeritageClause),l(o.members,u,e.isClassElement));case 223:return h.updateExpressionWithTypeArguments(o,p(o.expression,u,e.isExpression),l(o.typeArguments,u,e.isTypeNode));case 224:return h.updateAsExpression(o,p(o.expression,u,e.isExpression),p(o.type,u,e.isTypeNode));case 225:return 32&o.flags?h.updateNonNullChain(o,p(o.expression,u,e.isExpression)):h.updateNonNullExpression(o,p(o.expression,u,e.isExpression));case 226:return h.updateMetaProperty(o,p(o.name,u,e.isIdentifier));case 228:return h.updateTemplateSpan(o,p(o.expression,u,e.isExpression),p(o.literal,u,e.isTemplateMiddleOrTemplateTail));case 230:return h.updateBlock(o,l(o.statements,u,e.isStatement));case 232:return h.updateVariableStatement(o,l(o.modifiers,u,e.isModifier),p(o.declarationList,u,e.isVariableDeclarationList));case 233:return h.updateExpressionStatement(o,p(o.expression,u,e.isExpression));case 234:return h.updateIfStatement(o,p(o.expression,u,e.isExpression),p(o.thenStatement,u,e.isStatement,h.liftToBlock),p(o.elseStatement,u,e.isStatement,h.liftToBlock));case 235:return h.updateDoStatement(o,p(o.statement,u,e.isStatement,h.liftToBlock),p(o.expression,u,e.isExpression));case 236:return h.updateWhileStatement(o,p(o.expression,u,e.isExpression),p(o.statement,u,e.isStatement,h.liftToBlock));case 237:return h.updateForStatement(o,p(o.initializer,u,e.isForInitializer),p(o.condition,u,e.isExpression),p(o.incrementor,u,e.isExpression),p(o.statement,u,e.isStatement,h.liftToBlock));case 238:return h.updateForInStatement(o,p(o.initializer,u,e.isForInitializer),p(o.expression,u,e.isExpression),p(o.statement,u,e.isStatement,h.liftToBlock));case 239:return h.updateForOfStatement(o,p(o.awaitModifier,d,e.isToken),p(o.initializer,u,e.isForInitializer),p(o.expression,u,e.isExpression),p(o.statement,u,e.isStatement,h.liftToBlock));case 240:return h.updateContinueStatement(o,p(o.label,u,e.isIdentifier));case 241:return h.updateBreakStatement(o,p(o.label,u,e.isIdentifier));case 242:return h.updateReturnStatement(o,p(o.expression,u,e.isExpression));case 243:return h.updateWithStatement(o,p(o.expression,u,e.isExpression),p(o.statement,u,e.isStatement,h.liftToBlock));case 244:return h.updateSwitchStatement(o,p(o.expression,u,e.isExpression),p(o.caseBlock,u,e.isCaseBlock));case 245:return h.updateLabeledStatement(o,p(o.label,u,e.isIdentifier),p(o.statement,u,e.isStatement,h.liftToBlock));case 246:return h.updateThrowStatement(o,p(o.expression,u,e.isExpression));case 247:return h.updateTryStatement(o,p(o.tryBlock,u,e.isBlock),p(o.catchClause,u,e.isCatchClause),p(o.finallyBlock,u,e.isBlock));case 249:return h.updateVariableDeclaration(o,p(o.name,u,e.isBindingName),p(o.exclamationToken,d,e.isToken),p(o.type,u,e.isTypeNode),p(o.initializer,u,e.isExpression));case 250:return h.updateVariableDeclarationList(o,l(o.declarations,u,e.isVariableDeclaration));case 251:return h.updateFunctionDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.asteriskToken,d,e.isToken),p(o.name,u,e.isIdentifier),l(o.typeParameters,u,e.isTypeParameterDeclaration),a(o.parameters,u,c,l),p(o.type,u,e.isTypeNode),s(o.body,u,c,p));case 252:return h.updateClassDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.name,u,e.isIdentifier),l(o.typeParameters,u,e.isTypeParameterDeclaration),l(o.heritageClauses,u,e.isHeritageClause),l(o.members,u,e.isClassElement));case 253:return h.updateInterfaceDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.name,u,e.isIdentifier),l(o.typeParameters,u,e.isTypeParameterDeclaration),l(o.heritageClauses,u,e.isHeritageClause),l(o.members,u,e.isTypeElement));case 254:return h.updateTypeAliasDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.name,u,e.isIdentifier),l(o.typeParameters,u,e.isTypeParameterDeclaration),p(o.type,u,e.isTypeNode));case 255:return h.updateEnumDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.name,u,e.isIdentifier),l(o.members,u,e.isEnumMember));case 256:return h.updateModuleDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.name,u,e.isIdentifier),p(o.body,u,e.isModuleBody));case 257:return h.updateModuleBlock(o,l(o.statements,u,e.isStatement));case 258:return h.updateCaseBlock(o,l(o.clauses,u,e.isCaseOrDefaultClause));case 259:return h.updateNamespaceExportDeclaration(o,p(o.name,u,e.isIdentifier));case 260:return h.updateImportEqualsDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.name,u,e.isIdentifier),p(o.moduleReference,u,e.isModuleReference));case 261:return h.updateImportDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.importClause,u,e.isImportClause),p(o.moduleSpecifier,u,e.isExpression));case 262:return h.updateImportClause(o,o.isTypeOnly,p(o.name,u,e.isIdentifier),p(o.namedBindings,u,e.isNamedImportBindings));case 263:return h.updateNamespaceImport(o,p(o.name,u,e.isIdentifier));case 269:return h.updateNamespaceExport(o,p(o.name,u,e.isIdentifier));case 264:return h.updateNamedImports(o,l(o.elements,u,e.isImportSpecifier));case 265:return h.updateImportSpecifier(o,p(o.propertyName,u,e.isIdentifier),p(o.name,u,e.isIdentifier));case 266:return h.updateExportAssignment(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),p(o.expression,u,e.isExpression));case 267:return h.updateExportDeclaration(o,l(o.decorators,u,e.isDecorator),l(o.modifiers,u,e.isModifier),o.isTypeOnly,p(o.exportClause,u,e.isNamedExportBindings),p(o.moduleSpecifier,u,e.isExpression));case 268:return h.updateNamedExports(o,l(o.elements,u,e.isExportSpecifier));case 270:return h.updateExportSpecifier(o,p(o.propertyName,u,e.isIdentifier),p(o.name,u,e.isIdentifier));case 272:return h.updateExternalModuleReference(o,p(o.expression,u,e.isExpression));case 273:return h.updateJsxElement(o,p(o.openingElement,u,e.isJsxOpeningElement),l(o.children,u,e.isJsxChild),p(o.closingElement,u,e.isJsxClosingElement));case 274:return h.updateJsxSelfClosingElement(o,p(o.tagName,u,e.isJsxTagNameExpression),l(o.typeArguments,u,e.isTypeNode),p(o.attributes,u,e.isJsxAttributes));case 275:return h.updateJsxOpeningElement(o,p(o.tagName,u,e.isJsxTagNameExpression),l(o.typeArguments,u,e.isTypeNode),p(o.attributes,u,e.isJsxAttributes));case 276:return h.updateJsxClosingElement(o,p(o.tagName,u,e.isJsxTagNameExpression));case 277:return h.updateJsxFragment(o,p(o.openingFragment,u,e.isJsxOpeningFragment),l(o.children,u,e.isJsxChild),p(o.closingFragment,u,e.isJsxClosingFragment));case 280:return h.updateJsxAttribute(o,p(o.name,u,e.isIdentifier),p(o.initializer,u,e.isStringLiteralOrJsxExpression));case 281:return h.updateJsxAttributes(o,l(o.properties,u,e.isJsxAttributeLike));case 282:return h.updateJsxSpreadAttribute(o,p(o.expression,u,e.isExpression));case 283:return h.updateJsxExpression(o,p(o.expression,u,e.isExpression));case 284:return h.updateCaseClause(o,p(o.expression,u,e.isExpression),l(o.statements,u,e.isStatement));case 285:return h.updateDefaultClause(o,l(o.statements,u,e.isStatement));case 286:return h.updateHeritageClause(o,l(o.types,u,e.isExpressionWithTypeArguments));case 287:return h.updateCatchClause(o,p(o.variableDeclaration,u,e.isVariableDeclaration),p(o.block,u,e.isBlock));case 288:return h.updatePropertyAssignment(o,p(o.name,u,e.isPropertyName),p(o.initializer,u,e.isExpression));case 289:return h.updateShorthandPropertyAssignment(o,p(o.name,u,e.isIdentifier),p(o.objectAssignmentInitializer,u,e.isExpression));case 290:return h.updateSpreadAssignment(o,p(o.expression,u,e.isExpression));case 291:return h.updateEnumMember(o,p(o.name,u,e.isPropertyName),p(o.initializer,u,e.isExpression));case 297:return h.updateSourceFile(o,i(o.statements,u,c));case 336:return h.updatePartiallyEmittedExpression(o,p(o.expression,u,e.isExpression));case 337:return h.updateCommaListExpression(o,l(o.elements,u,e.isExpression));default:return o}}}}(u||(u={})),function(e){e.createSourceMapGenerator=function(t,n,r,i,o){var u,c,l=o.extendedDiagnostics?e.performance.createTimer("Source Map","beforeSourcemap","afterSourcemap"):e.performance.nullTimer,d=l.enter,p=l.exit,f=[],h=[],g=new e.Map,m=[],_="",v=0,y=0,b=0,D=0,E=0,C=0,S=!1,x=0,k=0,T=0,w=0,A=0,O=0,N=!1,I=!1,F=!1;return{getSources:function(){return f},addSource:L,setSourceContent:P,addName:R,addMapping:M,appendSourceMap:function(t,n,r,i,o,s){e.Debug.assert(t>=x,"generatedLine cannot backtrack"),e.Debug.assert(n>=0,"generatedCharacter cannot be negative"),d();for(var u,c=[],l=a(r.mappings),f=l.next();!f.done;f=l.next()){var h=f.value;if(s&&(h.generatedLine>s.line||h.generatedLine===s.line&&h.generatedCharacter>s.character))break;if(!o||!(h.generatedLine=x,"generatedLine cannot backtrack"),e.Debug.assert(n>=0,"generatedCharacter cannot be negative"),e.Debug.assert(void 0===r||r>=0,"sourceIndex cannot be negative"),e.Debug.assert(void 0===i||i>=0,"sourceLine cannot be negative"),e.Debug.assert(void 0===a||a>=0,"sourceCharacter cannot be negative"),d(),(function(e,t){return!N||x!==e||k!==t}(t,n)||function(e,t,n){return void 0!==e&&void 0!==t&&void 0!==n&&T===e&&(w>t||w===t&&A>n)}(r,i,a))&&(B(),x=t,k=n,I=!1,F=!1,N=!0),void 0!==r&&void 0!==i&&void 0!==a&&(T=r,w=i,A=a,I=!0,void 0!==o&&(O=o,F=!0)),p()}function B(){if(N&&(!S||v!==x||y!==k||b!==T||D!==w||E!==A||C!==O)){if(d(),v=e.length)return p("Error in decoding base64VLQFormatDecode, past the mapping string"),-1;var o=(t=e.charCodeAt(r))>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:t>=48&&t<=57?t-48+52:43===t?62:47===t?63:-1;if(-1===o)return p("Invalid character in VLQ"),-1;n=0!=(32&o),a|=(31&o)<>=1:a=-(a>>=1),a}}function o(e){return void 0!==e.sourceIndex&&void 0!==e.sourceLine&&void 0!==e.sourceCharacter}function s(t){t<0?t=1+(-t<<1):t<<=1;var n,r="";do{var i=31&t;(t>>=5)>0&&(i|=32),r+=String.fromCharCode((n=i)>=0&&n<26?65+n:n>=26&&n<52?97+n-26:n>=52&&n<62?48+n-52:62===n?43:63===n?47:e.Debug.fail(n+": not a base64 value"))}while(t>0);return r}function u(e){return void 0!==e.sourceIndex&&void 0!==e.sourcePosition}function c(e,t){return e.generatedPosition===t.generatedPosition&&e.sourceIndex===t.sourceIndex&&e.sourcePosition===t.sourcePosition}function l(t,n){return e.Debug.assert(t.sourceIndex===n.sourceIndex),e.compareValues(t.sourcePosition,n.sourcePosition)}function d(t,n){return e.compareValues(t.generatedPosition,n.generatedPosition)}function p(e){return e.sourcePosition}function f(e){return e.generatedPosition}e.getLineInfo=function(e,t){return{getLineCount:function(){return t.length},getLineText:function(n){return e.substring(t[n],t[n+1])}}},e.tryGetSourceMappingURL=function(e){for(var r=e.getLineCount()-1;r>=0;r--){var i=e.getLineText(r),a=t.exec(i);if(a)return a[1];if(!i.match(n))break}},e.isRawSourceMap=i,e.tryParseRawSourceMap=function(e){try{var t=JSON.parse(e);if(i(t))return t}catch(e){}},e.decodeMappings=a,e.sameMapping=function(e,t){return e===t||e.generatedLine===t.generatedLine&&e.generatedCharacter===t.generatedCharacter&&e.sourceIndex===t.sourceIndex&&e.sourceLine===t.sourceLine&&e.sourceCharacter===t.sourceCharacter&&e.nameIndex===t.nameIndex},e.isSourceMapping=o,e.createDocumentPositionMapper=function(t,n,r){var i,s,h,g=e.getDirectoryPath(r),m=n.sourceRoot?e.getNormalizedAbsolutePath(n.sourceRoot,g):g,_=e.getNormalizedAbsolutePath(n.file,g),v=t.getSourceFileLike(_),y=n.sources.map((function(t){return e.getNormalizedAbsolutePath(t,m)})),b=new e.Map(y.map((function(e,n){return[t.getCanonicalFileName(e),n]})));return{getSourcePosition:function(t){var n=S();if(!e.some(n))return t;var r=e.binarySearchKey(n,t.pos,f,e.compareValues);r<0&&(r=~r);var i=n[r];return void 0!==i&&u(i)?{fileName:y[i.sourceIndex],pos:i.sourcePosition}:t},getGeneratedPosition:function(n){var r=b.get(t.getCanonicalFileName(n.fileName));if(void 0===r)return n;var i=C(r);if(!e.some(i))return n;var a=e.binarySearchKey(i,n.pos,p,e.compareValues);a<0&&(a=~a);var o=i[a];return void 0===o||o.sourceIndex!==r?n:{fileName:_,pos:o.generatedPosition}}};function D(r){var i,a,s=void 0!==v?e.getPositionOfLineAndCharacter(v,r.generatedLine,r.generatedCharacter,!0):-1;if(o(r)){var u=t.getSourceFileLike(y[r.sourceIndex]);i=n.sources[r.sourceIndex],a=void 0!==u?e.getPositionOfLineAndCharacter(u,r.sourceLine,r.sourceCharacter,!0):-1}return{generatedPosition:s,source:i,sourceIndex:r.sourceIndex,sourcePosition:a,nameIndex:r.nameIndex}}function E(){if(void 0===i){var r=a(n.mappings),o=e.arrayFrom(r,D);void 0!==r.error?(t.log&&t.log("Encountered error while decoding sourcemap: "+r.error),i=e.emptyArray):i=o}return i}function C(t){if(void 0===h){for(var n=[],r=0,i=E();r0&&i!==r.elements.length||!!(r.elements.length-i)&&e.isDefaultImport(t)}function i(t){return!r(t)&&(e.isDefaultImport(t)||!!t.importClause&&e.isNamedImports(t.importClause.namedBindings)&&function(t){return!!t&&!!e.isNamedImports(t)&&e.some(t.elements,n)}(t.importClause.namedBindings))}function a(t,n,r){if(e.isBindingPattern(t.name))for(var i=0,o=t.name.elements;i=63&&e<=77},e.getNonAssignmentOperatorForCompoundAssignment=function(e){switch(e){case 63:return 39;case 64:return 40;case 65:return 41;case 66:return 42;case 67:return 43;case 68:return 44;case 69:return 47;case 70:return 48;case 71:return 49;case 72:return 50;case 73:return 51;case 77:return 52;case 74:return 56;case 75:return 55;case 76:return 60}},e.addPrologueDirectivesAndInitialSuperCall=function(t,n,r,i){if(n.body){var a=n.body.statements,o=t.copyPrologue(a,r,!1,i);if(o===a.length)return o;var s=e.findIndex(a,(function(t){return e.isExpressionStatement(t)&&e.isSuperCall(t.expression)}),o);if(s>-1){for(var u=o;u<=s;u++)r.push(e.visitNode(a[u],i,e.isStatement));return s+1}return o}return 0},e.getProperties=function(t,n,r){return e.filter(t.members,(function(t){return function(t,n,r){return e.isPropertyDeclaration(t)&&(!!t.initializer||!n)&&e.hasStaticModifier(t)===r}(t,n,r)}))},e.isInitializedProperty=function(e){return 163===e.kind&&void 0!==e.initializer}}(u||(u={})),function(e){function t(n,r){var i=e.getTargetOfBindingOrAssignmentElement(n);return e.isBindingOrAssignmentPattern(i)?function(n,r){for(var i=0,a=e.getElementsOfBindingOrAssignmentPattern(n);i=1)||24576&h.transformFlags||24576&e.getTargetOfBindingOrAssignmentElement(h).transformFlags||e.isComputedPropertyName(g)){c&&(t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(c),s,u,i),c=void 0);var m=a(t,s,g);e.isComputedPropertyName(g)&&(l=e.append(l,m.argumentExpression)),r(t,h,m,h)}else c=e.append(c,e.visitNode(h,t.visitor))}}c&&t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(c),s,u,i)}(t,n,l,s,u):e.isArrayBindingOrAssignmentPattern(l)?function(t,n,a,s,u){var c,l,d=e.getElementsOfBindingOrAssignmentPattern(a),p=d.length;t.level<1&&t.downlevelIteration?s=o(t,e.setTextRange(t.context.getEmitHelperFactory().createReadHelper(s,p>0&&e.getRestIndicatorOfBindingOrAssignmentElement(d[p-1])?void 0:p),u),!1,u):(1!==p&&(t.level<1||0===p)||e.every(d,e.isOmittedExpression))&&(s=o(t,s,!e.isDeclarationBindingElement(n)||0!==p,u));for(var f=0;f=1)if(16384&h.transformFlags||t.hasTransformedPriorElement&&!i(h)){t.hasTransformedPriorElement=!0;var g=t.context.factory.createTempVariable(void 0);t.hoistTempVariables&&t.context.hoistVariableDeclaration(g),l=e.append(l,[g,h]),c=e.append(c,t.createArrayBindingOrAssignmentElement(g))}else c=e.append(c,h);else{if(e.isOmittedExpression(h))continue;if(e.getRestIndicatorOfBindingOrAssignmentElement(h))f===p-1&&(m=t.context.factory.createArraySliceCall(s,f),r(t,h,m,h));else{var m=t.context.factory.createElementAccessExpression(s,f);r(t,h,m,h)}}}if(c&&t.emitBindingOrAssignment(t.createArrayBindingOrAssignmentPattern(c),s,u,a),l)for(var _=0,v=l;_0)return!0;var n=e.getFirstConstructorWithBody(t);return!!n&&e.forEach(n.parameters,B)}(t)&&(r|=2),e.childIsDecorated(t)&&(r|=4),ke(t)?r|=8:function(t){return Te(t)&&e.hasSyntacticModifier(t,512)}(t)?r|=32:we(t)&&(r|=16),D<=1&&7&r&&(r|=128),r}(i,e.getProperties(i,!0,!0));128&a&&t.startLexicalEnvironment();var o=i.name||(5&a?p.getGeneratedNameForNode(i):void 0),s=2&a?function(n,r){var i=e.moveRangePastDecorators(n),a=function(n){if(16777216&v.getNodeCheckFlags(n)){0==(1&c)&&(c|=1,t.enableSubstitution(78),l=[]);var r=p.createUniqueName(n.name&&!e.isGeneratedIdentifier(n.name)?e.idText(n.name):"default");return l[e.getOriginalNodeId(n)]=r,_(r),r}}(n),o=p.getLocalName(n,!1,!0),s=e.visitNodes(n.heritageClauses,T,e.isHeritageClause),u=V(n),d=p.createClassExpression(void 0,void 0,r,void 0,s,u);e.setOriginalNode(d,n),e.setTextRange(d,i);var f=p.createVariableStatement(void 0,p.createVariableDeclarationList([p.createVariableDeclaration(o,void 0,void 0,a?p.createAssignment(a,d):d)],1));return e.setOriginalNode(f,n),e.setTextRange(f,i),e.setCommentRange(f,n),f}(i,o):function(t,n,r){var i=128&r?void 0:e.visitNodes(t.modifiers,P,e.isModifier),a=p.createClassDeclaration(void 0,i,n,void 0,e.visitNodes(t.heritageClauses,T,e.isHeritageClause),V(t)),o=e.getEmitFlags(t);return 1&r&&(o|=32),e.setTextRange(a,t),e.setOriginalNode(a,t),e.setEmitFlags(a,o),a}(i,o,a),u=[s];if(G(u,i,!1),G(u,i,!0),function(t,n){var r=function(t){var n=q(t,t,function(t){var n=t.decorators,r=W(e.getFirstConstructorWithBody(t));if(n||r)return{decorators:n,parameters:r}}(t));if(n){var r=l&&l[e.getOriginalNodeId(t)],i=p.getLocalName(t,!1,!0),a=f().createDecorateHelper(n,i),o=p.createAssignment(i,r?p.createAssignment(r,a):a);return e.setEmitFlags(o,1536),e.setSourceMapRange(o,e.moveRangePastDecorators(t)),o}}(n);r&&t.push(e.setOriginalNode(p.createExpressionStatement(r),n))}(u,i),128&a){var d=e.createTokenRange(e.skipTrivia(n.text,i.members.end),19),h=p.getInternalName(i),g=p.createPartiallyEmittedExpression(h);e.setTextRangeEnd(g,d.end),e.setEmitFlags(g,1536);var m=p.createReturnStatement(g);e.setTextRangePos(m,d.pos),e.setEmitFlags(m,1920),u.push(m),e.insertStatementsAfterStandardPrologue(u,t.endLexicalEnvironment());var y=p.createImmediatelyInvokedArrowFunction(u);e.setEmitFlags(y,33554432);var b=p.createVariableStatement(void 0,p.createVariableDeclarationList([p.createVariableDeclaration(p.getLocalName(i,!1,!1),void 0,void 0,y)]));e.setOriginalNode(b,i),e.setCommentRange(b,i),e.setSourceMapRange(b,e.moveRangePastDecorators(i)),e.startOnNewLine(b),u=[b]}return 8&a?Oe(u,i):(128&a||2&a)&&(32&a?u.push(p.createExportDefault(p.getLocalName(i,!1,!0))):16&a&&u.push(p.createExternalModuleExport(p.getLocalName(i,!1,!0)))),u.length>1&&(u.push(p.createEndOfDeclarationMarker(i)),e.setEmitFlags(s,4194304|e.getEmitFlags(s))),e.singleOrMany(u)}(o);case 221:return function(n){if(!U(n))return e.visitEachChild(n,T,t);var r=p.createClassExpression(void 0,void 0,n.name,void 0,e.visitNodes(n.heritageClauses,T,e.isHeritageClause),V(n));return e.setOriginalNode(r,n),e.setTextRange(r,n),r}(o);case 286:return function(n){if(116!==n.token)return e.visitEachChild(n,T,t)}(o);case 223:return function(t){return p.updateExpressionWithTypeArguments(t,e.visitNode(t.expression,T,e.isLeftHandSideExpression),void 0)}(o);case 165:return function(n){if(se(n)){var r=p.updateMethodDeclaration(n,void 0,e.visitNodes(n.modifiers,P,e.isModifier),n.asteriskToken,oe(n),void 0,void 0,e.visitParameterList(n.parameters,T,t),void 0,e.visitFunctionBody(n.body,T,t));return r!==n&&(e.setCommentRange(r,n),e.setSourceMapRange(r,e.moveRangePastDecorators(n))),r}}(o);case 167:return function(n){if(de(n)){var r=p.updateGetAccessorDeclaration(n,void 0,e.visitNodes(n.modifiers,P,e.isModifier),oe(n),e.visitParameterList(n.parameters,T,t),void 0,e.visitFunctionBody(n.body,T,t)||p.createBlock([]));return r!==n&&(e.setCommentRange(r,n),e.setSourceMapRange(r,e.moveRangePastDecorators(n))),r}}(o);case 168:return function(n){if(de(n)){var r=p.updateSetAccessorDeclaration(n,void 0,e.visitNodes(n.modifiers,P,e.isModifier),oe(n),e.visitParameterList(n.parameters,T,t),e.visitFunctionBody(n.body,T,t)||p.createBlock([]));return r!==n&&(e.setCommentRange(r,n),e.setSourceMapRange(r,e.moveRangePastDecorators(n))),r}}(o);case 251:return function(n){if(!se(n))return p.createNotEmittedStatement(n);var r=p.updateFunctionDeclaration(n,void 0,e.visitNodes(n.modifiers,P,e.isModifier),n.asteriskToken,n.name,void 0,e.visitParameterList(n.parameters,T,t),void 0,e.visitFunctionBody(n.body,T,t)||p.createBlock([]));if(ke(n)){var i=[r];return Oe(i,n),i}return r}(o);case 208:return function(n){return se(n)?p.updateFunctionExpression(n,e.visitNodes(n.modifiers,P,e.isModifier),n.asteriskToken,n.name,void 0,e.visitParameterList(n.parameters,T,t),void 0,e.visitFunctionBody(n.body,T,t)||p.createBlock([])):p.createOmittedExpression()}(o);case 209:return function(n){return p.updateArrowFunction(n,e.visitNodes(n.modifiers,P,e.isModifier),void 0,e.visitParameterList(n.parameters,T,t),void 0,n.equalsGreaterThanToken,e.visitFunctionBody(n.body,T,t))}(o);case 160:return function(t){if(!e.parameterIsThisKeyword(t)){var n=p.updateParameterDeclaration(t,void 0,void 0,t.dotDotDotToken,e.visitNode(t.name,T,e.isBindingName),void 0,void 0,e.visitNode(t.initializer,T,e.isExpression));return n!==t&&(e.setCommentRange(n,t),e.setTextRange(n,e.moveRangePastModifiers(t)),e.setSourceMapRange(n,e.moveRangePastModifiers(t)),e.setEmitFlags(n.name,32)),n}}(o);case 207:return function(r){var i=e.skipOuterExpressions(r.expression,-7);if(e.isAssertionExpression(i)){var a=e.visitNode(r.expression,T,e.isExpression);return e.length(e.getLeadingCommentRangesOfNode(a,n))?p.updateParenthesizedExpression(r,a):p.createPartiallyEmittedExpression(a,r)}return e.visitEachChild(r,T,t)}(o);case 206:case 224:return function(t){var n=e.visitNode(t.expression,T,e.isExpression);return p.createPartiallyEmittedExpression(n,t)}(o);case 203:return function(t){return p.updateCallExpression(t,e.visitNode(t.expression,T,e.isExpression),void 0,e.visitNodes(t.arguments,T,e.isExpression))}(o);case 204:return function(t){return p.updateNewExpression(t,e.visitNode(t.expression,T,e.isExpression),void 0,e.visitNodes(t.arguments,T,e.isExpression))}(o);case 205:return function(t){return p.updateTaggedTemplateExpression(t,e.visitNode(t.tag,T,e.isExpression),void 0,e.visitNode(t.template,T,e.isExpression))}(o);case 225:return function(t){var n=e.visitNode(t.expression,T,e.isLeftHandSideExpression);return p.createPartiallyEmittedExpression(n,t)}(o);case 255:return function(t){if(!function(t){return!e.isEnumConst(t)||y.preserveConstEnums||y.isolatedModules}(t))return p.createNotEmittedStatement(t);var r=[],o=2,s=_e(r,t);s&&(E===e.ModuleKind.System&&a===n||(o|=512));var u=Fe(t),c=Le(t),l=e.hasSyntacticModifier(t,1)?p.getExternalModuleOrNamespaceExportName(i,t,!1,!0):p.getLocalName(t,!1,!0),d=p.createLogicalOr(l,p.createAssignment(l,p.createObjectLiteralExpression()));if(he(t)){var f=p.getLocalName(t,!1,!0);d=p.createAssignment(f,d)}var g=p.createExpressionStatement(p.createCallExpression(p.createFunctionExpression(void 0,void 0,void 0,void 0,[p.createParameterDeclaration(void 0,void 0,void 0,u)],void 0,function(t,n){var r=i;i=n;var a=[];h();var o=e.map(t.members,fe);return e.insertStatementsAfterStandardPrologue(a,m()),e.addRange(a,o),i=r,p.createBlock(e.setTextRange(p.createNodeArray(a),t.members),!0)}(t,c)),void 0,[d]));return e.setOriginalNode(g,t),s&&(e.setSyntheticLeadingComments(g,void 0),e.setSyntheticTrailingComments(g,void 0)),e.setTextRange(g,t),e.addEmitFlags(g,o),r.push(g),r.push(p.createEndOfDeclarationMarker(t)),r}(o);case 232:return function(n){if(ke(n)){var r=e.getInitializedVariables(n.declarationList);if(0===r.length)return;return e.setTextRange(p.createExpressionStatement(p.inlineExpressions(e.map(r,pe))),n)}return e.visitEachChild(n,T,t)}(o);case 249:return function(t){return p.updateVariableDeclaration(t,e.visitNode(t.name,T,e.isBindingName),void 0,void 0,e.visitNode(t.initializer,T,e.isExpression))}(o);case 256:return ve(o);case 260:return xe(o);case 274:return function(t){return p.updateJsxSelfClosingElement(t,e.visitNode(t.tagName,T,e.isJsxTagNameExpression),void 0,e.visitNode(t.attributes,T,e.isJsxAttributes))}(o);case 275:return function(t){return p.updateJsxOpeningElement(t,e.visitNode(t.tagName,T,e.isJsxTagNameExpression),void 0,e.visitNode(t.attributes,T,e.isJsxAttributes))}(o);default:return e.visitEachChild(o,T,t)}}function M(n){var r=e.getStrictOptionValue(y,"alwaysStrict")&&!(e.isExternalModule(n)&&E>=e.ModuleKind.ES2015)&&!e.isJsonSourceFile(n);return p.updateSourceFile(n,e.visitLexicalEnvironment(n.statements,A,t,0,r))}function B(e){return void 0!==e.decorators&&e.decorators.length>0}function j(e){return!!(2048&e.transformFlags)}function U(t){return e.some(t.decorators)||e.some(t.typeParameters)||e.some(t.heritageClauses,j)||e.some(t.members,j)}function V(t){var n=[],r=e.getFirstConstructorWithBody(t),i=r&&e.filter(r.parameters,(function(t){return e.isParameterPropertyDeclaration(t,r)}));if(i)for(var a=0,o=i;a0&&e.parameterIsThisKeyword(r[0]),a=i?1:0,o=i?r.length-1:r.length,s=0;s0?163===n.kind?p.createVoidZero():p.createNull():void 0,s=f().createDecorateHelper(r,i,a,o);return e.setTextRange(s,e.moveRangePastDecorators(n)),e.setEmitFlags(s,1536),s}}function J(t){return e.visitNode(t.expression,T,e.isExpression)}function $(t,n){var r;if(t){r=[];for(var i=0,a=t;iu&&(a||e.addRange(d,e.visitNodes(r.body.statements,v,e.isStatement,u,p-u)),u=p)}return O(d,o,s.createThis()),r&&e.addRange(d,e.visitNodes(r.body.statements,v,e.isStatement,u)),d=s.mergeLexicalEnvironment(d,c()),e.setTextRange(s.createBlock(e.setTextRange(s.createNodeArray(d),r?r.body.statements:t.members),!0),r?r.body:void 0)}(t,i,r);return u?e.startOnNewLine(e.setOriginalNode(e.setTextRange(s.createConstructorDeclaration(void 0,void 0,null!=o?o:[],u),i||t),i)):void 0}(t,r);return d&&u.push(d),e.addRange(u,e.visitNodes(t.members,b,e.isClassElement)),e.setTextRange(s.createNodeArray(u),t.members)}function A(t){return!(!e.isPropertyDeclaration(t)||e.hasStaticModifier(t))&&(n.getCompilerOptions().useDefineForClassFields?f<99:e.isInitializedProperty(t)||h&&e.isPrivateIdentifierPropertyDeclaration(t))}function O(t,n,r){for(var i=0,a=n;i=0;--t){var n,r=_[t];if(r&&(n=r.get(e.escapedText)))return n}}function P(t){var r=s.getGeneratedNameForNode(t),i=L(t.name);if(!i)return e.visitEachChild(t,v,n);var a=t.expression;return(e.isThisProperty(t)||e.isSuperProperty(t)||!e.isSimpleCopiableExpression(t.expression))&&(a=s.createTempVariable(u,!0),I().push(s.createBinaryExpression(a,62,t.expression))),s.createPropertyAccessExpression(s.createParenthesizedExpression(s.createObjectLiteralExpression([s.createSetAccessorDeclaration(void 0,void 0,"value",[s.createParameterDeclaration(void 0,void 0,void 0,r,void 0,void 0,void 0)],s.createBlock([s.createExpressionStatement(k(i,a,r,62))]))])),"value")}function R(t){var n=e.getTargetOfBindingOrAssignmentElement(t);if(n&&e.isPrivateIdentifierPropertyAccessExpression(n)){var r=P(n);return e.isAssignmentExpression(t)?s.updateBinaryExpression(t,r,t.operatorToken,e.visitNode(t.right,v,e.isExpression)):e.isSpreadElement(t)?s.updateSpreadElement(t,r):r}return e.visitNode(t,y)}function M(t){if(e.isPropertyAssignment(t)){var n=e.getTargetOfBindingOrAssignmentElement(t);if(n&&e.isPrivateIdentifierPropertyAccessExpression(n)){var r=e.getInitializerOfBindingOrAssignmentElement(t),i=P(n);return s.updatePropertyAssignment(t,e.visitNode(t.name,v),r?s.createAssignment(i,e.visitNode(r,v)):i)}return s.updatePropertyAssignment(t,e.visitNode(t.name,v),e.visitNode(t.initializer,y))}return e.visitNode(t,v)}}}(u||(u={})),function(e){var n,r;function i(t,n,r,i){var a=0!=(4096&n.getNodeCheckFlags(r)),o=[];return i.forEach((function(n,r){var i=e.unescapeLeadingUnderscores(r),s=[];s.push(t.createPropertyAssignment("get",t.createArrowFunction(void 0,void 0,[],void 0,void 0,e.setEmitFlags(t.createPropertyAccessExpression(e.setEmitFlags(t.createSuper(),4),i),4)))),a&&s.push(t.createPropertyAssignment("set",t.createArrowFunction(void 0,void 0,[t.createParameterDeclaration(void 0,void 0,void 0,"v",void 0,void 0,void 0)],void 0,void 0,t.createAssignment(e.setEmitFlags(t.createPropertyAccessExpression(e.setEmitFlags(t.createSuper(),4),i),4),t.createIdentifier("v"))))),o.push(t.createPropertyAssignment(i,t.createObjectLiteralExpression(s)))})),t.createVariableStatement(void 0,t.createVariableDeclarationList([t.createVariableDeclaration(t.createUniqueName("_super",48),void 0,void 0,t.createCallExpression(t.createPropertyAccessExpression(t.createIdentifier("Object"),"create"),void 0,[t.createNull(),t.createObjectLiteralExpression(o,!0)]))],2))}!function(e){e[e.AsyncMethodsWithSuper=1]="AsyncMethodsWithSuper"}(n||(n={})),function(e){e[e.NonTopLevel=1]="NonTopLevel",e[e.HasLexicalThis=2]="HasLexicalThis"}(r||(r={})),e.transformES2017=function(n){var r,a,o,s,u=n.factory,c=n.getEmitHelperFactory,l=n.resumeLexicalEnvironment,d=n.endLexicalEnvironment,p=n.hoistVariableDeclaration,f=n.getEmitResolver(),h=n.getCompilerOptions(),g=e.getEmitScriptTarget(h),m=0,_=[],v=0,y=n.onEmitNode,b=n.onSubstituteNode;return n.onEmitNode=function(t,n,i){if(1&r&&function(e){var t=e.kind;return 252===t||166===t||165===t||167===t||168===t}(n)){var a=6144&f.getNodeCheckFlags(n);if(a!==m){var o=m;return m=a,y(t,n,i),void(m=o)}}else if(r&&_[e.getNodeId(n)])return o=m,m=0,y(t,n,i),void(m=o);y(t,n,i)},n.onSubstituteNode=function(n,r){return r=b(n,r),1===n&&m?function(n){switch(n.kind){case 201:return U(n);case 202:return V(n);case 203:return function(n){var r=n.expression;if(e.isSuperProperty(r)){var i=e.isPropertyAccessExpression(r)?U(r):V(r);return u.createCallExpression(u.createPropertyAccessExpression(i,"call"),void 0,t([u.createThis()],n.arguments))}return n}(n)}return n}(r):r},e.chainBundle(n,(function(t){if(t.isDeclarationFile)return t;D(1,!1),D(2,!e.isEffectiveStrictModeSourceFile(t,h));var r=e.visitEachChild(t,k,n);return e.addEmitHelpers(r,n.readEmitHelpers()),r}));function D(e,t){v=t?v|e:v&~e}function E(e){return 0!=(v&e)}function C(){return E(2)}function S(e,t,n){var r=e&~v;if(r){D(r,!0);var i=t(n);return D(r,!1),i}return t(n)}function x(t){return e.visitEachChild(t,k,n)}function k(t){if(0==(64&t.transformFlags))return t;switch(t.kind){case 129:return;case 213:return function(t){return E(1)?e.setOriginalNode(e.setTextRange(u.createYieldExpression(void 0,e.visitNode(t.expression,k,e.isExpression)),t),t):e.visitEachChild(t,k,n)}(t);case 165:return S(3,w,t);case 251:return S(3,A,t);case 208:return S(3,O,t);case 209:return S(1,N,t);case 201:return o&&e.isPropertyAccessExpression(t)&&105===t.expression.kind&&o.add(t.name.escapedText),e.visitEachChild(t,k,n);case 202:return o&&105===t.expression.kind&&(s=!0),e.visitEachChild(t,k,n);case 167:case 168:case 166:case 252:case 221:return S(3,x,t);default:return e.visitEachChild(t,k,n)}}function T(t){if(e.isNodeWithPossibleHoistedDeclaration(t))switch(t.kind){case 232:return function(t){if(F(t.declarationList)){var r=L(t.declarationList,!1);return r?u.createExpressionStatement(r):void 0}return e.visitEachChild(t,k,n)}(t);case 237:return function(t){var n=t.initializer;return u.updateForStatement(t,F(n)?L(n,!1):e.visitNode(t.initializer,k,e.isForInitializer),e.visitNode(t.condition,k,e.isExpression),e.visitNode(t.incrementor,k,e.isExpression),e.visitNode(t.statement,T,e.isStatement,u.liftToBlock))}(t);case 238:return function(t){return u.updateForInStatement(t,F(t.initializer)?L(t.initializer,!0):e.visitNode(t.initializer,k,e.isForInitializer),e.visitNode(t.expression,k,e.isExpression),e.visitNode(t.statement,T,e.isStatement,u.liftToBlock))}(t);case 239:return function(t){return u.updateForOfStatement(t,e.visitNode(t.awaitModifier,k,e.isToken),F(t.initializer)?L(t.initializer,!0):e.visitNode(t.initializer,k,e.isForInitializer),e.visitNode(t.expression,k,e.isExpression),e.visitNode(t.statement,T,e.isStatement,u.liftToBlock))}(t);case 287:return function(t){var r,i=new e.Set;if(I(t.variableDeclaration,i),i.forEach((function(t,n){a.has(n)&&(r||(r=new e.Set(a)),r.delete(n))})),r){var o=a;a=r;var s=e.visitEachChild(t,T,n);return a=o,s}return e.visitEachChild(t,T,n)}(t);case 230:case 244:case 258:case 284:case 285:case 247:case 235:case 236:case 234:case 243:case 245:return e.visitEachChild(t,T,n);default:return e.Debug.assertNever(t,"Unhandled node.")}return k(t)}function w(t){return u.updateMethodDeclaration(t,void 0,e.visitNodes(t.modifiers,k,e.isModifier),t.asteriskToken,t.name,void 0,void 0,e.visitParameterList(t.parameters,k,n),void 0,2&e.getFunctionFlags(t)?B(t):e.visitFunctionBody(t.body,k,n))}function A(t){return u.updateFunctionDeclaration(t,void 0,e.visitNodes(t.modifiers,k,e.isModifier),t.asteriskToken,t.name,void 0,e.visitParameterList(t.parameters,k,n),void 0,2&e.getFunctionFlags(t)?B(t):e.visitFunctionBody(t.body,k,n))}function O(t){return u.updateFunctionExpression(t,e.visitNodes(t.modifiers,k,e.isModifier),t.asteriskToken,t.name,void 0,e.visitParameterList(t.parameters,k,n),void 0,2&e.getFunctionFlags(t)?B(t):e.visitFunctionBody(t.body,k,n))}function N(t){return u.updateArrowFunction(t,e.visitNodes(t.modifiers,k,e.isModifier),void 0,e.visitParameterList(t.parameters,k,n),void 0,t.equalsGreaterThanToken,2&e.getFunctionFlags(t)?B(t):e.visitFunctionBody(t.body,k,n))}function I(t,n){var r=t.name;if(e.isIdentifier(r))n.add(r.escapedText);else for(var i=0,a=r.elements;i=2&&6144&f.getNodeCheckFlags(t);if(N&&(0==(1&r)&&(r|=1,n.enableSubstitution(203),n.enableSubstitution(201),n.enableSubstitution(202),n.enableEmitNotification(252),n.enableEmitNotification(165),n.enableEmitNotification(167),n.enableEmitNotification(168),n.enableEmitNotification(166),n.enableEmitNotification(232)),o.size)){var F=i(u,f,t,o);_[e.getNodeId(F)]=!0,e.insertStatementsAfterStandardPrologue(A,[F])}var L=u.createBlock(A,!0);e.setTextRange(L,t.body),N&&s&&(4096&f.getNodeCheckFlags(t)?e.addEmitHelper(L,e.advancedAsyncSuperHelper):2048&f.getNodeCheckFlags(t)&&e.addEmitHelper(L,e.asyncSuperHelper)),E=L}return a=y,m||(o=S,s=x),E}function j(t,n){return e.isBlock(t)?u.updateBlock(t,e.visitNodes(t.statements,T,e.isStatement,n)):u.converters.convertToFunctionBlock(e.visitNode(t,T,e.isConciseBody))}function U(t){return 105===t.expression.kind?e.setTextRange(u.createPropertyAccessExpression(u.createUniqueName("_super",48),t.name),t):t}function V(t){return 105===t.expression.kind?(n=t.argumentExpression,r=t,4096&m?e.setTextRange(u.createPropertyAccessExpression(u.createCallExpression(u.createUniqueName("_superIndex",48),void 0,[n]),"value"),r):e.setTextRange(u.createCallExpression(u.createUniqueName("_superIndex",48),void 0,[n]),r)):t;var n,r}},e.createSuperAccessVariableStatement=i}(u||(u={})),function(e){var n,r;!function(e){e[e.AsyncMethodsWithSuper=1]="AsyncMethodsWithSuper"}(n||(n={})),function(e){e[e.None=0]="None",e[e.HasLexicalThis=1]="HasLexicalThis",e[e.IterationContainer=2]="IterationContainer",e[e.AncestorFactsMask=3]="AncestorFactsMask",e[e.SourceFileIncludes=1]="SourceFileIncludes",e[e.SourceFileExcludes=2]="SourceFileExcludes",e[e.StrictModeSourceFileIncludes=0]="StrictModeSourceFileIncludes",e[e.ClassOrFunctionIncludes=1]="ClassOrFunctionIncludes",e[e.ClassOrFunctionExcludes=2]="ClassOrFunctionExcludes",e[e.ArrowFunctionIncludes=0]="ArrowFunctionIncludes",e[e.ArrowFunctionExcludes=2]="ArrowFunctionExcludes",e[e.IterationStatementIncludes=2]="IterationStatementIncludes",e[e.IterationStatementExcludes=0]="IterationStatementExcludes"}(r||(r={})),e.transformES2018=function(n){var r=n.factory,i=n.getEmitHelperFactory,a=n.resumeLexicalEnvironment,o=n.endLexicalEnvironment,s=n.hoistVariableDeclaration,u=n.getEmitResolver(),c=n.getCompilerOptions(),l=e.getEmitScriptTarget(c),d=n.onEmitNode;n.onEmitNode=function(t,n,r){if(1&f&&function(e){var t=e.kind;return 252===t||166===t||165===t||167===t||168===t}(n)){var i=6144&u.getNodeCheckFlags(n);if(i!==b){var a=b;return b=i,d(t,n,r),void(b=a)}}else if(f&&E[e.getNodeId(n)])return a=b,b=0,d(t,n,r),void(b=a);d(t,n,r)};var p=n.onSubstituteNode;n.onSubstituteNode=function(n,i){return i=p(n,i),1===n&&b?function(n){switch(n.kind){case 201:return q(n);case 202:return G(n);case 203:return function(n){var i=n.expression;if(e.isSuperProperty(i)){var a=e.isPropertyAccessExpression(i)?q(i):G(i);return r.createCallExpression(r.createPropertyAccessExpression(a,"call"),void 0,t([r.createThis()],n.arguments))}return n}(n)}return n}(i):i};var f,h,g,m,_,v,y=!1,b=0,D=0,E=[];return e.chainBundle(n,(function(t){if(t.isDeclarationFile)return t;g=t;var i=function(t){var i=C(2,e.isEffectiveStrictModeSourceFile(t,c)?0:1);y=!1;var a=e.visitEachChild(t,k,n),o=e.concatenate(a.statements,m&&[r.createVariableStatement(void 0,r.createVariableDeclarationList(m))]),s=r.updateSourceFile(a,e.setTextRange(r.createNodeArray(o),t.statements));return S(i),s}(t);return e.addEmitHelpers(i,n.readEmitHelpers()),g=void 0,m=void 0,i}));function C(e,t){var n=D;return D=3&(D&~e|t),n}function S(e){D=e}function x(t){m=e.append(m,r.createVariableDeclaration(t))}function k(e){return N(e,!1)}function T(e){return N(e,!0)}function w(e){if(129!==e.kind)return e}function A(e,t,n,r){if(function(e,t){return D!==(D&~e|t)}(n,r)){var i=C(n,r),a=e(t);return S(i),a}return e(t)}function O(t){return e.visitEachChild(t,k,n)}function N(a,o){if(0==(32&a.transformFlags))return a;switch(a.kind){case 213:return function(t){return 2&h&&1&h?e.setOriginalNode(e.setTextRange(r.createYieldExpression(void 0,i().createAwaitHelper(e.visitNode(t.expression,k,e.isExpression))),t),t):e.visitEachChild(t,k,n)}(a);case 219:return function(t){if(2&h&&1&h){if(t.asteriskToken){var a=e.visitNode(e.Debug.assertDefined(t.expression),k,e.isExpression);return e.setOriginalNode(e.setTextRange(r.createYieldExpression(void 0,i().createAwaitHelper(r.updateYieldExpression(t,t.asteriskToken,e.setTextRange(i().createAsyncDelegatorHelper(e.setTextRange(i().createAsyncValuesHelper(a),a)),a)))),t),t)}return e.setOriginalNode(e.setTextRange(r.createYieldExpression(void 0,P(t.expression?e.visitNode(t.expression,k,e.isExpression):r.createVoidZero())),t),t)}return e.visitEachChild(t,k,n)}(a);case 242:return function(t){return 2&h&&1&h?r.updateReturnStatement(t,P(t.expression?e.visitNode(t.expression,k,e.isExpression):r.createVoidZero())):e.visitEachChild(t,k,n)}(a);case 245:return function(t){if(2&h){var i=e.unwrapInnermostStatementOfLabel(t);return 239===i.kind&&i.awaitModifier?L(i,t):r.restoreEnclosingLabel(e.visitNode(i,k,e.isStatement,r.liftToBlock),t)}return e.visitEachChild(t,k,n)}(a);case 200:return function(t){if(16384&t.transformFlags){var a=function(t){for(var n,i=[],a=0,o=t;a1){for(var s=1;s=2&&6144&u.getNodeCheckFlags(t);if(g){0==(1&f)&&(f|=1,n.enableSubstitution(203),n.enableSubstitution(201),n.enableSubstitution(202),n.enableEmitNotification(252),n.enableEmitNotification(165),n.enableEmitNotification(167),n.enableEmitNotification(168),n.enableEmitNotification(166),n.enableEmitNotification(232));var m=e.createSuperAccessVariableStatement(r,u,t,_);E[e.getNodeId(m)]=!0,e.insertStatementsAfterStandardPrologue(s,[m])}s.push(h),e.insertStatementsAfterStandardPrologue(s,o());var y=r.updateBlock(t.body,s);return g&&v&&(4096&u.getNodeCheckFlags(t)?e.addEmitHelper(y,e.advancedAsyncSuperHelper):2048&u.getNodeCheckFlags(t)&&e.addEmitHelper(y,e.asyncSuperHelper)),_=d,v=p,y}function W(t){var n;a();var i=0,s=[],u=null!==(n=e.visitNode(t.body,k,e.isConciseBody))&&void 0!==n?n:r.createBlock([]);e.isBlock(u)&&(i=r.copyPrologue(u.statements,s,!1,k)),e.addRange(s,K(void 0,t));var c=o();if(i>0||e.some(s)||e.some(c)){var l=r.converters.convertToFunctionBlock(u,!0);return e.insertStatementsAfterStandardPrologue(s,c),e.addRange(s,l.statements.slice(i)),r.updateBlock(l,e.setTextRange(r.createNodeArray(s),l.statements))}return u}function K(t,i){for(var a=0,o=i.parameters;a1?"jsxs":"jsx"}(e))}function l(t){var n,r,o="createElement"===t?i.importSpecifier:e.getJSXRuntimeImport(i.importSpecifier,s),u=null===(r=null===(n=i.utilizedImplicitRuntimeImports)||void 0===n?void 0:n.get(o))||void 0===r?void 0:r.get(t);if(u)return u.name;i.utilizedImplicitRuntimeImports||(i.utilizedImplicitRuntimeImports=e.createMap());var c=i.utilizedImplicitRuntimeImports.get(o);c||(c=e.createMap(),i.utilizedImplicitRuntimeImports.set(o,c));var l=a.createUniqueName("_"+t,112),d=a.createImportSpecifier(a.createIdentifier(t),l);return l.generatedImportReference=d,c.set(t,d),l}function d(t){return 2&t.transformFlags?function(t){switch(t.kind){case 273:return h(t,!1);case 274:return g(t,!1);case 277:return m(t,!1);case 283:return A(t);default:return e.visitEachChild(t,d,n)}}(t):t}function p(t){switch(t.kind){case 11:return function(t){var n=function(t){for(var n,r=0,i=-1,a=0;a1?a.createTrue():a.createFalse());var h=e.getLineAndCharacterOfPosition(f,d.pos);p.push(a.createObjectLiteralExpression([a.createPropertyAssignment("fileName",u()),a.createPropertyAssignment("lineNumber",a.createNumericLiteral(h.line+1)),a.createPropertyAssignment("columnNumber",a.createNumericLiteral(h.character+1))])),p.push(a.createThis())}}var g=e.setTextRange(a.createCallExpression(c(o),void 0,p),d);return l&&e.startOnNewLine(g),g}function b(t,u,c,d){var f,h=w(t),g=t.attributes.properties;if(0===g.length)f=a.createNull();else{var m=e.flatten(e.spanMap(g,e.isJsxSpreadAttribute,(function(t,n){return n?e.map(t,C):a.createObjectLiteralExpression(e.map(t,S))})));e.isJsxSpreadAttribute(g[0])&&m.unshift(a.createObjectLiteralExpression()),(f=e.singleOrUndefined(m))||(f=o().createAssignHelper(m))}var _=void 0===i.importSpecifier?e.createJsxFactoryExpression(a,n.getEmitResolver().getJsxFactoryEntity(r),s.reactNamespace,t):l("createElement"),v=e.createExpressionForJsxElement(a,_,h,f,e.mapDefined(u,p),d);return c&&e.startOnNewLine(v),v}function D(t,n,r,i){var o;if(n&&n.length){var s=_(n);s&&(o=s)}return y(l("Fragment"),o||a.createObjectLiteralExpression([]),void 0,e.length(e.getSemanticJsxChildren(n)),r,i)}function E(t,i,o,u){var c=e.createExpressionForJsxFragment(a,n.getEmitResolver().getJsxFactoryEntity(r),n.getEmitResolver().getJsxFragmentFactoryEntity(r),s.reactNamespace,e.mapDefined(i,p),t,u);return o&&e.startOnNewLine(c),c}function C(t){return e.visitNode(t.expression,d,e.isExpression)}function S(t){var n=function(t){var n=t.name,r=e.idText(n);return/^[A-Za-z_]\w*$/.test(r)?n:a.createStringLiteral(r)}(t),r=x(t.initializer);return a.createPropertyAssignment(n,r)}function x(t){if(void 0===t)return a.createTrue();if(10===t.kind){var n=void 0!==t.singleQuote?t.singleQuote:!e.isStringDoubleQuoted(t,r),i=a.createStringLiteral(((s=T(o=t.text))===o?void 0:s)||t.text,n);return e.setTextRange(i,t)}return 283===t.kind?void 0===t.expression?a.createTrue():e.visitNode(t.expression,d,e.isExpression):e.Debug.failBadSyntaxKind(t);var o,s}function k(e,t){var n=T(t);return void 0===e?n:e+" "+n}function T(n){return n.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g,(function(n,r,i,a,o,s,u){if(o)return e.utf16EncodeAsString(parseInt(o,10));if(s)return e.utf16EncodeAsString(parseInt(s,16));var c=t.get(u);return c?e.utf16EncodeAsString(c):n}))}function w(t){if(273===t.kind)return w(t.openingElement);var n=t.tagName;return e.isIdentifier(n)&&e.isIntrinsicJsxName(n.escapedText)?a.createStringLiteral(e.idText(n)):e.createExpressionFromEntityName(a,n)}function A(t){return e.visitNode(t.expression,d,e.isExpression)}};var t=new e.Map(e.getEntries({quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830}))}(u||(u={})),function(e){e.transformES2016=function(t){var n=t.factory,r=t.hoistVariableDeclaration;return e.chainBundle(t,(function(n){return n.isDeclarationFile?n:e.visitEachChild(n,i,t)}));function i(a){if(0==(128&a.transformFlags))return a;switch(a.kind){case 216:return function(a){switch(a.operatorToken.kind){case 66:return function(t){var a,o,s=e.visitNode(t.left,i,e.isExpression),u=e.visitNode(t.right,i,e.isExpression);if(e.isElementAccessExpression(s)){var c=n.createTempVariable(r),l=n.createTempVariable(r);a=e.setTextRange(n.createElementAccessExpression(e.setTextRange(n.createAssignment(c,s.expression),s.expression),e.setTextRange(n.createAssignment(l,s.argumentExpression),s.argumentExpression)),s),o=e.setTextRange(n.createElementAccessExpression(c,l),s)}else e.isPropertyAccessExpression(s)?(c=n.createTempVariable(r),a=e.setTextRange(n.createPropertyAccessExpression(e.setTextRange(n.createAssignment(c,s.expression),s.expression),s.name),s),o=e.setTextRange(n.createPropertyAccessExpression(c,s.name),s)):(a=s,o=s);return e.setTextRange(n.createAssignment(a,e.setTextRange(n.createGlobalMethodCall("Math","pow",[o,u]),t)),t)}(a);case 42:return function(t){var r=e.visitNode(t.left,i,e.isExpression),a=e.visitNode(t.right,i,e.isExpression);return e.setTextRange(n.createGlobalMethodCall("Math","pow",[r,a]),t)}(a);default:return e.visitEachChild(a,i,t)}}(a);default:return e.visitEachChild(a,i,t)}}}}(u||(u={})),function(e){var n,r,i,a,o;!function(e){e[e.CapturedThis=1]="CapturedThis",e[e.BlockScopedBindings=2]="BlockScopedBindings"}(n||(n={})),function(e){e[e.Body=1]="Body",e[e.Initializer=2]="Initializer"}(r||(r={})),function(e){e[e.ToOriginal=0]="ToOriginal",e[e.ToOutParameter=1]="ToOutParameter"}(i||(i={})),function(e){e[e.Break=2]="Break",e[e.Continue=4]="Continue",e[e.Return=8]="Return"}(a||(a={})),function(e){e[e.None=0]="None",e[e.Function=1]="Function",e[e.ArrowFunction=2]="ArrowFunction",e[e.AsyncFunctionBody=4]="AsyncFunctionBody",e[e.NonStaticClassElement=8]="NonStaticClassElement",e[e.CapturesThis=16]="CapturesThis",e[e.ExportedVariableStatement=32]="ExportedVariableStatement",e[e.TopLevel=64]="TopLevel",e[e.Block=128]="Block",e[e.IterationStatement=256]="IterationStatement",e[e.IterationStatementBlock=512]="IterationStatementBlock",e[e.IterationContainer=1024]="IterationContainer",e[e.ForStatement=2048]="ForStatement",e[e.ForInOrForOfStatement=4096]="ForInOrForOfStatement",e[e.ConstructorWithCapturedSuper=8192]="ConstructorWithCapturedSuper",e[e.AncestorFactsMask=16383]="AncestorFactsMask",e[e.BlockScopeIncludes=0]="BlockScopeIncludes",e[e.BlockScopeExcludes=7104]="BlockScopeExcludes",e[e.SourceFileIncludes=64]="SourceFileIncludes",e[e.SourceFileExcludes=8064]="SourceFileExcludes",e[e.FunctionIncludes=65]="FunctionIncludes",e[e.FunctionExcludes=16286]="FunctionExcludes",e[e.AsyncFunctionBodyIncludes=69]="AsyncFunctionBodyIncludes",e[e.AsyncFunctionBodyExcludes=16278]="AsyncFunctionBodyExcludes",e[e.ArrowFunctionIncludes=66]="ArrowFunctionIncludes",e[e.ArrowFunctionExcludes=15232]="ArrowFunctionExcludes",e[e.ConstructorIncludes=73]="ConstructorIncludes",e[e.ConstructorExcludes=16278]="ConstructorExcludes",e[e.DoOrWhileStatementIncludes=1280]="DoOrWhileStatementIncludes",e[e.DoOrWhileStatementExcludes=0]="DoOrWhileStatementExcludes",e[e.ForStatementIncludes=3328]="ForStatementIncludes",e[e.ForStatementExcludes=5056]="ForStatementExcludes",e[e.ForInOrForOfStatementIncludes=5376]="ForInOrForOfStatementIncludes",e[e.ForInOrForOfStatementExcludes=3008]="ForInOrForOfStatementExcludes",e[e.BlockIncludes=128]="BlockIncludes",e[e.BlockExcludes=6976]="BlockExcludes",e[e.IterationStatementBlockIncludes=512]="IterationStatementBlockIncludes",e[e.IterationStatementBlockExcludes=7104]="IterationStatementBlockExcludes",e[e.NewTarget=16384]="NewTarget",e[e.CapturedLexicalThis=32768]="CapturedLexicalThis",e[e.SubtreeFactsMask=-16384]="SubtreeFactsMask",e[e.ArrowFunctionSubtreeExcludes=0]="ArrowFunctionSubtreeExcludes",e[e.FunctionSubtreeExcludes=49152]="FunctionSubtreeExcludes"}(o||(o={})),e.transformES2015=function(n){var r,i,a,o,s,u,c=n.factory,l=n.getEmitHelperFactory,d=n.startLexicalEnvironment,p=n.resumeLexicalEnvironment,f=n.endLexicalEnvironment,h=n.hoistVariableDeclaration,g=n.getCompilerOptions(),m=n.getEmitResolver(),_=n.onSubstituteNode,v=n.onEmitNode;function y(t){o=e.append(o,c.createVariableDeclaration(t))}return n.onEmitNode=function(t,n,r){if(1&u&&e.isFunctionLike(n)){var i=b(16286,8&e.getEmitFlags(n)?81:65);return v(t,n,r),void D(i,0,0)}v(t,n,r)},n.onSubstituteNode=function(t,n){return n=_(t,n),1===t?function(t){switch(t.kind){case 78:return function(t){if(2&u&&!e.isInternalName(t)){var n=m.getReferencedDeclarationWithCollidingName(t);if(n&&(!e.isClassLike(n)||!function(t,n){var r=e.getParseTreeNode(n);if(!r||r===t||r.end<=t.pos||r.pos>=t.end)return!1;for(var i=e.getEnclosingBlockScopeContainer(t);r;){if(r===i||r===t)return!1;if(e.isClassElement(r)&&r.parent===t)return!0;r=r.parent}return!1}(n,t)))return e.setTextRange(c.getGeneratedNameForNode(e.getNameOfDeclaration(n)),t)}return t}(t);case 107:return function(t){return 1&u&&16&a?e.setTextRange(c.createUniqueName("_this",48),t):t}(t)}return t}(n):e.isIdentifier(n)?function(t){if(2&u&&!e.isInternalName(t)){var n=e.getParseTreeNode(t,e.isIdentifier);if(n&&function(e){switch(e.parent.kind){case 198:case 252:case 255:case 249:return e.parent.name===e&&m.isDeclarationWithCollidingName(e.parent)}return!1}(n))return e.setTextRange(c.getGeneratedNameForNode(n),t)}return t}(n):n},e.chainBundle(n,(function(t){if(t.isDeclarationFile)return t;r=t,i=t.text;var s=function(t){var n=b(8064,64),r=[],i=[];d();var a=c.copyPrologue(t.statements,r,!1,S);return e.addRange(i,e.visitNodes(t.statements,S,e.isStatement,a)),o&&i.push(c.createVariableStatement(void 0,c.createVariableDeclarationList(o))),c.mergeLexicalEnvironment(r,f()),j(r,t),D(n,0,0),c.updateSourceFile(t,e.setTextRange(c.createNodeArray(e.concatenate(r,i)),t.statements))}(t);return e.addEmitHelpers(s,n.readEmitHelpers()),r=void 0,i=void 0,o=void 0,a=0,s}));function b(e,t){var n=a;return a=16383&(a&~e|t),n}function D(e,t,n){a=-16384&(a&~t|n)|e}function E(e){return 0!=(8192&a)&&242===e.kind&&!e.expression}function C(t){return 0!=(256&t.transformFlags)||void 0!==s||8192&a&&function(t){return 1048576&t.transformFlags&&(e.isReturnStatement(t)||e.isIfStatement(t)||e.isWithStatement(t)||e.isSwitchStatement(t)||e.isCaseBlock(t)||e.isCaseClause(t)||e.isDefaultClause(t)||e.isTryStatement(t)||e.isCatchClause(t)||e.isLabeledStatement(t)||e.isIterationStatement(t,!1)||e.isBlock(t))}(t)||e.isIterationStatement(t,!1)&&de(t)||0!=(33554432&e.getEmitFlags(t))}function S(e){return C(e)?T(e,!1):e}function x(e){return C(e)?T(e,!0):e}function k(e){return 105===e.kind?Ie(!0):S(e)}function T(i,o){switch(i.kind){case 123:return;case 252:return function(t){var n=c.createVariableDeclaration(c.getLocalName(t,!0),void 0,void 0,O(t));e.setOriginalNode(n,t);var r=[],i=c.createVariableStatement(void 0,c.createVariableDeclarationList([n]));if(e.setOriginalNode(i,t),e.setTextRange(i,t),e.startOnNewLine(i),r.push(i),e.hasSyntacticModifier(t,1)){var a=e.hasSyntacticModifier(t,512)?c.createExportDefault(c.getLocalName(t)):c.createExternalModuleExport(c.getLocalName(t));e.setOriginalNode(a,i),r.push(a)}var o=e.getEmitFlags(t);return 0==(4194304&o)&&(r.push(c.createEndOfDeclarationMarker(t)),e.setEmitFlags(i,4194304|o)),e.singleOrMany(r)}(i);case 221:return function(e){return O(e)}(i);case 160:return function(t){return t.dotDotDotToken?void 0:e.isBindingPattern(t.name)?e.setOriginalNode(e.setTextRange(c.createParameterDeclaration(void 0,void 0,void 0,c.getGeneratedNameForNode(t),void 0,void 0,void 0),t),t):t.initializer?e.setOriginalNode(e.setTextRange(c.createParameterDeclaration(void 0,void 0,void 0,t.name,void 0,void 0,void 0),t),t):t}(i);case 251:return function(t){var r=s;s=void 0;var i=b(16286,65),o=e.visitParameterList(t.parameters,S,n),u=G(t),l=16384&a?c.getLocalName(t):t.name;return D(i,49152,0),s=r,c.updateFunctionDeclaration(t,void 0,e.visitNodes(t.modifiers,S,e.isModifier),t.asteriskToken,l,void 0,o,void 0,u)}(i);case 209:return function(t){4096&t.transformFlags&&(a|=32768);var r=s;s=void 0;var i=b(15232,66),o=c.createFunctionExpression(void 0,void 0,void 0,void 0,e.visitParameterList(t.parameters,S,n),void 0,G(t));return e.setTextRange(o,t),e.setOriginalNode(o,t),e.setEmitFlags(o,8),32768&a&&Le(),D(i,0,0),s=r,o}(i);case 208:return function(t){var r=262144&e.getEmitFlags(t)?b(16278,69):b(16286,65),i=s;s=void 0;var o=e.visitParameterList(t.parameters,S,n),u=G(t),l=16384&a?c.getLocalName(t):t.name;return D(r,49152,0),s=i,c.updateFunctionExpression(t,void 0,t.asteriskToken,l,void 0,o,void 0,u)}(i);case 249:return $(i);case 78:return A(i);case 250:return function(t){if(3&t.flags||131072&t.transformFlags){3&t.flags&&Fe();var r=e.flatMap(t.declarations,1&t.flags?J:$),i=c.createVariableDeclarationList(r);return e.setOriginalNode(i,t),e.setTextRange(i,t),e.setCommentRange(i,t),131072&t.transformFlags&&(e.isBindingPattern(t.declarations[0].name)||e.isBindingPattern(e.last(t.declarations).name))&&e.setSourceMapRange(i,function(t){for(var n=-1,r=-1,i=0,a=t;i0?(e.insertStatementAfterCustomPrologue(t,e.setEmitFlags(c.createVariableStatement(void 0,c.createVariableDeclarationList(e.flattenDestructuringBinding(r,S,n,0,c.getGeneratedNameForNode(r)))),1048576)),!0):!!a&&(e.insertStatementAfterCustomPrologue(t,e.setEmitFlags(c.createExpressionStatement(c.createAssignment(c.getGeneratedNameForNode(r),e.visitNode(a,S,e.isExpression))),1048576)),!0)}function M(t,n,r,i){i=e.visitNode(i,S,e.isExpression);var a=c.createIfStatement(c.createTypeCheck(c.cloneNode(r),"undefined"),e.setEmitFlags(e.setTextRange(c.createBlock([c.createExpressionStatement(e.setEmitFlags(e.setTextRange(c.createAssignment(e.setEmitFlags(e.setParent(e.setTextRange(c.cloneNode(r),r),r.parent),48),e.setEmitFlags(i,1584|e.getEmitFlags(i))),n),1536))]),n),1953));e.startOnNewLine(a),e.setTextRange(a,n),e.setEmitFlags(a,1050528),e.insertStatementAfterCustomPrologue(t,a)}function B(t,r,i){var a=[],o=e.lastOrUndefined(r.parameters);if(!function(e,t){return!(!e||!e.dotDotDotToken||t)}(o,i))return!1;var s=78===o.name.kind?e.setParent(e.setTextRange(c.cloneNode(o.name),o.name),o.name.parent):c.createTempVariable(void 0);e.setEmitFlags(s,48);var u=78===o.name.kind?c.cloneNode(o.name):s,l=r.parameters.length-1,d=c.createLoopVariable();a.push(e.setEmitFlags(e.setTextRange(c.createVariableStatement(void 0,c.createVariableDeclarationList([c.createVariableDeclaration(s,void 0,void 0,c.createArrayLiteralExpression([]))])),o),1048576));var p=c.createForStatement(e.setTextRange(c.createVariableDeclarationList([c.createVariableDeclaration(d,void 0,void 0,c.createNumericLiteral(l))]),o),e.setTextRange(c.createLessThan(d,c.createPropertyAccessExpression(c.createIdentifier("arguments"),"length")),o),e.setTextRange(c.createPostfixIncrement(d),o),c.createBlock([e.startOnNewLine(e.setTextRange(c.createExpressionStatement(c.createAssignment(c.createElementAccessExpression(u,0===l?d:c.createSubtract(d,c.createNumericLiteral(l))),c.createElementAccessExpression(c.createIdentifier("arguments"),d))),o))]));return e.setEmitFlags(p,1048576),e.startOnNewLine(p),a.push(p),78!==o.name.kind&&a.push(e.setEmitFlags(e.setTextRange(c.createVariableStatement(void 0,c.createVariableDeclarationList(e.flattenDestructuringBinding(o,S,n,0,u))),o),1048576)),e.insertStatementsAfterCustomPrologue(t,a),!0}function j(e,t){return!!(32768&a&&209!==t.kind)&&(U(e,t,c.createThis()),!0)}function U(t,n,r){Le();var i=c.createVariableStatement(void 0,c.createVariableDeclarationList([c.createVariableDeclaration(c.createUniqueName("_this",48),void 0,void 0,r)]));e.setEmitFlags(i,1050112),e.setSourceMapRange(i,n),e.insertStatementAfterCustomPrologue(t,i)}function V(t,n,r){if(16384&a){var i=void 0;switch(n.kind){case 209:return t;case 165:case 167:case 168:i=c.createVoidZero();break;case 166:i=c.createPropertyAccessExpression(e.setEmitFlags(c.createThis(),4),"constructor");break;case 251:case 208:i=c.createConditionalExpression(c.createLogicalAnd(e.setEmitFlags(c.createThis(),4),c.createBinaryExpression(e.setEmitFlags(c.createThis(),4),101,c.getLocalName(n))),void 0,c.createPropertyAccessExpression(e.setEmitFlags(c.createThis(),4),"constructor"),void 0,c.createVoidZero());break;default:return e.Debug.failBadSyntaxKind(n)}var o=c.createVariableStatement(void 0,c.createVariableDeclarationList([c.createVariableDeclaration(c.createUniqueName("_newTarget",48),void 0,void 0,i)]));e.setEmitFlags(o,1050112),r&&(t=t.slice()),e.insertStatementAfterCustomPrologue(t,o)}return t}function z(t){return e.setTextRange(c.createEmptyStatement(),t)}function H(t,r,i){var a,o=e.getCommentRange(r),s=e.getSourceMapRange(r),u=q(r,r,void 0,i),l=e.visitNode(r.name,S,e.isPropertyName);if(!e.isPrivateIdentifier(l)&&n.getCompilerOptions().useDefineForClassFields){var d=e.isComputedPropertyName(l)?l.expression:e.isIdentifier(l)?c.createStringLiteral(e.unescapeLeadingUnderscores(l.escapedText)):l;a=c.createObjectDefinePropertyCall(t,d,c.createPropertyDescriptor({value:u,enumerable:!1,writable:!0,configurable:!0}))}else{var p=e.createMemberAccessForPropertyName(c,t,l,r.name);a=c.createAssignment(p,u)}e.setEmitFlags(u,1536),e.setSourceMapRange(u,s);var f=e.setTextRange(c.createExpressionStatement(a),r);return e.setOriginalNode(f,r),e.setCommentRange(f,o),e.setEmitFlags(f,48),f}function W(t,n,r){var i=c.createExpressionStatement(K(t,n,r,!1));return e.setEmitFlags(i,1536),e.setSourceMapRange(i,e.getSourceMapRange(n.firstAccessor)),i}function K(t,n,r,i){var a=n.firstAccessor,o=n.getAccessor,s=n.setAccessor,u=e.setParent(e.setTextRange(c.cloneNode(t),t),t.parent);e.setEmitFlags(u,1568),e.setSourceMapRange(u,a.name);var l=e.visitNode(a.name,S,e.isPropertyName);if(e.isPrivateIdentifier(l))return e.Debug.failBadSyntaxKind(l,"Encountered unhandled private identifier while transforming ES2015.");var d=e.createExpressionForPropertyName(c,l);e.setEmitFlags(d,1552),e.setSourceMapRange(d,a.name);var p=[];if(o){var f=q(o,void 0,void 0,r);e.setSourceMapRange(f,e.getSourceMapRange(o)),e.setEmitFlags(f,512);var h=c.createPropertyAssignment("get",f);e.setCommentRange(h,e.getCommentRange(o)),p.push(h)}if(s){var g=q(s,void 0,void 0,r);e.setSourceMapRange(g,e.getSourceMapRange(s)),e.setEmitFlags(g,512);var m=c.createPropertyAssignment("set",g);e.setCommentRange(m,e.getCommentRange(s)),p.push(m)}p.push(c.createPropertyAssignment("enumerable",o||s?c.createFalse():c.createTrue()),c.createPropertyAssignment("configurable",c.createTrue()));var _=c.createCallExpression(c.createPropertyAccessExpression(c.createIdentifier("Object"),"defineProperty"),void 0,[u,d,c.createObjectLiteralExpression(p,!0)]);return i&&e.startOnNewLine(_),_}function q(t,r,i,o){var u=s;s=void 0;var l=o&&e.isClassLike(o)&&!e.hasSyntacticModifier(t,32)?b(16286,73):b(16286,65),d=e.visitParameterList(t.parameters,S,n),p=G(t);return 16384&a&&!i&&(251===t.kind||208===t.kind)&&(i=c.getGeneratedNameForNode(t)),D(l,49152,0),s=u,e.setOriginalNode(e.setTextRange(c.createFunctionExpression(void 0,t.asteriskToken,i,void 0,d,void 0,p),r),t)}function G(t){var n,i,a,o=!1,s=!1,u=[],l=[],d=t.body;if(p(),e.isBlock(d)&&(a=c.copyStandardPrologue(d.statements,u,!1),a=c.copyCustomPrologue(d.statements,l,a,S,e.isHoistedFunction),a=c.copyCustomPrologue(d.statements,l,a,S,e.isHoistedVariableStatement)),o=P(l,t)||o,o=B(l,t,!1)||o,e.isBlock(d))a=c.copyCustomPrologue(d.statements,l,a,S),n=d.statements,e.addRange(l,e.visitNodes(d.statements,S,e.isStatement,a)),!o&&d.multiLine&&(o=!0);else{e.Debug.assert(209===t.kind),n=e.moveRangeEnd(d,-1);var h=t.equalsGreaterThanToken;e.nodeIsSynthesized(h)||e.nodeIsSynthesized(d)||(e.rangeEndIsOnSameLineAsRangeStart(h,d,r)?s=!0:o=!0);var g=e.visitNode(d,S,e.isExpression),m=c.createReturnStatement(g);e.setTextRange(m,d),e.moveSyntheticComments(m,d),e.setEmitFlags(m,1440),l.push(m),i=d}if(c.mergeLexicalEnvironment(u,f()),V(u,t,!1),j(u,t),e.some(u)&&(o=!0),l.unshift.apply(l,u),e.isBlock(d)&&e.arrayIsEqualTo(l,d.statements))return d;var _=c.createBlock(e.setTextRange(c.createNodeArray(l),n),o);return e.setTextRange(_,t.body),!o&&s&&e.setEmitFlags(_,1),i&&e.setTokenSourceMapRange(_,19,i),e.setOriginalNode(_,t.body),_}function Y(t,r){return e.isDestructuringAssignment(t)?e.flattenDestructuringAssignment(t,S,n,0,!r):27===t.operatorToken.kind?c.updateBinaryExpression(t,e.visitNode(t.left,x,e.isExpression),t.operatorToken,e.visitNode(t.right,r?x:S,e.isExpression)):e.visitEachChild(t,S,n)}function J(t){var r=t.name;return e.isBindingPattern(r)?$(t):!t.initializer&&function(e){var t=m.getNodeCheckFlags(e),n=262144&t,r=524288&t;return!(0!=(64&a)||n&&r&&0!=(512&a))&&0==(4096&a)&&(!m.isDeclarationWithCollidingName(e)||r&&!n&&0==(6144&a))}(t)?c.updateVariableDeclaration(t,t.name,void 0,void 0,c.createVoidZero()):e.visitEachChild(t,S,n)}function $(t){var r,i=b(32,0);return r=e.isBindingPattern(t.name)?e.flattenDestructuringBinding(t,S,n,0,void 0,0!=(32&i)):e.visitEachChild(t,S,n),D(i,0,0),r}function Q(t){s.labels.set(e.idText(t.label),!0)}function X(t){s.labels.set(e.idText(t.label),!1)}function Z(t,r,i,o,u){var l=b(t,r),p=function(t,r,i,o){if(!de(t)){var u=void 0;s&&(u=s.allowedNonLabeledJumps,s.allowedNonLabeledJumps=6);var l=o?o(t,r,void 0,i):c.restoreEnclosingLabel(e.isForStatement(t)?function(t){return c.updateForStatement(t,e.visitNode(t.initializer,x,e.isForInitializer),e.visitNode(t.condition,S,e.isExpression),e.visitNode(t.incrementor,x,e.isExpression),e.visitNode(t.statement,S,e.isStatement,c.liftToBlock))}(t):e.visitEachChild(t,S,n),r,s&&X);return s&&(s.allowedNonLabeledJumps=u),l}var p=function(t){var n;switch(t.kind){case 237:case 238:case 239:var r=t.initializer;r&&250===r.kind&&(n=r)}var i=[],a=[];if(n&&3&e.getCombinedNodeFlags(n))for(var o=ce(t),u=0,c=n.declarations;u=80&&n<=115)return e.setTextRange(i.createStringLiteralFromNode(t),t)}}}(u||(u={})),function(e){var n,r,i,a,o;!function(e){e[e.Nop=0]="Nop",e[e.Statement=1]="Statement",e[e.Assign=2]="Assign",e[e.Break=3]="Break",e[e.BreakWhenTrue=4]="BreakWhenTrue",e[e.BreakWhenFalse=5]="BreakWhenFalse",e[e.Yield=6]="Yield",e[e.YieldStar=7]="YieldStar",e[e.Return=8]="Return",e[e.Throw=9]="Throw",e[e.Endfinally=10]="Endfinally"}(n||(n={})),function(e){e[e.Open=0]="Open",e[e.Close=1]="Close"}(r||(r={})),function(e){e[e.Exception=0]="Exception",e[e.With=1]="With",e[e.Switch=2]="Switch",e[e.Loop=3]="Loop",e[e.Labeled=4]="Labeled"}(i||(i={})),function(e){e[e.Try=0]="Try",e[e.Catch=1]="Catch",e[e.Finally=2]="Finally",e[e.Done=3]="Done"}(a||(a={})),function(e){e[e.Next=0]="Next",e[e.Throw=1]="Throw",e[e.Return=2]="Return",e[e.Break=3]="Break",e[e.Yield=4]="Yield",e[e.YieldStar=5]="YieldStar",e[e.Catch=6]="Catch",e[e.Endfinally=7]="Endfinally"}(o||(o={})),e.transformGenerators=function(n){var r,i,a,o,s,u,c,l,d,p,f=n.factory,h=n.getEmitHelperFactory,g=n.resumeLexicalEnvironment,m=n.endLexicalEnvironment,_=n.hoistFunctionDeclaration,v=n.hoistVariableDeclaration,y=n.getCompilerOptions(),b=e.getEmitScriptTarget(y),D=n.getEmitResolver(),E=n.onSubstituteNode;n.onSubstituteNode=function(t,n){return n=E(t,n),1===t?function(t){return e.isIdentifier(t)?function(t){if(!e.isGeneratedIdentifier(t)&&r&&r.has(e.idText(t))){var n=e.getOriginalNode(t);if(e.isIdentifier(n)&&n.parent){var a=D.getReferencedValueDeclaration(n);if(a){var o=i[e.getOriginalNodeId(a)];if(o){var s=e.setParent(e.setTextRange(f.cloneNode(o),o),o.parent);return e.setSourceMapRange(s,t),e.setCommentRange(s,t),s}}}}return t}(t):t}(n):n};var C,S,x,k,T,w,A,O,N,I,F,L,P=1,R=0,M=0;return e.chainBundle(n,(function(t){if(t.isDeclarationFile||0==(512&t.transformFlags))return t;var r=e.visitEachChild(t,B,n);return e.addEmitHelpers(r,n.readEmitHelpers()),r}));function B(t){var r=t.transformFlags;return o?function(t){switch(t.kind){case 235:case 236:return function(t){return o?(oe(),t=e.visitEachChild(t,B,n),ue(),t):e.visitEachChild(t,B,n)}(t);case 244:return function(t){return o&&ne({kind:2,isScript:!0,breakLabel:-1}),t=e.visitEachChild(t,B,n),o&&ce(),t}(t);case 245:return function(t){return o&&ne({kind:4,isScript:!0,labelText:e.idText(t.label),breakLabel:-1}),t=e.visitEachChild(t,B,n),o&&le(),t}(t);default:return j(t)}}(t):a?j(t):e.isFunctionLikeDeclaration(t)&&t.asteriskToken?function(t){switch(t.kind){case 251:return U(t);case 208:return V(t);default:return e.Debug.failBadSyntaxKind(t)}}(t):512&r?e.visitEachChild(t,B,n):t}function j(t){switch(t.kind){case 251:return U(t);case 208:return V(t);case 167:case 168:return function(t){var r=a,i=o;return a=!1,o=!1,t=e.visitEachChild(t,B,n),a=r,o=i,t}(t);case 232:return function(t){if(262144&t.transformFlags)Y(t.declarationList);else{if(1048576&e.getEmitFlags(t))return t;for(var n=0,r=t.declarationList.declarations;n0?f.inlineExpressions(e.map(u,J)):void 0,e.visitNode(t.condition,B,e.isExpression),e.visitNode(t.incrementor,B,e.isExpression),e.visitNode(t.statement,B,e.isStatement,f.liftToBlock))}else t=e.visitEachChild(t,B,n);return o&&ue(),t}(t);case 238:return function(t){o&&oe();var r=t.initializer;if(e.isVariableDeclarationList(r)){for(var i=0,a=r.declarations;i0)return ye(r,t)}return e.visitEachChild(t,B,n)}(t);case 240:return function(t){if(o){var r=me(t.label&&e.idText(t.label));if(r>0)return ye(r,t)}return e.visitEachChild(t,B,n)}(t);case 242:return function(t){return n=e.visitNode(t.expression,B,e.isExpression),r=t,e.setTextRange(f.createReturnStatement(f.createArrayLiteralExpression(n?[ve(2),n]:[ve(2)])),r);var n,r}(t);default:return 262144&t.transformFlags?function(t){switch(t.kind){case 216:return function(t){var r=e.getExpressionAssociativity(t);switch(r){case 0:return function(t){return $(t.right)?e.isLogicalOperator(t.operatorToken.kind)?function(t){var n=ee(),r=Z();return Ee(r,e.visitNode(t.left,B,e.isExpression),t.left),55===t.operatorToken.kind?xe(n,r,t.left):Se(n,r,t.left),Ee(r,e.visitNode(t.right,B,e.isExpression),t.right),te(n),r}(t):27===t.operatorToken.kind?H(t):f.updateBinaryExpression(t,X(e.visitNode(t.left,B,e.isExpression)),t.operatorToken,e.visitNode(t.right,B,e.isExpression)):e.visitEachChild(t,B,n)}(t);case 1:return function(t){var r=t.left,i=t.right;if($(i)){var a=void 0;switch(r.kind){case 201:a=f.updatePropertyAccessExpression(r,X(e.visitNode(r.expression,B,e.isLeftHandSideExpression)),r.name);break;case 202:a=f.updateElementAccessExpression(r,X(e.visitNode(r.expression,B,e.isLeftHandSideExpression)),X(e.visitNode(r.argumentExpression,B,e.isExpression)));break;default:a=e.visitNode(r,B,e.isExpression)}var o=t.operatorToken.kind;return e.isCompoundAssignment(o)?e.setTextRange(f.createAssignment(a,e.setTextRange(f.createBinaryExpression(X(a),e.getNonAssignmentOperatorForCompoundAssignment(o),e.visitNode(i,B,e.isExpression)),t)),t):f.updateBinaryExpression(t,a,t.operatorToken,e.visitNode(i,B,e.isExpression))}return e.visitEachChild(t,B,n)}(t);default:return e.Debug.assertNever(r)}}(t);case 337:return function(t){for(var n=[],r=0,i=t.elements;r0&&(ke(1,[f.createExpressionStatement(f.inlineExpressions(n))]),n=[]),n.push(e.visitNode(a,B,e.isExpression)))}return f.inlineExpressions(n)}(t);case 217:return function(t){if($(t.whenTrue)||$(t.whenFalse)){var r=ee(),i=ee(),a=Z();return xe(r,e.visitNode(t.condition,B,e.isExpression),t.condition),Ee(a,e.visitNode(t.whenTrue,B,e.isExpression),t.whenTrue),Ce(i),te(r),Ee(a,e.visitNode(t.whenFalse,B,e.isExpression),t.whenFalse),te(i),a}return e.visitEachChild(t,B,n)}(t);case 219:return function(t){var n=ee(),r=e.visitNode(t.expression,B,e.isExpression);return t.asteriskToken?function(e,t){ke(7,[e],t)}(0==(8388608&e.getEmitFlags(t.expression))?e.setTextRange(h().createValuesHelper(r),t):r,t):function(e,t){ke(6,[e],t)}(r,t),te(n),function(t){return e.setTextRange(f.createCallExpression(f.createPropertyAccessExpression(k,"sent"),void 0,[]),t)}(t)}(t);case 199:return function(e){return W(e.elements,void 0,void 0,e.multiLine)}(t);case 200:return function(t){var n=t.properties,r=t.multiLine,i=Q(n),a=Z();Ee(a,f.createObjectLiteralExpression(e.visitNodes(n,B,e.isObjectLiteralElementLike,0,i),r));var o=e.reduceLeft(n,s,[],i);return o.push(r?e.startOnNewLine(e.setParent(e.setTextRange(f.cloneNode(a),a),a.parent)):a),f.inlineExpressions(o);function s(n,i){$(i)&&n.length>0&&(De(f.createExpressionStatement(f.inlineExpressions(n))),n=[]);var o=e.createExpressionForObjectLiteralElementLike(f,t,i,a),s=e.visitNode(o,B,e.isExpression);return s&&(r&&e.startOnNewLine(s),n.push(s)),n}}(t);case 202:return function(t){return $(t.argumentExpression)?f.updateElementAccessExpression(t,X(e.visitNode(t.expression,B,e.isLeftHandSideExpression)),e.visitNode(t.argumentExpression,B,e.isExpression)):e.visitEachChild(t,B,n)}(t);case 203:return function(t){if(!e.isImportCall(t)&&e.forEach(t.arguments,$)){var r=f.createCallBinding(t.expression,v,b,!0),i=r.target,a=r.thisArg;return e.setOriginalNode(e.setTextRange(f.createFunctionApplyCall(X(e.visitNode(i,B,e.isLeftHandSideExpression)),a,W(t.arguments)),t),t)}return e.visitEachChild(t,B,n)}(t);case 204:return function(t){if(e.forEach(t.arguments,$)){var r=f.createCallBinding(f.createPropertyAccessExpression(t.expression,"bind"),v),i=r.target,a=r.thisArg;return e.setOriginalNode(e.setTextRange(f.createNewExpression(f.createFunctionApplyCall(X(e.visitNode(i,B,e.isExpression)),a,W(t.arguments,f.createVoidZero())),void 0,[]),t),t)}return e.visitEachChild(t,B,n)}(t);default:return e.visitEachChild(t,B,n)}}(t):1049088&t.transformFlags?e.visitEachChild(t,B,n):t}}function U(t){if(t.asteriskToken)t=e.setOriginalNode(e.setTextRange(f.createFunctionDeclaration(void 0,t.modifiers,void 0,t.name,void 0,e.visitParameterList(t.parameters,B,n),void 0,z(t.body)),t),t);else{var r=a,i=o;a=!1,o=!1,t=e.visitEachChild(t,B,n),a=r,o=i}return a?void _(t):t}function V(t){if(t.asteriskToken)t=e.setOriginalNode(e.setTextRange(f.createFunctionExpression(void 0,void 0,t.name,void 0,e.visitParameterList(t.parameters,B,n),void 0,z(t.body)),t),t);else{var r=a,i=o;a=!1,o=!1,t=e.visitEachChild(t,B,n),a=r,o=i}return t}function z(t){var n=[],r=a,i=o,h=s,_=u,v=c,y=l,b=d,D=p,E=P,T=C,w=S,A=x,O=k;a=!0,o=!1,s=void 0,u=void 0,c=void 0,l=void 0,d=void 0,p=void 0,P=1,C=void 0,S=void 0,x=void 0,k=f.createTempVariable(void 0),g();var N=f.copyPrologue(t.statements,n,!1,B);K(t.statements,N);var I=Te();return e.insertStatementsAfterStandardPrologue(n,m()),n.push(f.createReturnStatement(I)),a=r,o=i,s=h,u=_,c=v,l=y,d=b,p=D,P=E,C=T,S=w,x=A,k=O,e.setTextRange(f.createBlock(n,t.multiLine),t)}function H(t){var n=[];return r(t.left),r(t.right),f.inlineExpressions(n);function r(t){e.isBinaryExpression(t)&&27===t.operatorToken.kind?(r(t.left),r(t.right)):($(t)&&n.length>0&&(ke(1,[f.createExpressionStatement(f.inlineExpressions(n))]),n=[]),n.push(e.visitNode(t,B,e.isExpression)))}}function W(n,r,i,a){var o,s=Q(n);if(s>0){o=Z();var u=e.visitNodes(n,B,e.isExpression,0,s);Ee(o,f.createArrayLiteralExpression(r?t([r],u):u)),r=void 0}var c=e.reduceLeft(n,(function(n,i){if($(i)&&n.length>0){var s=void 0!==o;o||(o=Z()),Ee(o,s?f.createArrayConcatCall(o,[f.createArrayLiteralExpression(n,a)]):f.createArrayLiteralExpression(r?t([r],n):n,a)),r=void 0,n=[]}return n.push(e.visitNode(i,B,e.isExpression)),n}),[],s);return o?f.createArrayConcatCall(o,[f.createArrayLiteralExpression(c,a)]):e.setTextRange(f.createArrayLiteralExpression(r?t([r],c):c,a),i)}function K(e,t){void 0===t&&(t=0);for(var n=e.length,r=t;r0?Ce(n,t):De(t)}(t);case 241:return function(t){var n=ge(t.label?e.idText(t.label):void 0);n>0?Ce(n,t):De(t)}(t);case 242:return function(t){ke(8,[e.visitNode(t.expression,B,e.isExpression)],t)}(t);case 243:return function(t){var n,r,i;$(t)?(n=X(e.visitNode(t.expression,B,e.isExpression)),r=ee(),i=ee(),te(r),ne({kind:1,expression:n,startLabel:r,endLabel:i}),q(t.statement),e.Debug.assert(1===ae()),te(re().endLabel)):De(e.visitNode(t,B,e.isStatement))}(t);case 244:return function(t){if($(t.caseBlock)){for(var n=t.caseBlock,r=n.clauses.length,i=(ne({kind:2,isScript:!1,breakLabel:h=ee()}),h),a=X(e.visitNode(t.expression,B,e.isExpression)),o=[],s=-1,u=0;u0)break;d.push(f.createCaseClause(e.visitNode(c.expression,B,e.isExpression),[ye(o[u],c.expression)]))}else p++;d.length&&(De(f.createSwitchStatement(a,f.createCaseBlock(d))),l+=d.length,d=[]),p>0&&(l+=p,p=0)}for(Ce(s>=0?o[s]:i),u=0;u0);l++)c.push(J(i));c.length&&(De(f.createExpressionStatement(f.inlineExpressions(c))),u+=c.length,c=[])}}function J(t){return e.setSourceMapRange(f.createAssignment(e.setSourceMapRange(f.cloneNode(t.name),t.name),e.visitNode(t.initializer,B,e.isExpression)),t)}function $(e){return!!e&&0!=(262144&e.transformFlags)}function Q(e){for(var t=e.length,n=0;n=0;n--){var r=l[n];if(!pe(r))break;if(r.labelText===e)return!0}return!1}function ge(e){if(l)if(e)for(var t=l.length-1;t>=0;t--){if(pe(n=l[t])&&n.labelText===e)return n.breakLabel;if(de(n)&&he(e,t-1))return n.breakLabel}else for(t=l.length-1;t>=0;t--){var n;if(de(n=l[t]))return n.breakLabel}return 0}function me(e){if(l)if(e){for(var t=l.length-1;t>=0;t--)if(fe(n=l[t])&&he(e,t-1))return n.continueLabel}else for(t=l.length-1;t>=0;t--){var n;if(fe(n=l[t]))return n.continueLabel}return 0}function _e(e){if(void 0!==e&&e>0){void 0===p&&(p=[]);var t=f.createNumericLiteral(-1);return void 0===p[e]?p[e]=[t]:p[e].push(t),t}return f.createOmittedExpression()}function ve(t){var n=f.createNumericLiteral(t);return e.addSyntheticTrailingComment(n,3,function(e){switch(e){case 2:return"return";case 3:return"break";case 4:return"yield";case 5:return"yield*";case 7:return"endfinally";default:return}}(t)),n}function ye(t,n){return e.Debug.assertLessThan(0,t,"Invalid label"),e.setTextRange(f.createReturnStatement(f.createArrayLiteralExpression([ve(3),_e(t)])),n)}function be(){ke(0)}function De(e){e?ke(1,[e]):be()}function Ee(e,t,n){ke(2,[e,t],n)}function Ce(e,t){ke(3,[e],t)}function Se(e,t,n){ke(4,[e,t],n)}function xe(e,t,n){ke(5,[e,t],n)}function ke(e,t,n){void 0===C&&(C=[],S=[],x=[]),void 0===d&&te(ee());var r=C.length;C[r]=e,S[r]=t,x[r]=n}function Te(){R=0,M=0,T=void 0,w=!1,A=!1,O=void 0,N=void 0,I=void 0,F=void 0,L=void 0;var t=function(){if(C){for(var t=0;t0)),524288))}function we(e){(function(e){if(!A)return!0;if(!d||!p)return!1;for(var t=0;t=0;t--){var n=L[t];N=[f.createWithStatement(n.expression,f.createBlock(N))]}if(F){var r=F.startLabel,i=F.catchLabel,a=F.finallyLabel,o=F.endLabel;N.unshift(f.createExpressionStatement(f.createCallExpression(f.createPropertyAccessExpression(f.createPropertyAccessExpression(k,"trys"),"push"),void 0,[f.createArrayLiteralExpression([_e(r),_e(i),_e(a),_e(o)])]))),F=void 0}e&&N.push(f.createExpressionStatement(f.createAssignment(f.createPropertyAccessExpression(k,"label"),f.createNumericLiteral(M+1))))}O.push(f.createCaseClause(f.createNumericLiteral(M),N||[])),N=void 0}function Oe(e){if(d)for(var t=0;t=2?2:0)),t),t))}else r&&e.isDefaultImport(t)&&(n=e.append(n,i.createVariableStatement(void 0,i.createVariableDeclarationList([e.setOriginalNode(e.setTextRange(i.createVariableDeclaration(i.cloneNode(r.name),void 0,void 0,i.getGeneratedNameForNode(t)),t),t)],p>=2?2:0))));if(j(t)){var o=e.getOriginalNodeId(t);D[o]=U(D[o],t)}else n=U(n,t);return e.singleOrMany(n)}(t);case 260:return function(t){var n;if(e.Debug.assert(e.isExternalModuleImportEqualsDeclaration(t),"import= for internal module references should be handled in an earlier transformer."),f!==e.ModuleKind.AMD?n=e.hasSyntacticModifier(t,1)?e.append(n,e.setOriginalNode(e.setTextRange(i.createExpressionStatement(Y(t.name,R(t))),t),t)):e.append(n,e.setOriginalNode(e.setTextRange(i.createVariableStatement(void 0,i.createVariableDeclarationList([i.createVariableDeclaration(i.cloneNode(t.name),void 0,void 0,R(t))],p>=2?2:0)),t),t)):e.hasSyntacticModifier(t,1)&&(n=e.append(n,e.setOriginalNode(e.setTextRange(i.createExpressionStatement(Y(i.getExportName(t),i.getLocalName(t))),t),t))),j(t)){var r=e.getOriginalNodeId(t);D[r]=V(D[r],t)}else n=V(n,t);return e.singleOrMany(n)}(t);case 267:return function(t){if(t.moduleSpecifier){var n=i.getGeneratedNameForNode(t);if(t.exportClause&&e.isNamedExports(t.exportClause)){var r=[];f!==e.ModuleKind.AMD&&r.push(e.setOriginalNode(e.setTextRange(i.createVariableStatement(void 0,i.createVariableDeclarationList([i.createVariableDeclaration(n,void 0,void 0,R(t))])),t),t));for(var o=0,s=t.exportClause.elements;o(e.isExportName(t)?1:0);return!1}function F(t,n){var r,o=i.createUniqueName("resolve"),s=i.createUniqueName("reject"),u=[i.createParameterDeclaration(void 0,void 0,void 0,o),i.createParameterDeclaration(void 0,void 0,void 0,s)],l=i.createBlock([i.createExpressionStatement(i.createCallExpression(i.createIdentifier("require"),void 0,[i.createArrayLiteralExpression([t||i.createOmittedExpression()]),o,s]))]);p>=2?r=i.createArrowFunction(void 0,void 0,u,void 0,void 0,l):(r=i.createFunctionExpression(void 0,void 0,void 0,void 0,u,void 0,l),n&&e.setEmitFlags(r,8));var d=i.createNewExpression(i.createIdentifier("Promise"),void 0,[r]);return c.esModuleInterop?i.createCallExpression(i.createPropertyAccessExpression(d,i.createIdentifier("then")),void 0,[a().createImportStarCallbackHelper()]):d}function L(t,n){var r,o=i.createCallExpression(i.createPropertyAccessExpression(i.createIdentifier("Promise"),"resolve"),void 0,[]),s=i.createCallExpression(i.createIdentifier("require"),void 0,t?[t]:[]);return c.esModuleInterop&&(s=a().createImportStarHelper(s)),p>=2?r=i.createArrowFunction(void 0,void 0,[],void 0,void 0,s):(r=i.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,i.createBlock([i.createReturnStatement(s)])),n&&e.setEmitFlags(r,8)),i.createCallExpression(i.createPropertyAccessExpression(o,"then"),void 0,[r])}function P(t,n){return!c.esModuleInterop||67108864&e.getEmitFlags(t)?n:e.getImportNeedsImportStarHelper(t)?a().createImportStarHelper(n):e.getImportNeedsImportDefaultHelper(t)?a().createImportDefaultHelper(n):n}function R(t){var n=e.getExternalModuleNameLiteral(i,t,m,d,l,c),r=[];return n&&r.push(n),i.createCallExpression(i.createIdentifier("require"),void 0,r)}function M(t,n,r){var a=Q(t);if(a){for(var o=e.isExportName(t)?n:i.createAssignment(t,n),s=0,u=a;se.ModuleKind.ES2015)return t;if(!t.exportClause||!e.isNamespaceExport(t.exportClause)||!t.moduleSpecifier)return t;var n=t.exportClause.name,r=i.getGeneratedNameForNode(n),a=i.createImportDeclaration(void 0,void 0,i.createImportClause(!1,void 0,i.createNamespaceImport(r)),t.moduleSpecifier);e.setOriginalNode(a,t.exportClause);var s=e.isExportNamespaceAsDefaultDeclaration(t)?i.createExportDefault(r):i.createExportDeclaration(void 0,void 0,!1,i.createNamedExports([i.createExportSpecifier(r,n)]));return e.setOriginalNode(s,t),[a,s]}(t)}return t}}}(u||(u={})),function(e){function t(t){return e.isVariableDeclaration(t)||e.isPropertyDeclaration(t)||e.isPropertySignature(t)||e.isPropertyAccessExpression(t)||e.isBindingElement(t)||e.isConstructorDeclaration(t)?n:e.isSetAccessor(t)||e.isGetAccessor(t)?function(n){return{diagnosticMessage:168===t.kind?e.hasSyntacticModifier(t,32)?n.errorModuleName?e.Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:n.errorModuleName?e.Diagnostics.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:e.hasSyntacticModifier(t,32)?n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1,errorNode:t.name,typeName:t.name}}:e.isConstructSignatureDeclaration(t)||e.isCallSignatureDeclaration(t)||e.isMethodDeclaration(t)||e.isMethodSignature(t)||e.isFunctionDeclaration(t)||e.isIndexSignatureDeclaration(t)?function(n){var r;switch(t.kind){case 170:r=n.errorModuleName?e.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 169:r=n.errorModuleName?e.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 171:r=n.errorModuleName?e.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 165:case 164:r=e.hasSyntacticModifier(t,32)?n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:252===t.parent.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:n.errorModuleName?e.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;break;case 251:r=n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0;break;default:return e.Debug.fail("This is unknown kind for signature: "+t.kind)}return{diagnosticMessage:r,errorNode:t.name||t}}:e.isParameter(t)?e.isParameterPropertyDeclaration(t,t.parent)&&e.hasSyntacticModifier(t.parent,8)?n:function(n){var r=function(n){switch(t.parent.kind){case 166:return n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;case 170:case 175:return n.errorModuleName?e.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;case 169:return n.errorModuleName?e.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;case 171:return n.errorModuleName?e.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;case 165:case 164:return e.hasSyntacticModifier(t.parent,32)?n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:252===t.parent.parent.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:n.errorModuleName?e.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;case 251:case 174:return n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1;case 168:case 167:return n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;default:return e.Debug.fail("Unknown parent for parameter: "+e.SyntaxKind[t.parent.kind])}}(n);return void 0!==r?{diagnosticMessage:r,errorNode:t,typeName:t.name}:void 0}:e.isTypeParameterDeclaration(t)?function(){var n;switch(t.parent.kind){case 252:n=e.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;break;case 253:n=e.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;break;case 190:n=e.Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1;break;case 175:case 170:n=e.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 169:n=e.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 165:case 164:n=e.hasSyntacticModifier(t.parent,32)?e.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:252===t.parent.parent.kind?e.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:e.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 174:case 251:n=e.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;break;case 254:n=e.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;break;default:return e.Debug.fail("This is unknown parent for type parameter: "+t.parent.kind)}return{diagnosticMessage:n,errorNode:t,typeName:t.name}}:e.isExpressionWithTypeArguments(t)?function(){return{diagnosticMessage:e.isClassDeclaration(t.parent.parent)?e.isHeritageClause(t.parent)&&116===t.parent.token?e.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:t.parent.parent.name?e.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1:e.Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0:e.Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1,errorNode:t,typeName:e.getNameOfDeclaration(t.parent.parent)}}:e.isImportEqualsDeclaration(t)?function(){return{diagnosticMessage:e.Diagnostics.Import_declaration_0_is_using_private_name_1,errorNode:t,typeName:t.name}}:e.isTypeAliasDeclaration(t)?function(){return{diagnosticMessage:e.Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1,errorNode:t.type,typeName:t.name}}:e.Debug.assertNever(t,"Attempted to set a declaration diagnostic context for unhandled node kind: "+e.SyntaxKind[t.kind]);function n(n){var r=function(n){return 249===t.kind||198===t.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1:163===t.kind||201===t.kind||162===t.kind||160===t.kind&&e.hasSyntacticModifier(t.parent,8)?e.hasSyntacticModifier(t,32)?n.errorModuleName?2===n.accessibility?e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:252===t.parent.kind||160===t.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1:n.errorModuleName?e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1:void 0}(n);return void 0!==r?{diagnosticMessage:r,errorNode:t,typeName:t.name}:void 0}}e.canProduceDiagnostics=function(t){return e.isVariableDeclaration(t)||e.isPropertyDeclaration(t)||e.isPropertySignature(t)||e.isBindingElement(t)||e.isSetAccessor(t)||e.isGetAccessor(t)||e.isConstructSignatureDeclaration(t)||e.isCallSignatureDeclaration(t)||e.isMethodDeclaration(t)||e.isMethodSignature(t)||e.isFunctionDeclaration(t)||e.isParameter(t)||e.isTypeParameterDeclaration(t)||e.isExpressionWithTypeArguments(t)||e.isImportEqualsDeclaration(t)||e.isTypeAliasDeclaration(t)||e.isConstructorDeclaration(t)||e.isIndexSignatureDeclaration(t)||e.isPropertyAccessExpression(t)},e.createGetSymbolAccessibilityDiagnosticForNodeName=function(n){return e.isSetAccessor(n)||e.isGetAccessor(n)?function(t){var r=function(t){return e.hasSyntacticModifier(n,32)?t.errorModuleName?2===t.accessibility?e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:252===n.parent.kind?t.errorModuleName?2===t.accessibility?e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==r?{diagnosticMessage:r,errorNode:n,typeName:n.name}:void 0}:e.isMethodSignature(n)||e.isMethodDeclaration(n)?function(t){var r=function(t){return e.hasSyntacticModifier(n,32)?t.errorModuleName?2===t.accessibility?e.Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:252===n.parent.kind?t.errorModuleName?2===t.accessibility?e.Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1:t.errorModuleName?e.Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1}(t);return void 0!==r?{diagnosticMessage:r,errorNode:n,typeName:n.name}:void 0}:t(n)},e.createGetSymbolAccessibilityDiagnosticForNode=t}(u||(u={})),function(e){function n(t,n){var r=n.text.substring(t.pos,t.end);return e.stringContains(r,"@internal")}function i(t,r){var i=e.getParseTreeNode(t);if(i&&160===i.kind){var a=i.parent.parameters.indexOf(i),o=a>0?i.parent.parameters[a-1]:void 0,s=r.text,u=o?e.concatenate(e.getTrailingCommentRanges(s,e.skipTrivia(s,o.end+1,!1,!0)),e.getLeadingCommentRanges(s,t.pos)):e.getTrailingCommentRanges(s,e.skipTrivia(s,t.pos,!1,!0));return u&&u.length&&n(e.last(u),r)}var c=i&&e.getLeadingCommentRangesOfNode(i,r);return!!e.forEach(c,(function(e){return n(e,r)}))}e.getDeclarationDiagnostics=function(t,n,r){var i=t.getCompilerOptions();return e.transformNodes(n,t,e.factory,i,r?[r]:e.filter(t.getSourceFiles(),e.isSourceFileNotJson),[o],!1).diagnostics},e.isInternalDeclaration=i;var a=531469;function o(n){var o,c,l,d,p,f,h,g,m,_,v,y=function(){return e.Debug.fail("Diagnostic emitted without context")},b=y,D=!0,E=!1,C=!1,S=!1,x=!1,k=n.factory,T=n.getEmitHost(),w={trackSymbol:function(e,t,n){262144&e.flags||(L(A.isSymbolAccessible(e,t,n,!0)),F(A.getTypeReferenceDirectivesForSymbol(e,n)))},reportInaccessibleThisError:function(){h&&n.addDiagnostic(e.createDiagnosticForNode(h,e.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,e.declarationNameToString(h),"this"))},reportInaccessibleUniqueSymbolError:function(){h&&n.addDiagnostic(e.createDiagnosticForNode(h,e.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,e.declarationNameToString(h),"unique symbol"))},reportCyclicStructureError:function(){h&&n.addDiagnostic(e.createDiagnosticForNode(h,e.Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary,e.declarationNameToString(h)))},reportPrivateInBaseOfClassExpression:function(t){h&&n.addDiagnostic(e.createDiagnosticForNode(h,e.Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected,t))},reportLikelyUnsafeImportRequiredError:function(t){h&&n.addDiagnostic(e.createDiagnosticForNode(h,e.Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary,e.declarationNameToString(h),t))},reportTruncationError:function(){h&&n.addDiagnostic(e.createDiagnosticForNode(h,e.Diagnostics.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed))},moduleResolverHost:T,trackReferencedAmbientModule:function(t,n){var r=A.getTypeReferenceDirectivesForSymbol(n,67108863);if(e.length(r))return F(r);var i=e.getSourceFileOfNode(t);m.set(e.getOriginalNodeId(i),i)},trackExternalModuleSymbolOfImportTypeNode:function(e){E||(f||(f=[])).push(e)},reportNonlocalAugmentation:function(t,r,i){for(var a=e.find(r.declarations,(function(n){return e.getSourceFileOfNode(n)===t})),o=0,s=e.filter(i.declarations,(function(n){return e.getSourceFileOfNode(n)!==t}));o0?e.parameters[0].type:void 0}e.transformDeclarations=o}(u||(u={})),function(e){var n,r;function i(t,n,r){if(r)return e.emptyArray;var i=e.getEmitScriptTarget(t),a=e.getEmitModuleKind(t),o=[];return e.addRange(o,n&&e.map(n.before,s)),o.push(e.transformTypeScript),o.push(e.transformClassFields),e.getJSXTransformEnabled(t)&&o.push(e.transformJsx),i<99&&o.push(e.transformESNext),i<7&&o.push(e.transformES2020),i<6&&o.push(e.transformES2019),i<5&&o.push(e.transformES2018),i<4&&o.push(e.transformES2017),i<3&&o.push(e.transformES2016),i<2&&(o.push(e.transformES2015),o.push(e.transformGenerators)),o.push(function(t){switch(t){case e.ModuleKind.ESNext:case e.ModuleKind.ES2020:case e.ModuleKind.ES2015:return e.transformECMAScriptModule;case e.ModuleKind.System:return e.transformSystemModule;default:return e.transformModule}}(a)),i<1&&o.push(e.transformES5),e.addRange(o,n&&e.map(n.after,s)),o}function a(t){var n=[];return n.push(e.transformDeclarations),e.addRange(n,t&&e.map(t.afterDeclarations,u)),n}function o(t,n){return function(r){var i=t(r);return"function"==typeof i?n(r,i):function(t){return function(n){return e.isBundle(n)?t.transformBundle(n):t.transformSourceFile(n)}}(i)}}function s(t){return o(t,e.chainBundle)}function u(e){return o(e,(function(e,t){return t}))}function c(e,t){return t}function l(e,t,n){n(e,t)}!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initialized=1]="Initialized",e[e.Completed=2]="Completed",e[e.Disposed=3]="Disposed"}(n||(n={})),function(e){e[e.Substitution=1]="Substitution",e[e.EmitNotifications=2]="EmitNotifications"}(r||(r={})),e.noTransformers={scriptTransformers:e.emptyArray,declarationTransformers:e.emptyArray},e.getTransformers=function(e,t,n){return{scriptTransformers:i(e,t,n),declarationTransformers:a(t)}},e.noEmitSubstitution=c,e.noEmitNotification=l,e.transformNodes=function(n,r,i,a,o,s,u){for(var d,p,f,h,g=new Array(341),m=0,_=[],v=[],y=[],b=[],D=0,E=!1,C=c,S=l,x=0,k=[],T={factory:i,getCompilerOptions:function(){return a},getEmitResolver:function(){return n},getEmitHost:function(){return r},getEmitHelperFactory:e.memoize((function(){return e.createEmitHelperFactory(T)})),startLexicalEnvironment:function(){e.Debug.assert(x>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(x<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!E,"Lexical environment is suspended."),_[D]=d,v[D]=p,y[D]=f,b[D]=m,D++,d=void 0,p=void 0,f=void 0,m=0},suspendLexicalEnvironment:function(){e.Debug.assert(x>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(x<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!E,"Lexical environment is already suspended."),E=!0},resumeLexicalEnvironment:function(){e.Debug.assert(x>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(x<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(E,"Lexical environment is not suspended."),E=!1},endLexicalEnvironment:function(){var n;if(e.Debug.assert(x>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(x<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!E,"Lexical environment is suspended."),d||p||f){if(p&&(n=t(p)),d){var r=i.createVariableStatement(void 0,i.createVariableDeclarationList(d));e.setEmitFlags(r,1048576),n?n.push(r):n=[r]}f&&(n=n?t(n,f):t(f))}return D--,d=_[D],p=v[D],f=y[D],m=b[D],0===D&&(_=[],v=[],y=[],b=[]),n},setLexicalEnvironmentFlags:function(e,t){m=t?m|e:m&~e},getLexicalEnvironmentFlags:function(){return m},hoistVariableDeclaration:function(t){e.Debug.assert(x>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(x<2,"Cannot modify the lexical environment after transformation has completed.");var n=e.setEmitFlags(i.createVariableDeclaration(t),64);d?d.push(n):d=[n],1&m&&(m|=2)},hoistFunctionDeclaration:function(t){e.Debug.assert(x>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(x<2,"Cannot modify the lexical environment after transformation has completed."),e.setEmitFlags(t,1048576),p?p.push(t):p=[t]},addInitializationStatement:function(t){e.Debug.assert(x>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(x<2,"Cannot modify the lexical environment after transformation has completed."),e.setEmitFlags(t,1048576),f?f.push(t):f=[t]},requestEmitHelper:function t(n){if(e.Debug.assert(x>0,"Cannot modify the transformation context during initialization."),e.Debug.assert(x<2,"Cannot modify the transformation context after transformation has completed."),e.Debug.assert(!n.scoped,"Cannot request a scoped emit helper."),n.dependencies)for(var r=0,i=n.dependencies;r0,"Cannot modify the transformation context during initialization."),e.Debug.assert(x<2,"Cannot modify the transformation context after transformation has completed.");var t=h;return h=void 0,t},enableSubstitution:function(t){e.Debug.assert(x<2,"Cannot modify the transformation context after transformation has completed."),g[t]|=1},enableEmitNotification:function(t){e.Debug.assert(x<2,"Cannot modify the transformation context after transformation has completed."),g[t]|=2},isSubstitutionEnabled:M,isEmitNotificationEnabled:B,get onSubstituteNode(){return C},set onSubstituteNode(t){e.Debug.assert(x<1,"Cannot modify transformation hooks after initialization has completed."),e.Debug.assert(void 0!==t,"Value must not be 'undefined'"),C=t},get onEmitNode(){return S},set onEmitNode(t){e.Debug.assert(x<1,"Cannot modify transformation hooks after initialization has completed."),e.Debug.assert(void 0!==t,"Value must not be 'undefined'"),S=t},addDiagnostic:function(e){k.push(e)}},w=0,A=o;w"],e[8192]=["[","]"],e}(),a={pos:-1,end:-1};function o(t,n,r,i,a,o){void 0===i&&(i=!1);var u=e.isArray(r)?r:e.getSourceFilesToEmit(t,r,i),l=t.getCompilerOptions();if(e.outFile(l)){var d=t.getPrependNodes();if(u.length||d.length){var p=e.factory.createBundle(u,d);if(g=n(c(p,t,i),p))return g}}else{if(!a)for(var f=0,h=u;f"),Ft(),be(e.type),an(e)}(n);case 308:return function(e){At("function"),bt(e,e.parameters),Tt(":"),be(e.type)}(n);case 175:return function(e){rn(e),At("new"),Ft(),yt(e,e.typeParameters),bt(e,e.parameters),Ft(),Tt("=>"),Ft(),be(e.type),an(e)}(n);case 176:return function(e){At("typeof"),Ft(),be(e.exprName)}(n);case 177:return function(t){Tt("{");var n=1&e.getEmitFlags(t)?768:32897;Et(t,t.members,524288|n),Tt("}")}(n);case 178:return function(e){be(e.elementType),Tt("["),Tt("]")}(n);case 179:return function(t){Ue(22,t.pos,Tt,t);var n=1&e.getEmitFlags(t)?528:657;Et(t,t.elements,524288|n),Ue(23,t.elements.end,Tt,t)}(n);case 180:return function(e){be(e.type),Tt("?")}(n);case 182:return function(e){Et(e,e.types,516)}(n);case 183:return function(e){Et(e,e.types,520)}(n);case 184:return function(e){be(e.checkType),Ft(),At("extends"),Ft(),be(e.extendsType),Ft(),Tt("?"),Ft(),be(e.trueType),Ft(),Tt(":"),Ft(),be(e.falseType)}(n);case 185:return function(e){At("infer"),Ft(),be(e.typeParameter)}(n);case 186:return function(e){Tt("("),be(e.type),Tt(")")}(n);case 223:return function(e){Ee(e.expression),vt(e,e.typeArguments)}(n);case 187:return void At("this");case 188:return function(e){Ut(e.operator,At),Ft(),be(e.type)}(n);case 189:return function(e){be(e.objectType),Tt("["),be(e.indexType),Tt("]")}(n);case 190:return function(t){var n=e.getEmitFlags(t);Tt("{"),1&n?Ft():(Pt(),Rt()),t.readonlyToken&&(be(t.readonlyToken),142!==t.readonlyToken.kind&&At("readonly"),Ft()),Tt("["),Se(3,t.typeParameter),t.nameType&&(Ft(),At("as"),Ft(),be(t.nameType)),Tt("]"),t.questionToken&&(be(t.questionToken),57!==t.questionToken.kind&&Tt("?")),Tt(":"),Ft(),be(t.type),wt(),1&n?Ft():(Pt(),Mt()),Tt("}")}(n);case 191:return function(e){Ee(e.literal)}(n);case 193:return function(e){be(e.head),Et(e,e.templateSpans,262144)}(n);case 195:return function(e){e.isTypeOf&&(At("typeof"),Ft()),At("import"),Tt("("),be(e.argument),Tt(")"),e.qualifier&&(Tt("."),be(e.qualifier)),vt(e,e.typeArguments)}(n);case 303:return void Tt("*");case 304:return void Tt("?");case 305:return function(e){Tt("?"),be(e.type)}(n);case 306:return function(e){Tt("!"),be(e.type)}(n);case 307:return function(e){be(e.type),Tt("=")}(n);case 181:case 309:return function(e){Tt("..."),be(e.type)}(n);case 192:return function(e){be(e.dotDotDotToken),be(e.name),be(e.questionToken),Ue(58,e.name.end,Tt,e),Ft(),be(e.type)}(n);case 196:return function(e){Tt("{"),Et(e,e.elements,525136),Tt("}")}(n);case 197:return function(e){Tt("["),Et(e,e.elements,524880),Tt("]")}(n);case 198:return function(e){be(e.dotDotDotToken),e.propertyName&&(be(e.propertyName),Tt(":"),Ft()),be(e.name),ft(e.initializer,e.name.end,e)}(n);case 228:return function(e){Ee(e.expression),be(e.literal)}(n);case 229:return void wt();case 230:return function(e){Re(e,!e.multiLine&&Zt(e))}(n);case 232:return function(e){dt(e,e.modifiers),be(e.declarationList),wt()}(n);case 231:return Me(!1);case 233:return function(t){Ee(t.expression),(!e.isJsonSourceFile(r)||e.nodeIsSynthesized(t.expression))&&wt()}(n);case 234:return function(e){var t=Ue(98,e.pos,At,e);Ft(),Ue(20,t,Tt,e),Ee(e.expression),Ue(21,e.expression.end,Tt,e),mt(e,e.thenStatement),e.elseStatement&&(Vt(e,e.thenStatement,e.elseStatement),Ue(90,e.thenStatement.end,At,e),234===e.elseStatement.kind?(Ft(),be(e.elseStatement)):mt(e,e.elseStatement))}(n);case 235:return function(t){Ue(89,t.pos,At,t),mt(t,t.statement),e.isBlock(t.statement)&&!B?Ft():Vt(t,t.statement,t.expression),Be(t,t.statement.end),wt()}(n);case 236:return function(e){Be(e,e.pos),mt(e,e.statement)}(n);case 237:return function(e){var t=Ue(96,e.pos,At,e);Ft();var n=Ue(20,t,Tt,e);je(e.initializer),n=Ue(26,e.initializer?e.initializer.end:n,Tt,e),gt(e.condition),n=Ue(26,e.condition?e.condition.end:n,Tt,e),gt(e.incrementor),Ue(21,e.incrementor?e.incrementor.end:n,Tt,e),mt(e,e.statement)}(n);case 238:return function(e){var t=Ue(96,e.pos,At,e);Ft(),Ue(20,t,Tt,e),je(e.initializer),Ft(),Ue(100,e.initializer.end,At,e),Ft(),Ee(e.expression),Ue(21,e.expression.end,Tt,e),mt(e,e.statement)}(n);case 239:return function(e){var t=Ue(96,e.pos,At,e);Ft(),function(e){e&&(be(e),Ft())}(e.awaitModifier),Ue(20,t,Tt,e),je(e.initializer),Ft(),Ue(156,e.initializer.end,At,e),Ft(),Ee(e.expression),Ue(21,e.expression.end,Tt,e),mt(e,e.statement)}(n);case 240:return function(e){Ue(85,e.pos,At,e),ht(e.label),wt()}(n);case 241:return function(e){Ue(80,e.pos,At,e),ht(e.label),wt()}(n);case 242:return function(e){Ue(104,e.pos,At,e),gt(e.expression),wt()}(n);case 243:return function(e){var t=Ue(115,e.pos,At,e);Ft(),Ue(20,t,Tt,e),Ee(e.expression),Ue(21,e.expression.end,Tt,e),mt(e,e.statement)}(n);case 244:return function(e){var t=Ue(106,e.pos,At,e);Ft(),Ue(20,t,Tt,e),Ee(e.expression),Ue(21,e.expression.end,Tt,e),Ft(),be(e.caseBlock)}(n);case 245:return function(e){be(e.label),Ue(58,e.label.end,Tt,e),Ft(),be(e.statement)}(n);case 246:return function(e){Ue(108,e.pos,At,e),gt(e.expression),wt()}(n);case 247:return function(e){Ue(110,e.pos,At,e),Ft(),be(e.tryBlock),e.catchClause&&(Vt(e,e.tryBlock,e.catchClause),be(e.catchClause)),e.finallyBlock&&(Vt(e,e.catchClause||e.tryBlock,e.finallyBlock),Ue(95,(e.catchClause||e.tryBlock).end,At,e),Ft(),be(e.finallyBlock))}(n);case 248:return function(e){Bt(86,e.pos,At),wt()}(n);case 249:return function(e){be(e.name),be(e.exclamationToken),pt(e.type),ft(e.initializer,e.type?e.type.end:e.name.end,e)}(n);case 250:return function(t){At(e.isLet(t)?"let":e.isVarConst(t)?"const":"var"),Ft(),Et(t,t.declarations,528)}(n);case 251:return function(e){Ve(e)}(n);case 252:return function(e){Ye(e)}(n);case 253:return function(e){_t(e,e.decorators),dt(e,e.modifiers),At("interface"),Ft(),be(e.name),yt(e,e.typeParameters),Et(e,e.heritageClauses,512),Ft(),Tt("{"),Et(e,e.members,129),Tt("}")}(n);case 254:return function(e){_t(e,e.decorators),dt(e,e.modifiers),At("type"),Ft(),be(e.name),yt(e,e.typeParameters),Ft(),Tt("="),Ft(),be(e.type),wt()}(n);case 255:return function(e){dt(e,e.modifiers),At("enum"),Ft(),be(e.name),Ft(),Tt("{"),Et(e,e.members,145),Tt("}")}(n);case 256:return function(e){dt(e,e.modifiers),1024&~e.flags&&(At(16&e.flags?"namespace":"module"),Ft()),be(e.name);var t=e.body;if(!t)return wt();for(;256===t.kind;)Tt("."),be(t.name),t=t.body;Ft(),be(t)}(n);case 257:return function(t){rn(t),e.forEach(t.statements,sn),Re(t,Zt(t)),an(t)}(n);case 258:return function(e){Ue(18,e.pos,Tt,e),Et(e,e.clauses,129),Ue(19,e.clauses.end,Tt,e,!0)}(n);case 259:return function(e){var t=Ue(92,e.pos,At,e);Ft(),t=Ue(126,t,At,e),Ft(),t=Ue(140,t,At,e),Ft(),be(e.name),wt()}(n);case 260:return function(e){dt(e,e.modifiers),Ue(99,e.modifiers?e.modifiers.end:e.pos,At,e),Ft(),be(e.name),Ft(),Ue(62,e.name.end,Tt,e),Ft(),function(e){78===e.kind?Ee(e):be(e)}(e.moduleReference),wt()}(n);case 261:return function(e){dt(e,e.modifiers),Ue(99,e.modifiers?e.modifiers.end:e.pos,At,e),Ft(),e.importClause&&(be(e.importClause),Ft(),Ue(153,e.importClause.end,At,e),Ft()),Ee(e.moduleSpecifier),wt()}(n);case 262:return function(e){e.isTypeOnly&&(Ue(149,e.pos,At,e),Ft()),be(e.name),e.name&&e.namedBindings&&(Ue(27,e.name.end,Tt,e),Ft()),be(e.namedBindings)}(n);case 263:return function(e){var t=Ue(41,e.pos,Tt,e);Ft(),Ue(126,t,At,e),Ft(),be(e.name)}(n);case 269:return function(e){var t=Ue(41,e.pos,Tt,e);Ft(),Ue(126,t,At,e),Ft(),be(e.name)}(n);case 264:return function(e){Je(e)}(n);case 265:return function(e){$e(e)}(n);case 266:return function(e){var t=Ue(92,e.pos,At,e);Ft(),e.isExportEquals?Ue(62,t,Ot,e):Ue(87,t,At,e),Ft(),Ee(e.expression),wt()}(n);case 267:return function(e){var t=Ue(92,e.pos,At,e);Ft(),e.isTypeOnly&&(t=Ue(149,t,At,e),Ft()),e.exportClause?be(e.exportClause):t=Ue(41,t,Tt,e),e.moduleSpecifier&&(Ft(),Ue(153,e.exportClause?e.exportClause.end:t,At,e),Ft(),Ee(e.moduleSpecifier)),wt()}(n);case 268:return function(e){Je(e)}(n);case 270:return function(e){$e(e)}(n);case 271:return;case 272:return function(e){At("require"),Tt("("),Ee(e.expression),Tt(")")}(n);case 11:return function(e){h.writeLiteral(e.text)}(n);case 275:case 278:return function(t){if(Tt("<"),e.isJsxOpeningElement(t)){var n=Jt(t.tagName,t);Qe(t.tagName),vt(t,t.typeArguments),t.attributes.properties&&t.attributes.properties.length>0&&Ft(),be(t.attributes),$t(t.attributes,t),Wt(n)}Tt(">")}(n);case 276:case 279:return function(t){Tt("")}(n);case 280:return function(e){be(e.name),function(e,t,n,r){n&&(t(e),r(n))}("=",Tt,e.initializer,Ce)}(n);case 281:return function(e){Et(e,e.properties,262656)}(n);case 282:return function(e){Tt("{..."),Ee(e.expression),Tt("}")}(n);case 283:return function(e){e.expression&&(Tt("{"),be(e.dotDotDotToken),Ee(e.expression),Tt("}"))}(n);case 284:return function(e){Ue(81,e.pos,At,e),Ft(),Ee(e.expression),Xe(e,e.statements,e.expression.end)}(n);case 285:return function(e){var t=Ue(87,e.pos,At,e);Xe(e,e.statements,t)}(n);case 286:return function(e){Ft(),Ut(e.token,At),Ft(),Et(e,e.types,528)}(n);case 287:return function(e){var t=Ue(82,e.pos,At,e);Ft(),e.variableDeclaration&&(Ue(20,t,Tt,e),be(e.variableDeclaration),Ue(21,e.variableDeclaration.end,Tt,e),Ft()),be(e.block)}(n);case 288:return function(t){be(t.name),Tt(":"),Ft();var n=t.initializer;An&&0==(512&e.getEmitFlags(n))&&An(e.getCommentRange(n).pos),Ee(n)}(n);case 289:return function(e){be(e.name),e.objectAssignmentInitializer&&(Ft(),Tt("="),Ft(),Ee(e.objectAssignmentInitializer))}(n);case 290:return function(e){e.expression&&(Ue(25,e.pos,Tt,e),Ee(e.expression))}(n);case 291:return function(e){be(e.name),ft(e.initializer,e.name.end,e)}(n);case 326:case 333:return function(e){tt(e.tagName),rt(e.typeExpression),Ft(),e.isBracketed&&Tt("["),be(e.name),e.isBracketed&&Tt("]"),nt(e.comment)}(n);case 327:case 329:case 328:case 325:return tt((i=n).tagName),rt(i.typeExpression),void nt(i.comment);case 316:case 315:return function(e){tt(e.tagName),Ft(),Tt("{"),be(e.class),Tt("}"),nt(e.comment)}(n);case 330:return function(e){tt(e.tagName),rt(e.constraint),Ft(),Et(e,e.typeParameters,528),nt(e.comment)}(n);case 331:return function(e){tt(e.tagName),e.typeExpression&&(301===e.typeExpression.kind?rt(e.typeExpression):(Ft(),Tt("{"),j("Object"),e.typeExpression.isArrayType&&(Tt("["),Tt("]")),Tt("}"))),e.fullName&&(Ft(),be(e.fullName)),nt(e.comment),e.typeExpression&&312===e.typeExpression.kind&&Ze(e.typeExpression)}(n);case 324:return function(e){tt(e.tagName),e.name&&(Ft(),be(e.name)),nt(e.comment),et(e.typeExpression)}(n);case 313:return et(n);case 312:return Ze(n);case 319:case 314:return function(e){tt(e.tagName),nt(e.comment)}(n);case 332:return function(e){tt(e.tagName),be(e.name),nt(e.comment)}(n);case 302:return function(e){Ft(),Tt("{"),be(e.name),Tt("}")}(n);case 311:return function(e){if(j("/**"),e.comment)for(var t=0,n=e.comment.split(/\r\n?|\n/g);t=1&&!e.isJsonSourceFile(r)?64:0;Et(t,t.properties,526226|a|i),n&&Mt()}(n);case 201:return function(t){var n=e.cast(Ee(t.expression),e.isExpression),r=t.questionDotToken||e.setTextRangePosEnd(e.factory.createToken(24),t.expression.end,t.name.pos),i=Xt(t,t.expression,r),a=Xt(t,r,t.name);Ht(i,!1),28===r.kind||!function(t){if(t=e.skipPartiallyEmittedExpressions(t),e.isNumericLiteral(t)){var n=nn(t,!0,!1);return!t.numericLiteralFlags&&!e.stringContains(n,e.tokenToString(24))}if(e.isAccessExpression(t)){var r=e.getConstantValue(t);return"number"==typeof r&&isFinite(r)&&Math.floor(r)===r}}(n)||h.hasTrailingComment()||h.hasTrailingWhitespace()||Tt("."),t.questionDotToken?be(r):Ue(r.kind,t.expression.end,Tt,t),Ht(a,!1),be(t.name),Wt(i,a)}(n);case 202:return function(e){Ee(e.expression),be(e.questionDotToken),Ue(22,e.expression.end,Tt,e),Ee(e.argumentExpression),Ue(23,e.argumentExpression.end,Tt,e)}(n);case 203:return function(e){Ee(e.expression),be(e.questionDotToken),vt(e,e.typeArguments),Ct(e,e.arguments,2576)}(n);case 204:return function(e){Ue(102,e.pos,At,e),Ft(),Ee(e.expression),vt(e,e.typeArguments),Ct(e,e.arguments,18960)}(n);case 205:return function(e){Ee(e.tag),vt(e,e.typeArguments),Ft(),Ee(e.template)}(n);case 206:return function(e){Tt("<"),be(e.type),Tt(">"),Ee(e.expression)}(n);case 207:return function(e){var t=Ue(20,e.pos,Tt,e),n=Jt(e.expression,e);Ee(e.expression),$t(e.expression,e),Wt(n),Ue(21,e.expression?e.expression.end:t,Tt,e)}(n);case 208:return function(e){cn(e.name),Ve(e)}(n);case 209:return function(e){_t(e,e.decorators),dt(e,e.modifiers),He(e,Pe)}(n);case 210:return function(e){Ue(88,e.pos,At,e),Ft(),Ee(e.expression)}(n);case 211:return function(e){Ue(111,e.pos,At,e),Ft(),Ee(e.expression)}(n);case 212:return function(e){Ue(113,e.pos,At,e),Ft(),Ee(e.expression)}(n);case 213:return function(e){Ue(130,e.pos,At,e),Ft(),Ee(e.expression)}(n);case 214:return function(e){Ut(e.operator,Ot),function(e){var t=e.operand;return 214===t.kind&&(39===e.operator&&(39===t.operator||45===t.operator)||40===e.operator&&(40===t.operator||46===t.operator))}(e)&&Ft(),Ee(e.operand)}(n);case 215:return function(e){Ee(e.operand),Ut(e.operator,Ot)}(n);case 216:return function(t){for(var n=[t],r=[0],i=0;i>=0;)switch(t=n[i],r[i]){case 0:u(t.left);break;case 1:var a=27!==t.operatorToken.kind,o=Xt(t,t.left,t.operatorToken),s=Xt(t,t.operatorToken,t.right);Ht(o,a),Tn(t.operatorToken.pos),jt(t.operatorToken,100===t.operatorToken.kind?At:Ot),An(t.operatorToken.end,!0),Ht(s,!0),u(t.right);break;case 2:Wt(o=Xt(t,t.left,t.operatorToken),s=Xt(t,t.operatorToken,t.right)),i--;break;default:return e.Debug.fail("Invalid state "+r[i]+" for emitBinaryExpressionWorker")}function u(t){r[i]++;var a=E,o=C;E=t,C=void 0;var s=xe(0,1,t);s===we&&e.isBinaryExpression(t)?(i++,r[i]=0,n[i]=t):s(1,t),e.Debug.assert(E===t),E=a,C=o}}(n);case 217:return function(e){var t=Xt(e,e.condition,e.questionToken),n=Xt(e,e.questionToken,e.whenTrue),r=Xt(e,e.whenTrue,e.colonToken),i=Xt(e,e.colonToken,e.whenFalse);Ee(e.condition),Ht(t,!0),be(e.questionToken),Ht(n,!0),Ee(e.whenTrue),Wt(t,n),Ht(r,!0),be(e.colonToken),Ht(i,!0),Ee(e.whenFalse),Wt(r,i)}(n);case 218:return function(e){be(e.head),Et(e,e.templateSpans,262144)}(n);case 219:return function(e){Ue(124,e.pos,At,e),be(e.asteriskToken),gt(e.expression)}(n);case 220:return function(e){Ue(25,e.pos,Tt,e),Ee(e.expression)}(n);case 221:return function(e){cn(e.name),Ye(e)}(n);case 222:return;case 224:return function(e){Ee(e.expression),e.type&&(Ft(),At("as"),Ft(),be(e.type))}(n);case 225:return function(e){Ee(e.expression),Ot("!")}(n);case 226:return function(e){Bt(e.keywordToken,e.pos,Tt),Tt("."),be(e.name)}(n);case 273:return function(e){be(e.openingElement),Et(e,e.children,262144),be(e.closingElement)}(n);case 274:return function(e){Tt("<"),Qe(e.tagName),vt(e,e.typeArguments),Ft(),be(e.attributes),Tt("/>")}(n);case 277:return function(e){be(e.openingFragment),Et(e,e.children,262144),be(e.closingFragment)}(n);case 336:return function(e){Ee(e.expression)}(n);case 337:return function(e){Ct(e,e.elements,528)}(n)}}function Ae(t,n){e.Debug.assert(E===n||C===n),ke(1,t,n)(t,C),e.Debug.assert(E===n||C===n)}function Oe(n){var i=!1,a=298===n.kind?n:void 0;if(!a||R!==e.ModuleKind.None){for(var o=a?a.prepends.length:0,s=a?a.sourceFiles.length+o:1,u=0;u0)return!1;n=o}return!0}(t)?qe:Ge;Dn?Dn(t,t.statements,n):n(t),Mt(),Bt(19,t.statements.end,Tt,t)}function qe(e){Ge(e,!0)}function Ge(e,t){var n=ot(e.statements),r=h.getTextPos();Oe(e),0===n&&r===h.getTextPos()&&t?(Mt(),Et(e,e.statements,768),Rt()):Et(e,e.statements,1,n)}function Ye(t){e.forEach(t.members,un),_t(t,t.decorators),dt(t,t.modifiers),At("class"),t.name&&(Ft(),De(t.name));var n=65536&e.getEmitFlags(t);n&&Rt(),yt(t,t.typeParameters),Et(t,t.heritageClauses,0),Ft(),Tt("{"),Et(t,t.members,129),Tt("}"),n&&Mt()}function Je(e){Tt("{"),Et(e,e.elements,525136),Tt("}")}function $e(e){e.propertyName&&(be(e.propertyName),Ft(),Ue(126,e.propertyName.end,At,e),Ft()),be(e.name)}function Qe(e){78===e.kind?Ee(e):be(e)}function Xe(t,n,i){var a=163969;1===n.length&&(e.nodeIsSynthesized(t)||e.nodeIsSynthesized(n[0])||e.rangeStartPositionsAreOnSameLine(t,n[0],r))?(Bt(58,i,Tt,t),Ft(),a&=-130):Ue(58,i,Tt,t),Et(t,n,a)}function Ze(t){Et(t,e.factory.createNodeArray(t.jsDocPropertyTags),33)}function et(t){t.typeParameters&&Et(t,e.factory.createNodeArray(t.typeParameters),33),t.parameters&&Et(t,e.factory.createNodeArray(t.parameters),33),t.type&&(Pt(),Ft(),Tt("*"),Ft(),be(t.type))}function tt(e){Tt("@"),be(e)}function nt(e){e&&(Ft(),j(e))}function rt(e){e&&(Ft(),Tt("{"),be(e.type),Tt("}"))}function it(e,t,n,i){if(e){var a=h.getTextPos();It('/// '),U&&U.sections.push({pos:a,end:h.getTextPos(),kind:"no-default-lib"}),Pt()}if(r&&r.moduleName&&(It('/// '),Pt()),r&&r.amdDependencies)for(var o=0,s=r.amdDependencies;o'):It('/// '),Pt()}for(var c=0,l=t;c'),U&&U.sections.push({pos:a,end:h.getTextPos(),kind:"reference",data:d.fileName}),Pt()}for(var p=0,f=n;p'),U&&U.sections.push({pos:a,end:h.getTextPos(),kind:"type",data:d.fileName}),Pt();for(var g=0,m=i;g'),U&&U.sections.push({pos:a,end:h.getTextPos(),kind:"lib",data:d.fileName}),Pt()}function at(t){var n=t.statements;rn(t),e.forEach(t.statements,sn),Oe(t);var r=e.findIndex(n,(function(t){return!e.isPrologueDirective(t)}));!function(e){e.isDeclarationFile&&it(e.hasNoDefaultLib,e.referencedFiles,e.typeReferenceDirectives,e.libReferenceDirectives)}(t),Et(t,n,1,-1===r?n.length:r),an(t)}function ot(t,n,r,i){for(var a=!!n,o=0;o=a.length||0===u;if(l&&32768&o)return O&&O(a),void(N&&N(a));if(15360&o&&(Tt(function(e){return i[15360&e][0]}(o)),l&&!c&&An(a.pos,!0)),O&&O(a),l)!(1&o)||B&&e.rangeIsOnSingleLine(n,r)?256&o&&!(524288&o)&&Ft():Pt();else{var d=0==(262144&o),p=d,h=Kt(n,a,o);h?(Pt(h),p=!1):256&o&&Ft(),128&o&&Rt();for(var g=void 0,m=void 0,_=!1,v=0;v0?(0==(131&o)&&(Rt(),_=!0),Pt(b),p=!1):g&&512&o&&Ft()}m=ue(y),p?An&&An(e.getCommentRange(y).pos):p=d,f=y.pos,t(y),_&&(Mt(),_=!1),g=y}var D=64&o&&a.hasTrailingComma;16&o&&D&&Tt(","),g&&60&o&&g.end!==n.end&&!(1024&e.getEmitFlags(g))&&Tn(g.end),128&o&&Mt(),ce(m);var E=Gt(n,a,o);E?Pt(E):2097408&o&&Ft()}N&&N(a),15360&o&&(l&&!c&&Tn(a.end),Tt(function(e){return i[15360&e][1]}(o)))}}function kt(e,t){h.writeSymbol(e,t)}function Tt(e){h.writePunctuation(e)}function wt(){h.writeTrailingSemicolon(";")}function At(e){h.writeKeyword(e)}function Ot(e){h.writeOperator(e)}function Nt(e){h.writeParameter(e)}function It(e){h.writeComment(e)}function Ft(){h.writeSpace(" ")}function Lt(e){h.writeProperty(e)}function Pt(e){void 0===e&&(e=1);for(var t=0;t0)}function Rt(){h.increaseIndent()}function Mt(){h.decreaseIndent()}function Bt(t,n,r,i){return K?Ut(t,r,n):function(t,n,r,i,a){if(K||t&&e.isInJsonFile(t))return a(n,r,i);var o=t&&t.emitNode,s=o&&o.flags||0,u=o&&o.tokenSourceMapRanges&&o.tokenSourceMapRanges[n],c=u&&u.source||v;return i=Rn(c,u?u.pos:i),0==(128&s)&&i>=0&&Bn(c,i),i=a(n,r,i),u&&(i=u.end),0==(256&s)&&i>=0&&Bn(c,i),i}(i,t,r,n,Ut)}function jt(t,n){I&&I(t),n(e.tokenToString(t.kind)),F&&F(t)}function Ut(t,n,r){var i=e.tokenToString(t);return n(i),r<0?r:r+i.length}function Vt(t,n,r){if(1&e.getEmitFlags(t))Ft();else if(B){var i=Xt(t,n,r);i?Pt(i):Ft()}else Pt()}function zt(t){for(var n=t.split(/\r\n?|\n/g),r=e.guessIndentation(n),i=0,a=n;i0||o>0)&&a!==o&&(u||En(a,s),(!u||a>=0&&0!=(512&r))&&(Y=a),(!c||o>=0&&0!=(1024&r))&&(J=o,250===n.kind&&($=o))),e.forEach(e.getSyntheticLeadingComments(n),vn),te();var f=ke(2,t,n);2048&r?(X=!0,f(t,n),X=!1):f(t,n),ee(),e.forEach(e.getSyntheticTrailingComments(n),yn),(a>0||o>0)&&a!==o&&(Y=l,J=d,$=p,!c&&s&&function(e){In(e,wn)}(o)),te(),e.Debug.assert(E===n||C===n)}function vn(e){(e.hasLeadingNewline||2===e.kind)&&h.writeLine(),bn(e),e.hasTrailingNewLine||2===e.kind?h.writeLine():h.writeSpace(" ")}function yn(e){h.isAtStartOfLine()||h.writeSpace(" "),bn(e),e.hasTrailingNewLine&&h.writeLine()}function bn(t){var n=function(e){return 3===e.kind?"/*"+e.text+"*/":"//"+e.text}(t),r=3===t.kind?e.computeLineStarts(n):void 0;e.writeCommentRange(n,r,h,0,n.length,P)}function Dn(t,n,i){ee();var a=n.pos,o=n.end,s=e.getEmitFlags(t),u=X||o<0||0!=(1024&s);a<0||0!=(512&s)||function(t){var n=e.emitDetachedComments(r.text,ye(),h,Fn,t,P,X);n&&(D?D.push(n):D=[n])}(n),te(),2048&s&&!X?(X=!0,i(t),X=!1):i(t),ee(),u||(En(n.end,!0),Q&&!h.isAtStartOfLine()&&h.writeLine()),te()}function En(e,t){Q=!1,t?0===e&&(null==r?void 0:r.isDeclarationFile)?Nn(e,Sn):Nn(e,kn):0===e&&Nn(e,Cn)}function Cn(e,t,n,r,i){Ln(e,t)&&kn(e,t,n,r,i)}function Sn(e,t,n,r,i){Ln(e,t)||kn(e,t,n,r,i)}function xn(n,r){return!t.onlyPrintJsDocStyle||e.isJSDocLikeText(n,r)||e.isPinnedComment(n,r)}function kn(t,n,i,a,o){xn(r.text,t)&&(Q||(e.emitNewLineBeforeLeadingCommentOfPosition(ye(),h,o,t),Q=!0),Mn(t),e.writeCommentRange(r.text,ye(),h,t,n,P),Mn(n),a?h.writeLine():3===i&&h.writeSpace(" "))}function Tn(e){X||-1===e||En(e,!0)}function wn(t,n,i,a){xn(r.text,t)&&(h.isAtStartOfLine()||h.writeSpace(" "),Mn(t),e.writeCommentRange(r.text,ye(),h,t,n,P),Mn(n),a&&h.writeLine())}function An(e,t){X||(ee(),In(e,t?wn:On),te())}function On(t,n,i,a){Mn(t),e.writeCommentRange(r.text,ye(),h,t,n,P),Mn(n),a?h.writeLine():h.writeSpace(" ")}function Nn(t,n){!r||-1!==Y&&t===Y||(function(t){return void 0!==D&&e.last(D).nodePos===t}(t)?function(t){var n=e.last(D).detachedCommentEndPos;D.length-1?D.pop():D=void 0,e.forEachLeadingCommentRange(r.text,n,t,n)}(n):e.forEachLeadingCommentRange(r.text,t,n,t))}function In(t,n){r&&(-1===J||t!==J&&t!==$)&&e.forEachTrailingCommentRange(r.text,t,n)}function Fn(t,n,i,a,o,s){xn(r.text,a)&&(Mn(a),e.writeCommentRange(t,n,i,a,o,s),Mn(o))}function Ln(t,n){return e.isRecognizedTripleSlashComment(r.text,t,n)}function Pn(t,n){e.Debug.assert(E===n||C===n);var r=ke(3,t,n);if(e.isUnparsedSource(n)||e.isUnparsedPrepend(n))r(t,n);else if(e.isUnparsedNode(n)){var i=function(t){return void 0===t.parsedSourceMap&&void 0!==t.sourceMapText&&(t.parsedSourceMap=e.tryParseRawSourceMap(t.sourceMapText)||!1),t.parsedSourceMap||void 0}(n.parent);i&&_&&_.appendSourceMap(h.getLine(),h.getColumn(),i,n.parent.sourceMapPath,n.parent.getLineAndCharacterOfPosition(n.pos),n.parent.getLineAndCharacterOfPosition(n.end)),r(t,n)}else{var a=e.getSourceMapRange(n),o=a.pos,s=a.end,u=a.source,c=void 0===u?v:u,l=e.getEmitFlags(n);335!==n.kind&&0==(16&l)&&o>=0&&Bn(c,Rn(c,o)),64&l?(K=!0,r(t,n),K=!1):r(t,n),335!==n.kind&&0==(32&l)&&s>=0&&Bn(c,s)}e.Debug.assert(E===n||C===n)}function Rn(t,n){return t.skipTrivia?t.skipTrivia(n):e.skipTrivia(t.text,n)}function Mn(t){if(!(K||e.positionIsSynthesized(t)||Un(v))){var n=e.getLineAndCharacterOfPosition(v,t),r=n.line,i=n.character;_.addMapping(h.getLine(),h.getColumn(),q,r,i,void 0)}}function Bn(e,t){if(e!==v){var n=v,r=q;jn(e),Mn(t),function(e,t){v=e,q=t}(n,r)}else Mn(t)}function jn(e){K||(v=e,e!==y?Un(e)||(q=_.addSource(e.fileName),t.inlineSources&&_.setSourceContent(q,e.text),y=e,G=q):q=G)}function Un(t){return e.fileExtensionIs(t.fileName,".json")}}e.isBuildInfoFile=function(t){return e.fileExtensionIs(t,".tsbuildinfo")},e.forEachEmittedFile=o,e.getTsBuildInfoEmitOutputFilePath=s,e.getOutputPathsForBundle=u,e.getOutputPathsFor=c,e.getOutputExtension=d,e.getOutputDeclarationFileName=f,e.getAllProjectOutputs=function(t,n){var r=g(),i=r.addOutput,a=r.getOutputs;if(e.outFile(t.options))m(t,i);else{for(var o=0,u=t.fileNames;o=4,v=(h+1+"").length;_&&(v=Math.max("...".length,v));for(var y="",b=l;b<=h;b++){y+=o.getNewLine(),_&&l+11}))&&Zt(e.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files,"outDir")}if(I.useDefineForClassFields&&0===d&&Zt(e.Diagnostics.Option_0_cannot_be_specified_when_option_target_is_ES3,"useDefineForClassFields"),I.checkJs&&!e.getAllowJSCompilerOption(I)&&te.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"checkJs","allowJs")),I.emitDeclarationOnly&&(e.getEmitDeclarations(I)||Zt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"emitDeclarationOnly","declaration","composite"),I.noEmit&&Zt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"emitDeclarationOnly","noEmit")),I.emitDecoratorMetadata&&!I.experimentalDecorators&&Zt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"emitDecoratorMetadata","experimentalDecorators"),I.jsxFactory?(I.reactNamespace&&Zt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"reactNamespace","jsxFactory"),4!==I.jsx&&5!==I.jsx||Zt(e.Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFactory",e.inverseJsxOptionMap.get(""+I.jsx)),e.parseIsolatedEntityName(I.jsxFactory,d)||en("jsxFactory",e.Diagnostics.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name,I.jsxFactory)):I.reactNamespace&&!e.isIdentifierText(I.reactNamespace,d)&&en("reactNamespace",e.Diagnostics.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier,I.reactNamespace),I.jsxFragmentFactory&&(I.jsxFactory||Zt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"jsxFragmentFactory","jsxFactory"),4!==I.jsx&&5!==I.jsx||Zt(e.Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxFragmentFactory",e.inverseJsxOptionMap.get(""+I.jsx)),e.parseIsolatedEntityName(I.jsxFragmentFactory,d)||en("jsxFragmentFactory",e.Diagnostics.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name,I.jsxFragmentFactory)),I.reactNamespace&&(4!==I.jsx&&5!==I.jsx||Zt(e.Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1,"reactNamespace",e.inverseJsxOptionMap.get(""+I.jsx))),I.jsxImportSource&&2===I.jsx&&Zt(e.Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1,"jsxImportSource",e.inverseJsxOptionMap.get(""+I.jsx)),!I.noEmit&&!I.suppressOutputPathCheck){var v=Ze(),y=new e.Set;e.forEachEmittedFile(v,(function(e){I.emitDeclarationOnly||b(e.jsFilePath,y),b(e.declarationFilePath,y)}))}function b(t,n){if(t){var r=$e(t);if(_e.has(r)){var i=void 0;I.configFilePath||(i=e.chainDiagnosticMessages(void 0,e.Diagnostics.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)),i=e.chainDiagnosticMessages(i,e.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file,t),on(t,e.createCompilerDiagnosticFromMessageChain(i))}var a=$.useCaseSensitiveFileNames()?r:e.toFileNameLowerCase(r);n.has(a)?on(t,e.createCompilerDiagnostic(e.Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files,t)):n.add(a)}}}(),e.performance.mark("afterProgram"),e.performance.measure("Program","beforeProgram","afterProgram"),e.tracing.end.apply(e.tracing,K),We;function Ke(t,n,r){if(!t.length)return e.emptyArray;var i=e.getNormalizedAbsolutePath(n.originalFileName,ne),a=Ge(n);e.tracing.push("program","resolveModuleNamesWorker",{containingFileName:i}),e.performance.mark("beforeResolveModule");var o=Y(t,i,r,a);return e.performance.mark("afterResolveModule"),e.performance.measure("ResolveModule","beforeResolveModule","afterResolveModule"),e.tracing.pop(),o}function qe(t,n){if(!t.length)return[];var r=e.isString(n)?n:e.getNormalizedAbsolutePath(n.originalFileName,ne),i=e.isString(n)?void 0:Ge(n);e.tracing.push("program","resolveTypeReferenceDirectiveNamesWorker",{containingFileName:r}),e.performance.mark("beforeResolveTypeReference");var a=J(t,r,i);return e.performance.mark("afterResolveTypeReference"),e.performance.measure("ResolveTypeReference","beforeResolveTypeReference","afterResolveTypeReference"),e.tracing.pop(),a}function Ge(t){var n=Lt(t.originalFileName);if(n||!e.fileExtensionIs(t.originalFileName,".d.ts"))return n;var r=Ye(t.originalFileName,t.path);if(r)return r;if($.realpath&&I.preserveSymlinks&&e.stringContains(t.originalFileName,e.nodeModulesPathPart)){var i=$.realpath(t.originalFileName),a=$e(i);return a===t.path?void 0:Ye(i,a)}}function Ye(t,n){var r=Rt(t);return e.isString(r)?Lt(r):r?Pt((function(t){var r=e.outFile(t.commandLine.options);if(r)return $e(r)===n?t:void 0})):void 0}function Je(t){if(e.containsPath(ee,t.fileName,!1)){var n=e.getBaseFileName(t.fileName);if("lib.d.ts"===n||"lib.es6.d.ts"===n)return 0;var r=e.removeSuffix(e.removePrefix(n,"lib."),".d.ts"),i=e.libs.indexOf(r);if(-1!==i)return i+1}return e.libs.length+2}function $e(t){return e.toPath(t,ne,Wt)}function Qe(){if(void 0===x){var t=e.filter(h,(function(t){return e.sourceFileMayBeEmitted(t,We)}));I.rootDir&&qt(t,I.rootDir)?x=e.getNormalizedAbsolutePath(I.rootDir,ne):I.composite&&I.configFilePath?qt(t,x=e.getDirectoryPath(e.normalizeSlashes(I.configFilePath))):(n=t,x=r(e.mapDefined(n,(function(e){return e.isDeclarationFile?void 0:e.fileName})),ne,Wt)),x&&x[x.length-1]!==e.directorySeparator&&(x+=e.directorySeparator)}var n;return x}function Xe(t,n){if(0===Se&&!n.ambientModuleNames.length)return Ke(t,n,void 0);var r,i,a,o=P&&P.getSourceFile(n.fileName);if(o!==n&&n.resolvedModules){for(var s=[],u=0,c=t;u=0;){if(n.markUsed(o))return o;var s=r.text.slice(a[o],a[o+1]).trim();if(""!==s&&!/^(\s*)\/\/(.*)$/.test(s))return-1;o--}return-1}(t,i)})),directives:i}}function mt(e,t){return vt(e,t,B,_t)}function _t(t,n){return dt((function(){var r=rt().getEmitResolver(t,n);return e.getDeclarationDiagnostics(Ze(e.noop),r,t)||e.emptyArray}))}function vt(t,n,r,i){var a,o=t?null===(a=r.perFile)||void 0===a?void 0:a.get(t.path):r.allDiagnostics;if(o)return o;var s=i(t,n);return t?(r.perFile||(r.perFile=new e.Map)).set(t.path,s):r.allDiagnostics=s,s}function yt(e,t){return e.isDeclarationFile?[]:mt(e,t)}function bt(t,n,r){kt(e.normalizePath(t),n,r,void 0)}function Dt(e,t){return e.fileName===t.fileName}function Et(e,t){return 78===e.kind?78===t.kind&&e.escapedText===t.escapedText:10===t.kind&&e.text===t.text}function Ct(t,n){var r=e.factory.createStringLiteral(t),i=e.factory.createImportDeclaration(void 0,void 0,void 0,r);return e.addEmitFlags(i,67108864),e.setParent(r,i),e.setParent(i,n),r.flags&=-9,i.flags&=-9,r}function St(t){if(!t.imports){var n,r,i,a=e.isSourceFileJS(t),o=e.isExternalModule(t);if((I.isolatedModules||o)&&!t.isDeclarationFile){I.importHelpers&&(n=[Ct(e.externalHelpersModuleNameText,t)]);var s=e.getJSXRuntimeImport(e.getJSXImplicitImportBase(I,t),I);s&&(n||(n=[])).push(Ct(s,t))}for(var u=0,c=t.statements;u0),Object.defineProperties(o,{id:{get:function(){return this.redirectInfo.redirectTarget.id},set:function(e){this.redirectInfo.redirectTarget.id=e}},symbol:{get:function(){return this.redirectInfo.redirectTarget.symbol},set:function(e){this.redirectInfo.redirectTarget.symbol=e}}}),o}(b,v,t,n,$e(t),d);return me.add(b.path,t),Ot(D,n,l),ge.set(n,o.name),f.push(D),D}v&&(he.set(y,v),ge.set(n,o.name))}if(Ot(v,n,l),v){if(W.set(n,z>0),v.fileName=t,v.path=n,v.resolvedPath=$e(t),v.originalFileName=d,At(t,v,a),$.useCaseSensitiveFileNames()){var E=e.toFileNameLowerCase(n),C=ve.get(E);C?Tt(t,C,a):ve.set(E,v)}X=X||v.hasNoDefaultLib&&!i,I.noResolve||(jt(v,r),Ut(v)),I.noLib||zt(v),Kt(v),r?p.push(v):f.push(v)}return v}(t,n,r,i,a,o);return e.tracing.pop(),s}function At(t,n,r){r&&n&&(A||(A=e.createMultiMap())).add(n.path,{referencedFileName:t,kind:r.kind,index:r.index,file:r.file.path})}function Ot(e,t,n){n?(_e.set(n,e),_e.set(t,e||!1)):_e.set(t,e)}function Nt(e){var t=It(e);return t&&Ft(t,e)}function It(t){if(le&&le.length&&!e.fileExtensionIs(t,".d.ts")&&!e.fileExtensionIs(t,".json"))return Lt(t)}function Ft(t,n){var r=e.outFile(t.commandLine.options);return r?e.changeExtension(r,".d.ts"):e.getOutputDeclarationFileName(n,t.commandLine,!$.useCaseSensitiveFileNames())}function Lt(t){void 0===pe&&(pe=new e.Map,Pt((function(e){$e(I.configFilePath)!==e.sourceFile.path&&e.commandLine.fileNames.forEach((function(t){return pe.set($e(t),e.sourceFile.path)}))})));var n=pe.get($e(t));return n&&Bt(n)}function Pt(t){return e.forEachResolvedProjectReference(le,t)}function Rt(t){if(e.isDeclarationFileName(t))return void 0===fe&&(fe=new e.Map,Pt((function(t){var n=e.outFile(t.commandLine.options);if(n){var r=e.changeExtension(n,".d.ts");fe.set($e(r),!0)}else e.forEach(t.commandLine.fileNames,(function(n){if(!e.fileExtensionIs(n,".d.ts")&&!e.fileExtensionIs(n,".json")){var r=e.getOutputDeclarationFileName(n,t.commandLine,$.useCaseSensitiveFileNames());fe.set($e(r),n)}}))}))),fe.get($e(t))}function Mt(e){return ye&&!!Lt(e)}function Bt(e){if(de)return de.get(e)||void 0}function jt(t,r){e.forEach(t.referencedFiles,(function(i,a){kt(n(i.fileName,t.fileName),r,!1,void 0,{kind:e.RefFileKind.ReferenceFile,index:a,file:t,pos:i.pos,end:i.end})}))}function Ut(t){var n=e.map(t.typeReferenceDirectives,(function(t){return e.toFileNameLowerCase(t.fileName)}));if(n)for(var r=qe(n,t),i=0;iV,d=c&&!C(I,a)&&!I.noResolve&&in&&(te.add(e.createDiagnosticForNodeInSourceFile(I.configFile,f.elements[n],r,i,a,o)),s=!1)}}s&&te.add(e.createCompilerDiagnostic(r,i,a,o))}function Qt(t,n,r,i){for(var a=!0,o=0,s=Xt();on?te.add(e.createDiagnosticForNodeInSourceFile(t||I.configFile,o.elements[n],r,i,a)):te.add(e.createCompilerDiagnostic(r,i,a))}function nn(t,n,r,i,a,o,s){var u=rn();(!u||!an(u,t,n,r,i,a,o,s))&&te.add(e.createCompilerDiagnostic(i,a,o,s))}function rn(){if(void 0===q){q=null;var t=e.getTsConfigObjectLiteralExpression(I.configFile);if(t)for(var n=0,r=e.getPropertyAssignment(t,"compilerOptions");n0)for(var s=t.getTypeChecker(),u=0,c=n.imports;u0)for(var p=0,f=n.referencedFiles;p1&&E(D)}return o;function E(t){for(var r=0,i=t.declarations;r1?h.outputFiles[1]:void 0:h.outputFiles.length>0?h.outputFiles[0]:void 0;g?(e.Debug.assert(e.fileExtensionIs(g.name,".d.ts"),"File extension for signature expected to be dts",(function(){return"Found: "+e.getAnyExtensionFromPath(g.name)+" for "+g.name+":: All output files: "+JSON.stringify(h.outputFiles.map((function(e){return e.name})))})),d=(u||e.generateDjb2Hash)(g.text),c&&d!==p&&function(t,n,i){var a;function o(t){t&&(a||(a=new e.Set),a.add(t))}n?(n.forEach((function(e){return o(r(e))})),i.set(t.resolvedPath,a||!1)):i.set(t.resolvedPath,!1)}(a,h.exportedModulesFromDeclarationEmit,c)):d=p}return o.set(a.resolvedPath,d),!p||d!==p}function d(t,n){if(!t.allFileNames){var r=n.getSourceFiles();t.allFileNames=r===e.emptyArray?e.emptyArray:r.map((function(e){return e.fileName}))}return t.allFileNames}function p(t,n){return e.arrayFrom(e.mapDefinedIterator(t.referencedMap.entries(),(function(e){var t=e[0];return e[1].has(n)?t:void 0})))}function f(t){return function(t){return e.some(t.moduleAugmentations,(function(t){return e.isGlobalScopeAugmentation(t.parent)}))}(t)||!e.isExternalModule(t)&&!function(t){for(var n=0,r=t.statements;n0;){var g=d.pop();if(!c.has(g)){var m=n.getSourceFileByPath(g);c.set(g,m),m&&l(t,n,m,i,a,o,s)&&d.push.apply(d,p(t,m.resolvedPath))}}return e.arrayFrom(e.mapDefinedIterator(c.values(),(function(e){return e})))}n.canReuseOldState=s,n.create=function(t,n,r){var i=new e.Map,a=t.getCompilerOptions().module!==e.ModuleKind.None?new e.Map:void 0,u=a?new e.Map:void 0,c=new e.Set,l=s(a,r);t.getTypeChecker();for(var d=0,p=t.getSourceFiles();d0;){var o=a.pop();if(!i.has(o)&&(i.set(o,!0),r(t,o)&&c(t,o))){var s=e.Debug.checkDefined(t.program).getSourceFileByPath(o);a.push.apply(a,e.BuilderState.getReferencedByPaths(t,s.resolvedPath))}}}e.Debug.assert(!!t.currentAffectedFilesExportedModulesMap);var u=new e.Set;e.forEachEntry(t.currentAffectedFilesExportedModulesMap,(function(e,i){return e&&e.has(n.resolvedPath)&&l(t,i,u,r)}))||e.forEachEntry(t.exportedModulesMap,(function(e,i){return!t.currentAffectedFilesExportedModulesMap.has(i)&&e.has(n.resolvedPath)&&l(t,i,u,r)}))}}(t,n,(function(t,n){return function(t,n,r,i){if(u(t,n),!t.changedFilesSet.has(n)){var a=e.Debug.checkDefined(t.program),o=a.getSourceFileByPath(n);o&&(e.BuilderState.updateShapeSignature(t,a,o,e.Debug.checkDefined(t.currentAffectedFilesSignatures),r,i,t.currentAffectedFilesExportedModulesMap),e.getEmitDeclarations(t.compilerOptions)&&b(t,n,0))}return!1}(t,n,r,i)}));else if(!t.cleanedDiagnosticsOfLibFiles){t.cleanedDiagnosticsOfLibFiles=!0;var a=e.Debug.checkDefined(t.program),o=a.getCompilerOptions();e.forEach(a.getSourceFiles(),(function(n){return a.isSourceFileDefaultLibrary(n)&&!e.skipTypeChecking(n,o,a)&&u(t,n.resolvedPath)}))}}function u(e,t){return!e.semanticDiagnosticsFromOldState||(e.semanticDiagnosticsFromOldState.delete(t),e.semanticDiagnosticsPerFile.delete(t),!e.semanticDiagnosticsFromOldState.size)}function c(t,n){return e.Debug.checkDefined(t.currentAffectedFilesSignatures).get(n)!==e.Debug.checkDefined(t.fileInfos.get(n)).signature}function l(t,n,r,i){return e.forEachEntry(t.referencedMap,(function(e,a){return e.has(n)&&d(t,a,r,i)}))}function d(t,n,r,i){return!!e.tryAddToSet(r,n)&&(!!i(t,n)||(e.Debug.assert(!!t.currentAffectedFilesExportedModulesMap),!!e.forEachEntry(t.currentAffectedFilesExportedModulesMap,(function(e,a){return e&&e.has(n)&&d(t,a,r,i)}))||!!e.forEachEntry(t.exportedModulesMap,(function(e,a){return!t.currentAffectedFilesExportedModulesMap.has(a)&&e.has(n)&&d(t,a,r,i)}))||!!e.forEachEntry(t.referencedMap,(function(e,a){return e.has(n)&&!r.has(a)&&i(t,a)}))))}function p(t,n,r,i,a){a?t.buildInfoEmitPending=!1:n===t.program?(t.changedFilesSet.clear(),t.programEmitComplete=!0):(t.seenAffectedFiles.add(n.resolvedPath),void 0!==r&&(t.seenEmittedFiles||(t.seenEmittedFiles=new e.Map)).set(n.resolvedPath,r),i?(t.affectedFilesPendingEmitIndex++,t.buildInfoEmitPending=!0):t.affectedFilesIndex++)}function f(e,t,n){return p(e,n),{result:t,affected:n}}function h(e,t,n,r,i,a){return p(e,n,r,i,a),{result:t,affected:n}}function g(t,n,r){return e.concatenate(function(t,n,r){var i=n.resolvedPath;if(t.semanticDiagnosticsPerFile){var a=t.semanticDiagnosticsPerFile.get(i);if(a)return e.filterSemanticDiagnotics(a,t.compilerOptions)}var o=e.Debug.checkDefined(t.program).getBindAndCheckDiagnostics(n,r);return t.semanticDiagnosticsPerFile&&t.semanticDiagnosticsPerFile.set(i,o),e.filterSemanticDiagnotics(o,t.compilerOptions)}(t,n,r),e.Debug.checkDefined(t.program).getProgramDiagnostics(n))}function m(t,n){var r={},i=e.getOptionsNameMap().optionsNameMap;for(var a in t)e.hasProperty(t,a)&&(r[a]=_(i.get(a.toLowerCase()),t[a],n));return r.configFilePath&&(r.configFilePath=n(r.configFilePath)),r}function _(e,t,n){if(e)if("list"===e.type){var r=t;if(e.element.isFilePath&&r.length)return r.map(n)}else if(e.isFilePath)return n(t);return t}function v(t,n){return e.Debug.assert(!!t.length),t.map((function(e){var t=y(e,n);t.reportsUnnecessary=e.reportsUnnecessary,t.reportDeprecated=e.reportsDeprecated,t.source=e.source,t.skippedOn=e.skippedOn;var r=e.relatedInformation;return t.relatedInformation=r?r.length?r.map((function(e){return y(e,n)})):[]:void 0,t}))}function y(e,t){var n=e.file;return r(r({},e),{file:n?t(n.resolvedPath):void 0})}function b(t,n,r){t.affectedFilesPendingEmit||(t.affectedFilesPendingEmit=[]),t.affectedFilesPendingEmitKind||(t.affectedFilesPendingEmitKind=new e.Map);var i=t.affectedFilesPendingEmitKind.get(n);t.affectedFilesPendingEmit.push(n),t.affectedFilesPendingEmitKind.set(n,i||r),void 0===t.affectedFilesPendingEmitIndex&&(t.affectedFilesPendingEmitIndex=0)}function D(t,n){if(t){var r=new e.Map;for(var i in t)e.hasProperty(t,i)&&r.set(n(i),new e.Set(t[i].map(n)));return r}}function E(t,n){return{getState:e.notImplemented,backupState:e.noop,restoreState:e.noop,getProgram:r,getProgramOrUndefined:function(){return t.program},releaseProgram:function(){return t.program=void 0},getCompilerOptions:function(){return t.compilerOptions},getSourceFile:function(e){return r().getSourceFile(e)},getSourceFiles:function(){return r().getSourceFiles()},getOptionsDiagnostics:function(e){return r().getOptionsDiagnostics(e)},getGlobalDiagnostics:function(e){return r().getGlobalDiagnostics(e)},getConfigFileParsingDiagnostics:function(){return n},getSyntacticDiagnostics:function(e,t){return r().getSyntacticDiagnostics(e,t)},getDeclarationDiagnostics:function(e,t){return r().getDeclarationDiagnostics(e,t)},getSemanticDiagnostics:function(e,t){return r().getSemanticDiagnostics(e,t)},emit:function(e,t,n,i,a){return r().emit(e,t,n,i,a)},emitBuildInfo:function(e,t){return r().emitBuildInfo(e,t)},getAllDependencies:e.notImplemented,getCurrentDirectory:function(){return r().getCurrentDirectory()},close:e.noop};function r(){return e.Debug.checkDefined(t.program)}}!function(e){e[e.DtsOnly=0]="DtsOnly",e[e.Full=1]="Full"}(e.BuilderFileEmit||(e.BuilderFileEmit={})),function(e){e[e.SemanticDiagnosticsBuilderProgram=0]="SemanticDiagnosticsBuilderProgram",e[e.EmitAndSemanticDiagnosticsBuilderProgram=1]="EmitAndSemanticDiagnosticsBuilderProgram"}(t=e.BuilderProgramKind||(e.BuilderProgramKind={})),e.getBuilderCreationParameters=function(t,n,r,i,a,o){var s,u,c;return void 0===t?(e.Debug.assert(void 0===n),s=r,c=i,e.Debug.assert(!!c),u=c.getProgram()):e.isArray(t)?(c=i,u=e.createProgram({rootNames:t,options:n,host:r,oldProgram:c&&c.getProgramOrUndefined(),configFileParsingDiagnostics:a,projectReferences:o}),s=r):(u=t,s=n,c=r,a=i),{host:s,newProgram:u,oldProgram:c,configFileParsingDiagnostics:a||e.emptyArray}},e.createBuilderProgram=function(r,i){var s=i.newProgram,u=i.host,c=i.oldProgram,l=i.configFileParsingDiagnostics,d=c&&c.getState();if(d&&s===d.program&&l===s.getConfigFileParsingDiagnostics())return s=void 0,d=void 0,c;var _,y=e.createGetCanonicalFileName(u.useCaseSensitiveFileNames()),D=e.maybeBind(u,u.createHash),C=n(s,y,d);s.getProgramBuildInfo=function(){return function(t,n){if(!e.outFile(t.compilerOptions)){var r=e.Debug.checkDefined(t.program).getCurrentDirectory(),i=e.getDirectoryPath(e.getNormalizedAbsolutePath(e.getTsBuildInfoEmitOutputFilePath(t.compilerOptions),r)),a={};t.fileInfos.forEach((function(e,n){var r=t.currentAffectedFilesSignatures&&t.currentAffectedFilesSignatures.get(n);a[k(n)]=void 0===r?e:{version:e.version,signature:r,affectsGlobalScope:e.affectsGlobalScope}}));var o={fileInfos:a,options:m(t.compilerOptions,(function(t){return k(e.getNormalizedAbsolutePath(t,r))}))};if(t.referencedMap){for(var s={},u=0,c=e.arrayFrom(t.referencedMap.keys()).sort(e.compareStringsCaseSensitive);u1||47!==t.charCodeAt(0);if(a&&0!==t.search(/[a-zA-Z]:/)&&0===i.search(/[a-zA-z]\$\//)){if(-1===(r=t.indexOf(e.directorySeparator,r+1)))return!1;i=t.substring(n+i.length,r+1)}if(a&&0!==i.search(/users\//i))return!0;for(var o=r+1,s=2;s>0;s--)if(0===(o=t.indexOf(e.directorySeparator,o)+1))return!1;return!0}e.removeIgnoredPath=t,e.canWatchDirectory=n,e.createResolutionCache=function(r,i,a){var o,s,u,c=e.createMultiMap(),l=[],d=e.createMultiMap(),p=!1,f=[],h=[],g=[],m=e.memoize((function(){return r.getCurrentDirectory()})),_=r.getCachedDirectoryStructureHost(),v=new e.Map,y=e.createCacheWithRedirects(),b=e.createCacheWithRedirects(),D=e.createModuleResolutionCacheWithMaps(y,b,m(),r.getCanonicalFileName),E=new e.Map,C=e.createCacheWithRedirects(),S=[".ts",".tsx",".js",".jsx",".json"],x=new e.Map,k=new e.Map,T=i&&e.removeTrailingDirectorySeparator(e.getNormalizedAbsolutePath(i,m())),w=T&&r.toPath(T),A=void 0!==w?w.split(e.directorySeparator).length:0,O=new e.Map;return{startRecordingFilesWithChangedResolutions:function(){o=[]},finishRecordingFilesWithChangedResolutions:function(){var e=o;return o=void 0,e},startCachingPerDirectoryResolution:P,finishCachingPerDirectoryResolution:function(){u=void 0,P(),k.forEach((function(e,t){0===e.refCount&&(k.delete(t),e.watcher.close())})),p=!1},resolveModuleNames:function(t,n,r,i){return M({names:t,containingFile:n,redirectedReference:i,cache:v,perDirectoryCacheWithRedirects:y,loader:R,getResolutionWithResolvedFileName:N,shouldRetryResolution:function(t){return!t.resolvedModule||!e.resolutionExtensionIsTSOrJson(t.resolvedModule.extension)},reusedNames:r,logChanges:a})},getResolvedModuleWithFailedLookupLocationsFromCache:function(e,t){var n=v.get(r.toPath(t));return n&&n.get(e)},resolveTypeReferenceDirectives:function(t,n,r){return M({names:t,containingFile:n,redirectedReference:r,cache:E,perDirectoryCacheWithRedirects:C,loader:e.resolveTypeReferenceDirective,getResolutionWithResolvedFileName:I,shouldRetryResolution:function(e){return void 0===e.resolvedTypeReferenceDirective}})},removeResolutionsFromProjectReferenceRedirects:function(t){if(e.fileExtensionIs(t,".json")){var n=r.getCurrentProgram();if(n){var i=n.getResolvedProjectReferenceByPath(t);i&&i.commandLine.fileNames.forEach((function(e){return $(r.toPath(e))}))}}},removeResolutionsOfFile:$,hasChangedAutomaticTypeDirectiveNames:function(){return p},invalidateResolutionOfFile:function(t){$(t);var n=p;Q(d.get(t),e.returnTrue)&&p&&!n&&r.onChangedAutomaticTypeDirectiveNames()},invalidateResolutionsOfFailedLookupLocations:Z,setFilesWithInvalidatedNonRelativeUnresolvedImports:function(t){e.Debug.assert(u===t||void 0===u),u=t},createHasInvalidatedResolution:function(t){if(Z(),t)return s=void 0,e.returnTrue;var n=s;return s=void 0,function(e){return!!n&&n.has(e)||L(e)}},updateTypeRootsWatch:function(){var t=r.getCompilationSettings();if(t.types)te();else{var n=e.getEffectiveTypeRoots(t,{directoryExists:re,getCurrentDirectory:m});n?e.mutateMap(O,e.arrayToMap(n,(function(e){return r.toPath(e)})),{createNewValue:ne,onDeleteValue:e.closeFileWatcher}):te()}},closeTypeRootsWatch:te,clear:function(){e.clearMap(k,e.closeFileWatcherOf),x.clear(),c.clear(),te(),v.clear(),E.clear(),d.clear(),l.length=0,f.length=0,h.length=0,g.length=0,P(),p=!1}};function N(e){return e.resolvedModule}function I(e){return e.resolvedTypeReferenceDirective}function F(t,n){return!(void 0===t||n.length<=t.length)&&e.startsWith(n,t)&&n[t.length]===e.directorySeparator}function L(e){if(!u)return!1;var t=u.get(e);return!!t&&!!t.length}function P(){y.clear(),b.clear(),C.clear(),c.forEach(W),c.clear()}function R(t,n,i,a,o){var s,u=e.resolveModuleName(t,n,i,a,D,o);if(!r.getGlobalCache)return u;var c=r.getGlobalCache();if(!(void 0===c||e.isExternalModuleNameRelative(t)||u.resolvedModule&&e.extensionIsTS(u.resolvedModule.extension))){var l=e.loadModuleFromGlobalCache(e.Debug.checkDefined(r.globalCacheResolutionModuleName)(t),r.projectName,i,a,c),d=l.resolvedModule,p=l.failedLookupLocations;if(d)return u.resolvedModule=d,(s=u.failedLookupLocations).push.apply(s,p),u}return u}function M(t){var n,i=t.names,a=t.containingFile,s=t.redirectedReference,u=t.cache,c=t.perDirectoryCacheWithRedirects,l=t.loader,d=t.getResolutionWithResolvedFileName,p=t.shouldRetryResolution,f=t.reusedNames,h=t.logChanges,g=r.toPath(a),m=u.get(g)||u.set(g,new e.Map).get(g),_=e.getDirectoryPath(g),v=c.getOrCreateMapOfCacheRedirects(s),y=v.get(_);y||(y=new e.Map,v.set(_,y));for(var b=[],D=r.getCompilationSettings(),E=h&&L(g),C=r.getCurrentProgram(),S=C&&C.getResolvedProjectReferenceToRedirect(a),x=S?!s||s.sourceFile.path!==S.sourceFile.path:!!s,k=new e.Map,T=0,w=i;TA+1?{dir:i.slice(0,A+1).join(e.directorySeparator),dirPath:r.slice(0,A+1).join(e.directorySeparator)}:{dir:T,dirPath:w,nonRecursive:!1}}return U(e.getDirectoryPath(e.getNormalizedAbsolutePath(t,m())),e.getDirectoryPath(n))}function U(t,r){for(;e.pathContainsNodeModules(r);)t=e.getDirectoryPath(t),r=e.getDirectoryPath(r);if(e.isNodeModulesDirectory(r))return n(e.getDirectoryPath(r))?{dir:t,dirPath:r}:void 0;var i,a,o=!0;if(void 0!==w)for(;!F(r,w);){var s=e.getDirectoryPath(r);if(s===r)break;o=!1,i=r,a=t,r=s,t=e.getDirectoryPath(t)}return n(r)?{dir:a||t,dirPath:i||r,nonRecursive:o}:void 0}function V(t){return e.fileExtensionIsOneOf(t,S)}function z(t,n,i,a){if(n.refCount)n.refCount++,e.Debug.assertDefined(n.files);else{n.refCount=1,e.Debug.assert(0===e.length(n.files)),e.isExternalModuleNameRelative(t)?H(n):c.add(t,n);var o=a(n);o&&o.resolvedFileName&&d.add(r.toPath(o.resolvedFileName),n)}(n.files||(n.files=[])).push(i)}function H(t){e.Debug.assert(!!t.refCount);var n=t.failedLookupLocations;if(n.length){l.push(t);for(var i=!1,a=0,o=n;a1),x.set(p,g-1))),h===w?o=!0:G(h)}}o&&G(w)}}}function G(e){k.get(e).refCount--}function Y(e,t,n){return r.watchDirectoryOfFailedLookupLocation(e,(function(e){var n=r.toPath(e);_&&_.addOrDeleteFileOrDirectory(e,n),X(n,t===n)}),n?0:1)}function J(e,t,n){var r=e.get(t);r&&(r.forEach((function(e){return q(e,t,n)})),e.delete(t))}function $(e){J(v,e,N),J(E,e,I)}function Q(t,n){if(!t)return!1;for(var r=!1,i=0,a=t;i1&&n.sort(d),u.push.apply(u,n));var i=e.getDirectoryPath(t);if(i===t)return s=t,"break";s=t=i},l=e.getDirectoryPath(e.toPath(t,i,a));0!==o.size;){var f=c(l);if(l=s,"break"===f)break}if(o.size){var h=e.arrayFrom(o.values());h.length>1&&h.sort(d),u.push.apply(u,h)}return u}function h(t,n,r){for(var i in r)for(var a=0,o=r[i];a=l.length+d.length&&e.startsWith(n,l)&&e.endsWith(n,d)||!d&&n===e.removeTrailingDirectorySeparator(l)){var p=n.substr(l.length,n.length-d.length);return i.replace("*",p)}}else if(u===n||u===t)return i}}function g(t,n,r,i,a){var o=t.path,s=t.isRedirect,u=n.getCanonicalFileName,c=n.sourceDirectory;if(r.fileExists&&r.readFile){var l=function(t){var n,r=0,i=0,a=0;!function(e){e[e.BeforeNodeModules=0]="BeforeNodeModules",e[e.NodeModules=1]="NodeModules",e[e.Scope=2]="Scope",e[e.PackageContent=3]="PackageContent"}(n||(n={}));for(var o=0,s=0,u=0;s>=0;)switch(o=s,s=t.indexOf("/",o+1),u){case 0:t.indexOf(e.nodeModulesPathPart,o)===o&&(r=o,i=s,u=1);break;case 1:case 2:1===u&&"@"===t.charAt(o+1)?u=2:(a=s,u=3);break;case 3:u=t.indexOf(e.nodeModulesPathPart,o)===o?1:3}return u>1?{topLevelNodeModulesIndex:r,topLevelPackageNameIndex:i,packageRootIndex:a,fileNameIndex:o}:void 0}(o);if(l){var d=o,p=!1;if(!a)for(var f=l.packageRootIndex,g=void 0;;){var m=S(f),v=m.moduleFileToTry,y=m.packageRootPath;if(y){d=y,p=!0;break}if(g||(g=v),-1===(f=o.indexOf(e.directorySeparator,f+1))){d=x(g);break}}if(!s||p){var b=r.getGlobalTypingsCacheLocation&&r.getGlobalTypingsCacheLocation(),D=u(d.substring(0,l.topLevelNodeModulesIndex));if(e.startsWith(c,D)||b&&e.startsWith(u(b),D)){var E=d.substring(l.topLevelPackageNameIndex+1),C=e.getPackageNameFromTypesPackageName(E);return e.getEmitModuleResolutionKind(i)!==e.ModuleResolutionKind.NodeJs&&C===E?void 0:C}}}}function S(t){var n=o.substring(0,t),a=e.combinePaths(n,"package.json"),s=o;if(r.fileExists(a)){var c=JSON.parse(r.readFile(a)),l=c.typesVersions?e.getPackageJsonTypesVersionsPaths(c.typesVersions):void 0;if(l){var d=o.slice(n.length+1),p=h(e.removeFileExtension(d),_(d,0,i),l.paths);void 0!==p&&(s=e.combinePaths(n,p))}var f=c.typings||c.types||c.main;if(e.isString(f)){var g=e.toPath(f,n,u);if(e.removeFileExtension(g)===e.removeFileExtension(u(s)))return{packageRootPath:n,moduleFileToTry:s}}}return{moduleFileToTry:s}}function x(t){var n=e.removeFileExtension(t);return"/index"!==u(n.substring(l.fileNameIndex))||function(t,n){if(t.fileExists)for(var r=0,i=e.getSupportedExtensions({allowJs:!0},[{extension:"node",isMixedContent:!1},{extension:"json",isMixedContent:!1,scriptKind:6}]);r0?e.ExitStatus.DiagnosticsPresent_OutputsSkipped:p.length>0?e.ExitStatus.DiagnosticsPresent_OutputsGenerated:e.ExitStatus.Success}function f(t,n){return void 0===t&&(t=e.sys),{onWatchStatusChange:n||o(t),watchFile:e.maybeBind(t,t.watchFile)||e.returnNoopFileWatcher,watchDirectory:e.maybeBind(t,t.watchDirectory)||e.returnNoopFileWatcher,setTimeout:e.maybeBind(t,t.setTimeout)||e.noop,clearTimeout:e.maybeBind(t,t.clearTimeout)||e.noop}}function h(t,n){var r=e.memoize((function(){return e.getDirectoryPath(e.normalizePath(t.getExecutingFilePath()))}));return{useCaseSensitiveFileNames:function(){return t.useCaseSensitiveFileNames},getNewLine:function(){return t.newLine},getCurrentDirectory:e.memoize((function(){return t.getCurrentDirectory()})),getDefaultLibLocation:r,getDefaultLibFileName:function(t){return e.combinePaths(r(),e.getDefaultLibFileName(t))},fileExists:function(e){return t.fileExists(e)},readFile:function(e,n){return t.readFile(e,n)},directoryExists:function(e){return t.directoryExists(e)},getDirectories:function(e){return t.getDirectories(e)},readDirectory:function(e,n,r,i,a){return t.readDirectory(e,n,r,i,a)},realpath:e.maybeBind(t,t.realpath),getEnvironmentVariable:e.maybeBind(t,t.getEnvironmentVariable),trace:function(e){return t.write(e+t.newLine)},createDirectory:function(e){return t.createDirectory(e)},writeFile:function(e,n,r){return t.writeFile(e,n,r)},createHash:e.maybeBind(t,t.createHash),createProgram:n||e.createEmitAndSemanticDiagnosticsBuilderProgram}}function g(t,n,r,i){void 0===t&&(t=e.sys);var a=function(e){return t.write(e+t.newLine)},o=h(t,n);return e.copyProperties(o,f(t,i)),o.afterProgramCreate=function(n){var i=n.getCompilerOptions(),s=e.getNewLineCharacter(i,(function(){return t.newLine}));d(n,r,a,(function(t){return o.onWatchStatusChange(e.createCompilerDiagnostic(u(t),t),s,i,t)}))},o}function m(t,n,r){n(r),t.exit(e.ExitStatus.DiagnosticsPresent_OutputsSkipped)}e.createDiagnosticReporter=r,e.screenStartingMessageCodes=[e.Diagnostics.Starting_compilation_in_watch_mode.code,e.Diagnostics.File_change_detected_Starting_incremental_compilation.code],e.getLocaleTimeString=a,e.createWatchStatusReporter=o,e.parseConfigFileWithSystem=function(t,n,r,i,a){var o=i;o.onUnRecoverableConfigFileDiagnostic=function(e){return m(i,a,e)};var s=e.getParsedCommandLineOfConfigFile(t,n,o,void 0,r);return o.onUnRecoverableConfigFileDiagnostic=void 0,s},e.getErrorCountForSummary=s,e.getWatchErrorSummaryDiagnosticMessage=u,e.getErrorSummaryText=c,e.listFiles=l,e.emitFilesAndReportErrors=d,e.emitFilesAndReportErrorsAndGetExitStatus=p,e.noopFileWatcher={close:e.noop},e.returnNoopFileWatcher=function(){return e.noopFileWatcher},e.createWatchHost=f,e.WatchType={ConfigFile:"Config file",SourceFile:"Source file",MissingFile:"Missing file",WildcardDirectory:"Wild card directory",FailedLookupLocations:"Failed Lookup Locations",TypeRoots:"Type roots"},e.createWatchFactory=function(t,n){var r=t.trace?n.extendedDiagnostics?e.WatchLogLevel.Verbose:n.diagnostics?e.WatchLogLevel.TriggerOnly:e.WatchLogLevel.None:e.WatchLogLevel.None,i=r!==e.WatchLogLevel.None?function(e){return t.trace(e)}:e.noop,a=e.getWatchFactory(r,i);return a.writeLog=i,a},e.createCompilerHostFromProgramHost=function(t,n,r){void 0===r&&(r=t);var i=t.useCaseSensitiveFileNames(),a=e.memoize((function(){return t.getNewLine()}));return{getSourceFile:function(r,i,a){var o;try{e.performance.mark("beforeIORead"),o=t.readFile(r,n().charset),e.performance.mark("afterIORead"),e.performance.measure("I/O Read","beforeIORead","afterIORead")}catch(e){a&&a(e.message),o=""}return void 0!==o?e.createSourceFile(r,o,i):void 0},getDefaultLibLocation:e.maybeBind(t,t.getDefaultLibLocation),getDefaultLibFileName:function(e){return t.getDefaultLibFileName(e)},writeFile:function(n,r,i,a){try{e.performance.mark("beforeIOWrite"),e.writeFileEnsuringDirectories(n,r,i,(function(e,n,r){return t.writeFile(e,n,r)}),(function(e){return t.createDirectory(e)}),(function(e){return t.directoryExists(e)})),e.performance.mark("afterIOWrite"),e.performance.measure("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){a&&a(e.message)}},getCurrentDirectory:e.memoize((function(){return t.getCurrentDirectory()})),useCaseSensitiveFileNames:function(){return i},getCanonicalFileName:e.createGetCanonicalFileName(i),getNewLine:function(){return e.getNewLineCharacter(n(),a)},fileExists:function(e){return t.fileExists(e)},readFile:function(e){return t.readFile(e)},trace:e.maybeBind(t,t.trace),directoryExists:e.maybeBind(r,r.directoryExists),getDirectories:e.maybeBind(r,r.getDirectories),realpath:e.maybeBind(t,t.realpath),getEnvironmentVariable:e.maybeBind(t,t.getEnvironmentVariable)||function(){return""},createHash:e.maybeBind(t,t.createHash),readDirectory:e.maybeBind(t,t.readDirectory)}},e.setGetSourceFileAsHashVersioned=function(n,r){var i=n.getSourceFile,a=e.maybeBind(r,r.createHash)||e.generateDjb2Hash;n.getSourceFile=function(){for(var e=[],r=0;re?t:e}function c(t){return e.fileExtensionIs(t,".d.ts")}function l(e){return!!e&&!!e.buildOrder}function d(e){return l(e)?e.buildOrder:e}function p(t,n){return function(r){var i=n?"["+e.formatColorAndReset(e.getLocaleTimeString(t),e.ForegroundColorEscapeSequences.Grey)+"] ":e.getLocaleTimeString(t)+" - ";i+=""+e.flattenDiagnosticMessageText(r.messageText,t.newLine)+(t.newLine+t.newLine),t.write(i)}}function f(t,n,r,i){var a=e.createProgramHost(t,n);return a.getModifiedTime=t.getModifiedTime?function(e){return t.getModifiedTime(e)}:e.returnUndefined,a.setModifiedTime=t.setModifiedTime?function(e,n){return t.setModifiedTime(e,n)}:e.noop,a.deleteFile=t.deleteFile?function(e){return t.deleteFile(e)}:e.noop,a.reportDiagnostic=r||e.createDiagnosticReporter(t),a.reportSolutionBuilderStatus=i||p(t),a.now=e.maybeBind(t,t.now),a}function h(t,n,r,i,a){var o,s,u=n,c=n,l=u.getCurrentDirectory(),d=e.createGetCanonicalFileName(u.useCaseSensitiveFileNames()),p=(o=i,s={},e.commonOptionsWithBuild.forEach((function(t){e.hasProperty(o,t.name)&&(s[t.name]=o[t.name])})),s),f=e.createCompilerHostFromProgramHost(u,(function(){return C.projectCompilerOptions}));e.setGetSourceFileAsHashVersioned(f,u),f.getParsedCommandLine=function(e){return v(C,e,m(C,e))},f.resolveModuleNames=e.maybeBind(u,u.resolveModuleNames),f.resolveTypeReferenceDirectives=e.maybeBind(u,u.resolveTypeReferenceDirectives);var h=f.resolveModuleNames?void 0:e.createModuleResolutionCache(l,d);if(!f.resolveModuleNames){var g=function(t,n,r){return e.resolveModuleName(t,n,C.projectCompilerOptions,f,h,r).resolvedModule};f.resolveModuleNames=function(t,n,r,i){return e.loadWithLocalCache(e.Debug.checkEachDefined(t),n,i,g)}}var _=e.createWatchFactory(c,i),y=_.watchFile,b=_.watchFilePath,D=_.watchDirectory,E=_.writeLog,C={host:u,hostWithWatch:c,currentDirectory:l,getCanonicalFileName:d,parseConfigFileHost:e.parseConfigHostFromCompilerHostLike(u),writeFileName:u.trace?function(e){return u.trace(e)}:void 0,options:i,baseCompilerOptions:p,rootNames:r,baseWatchOptions:a,resolvedConfigFilePaths:new e.Map,configFileCache:new e.Map,projectStatus:new e.Map,buildInfoChecked:new e.Map,extendedConfigCache:new e.Map,builderPrograms:new e.Map,diagnostics:new e.Map,projectPendingBuild:new e.Map,projectErrorsReported:new e.Map,compilerHost:f,moduleResolutionCache:h,buildOrder:void 0,readFileWithCache:function(e){return u.readFile(e)},projectCompilerOptions:p,cache:void 0,allProjectBuildPending:!0,needsSummary:!0,watchAllProjectsPending:t,currentInvalidatedProject:void 0,watch:t,allWatchedWildcardDirectories:new e.Map,allWatchedInputFiles:new e.Map,allWatchedConfigFiles:new e.Map,timerToBuildInvalidatedProject:void 0,reportFileChangeDetected:!1,watchFile:y,watchFilePath:b,watchDirectory:D,writeLog:E};return C}function g(t,n){return e.toPath(n,t.currentDirectory,t.getCanonicalFileName)}function m(e,t){var n=e.resolvedConfigFilePaths,r=n.get(t);if(void 0!==r)return r;var i=g(e,t);return n.set(t,i),i}function _(e){return!!e.options}function v(t,n,r){var i,a=t.configFileCache,o=a.get(r);if(o)return _(o)?o:void 0;var s,u=t.parseConfigFileHost,c=t.baseCompilerOptions,l=t.baseWatchOptions,d=t.extendedConfigCache,p=t.host;return p.getParsedCommandLine?(s=p.getParsedCommandLine(n))||(i=e.createCompilerDiagnostic(e.Diagnostics.File_0_not_found,n)):(u.onUnRecoverableConfigFileDiagnostic=function(e){return i=e},s=e.getParsedCommandLineOfConfigFile(n,c,u,d,l),u.onUnRecoverableConfigFileDiagnostic=e.noop),a.set(r,s||i),s}function y(t,n){return e.resolveConfigFileProjectName(e.resolvePath(t.currentDirectory,n))}function b(t,n){for(var r,i,a=new e.Map,o=new e.Map,s=[],u=0,c=n;u0);var o={sourceFile:r.options.configFile,commandLine:r};i.directoryToModuleNameMap.setOwnMap(i.directoryToModuleNameMap.getOrCreateMapOfCacheRedirects(o)),i.moduleNameToDirectoryMap.setOwnMap(i.moduleNameToDirectoryMap.getOrCreateMapOfCacheRedirects(o))}i.directoryToModuleNameMap.setOwnOptions(r.options),i.moduleNameToDirectoryMap.setOwnOptions(r.options)}}(l,d,h),b=t.createProgram(h.fileNames,h.options,r,function(t,n,r){var i=t.options,a=t.builderPrograms,o=t.compilerHost;if(!i.force)return a.get(n)||e.readBuilderProgram(r.options,o)}(l,p,h),e.getConfigFileParsingDiagnostics(h),h.projectReferences),l.watch&&l.builderPrograms.set(p,b),C++}function A(e,t,n){var r;e.length?(r=P(l,p,b,h,e,t,n),D=r.buildResult,C=r.step):C++}function N(r){e.Debug.assertIsDefined(b),A(t(b.getConfigFileParsingDiagnostics(),b.getOptionsDiagnostics(r),b.getGlobalDiagnostics(r),b.getSyntacticDiagnostics(void 0,r)),n.SyntaxErrors,"Syntactic")}function I(t){A(e.Debug.checkDefined(b).getSemanticDiagnostics(void 0,t),n.TypeErrors,"Semantic")}function R(t,r,o){var s,d;e.Debug.assertIsDefined(b),e.Debug.assert(C===i.Emit),b.backupState();var f=[],m=e.emitFilesAndReportErrors(b,(function(e){return(d||(d=[])).push(e)}),void 0,void 0,(function(e,t,n){return f.push({name:e,text:t,writeByteOrderMark:n})}),r,!1,o).emitResult;if(d)return b.restoreState(),s=P(l,p,b,h,d,n.DeclarationEmitErrors,"Declaration file"),D=s.buildResult,C=s.step,{emitSkipped:!0,diagnostics:m.diagnostics};var _=l.host,v=l.compilerHost,y=n.DeclarationOutputUnchanged,E=a,S=!1,x=e.createDiagnosticCollection(),k=new e.Map;return f.forEach((function(r){var i,a=r.name,o=r.text,s=r.writeByteOrderMark;!S&&c(a)&&(_.fileExists(a)&&l.readFileWithCache(a)===o?i=_.getModifiedTime(a):(y&=~n.DeclarationOutputUnchanged,S=!0)),k.set(g(l,a),a),e.writeFile(t?{writeFile:t}:v,x,a,o,s),void 0!==i&&(E=u(i,E))})),j(x,k,E,S,f.length?f[0].name:e.getFirstProjectOutput(h,!_.useCaseSensitiveFileNames()),y),m}function M(r,a){e.Debug.assertIsDefined(b),e.Debug.assert(C===i.EmitBuildInfo);var o=b.emitBuildInfo(r,a);return o.diagnostics.length&&(ee(l,o.diagnostics),l.diagnostics.set(p,t(l.diagnostics.get(p),o.diagnostics)),D=n.EmitErrors&D),o.emittedFiles&&l.writeFileName&&o.emittedFiles.forEach((function(e){return F(l,h,e)})),L(l,b,h),C=i.QueueReferencingProjects,o}function j(t,r,a,s,u,c){var d,f=t.getDiagnostics();if(f.length)return d=P(l,p,b,h,f,n.EmitErrors,"Emit"),D=d.buildResult,C=d.step,f;l.writeFileName&&r.forEach((function(e){return F(l,h,e)}));var g=B(l,h,a,e.Diagnostics.Updating_unchanged_output_timestamps_of_project_0,r);return l.diagnostics.delete(p),l.projectStatus.set(p,{type:e.UpToDateStatusType.UpToDate,newestDeclarationFileContentChangedTime:s?o:g,oldestOutputFileName:u}),L(l,b,h),C=i.QueueReferencingProjects,D=c,f}function V(t,o){if(e.Debug.assert(s===r.UpdateBundle),l.options.dry)return X(l,e.Diagnostics.A_non_dry_build_would_update_output_of_project_0,d),D=n.Success,void(C=i.QueueReferencingProjects);l.options.verbose&&X(l,e.Diagnostics.Updating_output_of_project_0,d);var u=l.compilerHost;l.projectCompilerOptions=h.options;var c=e.emitUsingBuildInfo(h,u,(function(e){var t=y(l,e.path);return v(l,t,m(l,t))}),o);if(e.isString(c))return X(l,e.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1,d,Q(l,c)),C=i.BuildInvalidatedProjectOfBundle,E=O(r.Build,l,d,p,f,h,_);e.Debug.assert(!!c.length);var b=e.createDiagnosticCollection(),S=new e.Map;return c.forEach((function(n){var r=n.name,i=n.text,a=n.writeByteOrderMark;S.set(g(l,r),r),e.writeFile(t?{writeFile:t}:u,b,r,i,a)})),{emitSkipped:!1,diagnostics:j(b,S,a,!1,c[0].name,n.DeclarationOutputUnchanged)}}function z(t,n,r,a){for(;C<=t&&Co)}}}function N(t,n,r){var i=t.options;return!(n.type===e.UpToDateStatusType.OutOfDateWithPrepend&&!i.force)||0===r.fileNames.length||!!e.getConfigFileParsingDiagnostics(r).length||!e.isIncrementalCompilation(r.options)}function I(t,n,i){if(t.projectPendingBuild.size&&!l(n)){if(t.currentInvalidatedProject)return e.arrayIsEqualTo(t.currentInvalidatedProject.buildOrder,n)?t.currentInvalidatedProject:void 0;for(var a=t.options,o=t.projectPendingBuild,s=0;ss&&(i=f,s=h)}if(!n.fileNames.length&&!e.canJsonReportNoInputFiles(n.raw))return{type:e.UpToDateStatusType.ContainerOnly};for(var g,_=e.getAllProjectOutputs(n,!l.useCaseSensitiveFileNames()),y="(none)",b=o,D="(none)",E=a,C=a,S=!1,x=0,k=_;xE&&(E=w,D=T),c(T)&&(C=u(C,l.getModifiedTime(T)||e.missingFileModifiedTime))}var A,O=!1,N=!1;if(n.projectReferences){t.projectStatus.set(r,{type:e.UpToDateStatusType.ComputingUpstream});for(var I=0,F=n.projectReferences;I=0},t.findArgument=function(t){var n=e.sys.args.indexOf(t);return n>=0&&n214)return 2;if(46===e.charCodeAt(0))return 3;if(95===e.charCodeAt(0))return 4;if(t){var n=/^@([^/]+)\/([^/]+)$/.exec(e);if(n){var r=i(n[1],!1);if(0!==r)return{name:n[1],isScopeName:!0,result:r};var a=i(n[2],!1);return 0!==a?{name:n[2],isScopeName:!1,result:a}:0}}return encodeURIComponent(e)!==e?5:0}function a(t,n,r,i){var a=i?"Scope":"Package";switch(n){case 1:return"'"+t+"':: "+a+" name '"+r+"' cannot be empty";case 2:return"'"+t+"':: "+a+" name '"+r+"' should be less than 214 characters";case 3:return"'"+t+"':: "+a+" name '"+r+"' cannot start with '.'";case 4:return"'"+t+"':: "+a+" name '"+r+"' cannot start with '_'";case 5:return"'"+t+"':: "+a+" name '"+r+"' contains non URI safe characters";case 0:return e.Debug.fail();default:throw e.Debug.assertNever(n)}}t.isTypingUpToDate=n,t.nodeCoreModuleList=["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","http2","inspector","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"],t.nodeCoreModules=new e.Set(t.nodeCoreModuleList),t.nonRelativeModuleNameForTypingCache=r,t.loadSafeList=function(t,n){var r=e.readConfigFile(n,(function(e){return t.readFile(e)}));return new e.Map(e.getEntries(r.config))},t.loadTypesMap=function(t,n){var r=e.readConfigFile(n,(function(e){return t.readFile(e)}));if(r.config)return new e.Map(e.getEntries(r.config.simpleMap))},t.discoverTypings=function(t,i,a,o,s,u,c,l,d){if(!c||!c.enable)return{cachedTypingPaths:[],newTypingNames:[],filesToWatch:[]};var p=new e.Map;a=e.mapDefined(a,(function(t){var n=e.normalizePath(t);if(e.hasJSFileExtension(n))return n}));var f=[];c.include&&C(c.include,"Explicitly included types");var h=c.exclude||[],g=new e.Set(a.map(e.getDirectoryPath));g.add(o),g.forEach((function(t){S(e.combinePaths(t,"package.json"),f),S(e.combinePaths(t,"bower.json"),f),x(e.combinePaths(t,"bower_components"),f),x(e.combinePaths(t,"node_modules"),f)})),c.disableFilenameBasedTypeAcquisition||function(t){var n=e.mapDefined(t,(function(t){if(e.hasJSFileExtension(t)){var n=e.removeFileExtension(e.getBaseFileName(t.toLowerCase())),r=e.removeMinAndVersionNumbers(n);return s.get(r)}}));n.length&&C(n,"Inferred typings from file names"),e.some(t,(function(t){return e.fileExtensionIs(t,".jsx")}))&&(i&&i("Inferred 'react' typings due to presence of '.jsx' extension"),E("react"))}(a),l&&C(e.deduplicate(l.map(r),e.equateStringsCaseSensitive,e.compareStringsCaseSensitive),"Inferred typings from unresolved imports"),u.forEach((function(e,t){var r=d.get(t);p.has(t)&&void 0===p.get(t)&&void 0!==r&&n(e,r)&&p.set(t,e.typingLocation)}));for(var m=0,_=h;m<_.length;m++){var v=_[m];p.delete(v)&&i&&i("Typing for "+v+" is in exclude list, will be ignored.")}var y=[],b=[];p.forEach((function(e,t){void 0!==e?b.push(e):y.push(t)}));var D={cachedTypingPaths:b,newTypingNames:y,filesToWatch:f};return i&&i("Result: "+JSON.stringify(D)),D;function E(e){p.has(e)||p.set(e,void 0)}function C(t,n){i&&i(n+": "+JSON.stringify(t)),e.forEach(t,E)}function S(n,r){if(t.fileExists(n)){r.push(n);var i=e.readConfigFile(n,(function(e){return t.readFile(e)})).config;C(e.flatMap([i.dependencies,i.devDependencies,i.optionalDependencies,i.peerDependencies],e.getOwnKeys),"Typing names in '"+n+"' dependencies")}}function x(n,r){if(r.push(n),t.directoryExists(n)){var a=t.readDirectory(n,[".json"],void 0,void 0,2);i&&i("Searching for typing names in "+n+"; all files: "+JSON.stringify(a));for(var o=[],s=0,u=a;s=n.end}function v(e,t,n,r){return Math.max(e,n)t)break;var c=u.getEnd();if(tt.end||e.pos===t.end)&&q(e,r)?n(e):void 0}))}(n)}function R(t,n,r,i){var a=function a(o){if(M(o)&&1!==o.kind)return o;var s=o.getChildren(n),u=e.binarySearchKey(s,t,(function(e,t){return t}),(function(e,n){return t=s[e-1].end?0:1:-1}));if(u>=0&&s[u]){var c=s[u];if(t=t||!q(c,n)||U(c)){var l=j(s,u,n);return l&&B(l,n)}return a(c)}}e.Debug.assert(void 0!==r||297===o.kind||1===o.kind||e.isJSDocCommentContainingNode(o));var d=j(s,s.length,n);return d&&B(d,n)}(r||n);return e.Debug.assert(!(a&&U(a))),a}function M(t){return e.isToken(t)&&!U(t)}function B(e,t){if(M(e))return e;var n=e.getChildren(t);if(0===n.length)return e;var r=j(n,n.length,t);return r&&B(r,t)}function j(t,n,r){for(var i=n-1;i>=0;i--)if(U(t[i]))e.Debug.assert(i>0,"`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");else if(q(t[i],r))return t[i]}function U(t){return e.isJsxText(t)&&t.containsOnlyTriviaWhiteSpaces}function V(e,t,n){for(var r=e.kind,i=0;;){var a=R(e.getFullStart(),n);if(!a)return;if((e=a).kind===t){if(0===i)return e;i--}else e.kind===r&&i++}}function z(e,t,n){return t?e.getNonNullableType():n?e.getNonOptionalType():e}function H(t,n,r){var i=r.getTypeAtLocation(t);return e.isOptionalChain(t.parent)&&(i=z(i,e.isOptionalChainRoot(t.parent),!0)),(e.isNewExpression(t.parent)?i.getConstructSignatures():i.getCallSignatures()).filter((function(e){return!!e.typeParameters&&e.typeParameters.length>=n}))}function W(t,n){for(var r=t,i=0,a=0;r;){switch(r.kind){case 29:if((r=R(r.getFullStart(),n))&&28===r.kind&&(r=R(r.getFullStart(),n)),!r||!e.isIdentifier(r))return;if(!i)return e.isDeclarationName(r)?void 0:{called:r,nTypeArguments:a};i--;break;case 49:i=3;break;case 48:i=2;break;case 31:i++;break;case 19:if(!(r=V(r,18,n)))return;break;case 21:if(!(r=V(r,20,n)))return;break;case 23:if(!(r=V(r,22,n)))return;break;case 27:a++;break;case 38:case 78:case 10:case 8:case 9:case 109:case 94:case 111:case 93:case 138:case 24:case 51:case 57:case 58:break;default:if(e.isTypeNode(r))break;return}r=R(r.getFullStart(),n)}}function K(t,n,r){return e.formatting.getRangeOfEnclosingComment(t,n,void 0,r)}function q(e,t){return 1===e.kind?!!e.jsDoc:0!==e.getWidth(t)}function G(e,t,n){var r=K(e,t,void 0);return!!r&&n===h.test(e.text.substring(r.pos,r.end))}function Y(t,n,r){return e.createTextSpanFromBounds(t.getStart(n),(r||t).getEnd())}function J(t){if(!t.isUnterminated)return e.createTextSpanFromBounds(t.getStart()+1,t.getEnd()-1)}function $(e,t){return{span:e,newText:t}}function Q(e){return 149===e.kind}function X(t,n){return{fileExists:function(e){return t.fileExists(e)},getCurrentDirectory:function(){return n.getCurrentDirectory()},readFile:e.maybeBind(n,n.readFile),useCaseSensitiveFileNames:e.maybeBind(n,n.useCaseSensitiveFileNames),getSymlinkCache:e.maybeBind(n,n.getSymlinkCache)||t.getSymlinkCache,getGlobalTypingsCacheLocation:e.maybeBind(n,n.getGlobalTypingsCacheLocation),getSourceFiles:function(){return t.getSourceFiles()},redirectTargetsMap:t.redirectTargetsMap,getProjectReferenceRedirect:function(e){return t.getProjectReferenceRedirect(e)},isSourceOfProjectReferenceRedirect:function(e){return t.isSourceOfProjectReferenceRedirect(e)}}}function Z(e,t){return r(r({},X(e,t)),{getCommonSourceDirectory:function(){return e.getCommonSourceDirectory()}})}function ee(t,n,r,i,a){return e.factory.createImportDeclaration(void 0,void 0,t||n?e.factory.createImportClause(!!a,t,n&&n.length?e.factory.createNamedImports(n):void 0):void 0,"string"==typeof r?te(r,i):r)}function te(t,n){return e.factory.createStringLiteral(t,0===n)}function ne(t,n){return e.isStringDoubleQuoted(t,n)?1:0}function re(t,n){if(n.quotePreference&&"auto"!==n.quotePreference)return"single"===n.quotePreference?0:1;var r=t.imports&&e.find(t.imports,(function(t){return e.isStringLiteral(t)&&!e.nodeIsSynthesized(t.parent)}));return r?ne(r,t):1}function ie(t){return"default"!==t.escapedName?t.escapedName:e.firstDefined(t.declarations,(function(t){var n=e.getNameOfDeclaration(t);return n&&78===n.kind?n.escapedText:void 0}))}function ae(t,n,r,i){var a=new e.Map;return function t(o){if(96&o.flags&&e.addToSeen(a,e.getSymbolId(o)))return e.firstDefined(o.declarations,(function(a){return e.firstDefined(e.getAllSuperTypeNodes(a),(function(a){var o=r.getTypeAtLocation(a),s=o&&o.symbol&&r.getPropertyOfType(o,n);return o&&s&&(e.firstDefined(r.getRootSymbols(s),i)||t(o.symbol))}))}))}(t)}function oe(t,n,r){return e.textSpanContainsPosition(t,n.getStart(r))&&n.getEnd()<=e.textSpanEnd(t)}function se(e,t){return!!e&&!!t&&e.start===t.start&&e.length===t.length}function ue(e){return e.declarations&&e.declarations.length>0&&160===e.declarations[0].kind}e.getLineStartPositionForPosition=function(t,n){return e.getLineStarts(n)[n.getLineAndCharacterOfPosition(t).line]},e.rangeContainsRange=g,e.rangeContainsRangeExclusive=function(e,t){return m(e,t.pos)&&m(e,t.end)},e.rangeContainsPosition=function(e,t){return e.pos<=t&&t<=e.end},e.rangeContainsPositionExclusive=m,e.startEndContainsRange=_,e.rangeContainsStartEnd=function(e,t,n){return e.pos<=t&&e.end>=n},e.rangeOverlapsWithStartEnd=function(e,t,n){return v(e.pos,e.end,t,n)},e.nodeOverlapsWithStartEnd=function(e,t,n,r){return v(e.getStart(t),e.end,n,r)},e.startEndOverlapsWithStartEnd=v,e.positionBelongsToNode=function(t,n,r){return e.Debug.assert(t.pos<=n),nr.getStart(t)&&nr.getStart(t)},e.isInJSXText=function(t,n){var r=F(t,n);return!!e.isJsxText(r)||!(18!==r.kind||!e.isJsxExpression(r.parent)||!e.isJsxElement(r.parent.parent))||!(29!==r.kind||!e.isJsxOpeningLikeElement(r.parent)||!e.isJsxElement(r.parent.parent))},e.isInsideJsxElement=function(e,t){return function(n){for(;n;)if(n.kind>=274&&n.kind<=283||11===n.kind||29===n.kind||31===n.kind||78===n.kind||19===n.kind||18===n.kind||43===n.kind)n=n.parent;else{if(273!==n.kind)return!1;if(t>n.getStart(e))return!0;n=n.parent}return!1}(F(e,t))},e.findPrecedingMatchingToken=V,e.removeOptionality=z,e.isPossiblyTypeArgumentPosition=function t(n,r,i){var a=W(n,r);return void 0!==a&&(e.isPartOfTypeNode(a.called)||0!==H(a.called,a.nTypeArguments,i).length||t(a.called,r,i))},e.getPossibleGenericSignatures=H,e.getPossibleTypeArgumentsInfo=W,e.isInComment=K,e.hasDocComment=function(t,n){var r=F(t,n);return!!e.findAncestor(r,e.isJSDoc)},e.getNodeModifiers=function(t){var n=e.isDeclaration(t)?e.getCombinedNodeFlagsAlwaysIncludeJSDoc(t):0,r=[];return 8&n&&r.push("private"),16&n&&r.push("protected"),4&n&&r.push("public"),32&n&&r.push("static"),128&n&&r.push("abstract"),1&n&&r.push("export"),8192&n&&r.push("deprecated"),8388608&t.flags&&r.push("declare"),266===t.kind&&r.push("export"),r.length>0?r.join(","):""},e.getTypeArgumentOrTypeParameterList=function(t){return 173===t.kind||203===t.kind?t.typeArguments:e.isFunctionLike(t)||252===t.kind||253===t.kind?t.typeParameters:void 0},e.isComment=function(e){return 2===e||3===e},e.isStringOrRegularExpressionOrTemplateLiteral=function(t){return!(10!==t&&13!==t&&!e.isTemplateLiteralKind(t))},e.isPunctuation=function(e){return 18<=e&&e<=77},e.isInsideTemplateLiteral=function(t,n,r){return e.isTemplateLiteralKind(t.kind)&&t.getStart(r)=2||!!e.noEmit},e.createModuleSpecifierResolutionHost=X,e.getModuleSpecifierResolverHost=Z,e.makeImportIfNecessary=function(e,t,n,r){return e||t&&t.length?ee(e,t,n,r):void 0},e.makeImport=ee,e.makeStringLiteral=te,function(e){e[e.Single=0]="Single",e[e.Double=1]="Double"}(e.QuotePreference||(e.QuotePreference={})),e.quotePreferenceFromString=ne,e.getQuotePreference=re,e.getQuoteFromPreference=function(t){switch(t){case 0:return"'";case 1:return'"';default:return e.Debug.assertNever(t)}},e.symbolNameNoDefault=function(t){var n=ie(t);return void 0===n?void 0:e.unescapeLeadingUnderscores(n)},e.symbolEscapedNameNoDefault=ie,e.isObjectBindingElementWithoutPropertyName=function(t){return e.isBindingElement(t)&&e.isObjectBindingPattern(t.parent)&&e.isIdentifier(t.name)&&!t.propertyName},e.getPropertySymbolFromBindingElement=function(e,t){var n=e.getTypeAtLocation(t.parent);return n&&e.getPropertyOfType(n,t.name.text)},e.getPropertySymbolsFromBaseTypes=ae,e.isMemberSymbolInBaseType=function(e,t){return ae(e.parent,e.name,t,(function(e){return!0}))||!1},e.getParentNodeInSpan=function(t,n,r){if(t)for(;t.parent;){if(e.isSourceFile(t.parent)||!oe(r,t.parent,n))return t;t=t.parent}},e.findModifier=function(t,n){return t.modifiers&&e.find(t.modifiers,(function(e){return e.kind===n}))},e.insertImports=function(t,n,r,i){var a=232===(e.isArray(r)?r[0]:r).kind?e.isRequireVariableStatement:e.isAnyImportSyntax,o=e.filter(n.statements,a),s=e.isArray(r)?e.stableSort(r,e.OrganizeImports.compareImportsOrRequireStatements):[r];if(o.length)if(o&&e.OrganizeImports.importsAreSorted(o))for(var u=0,c=s;ua&&n&&"..."!==n&&(e.isWhiteSpaceLike(n.charCodeAt(n.length-1))||t.push(de(" ",e.SymbolDisplayPartKind.space)),t.push(de("...",e.SymbolDisplayPartKind.punctuation))),t},writeKeyword:function(t){return u(t,e.SymbolDisplayPartKind.keyword)},writeOperator:function(t){return u(t,e.SymbolDisplayPartKind.operator)},writePunctuation:function(t){return u(t,e.SymbolDisplayPartKind.punctuation)},writeTrailingSemicolon:function(t){return u(t,e.SymbolDisplayPartKind.punctuation)},writeSpace:function(t){return u(t,e.SymbolDisplayPartKind.space)},writeStringLiteral:function(t){return u(t,e.SymbolDisplayPartKind.stringLiteral)},writeParameter:function(t){return u(t,e.SymbolDisplayPartKind.parameterName)},writeProperty:function(t){return u(t,e.SymbolDisplayPartKind.propertyName)},writeLiteral:function(t){return u(t,e.SymbolDisplayPartKind.stringLiteral)},writeSymbol:function(e,n){i>a||(s(),i+=e.length,t.push(le(e,n)))},writeLine:function(){i>a||(i+=1,t.push(he()),n=!0)},write:o,writeComment:o,getText:function(){return""},getTextPos:function(){return 0},getColumn:function(){return 0},getLine:function(){return 0},isAtStartOfLine:function(){return!1},hasTrailingWhitespace:function(){return!1},hasTrailingComment:function(){return!1},rawWrite:e.notImplemented,getIndent:function(){return r},increaseIndent:function(){r++},decreaseIndent:function(){r--},clear:c,trackSymbol:e.noop,reportInaccessibleThisError:e.noop,reportInaccessibleUniqueSymbolError:e.noop,reportPrivateInBaseOfClassExpression:e.noop};function s(){if(!(i>a)&&n){var o=e.getIndentString(r);o&&(i+=o.length,t.push(de(o,e.SymbolDisplayPartKind.space))),n=!1}}function u(e,n){i>a||(s(),i+=e.length,t.push(de(e,n)))}function c(){t=[],n=!0,r=0,i=0}}();function le(t,n){return de(t,function(t){var n=t.flags;return 3&n?ue(t)?e.SymbolDisplayPartKind.parameterName:e.SymbolDisplayPartKind.localName:4&n||32768&n||65536&n?e.SymbolDisplayPartKind.propertyName:8&n?e.SymbolDisplayPartKind.enumMemberName:16&n?e.SymbolDisplayPartKind.functionName:32&n?e.SymbolDisplayPartKind.className:64&n?e.SymbolDisplayPartKind.interfaceName:384&n?e.SymbolDisplayPartKind.enumName:1536&n?e.SymbolDisplayPartKind.moduleName:8192&n?e.SymbolDisplayPartKind.methodName:262144&n?e.SymbolDisplayPartKind.typeParameterName:524288&n||2097152&n?e.SymbolDisplayPartKind.aliasName:e.SymbolDisplayPartKind.text}(n))}function de(t,n){return{text:t,kind:e.SymbolDisplayPartKind[n]}}function pe(t){return de(e.tokenToString(t),e.SymbolDisplayPartKind.keyword)}function fe(t){return de(t,e.SymbolDisplayPartKind.text)}function he(){return de("\n",e.SymbolDisplayPartKind.lineBreak)}function ge(e){try{return e(ce),ce.displayParts()}finally{ce.clear()}}function me(e){return 0!=(33554432&e.flags)}function _e(e){return 0!=(2097152&e.flags)}function ve(e,t){void 0===t&&(t=!0);var n=e&&be(e);return n&&!t&&De(n),n}function ye(t,n,r){var i=r(t);return i?e.setOriginalNode(i,t):i=be(t,r),i&&!n&&De(i),i}function be(t,n){var r=n?e.visitEachChild(t,(function(e){return ye(e,!0,n)}),e.nullTransformationContext):e.visitEachChild(t,ve,e.nullTransformationContext);if(r===t){var i=e.isStringLiteral(t)?e.setOriginalNode(e.factory.createStringLiteralFromNode(t),t):e.isNumericLiteral(t)?e.setOriginalNode(e.factory.createNumericLiteral(t.text,t.numericLiteralFlags),t):e.factory.cloneNode(t);return e.setTextRange(i,t)}return r.parent=void 0,r}function De(e){Ee(e),Ce(e)}function Ee(e){Se(e,512,xe)}function Ce(t){Se(t,1024,e.getLastChild)}function Se(t,n,r){e.addEmitFlags(t,n);var i=r(t);i&&Se(i,n,r)}function xe(e){return e.forEachChild((function(e){return e}))}function ke(t,n,r,i,a){e.forEachLeadingCommentRange(r.text,t.pos,Ae(n,r,i,a,e.addSyntheticLeadingComment))}function Te(t,n,r,i,a){e.forEachTrailingCommentRange(r.text,t.end,Ae(n,r,i,a,e.addSyntheticTrailingComment))}function we(t,n,r,i,a){e.forEachTrailingCommentRange(r.text,t.pos,Ae(n,r,i,a,e.addSyntheticLeadingComment))}function Ae(e,t,n,r,i){return function(a,o,s,u){3===s?(a+=2,o-=2):a+=2,i(e,n||s,t.text.slice(a,o),void 0!==r?r:u)}}function Oe(t,n){if(e.startsWith(t,n))return 0;var r=t.indexOf(" "+n);return-1===r&&(r=t.indexOf("."+n)),-1===r&&(r=t.indexOf('"'+n)),-1===r?-1:r+1}function Ne(e){switch(e){case 36:case 34:case 37:case 35:return!0;default:return!1}}function Ie(e,t){return t.getTypeAtLocation(e.parent.parent.expression)}function Fe(e){return 169===e||170===e||171===e||162===e||164===e}function Le(e){return 251===e||166===e||165===e||167===e||168===e}function Pe(e){return 256===e}function Re(e){return 232===e||233===e||235===e||240===e||241===e||242===e||246===e||248===e||163===e||254===e||261===e||260===e||267===e||259===e||266===e}function Me(e,t){return je(e,e.fileExists,t)}function Be(e){try{return e()}catch(e){return}}function je(e,t){for(var n=[],r=2;r-1&&e.isWhiteSpaceSingleLine(t.charCodeAt(n));)n-=1;return n+1},e.getSynthesizedDeepClone=ve,e.getSynthesizedDeepCloneWithReplacements=ye,e.getSynthesizedDeepClones=function(t,n){return void 0===n&&(n=!0),t&&e.factory.createNodeArray(t.map((function(e){return ve(e,n)})),t.hasTrailingComma)},e.getSynthesizedDeepClonesWithReplacements=function(t,n,r){return e.factory.createNodeArray(t.map((function(e){return ye(e,n,r)})),t.hasTrailingComma)},e.suppressLeadingAndTrailingTrivia=De,e.suppressLeadingTrivia=Ee,e.suppressTrailingTrivia=Ce,e.copyComments=function(e,t){var n=e.getSourceFile();!function(e,t){for(var n=e.getFullStart(),r=e.getStart(),i=n;i=0),o},e.copyLeadingComments=ke,e.copyTrailingComments=Te,e.copyTrailingAsLeadingComments=we,e.needsParentheses=function(t){return e.isBinaryExpression(t)&&27===t.operatorToken.kind||e.isObjectLiteralExpression(t)},e.getContextualTypeFromParent=function(e,t){var n=e.parent;switch(n.kind){case 204:return t.getContextualType(n);case 216:var r=n,i=r.left,a=r.operatorToken,o=r.right;return Ne(a.kind)?t.getTypeAtLocation(e===o?i:o):t.getContextualType(e);case 284:return n.expression===e?Ie(n,t):void 0;default:return t.getContextualType(e)}},e.quote=function(t,n,r){var i=re(t,n),a=JSON.stringify(r);return 0===i?"'"+e.stripQuotes(a).replace("'","\\'").replace('\\"','"')+"'":a},e.isEqualityOperatorKind=Ne,e.isStringLiteralOrTemplate=function(e){switch(e.kind){case 10:case 14:case 218:case 205:return!0;default:return!1}},e.hasIndexSignature=function(e){return!!e.getStringIndexType()||!!e.getNumberIndexType()},e.getSwitchedType=Ie,e.ANONYMOUS="anonymous function",e.getTypeNodeIfAccessible=function(e,t,n,r){var i=n.getTypeChecker(),a=!0,o=function(){a=!1},s=i.typeToTypeNode(e,t,1,{trackSymbol:function(e,t,n){a=a&&0===i.isSymbolAccessible(e,t,n,!1).accessibility},reportInaccessibleThisError:o,reportPrivateInBaseOfClassExpression:o,reportInaccessibleUniqueSymbolError:o,moduleResolverHost:Z(n,r)});return a?s:void 0},e.syntaxRequiresTrailingCommaOrSemicolonOrASI=Fe,e.syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI=Le,e.syntaxRequiresTrailingModuleBlockOrSemicolonOrASI=Pe,e.syntaxRequiresTrailingSemicolonOrASI=Re,e.syntaxMayBeASICandidate=e.or(Fe,Le,Pe,Re),e.positionIsASICandidate=function(t,n,r){var i=e.findAncestor(n,(function(n){return n.end!==t?"quit":e.syntaxMayBeASICandidate(n.kind)}));return!!i&&function(t,n){var r=t.getLastToken(n);if(r&&26===r.kind)return!1;if(Fe(t.kind)){if(r&&27===r.kind)return!1}else if(Pe(t.kind)){if((i=e.last(t.getChildren(n)))&&e.isModuleBlock(i))return!1}else if(Le(t.kind)){var i;if((i=e.last(t.getChildren(n)))&&e.isFunctionBlock(i))return!1}else if(!Re(t.kind))return!1;if(235===t.kind)return!0;var a=P(t,e.findAncestor(t,(function(e){return!e.parent})),n);return!a||19===a.kind||n.getLineAndCharacterOfPosition(t.getEnd()).line!==n.getLineAndCharacterOfPosition(a.getStart(n)).line}(i,r)},e.probablyUsesSemicolons=function(t){var n=0,r=0;return e.forEachChild(t,(function i(a){if(Re(a.kind)){var o=a.getLastToken(t);o&&26===o.kind?n++:r++}return n+r>=5||e.forEachChild(a,i)})),0===n&&r<=1||n/r>.2},e.tryGetDirectories=function(e,t){return je(e,e.getDirectories,t)||[]},e.tryReadDirectory=function(t,n,r,i,a){return je(t,t.readDirectory,n,r,i,a)||e.emptyArray},e.tryFileExists=Me,e.tryDirectoryExists=function(t,n){return Be((function(){return e.directoryProbablyExists(n,t)}))||!1},e.tryAndIgnoreErrors=Be,e.tryIOAndConsumeErrors=je,e.findPackageJsons=function(t,n,r){var i=[];return e.forEachAncestorDirectory(t,(function(t){if(t===r)return!0;var a=e.combinePaths(t,"package.json");Me(n,a)&&i.push(a)})),i},e.findPackageJson=function(t,n){var r;return e.forEachAncestorDirectory(t,(function(t){return"node_modules"===t||!!(r=e.findConfigFile(t,(function(e){return Me(n,e)}),"package.json"))||void 0})),r},e.getPackageJsonsVisibleToFile=function(t,n){if(!n.fileExists)return[];var r=[];return e.forEachAncestorDirectory(e.getDirectoryPath(t),(function(t){var i=e.combinePaths(t,"package.json");if(n.fileExists(i)){var a=Ue(i,n);a&&r.push(a)}})),r},e.createPackageJsonInfo=Ue,e.consumesNodeCoreModules=function(t){return e.some(t.imports,(function(t){var n=t.text;return e.JsTyping.nodeCoreModules.has(n)}))},e.isInsideNodeModules=function(t){return e.contains(e.getPathComponents(t),"node_modules")},e.isDiagnosticWithLocation=Ve,e.findDiagnosticForNode=function(t,n){var r=Y(t),i=e.binarySearchKey(n,r,e.identity,e.compareTextSpans);if(i>=0){var a=n[i];return e.Debug.assertEqual(a.file,t.getSourceFile(),"Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile"),e.cast(a,Ve)}},e.getDiagnosticsWithinSpan=function(t,n){var r,i=e.binarySearchKey(n,t.start,(function(e){return e.start}),e.compareValues);for(i<0&&(i=~i);(null===(r=n[i-1])||void 0===r?void 0:r.start)===t.start;)i--;for(var a=[],o=e.textSpanEnd(t);;){var s=e.tryCast(n[i],Ve);if(!s||s.start>o)break;e.textSpanContainsTextSpan(t,s)&&a.push(s),i++}return a},e.getRefactorContextSpan=function(t){var n=t.startPosition,r=t.endPosition;return e.createTextSpanFromBounds(n,void 0===r?n:r)},e.mapOneOrMany=function(t,n,r){return void 0===r&&(r=e.identity),t?e.isArray(t)?r(e.map(t,n)):n(t,0):void 0},e.firstOrOnly=function(t){return e.isArray(t)?e.first(t):t},e.getNameForExportedSymbol=function(t,n){return"export="===t.escapedName||"default"===t.escapedName?e.firstDefined(t.declarations,(function(t){return e.isExportAssignment(t)&&e.isIdentifier(t.expression)?t.expression.text:void 0}))||e.codefix.moduleSymbolToValidIdentifier(function(t){var n;return e.Debug.checkDefined(t.parent,"Symbol parent was undefined. Flags: "+e.Debug.formatSymbolFlags(t.flags)+". Declarations: "+(null===(n=t.declarations)||void 0===n?void 0:n.map((function(t){var n=e.Debug.formatSyntaxKind(t.kind),r=e.isInJSFile(t),i=t.expression;return(r?"[JS]":"")+n+(i?" (expression: "+e.Debug.formatSyntaxKind(i.kind)+")":"")})).join(", "))+".")}(t),n):t.name},e.stringContainsAt=function(e,t,n){var r=t.length;if(r+n>e.length)return!1;for(var i=0;i=i.length){var b=n(o,c,e.lastOrUndefined(d));void 0!==b&&(m=b)}}while(1!==c);function D(){switch(c){case 43:case 67:t[l]||13!==o.reScanSlashToken()||(c=13);break;case 29:78===l&&v++;break;case 31:v>0&&v--;break;case 128:case 147:case 144:case 131:case 148:v>0&&!u&&(c=78);break;case 15:d.push(c);break;case 18:d.length>0&&d.push(c);break;case 19:if(d.length>0){var n=e.lastOrUndefined(d);15===n?17===(c=o.reScanTemplateToken(!1))?d.pop():e.Debug.assertEqual(c,16,"Should have been a template middle."):(e.Debug.assertEqual(n,18,"Should have been an open brace"),d.pop())}break;default:if(!e.isKeyword(c))break;(24===l||e.isKeyword(l)&&e.isKeyword(c)&&!function(t,n){if(!e.isAccessibilityModifier(t))return!0;switch(n){case 134:case 146:case 132:case 123:return!0;default:return!1}}(l,c))&&(c=78)}}return{endOfLineState:m,spans:_}}return{getClassificationsForLine:function(t,n,r){return function(t,n){for(var r=[],a=t.spans,o=0,s=0;s=0){var d=u-o;d>0&&r.push({length:d,classification:e.TokenClass.Whitespace})}r.push({length:c,classification:i(l)}),o=u+c}var p=n.length-o;return p>0&&r.push({length:p,classification:e.TokenClass.Whitespace}),{entries:r,finalLexState:t.endOfLineState}}(s(t,n,r),t)},getEncodedLexicalClassifications:s}};var t=e.arrayToNumericMap([78,10,8,9,13,107,45,46,21,23,19,109,94],(function(e){return e}),(function(){return!0}));function n(t,n,r){switch(n){case 10:if(!t.isUnterminated())return;for(var i=t.getTokenText(),a=i.length-1,o=0;92===i.charCodeAt(a-o);)o++;if(0==(1&o))return;return 34===i.charCodeAt(0)?3:2;case 3:return t.isUnterminated()?1:void 0;default:if(e.isTemplateLiteralKind(n)){if(!t.isUnterminated())return;switch(n){case 17:return 5;case 14:return 4;default:return e.Debug.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #"+n)}}return 15===r?6:void 0}}function r(e,t,n,r,i){if(8!==r){0===e&&n>0&&(e+=n);var a=t-e;a>0&&i.push(e-n,a,r)}}function i(t){switch(t){case 1:return e.TokenClass.Comment;case 3:return e.TokenClass.Keyword;case 4:return e.TokenClass.NumberLiteral;case 25:return e.TokenClass.BigIntLiteral;case 5:return e.TokenClass.Operator;case 6:return e.TokenClass.StringLiteral;case 8:return e.TokenClass.Whitespace;case 10:return e.TokenClass.Punctuation;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:return e.TokenClass.Identifier;default:return}}function a(t){if(e.isKeyword(t))return 3;if(function(e){switch(e){case 41:case 43:case 44:case 39:case 40:case 47:case 48:case 49:case 29:case 31:case 32:case 33:case 101:case 100:case 126:case 34:case 35:case 36:case 37:case 50:case 52:case 51:case 55:case 56:case 73:case 72:case 77:case 69:case 70:case 71:case 63:case 64:case 65:case 67:case 68:case 62:case 27:case 60:case 74:case 75:case 76:return!0;default:return!1}}(t)||function(e){switch(e){case 39:case 40:case 54:case 53:case 45:case 46:return!0;default:return!1}}(t))return 5;if(t>=18&&t<=77)return 10;switch(t){case 8:return 4;case 9:return 25;case 10:return 6;case 13:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;case 78:default:return e.isTemplateLiteralKind(t)?6:2}}function o(e,t){switch(t){case 256:case 252:case 253:case 251:case 221:case 208:case 209:e.throwIfCancellationRequested()}}function s(t,n,r,i,a){var s=[];return r.forEachChild((function c(l){if(l&&e.textSpanIntersectsWith(a,l.pos,l.getFullWidth())){if(o(n,l.kind),e.isIdentifier(l)&&!e.nodeIsMissing(l)&&i.has(l.escapedText)){var d=t.getSymbolAtLocation(l),p=d&&u(d,e.getMeaningFromLocation(l),t);p&&function(t,n,r){var i=n-t;e.Debug.assert(i>0,"Classification had non-positive length of "+i),s.push(t),s.push(i),s.push(r)}(l.getStart(r),l.getEnd(),p)}l.forEachChild(c)}})),{spans:s,endOfLineState:0}}function u(t,n,r){var i=t.getFlags();return 0==(2885600&i)?void 0:32&i?11:384&i?12:524288&i?16:1536&i?4&n||1&n&&function(t){return e.some(t.declarations,(function(t){return e.isModuleDeclaration(t)&&1===e.getModuleInstanceState(t)}))}(t)?14:void 0:2097152&i?u(r.getAliasedSymbol(t),n,r):2&n?64&i?13:262144&i?15:void 0:void 0}function c(e){switch(e){case 1:return"comment";case 2:return"identifier";case 3:return"keyword";case 4:return"number";case 25:return"bigint";case 5:return"operator";case 6:return"string";case 8:return"whitespace";case 9:return"text";case 10:return"punctuation";case 11:return"class name";case 12:return"enum name";case 13:return"interface name";case 14:return"module name";case 15:return"type parameter name";case 16:return"type alias name";case 17:return"parameter name";case 18:return"doc comment tag name";case 19:return"jsx open tag name";case 20:return"jsx close tag name";case 21:return"jsx self closing tag name";case 22:return"jsx attribute";case 23:return"jsx text";case 24:return"jsx attribute string literal value";default:return}}function l(t){e.Debug.assert(t.spans.length%3==0);for(var n=t.spans,r=[],i=0;i])*)(\/>)?)?/im,a=/(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/gim,o=n.text.substr(t,r),s=i.exec(o);if(!s)return!1;if(!s[3]||!(s[3]in e.commentPragmas))return!1;var u=t;p(u,s[1].length),l(u+=s[1].length,s[2].length,10),l(u+=s[2].length,s[3].length,21),u+=s[3].length;for(var c=s[4],d=u;;){var f=a.exec(c);if(!f)break;var h=u+f.index;h>d&&(p(d,h-d),d=h),l(d,f[1].length,22),d+=f[1].length,f[2].length&&(p(d,f[2].length),d+=f[2].length),l(d,f[3].length,5),d+=f[3].length,f[4].length&&(p(d,f[4].length),d+=f[4].length),l(d,f[5].length,24),d+=f[5].length}(u+=s[4].length)>d&&p(d,u-d),s[5]&&(l(u,s[5].length,10),u+=s[5].length);var g=t+r;return u=0),a>0){var o=r||_(t.kind,t);o&&l(i,a,o)}return!0}function _(t,n){if(e.isKeyword(t))return 3;if((29===t||31===t)&&n&&e.getTypeArgumentOrTypeParameterList(n.parent))return 10;if(e.isPunctuation(t)){if(n){var r=n.parent;if(62===t&&(249===r.kind||163===r.kind||160===r.kind||280===r.kind))return 5;if(216===r.kind||214===r.kind||215===r.kind||217===r.kind)return 5}return 10}if(8===t)return 4;if(9===t)return 25;if(10===t)return n&&280===n.parent.kind?24:6;if(13===t)return 6;if(e.isTemplateLiteralKind(t))return 6;if(11===t)return 23;if(78===t){if(n)switch(n.parent.kind){case 252:return n.parent.name===n?11:void 0;case 159:return n.parent.name===n?15:void 0;case 253:return n.parent.name===n?13:void 0;case 255:return n.parent.name===n?12:void 0;case 256:return n.parent.name===n?14:void 0;case 160:return n.parent.name===n?e.isThisIdentifier(n)?3:17:void 0}return 2}}function v(r){if(r&&e.decodedTextSpanIntersectsWith(i,a,r.pos,r.getFullWidth())){o(t,r.kind);for(var s=0,u=r.getChildren(n);s0})))return 0;if(o((function(e){return e.getCallSignatures().length>0}))&&!o((function(e){return e.getProperties().length>0}))||function(t){for(;a(t);)t=t.parent;return e.isCallExpression(t.parent)&&t.parent.expression===t}(n))return 9===r?11:10}}return r}(c,p,g);var _=h.valueDeclaration;if(_){var v=e.getCombinedModifierFlags(_),y=e.getCombinedNodeFlags(_);32&v&&(m|=2),256&v&&(m|=4),0!==g&&2!==g&&(64&v||2&y||8&h.getFlags())&&(m|=8),7!==g&&10!==g||!function(t,n){return e.isBindingElement(t)&&(t=i(t)),e.isVariableDeclaration(t)?(!e.isSourceFile(t.parent.parent.parent)||e.isCatchClause(t.parent))&&t.getSourceFile()===n:!!e.isFunctionDeclaration(t)&&!e.isSourceFile(t.parent)&&t.getSourceFile()===n}(_,n)||(m|=32),t.isSourceFileDefaultLibrary(_.getSourceFile())&&(m|=16)}else h.declarations&&h.declarations.some((function(e){return t.isSourceFileDefaultLibrary(e.getSourceFile())}))&&(m|=16);s(p,g,m)}}}e.forEachChild(p,d),l=f}}d(n)}(t,n,r,(function(e,t,r){u.push(e.getStart(n),e.getWidth(n),(t+1<<8)+r)}),s),u}function i(t){for(;;){if(!e.isBindingElement(t.parent.parent))return t.parent.parent;t=t.parent.parent}}function a(t){return e.isQualifiedName(t.parent)&&t.parent.right===t||e.isPropertyAccessExpression(t.parent)&&t.parent.name===t}!function(e){e[e.typeOffset=8]="typeOffset",e[e.modifierMask=255]="modifierMask"}(t.TokenEncodingConsts||(t.TokenEncodingConsts={})),function(e){e[e.class=0]="class",e[e.enum=1]="enum",e[e.interface=2]="interface",e[e.namespace=3]="namespace",e[e.typeParameter=4]="typeParameter",e[e.type=5]="type",e[e.parameter=6]="parameter",e[e.variable=7]="variable",e[e.enumMember=8]="enumMember",e[e.property=9]="property",e[e.function=10]="function",e[e.member=11]="member"}(t.TokenType||(t.TokenType={})),function(e){e[e.declaration=0]="declaration",e[e.static=1]="static",e[e.async=2]="async",e[e.readonly=3]="readonly",e[e.defaultLibrary=4]="defaultLibrary",e[e.local=5]="local"}(t.TokenModifier||(t.TokenModifier={})),t.getSemanticClassifications=function(t,r,i,a){var o=n(t,r,i,a);e.Debug.assert(o.spans.length%3==0);for(var s=o.spans,u=[],c=0;ca.parameters.length)){var o=n.getParameterType(a,t.argumentIndex);return r=r||!!(4&o.flags),l(o,i)}})),isNewIdentifier:r}}(S,i):x()}case 261:case 267:case 272:return{kind:0,paths:h(t,n,a,o,i)};default:return x()}function x(){return{kind:2,types:l(e.getContextualTypeFromParent(n,i)),isNewIdentifier:!1}}}function u(t){switch(t.kind){case 186:return e.walkUpParenthesizedTypes(t);case 207:return e.walkUpParenthesizedExpressions(t);default:return t}}function c(t){return t&&{kind:1,symbols:e.filter(t.getApparentProperties(),(function(t){return!(t.valueDeclaration&&e.isPrivateIdentifierPropertyDeclaration(t.valueDeclaration))})),hasIndexSignature:e.hasIndexSignature(t)}}function l(t,n){return void 0===n&&(n=new e.Map),t?(t=e.skipConstraint(t)).isUnion()?e.flatMap(t.types,(function(e){return l(e,n)})):!t.isStringLiteral()||1024&t.flags||!e.addToSeen(n,t.value)?e.emptyArray:[t]:e.emptyArray}function d(e,t,n){return{name:e,kind:t,extension:n}}function p(e){return d(e,"directory",void 0)}function f(t,n,r){var i=function(t,n){var r=Math.max(t.lastIndexOf(e.directorySeparator),t.lastIndexOf("\\")),i=-1!==r?r+1:0,a=t.length-i;return 0===a||e.isIdentifierText(t.substr(i,a),99)?void 0:e.createTextSpan(n+i,a)}(t,n);return r.map((function(e){return{name:e.name,kind:e.kind,extension:e.extension,span:i}}))}function h(n,r,i,a,o){return f(r.text,r.getStart(n)+1,function(n,r,i,a,o){var s=e.normalizeSlashes(r.text),u=n.path,c=e.getDirectoryPath(u);return function(e){if(e&&e.length>=2&&46===e.charCodeAt(0)){var t=e.length>=3&&46===e.charCodeAt(1)?2:1,n=e.charCodeAt(t);return 47===n||92===n}return!1}(s)||!i.baseUrl&&(e.isRootedDiskPath(s)||e.isUrl(s))?function(n,r,i,a,o){var s=g(i);return i.rootDirs?function(n,r,i,a,o,s,u){var c=function(n,r,i,a){n=n.map((function(t){return e.normalizePath(e.isRootedDiskPath(t)?t:e.combinePaths(r,t))}));var o=e.firstDefined(n,(function(t){return e.containsPath(t,i,r,a)?i.substr(t.length):void 0}));return e.deduplicate(t(n.map((function(t){return e.combinePaths(t,o)})),[i]),e.equateStringsCaseSensitive,e.compareStringsCaseSensitive)}(n,o.project||s.getCurrentDirectory(),i,!(s.useCaseSensitiveFileNames&&s.useCaseSensitiveFileNames()));return e.flatMap(c,(function(e){return _(r,e,a,s,u)}))}(i.rootDirs,n,r,s,i,a,o):_(n,r,s,a,o)}(s,c,i,a,u):function(t,n,r,i,a){var o=r.baseUrl,s=r.paths,u=[],c=g(r);if(o){var l=r.project||i.getCurrentDirectory(),p=e.normalizePath(e.combinePaths(l,o));_(t,p,c,i,void 0,u),s&&v(u,t,p,c.extensions,s,i)}for(var f=y(t),h=0,m=function(t,n,r){var i=r.getAmbientModules().map((function(t){return e.stripQuotes(t.name)})).filter((function(n){return e.startsWith(n,t)}));if(void 0!==n){var a=e.ensureTrailingDirectorySeparator(n);return i.map((function(t){return e.removePrefix(t,a)}))}return i}(t,f,a);h=e.pos&&n<=e.end}));if(s){var u=t.text.slice(s.pos,n),c=E.exec(u);if(c){var l=c[1],d=c[2],p=c[3],h=e.getDirectoryPath(t.path),m="path"===d?_(p,h,g(r,!0),i,t.path):"types"===d?D(i,r,h,y(p),g(r)):e.Debug.fail();return f(p,s.pos+l.length,m)}}}(t,r,u,c))&&i(p);if(e.isInString(t,r,a)){if(!a||!e.isStringLiteralLike(a))return;var p;return function(t,r,a,o,s,u){if(void 0!==t){var c=e.createTextSpanFromStringLiteralLikeContent(r);switch(t.kind){case 0:return i(t.paths);case 1:var l=[];return n.getCompletionEntriesFromSymbols(t.symbols,l,r,a,a,o,99,s,4,u),{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:t.hasIndexSignature,optionalReplacementSpan:c,entries:l};case 2:return l=t.types.map((function(t){return{name:t.value,kindModifiers:"",kind:"string",sortText:n.SortText.LocationPriority,replacementSpan:e.getReplacementSpanForContextToken(r)}})),{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:t.isNewIdentifier,optionalReplacementSpan:c,entries:l};default:return e.Debug.assertNever(t)}}}(p=s(t,a,r,o,u,c),a,t,o,l,d)}},r.getStringLiteralCompletionDetails=function(t,r,i,o,u,c,l,d){if(o&&e.isStringLiteralLike(o)){var p=s(r,o,i,u,c,l);return p&&function(t,r,i,o,s,u){switch(i.kind){case 0:return(c=e.find(i.paths,(function(e){return e.name===t})))&&n.createCompletionDetails(t,a(c.extension),c.kind,[e.textPart(t)]);case 1:var c;return(c=e.find(i.symbols,(function(e){return e.name===t})))&&n.createCompletionDetailsForSymbol(c,s,o,r,u);case 2:return e.find(i.types,(function(e){return e.value===t}))?n.createCompletionDetails(t,"","type",[e.textPart(t)]):void 0;default:return e.Debug.assertNever(i)}}(t,o,p,r,u,d)}},function(e){e[e.Paths=0]="Paths",e[e.Properties=1]="Properties",e[e.Types=2]="Types"}(o||(o={}));var E=/^(\/\/\/\s*=t.pos;case 24:return 197===r;case 58:return 198===r;case 22:return 197===r;case 20:return 287===r||ue(r);case 18:return 255===r;case 29:return 252===r||221===r||253===r||254===r||e.isFunctionLikeKind(r);case 123:return 163===r&&!e.isClassLike(n.parent);case 25:return 160===r||!!n.parent&&197===n.parent.kind;case 122:case 120:case 121:return 160===r&&!e.isConstructorDeclaration(n.parent);case 126:return 265===r||270===r||263===r;case 134:case 146:return!M(t);case 83:case 91:case 117:case 97:case 112:case 99:case 118:case 84:case 149:return!0;case 41:return e.isFunctionLike(t.parent)&&!e.isMethodDeclaration(t.parent)}if(I(L(t))&&M(t))return!1;if(se(t)&&(!e.isIdentifier(t)||e.isParameterPropertyModifier(L(t))||pe(t)))return!1;switch(L(t)){case 125:case 83:case 84:case 133:case 91:case 97:case 117:case 118:case 120:case 121:case 122:case 123:case 112:return!0;case 129:return e.isPropertyDeclaration(t.parent)}return e.isDeclarationName(t)&&!e.isJsxAttribute(t.parent)&&!(e.isClassLike(t.parent)&&(t!==v||o>v.end))}(t)||function(e){if(8===e.kind){var t=e.getFullText();return"."===t.charAt(t.length-1)}return!1}(t)||function(e){if(11===e.kind)return!0;if(31===e.kind&&e.parent){if(275===e.parent.kind)return 275!==O.parent.kind;if(276===e.parent.kind||274===e.parent.kind)return!!e.parent.parent&&273===e.parent.parent.kind}return!1}(t);return r("getCompletionsAtPosition: isCompletionListBlocker: "+(e.timestamp()-n)),a}(y))return void r("Returning an empty list because completion was requested in an invalid position.");var F=y.parent;if(24===y.kind||28===y.kind)switch(C=24===y.kind,S=28===y.kind,F.kind){case 201:if(E=(D=F).expression,(e.isCallExpression(E)||e.isFunctionLike(E))&&E.end===y.pos&&E.getChildCount(i)&&21!==e.last(E.getChildren(i)).kind)return;break;case 157:E=F.left;break;case 256:E=F.name;break;case 195:case 226:E=F;break;default:return}else if(1===i.languageVariant){if(F&&201===F.kind&&(y=F,F=F.parent),p.parent===O)switch(p.kind){case 31:273!==p.parent.kind&&275!==p.parent.kind||(O=p);break;case 43:274===p.parent.kind&&(O=p)}switch(F.kind){case 276:43===y.kind&&(T=!0,O=y);break;case 216:if(!B(F))break;case 274:case 273:case 275:A=!0,29===y.kind&&(k=!0,O=y);break;case 283:19===v.kind&&31===p.kind&&(A=!0);break;case 280:if(F.initializer===v&&v.end0&&(H=function(t,n){if(0===n.length)return t;for(var r=new e.Set,i=new e.Set,a=0,o=n;a"),kind:"class",kindModifiers:void 0,sortText:n.LocationPriority};return{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:!1,optionalReplacementSpan:d(m),entries:[A]}}var N=[];if(p(t,i)){var I=b(u,N,void 0,m,t,r,i.target,a,c,s,_,o.isJsxIdentifierExpected,C,E,D,x);!function(t,r,i,a,o){e.getNameTable(t).forEach((function(t,s){if(t!==r){var u=e.unescapeLeadingUnderscores(s);!i.has(u)&&e.isIdentifierText(u,a)&&(i.add(u),o.push({name:u,kind:"warning",kindModifiers:"",sortText:n.JavascriptIdentifiers,isFromUncheckedFile:!0}))}}))}(t,m.pos,I,i.target,N)}else{if(!(h||u&&0!==u.length||0!==v))return;b(u,N,void 0,m,t,r,i.target,a,c,s,_,o.isJsxIdentifierExpected,C,E,D,x)}if(0!==v)for(var F=new e.Set(N.map((function(e){return e.name}))),L=0,P=function(t,n){if(!n)return O(t);var r=t+7+1;return w[r]||(w[r]=O(t).filter((function(t){return!function(e){switch(e){case 125:case 128:case 155:case 131:case 133:case 91:case 154:case 116:case 135:case 117:case 137:case 138:case 139:case 140:case 141:case 144:case 145:case 120:case 121:case 122:case 142:case 147:case 148:case 149:case 151:case 152:return!0;default:return!1}}(e.stringToToken(t.name))})))}(v,!S&&e.isSourceFileJS(t));L=0&&!c(n,r[i],114);i--);return e.forEach(a(t.statement),(function(e){s(t,e)&&c(n,e.getFirstToken(),80,85)})),n}function d(e){var t=u(e);if(t)switch(t.kind){case 237:case 238:case 239:case 235:case 236:return l(t);case 244:return p(t)}}function p(t){var n=[];return c(n,t.getFirstToken(),106),e.forEach(t.caseBlock.clauses,(function(r){c(n,r.getFirstToken(),81,87),e.forEach(a(r),(function(e){s(t,e)&&c(n,e.getFirstToken(),80)}))})),n}function f(t,n){var r=[];return c(r,t.getFirstToken(),110),t.catchClause&&c(r,t.catchClause.getFirstToken(),82),t.finallyBlock&&c(r,e.findChildOfKind(t,95,n),95),r}function h(t,n){var r=function(t){for(var n=t;n.parent;){var r=n.parent;if(e.isFunctionBlock(r)||297===r.kind)return r;if(e.isTryStatement(r)&&r.tryBlock===n&&r.catchClause)return n;n=r}}(t);if(r){var a=[];return e.forEach(i(r),(function(t){a.push(e.findChildOfKind(t,108,n))})),e.isFunctionBlock(r)&&e.forEachReturnStatement(r,(function(t){a.push(e.findChildOfKind(t,104,n))})),a}}function g(t,n){var r=e.getContainingFunction(t);if(r){var a=[];return e.forEachReturnStatement(e.cast(r.body,e.isBlock),(function(t){a.push(e.findChildOfKind(t,104,n))})),e.forEach(i(r.body),(function(t){a.push(e.findChildOfKind(t,108,n))})),a}}function m(t){var n=e.getContainingFunction(t);if(n){var r=[];return n.modifiers&&n.modifiers.forEach((function(e){c(r,e,129)})),e.forEachChild(n,(function(t){_(t,(function(t){e.isAwaitExpression(t)&&c(r,t.getFirstToken(),130)}))})),r}}function _(t,n){n(t),e.isFunctionLike(t)||e.isClassLike(t)||e.isInterfaceDeclaration(t)||e.isModuleDeclaration(t)||e.isTypeAliasDeclaration(t)||e.isTypeNode(t)||e.forEachChild(t,(function(e){return _(e,n)}))}n.getDocumentHighlights=function(n,i,a,o,s){var u=e.getTouchingPropertyName(a,o);if(u.parent&&(e.isJsxOpeningElement(u.parent)&&u.parent.tagName===u||e.isJsxClosingElement(u.parent))){var v=u.parent.parent,y=[v.openingElement,v.closingElement].map((function(e){return r(e.tagName,a)}));return[{fileName:a.fileName,highlightSpans:y}]}return function(t,n,r,i,a){var o=new e.Set(a.map((function(e){return e.fileName}))),s=e.FindAllReferences.getReferenceEntriesForNode(t,n,r,a,i,void 0,o);if(s){var u=e.arrayToMultiMap(s.map(e.FindAllReferences.toHighlightSpan),(function(e){return e.fileName}),(function(e){return e.span}));return e.arrayFrom(u.entries(),(function(t){var n=t[0],i=t[1];if(!o.has(n)){e.Debug.assert(r.redirectTargetsMap.has(n));var s=r.getSourceFile(n);n=e.find(a,(function(e){return!!e.redirectInfo&&e.redirectInfo.redirectTarget===s})).fileName,e.Debug.assert(o.has(n))}return{fileName:n,highlightSpans:i}}))}}(o,u,n,i,s)||function(n,i){var a=function(n,i){switch(n.kind){case 98:case 90:return e.isIfStatement(n.parent)?function(t,n){for(var i=function(t,n){for(var r=[];e.isIfStatement(t.parent)&&t.parent.elseStatement===t;)t=t.parent;for(;;){var i=t.getChildren(n);c(r,i[0],98);for(var a=i.length-1;a>=0&&!c(r,i[a],90);a--);if(!t.elseStatement||!e.isIfStatement(t.elseStatement))break;t=t.elseStatement}return r}(t,n),a=[],o=0;o=s.end;d--)if(!e.isWhiteSpaceSingleLine(n.text.charCodeAt(d))){l=!1;break}if(l){a.push({fileName:n.fileName,textSpan:e.createTextSpanFromBounds(s.getStart(),u.end),kind:"reference"}),o++;continue}}a.push(r(i[o],n))}return a}(n.parent,i):void 0;case 104:return u(n.parent,e.isReturnStatement,g);case 108:return u(n.parent,e.isThrowStatement,h);case 110:case 82:case 95:return u(82===n.kind?n.parent.parent:n.parent,e.isTryStatement,f);case 106:return u(n.parent,e.isSwitchStatement,p);case 81:case 87:return e.isDefaultClause(n.parent)||e.isCaseClause(n.parent)?u(n.parent.parent.parent,e.isSwitchStatement,p):void 0;case 80:case 85:return u(n.parent,e.isBreakOrContinueStatement,d);case 96:case 114:case 89:return u(n.parent,(function(t){return e.isIterationStatement(t,!0)}),l);case 132:return s(e.isConstructorDeclaration,[132]);case 134:case 146:return s(e.isAccessor,[134,146]);case 130:return u(n.parent,e.isAwaitExpression,m);case 129:return v(m(n));case 124:return v(function(t){var n=e.getContainingFunction(t);if(n){var r=[];return e.forEachChild(n,(function(t){_(t,(function(t){e.isYieldExpression(t)&&c(r,t.getFirstToken(),124)}))})),r}}(n));default:return e.isModifierKind(n.kind)&&(e.isDeclaration(n.parent)||e.isVariableStatement(n.parent))?v((a=n.kind,o=n.parent,e.mapDefined(function(n,r){var i=n.parent;switch(i.kind){case 257:case 297:case 230:case 284:case 285:return 128&r&&e.isClassDeclaration(n)?t(n.members,[n]):i.statements;case 166:case 165:case 251:return t(i.parameters,e.isClassLike(i.parent)?i.parent.members:[]);case 252:case 221:case 253:case 177:var a=i.members;if(92&r){var o=e.find(i.members,e.isConstructorDeclaration);if(o)return t(a,o.parameters)}else if(128&r)return t(a,[i]);return a;case 200:return;default:e.Debug.assertNever(i,"Invalid container kind.")}}(o,e.modifierToFlag(a)),(function(t){return e.findModifier(t,a)})))):void 0}var a,o;function s(t,r){return u(n.parent,t,(function(n){return e.mapDefined(n.symbol.declarations,(function(n){return t(n)?e.find(n.getChildren(i),(function(t){return e.contains(r,t.kind)})):void 0}))}))}function u(e,t,n){return t(e)?v(n(e,i)):void 0}function v(e){return e&&e.map((function(e){return r(e,i)}))}}(n,i);return a&&[{fileName:i.fileName,highlightSpans:a}]}(u,a)}}(e.DocumentHighlights||(e.DocumentHighlights={}))}(u||(u={})),function(e){function t(t,r,i){void 0===r&&(r="");var a=new e.Map,o=e.createGetCanonicalFileName(!!t);function s(e,t,n,r,i,a,o){return c(e,t,n,r,i,a,!0,o)}function u(e,t,n,r,i,a,o){return c(e,t,n,r,i,a,!1,o)}function c(t,n,r,o,s,u,c,l){var d=e.getOrUpdate(a,o,(function(){return new e.Map})),p=d.get(n),f=6===l?100:r.target||1;if(!p&&i&&(h=i.getDocument(o,n))&&(e.Debug.assert(c),p={sourceFile:h,languageServiceRefCount:0},d.set(n,p)),p)p.sourceFile.version!==u&&(p.sourceFile=e.updateLanguageServiceSourceFile(p.sourceFile,s,u,s.getChangeRange(p.sourceFile.scriptSnapshot)),i&&i.setDocument(o,n,p.sourceFile)),c&&p.languageServiceRefCount++;else{var h=e.createLanguageServiceSourceFile(t,s,f,u,!1,l);i&&i.setDocument(o,n,h),p={sourceFile:h,languageServiceRefCount:1},d.set(n,p)}return e.Debug.assert(0!==p.languageServiceRefCount),p.sourceFile}function l(t,n){var r=e.Debug.checkDefined(a.get(n)),i=r.get(t);i.languageServiceRefCount--,e.Debug.assert(i.languageServiceRefCount>=0),0===i.languageServiceRefCount&&r.delete(t)}return{acquireDocument:function(t,i,a,u,c){return s(t,e.toPath(t,r,o),i,n(i),a,u,c)},acquireDocumentWithKey:s,updateDocument:function(t,i,a,s,c){return u(t,e.toPath(t,r,o),i,n(i),a,s,c)},updateDocumentWithKey:u,releaseDocument:function(t,i){return l(e.toPath(t,r,o),n(i))},releaseDocumentWithKey:l,getLanguageServiceRefCounts:function(t){return e.arrayFrom(a.entries(),(function(e){var n=e[0],r=e[1].get(t);return[n,r&&r.languageServiceRefCount]}))},reportStats:function(){var t=e.arrayFrom(a.keys()).filter((function(e){return e&&"_"===e.charAt(0)})).map((function(e){var t=a.get(e),n=[];return t.forEach((function(e,t){n.push({name:t,refCount:e.languageServiceRefCount})})),n.sort((function(e,t){return t.refCount-e.refCount})),{bucket:e,sourceFiles:n}}));return JSON.stringify(t,void 0,2)},getKeyForCompilationSettings:n}}function n(t){return e.sourceFileAffectingCompilerOptions.map((function(n){return e.getCompilerOptionValue(t,n)})).join("|")}e.createDocumentRegistry=function(e,n){return t(e,n)},e.createDocumentRegistryInternal=t}(u||(u={})),function(e){!function(t){function n(t,n){return e.forEach(297===t.kind?t.statements:t.body.statements,(function(t){return n(t)||u(t)&&e.forEach(t.body&&t.body.statements,n)}))}function i(t,r){if(t.externalModuleIndicator||void 0!==t.imports)for(var i=0,a=t.imports;i=0&&!(u>r.end);){var c=u+s;0!==u&&e.isIdentifierPart(a.charCodeAt(u-1),99)||c!==o&&e.isIdentifierPart(a.charCodeAt(c),99)||i.push(u),u=a.indexOf(n,u+s+1)}return i}function E(t,n){var r=t.getSourceFile(),i=n.text,o=e.mapDefined(b(r,i,t),(function(t){return t===n||e.isJumpStatementTarget(t)&&e.getTargetLabel(t,i)===n?a(t):void 0}));return[{definition:{type:1,node:n},references:o}]}function C(e,t,n,r){return void 0===r&&(r=!0),n.cancellationToken.throwIfCancellationRequested(),S(e,e,t,n,r)}function S(e,t,n,r,i){if(r.markSearchedSymbols(t,n.allSearchSymbols))for(var a=0,o=D(t,n.text,e);a0;o--)D(t,i=r[o]);return[r.length-1,r[0]]}function D(e,t){var n=_(e,t);h(a,n),u.push(a),c.push(o),o=void 0,a=n}function E(){a.children&&(x(a.children,a),O(a.children)),a=u.pop(),o=c.pop()}function C(e,t,n){D(e,n),S(t),E()}function S(t){var n;if(r.throwIfCancellationRequested(),t&&!e.isToken(t))switch(t.kind){case 166:var i=t;C(i,i.body);for(var a=0,s=i.parameters;a0&&(D(H,M),e.forEachChild(H.right,S),E()):e.isFunctionExpression(H.right)||e.isArrowFunction(H.right)?C(t,H.right,M):(D(H,M),C(t,H.right,L.name),E()),void y(R);case 7:case 9:var U=t,V=(M=7===F?U.arguments[0]:U.arguments[0].expression,U.arguments[1]),z=b(t,M);return R=z[0],D(t,z[1]),D(t,e.setTextRange(e.factory.createIdentifier(V.text),V)),S(t.arguments[2]),E(),E(),void y(R);case 5:var H,W=(L=(H=t).left).expression;if(e.isIdentifier(W)&&"prototype"!==e.getElementOrPropertyAccessName(L)&&o&&o.has(W.text))return void(e.isFunctionExpression(H.right)||e.isArrowFunction(H.right)?C(t,H.right,W):e.isBindableStaticAccessExpression(L)&&(D(H,W),C(H.left,H.right,e.getNameOrArgument(L)),E()));break;case 4:case 0:case 8:break;default:e.Debug.assertNever(F)}default:e.hasJSDocNodes(t)&&e.forEach(t.jsDoc,(function(t){e.forEach(t.tags,(function(t){e.isJSDocTypeAlias(t)&&m(t)}))})),e.forEachChild(t,S)}}function x(t,n){var r=new e.Map;e.filterMutate(t,(function(t,i){var a=t.name||e.getNameOfDeclaration(t.node),o=a&&p(a);if(!o)return!0;var s=r.get(o);if(!s)return r.set(o,t),!0;if(s instanceof Array){for(var u=0,c=s;u0)return W(r)}switch(t.kind){case 297:var i=t;return e.isExternalModule(i)?'"'+e.escapeString(e.getBaseFileName(e.removeFileExtension(e.normalizePath(i.fileName))))+'"':"";case 266:return e.isExportAssignment(t)&&t.isExportEquals?"export=":"default";case 209:case 251:case 208:case 252:case 221:return 512&e.getSyntacticModifierFlags(t)?"default":z(t);case 166:return"constructor";case 170:return"new()";case 169:return"()";case 171:return"[]";default:return""}}function L(t){return{text:F(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:V(t.node),spans:R(t),nameSpan:t.name&&U(t.name),childItems:e.map(t.children,L)}}function P(t){return{text:F(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:V(t.node),spans:R(t),childItems:e.map(t.children,(function(t){return{text:F(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:e.getNodeModifiers(t.node),spans:R(t),childItems:l,indent:0,bolded:!1,grayed:!1}}))||l,indent:t.indent,bolded:!1,grayed:!1}}function R(e){var t=[U(e.node)];if(e.additionalNodes)for(var n=0,r=e.additionalNodes;n0)return W(e.declarationNameToString(t.name));if(e.isVariableDeclaration(n))return W(e.declarationNameToString(n.name));if(e.isBinaryExpression(n)&&62===n.operatorToken.kind)return p(n.left).replace(s,"");if(e.isPropertyAssignment(n))return p(n.name);if(512&e.getSyntacticModifierFlags(t))return"default";if(e.isClassLike(t))return"";if(e.isCallExpression(n)){var r=H(n.expression);if(void 0!==r)return(r=W(r)).length>150?r+" callback":r+"("+W(e.mapDefined(n.arguments,(function(t){return e.isStringLiteralLike(t)?t.getText(i):void 0})).join(", "))+") callback"}return""}function H(t){if(e.isIdentifier(t))return t.text;if(e.isPropertyAccessExpression(t)){var n=H(t.expression),r=t.name.text;return void 0===n?r:n+"."+r}}function W(e){return(e=e.length>150?e.substring(0,150)+"...":e).replace(/\\?(\r?\n|\r|\u2028|\u2029)/g,"")}}(e.NavigationBar||(e.NavigationBar={}))}(u||(u={})),function(e){!function(t){function n(t,n){var r=e.isStringLiteral(n)&&n.text;return e.isString(r)&&e.some(t.moduleAugmentations,(function(t){return e.isStringLiteral(t)&&t.text===r}))}function r(t){return void 0!==t&&e.isStringLiteralLike(t)?t.text:void 0}function i(t){var n;if(0===t.length)return t;var r=function(t){for(var n,r={defaultImports:[],namespaceImports:[],namedImports:[]},i={defaultImports:[],namespaceImports:[],namedImports:[]},a=0,o=t;a0?g[0]:_[0],T=0===x.length?D?void 0:e.factory.createNamedImports(e.emptyArray):0===_.length?e.factory.createNamedImports(x):e.factory.updateNamedImports(_[0].importClause.namedBindings,x);h&&D&&T?(c.push(o(k,D,void 0)),c.push(o(null!==(n=_[0])&&void 0!==n?n:k,void 0,T))):c.push(o(k,D,T))}}else{var w=g[0];c.push(o(w,w.importClause.name,m[0].importClause.namedBindings))}}return c}function a(t){if(0===t.length)return t;var n=function(e){for(var t,n=[],r=[],i=0,a=e;i...")}function d(t){var r=e.createTextSpanFromBounds(t.openingFragment.getStart(n),t.closingFragment.getEnd());return u(r,"code",r,!1,"<>...")}function p(e){if(0!==e.properties.length)return o(e.getStart(n),e.getEnd(),"code")}function f(e){if(14!==e.kind||0!==e.text.length)return o(e.getStart(n),e.getEnd(),"code")}function h(t,n){return void 0===n&&(n=18),g(t,!1,!e.isArrayLiteralExpression(t.parent)&&!e.isCallExpression(t.parent),n)}function g(r,i,a,o,u){void 0===i&&(i=!1),void 0===a&&(a=!0),void 0===o&&(o=18),void 0===u&&(u=18===o?19:23);var c=e.findChildOfKind(t,o,n),l=e.findChildOfKind(t,u,n);return c&&l&&s(c,l,r,n,i,a)}function m(t){return t.length?u(e.createTextSpanFromRange(t),"code"):void 0}}(t,n);d&&i.push(d),c--,e.isCallExpression(t)?(c++,g(t.expression),c--,t.arguments.forEach(g),null===(l=t.typeArguments)||void 0===l||l.forEach(g)):e.isIfStatement(t)&&t.elseStatement&&e.isIfStatement(t.elseStatement)?(g(t.expression),g(t.thenStatement),c++,g(t.elseStatement),c--):t.forEachChild(g),c++}}}(n,r,c),function(t,n){for(var r=[],a=0,o=t.getLineStarts();a1&&a.push(o(u,c,"comment"))}}function o(t,n,r){return u(e.createTextSpanFromBounds(t,n),r)}function s(t,n,r,i,a,o){return void 0===a&&(a=!1),void 0===o&&(o=!0),u(e.createTextSpanFromBounds(o?t.getFullStart():t.getStart(i),n.getEnd()),"code",e.createTextSpanFromNode(r,i),a)}function u(e,t,n,r,i){return void 0===n&&(n=e),void 0===r&&(r=!1),void 0===i&&(i="..."),{textSpan:e,kind:t,hintSpan:n,bannerText:i,autoCollapse:r}}}(e.OutliningElementsCollector||(e.OutliningElementsCollector={}))}(u||(u={})),function(e){var t;function n(e,t){return{kind:e,isCaseSensitive:t}}function r(e,t){var n=t.get(e);return n||t.set(e,n=v(e)),n}function i(i,a,o){var s=function(e,t){for(var n=e.length-t.length,r=function(n){if(x(t,(function(t,r){return p(e.charCodeAt(r+n))===t})))return{value:n}},i=0;i<=n;i++){var a=r(i);if("object"==typeof a)return a.value}return-1}(i,a.textLowerCase);if(0===s)return n(a.text.length===i.length?t.exact:t.prefix,e.startsWith(i,a.text));if(a.isLowerCase){if(-1===s)return;for(var d=0,f=r(i,o);d0)return n(t.substring,!0);if(a.characterSpans.length>0){var g=r(i,o),m=!!c(i,g,a,!1)||!c(i,g,a,!0)&&void 0;if(void 0!==m)return n(t.camelCase,m)}}}function a(e,t,n){if(x(t.totalTextChunk.text,(function(e){return 32!==e&&42!==e}))){var r=i(e,t.totalTextChunk,n);if(r)return r}for(var a,s=0,u=t.subWordTextChunks;s=65&&t<=90)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,99))return!1;var n=String.fromCharCode(t);return n===n.toUpperCase()}function d(t){if(t>=97&&t<=122)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,99))return!1;var n=String.fromCharCode(t);return n===n.toLowerCase()}function p(e){return e>=65&&e<=90?e-65+97:e<127?e:String.fromCharCode(e).toLowerCase().charCodeAt(0)}function f(e){return e>=48&&e<=57}function h(e){return l(e)||d(e)||f(e)||95===e||36===e}function g(e){for(var t=[],n=0,r=0,i=0;i0&&(t.push(m(e.substr(n,r))),r=0);return r>0&&t.push(m(e.substr(n,r))),t}function m(e){var t=e.toLowerCase();return{text:e,textLowerCase:t,isLowerCase:e===t,characterSpans:_(e)}}function _(e){return y(e,!1)}function v(e){return y(e,!0)}function y(t,n){for(var r=[],i=0,a=1;at.length)){for(var u=r.length-2,c=t.length-1;u>=0;u-=1,c-=1)s=o(s,a(t[c],r[u],i));return s}}(t,i,r,n)},getMatchForLastSegmentOfPattern:function(t){return a(t,e.last(r),n)},patternContainsDots:r.length>1}},e.breakIntoCharacterSpans=_,e.breakIntoWordSpans=v}(u||(u={})),function(e){e.preProcessFile=function(t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1);var i,a,o,s={languageVersion:1,pragmas:void 0,checkJsDirective:void 0,referencedFiles:[],typeReferenceDirectives:[],libReferenceDirectives:[],amdDependencies:[],hasNoDefaultLib:void 0,moduleName:void 0},u=[],c=0,l=!1;function d(){return a=o,18===(o=e.scanner.scan())?c++:19===o&&c--,o}function p(){var t=e.scanner.getTokenValue(),n=e.scanner.getTokenPos();return{fileName:t,pos:n,end:n+t.length}}function f(){u.push(p()),h()}function h(){0===c&&(l=!0)}function g(){var t=e.scanner.getToken();return 133===t&&(139===(t=d())&&10===(t=d())&&(i||(i=[]),i.push({ref:p(),depth:c})),!0)}function m(){if(24===a)return!1;var t=e.scanner.getToken();if(99===t){if(20===(t=d())){if(10===(t=d())||14===t)return f(),!0}else{if(10===t)return f(),!0;if(149===t&&e.scanner.lookAhead((function(){var t=e.scanner.scan();return 153!==t&&(41===t||18===t||78===t||e.isKeyword(t))}))&&(t=d()),78===t||e.isKeyword(t))if(153===(t=d())){if(10===(t=d()))return f(),!0}else if(62===t){if(v(!0))return!0}else{if(27!==t)return!0;t=d()}if(18===t){for(t=d();19!==t&&1!==t;)t=d();19===t&&153===(t=d())&&10===(t=d())&&f()}else 41===t&&126===(t=d())&&(78===(t=d())||e.isKeyword(t))&&153===(t=d())&&10===(t=d())&&f()}return!0}return!1}function _(){var t=e.scanner.getToken();if(92===t){if(h(),149===(t=d())&&e.scanner.lookAhead((function(){var t=e.scanner.scan();return 41===t||18===t}))&&(t=d()),18===t){for(t=d();19!==t&&1!==t;)t=d();19===t&&153===(t=d())&&10===(t=d())&&f()}else if(41===t)153===(t=d())&&10===(t=d())&&f();else if(99===t&&(149===(t=d())&&e.scanner.lookAhead((function(){var t=e.scanner.scan();return 78===t||e.isKeyword(t)}))&&(t=d()),(78===t||e.isKeyword(t))&&62===(t=d())&&v(!0)))return!0;return!0}return!1}function v(t,n){void 0===n&&(n=!1);var r=t?d():e.scanner.getToken();return 143===r&&(20===(r=d())&&(10===(r=d())||n&&14===r)&&f(),!0)}function y(){var t=e.scanner.getToken();if(78===t&&"define"===e.scanner.getTokenValue()){if(20!==(t=d()))return!0;if(10===(t=d())||14===t){if(27!==(t=d()))return!0;t=d()}if(22!==t)return!0;for(t=d();23!==t&&1!==t;)10!==t&&14!==t||f(),t=d();return!0}return!1}if(n&&function(){for(e.scanner.setText(t),d();1!==e.scanner.getToken();)g()||m()||_()||r&&(v(!1,!0)||y())||d();e.scanner.setText(void 0)}(),e.processCommentPragmas(s,t),e.processPragmasIntoFields(s,e.noop),l){if(i)for(var b=0,D=i;bt)break e;if(n(i,t,m)){if(e.isBlock(m)||e.isTemplateSpan(m)||e.isTemplateHead(m)||e.isTemplateTail(m)||g&&e.isTemplateHead(g)||e.isVariableDeclarationList(m)&&e.isVariableStatement(p)||e.isSyntaxList(m)&&e.isVariableDeclarationList(p)||e.isVariableDeclaration(m)&&e.isSyntaxList(p)&&1===f.length||e.isJSDocTypeExpression(m)||e.isJSDocSignature(m)||e.isJSDocTypeLiteral(m)){p=m;break}e.isTemplateSpan(p)&&_&&e.isTemplateMiddleOrTemplateTail(_)&&D(m.getFullStart()-"${".length,_.getStart()+"}".length);var v=e.isSyntaxList(m)&&(u=void 0,18===(u=(s=g)&&s.kind)||22===u||20===u||275===u)&&c(_)&&!e.positionsAreOnSameLine(g.getStart(),_.getStart(),i),y=v?g.getEnd():m.getStart(),b=v?_.getStart():l(i,m);e.hasJSDocNodes(m)&&(null===(o=m.jsDoc)||void 0===o?void 0:o.length)&&D(e.first(m.jsDoc).getStart(),b),D(y,b),(e.isStringLiteral(m)||e.isTemplateLiteral(m))&&D(y+1,b-1),p=m;break}if(h===f.length-1)break e}}return d;function D(n,i){if(n!==i){var a=e.createTextSpanFromBounds(n,i);(!d||!e.textSpansEqual(a,d.textSpan)&&e.textSpanIntersectsWithPosition(a,t))&&(d=r({textSpan:a},d&&{parent:d}))}}};var i=e.or(e.isImportDeclaration,e.isImportEqualsDeclaration);function a(t){if(e.isSourceFile(t))return o(t.getChildAt(0).getChildren(),i);if(e.isMappedTypeNode(t)){var n=t.getChildren(),r=n[0],a=n.slice(1),c=e.Debug.checkDefined(a.pop());e.Debug.assertEqual(r.kind,18),e.Debug.assertEqual(c.kind,19);var l=o(a,(function(e){return e===t.readonlyToken||142===e.kind||e===t.questionToken||57===e.kind}));return[r,u(s(o(l,(function(e){var t=e.kind;return 22===t||159===t||23===t})),(function(e){return 58===e.kind}))),c]}if(e.isPropertySignature(t))return s(a=o(t.getChildren(),(function(n){return n===t.name||e.contains(t.modifiers,n)})),(function(e){return 58===e.kind}));if(e.isParameter(t)){var d=o(t.getChildren(),(function(e){return e===t.dotDotDotToken||e===t.name}));return s(o(d,(function(e){return e===d[0]||e===t.questionToken})),(function(e){return 62===e.kind}))}return e.isBindingElement(t)?s(t.getChildren(),(function(e){return 62===e.kind})):t.getChildren()}function o(e,t){for(var n,r=[],i=0,a=e;i0&&27===e.last(n).kind&&r++,r}(i);return 0!==a&&e.Debug.assertLessThan(a,o),{list:i,argumentIndex:a,argumentCount:o,argumentsSpan:function(t,n){var r=t.getFullStart(),i=e.skipTrivia(n.text,t.getEnd(),!1);return e.createTextSpan(r,i-r)}(i,n)}}}function s(t,n,r){var i=t.parent;if(e.isCallOrNewExpression(i)){var a=i,s=o(t,r);if(!s)return;var u=s.list,c=s.argumentIndex,l=s.argumentCount,d=s.argumentsSpan;return{isTypeParameterList:!!i.typeArguments&&i.typeArguments.pos===u.pos,invocation:{kind:0,node:a},argumentsSpan:d,argumentIndex:c,argumentCount:l}}if(e.isNoSubstitutionTemplateLiteral(t)&&e.isTaggedTemplateExpression(i))return e.isInsideTemplateLiteral(t,n,r)?p(i,0,r):void 0;if(e.isTemplateHead(t)&&205===i.parent.kind){var f=i,h=f.parent;return e.Debug.assert(218===f.kind),p(h,c=e.isInsideTemplateLiteral(t,n,r)?0:1,r)}if(e.isTemplateSpan(i)&&e.isTaggedTemplateExpression(i.parent.parent)){var g=i;if(h=i.parent.parent,e.isTemplateTail(t)&&!e.isInsideTemplateLiteral(t,n,r))return;return p(h,c=function(t,n,r,i){return e.Debug.assert(r>=n.getStart(),"Assumed 'position' could not occur before node."),e.isTemplateLiteralToken(n)?e.isInsideTemplateLiteral(n,r,i)?0:t+2:t+1}(g.parent.templateSpans.indexOf(g),t,n,r),r)}if(e.isJsxOpeningLikeElement(i)){var m=i.attributes.pos,_=e.skipTrivia(r.text,i.attributes.end,!1);return{isTypeParameterList:!1,invocation:{kind:0,node:i},argumentsSpan:e.createTextSpan(m,_-m),argumentIndex:0,argumentCount:1}}var v=e.getPossibleTypeArgumentsInfo(t,r);if(v){var y=v.called,b=v.nTypeArguments;return{isTypeParameterList:!0,invocation:a={kind:1,called:y},argumentsSpan:d=e.createTextSpanFromBounds(y.getStart(r),t.end),argumentIndex:b,argumentCount:b+1}}}function u(t){return e.isBinaryExpression(t.parent)?u(t.parent):t}function c(t){return e.isBinaryExpression(t.left)?c(t.left)+1:2}function l(t){return"__type"===t.name&&e.firstDefined(t.declarations,(function(t){return e.isFunctionTypeNode(t)?t.parent.symbol:void 0}))||t}function d(e,t){for(var n=0,r=0,i=e.getChildren();r=0&&i.length>a+1),i[a+1]}function g(t){return 0===t.kind?e.getInvokedExpression(t.node):t.called}function m(e){return 0===e.kind?e.node:1===e.kind?e.called:e.node}!function(e){e[e.Call=0]="Call",e[e.TypeArgs=1]="TypeArgs",e[e.Contextual=2]="Contextual"}(r||(r={})),n.getSignatureHelpItems=function(t,n,r,i,d){var p=t.getTypeChecker(),f=e.findTokenOnLeftOfPosition(n,r);if(f){var h=!!i&&"characterTyped"===i.kind;if(!h||!e.isInString(n,r,f)&&!e.isInComment(n,r)){var _=!!i&&"invoked"===i.kind,b=function(t,n,r,i,a){for(var d=function(t){e.Debug.assert(e.rangeContainsRange(t.parent,t),"Not a subspan",(function(){return"Child: "+e.Debug.formatSyntaxKind(t.kind)+", parent: "+e.Debug.formatSyntaxKind(t.parent.kind)}));var a=function(t,n,r,i){return function(t,n,r,i){var a=function(t,n,r){if(20===t.kind||27===t.kind){var i=t.parent;switch(i.kind){case 207:case 165:case 208:case 209:var a=o(t,n);if(!a)return;var s=a.argumentIndex,l=a.argumentCount,d=a.argumentsSpan,p=e.isMethodDeclaration(i)?r.getContextualTypeForObjectLiteralElement(i):r.getContextualType(i);return p&&{contextualType:p,argumentIndex:s,argumentCount:l,argumentsSpan:d};case 216:var f=u(i),h=r.getContextualType(f),g=20===t.kind?0:c(i)-1,m=c(f);return h&&{contextualType:h,argumentIndex:g,argumentCount:m,argumentsSpan:e.createTextSpanFromNode(i)};default:return}}}(t,r,i);if(a){var s=a.contextualType,d=a.argumentIndex,p=a.argumentCount,f=a.argumentsSpan,h=s.getNonNullableType(),g=h.getCallSignatures();return 1!==g.length?void 0:{isTypeParameterList:!1,invocation:{kind:2,signature:e.first(g),node:t,symbol:l(h.symbol)},argumentsSpan:f,argumentIndex:d,argumentCount:p}}}(t,0,r,i)||s(t,n,r)}(t,n,r,i);if(a)return{value:a}},p=t;!e.isSourceFile(p)&&(a||!e.isBlock(p));p=p.parent){var f=d(p);if("object"==typeof f)return f.value}}(f,r,n,p,_);if(b){d.throwIfCancellationRequested();var D=function(t,n,r,i,o){var s=t.invocation,u=t.argumentCount;switch(s.kind){case 0:if(o&&!function(t,n,r){if(!e.isCallOrNewExpression(n))return!1;var i=n.getChildren(r);switch(t.kind){case 20:return e.contains(i,t);case 27:var o=e.findContainingList(t);return!!o&&e.contains(i,o);case 29:return a(t,r,n.expression);default:return!1}}(i,s.node,r))return;var c=[],l=n.getResolvedSignatureForSignatureHelp(s.node,c,u);return 0===c.length?void 0:{kind:0,candidates:c,resolvedSignature:l};case 1:var d=s.called;if(o&&!a(i,r,e.isIdentifier(d)?d.parent:d))return;if(0!==(c=e.getPossibleGenericSignatures(d,u,n)).length)return{kind:0,candidates:c,resolvedSignature:e.first(c)};var p=n.getSymbolAtLocation(d);return p&&{kind:1,symbol:p};case 2:return{kind:0,candidates:[s.signature],resolvedSignature:s.signature};default:return e.Debug.assertNever(s)}}(b,p,n,f,h);return d.throwIfCancellationRequested(),D?p.runWithCancellationToken(d,(function(e){return 0===D.kind?v(D.candidates,D.resolvedSignature,b,n,e):function(e,t,n,r){var i=t.argumentCount,a=t.argumentsSpan,o=t.invocation,s=t.argumentIndex,u=r.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(e);return u?{items:[y(e,u,r,m(o),n)],applicableSpan:a,selectedItemIndex:0,argumentIndex:s,argumentCount:i}:void 0}(D.symbol,b,n,e)})):e.isSourceFileJS(n)?function(t,n,r){if(2!==t.invocation.kind){var i=g(t.invocation),a=e.isPropertyAccessExpression(i)?i.name.text:void 0,o=n.getTypeChecker();return void 0===a?void 0:e.firstDefined(n.getSourceFiles(),(function(n){return e.firstDefined(n.getNamedDeclarations().get(a),(function(e){var i=e.symbol&&o.getTypeOfSymbolAtLocation(e.symbol,e),a=i&&i.getCallSignatures();if(a&&a.length)return o.runWithCancellationToken(r,(function(e){return v(a,a[0],t,n,e,!0)}))}))}))}}(b,t,d):void 0}}}},function(e){e[e.Candidate=0]="Candidate",e[e.Type=1]="Type"}(i||(i={})),n.getArgumentInfoForCompletions=function(e,t,n){var r=s(e,t,n);return!r||r.isTypeParameterList||0!==r.invocation.kind?void 0:{invocation:r.invocation.node,argumentCount:r.argumentCount,argumentIndex:r.argumentIndex}};var _=70246400;function v(n,r,i,a,o,s){var u,c=i.isTypeParameterList,l=i.argumentCount,d=i.argumentsSpan,p=i.invocation,f=i.argumentIndex,h=m(p),_=2===p.kind?p.symbol:o.getSymbolAtLocation(g(p))||s&&(null===(u=r.declaration)||void 0===u?void 0:u.symbol),v=_?e.symbolToDisplayParts(o,_,s?a:void 0,void 0):e.emptyArray,y=e.map(n,(function(n){return function(n,r,i,a,o,s){var u=(i?D:E)(n,a,o,s);return e.map(u,(function(i){var s=i.isVariadic,u=i.parameters,c=i.prefix,l=i.suffix,d=t(r,c),p=t(l,function(t,n,r){return e.mapToDisplayParts((function(e){e.writePunctuation(":"),e.writeSpace(" ");var i=r.getTypePredicateOfSignature(t);i?r.writeTypePredicate(i,n,void 0,e):r.writeType(r.getReturnTypeOfSignature(t),n,void 0,e)}))}(n,o,a)),f=n.getDocumentationComment(a),h=n.getJsDocTags();return{isVariadic:s,prefixDisplayParts:d,suffixDisplayParts:p,separatorDisplayParts:b,parameters:u,documentation:f,tags:h}}))}(n,v,c,o,h,a)}));0!==f&&e.Debug.assertLessThan(f,l);for(var C=0,S=0,x=0;x1))for(var T=0,w=0,A=k;w=l){C=S+T;break}T++}S+=k.length}return e.Debug.assert(-1!==C),{items:e.flatMapToMutable(y,e.identity),applicableSpan:d,selectedItemIndex:C,argumentIndex:f,argumentCount:l}}function y(n,r,i,a,o){var s=e.symbolToDisplayParts(i,n),u=e.createPrinter({removeComments:!0}),c=r.map((function(e){return C(e,i,a,o,u)})),l=n.getDocumentationComment(i),d=n.getJsDocTags();return{isVariadic:!1,prefixDisplayParts:t(s,[e.punctuationPart(29)]),suffixDisplayParts:[e.punctuationPart(31)],separatorDisplayParts:b,parameters:c,documentation:l,tags:d}}var b=[e.punctuationPart(27),e.spacePart()];function D(n,r,i,a){var o=(n.target||n).typeParameters,s=e.createPrinter({removeComments:!0}),u=(o||e.emptyArray).map((function(e){return C(e,r,i,a,s)})),c=n.thisParameter?[r.symbolToParameterDeclaration(n.thisParameter,i,_)]:[];return r.getExpandedParameters(n).map((function(n){var o=e.factory.createNodeArray(t(c,e.map(n,(function(e){return r.symbolToParameterDeclaration(e,i,_)})))),l=e.mapToDisplayParts((function(e){s.writeList(2576,o,a,e)}));return{isVariadic:!1,parameters:u,prefix:[e.punctuationPart(29)],suffix:t([e.punctuationPart(31)],l)}}))}function E(n,r,i,a){var o=r.hasEffectiveRestParameter(n),s=e.createPrinter({removeComments:!0}),u=e.mapToDisplayParts((function(t){if(n.typeParameters&&n.typeParameters.length){var o=e.factory.createNodeArray(n.typeParameters.map((function(e){return r.typeParameterToDeclaration(e,i,_)})));s.writeList(53776,o,a,t)}})),c=r.getExpandedParameters(n);return c.map((function(n){return{isVariadic:o&&(1===c.length||!!(32768&n[n.length-1].checkFlags)),parameters:n.map((function(t){return function(t,n,r,i,a){var o=e.mapToDisplayParts((function(e){var o=n.symbolToParameterDeclaration(t,r,_);a.writeNode(4,o,i,e)})),s=n.isOptionalParameter(t.valueDeclaration);return{name:t.name,documentation:t.getDocumentationComment(n),displayParts:o,isOptional:s}}(t,r,i,a,s)})),prefix:t(u,[e.punctuationPart(20)]),suffix:[e.punctuationPart(21)]}}))}function C(t,n,r,i,a){var o=e.mapToDisplayParts((function(e){var o=n.typeParameterToDeclaration(t,r,_);a.writeNode(4,o,i,e)}));return{name:t.symbol.name,documentation:t.symbol.getDocumentationComment(n),displayParts:o,isOptional:!1}}}(e.SignatureHelp||(e.SignatureHelp={}))}(u||(u={})),function(e){var t=/^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+\/=]+)$)?/;function n(t,n,r){var i=e.tryParseRawSourceMap(n);if(i&&i.sources&&i.file&&i.mappings&&(!i.sourcesContent||!i.sourcesContent.some(e.isString)))return e.createDocumentPositionMapper(t,i,r)}e.getSourceMapper=function(t){var n=e.createGetCanonicalFileName(t.useCaseSensitiveFileNames()),r=t.getCurrentDirectory(),i=new e.Map,a=new e.Map;return{tryGetSourcePosition:function t(n){if(e.isDeclarationFileName(n.fileName)&&u(n.fileName)){var r=s(n.fileName).getSourcePosition(n);return r&&r!==n?t(r)||r:void 0}},tryGetGeneratedPosition:function(i){if(!e.isDeclarationFileName(i.fileName)){var a=u(i.fileName);if(a){var o=t.getProgram();if(!o.isSourceOfProjectReferenceRedirect(a.fileName)){var c=o.getCompilerOptions(),l=e.outFile(c),d=l?e.removeFileExtension(l)+".d.ts":e.getDeclarationEmitOutputFilePathWorker(i.fileName,o.getCompilerOptions(),r,o.getCommonSourceDirectory(),n);if(void 0!==d){var p=s(d,i.fileName).getGeneratedPosition(i);return p===i?void 0:p}}}}},toLineColumnOffset:function(e,t){return l(e).getLineAndCharacterOfPosition(t)},clearCache:function(){i.clear(),a.clear()}};function o(t){return e.toPath(t,r,n)}function s(r,i){var s,u=o(r),c=a.get(u);if(c)return c;if(t.getDocumentPositionMapper)s=t.getDocumentPositionMapper(r,i);else if(t.readFile){var d=l(r);s=d&&e.getDocumentPositionMapper({getSourceFileLike:l,getCanonicalFileName:n,log:function(e){return t.log(e)}},r,e.getLineInfo(d.text,e.getLineStarts(d)),(function(e){return!t.fileExists||t.fileExists(e)?t.readFile(e):void 0}))}return a.set(u,s||e.identitySourceMapConsumer),s||e.identitySourceMapConsumer}function u(e){var n=t.getProgram();if(n){var r=o(e),i=n.getSourceFileByPath(r);return i&&i.resolvedPath===r?i:void 0}}function c(n){var r=o(n),a=i.get(r);if(void 0!==a)return a||void 0;if(t.readFile&&(!t.fileExists||t.fileExists(r))){var s=t.readFile(r),u=!!s&&function(t,n){return{text:t,lineMap:void 0,getLineAndCharacterOfPosition:function(t){return e.computeLineAndCharacterOfPosition(e.getLineStarts(this),t)}}}(s);return i.set(r,u),u||void 0}i.set(r,!1)}function l(e){return t.getSourceFileLike?t.getSourceFileLike(e):u(e)||c(e)}},e.getDocumentPositionMapper=function(r,i,a,o){var s=e.tryGetSourceMappingURL(a);if(s){var u=t.exec(s);if(u){if(u[1]){var c=u[1];return n(r,e.base64decode(e.sys,c),i)}s=void 0}}var l=[];s&&l.push(s),l.push(i+".map");for(var d=s&&e.getNormalizedAbsolutePath(s,e.getDirectoryPath(i)),p=0,f=l;p2)&&(t.arguments.length<2||e.some(t.arguments,(function(t){return 103===t.kind||e.isIdentifier(t)&&"undefined"===t.text})))}(t)||e.hasPropertyAccessExpressionWithName(t,"catch"))}function s(e){switch(e.kind){case 251:case 208:case 209:t.set(u(e),!0);case 103:case 78:return!0;default:return!1}}function u(e){return e.pos.toString()+":"+e.end.toString()}e.computeSuggestionDiagnostics=function(a,o,s){o.getSemanticDiagnostics(a,s);var c,l=[],d=o.getTypeChecker();a.commonJsModuleIndicator&&(e.programContainsEs6Modules(o)||e.compilerOptionsIndicateEs6Modules(o.getCompilerOptions()))&&function(t){return t.statements.some((function(t){switch(t.kind){case 232:return t.declarationList.declarations.some((function(t){return!!t.initializer&&e.isRequireCall(n(t.initializer),!0)}));case 233:var r=t.expression;if(!e.isBinaryExpression(r))return e.isRequireCall(r,!0);var i=e.getAssignmentDeclarationKind(r);return 1===i||2===i;default:return!1}}))}(a)&&l.push(e.createDiagnosticForNode((c=a.commonJsModuleIndicator,e.isBinaryExpression(c)?c.left:c),e.Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module));var p=e.isSourceFileJS(a);if(t.clear(),function n(r){if(p)(function(t,n){var r,i,a,o;if(208===t.kind){if(e.isVariableDeclaration(t.parent)&&(null===(r=t.symbol.members)||void 0===r?void 0:r.size))return!0;var s=n.getSymbolOfExpando(t,!1);return!(!s||!(null===(i=s.exports)||void 0===i?void 0:i.size)&&!(null===(a=s.members)||void 0===a?void 0:a.size))}return 251===t.kind&&!!(null===(o=t.symbol.members)||void 0===o?void 0:o.size)})(r,d)&&l.push(e.createDiagnosticForNode(e.isVariableDeclaration(r.parent)?r.parent.name:r,e.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration));else{if(e.isVariableStatement(r)&&r.parent===a&&2&r.declarationList.flags&&1===r.declarationList.declarations.length){var o=r.declarationList.declarations[0].initializer;o&&e.isRequireCall(o,!0)&&l.push(e.createDiagnosticForNode(o,e.Diagnostics.require_call_may_be_converted_to_an_import))}e.codefix.parameterShouldGetTypeFromJSDoc(r)&&l.push(e.createDiagnosticForNode(r.name||r,e.Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types))}e.isFunctionLikeDeclaration(r)&&function(n,r,a){(function(t,n){return!e.isAsyncFunction(t)&&t.body&&e.isBlock(t.body)&&(r=t.body,!!e.forEachReturnStatement(r,i))&&function(e,t){var n=t.getTypeAtLocation(e),r=t.getSignaturesOfType(n,0),i=r.length?t.getReturnTypeOfSignature(r[0]):void 0;return!!i&&!!t.getPromisedTypeOfPromise(i)}(t,n);var r})(n,r)&&!t.has(u(n))&&a.push(e.createDiagnosticForNode(!n.name&&e.isVariableDeclaration(n.parent)&&e.isIdentifier(n.parent.name)?n.parent.name:n,e.Diagnostics.This_may_be_converted_to_an_async_function))}(r,d,l),r.forEachChild(n)}(a),e.getAllowSyntheticDefaultImports(o.getCompilerOptions()))for(var f=0,h=a.imports;f0?e.getNodeModifiers(t.declarations[0]):"",r=t&&16777216&t.flags?"optional":"";return n&&r?n+","+r:n||r},t.getSymbolDisplayPartsDocumentationAndSymbolKind=function t(a,o,s,u,c,l,d){void 0===l&&(l=e.getMeaningFromLocation(c));var p,f,h,g,m=[],_=[],v=[],y=e.getCombinedLocalAndExportSymbolFlags(o),b=1&l?i(a,o,c):"",D=!1,E=107===c.kind&&e.isInExpressionContext(c),C=!1;if(107===c.kind&&!E)return{displayParts:[e.keywordPart(107)],documentation:[],symbolKind:"primitive type",tags:void 0};if(""!==b||32&y||2097152&y){"getter"!==b&&"setter"!==b||(b="property");var S=void 0;if(p=E?a.getTypeAtLocation(c):a.getTypeOfSymbolAtLocation(o.exportSymbol||o,c),c.parent&&201===c.parent.kind){var x=c.parent.name;(x===c||x&&0===x.getFullWidth())&&(c=c.parent)}var k=void 0;if(e.isCallOrNewExpression(c)?k=c:(e.isCallExpressionTarget(c)||e.isNewExpressionTarget(c)||c.parent&&(e.isJsxOpeningLikeElement(c.parent)||e.isTaggedTemplateExpression(c.parent))&&e.isFunctionLike(o.valueDeclaration))&&(k=c.parent),k){S=a.getResolvedSignature(k);var T=204===k.kind||e.isCallExpression(k)&&105===k.expression.kind,w=T?p.getConstructSignatures():p.getCallSignatures();if(e.contains(w,S.target)||e.contains(w,S)||(S=w.length?w[0]:void 0),S){switch(T&&32&y?(b="constructor",$(p.symbol,b)):2097152&y?(Q(b="alias"),m.push(e.spacePart()),T&&(m.push(e.keywordPart(102)),m.push(e.spacePart())),J(o)):$(o,b),b){case"JSX attribute":case"property":case"var":case"const":case"let":case"parameter":case"local var":m.push(e.punctuationPart(58)),m.push(e.spacePart()),16&e.getObjectFlags(p)||!p.symbol||(e.addRange(m,e.symbolToDisplayParts(a,p.symbol,u,void 0,5)),m.push(e.lineBreakPart())),T&&(m.push(e.keywordPart(102)),m.push(e.spacePart())),X(S,w,262144);break;default:X(S,w)}D=!0,C=w.length>1}}else if(e.isNameOfFunctionDeclaration(c)&&!(98304&y)||132===c.kind&&166===c.parent.kind){var A=c.parent;o.declarations&&e.find(o.declarations,(function(e){return e===(132===c.kind?A.parent:A)}))&&(w=166===A.kind?p.getNonNullableType().getConstructSignatures():p.getNonNullableType().getCallSignatures(),S=a.isImplementationOfOverload(A)?w[0]:a.getSignatureFromDeclaration(A),166===A.kind?(b="constructor",$(p.symbol,b)):$(169!==A.kind||2048&p.symbol.flags||4096&p.symbol.flags?o:p.symbol,b),X(S,w),D=!0,C=w.length>1)}}if(32&y&&!D&&!E&&(G(),e.getDeclarationOfKind(o,221)?Q("local class"):m.push(e.keywordPart(83)),m.push(e.spacePart()),J(o),Z(o,s)),64&y&&2&l&&(q(),m.push(e.keywordPart(117)),m.push(e.spacePart()),J(o),Z(o,s)),524288&y&&2&l&&(q(),m.push(e.keywordPart(149)),m.push(e.spacePart()),J(o),Z(o,s),m.push(e.spacePart()),m.push(e.operatorPart(62)),m.push(e.spacePart()),e.addRange(m,e.typeToDisplayParts(a,a.getDeclaredTypeOfSymbol(o),u,8388608))),384&y&&(q(),e.some(o.declarations,(function(t){return e.isEnumDeclaration(t)&&e.isEnumConst(t)}))&&(m.push(e.keywordPart(84)),m.push(e.spacePart())),m.push(e.keywordPart(91)),m.push(e.spacePart()),J(o)),1536&y&&!E){q();var O=(H=e.getDeclarationOfKind(o,256))&&H.name&&78===H.name.kind;m.push(e.keywordPart(O?140:139)),m.push(e.spacePart()),J(o)}if(262144&y&&2&l)if(q(),m.push(e.punctuationPart(20)),m.push(e.textPart("type parameter")),m.push(e.punctuationPart(21)),m.push(e.spacePart()),J(o),o.parent)Y(),J(o.parent,u),Z(o.parent,u);else{var N=e.getDeclarationOfKind(o,159);if(void 0===N)return e.Debug.fail();(H=N.parent)&&(e.isFunctionLikeKind(H.kind)?(Y(),S=a.getSignatureFromDeclaration(H),170===H.kind?(m.push(e.keywordPart(102)),m.push(e.spacePart())):169!==H.kind&&H.name&&J(H.symbol),e.addRange(m,e.signatureToDisplayParts(a,S,s,32))):254===H.kind&&(Y(),m.push(e.keywordPart(149)),m.push(e.spacePart()),J(H.symbol),Z(H.symbol,s)))}if(8&y&&(b="enum member",$(o,"enum member"),291===(H=o.declarations[0]).kind)){var I=a.getConstantValue(H);void 0!==I&&(m.push(e.spacePart()),m.push(e.operatorPart(62)),m.push(e.spacePart()),m.push(e.displayPart(e.getTextOfConstantValue(I),"number"==typeof I?e.SymbolDisplayPartKind.numericLiteral:e.SymbolDisplayPartKind.stringLiteral)))}if(2097152&o.flags){if(q(),!D){var F=a.getAliasedSymbol(o);if(F!==o&&F.declarations&&F.declarations.length>0){var L=F.declarations[0],P=e.getNameOfDeclaration(L);if(P){var R=e.isModuleWithStringLiteralName(L)&&e.hasSyntacticModifier(L,2),M="default"!==o.name&&!R,B=t(a,F,e.getSourceFileOfNode(L),L,P,l,M?o:F);m.push.apply(m,B.displayParts),m.push(e.lineBreakPart()),h=B.documentation,g=B.tags}}}switch(o.declarations[0].kind){case 259:m.push(e.keywordPart(92)),m.push(e.spacePart()),m.push(e.keywordPart(140));break;case 266:m.push(e.keywordPart(92)),m.push(e.spacePart()),m.push(e.keywordPart(o.declarations[0].isExportEquals?62:87));break;case 270:m.push(e.keywordPart(92));break;default:m.push(e.keywordPart(99))}m.push(e.spacePart()),J(o),e.forEach(o.declarations,(function(t){if(260===t.kind){var n=t;if(e.isExternalModuleImportEqualsDeclaration(n))m.push(e.spacePart()),m.push(e.operatorPart(62)),m.push(e.spacePart()),m.push(e.keywordPart(143)),m.push(e.punctuationPart(20)),m.push(e.displayPart(e.getTextOfNode(e.getExternalModuleImportEqualsDeclarationExpression(n)),e.SymbolDisplayPartKind.stringLiteral)),m.push(e.punctuationPart(21));else{var r=a.getSymbolAtLocation(n.moduleReference);r&&(m.push(e.spacePart()),m.push(e.operatorPart(62)),m.push(e.spacePart()),J(r,u))}return!0}}))}if(!D)if(""!==b){if(p)if(E?(q(),m.push(e.keywordPart(107))):$(o,b),"property"===b||"JSX attribute"===b||3&y||"local var"===b||E){if(m.push(e.punctuationPart(58)),m.push(e.spacePart()),p.symbol&&262144&p.symbol.flags){var j=e.mapToDisplayParts((function(t){var r=a.typeParameterToDeclaration(p,u,n);K().writeNode(4,r,e.getSourceFileOfNode(e.getParseTreeNode(u)),t)}));e.addRange(m,j)}else e.addRange(m,e.typeToDisplayParts(a,p,u));if(o.target&&o.target.tupleLabelDeclaration){var U=o.target.tupleLabelDeclaration;e.Debug.assertNode(U.name,e.isIdentifier),m.push(e.spacePart()),m.push(e.punctuationPart(20)),m.push(e.textPart(e.idText(U.name))),m.push(e.punctuationPart(21))}}else(16&y||8192&y||16384&y||131072&y||98304&y||"method"===b)&&(w=p.getNonNullableType().getCallSignatures()).length&&(X(w[0],w),C=w.length>1)}else b=r(a,o,c);if(0!==_.length||C||(_=o.getContextualDocumentationComment(u,a)),0===_.length&&4&y&&o.parent&&e.forEach(o.parent.declarations,(function(e){return 297===e.kind})))for(var V=0,z=o.declarations;V0))break}}return 0!==v.length||C||(v=o.getJsDocTags()),0===_.length&&h&&(_=h),0===v.length&&g&&(v=g),{displayParts:m,documentation:_,symbolKind:b,tags:0===v.length?void 0:v};function K(){return f||(f=e.createPrinter({removeComments:!0})),f}function q(){m.length&&m.push(e.lineBreakPart()),G()}function G(){d&&(Q("alias"),m.push(e.spacePart()))}function Y(){m.push(e.spacePart()),m.push(e.keywordPart(100)),m.push(e.spacePart())}function J(t,n){d&&t===o&&(t=d);var r=e.symbolToDisplayParts(a,t,n||s,void 0,7);e.addRange(m,r),16777216&o.flags&&m.push(e.punctuationPart(57))}function $(t,n){q(),n&&(Q(n),t&&!e.some(t.declarations,(function(t){return e.isArrowFunction(t)||(e.isFunctionExpression(t)||e.isClassExpression(t))&&!t.name}))&&(m.push(e.spacePart()),J(t)))}function Q(t){switch(t){case"var":case"function":case"let":case"const":case"constructor":return void m.push(e.textOrKeywordPart(t));default:return m.push(e.punctuationPart(20)),m.push(e.textOrKeywordPart(t)),void m.push(e.punctuationPart(21))}}function X(t,n,r){void 0===r&&(r=0),e.addRange(m,e.signatureToDisplayParts(a,t,u,32|r)),n.length>1&&(m.push(e.spacePart()),m.push(e.punctuationPart(20)),m.push(e.operatorPart(39)),m.push(e.displayPart((n.length-1).toString(),e.SymbolDisplayPartKind.numericLiteral)),m.push(e.spacePart()),m.push(e.textPart(2===n.length?"overload":"overloads")),m.push(e.punctuationPart(21))),_=t.getDocumentationComment(a),v=t.getJsDocTags(),n.length>1&&0===_.length&&0===v.length&&(_=n[0].getDocumentationComment(a),v=n[0].getJsDocTags())}function Z(t,r){var i=e.mapToDisplayParts((function(i){var o=a.symbolToTypeParameterDeclarations(t,r,n);K().writeList(53776,o,e.getSourceFileOfNode(e.getParseTreeNode(r)),i)}));e.addRange(m,i)}}}(e.SymbolDisplay||(e.SymbolDisplay={}))}(u||(u={})),function(e){function t(t,n){var i=[],a=n.compilerOptions?r(n.compilerOptions,i):{},o=e.getDefaultCompilerOptions();for(var s in o)e.hasProperty(o,s)&&void 0===a[s]&&(a[s]=o[s]);for(var u=0,c=e.transpileOptionValueCompilerOptions;u>=5;return n}(f,p),0,r),a[u]=(d=1+((c=f)>>(l=p)&s),e.Debug.assert((d&s)===d,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."),c&~(s<=n.pos?t.pos:a.end:t.pos}(o,n,r),n.end,(function(s){return p(n,o,t.SmartIndenter.getIndentationForNode(o,n,r,i.options),function(e,n,r){for(var i,a=-1;e;){var o=r.getLineAndCharacterOfPosition(e.getStart(r)).line;if(-1!==a&&o!==a)break;if(t.SmartIndenter.shouldIndentChildNode(n,e,i,r))return n.indentSize;a=o,i=e,e=e.parent}return 0}(o,i.options,r),s,i,a,function(t,n){if(!t.length)return a;var r=t.filter((function(t){return e.rangeOverlapsWithStartEnd(n,t.start,t.start+t.length)})).sort((function(e,t){return e.start-t.start}));if(!r.length)return a;var i=0;return function(t){for(;;){if(i>=r.length)return!1;var n=r[i];if(t.end<=n.start)return!1;if(e.startEndOverlapsWithStartEnd(t.pos,t.end,n.start,n.start+n.length))return!0;i++}};function a(){return!1}}(r.parseDiagnostics,n),r)}))}function p(n,r,i,a,o,s,u,c,l){var d,p,h,g,m=s.options,_=s.getRules,v=s.host,y=new t.FormattingContext(l,u,m),b=-1,D=[];if(o.advance(),o.isOnToken()){var E=l.getLineAndCharacterOfPosition(r.getStart(l)).line,C=E;r.decorators&&(C=l.getLineAndCharacterOfPosition(e.getNonDecoratorTokenPosOfNode(r,l)).line),function r(i,a,s,u,f,_){if(e.rangeOverlapsWithStartEnd(n,i.getStart(l),i.getEnd())){var v=x(i,s,f,_),y=a;for(e.forEachChild(i,(function(e){C(e,-1,i,v,s,u,!1)}),(function(e){S(e,i,s,v)}));o.isOnToken();){var D=o.readTokenInfo(i);if(D.token.end>i.end)break;11!==i.kind?I(D,i,v,i):o.advance()}if(!i.parent&&o.isOnEOF()){var E=o.readEOFTokenRange();E.end<=i.end&&d&&A(E,l.getLineAndCharacterOfPosition(E.pos).line,i,d,h,p,a,v)}}function C(a,s,u,c,d,p,f,h){var _=a.getStart(l),v=l.getLineAndCharacterOfPosition(_).line,D=v;a.decorators&&(D=l.getLineAndCharacterOfPosition(e.getNonDecoratorTokenPosOfNode(a,l)).line);var E=-1;if(f&&e.rangeContainsRange(n,u)&&-1!==(E=function(n,r,i,a,o){if(e.rangeOverlapsWithStartEnd(a,n,r)||e.rangeContainsStartEnd(a,n,r)){if(-1!==o)return o}else{var s=l.getLineAndCharacterOfPosition(n).line,u=e.getLineStartPositionForPosition(n,l),c=t.SmartIndenter.findFirstNonWhitespaceColumn(u,n,l,m);if(s!==i||n===c){var d=t.SmartIndenter.getBaseIndentation(m);return d>c?d:c}}return-1}(_,a.end,d,n,s))&&(s=E),!e.rangeOverlapsWithStartEnd(n,a.pos,a.end))return a.end_){C.token.pos>_&&o.skipToStartOf(a);break}I(C,i,c,i)}if(!o.isOnToken())return s;if(e.isToken(a)){var C=o.readTokenInfo(a);if(11!==a.kind)return e.Debug.assert(C.token.end===a.end,"Token end is child end"),I(C,i,c,a),s}var S=161===a.kind?v:p,x=function(e,n,r,i,a,o){var s=t.SmartIndenter.shouldIndentChildNode(m,e)?m.indentSize:0;return o===n?{indentation:n===g?b:a.getIndentation(),delta:Math.min(m.indentSize,a.getDelta(e)+s)}:-1===r?20===e.kind&&n===g?{indentation:b,delta:a.getDelta(e)}:t.SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(i,e,n,l)||t.SmartIndenter.argumentStartsOnSameLineAsPreviousArgument(i,e,n,l)?{indentation:a.getIndentation(),delta:s}:{indentation:a.getIndentation()+a.getDelta(e),delta:s}:{indentation:r,delta:s}}(a,v,E,i,c,S);if(r(a,y,v,D,x.indentation,x.delta),11===a.kind){var k={pos:a.getStart(),end:a.getEnd()};if(k.pos!==k.end){var T=u.getChildren(l),w=T[e.findIndex(T,(function(e){return e.pos===a.pos}))-1];if(w&&l.getLineAndCharacterOfPosition(k.end).line!==l.getLineAndCharacterOfPosition(w.end).line){var A=l.getLineAndCharacterOfPosition(k.pos).line===l.getLineAndCharacterOfPosition(w.end).line;N(k,x.indentation,A,!1,!0)}}}return y=i,h&&199===u.kind&&-1===s&&(s=x.indentation),s}function S(n,r,a,s){e.Debug.assert(e.isNodeArray(n));var u=function(e,t){switch(e.kind){case 166:case 251:case 208:case 165:case 164:case 209:if(e.typeParameters===t)return 29;if(e.parameters===t)return 20;break;case 203:case 204:if(e.typeArguments===t)return 29;if(e.arguments===t)return 20;break;case 173:if(e.typeArguments===t)return 29;break;case 177:return 18}return 0}(r,n),c=s,d=a;if(0!==u)for(;o.isOnToken()&&!((_=o.readTokenInfo(r)).token.end>n.pos);)if(_.token.kind===u){d=l.getLineAndCharacterOfPosition(_.token.pos).line,I(_,r,s,r);var p=void 0;if(-1!==b)p=b;else{var f=e.getLineStartPositionForPosition(_.token.pos,l);p=t.SmartIndenter.findFirstNonWhitespaceColumn(f,_.token.pos,l,m)}c=x(r,a,p,m.indentSize)}else I(_,r,s,r);for(var h=-1,g=0;g0){var S=f(C,m);P(D,E.character,S)}else L(D,E.character)}}}else i||O(n.pos,r,!1)}function I(t,n,r){for(var i=t;io)){var s=F(a,o);-1!==s&&(e.Debug.assert(s===a||!e.isWhiteSpaceSingleLine(l.text.charCodeAt(s-1))),L(s,o+1-s))}}}function F(t,n){for(var r=n;r>=t&&e.isWhiteSpaceSingleLine(l.text.charCodeAt(r));)r--;return r!==n?r+1:-1}function L(t,n){n&&D.push(e.createTextChangeFromStartLength(t,n,""))}function P(t,n,r){(n||r)&&D.push(e.createTextChangeFromStartLength(t,n,r))}}function f(t,n){if((!i||i.tabSize!==n.tabSize||i.indentSize!==n.indentSize)&&(i={tabSize:n.tabSize,indentSize:n.indentSize},a=o=void 0),n.convertTabsToSpaces){var r=void 0,s=Math.floor(t/n.indentSize),u=t%n.indentSize;return o||(o=[]),void 0===o[s]?(r=e.repeatString(" ",n.indentSize*s),o[s]=r):r=o[s],u?r+e.repeatString(" ",u):r}var c=Math.floor(t/n.tabSize),l=t-c*n.tabSize,d=void 0;return a||(a=[]),void 0===a[c]?a[c]=d=e.repeatString("\t",c):d=a[c],l?d+e.repeatString(" ",l):d}t.createTextRangeWithKind=function(t,n,r){var i={pos:t,end:n,kind:r};return e.Debug.isDebugging&&Object.defineProperty(i,"__debugKind",{get:function(){return e.Debug.formatSyntaxKind(r)}}),i},function(e){e[e.Unknown=-1]="Unknown"}(n||(n={})),t.formatOnEnter=function(t,n,r){var i=n.getLineAndCharacterOfPosition(t).line;if(0===i)return[];for(var a=e.getEndLinePosition(i,n);e.isWhiteSpaceSingleLine(n.text.charCodeAt(a));)a--;return e.isLineBreak(n.text.charCodeAt(a))&&a--,d({pos:e.getStartPositionOfLine(i-1,n),end:a+1},n,r,2)},t.formatOnSemicolon=function(e,t,n){return l(u(s(e,26,t)),t,n,3)},t.formatOnOpeningCurly=function(t,n,r){var i=s(t,18,n);if(!i)return[];var a=u(i.parent);return d({pos:e.getLineStartPositionForPosition(a.getStart(n),n),end:t},n,r,4)},t.formatOnClosingCurly=function(e,t,n){return l(u(s(e,19,t)),t,n,5)},t.formatDocument=function(e,t){return d({pos:0,end:e.text.length},e,t,0)},t.formatSelection=function(t,n,r,i){return d({pos:e.getLineStartPositionForPosition(t,r),end:n},r,i,1)},t.formatNodeGivenIndentation=function(e,n,r,i,a,o){var s={pos:0,end:n.text.length};return t.getFormattingScanner(n.text,r,s.pos,s.end,(function(t){return p(s,e,i,a,t,o,1,(function(e){return!1}),n)}))},function(e){e[e.None=0]="None",e[e.LineAdded=1]="LineAdded",e[e.LineRemoved=2]="LineRemoved"}(r||(r={})),t.getRangeOfEnclosingComment=function(t,n,r,i){void 0===i&&(i=e.getTokenAtPosition(t,n));var a=e.findAncestor(i,e.isJSDoc);if(a&&(i=a.parent),!(i.getStart(t)<=n&&nn.end}var g=s(l,e,i),_=g.line===t.line||p(l,e,t.line,i);if(f){var v=m(e,i,c,!_);if(-1!==v)return v+r;if(-1!==(v=u(e,l,t,_,i,c)))return v+r}E(c,l,e,i,o)&&!_&&(r+=c.indentSize);var y=d(l,e,t.line,i);l=(e=l).parent,t=y?i.getLineAndCharacterOfPosition(e.getStart(i)):g}return r+a(c)}function s(e,t,n){var r=f(t,n),i=r?r.pos:e.getStart(n);return n.getLineAndCharacterOfPosition(i)}function u(t,n,r,i,a,o){return!e.isDeclaration(t)&&!e.isStatementButNotDeclaration(t)||297!==n.kind&&i?-1:v(r,a,o)}function c(t,n,r,i){var a=e.findNextToken(t,n,i);return a?18===a.kind?1:19===a.kind&&r===l(a,i).line?2:0:0}function l(e,t){return t.getLineAndCharacterOfPosition(e.getStart(t))}function d(t,n,r,i){if(!e.isCallExpression(t)||!e.contains(t.arguments,n))return!1;var a=t.expression.getEnd();return e.getLineAndCharacterOfPosition(i,a).line===r}function p(t,n,r,i){if(234===t.kind&&t.elseStatement===n){var a=e.findChildOfKind(t,90,i);return e.Debug.assert(void 0!==a),l(a,i).line===r}return!1}function f(e,t){return e.parent&&h(e.getStart(t),e.getEnd(),e.parent,t)}function h(t,n,r,i){switch(r.kind){case 173:return a(r.typeArguments);case 200:return a(r.properties);case 199:return a(r.elements);case 177:return a(r.members);case 251:case 208:case 209:case 165:case 164:case 169:case 166:case 175:case 170:return a(r.typeParameters)||a(r.parameters);case 252:case 221:case 253:case 254:case 330:return a(r.typeParameters);case 204:case 203:return a(r.typeArguments)||a(r.arguments);case 250:return a(r.declarations);case 264:case 268:return a(r.elements);case 196:case 197:return a(r.elements)}function a(a){return a&&e.rangeContainsStartEnd(function(e,t,n){for(var r=e.getChildren(n),i=1;i=0&&n=0;o--)if(27!==t[o].kind){if(r.getLineAndCharacterOfPosition(t[o].end).line!==a.line)return v(a,r,i);a=l(t[o],r)}return-1}function v(e,t,n){var r=t.getPositionOfLineAndCharacter(e.line,0);return b(r,r+e.character,t,n)}function y(t,n,r,i){for(var a=0,o=0,s=t;sr.text.length)return a(i);if(i.indentStyle===e.IndentStyle.None)return 0;var u=e.findPrecedingToken(n,r,void 0,!0),d=t.getRangeOfEnclosingComment(r,n,u||null);if(d&&3===d.kind)return function(t,n,r,i){var a=e.getLineAndCharacterOfPosition(t,n).line-1,o=e.getLineAndCharacterOfPosition(t,i.pos).line;if(e.Debug.assert(o>=0),a<=o)return b(e.getStartPositionOfLine(o,t),n,t,r);var s=e.getStartPositionOfLine(a,t),u=y(s,n,t,r),c=u.column,l=u.character;return 0===c?c:42===t.text.charCodeAt(s+l)?c-1:c}(r,n,i,d);if(!u)return a(i);if(e.isStringOrRegularExpressionOrTemplateLiteral(u.kind)&&u.getStart(r)<=n&&n0;){var a=t.text.charCodeAt(i);if(!e.isWhiteSpaceLike(a))break;i--}return b(e.getLineStartPositionForPosition(i,t),i,t,r)}(r,n,i);if(27===u.kind&&216!==u.parent.kind){var f=function(t,n,r){var i=e.findListItemInfo(t);return i&&i.listItemIndex>0?_(i.list.getChildren(),i.listItemIndex-1,n,r):-1}(u,r,i);if(-1!==f)return f}var v=function(e,t,n){return t&&h(e,e,t,n)}(n,u.parent,r);return v&&!e.rangeContainsRange(v,u)?g(v,r,i)+i.indentSize:function(t,n,r,i,s,u){for(var d,p=r;p;){if(e.positionBelongsToNode(p,n,t)&&E(u,p,d,t,!0)){var f=l(p,t),h=c(r,p,i,t);return o(p,f,void 0,0!==h?s&&2===h?u.indentSize:0:i!==f.line?u.indentSize:0,t,!0,u)}var g=m(p,t,u,!0);if(-1!==g)return g;d=p,p=p.parent}return a(u)}(r,n,u,p,s,i)},n.getIndentationForNode=function(e,t,n,r){var i=n.getLineAndCharacterOfPosition(e.getStart(n));return o(e,i,t,0,n,!1,r)},n.getBaseIndentation=a,function(e){e[e.Unknown=0]="Unknown",e[e.OpenBrace=1]="OpenBrace",e[e.CloseBrace=2]="CloseBrace"}(i||(i={})),n.isArgumentAndStartLineOverlapsExpressionBeingCalled=d,n.childStartsOnTheSameLineWithElseInIfStatement=p,n.argumentStartsOnSameLineAsPreviousArgument=function(t,n,r,i){if(e.isCallOrNewExpression(t)){if(!t.arguments)return!1;var a=e.find(t.arguments,(function(e){return e.pos===n.pos}));if(!a)return!1;var o=t.arguments.indexOf(a);if(0===o)return!1;var s=t.arguments[o-1];if(r===e.getLineAndCharacterOfPosition(i,s.getEnd()).line)return!0}return!1},n.getContainingList=f,n.findFirstNonWhitespaceCharacterAndColumn=y,n.findFirstNonWhitespaceColumn=b,n.nodeWillIndentChild=D,n.shouldIndentChildNode=E}(t.SmartIndenter||(t.SmartIndenter={}))}(e.formatting||(e.formatting={}))}(u||(u={})),function(e){!function(n){function i(t){var n=t.__pos;return e.Debug.assert("number"==typeof n),n}function a(t,n){e.Debug.assert("number"==typeof n),t.__pos=n}function o(t){var n=t.__end;return e.Debug.assert("number"==typeof n),n}function s(t,n){e.Debug.assert("number"==typeof n),t.__end=n}var u,c;function l(t,n){return e.skipTrivia(t,n,!1,!0)}!function(e){e[e.Exclude=0]="Exclude",e[e.IncludeAll=1]="IncludeAll",e[e.JSDoc=2]="JSDoc",e[e.StartLine=3]="StartLine"}(u=n.LeadingTriviaOption||(n.LeadingTriviaOption={})),function(e){e[e.Exclude=0]="Exclude",e[e.ExcludeWhitespace=1]="ExcludeWhitespace",e[e.Include=2]="Include"}(c=n.TrailingTriviaOption||(n.TrailingTriviaOption={}));var d,p={leadingTriviaOption:u.Exclude,trailingTriviaOption:c.Exclude};function f(e,t,n,r){return{pos:h(e,t,r),end:g(e,n,r)}}function h(t,n,r){var i=r.leadingTriviaOption;if(i===u.Exclude)return n.getStart(t);if(i===u.StartLine)return e.getLineStartPositionForPosition(n.getStart(t),t);if(i===u.JSDoc){var a=e.getJSDocCommentRanges(n,t.text);if(null==a?void 0:a.length)return e.getLineStartPositionForPosition(a[0].pos,t)}var o=n.getFullStart(),s=n.getStart(t);if(o===s)return s;var c=e.getLineStartPositionForPosition(o,t);if(e.getLineStartPositionForPosition(s,t)===c)return i===u.IncludeAll?o:s;var d=o>0?1:0,p=e.getStartPositionOfLine(e.getLineOfLocalPosition(t,c)+d,t);return p=l(t.text,p),e.getStartPositionOfLine(e.getLineOfLocalPosition(t,p),t)}function g(t,n,r){var i,a=n.end,o=r.trailingTriviaOption;if(o===c.Exclude)return a;if(o===c.ExcludeWhitespace){var s=e.concatenate(e.getTrailingCommentRanges(t.text,a),e.getLeadingCommentRanges(t.text,a));return(null===(i=null==s?void 0:s[s.length-1])||void 0===i?void 0:i.end)||a}var u=e.skipTrivia(t.text,a,!0);return u===a||o!==c.Include&&!e.isLineBreak(t.text.charCodeAt(u-1))?a:u}function m(e,t){return!!t&&!!e.parent&&(27===t.kind||26===t.kind&&200===e.parent.kind)}!function(e){e[e.Remove=0]="Remove",e[e.ReplaceWithSingleNode=1]="ReplaceWithSingleNode",e[e.ReplaceWithMultipleNodes=2]="ReplaceWithMultipleNodes",e[e.Text=3]="Text"}(d||(d={})),n.isThisTypeAnnotatable=function(t){return e.isFunctionExpression(t)||e.isFunctionDeclaration(t)};var _,v,y=function(){function n(t,n){this.newLineCharacter=t,this.formatContext=n,this.changes=[],this.newFiles=[],this.classesWithNodesInsertedAtStart=new e.Map,this.deletedNodes=[]}return n.fromContext=function(t){return new n(e.getNewLineOrDefaultFromHost(t.host,t.formatContext.options),t.formatContext)},n.with=function(e,t){var r=n.fromContext(e);return t(r),r.getChanges()},n.prototype.pushRaw=function(t,n){e.Debug.assertEqual(t.fileName,n.fileName);for(var r=0,i=n.textChanges;r=t.getLineAndCharacterOfPosition(c.range.end).line+2)break}if(t.statements.length&&(void 0===l&&(l=t.getLineAndCharacterOfPosition(t.statements[0].getStart()).line),l",joiner:", "})},n.prototype.getOptionsForInsertNodeBefore=function(t,n,r){return e.isStatement(t)||e.isClassElement(t)?{suffix:r?this.newLineCharacter+this.newLineCharacter:this.newLineCharacter}:e.isVariableDeclaration(t)?{suffix:", "}:e.isParameter(t)?e.isParameter(n)?{suffix:", "}:{}:e.isStringLiteral(t)&&e.isImportDeclaration(t.parent)||e.isNamedImports(t)?{suffix:", "}:e.isImportSpecifier(t)?{suffix:","+(r?this.newLineCharacter:" ")}:e.Debug.failBadSyntaxKind(t)},n.prototype.insertNodeAtConstructorStart=function(n,r,i){var a=e.firstOrUndefined(r.body.statements);a&&r.body.multiLine?this.insertNodeBefore(n,a,i):this.replaceConstructorBody(n,r,t([i],r.body.statements))},n.prototype.insertNodeAtConstructorEnd=function(n,r,i){var a=e.lastOrUndefined(r.body.statements);a&&r.body.multiLine?this.insertNodeAfter(n,a,i):this.replaceConstructorBody(n,r,t(r.body.statements,[i]))},n.prototype.replaceConstructorBody=function(t,n,r){this.replaceNode(t,n.body,e.factory.createBlock(r,!0))},n.prototype.insertNodeAtEndOfScope=function(t,n,r){var i=h(t,n.getLastToken(),{});this.insertNodeAt(t,i,r,{prefix:e.isLineBreak(t.text.charCodeAt(n.getLastToken().pos))?this.newLineCharacter:this.newLineCharacter+this.newLineCharacter,suffix:this.newLineCharacter})},n.prototype.insertNodeAtClassStart=function(e,t,n){this.insertNodeAtStartWorker(e,t,n)},n.prototype.insertNodeAtObjectStart=function(e,t,n){this.insertNodeAtStartWorker(e,t,n)},n.prototype.insertNodeAtStartWorker=function(e,t,n){var r,i=null!==(r=this.guessIndentationFromExistingMembers(e,t))&&void 0!==r?r:this.computeIndentationForNewMember(e,t);this.insertNodeAt(e,D(t).pos,n,this.getInsertNodeAtStartInsertOptions(e,t,i))},n.prototype.guessIndentationFromExistingMembers=function(t,n){for(var r,i=n,a=0,o=D(n);a=0;r--){var i=n[r],a=i.span,o=i.newText;t=""+t.substring(0,a.start)+o+t.substring(e.textSpanEnd(a))}return t}function C(t){var n=e.visitEachChild(t,C,e.nullTransformationContext,S,C),r=e.nodeIsSynthesized(n)?n:Object.create(n);return e.setTextRangePosEnd(r,i(t),o(t)),r}function S(t,n,r,a,s){var u=e.visitNodes(t,n,r,a,s);if(!u)return u;var c=u===t?e.factory.createNodeArray(u.slice(0)):u;return e.setTextRangePosEnd(c,i(t),o(t)),c}function x(t,n){return!(e.isInComment(t,n)||e.isInString(t,n)||e.isInTemplateString(t,n)||e.isInJSXText(t,n))}function k(e,t,n,r){void 0===r&&(r={leadingTriviaOption:u.IncludeAll});var i=h(t,n,r),a=g(t,n,r);e.deleteRange(t,{pos:i,end:a})}function T(t,n,r,i){var a=e.Debug.checkDefined(e.formatting.SmartIndenter.getContainingList(i,r)),o=e.indexOfNode(a,i);e.Debug.assert(-1!==o),1!==a.length?(e.Debug.assert(!n.has(i),"Deleting a node twice"),n.add(i),t.deleteRange(r,{pos:b(r,i),end:o===a.length-1?g(r,i,{}):b(r,a[o+1])})):k(t,r,i)}n.ChangeTracker=y,n.getNewFileText=function(e,t,n,r){return _.newFileChangesWorker(void 0,t,e,n,r)},function(t){function n(t,n,r,a,o){var s=r.map((function(e){return 4===e?"":i(e,t,a).text})).join(a),u=e.createSourceFile("any file name",s,99,!0,n);return E(s,e.formatting.formatDocument(u,o))+a}function i(t,n,r){var i=function(t){var n=0,r=e.createTextWriter(t);function i(t,i){if(i||!function(t){return e.skipTrivia(t,0)===t.length}(t)){n=r.getTextPos();for(var a=0;e.isWhiteSpaceLike(t.charCodeAt(t.length-a-1));)a++;n-=a}}function o(e){r.write(e),i(e,!1)}function u(e){r.writeComment(e)}function c(e){r.writeKeyword(e),i(e,!1)}function l(e){r.writeOperator(e),i(e,!1)}function d(e){r.writePunctuation(e),i(e,!1)}function p(e){r.writeTrailingSemicolon(e),i(e,!1)}function f(e){r.writeParameter(e),i(e,!1)}function h(e){r.writeProperty(e),i(e,!1)}function g(e){r.writeSpace(e),i(e,!1)}function m(e){r.writeStringLiteral(e),i(e,!1)}function _(e,t){r.writeSymbol(e,t),i(e,!1)}function v(e){r.writeLine(e)}function y(){r.increaseIndent()}function b(){r.decreaseIndent()}function D(){return r.getText()}function E(e){r.rawWrite(e),i(e,!1)}function C(e){r.writeLiteral(e),i(e,!0)}function S(){return r.getTextPos()}function x(){return r.getLine()}function k(){return r.getColumn()}function T(){return r.getIndent()}function w(){return r.isAtStartOfLine()}function A(){r.clear(),n=0}return{onEmitNode:function(e,t,r){t&&a(t,n),r(e,t),t&&s(t,n)},onBeforeEmitNodeArray:function(e){e&&a(e,n)},onAfterEmitNodeArray:function(e){e&&s(e,n)},onBeforeEmitToken:function(e){e&&a(e,n)},onAfterEmitToken:function(e){e&&s(e,n)},write:o,writeComment:u,writeKeyword:c,writeOperator:l,writePunctuation:d,writeTrailingSemicolon:p,writeParameter:f,writeProperty:h,writeSpace:g,writeStringLiteral:m,writeSymbol:_,writeLine:v,increaseIndent:y,decreaseIndent:b,getText:D,rawWrite:E,writeLiteral:C,getTextPos:S,getLine:x,getColumn:k,getIndent:T,isAtStartOfLine:w,hasTrailingComment:function(){return r.hasTrailingComment()},hasTrailingWhitespace:function(){return r.hasTrailingWhitespace()},clear:A}}(r),o="\n"===r?1:0;return e.createPrinter({newLine:o,neverAsciiEscape:!0,preserveSourceNewlines:!0,terminateUnterminatedLiterals:!0},i).writeNode(4,t,n,i),{text:i.getText(),node:C(t)}}t.getTextChangesFromChanges=function(t,n,a,o){return e.mapDefined(e.group(t,(function(e){return e.sourceFile.path})),(function(t){for(var s=t[0].sourceFile,u=e.stableSort(t,(function(e,t){return e.range.pos-t.range.pos||e.range.end-t.range.end})),c=function(t){e.Debug.assert(u[t].range.end<=u[t+1].range.pos,"Changes overlap",(function(){return JSON.stringify(u[t].range)+" and "+JSON.stringify(u[t+1].range)}))},l=0;l0?{fileName:s.fileName,textChanges:p}:void 0}))},t.newFileChanges=function(t,r,i,a,o){var s=n(t,e.getScriptKindFromFileName(r),i,a,o);return{fileName:r,textChanges:[e.createTextChange(e.createTextSpan(0,0),s)],isNewFile:!0}},t.newFileChangesWorker=n,t.getNonformattedText=i}(_||(_={})),n.applyChanges=E,n.isValidLocationToAddComment=x,function(t){function n(t,n,r){if(r.parent.name){var i=e.Debug.checkDefined(e.getTokenAtPosition(n,r.pos-1));t.deleteRange(n,{pos:i.getStart(n),end:r.end})}else k(t,n,e.getAncestor(r,261))}t.deleteDeclaration=function(t,r,i,a){switch(a.kind){case 160:var o=a.parent;e.isArrowFunction(o)&&1===o.parameters.length&&!e.findChildOfKind(o,20,i)?t.replaceNodeWithText(i,a,"()"):T(t,r,i,a);break;case 261:case 260:k(t,i,a,{leadingTriviaOption:i.imports.length&&a===e.first(i.imports).parent||a===e.find(i.statements,e.isAnyImportSyntax)?u.Exclude:e.hasJSDocNodes(a)?u.JSDoc:u.StartLine});break;case 198:var s=a.parent;197===s.kind&&a!==e.last(s.elements)?k(t,i,a):T(t,r,i,a);break;case 249:!function(t,n,r,i){var a=i.parent;if(287!==a.kind)if(1===a.declarations.length){var o=a.parent;switch(o.kind){case 239:case 238:t.replaceNode(r,i,e.factory.createObjectLiteralExpression());break;case 237:k(t,r,a);break;case 232:k(t,r,o,{leadingTriviaOption:e.hasJSDocNodes(o)?u.JSDoc:u.StartLine});break;default:e.Debug.assertNever(o)}}else T(t,n,r,i);else t.deleteNodeRange(r,e.findChildOfKind(a,20,r),e.findChildOfKind(a,21,r))}(t,r,i,a);break;case 159:T(t,r,i,a);break;case 265:var l=a.parent;1===l.elements.length?n(t,i,l):T(t,r,i,a);break;case 263:n(t,i,a);break;case 26:k(t,i,a,{trailingTriviaOption:c.Exclude});break;case 97:k(t,i,a,{leadingTriviaOption:u.Exclude});break;case 252:case 251:k(t,i,a,{leadingTriviaOption:e.hasJSDocNodes(a)?u.JSDoc:u.StartLine});break;default:e.isImportClause(a.parent)&&a.parent.name===a?function(t,n,r){if(r.namedBindings){var i=r.name.getStart(n),a=e.getTokenAtPosition(n,r.name.end);if(a&&27===a.kind){var o=e.skipTrivia(n.text,a.end,!1,!0);t.deleteRange(n,{pos:i,end:o})}else k(t,n,r.name)}else k(t,n,r.parent)}(t,i,a.parent):e.isCallExpression(a.parent)&&e.contains(a.parent.arguments,a)?T(t,r,i,a):k(t,i,a)}}}(v||(v={})),n.deleteNode=k}(e.textChanges||(e.textChanges={}))}(u||(u={})),function(e){!function(n){var i=e.createMultiMap(),a=new e.Map;function s(t){return e.isArray(t)?e.formatStringFromArgs(e.getLocaleSpecificMessage(t[0]),t.slice(1)):e.getLocaleSpecificMessage(t)}function u(e,t,n,r,i,a){return{fixName:e,description:t,changes:n,fixId:r,fixAllDescription:i,commands:a?[a]:void 0}}function c(e,t){return{changes:e,commands:t}}function l(t,n,r){for(var i=0,a=d(t);i1)break}var l=a<2;return function(e){var t=e.fixId,n=e.fixAllDescription,i=o(e,["fixId","fixAllDescription"]);return l?i:r(r({},i),{fixId:t,fixAllDescription:n})}}(i,n))}))},n.getAllFixes=function(t){return a.get(e.cast(t.fixId,e.isString)).getAllCodeActions(t)},n.createCombinedCodeActions=c,n.createFileTextChanges=function(e,t){return{fileName:e,textChanges:t}},n.codeFixAll=function(t,n,r){var i=[];return c(e.textChanges.ChangeTracker.with(t,(function(e){return l(t,n,(function(t){return r(e,t,i)}))})),0===i.length?void 0:i)},n.eachDiagnostic=l}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){var t,n;t=e.refactor||(e.refactor={}),n=new e.Map,t.registerRefactor=function(e,t){n.set(e,t)},t.getApplicableRefactors=function(t){return e.arrayFrom(e.flatMapIterator(n.values(),(function(e){return t.cancellationToken&&t.cancellationToken.isCancellationRequested()?void 0:e.getAvailableActions(t)})))},t.getEditsForRefactor=function(e,t,r){var i=n.get(t);return i&&i.getEditsForAction(e,r)}}(u||(u={})),function(e){!function(t){var n="addConvertToUnknownForNonOverlappingTypes",r=[e.Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];function i(t,n,r){var i=e.getTokenAtPosition(n,r),a=e.Debug.checkDefined(e.findAncestor(i,(function(t){return e.isAsExpression(t)||e.isTypeAssertionExpression(t)})),"Expected to find an assertion expression"),o=e.isAsExpression(a)?e.factory.createAsExpression(a.expression,e.factory.createKeywordTypeNode(152)):e.factory.createTypeAssertion(e.factory.createKeywordTypeNode(152),a.expression);t.replaceNode(n,a.expression,o)}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a=e.textChanges.ChangeTracker.with(r,(function(e){return i(e,r.sourceFile,r.span.start)}));return[t.createCodeFixAction(n,a,e.Diagnostics.Add_unknown_conversion_for_non_overlapping_types,n,e.Diagnostics.Add_unknown_to_all_conversions_of_non_overlapping_types)]},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(e,t){return i(e,t.file,t.start)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){t.registerCodeFix({errorCodes:[e.Diagnostics.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code],getCodeActions:function(n){var r=n.sourceFile,i=e.textChanges.ChangeTracker.with(n,(function(t){var n=e.factory.createExportDeclaration(void 0,void 0,!1,e.factory.createNamedExports([]),void 0);t.insertNodeAtEndOfScope(r,r,n)}));return[t.createCodeFixActionWithoutFixAll("addEmptyExportDeclaration",i,e.Diagnostics.Add_export_to_make_this_file_into_a_module)]}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="addMissingAsync",r=[e.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,e.Diagnostics.Type_0_is_not_assignable_to_type_1.code,e.Diagnostics.Type_0_is_not_comparable_to_type_1.code];function i(r,i,a,o){var s=a((function(t){return function(t,n,r,i){if(!i||!i.has(e.getNodeId(r))){null==i||i.add(e.getNodeId(r));var a=e.factory.updateModifiers(e.getSynthesizedDeepClone(r,!0),e.factory.createNodeArray(e.factory.createModifiersFromModifierFlags(256|e.getSyntacticModifierFlags(r))));t.replaceNode(n,r,a)}}(t,r.sourceFile,i,o)}));return t.createCodeFixAction(n,s,e.Diagnostics.Add_async_modifier_to_containing_function,n,e.Diagnostics.Add_all_missing_async_modifiers)}function a(t,n){if(n){var r=e.getTokenAtPosition(t,n.start);return e.findAncestor(r,(function(r){return r.getStart(t)e.textSpanEnd(n)?"quit":(e.isArrowFunction(r)||e.isMethodDeclaration(r)||e.isFunctionExpression(r)||e.isFunctionDeclaration(r))&&e.textSpansEqual(n,e.createTextSpanFromNode(r,t))}))}}t.registerCodeFix({fixIds:[n],errorCodes:r,getCodeActions:function(t){var n=t.sourceFile,r=t.errorCode,o=t.cancellationToken,s=t.program,u=t.span,c=e.find(s.getDiagnosticsProducingTypeChecker().getDiagnostics(n,o),function(t,n){return function(r){var i=r.start,a=r.length,o=r.relatedInformation,s=r.code;return e.isNumber(i)&&e.isNumber(a)&&e.textSpansEqual({start:i,length:a},t)&&s===n&&!!o&&e.some(o,(function(t){return t.code===e.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code}))}}(u,r)),l=a(n,c&&c.relatedInformation&&e.find(c.relatedInformation,(function(t){return t.code===e.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code})));if(l)return[i(t,l,(function(n){return e.textChanges.ChangeTracker.with(t,n)}))]},getAllCodeActions:function(n){var o=n.sourceFile,s=new e.Set;return t.codeFixAll(n,r,(function(t,r){var u=r.relatedInformation&&e.find(r.relatedInformation,(function(t){return t.code===e.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code})),c=a(o,u);if(c)return i(n,c,(function(e){return e(t),[]}),s)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(n){var r="addMissingAwait",i=e.Diagnostics.Property_0_does_not_exist_on_type_1.code,a=[e.Diagnostics.This_expression_is_not_callable.code,e.Diagnostics.This_expression_is_not_constructable.code],o=t([e.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code,e.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,e.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code,e.Diagnostics.Operator_0_cannot_be_applied_to_type_1.code,e.Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2.code,e.Diagnostics.This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap.code,e.Diagnostics.Type_0_is_not_an_array_type.code,e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type.code,e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators.code,e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,e.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code,e.Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code,e.Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code,e.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,i],a);function s(t,r,i,a,s,u){var c=t.sourceFile,p=t.program,f=t.cancellationToken,h=function(t,n,r,i,a){var s=function(t,n){if(e.isPropertyAccessExpression(t.parent)&&e.isIdentifier(t.parent.expression))return{identifiers:[t.parent.expression],isCompleteFix:!0};if(e.isIdentifier(t))return{identifiers:[t],isCompleteFix:!0};if(e.isBinaryExpression(t)){for(var r=void 0,i=!0,a=0,o=[t.left,t.right];ae.textSpanEnd(r)?"quit":e.isExpression(n)&&e.textSpansEqual(r,e.createTextSpanFromNode(n,t))}));return s&&function(t,n,r,i,a){var o=a.getDiagnosticsProducingTypeChecker().getDiagnostics(t,i);return e.some(o,(function(t){var i=t.start,a=t.length,o=t.relatedInformation,s=t.code;return e.isNumber(i)&&e.isNumber(a)&&e.textSpansEqual({start:i,length:a},r)&&s===n&&!!o&&e.some(o,(function(t){return t.code===e.Diagnostics.Did_you_forget_to_use_await.code}))}))}(t,n,r,i,a)&&l(s)?s:void 0}function l(t){return 32768&t.kind||!!e.findAncestor(t,(function(t){return t.parent&&e.isArrowFunction(t.parent)&&t.parent.body===t||e.isBlock(t)&&(251===t.parent.kind||208===t.parent.kind||209===t.parent.kind||165===t.parent.kind)}))}function d(t,n,r,o,s,u){if(e.isBinaryExpression(s))for(var c=0,l=[s.left,s.right];c0)return[t.createCodeFixAction(n,a,e.Diagnostics.Add_const_to_unresolved_variable,n,e.Diagnostics.Add_const_to_all_unresolved_variables)]},fixIds:[n],getAllCodeActions:function(n){var a=new e.Set;return t.codeFixAll(n,r,(function(e,t){return i(e,t.file,t.start,n.program,a)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="addMissingDeclareProperty",r=[e.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code];function i(t,n,r,i){var a=e.getTokenAtPosition(n,r);if(e.isIdentifier(a)){var o=a.parent;163!==o.kind||i&&!e.tryAddToSet(i,o)||t.insertModifierBefore(n,133,o)}}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a=e.textChanges.ChangeTracker.with(r,(function(e){return i(e,r.sourceFile,r.span.start)}));if(a.length>0)return[t.createCodeFixAction(n,a,e.Diagnostics.Prefix_with_declare,n,e.Diagnostics.Prefix_all_incorrect_property_declarations_with_declare)]},fixIds:[n],getAllCodeActions:function(n){var a=new e.Set;return t.codeFixAll(n,r,(function(e,t){return i(e,t.file,t.start,a)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="addMissingInvocationForDecorator",r=[e.Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];function i(t,n,r){var i=e.getTokenAtPosition(n,r),a=e.findAncestor(i,e.isDecorator);e.Debug.assert(!!a,"Expected position to be owned by a decorator.");var o=e.factory.createCallExpression(a.expression,void 0,void 0);t.replaceNode(n,a.expression,o)}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a=e.textChanges.ChangeTracker.with(r,(function(e){return i(e,r.sourceFile,r.span.start)}));return[t.createCodeFixAction(n,a,e.Diagnostics.Call_decorator_expression,n,e.Diagnostics.Add_to_all_uncalled_decorators)]},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(e,t){return i(e,t.file,t.start)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="addNameToNamelessParameter",r=[e.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];function i(t,n,r){var i=e.getTokenAtPosition(n,r);if(!e.isIdentifier(i))return e.Debug.fail("add-name-to-nameless-parameter operates on identifiers, but got a "+e.Debug.formatSyntaxKind(i.kind));var a=i.parent;if(!e.isParameter(a))return e.Debug.fail("Tried to add a parameter name to a non-parameter: "+e.Debug.formatSyntaxKind(i.kind));var o=a.parent.parameters.indexOf(a);e.Debug.assert(!a.type,"Tried to add a parameter name to a parameter that already had one."),e.Debug.assert(o>-1,"Parameter not found in parent parameter list.");var s=e.factory.createParameterDeclaration(void 0,a.modifiers,a.dotDotDotToken,"arg"+o,a.questionToken,e.factory.createTypeReferenceNode(i,void 0),a.initializer);t.replaceNode(n,i,s)}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a=e.textChanges.ChangeTracker.with(r,(function(e){return i(e,r.sourceFile,r.span.start)}));return[t.createCodeFixAction(n,a,e.Diagnostics.Add_parameter_name,n,e.Diagnostics.Add_names_to_all_parameters_without_names)]},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(e,t){return i(e,t.file,t.start)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="annotateWithTypeFromJSDoc",r=[e.Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types.code];function i(t,n){var r=e.getTokenAtPosition(t,n);return e.tryCast(e.isParameter(r.parent)?r.parent.parent:r.parent,a)}function a(t){return function(t){return e.isFunctionLikeDeclaration(t)||249===t.kind||162===t.kind||163===t.kind}(t)&&o(t)}function o(t){return e.isFunctionLikeDeclaration(t)?t.parameters.some(o)||!t.type&&!!e.getJSDocReturnType(t):!t.type&&!!e.getJSDocType(t)}function s(t,n,r){if(e.isFunctionLikeDeclaration(r)&&(e.getJSDocReturnType(r)||r.parameters.some((function(t){return!!e.getJSDocType(t)})))){if(!r.typeParameters){var i=e.getJSDocTypeParameterDeclarations(r);i.length&&t.insertTypeParameters(n,r,i)}var a=e.isArrowFunction(r)&&!e.findChildOfKind(r,20,n);a&&t.insertNodeBefore(n,e.first(r.parameters),e.factory.createToken(20));for(var o=0,s=r.parameters;o1?(t.delete(n,u),t.insertNodeAfter(n,l,c)):t.replaceNode(n,l,c)}}function d(r){var i=[];return r.members&&r.members.forEach((function(e,r){if("constructor"!==r){var a=s(e,void 0);a&&i.push.apply(i,a)}else t.delete(n,e.valueDeclaration.parent)})),r.exports&&r.exports.forEach((function(t){if("prototype"===t.name){var n=t.declarations[0];1===t.declarations.length&&e.isPropertyAccessExpression(n)&&e.isBinaryExpression(n.parent)&&62===n.parent.operatorToken.kind&&e.isObjectLiteralExpression(n.parent.right)&&(r=s(n.parent.right.symbol,void 0))&&i.push.apply(i,r)}else{var r;(r=s(t,[e.factory.createToken(123)]))&&i.push.apply(i,r)}})),i;function s(r,i){var s=[];if(!(8192&r.flags||4096&r.flags))return s;var u,c,l=r.valueDeclaration,d=l.parent,p=d.right;if(u=l,c=p,!(e.isPropertyAccessExpression(u)?o(u)||e.isFunctionLike(c):e.every(u.properties,(function(t){return!!(e.isMethodDeclaration(t)||e.isGetOrSetAccessorDeclaration(t)||e.isPropertyAssignment(t)&&e.isFunctionExpression(t.initializer)&&t.name||o(t))}))))return s;var f=d.parent&&233===d.parent.kind?d.parent:d;if(t.delete(n,f),!p)return s.push(e.factory.createPropertyDeclaration([],i,r.name,void 0,void 0,void 0)),s;if(e.isPropertyAccessExpression(l)&&(e.isFunctionExpression(p)||e.isArrowFunction(p)))return g(s,p,l.name);if(e.isObjectLiteralExpression(p))return e.flatMap(p.properties,(function(t){return e.isMethodDeclaration(t)||e.isGetOrSetAccessorDeclaration(t)?s.concat(t):e.isPropertyAssignment(t)&&e.isFunctionExpression(t.initializer)?g(s,t.initializer,t.name):o(t)?s:[]}));if(e.isSourceFileJS(n))return s;if(!e.isPropertyAccessExpression(l))return s;var h=e.factory.createPropertyDeclaration(void 0,i,l.name,void 0,void 0,p);return e.copyLeadingComments(d.parent,h,n),s.push(h),s;function g(t,r,o){return e.isFunctionExpression(r)?function(t,r,o){var s=e.concatenate(i,a(r,129)),u=e.factory.createMethodDeclaration(void 0,s,void 0,o,void 0,void 0,r.parameters,void 0,r.body);return e.copyLeadingComments(d,u,n),t.concat(u)}(t,r,o):function(t,r,o){var s,u=r.body;s=230===u.kind?u:e.factory.createBlock([e.factory.createReturnStatement(u)]);var c=e.concatenate(i,a(r,129)),l=e.factory.createMethodDeclaration(void 0,c,void 0,o,void 0,void 0,r.parameters,void 0,s);return e.copyLeadingComments(d,l,n),t.concat(l)}(t,r,o)}}}}function a(t,n){return e.filter(t.modifiers,(function(e){return e.kind===n}))}function o(t){return!!t.name&&!(!e.isIdentifier(t.name)||"constructor"!==t.name.text)}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a=e.textChanges.ChangeTracker.with(r,(function(e){return i(e,r.sourceFile,r.span.start,r.program.getTypeChecker())}));return[t.createCodeFixAction(n,a,e.Diagnostics.Convert_function_to_an_ES2015_class,n,e.Diagnostics.Convert_all_constructor_functions_to_classes)]},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(t,n){return i(t,n.file,n.start,e.program.getTypeChecker())}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(n){var r,i="convertToAsyncFunction",a=[e.Diagnostics.This_may_be_converted_to_an_async_function.code],o=!0;function s(t,n,r,i,a){var o,s=e.getTokenAtPosition(n,r);if(o=e.isIdentifier(s)&&e.isVariableDeclaration(s.parent)&&s.parent.initializer&&e.isFunctionLikeDeclaration(s.parent.initializer)?s.parent.initializer:e.tryCast(e.getContainingFunction(e.getTokenAtPosition(n,r)),e.isFunctionLikeDeclaration)){var d,f,h=new e.Map,g=e.isInJSFile(o),m=function(t,n){if(!t.body)return new e.Set;var r=new e.Set;return e.forEachChild(t.body,(function t(i){u(i,n,"then")?(r.add(e.getNodeId(i)),e.forEach(i.arguments,t)):u(i,n,"catch")?(r.add(e.getNodeId(i)),e.forEachChild(i,t)):c(i,n)?r.add(e.getNodeId(i)):e.forEachChild(i,t)})),r}(o,i),v=function(t,n,r,i){var a=new e.Map,o=e.createMultiMap();return e.forEachChild(t,(function t(s){if(e.isIdentifier(s)){var u=n.getSymbolAtLocation(s),c=u&&function(e,t){return e.valueDeclaration&&e.valueDeclaration.getSourceFile()===t}(u,i);if(u&&c){var d=_(n.getTypeAtLocation(s),n),p=e.getSymbolId(u).toString();if(!d||e.isParameter(s.parent)||e.isFunctionLikeDeclaration(s.parent)||r.has(p)){if(s.parent&&(e.isParameter(s.parent)||e.isVariableDeclaration(s.parent)||e.isBindingElement(s.parent))){var f=s.text,h=o.get(f);if(h&&h.some((function(e){return e!==u}))){var g=l(s,o);a.set(p,g.identifier),r.set(p,g),o.add(f,u)}else{var m=e.getSynthesizedDeepClone(s);r.set(p,E(m)),o.add(f,u)}}}else{var v=e.firstOrUndefined(d.parameters),y=v&&e.isParameter(v.valueDeclaration)&&e.tryCast(v.valueDeclaration.name,e.isIdentifier)||e.factory.createUniqueName("result",16),b=l(y,o);r.set(p,b),o.add(y.text,u)}}}else e.forEachChild(s,t)})),e.getSynthesizedDeepCloneWithReplacements(t,!0,(function(t){if(e.isBindingElement(t)&&e.isIdentifier(t.name)&&e.isObjectBindingPattern(t.parent)){if((i=(r=n.getSymbolAtLocation(t.name))&&a.get(String(e.getSymbolId(r))))&&i.text!==(t.name||t.propertyName).getText())return e.factory.createBindingElement(t.dotDotDotToken,t.propertyName||t.name,i,t.initializer)}else if(e.isIdentifier(t)){var r,i;if(i=(r=n.getSymbolAtLocation(t))&&a.get(String(e.getSymbolId(r))))return e.factory.createIdentifier(i.text)}}))}(o,i,h,a.sourceFile),y=v.body&&e.isBlock(v.body)?(d=v.body,f=[],e.forEachReturnStatement(d,(function(t){e.isReturnStatementWithFixablePromiseHandler(t)&&f.push(t)})),f):e.emptyArray,b={checker:i,synthNamesMap:h,setOfExpressionsToReturn:m,isInJSFile:g};if(y.length){t.insertLastModifierBefore(n,129,o);for(var D=function(r){e.forEachChild(r,(function i(a){if(e.isCallExpression(a)){var o=p(a,b);t.replaceNodeWithNodes(n,r,o)}else e.isFunctionLike(a)||e.forEachChild(a,i)}))},C=0,S=y;C0)return L;if(T){if(F=m(a.checker,T,k),S(i,a))return h(F,null===(p=i.typeArguments)||void 0===p?void 0:p[0]);var P=f(n,F,void 0);return n&&n.types.push(T),P}return d();default:return d()}return e.emptyArray}function m(t,n,r){var i=e.getSynthesizedDeepClone(r);return t.getPromisedTypeOfPromise(n)?e.factory.createAwaitExpression(i):i}function _(t,n){var r=n.getSignaturesOfType(t,0);return e.lastOrUndefined(r)}function v(t,n,r){for(var i=[],a=0,o=n;a0)return}else e.isFunctionLike(a)||e.forEachChild(a,n)}))}return i}function y(t,n){var r,i=[];if(e.isFunctionLikeDeclaration(t)?t.parameters.length>0&&(r=function t(n){return e.isIdentifier(n)?a(n):function(t,n,r){return void 0===n&&(n=e.emptyArray),void 0===r&&(r=[]),{kind:1,bindingPattern:t,elements:n,types:r}}(n,e.flatMap(n.elements,(function(n){return e.isOmittedExpression(n)?[]:[t(n.name)]})))}(t.parameters[0].name)):e.isIdentifier(t)&&(r=a(t)),r&&(!("identifier"in r)||"undefined"!==r.identifier.text))return r;function a(t){var r=function(e){return e.symbol?e.symbol:n.checker.getSymbolAtLocation(e)}(function(e){return e.original?e.original:e}(t));return r&&n.synthNamesMap.get(e.getSymbolId(r).toString())||E(t,i)}}function b(t){return!t||(C(t)?!t.identifier.text:e.every(t.elements,b))}function D(e){return C(e)?e.identifier:e.bindingPattern}function E(e,t){return void 0===t&&(t=[]),{kind:0,identifier:e,types:t,hasBeenDeclared:!1}}function C(e){return 0===e.kind}function S(t,n){return!!t.original&&n.setOfExpressionsToReturn.has(e.getNodeId(t.original))}n.registerCodeFix({errorCodes:a,getCodeActions:function(t){o=!0;var r=e.textChanges.ChangeTracker.with(t,(function(e){return s(e,t.sourceFile,t.span.start,t.program.getTypeChecker(),t)}));return o?[n.createCodeFixAction(i,r,e.Diagnostics.Convert_to_async_function,i,e.Diagnostics.Convert_all_to_async_functions)]:[]},fixIds:[i],getAllCodeActions:function(e){return n.codeFixAll(e,a,(function(t,n){return s(t,n.file,n.start,e.program.getTypeChecker(),e)}))}}),function(e){e[e.Identifier=0]="Identifier",e[e.BindingPattern=1]="BindingPattern"}(r||(r={}))}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){function n(t,n,r,i){for(var a=0,o=t.imports;a1?[[o(r),s(r)],!0]:[[s(r)],!0]:[[o(r)],!1]}(d.arguments[0],n):void 0;return f?(i.replaceNodeWithNodes(t,r.parent,f[0]),f[1]):(i.replaceRangeWithText(t,e.createRange(l.getStart(t),d.pos),"export default"),!0)}i.delete(t,r.parent)}else e.isExportsOrModuleExportsOrAlias(t,l.expression)&&function(t,n,r,i){var a=n.left.name.text,o=i.get(a);if(void 0!==o){var s=[g(void 0,o,n.right),m([e.factory.createExportSpecifier(o,a)])];r.replaceNodeWithNodes(t,n.parent,s)}else!function(t,n,r){var i=t.left,a=t.right,o=t.parent,s=i.name.text;if(!(e.isFunctionExpression(a)||e.isArrowFunction(a)||e.isClassExpression(a))||a.name&&a.name.text!==s)r.replaceNodeRangeWithNodes(n,i.expression,e.findChildOfKind(i,24,n),[e.factory.createToken(92),e.factory.createToken(84)],{joiner:" ",suffix:" "});else{r.replaceRange(n,{pos:i.getStart(n),end:a.getStart(n)},e.factory.createToken(92),{suffix:" "}),a.name||r.insertName(n,a,s);var u=e.findChildOfKind(o,26,n);u&&r.delete(n,u)}}(n,t,r)}(t,r,i,a);return!1}(t,r,_,i,d,f)}default:return!1}}function a(n,r,i,a,o,s,u){var l,d=r.declarationList,p=!1,m=e.map(d.declarations,(function(r){var i=r.name,l=r.initializer;if(l){if(e.isExportsOrModuleExportsOrAlias(n,l))return p=!0,_([]);if(e.isRequireCall(l,!0))return p=!0,function(n,r,i,a,o,s){switch(n.kind){case 196:var u=e.mapAllOrFail(n.elements,(function(t){return t.dotDotDotToken||t.initializer||t.propertyName&&!e.isIdentifier(t.propertyName)||!e.isIdentifier(t.name)?void 0:h(t.propertyName&&t.propertyName.text,t.name.text)}));if(u)return _([e.makeImport(void 0,u,r,s)]);case 197:var l=c(t.moduleSpecifierToValidIdentifier(r.text,o),a);return _([e.makeImport(e.factory.createIdentifier(l),void 0,r,s),g(void 0,e.getSynthesizedDeepClone(n),e.factory.createIdentifier(l))]);case 78:return function(t,n,r,i,a){for(var o,s=r.getSymbolAtLocation(t),u=new e.Map,l=!1,d=0,p=i.original.get(t.text);d=e.ModuleKind.ES2015)return r?1:2;if(e.isInJSFile(t))return e.isExternalModule(t)?1:3;for(var i=0,a=t.statements;i"),[e.Diagnostics.Convert_function_expression_0_to_arrow_function,u?u.text:e.ANONYMOUS]}return t.replaceNode(n,s,e.factory.createToken(84)),t.insertText(n,u.end," = "),t.insertText(n,c.pos," =>"),[e.Diagnostics.Convert_function_declaration_0_to_arrow_function,u.text]}}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a,o=r.sourceFile,s=r.program,u=r.span,c=e.textChanges.ChangeTracker.with(r,(function(e){a=i(e,o,u.start,s.getTypeChecker())}));return a?[t.createCodeFixAction(n,c,a,n,e.Diagnostics.Fix_all_implicit_this_errors)]:e.emptyArray},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(t,n){i(t,n.file,n.start,e.program.getTypeChecker())}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="fixIncorrectNamedTupleSyntax",r=[e.Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type.code,e.Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type.code];t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var i=r.sourceFile,a=r.span,o=function(t,n){var r=e.getTokenAtPosition(t,n);return e.findAncestor(r,(function(e){return 192===e.kind}))}(i,a.start),s=e.textChanges.ChangeTracker.with(r,(function(t){return function(t,n,r){if(r){for(var i=r.type,a=!1,o=!1;180===i.kind||181===i.kind||186===i.kind;)180===i.kind?a=!0:181===i.kind&&(o=!0),i=i.type;var s=e.factory.updateNamedTupleMember(r,r.dotDotDotToken||(o?e.factory.createToken(25):void 0),r.name,r.questionToken||(a?e.factory.createToken(57):void 0),i);s!==r&&t.replaceNode(n,r,s)}}(t,i,o)}));return[t.createCodeFixAction(n,s,e.Diagnostics.Move_labeled_tuple_element_modifiers_to_labels,n,e.Diagnostics.Move_labeled_tuple_element_modifiers_to_labels)]},fixIds:[n]})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="fixSpelling",r=[e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_1.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code,e.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2.code,e.Diagnostics.No_overload_matches_this_call.code,e.Diagnostics.Type_0_is_not_assignable_to_type_1.code];function i(t,n,r,i){var a=e.getTokenAtPosition(t,n),o=a.parent;if(i!==e.Diagnostics.No_overload_matches_this_call.code&&i!==e.Diagnostics.Type_0_is_not_assignable_to_type_1.code||e.isJsxAttribute(o)){var s,u=r.program.getTypeChecker();if(e.isPropertyAccessExpression(o)&&o.name===a){e.Debug.assert(e.isIdentifierOrPrivateIdentifier(a),"Expected an identifier for spelling (property access)");var c=u.getTypeAtLocation(o.expression);32&o.flags&&(c=u.getNonNullableType(c)),s=u.getSuggestedSymbolForNonexistentProperty(a,c)}else if(e.isQualifiedName(o)&&o.right===a){var l=u.getSymbolAtLocation(o.left);l&&1536&l.flags&&(s=u.getSuggestedSymbolForNonexistentModule(o.right,l))}else if(e.isImportSpecifier(o)&&o.name===a){e.Debug.assertNode(a,e.isIdentifier,"Expected an identifier for spelling (import)");var d=function(t,n,r){if(r&&e.isStringLiteralLike(r.moduleSpecifier)){var i=e.getResolvedModule(t,r.moduleSpecifier.text);return i?n.program.getSourceFile(i.resolvedFileName):void 0}}(t,r,e.findAncestor(a,e.isImportDeclaration));d&&d.symbol&&(s=u.getSuggestedSymbolForNonexistentModule(a,d.symbol))}else if(e.isJsxAttribute(o)&&o.name===a){e.Debug.assertNode(a,e.isIdentifier,"Expected an identifier for JSX attribute");var p=e.findAncestor(a,e.isJsxOpeningLikeElement),f=u.getContextualTypeForArgumentAtIndex(p,0);s=u.getSuggestedSymbolForNonexistentJSXAttribute(a,f)}else{var h=e.getMeaningFromLocation(a),g=e.getTextOfNode(a);e.Debug.assert(void 0!==g,"name should be defined"),s=u.getSuggestedSymbolForNonexistentSymbol(a,g,function(e){var t=0;return 4&e&&(t|=1920),2&e&&(t|=788968),1&e&&(t|=111551),t}(h))}return void 0===s?void 0:{node:a,suggestedSymbol:s}}}function a(t,n,r,i,a){var o=e.symbolName(i);if(!e.isIdentifierText(o,a)&&e.isPropertyAccessExpression(r.parent)){var s=i.valueDeclaration;e.isNamedDeclaration(s)&&e.isPrivateIdentifier(s.name)?t.replaceNode(n,r,e.factory.createIdentifier(o)):t.replaceNode(n,r.parent,e.factory.createElementAccessExpression(r.parent.expression,e.factory.createStringLiteral(o)))}else t.replaceNode(n,r,e.factory.createIdentifier(o))}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var o=r.sourceFile,s=r.errorCode,u=i(o,r.span.start,r,s);if(u){var c=u.node,l=u.suggestedSymbol,d=r.host.getCompilationSettings().target,p=e.textChanges.ChangeTracker.with(r,(function(e){return a(e,o,c,l,d)}));return[t.createCodeFixAction("spelling",p,[e.Diagnostics.Change_spelling_to_0,e.symbolName(l)],n,e.Diagnostics.Fix_all_detected_spelling_errors)]}},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(t,n){var r=i(n.file,n.start,e,n.code),o=e.host.getCompilationSettings().target;r&&a(t,e.sourceFile,r.node,r.suggestedSymbol,o)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n,r="returnValueCorrect",i="fixAddReturnStatement",a="fixRemoveBracesFromArrowFunctionBody",o="fixWrapTheBlockWithParen",s=[e.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value.code,e.Diagnostics.Type_0_is_not_assignable_to_type_1.code,e.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code];function u(t,n,r){var i=t.createSymbol(4,n.escapedText);i.type=t.getTypeAtLocation(r);var a=e.createSymbolTable([i]);return t.createAnonymousType(void 0,a,[],[],void 0,void 0)}function c(t,r,i,a){if(r.body&&e.isBlock(r.body)&&1===e.length(r.body.statements)){var o=e.first(r.body.statements);if(e.isExpressionStatement(o)&&l(t,r,t.getTypeAtLocation(o.expression),i,a))return{declaration:r,kind:n.MissingReturnStatement,expression:o.expression,statement:o,commentSource:o.expression};if(e.isLabeledStatement(o)&&e.isExpressionStatement(o.statement)){var s=e.factory.createObjectLiteralExpression([e.factory.createPropertyAssignment(o.label,o.statement.expression)]);if(l(t,r,u(t,o.label,o.statement.expression),i,a))return e.isArrowFunction(r)?{declaration:r,kind:n.MissingParentheses,expression:s,statement:o,commentSource:o.statement.expression}:{declaration:r,kind:n.MissingReturnStatement,expression:s,statement:o,commentSource:o.statement.expression}}else if(e.isBlock(o)&&1===e.length(o.statements)){var c=e.first(o.statements);if(e.isLabeledStatement(c)&&e.isExpressionStatement(c.statement)&&(s=e.factory.createObjectLiteralExpression([e.factory.createPropertyAssignment(c.label,c.statement.expression)]),l(t,r,u(t,c.label,c.statement.expression),i,a)))return{declaration:r,kind:n.MissingReturnStatement,expression:s,statement:o,commentSource:c}}}}function l(t,n,r,i,a){if(a){var o=t.getSignatureFromDeclaration(n);if(o){e.hasSyntacticModifier(n,256)&&(r=t.createPromiseType(r));var s=t.createSignature(n,o.typeParameters,o.thisParameter,o.parameters,r,void 0,o.minArgumentCount,o.flags);r=t.createAnonymousType(void 0,e.createSymbolTable(),[s],[],void 0,void 0)}else r=t.getAnyType()}return t.isTypeAssignableTo(r,i)}function d(t,n,r,i){var a=e.getTokenAtPosition(n,r);if(a.parent){var o=e.findAncestor(a.parent,e.isFunctionLikeDeclaration);switch(i){case e.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value.code:if(!(o&&o.body&&o.type&&e.rangeContainsRange(o.type,a)))return;return c(t,o,t.getTypeFromTypeNode(o.type),!1);case e.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code:if(!o||!e.isCallExpression(o.parent)||!o.body)return;var s=o.parent.arguments.indexOf(o),u=t.getContextualTypeForArgumentAtIndex(o.parent,s);if(!u)return;return c(t,o,u,!0);case e.Diagnostics.Type_0_is_not_assignable_to_type_1.code:if(!e.isDeclarationName(a)||!e.isVariableLike(a.parent)&&!e.isJsxAttribute(a.parent))return;var l=function(t){switch(t.kind){case 249:case 160:case 198:case 163:case 288:return t.initializer;case 280:return t.initializer&&(e.isJsxExpression(t.initializer)?t.initializer.expression:void 0);case 289:case 162:case 291:case 333:case 326:return}}(a.parent);if(!l||!e.isFunctionLikeDeclaration(l)||!l.body)return;return c(t,l,t.getTypeAtLocation(a.parent),!0)}}}function p(t,n,r,i){e.suppressLeadingAndTrailingTrivia(r);var a=e.probablyUsesSemicolons(n);t.replaceNode(n,i,e.factory.createReturnStatement(r),{leadingTriviaOption:e.textChanges.LeadingTriviaOption.Exclude,trailingTriviaOption:e.textChanges.TrailingTriviaOption.Exclude,suffix:a?";":void 0})}function f(t,n,r,i,a,o){var s=o||e.needsParentheses(i)?e.factory.createParenthesizedExpression(i):i;e.suppressLeadingAndTrailingTrivia(a),e.copyComments(a,s),t.replaceNode(n,r.body,s)}function h(t,n,r,i){t.replaceNode(n,r.body,e.factory.createParenthesizedExpression(i))}function g(n,a,o){var s=e.textChanges.ChangeTracker.with(n,(function(e){return p(e,n.sourceFile,a,o)}));return t.createCodeFixAction(r,s,e.Diagnostics.Add_a_return_statement,i,e.Diagnostics.Add_all_missing_return_statement)}function m(n,i,a){var s=e.textChanges.ChangeTracker.with(n,(function(e){return h(e,n.sourceFile,i,a)}));return t.createCodeFixAction(r,s,e.Diagnostics.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal,o,e.Diagnostics.Wrap_all_object_literal_with_parentheses)}!function(e){e[e.MissingReturnStatement=0]="MissingReturnStatement",e[e.MissingParentheses=1]="MissingParentheses"}(n||(n={})),t.registerCodeFix({errorCodes:s,fixIds:[i,a,o],getCodeActions:function(i){var o=i.program,s=i.sourceFile,u=i.span.start,c=i.errorCode,l=d(o.getTypeChecker(),s,u,c);if(l)return l.kind===n.MissingReturnStatement?e.append([g(i,l.expression,l.statement)],e.isArrowFunction(l.declaration)?function(n,i,o,s){var u=e.textChanges.ChangeTracker.with(n,(function(e){return f(e,n.sourceFile,i,o,s,!1)}));return t.createCodeFixAction(r,u,e.Diagnostics.Remove_braces_from_arrow_function_body,a,e.Diagnostics.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues)}(i,l.declaration,l.expression,l.commentSource):void 0):[m(i,l.declaration,l.expression)]},getAllCodeActions:function(n){return t.codeFixAll(n,s,(function(t,r){var s=d(n.program.getTypeChecker(),r.file,r.start,r.code);if(s)switch(n.fixId){case i:p(t,r.file,s.expression,s.statement);break;case a:if(!e.isArrowFunction(s.declaration))return;f(t,r.file,s.declaration,s.expression,s.commentSource,!1);break;case o:if(!e.isArrowFunction(s.declaration))return;h(t,r.file,s.declaration,s.expression);break;default:e.Debug.fail(JSON.stringify(n.fixId))}}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n,r="addMissingMember",i=[e.Diagnostics.Property_0_does_not_exist_on_type_1.code,e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code,e.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2.code,e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code,e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code],a="addMissingMember";function o(t,n,r,i){var a=e.getTokenAtPosition(t,n);if(e.isIdentifier(a)||e.isPrivateIdentifier(a)){var o=a.parent;if(e.isPropertyAccessExpression(o)){var s=e.skipConstraint(r.getTypeAtLocation(o.expression)),u=s.symbol;if(u&&u.declarations){var c=e.find(u.declarations,e.isClassLike);if(c||!e.isPrivateIdentifier(a)){var l=c||e.find(u.declarations,e.isInterfaceDeclaration);if(l&&!i.isSourceFileFromExternalLibrary(l.getSourceFile())){var d=(s.target||s)!==r.getDeclaredTypeOfSymbol(u);if(d&&(e.isPrivateIdentifier(a)||e.isInterfaceDeclaration(l)))return;var p=l.getSourceFile(),f=(d?32:0)|(e.startsWithUnderscore(a.text)?8:0),h=e.isSourceFileJS(p);return{kind:1,token:a,call:e.tryCast(o.parent,e.isCallExpression),modifierFlags:f,parentDeclaration:l,declSourceFile:p,isJSFile:h}}var g=e.find(u.declarations,e.isEnumDeclaration);return!g||e.isPrivateIdentifier(a)||i.isSourceFileFromExternalLibrary(g.getSourceFile())?void 0:{kind:0,token:a,parentDeclaration:g}}}}}}function s(t,n,r,i,a){var o=i.text;if(a){if(221===r.kind)return;var s=r.name.getText(),c=u(e.factory.createIdentifier(s),o);t.insertNodeAfter(n,r,c)}else if(e.isPrivateIdentifier(i)){var l=e.factory.createPropertyDeclaration(void 0,void 0,o,void 0,void 0,void 0),p=d(r);p?t.insertNodeAfter(n,p,l):t.insertNodeAtClassStart(n,r,l)}else{var f=e.getFirstConstructorWithBody(r);if(!f)return;var h=u(e.factory.createThis(),o);t.insertNodeAtConstructorEnd(n,f,h)}}function u(t,n){return e.factory.createExpressionStatement(e.factory.createAssignment(e.factory.createPropertyAccessExpression(t,n),e.factory.createIdentifier("undefined")))}function c(t,n,r){var i;if(216===r.parent.parent.kind){var a=r.parent.parent,o=r.parent===a.left?a.right:a.left,s=t.getWidenedType(t.getBaseTypeOfLiteralType(t.getTypeAtLocation(o)));i=t.typeToTypeNode(s,n,void 0)}else{var u=t.getContextualType(r.parent);i=u?t.typeToTypeNode(u,void 0,void 0):void 0}return i||e.factory.createKeywordTypeNode(128)}function l(t,n,r,i,a,o){var s=e.factory.createPropertyDeclaration(void 0,o?e.factory.createNodeArray(e.factory.createModifiersFromModifierFlags(o)):void 0,i,void 0,a,void 0),u=d(r);u?t.insertNodeAfter(n,u,s):t.insertNodeAtClassStart(n,r,s)}function d(t){for(var n,r=0,i=t.members;r=e.ModuleKind.ES2015&&o99)&&(s=e.textChanges.ChangeTracker.with(n,(function(n){if(e.getTsConfigObjectLiteralExpression(i)){var r=[["target",e.factory.createStringLiteral("es2017")]];o===e.ModuleKind.CommonJS&&r.push(["module",e.factory.createStringLiteral("commonjs")]),t.setJsonCompilerOptionValues(n,i,r)}})),a.push(t.createCodeFixActionWithoutFixAll("fixTargetOption",s,[e.Diagnostics.Set_the_target_option_in_your_configuration_file_to_0,"es2017"]))),a.length?a:void 0}}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="fixPropertyAssignment",r=[e.Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code];function i(t,n,r){t.replaceNode(n,r,e.factory.createPropertyAssignment(r.name,r.objectAssignmentInitializer))}function a(t,n){return e.cast(e.getTokenAtPosition(t,n).parent,e.isShorthandPropertyAssignment)}t.registerCodeFix({errorCodes:r,fixIds:[n],getCodeActions:function(r){var o=a(r.sourceFile,r.span.start),s=e.textChanges.ChangeTracker.with(r,(function(e){return i(e,r.sourceFile,o)}));return[t.createCodeFixAction(n,s,[e.Diagnostics.Change_0_to_1,"=",":"],n,[e.Diagnostics.Switch_each_misused_0_to_1,"=",":"])]},getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(e,t){return i(e,t.file,a(t.file,t.start))}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="extendsInterfaceBecomesImplements",r=[e.Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code];function i(t,n){var r=e.getTokenAtPosition(t,n),i=e.getContainingClass(r).heritageClauses,a=i[0].getFirstToken();return 93===a.kind?{extendsToken:a,heritageClauses:i}:void 0}function a(t,n,r,i){if(t.replaceNode(n,r,e.factory.createToken(116)),2===i.length&&93===i[0].token&&116===i[1].token){var a=i[1].getFirstToken(),o=a.getFullStart();t.replaceRange(n,{pos:o,end:o},e.factory.createToken(27));for(var s=n.text,u=a.end;u":">","}":"}"};function o(t,n,r,i,o){var s=r.getText()[i];if(function(t){return e.hasProperty(a,t)}(s)){var u=o?a[s]:"{"+e.quote(r,n,s)+"}";t.replaceRangeWithText(r,{pos:i,end:i+1},u)}}}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="unusedIdentifier",r="unusedIdentifier_prefix",i="unusedIdentifier_delete",a="unusedIdentifier_infer",o=[e.Diagnostics._0_is_declared_but_its_value_is_never_read.code,e.Diagnostics._0_is_declared_but_never_used.code,e.Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code,e.Diagnostics.All_imports_in_import_declaration_are_unused.code,e.Diagnostics.All_destructured_elements_are_unused.code,e.Diagnostics.All_variables_are_unused.code,e.Diagnostics.All_type_parameters_are_unused.code];function s(t,n,r){t.replaceNode(n,r.parent,e.factory.createKeywordTypeNode(152))}function u(r,a){return t.createCodeFixAction(n,r,a,i,e.Diagnostics.Delete_all_unused_declarations)}function c(t,n,r){t.delete(n,e.Debug.checkDefined(e.cast(r.parent,e.isDeclarationWithTypeParameterChildren).typeParameters,"The type parameter to delete should exist"))}function l(t){return 99===t.kind?e.tryCast(t.parent,e.isImportDeclaration):void 0}function d(t,n){return e.isVariableDeclarationList(n.parent)&&e.first(n.parent.getChildren(t))===n}function p(e,t,n){e.delete(t,232===n.parent.kind?n.parent:n)}function f(t,n,r){e.forEach(r.elements,(function(e){return t.delete(n,e)}))}function h(t,n,r,i){n!==e.Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code&&(135===i.kind&&(i=e.cast(i.parent,e.isInferTypeNode).typeParameter.name),e.isIdentifier(i)&&function(e){switch(e.parent.kind){case 160:case 159:return!0;case 249:switch(e.parent.parent.parent.kind){case 239:case 238:return!0}}return!1}(i)&&(t.replaceNode(r,i,e.factory.createIdentifier("_"+i.text)),e.isParameter(i.parent)&&e.getJSDocParameterTags(i.parent).forEach((function(n){e.isIdentifier(n.name)&&t.replaceNode(r,n.name,e.factory.createIdentifier("_"+n.name.text))}))))}function g(t,n,r,i,a,o){!function(t,n,r,i,a,o){var s=t.parent;e.isParameter(s)?function(t,n,r,i,a,o){void 0===o&&(o=!1),function(t,n,r,i){var a=r.parent;switch(a.kind){case 165:var o=t.getSymbolAtLocation(a.name);if(e.isMemberSymbolInBaseType(o,t))return!1;case 166:return!0;case 251:return!a.name||!function(t,n,r){return!!e.FindAllReferences.Core.eachSymbolReferenceInFile(r,t,n,(function(t){return e.isIdentifier(t)&&e.isCallExpression(t.parent)&&t.parent.arguments.indexOf(t)>=0}))}(t,n,a.name)||m(a,r,i);case 208:case 209:return m(a,r,i);case 168:return!1;default:return e.Debug.failBadSyntaxKind(a)}}(i,n,r,o)&&(r.modifiers&&r.modifiers.length>0&&(!e.isIdentifier(r.name)||e.FindAllReferences.Core.isSymbolReferencedInFile(r.name,i,n))?r.modifiers.forEach((function(e){return t.deleteModifier(n,e)})):(t.delete(n,r),function(t,n,r,i,a){e.FindAllReferences.Core.eachSignatureCall(r.parent,i,a,(function(e){var i=r.parent.parameters.indexOf(r);e.arguments.length>i&&t.delete(n,e.arguments[i])}))}(t,n,r,a,i)))}(n,r,s,i,a,o):n.delete(r,e.isImportClause(s)?t:e.isComputedPropertyName(s)?s.parent:s)}(n,r,t,i,a,o),e.isIdentifier(n)&&function(t,n,r,i){e.FindAllReferences.Core.eachSymbolReferenceInFile(r,i,n,(function(r){e.isPropertyAccessExpression(r.parent)&&r.parent.name===r&&(r=r.parent),e.isBinaryExpression(r.parent)&&e.isExpressionStatement(r.parent.parent)&&r.parent.left===r&&t.delete(n,r.parent.parent)}))}(r,t,n,i)}function m(t,n,r){var i=t.parameters,a=i.indexOf(n);return e.Debug.assert(-1!==a,"The parameter should already be in the list"),r?i.slice(a+1).every((function(t){return e.isIdentifier(t.name)&&!t.symbol.isReferenced})):a===i.length-1}t.registerCodeFix({errorCodes:o,getCodeActions:function(i){var o=i.errorCode,m=i.sourceFile,_=i.program,v=_.getTypeChecker(),y=_.getSourceFiles(),b=e.getTokenAtPosition(m,i.span.start);if(e.isJSDocTemplateTag(b))return[u(e.textChanges.ChangeTracker.with(i,(function(e){return e.delete(m,b)})),e.Diagnostics.Remove_template_tag)];if(29===b.kind)return[u(x=e.textChanges.ChangeTracker.with(i,(function(e){return c(e,m,b)})),e.Diagnostics.Remove_type_parameters)];var D=l(b);if(D)return[u(x=e.textChanges.ChangeTracker.with(i,(function(e){return e.delete(m,D)})),[e.Diagnostics.Remove_import_from_0,e.showModuleSpecifier(D)])];if(e.isObjectBindingPattern(b.parent)){if(e.isParameter(b.parent.parent)){var E=b.parent.elements,C=[E.length>1?e.Diagnostics.Remove_unused_declarations_for_Colon_0:e.Diagnostics.Remove_unused_declaration_for_Colon_0,e.map(E,(function(e){return e.getText(m)})).join(", ")];return[u(e.textChanges.ChangeTracker.with(i,(function(e){return f(e,m,b.parent)})),C)]}return[u(e.textChanges.ChangeTracker.with(i,(function(e){return e.delete(m,b.parent.parent)})),e.Diagnostics.Remove_unused_destructuring_declaration)]}if(d(m,b))return[u(e.textChanges.ChangeTracker.with(i,(function(e){return p(e,m,b.parent)})),e.Diagnostics.Remove_variable_statement)];var S=[];if(135===b.kind){var x=e.textChanges.ChangeTracker.with(i,(function(e){return s(e,m,b)})),k=e.cast(b.parent,e.isInferTypeNode).typeParameter.name.text;S.push(t.createCodeFixAction(n,x,[e.Diagnostics.Replace_infer_0_with_unknown,k],a,e.Diagnostics.Replace_all_unused_infer_with_unknown))}else{var T=e.textChanges.ChangeTracker.with(i,(function(e){return g(m,b,e,v,y,!1)}));T.length&&(k=e.isComputedPropertyName(b.parent)?b.parent:b,S.push(u(T,[e.Diagnostics.Remove_unused_declaration_for_Colon_0,k.getText(m)])))}var w=e.textChanges.ChangeTracker.with(i,(function(e){return h(e,o,m,b)}));return w.length&&S.push(t.createCodeFixAction(n,w,[e.Diagnostics.Prefix_0_with_an_underscore,b.getText(m)],r,e.Diagnostics.Prefix_all_unused_declarations_with_where_possible)),S},fixIds:[r,i,a],getAllCodeActions:function(n){var u=n.sourceFile,m=n.program,_=m.getTypeChecker(),v=m.getSourceFiles();return t.codeFixAll(n,o,(function(t,o){var m=e.getTokenAtPosition(u,o.start);switch(n.fixId){case r:h(t,o.code,u,m);break;case i:if(135===m.kind)break;var y=l(m);y?t.delete(u,y):e.isJSDocTemplateTag(m)?t.delete(u,m):29===m.kind?c(t,u,m):e.isObjectBindingPattern(m.parent)?e.isParameter(m.parent.parent)?f(t,u,m.parent):t.delete(u,m.parent.parent):d(u,m)?p(t,u,m.parent):g(u,m,t,_,v,!0);break;case a:135===m.kind&&s(t,u,m);break;default:e.Debug.fail(JSON.stringify(n.fixId))}}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="fixUnreachableCode",r=[e.Diagnostics.Unreachable_code_detected.code];function i(t,n,r,i,a){var o=e.getTokenAtPosition(n,r),s=e.findAncestor(o,e.isStatement);if(s.getStart(n)!==o.getStart(n)){var u=JSON.stringify({statementKind:e.Debug.formatSyntaxKind(s.kind),tokenKind:e.Debug.formatSyntaxKind(o.kind),errorCode:a,start:r,length:i});e.Debug.fail("Token and statement should start at the same point. "+u)}var c=(e.isBlock(s.parent)?s.parent:s).parent;if(!e.isBlock(s.parent)||s===e.first(s.parent.statements))switch(c.kind){case 234:if(c.elseStatement){if(e.isBlock(s.parent))break;return void t.replaceNode(n,s,e.factory.createBlock(e.emptyArray))}case 236:case 237:return void t.delete(n,c)}if(e.isBlock(s.parent)){var l=r+i,d=e.Debug.checkDefined(function(e,t){for(var n,r=0,i=e;rP.length?B(C,h.getSignatureFromDeclaration(f[f.length-1]),y,_,o(C)):(e.Debug.assert(f.length===P.length,"Declarations and signatures should match count"),d(function(t,n,r,i,s){for(var u=t[0],c=t[0].minArgumentCount,l=!1,d=0,p=t;d=u.parameters.length&&(!e.signatureHasRestParameter(f)||e.signatureHasRestParameter(u))&&(u=f)}var h=u.parameters.length-(e.signatureHasRestParameter(u)?1:0),g=u.parameters.map((function(e){return e.name})),m=a(h,g,void 0,c,!1);if(l){var _=e.factory.createArrayTypeNode(e.factory.createKeywordTypeNode(128)),v=e.factory.createParameterDeclaration(void 0,void 0,e.factory.createToken(25),g[h]||"rest",h>=c?e.factory.createToken(57):void 0,_,void 0);m.push(v)}return function(t,n,r,i,a,s,u){return e.factory.createMethodDeclaration(void 0,t,void 0,n,r?e.factory.createToken(57):void 0,i,a,s,o(u))}(i,n,r,void 0,m,void 0,s)}(P,_,D,y,C))))}}function B(t,i,a,o,u){var f=function(t,r,i,a,o,s,u,c,d){var f=t.program,h=f.getTypeChecker(),g=e.getEmitScriptTarget(f.getCompilerOptions()),m=1073742081|(0===r?268435456:0),_=h.signatureToSignatureDeclaration(i,165,a,m,n(t));if(_){var v=_.typeParameters,y=_.parameters,b=_.type;if(d){if(v){var D=e.sameMap(v,(function(t){var n,r=t.constraint,i=t.default;return r&&(n=l(r,g))&&(r=n.typeNode,p(d,n.symbols)),i&&(n=l(i,g))&&(i=n.typeNode,p(d,n.symbols)),e.factory.updateTypeParameterDeclaration(t,t.name,r,i)}));v!==D&&(v=e.setTextRange(e.factory.createNodeArray(D,v.hasTrailingComma),v))}var E=e.sameMap(y,(function(t){var n=l(t.type,g),r=t.type;return n&&(r=n.typeNode,p(d,n.symbols)),e.factory.updateParameterDeclaration(t,t.decorators,t.modifiers,t.dotDotDotToken,t.name,t.questionToken,r,t.initializer)}));if(y!==E&&(y=e.setTextRange(e.factory.createNodeArray(E,y.hasTrailingComma),y)),b){var C=l(b,g);C&&(b=C.typeNode,p(d,C.symbols))}}return e.factory.updateMethodDeclaration(_,void 0,o,_.asteriskToken,s,u?e.factory.createToken(57):void 0,v,y,b,c)}}(s,t,i,r,a,o,D,u,c);f&&d(f)}}function i(t,n,r,i,a,o,s){var u=t.typeToTypeNode(r,i,o,s);if(u&&e.isImportTypeNode(u)){var c=l(u,a);if(c)return p(n,c.symbols),c.typeNode}return u}function a(t,n,r,i,a){for(var o=[],s=0;s=i?e.factory.createToken(57):void 0,a?void 0:r&&r[s]||e.factory.createKeywordTypeNode(128),void 0);o.push(u)}return o}function o(t){return e.factory.createBlock([e.factory.createThrowStatement(e.factory.createNewExpression(e.factory.createIdentifier("Error"),void 0,[e.factory.createStringLiteral("Method not implemented.",0===t)]))],!0)}function s(t,n,r){var i=e.getTsConfigObjectLiteralExpression(n);if(i){var a=c(i,"compilerOptions");if(void 0!==a){var o=a.initializer;if(e.isObjectLiteralExpression(o))for(var s=0,l=r;s0)return[t.createCodeFixAction(n,a,e.Diagnostics.Convert_to_a_bigint_numeric_literal,n,e.Diagnostics.Convert_all_to_bigint_numeric_literals)]},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(e,t){return i(e,t.file,t)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="fixAddModuleReferTypeMissingTypeof",r=[e.Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code];function i(t,n){var r=e.getTokenAtPosition(t,n);return e.Debug.assert(99===r.kind,"This token should be an ImportKeyword"),e.Debug.assert(195===r.parent.kind,"Token parent should be an ImportType"),r.parent}function a(t,n,r){var i=e.factory.updateImportTypeNode(r,r.argument,r.qualifier,r.typeArguments,!0);t.replaceNode(n,r,i)}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var o=r.sourceFile,s=r.span,u=i(o,s.start),c=e.textChanges.ChangeTracker.with(r,(function(e){return a(e,o,u)}));return[t.createCodeFixAction(n,c,e.Diagnostics.Add_missing_typeof,n,e.Diagnostics.Add_missing_typeof)]},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(t,n){return a(t,e.sourceFile,i(n.file,n.start))}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="wrapJsxInFragment",r=[e.Diagnostics.JSX_expressions_must_have_one_parent_element.code];function i(t,n){var r=e.getTokenAtPosition(t,n).parent.parent;if((e.isBinaryExpression(r)||(r=r.parent,e.isBinaryExpression(r)))&&e.nodeIsMissing(r.operatorToken))return r}function a(t,n,r){var i=function(t){for(var n=[],r=t;;){if(e.isBinaryExpression(r)&&e.nodeIsMissing(r.operatorToken)&&27===r.operatorToken.kind){if(n.push(r.left),e.isJsxChild(r.right))return n.push(r.right),n;if(e.isBinaryExpression(r.right)){r=r.right;continue}return}return}}(r);i&&t.replaceNode(n,r,e.factory.createJsxFragment(e.factory.createJsxOpeningFragment(),i,e.factory.createJsxJsxClosingFragment()))}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var o=r.program.getCompilerOptions().jsx;if(2===o||3===o){var s=r.sourceFile,u=r.span,c=i(s,u.start);if(c){var l=e.textChanges.ChangeTracker.with(r,(function(e){return a(e,s,c)}));return[t.createCodeFixAction(n,l,e.Diagnostics.Wrap_in_JSX_fragment,n,e.Diagnostics.Wrap_all_unparented_JSX_in_JSX_fragment)]}}},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(t,n){var r=i(e.sourceFile,n.start);r&&a(t,e.sourceFile,r)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(n){var r="fixConvertToMappedObjectType",i=[e.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead.code];function a(t,n){var r=e.getTokenAtPosition(t,n),i=e.cast(r.parent.parent,e.isIndexSignatureDeclaration);if(!e.isClassDeclaration(i.parent))return{indexSignature:i,container:e.isInterfaceDeclaration(i.parent)?i.parent:e.cast(i.parent.parent,e.isTypeAliasDeclaration)}}function o(n,r,i){var a=i.indexSignature,o=i.container,s=(e.isInterfaceDeclaration(o)?o.members:o.type.members).filter((function(t){return!e.isIndexSignatureDeclaration(t)})),u=e.first(a.parameters),c=e.factory.createTypeParameterDeclaration(e.cast(u.name,e.isIdentifier),u.type),l=e.factory.createMappedTypeNode(e.hasEffectiveReadonlyModifier(a)?e.factory.createModifier(142):void 0,c,void 0,a.questionToken,a.type),d=e.factory.createIntersectionTypeNode(t(e.getAllSuperTypeNodes(o),[l],s.length?[e.factory.createTypeLiteralNode(s)]:e.emptyArray));n.replaceNode(r,o,function(t,n){return e.factory.createTypeAliasDeclaration(t.decorators,t.modifiers,t.name,t.typeParameters,n)}(o,d))}n.registerCodeFix({errorCodes:i,getCodeActions:function(t){var i=t.sourceFile,s=t.span,u=a(i,s.start);if(u){var c=e.textChanges.ChangeTracker.with(t,(function(e){return o(e,i,u)})),l=e.idText(u.container.name);return[n.createCodeFixAction(r,c,[e.Diagnostics.Convert_0_to_mapped_object_type,l],r,[e.Diagnostics.Convert_0_to_mapped_object_type,l])]}},fixIds:[r],getAllCodeActions:function(e){return n.codeFixAll(e,i,(function(e,t){var n=a(t.file,t.start);n&&o(e,t.file,n)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="removeAccidentalCallParentheses",r=[e.Diagnostics.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code];t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var i=e.findAncestor(e.getTokenAtPosition(r.sourceFile,r.span.start),e.isCallExpression);if(i){var a=e.textChanges.ChangeTracker.with(r,(function(e){e.deleteRange(r.sourceFile,{pos:i.expression.end,end:i.end})}));return[t.createCodeFixActionWithoutFixAll(n,a,e.Diagnostics.Remove_parentheses)]}},fixIds:[n]})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="removeUnnecessaryAwait",r=[e.Diagnostics.await_has_no_effect_on_the_type_of_this_expression.code];function i(t,n,r){var i=e.tryCast(e.getTokenAtPosition(n,r.start),(function(e){return 130===e.kind})),a=i&&e.tryCast(i.parent,e.isAwaitExpression);if(a){var o=a;if(e.isParenthesizedExpression(a.parent)){var s=e.getLeftmostExpression(a.expression,!1);if(e.isIdentifier(s)){var u=e.findPrecedingToken(a.parent.pos,n);u&&102!==u.kind&&(o=a.parent)}}t.replaceNode(n,o,a.expression)}}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var a=e.textChanges.ChangeTracker.with(r,(function(e){return i(e,r.sourceFile,r.span)}));if(a.length>0)return[t.createCodeFixAction(n,a,e.Diagnostics.Remove_unnecessary_await,n,e.Diagnostics.Remove_all_unnecessary_uses_of_await)]},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(e,t){return i(e,t.file,t)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n=[e.Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code],r="splitTypeOnlyImport";function i(t,n){return e.findAncestor(e.getTokenAtPosition(t,n.start),e.isImportDeclaration)}function a(t,n,r){if(n){var i=e.Debug.checkDefined(n.importClause);t.replaceNode(r.sourceFile,n,e.factory.updateImportDeclaration(n,n.decorators,n.modifiers,e.factory.updateImportClause(i,i.isTypeOnly,i.name,void 0),n.moduleSpecifier)),t.insertNodeAfter(r.sourceFile,n,e.factory.createImportDeclaration(void 0,void 0,e.factory.updateImportClause(i,i.isTypeOnly,void 0,i.namedBindings),n.moduleSpecifier))}}t.registerCodeFix({errorCodes:n,fixIds:[r],getCodeActions:function(n){var o=e.textChanges.ChangeTracker.with(n,(function(e){return a(e,i(n.sourceFile,n.span),n)}));if(o.length)return[t.createCodeFixAction(r,o,e.Diagnostics.Split_into_two_separate_import_declarations,r,e.Diagnostics.Split_all_invalid_type_only_imports)]},getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(t,n){a(t,i(e.sourceFile,n),e)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="fixConvertConstToLet",r=[e.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var i=r.sourceFile,a=r.span,o=r.program,s=function(t,n,r){var i=e.getTokenAtPosition(t,n),a=r.getTypeChecker().getSymbolAtLocation(i);if(a)return a.valueDeclaration.parent.parent}(i,a.start,o),u=e.textChanges.ChangeTracker.with(r,(function(e){return function(e,t,n){if(n){var r=n.getStart();e.replaceRangeWithText(t,{pos:r,end:r+5},"let")}}(e,i,s)}));return[t.createCodeFixAction(n,u,e.Diagnostics.Convert_const_to_let,n,e.Diagnostics.Convert_const_to_let)]},fixIds:[n]})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="fixExpectedComma",r=[e.Diagnostics._0_expected.code];function i(t,n,r){var i=e.getTokenAtPosition(t,n);return 26===i.kind&&i.parent&&(e.isObjectLiteralExpression(i.parent)||e.isArrayLiteralExpression(i.parent))?{node:i}:void 0}function a(t,n,r){var i=r.node,a=e.factory.createToken(27);t.replaceNode(n,i,a)}t.registerCodeFix({errorCodes:r,getCodeActions:function(r){var o=r.sourceFile,s=i(o,r.span.start,r.errorCode);if(s){var u=e.textChanges.ChangeTracker.with(r,(function(e){return a(e,o,s)}));return[t.createCodeFixAction(n,u,[e.Diagnostics.Change_0_to_1,";",","],n,[e.Diagnostics.Change_0_to_1,";",","])]}},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,r,(function(t,n){var r=i(n.file,n.start,n.code);r&&a(t,e.sourceFile,r)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="addVoidToPromise",r=[e.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code];function i(t,n,r,i,a){var o=e.getTokenAtPosition(n,r.start);if(e.isIdentifier(o)&&e.isCallExpression(o.parent)&&o.parent.expression===o&&0===o.parent.arguments.length){var s=i.getTypeChecker(),u=s.getSymbolAtLocation(o),c=null==u?void 0:u.valueDeclaration;if(c&&e.isParameter(c)&&e.isNewExpression(c.parent.parent)&&!(null==a?void 0:a.has(c))){null==a||a.add(c);var l=function(t){var n;if(!e.isInJSFile(t))return t.typeArguments;if(e.isParenthesizedExpression(t.parent)){var r=null===(n=e.getJSDocTypeTag(t.parent))||void 0===n?void 0:n.typeExpression.type;if(r&&e.isTypeReferenceNode(r)&&e.isIdentifier(r.typeName)&&"Promise"===e.idText(r.typeName))return r.typeArguments}}(c.parent.parent);if(e.some(l)){var d=l[0],p=!e.isUnionTypeNode(d)&&!e.isParenthesizedTypeNode(d)&&e.isParenthesizedTypeNode(e.factory.createUnionTypeNode([d,e.factory.createKeywordTypeNode(113)]).types[0]);p&&t.insertText(n,d.pos,"("),t.insertText(n,d.end,p?") | void":" | void")}else{var f=s.getResolvedSignature(o.parent),h=null==f?void 0:f.parameters[0],g=h&&s.getTypeOfSymbolAtLocation(h,c.parent.parent);e.isInJSFile(c)?(!g||3&g.flags)&&(t.insertText(n,c.parent.parent.end,")"),t.insertText(n,e.skipTrivia(n.text,c.parent.parent.pos),"/** @type {Promise} */(")):(!g||2&g.flags)&&t.insertText(n,c.parent.parent.expression.end,"")}}}}t.registerCodeFix({errorCodes:r,fixIds:[n],getCodeActions:function(r){var a=e.textChanges.ChangeTracker.with(r,(function(e){return i(e,r.sourceFile,r.span,r.program)}));if(a.length>0)return[t.createCodeFixAction("addVoidToPromise",a,e.Diagnostics.Add_void_to_Promise_resolved_without_a_value,n,e.Diagnostics.Add_void_to_all_Promises_resolved_without_a_value)]},getAllCodeActions:function(n){return t.codeFixAll(n,r,(function(t,r){return i(t,r.file,r,n.program,new e.Set)}))}})}(e.codefix||(e.codefix={}))}(u||(u={})),function(e){!function(t){var n="Convert export",r="Convert default export to named export",i="Convert named export to default export";function a(t,n){void 0===n&&(n=!0);var r=t.file,i=e.getRefactorContextSpan(t),a=e.getTokenAtPosition(r,i.start),o=a.parent&&1&e.getSyntacticModifierFlags(a.parent)&&n?a.parent:e.getParentNodeInSpan(a,r,i);if(!o||!(e.isSourceFile(o.parent)||e.isModuleBlock(o.parent)&&e.isAmbientModule(o.parent.parent)))return{error:e.getLocaleSpecificMessage(e.Diagnostics.Could_not_find_export_statement)};var s=e.isSourceFile(o.parent)?o.parent.symbol:o.parent.parent.symbol,u=e.getSyntacticModifierFlags(o),c=!!(512&u);if(!(1&u)||!c&&s.exports.has("default"))return{error:e.getLocaleSpecificMessage(e.Diagnostics.This_file_already_has_a_default_export)};switch(o.kind){case 251:case 252:case 253:case 255:case 254:case 256:var l=o;return l.name&&e.isIdentifier(l.name)?{info:{exportNode:l,exportName:l.name,wasDefault:c,exportingModuleSymbol:s}}:void 0;case 232:var d=o;if(!(2&d.declarationList.flags)||1!==d.declarationList.declarations.length)return;var p=e.first(d.declarationList.declarations);if(!p.initializer)return;return e.Debug.assert(!c,"Can't have a default flag here"),e.isIdentifier(p.name)?{info:{exportNode:d,exportName:p.name,wasDefault:c,exportingModuleSymbol:s}}:void 0;default:return}}function o(t,n){return e.factory.createImportSpecifier(t===n?void 0:e.factory.createIdentifier(t),e.factory.createIdentifier(n))}t.registerRefactor(n,{getAvailableActions:function(t){var o=a(t,"invoked"===t.triggerReason);if(!o)return e.emptyArray;if(void 0===o.error){var s=o.info.wasDefault?e.Diagnostics.Convert_default_export_to_named_export.message:e.Diagnostics.Convert_named_export_to_default_export.message,u=o.info.wasDefault?r:i;return[{name:n,description:s,actions:[{name:u,description:s}]}]}return t.preferences.provideRefactorNotApplicableReason?[{name:n,description:e.Diagnostics.Convert_default_export_to_named_export.message,actions:[{name:r,description:e.Diagnostics.Convert_default_export_to_named_export.message,notApplicableReason:o.error}]},{name:n,description:e.Diagnostics.Convert_named_export_to_default_export.message,actions:[{name:i,description:e.Diagnostics.Convert_named_export_to_default_export.message,notApplicableReason:o.error}]}]:e.emptyArray},getEditsForAction:function(t,n){return e.Debug.assert(n===r||n===i,"Unexpected action name"),{edits:e.textChanges.ChangeTracker.with(t,(function(n){var r,i,s,u,c,l;return i=t.file,s=t.program,u=e.Debug.checkDefined(null===(r=a(t))||void 0===r?void 0:r.info,"context must have info"),c=n,l=t.cancellationToken,function(t,n,r,i){var a=n.wasDefault,o=n.exportNode,s=n.exportName;if(a)r.delete(t,e.Debug.checkDefined(e.findModifier(o,87),"Should find a default keyword in modifier list"));else{var u=e.Debug.checkDefined(e.findModifier(o,92),"Should find an export keyword in modifier list");switch(o.kind){case 251:case 252:case 253:r.insertNodeAfter(t,u,e.factory.createToken(87));break;case 232:var c=e.first(o.declarationList.declarations);if(!e.FindAllReferences.Core.isSymbolReferencedInFile(s,i,t)&&!c.type){r.replaceNode(t,o,e.factory.createExportDefault(e.Debug.checkDefined(c.initializer,"Initializer was previously known to be present")));break}case 255:case 254:case 256:r.deleteModifier(t,u),r.insertNodeAfter(t,o,e.factory.createExportDefault(e.factory.createIdentifier(s.text)));break;default:e.Debug.assertNever(o,"Unexpected exportNode kind "+o.kind)}}}(i,u,c,s.getTypeChecker()),void function(t,n,r,i){var a=n.wasDefault,s=n.exportName,u=n.exportingModuleSymbol,c=t.getTypeChecker(),l=e.Debug.checkDefined(c.getSymbolAtLocation(s),"Export name should resolve to a symbol");e.FindAllReferences.Core.eachExportReference(t.getSourceFiles(),c,i,l,u,s.text,a,(function(t){var n=t.getSourceFile();a?function(t,n,r,i){var a=n.parent;switch(a.kind){case 201:r.replaceNode(t,n,e.factory.createIdentifier(i));break;case 265:case 270:var s=a;r.replaceNode(t,s,o(i,s.name.text));break;case 262:var u=a;e.Debug.assert(u.name===n,"Import clause name should match provided ref"),s=o(i,n.text);var c=u.namedBindings;if(c)if(263===c.kind){r.deleteRange(t,{pos:n.getStart(t),end:c.getStart(t)});var l=e.isStringLiteral(u.parent.moduleSpecifier)?e.quotePreferenceFromString(u.parent.moduleSpecifier,t):1,d=e.makeImport(void 0,[o(i,n.text)],u.parent.moduleSpecifier,l);r.insertNodeAfter(t,u.parent,d)}else r.delete(t,n),r.insertNodeAtEndOfList(t,c.elements,s);else r.replaceNode(t,n,e.factory.createNamedImports([s]));break;default:e.Debug.failBadSyntaxKind(a)}}(n,t,r,s.text):function(t,n,r){var i=n.parent;switch(i.kind){case 201:r.replaceNode(t,n,e.factory.createIdentifier("default"));break;case 265:var a=e.factory.createIdentifier(i.name.text);1===i.parent.elements.length?r.replaceNode(t,i.parent,a):(r.delete(t,i),r.insertNodeBefore(t,i.parent,a));break;case 270:r.replaceNode(t,i,function(t,n){return e.factory.createExportSpecifier(t===n?void 0:e.factory.createIdentifier(t),e.factory.createIdentifier(n))}("default",i.name.text));break;default:e.Debug.assertNever(i,"Unexpected parent kind "+i.kind)}}(n,t,r)}))}(s,u,c,l)})),renameFilename:void 0,renameLocation:void 0}}})}(e.refactor||(e.refactor={}))}(u||(u={})),function(e){!function(t){var n="Convert import",r="Convert namespace import to named imports",i="Convert named imports to namespace import";function a(t,n){void 0===n&&(n=!0);var r=t.file,i=e.getRefactorContextSpan(t),a=e.getTokenAtPosition(r,i.start),o=n?e.findAncestor(a,e.isImportDeclaration):e.getParentNodeInSpan(a,r,i);if(!o||!e.isImportDeclaration(o))return{error:"Selection is not an import declaration."};if(!(o.getEnd()=p.pos?f.getEnd():p.getEnd()),g=l?function(e){for(;e.parent;){if(o(e)&&!o(e.parent))return e;e=e.parent}}(p):function(e,t){for(;e.parent;){if(o(e)&&0!==t.length&&e.end>=t.start+t.length)return e;e=e.parent}}(p,h),m=g&&o(g)?function(t){if(a(t))return t;if(e.isVariableStatement(t)){var n=e.getSingleVariableOfVariableStatement(t),r=null==n?void 0:n.initializer;return r&&a(r)?r:void 0}return t.expression&&a(t.expression)?t.expression:void 0}(g):void 0;if(!m)return{error:e.getLocaleSpecificMessage(e.Diagnostics.Could_not_find_convertible_access_expression)};var _=i.getTypeChecker();return e.isConditionalExpression(m)?function(t,n){var r=t.condition,i=d(t.whenTrue);if(!i||n.isNullableType(n.getTypeAtLocation(i)))return{error:e.getLocaleSpecificMessage(e.Diagnostics.Could_not_find_convertible_access_expression)};if((e.isPropertyAccessExpression(r)||e.isIdentifier(r))&&c(r,i.expression))return{info:{finalExpression:i,occurrences:[r],expression:t}};if(e.isBinaryExpression(r)){var a=u(i.expression,r);return a?{info:{finalExpression:i,occurrences:a,expression:t}}:{error:e.getLocaleSpecificMessage(e.Diagnostics.Could_not_find_matching_access_expressions)}}}(m,_):function(t){if(55!==t.operatorToken.kind)return{error:e.getLocaleSpecificMessage(e.Diagnostics.Can_only_convert_logical_AND_access_chains)};var n=d(t.right);if(!n)return{error:e.getLocaleSpecificMessage(e.Diagnostics.Could_not_find_convertible_access_expression)};var r=u(n.expression,t.left);return r?{info:{finalExpression:n,occurrences:r,expression:t}}:{error:e.getLocaleSpecificMessage(e.Diagnostics.Could_not_find_matching_access_expressions)}}(m)}}function u(t,n){for(var r=[];e.isBinaryExpression(n)&&55===n.operatorToken.kind;){var i=c(e.skipParentheses(t),e.skipParentheses(n.right));if(!i)break;r.push(i),t=i,n=n.left}var a=c(t,n);return a&&r.push(a),r.length>0?r:void 0}function c(t,n){if(e.isIdentifier(n)||e.isPropertyAccessExpression(n)||e.isElementAccessExpression(n))return function(t,n){for(;(e.isCallExpression(t)||e.isPropertyAccessExpression(t)||e.isElementAccessExpression(t))&&l(t)!==l(n);)t=t.expression;for(;e.isPropertyAccessExpression(t)&&e.isPropertyAccessExpression(n)||e.isElementAccessExpression(t)&&e.isElementAccessExpression(n);){if(l(t)!==l(n))return!1;t=t.expression,n=n.expression}return e.isIdentifier(t)&&e.isIdentifier(n)&&t.getText()===n.getText()}(t,n)?n:void 0}function l(t){return e.isIdentifier(t)||e.isStringOrNumericLiteralLike(t)?t.getText():e.isPropertyAccessExpression(t)?l(t.name):e.isElementAccessExpression(t)?l(t.argumentExpression):void 0}function d(t){return t=e.skipParentheses(t),e.isBinaryExpression(t)?d(t.left):(e.isPropertyAccessExpression(t)||e.isElementAccessExpression(t)||e.isCallExpression(t))&&!e.isOptionalChain(t)?t:void 0}function p(t,n,r){if(e.isPropertyAccessExpression(n)||e.isElementAccessExpression(n)||e.isCallExpression(n)){var i=p(t,n.expression,r),a=r.length>0?r[r.length-1]:void 0,o=(null==a?void 0:a.getText())===n.expression.getText();if(o&&r.pop(),e.isCallExpression(n))return o?e.factory.createCallChain(i,e.factory.createToken(28),n.typeArguments,n.arguments):e.factory.createCallChain(i,n.questionDotToken,n.typeArguments,n.arguments);if(e.isPropertyAccessExpression(n))return o?e.factory.createPropertyAccessChain(i,e.factory.createToken(28),n.name):e.factory.createPropertyAccessChain(i,n.questionDotToken,n.name);if(e.isElementAccessExpression(n))return o?e.factory.createElementAccessChain(i,e.factory.createToken(28),n.argumentExpression):e.factory.createElementAccessChain(i,n.questionDotToken,n.argumentExpression)}return n}t.registerRefactor(r,{getAvailableActions:function(t){var n=s(t,"invoked"===t.triggerReason);return n?n.error?t.preferences.provideRefactorNotApplicableReason?[{name:r,description:i,actions:[{name:r,description:i,notApplicableReason:n.error}]}]:e.emptyArray:[{name:r,description:i,actions:[{name:r,description:i}]}]:e.emptyArray},getEditsForAction:function(t,n){var r=s(t);return r&&r.info?{edits:e.textChanges.ChangeTracker.with(t,(function(n){return function(t,n,r,i,a){var o=i.finalExpression,s=i.occurrences,u=i.expression,c=s[s.length-1],l=p(n,o,s);l&&(e.isPropertyAccessExpression(l)||e.isElementAccessExpression(l)||e.isCallExpression(l))&&(e.isBinaryExpression(u)?r.replaceNodeRange(t,c,o,l):e.isConditionalExpression(u)&&r.replaceNode(t,u,e.factory.createBinaryExpression(l,e.factory.createToken(60),u.whenFalse)))}(t.file,t.program.getTypeChecker(),n,e.Debug.checkDefined(r.info,"context must have info"))})),renameFilename:void 0,renameLocation:void 0}:void 0}})}(t.convertToOptionalChainExpression||(t.convertToOptionalChainExpression={}))}(e.refactor||(e.refactor={}))}(u||(u={})),function(e){!function(t){!function(n){var r="Convert overload list to single signature",i=e.Diagnostics.Convert_overload_list_to_single_signature.message;function a(e){switch(e.kind){case 164:case 165:case 169:case 166:case 170:case 251:return!0}return!1}function o(t,n,r){var i=e.getTokenAtPosition(t,n),o=e.findAncestor(i,a);if(o){var s=r.getTypeChecker(),u=o.symbol;if(u){var c=u.declarations;if(!(e.length(c)<=1)&&e.every(c,(function(n){return e.getSourceFileOfNode(n)===t}))&&a(c[0])){var l=c[0].kind;if(e.every(c,(function(e){return e.kind===l}))){var d=c;if(!e.some(d,(function(t){return!!t.typeParameters||e.some(t.parameters,(function(t){return!!t.decorators||!!t.modifiers||!e.isIdentifier(t.name)}))}))){var p=e.mapDefined(d,(function(e){return s.getSignatureFromDeclaration(e)}));if(e.length(p)===e.length(c)){var f=s.getReturnTypeOfSignature(p[0]);if(e.every(p,(function(e){return s.getReturnTypeOfSignature(e)===f})))return d}}}}}}}t.registerRefactor(r,{getEditsForAction:function(t){var n=t.file,r=t.startPosition,i=t.program,a=o(n,r,i);if(a){var s=i.getTypeChecker(),u=a[a.length-1],c=u;switch(u.kind){case 164:c=e.factory.updateMethodSignature(u,u.modifiers,u.name,u.questionToken,u.typeParameters,l(a),u.type);break;case 165:c=e.factory.updateMethodDeclaration(u,u.decorators,u.modifiers,u.asteriskToken,u.name,u.questionToken,u.typeParameters,l(a),u.type,u.body);break;case 169:c=e.factory.updateCallSignature(u,u.typeParameters,l(a),u.type);break;case 166:c=e.factory.updateConstructorDeclaration(u,u.decorators,u.modifiers,l(a),u.body);break;case 170:c=e.factory.updateConstructSignature(u,u.typeParameters,l(a),u.type);break;case 251:c=e.factory.updateFunctionDeclaration(u,u.decorators,u.modifiers,u.asteriskToken,u.name,u.typeParameters,l(a),u.type,u.body);break;default:return e.Debug.failBadSyntaxKind(u,"Unhandled signature kind in overload list conversion refactoring")}if(c!==u)return{renameFilename:void 0,renameLocation:void 0,edits:e.textChanges.ChangeTracker.with(t,(function(e){e.replaceNodeRange(n,a[0],a[a.length-1],c)}))}}function l(t){var n=t[t.length-1];return e.isFunctionLikeDeclaration(n)&&n.body&&(t=t.slice(0,t.length-1)),e.factory.createNodeArray([e.factory.createParameterDeclaration(void 0,void 0,e.factory.createToken(25),"args",void 0,e.factory.createUnionTypeNode(e.map(t,d)))])}function d(t){var n=e.map(t.parameters,p);return e.setEmitFlags(e.factory.createTupleTypeNode(n),e.some(n,(function(t){return!!e.length(e.getSyntheticLeadingComments(t))}))?0:1)}function p(t){e.Debug.assert(e.isIdentifier(t.name));var n=e.setTextRange(e.factory.createNamedTupleMember(t.dotDotDotToken,t.name,t.questionToken,t.type||e.factory.createKeywordTypeNode(128)),t),r=t.symbol&&t.symbol.getDocumentationComment(s);if(r){var i=e.displayPartsToString(r);i.length&&e.setSyntheticLeadingComments(n,[{text:"*\n"+i.split("\n").map((function(e){return" * "+e})).join("\n")+"\n ",kind:3,pos:-1,end:-1,hasTrailingNewLine:!0,hasLeadingNewline:!0}])}return n}},getAvailableActions:function(t){return o(t.file,t.startPosition,t.program)?[{name:r,description:i,actions:[{name:r,description:i}]}]:e.emptyArray}})}(t.addOrRemoveBracesToArrowFunction||(t.addOrRemoveBracesToArrowFunction={}))}(e.refactor||(e.refactor={}))}(u||(u={})),function(e){!function(t){!function(n){var r,i,a,o,s="Extract Symbol";function u(t){var n=l(t.file,e.getRefactorContextSpan(t),"invoked"===t.triggerReason),r=n.targetRange;if(void 0===r)return n.errors&&0!==n.errors.length&&t.preferences.provideRefactorNotApplicableReason?[{name:s,description:e.getLocaleSpecificMessage(e.Diagnostics.Extract_function),actions:[{description:e.getLocaleSpecificMessage(e.Diagnostics.Extract_function),name:"function_extract_error",notApplicableReason:C(n.errors)}]},{name:s,description:e.getLocaleSpecificMessage(e.Diagnostics.Extract_constant),actions:[{description:e.getLocaleSpecificMessage(e.Diagnostics.Extract_constant),name:"constant_extract_error",notApplicableReason:C(n.errors)}]}]:e.emptyArray;var i=function(t,n){var r=f(t,n),i=r.scopes,a=r.readsAndWrites,o=a.functionErrorsPerScope,s=a.constantErrorsPerScope;return i.map((function(t,n){var r,i,a=function(t){return e.isFunctionLikeDeclaration(t)?"inner function":e.isClassLike(t)?"method":"function"}(t),u=function(t){return e.isClassLike(t)?"readonly field":"constant"}(t),c=e.isFunctionLikeDeclaration(t)?function(t){switch(t.kind){case 166:return"constructor";case 208:case 251:return t.name?"function '"+t.name.text+"'":e.ANONYMOUS;case 209:return"arrow function";case 165:return"method '"+t.name.getText()+"'";case 167:return"'get "+t.name.getText()+"'";case 168:return"'set "+t.name.getText()+"'";default:throw e.Debug.assertNever(t,"Unexpected scope kind "+t.kind)}}(t):e.isClassLike(t)?function(e){return 252===e.kind?e.name?"class '"+e.name.text+"'":"anonymous class declaration":e.name?"class expression '"+e.name.text+"'":"anonymous class expression"}(t):function(e){return 257===e.kind?"namespace '"+e.parent.name.getText()+"'":e.externalModuleIndicator?0:1}(t);return 1===c?(r=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1_scope),[a,"global"]),i=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1_scope),[u,"global"])):0===c?(r=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1_scope),[a,"module"]),i=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1_scope),[u,"module"])):(r=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1),[a,c]),i=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_1),[u,c])),0!==n||e.isClassLike(t)||(i=e.formatStringFromArgs(e.getLocaleSpecificMessage(e.Diagnostics.Extract_to_0_in_enclosing_scope),[u])),{functionExtraction:{description:r,errors:o[n]},constantExtraction:{description:i,errors:s[n]}}}))}(r,t);if(void 0===i)return e.emptyArray;for(var a,o,u=[],c=new e.Map,d=[],p=new e.Map,h=0,g=0,m=i;g0;if(e.isBlock(t)&&!s&&0===i.size)return{body:e.factory.createBlock(t.statements,!0),returnValueProperty:void 0};var u=!1,c=e.factory.createNodeArray(e.isBlock(t)?t.statements.slice(0):[e.isStatement(t)?t:e.factory.createReturnStatement(t)]);if(s||i.size){var l=e.visitNodes(c,p).slice();if(s&&!a&&e.isStatement(t)){var d=m(n,r);1===d.length?l.push(e.factory.createReturnStatement(d[0].name)):l.push(e.factory.createReturnStatement(e.factory.createObjectLiteralExpression(d)))}return{body:e.factory.createBlock(l,!0),returnValueProperty:o}}return{body:e.factory.createBlock(c,!0),returnValueProperty:void 0};function p(t){if(!u&&e.isReturnStatement(t)&&s){var a=m(n,r);return t.expression&&(o||(o="__return"),a.unshift(e.factory.createPropertyAssignment(o,e.visitNode(t.expression,p)))),1===a.length?e.factory.createReturnStatement(a[0].name):e.factory.createReturnStatement(e.factory.createObjectLiteralExpression(a))}var c=u;u=u||e.isFunctionLikeDeclaration(t)||e.isClassLike(t);var l=i.get(e.getNodeId(t).toString()),d=l?e.getSynthesizedDeepClone(l):e.visitEachChild(t,p,e.nullTransformationContext);return u=c,d}}(t,a,c,p,!!(o.facts&i.HasReturn)),F=I.body,L=I.returnValueProperty;if(e.suppressLeadingAndTrailingTrivia(F),e.isClassLike(n)){var P=C?[]:[e.factory.createModifier(120)];o.facts&i.InStaticRegion&&P.push(e.factory.createModifier(123)),o.facts&i.IsAsyncFunction&&P.push(e.factory.createModifier(129)),N=e.factory.createMethodDeclaration(void 0,P.length?P:void 0,o.facts&i.IsGenerator?e.factory.createToken(41):void 0,S,void 0,w,x,u,F)}else N=e.factory.createFunctionDeclaration(void 0,o.facts&i.IsAsyncFunction?[e.factory.createToken(129)]:void 0,o.facts&i.IsGenerator?e.factory.createToken(41):void 0,S,w,x,u,F);var R=e.textChanges.ChangeTracker.fromContext(s),M=function(t,n){return e.find(function(t){if(e.isFunctionLikeDeclaration(t)){var n=t.body;if(e.isBlock(n))return n.statements}else{if(e.isModuleBlock(t)||e.isSourceFile(t))return t.statements;if(e.isClassLike(t))return t.members;e.assertType(t)}return e.emptyArray}(n),(function(n){return n.pos>=t&&e.isFunctionLikeDeclaration(n)&&!e.isConstructorDeclaration(n)}))}((_(o.range)?e.last(o.range):o.range).end,n);M?R.insertNodeBefore(s.file,M,N,!0):R.insertNodeAtEndOfScope(s.file,n,N),y.writeFixes(R);var B=[],j=function(t,n,r){var a=e.factory.createIdentifier(r);if(e.isClassLike(t)){var o=n.facts&i.InStaticRegion?e.factory.createIdentifier(t.name.text):e.factory.createThis();return e.factory.createPropertyAccessExpression(o,a)}return a}(n,o,E),U=e.factory.createCallExpression(j,A,k);if(o.facts&i.IsGenerator&&(U=e.factory.createYieldExpression(e.factory.createToken(41),U)),o.facts&i.IsAsyncFunction&&(U=e.factory.createAwaitExpression(U)),b(t)&&(U=e.factory.createJsxExpression(void 0,U)),a.length&&!c)if(e.Debug.assert(!L,"Expected no returnValueProperty"),e.Debug.assert(!(o.facts&i.HasReturn),"Expected RangeFacts.HasReturn flag to be unset"),1===a.length){var V=a[0];B.push(e.factory.createVariableStatement(void 0,e.factory.createVariableDeclarationList([e.factory.createVariableDeclaration(e.getSynthesizedDeepClone(V.name),void 0,e.getSynthesizedDeepClone(V.type),U)],V.parent.flags)))}else{for(var z=[],H=[],W=a[0].parent.flags,K=!1,q=0,G=a;q0,"Found no members");for(var a=!0,o=0,s=i;ot)return r||i[0];if(a&&!e.isPropertyDeclaration(u)){if(void 0!==r)return u;a=!1}r=u}return void 0===r?e.Debug.fail():r}(t.pos,n);m.insertNodeBefore(o.file,E,v,!0),m.replaceNode(o.file,t,D)}else{var C=e.factory.createVariableDeclaration(d,void 0,h,g),S=function(t,n){for(var r;void 0!==t&&t!==n;){if(e.isVariableDeclaration(t)&&t.initializer===r&&e.isVariableDeclarationList(t.parent)&&t.parent.declarations.length>1)return t;r=t,t=t.parent}}(t,n);if(S)m.insertNodeBefore(o.file,S,C),D=e.factory.createIdentifier(d),m.replaceNode(o.file,t,D);else if(233===t.parent.kind&&n===e.findAncestor(t,p)){var x=e.factory.createVariableStatement(void 0,e.factory.createVariableDeclarationList([C],2));m.replaceNode(o.file,t.parent,x)}else x=e.factory.createVariableStatement(void 0,e.factory.createVariableDeclarationList([C],2)),0===(E=function(t,n){var r;e.Debug.assert(!e.isClassLike(n));for(var i=t;i!==n;i=i.parent)p(i)&&(r=i);for(i=(r||t).parent;;i=i.parent){if(y(i)){for(var a=void 0,o=0,s=i.statements;ot.pos)break;a=u}return!a&&e.isCaseClause(i)?(e.Debug.assert(e.isSwitchStatement(i.parent.parent),"Grandparent isn't a switch statement"),i.parent.parent):e.Debug.checkDefined(a,"prevStatement failed to get set")}e.Debug.assert(i!==n,"Didn't encounter a block-like before encountering scope")}}(t,n)).pos?m.insertNodeAtTopOfFile(o.file,x,!1):m.insertNodeBefore(o.file,E,x,!1),233===t.parent.kind?m.delete(o.file,t.parent):(D=e.factory.createIdentifier(d),b(t)&&(D=e.factory.createJsxExpression(void 0,D)),m.replaceNode(o.file,t,D))}var k=m.getChanges(),T=t.getSourceFile().fileName;return{renameFilename:T,renameLocation:e.getRenameLocation(k,T,d,!0),edits:k};function w(r,i){if(void 0===r)return{variableType:r,initializer:i};if(!e.isFunctionExpression(i)&&!e.isArrowFunction(i)||i.typeParameters)return{variableType:r,initializer:i};var a=c.getTypeAtLocation(t),o=e.singleOrUndefined(c.getSignaturesOfType(a,0));if(!o)return{variableType:r,initializer:i};if(o.getTypeParameters())return{variableType:r,initializer:i};for(var s=[],u=!1,l=0,d=i.parameters;l=n.start+n.length)return(o||(o=[])).push(e.createDiagnosticForNode(a,r.cannotExtractSuper)),!0}else h|=i.UsesThis;break;case 209:e.forEachChild(a,(function t(n){if(e.isThis(n))h|=i.UsesThis;else{if(e.isClassLike(n)||e.isFunctionLike(n)&&!e.isArrowFunction(n))return!1;e.forEachChild(n,t)}}));case 252:case 251:e.isSourceFile(a.parent)&&void 0===a.parent.externalModuleIndicator&&(o||(o=[])).push(e.createDiagnosticForNode(a,r.functionWillNotBeVisibleInTheNewScope));case 221:case 208:case 165:case 166:case 167:case 168:return!1}var d=c;switch(a.kind){case 234:case 247:c=0;break;case 230:a.parent&&247===a.parent.kind&&a.parent.finallyBlock===a&&(c=4);break;case 285:case 284:c|=1;break;default:e.isIterationStatement(a,!1)&&(c|=3)}switch(a.kind){case 187:case 107:h|=i.UsesThis;break;case 245:var p=a.label;(u||(u=[])).push(p.escapedText),e.forEachChild(a,t),u.pop();break;case 241:case 240:(p=a.label)?e.contains(u,p.escapedText)||(o||(o=[])).push(e.createDiagnosticForNode(a,r.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)):c&(241===a.kind?1:2)||(o||(o=[])).push(e.createDiagnosticForNode(a,r.cannotExtractRangeContainingConditionalBreakOrContinueStatements));break;case 213:h|=i.IsAsyncFunction;break;case 219:h|=i.IsGenerator;break;case 242:4&c?h|=i.HasReturn:(o||(o=[])).push(e.createDiagnosticForNode(a,r.cannotExtractRangeContainingConditionalReturnStatement));break;default:e.forEachChild(a,t)}c=d}(t),o}}function d(t){return e.isStatement(t)?[t]:e.isExpressionNode(t)?e.isExpressionStatement(t.parent)?[t.parent]:t:void 0}function p(t){return e.isFunctionLikeDeclaration(t)||e.isSourceFile(t)||e.isModuleBlock(t)||e.isClassLike(t)}function f(t,n){var a=n.file,o=function(t){var n=_(t.range)?e.first(t.range):t.range;if(t.facts&i.UsesThis){var r=e.getContainingClass(n);if(r){var a=e.findAncestor(n,e.isFunctionLikeDeclaration);return a?[a,r]:[r]}}for(var o=[];;)if(160===(n=n.parent).kind&&(n=e.findAncestor(n,(function(t){return e.isFunctionLikeDeclaration(t)})).parent),p(n)&&(o.push(n),297===n.kind))return o}(t);return{scopes:o,readsAndWrites:function(t,n,a,o,s,u){var c,l,d=new e.Map,p=[],f=[],h=[],g=[],m=[],v=new e.Map,y=[],b=_(t.range)?1===t.range.length&&e.isExpressionStatement(t.range[0])?t.range[0].expression:void 0:t.range;if(void 0===b){var D=t.range,E=e.first(D).getStart(),C=e.last(D).end;l=e.createFileDiagnostic(o,E,C-E,r.expressionExpected)}else 147456&s.getTypeAtLocation(b).flags&&(l=e.createDiagnosticForNode(b,r.uselessConstantType));for(var S=0,x=n;S0){for(var I=new e.Map,F=0,L=O;void 0!==L&&F0&&(i.usages.size>0||i.typeParameterUsages.size>0)){var a=_(t.range)?t.range[0]:t.range;g[n].push(e.createDiagnosticForNode(a,r.cannotAccessVariablesFromNestedScopes))}var o,s=!1;if(p[n].usages.forEach((function(t){2===t.usage&&(s=!0,106500&t.symbol.flags&&t.symbol.valueDeclaration&&e.hasEffectiveModifier(t.symbol.valueDeclaration,64)&&(o=t.symbol.valueDeclaration))})),e.Debug.assert(_(t.range)||0===y.length,"No variable declarations expected if something was extracted"),s&&!_(t.range)){var u=e.createDiagnosticForNode(t.range,r.cannotWriteInExpression);h[n].push(u),g[n].push(u)}else o&&n>0?(u=e.createDiagnosticForNode(o,r.cannotExtractReadonlyPropertyInitializerOutsideConstructor),h[n].push(u),g[n].push(u)):c&&(u=e.createDiagnosticForNode(c,r.cannotExtractExportedEntity),h[n].push(u),g[n].push(u))},V=0;V=c)return m;if(w.set(m,c),_){for(var v=0,y=p;v=0)){var r=e.isIdentifier(n)?Y(n):s.getSymbolAtLocation(n);if(r){var i=e.find(m,(function(e){return e.symbol===r}));if(i)if(e.isVariableDeclaration(i)){var a=i.symbol.id.toString();v.has(a)||(y.push(i),v.set(a,!0))}else c=c||i}e.forEachChild(n,G)}}function Y(t){return t.parent&&e.isShorthandPropertyAssignment(t.parent)&&t.parent.name===t?s.getShorthandAssignmentValueSymbol(t.parent):s.getSymbolAtLocation(t)}function J(t,n,r){if(t){var i=t.getDeclarations();if(i&&i.some((function(e){return e.parent===n})))return e.factory.createIdentifier(t.name);var a=J(t.parent,n,r);if(void 0!==a)return r?e.factory.createQualifiedName(a,e.factory.createIdentifier(t.name)):e.factory.createPropertyAccessExpression(a,t.name)}}}(t,o,function(t,n){return _(t.range)?{pos:e.first(t.range).getStart(n),end:e.last(t.range).getEnd()}:t.range}(t,a),a,n.program.getTypeChecker(),n.cancellationToken)}}function h(e){var t,n=e.symbol;if(n&&n.declarations)for(var r=0,i=n.declarations;rr.pos}));if(-1!==a){var o=i[a];if(e.isNamedDeclaration(o)&&o.name&&e.rangeContainsRange(o.name,r))return{toMove:[i[a]],afterLast:i[a+1]};if(!(r.pos>o.getStart(n))){var s=e.findIndex(i,(function(e){return e.end>r.end}),a);if(-1===s||!(0===s||i[s].getStart(n)=2&&e.every(t,(function(t){return function(t,n){if(e.isRestParameter(t)){var r=n.getTypeAtLocation(t);if(!n.isArrayType(r)&&!n.isTupleType(r))return!1}return!t.modifiers&&!t.decorators&&e.isIdentifier(t.name)}(t,n)}))}(t.parameters,n))return!1;switch(t.kind){case 251:return p(t)&&d(t,n);case 165:return d(t,n);case 166:return e.isClassDeclaration(t.parent)?p(t.parent)&&d(t,n):f(t.parent.parent)&&d(t,n);case 208:case 209:return f(t.parent)}return!1}(a,r)&&e.rangeContainsRange(a,i))||a.body&&e.rangeContainsRange(a.body,i)?void 0:a}function d(e,t){return!!e.body&&!t.isImplementationOfOverload(e)}function p(t){return!!t.name||!!e.findModifier(t,87)}function f(t){return e.isVariableDeclaration(t)&&e.isVarConst(t)&&e.isIdentifier(t.name)&&!t.type}function h(t){return t.length>0&&e.isThis(t[0].name)}function g(t){return h(t)&&(t=e.factory.createNodeArray(t.slice(1),t.hasTrailingComma)),t}function m(t,n){var r=g(t.parameters),i=e.isRestParameter(e.last(r)),a=i?n.slice(0,r.length-1):n,o=e.map(a,(function(t,n){var i=function(t,n){return e.isIdentifier(n)&&e.getTextOfIdentifierOrLiteral(n)===t?e.factory.createShorthandPropertyAssignment(t):e.factory.createPropertyAssignment(t,n)}(_(r[n]),t);return e.suppressLeadingAndTrailingTrivia(i.name),e.isPropertyAssignment(i)&&e.suppressLeadingAndTrailingTrivia(i.initializer),e.copyComments(t,i),i}));if(i&&n.length>=r.length){var s=n.slice(r.length-1),u=e.factory.createPropertyAssignment(_(e.last(r)),e.factory.createArrayLiteralExpression(s));o.push(u)}return e.factory.createObjectLiteralExpression(o,!1)}function _(t){return e.getTextOfIdentifierOrLiteral(t.name)}n.registerRefactor(i,{getEditsForAction:function(n,r){e.Debug.assert(r===i,"Unexpected action name");var d=n.file,p=n.startPosition,f=n.program,v=n.cancellationToken,y=n.host,b=l(d,p,f.getTypeChecker());if(b&&v){var D=function(n,r,i){var l=function(t){switch(t.kind){case 251:return t.name?[t.name]:[e.Debug.checkDefined(e.findModifier(t,87),"Nameless function declaration should be a default export")];case 165:return[t.name];case 166:var n=e.Debug.checkDefined(e.findChildOfKind(t,132,t.getSourceFile()),"Constructor declaration should have constructor keyword");return 221===t.parent.kind?[t.parent.parent.name,n]:[n];case 209:return[t.parent.name];case 208:return t.name?[t.name,t.parent.name]:[t.parent.name];default:return e.Debug.assertNever(t,"Unexpected function declaration kind "+t.kind)}}(n),d=e.isConstructorDeclaration(n)?function(t){switch(t.parent.kind){case 252:var n=t.parent;return n.name?[n.name]:[e.Debug.checkDefined(e.findModifier(n,87),"Nameless class declaration should be a default export")];case 221:var r=t.parent,i=t.parent.parent,a=r.name;return a?[a,i.name]:[i.name]}}(n):[],p=e.deduplicate(t(l,d),e.equateValues),f=r.getTypeChecker(),h=g(e.flatMap(p,(function(t){return e.FindAllReferences.getReferenceEntriesForNode(-1,t,r,r.getSourceFiles(),i)})));return e.every(h.declarations,(function(t){return e.contains(p,t)}))||(h.valid=!1),h;function g(t){for(var r={accessExpressions:[],typeUsages:[]},i={functionCalls:[],declarations:[],classReferences:r,valid:!0},p=e.map(l,m),f=e.map(d,m),h=e.isConstructorDeclaration(n),g=0,_=t;g<_.length;g++){var v=_[g];if(1===v.kind){if(e.contains(p,m(v.node))||e.isNewExpressionTarget(v.node)){if(a(v))continue;if(b=o(v)){i.declarations.push(b);continue}var y=s(v);if(y){i.functionCalls.push(y);continue}}if(h&&e.contains(f,m(v.node))){var b;if(a(v))continue;if(b=o(v)){i.declarations.push(b);continue}var D=u(v);if(D){r.accessExpressions.push(D);continue}if(e.isClassDeclaration(n.parent)){var E=c(v);if(E){r.typeUsages.push(E);continue}}}i.valid=!1}else i.valid=!1}return i}function m(t){var n=f.getSymbolAtLocation(t);return n&&e.getSymbolTarget(n,f)}}(b,f,v);return D.valid?{renameFilename:void 0,renameLocation:void 0,edits:e.textChanges.ChangeTracker.with(n,(function(t){return function(t,n,r,i,a,o){var s=e.map(function(t,n,r){var i,a=n.getTypeChecker(),o=g(t.parameters),s=e.map(o,f),u=e.factory.createObjectBindingPattern(s),c=m(o);e.every(o,b)&&(i=e.factory.createObjectLiteralExpression());var l=e.factory.createParameterDeclaration(void 0,void 0,void 0,u,void 0,c,i);if(h(t.parameters)){var d=t.parameters[0],p=e.factory.createParameterDeclaration(void 0,void 0,void 0,d.name,void 0,d.type);return e.suppressLeadingAndTrailingTrivia(p.name),e.copyComments(d.name,p.name),d.type&&(e.suppressLeadingAndTrailingTrivia(p.type),e.copyComments(d.type,p.type)),e.factory.createNodeArray([p,l])}return e.factory.createNodeArray([l]);function f(t){var n=e.factory.createBindingElement(void 0,void 0,_(t),e.isRestParameter(t)&&b(t)?e.factory.createArrayLiteralExpression():t.initializer);return e.suppressLeadingAndTrailingTrivia(n),t.initializer&&n.initializer&&e.copyComments(t.initializer,n.initializer),n}function m(t){var n=e.map(t,v);return e.addEmitFlags(e.factory.createTypeLiteralNode(n),1)}function v(t){var n=t.type;n||!t.initializer&&!e.isRestParameter(t)||(n=y(t));var r=e.factory.createPropertySignature(void 0,_(t),b(t)?e.factory.createToken(57):t.questionToken,n);return e.suppressLeadingAndTrailingTrivia(r),e.copyComments(t.name,r.name),t.type&&r.type&&e.copyComments(t.type,r.type),r}function y(t){var i=a.getTypeAtLocation(t);return e.getTypeNodeIfAccessible(i,t,n,r)}function b(t){if(e.isRestParameter(t)){var n=a.getTypeAtLocation(t);return!a.isTupleType(n)}return a.isOptionalParameter(t)}}(a,n,r),(function(t){return e.getSynthesizedDeepClone(t)}));i.replaceNodeRangeWithNodes(t,e.first(a.parameters),e.last(a.parameters),s,{joiner:", ",indentation:0,leadingTriviaOption:e.textChanges.LeadingTriviaOption.IncludeAll,trailingTriviaOption:e.textChanges.TrailingTriviaOption.Include});for(var u=0,c=e.sortAndDeduplicate(o.functionCalls,(function(t,n){return e.compareValues(t.pos,n.pos)}));u0;){var o=i.shift();e.copyTrailingComments(t[o],a,n,3,!1),r(o,a)}}}(r,n,i),o=l(0,r),s=o[0],u=o[1],c=o[2];if(s===r.length){var p=e.factory.createNoSubstitutionTemplateLiteral(u);return a(c,p),p}var f=[],h=e.factory.createTemplateHead(u);a(c,h);for(var g=s;g333}));return r.kind<157?r:r.getFirstToken(t)}},t.prototype.getLastToken=function(t){this.assertHasRealPosition();var n=this.getChildren(t),r=e.lastOrUndefined(n);if(r)return r.kind<157?r:r.getLastToken(t)},t.prototype.forEachChild=function(t,n){return e.forEachChild(this,t,n)},t}();function a(t,r,i,a){for(e.scanner.setTextPos(r);r=r.length&&(t=this.getEnd()),t||(t=r[n+1]-1);var i=this.getFullText();return"\n"===i[t]&&"\r"===i[t-1]?t-1:t},n.prototype.getNamedDeclarations=function(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations},n.prototype.computeNamedDeclarations=function(){var t=e.createMultiMap();return this.forEachChild((function i(a){switch(a.kind){case 251:case 208:case 165:case 164:var o=a,s=r(o);if(s){var u=function(e){var n=t.get(e);return n||t.set(e,n=[]),n}(s),c=e.lastOrUndefined(u);c&&o.parent===c.parent&&o.symbol===c.symbol?o.body&&!c.body&&(u[u.length-1]=o):u.push(o)}e.forEachChild(a,i);break;case 252:case 221:case 253:case 254:case 255:case 256:case 260:case 270:case 265:case 262:case 263:case 167:case 168:case 177:n(a),e.forEachChild(a,i);break;case 160:if(!e.hasSyntacticModifier(a,92))break;case 249:case 198:var l=a;if(e.isBindingPattern(l.name)){e.forEachChild(l.name,i);break}l.initializer&&i(l.initializer);case 291:case 163:case 162:n(a);break;case 267:var d=a;d.exportClause&&(e.isNamedExports(d.exportClause)?e.forEach(d.exportClause.elements,i):i(d.exportClause.name));break;case 261:var p=a.importClause;p&&(p.name&&n(p.name),p.namedBindings&&(263===p.namedBindings.kind?n(p.namedBindings):e.forEach(p.namedBindings.elements,i)));break;case 216:0!==e.getAssignmentDeclarationKind(a)&&n(a);default:e.forEachChild(a,i)}})),t;function n(e){var n=r(e);n&&t.add(n,e)}function r(t){var n=e.getNonAssignedNameOfDeclaration(t);return n&&(e.isComputedPropertyName(n)&&e.isPropertyAccessExpression(n.expression)?n.expression.name.text:e.isPropertyName(n)?e.getNameFromPropertyName(n):void 0)}},n}(i),_=function(){function t(e,t,n){this.fileName=e,this.text=t,this.skipTrivia=n}return t.prototype.getLineAndCharacterOfPosition=function(t){return e.getLineAndCharacterOfPosition(this,t)},t}();function v(t){var n=!0;for(var r in t)if(e.hasProperty(t,r)&&!y(r)){n=!1;break}if(n)return t;var i={};for(var r in t)e.hasProperty(t,r)&&(i[y(r)?r:r.charAt(0).toLowerCase()+r.substr(1)]=t[r]);return i}function y(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function b(){return{target:1,jsx:1}}e.toEditorSettings=v,e.displayPartsToString=function(t){return t?e.map(t,(function(e){return e.text})).join(""):""},e.getDefaultCompilerOptions=b,e.getSupportedCodeFixes=function(){return e.codefix.getSupportedErrorCodes()};var D=function(){function t(t,n){this.host=t,this.currentDirectory=t.getCurrentDirectory(),this.fileNameToEntry=new e.Map;for(var r=0,i=t.getScriptFileNames();r=this.throttleWaitMilliseconds&&(this.lastCancellationCheckTime=t,this.hostCancellationToken.isCancellationRequested())},t.prototype.throwIfCancellationRequested=function(){if(this.isCancellationRequested())throw new e.OperationCanceledException},t}();e.ThrottledCancellationToken=T;var w=["getSyntacticDiagnostics","getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls"],A=t(w,["getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getOccurrencesAtPosition","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors"]);function O(t){var n=function(t){switch(t.kind){case 10:case 14:case 8:if(158===t.parent.kind)return e.isObjectLiteralElement(t.parent.parent)?t.parent.parent:void 0;case 78:return!e.isObjectLiteralElement(t.parent)||200!==t.parent.parent.kind&&281!==t.parent.parent.kind||t.parent.name!==t?void 0:t.parent}}(t);return n&&(e.isObjectLiteralExpression(n.parent)||e.isJsxAttributes(n.parent))?n:void 0}function N(t,n,r,i){var a=e.getNameFromPropertyName(t.name);if(!a)return e.emptyArray;if(!r.isUnion())return(o=r.getProperty(a))?[o]:e.emptyArray;var o,s=e.mapDefined(r.types,(function(r){return e.isObjectLiteralExpression(t.parent)&&n.isTypeInvalidDueToUnionDiscriminant(r,t.parent)?void 0:r.getProperty(a)}));return i&&(0===s.length||s.length===r.types.length)&&(o=r.getProperty(a))?[o]:0===s.length?e.mapDefined(r.types,(function(e){return e.getProperty(a)})):s}e.createLanguageService=function(n,i,a){var o,s;void 0===i&&(i=e.createDocumentRegistry(n.useCaseSensitiveFileNames&&n.useCaseSensitiveFileNames(),n.getCurrentDirectory())),s=void 0===a?e.LanguageServiceMode.Semantic:"boolean"==typeof a?a?e.LanguageServiceMode.Syntactic:e.LanguageServiceMode.Semantic:a;var u,c,l=new E(n),d=0,p=new k(n.getCancellationToken&&n.getCancellationToken()),f=n.getCurrentDirectory();function h(e){n.log&&n.log(e)}!e.localizedDiagnosticMessages&&n.getLocalizedDiagnosticMessages&&e.setLocalizedDiagnosticMessages(n.getLocalizedDiagnosticMessages());var g=e.hostUsesCaseSensitiveFileNames(n),m=e.createGetCanonicalFileName(g),_=e.getSourceMapper({useCaseSensitiveFileNames:function(){return g},getCurrentDirectory:function(){return f},getProgram:C,fileExists:e.maybeBind(n,n.fileExists),readFile:e.maybeBind(n,n.readFile),getDocumentPositionMapper:e.maybeBind(n,n.getDocumentPositionMapper),getSourceFileLike:e.maybeBind(n,n.getSourceFileLike),log:h});function y(e){var t=u.getSourceFile(e);if(!t){var n=new Error("Could not find source file: '"+e+"'.");throw n.ProgramFiles=u.getSourceFiles().map((function(e){return e.fileName})),n}return t}function b(){var t,r;if(e.Debug.assert(s!==e.LanguageServiceMode.Syntactic),n.getProjectVersion){var a=n.getProjectVersion();if(a){if(c===a&&!(null===(t=n.hasChangedAutomaticTypeDirectiveNames)||void 0===t?void 0:t.call(n)))return;c=a}}var o=n.getTypeRootsVersion?n.getTypeRootsVersion():0;d!==o&&(h("TypeRoots version has changed; provide new program"),u=void 0,d=o);var l=new D(n,m),v=l.getRootFileNames(),y=n.hasInvalidatedResolution||e.returnFalse,b=e.maybeBind(n,n.hasChangedAutomaticTypeDirectiveNames),E=l.getProjectReferences();if(!e.isProgramUptoDate(u,v,l.compilationSettings(),(function(e,t){return n.getScriptVersion(t)}),T,y,b,E)){var C=l.compilationSettings(),S={getSourceFile:function(t,n,r,i){return w(t,e.toPath(t,f,m),n,r,i)},getSourceFileByPath:w,getCancellationToken:function(){return p},getCanonicalFileName:m,useCaseSensitiveFileNames:function(){return g},getNewLine:function(){return e.getNewLineCharacter(C,(function(){return e.getNewLineOrDefaultFromHost(n)}))},getDefaultLibFileName:function(e){return n.getDefaultLibFileName(e)},writeFile:e.noop,getCurrentDirectory:function(){return f},fileExists:T,readFile:function(t){var r=e.toPath(t,f,m),i=l&&l.getEntryByPath(r);return i?e.isString(i)?void 0:e.getSnapshotText(i.scriptSnapshot):n.readFile&&n.readFile(t)},getSymlinkCache:e.maybeBind(n,n.getSymlinkCache),realpath:e.maybeBind(n,n.realpath),directoryExists:function(t){return e.directoryProbablyExists(t,n)},getDirectories:function(e){return n.getDirectories?n.getDirectories(e):[]},readDirectory:function(t,r,i,a,o){return e.Debug.checkDefined(n.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),n.readDirectory(t,r,i,a,o)},onReleaseOldSourceFile:function(e,t){var n=i.getKeyForCompilationSettings(t);i.releaseDocumentWithKey(e.resolvedPath,n)},hasInvalidatedResolution:y,hasChangedAutomaticTypeDirectiveNames:b,trace:e.maybeBind(n,n.trace),resolveModuleNames:e.maybeBind(n,n.resolveModuleNames),resolveTypeReferenceDirectives:e.maybeBind(n,n.resolveTypeReferenceDirectives),useSourceOfProjectReferenceRedirect:e.maybeBind(n,n.useSourceOfProjectReferenceRedirect)};null===(r=n.setCompilerHost)||void 0===r||r.call(n,S);var x=i.getKeyForCompilationSettings(C),k={rootNames:v,options:C,host:S,oldProgram:u,projectReferences:E};return u=e.createProgram(k),l=void 0,_.clearCache(),void u.getTypeChecker()}function T(t){var r=e.toPath(t,f,m),i=l&&l.getEntryByPath(r);return i?!e.isString(i):!!n.fileExists&&n.fileExists(t)}function w(t,n,r,a,o){e.Debug.assert(void 0!==l,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");var s=l&&l.getOrCreateEntryByPath(t,n);if(s){if(!o){var c=u&&u.getSourceFileByPath(n);if(c)return e.Debug.assertEqual(s.scriptKind,c.scriptKind,"Registered script kind should match new script kind."),i.updateDocumentWithKey(t,n,C,x,s.scriptSnapshot,s.version,s.scriptKind)}return i.acquireDocumentWithKey(t,n,C,x,s.scriptSnapshot,s.version,s.scriptKind)}}}function C(){if(s!==e.LanguageServiceMode.Syntactic)return b(),u;e.Debug.assert(void 0===u)}function S(t,n,r){var i=e.normalizePath(t);e.Debug.assert(r.some((function(t){return e.normalizePath(t)===i}))),b();var a=e.mapDefined(r,(function(e){return u.getSourceFile(e)})),o=y(t);return e.DocumentHighlights.getDocumentHighlights(u,p,o,n,a)}function x(t,n,r,i){b();var a=r&&2===r.use?u.getSourceFiles().filter((function(e){return!u.isSourceFileDefaultLibrary(e)})):u.getSourceFiles();return e.FindAllReferences.findReferenceOrRenameEntries(u,p,a,t,n,r,i)}function T(t){var r=e.getScriptKind(t,n);return 3===r||4===r}var I=new e.Map(e.getEntries(((o={})[18]=19,o[20]=21,o[22]=23,o[31]=29,o)));function F(t){return e.Debug.assertEqual(t.type,"install package"),n.installPackage?n.installPackage({fileName:function(t){return e.toPath(t,f,m)}(t.file),packageName:t.packageName}):Promise.reject("Host does not implement `installPackage`")}function L(e,t){return{lineStarts:e.getLineStarts(),firstLine:e.getLineAndCharacterOfPosition(t.pos).line,lastLine:e.getLineAndCharacterOfPosition(t.end).line}}function P(t,n,r){for(var i=l.getCurrentSourceFile(t),a=[],o=L(i,n),s=o.lineStarts,u=o.firstLine,c=o.lastLine,d=r||!1,p=Number.MAX_VALUE,f=new e.Map,h=new RegExp(/\S/),g=e.isInsideJsxElement(i,s[u]),m=g?"{/*":"//",_=u;_<=c;_++){var v=i.text.substring(s[_],i.getLineEndOfPosition(s[_])),y=h.exec(v);y&&(p=Math.min(p,y.index),f.set(_.toString(),y.index),v.substr(y.index,m.length)!==m&&(d=void 0===r||r))}for(_=u;_<=c;_++)if(u===c||s[_]!==n.end){var b=f.get(_.toString());void 0!==b&&(g?a.push.apply(a,R(t,{pos:s[_]+p,end:i.getLineEndOfPosition(s[_])},d,g)):d?a.push({newText:m,span:{length:0,start:s[_]+p}}):i.text.substr(s[_]+b,m.length)===m&&a.push({newText:"",span:{length:m.length,start:s[_]+b}}))}return a}function R(t,n,r,i){for(var a,o=l.getCurrentSourceFile(t),s=[],u=o.text,c=!1,d=r||!1,p=[],f=n.pos,h=void 0!==i?i:e.isInsideJsxElement(o,f),g=h?"{/*":"/*",m=h?"*/}":"*/",_=h?"\\{\\/\\*":"\\/\\*",v=h?"\\*\\/\\}":"\\*\\/";f<=n.end;){var y=u.substr(f,g.length)===g?g.length:0,b=e.isInComment(o,f+y);if(b)h&&(b.pos--,b.end++),p.push(b.pos),3===b.kind&&p.push(b.end),c=!0,f=b.end+1;else{var D=u.substring(f,n.end).search("("+_+")|("+v+")");d=void 0!==r?r:d||!e.isTextWhiteSpaceLike(u,f,-1===D?n.end:f+D),f=-1===D?n.end+1:f+D+m.length}}if(d||!c){2!==(null===(a=e.isInComment(o,n.pos))||void 0===a?void 0:a.kind)&&e.insertSorted(p,n.pos,e.compareValues),e.insertSorted(p,n.end,e.compareValues);var E=p[0];u.substr(E,g.length)!==g&&s.push({newText:g,span:{length:0,start:E}});for(var C=1;C0?k-m.length:0;y=u.substr(T,m.length)===m?m.length:0,s.push({newText:"",span:{length:g.length,start:k-y}})}return s}function M(t){var n=t.openingElement,r=t.closingElement,i=t.parent;return!e.tagNamesAreEquivalent(n.tagName,r.tagName)||e.isJsxElement(i)&&e.tagNamesAreEquivalent(n.tagName,i.openingElement.tagName)&&M(i)}function B(t,r,i,a,o){var s="number"==typeof r?[r,void 0]:[r.pos,r.end];return{file:t,startPosition:s[0],endPosition:s[1],program:C(),host:n,formatContext:e.formatting.getFormatContext(a,n),cancellationToken:p,preferences:i,triggerReason:o}}I.forEach((function(e,t){return I.set(e.toString(),Number(t))}));var j={dispose:function(){if(u){var t=i.getKeyForCompilationSettings(u.getCompilerOptions());e.forEach(u.getSourceFiles(),(function(e){return i.releaseDocumentWithKey(e.resolvedPath,t)})),u=void 0}n=void 0},cleanupSemanticCache:function(){u=void 0},getSyntacticDiagnostics:function(e){return b(),u.getSyntacticDiagnostics(y(e),p).slice()},getSemanticDiagnostics:function(n){b();var r=y(n),i=u.getSemanticDiagnostics(r,p);if(!e.getEmitDeclarations(u.getCompilerOptions()))return i.slice();var a=u.getDeclarationDiagnostics(r,p);return t(i,a)},getSuggestionDiagnostics:function(t){return b(),e.computeSuggestionDiagnostics(y(t),u,p)},getCompilerOptionsDiagnostics:function(){return b(),t(u.getOptionsDiagnostics(p),u.getGlobalDiagnostics(p))},getSyntacticClassifications:function(t,n){return e.getSyntacticClassifications(p,l.getCurrentSourceFile(t),n)},getSemanticClassifications:function(t,n,r){return T(t)?(b(),"2020"===(r||"original")?e.classifier.v2020.getSemanticClassifications(u,p,y(t),n):e.getSemanticClassifications(u.getTypeChecker(),p,y(t),u.getClassifiableNames(),n)):[]},getEncodedSyntacticClassifications:function(t,n){return e.getEncodedSyntacticClassifications(p,l.getCurrentSourceFile(t),n)},getEncodedSemanticClassifications:function(t,n,r){return T(t)?(b(),"original"===(r||"original")?e.getEncodedSemanticClassifications(u.getTypeChecker(),p,y(t),u.getClassifiableNames(),n):e.classifier.v2020.getEncodedSemanticClassifications(u,p,y(t),n)):{spans:[],endOfLineState:0}},getCompletionsAtPosition:function(t,i,a){void 0===a&&(a=e.emptyOptions);var o=r(r({},e.identity(a)),{includeCompletionsForModuleExports:a.includeCompletionsForModuleExports||a.includeExternalModuleExports,includeCompletionsWithInsertText:a.includeCompletionsWithInsertText||a.includeInsertTextCompletions});return b(),e.Completions.getCompletionsAtPosition(n,u,h,y(t),i,o,a.triggerCharacter)},getCompletionEntryDetails:function(t,r,i,a,o,s){return void 0===s&&(s=e.emptyOptions),b(),e.Completions.getCompletionEntryDetails(u,h,y(t),r,{name:i,source:o},n,a&&e.formatting.getFormatContext(a,n),s,p)},getCompletionEntrySymbol:function(t,r,i,a,o){return void 0===o&&(o=e.emptyOptions),b(),e.Completions.getCompletionEntrySymbol(u,h,y(t),r,{name:i,source:a},n,o)},getSignatureHelpItems:function(t,n,r){var i=(void 0===r?e.emptyOptions:r).triggerReason;b();var a=y(t);return e.SignatureHelp.getSignatureHelpItems(u,a,n,i,p)},getQuickInfoAtPosition:function(t,n){b();var r=y(t),i=e.getTouchingPropertyName(r,n);if(i!==r){var a=u.getTypeChecker(),o=function(t){return e.isNewExpression(t.parent)&&t.pos===t.parent.pos?t.parent.expression:t}(i),s=function(t,n){var r=O(t);if(r){var i=n.getContextualType(r.parent),a=i&&N(r,n,i,!1);if(a&&1===a.length)return e.first(a)}return n.getSymbolAtLocation(t)}(o,a);if(!s||a.isUnknownSymbol(s)){var c=function(t,n,r){switch(n.kind){case 78:return!e.isLabelName(n)&&!e.isTagName(n);case 201:case 157:return!e.isInComment(t,r);case 107:case 187:case 105:return!0;default:return!1}}(r,o,n)?a.getTypeAtLocation(o):void 0;return c&&{kind:"",kindModifiers:"",textSpan:e.createTextSpanFromNode(o,r),displayParts:a.runWithCancellationToken(p,(function(t){return e.typeToDisplayParts(t,c,e.getContainerNode(o))})),documentation:c.symbol?c.symbol.getDocumentationComment(a):void 0,tags:c.symbol?c.symbol.getJsDocTags():void 0}}var l=a.runWithCancellationToken(p,(function(t){return e.SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(t,s,r,e.getContainerNode(o),o)})),d=l.symbolKind,f=l.displayParts,h=l.documentation,g=l.tags;return{kind:d,kindModifiers:e.SymbolDisplay.getSymbolModifiers(s),textSpan:e.createTextSpanFromNode(o,r),displayParts:f,documentation:h,tags:g}}},getDefinitionAtPosition:function(t,n){return b(),e.GoToDefinition.getDefinitionAtPosition(u,y(t),n)},getDefinitionAndBoundSpan:function(t,n){return b(),e.GoToDefinition.getDefinitionAndBoundSpan(u,y(t),n)},getImplementationAtPosition:function(t,n){return b(),e.FindAllReferences.getImplementationsAtPosition(u,p,u.getSourceFiles(),y(t),n)},getTypeDefinitionAtPosition:function(t,n){return b(),e.GoToDefinition.getTypeDefinitionAtPosition(u.getTypeChecker(),y(t),n)},getReferencesAtPosition:function(t,n){return b(),x(e.getTouchingPropertyName(y(t),n),n,{use:1},e.FindAllReferences.toReferenceEntry)},findReferences:function(t,n){return b(),e.FindAllReferences.findReferencedSymbols(u,p,u.getSourceFiles(),y(t),n)},getOccurrencesAtPosition:function(t,n){return e.flatMap(S(t,n,[t]),(function(e){return e.highlightSpans.map((function(t){return r(r({fileName:e.fileName,textSpan:t.textSpan,isWriteAccess:"writtenReference"===t.kind,isDefinition:!1},t.isInString&&{isInString:!0}),t.contextSpan&&{contextSpan:t.contextSpan})}))}))},getDocumentHighlights:S,getNameOrDottedNameSpan:function(t,n,r){var i=l.getCurrentSourceFile(t),a=e.getTouchingPropertyName(i,n);if(a!==i){switch(a.kind){case 201:case 157:case 10:case 94:case 109:case 103:case 105:case 107:case 187:case 78:break;default:return}for(var o=a;;)if(e.isRightSideOfPropertyAccess(o)||e.isRightSideOfQualifiedName(o))o=o.parent;else{if(!e.isNameOfModuleDeclaration(o))break;if(256!==o.parent.parent.kind||o.parent.parent.body!==o.parent)break;o=o.parent.parent.name}return e.createTextSpanFromBounds(o.getStart(),a.getEnd())}},getBreakpointStatementAtPosition:function(t,n){var r=l.getCurrentSourceFile(t);return e.BreakpointResolver.spanInSourceFileAtLocation(r,n)},getNavigateToItems:function(t,n,r,i){void 0===i&&(i=!1),b();var a=r?[y(r)]:u.getSourceFiles();return e.NavigateTo.getNavigateToItems(a,u.getTypeChecker(),p,t,n,i)},getRenameInfo:function(t,n,r){return b(),e.Rename.getRenameInfo(u,y(t),n,r)},getSmartSelectionRange:function(t,n){return e.SmartSelectionRange.getSmartSelectionRange(n,l.getCurrentSourceFile(t))},findRenameLocations:function(t,n,i,a,o){b();var s=y(t),u=e.getAdjustedRenameLocation(e.getTouchingPropertyName(s,n));if(e.isIdentifier(u)&&(e.isJsxOpeningElement(u.parent)||e.isJsxClosingElement(u.parent))&&e.isIntrinsicJsxName(u.escapedText)){var c=u.parent.parent;return[c.openingElement,c.closingElement].map((function(t){var n=e.createTextSpanFromNode(t.tagName,s);return r({fileName:s.fileName,textSpan:n},e.FindAllReferences.toContextSpan(n,s,t.parent))}))}return x(u,n,{findInStrings:i,findInComments:a,providePrefixAndSuffixTextForRename:o,use:2},(function(t,n,r){return e.FindAllReferences.toRenameLocation(t,n,r,o||!1)}))},getNavigationBarItems:function(t){return e.NavigationBar.getNavigationBarItems(l.getCurrentSourceFile(t),p)},getNavigationTree:function(t){return e.NavigationBar.getNavigationTree(l.getCurrentSourceFile(t),p)},getOutliningSpans:function(t){var n=l.getCurrentSourceFile(t);return e.OutliningElementsCollector.collectElements(n,p)},getTodoComments:function(t,n){b();var r=y(t);p.throwIfCancellationRequested();var i,a=r.text,o=[];if(n.length>0&&!function(t){return e.stringContains(t,"/node_modules/")}(r.fileName))for(var s=function(){var t="("+/(?:^(?:\s|\*)*)/.source+"|"+/(?:\/\/+\s*)/.source+"|"+/(?:\/\*+\s*)/.source+")",r="(?:"+e.map(n,(function(e){return"("+e.text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")+")"})).join("|")+")";return new RegExp(t+"("+r+/(?:.*?)/.source+")"+/(?:$|\*\/)/.source,"gim")}(),u=void 0;u=s.exec(a);){p.throwIfCancellationRequested(),e.Debug.assert(u.length===n.length+3);var c=u[1],l=u.index+c.length;if(e.isInComment(r,l)){for(var d=void 0,f=0;f=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57)){var h=u[2];o.push({descriptor:d,message:h,position:l})}}}return o},getBraceMatchingAtPosition:function(t,n){var r=l.getCurrentSourceFile(t),i=e.getTouchingToken(r,n),a=i.getStart(r)===n?I.get(i.kind.toString()):void 0,o=a&&e.findChildOfKind(i.parent,a,r);return o?[e.createTextSpanFromNode(i,r),e.createTextSpanFromNode(o,r)].sort((function(e,t){return e.start-t.start})):e.emptyArray},getIndentationAtPosition:function(t,n,r){var i=e.timestamp(),a=v(r),o=l.getCurrentSourceFile(t);h("getIndentationAtPosition: getCurrentSourceFile: "+(e.timestamp()-i)),i=e.timestamp();var s=e.formatting.SmartIndenter.getIndentation(n,o,a);return h("getIndentationAtPosition: computeIndentation : "+(e.timestamp()-i)),s},getFormattingEditsForRange:function(t,r,i,a){var o=l.getCurrentSourceFile(t);return e.formatting.formatSelection(r,i,o,e.formatting.getFormatContext(v(a),n))},getFormattingEditsForDocument:function(t,r){return e.formatting.formatDocument(l.getCurrentSourceFile(t),e.formatting.getFormatContext(v(r),n))},getFormattingEditsAfterKeystroke:function(t,r,i,a){var o=l.getCurrentSourceFile(t),s=e.formatting.getFormatContext(v(a),n);if(!e.isInComment(o,r))switch(i){case"{":return e.formatting.formatOnOpeningCurly(r,o,s);case"}":return e.formatting.formatOnClosingCurly(r,o,s);case";":return e.formatting.formatOnSemicolon(r,o,s);case"\n":return e.formatting.formatOnEnter(r,o,s)}return[]},getDocCommentTemplateAtPosition:function(t,r){return e.JsDoc.getDocCommentTemplateAtPosition(e.getNewLineOrDefaultFromHost(n),l.getCurrentSourceFile(t),r)},isValidBraceCompletionAtPosition:function(t,n,r){if(60===r)return!1;var i=l.getCurrentSourceFile(t);if(e.isInString(i,n))return!1;if(e.isInsideJsxElementOrAttribute(i,n))return 123===r;if(e.isInTemplateString(i,n))return!1;switch(r){case 39:case 34:case 96:return!e.isInComment(i,n)}return!0},getJsxClosingTagAtPosition:function(t,n){var r=l.getCurrentSourceFile(t),i=e.findPrecedingToken(n,r);if(i){var a=31===i.kind&&e.isJsxOpeningElement(i.parent)?i.parent.parent:e.isJsxText(i)?i.parent:void 0;return a&&M(a)?{newText:""}:void 0}},getSpanOfEnclosingComment:function(t,n,r){var i=l.getCurrentSourceFile(t),a=e.formatting.getRangeOfEnclosingComment(i,n);return!a||r&&3!==a.kind?void 0:e.createTextSpanFromRange(a)},getCodeFixesAtPosition:function(t,r,i,a,o,s){void 0===s&&(s=e.emptyOptions),b();var c=y(t),l=e.createTextSpanFromBounds(r,i),d=e.formatting.getFormatContext(o,n);return e.flatMap(e.deduplicate(a,e.equateValues,e.compareValues),(function(t){return p.throwIfCancellationRequested(),e.codefix.getFixes({errorCode:t,sourceFile:c,span:l,program:u,host:n,cancellationToken:p,formatContext:d,preferences:s})}))},getCombinedCodeFix:function(t,r,i,a){void 0===a&&(a=e.emptyOptions),b(),e.Debug.assert("file"===t.type);var o=y(t.fileName),s=e.formatting.getFormatContext(i,n);return e.codefix.getAllFixes({fixId:r,sourceFile:o,program:u,host:n,cancellationToken:p,formatContext:s,preferences:a})},applyCodeActionCommand:function(t,n){var r="string"==typeof t?n:t;return e.isArray(r)?Promise.all(r.map((function(e){return F(e)}))):F(r)},organizeImports:function(t,r,i){void 0===i&&(i=e.emptyOptions),b(),e.Debug.assert("file"===t.type);var a=y(t.fileName),o=e.formatting.getFormatContext(r,n);return e.OrganizeImports.organizeImports(a,o,n,u,i)},getEditsForFileRename:function(t,r,i,a){return void 0===a&&(a=e.emptyOptions),e.getEditsForFileRename(C(),t,r,n,e.formatting.getFormatContext(i,n),a,_)},getEmitOutput:function(t,r,i){b();var a=y(t),o=n.getCustomTransformers&&n.getCustomTransformers();return e.getFileEmitOutput(u,a,!!r,p,o,i)},getNonBoundSourceFile:function(e){return l.getCurrentSourceFile(e)},getProgram:C,getAutoImportProvider:function(){var e;return null===(e=n.getPackageJsonAutoImportProvider)||void 0===e?void 0:e.call(n)},getApplicableRefactors:function(t,n,r,i){void 0===r&&(r=e.emptyOptions),b();var a=y(t);return e.refactor.getApplicableRefactors(B(a,n,r,e.emptyOptions,i))},getEditsForRefactor:function(t,n,r,i,a,o){void 0===o&&(o=e.emptyOptions),b();var s=y(t);return e.refactor.getEditsForRefactor(B(s,r,o,n),i,a)},toLineColumnOffset:_.toLineColumnOffset,getSourceMapper:function(){return _},clearSourceMapperCache:function(){return _.clearCache()},prepareCallHierarchy:function(t,n){b();var r=e.CallHierarchy.resolveCallHierarchyDeclaration(u,e.getTouchingPropertyName(y(t),n));return r&&e.mapOneOrMany(r,(function(t){return e.CallHierarchy.createCallHierarchyItem(u,t)}))},provideCallHierarchyIncomingCalls:function(t,n){b();var r=y(t),i=e.firstOrOnly(e.CallHierarchy.resolveCallHierarchyDeclaration(u,0===n?r:e.getTouchingPropertyName(r,n)));return i?e.CallHierarchy.getIncomingCalls(u,i,p):[]},provideCallHierarchyOutgoingCalls:function(t,n){b();var r=y(t),i=e.firstOrOnly(e.CallHierarchy.resolveCallHierarchyDeclaration(u,0===n?r:e.getTouchingPropertyName(r,n)));return i?e.CallHierarchy.getOutgoingCalls(u,i):[]},toggleLineComment:P,toggleMultilineComment:R,commentSelection:function(e,t){var n=L(l.getCurrentSourceFile(e),t);return n.firstLine===n.lastLine&&t.pos!==t.end?R(e,t,!0):P(e,t,!0)},uncommentSelection:function(t,n){var r=l.getCurrentSourceFile(t),i=[],a=n.pos,o=n.end;a===o&&(o+=e.isInsideJsxElement(r,a)?2:1);for(var s=a;s<=o;s++){var u=e.isInComment(r,s);if(u){switch(u.kind){case 2:i.push.apply(i,P(t,{end:u.end,pos:u.pos+1},!1));break;case 3:i.push.apply(i,R(t,{end:u.end,pos:u.pos+1},!1))}s=u.end+1}}return i}};switch(s){case e.LanguageServiceMode.Semantic:break;case e.LanguageServiceMode.PartialSemantic:w.forEach((function(e){return j[e]=function(){throw new Error("LanguageService Operation: "+e+" not allowed in LanguageServiceMode.PartialSemantic")}}));break;case e.LanguageServiceMode.Syntactic:A.forEach((function(e){return j[e]=function(){throw new Error("LanguageService Operation: "+e+" not allowed in LanguageServiceMode.Syntactic")}}));break;default:e.Debug.assertNever(s)}return j},e.getNameTable=function(t){return t.nameTable||function(t){var n=t.nameTable=new e.Map;t.forEachChild((function t(r){if(e.isIdentifier(r)&&!e.isTagName(r)&&r.escapedText||e.isStringOrNumericLiteralLike(r)&&function(t){return e.isDeclarationName(t)||272===t.parent.kind||function(e){return e&&e.parent&&202===e.parent.kind&&e.parent.argumentExpression===e}(t)||e.isLiteralComputedPropertyDeclarationName(t)}(r)){var i=e.getEscapedTextOfIdentifierOrLiteral(r);n.set(i,void 0===n.get(i)?r.pos:-1)}else e.isPrivateIdentifier(r)&&(i=r.escapedText,n.set(i,void 0===n.get(i)?r.pos:-1));if(e.forEachChild(r,t),e.hasJSDocNodes(r))for(var a=0,o=r.jsDoc;ai){var a=e.findPrecedingToken(r.pos,t);if(!a||t.getLineAndCharacterOfPosition(a.getEnd()).line!==i)return;r=a}if(!(8388608&r.flags))return d(r)}function o(n,r){var i=n.decorators?e.skipTrivia(t.text,n.decorators.end):n.getStart(t);return e.createTextSpanFromBounds(i,(r||n).getEnd())}function s(n,r){return o(n,e.findNextToken(r,r.parent,t))}function u(e,n){return e&&i===t.getLineAndCharacterOfPosition(e.getStart(t)).line?d(e):d(n)}function c(n){return d(e.findPrecedingToken(n.pos,t))}function l(n){return d(e.findNextToken(n,n.parent,t))}function d(n){if(n){var r=n.parent;switch(n.kind){case 232:return v(n.declarationList.declarations[0]);case 249:case 163:case 162:return v(n);case 160:return function t(n){if(e.isBindingPattern(n.name))return E(n.name);if(function(t){return!!t.initializer||void 0!==t.dotDotDotToken||e.hasSyntacticModifier(t,12)}(n))return o(n);var r=n.parent,i=r.parameters.indexOf(n);return e.Debug.assert(-1!==i),0!==i?t(r.parameters[i-1]):d(r.body)}(n);case 251:case 165:case 164:case 167:case 168:case 166:case 208:case 209:return function(e){if(e.body)return y(e)?o(e):d(e.body)}(n);case 230:if(e.isFunctionBlock(n))return function(e){var t=e.statements.length?e.statements[0]:e.getLastToken();return y(e.parent)?u(e.parent,t):d(t)}(n);case 257:return b(n);case 287:return b(n.block);case 233:return o(n.expression);case 242:return o(n.getChildAt(0),n.expression);case 236:return s(n,n.expression);case 235:return d(n.statement);case 248:return o(n.getChildAt(0));case 234:return s(n,n.expression);case 245:return d(n.statement);case 241:case 240:return o(n.getChildAt(0),n.label);case 237:return function(e){return e.initializer?D(e):e.condition?o(e.condition):e.incrementor?o(e.incrementor):void 0}(n);case 238:return s(n,n.expression);case 239:return D(n);case 244:return s(n,n.expression);case 284:case 285:return d(n.statements[0]);case 247:return b(n.tryBlock);case 246:case 266:return o(n,n.expression);case 260:return o(n,n.moduleReference);case 261:case 267:return o(n,n.moduleSpecifier);case 256:if(1!==e.getModuleInstanceState(n))return;case 252:case 255:case 291:case 198:return o(n);case 243:return d(n.statement);case 161:return m=r.decorators,e.createTextSpanFromBounds(e.skipTrivia(t.text,m.pos),m.end);case 196:case 197:return E(n);case 253:case 254:return;case 26:case 1:return u(e.findPrecedingToken(n.pos,t));case 27:return c(n);case 18:return function(n){switch(n.parent.kind){case 255:var r=n.parent;return u(e.findPrecedingToken(n.pos,t,n.parent),r.members.length?r.members[0]:r.getLastToken(t));case 252:var i=n.parent;return u(e.findPrecedingToken(n.pos,t,n.parent),i.members.length?i.members[0]:i.getLastToken(t));case 258:return u(n.parent.parent,n.parent.clauses[0])}return d(n.parent)}(n);case 19:return function(t){switch(t.parent.kind){case 257:if(1!==e.getModuleInstanceState(t.parent.parent))return;case 255:case 252:return o(t);case 230:if(e.isFunctionBlock(t.parent))return o(t);case 287:return d(e.lastOrUndefined(t.parent.statements));case 258:var n=t.parent,r=e.lastOrUndefined(n.clauses);return r?d(e.lastOrUndefined(r.statements)):void 0;case 196:var i=t.parent;return d(e.lastOrUndefined(i.elements)||i);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)){var a=t.parent;return o(e.lastOrUndefined(a.properties)||a)}return d(t.parent)}}(n);case 23:return function(t){switch(t.parent.kind){case 197:var n=t.parent;return o(e.lastOrUndefined(n.elements)||n);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)){var r=t.parent;return o(e.lastOrUndefined(r.elements)||r)}return d(t.parent)}}(n);case 20:return function(e){return 235===e.parent.kind||203===e.parent.kind||204===e.parent.kind?c(e):207===e.parent.kind?l(e):d(e.parent)}(n);case 21:return function(e){switch(e.parent.kind){case 208:case 251:case 209:case 165:case 164:case 167:case 168:case 166:case 236:case 235:case 237:case 239:case 203:case 204:case 207:return c(e);default:return d(e.parent)}}(n);case 58:return function(t){return e.isFunctionLike(t.parent)||288===t.parent.kind||160===t.parent.kind?c(t):d(t.parent)}(n);case 31:case 29:return function(e){return 206===e.parent.kind?l(e):d(e.parent)}(n);case 114:return function(e){return 235===e.parent.kind?s(e,e.parent.expression):d(e.parent)}(n);case 90:case 82:case 95:return l(n);case 156:return function(e){return 239===e.parent.kind?l(e):d(e.parent)}(n);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(n))return C(n);if((78===n.kind||220===n.kind||288===n.kind||289===n.kind)&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(r))return o(n);if(216===n.kind){var i=n,a=i.left,p=i.operatorToken;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(a))return C(a);if(62===p.kind&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(n.parent))return o(n);if(27===p.kind)return d(a)}if(e.isExpressionNode(n))switch(r.kind){case 235:return c(n);case 161:return d(n.parent);case 237:case 239:return o(n);case 216:if(27===n.parent.operatorToken.kind)return o(n);break;case 209:if(n.parent.body===n)return o(n)}switch(n.parent.kind){case 288:if(n.parent.name===n&&!e.isArrayLiteralOrObjectLiteralDestructuringPattern(n.parent.parent))return d(n.parent.initializer);break;case 206:if(n.parent.type===n)return l(n.parent.type);break;case 249:case 160:var f=n.parent,h=f.initializer,g=f.type;if(h===n||g===n||e.isAssignmentOperator(n.kind))return c(n);break;case 216:if(a=n.parent.left,e.isArrayLiteralOrObjectLiteralDestructuringPattern(a)&&n!==a)return c(n);break;default:if(e.isFunctionLike(n.parent)&&n.parent.type===n)return c(n)}return d(n.parent)}}var m;function _(n){return e.isVariableDeclarationList(n.parent)&&n.parent.declarations[0]===n?o(e.findPrecedingToken(n.pos,t,n.parent),n):o(n)}function v(n){if(238===n.parent.parent.kind)return d(n.parent.parent);var r=n.parent;return e.isBindingPattern(n.name)?E(n.name):n.initializer||e.hasSyntacticModifier(n,1)||239===r.parent.kind?_(n):e.isVariableDeclarationList(n.parent)&&n.parent.declarations[0]!==n?d(e.findPrecedingToken(n.pos,t,n.parent)):void 0}function y(t){return e.hasSyntacticModifier(t,1)||252===t.parent.kind&&166!==t.kind}function b(n){switch(n.parent.kind){case 256:if(1!==e.getModuleInstanceState(n.parent))return;case 236:case 234:case 238:return u(n.parent,n.statements[0]);case 237:case 239:return u(e.findPrecedingToken(n.pos,t,n.parent),n.statements[0])}return d(n.statements[0])}function D(e){if(250!==e.initializer.kind)return d(e.initializer);var t=e.initializer;return t.declarations.length>0?d(t.declarations[0]):void 0}function E(t){var n=e.forEach(t.elements,(function(e){return 222!==e.kind?e:void 0}));return n?d(n):198===t.parent.kind?o(t.parent):_(t.parent)}function C(t){e.Debug.assert(197!==t.kind&&196!==t.kind);var n=199===t.kind?t.elements:t.properties,r=e.forEach(n,(function(e){return 222!==e.kind?e:void 0}));return r?d(r):o(216===t.parent.kind?t.parent:t)}}}}(e.BreakpointResolver||(e.BreakpointResolver={}))}(u||(u={})),function(e){e.transform=function(t,n,r){var i=[];r=e.fixupCompilerOptions(r,i);var a=e.isArray(t)?t:[t],o=e.transformNodes(void 0,void 0,e.factory,r,a,n,!0);return o.diagnostics=e.concatenate(o.diagnostics,i),o}}(u||(u={}));var u,c=function(){return this}();!function(e){function n(e,t){e&&e.log("*INTERNAL ERROR* - Exception in typescript services: "+t.message)}var i=function(){function t(e){this.scriptSnapshotShim=e}return t.prototype.getText=function(e,t){return this.scriptSnapshotShim.getText(e,t)},t.prototype.getLength=function(){return this.scriptSnapshotShim.getLength()},t.prototype.getChangeRange=function(t){var n=t,r=this.scriptSnapshotShim.getChangeRange(n.scriptSnapshotShim);if(null===r)return null;var i=JSON.parse(r);return e.createTextChangeRange(e.createTextSpan(i.span.start,i.span.length),i.newLength)},t.prototype.dispose=function(){"dispose"in this.scriptSnapshotShim&&this.scriptSnapshotShim.dispose()},t}(),a=function(){function t(t){var n=this;this.shimHost=t,this.loggingEnabled=!1,this.tracingEnabled=!1,"getModuleResolutionsForFile"in this.shimHost&&(this.resolveModuleNames=function(t,r){var i=JSON.parse(n.shimHost.getModuleResolutionsForFile(r));return e.map(t,(function(t){var n=e.getProperty(i,t);return n?{resolvedFileName:n,extension:e.extensionFromPath(n),isExternalLibraryImport:!1}:void 0}))}),"directoryExists"in this.shimHost&&(this.directoryExists=function(e){return n.shimHost.directoryExists(e)}),"getTypeReferenceDirectiveResolutionsForFile"in this.shimHost&&(this.resolveTypeReferenceDirectives=function(t,r){var i=JSON.parse(n.shimHost.getTypeReferenceDirectiveResolutionsForFile(r));return e.map(t,(function(t){return e.getProperty(i,t)}))})}return t.prototype.log=function(e){this.loggingEnabled&&this.shimHost.log(e)},t.prototype.trace=function(e){this.tracingEnabled&&this.shimHost.trace(e)},t.prototype.error=function(e){this.shimHost.error(e)},t.prototype.getProjectVersion=function(){if(this.shimHost.getProjectVersion)return this.shimHost.getProjectVersion()},t.prototype.getTypeRootsVersion=function(){return this.shimHost.getTypeRootsVersion?this.shimHost.getTypeRootsVersion():0},t.prototype.useCaseSensitiveFileNames=function(){return!!this.shimHost.useCaseSensitiveFileNames&&this.shimHost.useCaseSensitiveFileNames()},t.prototype.getCompilationSettings=function(){var e=this.shimHost.getCompilationSettings();if(null===e||""===e)throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");var t=JSON.parse(e);return t.allowNonTsExtensions=!0,t},t.prototype.getScriptFileNames=function(){var e=this.shimHost.getScriptFileNames();return JSON.parse(e)},t.prototype.getScriptSnapshot=function(e){var t=this.shimHost.getScriptSnapshot(e);return t&&new i(t)},t.prototype.getScriptKind=function(e){return"getScriptKind"in this.shimHost?this.shimHost.getScriptKind(e):0},t.prototype.getScriptVersion=function(e){return this.shimHost.getScriptVersion(e)},t.prototype.getLocalizedDiagnosticMessages=function(){var e=this.shimHost.getLocalizedDiagnosticMessages();if(null===e||""===e)return null;try{return JSON.parse(e)}catch(e){return this.log(e.description||"diagnosticMessages.generated.json has invalid JSON format"),null}},t.prototype.getCancellationToken=function(){var t=this.shimHost.getCancellationToken();return new e.ThrottledCancellationToken(t)},t.prototype.getCurrentDirectory=function(){return this.shimHost.getCurrentDirectory()},t.prototype.getDirectories=function(e){return JSON.parse(this.shimHost.getDirectories(e))},t.prototype.getDefaultLibFileName=function(e){return this.shimHost.getDefaultLibFileName(JSON.stringify(e))},t.prototype.readDirectory=function(t,n,r,i,a){var o=e.getFileMatcherPatterns(t,r,i,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(t,JSON.stringify(n),JSON.stringify(o.basePaths),o.excludePattern,o.includeFilePattern,o.includeDirectoryPattern,a))},t.prototype.readFile=function(e,t){return this.shimHost.readFile(e,t)},t.prototype.fileExists=function(e){return this.shimHost.fileExists(e)},t}();e.LanguageServiceShimHostAdapter=a;var u=function(){function t(e){var t=this;this.shimHost=e,this.useCaseSensitiveFileNames=!!this.shimHost.useCaseSensitiveFileNames&&this.shimHost.useCaseSensitiveFileNames(),"directoryExists"in this.shimHost?this.directoryExists=function(e){return t.shimHost.directoryExists(e)}:this.directoryExists=void 0,"realpath"in this.shimHost?this.realpath=function(e){return t.shimHost.realpath(e)}:this.realpath=void 0}return t.prototype.readDirectory=function(t,n,r,i,a){var o=e.getFileMatcherPatterns(t,r,i,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(t,JSON.stringify(n),JSON.stringify(o.basePaths),o.excludePattern,o.includeFilePattern,o.includeDirectoryPattern,a))},t.prototype.fileExists=function(e){return this.shimHost.fileExists(e)},t.prototype.readFile=function(e){return this.shimHost.readFile(e)},t.prototype.getDirectories=function(e){return JSON.parse(this.shimHost.getDirectories(e))},t}();function l(e,t,n,r){return d(e,t,!0,n,r)}function d(t,r,i,a,o){try{var s=function(t,n,r,i){var a;i&&(t.log(n),a=e.timestamp());var o=r();if(i){var s=e.timestamp();if(t.log(n+" completed in "+(s-a)+" msec"),e.isString(o)){var u=o;u.length>128&&(u=u.substring(0,128)+"..."),t.log(" result.length="+u.length+", result='"+JSON.stringify(u)+"'")}}return o}(t,r,a,o);return i?JSON.stringify({result:s}):s}catch(i){return i instanceof e.OperationCanceledException?JSON.stringify({canceled:!0}):(n(t,i),i.description=r,JSON.stringify({error:i}))}}e.CoreServicesShimHostAdapter=u;var p=function(){function e(e){this.factory=e,e.registerShim(this)}return e.prototype.dispose=function(e){this.factory.unregisterShim(this)},e}();function f(t,n){return t.map((function(t){return function(t,n){return{message:e.flattenDiagnosticMessageText(t.messageText,n),start:t.start,length:t.length,category:e.diagnosticCategoryName(t),code:t.code,reportsUnnecessary:t.reportsUnnecessary,reportsDeprecated:t.reportsDeprecated}}(t,n)}))}e.realizeDiagnostics=f;var h=function(t){function n(e,n,r){var i=t.call(this,e)||this;return i.host=n,i.languageService=r,i.logPerformance=!1,i.logger=i.host,i}return s(n,t),n.prototype.forwardJSONCall=function(e,t){return l(this.logger,e,t,this.logPerformance)},n.prototype.dispose=function(e){this.logger.log("dispose()"),this.languageService.dispose(),this.languageService=null,c&&c.CollectGarbage&&(c.CollectGarbage(),this.logger.log("CollectGarbage()")),this.logger=null,t.prototype.dispose.call(this,e)},n.prototype.refresh=function(e){this.forwardJSONCall("refresh("+e+")",(function(){return null}))},n.prototype.cleanupSemanticCache=function(){var e=this;this.forwardJSONCall("cleanupSemanticCache()",(function(){return e.languageService.cleanupSemanticCache(),null}))},n.prototype.realizeDiagnostics=function(t){return f(t,e.getNewLineOrDefaultFromHost(this.host))},n.prototype.getSyntacticClassifications=function(t,n,r){var i=this;return this.forwardJSONCall("getSyntacticClassifications('"+t+"', "+n+", "+r+")",(function(){return i.languageService.getSyntacticClassifications(t,e.createTextSpan(n,r))}))},n.prototype.getSemanticClassifications=function(t,n,r){var i=this;return this.forwardJSONCall("getSemanticClassifications('"+t+"', "+n+", "+r+")",(function(){return i.languageService.getSemanticClassifications(t,e.createTextSpan(n,r))}))},n.prototype.getEncodedSyntacticClassifications=function(t,n,r){var i=this;return this.forwardJSONCall("getEncodedSyntacticClassifications('"+t+"', "+n+", "+r+")",(function(){return g(i.languageService.getEncodedSyntacticClassifications(t,e.createTextSpan(n,r)))}))},n.prototype.getEncodedSemanticClassifications=function(t,n,r){var i=this;return this.forwardJSONCall("getEncodedSemanticClassifications('"+t+"', "+n+", "+r+")",(function(){return g(i.languageService.getEncodedSemanticClassifications(t,e.createTextSpan(n,r)))}))},n.prototype.getSyntacticDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSyntacticDiagnostics('"+e+"')",(function(){var n=t.languageService.getSyntacticDiagnostics(e);return t.realizeDiagnostics(n)}))},n.prototype.getSemanticDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSemanticDiagnostics('"+e+"')",(function(){var n=t.languageService.getSemanticDiagnostics(e);return t.realizeDiagnostics(n)}))},n.prototype.getSuggestionDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSuggestionDiagnostics('"+e+"')",(function(){return t.realizeDiagnostics(t.languageService.getSuggestionDiagnostics(e))}))},n.prototype.getCompilerOptionsDiagnostics=function(){var e=this;return this.forwardJSONCall("getCompilerOptionsDiagnostics()",(function(){var t=e.languageService.getCompilerOptionsDiagnostics();return e.realizeDiagnostics(t)}))},n.prototype.getQuickInfoAtPosition=function(e,t){var n=this;return this.forwardJSONCall("getQuickInfoAtPosition('"+e+"', "+t+")",(function(){return n.languageService.getQuickInfoAtPosition(e,t)}))},n.prototype.getNameOrDottedNameSpan=function(e,t,n){var r=this;return this.forwardJSONCall("getNameOrDottedNameSpan('"+e+"', "+t+", "+n+")",(function(){return r.languageService.getNameOrDottedNameSpan(e,t,n)}))},n.prototype.getBreakpointStatementAtPosition=function(e,t){var n=this;return this.forwardJSONCall("getBreakpointStatementAtPosition('"+e+"', "+t+")",(function(){return n.languageService.getBreakpointStatementAtPosition(e,t)}))},n.prototype.getSignatureHelpItems=function(e,t,n){var r=this;return this.forwardJSONCall("getSignatureHelpItems('"+e+"', "+t+")",(function(){return r.languageService.getSignatureHelpItems(e,t,n)}))},n.prototype.getDefinitionAtPosition=function(e,t){var n=this;return this.forwardJSONCall("getDefinitionAtPosition('"+e+"', "+t+")",(function(){return n.languageService.getDefinitionAtPosition(e,t)}))},n.prototype.getDefinitionAndBoundSpan=function(e,t){var n=this;return this.forwardJSONCall("getDefinitionAndBoundSpan('"+e+"', "+t+")",(function(){return n.languageService.getDefinitionAndBoundSpan(e,t)}))},n.prototype.getTypeDefinitionAtPosition=function(e,t){var n=this;return this.forwardJSONCall("getTypeDefinitionAtPosition('"+e+"', "+t+")",(function(){return n.languageService.getTypeDefinitionAtPosition(e,t)}))},n.prototype.getImplementationAtPosition=function(e,t){var n=this;return this.forwardJSONCall("getImplementationAtPosition('"+e+"', "+t+")",(function(){return n.languageService.getImplementationAtPosition(e,t)}))},n.prototype.getRenameInfo=function(e,t,n){var r=this;return this.forwardJSONCall("getRenameInfo('"+e+"', "+t+")",(function(){return r.languageService.getRenameInfo(e,t,n)}))},n.prototype.getSmartSelectionRange=function(e,t){var n=this;return this.forwardJSONCall("getSmartSelectionRange('"+e+"', "+t+")",(function(){return n.languageService.getSmartSelectionRange(e,t)}))},n.prototype.findRenameLocations=function(e,t,n,r,i){var a=this;return this.forwardJSONCall("findRenameLocations('"+e+"', "+t+", "+n+", "+r+", "+i+")",(function(){return a.languageService.findRenameLocations(e,t,n,r,i)}))},n.prototype.getBraceMatchingAtPosition=function(e,t){var n=this;return this.forwardJSONCall("getBraceMatchingAtPosition('"+e+"', "+t+")",(function(){return n.languageService.getBraceMatchingAtPosition(e,t)}))},n.prototype.isValidBraceCompletionAtPosition=function(e,t,n){var r=this;return this.forwardJSONCall("isValidBraceCompletionAtPosition('"+e+"', "+t+", "+n+")",(function(){return r.languageService.isValidBraceCompletionAtPosition(e,t,n)}))},n.prototype.getSpanOfEnclosingComment=function(e,t,n){var r=this;return this.forwardJSONCall("getSpanOfEnclosingComment('"+e+"', "+t+")",(function(){return r.languageService.getSpanOfEnclosingComment(e,t,n)}))},n.prototype.getIndentationAtPosition=function(e,t,n){var r=this;return this.forwardJSONCall("getIndentationAtPosition('"+e+"', "+t+")",(function(){var i=JSON.parse(n);return r.languageService.getIndentationAtPosition(e,t,i)}))},n.prototype.getReferencesAtPosition=function(e,t){var n=this;return this.forwardJSONCall("getReferencesAtPosition('"+e+"', "+t+")",(function(){return n.languageService.getReferencesAtPosition(e,t)}))},n.prototype.findReferences=function(e,t){var n=this;return this.forwardJSONCall("findReferences('"+e+"', "+t+")",(function(){return n.languageService.findReferences(e,t)}))},n.prototype.getOccurrencesAtPosition=function(e,t){var n=this;return this.forwardJSONCall("getOccurrencesAtPosition('"+e+"', "+t+")",(function(){return n.languageService.getOccurrencesAtPosition(e,t)}))},n.prototype.getDocumentHighlights=function(t,n,r){var i=this;return this.forwardJSONCall("getDocumentHighlights('"+t+"', "+n+")",(function(){var a=i.languageService.getDocumentHighlights(t,n,JSON.parse(r)),o=e.toFileNameLowerCase(e.normalizeSlashes(t));return e.filter(a,(function(t){return e.toFileNameLowerCase(e.normalizeSlashes(t.fileName))===o}))}))},n.prototype.getCompletionsAtPosition=function(e,t,n){var r=this;return this.forwardJSONCall("getCompletionsAtPosition('"+e+"', "+t+", "+n+")",(function(){return r.languageService.getCompletionsAtPosition(e,t,n)}))},n.prototype.getCompletionEntryDetails=function(e,t,n,r,i,a){var o=this;return this.forwardJSONCall("getCompletionEntryDetails('"+e+"', "+t+", '"+n+"')",(function(){var s=void 0===r?void 0:JSON.parse(r);return o.languageService.getCompletionEntryDetails(e,t,n,s,i,a)}))},n.prototype.getFormattingEditsForRange=function(e,t,n,r){var i=this;return this.forwardJSONCall("getFormattingEditsForRange('"+e+"', "+t+", "+n+")",(function(){var a=JSON.parse(r);return i.languageService.getFormattingEditsForRange(e,t,n,a)}))},n.prototype.getFormattingEditsForDocument=function(e,t){var n=this;return this.forwardJSONCall("getFormattingEditsForDocument('"+e+"')",(function(){var r=JSON.parse(t);return n.languageService.getFormattingEditsForDocument(e,r)}))},n.prototype.getFormattingEditsAfterKeystroke=function(e,t,n,r){var i=this;return this.forwardJSONCall("getFormattingEditsAfterKeystroke('"+e+"', "+t+", '"+n+"')",(function(){var a=JSON.parse(r);return i.languageService.getFormattingEditsAfterKeystroke(e,t,n,a)}))},n.prototype.getDocCommentTemplateAtPosition=function(e,t){var n=this;return this.forwardJSONCall("getDocCommentTemplateAtPosition('"+e+"', "+t+")",(function(){return n.languageService.getDocCommentTemplateAtPosition(e,t)}))},n.prototype.getNavigateToItems=function(e,t,n){var r=this;return this.forwardJSONCall("getNavigateToItems('"+e+"', "+t+", "+n+")",(function(){return r.languageService.getNavigateToItems(e,t,n)}))},n.prototype.getNavigationBarItems=function(e){var t=this;return this.forwardJSONCall("getNavigationBarItems('"+e+"')",(function(){return t.languageService.getNavigationBarItems(e)}))},n.prototype.getNavigationTree=function(e){var t=this;return this.forwardJSONCall("getNavigationTree('"+e+"')",(function(){return t.languageService.getNavigationTree(e)}))},n.prototype.getOutliningSpans=function(e){var t=this;return this.forwardJSONCall("getOutliningSpans('"+e+"')",(function(){return t.languageService.getOutliningSpans(e)}))},n.prototype.getTodoComments=function(e,t){var n=this;return this.forwardJSONCall("getTodoComments('"+e+"')",(function(){return n.languageService.getTodoComments(e,JSON.parse(t))}))},n.prototype.prepareCallHierarchy=function(e,t){var n=this;return this.forwardJSONCall("prepareCallHierarchy('"+e+"', "+t+")",(function(){return n.languageService.prepareCallHierarchy(e,t)}))},n.prototype.provideCallHierarchyIncomingCalls=function(e,t){var n=this;return this.forwardJSONCall("provideCallHierarchyIncomingCalls('"+e+"', "+t+")",(function(){return n.languageService.provideCallHierarchyIncomingCalls(e,t)}))},n.prototype.provideCallHierarchyOutgoingCalls=function(e,t){var n=this;return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('"+e+"', "+t+")",(function(){return n.languageService.provideCallHierarchyOutgoingCalls(e,t)}))},n.prototype.getEmitOutput=function(e){var t=this;return this.forwardJSONCall("getEmitOutput('"+e+"')",(function(){var n=t.languageService.getEmitOutput(e),i=n.diagnostics,a=o(n,["diagnostics"]);return r(r({},a),{diagnostics:t.realizeDiagnostics(i)})}))},n.prototype.getEmitOutputObject=function(e){var t=this;return d(this.logger,"getEmitOutput('"+e+"')",!1,(function(){return t.languageService.getEmitOutput(e)}),this.logPerformance)},n.prototype.toggleLineComment=function(e,t){var n=this;return this.forwardJSONCall("toggleLineComment('"+e+"', '"+JSON.stringify(t)+"')",(function(){return n.languageService.toggleLineComment(e,t)}))},n.prototype.toggleMultilineComment=function(e,t){var n=this;return this.forwardJSONCall("toggleMultilineComment('"+e+"', '"+JSON.stringify(t)+"')",(function(){return n.languageService.toggleMultilineComment(e,t)}))},n.prototype.commentSelection=function(e,t){var n=this;return this.forwardJSONCall("commentSelection('"+e+"', '"+JSON.stringify(t)+"')",(function(){return n.languageService.commentSelection(e,t)}))},n.prototype.uncommentSelection=function(e,t){var n=this;return this.forwardJSONCall("uncommentSelection('"+e+"', '"+JSON.stringify(t)+"')",(function(){return n.languageService.uncommentSelection(e,t)}))},n}(p);function g(e){return{spans:e.spans.join(","),endOfLineState:e.endOfLineState}}var m=function(t){function n(n,r){var i=t.call(this,n)||this;return i.logger=r,i.logPerformance=!1,i.classifier=e.createClassifier(),i}return s(n,t),n.prototype.getEncodedLexicalClassifications=function(e,t,n){var r=this;return void 0===n&&(n=!1),l(this.logger,"getEncodedLexicalClassifications",(function(){return g(r.classifier.getEncodedLexicalClassifications(e,t,n))}),this.logPerformance)},n.prototype.getClassificationsForLine=function(e,t,n){void 0===n&&(n=!1);for(var r=this.classifier.getClassificationsForLine(e,t,n),i="",a=0,o=r.entries;a=1&&arguments.length<=3?e.factory.createVariableDeclaration(t,void 0,n,r):e.Debug.fail("Argument count mismatch")}),t),e.updateVariableDeclaration=e.Debug.deprecate((function(t,n,r,i,a){return 5===arguments.length?e.factory.updateVariableDeclaration(t,n,r,i,a):4===arguments.length?e.factory.updateVariableDeclaration(t,n,t.exclamationToken,r,i):e.Debug.fail("Argument count mismatch")}),t),e.createImportClause=e.Debug.deprecate((function(t,n,r){return void 0===r&&(r=!1),e.factory.createImportClause(r,t,n)}),t),e.updateImportClause=e.Debug.deprecate((function(t,n,r,i){return e.factory.updateImportClause(t,i,n,r)}),t),e.createExportDeclaration=e.Debug.deprecate((function(t,n,r,i,a){return void 0===a&&(a=!1),e.factory.createExportDeclaration(t,n,a,r,i)}),t),e.updateExportDeclaration=e.Debug.deprecate((function(t,n,r,i,a,o){return e.factory.updateExportDeclaration(t,n,r,o,i,a)}),t),e.createJSDocParamTag=e.Debug.deprecate((function(t,n,r,i){return e.factory.createJSDocParameterTag(void 0,t,n,r,!1,i)}),t),e.createComma=e.Debug.deprecate((function(t,n){return e.factory.createComma(t,n)}),t),e.createLessThan=e.Debug.deprecate((function(t,n){return e.factory.createLessThan(t,n)}),t),e.createAssignment=e.Debug.deprecate((function(t,n){return e.factory.createAssignment(t,n)}),t),e.createStrictEquality=e.Debug.deprecate((function(t,n){return e.factory.createStrictEquality(t,n)}),t),e.createStrictInequality=e.Debug.deprecate((function(t,n){return e.factory.createStrictInequality(t,n)}),t),e.createAdd=e.Debug.deprecate((function(t,n){return e.factory.createAdd(t,n)}),t),e.createSubtract=e.Debug.deprecate((function(t,n){return e.factory.createSubtract(t,n)}),t),e.createLogicalAnd=e.Debug.deprecate((function(t,n){return e.factory.createLogicalAnd(t,n)}),t),e.createLogicalOr=e.Debug.deprecate((function(t,n){return e.factory.createLogicalOr(t,n)}),t),e.createPostfixIncrement=e.Debug.deprecate((function(t){return e.factory.createPostfixIncrement(t)}),t),e.createLogicalNot=e.Debug.deprecate((function(t){return e.factory.createLogicalNot(t)}),t),e.createNode=e.Debug.deprecate((function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=0),e.setTextRangePosEnd(297===t?e.parseBaseNodeFactory.createBaseSourceFileNode(t):78===t?e.parseBaseNodeFactory.createBaseIdentifierNode(t):79===t?e.parseBaseNodeFactory.createBasePrivateIdentifierNode(t):e.isNodeKind(t)?e.parseBaseNodeFactory.createBaseNode(t):e.parseBaseNodeFactory.createBaseTokenNode(t),n,r)}),{since:"4.0",warnAfter:"4.1",message:"Use an appropriate `factory` method instead."}),e.getMutableClone=e.Debug.deprecate((function(t){var n=e.factory.cloneNode(t);return e.setTextRange(n,t),e.setParent(n,t.parent),n}),{since:"4.0",warnAfter:"4.1",message:"Use `factory.cloneNode` instead and use `setCommentRange` or `setSourceMapRange` and avoid setting `parent`."}),e.isTypeAssertion=e.Debug.deprecate((function(e){return 206===e.kind}),{since:"4.0",warnAfter:"4.1",message:"Use `isTypeAssertionExpression` instead."})}(u||(u={}))})),To="object"==typeof n&&n&&n.Object===Object&&n,wo="object"==typeof self&&self&&self.Object===Object&&self,Ao=(To||wo||Function("return this")()).Symbol,Oo=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n",""":'"',"'":"'"}),Yo=/&(?:amp|lt|gt|quot|#39);/g,Jo=RegExp(Yo.source),$o=function(e){return(e=qo(e))&&Jo.test(e)?e.replace(Yo,Go):e},Qo=c((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AST_NODE_TYPES=void 0,function(e){e.ArrayExpression="ArrayExpression",e.ArrayPattern="ArrayPattern",e.ArrowFunctionExpression="ArrowFunctionExpression",e.AssignmentExpression="AssignmentExpression",e.AssignmentPattern="AssignmentPattern",e.AwaitExpression="AwaitExpression",e.BinaryExpression="BinaryExpression",e.BlockStatement="BlockStatement",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.CatchClause="CatchClause",e.ChainExpression="ChainExpression",e.ClassBody="ClassBody",e.ClassDeclaration="ClassDeclaration",e.ClassExpression="ClassExpression",e.ClassProperty="ClassProperty",e.ConditionalExpression="ConditionalExpression",e.ContinueStatement="ContinueStatement",e.DebuggerStatement="DebuggerStatement",e.Decorator="Decorator",e.DoWhileStatement="DoWhileStatement",e.EmptyStatement="EmptyStatement",e.ExportAllDeclaration="ExportAllDeclaration",e.ExportDefaultDeclaration="ExportDefaultDeclaration",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ExpressionStatement="ExpressionStatement",e.ForInStatement="ForInStatement",e.ForOfStatement="ForOfStatement",e.ForStatement="ForStatement",e.FunctionDeclaration="FunctionDeclaration",e.FunctionExpression="FunctionExpression",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.ImportExpression="ImportExpression",e.ImportNamespaceSpecifier="ImportNamespaceSpecifier",e.ImportSpecifier="ImportSpecifier",e.JSXAttribute="JSXAttribute",e.JSXClosingElement="JSXClosingElement",e.JSXClosingFragment="JSXClosingFragment",e.JSXElement="JSXElement",e.JSXEmptyExpression="JSXEmptyExpression",e.JSXExpressionContainer="JSXExpressionContainer",e.JSXFragment="JSXFragment",e.JSXIdentifier="JSXIdentifier",e.JSXMemberExpression="JSXMemberExpression",e.JSXOpeningElement="JSXOpeningElement",e.JSXOpeningFragment="JSXOpeningFragment",e.JSXSpreadAttribute="JSXSpreadAttribute",e.JSXSpreadChild="JSXSpreadChild",e.JSXText="JSXText",e.LabeledStatement="LabeledStatement",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.MetaProperty="MetaProperty",e.MethodDefinition="MethodDefinition",e.NewExpression="NewExpression",e.ObjectExpression="ObjectExpression",e.ObjectPattern="ObjectPattern",e.Program="Program",e.Property="Property",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.SequenceExpression="SequenceExpression",e.SpreadElement="SpreadElement",e.Super="Super",e.SwitchCase="SwitchCase",e.SwitchStatement="SwitchStatement",e.TaggedTemplateExpression="TaggedTemplateExpression",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.ThisExpression="ThisExpression",e.ThrowStatement="ThrowStatement",e.TryStatement="TryStatement",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e.WithStatement="WithStatement",e.YieldExpression="YieldExpression",e.TSAbstractClassProperty="TSAbstractClassProperty",e.TSAbstractKeyword="TSAbstractKeyword",e.TSAbstractMethodDefinition="TSAbstractMethodDefinition",e.TSAnyKeyword="TSAnyKeyword",e.TSArrayType="TSArrayType",e.TSAsExpression="TSAsExpression",e.TSAsyncKeyword="TSAsyncKeyword",e.TSBigIntKeyword="TSBigIntKeyword",e.TSBooleanKeyword="TSBooleanKeyword",e.TSCallSignatureDeclaration="TSCallSignatureDeclaration",e.TSClassImplements="TSClassImplements",e.TSConditionalType="TSConditionalType",e.TSConstructorType="TSConstructorType",e.TSConstructSignatureDeclaration="TSConstructSignatureDeclaration",e.TSDeclareFunction="TSDeclareFunction",e.TSDeclareKeyword="TSDeclareKeyword",e.TSEmptyBodyFunctionExpression="TSEmptyBodyFunctionExpression",e.TSEnumDeclaration="TSEnumDeclaration",e.TSEnumMember="TSEnumMember",e.TSExportAssignment="TSExportAssignment",e.TSExportKeyword="TSExportKeyword",e.TSExternalModuleReference="TSExternalModuleReference",e.TSFunctionType="TSFunctionType",e.TSImportEqualsDeclaration="TSImportEqualsDeclaration",e.TSImportType="TSImportType",e.TSIndexedAccessType="TSIndexedAccessType",e.TSIndexSignature="TSIndexSignature",e.TSInferType="TSInferType",e.TSInterfaceBody="TSInterfaceBody",e.TSInterfaceDeclaration="TSInterfaceDeclaration",e.TSInterfaceHeritage="TSInterfaceHeritage",e.TSIntersectionType="TSIntersectionType",e.TSLiteralType="TSLiteralType",e.TSMappedType="TSMappedType",e.TSMethodSignature="TSMethodSignature",e.TSModuleBlock="TSModuleBlock",e.TSModuleDeclaration="TSModuleDeclaration",e.TSNamedTupleMember="TSNamedTupleMember",e.TSNamespaceExportDeclaration="TSNamespaceExportDeclaration",e.TSNeverKeyword="TSNeverKeyword",e.TSNonNullExpression="TSNonNullExpression",e.TSNullKeyword="TSNullKeyword",e.TSNumberKeyword="TSNumberKeyword",e.TSObjectKeyword="TSObjectKeyword",e.TSOptionalType="TSOptionalType",e.TSParameterProperty="TSParameterProperty",e.TSParenthesizedType="TSParenthesizedType",e.TSPrivateKeyword="TSPrivateKeyword",e.TSPropertySignature="TSPropertySignature",e.TSProtectedKeyword="TSProtectedKeyword",e.TSPublicKeyword="TSPublicKeyword",e.TSQualifiedName="TSQualifiedName",e.TSReadonlyKeyword="TSReadonlyKeyword",e.TSRestType="TSRestType",e.TSStaticKeyword="TSStaticKeyword",e.TSStringKeyword="TSStringKeyword",e.TSSymbolKeyword="TSSymbolKeyword",e.TSTemplateLiteralType="TSTemplateLiteralType",e.TSThisType="TSThisType",e.TSTupleType="TSTupleType",e.TSTypeAliasDeclaration="TSTypeAliasDeclaration",e.TSTypeAnnotation="TSTypeAnnotation",e.TSTypeAssertion="TSTypeAssertion",e.TSTypeLiteral="TSTypeLiteral",e.TSTypeOperator="TSTypeOperator",e.TSTypeParameter="TSTypeParameter",e.TSTypeParameterDeclaration="TSTypeParameterDeclaration",e.TSTypeParameterInstantiation="TSTypeParameterInstantiation",e.TSTypePredicate="TSTypePredicate",e.TSTypeQuery="TSTypeQuery",e.TSTypeReference="TSTypeReference",e.TSUndefinedKeyword="TSUndefinedKeyword",e.TSUnionType="TSUnionType",e.TSUnknownKeyword="TSUnknownKeyword",e.TSVoidKeyword="TSVoidKeyword"}(n||(n={})),t.AST_NODE_TYPES=n})),Xo=c((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AST_TOKEN_TYPES=void 0,function(e){e.Boolean="Boolean",e.Identifier="Identifier",e.JSXIdentifier="JSXIdentifier",e.JSXText="JSXText",e.Keyword="Keyword",e.Null="Null",e.Numeric="Numeric",e.Punctuator="Punctuator",e.RegularExpression="RegularExpression",e.String="String",e.Template="Template",e.Block="Block",e.Line="Line"}(n||(n={})),t.AST_TOKEN_TYPES=n})),Zo=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0})})),es=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0})})),ts=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0})})),ns=c((function(e,t){var r=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=n&&n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=n&&n.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TSESTree=t.AST_TOKEN_TYPES=t.AST_NODE_TYPES=void 0,Object.defineProperty(t,"AST_NODE_TYPES",{enumerable:!0,get:function(){return Qo.AST_NODE_TYPES}}),Object.defineProperty(t,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return Xo.AST_TOKEN_TYPES}}),a(Zo,t),a(es,t),t.TSESTree=o(ts)})),rs=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0})})),is=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0})})),as=c((function(e,t){var r=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=n&&n.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.TSESTree=t.AST_TOKEN_TYPES=t.AST_NODE_TYPES=void 0,Object.defineProperty(t,"AST_NODE_TYPES",{enumerable:!0,get:function(){return ns.AST_NODE_TYPES}}),Object.defineProperty(t,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return ns.AST_TOKEN_TYPES}}),Object.defineProperty(t,"TSESTree",{enumerable:!0,get:function(){return ns.TSESTree}}),i(rs,t),i(is,t)})),os=c((function(e,t){var r=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=n&&n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.firstDefined=t.nodeHasTokens=t.createError=t.convertTokens=t.convertToken=t.getTokenType=t.isChildUnwrappableOptionalChain=t.isChainExpression=t.isOptional=t.isComputedProperty=t.unescapeStringLiteralText=t.hasJSXAncestor=t.findFirstMatchingAncestor=t.findNextToken=t.getTSNodeAccessibility=t.getDeclarationKind=t.isJSXToken=t.isToken=t.getRange=t.canContainDirective=t.getLocFor=t.getLineAndCharacterFor=t.getBinaryExpressionType=t.isJSDocComment=t.isComment=t.isComma=t.getLastModifier=t.hasModifier=t.isESTreeClassMember=t.getTextForTokenKind=t.isLogicalOperator=t.isAssignmentOperator=void 0;var s=o($o),u=a(ko),c=u.SyntaxKind,l=[c.BarBarToken,c.AmpersandAmpersandToken,c.QuestionQuestionToken];function d(e){return e.kind>=c.FirstAssignment&&e.kind<=c.LastAssignment}function p(e){return l.includes(e.kind)}function f(e){return e.kind===c.SingleLineCommentTrivia||e.kind===c.MultiLineCommentTrivia}function h(e){return e.kind===c.JSDocComment}function g(e,t){var n=t.getLineAndCharacterOfPosition(e);return{line:n.line+1,column:n.character}}function m(e,t,n){return{start:g(e,n),end:g(t,n)}}function _(e){return e.kind>=c.FirstToken&&e.kind<=c.LastToken}function v(e){return e.kind>=c.JsxElement&&e.kind<=c.JsxAttribute}function y(e,t){for(;e;){if(t(e))return e;e=e.parent}}function b(e){return!!y(e,v)}function D(e){return e.type===as.AST_NODE_TYPES.ChainExpression}function E(e){if("originalKeywordKind"in e&&e.originalKeywordKind)return e.originalKeywordKind===c.NullKeyword?as.AST_TOKEN_TYPES.Null:e.originalKeywordKind>=c.FirstFutureReservedWord&&e.originalKeywordKind<=c.LastKeyword?as.AST_TOKEN_TYPES.Identifier:as.AST_TOKEN_TYPES.Keyword;if(e.kind>=c.FirstKeyword&&e.kind<=c.LastFutureReservedWord)return e.kind===c.FalseKeyword||e.kind===c.TrueKeyword?as.AST_TOKEN_TYPES.Boolean:as.AST_TOKEN_TYPES.Keyword;if(e.kind>=c.FirstPunctuation&&e.kind<=c.LastBinaryOperator)return as.AST_TOKEN_TYPES.Punctuator;if(e.kind>=c.NoSubstitutionTemplateLiteral&&e.kind<=c.TemplateTail)return as.AST_TOKEN_TYPES.Template;switch(e.kind){case c.NumericLiteral:return as.AST_TOKEN_TYPES.Numeric;case c.JsxText:return as.AST_TOKEN_TYPES.JSXText;case c.StringLiteral:return!e.parent||e.parent.kind!==c.JsxAttribute&&e.parent.kind!==c.JsxElement?as.AST_TOKEN_TYPES.String:as.AST_TOKEN_TYPES.JSXText;case c.RegularExpressionLiteral:return as.AST_TOKEN_TYPES.RegularExpression;case c.Identifier:case c.ConstructorKeyword:case c.GetKeyword:case c.SetKeyword:}if(e.parent&&e.kind===c.Identifier){if(v(e.parent))return as.AST_TOKEN_TYPES.JSXIdentifier;if(e.parent.kind===c.PropertyAccessExpression&&b(e))return as.AST_TOKEN_TYPES.JSXIdentifier}return as.AST_TOKEN_TYPES.Identifier}function C(e,t){var n=e.kind===c.JsxText?e.getFullStart():e.getStart(t),r=e.getEnd(),i=t.text.slice(n,r),a=E(e);return a===as.AST_TOKEN_TYPES.RegularExpression?{type:a,value:i,range:[n,r],loc:m(n,r,t),regex:{pattern:i.slice(1,i.lastIndexOf("/")),flags:i.slice(i.lastIndexOf("/")+1)}}:{type:a,value:i,range:[n,r],loc:m(n,r,t)}}function S(e,t){return e.kind===c.EndOfFileToken?!!e.jsDoc:0!==e.getWidth(t)}function x(e,t){if(void 0!==e)for(var n=0;ne.end||r.pos===e.end)&&S(r,n)?t(r):void 0}))}(t)},t.findFirstMatchingAncestor=y,t.hasJSXAncestor=b,t.unescapeStringLiteralText=function(e){return s.default(e)},t.isComputedProperty=function(e){return e.kind===c.ComputedPropertyName},t.isOptional=function(e){return!!e.questionToken&&e.questionToken.kind===c.QuestionToken},t.isChainExpression=D,t.isChildUnwrappableOptionalChain=function(e,t){return!(!D(t)||e.expression.kind===u.SyntaxKind.ParenthesizedExpression)},t.getTokenType=E,t.convertToken=C,t.convertTokens=function(e){var t=[];return function n(r){if(!f(r)&&!h(r))if(_(r)&&r.kind!==c.EndOfFileToken){var i=C(r,e);i&&t.push(i)}else r.getChildren(e).forEach(n)}(e),t},t.createError=function(e,t,n){var r=e.getLineAndCharacterOfPosition(t);return{index:t,lineNumber:r.line+1,column:r.character,message:n}},t.nodeHasTokens=S,t.firstDefined=x})),ss=c((function(e,t){var r=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=n&&n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.typescriptVersionIsAtLeast=void 0;var o=a(Fi),s=a(ko);function u(e){return o.satisfies(s.version,">= ".concat(e,".0 || >= ").concat(e,".1-rc || >= ").concat(e,".0-beta"),{includePrerelease:!0})}var c=["3.7","3.8","3.9","4.0"],l={};t.typescriptVersionIsAtLeast=l;for(var d=0,p=c;de.range[1]&&(e.range[1]=t[1],e.loc.end=os.getLineAndCharacterFor(e.range[1],this.ast))}},{key:"convertNode",value:function(e,t){var n,i,a,o,s,u,c,p,f,h,g=this;switch(e.kind){case d.SourceFile:return this.createNode(e,{type:as.AST_NODE_TYPES.Program,body:this.convertBodyExpressions(e.statements,e),sourceType:e.externalModuleIndicator?"module":"script",range:[e.getStart(this.ast),e.endOfFileToken.end]});case d.Block:return this.createNode(e,{type:as.AST_NODE_TYPES.BlockStatement,body:this.convertBodyExpressions(e.statements,e)});case d.Identifier:return this.createNode(e,{type:as.AST_NODE_TYPES.Identifier,name:e.text});case d.WithStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.WithStatement,object:this.convertChild(e.expression),body:this.convertChild(e.statement)});case d.ReturnStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.ReturnStatement,argument:this.convertChild(e.expression)});case d.LabeledStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.LabeledStatement,label:this.convertChild(e.label),body:this.convertChild(e.statement)});case d.ContinueStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.ContinueStatement,label:this.convertChild(e.label)});case d.BreakStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.BreakStatement,label:this.convertChild(e.label)});case d.IfStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.IfStatement,test:this.convertChild(e.expression),consequent:this.convertChild(e.thenStatement),alternate:this.convertChild(e.elseStatement)});case d.SwitchStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.SwitchStatement,discriminant:this.convertChild(e.expression),cases:e.caseBlock.clauses.map((function(e){return g.convertChild(e)}))});case d.CaseClause:case d.DefaultClause:return this.createNode(e,{type:as.AST_NODE_TYPES.SwitchCase,test:e.kind===d.CaseClause?this.convertChild(e.expression):null,consequent:e.statements.map((function(e){return g.convertChild(e)}))});case d.ThrowStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.ThrowStatement,argument:this.convertChild(e.expression)});case d.TryStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.TryStatement,block:this.convertChild(e.tryBlock),handler:this.convertChild(e.catchClause),finalizer:this.convertChild(e.finallyBlock)});case d.CatchClause:return this.createNode(e,{type:as.AST_NODE_TYPES.CatchClause,param:e.variableDeclaration?this.convertBindingNameWithTypeAnnotation(e.variableDeclaration.name,e.variableDeclaration.type):null,body:this.convertChild(e.block)});case d.WhileStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.WhileStatement,test:this.convertChild(e.expression),body:this.convertChild(e.statement)});case d.DoStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.DoWhileStatement,test:this.convertChild(e.expression),body:this.convertChild(e.statement)});case d.ForStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.ForStatement,init:this.convertChild(e.initializer),test:this.convertChild(e.condition),update:this.convertChild(e.incrementor),body:this.convertChild(e.statement)});case d.ForInStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.ForInStatement,left:this.convertPattern(e.initializer),right:this.convertChild(e.expression),body:this.convertChild(e.statement)});case d.ForOfStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.ForOfStatement,left:this.convertPattern(e.initializer),right:this.convertChild(e.expression),body:this.convertChild(e.statement),await:Boolean(e.awaitModifier&&e.awaitModifier.kind===d.AwaitKeyword)});case d.FunctionDeclaration:var m=os.hasModifier(d.DeclareKeyword,e),_=this.createNode(e,{type:m||!e.body?as.AST_NODE_TYPES.TSDeclareFunction:as.AST_NODE_TYPES.FunctionDeclaration,id:this.convertChild(e.name),generator:!!e.asteriskToken,expression:!1,async:os.hasModifier(d.AsyncKeyword,e),params:this.convertParameters(e.parameters),body:this.convertChild(e.body)||void 0});return e.type&&(_.returnType=this.convertTypeAnnotation(e.type,e)),m&&(_.declare=!0),e.typeParameters&&(_.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),this.fixExports(e,_);case d.VariableDeclaration:var v=this.createNode(e,{type:as.AST_NODE_TYPES.VariableDeclarator,id:this.convertBindingNameWithTypeAnnotation(e.name,e.type,e),init:this.convertChild(e.initializer)});return e.exclamationToken&&(v.definite=!0),v;case d.VariableStatement:var y=this.createNode(e,{type:as.AST_NODE_TYPES.VariableDeclaration,declarations:e.declarationList.declarations.map((function(e){return g.convertChild(e)})),kind:os.getDeclarationKind(e.declarationList)});return e.decorators&&(y.decorators=e.decorators.map((function(e){return g.convertChild(e)}))),os.hasModifier(d.DeclareKeyword,e)&&(y.declare=!0),this.fixExports(e,y);case d.VariableDeclarationList:return this.createNode(e,{type:as.AST_NODE_TYPES.VariableDeclaration,declarations:e.declarations.map((function(e){return g.convertChild(e)})),kind:os.getDeclarationKind(e)});case d.ExpressionStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.ExpressionStatement,expression:this.convertChild(e.expression)});case d.ThisKeyword:return this.createNode(e,{type:as.AST_NODE_TYPES.ThisExpression});case d.ArrayLiteralExpression:return this.allowPattern?this.createNode(e,{type:as.AST_NODE_TYPES.ArrayPattern,elements:e.elements.map((function(e){return g.convertPattern(e)}))}):this.createNode(e,{type:as.AST_NODE_TYPES.ArrayExpression,elements:e.elements.map((function(e){return g.convertChild(e)}))});case d.ObjectLiteralExpression:return this.allowPattern?this.createNode(e,{type:as.AST_NODE_TYPES.ObjectPattern,properties:e.properties.map((function(e){return g.convertPattern(e)}))}):this.createNode(e,{type:as.AST_NODE_TYPES.ObjectExpression,properties:e.properties.map((function(e){return g.convertChild(e)}))});case d.PropertyAssignment:return this.createNode(e,{type:as.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:this.converter(e.initializer,e,this.inTypeMode,this.allowPattern),computed:os.isComputedProperty(e.name),method:!1,shorthand:!1,kind:"init"});case d.ShorthandPropertyAssignment:return e.objectAssignmentInitializer?this.createNode(e,{type:as.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:this.createNode(e,{type:as.AST_NODE_TYPES.AssignmentPattern,left:this.convertPattern(e.name),right:this.convertChild(e.objectAssignmentInitializer)}),computed:!1,method:!1,shorthand:!0,kind:"init"}):this.createNode(e,{type:as.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:this.convertChild(e.name),computed:!1,method:!1,shorthand:!0,kind:"init"});case d.ComputedPropertyName:return this.convertChild(e.expression);case d.PropertyDeclaration:var b=os.hasModifier(d.AbstractKeyword,e),D=this.createNode(e,{type:b?as.AST_NODE_TYPES.TSAbstractClassProperty:as.AST_NODE_TYPES.ClassProperty,key:this.convertChild(e.name),value:this.convertChild(e.initializer),computed:os.isComputedProperty(e.name),static:os.hasModifier(d.StaticKeyword,e),readonly:os.hasModifier(d.ReadonlyKeyword,e)||void 0,declare:os.hasModifier(d.DeclareKeyword,e)});e.type&&(D.typeAnnotation=this.convertTypeAnnotation(e.type,e)),e.decorators&&(D.decorators=e.decorators.map((function(e){return g.convertChild(e)})));var E=os.getTSNodeAccessibility(e);return E&&(D.accessibility=E),e.name.kind!==d.Identifier&&e.name.kind!==d.ComputedPropertyName||!e.questionToken||(D.optional=!0),e.exclamationToken&&(D.definite=!0),D.key.type===as.AST_NODE_TYPES.Literal&&e.questionToken&&(D.optional=!0),D;case d.GetAccessor:case d.SetAccessor:case d.MethodDeclaration:var C,S=this.createNode(e,{type:e.body?as.AST_NODE_TYPES.FunctionExpression:as.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,id:null,generator:!!e.asteriskToken,expression:!1,async:os.hasModifier(d.AsyncKeyword,e),body:this.convertChild(e.body),range:[e.parameters.pos-1,e.end],params:[]});if(e.type&&(S.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(S.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters),this.fixParentLocation(S,S.typeParameters.range)),t.kind===d.ObjectLiteralExpression)S.params=e.parameters.map((function(e){return g.convertChild(e)})),C=this.createNode(e,{type:as.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:S,computed:os.isComputedProperty(e.name),method:e.kind===d.MethodDeclaration,shorthand:!1,kind:"init"});else{S.params=this.convertParameters(e.parameters);var x=os.hasModifier(d.AbstractKeyword,e)?as.AST_NODE_TYPES.TSAbstractMethodDefinition:as.AST_NODE_TYPES.MethodDefinition;C=this.createNode(e,{type:x,key:this.convertChild(e.name),value:S,computed:os.isComputedProperty(e.name),static:os.hasModifier(d.StaticKeyword,e),kind:"method"}),e.decorators&&(C.decorators=e.decorators.map((function(e){return g.convertChild(e)})));var k=os.getTSNodeAccessibility(e);k&&(C.accessibility=k)}return e.questionToken&&(C.optional=!0),e.kind===d.GetAccessor?C.kind="get":e.kind===d.SetAccessor?C.kind="set":C.static||e.name.kind!==d.StringLiteral||"constructor"!==e.name.text||C.type===as.AST_NODE_TYPES.Property||(C.kind="constructor"),C;case d.Constructor:var T=os.getLastModifier(e),w=T&&os.findNextToken(T,e,this.ast)||e.getFirstToken(),A=this.createNode(e,{type:e.body?as.AST_NODE_TYPES.FunctionExpression:as.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,id:null,params:this.convertParameters(e.parameters),generator:!1,expression:!1,async:!1,body:this.convertChild(e.body),range:[e.parameters.pos-1,e.end]});e.typeParameters&&(A.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters),this.fixParentLocation(A,A.typeParameters.range)),e.type&&(A.returnType=this.convertTypeAnnotation(e.type,e));var O=this.createNode(e,{type:as.AST_NODE_TYPES.Identifier,name:"constructor",range:[w.getStart(this.ast),w.end]}),N=os.hasModifier(d.StaticKeyword,e),I=this.createNode(e,{type:os.hasModifier(d.AbstractKeyword,e)?as.AST_NODE_TYPES.TSAbstractMethodDefinition:as.AST_NODE_TYPES.MethodDefinition,key:O,value:A,computed:!1,static:N,kind:N?"method":"constructor"}),F=os.getTSNodeAccessibility(e);return F&&(I.accessibility=F),I;case d.FunctionExpression:var L=this.createNode(e,{type:as.AST_NODE_TYPES.FunctionExpression,id:this.convertChild(e.name),generator:!!e.asteriskToken,params:this.convertParameters(e.parameters),body:this.convertChild(e.body),async:os.hasModifier(d.AsyncKeyword,e),expression:!1});return e.type&&(L.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(L.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),L;case d.SuperKeyword:return this.createNode(e,{type:as.AST_NODE_TYPES.Super});case d.ArrayBindingPattern:return this.createNode(e,{type:as.AST_NODE_TYPES.ArrayPattern,elements:e.elements.map((function(e){return g.convertPattern(e)}))});case d.OmittedExpression:return null;case d.ObjectBindingPattern:return this.createNode(e,{type:as.AST_NODE_TYPES.ObjectPattern,properties:e.elements.map((function(e){return g.convertPattern(e)}))});case d.BindingElement:if(t.kind===d.ArrayBindingPattern){var P=this.convertChild(e.name,t);return e.initializer?this.createNode(e,{type:as.AST_NODE_TYPES.AssignmentPattern,left:P,right:this.convertChild(e.initializer)}):e.dotDotDotToken?this.createNode(e,{type:as.AST_NODE_TYPES.RestElement,argument:P}):P}var R;return R=e.dotDotDotToken?this.createNode(e,{type:as.AST_NODE_TYPES.RestElement,argument:this.convertChild(null!==(n=e.propertyName)&&void 0!==n?n:e.name)}):this.createNode(e,{type:as.AST_NODE_TYPES.Property,key:this.convertChild(null!==(i=e.propertyName)&&void 0!==i?i:e.name),value:this.convertChild(e.name),computed:Boolean(e.propertyName&&e.propertyName.kind===d.ComputedPropertyName),method:!1,shorthand:!e.propertyName,kind:"init"}),e.initializer&&(R.value=this.createNode(e,{type:as.AST_NODE_TYPES.AssignmentPattern,left:this.convertChild(e.name),right:this.convertChild(e.initializer),range:[e.name.getStart(this.ast),e.initializer.end]})),R;case d.ArrowFunction:var M=this.createNode(e,{type:as.AST_NODE_TYPES.ArrowFunctionExpression,generator:!1,id:null,params:this.convertParameters(e.parameters),body:this.convertChild(e.body),async:os.hasModifier(d.AsyncKeyword,e),expression:e.body.kind!==d.Block});return e.type&&(M.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(M.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),M;case d.YieldExpression:return this.createNode(e,{type:as.AST_NODE_TYPES.YieldExpression,delegate:!!e.asteriskToken,argument:this.convertChild(e.expression)});case d.AwaitExpression:return this.createNode(e,{type:as.AST_NODE_TYPES.AwaitExpression,argument:this.convertChild(e.expression)});case d.NoSubstitutionTemplateLiteral:return this.createNode(e,{type:as.AST_NODE_TYPES.TemplateLiteral,quasis:[this.createNode(e,{type:as.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(e.getStart(this.ast)+1,e.end-1),cooked:e.text},tail:!0})],expressions:[]});case d.TemplateExpression:var B=this.createNode(e,{type:as.AST_NODE_TYPES.TemplateLiteral,quasis:[this.convertChild(e.head)],expressions:[]});return e.templateSpans.forEach((function(e){B.expressions.push(g.convertChild(e.expression)),B.quasis.push(g.convertChild(e.literal))})),B;case d.TaggedTemplateExpression:return this.createNode(e,{type:as.AST_NODE_TYPES.TaggedTemplateExpression,typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments,e):void 0,tag:this.convertChild(e.tag),quasi:this.convertChild(e.template)});case d.TemplateHead:case d.TemplateMiddle:case d.TemplateTail:var j=e.kind===d.TemplateTail;return this.createNode(e,{type:as.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(e.getStart(this.ast)+1,e.end-(j?1:2)),cooked:e.text},tail:j});case d.SpreadAssignment:case d.SpreadElement:return this.allowPattern?this.createNode(e,{type:as.AST_NODE_TYPES.RestElement,argument:this.convertPattern(e.expression)}):this.createNode(e,{type:as.AST_NODE_TYPES.SpreadElement,argument:this.convertChild(e.expression)});case d.Parameter:var U,V;return e.dotDotDotToken?U=V=this.createNode(e,{type:as.AST_NODE_TYPES.RestElement,argument:this.convertChild(e.name)}):e.initializer?(U=this.convertChild(e.name),V=this.createNode(e,{type:as.AST_NODE_TYPES.AssignmentPattern,left:U,right:this.convertChild(e.initializer)}),e.modifiers&&(V.range[0]=U.range[0],V.loc=os.getLocFor(V.range[0],V.range[1],this.ast))):U=V=this.convertChild(e.name,t),e.type&&(U.typeAnnotation=this.convertTypeAnnotation(e.type,e),this.fixParentLocation(U,U.typeAnnotation.range)),e.questionToken&&(e.questionToken.end>U.range[1]&&(U.range[1]=e.questionToken.end,U.loc.end=os.getLineAndCharacterFor(U.range[1],this.ast)),U.optional=!0),e.modifiers?this.createNode(e,{type:as.AST_NODE_TYPES.TSParameterProperty,accessibility:null!==(a=os.getTSNodeAccessibility(e))&&void 0!==a?a:void 0,readonly:os.hasModifier(d.ReadonlyKeyword,e)||void 0,static:os.hasModifier(d.StaticKeyword,e)||void 0,export:os.hasModifier(d.ExportKeyword,e)||void 0,parameter:V}):V;case d.ClassDeclaration:case d.ClassExpression:var z=null!==(o=e.heritageClauses)&&void 0!==o?o:[],H=e.kind===d.ClassDeclaration?as.AST_NODE_TYPES.ClassDeclaration:as.AST_NODE_TYPES.ClassExpression,W=z.find((function(e){return e.token===d.ExtendsKeyword})),K=z.find((function(e){return e.token===d.ImplementsKeyword})),q=this.createNode(e,{type:H,id:this.convertChild(e.name),body:this.createNode(e,{type:as.AST_NODE_TYPES.ClassBody,body:[],range:[e.members.pos-1,e.end]}),superClass:(null==W?void 0:W.types[0])?this.convertChild(W.types[0].expression):null});if(W){if(W.types.length>1)throw os.createError(this.ast,W.types[1].pos,"Classes can only extend a single class.");(null===(s=W.types[0])||void 0===s?void 0:s.typeArguments)&&(q.superTypeParameters=this.convertTypeArgumentsToTypeParameters(W.types[0].typeArguments,W.types[0]))}e.typeParameters&&(q.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),K&&(q.implements=K.types.map((function(e){return g.convertChild(e)}))),os.hasModifier(d.AbstractKeyword,e)&&(q.abstract=!0),os.hasModifier(d.DeclareKeyword,e)&&(q.declare=!0),e.decorators&&(q.decorators=e.decorators.map((function(e){return g.convertChild(e)})));var G=e.members.filter(os.isESTreeClassMember);return G.length&&(q.body.body=G.map((function(e){return g.convertChild(e)}))),this.fixExports(e,q);case d.ModuleBlock:return this.createNode(e,{type:as.AST_NODE_TYPES.TSModuleBlock,body:this.convertBodyExpressions(e.statements,e)});case d.ImportDeclaration:var Y=this.createNode(e,{type:as.AST_NODE_TYPES.ImportDeclaration,source:this.convertChild(e.moduleSpecifier),specifiers:[],importKind:"value"});if(e.importClause&&(e.importClause.isTypeOnly&&(Y.importKind="type"),e.importClause.name&&Y.specifiers.push(this.convertChild(e.importClause)),e.importClause.namedBindings))switch(e.importClause.namedBindings.kind){case d.NamespaceImport:Y.specifiers.push(this.convertChild(e.importClause.namedBindings));break;case d.NamedImports:Y.specifiers=Y.specifiers.concat(e.importClause.namedBindings.elements.map((function(e){return g.convertChild(e)})))}return Y;case d.NamespaceImport:return this.createNode(e,{type:as.AST_NODE_TYPES.ImportNamespaceSpecifier,local:this.convertChild(e.name)});case d.ImportSpecifier:return this.createNode(e,{type:as.AST_NODE_TYPES.ImportSpecifier,local:this.convertChild(e.name),imported:this.convertChild(null!==(u=e.propertyName)&&void 0!==u?u:e.name)});case d.ImportClause:var J=this.convertChild(e.name);return this.createNode(e,{type:as.AST_NODE_TYPES.ImportDefaultSpecifier,local:J,range:J.range});case d.ExportDeclaration:return(null===(c=e.exportClause)||void 0===c?void 0:c.kind)===d.NamedExports?this.createNode(e,{type:as.AST_NODE_TYPES.ExportNamedDeclaration,source:this.convertChild(e.moduleSpecifier),specifiers:e.exportClause.elements.map((function(e){return g.convertChild(e)})),exportKind:e.isTypeOnly?"type":"value",declaration:null}):this.createNode(e,{type:as.AST_NODE_TYPES.ExportAllDeclaration,source:this.convertChild(e.moduleSpecifier),exportKind:e.isTypeOnly?"type":"value",exported:e.exportClause&&e.exportClause.kind===d.NamespaceExport?this.convertChild(e.exportClause.name):null});case d.ExportSpecifier:return this.createNode(e,{type:as.AST_NODE_TYPES.ExportSpecifier,local:this.convertChild(null!==(p=e.propertyName)&&void 0!==p?p:e.name),exported:this.convertChild(e.name)});case d.ExportAssignment:return e.isExportEquals?this.createNode(e,{type:as.AST_NODE_TYPES.TSExportAssignment,expression:this.convertChild(e.expression)}):this.createNode(e,{type:as.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:this.convertChild(e.expression),exportKind:"value"});case d.PrefixUnaryExpression:case d.PostfixUnaryExpression:var $=os.getTextForTokenKind(e.operator);return"++"===$||"--"===$?this.createNode(e,{type:as.AST_NODE_TYPES.UpdateExpression,operator:$,prefix:e.kind===d.PrefixUnaryExpression,argument:this.convertChild(e.operand)}):this.createNode(e,{type:as.AST_NODE_TYPES.UnaryExpression,operator:$,prefix:e.kind===d.PrefixUnaryExpression,argument:this.convertChild(e.operand)});case d.DeleteExpression:return this.createNode(e,{type:as.AST_NODE_TYPES.UnaryExpression,operator:"delete",prefix:!0,argument:this.convertChild(e.expression)});case d.VoidExpression:return this.createNode(e,{type:as.AST_NODE_TYPES.UnaryExpression,operator:"void",prefix:!0,argument:this.convertChild(e.expression)});case d.TypeOfExpression:return this.createNode(e,{type:as.AST_NODE_TYPES.UnaryExpression,operator:"typeof",prefix:!0,argument:this.convertChild(e.expression)});case d.TypeOperator:return this.createNode(e,{type:as.AST_NODE_TYPES.TSTypeOperator,operator:os.getTextForTokenKind(e.operator),typeAnnotation:this.convertChild(e.type)});case d.BinaryExpression:if(os.isComma(e.operatorToken)){var Q=this.createNode(e,{type:as.AST_NODE_TYPES.SequenceExpression,expressions:[]}),X=this.convertChild(e.left);return X.type===as.AST_NODE_TYPES.SequenceExpression&&e.left.kind!==d.ParenthesizedExpression?Q.expressions=Q.expressions.concat(X.expressions):Q.expressions.push(X),Q.expressions.push(this.convertChild(e.right)),Q}var Z=os.getBinaryExpressionType(e.operatorToken);return this.allowPattern&&Z===as.AST_NODE_TYPES.AssignmentExpression?this.createNode(e,{type:as.AST_NODE_TYPES.AssignmentPattern,left:this.convertPattern(e.left,e),right:this.convertChild(e.right)}):this.createNode(e,{type:Z,operator:os.getTextForTokenKind(e.operatorToken.kind),left:this.converter(e.left,e,this.inTypeMode,Z===as.AST_NODE_TYPES.AssignmentExpression),right:this.convertChild(e.right)});case d.PropertyAccessExpression:var ee=this.convertChild(e.expression),te=this.convertChild(e.name),ne=!1,re=this.createNode(e,{type:as.AST_NODE_TYPES.MemberExpression,object:ee,property:te,computed:ne,optional:void 0!==e.questionDotToken});return this.convertChainExpression(re,e);case d.ElementAccessExpression:var ie=this.convertChild(e.expression),ae=this.convertChild(e.argumentExpression),oe=!0,se=this.createNode(e,{type:as.AST_NODE_TYPES.MemberExpression,object:ie,property:ae,computed:oe,optional:void 0!==e.questionDotToken});return this.convertChainExpression(se,e);case d.CallExpression:if(e.expression.kind===d.ImportKeyword){if(1!==e.arguments.length)throw os.createError(this.ast,e.arguments.pos,"Dynamic import must have one specifier as an argument.");return this.createNode(e,{type:as.AST_NODE_TYPES.ImportExpression,source:this.convertChild(e.arguments[0])})}var ue=this.convertChild(e.expression),ce=e.arguments.map((function(e){return g.convertChild(e)})),le=this.createNode(e,{type:as.AST_NODE_TYPES.CallExpression,callee:ue,arguments:ce,optional:void 0!==e.questionDotToken});return e.typeArguments&&(le.typeParameters=this.convertTypeArgumentsToTypeParameters(e.typeArguments,e)),this.convertChainExpression(le,e);case d.NewExpression:var de=this.createNode(e,{type:as.AST_NODE_TYPES.NewExpression,callee:this.convertChild(e.expression),arguments:e.arguments?e.arguments.map((function(e){return g.convertChild(e)})):[]});return e.typeArguments&&(de.typeParameters=this.convertTypeArgumentsToTypeParameters(e.typeArguments,e)),de;case d.ConditionalExpression:return this.createNode(e,{type:as.AST_NODE_TYPES.ConditionalExpression,test:this.convertChild(e.condition),consequent:this.convertChild(e.whenTrue),alternate:this.convertChild(e.whenFalse)});case d.MetaProperty:return this.createNode(e,{type:as.AST_NODE_TYPES.MetaProperty,meta:this.createNode(e.getFirstToken(),{type:as.AST_NODE_TYPES.Identifier,name:os.getTextForTokenKind(e.keywordToken)}),property:this.convertChild(e.name)});case d.Decorator:return this.createNode(e,{type:as.AST_NODE_TYPES.Decorator,expression:this.convertChild(e.expression)});case d.StringLiteral:var pe=this.createNode(e,{type:as.AST_NODE_TYPES.Literal,raw:"",value:""});return pe.raw=this.ast.text.slice(pe.range[0],pe.range[1]),"name"in t&&t.name===e?pe.value=e.text:pe.value=os.unescapeStringLiteralText(e.text),pe;case d.NumericLiteral:return this.createNode(e,{type:as.AST_NODE_TYPES.Literal,value:Number(e.text),raw:e.getText()});case d.BigIntLiteral:var fe=os.getRange(e,this.ast),he=this.ast.text.slice(fe[0],fe[1]),ge=he.slice(0,-1).replace(/_/g,""),me="undefined"!=typeof BigInt?BigInt(ge):null;return this.createNode(e,{type:as.AST_NODE_TYPES.Literal,raw:he,value:me,bigint:null===me?ge:String(me),range:fe});case d.RegularExpressionLiteral:var _e=e.text.slice(1,e.text.lastIndexOf("/")),ve=e.text.slice(e.text.lastIndexOf("/")+1),ye=null;try{ye=new RegExp(_e,ve)}catch(e){ye=null}return this.createNode(e,{type:as.AST_NODE_TYPES.Literal,value:ye,raw:e.text,regex:{pattern:_e,flags:ve}});case d.TrueKeyword:return this.createNode(e,{type:as.AST_NODE_TYPES.Literal,value:!0,raw:"true"});case d.FalseKeyword:return this.createNode(e,{type:as.AST_NODE_TYPES.Literal,value:!1,raw:"false"});case d.NullKeyword:return!ss.typescriptVersionIsAtLeast["4.0"]&&this.inTypeMode?this.createNode(e,{type:as.AST_NODE_TYPES.TSNullKeyword}):this.createNode(e,{type:as.AST_NODE_TYPES.Literal,value:null,raw:"null"});case d.EmptyStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.EmptyStatement});case d.DebuggerStatement:return this.createNode(e,{type:as.AST_NODE_TYPES.DebuggerStatement});case d.JsxElement:return this.createNode(e,{type:as.AST_NODE_TYPES.JSXElement,openingElement:this.convertChild(e.openingElement),closingElement:this.convertChild(e.closingElement),children:e.children.map((function(e){return g.convertChild(e)}))});case d.JsxFragment:return this.createNode(e,{type:as.AST_NODE_TYPES.JSXFragment,openingFragment:this.convertChild(e.openingFragment),closingFragment:this.convertChild(e.closingFragment),children:e.children.map((function(e){return g.convertChild(e)}))});case d.JsxSelfClosingElement:return this.createNode(e,{type:as.AST_NODE_TYPES.JSXElement,openingElement:this.createNode(e,{type:as.AST_NODE_TYPES.JSXOpeningElement,typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments,e):void 0,selfClosing:!0,name:this.convertJSXTagName(e.tagName,e),attributes:e.attributes.properties.map((function(e){return g.convertChild(e)})),range:os.getRange(e,this.ast)}),closingElement:null,children:[]});case d.JsxOpeningElement:return this.createNode(e,{type:as.AST_NODE_TYPES.JSXOpeningElement,typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments,e):void 0,selfClosing:!1,name:this.convertJSXTagName(e.tagName,e),attributes:e.attributes.properties.map((function(e){return g.convertChild(e)}))});case d.JsxClosingElement:return this.createNode(e,{type:as.AST_NODE_TYPES.JSXClosingElement,name:this.convertJSXTagName(e.tagName,e)});case d.JsxOpeningFragment:return this.createNode(e,{type:as.AST_NODE_TYPES.JSXOpeningFragment});case d.JsxClosingFragment:return this.createNode(e,{type:as.AST_NODE_TYPES.JSXClosingFragment});case d.JsxExpression:var be=e.expression?this.convertChild(e.expression):this.createNode(e,{type:as.AST_NODE_TYPES.JSXEmptyExpression,range:[e.getStart(this.ast)+1,e.getEnd()-1]});return e.dotDotDotToken?this.createNode(e,{type:as.AST_NODE_TYPES.JSXSpreadChild,expression:be}):this.createNode(e,{type:as.AST_NODE_TYPES.JSXExpressionContainer,expression:be});case d.JsxAttribute:var De=this.convertChild(e.name);return De.type=as.AST_NODE_TYPES.JSXIdentifier,this.createNode(e,{type:as.AST_NODE_TYPES.JSXAttribute,name:De,value:this.convertChild(e.initializer)});case d.JsxText:var Ee=e.getFullStart(),Ce=e.getEnd();return this.options.useJSXTextNode?this.createNode(e,{type:as.AST_NODE_TYPES.JSXText,value:this.ast.text.slice(Ee,Ce),raw:this.ast.text.slice(Ee,Ce),range:[Ee,Ce]}):this.createNode(e,{type:as.AST_NODE_TYPES.Literal,value:this.ast.text.slice(Ee,Ce),raw:this.ast.text.slice(Ee,Ce),range:[Ee,Ce]});case d.JsxSpreadAttribute:return this.createNode(e,{type:as.AST_NODE_TYPES.JSXSpreadAttribute,argument:this.convertChild(e.expression)});case d.QualifiedName:return this.createNode(e,{type:as.AST_NODE_TYPES.TSQualifiedName,left:this.convertChild(e.left),right:this.convertChild(e.right)});case d.TypeReference:return this.createNode(e,{type:as.AST_NODE_TYPES.TSTypeReference,typeName:this.convertType(e.typeName),typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments,e):void 0});case d.TypeParameter:return this.createNode(e,{type:as.AST_NODE_TYPES.TSTypeParameter,name:this.convertType(e.name),constraint:e.constraint?this.convertType(e.constraint):void 0,default:e.default?this.convertType(e.default):void 0});case d.ThisType:return this.createNode(e,{type:as.AST_NODE_TYPES.TSThisType});case d.AnyKeyword:case d.BigIntKeyword:case d.BooleanKeyword:case d.NeverKeyword:case d.NumberKeyword:case d.ObjectKeyword:case d.StringKeyword:case d.SymbolKeyword:case d.UnknownKeyword:case d.VoidKeyword:case d.UndefinedKeyword:return this.createNode(e,{type:as.AST_NODE_TYPES["TS".concat(d[e.kind])]});case d.NonNullExpression:var Se=this.createNode(e,{type:as.AST_NODE_TYPES.TSNonNullExpression,expression:this.convertChild(e.expression)});return this.convertChainExpression(Se,e);case d.TypeLiteral:return this.createNode(e,{type:as.AST_NODE_TYPES.TSTypeLiteral,members:e.members.map((function(e){return g.convertChild(e)}))});case d.ArrayType:return this.createNode(e,{type:as.AST_NODE_TYPES.TSArrayType,elementType:this.convertType(e.elementType)});case d.IndexedAccessType:return this.createNode(e,{type:as.AST_NODE_TYPES.TSIndexedAccessType,objectType:this.convertType(e.objectType),indexType:this.convertType(e.indexType)});case d.ConditionalType:return this.createNode(e,{type:as.AST_NODE_TYPES.TSConditionalType,checkType:this.convertType(e.checkType),extendsType:this.convertType(e.extendsType),trueType:this.convertType(e.trueType),falseType:this.convertType(e.falseType)});case d.TypeQuery:return this.createNode(e,{type:as.AST_NODE_TYPES.TSTypeQuery,exprName:this.convertType(e.exprName)});case d.MappedType:var xe=this.createNode(e,{type:as.AST_NODE_TYPES.TSMappedType,typeParameter:this.convertType(e.typeParameter),nameType:null!==(f=this.convertType(e.nameType))&&void 0!==f?f:null});return e.readonlyToken&&(e.readonlyToken.kind===d.ReadonlyKeyword?xe.readonly=!0:xe.readonly=os.getTextForTokenKind(e.readonlyToken.kind)),e.questionToken&&(e.questionToken.kind===d.QuestionToken?xe.optional=!0:xe.optional=os.getTextForTokenKind(e.questionToken.kind)),e.type&&(xe.typeAnnotation=this.convertType(e.type)),xe;case d.ParenthesizedExpression:return this.convertChild(e.expression,t);case d.TypeAliasDeclaration:var ke=this.createNode(e,{type:as.AST_NODE_TYPES.TSTypeAliasDeclaration,id:this.convertChild(e.name),typeAnnotation:this.convertType(e.type)});return os.hasModifier(d.DeclareKeyword,e)&&(ke.declare=!0),e.typeParameters&&(ke.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),this.fixExports(e,ke);case d.MethodSignature:var Te=this.createNode(e,{type:as.AST_NODE_TYPES.TSMethodSignature,computed:os.isComputedProperty(e.name),key:this.convertChild(e.name),params:this.convertParameters(e.parameters)});os.isOptional(e)&&(Te.optional=!0),e.type&&(Te.returnType=this.convertTypeAnnotation(e.type,e)),os.hasModifier(d.ReadonlyKeyword,e)&&(Te.readonly=!0),e.typeParameters&&(Te.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters));var we=os.getTSNodeAccessibility(e);return we&&(Te.accessibility=we),os.hasModifier(d.ExportKeyword,e)&&(Te.export=!0),os.hasModifier(d.StaticKeyword,e)&&(Te.static=!0),Te;case d.PropertySignature:var Ae=this.createNode(e,{type:as.AST_NODE_TYPES.TSPropertySignature,optional:os.isOptional(e)||void 0,computed:os.isComputedProperty(e.name),key:this.convertChild(e.name),typeAnnotation:e.type?this.convertTypeAnnotation(e.type,e):void 0,initializer:this.convertChild(e.initializer)||void 0,readonly:os.hasModifier(d.ReadonlyKeyword,e)||void 0,static:os.hasModifier(d.StaticKeyword,e)||void 0,export:os.hasModifier(d.ExportKeyword,e)||void 0}),Oe=os.getTSNodeAccessibility(e);return Oe&&(Ae.accessibility=Oe),Ae;case d.IndexSignature:var Ne=this.createNode(e,{type:as.AST_NODE_TYPES.TSIndexSignature,parameters:e.parameters.map((function(e){return g.convertChild(e)}))});e.type&&(Ne.typeAnnotation=this.convertTypeAnnotation(e.type,e)),os.hasModifier(d.ReadonlyKeyword,e)&&(Ne.readonly=!0);var Ie=os.getTSNodeAccessibility(e);return Ie&&(Ne.accessibility=Ie),os.hasModifier(d.ExportKeyword,e)&&(Ne.export=!0),os.hasModifier(d.StaticKeyword,e)&&(Ne.static=!0),Ne;case d.ConstructorType:case d.FunctionType:case d.ConstructSignature:case d.CallSignature:var Fe;switch(e.kind){case d.ConstructSignature:Fe=as.AST_NODE_TYPES.TSConstructSignatureDeclaration;break;case d.CallSignature:Fe=as.AST_NODE_TYPES.TSCallSignatureDeclaration;break;case d.FunctionType:Fe=as.AST_NODE_TYPES.TSFunctionType;break;case d.ConstructorType:default:Fe=as.AST_NODE_TYPES.TSConstructorType}var Le=this.createNode(e,{type:Fe,params:this.convertParameters(e.parameters)});return e.type&&(Le.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(Le.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),Le;case d.ExpressionWithTypeArguments:var Pe=this.createNode(e,{type:t&&t.kind===d.InterfaceDeclaration?as.AST_NODE_TYPES.TSInterfaceHeritage:as.AST_NODE_TYPES.TSClassImplements,expression:this.convertChild(e.expression)});return e.typeArguments&&(Pe.typeParameters=this.convertTypeArgumentsToTypeParameters(e.typeArguments,e)),Pe;case d.InterfaceDeclaration:var Re=null!==(h=e.heritageClauses)&&void 0!==h?h:[],Me=this.createNode(e,{type:as.AST_NODE_TYPES.TSInterfaceDeclaration,body:this.createNode(e,{type:as.AST_NODE_TYPES.TSInterfaceBody,body:e.members.map((function(e){return g.convertChild(e)})),range:[e.members.pos-1,e.end]}),id:this.convertChild(e.name)});if(e.typeParameters&&(Me.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),Re.length>0){var Be,je=[],Ue=[],Ve=r(Re);try{for(Ve.s();!(Be=Ve.n()).done;){var ze=Be.value;if(ze.token===d.ExtendsKeyword){var He,We=r(ze.types);try{for(We.s();!(He=We.n()).done;){var Ke=He.value;je.push(this.convertChild(Ke,e))}}catch(nt){We.e(nt)}finally{We.f()}}else{var qe,Ge=r(ze.types);try{for(Ge.s();!(qe=Ge.n()).done;){var Ye=qe.value;Ue.push(this.convertChild(Ye,e))}}catch(nt){Ge.e(nt)}finally{Ge.f()}}}}catch(nt){Ve.e(nt)}finally{Ve.f()}je.length&&(Me.extends=je),Ue.length&&(Me.implements=Ue)}return os.hasModifier(d.AbstractKeyword,e)&&(Me.abstract=!0),os.hasModifier(d.DeclareKeyword,e)&&(Me.declare=!0),this.fixExports(e,Me);case d.TypePredicate:var Je=this.createNode(e,{type:as.AST_NODE_TYPES.TSTypePredicate,asserts:void 0!==e.assertsModifier,parameterName:this.convertChild(e.parameterName),typeAnnotation:null});return e.type&&(Je.typeAnnotation=this.convertTypeAnnotation(e.type,e),Je.typeAnnotation.loc=Je.typeAnnotation.typeAnnotation.loc,Je.typeAnnotation.range=Je.typeAnnotation.typeAnnotation.range),Je;case d.ImportType:return this.createNode(e,{type:as.AST_NODE_TYPES.TSImportType,isTypeOf:!!e.isTypeOf,parameter:this.convertChild(e.argument),qualifier:this.convertChild(e.qualifier),typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments,e):null});case d.EnumDeclaration:var $e=this.createNode(e,{type:as.AST_NODE_TYPES.TSEnumDeclaration,id:this.convertChild(e.name),members:e.members.map((function(e){return g.convertChild(e)}))});return this.applyModifiersToResult($e,e.modifiers),this.fixExports(e,$e);case d.EnumMember:var Qe=this.createNode(e,{type:as.AST_NODE_TYPES.TSEnumMember,id:this.convertChild(e.name)});return e.initializer&&(Qe.initializer=this.convertChild(e.initializer)),e.name.kind===l.SyntaxKind.ComputedPropertyName&&(Qe.computed=!0),Qe;case d.ModuleDeclaration:var Xe=this.createNode(e,{type:as.AST_NODE_TYPES.TSModuleDeclaration,id:this.convertChild(e.name)});return e.body&&(Xe.body=this.convertChild(e.body)),this.applyModifiersToResult(Xe,e.modifiers),e.flags&l.NodeFlags.GlobalAugmentation&&(Xe.global=!0),this.fixExports(e,Xe);case d.ParenthesizedType:return this.createNode(e,{type:as.AST_NODE_TYPES.TSParenthesizedType,typeAnnotation:this.convertType(e.type)});case d.UnionType:return this.createNode(e,{type:as.AST_NODE_TYPES.TSUnionType,types:e.types.map((function(e){return g.convertType(e)}))});case d.IntersectionType:return this.createNode(e,{type:as.AST_NODE_TYPES.TSIntersectionType,types:e.types.map((function(e){return g.convertType(e)}))});case d.AsExpression:return this.createNode(e,{type:as.AST_NODE_TYPES.TSAsExpression,expression:this.convertChild(e.expression),typeAnnotation:this.convertType(e.type)});case d.InferType:return this.createNode(e,{type:as.AST_NODE_TYPES.TSInferType,typeParameter:this.convertType(e.typeParameter)});case d.LiteralType:return ss.typescriptVersionIsAtLeast["4.0"]&&e.literal.kind===d.NullKeyword?this.createNode(e.literal,{type:as.AST_NODE_TYPES.TSNullKeyword}):this.createNode(e,{type:as.AST_NODE_TYPES.TSLiteralType,literal:this.convertType(e.literal)});case d.TypeAssertionExpression:return this.createNode(e,{type:as.AST_NODE_TYPES.TSTypeAssertion,typeAnnotation:this.convertType(e.type),expression:this.convertChild(e.expression)});case d.ImportEqualsDeclaration:return this.createNode(e,{type:as.AST_NODE_TYPES.TSImportEqualsDeclaration,id:this.convertChild(e.name),moduleReference:this.convertChild(e.moduleReference),isExport:os.hasModifier(d.ExportKeyword,e)});case d.ExternalModuleReference:return this.createNode(e,{type:as.AST_NODE_TYPES.TSExternalModuleReference,expression:this.convertChild(e.expression)});case d.NamespaceExportDeclaration:return this.createNode(e,{type:as.AST_NODE_TYPES.TSNamespaceExportDeclaration,id:this.convertChild(e.name)});case d.AbstractKeyword:return this.createNode(e,{type:as.AST_NODE_TYPES.TSAbstractKeyword});case d.TupleType:var Ze="elementTypes"in e?e.elementTypes.map((function(e){return g.convertType(e)})):e.elements.map((function(e){return g.convertType(e)}));return this.createNode(e,{type:as.AST_NODE_TYPES.TSTupleType,elementTypes:Ze});case d.NamedTupleMember:var et=this.createNode(e,{type:as.AST_NODE_TYPES.TSNamedTupleMember,elementType:this.convertType(e.type,e),label:this.convertChild(e.name,e),optional:null!=e.questionToken});return e.dotDotDotToken?(et.range[0]=et.label.range[0],et.loc.start=et.label.loc.start,this.createNode(e,{type:as.AST_NODE_TYPES.TSRestType,typeAnnotation:et})):et;case d.OptionalType:return this.createNode(e,{type:as.AST_NODE_TYPES.TSOptionalType,typeAnnotation:this.convertType(e.type)});case d.RestType:return this.createNode(e,{type:as.AST_NODE_TYPES.TSRestType,typeAnnotation:this.convertType(e.type)});case d.TemplateLiteralType:var tt=this.createNode(e,{type:as.AST_NODE_TYPES.TSTemplateLiteralType,quasis:[this.convertChild(e.head)],types:[]});return e.templateSpans.forEach((function(e){tt.types.push(g.convertChild(e.type)),tt.quasis.push(g.convertChild(e.literal))})),tt;default:return this.deeplyCopy(e)}}}]),e}()})),cs=function(e,t){return(cs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},ls=function(){return(ls=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ps(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function fs(e){return this instanceof fs?(this.v=e,this):new fs(e)}var hs,gs=Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}cs(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return ls},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof fs?Promise.resolve(n.value.v).then(u,c):l(a[0][2],n)}catch(e){l(a[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:fs(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=ds(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}}),ms=c((function(e,t){function n(e){return e.kind===ko.SyntaxKind.ModuleDeclaration}function r(e){return e.kind===ko.SyntaxKind.PropertyAccessExpression}function i(e){return e.kind===ko.SyntaxKind.QualifiedName}Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessorDeclaration=function(e){return e.kind===ko.SyntaxKind.GetAccessor||e.kind===ko.SyntaxKind.SetAccessor},t.isArrayBindingPattern=function(e){return e.kind===ko.SyntaxKind.ArrayBindingPattern},t.isArrayLiteralExpression=function(e){return e.kind===ko.SyntaxKind.ArrayLiteralExpression},t.isArrayTypeNode=function(e){return e.kind===ko.SyntaxKind.ArrayType},t.isArrowFunction=function(e){return e.kind===ko.SyntaxKind.ArrowFunction},t.isAsExpression=function(e){return e.kind===ko.SyntaxKind.AsExpression},t.isAssertionExpression=function(e){return e.kind===ko.SyntaxKind.AsExpression||e.kind===ko.SyntaxKind.TypeAssertionExpression},t.isAwaitExpression=function(e){return e.kind===ko.SyntaxKind.AwaitExpression},t.isBinaryExpression=function(e){return e.kind===ko.SyntaxKind.BinaryExpression},t.isBindingElement=function(e){return e.kind===ko.SyntaxKind.BindingElement},t.isBindingPattern=function(e){return e.kind===ko.SyntaxKind.ArrayBindingPattern||e.kind===ko.SyntaxKind.ObjectBindingPattern},t.isBlock=function(e){return e.kind===ko.SyntaxKind.Block},t.isBlockLike=function(e){return void 0!==e.statements},t.isBooleanLiteral=function(e){return e.kind===ko.SyntaxKind.TrueKeyword||e.kind===ko.SyntaxKind.FalseKeyword},t.isBreakOrContinueStatement=function(e){return e.kind===ko.SyntaxKind.BreakStatement||e.kind===ko.SyntaxKind.ContinueStatement},t.isBreakStatement=function(e){return e.kind===ko.SyntaxKind.BreakStatement},t.isCallExpression=function(e){return e.kind===ko.SyntaxKind.CallExpression},t.isCallLikeExpression=function(e){switch(e.kind){case ko.SyntaxKind.CallExpression:case ko.SyntaxKind.Decorator:case ko.SyntaxKind.JsxOpeningElement:case ko.SyntaxKind.JsxSelfClosingElement:case ko.SyntaxKind.NewExpression:case ko.SyntaxKind.TaggedTemplateExpression:return!0;default:return!1}},t.isCallSignatureDeclaration=function(e){return e.kind===ko.SyntaxKind.CallSignature},t.isCaseBlock=function(e){return e.kind===ko.SyntaxKind.CaseBlock},t.isCaseClause=function(e){return e.kind===ko.SyntaxKind.CaseClause},t.isCaseOrDefaultClause=function(e){return e.kind===ko.SyntaxKind.CaseClause||e.kind===ko.SyntaxKind.DefaultClause},t.isCatchClause=function(e){return e.kind===ko.SyntaxKind.CatchClause},t.isClassDeclaration=function(e){return e.kind===ko.SyntaxKind.ClassDeclaration},t.isClassExpression=function(e){return e.kind===ko.SyntaxKind.ClassExpression},t.isClassLikeDeclaration=function(e){return e.kind===ko.SyntaxKind.ClassDeclaration||e.kind===ko.SyntaxKind.ClassExpression},t.isCommaListExpression=function(e){return e.kind===ko.SyntaxKind.CommaListExpression},t.isConditionalExpression=function(e){return e.kind===ko.SyntaxKind.ConditionalExpression},t.isConditionalTypeNode=function(e){return e.kind===ko.SyntaxKind.ConditionalType},t.isConstructorDeclaration=function(e){return e.kind===ko.SyntaxKind.Constructor},t.isConstructorTypeNode=function(e){return e.kind===ko.SyntaxKind.ConstructorType},t.isConstructSignatureDeclaration=function(e){return e.kind===ko.SyntaxKind.ConstructSignature},t.isContinueStatement=function(e){return e.kind===ko.SyntaxKind.ContinueStatement},t.isComputedPropertyName=function(e){return e.kind===ko.SyntaxKind.ComputedPropertyName},t.isDebuggerStatement=function(e){return e.kind===ko.SyntaxKind.DebuggerStatement},t.isDecorator=function(e){return e.kind===ko.SyntaxKind.Decorator},t.isDefaultClause=function(e){return e.kind===ko.SyntaxKind.DefaultClause},t.isDeleteExpression=function(e){return e.kind===ko.SyntaxKind.DeleteExpression},t.isDoStatement=function(e){return e.kind===ko.SyntaxKind.DoStatement},t.isElementAccessExpression=function(e){return e.kind===ko.SyntaxKind.ElementAccessExpression},t.isEmptyStatement=function(e){return e.kind===ko.SyntaxKind.EmptyStatement},t.isEntityName=function(e){return e.kind===ko.SyntaxKind.Identifier||i(e)},t.isEntityNameExpression=function e(t){return t.kind===ko.SyntaxKind.Identifier||r(t)&&e(t.expression)},t.isEnumDeclaration=function(e){return e.kind===ko.SyntaxKind.EnumDeclaration},t.isEnumMember=function(e){return e.kind===ko.SyntaxKind.EnumMember},t.isExportAssignment=function(e){return e.kind===ko.SyntaxKind.ExportAssignment},t.isExportDeclaration=function(e){return e.kind===ko.SyntaxKind.ExportDeclaration},t.isExportSpecifier=function(e){return e.kind===ko.SyntaxKind.ExportSpecifier},t.isExpression=function(e){switch(e.kind){case ko.SyntaxKind.ArrayLiteralExpression:case ko.SyntaxKind.ArrowFunction:case ko.SyntaxKind.AsExpression:case ko.SyntaxKind.AwaitExpression:case ko.SyntaxKind.BinaryExpression:case ko.SyntaxKind.CallExpression:case ko.SyntaxKind.ClassExpression:case ko.SyntaxKind.CommaListExpression:case ko.SyntaxKind.ConditionalExpression:case ko.SyntaxKind.DeleteExpression:case ko.SyntaxKind.ElementAccessExpression:case ko.SyntaxKind.FalseKeyword:case ko.SyntaxKind.FunctionExpression:case ko.SyntaxKind.Identifier:case ko.SyntaxKind.JsxElement:case ko.SyntaxKind.JsxFragment:case ko.SyntaxKind.JsxExpression:case ko.SyntaxKind.JsxOpeningElement:case ko.SyntaxKind.JsxOpeningFragment:case ko.SyntaxKind.JsxSelfClosingElement:case ko.SyntaxKind.MetaProperty:case ko.SyntaxKind.NewExpression:case ko.SyntaxKind.NonNullExpression:case ko.SyntaxKind.NoSubstitutionTemplateLiteral:case ko.SyntaxKind.NullKeyword:case ko.SyntaxKind.NumericLiteral:case ko.SyntaxKind.ObjectLiteralExpression:case ko.SyntaxKind.OmittedExpression:case ko.SyntaxKind.ParenthesizedExpression:case ko.SyntaxKind.PostfixUnaryExpression:case ko.SyntaxKind.PrefixUnaryExpression:case ko.SyntaxKind.PropertyAccessExpression:case ko.SyntaxKind.RegularExpressionLiteral:case ko.SyntaxKind.SpreadElement:case ko.SyntaxKind.StringLiteral:case ko.SyntaxKind.SuperKeyword:case ko.SyntaxKind.TaggedTemplateExpression:case ko.SyntaxKind.TemplateExpression:case ko.SyntaxKind.ThisKeyword:case ko.SyntaxKind.TrueKeyword:case ko.SyntaxKind.TypeAssertionExpression:case ko.SyntaxKind.TypeOfExpression:case ko.SyntaxKind.VoidExpression:case ko.SyntaxKind.YieldExpression:return!0;default:return!1}},t.isExpressionStatement=function(e){return e.kind===ko.SyntaxKind.ExpressionStatement},t.isExpressionWithTypeArguments=function(e){return e.kind===ko.SyntaxKind.ExpressionWithTypeArguments},t.isExternalModuleReference=function(e){return e.kind===ko.SyntaxKind.ExternalModuleReference},t.isForInStatement=function(e){return e.kind===ko.SyntaxKind.ForInStatement},t.isForInOrOfStatement=function(e){return e.kind===ko.SyntaxKind.ForOfStatement||e.kind===ko.SyntaxKind.ForInStatement},t.isForOfStatement=function(e){return e.kind===ko.SyntaxKind.ForOfStatement},t.isForStatement=function(e){return e.kind===ko.SyntaxKind.ForStatement},t.isFunctionDeclaration=function(e){return e.kind===ko.SyntaxKind.FunctionDeclaration},t.isFunctionExpression=function(e){return e.kind===ko.SyntaxKind.FunctionExpression},t.isFunctionTypeNode=function(e){return e.kind===ko.SyntaxKind.FunctionType},t.isGetAccessorDeclaration=function(e){return e.kind===ko.SyntaxKind.GetAccessor},t.isIdentifier=function(e){return e.kind===ko.SyntaxKind.Identifier},t.isIfStatement=function(e){return e.kind===ko.SyntaxKind.IfStatement},t.isImportClause=function(e){return e.kind===ko.SyntaxKind.ImportClause},t.isImportDeclaration=function(e){return e.kind===ko.SyntaxKind.ImportDeclaration},t.isImportEqualsDeclaration=function(e){return e.kind===ko.SyntaxKind.ImportEqualsDeclaration},t.isImportSpecifier=function(e){return e.kind===ko.SyntaxKind.ImportSpecifier},t.isIndexedAccessTypeNode=function(e){return e.kind===ko.SyntaxKind.IndexedAccessType},t.isIndexSignatureDeclaration=function(e){return e.kind===ko.SyntaxKind.IndexSignature},t.isInferTypeNode=function(e){return e.kind===ko.SyntaxKind.InferType},t.isInterfaceDeclaration=function(e){return e.kind===ko.SyntaxKind.InterfaceDeclaration},t.isIntersectionTypeNode=function(e){return e.kind===ko.SyntaxKind.IntersectionType},t.isIterationStatement=function(e){switch(e.kind){case ko.SyntaxKind.ForStatement:case ko.SyntaxKind.ForOfStatement:case ko.SyntaxKind.ForInStatement:case ko.SyntaxKind.WhileStatement:case ko.SyntaxKind.DoStatement:return!0;default:return!1}},t.isJsDoc=function(e){return e.kind===ko.SyntaxKind.JSDocComment},t.isJsxAttribute=function(e){return e.kind===ko.SyntaxKind.JsxAttribute},t.isJsxAttributeLike=function(e){return e.kind===ko.SyntaxKind.JsxAttribute||e.kind===ko.SyntaxKind.JsxSpreadAttribute},t.isJsxAttributes=function(e){return e.kind===ko.SyntaxKind.JsxAttributes},t.isJsxClosingElement=function(e){return e.kind===ko.SyntaxKind.JsxClosingElement},t.isJsxClosingFragment=function(e){return e.kind===ko.SyntaxKind.JsxClosingFragment},t.isJsxElement=function(e){return e.kind===ko.SyntaxKind.JsxElement},t.isJsxExpression=function(e){return e.kind===ko.SyntaxKind.JsxExpression},t.isJsxFragment=function(e){return e.kind===ko.SyntaxKind.JsxFragment},t.isJsxOpeningElement=function(e){return e.kind===ko.SyntaxKind.JsxOpeningElement},t.isJsxOpeningFragment=function(e){return e.kind===ko.SyntaxKind.JsxOpeningFragment},t.isJsxOpeningLikeElement=function(e){return e.kind===ko.SyntaxKind.JsxOpeningElement||e.kind===ko.SyntaxKind.JsxSelfClosingElement},t.isJsxSelfClosingElement=function(e){return e.kind===ko.SyntaxKind.JsxSelfClosingElement},t.isJsxSpreadAttribute=function(e){return e.kind===ko.SyntaxKind.JsxSpreadAttribute},t.isJsxText=function(e){return e.kind===ko.SyntaxKind.JsxText},t.isLabeledStatement=function(e){return e.kind===ko.SyntaxKind.LabeledStatement},t.isLiteralExpression=function(e){return e.kind>=ko.SyntaxKind.FirstLiteralToken&&e.kind<=ko.SyntaxKind.LastLiteralToken},t.isLiteralTypeNode=function(e){return e.kind===ko.SyntaxKind.LiteralType},t.isMappedTypeNode=function(e){return e.kind===ko.SyntaxKind.MappedType},t.isMetaProperty=function(e){return e.kind===ko.SyntaxKind.MetaProperty},t.isMethodDeclaration=function(e){return e.kind===ko.SyntaxKind.MethodDeclaration},t.isMethodSignature=function(e){return e.kind===ko.SyntaxKind.MethodSignature},t.isModuleBlock=function(e){return e.kind===ko.SyntaxKind.ModuleBlock},t.isModuleDeclaration=n,t.isNamedExports=function(e){return e.kind===ko.SyntaxKind.NamedExports},t.isNamedImports=function(e){return e.kind===ko.SyntaxKind.NamedImports},t.isNamespaceDeclaration=function e(t){return n(t)&&t.name.kind===ko.SyntaxKind.Identifier&&void 0!==t.body&&(t.body.kind===ko.SyntaxKind.ModuleBlock||e(t.body))},t.isNamespaceImport=function(e){return e.kind===ko.SyntaxKind.NamespaceImport},t.isNamespaceExportDeclaration=function(e){return e.kind===ko.SyntaxKind.NamespaceExportDeclaration},t.isNewExpression=function(e){return e.kind===ko.SyntaxKind.NewExpression},t.isNonNullExpression=function(e){return e.kind===ko.SyntaxKind.NonNullExpression},t.isNoSubstitutionTemplateLiteral=function(e){return e.kind===ko.SyntaxKind.NoSubstitutionTemplateLiteral},t.isNullLiteral=function(e){return e.kind===ko.SyntaxKind.NullKeyword},t.isNumericLiteral=function(e){return e.kind===ko.SyntaxKind.NumericLiteral},t.isNumericOrStringLikeLiteral=function(e){switch(e.kind){case ko.SyntaxKind.StringLiteral:case ko.SyntaxKind.NumericLiteral:case ko.SyntaxKind.NoSubstitutionTemplateLiteral:return!0;default:return!1}},t.isObjectBindingPattern=function(e){return e.kind===ko.SyntaxKind.ObjectBindingPattern},t.isObjectLiteralExpression=function(e){return e.kind===ko.SyntaxKind.ObjectLiteralExpression},t.isOmittedExpression=function(e){return e.kind===ko.SyntaxKind.OmittedExpression},t.isParameterDeclaration=function(e){return e.kind===ko.SyntaxKind.Parameter},t.isParenthesizedExpression=function(e){return e.kind===ko.SyntaxKind.ParenthesizedExpression},t.isParenthesizedTypeNode=function(e){return e.kind===ko.SyntaxKind.ParenthesizedType},t.isPostfixUnaryExpression=function(e){return e.kind===ko.SyntaxKind.PostfixUnaryExpression},t.isPrefixUnaryExpression=function(e){return e.kind===ko.SyntaxKind.PrefixUnaryExpression},t.isPropertyAccessExpression=r,t.isPropertyAssignment=function(e){return e.kind===ko.SyntaxKind.PropertyAssignment},t.isPropertyDeclaration=function(e){return e.kind===ko.SyntaxKind.PropertyDeclaration},t.isPropertySignature=function(e){return e.kind===ko.SyntaxKind.PropertySignature},t.isQualifiedName=i,t.isRegularExpressionLiteral=function(e){return e.kind===ko.SyntaxKind.RegularExpressionLiteral},t.isReturnStatement=function(e){return e.kind===ko.SyntaxKind.ReturnStatement},t.isSetAccessorDeclaration=function(e){return e.kind===ko.SyntaxKind.SetAccessor},t.isShorthandPropertyAssignment=function(e){return e.kind===ko.SyntaxKind.ShorthandPropertyAssignment},t.isSignatureDeclaration=function(e){return void 0!==e.parameters},t.isSourceFile=function(e){return e.kind===ko.SyntaxKind.SourceFile},t.isSpreadAssignment=function(e){return e.kind===ko.SyntaxKind.SpreadAssignment},t.isSpreadElement=function(e){return e.kind===ko.SyntaxKind.SpreadElement},t.isStringLiteral=function(e){return e.kind===ko.SyntaxKind.StringLiteral},t.isSwitchStatement=function(e){return e.kind===ko.SyntaxKind.SwitchStatement},t.isSyntaxList=function(e){return e.kind===ko.SyntaxKind.SyntaxList},t.isTaggedTemplateExpression=function(e){return e.kind===ko.SyntaxKind.TaggedTemplateExpression},t.isTemplateExpression=function(e){return e.kind===ko.SyntaxKind.TemplateExpression},t.isTemplateLiteral=function(e){return e.kind===ko.SyntaxKind.TemplateExpression||e.kind===ko.SyntaxKind.NoSubstitutionTemplateLiteral},t.isTextualLiteral=function(e){return e.kind===ko.SyntaxKind.StringLiteral||e.kind===ko.SyntaxKind.NoSubstitutionTemplateLiteral},t.isThrowStatement=function(e){return e.kind===ko.SyntaxKind.ThrowStatement},t.isTryStatement=function(e){return e.kind===ko.SyntaxKind.TryStatement},t.isTupleTypeNode=function(e){return e.kind===ko.SyntaxKind.TupleType},t.isTypeAliasDeclaration=function(e){return e.kind===ko.SyntaxKind.TypeAliasDeclaration},t.isTypeAssertion=function(e){return e.kind===ko.SyntaxKind.TypeAssertionExpression},t.isTypeLiteralNode=function(e){return e.kind===ko.SyntaxKind.TypeLiteral},t.isTypeOfExpression=function(e){return e.kind===ko.SyntaxKind.TypeOfExpression},t.isTypeOperatorNode=function(e){return e.kind===ko.SyntaxKind.TypeOperator},t.isTypeParameterDeclaration=function(e){return e.kind===ko.SyntaxKind.TypeParameter},t.isTypePredicateNode=function(e){return e.kind===ko.SyntaxKind.TypePredicate},t.isTypeReferenceNode=function(e){return e.kind===ko.SyntaxKind.TypeReference},t.isTypeQueryNode=function(e){return e.kind===ko.SyntaxKind.TypeQuery},t.isUnionTypeNode=function(e){return e.kind===ko.SyntaxKind.UnionType},t.isVariableDeclaration=function(e){return e.kind===ko.SyntaxKind.VariableDeclaration},t.isVariableStatement=function(e){return e.kind===ko.SyntaxKind.VariableStatement},t.isVariableDeclarationList=function(e){return e.kind===ko.SyntaxKind.VariableDeclarationList},t.isVoidExpression=function(e){return e.kind===ko.SyntaxKind.VoidExpression},t.isWhileStatement=function(e){return e.kind===ko.SyntaxKind.WhileStatement},t.isWithStatement=function(e){return e.kind===ko.SyntaxKind.WithStatement}})),_s=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),gs.__exportStar(ms,t),t.isImportTypeNode=function(e){return e.kind===ko.SyntaxKind.ImportType}})),vs=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),gs.__exportStar(_s,t),t.isOptionalTypeNode=function(e){return e.kind===ko.SyntaxKind.OptionalType},t.isRestTypeNode=function(e){return e.kind===ko.SyntaxKind.RestType},t.isSyntheticExpression=function(e){return e.kind===ko.SyntaxKind.SyntheticExpression}})),ys=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),gs.__exportStar(vs,t),t.isBigIntLiteral=function(e){return e.kind===ko.SyntaxKind.BigIntLiteral}})),bs=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),gs.__exportStar(ys,t)})),Ds=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isConditionalType=function(e){return 0!=(e.flags&ko.TypeFlags.Conditional)},t.isEnumType=function(e){return 0!=(e.flags&ko.TypeFlags.Enum)},t.isGenericType=function(e){return 0!=(e.flags&ko.TypeFlags.Object)&&0!=(e.objectFlags&ko.ObjectFlags.ClassOrInterface)&&0!=(e.objectFlags&ko.ObjectFlags.Reference)},t.isIndexedAccessType=function(e){return 0!=(e.flags&ko.TypeFlags.IndexedAccess)},t.isIndexedAccessype=function(e){return 0!=(e.flags&ko.TypeFlags.Index)},t.isInstantiableType=function(e){return 0!=(e.flags&ko.TypeFlags.Instantiable)},t.isInterfaceType=function(e){return 0!=(e.flags&ko.TypeFlags.Object)&&0!=(e.objectFlags&ko.ObjectFlags.ClassOrInterface)},t.isIntersectionType=function(e){return 0!=(e.flags&ko.TypeFlags.Intersection)},t.isLiteralType=function(e){return 0!=(e.flags&(ko.TypeFlags.StringOrNumberLiteral|ko.TypeFlags.BigIntLiteral))},t.isObjectType=function(e){return 0!=(e.flags&ko.TypeFlags.Object)},t.isSubstitutionType=function(e){return 0!=(e.flags&ko.TypeFlags.Substitution)},t.isTypeParameter=function(e){return 0!=(e.flags&ko.TypeFlags.TypeParameter)},t.isTypeReference=function(e){return 0!=(e.flags&ko.TypeFlags.Object)&&0!=(e.objectFlags&ko.ObjectFlags.Reference)},t.isTypeVariable=function(e){return 0!=(e.flags&ko.TypeFlags.TypeVariable)},t.isUnionOrIntersectionType=function(e){return 0!=(e.flags&ko.TypeFlags.UnionOrIntersection)},t.isUnionType=function(e){return 0!=(e.flags&ko.TypeFlags.Union)},t.isUniqueESSymbolType=function(e){return 0!=(e.flags&ko.TypeFlags.UniqueESSymbol)}})),Es=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),gs.__exportStar(Ds,t)})),Cs=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),gs.__exportStar(Es,t);var n=Es;function r(e){return 0!==(e.flags&ko.TypeFlags.Object&&e.objectFlags&ko.ObjectFlags.Tuple)}t.isTupleType=r,t.isTupleTypeReference=function(e){return n.isTypeReference(e)&&r(e.target)}})),Ss=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),gs.__exportStar(Cs,t)})),xs=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),gs.__exportStar(ys,t),gs.__exportStar(Ss,t)})),ks=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),gs.__exportStar(Ss,t)})),Ts=c((function(e,t){function n(e,t){if(!i(t,ko.TypeFlags.Undefined))return t;var n=i(t,ko.TypeFlags.Null);return t=e.getNonNullableType(t),n?e.getNullableType(t,ko.TypeFlags.Null):t}function i(e,t){var n,i=r(s(e));try{for(i.s();!(n=i.n()).done;){var a=n.value;if(ws.isTypeFlagSet(a,t))return!0}}catch(o){i.e(o)}finally{i.f()}return!1}function a(e,t,n){var r;return n|=ko.TypeFlags.Any,function t(i){if(ks.isTypeParameter(i)&&void 0!==i.symbol&&void 0!==i.symbol.declarations){if(void 0===r)r=new Set([i]);else{if(r.has(i))return!1;r.add(i)}var a=i.symbol.declarations[0];return void 0===a.constraint||t(e.getTypeFromTypeNode(a.constraint))}return ks.isUnionType(i)?i.types.every(t):ks.isIntersectionType(i)?i.types.some(t):ws.isTypeFlagSet(i,n)}(t)}function s(e){return ks.isUnionType(e)?e.types:[e]}function u(e,t,n){return t(e)?e.types.some(n):n(e)}function c(e,t,n){var i=e.getApparentType(e.getTypeOfSymbolAtLocation(t,n));if(t.valueDeclaration.dotDotDotToken&&void 0===(i=i.getNumberIndexType()))return!1;var a,o=r(s(i));try{for(o.s();!(a=o.n()).done;)if(0!==a.value.getCallSignatures().length)return!0}catch(u){o.e(u)}finally{o.f()}return!1}function l(e,t){return ws.isTypeFlagSet(e,ko.TypeFlags.BooleanLiteral)&&e.intrinsicName===(t?"true":"false")}function d(e,t){return t.startsWith("__")?e.getProperties().find((function(e){return e.escapedName===t})):e.getProperty(t)}function p(e,t,n){var i,a=!1,o=!1,u=r(s(e));try{for(u.s();!(i=u.n()).done;){var c=i.value;if(void 0===d(c,t)){var l=(ws.isNumericPropertyName(t)?n.getIndexInfoOfType(c,ko.IndexKind.Number):void 0)||n.getIndexInfoOfType(c,ko.IndexKind.String);if(void 0!==l&&l.isReadonly){if(a)return!0;o=!0}}else{if(o||f(c,t,n))return!0;a=!0}}}catch(p){u.e(p)}finally{u.f()}return!1}function f(e,t,n){return u(e,ks.isIntersectionType,(function(e){var r=d(e,t);if(void 0===r)return!1;if(r.flags&ko.SymbolFlags.Transient){if(/^(?:[1-9]\d*|0)$/.test(t)&&ks.isTupleTypeReference(e))return e.target.readonly;switch(function(e,t,n){if(ks.isObjectType(e)&&ws.isObjectFlagSet(e,ko.ObjectFlags.Mapped)){var r=e.symbol.declarations[0];return void 0===r.readonlyToken||/^__@[^@]+$/.test(t)?p(e.modifiersType,t,n):r.readonlyToken.kind!==ko.SyntaxKind.MinusToken}}(e,t,n)){case!0:return!0;case!1:return!1}}return ws.isSymbolFlagSet(r,ko.SymbolFlags.ValueModule)||h(r,n)}))}function h(e,t){return(e.flags&ko.SymbolFlags.Accessor)===ko.SymbolFlags.GetAccessor||void 0!==e.declarations&&e.declarations.some((function(e){return ws.isModifierFlagSet(e,ko.ModifierFlags.Readonly)||bs.isVariableDeclaration(e)&&ws.isNodeFlagSet(e.parent,ko.NodeFlags.Const)||bs.isCallExpression(e)&&ws.isReadonlyAssignmentDeclaration(e,t)||bs.isEnumMember(e)||(bs.isPropertyAssignment(e)||bs.isShorthandPropertyAssignment(e))&&ws.isInConstContext(e.parent)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyObjectType=function e(t){if(ks.isObjectType(t)&&t.objectFlags&ko.ObjectFlags.Anonymous&&0===t.getProperties().length&&0===t.getCallSignatures().length&&0===t.getConstructSignatures().length&&void 0===t.getStringIndexType()&&void 0===t.getNumberIndexType()){var n=t.getBaseTypes();return void 0===n||n.every(e)}return!1},t.removeOptionalityFromType=n,t.isTypeAssignableToNumber=function(e,t){return a(e,t,ko.TypeFlags.NumberLike)},t.isTypeAssignableToString=function(e,t){return a(e,t,ko.TypeFlags.StringLike)},t.getCallSignaturesOfType=function e(t){if(ks.isUnionType(t)){var n,i=[],a=r(t.types);try{for(a.s();!(n=a.n()).done;){var s=n.value;i.push.apply(i,o(e(s)))}}catch(p){a.e(p)}finally{a.f()}return i}if(ks.isIntersectionType(t)){var u,c,l=r(t.types);try{for(l.s();!(c=l.n()).done;){var d=e(c.value);if(0!==d.length){if(void 0!==u)return[];u=d}}}catch(p){l.e(p)}finally{l.f()}return void 0===u?[]:u}return t.getCallSignatures()},t.unionTypeParts=s,t.intersectionTypeParts=function(e){return ks.isIntersectionType(e)?e.types:[e]},t.someTypePart=u,t.isThenableType=function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getTypeAtLocation(t),a=r(s(e.getApparentType(i)));try{for(a.s();!(n=a.n()).done;){var o=n.value.getProperty("then");if(void 0!==o){var u,l=e.getTypeOfSymbolAtLocation(o,t),d=r(s(l));try{for(d.s();!(u=d.n()).done;){var p,f=u.value,h=r(f.getCallSignatures());try{for(h.s();!(p=h.n()).done;){var g=p.value;if(0!==g.parameters.length&&c(e,g.parameters[0],t))return!0}}catch(m){h.e(m)}finally{h.f()}}}catch(m){d.e(m)}finally{d.f()}}}}catch(m){a.e(m)}finally{a.f()}return!1},t.isFalsyType=function(e){return!!(e.flags&(ko.TypeFlags.Undefined|ko.TypeFlags.Null|ko.TypeFlags.Void))||(ks.isLiteralType(e)?!e.value:l(e,!1))},t.isBooleanLiteralType=l,t.getPropertyOfType=d,t.isPropertyReadonlyInType=p,t.symbolHasReadonlyDeclaration=h,t.getPropertyNameFromType=function(e){if(e.flags&(ko.TypeFlags.StringLiteral|ko.TypeFlags.NumberLiteral)){var t=String(e.value);return{displayName:t,symbolName:ko.escapeLeadingUnderscores(t)}}if(ks.isUniqueESSymbolType(e))return{displayName:"[".concat(e.symbol?e.symbol.name:e.escapedName.replace(/^__@|@\d+$/g,""),"]"),symbolName:e.escapedName}},t.getConstructorTypeOfClassLikeDeclaration=function(e,t){return t.getDeclaredTypeOfSymbol(void 0!==e.name?t.getSymbolAtLocation(e.name):t.getTypeAtLocation(e).symbol)},t.getInstanceTypeOfClassLikeDeclaration=function(e,t){return e.kind===ko.SyntaxKind.ClassDeclaration?t.getTypeAtLocation(e):t.getTypeOfSymbolAtLocation(t.getTypeAtLocation(e).getProperty("prototype"),e)},t.getIteratorYieldResultFromIteratorResult=function(e,t,r){return ks.isUnionType(e)&&e.types.find((function(e){var i=e.getProperty("done");return void 0!==i&&l(n(r,r.getTypeOfSymbolAtLocation(i,t)),!1)}))||e}})),ws=c((function(e,t){function n(e){return e>=ko.SyntaxKind.FirstToken&&e<=ko.SyntaxKind.LastToken}function i(e){return e>=ko.SyntaxKind.FirstAssignment&&e<=ko.SyntaxKind.LastAssignment}function a(e){if(void 0===e)return!1;for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i=e.end))return n(e.kind)?e:(void 0===r&&(r=e.getSourceFile()),l(e,t,r,!0===i))}function l(e,t,i,a){e:for(;;){var o,s=r(e.getChildren(i));try{for(s.s();!(o=s.n()).done;){var u=o.value;if(u.end>t&&(a||u.kind!==ko.SyntaxKind.JSDocComment)){if(n(u.kind))return u;e=u;continue e}}}catch(c){s.e(c)}finally{s.f()}return}}function d(e,t){var n=c(arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,t,e);if(!(void 0===n||n.kind===ko.SyntaxKind.JsxText||t>=n.end-(ko.tokenToString(n.kind)||"").length)){var r=0===n.pos?(ko.getShebang(e.text)||"").length:n.pos;return 0!==r&&ko.forEachTrailingCommentRange(e.text,r,p,t)||ko.forEachLeadingCommentRange(e.text,r,p,t)}}function p(e,t,n,r,i){return i>=e&&i2&&void 0!==arguments[2]?arguments[2]:e.getSourceFile();return function e(i){return n(i.kind)?t(i):i.kind!==ko.SyntaxKind.JSDocComment?i.getChildren(r).forEach(e):void 0}(e)}function b(e){return e.kind===ko.SyntaxKind.JsxElement||e.kind===ko.SyntaxKind.JsxFragment}var D;function E(e,t){return void 0===D?D=ko.createScanner(t,!1,void 0,e):(D.setScriptTarget(t),D.setText(e)),D.scan(),D}function C(e){return e>=65536?2:1}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ko.ScriptTarget.Latest;if(0===e.length)return!1;var n=e.codePointAt(0);if(!ko.isIdentifierStart(n,t))return!1;for(var r=C(n);r=ko.SyntaxKind.FirstNode},t.isAssignmentKind=i,t.isTypeNodeKind=function(e){return e>=ko.SyntaxKind.FirstTypeNode&&e<=ko.SyntaxKind.LastTypeNode},t.isJsDocKind=function(e){return e>=ko.SyntaxKind.FirstJSDocNode&&e<=ko.SyntaxKind.LastJSDocNode},t.isKeywordKind=function(e){return e>=ko.SyntaxKind.FirstKeyword&&e<=ko.SyntaxKind.LastKeyword},t.isThisParameter=function(e){return e.name.kind===ko.SyntaxKind.Identifier&&e.name.originalKeywordKind===ko.SyntaxKind.ThisKeyword},t.getModifier=function(e,t){if(void 0!==e.modifiers){var n,i=r(e.modifiers);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a.kind===t)return a}}catch(o){i.e(o)}finally{i.f()}}},t.hasModifier=a,t.isParameterProperty=function(e){return a(e.modifiers,ko.SyntaxKind.PublicKeyword,ko.SyntaxKind.ProtectedKeyword,ko.SyntaxKind.PrivateKeyword,ko.SyntaxKind.ReadonlyKeyword)},t.hasAccessModifier=function(e){return a(e.modifiers,ko.SyntaxKind.PublicKeyword,ko.SyntaxKind.ProtectedKeyword,ko.SyntaxKind.PrivateKeyword)},t.isNodeFlagSet=o,t.isTypeFlagSet=o,t.isSymbolFlagSet=o,t.isObjectFlagSet=function(e,t){return 0!=(e.objectFlags&t)},t.isModifierFlagSet=function(e,t){return 0!=(ko.getCombinedModifierFlags(e)&t)},t.getPreviousStatement=function(e){var t=e.parent;if(bs.isBlockLike(t)){var n=t.statements.indexOf(e);if(n>0)return t.statements[n-1]}},t.getNextStatement=function(e){var t=e.parent;if(bs.isBlockLike(t)){var n=t.statements.indexOf(e);if(n=0;--a){var o=i[a];if(o.pos1&&void 0!==arguments[1]?arguments[1]:e.getSourceFile();if(e.kind!==ko.SyntaxKind.SourceFile&&e.kind!==ko.SyntaxKind.EndOfFileToken){var n=e.end;for(e=e.parent;e.end===n;){if(void 0===e.parent)return e.endOfFileToken;e=e.parent}return l(e,n,t,!1)}},t.getTokenAtPosition=c,t.getCommentAtPosition=d,t.isPositionInComment=function(e,t,n){return void 0!==d(e,t,n)},t.commentText=function(e,t){return e.substring(t.pos+2,t.kind===ko.SyntaxKind.SingleLineCommentTrivia?t.end:t.end-2)},t.getWrappedNodeAtPosition=function(e,t){if(!(e.node.pos>t||e.node.end<=t))e:for(;;){var n,i=r(e.children);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a.node.pos>t)return e;if(a.node.end>t){e=a;continue e}}}catch(o){i.e(o)}finally{i.f()}return e}},t.getPropertyName=f,t.forEachDestructuringIdentifier=h,t.forEachDeclaredVariable=function(e,t){var n,i=r(e.declarations);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=void 0;if(o=a.name.kind===ko.SyntaxKind.Identifier?t(a):h(a.name,t))return o}}catch(s){i.e(s)}finally{i.f()}},function(e){e[e.Var=0]="Var",e[e.Let=1]="Let",e[e.Const=2]="Const"}(t.VariableDeclarationKind||(t.VariableDeclarationKind={})),t.getVariableDeclarationKind=function(e){return e.flags&ko.NodeFlags.Let?1:e.flags&ko.NodeFlags.Const?2:0},t.isBlockScopedVariableDeclarationList=g,t.isBlockScopedVariableDeclaration=function(e){var t=e.parent;return t.kind===ko.SyntaxKind.CatchClause||g(t)},t.isBlockScopedDeclarationStatement=function(e){switch(e.kind){case ko.SyntaxKind.VariableStatement:return g(e.declarationList);case ko.SyntaxKind.ClassDeclaration:case ko.SyntaxKind.EnumDeclaration:case ko.SyntaxKind.InterfaceDeclaration:case ko.SyntaxKind.TypeAliasDeclaration:return!0;default:return!1}},t.isInSingleStatementContext=function(e){switch(e.parent.kind){case ko.SyntaxKind.ForStatement:case ko.SyntaxKind.ForInStatement:case ko.SyntaxKind.ForOfStatement:case ko.SyntaxKind.WhileStatement:case ko.SyntaxKind.DoStatement:case ko.SyntaxKind.IfStatement:case ko.SyntaxKind.WithStatement:case ko.SyntaxKind.LabeledStatement:return!0;default:return!1}},function(e){e[e.None=0]="None",e[e.Function=1]="Function",e[e.Block=2]="Block",e[e.Type=4]="Type",e[e.ConditionalType=8]="ConditionalType"}(t.ScopeBoundary||(t.ScopeBoundary={})),function(e){e[e.Function=1]="Function",e[e.Block=3]="Block",e[e.Type=7]="Type",e[e.InferType=8]="InferType"}(t.ScopeBoundarySelector||(t.ScopeBoundarySelector={})),t.isScopeBoundary=function(e){return _(e)||v(e)||m(e)},t.isTypeScopeBoundary=m,t.isFunctionScopeBoundary=_,t.isBlockScopeBoundary=v,t.hasOwnThisReference=function(e){switch(e.kind){case ko.SyntaxKind.ClassDeclaration:case ko.SyntaxKind.ClassExpression:case ko.SyntaxKind.FunctionExpression:return!0;case ko.SyntaxKind.FunctionDeclaration:return void 0!==e.body;case ko.SyntaxKind.MethodDeclaration:case ko.SyntaxKind.GetAccessor:case ko.SyntaxKind.SetAccessor:return e.parent.kind===ko.SyntaxKind.ObjectLiteralExpression;default:return!1}},t.isFunctionWithBody=function(e){switch(e.kind){case ko.SyntaxKind.GetAccessor:case ko.SyntaxKind.SetAccessor:case ko.SyntaxKind.FunctionDeclaration:case ko.SyntaxKind.MethodDeclaration:case ko.SyntaxKind.Constructor:return void 0!==e.body;case ko.SyntaxKind.FunctionExpression:case ko.SyntaxKind.ArrowFunction:return!0;default:return!1}},t.forEachToken=y,t.forEachTokenWithTrivia=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getSourceFile(),r=n.text,i=ko.createScanner(n.languageVersion,!1,n.languageVariant,r);return y(e,(function(e){var a=e.kind===ko.SyntaxKind.JsxText||e.pos===e.end?e.pos:e.getStart(n);if(a!==e.pos){i.setTextPos(e.pos);for(var o=i.scan(),s=i.getTokenPos();s2&&void 0!==arguments[2]?arguments[2]:e.getSourceFile(),r=n.text,i=n.languageVariant!==ko.LanguageVariant.JSX;return y(e,(function(e){if(e.pos!==e.end)return e.kind!==ko.SyntaxKind.JsxText&&ko.forEachLeadingCommentRange(r,0===e.pos?(ko.getShebang(r)||"").length:e.pos,a),i||function(e){switch(e.kind){case ko.SyntaxKind.CloseBraceToken:return e.parent.kind!==ko.SyntaxKind.JsxExpression||!b(e.parent.parent);case ko.SyntaxKind.GreaterThanToken:switch(e.parent.kind){case ko.SyntaxKind.JsxOpeningElement:return e.end!==e.parent.end;case ko.SyntaxKind.JsxOpeningFragment:return!1;case ko.SyntaxKind.JsxSelfClosingElement:return e.end!==e.parent.end||!b(e.parent.parent);case ko.SyntaxKind.JsxClosingElement:case ko.SyntaxKind.JsxClosingFragment:return!b(e.parent.parent.parent)}}return!0}(e)?ko.forEachTrailingCommentRange(r,e.end,a):void 0}),n);function a(e,n,i){t(r,{pos:e,end:n,kind:i})}},t.getLineRanges=function(e){for(var t=e.getLineStarts(),n=[],r=t.length,i=e.text,a=0,o=1;oa&&ko.isLineBreak(i.charCodeAt(u-1));--u);n.push({pos:a,end:s,contentLength:u-a}),a=s}return n.push({pos:a,end:e.end,contentLength:e.end-a}),n},t.getLineBreakStyle=function(e){var t=e.getLineStarts();return 1===t.length||t[1]<2||"\r"!==e.text[t[1]-2]?"\n":"\r\n"},t.isValidIdentifier=function(e){var t=E(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:ko.ScriptTarget.Latest);return t.isIdentifier()&&t.getTextPos()===e.length&&0===t.getTokenPos()},t.isValidPropertyAccess=S,t.isValidPropertyName=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ko.ScriptTarget.Latest;if(S(e,t))return!0;var n=E(e,t);return n.getTextPos()===e.length&&n.getToken()===ko.SyntaxKind.NumericLiteral&&n.getTokenValue()===e},t.isValidNumericLiteral=function(e){var t=E(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:ko.ScriptTarget.Latest);return t.getToken()===ko.SyntaxKind.NumericLiteral&&t.getTextPos()===e.length&&0===t.getTokenPos()},t.isValidJsxIdentifier=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ko.ScriptTarget.Latest;if(0===e.length)return!1;var n=e.codePointAt(0);if(!ko.isIdentifierStart(n,t))return!1;for(var r=C(n);r2&&void 0!==arguments[2]?arguments[2]:e.getSourceFile();if(A(e)&&e.kind!==ko.SyntaxKind.EndOfFileToken){var r=O(e,n);if(0!==r.length||!t)return r}return N(e,n,t)},function(e){e[e.ImportDeclaration=1]="ImportDeclaration",e[e.ImportEquals=2]="ImportEquals",e[e.ExportFrom=4]="ExportFrom",e[e.DynamicImport=8]="DynamicImport",e[e.Require=16]="Require",e[e.ImportType=32]="ImportType",e[e.All=63]="All",e[e.AllImports=59]="AllImports",e[e.AllStaticImports=3]="AllStaticImports",e[e.AllImportExpressions=24]="AllImportExpressions",e[e.AllRequireLike=18]="AllRequireLike",e[e.AllNestedImports=56]="AllNestedImports",e[e.AllTopLevelImports=7]="AllTopLevelImports"}(t.ImportKind||(t.ImportKind={})),t.findImports=function(e,t){var n,i=[],a=r(I(e,t));try{for(a.s();!(n=a.n()).done;){var o=n.value;switch(o.kind){case ko.SyntaxKind.ImportDeclaration:s(o.moduleSpecifier);break;case ko.SyntaxKind.ImportEqualsDeclaration:s(o.moduleReference.expression);break;case ko.SyntaxKind.ExportDeclaration:s(o.moduleSpecifier);break;case ko.SyntaxKind.CallExpression:s(o.arguments[0]);break;case ko.SyntaxKind.ImportType:bs.isLiteralTypeNode(o.argument)&&s(o.argument.literal);break;default:throw new Error("unexpected node")}}}catch(u){a.e(u)}finally{a.f()}return i;function s(e){bs.isTextualLiteral(e)&&i.push(e)}},t.findImportLikeNodes=I;var F=function(){function e(t,n){s(this,e),this._sourceFile=t,this._options=n,this._result=[]}return u(e,[{key:"find",value:function(){return this._sourceFile.isDeclarationFile&&(this._options&=-25),7&this._options&&this._findImports(this._sourceFile.statements),56&this._options&&this._findNestedImports(),this._result}},{key:"_findImports",value:function(e){var t,n=r(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;bs.isImportDeclaration(i)?1&this._options&&this._result.push(i):bs.isImportEqualsDeclaration(i)?2&this._options&&i.moduleReference.kind===ko.SyntaxKind.ExternalModuleReference&&this._result.push(i):bs.isExportDeclaration(i)?void 0!==i.moduleSpecifier&&4&this._options&&this._result.push(i):bs.isModuleDeclaration(i)&&this._findImportsInModule(i)}}catch(a){n.e(a)}finally{n.f()}}},{key:"_findImportsInModule",value:function(e){if(void 0!==e.body)return e.body.kind===ko.SyntaxKind.ModuleDeclaration?this._findImportsInModule(e.body):void this._findImports(e.body.statements)}},{key:"_findNestedImports",value:function(){var e;e=16==(56&this._options)?/\brequire\s*[1&&void 0!==arguments[1]&&arguments[1];s(this,e),this.allVisitorKeys=js.visitorKeys,this.selectors=t,this.setParentPointers=n}return u(e,[{key:"traverse",value:function(e,t){if(null!==(n=e)&&"object"==typeof n&&"string"==typeof n.type){var n;this.setParentPointers&&(e.parent=t),"enter"in this.selectors?this.selectors.enter(e,t):e.type in this.selectors&&this.selectors[e.type](e,t);var i=function(e,t){var n=e[t.type];return null!=n?n:[]}(this.allVisitorKeys,e);if(!(i.length<1)){var a,o=r(i);try{for(o.s();!(a=o.n()).done;){var s=e[a.value];if(Array.isArray(s)){var u,c=r(s);try{for(c.s();!(u=c.n()).done;){var l=u.value;this.traverse(l,e)}}catch(nu){c.e(nu)}finally{c.f()}}else this.traverse(s,e)}}catch(nu){o.e(nu)}finally{o.f()}}}}}]),e}();t.simpleTraverse=function(e,t){new n(t,arguments.length>2&&void 0!==arguments[2]&&arguments[2]).traverse(e,void 0)}})),Vs=c((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.astConverter=void 0,t.astConverter=function(e,t,n){var r=e.parseDiagnostics;if(r.length)throw us.convertError(r[0]);var i=new us.Converter(e,{errorOnUnknownASTType:t.errorOnUnknownASTType||!1,useJSXTextNode:t.useJSXTextNode||!1,shouldPreserveNodeMaps:n}),a=i.convertProgram();return t.range&&t.loc||Us.simpleTraverse(a,{enter:function(e){t.range||delete e.range,t.loc||delete e.loc}}),t.tokens&&(a.tokens=os.convertTokens(e)),t.comment&&(a.comments=As.convertComments(e,t.code)),{estree:a,astMaps:i.getASTMaps()}}})),zs=c((function(e,t){var r=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=n&&n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getTsconfigPath=t.getScriptKind=t.getCanonicalFileName=t.ensureAbsolutePath=t.createDefaultCompilerOptionsFromExtra=t.canonicalDirname=void 0;var s=o(Co),u=a(ko),c={allowNonTsExtensions:!0,allowJs:!0,checkJs:!0,noEmit:!0,noUnusedLocals:!0,noUnusedParameters:!0};t.createDefaultCompilerOptionsFromExtra=function(e){return e.debugLevel.has("typescript")?Object.assign(Object.assign({},c),{extendedDiagnostics:!0}):c};var l=void 0===u.sys||u.sys.useCaseSensitiveFileNames?function(e){return e}:function(e){return e.toLowerCase()};function d(e){var t=s.default.normalize(e);return t.endsWith(s.default.sep)&&(t=t.substr(0,t.length-1)),l(t)}function p(e,t){return s.default.isAbsolute(e)?e:s.default.join(t.tsconfigRootDir||Q.cwd(),e)}t.getCanonicalFileName=d,t.ensureAbsolutePath=p,t.getTsconfigPath=function(e,t){return d(p(e,t))},t.canonicalDirname=function(e){return s.default.dirname(e)},t.getScriptKind=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.filePath;switch(s.default.extname(t).toLowerCase()){case".ts":return u.ScriptKind.TS;case".tsx":return u.ScriptKind.TSX;case".js":return u.ScriptKind.JS;case".jsx":return u.ScriptKind.JSX;case".json":return u.ScriptKind.JSON;default:return e.jsx?u.ScriptKind.TSX:u.ScriptKind.TS}}})),Hs=c((function(e,t){var r=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=n&&n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createDefaultProgram=void 0;var s=o(vr),u=o(Co),c=a(ko),l=s.default("typescript-eslint:typescript-estree:createDefaultProgram");t.createDefaultProgram=function(e,t){if(l("Getting default program for: %s",t.filePath||"unnamed file"),t.projects&&1===t.projects.length){var n=zs.getTsconfigPath(t.projects[0],t),r=c.getParsedCommandLineOfConfigFile(n,zs.createDefaultCompilerOptionsFromExtra(t),Object.assign(Object.assign({},c.sys),{onUnRecoverableConfigFileDiagnostic:function(){}}));if(r){var i=c.createCompilerHost(r.options,!0),a=i.readFile;i.readFile=function(n){return u.default.normalize(n)===u.default.normalize(t.filePath)?e:a(n)};var o=c.createProgram([t.filePath],r.options,i),s=o.getSourceFile(t.filePath);return s&&{ast:s,program:o}}}}})),Ws=c((function(e,t){var r=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=n&&n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createIsolatedProgram=void 0;var s=o(vr),u=a(ko),c=s.default("typescript-eslint:typescript-estree:createIsolatedProgram");t.createIsolatedProgram=function(e,t){c("Getting isolated program in %s mode for: %s",t.jsx?"TSX":"TS",t.filePath);var n={fileExists:function(){return!0},getCanonicalFileName:function(){return t.filePath},getCurrentDirectory:function(){return""},getDirectories:function(){return[]},getDefaultLibFileName:function(){return"lib.d.ts"},getNewLine:function(){return"\n"},getSourceFile:function(n){return u.createSourceFile(n,e,u.ScriptTarget.Latest,!0,zs.getScriptKind(t,n))},readFile:function(){},useCaseSensitiveFileNames:function(){return!0},writeFile:function(){return null}},r=u.createProgram([t.filePath],Object.assign({noResolve:!0,target:u.ScriptTarget.Latest,jsx:t.jsx?u.JsxEmit.Preserve:void 0},zs.createDefaultCompilerOptionsFromExtra(t)),n),i=r.getSourceFile(t.filePath);if(!i)throw new Error("Expected an ast to be returned for the single-file isolated program.");return{ast:i,program:r}}})),Ks=c((function(e,t){var i=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=n&&n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},u=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getProgramsForProjects=t.createWatchProgram=t.clearCaches=void 0;var c=u(vr),l=u(So),d=u(Fi),p=s(ko),f=c.default("typescript-eslint:typescript-estree:createWatchProgram"),h=new Map,g=new Map,m=new Map,_=new Map,v=new Map,y=new Map;function b(e){return function(t,n){var r=zs.getCanonicalFileName(t),i=function(){var t=e.get(r);return t||(t=new Set,e.set(r,t)),t}();return i.add(n),{close:function(){i.delete(n)}}}}t.clearCaches=function(){h.clear(),g.clear(),m.clear(),y.clear(),_.clear(),v.clear()};var D={code:"",filePath:""};function E(e){throw new Error(p.flattenDiagnosticMessageText(e.messageText,p.sys.newLine))}function C(e){var t;return(null===(t=p.sys)||void 0===t?void 0:t.createHash)?p.sys.createHash(e):e}function S(e,t,n){var r=n.EXPERIMENTAL_useSourceOfProjectReferenceRedirect?new Set(t.getSourceFiles().map((function(e){return zs.getCanonicalFileName(e.fileName)}))):new Set(t.getRootFileNames().map((function(e){return zs.getCanonicalFileName(e)})));return _.set(e,r),r}t.getProgramsForProjects=function(e,t,n){var i=zs.getCanonicalFileName(t),o=[];D.code=e,D.filePath=i;var s=g.get(i),u=C(e);y.get(i)!==u&&s&&s.size>0&&s.forEach((function(e){return e(i,p.FileWatcherEventKind.Changed)}));var c,l=r(h.entries());try{for(l.s();!(c=l.n()).done;){var d=a(c.value,2),m=d[0],v=d[1],b=_.get(m),E=null;if(b||(b=S(m,E=v.getProgram().getProgram(),n)),b.has(i))return f("Found existing program for file. %s",i),(E=null!=E?E:v.getProgram().getProgram()).getTypeChecker(),[E]}}catch(nu){l.e(nu)}finally{l.f()}f("File did not belong to any existing programs, moving to create/update. %s",i);var x,w=r(n.projects);try{for(w.s();!(x=w.n()).done;){var A=x.value,O=zs.getTsconfigPath(A,n),N=h.get(O);if(N){var I=T(N,i,O);if(!I)continue;if(I.getTypeChecker(),S(O,I,n).has(i))return f("Found updated program for file. %s",i),[I];o.push(I)}else{var F=k(O,n);h.set(O,F);var L=F.getProgram().getProgram();if(L.getTypeChecker(),S(O,L,n).has(i))return f("Found program for file. %s",i),[L];o.push(L)}}}catch(nu){w.e(nu)}finally{w.f()}return o};var x=d.default.satisfies(p.version,">=3.9.0-beta",{includePrerelease:!0});function k(e,t){f("Creating watch program for %s.",e);var n=p.createWatchCompilerHost(e,zs.createDefaultCompilerOptionsFromExtra(t),p.sys,p.createAbstractBuilder,E,(function(){})),r=n.readFile;n.readFile=function(e,t){var n=zs.getCanonicalFileName(e),i=n===D.filePath?D.code:r(n,t);return void 0!==i&&y.set(n,C(i)),i},n.onUnRecoverableConfigFileDiagnostic=E,n.afterProgramCreate=function(e){var t=e.getConfigFileParsingDiagnostics().filter((function(e){return e.category===p.DiagnosticCategory.Error&&18003!==e.code}));t.length>0&&E(t[0])},n.watchFile=b(g),n.watchDirectory=b(m);var i,a=n.onCachedDirectoryStructureHostCreate;n.onCachedDirectoryStructureHostCreate=function(e){var n=e.readDirectory;e.readDirectory=function(e,r,i,a,o){return n(e,r?r.concat(t.extraFileExtensions):void 0,i,a,o)},a(e)},n.extraFileExtensions=t.extraFileExtensions.map((function(e){return{extension:e,isMixedContent:!0,scriptKind:p.ScriptKind.Deferred}})),n.trace=f,n.useSourceOfProjectReferenceRedirect=function(){return t.EXPERIMENTAL_useSourceOfProjectReferenceRedirect},x?(n.setTimeout=void 0,n.clearTimeout=void 0):(f("Running without timeout fix"),n.setTimeout=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;aNumber.EPSILON})(n)&&(f("tsconfig has changed - triggering program update. %s",n),g.get(n).forEach((function(e){return e(n,p.FileWatcherEventKind.Changed)})),_.delete(n));var i=r.getSourceFile(t);if(i)return r;f("File was not found in program - triggering folder update. %s",t);for(var a=zs.canonicalDirname(t),o=null,s=a,u=!1;o!==s;){o=s;var c=m.get(o);c&&(c.forEach((function(e){a!==o&&e(a,p.FileWatcherEventKind.Changed),e(o,p.FileWatcherEventKind.Changed)})),u=!0),s=zs.canonicalDirname(o)}if(!u)return f("No callback found for file, not part of this program. %s",t),null;if(_.delete(n),i=(r=e.getProgram().getProgram()).getSourceFile(t))return r;f("File was still not found in program after directory update - checking file deletions. %s",t);var d=r.getRootFileNames().find((function(e){return!l.default.existsSync(e)}));if(!d)return null;var h=g.get(zs.getCanonicalFileName(d));return h?(f("Marking file as deleted. %s",d),h.forEach((function(e){return e(d,p.FileWatcherEventKind.Deleted)})),_.delete(n),(i=(r=e.getProgram().getProgram()).getSourceFile(t))?r:(f("File was still not found in program after deletion check, assuming it is not part of this program. %s",t),null)):(f("Could not find watch callbacks for root file. %s",d),r)}t.createWatchProgram=k})),qs=c((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createProjectProgram=void 0;var i=r(vr),a=r(Co),o=i.default("typescript-eslint:typescript-estree:createProjectProgram"),s=[".ts",".tsx",".js",".jsx"];function u(e){return e?e.endsWith(".d.ts")?".d.ts":a.default.extname(e):null}t.createProjectProgram=function(e,t,n){o("Creating project program for: %s",n.filePath);var r=os.firstDefined(Ks.getProgramsForProjects(e,n.filePath,n),(function(e){var t=e.getSourceFile(n.filePath);if(u(n.filePath)===u(null==t?void 0:t.fileName))return t&&{ast:t,program:e}}));if(!r&&!t){var i=['"parserOptions.project" has been set for @typescript-eslint/parser.',"The file does not match your project config: ".concat(a.default.relative(n.tsconfigRootDir||Q.cwd(),n.filePath),".")],c=!1,l=n.extraFileExtensions||[];l.forEach((function(e){e.startsWith(".")||i.push('Found unexpected extension "'.concat(e,'" specified with the "extraFileExtensions" option. Did you mean ".').concat(e,'"?')),s.includes(e)&&i.push('You unnecessarily included the extension "'.concat(e,'" with the "extraFileExtensions" option. This extension is already handled by the parser by default.'))}));var d=a.default.extname(n.filePath);if(!s.includes(d)){var p="The extension for the file (".concat(d,") is non-standard");l.length>0?l.includes(d)||(i.push("".concat(p,'. It should be added to your existing "parserOptions.extraFileExtensions".')),c=!0):(i.push("".concat(p,'. You should add "parserOptions.extraFileExtensions" to your config.')),c=!0)}throw c||i.push("The file must be included in at least one of the projects provided."),new Error(i.join("\n"))}return r}})),Gs=c((function(e,t){var r=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=n&&n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createSourceFile=void 0;var s=o(vr),u=a(ko),c=s.default("typescript-eslint:typescript-estree:createSourceFile");t.createSourceFile=function(e,t){return c("Getting AST without type information in %s mode for: %s",t.jsx?"TSX":"TS",t.filePath),u.createSourceFile(t.filePath,e,u.ScriptTarget.Latest,!0,zs.getScriptKind(t))}})),Ys=c((function(e,t){var r=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=n&&n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getFirstSemanticOrSyntacticError=void 0;var o=a(ko);function s(e){return e.filter((function(e){switch(e.code){case 1013:case 1014:case 1044:case 1045:case 1048:case 1049:case 1070:case 1071:case 1085:case 1090:case 1096:case 1097:case 1098:case 1099:case 1117:case 1121:case 1123:case 1141:case 1162:case 1164:case 1172:case 1173:case 1175:case 1176:case 1190:case 1196:case 1200:case 1206:case 1211:case 1242:case 1246:case 1255:case 1308:case 2364:case 2369:case 2452:case 2462:case 8017:case 17012:case 17013:return!0}return!1}))}function u(e){return Object.assign(Object.assign({},e),{message:o.flattenDiagnosticMessageText(e.messageText,o.sys.newLine)})}t.getFirstSemanticOrSyntacticError=function(e,t){try{var n=s(e.getSyntacticDiagnostics(t));if(n.length)return u(n[0]);var r=s(e.getSemanticDiagnostics(t));return r.length?u(r[0]):void 0}catch(e){return void console.warn('Warning From TSC: "'.concat(e.message))}}})),Js=c((function(e,t){var r=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=n&&n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},o=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseWithNodeMaps=t.parseAndGenerateServices=t.parse=void 0;var s,u=o(vr),c=(o(Er),o(Fi)),l=a(ko),d=(u.default("typescript-eslint:typescript-estree:parser"),">=3.3.1 <4.2.0"),p=l.version,f=c.default.satisfies(p,[d].concat(["4.1.1-rc","4.1.0-beta"]).join(" || ")),h=!1;function g(e){return"string"!=typeof e?String(e):e}function m(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).jsx?"estree.tsx":"estree.ts"}function _(){s={code:"",comment:!1,comments:[],createDefaultProgram:!1,debugLevel:new Set,errorOnTypeScriptSyntacticAndSemanticIssues:!1,errorOnUnknownASTType:!1,EXPERIMENTAL_useSourceOfProjectReferenceRedirect:!1,extraFileExtensions:[],filePath:m(),jsx:!1,loc:!1,log:console.log,preserveNodeMaps:!0,projects:[],range:!1,strict:!1,tokens:null,tsconfigRootDir:Q.cwd(),useJSXTextNode:!1}}function v(e){var t;if(!0===e.debugLevel?s.debugLevel=new Set(["typescript-eslint"]):Array.isArray(e.debugLevel)&&(s.debugLevel=new Set(e.debugLevel)),s.debugLevel.size>0){var n=[];s.debugLevel.has("typescript-eslint")&&n.push("typescript-eslint:*"),(s.debugLevel.has("eslint")||u.default.enabled("eslint:*,-eslint:code-path"))&&n.push("eslint:*,-eslint:code-path"),u.default.enable(n.join(","))}s.range="boolean"==typeof e.range&&e.range,s.loc="boolean"==typeof e.loc&&e.loc,"boolean"==typeof e.tokens&&e.tokens&&(s.tokens=[]),"boolean"==typeof e.comment&&e.comment&&(s.comment=!0,s.comments=[]),"boolean"==typeof e.jsx&&e.jsx&&(s.jsx=!0),"string"==typeof e.filePath&&""!==e.filePath?s.filePath=e.filePath:s.filePath=m(s),"boolean"==typeof e.useJSXTextNode&&e.useJSXTextNode&&(s.useJSXTextNode=!0),"boolean"==typeof e.errorOnUnknownASTType&&e.errorOnUnknownASTType&&(s.errorOnUnknownASTType=!0),"function"==typeof e.loggerFn?s.log=e.loggerFn:!1===e.loggerFn&&(s.log=function(){}),"string"==typeof e.tsconfigRootDir&&(s.tsconfigRootDir=e.tsconfigRootDir),s.filePath=zs.ensureAbsolutePath(s.filePath,s),(null!==(t=e.projectFolderIgnoreList)&&void 0!==t?t:[]).reduce((function(e,t){return"string"==typeof t&&e.push(t),e}),[]).map((function(e){return e.startsWith("!")?e:"!".concat(e)})),s.projects=[]||!1,Array.isArray(e.extraFileExtensions)&&e.extraFileExtensions.every((function(e){return"string"==typeof e}))&&(s.extraFileExtensions=e.extraFileExtensions),"boolean"==typeof e.preserveNodeMaps&&(s.preserveNodeMaps=e.preserveNodeMaps),s.createDefaultProgram="boolean"==typeof e.createDefaultProgram&&e.createDefaultProgram,s.EXPERIMENTAL_useSourceOfProjectReferenceRedirect="boolean"==typeof e.EXPERIMENTAL_useSourceOfProjectReferenceRedirect&&e.EXPERIMENTAL_useSourceOfProjectReferenceRedirect}function y(){var e;if(!f&&!h){if(void 0!==typeof Q&&(null===(e=Q.stdout)||void 0===e?void 0:e.isTTY)){var t="=============",n=[t,"WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.","You may find that it works just fine, or you may not.","SUPPORTED TYPESCRIPT VERSIONS: ".concat(d),"YOUR TYPESCRIPT VERSION: ".concat(p),"Please only submit bug reports when using the officially supported version.",t];s.log(n.join("\n\n"))}h=!0}}function b(e,t,n){if(_(),null==t?void 0:t.errorOnTypeScriptSyntacticAndSemanticIssues)throw new Error('"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()');e=g(e),s.code=e,void 0!==t&&v(t),y();var r=Gs.createSourceFile(e,s),i=Vs.astConverter(r,s,n),a=i.estree,o=i.astMaps;return{ast:a,esTreeNodeToTSNodeMap:o.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:o.tsNodeToESTreeNodeMap}}t.parse=function(e,t){return b(e,t,!1).ast},t.parseWithNodeMaps=function(e,t){return b(e,t,!0)},t.parseAndGenerateServices=function(e,t){_(),e=g(e),s.code=e,void 0!==t&&(v(t),"boolean"==typeof t.errorOnTypeScriptSyntacticAndSemanticIssues&&t.errorOnTypeScriptSyntacticAndSemanticIssues&&(s.errorOnTypeScriptSyntacticAndSemanticIssues=!0)),y();var n=s.projects&&s.projects.length>0,r=function(e,t,n){return t&&qs.createProjectProgram(e,n,s)||t&&n&&Hs.createDefaultProgram(e,s)||Ws.createIsolatedProgram(e,s)}(e,n,s.createDefaultProgram),i=r.ast,a=r.program,o="boolean"!=typeof s.preserveNodeMaps||s.preserveNodeMaps,u=Vs.astConverter(i,s,o),c=u.estree,l=u.astMaps;if(a&&s.errorOnTypeScriptSyntacticAndSemanticIssues){var d=Ys.getFirstSemanticOrSyntacticError(a,i);if(d)throw us.convertError(d)}return{ast:c,services:{hasFullTypeInformation:n,program:a,esTreeNodeToTSNodeMap:l.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:l.tsNodeToESTreeNodeMap}}}})),$s="4.8.1",Qs=c((function(e,t){var r=n&&n.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=n&&n.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.visitorKeys=t.clearCaches=t.simpleTraverse=void 0,i(Js,t),Object.defineProperty(t,"simpleTraverse",{enumerable:!0,get:function(){return Us.simpleTraverse}}),i(as,t),Object.defineProperty(t,"clearCaches",{enumerable:!0,get:function(){return Ks.clearCaches}}),Object.defineProperty(t,"visitorKeys",{enumerable:!0,get:function(){return js.visitorKeys}}),t.version=$s})),Xs=rt.hasPragma,Zs=st.locStart,eu=st.locEnd;function tu(e,t){return(0,Qs.parseWithNodeMaps)(e,{loc:!0,range:!0,comment:!0,useJSXTextNode:!0,jsx:t,tokens:!0,loggerFn:!1,project:[]})}return{parsers:{typescript:{parse:function(t,n,r){var i,a=function(e){return new RegExp(["(^[^\"'`]*)"].join(""),"m").test(e)}(t);try{i=tu(t,a)}catch(n){try{i=tu(t,!a)}catch(t){var o=n.message,s=n.lineNumber,u=n.column;if("number"!=typeof s)throw n;throw e(o,{start:{line:s,column:u+1}})}}return $n(i.ast,Object.assign({},r,{originalText:t,tsParseResult:i}))},astFormat:"estree",hasPragma:Xs,locStart:Zs,locEnd:eu}}}}()}).call(this,n(163))},function(e,t,n){(function(t){var r=n(230),i=n(175),a=n(282),o=n(231),s=n(193),u=n(155),c=n(124),l=n(133),d=n(232),p=n(165),f=n(88),h=n(93);e.exports=function(){"use strict";var e=function(e,t){var n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n},n={isPragma:function(e){return/^\s*@(prettier|format)\s*$/.test(e)},hasPragma:function(e){return/^\s*#[^\S\n]*@(prettier|format)\s*?(\n|$)/.test(e)},insertPragma:function(e){return"# @format\n\n".concat(e)}},g={locStart:function(e){return e.position.start.offset},locEnd:function(e){return e.position.end.offset}};function m(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var _=function(e,t){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},v=function(){return(v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function D(e){return this instanceof D?(this.v=e,this):new D(e)}var E=Object.freeze({__proto__:null,__extends:function(e,t){function n(){this.constructor=e}_(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return v},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof D?Promise.resolve(n.value.v).then(u,c):l(a[0][2],n)}catch(e){l(a[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:D(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}}),C=m((function(e,t){var n="\n",r=function(){function e(e){this.string=e;for(var t=[0],r=0;rthis.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;return{line:t,column:e-n[t]}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}();t.__esModule=!0,t.default=r})),S=m((function(e,t){t.__esModule=!0,t.defineParents=function e(t,n){void 0===n&&(n=null),"children"in t&&t.children.forEach((function(n){return e(n,t)})),"anchor"in t&&t.anchor&&e(t.anchor,t),"tag"in t&&t.tag&&e(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach((function(n){return e(n,t)})),"middleComments"in t&&t.middleComments.forEach((function(n){return e(n,t)})),"indicatorComment"in t&&t.indicatorComment&&e(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&e(t.trailingComment,t),"endComments"in t&&t.endComments.forEach((function(n){return e(n,t)})),Object.defineProperty(t,"_parent",{value:n,enumerable:!1})}})),x=m((function(e,t){t.__esModule=!0,t.getPointText=function(e){return e.line+":"+e.column}})),k=m((function(e,t){function n(e,t){if(t.position.start.offset!==t.position.end.offset){if("leadingComments"in t){var r=t.position.start,i=e[r.line-1].leadingAttachableNode;(!i||r.column1&&"document"!==t.type&&"documentHead"!==t.type){var a=t.position.end,o=e[a.line-1].trailingAttachableNode;(!o||a.column>=o.position.end.column)&&(e[a.line-1].trailingAttachableNode=t)}if("root"!==t.type&&"document"!==t.type&&"documentHead"!==t.type&&"documentBody"!==t.type)for(var s=t.position,u=(r=s.start,0),c=[(a=s.end).line].concat(r.line===a.line?[]:r.line);u=d.position.end.column)&&(e[l-1].trailingNode=t)}"children"in t&&t.children.forEach((function(t){n(e,t)}))}}function r(e,t){if(e.position.start.offsett.position.end.offset)switch(e.type){case"flowMapping":case"flowSequence":return 0===e.children.length||t.position.start.line>e.children[e.children.length-1].position.end.line}if(t.position.end.offsete.position.start.column;case"mappingKey":case"mappingValue":return t.position.start.column>e._parent.position.start.column&&(0===e.children.length||1===e.children.length&&"blockFolded"!==e.children[0].type&&"blockLiteral"!==e.children[0].type)&&("mappingValue"===e.type||i(e));default:return!1}}function i(e){return e.position.start!==e.position.end&&(0===e.children.length||e.position.start.offset!==e.children[0].position.start.offset)}t.__esModule=!0,t.attachComments=function(e){S.defineParents(e);var t=function(e){for(var t=Array.from(new Array(e.position.end.line),(function(){return{}})),r=0,i=e.comments;r1&&e.position.start.line>a[0].position.end.line;)a.shift();!function(e,t,n){var a=e.position.start.line,o=t[a-1].trailingAttachableNode;if(o){if(o.trailingComment)throw new Error("Unexpected multiple trailing comment at "+x.getPointText(e.position.start));return S.defineParents(e,o),void(o.trailingComment=e)}for(var s=a;s>=n.position.start.line;s--){var u=t[s-1].trailingNode,c=void 0;if(u)c=u;else{if(s===a||!t[s-1].comment)continue;c=t[s-1].comment._parent}if("sequence"!==c.type&&"mapping"!==c.type||(c=c.children[0]),"mappingItem"===c.type){var l=c.children,d=l[0],p=l[1];c=i(d)?d:p}for(;;){if(r(c,e))return S.defineParents(e,c),void c.endComments.push(e);if(!c._parent)break;c=c._parent}break}for(s=a+1;s<=n.position.end.line;s++){var f=t[s-1].leadingAttachableNode;if(f)return S.defineParents(e,f),void f.leadingComments.push(e)}var h=n.children[1];S.defineParents(e,h),h.endComments.push(e)}(e,t,a[0])}))}})),T=m((function(e,t){t.__esModule=!0,t.createNode=function(e,t){return{type:e,position:t}}})),w=m((function(e,t){t.__esModule=!0,t.createRoot=function(e,t,n){return E.__assign(E.__assign({},T.createNode("root",e)),{children:t,comments:n})}})),A=m((function(e,t){t.__esModule=!0,t.removeCstBlankLine=function e(t){switch(t.type){case"DOCUMENT":for(var n=t.contents.length-1;n>=0;n--)"BLANK_LINE"===t.contents[n].type?t.contents.splice(n,1):e(t.contents[n]);for(n=t.directives.length-1;n>=0;n--)"BLANK_LINE"===t.directives[n].type&&t.directives.splice(n,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(n=t.items.length-1;n>=0;n--){var r=t.items[n];"char"in r||("BLANK_LINE"===r.type?t.items.splice(n,1):e(r))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&e(t.node);break;case"ALIAS":case"BLANK_LINE":case"BLOCK_FOLDED":case"BLOCK_LITERAL":case"COMMENT":case"DIRECTIVE":case"PLAIN":case"QUOTE_DOUBLE":case"QUOTE_SINGLE":break;default:throw new Error("Unexpected node type "+JSON.stringify(t.type))}}})),O=m((function(e,t){t.__esModule=!0,t.createLeadingCommentAttachable=function(){return{leadingComments:[]}}})),N=m((function(e,t){t.__esModule=!0,t.createTrailingCommentAttachable=function(e){return void 0===e&&(e=null),{trailingComment:e}}})),I=m((function(e,t){t.__esModule=!0,t.createCommentAttachable=function(){return E.__assign(E.__assign({},O.createLeadingCommentAttachable()),N.createTrailingCommentAttachable())}})),F=m((function(e,t){t.__esModule=!0,t.createAlias=function(e,t,n){return E.__assign(E.__assign(E.__assign(E.__assign({},T.createNode("alias",e)),I.createCommentAttachable()),t),{value:n})}})),L=m((function(e,t){t.__esModule=!0,t.transformAlias=function(e,t){var n=e.cstNode;return F.createAlias(t.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),t.transformContent(e),n.rawValue)}})),P=m((function(e,t){t.__esModule=!0,t.createBlockFolded=function(e){return E.__assign(E.__assign({},e),{type:"blockFolded"})}})),R=m((function(e,t){t.__esModule=!0,t.createBlockValue=function(e,t,n,r,i,a){return E.__assign(E.__assign(E.__assign(E.__assign({},T.createNode("blockValue",e)),O.createLeadingCommentAttachable()),t),{chomping:n,indent:r,value:i,indicatorComment:a})}})),M=m((function(e,t){t.__esModule=!0,function(e){e.Tag="!",e.Anchor="&",e.Comment="#"}(t.PropLeadingCharacter||(t.PropLeadingCharacter={}))})),B=m((function(e,t){t.__esModule=!0,t.createAnchor=function(e,t){return E.__assign(E.__assign({},T.createNode("anchor",e)),{value:t})}})),j=m((function(e,t){t.__esModule=!0,t.createComment=function(e,t){return E.__assign(E.__assign({},T.createNode("comment",e)),{value:t})}})),U=m((function(e,t){t.__esModule=!0,t.createContent=function(e,t,n){return{anchor:t,tag:e,middleComments:n}}})),V=m((function(e,t){t.__esModule=!0,t.createTag=function(e,t){return E.__assign(E.__assign({},T.createNode("tag",e)),{value:t})}})),z=m((function(e,t){t.__esModule=!0,t.transformContent=function(e,t,n){void 0===n&&(n=function(){return!1});for(var r=e.cstNode,i=[],a=null,o=null,s=null,u=0,c=r.props;u=0;u--){var c=e.contents[u];if("COMMENT"===c.type){var l=t.transformNode(c);n&&n.line===l.position.start.line?o.unshift(l):s?r.unshift(l):l.position.start.offset>=e.valueRange.origEnd?a.unshift(l):r.unshift(l)}else s=!0}if(a.length>1)throw new Error("Unexpected multiple document trailing comments at "+x.getPointText(a[1].position.start));if(o.length>1)throw new Error("Unexpected multiple documentHead trailing comments at "+x.getPointText(o[1].position.start));return{comments:r,endComments:i,documentTrailingComment:te.getLast(a)||null,documentHeadTrailingComment:te.getLast(o)||null}}(i,t,n),o=a.comments,s=a.endComments,u=a.documentTrailingComment,c=a.documentHeadTrailingComment,l=t.transformNode(e.contents),d=function(e,t,n){var r=ne.getMatchIndex(n.text.slice(e.valueRange.origEnd),/^\.\.\./),i=-1===r?e.valueRange.origEnd:Math.max(0,e.valueRange.origEnd-1);"\r"===n.text[i-1]&&i--;var a=n.transformRange({origStart:null!==t?t.position.start.offset:i,origEnd:i});return{position:a,documentEndPoint:-1===r?a.end:n.transformOffset(e.valueRange.origEnd+3)}}(i,l,t),p=d.position,f=d.documentEndPoint;return(r=t.comments).push.apply(r,E.__spreadArrays(o,s)),{documentBody:ee.createDocumentBody(p,l,s),documentEndPoint:f,documentTrailingComment:u,documentHeadTrailingComment:c}}})),ie=m((function(e,t){t.__esModule=!0,t.createDocumentHead=function(e,t,n,r){return E.__assign(E.__assign(E.__assign(E.__assign({},T.createNode("documentHead",e)),Z.createEndCommentAttachable(n)),N.createTrailingCommentAttachable(r)),{children:t})}})),ae=m((function(e,t){t.__esModule=!0,t.transformDocumentHead=function(e,t){var n,r=e.cstNode,i=function(e,t){for(var n=[],r=[],i=[],a=!1,o=e.directives.length-1;o>=0;o--){var s=t.transformNode(e.directives[o]);"comment"===s.type?a?r.unshift(s):i.unshift(s):(a=!0,n.unshift(s))}return{directives:n,comments:r,endComments:i}}(r,t),a=i.directives,o=i.comments,s=i.endComments,u=function(e,t,n){var r=ne.getMatchIndex(n.text.slice(0,e.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);var i=-1===r?{origStart:e.valueRange.origStart,origEnd:e.valueRange.origStart}:{origStart:r,origEnd:r+3};return 0!==t.length&&(i.origStart=t[0].position.start.offset),{position:n.transformRange(i),endMarkerPoint:-1===r?null:n.transformOffset(r)}}(r,a,t),c=u.position,l=u.endMarkerPoint;return(n=t.comments).push.apply(n,E.__spreadArrays(o,s)),{createDocumentHeadWithTrailingComment:function(e){return e&&t.comments.push(e),ie.createDocumentHead(c,a,s,e)},documentHeadEndMarkerPoint:l}}})),oe=m((function(e,t){t.__esModule=!0,t.transformDocument=function(e,t){var n=ae.transformDocumentHead(e,t),r=n.createDocumentHeadWithTrailingComment,i=n.documentHeadEndMarkerPoint,a=re.transformDocumentBody(e,t,i),o=a.documentBody,s=a.documentEndPoint,u=a.documentTrailingComment,c=r(a.documentHeadTrailingComment);return u&&t.comments.push(u),Q.createDocument(X.createPosition(c.position.start,s),c,o,u)}})),se=m((function(e,t){t.__esModule=!0,t.createFlowCollection=function(e,t,n){return E.__assign(E.__assign(E.__assign(E.__assign(E.__assign({},T.createNode("flowCollection",e)),I.createCommentAttachable()),Z.createEndCommentAttachable()),t),{children:n})}})),ue=m((function(e,t){t.__esModule=!0,t.createFlowMapping=function(e,t,n){return E.__assign(E.__assign({},se.createFlowCollection(e,t,n)),{type:"flowMapping"})}})),ce=m((function(e,t){t.__esModule=!0,t.createFlowMappingItem=function(e,t,n){return E.__assign(E.__assign(E.__assign({},T.createNode("flowMappingItem",e)),O.createLeadingCommentAttachable()),{children:[t,n]})}})),le=m((function(e,t){t.__esModule=!0,t.extractComments=function(e,t){for(var n=[],r=0,i=e;r=0;r--)if(n.test(e[r]))return r;return-1}})),ke=m((function(e,t){t.__esModule=!0,t.transformPlain=function(e,t){var n=e.cstNode;return Se.createPlain(t.transformRange({origStart:n.valueRange.origStart,origEnd:xe.findLastCharIndex(t.text,n.valueRange.origEnd-1,/\S/)+1}),t.transformContent(e),n.strValue)}})),Te=m((function(e,t){t.__esModule=!0,t.createQuoteDouble=function(e){return E.__assign(E.__assign({},e),{type:"quoteDouble"})}})),we=m((function(e,t){t.__esModule=!0,t.createQuoteValue=function(e,t,n){return E.__assign(E.__assign(E.__assign(E.__assign({},T.createNode("quoteValue",e)),t),I.createCommentAttachable()),{value:n})}})),Ae=m((function(e,t){t.__esModule=!0,t.transformAstQuoteValue=function(e,t){var n=e.cstNode;return we.createQuoteValue(t.transformRange(n.valueRange),t.transformContent(e),n.strValue)}})),Oe=m((function(e,t){t.__esModule=!0,t.transformQuoteDouble=function(e,t){return Te.createQuoteDouble(Ae.transformAstQuoteValue(e,t))}})),Ne=m((function(e,t){t.__esModule=!0,t.createQuoteSingle=function(e){return E.__assign(E.__assign({},e),{type:"quoteSingle"})}})),Ie=m((function(e,t){t.__esModule=!0,t.transformQuoteSingle=function(e,t){return Ne.createQuoteSingle(Ae.transformAstQuoteValue(e,t))}})),Fe=m((function(e,t){t.__esModule=!0,t.createSequence=function(e,t,n){return E.__assign(E.__assign(E.__assign(E.__assign(E.__assign({},T.createNode("sequence",e)),O.createLeadingCommentAttachable()),Z.createEndCommentAttachable()),t),{children:n})}})),Le=m((function(e,t){t.__esModule=!0,t.createSequenceItem=function(e,t){return E.__assign(E.__assign(E.__assign(E.__assign({},T.createNode("sequenceItem",e)),I.createCommentAttachable()),Z.createEndCommentAttachable()),{children:t?[t]:[]})}})),Pe=m((function(e,t){t.__esModule=!0,t.transformSeq=function(e,t){var n=le.extractComments(e.cstNode.items,t).map((function(n,r){J.extractPropComments(n,t);var i=t.transformNode(e.items[r]);return Le.createSequenceItem(X.createPosition(t.transformOffset(n.valueRange.origStart),null===i?t.transformOffset(n.valueRange.origStart+1):i.position.end),i)}));return Fe.createSequence(X.createPosition(n[0].position.start,te.getLast(n).position.end),t.transformContent(e),n)}})),Re=m((function(e,t){t.__esModule=!0,t.transformNode=function(e,t){if(null===e||void 0===e.type&&null===e.value)return null;switch(e.type){case"ALIAS":return L.transformAlias(e,t);case"BLOCK_FOLDED":return W.transformBlockFolded(e,t);case"BLOCK_LITERAL":return q.transformBlockLiteral(e,t);case"COMMENT":return G.transformComment(e,t);case"DIRECTIVE":return $.transformDirective(e,t);case"DOCUMENT":return oe.transformDocument(e,t);case"FLOW_MAP":return _e.transformFlowMap(e,t);case"FLOW_SEQ":return be.transformFlowSeq(e,t);case"MAP":return Ce.transformMap(e,t);case"PLAIN":return ke.transformPlain(e,t);case"QUOTE_DOUBLE":return Oe.transformQuoteDouble(e,t);case"QUOTE_SINGLE":return Ie.transformQuoteSingle(e,t);case"SEQ":return Pe.transformSeq(e,t);default:throw new Error("Unexpected node type "+e.type)}}})),Me=m((function(e,t){t.__esModule=!0,t.createError=function(e,t,n){var r=new SyntaxError(e);return r.name="YAMLSyntaxError",r.source=t,r.position=n,r}})),Be=m((function(e,t){t.__esModule=!0,t.transformError=function(e,t){var n=e.source.range||e.source.valueRange;return Me.createError(e.message,t.text,t.transformRange(n))}})),je=m((function(e,t){t.__esModule=!0,t.createPoint=function(e,t,n){return{offset:e,line:t,column:n}}})),Ue=m((function(e,t){t.__esModule=!0,t.transformOffset=function(e,t){e<0?e=0:e>t.text.length&&(e=t.text.length);var n=t.locator.locationForIndex(e);return je.createPoint(e,n.line+1,n.column+1)}})),Ve=m((function(e,t){t.__esModule=!0,t.transformRange=function(e,t){return X.createPosition(t.transformOffset(e.origStart),t.transformOffset(e.origEnd))}})),ze=m((function(e,t){t.__esModule=!0;var n=!0;function r(e,t){if(e&&"object"==typeof e&&t(e)!==n)for(var i=0,a=Object.keys(e);ie.offset}t.__esModule=!0,t.updatePositions=function e(t){if(null!==t&&"children"in t){var u=t.children;if(u.forEach(e),"document"===t.type){var c=t.children,l=c[0],d=c[1];l.position.start.offset===l.position.end.offset?l.position.start=l.position.end=d.position.start:d.position.start.offset===d.position.end.offset&&(d.position.start=d.position.end=l.position.end)}var p=We.createUpdater(t.position,n,r,o),f=We.createUpdater(t.position,i,a,s);"endComments"in t&&0!==t.endComments.length&&(p(t.endComments[0].position.start),f(te.getLast(t.endComments).position.end));var h=u.filter((function(e){return null!==e}));if(0!==h.length){var g=h[0],m=te.getLast(h);p(g.position.start),f(m.position.end),"leadingComments"in g&&0!==g.leadingComments.length&&p(g.leadingComments[0].position.start),"tag"in g&&g.tag&&p(g.tag.position.start),"anchor"in g&&g.anchor&&p(g.anchor.position.start),"trailingComment"in m&&m.trailingComment&&f(m.trailingComment.position.end)}}}})),qe={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},Ge={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"};function Ye(e){for(var t=[0],n=e.indexOf("\n");-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function Je(e){var t,n;return"string"==typeof e?(t=Ye(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=Ye(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function $e(e,t){if("number"!=typeof e||e<0)return null;var n=Je(t),r=n.lineStarts,i=n.src;if(!r||!i||e>i.length)return null;for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:80,a=function(e,t){var n=Je(t),r=n.lineStarts,i=n.src;if(!r||!(e>=1)||e>r.length)return null;for(var a=r[e-1],o=r[e];o&&o>a&&"\n"===i[o-1];)--o;return i.slice(a,o)}(n.line,t);if(!a)return null;var o=n.col;if(a.length>i)if(o<=i-10)a=a.substr(0,i-1)+"\u2026";else{var s=Math.round(i/2);a.length>o+s&&(a=a.substr(0,o+s-1)+"\u2026"),o-=a.length-i,a="\u2026"+a.substr(1-i)}var u=1,c="";r&&(r.line===n.line&&o+(r.col-n.col)<=i+1?u=r.col-n.col:(u=Math.min(a.length+1,i)-o,c="\u2026"));var l=o>1?" ".repeat(o-1):"",d="^".repeat(u);return"".concat(a,"\n").concat(l).concat(d).concat(c)}var Xe=function(){function e(t,n){f(this,e),this.start=t,this.end=n||t}return h(e,null,[{key:"copy",value:function(t){return new e(t.start,t.end)}}]),h(e,[{key:"isEmpty",value:function(){return"number"!=typeof this.start||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(e,t){var n=this.start,r=this.end;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;for(var i=t;in);)++i;this.origStart=n+i;for(var a=i;i=r);)++i;return this.origEnd=r+i,a}}]),e}(),Ze=function(){function e(t,n,r){f(this,e),Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=t,this.value=null}return h(e,null,[{key:"addStringTerminator",value:function(t,n,r){if("\n"===r[r.length-1])return r;var i=e.endOfWhiteSpace(t,n);return i>=t.length||"\n"===t[i]?r+"\n":r}},{key:"atDocumentBoundary",value:function(e,t,n){var r=e[t];if(!r)return!0;var i=e[t-1];if(i&&"\n"!==i)return!1;if(n){if(r!==n)return!1}else if(r!==qe.DIRECTIVES_END&&r!==qe.DOCUMENT_END)return!1;var a=e[t+1],o=e[t+2];if(a!==r||o!==r)return!1;var s=e[t+3];return!s||"\n"===s||"\t"===s||" "===s}},{key:"endOfIdentifier",value:function(e,t){for(var n=e[t],r="<"===n,i=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];n&&-1===i.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}},{key:"endOfIndent",value:function(e,t){for(var n=e[t];" "===n;)n=e[t+=1];return t}},{key:"endOfLine",value:function(e,t){for(var n=e[t];n&&"\n"!==n;)n=e[t+=1];return t}},{key:"endOfWhiteSpace",value:function(e,t){for(var n=e[t];"\t"===n||" "===n;)n=e[t+=1];return t}},{key:"startOfLine",value:function(e,t){var n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}},{key:"endOfBlockIndent",value:function(t,n,r){var i=e.endOfIndent(t,r);if(i>r+n)return i;var a=e.endOfWhiteSpace(t,i),o=t[a];return o&&"\n"!==o?null:a}},{key:"atBlank",value:function(e,t,n){var r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}},{key:"nextNodeIsIndented",value:function(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}},{key:"normalizeOffset",value:function(t,n){var r=t[n];return r?"\n"!==r&&"\n"===t[n-1]?n-1:e.endOfWhiteSpace(t,n):n}},{key:"foldNewline",value:function(t,n,r){for(var i=0,a=!1,o="",s=t[n+1];" "===s||"\t"===s||"\n"===s;){switch(s){case"\n":i=0,n+=1,o+="\n";break;case"\t":i<=r&&(a=!0),n=e.endOfWhiteSpace(t,n+2)-1;break;case" ":i+=1,n+=1}s=t[n+1]}return o||(o=" "),s&&i<=r&&(a=!0),{fold:o,offset:n,error:a}}}]),h(e,[{key:"getPropValue",value:function(e,t,n){if(!this.context)return null;var r=this.context.src,i=this.props[e];return i&&r[i.start]===t?r.slice(i.start+(n?1:0),i.end):null}},{key:"commentHasRequiredWhitespace",value:function(t){var n=this.context.src;if(this.header&&t===this.header.end)return!1;if(!this.valueRange)return!1;var r=this.valueRange.end;return t!==r||e.atBlank(n,r-1)}},{key:"parseComment",value:function(t){var n=this.context.src;if(n[t]===qe.COMMENT){var r=e.endOfLine(n,t+1),i=new Xe(t,r);return this.props.push(i),r}return t}},{key:"setOrigRanges",value:function(e,t){return this.range&&(t=this.range.setOrigRange(e,t)),this.valueRange&&this.valueRange.setOrigRange(e,t),this.props.forEach((function(n){return n.setOrigRange(e,t)})),t}},{key:"toString",value:function(){var t=this.context.src,n=this.range,r=this.value;if(null!=r)return r;var i=t.slice(n.start,n.end);return e.addStringTerminator(t,n.end,i)}},{key:"anchor",get:function(){for(var e=0;e0?e.join("\n"):null}},{key:"hasComment",get:function(){if(this.context)for(var e=this.context.src,t=0;tc?r.slice(c,o+1):s)}else a+=s}var d=r[t];switch(d){case"\t":return{errors:[new tt(this,"Plain value cannot start with a tab character")],str:a};case"@":case"`":var p="Plain value cannot start with reserved character ".concat(d);return{errors:[new tt(this,p)],str:a};default:return a}}}],[{key:"endOfLine",value:function(e,t,n){for(var r=e[t],i=t;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){var a=e[i+1];if(":"===r&&(!a||"\n"===a||"\t"===a||" "===a||n&&","===a))break;if((" "===r||"\t"===r)&&"#"===a)break;i+=1,r=a}return i}}]),n}(Ze),rt={Char:qe,Node:Ze,PlainValue:nt,Range:Xe,Type:Ge,YAMLError:et,YAMLReferenceError:function(e){c(n,e);var t=l(n);function n(e,r){return f(this,n),t.call(this,"YAMLReferenceError",e,r)}return n}(et),YAMLSemanticError:tt,YAMLSyntaxError:function(e){c(n,e);var t=l(n);function n(e,r){return f(this,n),t.call(this,"YAMLSyntaxError",e,r)}return n}(et),YAMLWarning:function(e){c(n,e);var t=l(n);function n(e,r){return f(this,n),t.call(this,"YAMLWarning",e,r)}return n}(et),_defineProperty:function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},defaultTagPrefix:"tag:yaml.org,2002:",defaultTags:{MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"}},it=function(e){c(n,e);var t=l(n);function n(){return f(this,n),t.call(this,rt.Type.BLANK_LINE)}return h(n,[{key:"parse",value:function(e,t){return this.context=e,this.range=new rt.Range(t,t+1),t+1}},{key:"includesTrailingLines",get:function(){return!0}}]),n}(rt.Node),at=function(e){c(n,e);var t=l(n);function n(e,r){var i;return f(this,n),(i=t.call(this,e,r)).node=null,i}return h(n,[{key:"parse",value:function(e,t){this.context=e;var n=e.parseNode,r=e.src,i=e.atLineStart,a=e.lineStart;i||this.type!==rt.Type.SEQ_ITEM||(this.error=new rt.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));for(var o=i?t-a:e.indent,s=rt.Node.endOfWhiteSpace(r,t+1),u=r[s],c="#"===u,l=[],d=null;"\n"===u||"#"===u;){if("#"===u){var p=rt.Node.endOfLine(r,s+1);l.push(new rt.Range(s,p)),s=p}else i=!0,a=s+1,"\n"===r[rt.Node.endOfWhiteSpace(r,a)]&&0===l.length&&(a=(d=new it).parse({src:r},a)),s=rt.Node.endOfIndent(r,a);u=r[s]}if(rt.Node.nextNodeIsIndented(u,s-(a+o),this.type!==rt.Type.SEQ_ITEM)?this.node=n({atLineStart:i,inCollection:!1,indent:o,lineStart:a,parent:this},s):u&&a>t+1&&(s=a-1),this.node){if(d){var f=e.parent.items||e.parent.contents;f&&f.push(d)}l.length&&Array.prototype.push.apply(this.props,l),s=this.node.range.end}else if(c){var h=l[0];this.props.push(h),s=h.end}else s=rt.Node.endOfLine(r,t+1);var g=this.node?this.node.valueRange.end:s;return this.valueRange=new rt.Range(t,g),s}},{key:"setOrigRanges",value:function(e,t){return t=s(u(n.prototype),"setOrigRanges",this).call(this,e,t),this.node?this.node.setOrigRanges(e,t):t}},{key:"toString",value:function(){var e=this.context.src,t=this.node,n=this.range,r=this.value;if(null!=r)return r;var i=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return rt.Node.addStringTerminator(e,n.end,i)}},{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}}]),n}(rt.Node),ot=function(e){c(n,e);var t=l(n);function n(){return f(this,n),t.call(this,rt.Type.COMMENT)}return h(n,[{key:"parse",value:function(e,t){this.context=e;var n=this.parseComment(t);return this.range=new rt.Range(t,n),n}}]),n}(rt.Node);function st(e){for(var t=e;t instanceof at;)t=t.node;if(!(t instanceof ut))return null;for(var n=t.items.length,r=-1,i=n-1;i>=0;--i){var a=t.items[i];if(a.type===rt.Type.COMMENT){var o=a.context,s=o.indent,u=o.lineStart;if(s>0&&a.range.start>=u+s)break;r=i}else{if(a.type!==rt.Type.BLANK_LINE)break;r=i}}if(-1===r)return null;for(var c=t.items.splice(r,n-r),l=c[0].range.start;t.range.end=l,t.valueRange&&t.valueRange.end>l&&(t.valueRange.end=l),t!==e;)t=t.context.parent;return c}var ut=function(e){c(n,e);var t=l(n);function n(e){var r;f(this,n),r=t.call(this,e.type===rt.Type.SEQ_ITEM?rt.Type.SEQ:rt.Type.MAP);for(var i=e.props.length-1;i>=0;--i)if(e.props[i].start=i+r||("#"===a||"\n"===a)&&n.nextContentHasIndent(e,t,r))}}]),h(n,[{key:"parse",value:function(e,t){this.context=e;var r=e.parseNode,i=e.src,a=rt.Node.startOfLine(i,t),o=this.items[0];o.context.parent=this,this.valueRange=rt.Range.copy(o.valueRange);for(var s=o.range.start-o.context.lineStart,u=t,c=i[u=rt.Node.normalizeOffset(i,u)],l=rt.Node.endOfWhiteSpace(i,a)===u,d=!1;c;){for(;"\n"===c||"#"===c;){if(l&&"\n"===c&&!d){var p=new it;if(u=p.parse({src:i},u),this.valueRange.end=u,u>=i.length){c=null;break}this.items.push(p),u-=1}else if("#"===c){if(u=i.length){c=null;break}}if(a=u+1,u=rt.Node.endOfIndent(i,a),rt.Node.atBlank(i,u)){var h=rt.Node.endOfWhiteSpace(i,u),g=i[h];g&&"\n"!==g&&"#"!==g||(u=h)}c=i[u],l=!0}if(!c)break;if(u!==a+s&&(l||":"!==c)){if(ut&&(u=a);break}if(!this.error){var m="All collection items must start at the same column";this.error=new rt.YAMLSyntaxError(this,m)}}if(o.type===rt.Type.SEQ_ITEM){if("-"!==c){a>t&&(u=a);break}}else if("-"===c&&!this.error){var _=i[u+1];if(!_||"\n"===_||"\t"===_||" "===_){var v="A collection cannot be both a mapping and a sequence";this.error=new rt.YAMLSyntaxError(this,v)}}var y=r({atLineStart:l,inCollection:!0,indent:s,lineStart:a,parent:this},u);if(!y)return u;if(this.items.push(y),this.valueRange.end=y.valueRange.end,c=i[u=rt.Node.normalizeOffset(i,y.range.end)],l=!1,d=y.includesTrailingLines,c){for(var b=u-1,D=i[b];" "===D||"\t"===D;)D=i[--b];"\n"===D&&(a=b+1,l=!0)}var E=st(y);E&&Array.prototype.push.apply(this.items,E)}return u}},{key:"setOrigRanges",value:function(e,t){return t=s(u(n.prototype),"setOrigRanges",this).call(this,e,t),this.items.forEach((function(n){t=n.setOrigRanges(e,t)})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,n=this.range,r=this.value;if(null!=r)return r;for(var i=e.slice(n.start,t[0].range.start)+String(t[0]),a=1;a0}}]),n}(rt.Node),ct=function(e){c(n,e);var t=l(n);function n(){var e;return f(this,n),(e=t.call(this,rt.Type.DIRECTIVE)).name=null,e}return h(n,[{key:"parseName",value:function(e){for(var t=this.context.src,n=e,r=t[n];r&&"\n"!==r&&"\t"!==r&&" "!==r;)r=t[n+=1];return this.name=t.slice(e,n),n}},{key:"parseParameters",value:function(e){for(var t=this.context.src,n=e,r=t[n];r&&"\n"!==r&&"#"!==r;)r=t[n+=1];return this.valueRange=new rt.Range(e,n),n}},{key:"parse",value:function(e,t){this.context=e;var n=this.parseName(t+1);return n=this.parseParameters(n),n=this.parseComment(n),this.range=new rt.Range(t,n),n}},{key:"parameters",get:function(){var e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}}]),n}(rt.Node),lt=function(e){c(n,e);var t=l(n);function n(){var e;return f(this,n),(e=t.call(this,rt.Type.DOCUMENT)).directives=null,e.contents=null,e.directivesEndMarker=null,e.documentEndMarker=null,e}return h(n,null,[{key:"startCommentOrEndBlankLine",value:function(e,t){var n=rt.Node.endOfWhiteSpace(e,t),r=e[n];return"#"===r||"\n"===r?n:t}}]),h(n,[{key:"parseDirectives",value:function(e){var t=this.context.src;this.directives=[];for(var r=!0,i=!1,a=e;!rt.Node.atDocumentBoundary(t,a,rt.Char.DIRECTIVES_END);)switch(t[a=n.startCommentOrEndBlankLine(t,a)]){case"\n":if(r){var o=new it;(a=o.parse({src:t},a))0&&(this.contents=this.directives,this.directives=[]),a}return t[a]?(this.directivesEndMarker=new rt.Range(a,a+3),a+3):(i?this.error=new rt.YAMLSemanticError(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),a)}},{key:"parseContents",value:function(e){var t=this.context,r=t.parseNode,i=t.src;this.contents||(this.contents=[]);for(var a=e;"-"===i[a-1];)a-=1;var o=rt.Node.endOfWhiteSpace(i,e),s=a===e;for(this.valueRange=new rt.Range(o);!rt.Node.atDocumentBoundary(i,o,rt.Char.DOCUMENT_END);){switch(i[o]){case"\n":if(s){var u=new it;(o=u.parse({src:i},o))0&&((t.length>0||e[0].type===rt.Type.COMMENT)&&(r+="---\n"),r+=e.join("")),"\n"!==r[r.length-1]&&(r+="\n"),r}}]),n}(rt.Node),dt=function(e){c(n,e);var t=l(n);function n(){return f(this,n),t.apply(this,arguments)}return h(n,[{key:"parse",value:function(e,t){this.context=e;var n=e.src,r=rt.Node.endOfIdentifier(n,t+1);return this.valueRange=new rt.Range(t+1,r),r=rt.Node.endOfWhiteSpace(n,r),r=this.parseComment(r)}}]),n}(rt.Node),pt="CLIP",ft="KEEP",ht="STRIP",gt=function(e){c(n,e);var t=l(n);function n(e,r){var i;return f(this,n),(i=t.call(this,e,r)).blockIndent=null,i.chomping=pt,i.header=null,i}return h(n,[{key:"parseBlockHeader",value:function(e){for(var t=this.context.src,n=e+1,r="";;){var i=t[n];switch(i){case"-":this.chomping=ht;break;case"+":this.chomping=ft;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r+=i;break;default:return this.blockIndent=Number(r)||null,this.header=new rt.Range(e,n),n}n+=1}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,n=t.indent,r=t.src,i=!!this.blockIndent,a=e,o=e,s=1,u=r[a];"\n"===u&&(a+=1,!rt.Node.atDocumentBoundary(r,a));u=r[a]){var c=rt.Node.endOfBlockIndent(r,n,a);if(null===c)break;var l=r[c],d=c-(a+n);if(this.blockIndent){if(l&&"\n"!==l&&ds&&(s=d);a="\n"===r[c]?c:o=rt.Node.endOfLine(r,c)}return this.chomping!==ft&&(a=r[o]?o+1:o),this.valueRange=new rt.Range(e+1,a),a}},{key:"parse",value:function(e,t){this.context=e;var n=e.src,r=this.parseBlockHeader(t);return r=rt.Node.endOfWhiteSpace(n,r),r=this.parseComment(r),r=this.parseBlockValue(r)}},{key:"setOrigRanges",value:function(e,t){return t=s(u(n.prototype),"setOrigRanges",this).call(this,e,t),this.header?this.header.setOrigRange(e,t):t}},{key:"includesTrailingLines",get:function(){return this.chomping===ft}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,t=e.start,n=e.end,r=this.context,i=r.indent,a=r.src;if(this.valueRange.isEmpty())return"";for(var o=null,s=a[n-1];"\n"===s||"\t"===s||" "===s;){if((n-=1)<=t){if(this.chomping===ft)break;return""}"\n"===s&&(o=n),s=a[n-1]}var u=n+1;o&&(this.chomping===ft?(u=o,n=this.valueRange.end):n=o);for(var c=i+this.blockIndent,l=this.type===rt.Type.BLOCK_FOLDED,d=!0,p="",f="",h=!1,g=t;g0&&void 0!==arguments[0]?arguments[0]:this.items.length,t=this.items[e-1];return!!t&&(t.jsonLike||t.type===rt.Type.COMMENT&&this.prevNodeIsJsonLike(e-1))}},{key:"parse",value:function(e,t){this.context=e;var n=e.parseNode,r=e.src,i=e.indent,a=e.lineStart,o=r[t];this.items=[{char:o,offset:t}];var s=rt.Node.endOfWhiteSpace(r,t+1);for(o=r[s];o&&"]"!==o&&"}"!==o;){switch(o){case"\n":if(a=s+1,"\n"===r[rt.Node.endOfWhiteSpace(r,a)]){var u=new it;a=u.parse({src:r},a),this.items.push(u)}if((s=rt.Node.endOfIndent(r,a))<=a+i&&(o=r[s],sn.offset);)++r;n.origOffset=n.offset+r,t=r}})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,n=this.range,r=this.value;if(null!=r)return r;var i=t.filter((function(e){return e instanceof rt.Node})),a="",o=n.start;return i.forEach((function(t){var n=e.slice(o,t.range.start);o=t.range.end,"\n"===(a+=n+String(t))[a.length-1]&&"\n"!==e[o-1]&&"\n"===e[o]&&(o+=1)})),a+=e.slice(o,n.end),rt.Node.addStringTerminator(e,n.end,a)}}]),n}(rt.Node),_t=function(e){c(n,e);var t=l(n);function n(){return f(this,n),t.apply(this,arguments)}return h(n,[{key:"parseCharCode",value:function(e,t,n){var r=this.context.src,i=r.substr(e,t),a=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(a)?(n.push(new rt.YAMLSyntaxError(this,"Invalid escape sequence ".concat(r.substr(e-2,t+2)))),r.substr(e-2,t+2)):String.fromCodePoint(a)}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,i=n.endOfQuote(r,t+1);return this.valueRange=new rt.Range(t,i),i=rt.Node.endOfWhiteSpace(r,i),i=this.parseComment(i)}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,n=t.start,r=t.end,i=this.context,a=i.indent,o=i.src;'"'!==o[r-1]&&e.push(new rt.YAMLSyntaxError(this,'Missing closing "quote'));for(var s="",u=n+1;ud?o.slice(d,u+1):c)}else s+=c}return e.length>0?{errors:e,str:s}:s}}],[{key:"endOfQuote",value:function(e,t){for(var n=e[t];n&&'"'!==n;)n=e[t+="\\"===n?2:1];return t+1}}]),n}(rt.Node),vt=function(e){c(n,e);var t=l(n);function n(){return f(this,n),t.apply(this,arguments)}return h(n,[{key:"parse",value:function(e,t){this.context=e;var r=e.src,i=n.endOfQuote(r,t+1);return this.valueRange=new rt.Range(t,i),i=rt.Node.endOfWhiteSpace(r,i),i=this.parseComment(i)}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,n=t.start,r=t.end,i=this.context,a=i.indent,o=i.src;"'"!==o[r-1]&&e.push(new rt.YAMLSyntaxError(this,"Missing closing 'quote"));for(var s="",u=n+1;ud?o.slice(d,u+1):c)}else s+=c}return e.length>0?{errors:e,str:s}:s}}],[{key:"endOfQuote",value:function(e,t){for(var n=e[t];n;)if("'"===n){if("'"!==e[t+1])break;n=e[t+=2]}else n=e[t+=1];return t+1}}]),n}(rt.Node),yt=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.atLineStart,a=r.inCollection,o=r.inFlow,s=r.indent,u=r.lineStart,c=r.parent;f(this,e),rt._defineProperty(this,"parseNode",(function(n,r){if(rt.Node.atDocumentBoundary(t.src,r))return null;var i=new e(t,n),a=i.parseProps(r),o=a.props,s=a.type,u=a.valueStart,c=function(e,t){switch(e){case rt.Type.ALIAS:return new dt(e,t);case rt.Type.BLOCK_FOLDED:case rt.Type.BLOCK_LITERAL:return new gt(e,t);case rt.Type.FLOW_MAP:case rt.Type.FLOW_SEQ:return new mt(e,t);case rt.Type.MAP_KEY:case rt.Type.MAP_VALUE:case rt.Type.SEQ_ITEM:return new at(e,t);case rt.Type.COMMENT:case rt.Type.PLAIN:return new rt.PlainValue(e,t);case rt.Type.QUOTE_DOUBLE:return new _t(e,t);case rt.Type.QUOTE_SINGLE:return new vt(e,t);default:return null}}(s,o),l=c.parse(i,u);if(c.range=new rt.Range(r,l),l<=r&&(c.error=new Error("Node#parse consumed no characters"),c.error.parseEnd=l,c.error.source=c,c.range.end=r+1),i.nodeStartsCollection(c)){c.error||i.atLineStart||i.parent.type!==rt.Type.DOCUMENT||(c.error=new rt.YAMLSyntaxError(c,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var d=new ut(c);return l=d.parse(new e(i),l),d.range=new rt.Range(r,l),d}return c})),this.atLineStart=null!=i?i:n.atLineStart||!1,this.inCollection=null!=a?a:n.inCollection||!1,this.inFlow=null!=o?o:n.inFlow||!1,this.indent=null!=s?s:n.indent,this.lineStart=null!=u?u:n.lineStart,this.parent=null!=c?c:n.parent||{},this.root=n.root,this.src=n.src}return h(e,null,[{key:"parseType",value:function(e,t,n){switch(e[t]){case"*":return rt.Type.ALIAS;case">":return rt.Type.BLOCK_FOLDED;case"|":return rt.Type.BLOCK_LITERAL;case"{":return rt.Type.FLOW_MAP;case"[":return rt.Type.FLOW_SEQ;case"?":return!n&&rt.Node.atBlank(e,t+1,!0)?rt.Type.MAP_KEY:rt.Type.PLAIN;case":":return!n&&rt.Node.atBlank(e,t+1,!0)?rt.Type.MAP_VALUE:rt.Type.PLAIN;case"-":return!n&&rt.Node.atBlank(e,t+1,!0)?rt.Type.SEQ_ITEM:rt.Type.PLAIN;case'"':return rt.Type.QUOTE_DOUBLE;case"'":return rt.Type.QUOTE_SINGLE;default:return rt.Type.PLAIN}}}]),h(e,[{key:"nodeStartsCollection",value:function(e){var t=this.inCollection,n=this.inFlow,r=this.src;if(t||n)return!1;if(e instanceof at)return!0;var i=e.range.end;return"\n"!==r[i]&&"\n"!==r[i-1]&&":"===r[i=rt.Node.endOfWhiteSpace(r,i)]}},{key:"parseProps",value:function(t){for(var n=this.inFlow,r=this.parent,i=this.src,a=[],o=!1,s=i[t=this.atLineStart?rt.Node.endOfIndent(i,t):rt.Node.endOfWhiteSpace(i,t)];s===rt.Char.ANCHOR||s===rt.Char.COMMENT||s===rt.Char.TAG||"\n"===s;){if("\n"===s){var u=t+1,c=rt.Node.endOfIndent(i,u),l=c-(u+this.indent),d=r.type===rt.Type.SEQ_ITEM&&r.context.atLineStart;if(!rt.Node.nextNodeIsIndented(i[c],l,!d))break;this.atLineStart=!0,this.lineStart=u,o=!1,t=c}else if(s===rt.Char.COMMENT){var p=rt.Node.endOfLine(i,t+1);a.push(new rt.Range(t,p)),t=p}else{var f=rt.Node.endOfIdentifier(i,t+1);s===rt.Char.TAG&&","===i[f]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(i.slice(t+1,f+13))&&(f=rt.Node.endOfIdentifier(i,f+5)),a.push(new rt.Range(t,f)),o=!0,t=rt.Node.endOfWhiteSpace(i,f)}s=i[t]}return o&&":"===s&&rt.Node.atBlank(i,t+1,!0)&&(t-=1),{props:a,type:e.parseType(i,t,n),valueStart:t}}}]),e}(),bt={parse:function(e){var t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,(function(e,n){return e.length>1&&t.push(n),"\n"})));var n=[],r=0;do{var i=new lt,a=new yt({src:e});r=i.parse(a,r),n.push(i)}while(r=0;--i){var a=t[i],o=Number.isInteger(a)&&a>=0?[]:{};o[a]=r,r=o}return e.createNode(r,!1)}var kt=function(e){return null==e||"object"==typeof e&&e[Symbol.iterator]().next().done},Tt=function(e){c(n,e);var t=l(n);function n(e){var r;return f(this,n),r=t.call(this),rt._defineProperty(o(r),"items",[]),r.schema=e,r}return h(n,[{key:"addIn",value:function(e,t){if(kt(e))this.add(t);else{var r=a(e),i=r[0],o=r.slice(1),s=this.get(i,!0);if(s instanceof n)s.addIn(o,t);else{if(void 0!==s||!this.schema)throw new Error("Expected YAML collection at ".concat(i,". Remaining path: ").concat(o));this.set(i,xt(this.schema,o,t))}}}},{key:"deleteIn",value:function(e){var t=a(e),r=t[0],i=t.slice(1);if(0===i.length)return this.delete(r);var o=this.get(r,!0);if(o instanceof n)return o.deleteIn(i);throw new Error("Expected YAML collection at ".concat(r,". Remaining path: ").concat(i))}},{key:"getIn",value:function(e,t){var r=a(e),i=r[0],o=r.slice(1),s=this.get(i,!0);return 0===o.length?!t&&s instanceof St?s.value:s:s instanceof n?s.getIn(o,t):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every((function(e){if(!e||"PAIR"!==e.type)return!1;var t=e.value;return null==t||t instanceof St&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}},{key:"hasIn",value:function(e){var t=a(e),r=t[0],i=t.slice(1);if(0===i.length)return this.has(r);var o=this.get(r,!0);return o instanceof n&&o.hasIn(i)}},{key:"setIn",value:function(e,t){var r=a(e),i=r[0],o=r.slice(1);if(0===o.length)this.set(i,t);else{var s=this.get(i,!0);if(s instanceof n)s.setIn(o,t);else{if(void 0!==s||!this.schema)throw new Error("Expected YAML collection at ".concat(i,". Remaining path: ").concat(o));this.set(i,xt(this.schema,o,t))}}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(e,t,r,a){var o=this,s=t.blockItem,u=t.flowChars,c=t.isMap,l=t.itemIndent,d=e,p=d.indent,f=d.indentStep,h=d.stringify,g=this.type===rt.Type.FLOW_MAP||this.type===rt.Type.FLOW_SEQ||e.inFlow;g&&(l+=f);var m=c&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:m,indent:l,inFlow:g,type:null});var _,v=!1,y=!1,b=this.items.reduce((function(t,n,r){var i;n&&(!v&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach((function(e){t.push({type:"comment",str:"#".concat(e)})})),n.comment&&(i=n.comment),g&&(!v&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(y=!0)),v=!1;var a=h(n,e,(function(){return i=null}),(function(){return v=!0}));return g&&!y&&a.includes("\n")&&(y=!0),g&&rn.maxFlowStringSingleLineLength){_=D;var S,x=i(C);try{for(x.s();!(S=x.n()).done;){var k=S.value;_+=k?"\n".concat(f).concat(p).concat(k):"\n"}}catch(N){x.e(N)}finally{x.f()}_+="\n".concat(p).concat(E)}else _="".concat(D," ").concat(C.join(" ")," ").concat(E)}else{var T=b.map(s);_=T.shift();var w,A=i(T);try{for(A.s();!(w=A.n()).done;){var O=w.value;_+=O?"\n".concat(p).concat(O):"\n"}}catch(N){A.e(N)}finally{A.f()}}return this.comment?(_+="\n"+this.comment.replace(/^/gm,"".concat(p,"#")),r&&r()):v&&a&&a(),_}}]),n}(Et);function wt(e){var t=e instanceof St?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}rt._defineProperty(Tt,"maxFlowStringSingleLineLength",60);var At=function(e){c(n,e);var t=l(n);function n(){return f(this,n),t.apply(this,arguments)}return h(n,[{key:"add",value:function(e){this.items.push(e)}},{key:"delete",value:function(e){var t=wt(e);return"number"==typeof t&&this.items.splice(t,1).length>0}},{key:"get",value:function(e,t){var n=wt(e);if("number"==typeof n){var r=this.items[n];return!t&&r instanceof St?r.value:r}}},{key:"has",value:function(e){var t=wt(e);return"number"==typeof t&&t1&&void 0!==arguments[1]?arguments[1]:null;return f(this,n),(r=t.call(this)).key=e,r.value=i,r.type=n.Type.PAIR,r}return h(n,[{key:"addToJSMap",value:function(e,t){var n=Ct(this.key,"",e);if(t instanceof Map){var r=Ct(this.value,n,e);t.set(n,r)}else if(t instanceof Set)t.add(n);else{var i=function(e,t,n){return null===t?"":"object"!=typeof t?String(t):e instanceof Et&&n&&n.doc?e.toString({anchors:{},doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t)}(this.key,n,e);t[i]=Ct(this.value,i,e)}return t}},{key:"toJSON",value:function(e,t){var n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}},{key:"toString",value:function(e,t,n){if(!e||!e.doc)return JSON.stringify(this);var r=e.doc.options,i=r.indent,a=r.indentSeq,o=r.simpleKeys,s=this.key,u=this.value,c=s instanceof Et&&s.comment;if(o){if(c)throw new Error("With simple keys, key nodes cannot have comments");if(s instanceof Tt)throw new Error("With simple keys, collection cannot be used as a key value")}var l=!o&&(!s||c||s instanceof Tt||s.type===rt.Type.BLOCK_FOLDED||s.type===rt.Type.BLOCK_LITERAL),d=e,p=d.doc,f=d.indent,h=d.indentStep,g=d.stringify;e=Object.assign({},e,{implicitKey:!l,indent:f+h});var m=!1,_=g(s,e,(function(){return c=null}),(function(){return m=!0}));if(_=Dt(_,e.indent,c),e.allNullValues&&!o)return this.comment?(_=Dt(_,e.indent,this.comment),t&&t()):m&&!c&&n&&n(),e.inFlow?_:"? ".concat(_);_=l?"? ".concat(_,"\n").concat(f,":"):"".concat(_,":"),this.comment&&(_=Dt(_,e.indent,this.comment),t&&t());var v="",y=null;if(u instanceof Et){if(u.spaceBefore&&(v="\n"),u.commentBefore){var b=u.commentBefore.replace(/^/gm,"".concat(e.indent,"#"));v+="\n".concat(b)}y=u.comment}else u&&"object"==typeof u&&(u=p.schema.createNode(u,!0));e.implicitKey=!1,!l&&!this.comment&&u instanceof St&&(e.indentAtStart=_.length+1),m=!1,!a&&i>=2&&!e.inFlow&&!l&&u instanceof At&&u.type!==rt.Type.FLOW_SEQ&&!u.tag&&!p.anchors.getName(u)&&(e.indent=e.indent.substr(2));var D=g(u,e,(function(){return y=null}),(function(){return m=!0})),E=" ";return v||this.comment?E="".concat(v,"\n").concat(e.indent):!l&&u instanceof Tt&&(("["===D[0]||"{"===D[0])&&!D.includes("\n")||(E="\n".concat(e.indent))),m&&!y&&n&&n(),Dt(_+E+D,e.indent,y)}},{key:"commentBefore",get:function(){return this.key instanceof Et?this.key.commentBefore:void 0},set:function(e){if(null==this.key&&(this.key=new St(null)),!(this.key instanceof Et))throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.");this.key.commentBefore=e}}]),n}(Et);rt._defineProperty(Ot,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Nt=function e(t,n){if(t instanceof It){var r=n.get(t.source);return r.count*r.aliasCount}if(t instanceof Tt){var a,o=0,s=i(t.items);try{for(s.s();!(a=s.n()).done;){var u=e(a.value,n);u>o&&(o=u)}}catch(d){s.e(d)}finally{s.f()}return o}if(t instanceof Ot){var c=e(t.key,n),l=e(t.value,n);return Math.max(c,l)}return 1},It=function(e){c(n,e);var t=l(n);function n(e){var r;return f(this,n),(r=t.call(this)).source=e,r.type=rt.Type.ALIAS,r}return h(n,null,[{key:"stringify",value:function(e,t){var n=e.range,r=e.source,i=t.anchors,a=t.doc,o=t.implicitKey,s=t.inStringifyKey,u=Object.keys(i).find((function(e){return i[e]===r}));if(!u&&s&&(u=a.anchors.getName(r)||a.anchors.newName()),u)return"*".concat(u).concat(o?" ":"");var c=a.anchors.getName(r)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(c," [").concat(n,"]"))}}]),h(n,[{key:"toJSON",value:function(e,t){if(!t)return Ct(this.source,e,t);var n=t.anchors,r=t.maxAliasCount,i=n.get(this.source);if(!i||void 0===i.res){var a="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new rt.YAMLReferenceError(this.cstNode,a):new ReferenceError(a)}if(r>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=Nt(this.source,n)),i.count*i.aliasCount>r)){var o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new rt.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}return i.res}},{key:"toString",value:function(e){return n.stringify(this,e)}},{key:"tag",set:function(e){throw new Error("Alias nodes cannot have tags")}}]),n}(Et);function Ft(e,t){var n,r=t instanceof St?t.value:t,a=i(e);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(o instanceof Ot){if(o.key===t||o.key===r)return o;if(o.key&&o.key.value===r)return o}}}catch(s){a.e(s)}finally{a.f()}}rt._defineProperty(It,"default",!0);var Lt=function(e){c(n,e);var t=l(n);function n(){return f(this,n),t.apply(this,arguments)}return h(n,[{key:"add",value:function(e,t){e?e instanceof Ot||(e=new Ot(e.key||e,e.value)):e=new Ot(e);var n=Ft(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n){if(!t)throw new Error("Key ".concat(e.key," already set"));n.value=e.value}else if(r){var i=this.items.findIndex((function(t){return r(e,t)<0}));-1===i?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}},{key:"delete",value:function(e){var t=Ft(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}},{key:"get",value:function(e,t){var n=Ft(this.items,e),r=n&&n.value;return!t&&r instanceof St?r.value:r}},{key:"has",value:function(e){return!!Ft(this.items,e)}},{key:"set",value:function(e,t){this.add(new Ot(e,t),!0)}},{key:"toJSON",value:function(e,t,n){var r=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(r);var a,o=i(this.items);try{for(o.s();!(a=o.n()).done;)a.value.addToJSMap(t,r)}catch(s){o.e(s)}finally{o.f()}return r}},{key:"toString",value:function(e,t,r){if(!e)return JSON.stringify(this);var a,o=i(this.items);try{for(o.s();!(a=o.n()).done;){var c=a.value;if(!(c instanceof Ot))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(c)," instead"))}}catch(l){o.e(l)}finally{o.f()}return s(u(n.prototype),"toString",this).call(this,e,{blockItem:function(e){return e.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,r)}}]),n}(Tt),Pt=function(e){c(n,e);var t=l(n);function n(e){var i;if(f(this,n),e instanceof Ot){var a=e.value;a instanceof At||((a=new At).items.push(e.value),a.range=e.value.range),(i=t.call(this,e.key,a)).range=e.range}else i=t.call(this,new St("<<"),new At);return i.type=Ot.Type.MERGE_PAIR,r(i)}return h(n,[{key:"addToJSMap",value:function(e,t){var n,r=i(this.value.items);try{for(r.s();!(n=r.n()).done;){var a=n.value.source;if(!(a instanceof Lt))throw new Error("Merge sources must be maps");var o,s=a.toJSON(null,e,Map),u=i(s);try{for(u.s();!(o=u.n()).done;){var c=p(o.value,2),l=c[0],d=c[1];t instanceof Map?t.has(l)||t.set(l,d):t instanceof Set?t.add(l):Object.prototype.hasOwnProperty.call(t,l)||(t[l]=d)}}catch(f){u.e(f)}finally{u.f()}}}catch(f){r.e(f)}finally{r.f()}return t}},{key:"toString",value:function(e,t){var r=this.value;if(r.items.length>1)return s(u(n.prototype),"toString",this).call(this,e,t);this.value=r.items[0];var i=s(u(n.prototype),"toString",this).call(this,e,t);return this.value=r,i}}]),n}(Ot),Rt={defaultType:rt.Type.BLOCK_LITERAL,lineWidth:76},Mt={defaultType:rt.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Bt(e,t,n){var r,a=i(t);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=o.format,u=o.test,c=o.resolve;if(u){var l=e.match(u);if(l){var d=c.apply(null,l);return d instanceof St||(d=new St(d)),s&&(d.format=s),d}}}}catch(p){a.e(p)}finally{a.f()}return n&&(e=n(e)),new St(e)}var jt="flow",Ut="block",Vt="quoted",zt=function(e,t){for(var n=e[t+1];" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t};function Ht(e,t,n,r){var i=r.indentAtStart,a=r.lineWidth,o=void 0===a?80:a,s=r.minContentWidth,u=void 0===s?20:s,c=r.onFold,l=r.onOverflow;if(!o||o<0)return e;var d=Math.max(1+u,1+o-t.length);if(e.length<=d)return e;var p,f=[],h={},g=o-("number"==typeof i?i:t.length),m=void 0,_=void 0,v=!1,y=-1;for(n===Ut&&-1!==(y=zt(e,y))&&(g=y+d);p=e[y+=1];){if(n===Vt&&"\\"===p)switch(e[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}if("\n"===p)n===Ut&&(y=zt(e,y)),g=y+d,m=void 0;else{if(" "===p&&_&&" "!==_&&"\n"!==_&&"\t"!==_){var b=e[y+1];b&&" "!==b&&"\n"!==b&&"\t"!==b&&(m=y)}if(y>=g)if(m)f.push(m),g=m+d,m=void 0;else if(n===Vt){for(;" "===_||"\t"===_;)_=p,p=e[y+=1],v=!0;f.push(y-2),h[y-2]=!0,g=y-2+d,m=void 0}else v=!0}_=p}if(v&&l&&l(),0===f.length)return e;c&&c();for(var D=e.slice(0,f[0]),E=0;Et)return!0;if(n-(i=r+1)<=t)return!1}return!0}(o,Mt.fold.lineWidth-s.length)),l=c?"|":">";if(!o)return l+"\n";var d="",p="";if(o=o.replace(/[\n\t ]*$/,(function(e){var t=e.indexOf("\n");return-1===t?l+="-":o!==e&&t===e.length-1||(l+="+",r&&r()),p=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(function(e){-1!==e.indexOf(" ")&&(l+=u);var t=e.match(/ +$/);return t?(d=e.slice(0,-t[0].length),t[0]):(d=e,"")})),p&&(p=p.replace(/\n+(?!\n|$)/g,"$&".concat(s))),d&&(d=d.replace(/\n+/g,"$&".concat(s))),i&&(l+=" #"+i.replace(/ ?[\r\n]+/g," "),n&&n()),!o)return"".concat(l).concat(u,"\n").concat(s).concat(p);if(c)return o=o.replace(/\n+/g,"$&".concat(s)),"".concat(l,"\n").concat(s).concat(d).concat(o).concat(p);o=o.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(s));var f=Ht("".concat(d).concat(o).concat(p),s,Ut,Mt.fold);return"".concat(l,"\n").concat(s).concat(f)}function Jt(e,t){var n,r,i;switch(t.type){case rt.Type.FLOW_MAP:n="}",r="flow map";break;case rt.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:return void e.push(new rt.YAMLSemanticError(t,"Not a flow collection!?"))}for(var a=t.items.length-1;a>=0;--a){var o=t.items[a];if(!o||o.type!==rt.Type.COMMENT){i=o;break}}if(i&&i.char!==n){var s,u="Expected ".concat(r," to end with ").concat(n);"number"==typeof i.offset?(s=new rt.YAMLSemanticError(t,u)).offset=i.offset+1:(s=new rt.YAMLSemanticError(i,u),i.range&&i.range.end&&(s.offset=i.range.end-i.range.start)),e.push(s)}}function $t(e,t){var n=t.context.src[t.range.start-1];if("\n"!==n&&"\t"!==n&&" "!==n){var r="Comments must be separated from other tokens by white space characters";e.push(new rt.YAMLSemanticError(t,r))}}function Qt(e,t){var n=String(t),r=n.substr(0,8)+"..."+n.substr(-8);return new rt.YAMLSemanticError(e,'The "'.concat(r,'" key is too long'))}function Xt(e,t){var n,r=i(t);try{for(r.s();!(n=r.n()).done;){var a=n.value,o=a.afterKey,s=a.before,u=a.comment,c=e.items[s];c?(o&&c.value&&(c=c.value),void 0===u?!o&&c.commentBefore||(c.spaceBefore=!0):c.commentBefore?c.commentBefore+="\n"+u:c.commentBefore=u):void 0!==u&&(e.comment?e.comment+="\n"+u:e.comment=u)}}catch(l){r.e(l)}finally{r.f()}}function Zt(e,t){var n=t.strValue;return n?"string"==typeof n?n:(n.errors.forEach((function(n){n.source||(n.source=t),e.errors.push(n)})),n.str):""}function en(e,t){var n=t.tag,r=t.type,i=!1;if(n){var a=n.handle,o=n.suffix,s=n.verbatim;if(s){if("!"!==s&&"!!"!==s)return s;var u="Verbatim tags aren't resolved, so ".concat(s," is invalid.");e.errors.push(new rt.YAMLSemanticError(t,u))}else if("!"!==a||o)try{return function(e,t){var n=t.tag,r=n.handle,i=n.suffix,a=e.tagPrefixes.find((function(e){return e.handle===r}));if(!a){var o=e.getDefaults().tagPrefixes;if(o&&(a=o.find((function(e){return e.handle===r}))),!a)throw new rt.YAMLSemanticError(t,"The ".concat(r," tag handle is non-default and was not declared."))}if(!i)throw new rt.YAMLSemanticError(t,"The ".concat(r," tag has no suffix."));if("!"===r&&"1.0"===(e.version||e.options.version)){if("^"===i[0])return e.warnings.push(new rt.YAMLWarning(t,"YAML 1.0 ^ tag expansion is not supported")),i;if(/[:/]/.test(i)){var s=i.match(/^([a-z0-9-]+)\/(.*)/i);return s?"tag:".concat(s[1],".yaml.org,2002:").concat(s[2]):"tag:".concat(i)}}return a.prefix+decodeURIComponent(i)}(e,t)}catch(t){e.errors.push(t)}else i=!0}switch(r){case rt.Type.BLOCK_FOLDED:case rt.Type.BLOCK_LITERAL:case rt.Type.QUOTE_DOUBLE:case rt.Type.QUOTE_SINGLE:return rt.defaultTags.STR;case rt.Type.FLOW_MAP:case rt.Type.MAP:return rt.defaultTags.MAP;case rt.Type.FLOW_SEQ:case rt.Type.SEQ:return rt.defaultTags.SEQ;case rt.Type.PLAIN:return i?rt.defaultTags.STR:null;default:return null}}function tn(e,t,n){var r,a=e.schema.tags,o=[],s=i(a);try{for(s.s();!(r=s.n()).done;){var u=r.value;if(u.tag===n){if(!u.test){var c=u.resolve(e,t);return c instanceof Tt?c:new St(c)}o.push(u)}}}catch(d){s.e(d)}finally{s.f()}var l=Zt(e,t);return"string"==typeof l&&o.length>0?Bt(l,o,a.scalarFallback):null}function nn(e,t,n){try{var r=tn(e,t,n);if(r)return n&&t.tag&&(r.tag=n),r}catch(n){return n.source||(n.source=t),e.errors.push(n),null}try{var i=function(e){switch(e.type){case rt.Type.FLOW_MAP:case rt.Type.MAP:return rt.defaultTags.MAP;case rt.Type.FLOW_SEQ:case rt.Type.SEQ:return rt.defaultTags.SEQ;default:return rt.defaultTags.STR}}(t);if(!i)throw new Error("The tag ".concat(n," is unavailable"));var a="The tag ".concat(n," is unavailable, falling back to ").concat(i);e.warnings.push(new rt.YAMLWarning(t,a));var o=tn(e,t,i);return o.tag=n,o}catch(n){var s=new rt.YAMLReferenceError(t,n.message);return s.stack=n.stack,e.errors.push(s),null}}function rn(e,t){var n,r={before:[],after:[]},a=!1,o=!1,s=function(e){if(!e)return!1;var t=e.type;return t===rt.Type.MAP_KEY||t===rt.Type.MAP_VALUE||t===rt.Type.SEQ_ITEM}(t.context.parent)?t.context.parent.props.concat(t.props):t.props,u=i(s);try{for(u.s();!(n=u.n()).done;){var c=n.value,l=c.start,d=c.end;switch(t.context.src[l]){case rt.Char.COMMENT:if(!t.commentHasRequiredWhitespace(l)){var p="Comments must be separated from other tokens by white space characters";e.push(new rt.YAMLSemanticError(t,p))}var f=t.header,h=t.valueRange;(h&&(l>h.start||f&&l>f.start)?r.after:r.before).push(t.context.src.slice(l+1,d));break;case rt.Char.ANCHOR:if(a){var g="A node can have at most one anchor";e.push(new rt.YAMLSemanticError(t,g))}a=!0;break;case rt.Char.TAG:if(o){var m="A node can have at most one tag";e.push(new rt.YAMLSemanticError(t,m))}o=!0}}}catch(_){u.e(_)}finally{u.f()}return{comments:r,hasAnchor:a,hasTag:o}}function an(e,t){if(!t)return null;t.error&&e.errors.push(t.error);var n=rn(e.errors,t),r=n.comments,i=n.hasAnchor,a=n.hasTag;if(i){var o=e.anchors,s=t.anchor,u=o.getNode(s);u&&(o.map[o.newName(s)]=u),o.map[s]=t}if(t.type===rt.Type.ALIAS&&(i||a)){var c="An alias node must not specify any properties";e.errors.push(new rt.YAMLSemanticError(t,c))}var l=function(e,t){var n=e.anchors,r=e.errors,i=e.schema;if(t.type===rt.Type.ALIAS){var a=t.rawValue,o=n.getNode(a);if(!o){var s="Aliased anchor not found: ".concat(a);return r.push(new rt.YAMLReferenceError(t,s)),null}var u=new It(o);return n._cstAliases.push(u),u}var c=en(e,t);if(c)return nn(e,t,c);if(t.type!==rt.Type.PLAIN){var l="Failed to resolve ".concat(t.type," node here");return r.push(new rt.YAMLSyntaxError(t,l)),null}try{return Bt(Zt(e,t),i.tags,i.tags.scalarFallback)}catch(e){return e.source||(e.source=t),r.push(e),null}}(e,t);if(l){l.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(l.cstNode=t),e.options.keepNodeTypes&&(l.type=t.type);var d=r.before.join("\n");d&&(l.commentBefore=l.commentBefore?"".concat(l.commentBefore,"\n").concat(d):d);var p=r.after.join("\n");p&&(l.comment=l.comment?"".concat(l.comment,"\n").concat(p):p)}return t.resolved=l}function on(e,t){if(function(e){var t=e.context,n=t.lineStart,r=t.node,i=t.src,a=e.props;if(0===a.length)return!1;var o=a[0].start;if(r&&o>r.valueRange.start)return!1;if(i[o]!==rt.Char.COMMENT)return!1;for(var s=n;s0){(c=new rt.PlainValue(rt.Type.PLAIN,[])).context={parent:s,src:s.context.src};var l=s.range.start+1;if(c.range={start:l,end:l},c.valueRange={start:l,end:l},"number"==typeof s.range.origStart){var d=s.range.origStart+1;c.range.origStart=c.range.origEnd=d,c.valueRange.origStart=c.valueRange.origEnd=d}}var p=new Ot(i,an(e,c));on(s,p),r.push(p),i&&"number"==typeof a&&s.range.start>a+1024&&e.errors.push(Qt(t,i)),i=void 0,a=null;break;default:void 0!==i&&r.push(new Ot(i)),i=an(e,s),a=s.range.start,s.error&&e.errors.push(s.error);e:for(var f=o+1;;++f){var h=t.items[f];switch(h&&h.type){case rt.Type.BLANK_LINE:case rt.Type.COMMENT:continue e;case rt.Type.MAP_VALUE:break e;default:var g="Implicit map keys need to be followed by map values";e.errors.push(new rt.YAMLSemanticError(s,g));break e}}if(s.valueRangeContainsNewline){var m="Implicit map keys need to be on a single line";e.errors.push(new rt.YAMLSemanticError(s,m))}}}return void 0!==i&&r.push(new Ot(i)),{comments:n,items:r}}(e,t),i=r.comments,a=r.items,o=new Lt;o.items=a,Xt(o,i);for(var s=!1,u=0;uo+1024&&e.errors.push(Qt(t,a));for(var m=u.context.src,_=o;_0;)a+="0"}return a},stringifyString:function(e,t,n,r){var i=Mt.defaultType,a=t.implicitKey,o=t.inFlow,s=e,u=s.type,c=s.value;"string"!=typeof c&&(c=String(c),e=Object.assign({},e,{value:c}));var l=function(i){switch(i){case rt.Type.BLOCK_FOLDED:case rt.Type.BLOCK_LITERAL:return Yt(e,t,n,r);case rt.Type.QUOTE_DOUBLE:return qt(c,t);case rt.Type.QUOTE_SINGLE:return Gt(c,t);case rt.Type.PLAIN:return function(e,t,n,r){var i=e.comment,a=e.type,o=e.value,s=t.actualString,u=t.implicitKey,c=t.indent,l=t.inFlow;if(u&&/[\n[\]{},]/.test(o)||l&&/[[\]{},]/.test(o))return qt(o,t);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return u||l||-1===o.indexOf("\n")?-1!==o.indexOf('"')&&-1===o.indexOf("'")?Gt(o,t):qt(o,t):Yt(e,t,n,r);if(!u&&!l&&a!==rt.Type.PLAIN&&-1!==o.indexOf("\n"))return Yt(e,t,n,r);if(""===c&&Kt(o))return t.forceBlockIndent=!0,Yt(e,t,n,r);var d=o.replace(/\n+/g,"$&\n".concat(c));if(s){var p=t.doc.schema.tags;if("string"!=typeof Bt(d,p,p.scalarFallback).value)return qt(o,t)}var f=u?d:Ht(d,c,jt,Wt(t));return!i||l||-1===f.indexOf("\n")&&-1===i.indexOf("\n")?f:(n&&n(),function(e,t,n){if(!n)return e;var r=n.replace(/[\s\S]^/gm,"$&".concat(t,"#"));return"#".concat(r,"\n").concat(t).concat(e)}(f,c,i))}(e,t,n,r);default:return null}};u!==rt.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)?u=rt.Type.QUOTE_DOUBLE:!a&&!o||u!==rt.Type.BLOCK_FOLDED&&u!==rt.Type.BLOCK_LITERAL||(u=rt.Type.QUOTE_DOUBLE);var d=l(u);if(null===d&&null===(d=l(i)))throw new Error("Unsupported default string type ".concat(i));return d},toJSON:Ct},un="undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},cn=[],ln=[],dn="undefined"!=typeof Uint8Array?Uint8Array:Array,pn=!1;function fn(){pn=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t>18&63]+cn[i>>12&63]+cn[i>>6&63]+cn[63&i]);return a.join("")}function gn(e){var t;pn||fn();for(var n=e.length,r=n%3,i="",a=[],o=16383,s=0,u=n-r;su?u:s+o));return 1===r?(t=e[n-1],i+=cn[t>>2],i+=cn[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=cn[t>>10],i+=cn[t>>4&63],i+=cn[t<<2&63],i+="="),a.push(i),a.join("")}function mn(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<>1,l=-7,d=n?i-1:0,p=n?-1:1,f=e[t+d];for(d+=p,a=f&(1<<-l)-1,f>>=-l,l+=s;l>0;a=256*a+e[t+d],d+=p,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=r;l>0;o=256*o+e[t+d],d+=p,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=c}return(f?-1:1)*o*Math.pow(2,a-r)}function _n(e,t,n,r,i,a){var o,s,u,c=8*a-i-1,l=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,h=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+d>=1?p/u:p*Math.pow(2,1-d))*u>=2&&(o++,u/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(t*u-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=h,s/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=h,o/=256,c-=8);e[n+f-h]|=128*g}var vn={}.toString,yn=Array.isArray||function(e){return"[object Array]"==vn.call(e)};function bn(){return En.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Dn(e,t){if(bn()=bn())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+bn().toString(16)+" bytes");return 0|e}function wn(e){return!(null==e||!e._isBuffer)}function An(e,t){if(wn(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return nr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return rr(e).length;default:if(r)return nr(e).length;t=(""+t).toLowerCase(),r=!0}}function On(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Kn(this,t,n);case"utf8":case"utf-8":return Vn(this,t,n);case"ascii":return Hn(this,t,n);case"latin1":case"binary":return Wn(this,t,n);case"base64":return Un(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qn(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function Nn(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function In(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=En.from(t,r)),wn(t))return 0===t.length?-1:Fn(e,t,n,r,i);if("number"==typeof t)return t&=255,En.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):Fn(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function Fn(e,t,n,r,i){var a,o=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=n;as&&(n=s-u),a=n;a>=0;a--){for(var d=!0,p=0;pi&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function Un(e,t,n){return 0===t&&n===e.length?gn(e):gn(e.slice(t,n))}function Vn(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&c)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=d}return function(e){var t=e.length;if(t<=zn)return String.fromCharCode.apply(String,e);for(var n="",r=0;r0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},En.prototype.compare=function(e,t,n,r,i){if(!wn(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),u=this.slice(r,i),c=e.slice(t,n),l=0;li)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return Ln(this,e,t,n);case"utf8":case"utf-8":return Pn(this,e,t,n);case"ascii":return Rn(this,e,t,n);case"latin1":case"binary":return Mn(this,e,t,n);case"base64":return Bn(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return jn(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},En.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var zn=4096;function Hn(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function Yn(e,t,n,r,i,a){if(!wn(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function Jn(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function $n(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function Qn(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Xn(e,t,n,r,i){return i||Qn(e,0,n,4),_n(e,t,n,r,23,4),n+4}function Zn(e,t,n,r,i){return i||Qn(e,0,n,8),_n(e,t,n,r,52,8),n+8}En.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},En.prototype.readUInt8=function(e,t){return t||Gn(e,1,this.length),this[e]},En.prototype.readUInt16LE=function(e,t){return t||Gn(e,2,this.length),this[e]|this[e+1]<<8},En.prototype.readUInt16BE=function(e,t){return t||Gn(e,2,this.length),this[e]<<8|this[e+1]},En.prototype.readUInt32LE=function(e,t){return t||Gn(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},En.prototype.readUInt32BE=function(e,t){return t||Gn(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},En.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||Gn(e,t,this.length);for(var r=this[e],i=1,a=0;++a=(i*=128)&&(r-=Math.pow(2,8*t)),r},En.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||Gn(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},En.prototype.readInt8=function(e,t){return t||Gn(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},En.prototype.readInt16LE=function(e,t){t||Gn(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},En.prototype.readInt16BE=function(e,t){t||Gn(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},En.prototype.readInt32LE=function(e,t){return t||Gn(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},En.prototype.readInt32BE=function(e,t){return t||Gn(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},En.prototype.readFloatLE=function(e,t){return t||Gn(e,4,this.length),mn(this,e,!0,23,4)},En.prototype.readFloatBE=function(e,t){return t||Gn(e,4,this.length),mn(this,e,!1,23,4)},En.prototype.readDoubleLE=function(e,t){return t||Gn(e,8,this.length),mn(this,e,!0,52,8)},En.prototype.readDoubleBE=function(e,t){return t||Gn(e,8,this.length),mn(this,e,!1,52,8)},En.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||Yn(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},En.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Yn(this,e,t,1,255,0),En.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},En.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Yn(this,e,t,2,65535,0),En.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Jn(this,e,t,!0),t+2},En.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Yn(this,e,t,2,65535,0),En.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Jn(this,e,t,!1),t+2},En.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Yn(this,e,t,4,4294967295,0),En.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):$n(this,e,t,!0),t+4},En.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Yn(this,e,t,4,4294967295,0),En.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$n(this,e,t,!1),t+4},En.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Yn(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},En.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Yn(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},En.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Yn(this,e,t,1,127,-128),En.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},En.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Yn(this,e,t,2,32767,-32768),En.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Jn(this,e,t,!0),t+2},En.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Yn(this,e,t,2,32767,-32768),En.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Jn(this,e,t,!1),t+2},En.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Yn(this,e,t,4,2147483647,-2147483648),En.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):$n(this,e,t,!0),t+4},En.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Yn(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),En.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$n(this,e,t,!1),t+4},En.prototype.writeFloatLE=function(e,t,n){return Xn(this,e,t,!0,n)},En.prototype.writeFloatBE=function(e,t,n){return Xn(this,e,t,!1,n)},En.prototype.writeDoubleLE=function(e,t,n){return Zn(this,e,t,!0,n)},En.prototype.writeDoubleBE=function(e,t,n){return Zn(this,e,t,!1,n)},En.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!En.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function rr(e){return function(e){var t,n,r,i,a,o;pn||fn();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new dn(3*s/4-a),r=a>0?s-4:s;var u=0;for(t=0,n=0;t>16&255,o[u++]=i>>8&255,o[u++]=255&i;return 2===a?(i=ln[e.charCodeAt(t)]<<2|ln[e.charCodeAt(t+1)]>>4,o[u++]=255&i):1===a&&(i=ln[e.charCodeAt(t)]<<10|ln[e.charCodeAt(t+1)]<<4|ln[e.charCodeAt(t+2)]>>2,o[u++]=i>>8&255,o[u++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(er,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function ir(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function ar(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function or(){throw new Error("setTimeout has not been defined")}function sr(){throw new Error("clearTimeout has not been defined")}var ur=or,cr=sr;function lr(e){if(ur===setTimeout)return setTimeout(e,0);if((ur===or||!ur)&&setTimeout)return ur=setTimeout,setTimeout(e,0);try{return ur(e,0)}catch(n){try{return ur.call(null,e,0)}catch(n){return ur.call(this,e,0)}}}"function"==typeof un.setTimeout&&(ur=setTimeout),"function"==typeof un.clearTimeout&&(cr=clearTimeout);var dr,pr=[],fr=!1,hr=-1;function gr(){fr&&dr&&(fr=!1,dr.length?pr=dr.concat(pr):hr=-1,pr.length&&mr())}function mr(){if(!fr){var e=lr(gr);fr=!0;for(var t=pr.length;t;){for(dr=pr,pr=[];++hr1)for(var n=1;n1){var a="Each pair must have its own sequence indicator";throw new rt.YAMLSemanticError(t,a)}var o=i.items[0]||new sn.Pair;i.commentBefore&&(o.commentBefore=o.commentBefore?"".concat(i.commentBefore,"\n").concat(o.commentBefore):i.commentBefore),i.comment&&(o.comment=o.comment?"".concat(i.comment,"\n").concat(o.comment):i.comment),i=o}n.items[r]=i instanceof sn.Pair?i:new sn.Pair(i)}}return n}function Ir(e,t,n){var r=new sn.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";var a,o=i(t);try{for(o.s();!(a=o.n()).done;){var s=a.value,u=void 0,c=void 0;if(Array.isArray(s)){if(2!==s.length)throw new TypeError("Expected [key, value] tuple: ".concat(s));u=s[0],c=s[1]}else if(s&&s instanceof Object){var l=Object.keys(s);if(1!==l.length)throw new TypeError("Expected { key: value } tuple: ".concat(s));c=s[u=l[0]]}else u=s;var d=e.createPair(u,c,n);r.items.push(d)}}catch(p){o.e(p)}finally{o.f()}return r}var Fr={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Nr,createNode:Ir},Lr=function(e){c(n,e);var t=l(n);function n(){var e;return f(this,n),e=t.call(this),rt._defineProperty(o(e),"add",sn.YAMLMap.prototype.add.bind(o(e))),rt._defineProperty(o(e),"delete",sn.YAMLMap.prototype.delete.bind(o(e))),rt._defineProperty(o(e),"get",sn.YAMLMap.prototype.get.bind(o(e))),rt._defineProperty(o(e),"has",sn.YAMLMap.prototype.has.bind(o(e))),rt._defineProperty(o(e),"set",sn.YAMLMap.prototype.set.bind(o(e))),e.tag=n.tag,e}return h(n,[{key:"toJSON",value:function(e,t){var n=new Map;t&&t.onCreate&&t.onCreate(n);var r,a=i(this.items);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=void 0,u=void 0;if(o instanceof sn.Pair?(s=sn.toJSON(o.key,"",t),u=sn.toJSON(o.value,s,t)):s=sn.toJSON(o,"",t),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,u)}}catch(c){a.e(c)}finally{a.f()}return n}}]),n}(sn.YAMLSeq);rt._defineProperty(Lr,"tag","tag:yaml.org,2002:omap");var Pr={identify:function(e){return e instanceof Map},nodeClass:Lr,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){var n,r=Nr(e,t),a=[],o=i(r.items);try{for(o.s();!(n=o.n()).done;){var s=n.value.key;if(s instanceof sn.Scalar){if(a.includes(s.value)){var u="Ordered maps must not include duplicate keys";throw new rt.YAMLSemanticError(t,u)}a.push(s.value)}}}catch(c){o.e(c)}finally{o.f()}return Object.assign(new Lr,r)},createNode:function(e,t,n){var r=Ir(e,t,n),i=new Lr;return i.items=r.items,i}},Rr=function(e){c(n,e);var t=l(n);function n(){var e;return f(this,n),(e=t.call(this)).tag=n.tag,e}return h(n,[{key:"add",value:function(e){var t=e instanceof sn.Pair?e:new sn.Pair(e);sn.findPair(this.items,t.key)||this.items.push(t)}},{key:"get",value:function(e,t){var n=sn.findPair(this.items,e);return!t&&n instanceof sn.Pair?n.key instanceof sn.Scalar?n.key.value:n.key:n}},{key:"set",value:function(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(typeof t));var n=sn.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new sn.Pair(e))}},{key:"toJSON",value:function(e,t){return s(u(n.prototype),"toJSON",this).call(this,e,t,Set)}},{key:"toString",value:function(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return s(u(n.prototype),"toString",this).call(this,e,t,r);throw new Error("Set items must all have null values")}}]),n}(sn.YAMLMap);rt._defineProperty(Rr,"tag","tag:yaml.org,2002:set");var Mr={identify:function(e){return e instanceof Set},nodeClass:Rr,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){var n=sn.resolveMap(e,t);if(!n.hasAllNullValues())throw new rt.YAMLSemanticError(t,"Set items must all have null values");return Object.assign(new Rr,n)},createNode:function(e,t,n){var r,a=new Rr,o=i(t);try{for(o.s();!(r=o.n()).done;){var s=r.value;a.items.push(e.createPair(s,null,n))}}catch(u){o.e(u)}finally{o.f()}return a}},Br=function(e,t){var n=t.split(":").reduce((function(e,t){return 60*e+Number(t)}),0);return"-"===e?-n:n},jr=function(e){var t=e.value;if(isNaN(t)||!isFinite(t))return sn.stringifyNumber(t);var n="";t<0&&(n="-",t=Math.abs(t));var r=[t%60];return t<60?r.unshift(0):(t=Math.round((t-r[0])/60),r.unshift(t%60),t>=60&&(t=Math.round((t-r[0])/60),r.unshift(t))),n+r.map((function(e){return e<10?"0"+String(e):String(e)})).join(":").replace(/000000\d*$/,"")},Ur={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(e,t,n){return Br(t,n.replace(/_/g,""))},stringify:jr},Vr={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(e,t,n){return Br(t,n.replace(/_/g,""))},stringify:jr},zr={identify:function(e){return e instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(e,t,n,r,i,a,o,s,u){s&&(s=(s+"00").substr(1,3));var c=Date.UTC(t,n-1,r,i||0,a||0,o||0,s||0);if(u&&"Z"!==u){var l=Br(u[0],u.slice(1));Math.abs(l)<30&&(l*=60),c-=6e4*l}return new Date(c)},stringify:function(e){return e.value.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function Hr(e){var t=void 0!==Ar&&Ar.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function Wr(e,t){if(Hr(!1)){var n=void 0!==Ar&&Ar.emitWarning;n?n(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}var Kr={},qr={binary:Or,floatTime:Vr,intTime:Ur,omap:Pr,pairs:Fr,set:Mr,timestamp:zr,warn:Wr,warnFileDeprecation:function(e){if(Hr(!0)){var t=e.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");Wr("The endpoint 'yaml/".concat(t,"' will be removed in a future release."),"DeprecationWarning")}},warnOptionDeprecation:function(e,t){if(!Kr[e]&&Hr(!0)){Kr[e]=!0;var n="The option '".concat(e,"' will be removed in a future release");Wr(n+=t?", use '".concat(t,"' instead."):".","DeprecationWarning")}}},Gr={createNode:function(e,t,n){var r=new sn.YAMLMap(e);if(t instanceof Map){var a,o=i(t);try{for(o.s();!(a=o.n()).done;){var s=p(a.value,2),u=s[0],c=s[1];r.items.push(e.createPair(u,c,n))}}catch(h){o.e(h)}finally{o.f()}}else if(t&&"object"==typeof t)for(var l=0,d=Object.keys(t);l=0?n+r.toString(t):sn.stringifyNumber(e)}var ei={identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new sn.Scalar(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:sn.nullOptions,stringify:function(){return sn.nullOptions.nullStr}},ti={identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(e){return"t"===e[0]||"T"===e[0]},options:sn.boolOptions,stringify:function(e){return e.value?sn.boolOptions.trueStr:sn.boolOptions.falseStr}},ni={identify:function(e){return Qr(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(e,t){return Xr(e,t,8)},options:sn.intOptions,stringify:function(e){return Zr(e,8,"0o")}},ri={identify:Qr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(e){return Xr(e,e,10)},options:sn.intOptions,stringify:sn.stringifyNumber},ii={identify:function(e){return Qr(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(e,t){return Xr(e,t,16)},options:sn.intOptions,stringify:function(e){return Zr(e,16,"0x")}},ai={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:sn.stringifyNumber},oi={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e)},stringify:function(e){var t=e.value;return Number(t).toExponential()}},si={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(e,t,n){var r=t||n,i=new sn.Scalar(parseFloat(e));return r&&"0"===r[r.length-1]&&(i.minFractionDigits=r.length),i},stringify:sn.stringifyNumber},ui=$r.concat([ei,ti,ni,ri,ii,ai,oi,si]),ci=function(e){return"bigint"==typeof e||Number.isInteger(e)},li=function(e){var t=e.value;return JSON.stringify(t)},di=[Gr,Yr,{identify:function(e){return"string"==typeof e},default:!0,tag:"tag:yaml.org,2002:str",resolve:sn.resolveString,stringify:li},{identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new sn.Scalar(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:li},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(e){return"true"===e},stringify:li},{identify:ci,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(e){return sn.intOptions.asBigInt?BigInt(e):parseInt(e,10)},stringify:function(e){var t=e.value;return ci(t)?t.toString():JSON.stringify(t)}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(e){return parseFloat(e)},stringify:li}];di.scalarFallback=function(e){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};var pi=function(e){return e.value?sn.boolOptions.trueStr:sn.boolOptions.falseStr},fi=function(e){return"bigint"==typeof e||Number.isInteger(e)};function hi(e,t,n){var r=t.replace(/_/g,"");if(sn.intOptions.asBigInt){switch(n){case 2:r="0b".concat(r);break;case 8:r="0o".concat(r);break;case 16:r="0x".concat(r)}var i=BigInt(r);return"-"===e?BigInt(-1)*i:i}var a=parseInt(r,n);return"-"===e?-1*a:a}function gi(e,t,n){var r=e.value;if(fi(r)){var i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return sn.stringifyNumber(e)}var mi=$r.concat([{identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new sn.Scalar(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:sn.nullOptions,stringify:function(){return sn.nullOptions.nullStr}},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:sn.boolOptions,stringify:pi},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:sn.boolOptions,stringify:pi},{identify:fi,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(e,t,n){return hi(t,n,2)},stringify:function(e){return gi(e,2,"0b")}},{identify:fi,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(e,t,n){return hi(t,n,8)},stringify:function(e){return gi(e,8,"0")}},{identify:fi,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(e,t,n){return hi(t,n,10)},stringify:sn.stringifyNumber},{identify:fi,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(e,t,n){return hi(t,n,16)},stringify:function(e){return gi(e,16,"0x")}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:sn.stringifyNumber},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e.replace(/_/g,""))},stringify:function(e){var t=e.value;return Number(t).toExponential()}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(e,t){var n=new sn.Scalar(parseFloat(e.replace(/_/g,"")));if(t){var r=t.replace(/_/g,"");"0"===r[r.length-1]&&(n.minFractionDigits=r.length)}return n},stringify:sn.stringifyNumber}],qr.binary,qr.omap,qr.pairs,qr.set,qr.intTime,qr.floatTime,qr.timestamp),_i={core:ui,failsafe:$r,json:di,yaml11:mi},vi={binary:qr.binary,bool:ti,float:si,floatExp:oi,floatNaN:ai,floatTime:qr.floatTime,int:ri,intHex:ii,intOct:ni,intTime:qr.intTime,map:Gr,null:ei,omap:qr.omap,pairs:qr.pairs,seq:Yr,set:qr.set,timestamp:qr.timestamp};function yi(e,t,n){if(e instanceof sn.Node)return e;var r=n.defaultPrefix,i=n.onTagObj,a=n.prevObjects,o=n.schema,s=n.wrapScalars;t&&t.startsWith("!!")&&(t=r+t.slice(2));var u=function(e,t,n){if(t){var r=n.filter((function(e){return e.tag===t})),i=r.find((function(e){return!e.format}))||r[0];if(!i)throw new Error("Tag ".concat(t," not found"));return i}return n.find((function(t){return(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format}))}(e,t,o.tags);if(!u){if("function"==typeof e.toJSON&&(e=e.toJSON()),"object"!=typeof e)return s?new sn.Scalar(e):e;u=e instanceof Map?Gr:e[Symbol.iterator]?Yr:Gr}i&&(i(u),delete n.onTagObj);var c={};if(e&&"object"==typeof e&&a){var l=a.get(e);if(l){var d=new sn.Alias(l);return n.aliasNodes.push(d),d}c.value=e,a.set(e,c)}return c.node=u.createNode?u.createNode(n.schema,e,n):s?new sn.Scalar(e):e,t&&c.node instanceof sn.Node&&(c.node.tag=t),c.node}var bi=function(e,t){return e.keyt.key?1:0},Di=function(){function e(t){var n=t.customTags,r=t.merge,a=t.schema,o=t.sortMapEntries,s=t.tags;f(this,e),this.merge=!!r,this.name=a,this.sortMapEntries=!0===o?bi:o||null,!n&&s&&qr.warnOptionDeprecation("tags","customTags"),this.tags=function(e,t,n,r){var a=e[r.replace(/\W/g,"")];if(!a){var o=Object.keys(e).map((function(e){return JSON.stringify(e)})).join(", ");throw new Error('Unknown schema "'.concat(r,'"; use one of ').concat(o))}if(Array.isArray(n)){var s,u=i(n);try{for(u.s();!(s=u.n()).done;){var c=s.value;a=a.concat(c)}}catch(h){u.e(h)}finally{u.f()}}else"function"==typeof n&&(a=n(a.slice()));for(var l=0;l");var o=t.substr(i.prefix.length).replace(/[!,[\]{}]/g,(function(e){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e]}));return i.handle+o}function ki(e,t,n,r){var a,o=t.doc,s=o.anchors,u=o.schema;if(!(e instanceof sn.Node)){var c={aliasNodes:[],onTagObj:function(e){return a=e},prevObjects:new Map};e=u.createNode(e,!0,null,c);var l,d=i(c.aliasNodes);try{for(d.s();!(l=d.n()).done;){var p=l.value;p.source=p.source.node;var f=s.getName(p.source);f||(f=s.newName(),s.map[f]=p.source)}}catch(m){d.e(m)}finally{d.f()}}if(e instanceof sn.Pair)return e.toString(t,n,r);a||(a=function(e,t){if(t instanceof sn.Alias)return sn.Alias;if(t.tag){var n=e.filter((function(e){return e.tag===t.tag}));if(n.length>0)return n.find((function(e){return e.format===t.format}))||n[0]}var r,i;if(t instanceof sn.Scalar){i=t.value;var a=e.filter((function(e){return e.identify&&e.identify(i)||e.class&&i instanceof e.class}));r=a.find((function(e){return e.format===t.format}))||a.find((function(e){return!e.format}))}else i=t,r=e.find((function(e){return e.nodeClass&&i instanceof e.nodeClass}));if(!r){var o=i&&i.constructor?i.constructor.name:typeof i;throw new Error("Tag not resolved for ".concat(o," value"))}return r}(u.tags,e));var h=function(e,t,n){var r=n.anchors,i=n.doc,a=[],o=i.anchors.getName(e);return o&&(r[o]=e,a.push("&".concat(o))),e.tag?a.push(xi(i,e.tag)):t.default||a.push(xi(i,t.tag)),a.join(" ")}(e,a,t);h.length>0&&(t.indentAtStart=(t.indentAtStart||0)+h.length+1);var g="function"==typeof a.stringify?a.stringify(e,t,n,r):e instanceof sn.Scalar?sn.stringifyString(e,t,n,r):e.toString(t,n,r);return h?e instanceof sn.Scalar||"{"===g[0]||"["===g[0]?"".concat(h," ").concat(g):"".concat(h,"\n").concat(t.indent).concat(g):g}var Ti=function(){function e(t){f(this,e),rt._defineProperty(this,"map",{}),this.prefix=t}return h(e,null,[{key:"validAnchorNode",value:function(e){return e instanceof sn.Scalar||e instanceof sn.YAMLSeq||e instanceof sn.YAMLMap}}]),h(e,[{key:"createAlias",value:function(e,t){return this.setAnchor(e,t),new sn.Alias(e)}},{key:"createMergePair",value:function(){for(var e=this,t=new sn.Merge,n=arguments.length,r=new Array(n),i=0;i0&&!e.commentBefore&&(e.commentBefore=r.before.join("\n"),r.before=[]))}}catch(f){s.e(f)}finally{s.f()}if(e.contents=a||null,a){var d=r.before.join("\n");if(d){var p=a instanceof sn.Collection&&a.items[0]?a.items[0]:a;p.commentBefore=p.commentBefore?"".concat(d,"\n").concat(p.commentBefore):d}e.comment=r.after.join("\n")||null}else e.comment=r.before.concat(r.after).join("\n")||null}(this,o),this.anchors.resolveNodes(),this.options.prettyErrors){var l,d=i(this.errors);try{for(d.s();!(l=d.n()).done;){var p=l.value;p instanceof rt.YAMLError&&p.makePretty()}}catch(m){d.e(m)}finally{d.f()}var f,h=i(this.warnings);try{for(h.s();!(f=h.n()).done;){var g=f.value;g instanceof rt.YAMLError&&g.makePretty()}}catch(m){h.e(m)}finally{h.f()}}return this}},{key:"listNonDefaultTags",value:function(){return function(e){return Object.keys(wi(e,{}))}(this.contents).filter((function(e){return 0!==e.indexOf(Ei.Schema.defaultPrefix)}))}},{key:"setTagPrefix",value:function(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){var n=this.tagPrefixes.find((function(t){return t.handle===e}));n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((function(t){return t.handle!==e}))}},{key:"toJSON",value:function(e,t){var n=this,r=this.options,a=r.keepBlobsInJSON,o=r.mapAsMap,s=r.maxAliasCount,u=a&&("string"!=typeof e||!(this.contents instanceof sn.Scalar)),c={doc:this,indentStep:" ",keep:u,mapAsMap:u&&!!o,maxAliasCount:s,stringify:ki},l=Object.keys(this.anchors.map);l.length>0&&(c.anchors=new Map(l.map((function(e){return[n.anchors.map[e],{alias:[],aliasCount:0,count:1}]}))));var d=sn.toJSON(this.contents,e,c);if("function"==typeof t&&c.anchors){var p,f=i(c.anchors.values());try{for(f.s();!(p=f.n()).done;){var h=p.value,g=h.count;t(h.res,g)}}catch(m){f.e(m)}finally{f.f()}}return d}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var e=this.options.indent;if(!Number.isInteger(e)||e<=0){var t=JSON.stringify(e);throw new Error('"indent" option must be a positive integer, not '.concat(t))}this.setSchema();var n=[],r=!1;if(this.version){var i="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?i="%YAML:1.0":"1.1"===this.version&&(i="%YAML 1.1")),n.push(i),r=!0}var a=this.listNonDefaultTags();this.tagPrefixes.forEach((function(e){var t=e.handle,i=e.prefix;a.some((function(e){return 0===e.indexOf(i)}))&&(n.push("%TAG ".concat(t," ").concat(i)),r=!0)})),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&(!r&&this.directivesEndMarker||n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));var o={anchors:{},doc:this,indent:"",indentStep:" ".repeat(e),stringify:ki},s=!1,u=null;if(this.contents){this.contents instanceof sn.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),o.forceBlockIndent=!!this.comment,u=this.contents.comment);var c=u?null:function(){return s=!0},l=ki(this.contents,o,(function(){return u=null}),c);n.push(sn.addComment(l,"",u))}else void 0!==this.contents&&n.push(ki(this.contents,o));return this.comment&&(s&&!u||""===n[n.length-1]||n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join("\n")+"\n"}}]),e}();rt._defineProperty(Ii,"defaults",Si);var Fi={Document:Ii,defaultOptions:{anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},scalarOptions:Ci},Li=function(e){c(n,e);var t=l(n);function n(e){return f(this,n),t.call(this,Object.assign({},Fi.defaultOptions,e))}return n}(Fi.Document);function Pi(e,t){var n=bt.parse(e),r=new Li(t).parse(n[0]);if(n.length>1){var i="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new rt.YAMLSemanticError(n[1],i))}return r}var Ri={createNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;void 0===n&&"string"==typeof t&&(n=t,t=!0);var r=Object.assign({},Fi.Document.defaults[Fi.defaultOptions.version],Fi.defaultOptions);return new Ei.Schema(r).createNode(e,t,n)},defaultOptions:Fi.defaultOptions,Document:Li,parse:function(e,t){var n=Pi(e,t);if(n.warnings.forEach((function(e){return qr.warn(e)})),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,t){var n,r,a=[],o=i(bt.parse(e));try{for(o.s();!(r=o.n()).done;){var s=r.value,u=new Li(t);u.parse(s,n),a.push(u),n=u}}catch(c){o.e(c)}finally{o.f()}return a},parseCST:bt.parse,parseDocument:Pi,scalarOptions:Fi.scalarOptions,stringify:function(e,t){var n=new Li(t);return n.contents=e,String(n)}},Mi={Type:rt.Type,YAMLError:rt.YAMLError,YAMLReferenceError:rt.YAMLReferenceError,YAMLSemanticError:rt.YAMLSemanticError,YAMLSyntaxError:rt.YAMLSyntaxError,YAMLWarning:rt.YAMLWarning,findPair:sn.findPair,parseMap:sn.resolveMap,parseSeq:sn.resolveSeq,stringifyNumber:sn.stringifyNumber,stringifyString:sn.stringifyString,toJSON:sn.toJSON},Bi={findPair:Mi.findPair,toJSON:Mi.toJSON,parseMap:Mi.parseMap,parseSeq:Mi.parseSeq,stringifyNumber:Mi.stringifyNumber,stringifyString:Mi.stringifyString,Type:Mi.Type,YAMLError:Mi.YAMLError,YAMLReferenceError:Mi.YAMLReferenceError,YAMLSemanticError:Mi.YAMLSemanticError,YAMLSyntaxError:Mi.YAMLSyntaxError,YAMLWarning:Mi.YAMLWarning},ji=m((function(e,t){t.__esModule=!0,t.Document=Ri.Document;var n=Ri;t.parseCST=n.parseCST,t.YAMLError=Bi.YAMLError,t.YAMLSyntaxError=Bi.YAMLSyntaxError,t.YAMLSemanticError=Bi.YAMLSemanticError})),Ui=m((function(e,t){t.__esModule=!0,t.parse=function(e){var t=ji.parseCST(e);ze.addOrigRange(t);for(var n=t.map((function(e){return new ji.Document({merge:!1,keepCstNodes:!0}).parse(e)})),r=[],i={text:e,locator:new C.default(e),comments:r,transformOffset:function(e){return Ue.transformOffset(e,i)},transformRange:function(e){return Ve.transformRange(e,i)},transformNode:function(e){return Re.transformNode(e,i)},transformContent:function(e){return z.transformContent(e,i)}},a=0,o=n;a"']/g,Q=RegExp(J.source),X=RegExp($.source),Z=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,te=/<%=([\s\S]+?)%>/g,ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ae=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ae.source),se=/^\s+|\s+$/g,ue=/^\s+/,ce=/\s+$/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,de=/\{\n\/\* \[wrapped with (.+)\] \*/,pe=/,? & /,fe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/\\(\\)?/g,ge=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,_e=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,De=/^(?:0|[1-9]\d*)$/,Ee=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ce=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",Te="a-z\\xdf-\\xf6\\xf8-\\xff",we="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\ufe0e\\ufe0f",Oe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ne="['\u2019]",Ie="[\\ud800-\\udfff]",Fe="["+Oe+"]",Le="["+xe+"]",Pe="\\d+",Re="[\\u2700-\\u27bf]",Me="["+Te+"]",Be="[^\\ud800-\\udfff"+Oe+Pe+ke+Te+we+"]",je="\\ud83c[\\udffb-\\udfff]",Ue="[^\\ud800-\\udfff]",Ve="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+we+"]",We="(?:"+Me+"|"+Be+")",Ke="(?:"+He+"|"+Be+")",qe="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ge="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+Le+"|"+je+")"+"?",Je="[\\ufe0e\\ufe0f]?",$e=Je+Ye+("(?:\\u200d(?:"+[Ue,Ve,ze].join("|")+")"+Je+Ye+")*"),Qe="(?:"+[Re,Ve,ze].join("|")+")"+$e,Xe="(?:"+[Ue+Le+"?",Le,Ve,ze,Ie].join("|")+")",Ze=RegExp(Ne,"g"),et=RegExp(Le,"g"),tt=RegExp(je+"(?="+je+")|"+Xe+$e,"g"),nt=RegExp([He+"?"+Me+"+"+qe+"(?="+[Fe,He,"$"].join("|")+")",Ke+"+"+Ge+"(?="+[Fe,He+We,"$"].join("|")+")",He+"?"+We+"+"+qe,He+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Qe].join("|"),"g"),rt=RegExp("[\\u200d\\ud800-\\udfff"+xe+Ae+"]"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ot=-1,st={};st[M]=st[B]=st[j]=st[U]=st[V]=st[z]=st[H]=st[W]=st[K]=!0,st[y]=st[b]=st[P]=st[D]=st[R]=st[E]=st[C]=st[S]=st[k]=st[T]=st[w]=st[O]=st[N]=st[I]=st[L]=!1;var ut={};ut[y]=ut[b]=ut[P]=ut[R]=ut[D]=ut[E]=ut[M]=ut[B]=ut[j]=ut[U]=ut[V]=ut[k]=ut[T]=ut[w]=ut[O]=ut[N]=ut[I]=ut[F]=ut[z]=ut[H]=ut[W]=ut[K]=!0,ut[C]=ut[S]=ut[L]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,dt=parseInt,pt="object"==typeof e&&e&&e.Object===Object&&e,ft="object"==typeof self&&self&&self.Object===Object&&self,ht=pt||ft||Function("return this")(),gt=t&&!t.nodeType&&t,mt=gt&&"object"==typeof r&&r&&!r.nodeType&&r,_t=mt&&mt.exports===gt,vt=_t&&pt.process,yt=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||vt&&vt.binding&&vt.binding("util")}catch(t){}}(),bt=yt&&yt.isArrayBuffer,Dt=yt&&yt.isDate,Et=yt&&yt.isMap,Ct=yt&&yt.isRegExp,St=yt&&yt.isSet,xt=yt&&yt.isTypedArray;function kt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Tt(e,t,n,r){for(var i=-1,a=null==e?0:e.length;++i-1}function Ft(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function tn(e,t){for(var n=e.length;n--&&zt(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var rn=Gt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=Gt({"&":"&","<":"<",">":">",'"':""","'":"'"});function on(e){return"\\"+ct[e]}function sn(e){return rt.test(e)}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function cn(e,t){return function(n){return e(t(n))}}function ln(e,t){for(var n=-1,r=e.length,i=0,a=[];++n",""":'"',"'":"'"});var mn=function e(t){var n=(t=null==t?ht:mn.defaults(ht.Object(),t,mn.pick(ht,at))).Array,r=t.Date,i=t.Error,xe=t.Function,ke=t.Math,Te=t.Object,we=t.RegExp,Ae=t.String,Oe=t.TypeError,Ne=n.prototype,Ie=xe.prototype,Fe=Te.prototype,Le=t["__core-js_shared__"],Pe=Ie.toString,Re=Fe.hasOwnProperty,Me=0,Be=function(){var e=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),je=Fe.toString,Ue=Pe.call(Te),Ve=ht._,ze=we("^"+Pe.call(Re).replace(ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=_t?t.Buffer:a,We=t.Symbol,Ke=t.Uint8Array,qe=He?He.allocUnsafe:a,Ge=cn(Te.getPrototypeOf,Te),Ye=Te.create,Je=Fe.propertyIsEnumerable,$e=Ne.splice,Qe=We?We.isConcatSpreadable:a,Xe=We?We.iterator:a,tt=We?We.toStringTag:a,rt=function(){try{var e=da(Te,"defineProperty");return e({},"",{}),e}catch(t){}}(),ct=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,pt=r&&r.now!==ht.Date.now&&r.now,ft=t.setTimeout!==ht.setTimeout&&t.setTimeout,gt=ke.ceil,mt=ke.floor,vt=Te.getOwnPropertySymbols,yt=He?He.isBuffer:a,jt=t.isFinite,Gt=Ne.join,_n=cn(Te.keys,Te),vn=ke.max,yn=ke.min,bn=r.now,Dn=t.parseInt,En=ke.random,Cn=Ne.reverse,Sn=da(t,"DataView"),xn=da(t,"Map"),kn=da(t,"Promise"),Tn=da(t,"Set"),wn=da(t,"WeakMap"),An=da(Te,"create"),On=wn&&new wn,Nn={},In=Ba(Sn),Fn=Ba(xn),Ln=Ba(kn),Pn=Ba(Tn),Rn=Ba(wn),Mn=We?We.prototype:a,Bn=Mn?Mn.valueOf:a,jn=Mn?Mn.toString:a;function Un(e){if(ns(e)&&!Ko(e)&&!(e instanceof Wn)){if(e instanceof Hn)return e;if(Re.call(e,"__wrapped__"))return ja(e)}return new Hn(e)}var Vn=function(){function e(){}return function(t){if(!ts(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=a,n}}();function zn(){}function Hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=a}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=_,this.__views__=[]}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ur(e,t,n,r,i,o){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=i?n(e,r,i,o):n(e)),s!==a)return s;if(!ts(e))return e;var d=Ko(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Ai(e,s)}else{var p=ha(e),f=p==S||p==x;if(Jo(e))return Ci(e,u);if(p==w||p==y||f&&!i){if(s=c||f?{}:ma(e),!u)return c?function(e,t){return Oi(e,fa(e),t)}(e,function(e,t){return e&&Oi(t,Fs(t),e)}(s,e)):function(e,t){return Oi(e,pa(e),t)}(e,ir(s,e))}else{if(!ut[p])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case P:return Si(e);case D:case E:return new r(+e);case R:return function(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case B:case j:case U:case V:case z:case H:case W:case K:return xi(e,n);case k:return new r;case T:case I:return new r(e);case O:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case N:return new r;case F:return i=e,Bn?Te(Bn.call(i)):{}}var i}(e,p,u)}}o||(o=new Jn);var h=o.get(e);if(h)return h;o.set(e,s),ss(e)?e.forEach((function(r){s.add(ur(r,t,n,r,e,o))})):rs(e)&&e.forEach((function(r,i){s.set(i,ur(r,t,n,i,e,o))}));var g=d?a:(l?c?ia:ra:c?Fs:Is)(e);return wt(g||e,(function(r,i){g&&(r=e[i=r]),tr(s,i,ur(r,t,n,i,e,o))})),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Te(e);r--;){var i=n[r],o=t[i],s=e[i];if(s===a&&!(i in e)||!o(s))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Oe(o);return Na((function(){e.apply(a,n)}),t)}function dr(e,t,n,r){var i=-1,a=It,o=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Lt(t,Qt(n))),r?(a=Ft,o=!1):t.length>=200&&(a=Zt,o=!1,t=new Yn(t));e:for(;++i-1},qn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(xn||qn),string:new Kn}},Gn.prototype.delete=function(e){var t=ca(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return ca(this,e).get(e)},Gn.prototype.has=function(e){return ca(this,e).has(e)},Gn.prototype.set=function(e,t){var n=ca(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,s),this},Yn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.clear=function(){this.__data__=new qn,this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Jn.prototype.get=function(e){return this.__data__.get(e)},Jn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var pr=Fi(br),fr=Fi(Dr,!0);function hr(e,t){var n=!0;return pr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function gr(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?_r(s,t-1,n,r,i):Pt(i,s):r||(i[i.length]=s)}return i}var vr=Li(),yr=Li(!0);function br(e,t){return e&&vr(e,t,Is)}function Dr(e,t){return e&&yr(e,t,Is)}function Er(e,t){return Nt(t,(function(t){return Xo(e[t])}))}function Cr(e,t){for(var n=0,r=(t=yi(t,e)).length;null!=e&&nt}function Tr(e,t){return null!=e&&Re.call(e,t)}function wr(e,t){return null!=e&&t in Te(e)}function Ar(e,t,r){for(var i=r?Ft:It,o=e[0].length,s=e.length,u=s,c=n(s),l=1/0,d=[];u--;){var p=e[u];u&&t&&(p=Lt(p,Qt(t))),l=yn(p.length,l),c[u]=!r&&(t||o>=120&&p.length>=120)?new Yn(u&&p):a}p=e[0];var f=-1,h=c[0];e:for(;++f=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Kr(e,t,n){for(var r=-1,i=t.length,a={};++r-1;)s!==e&&$e.call(s,u,1),$e.call(e,u,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;va(i)?$e.call(e,i,1):di(e,i)}}return e}function Yr(e,t){return e+mt(En()*(t-e+1))}function Jr(e,t){var n="";if(!e||t<1||t>g)return n;do{t%2&&(n+=e),(t=mt(t/2))&&(e+=e)}while(t);return n}function $r(e,t){return Ia(ka(e,t,iu),e+"")}function Qr(e){return Qn(Vs(e))}function Xr(e,t){var n=Vs(e);return Pa(n,sr(t,0,n.length))}function Zr(e,t,n,r){if(!ts(e))return e;for(var i=-1,o=(t=yi(t,e)).length,s=o-1,u=e;null!=u&&++ia?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var o=n(a);++i>>1,o=e[a];null!==o&&!cs(o)&&(n?o<=t:o=200){var c=t?null:Ji(e);if(c)return dn(c);o=!1,i=Zt,u=new Yn}else u=t?[]:s;e:for(;++r=r?e:ri(e,t,n)}var Ei=ct||function(e){return ht.clearTimeout(e)};function Ci(e,t){if(t)return e.slice();var n=e.length,r=qe?qe(n):new e.constructor(n);return e.copy(r),r}function Si(e){var t=new e.constructor(e.byteLength);return new Ke(t).set(new Ke(e)),t}function xi(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ki(e,t){if(e!==t){var n=e!==a,r=null===e,i=e===e,o=cs(e),s=t!==a,u=null===t,c=t===t,l=cs(t);if(!u&&!l&&!o&&e>t||o&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!o&&!l&&e1?n[i-1]:a,s=i>2?n[2]:a;for(o=e.length>3&&"function"==typeof o?(i--,o):a,s&&ya(n[0],n[1],s)&&(o=i<3?a:o,i=1),t=Te(t);++r-1?i[o?t[s]:s]:a}}function ji(e){return na((function(t){var n=t.length,r=n,i=Hn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Oe(o);if(i&&!u&&"wrapper"==oa(s))var u=new Hn([],!0)}for(r=u?r:n;++r1&&y.reverse(),f&&lu))return!1;var l=o.get(e),d=o.get(t);if(l&&d)return l==t&&d==e;var p=-1,f=!0,h=2&n?new Yn:a;for(o.set(e,t),o.set(t,e);++p-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return wt(v,(function(n){var r="_."+n[0];t&n[1]&&!It(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(de);return t?t[1].split(pe):[]}(r),n)))}function La(e){var t=0,n=0;return function(){var r=bn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(a,arguments)}}function Pa(e,t){var n=-1,r=e.length,i=r-1;for(t=t===a?r:t;++n1?e[t-1]:a;return n="function"==typeof n?(e.pop(),n):a,ao(e,n)}));function fo(e){var t=Un(e);return t.__chain__=!0,t}function ho(e,t){return t(e)}var go=na((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Wn&&va(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ho,args:[i],thisArg:a}),new Hn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(a),e}))):this.thru(i)}));var mo=Ni((function(e,t,n){Re.call(e,n)?++e[n]:ar(e,n,1)}));var _o=Bi(Ha),vo=Bi(Wa);function yo(e,t){return(Ko(e)?wt:pr)(e,ua(t,3))}function bo(e,t){return(Ko(e)?At:fr)(e,ua(t,3))}var Do=Ni((function(e,t,n){Re.call(e,n)?e[n].push(t):ar(e,n,[t])}));var Eo=$r((function(e,t,r){var i=-1,a="function"==typeof t,o=Go(e)?n(e.length):[];return pr(e,(function(e){o[++i]=a?kt(t,e,r):Or(e,t,r)})),o})),Co=Ni((function(e,t,n){ar(e,n,t)}));function So(e,t){return(Ko(e)?Lt:jr)(e,ua(t,3))}var xo=Ni((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ko=$r((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ya(e,t[0],t[1])?t=[]:n>2&&ya(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,_r(t,1),[])})),To=pt||function(){return ht.Date.now()};function wo(e,t,n){return t=n?a:t,t=e&&null==t?e.length:t,Qi(e,p,a,a,a,a,t)}function Ao(e,t){var n;if("function"!=typeof t)throw new Oe(o);return e=gs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=a),n}}var Oo=$r((function(e,t,n){var r=1;if(n.length){var i=ln(n,sa(Oo));r|=l}return Qi(e,r,t,n,i)})),No=$r((function(e,t,n){var r=3;if(n.length){var i=ln(n,sa(No));r|=l}return Qi(t,r,e,n,i)}));function Io(e,t,n){var r,i,s,u,c,l,d=0,p=!1,f=!1,h=!0;if("function"!=typeof e)throw new Oe(o);function g(t){var n=r,o=i;return r=i=a,d=t,u=e.apply(o,n)}function m(e){return d=e,c=Na(v,t),p?g(e):u}function _(e){var n=e-l;return l===a||n>=t||n<0||f&&e-d>=s}function v(){var e=To();if(_(e))return y(e);c=Na(v,function(e){var n=t-(e-l);return f?yn(n,s-(e-d)):n}(e))}function y(e){return c=a,h&&r?g(e):(r=i=a,u)}function b(){var e=To(),n=_(e);if(r=arguments,i=this,l=e,n){if(c===a)return m(l);if(f)return Ei(c),c=Na(v,t),g(l)}return c===a&&(c=Na(v,t)),u}return t=_s(t)||0,ts(n)&&(p=!!n.leading,s=(f="maxWait"in n)?vn(_s(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),b.cancel=function(){c!==a&&Ei(c),d=0,r=l=i=c=a},b.flush=function(){return c===a?u:y(To())},b}var Fo=$r((function(e,t){return lr(e,1,t)})),Lo=$r((function(e,t,n){return lr(e,_s(t)||0,n)}));function Po(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(o);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Po.Cache||Gn),n}function Ro(e){if("function"!=typeof e)throw new Oe(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Po.Cache=Gn;var Mo=bi((function(e,t){var n=(t=1==t.length&&Ko(t[0])?Lt(t[0],Qt(ua())):Lt(_r(t,1),Qt(ua()))).length;return $r((function(r){for(var i=-1,a=yn(r.length,n);++i=t})),Wo=Nr(function(){return arguments}())?Nr:function(e){return ns(e)&&Re.call(e,"callee")&&!Je.call(e,"callee")},Ko=n.isArray,qo=bt?Qt(bt):function(e){return ns(e)&&xr(e)==P};function Go(e){return null!=e&&es(e.length)&&!Xo(e)}function Yo(e){return ns(e)&&Go(e)}var Jo=yt||_u,$o=Dt?Qt(Dt):function(e){return ns(e)&&xr(e)==E};function Qo(e){if(!ns(e))return!1;var t=xr(e);return t==C||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!as(e)}function Xo(e){if(!ts(e))return!1;var t=xr(e);return t==S||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Zo(e){return"number"==typeof e&&e==gs(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=g}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=Et?Qt(Et):function(e){return ns(e)&&ha(e)==k};function is(e){return"number"==typeof e||ns(e)&&xr(e)==T}function as(e){if(!ns(e)||xr(e)!=w)return!1;var t=Ge(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Pe.call(n)==Ue}var os=Ct?Qt(Ct):function(e){return ns(e)&&xr(e)==O};var ss=St?Qt(St):function(e){return ns(e)&&ha(e)==N};function us(e){return"string"==typeof e||!Ko(e)&&ns(e)&&xr(e)==I}function cs(e){return"symbol"==typeof e||ns(e)&&xr(e)==F}var ls=xt?Qt(xt):function(e){return ns(e)&&es(e.length)&&!!st[xr(e)]};var ds=qi(Br),ps=qi((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Go(e))return us(e)?hn(e):Ai(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=ha(e);return(t==k?un:t==N?dn:Vs)(e)}function hs(e){return e?(e=_s(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function gs(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function ms(e){return e?sr(gs(e),0,_):0}function _s(e){if("number"==typeof e)return e;if(cs(e))return m;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(se,"");var n=ve.test(e);return n||be.test(e)?dt(e.slice(2),n?2:8):_e.test(e)?m:+e}function vs(e){return Oi(e,Fs(e))}function ys(e){return null==e?"":ci(e)}var bs=Ii((function(e,t){if(Ca(t)||Go(t))Oi(t,Is(t),e);else for(var n in t)Re.call(t,n)&&tr(e,n,t[n])})),Ds=Ii((function(e,t){Oi(t,Fs(t),e)})),Es=Ii((function(e,t,n,r){Oi(t,Fs(t),e,r)})),Cs=Ii((function(e,t,n,r){Oi(t,Is(t),e,r)})),Ss=na(or);var xs=$r((function(e,t){e=Te(e);var n=-1,r=t.length,i=r>2?t[2]:a;for(i&&ya(t[0],t[1],i)&&(r=1);++n1),t})),Oi(e,ia(e),n),r&&(n=ur(n,7,ea));for(var i=t.length;i--;)di(n,t[i]);return n}));var Ms=na((function(e,t){return null==e?{}:function(e,t){return Kr(e,t,(function(t,n){return ws(e,n)}))}(e,t)}));function Bs(e,t){if(null==e)return{};var n=Lt(ia(e),(function(e){return[e]}));return t=ua(t),Kr(e,n,(function(e,n){return t(e,n[0])}))}var js=$i(Is),Us=$i(Fs);function Vs(e){return null==e?[]:Xt(e,Is(e))}var zs=Ri((function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)}));function Hs(e){return Qs(ys(e).toLowerCase())}function Ws(e){return(e=ys(e))&&e.replace(Ee,rn).replace(et,"")}var Ks=Ri((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),qs=Ri((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Gs=Pi("toLowerCase");var Ys=Ri((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Js=Ri((function(e,t,n){return e+(n?" ":"")+Qs(t)}));var $s=Ri((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qs=Pi("toUpperCase");function Xs(e,t,n){return e=ys(e),(t=n?a:t)===a?function(e){return it.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(fe)||[]}(e):e.match(t)||[]}var Zs=$r((function(e,t){try{return kt(e,a,t)}catch(n){return Qo(n)?n:new i(n)}})),eu=na((function(e,t){return wt(t,(function(t){t=Ma(t),ar(e,t,Oo(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=ji(),ru=ji(!0);function iu(e){return e}function au(e){return Pr("function"==typeof e?e:ur(e,1))}var ou=$r((function(e,t){return function(n){return Or(n,e,t)}})),su=$r((function(e,t){return function(n){return Or(e,n,t)}}));function uu(e,t,n){var r=Is(t),i=Er(t,r);null!=n||ts(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Er(t,Is(t)));var a=!(ts(n)&&"chain"in n)||!!n.chain,o=Xo(e);return wt(i,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__),i=n.__actions__=Ai(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Pt([this.value()],arguments))})})),e}function cu(){}var lu=Hi(Lt),du=Hi(Ot),pu=Hi(Bt);function fu(e){return ba(e)?qt(Ma(e)):function(e){return function(t){return Cr(t,e)}}(e)}var hu=Ki(),gu=Ki(!0);function mu(){return[]}function _u(){return!1}var vu=zi((function(e,t){return e+t}),0),yu=Yi("ceil"),bu=zi((function(e,t){return e/t}),1),Du=Yi("floor");var Eu=zi((function(e,t){return e*t}),1),Cu=Yi("round"),Su=zi((function(e,t){return e-t}),0);return Un.after=function(e,t){if("function"!=typeof t)throw new Oe(o);return e=gs(e),function(){if(--e<1)return t.apply(this,arguments)}},Un.ary=wo,Un.assign=bs,Un.assignIn=Ds,Un.assignInWith=Es,Un.assignWith=Cs,Un.at=Ss,Un.before=Ao,Un.bind=Oo,Un.bindAll=eu,Un.bindKey=No,Un.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ko(e)?e:[e]},Un.chain=fo,Un.chunk=function(e,t,r){t=(r?ya(e,t,r):t===a)?1:vn(gs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,u=n(gt(i/t));oi?0:i+n),(r=r===a||r>i?i:gs(r))<0&&(r+=i),r=n>r?0:ms(r);n>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ci(t))&&sn(e)?Di(hn(e),0,n):e.split(t,n):[]},Un.spread=function(e,t){if("function"!=typeof e)throw new Oe(o);return t=null==t?0:vn(gs(t),0),$r((function(n){var r=n[t],i=Di(n,0,t);return r&&Pt(i,r),kt(e,this,i)}))},Un.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Un.take=function(e,t,n){return e&&e.length?ri(e,0,(t=n||t===a?1:gs(t))<0?0:t):[]},Un.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=r-(t=n||t===a?1:gs(t)))<0?0:t,r):[]},Un.takeRightWhile=function(e,t){return e&&e.length?fi(e,ua(t,3),!1,!0):[]},Un.takeWhile=function(e,t){return e&&e.length?fi(e,ua(t,3)):[]},Un.tap=function(e,t){return t(e),e},Un.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Oe(o);return ts(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Io(e,t,{leading:r,maxWait:t,trailing:i})},Un.thru=ho,Un.toArray=fs,Un.toPairs=js,Un.toPairsIn=Us,Un.toPath=function(e){return Ko(e)?Lt(e,Ma):cs(e)?[e]:Ai(Ra(ys(e)))},Un.toPlainObject=vs,Un.transform=function(e,t,n){var r=Ko(e),i=r||Jo(e)||ls(e);if(t=ua(t,4),null==n){var a=e&&e.constructor;n=i?r?new a:[]:ts(e)&&Xo(a)?Vn(Ge(e)):{}}return(i?wt:br)(e,(function(e,r,i){return t(n,e,r,i)})),n},Un.unary=function(e){return wo(e,1)},Un.union=to,Un.unionBy=no,Un.unionWith=ro,Un.uniq=function(e){return e&&e.length?li(e):[]},Un.uniqBy=function(e,t){return e&&e.length?li(e,ua(t,2)):[]},Un.uniqWith=function(e,t){return t="function"==typeof t?t:a,e&&e.length?li(e,a,t):[]},Un.unset=function(e,t){return null==e||di(e,t)},Un.unzip=io,Un.unzipWith=ao,Un.update=function(e,t,n){return null==e?e:pi(e,t,vi(n))},Un.updateWith=function(e,t,n,r){return r="function"==typeof r?r:a,null==e?e:pi(e,t,vi(n),r)},Un.values=Vs,Un.valuesIn=function(e){return null==e?[]:Xt(e,Fs(e))},Un.without=oo,Un.words=Xs,Un.wrap=function(e,t){return Bo(vi(t),e)},Un.xor=so,Un.xorBy=uo,Un.xorWith=co,Un.zip=lo,Un.zipObject=function(e,t){return mi(e||[],t||[],tr)},Un.zipObjectDeep=function(e,t){return mi(e||[],t||[],Zr)},Un.zipWith=po,Un.entries=js,Un.entriesIn=Us,Un.extend=Ds,Un.extendWith=Es,uu(Un,Un),Un.add=vu,Un.attempt=Zs,Un.camelCase=zs,Un.capitalize=Hs,Un.ceil=yu,Un.clamp=function(e,t,n){return n===a&&(n=t,t=a),n!==a&&(n=(n=_s(n))===n?n:0),t!==a&&(t=(t=_s(t))===t?t:0),sr(_s(e),t,n)},Un.clone=function(e){return ur(e,4)},Un.cloneDeep=function(e){return ur(e,5)},Un.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:a)},Un.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:a)},Un.conformsTo=function(e,t){return null==t||cr(e,t,Is(t))},Un.deburr=Ws,Un.defaultTo=function(e,t){return null==e||e!==e?t:e},Un.divide=bu,Un.endsWith=function(e,t,n){e=ys(e),t=ci(t);var r=e.length,i=n=n===a?r:sr(gs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Un.eq=Vo,Un.escape=function(e){return(e=ys(e))&&X.test(e)?e.replace($,an):e},Un.escapeRegExp=function(e){return(e=ys(e))&&oe.test(e)?e.replace(ae,"\\$&"):e},Un.every=function(e,t,n){var r=Ko(e)?Ot:hr;return n&&ya(e,t,n)&&(t=a),r(e,ua(t,3))},Un.find=_o,Un.findIndex=Ha,Un.findKey=function(e,t){return Ut(e,ua(t,3),br)},Un.findLast=vo,Un.findLastIndex=Wa,Un.findLastKey=function(e,t){return Ut(e,ua(t,3),Dr)},Un.floor=Du,Un.forEach=yo,Un.forEachRight=bo,Un.forIn=function(e,t){return null==e?e:vr(e,ua(t,3),Fs)},Un.forInRight=function(e,t){return null==e?e:yr(e,ua(t,3),Fs)},Un.forOwn=function(e,t){return e&&br(e,ua(t,3))},Un.forOwnRight=function(e,t){return e&&Dr(e,ua(t,3))},Un.get=Ts,Un.gt=zo,Un.gte=Ho,Un.has=function(e,t){return null!=e&&ga(e,t,Tr)},Un.hasIn=ws,Un.head=qa,Un.identity=iu,Un.includes=function(e,t,n,r){e=Go(e)?e:Vs(e),n=n&&!r?gs(n):0;var i=e.length;return n<0&&(n=vn(i+n,0)),us(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&zt(e,t,n)>-1},Un.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=vn(r+i,0)),zt(e,t,i)},Un.inRange=function(e,t,n){return t=hs(t),n===a?(n=t,t=0):n=hs(n),function(e,t,n){return e>=yn(t,n)&&e=-9007199254740991&&e<=g},Un.isSet=ss,Un.isString=us,Un.isSymbol=cs,Un.isTypedArray=ls,Un.isUndefined=function(e){return e===a},Un.isWeakMap=function(e){return ns(e)&&ha(e)==L},Un.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==xr(e)},Un.join=function(e,t){return null==e?"":Gt.call(e,t)},Un.kebabCase=Ks,Un.last=$a,Un.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==a&&(i=(i=gs(n))<0?vn(r+i,0):yn(i,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Vt(e,Wt,i,!0)},Un.lowerCase=qs,Un.lowerFirst=Gs,Un.lt=ds,Un.lte=ps,Un.max=function(e){return e&&e.length?gr(e,iu,kr):a},Un.maxBy=function(e,t){return e&&e.length?gr(e,ua(t,2),kr):a},Un.mean=function(e){return Kt(e,iu)},Un.meanBy=function(e,t){return Kt(e,ua(t,2))},Un.min=function(e){return e&&e.length?gr(e,iu,Br):a},Un.minBy=function(e,t){return e&&e.length?gr(e,ua(t,2),Br):a},Un.stubArray=mu,Un.stubFalse=_u,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=Eu,Un.nth=function(e,t){return e&&e.length?Hr(e,gs(t)):a},Un.noConflict=function(){return ht._===this&&(ht._=Ve),this},Un.noop=cu,Un.now=To,Un.pad=function(e,t,n){e=ys(e);var r=(t=gs(t))?fn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Wi(mt(i),n)+e+Wi(gt(i),n)},Un.padEnd=function(e,t,n){e=ys(e);var r=(t=gs(t))?fn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=En();return yn(e+i*(t-e+lt("1e-"+((i+"").length-1))),t)}return Yr(e,t)},Un.reduce=function(e,t,n){var r=Ko(e)?Rt:Yt,i=arguments.length<3;return r(e,ua(t,4),n,i,pr)},Un.reduceRight=function(e,t,n){var r=Ko(e)?Mt:Yt,i=arguments.length<3;return r(e,ua(t,4),n,i,fr)},Un.repeat=function(e,t,n){return t=(n?ya(e,t,n):t===a)?1:gs(t),Jr(ys(e),t)},Un.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Un.result=function(e,t,n){var r=-1,i=(t=yi(t,e)).length;for(i||(i=1,e=a);++rg)return[];var n=_,r=yn(e,_);t=ua(t),e-=_;for(var i=$t(r,t);++n=o)return e;var u=n-fn(r);if(u<1)return r;var c=s?Di(s,0,u).join(""):e.slice(0,u);if(i===a)return c+r;if(s&&(u+=c.length-u),os(i)){if(e.slice(u).search(i)){var l,d=c;for(i.global||(i=we(i.source,ys(me.exec(i))+"g")),i.lastIndex=0;l=i.exec(d);)var p=l.index;c=c.slice(0,p===a?u:p)}}else if(e.indexOf(ci(i),u)!=u){var f=c.lastIndexOf(i);f>-1&&(c=c.slice(0,f))}return c+r},Un.unescape=function(e){return(e=ys(e))&&Q.test(e)?e.replace(J,gn):e},Un.uniqueId=function(e){var t=++Me;return ys(e)+t},Un.upperCase=$s,Un.upperFirst=Qs,Un.each=yo,Un.eachRight=bo,Un.first=qa,uu(Un,function(){var e={};return br(Un,(function(t,n){Re.call(Un.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Un.VERSION="4.17.20",wt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Un[e].placeholder=Un})),wt(["drop","take"],(function(e,t){Wn.prototype[e]=function(n){n=n===a?1:vn(gs(n),0);var r=this.__filtered__&&!t?new Wn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,_),type:e+(r.__dir__<0?"Right":"")}),r},Wn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),wt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ua(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),wt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}})),wt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}})),Wn.prototype.compact=function(){return this.filter(iu)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=$r((function(e,t){return"function"==typeof e?new Wn(this):this.map((function(n){return Or(n,e,t)}))})),Wn.prototype.reject=function(e){return this.filter(Ro(ua(e)))},Wn.prototype.slice=function(e,t){e=gs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Wn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==a&&(n=(t=gs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(_)},br(Wn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Un[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(Un.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Wn,c=s[0],l=u||Ko(t),d=function(e){var t=i.apply(Un,Pt([e],s));return r&&p?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,f=!!this.__actions__.length,h=o&&!p,g=u&&!f;if(!o&&l){t=g?t:new Wn(this);var m=e.apply(t,s);return m.__actions__.push({func:ho,args:[d],thisArg:a}),new Hn(m,p)}return h&&g?e.apply(this,s):(m=this.thru(d),h?r?m.value()[0]:m.value():m)})})),wt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ne[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Un.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ko(i)?i:[],e)}return this[n]((function(n){return t.apply(Ko(n)?n:[],e)}))}})),br(Wn.prototype,(function(e,t){var n=Un[t];if(n){var r=n.name+"";Re.call(Nn,r)||(Nn[r]=[]),Nn[r].push({name:t,func:n})}})),Nn[Ui(a,2).name]=[{name:"wrapper",func:a}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=Ai(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ai(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ai(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ko(e),r=t<0,i=n?e.length:0,a=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?a:this.__values__[this.__index__++]}},Un.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var r=ja(n);r.__index__=0,r.__values__=a,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Un.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wn){var t=e;return this.__actions__.length&&(t=new Wn(this)),(t=t.reverse()).__actions__.push({func:ho,args:[eo],thisArg:a}),new Hn(t,this.__chain__)}return this.thru(eo)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return hi(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,Xe&&(Un.prototype[Xe]=function(){return this}),Un}();ht._=mn,(i=function(){return mn}.call(t,n,t,r))===a||(r.exports=i)}).call(this)}).call(this,n(163),n(512)(e))},function(e,t,n){"use strict";n(256);var r=n(99),i=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var a=Symbol.for;i=a("react.element"),t.Fragment=a("react.fragment")}var o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,a={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:l,props:a,_owner:o.current}}t.jsx=c,t.jsxs=c},function(e,t,n){"use strict";var r=n(256),i=60103,a=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var o=60109,s=60110,u=60112;t.Suspense=60113;var c=60115,l=60116;if("function"===typeof Symbol&&Symbol.for){var d=Symbol.for;i=d("react.element"),a=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),o=d("react.provider"),s=d("react.context"),u=d("react.forward_ref"),t.Suspense=d("react.suspense"),c=d("react.memo"),l=d("react.lazy")}var p="function"===typeof Symbol&&Symbol.iterator;function f(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n

    >>0?1:0)|0,L=I,P=F,I=O,F=N,O=w,N=A,w=X+(K=Y+K+((G=J+ee)>>>0>>0?1:0))+((A=$+G|0)>>>0<$>>>0?1:0)|0}f=n.low=f+A,n.high=p+w+(f>>>0>>0?1:0),g=r.low=g+N,r.high=h+O+(g>>>0>>0?1:0),_=i.low=_+F,i.high=m+I+(_>>>0>>0?1:0),y=a.low=y+P,a.high=v+L+(y>>>0

    >>0?1:0),D=o.low=D+M,o.high=b+R+(D>>>0>>0?1:0),C=c.low=C+j,c.high=E+B+(C>>>0>>0?1:0),x=l.low=x+V,l.high=S+U+(x>>>0>>0?1:0),T=d.low=T+H,d.high=k+z+(T>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32}),n.SHA512=r._createHelper(o),n.HmacSHA512=r._createHmacHelper(o)}(),function(){var e=t,n=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),s=a.words,u=o.words,c=0;c>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new o.init(n,t/2)}},c=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new o.init(n,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(s){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},d=r.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,i=e.min(4*t,i),t){for(var u=0;uc;c++){if(16>c)i[c]=0|e[t+c];else{var l=i[c-3]^i[c-8]^i[c-14]^i[c-16];i[c]=l<<1|l>>>31}l=(r<<5|r>>>27)+u+i[c],l=20>c?l+(1518500249+(a&o|~a&s)):40>c?l+(1859775393+(a^o^s)):60>c?l+((a&o|a&s|o&s)-1894007588):l+((a^o^s)-899497514),u=s,s=o,o=a<<30|a>>>2,a=r,r=l}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=r._createHelper(a),e.HmacSHA1=r._createHmacHelper(a)}(),function(){var e=t,n=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),s=a.words,u=o.words,c=0;c>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new o.init(n,t/2)}},c=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new o.init(n,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},d=r.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,i=e.min(4*t,i),t){for(var u=0;uc;c++){if(16>c)i[c]=0|e[t+c];else{var l=i[c-3]^i[c-8]^i[c-14]^i[c-16];i[c]=l<<1|l>>>31}l=(r<<5|r>>>27)+u+i[c],l=20>c?l+(1518500249+(a&o|~a&s)):40>c?l+(1859775393+(a^o^s)):60>c?l+((a&o|a&s|o&s)-1894007588):l+((a^o^s)-899497514),u=s,s=o,o=a<<30|a>>>2,a=r,r=l}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=r._createHelper(a),e.HmacSHA1=r._createHmacHelper(a)}(),Object.defineProperty(i,"__esModule",{value:!0}),i.StandardFile=i.SFItemTransformer=i.SFCryptoWeb=i.SFCryptoJS=i.SFAbstractCrypto=i.SFItemHistoryEntry=i.SFItemHistory=i.SFHistorySession=i.SFPrivileges=i.SFPredicate=i.SFItemParams=i.SFItem=i.SFSyncManager=i.SFStorageManager=i.SFSingletonManager=i.SFSessionHistoryManager=i.SFPrivilegesManager=i.SFModelManager=i.SFMigrationManager=i.SFHttpManager=i.SFAuthManager=i.SFAlertManager=void 0;var b=function(){function e(){m(this,e)}return y(e,[{key:"alert",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){window.alert(t.text),e()})));case 1:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"confirm",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){window.confirm(t.text)?e():n()})));case 1:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()}]),e}();i.SFAlertManager=b;var D=function(){function e(t,n,r,i){m(this,e),e.DidSignOutEvent="DidSignOutEvent",e.WillSignInEvent="WillSignInEvent",e.DidSignInEvent="DidSignInEvent",this.httpManager=n,this.storageManager=t,this.alertManager=r||new b,this.$timeout=i||setTimeout.bind(window),this.eventHandlers=[]}return y(e,[{key:"addEventHandler",value:function(e){return this.eventHandlers.push(e),e}},{key:"removeEventHandler",value:function(e){_.pull(this.eventHandlers,e)}},{key:"notifyEvent",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var a,o=this.eventHandlers[Symbol.iterator]();!(n=(a=o.next()).done);n=!0)(0,a.value)(e,t||{})}catch(s){r=!0,i=s}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}},{key:"saveKeys",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._keys=t,e.next=3,this.storageManager.setItem("mk",t.mk);case 3:return e.next=5,this.storageManager.setItem("ak",t.ak);case 5:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"signout",value:function(){var t=g(r.mark((function t(n){var i=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._keys=null,this._authParams=null,!n){t.next=6;break}return t.abrupt("return",this.storageManager.clearAllData().then((function(){i.notifyEvent(e.DidSignOutEvent)})));case 6:this.notifyEvent(e.DidSignOutEvent);case 7:case"end":return t.stop()}}),t,this)})));function n(e){return t.apply(this,arguments)}return n}()},{key:"keys",value:function(){var e=g(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._keys){e.next=11;break}return e.next=3,this.storageManager.getItem("mk");case 3:if(t=e.sent){e.next=6;break}return e.abrupt("return",null);case 6:return e.t0=t,e.next=9,this.storageManager.getItem("ak");case 9:e.t1=e.sent,this._keys={mk:e.t0,ak:e.t1};case 11:return e.abrupt("return",this._keys);case 12:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getAuthParams",value:function(){var e=g(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._authParams){e.next=5;break}return e.next=3,this.storageManager.getItem("auth_params");case 3:t=e.sent,this._authParams=JSON.parse(t);case 5:if(!this._authParams||this._authParams.version){e.next=9;break}return e.next=8,this.defaultProtocolVersion();case 8:this._authParams.version=e.sent;case 9:return e.abrupt("return",this._authParams);case 10:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"defaultProtocolVersion",value:function(){var e=g(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.keys();case 2:if(!(t=e.sent)||!t.ak){e.next=7;break}return e.abrupt("return","002");case 7:return e.abrupt("return","001");case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"protocolVersion",value:function(){var e=g(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getAuthParams();case 2:if(!(t=e.sent)||!t.version){e.next=5;break}return e.abrupt("return",t.version);case 5:return e.abrupt("return",this.defaultProtocolVersion());case 6:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getAuthParamsForEmail",value:function(){var e=g(r.mark((function e(t,n,i){var a,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a=_.merge({email:n},i)).api=C.getApiVersion(),e.abrupt("return",new Promise((function(e,n){var r=t+"/auth/params";o.httpManager.getAbsolute(r,a,(function(t){e(t)}),(function(t){console.error("Error getting auth params",t),"object"!==f(t)&&(t={error:{message:"A server error occurred while trying to sign in. Please try again."}}),e(t)}))})));case 3:case"end":return e.stop()}}),e)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"isLocked",value:function(){return 1==this.locked}},{key:"unlockAndResolve",value:function(e,t){this.unlock(),e(t)}},{key:"login",value:function(){var t=g(r.mark((function t(n,i,a,o,s){var u=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=g(r.mark((function t(c,l){var d,p,h,m,v,y,b,D,E,S,x,k;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.keys();case 2:if(null==t.sent){t.next=6;break}return c({error:{message:"Cannot log in because already signed in."}}),t.abrupt("return");case 6:if(!u.isLocked()){t.next=9;break}return c({error:{message:"Login already in progress."}}),t.abrupt("return");case 9:return u.lock(),u.notifyEvent(e.WillSignInEvent),t.next=13,u.getAuthParamsForEmail(n,i,s);case 13:if((d=t.sent).identifier=i,!d.error){t.next=18;break}return u.unlockAndResolve(c,d),t.abrupt("return");case 18:if(d&&d.pw_cost){t.next=21;break}return u.unlockAndResolve(c,{error:{message:"Invalid email or password."}}),t.abrupt("return");case 21:if(SFJS.supportedVersions().includes(d.version)){t.next=25;break}return p=SFJS.isVersionNewerThanLibraryVersion(d.version)?"This version of the application does not support your newer account type. Please upgrade to the latest version of Standard Notes to sign in.":"The protocol version associated with your account is outdated and no longer supported by this application. Please visit standardnotes.org/help/security for more information.",u.unlockAndResolve(c,{error:{message:p}}),t.abrupt("return");case 25:if(!SFJS.isProtocolVersionOutdated(d.version)){t.next=32;break}return h="The encryption version for your account, ".concat(d.version,", is outdated and requires upgrade. You may proceed with login, but are advised to perform a security update using the web or desktop application. Please visit standardnotes.org/help/security for more information."),m=!1,t.next=30,u.alertManager.confirm({title:"Update Needed",text:h,confirmButtonText:"Sign In"}).catch((function(){u.unlockAndResolve(c,{error:{}}),m=!0}));case 30:if(!m){t.next=32;break}return t.abrupt("return");case 32:if(SFJS.supportsPasswordDerivationCost(d.pw_cost)){t.next=36;break}return v="Your account was created on a platform with higher security capabilities than this browser supports. If we attempted to generate your login keys here, it would take hours. Please use a browser with more up to date security capabilities, like Google Chrome or Firefox, to log in.",u.unlockAndResolve(c,{error:{message:v}}),t.abrupt("return");case 36:if(y=SFJS.costMinimumForVersion(d.version),!(d.pw_cost5&&void 0!==c[5]&&c[5],e.abrupt("return",new Promise(function(){var e=g(r.mark((function e(c,l){var d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((d=new XMLHttpRequest).onreadystatechange=function(){if(4==d.readyState){var e=d.responseText;if(e)try{e=JSON.parse(e)}catch(t){}d.status>=200&&d.status<=299?u.$timeout((function(){a(e),c(e)})):(console.error("Request error:",e),u.$timeout((function(){o(e,d.status),l(e)})))}},"get"==t&&Object.keys(i).length>0&&(n=u.urlForUrlAndParams(n,i)),d.open(t,n,!0),d.setRequestHeader("Content-type","application/json"),!s){e.next=8;break}return e.next=8,u.setAuthHeadersForRequest(d);case 8:"post"==t||"patch"==t?d.send(JSON.stringify(i)):d.send();case 9:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)})));function t(t,n,r,i,a){return e.apply(this,arguments)}return t}()},{key:"urlForUrlAndParams",value:function(e,t){var n=Object.keys(t).map((function(e){return e+"="+encodeURIComponent(t[e])})).join("&");return e.includes("?")?e+"&"+n:e+"?"+n}}]),e}();i.SFHttpManager=C;var S=function(){function e(t,n,i,a){var o=this;m(this,e),this.modelManager=t,this.syncManager=n,this.storageManager=i,this.completionHandlers=[],this.loadMigrations();var s=!1,u=a.addEventHandler((function(e){e==D.DidSignInEvent&&(s=!0)}));this.receivedLocalDataEvent=n.initialDataLoaded(),this.syncManager.addEventHandler(function(){var e=g(r.mark((function e(t,n){var i,c,l,d,p,f,h,g,m;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c="sync:completed"==t,!(i="local-data-loaded"==t)&&!c){e.next=40;break}if(i?o.receivedLocalDataEvent=!0:c&&(o.receivedSyncCompletedEvent=!0),!o.receivedLocalDataEvent||!o.receivedSyncCompletedEvent){e.next=40;break}if(!s){e.next=39;break}return s=!1,a.removeEventHandler(u),e.next=10,o.getCompletedMigrations();case 10:l=e.sent.slice(),d=!0,p=!1,f=void 0,e.prev=14,h=l[Symbol.iterator]();case 16:if(d=(g=h.next()).done){e.next=25;break}return m=g.value,e.next=20,o.migrationForEncodedName(m);case 20:e.sent.runOnlyOnce||_.pull(o._completed,m);case 22:d=!0,e.next=16;break;case 25:e.next=31;break;case 27:e.prev=27,e.t0=e.catch(14),p=!0,f=e.t0;case 31:e.prev=31,e.prev=32,d||null==h.return||h.return();case 34:if(e.prev=34,!p){e.next=37;break}throw f;case 37:return e.finish(34);case 38:return e.finish(31);case 39:o.runPendingMigrations();case 40:case"end":return e.stop()}}),e,null,[[14,27,31,39],[32,,34,38]])})));return function(t,n){return e.apply(this,arguments)}}())}return y(e,[{key:"addCompletionHandler",value:function(e){this.completionHandlers.push(e)}},{key:"removeCompletionHandler",value:function(e){_.pull(this.completionHandlers,e)}},{key:"migrationForEncodedName",value:function(){var e=g(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.decode(t);case 2:return n=e.sent,e.abrupt("return",this.migrations.find((function(e){return e.name==n})));case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"loadMigrations",value:function(){this.migrations=this.registeredMigrations()}},{key:"registeredMigrations",value:function(){}},{key:"runPendingMigrations",value:function(){var e=g(r.mark((function e(){var t,n,i,a,o,s,u,c,l,d,p,f,h,g,m,_,v,y,b,D,E,C,S,x,k,T,w,A;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getPendingMigrations();case 2:for(t=e.sent,n=!0,i=!1,a=void 0,e.prev=6,o=t[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)(u=s.value).items=[];e.next=14;break;case 10:e.prev=10,e.t0=e.catch(6),i=!0,a=e.t0;case 14:e.prev=14,e.prev=15,n||null==o.return||o.return();case 17:if(e.prev=17,!i){e.next=20;break}throw a;case 20:return e.finish(17);case 21:return e.finish(14);case 22:c=!0,l=!1,d=void 0,e.prev=25,p=this.modelManager.allNondummyItems[Symbol.iterator]();case 27:if(c=(f=p.next()).done){e.next=51;break}for(h=f.value,g=!0,m=!1,_=void 0,e.prev=32,v=t[Symbol.iterator]();!(g=(y=v.next()).done);g=!0)u=y.value,h.content_type==u.content_type&&u.items.push(h);e.next=40;break;case 36:e.prev=36,e.t1=e.catch(32),m=!0,_=e.t1;case 40:e.prev=40,e.prev=41,g||null==v.return||v.return();case 43:if(e.prev=43,!m){e.next=46;break}throw _;case 46:return e.finish(43);case 47:return e.finish(40);case 48:c=!0,e.next=27;break;case 51:e.next=57;break;case 53:e.prev=53,e.t2=e.catch(25),l=!0,d=e.t2;case 57:e.prev=57,e.prev=58,c||null==p.return||p.return();case 60:if(e.prev=60,!l){e.next=63;break}throw d;case 63:return e.finish(60);case 64:return e.finish(57);case 65:b=!0,D=!1,E=void 0,e.prev=68,C=t[Symbol.iterator]();case 70:if(b=(S=C.next()).done){e.next=81;break}if(!((u=S.value).items&&u.items.length>0||u.customHandler)){e.next=77;break}return e.next=75,this.runMigration(u,u.items);case 75:e.next=78;break;case 77:this.markMigrationCompleted(u);case 78:b=!0,e.next=70;break;case 81:e.next=87;break;case 83:e.prev=83,e.t3=e.catch(68),D=!0,E=e.t3;case 87:e.prev=87,e.prev=88,b||null==C.return||C.return();case 90:if(e.prev=90,!D){e.next=93;break}throw E;case 93:return e.finish(90);case 94:return e.finish(87);case 95:for(x=!0,k=!1,T=void 0,e.prev=98,w=this.completionHandlers[Symbol.iterator]();!(x=(A=w.next()).done);x=!0)(0,A.value)();e.next=106;break;case 102:e.prev=102,e.t4=e.catch(98),k=!0,T=e.t4;case 106:e.prev=106,e.prev=107,x||null==w.return||w.return();case 109:if(e.prev=109,!k){e.next=112;break}throw T;case 112:return e.finish(109);case 113:return e.finish(106);case 114:case"end":return e.stop()}}),e,this,[[6,10,14,22],[15,,17,21],[25,53,57,65],[32,36,40,48],[41,,43,47],[58,,60,64],[68,83,87,95],[88,,90,94],[98,102,106,114],[107,,109,113]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"encode",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",window.btoa(t));case 1:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"decode",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",window.atob(t));case 1:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getCompletedMigrations",value:function(){var e=g(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._completed){e.next=5;break}return e.next=3,this.storageManager.getItem("migrations");case 3:t=e.sent,this._completed=t?JSON.parse(t):[];case 5:return e.abrupt("return",this._completed);case 6:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getPendingMigrations",value:function(){var e=g(r.mark((function e(){var t,n,i,a,o,s,u,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCompletedMigrations();case 2:t=e.sent,n=[],i=!0,a=!1,o=void 0,e.prev=7,s=this.migrations[Symbol.iterator]();case 9:if(i=(u=s.next()).done){e.next=22;break}return c=u.value,e.t0=t,e.next=14,this.encode(c.name);case 14:if(e.t1=e.sent,e.t2=e.t0.indexOf.call(e.t0,e.t1),e.t3=-1,e.t2!=e.t3){e.next=19;break}n.push(c);case 19:i=!0,e.next=9;break;case 22:e.next=28;break;case 24:e.prev=24,e.t4=e.catch(7),a=!0,o=e.t4;case 28:e.prev=28,e.prev=29,i||null==s.return||s.return();case 31:if(e.prev=31,!a){e.next=34;break}throw o;case 34:return e.finish(31);case 35:return e.finish(28);case 36:return e.abrupt("return",n);case 37:case"end":return e.stop()}}),e,this,[[7,24,28,36],[29,,31,35]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"markMigrationCompleted",value:function(){var e=g(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCompletedMigrations();case 2:return n=e.sent,e.t0=n,e.next=6,this.encode(t.name);case 6:e.t1=e.sent,e.t0.push.call(e.t0,e.t1),this.storageManager.setItem("migrations",JSON.stringify(n)),t.running=!1;case 10:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"runMigration",value:function(){var e=g(r.mark((function e(t,n){var i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.running){e.next=2;break}return e.abrupt("return");case 2:if(console.log("Running migration:",t.name),t.running=!0,!t.customHandler){e.next=8;break}return e.abrupt("return",t.customHandler().then((function(){i.markMigrationCompleted(t)})));case 8:return e.abrupt("return",t.handler(n).then((function(){i.markMigrationCompleted(t)})));case 9:case"end":return e.stop()}}),e)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),e}();i.SFMigrationManager=S;var x=function(){function e(t){m(this,e),e.MappingSourceRemoteRetrieved="MappingSourceRemoteRetrieved",e.MappingSourceRemoteSaved="MappingSourceRemoteSaved",e.MappingSourceLocalSaved="MappingSourceLocalSaved",e.MappingSourceLocalRetrieved="MappingSourceLocalRetrieved",e.MappingSourceLocalDirtied="MappingSourceLocalDirtied",e.MappingSourceComponentRetrieved="MappingSourceComponentRetrieved",e.MappingSourceDesktopInstalled="MappingSourceDesktopInstalled",e.MappingSourceRemoteActionRetrieved="MappingSourceRemoteActionRetrieved",e.MappingSourceFileImport="MappingSourceFileImport",e.isMappingSourceRetrieved=function(t){return[e.MappingSourceRemoteRetrieved,e.MappingSourceComponentRetrieved,e.MappingSourceRemoteActionRetrieved].includes(t)},this.$timeout=t||setTimeout.bind(window),this.itemSyncObservers=[],this.items=[],this.itemsHash={},this.missedReferences={},this.uuidChangeObservers=[]}return y(e,[{key:"handleSignout",value:function(){this.items.length=0,this.itemsHash={},this.missedReferences={}}},{key:"addModelUuidChangeObserver",value:function(e,t){this.uuidChangeObservers.push({id:e,callback:t})}},{key:"notifyObserversOfUuidChange",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var a,o=this.uuidChangeObservers[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;try{s.callback(e,t)}catch(u){console.error("Notify observers of uuid change exception:",u)}}}catch(c){r=!0,i=c}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}},{key:"alternateUUIDForItem",value:function(){var t=g(r.mark((function t(n){var i,a,o,s,u,c,l;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.createItem(n),t.next=3,SFJS.crypto.generateUUID();case 3:for(i.uuid=t.sent,i.informReferencesOfUUIDChange(n.uuid,i.uuid),this.informModelsOfUUIDChangeForItem(i,n.uuid,i.uuid),a=!0,o=!1,s=void 0,t.prev=9,u=n.referencingObjects[Symbol.iterator]();!(a=(c=u.next()).done);a=!0)(l=c.value).setIsNoLongerBeingReferencedBy(n),n.setIsNoLongerBeingReferencedBy(l),l.addItemAsRelationship(i);t.next=17;break;case 13:t.prev=13,t.t0=t.catch(9),o=!0,s=t.t0;case 17:t.prev=17,t.prev=18,a||null==u.return||u.return();case 20:if(t.prev=20,!o){t.next=23;break}throw s;case 23:return t.finish(20);case 24:return t.finish(17);case 25:return this.setItemsDirty(n.referencingObjects,!0),this.resolveReferencesForItem(i),this.loggingEnabled&&console.log(n.uuid,"--\x3e",i.uuid),n.deleted=!0,n.content.references=[],this.setItemDirty(n,!1,!1,e.MappingSourceLocalSaved),t.next=33,this.mapResponseItemsToLocalModels([n],e.MappingSourceLocalSaved);case 33:return this.addItem(i),this.setItemDirty(i,!0,!0,e.MappingSourceLocalSaved),this.notifyObserversOfUuidChange(n,i),t.abrupt("return",i);case 37:case"end":return t.stop()}}),t,this,[[9,13,17,25],[18,,20,24]])})));function n(e){return t.apply(this,arguments)}return n}()},{key:"informModelsOfUUIDChangeForItem",value:function(e,t,n){var r=!0,i=!1,a=void 0;try{for(var o,s=this.items[Symbol.iterator]();!(r=(o=s.next()).done);r=!0)o.value.potentialItemOfInterestHasChangedItsUUID(e,t,n)}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}}},{key:"didSyncModelsOffline",value:function(t){this.notifySyncObserversOfModels(t,e.MappingSourceLocalSaved)}},{key:"mapResponseItemsToLocalModels",value:function(){var e=g(r.mark((function e(t,n,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.mapResponseItemsToLocalModelsWithOptions({items:t,source:n,sourceKey:i}));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"mapResponseItemsToLocalModelsOmittingFields",value:function(){var e=g(r.mark((function e(t,n,i,a){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.mapResponseItemsToLocalModelsWithOptions({items:t,omitFields:n,source:i,sourceKey:a}));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:"mapResponseItemsToLocalModelsWithOptions",value:function(){var e=g(r.mark((function e(t){var n,i,a,o,s,u,l,d,p,f,h,g,m,_,v,y,b,D,E,C,S,x,k,T,w,A,O,N,I,F,L,P,R,M,B,j,U,V,z;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.items,i=t.omitFields,a=t.source,o=t.sourceKey,t.options,s=[],u=[],l=[],d=!0,p=!1,f=void 0,e.prev=5,h=n[Symbol.iterator]();case 7:if(d=(g=h.next()).done){e.next=58;break}if(m=g.value){e.next=11;break}return e.abrupt("continue",55);case 11:if(_=!m.content&&!m.errorDecrypting,m.content_type&&m.uuid&&!_||m.deleted){e.next=16;break}return console.error("Server response item is corrupt:",m),e.abrupt("continue",55);case 16:if(!Array.isArray(i)){e.next=36;break}for(v=!0,y=!1,b=void 0,e.prev=20,D=i[Symbol.iterator]();!(v=(E=D.next()).done);v=!0)C=E.value,delete m[C];e.next=28;break;case 24:e.prev=24,e.t0=e.catch(20),y=!0,b=e.t0;case 28:e.prev=28,e.prev=29,v||null==D.return||D.return();case 31:if(e.prev=31,!y){e.next=34;break}throw b;case 34:return e.finish(31);case 35:return e.finish(28);case 36:if((S=this.findItem(m.uuid))&&(S.updateFromJSON(m),S.dummy=!1),x=m.content_type||S&&S.content_type,!this.acceptableContentTypes||this.acceptableContentTypes.includes(x)){e.next=42;break}return e.abrupt("continue",55);case 42:if(k=!1,1!=m.deleted){e.next=50;break}if(!m.dirty){e.next=48;break}k=!0,e.next=50;break;case 48:return S&&(s.push(S),l.push(S),this.removeItemLocally(S)),e.abrupt("continue",55);case 50:S||(S=this.createItem(m)),this.addItem(S,k),S.errorDecrypting||l.push(S),s.push(S),u.push(m);case 55:d=!0,e.next=7;break;case 58:e.next=64;break;case 60:e.prev=60,e.t1=e.catch(5),p=!0,f=e.t1;case 64:e.prev=64,e.prev=65,d||null==h.return||h.return();case 67:if(e.prev=67,!p){e.next=70;break}throw f;case 70:return e.finish(67);case 71:return e.finish(64);case 72:for(T=!0,w=!1,A=void 0,e.prev=75,O=u.entries()[Symbol.iterator]();!(T=(N=O.next()).done);T=!0)I=c(N.value,2),F=I[0],L=I[1],P=s[F],L.content&&this.resolveReferencesForItem(P),P.didFinishSyncing();e.next=83;break;case 79:e.prev=79,e.t2=e.catch(75),w=!0,A=e.t2;case 83:e.prev=83,e.prev=84,T||null==O.return||O.return();case 86:if(e.prev=86,!w){e.next=89;break}throw A;case 89:return e.finish(86);case 90:return e.finish(83);case 91:for(R=this.popMissedReferenceStructsForObjects(u),M=!0,B=!1,j=void 0,e.prev=95,U=function(){var e=z.value,t=s.find((function(t){return t.uuid==e.reference_uuid}));t&&e.for_item.addItemAsRelationship(t)},V=R[Symbol.iterator]();!(M=(z=V.next()).done);M=!0)U();e.next=104;break;case 100:e.prev=100,e.t3=e.catch(95),B=!0,j=e.t3;case 104:e.prev=104,e.prev=105,M||null==V.return||V.return();case 107:if(e.prev=107,!B){e.next=110;break}throw j;case 110:return e.finish(107);case 111:return e.finish(104);case 112:return e.next=114,this.notifySyncObserversOfModels(l,a,o);case 114:return e.abrupt("return",s);case 115:case"end":return e.stop()}}),e,this,[[5,60,64,72],[20,24,28,36],[29,,31,35],[65,,67,71],[75,79,83,91],[84,,86,90],[95,100,104,112],[105,,107,111]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"missedReferenceBuildKey",value:function(e,t){return"".concat(e,":").concat(t)}},{key:"popMissedReferenceStructsForObjects",value:function(e){if(!e||0==e.length)return[];for(var t=[],n=[],r=e.map((function(e){return e.uuid})),i=r[0].length,a=0,o=Object.keys(this.missedReferences);a1&&void 0!==arguments[1]&&arguments[1];if(!e.errorDecrypting){var n=e.contentObject;if(e.updateLocalRelationships(),n.references){var r=n.references.slice().map((function(e){return e.uuid})),i=!0,a=this.findItems(r,i),o=!0,s=!1,u=void 0;try{for(var l,d=a.entries()[Symbol.iterator]();!(o=(l=d.next()).done);o=!0){var p=c(l.value,2),f=p[0],h=p[1];if(h)e.addItemAsRelationship(h),t&&this.setItemDirty(h,!0);else{var g=r[f],m=this.missedReferenceBuildKey(g,e.uuid);if(!this.missedReferences[m]){var _={reference_uuid:g,for_item:e};this.missedReferences[m]=_}}}}catch(v){s=!0,u=v}finally{try{o||null==d.return||d.return()}finally{if(s)throw u}}}}}},{key:"notifySyncObserversOfModels",value:function(){var e=g(r.mark((function e(t,n,i){var a,o,s,u,c,l,d,p=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=this.itemSyncObservers.sort((function(e,t){return e.priority0)){e.next=25;break}return e.next=25,p._callSyncObserverCallbackWithTimeout(a,o,s,u,n,i);case 25:case"end":return e.stop()}}),e,null,[[6,10,14,22],[15,,17,21]])})),l=a[Symbol.iterator]();case 7:if(o=(d=l.next()).done){e.next=12;break}return e.delegateYield(c(),"t0",9);case 9:o=!0,e.next=7;break;case 12:e.next=18;break;case 14:e.prev=14,e.t1=e.catch(4),s=!0,u=e.t1;case 18:e.prev=18,e.prev=19,o||null==l.return||l.return();case 21:if(e.prev=21,!s){e.next=24;break}throw u;case 24:return e.finish(21);case 25:return e.finish(18);case 26:case"end":return e.stop()}}),e,this,[[4,14,18,26],[19,,21,25]])})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"_callSyncObserverCallbackWithTimeout",value:function(){var e=g(r.mark((function e(t,n,i,a,o,s){var u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,r){u.$timeout((function(){try{t.callback(n,i,a,o,s)}catch(r){console.error("Sync observer exception",r)}finally{e()}}))})));case 1:case"end":return e.stop()}}),e)})));function t(t,n,r,i,a,o){return e.apply(this,arguments)}return t}()},{key:"setItemDirty",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;this.setItemsDirty([e],t,n,r,i)}},{key:"setItemsDirty",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,o=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(o=(c=l.next()).done);o=!0)c.value.setDirty(n,r)}catch(d){s=!0,u=d}finally{try{o||null==l.return||l.return()}finally{if(s)throw u}}this.notifySyncObserversOfModels(t,i||e.MappingSourceLocalDirtied,a)}},{key:"createItem",value:function(t){var n=e.ContentTypeClassMapping&&e.ContentTypeClassMapping[t.content_type];return n||(n=P),new n(t)}},{key:"createDuplicateItemFromResponseItem",value:function(){var e=g(r.mark((function e(t){var n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==typeof t.setDirty){e.next=3;break}return console.error("Attempting to create conflicted copy of non-response item."),e.abrupt("return",null);case 3:return n=JSON.parse(JSON.stringify(t)),e.next=6,SFJS.crypto.generateUUID();case 6:return n.uuid=e.sent,i=this.createItem(n),e.abrupt("return",i);case 9:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"duplicateItemAndAddAsConflict",value:function(e){return this.duplicateItemWithCustomContentAndAddAsConflict({content:e.content,duplicateOf:e})}},{key:"duplicateItemWithCustomContentAndAddAsConflict",value:function(e){var t=e.content,n=e.duplicateOf,r=this.duplicateItemWithCustomContent({content:t,duplicateOf:n});return this.addDuplicatedItemAsConflict({duplicate:r,duplicateOf:n}),r}},{key:"addDuplicatedItemAsConflict",value:function(e){var t=e.duplicate,n=e.duplicateOf;this.addDuplicatedItem(t,n),t.content.conflict_of=n.uuid}},{key:"duplicateItemWithCustomContent",value:function(e){var t=e.content,n=e.duplicateOf,r=new n.constructor({content:t});return r.created_at=n.created_at,r.content_type||(r.content_type=n.content_type),r}},{key:"duplicateItemAndAdd",value:function(e){var t=this.duplicateItemWithoutAdding(e);return this.addDuplicatedItem(t,e),t}},{key:"duplicateItemWithoutAdding",value:function(e){var t=new e.constructor({content:e.content});return t.created_at=e.created_at,t.content_type||(t.content_type=e.content_type),t}},{key:"addDuplicatedItem",value:function(e,t){this.addItem(e);var n=!0,r=!1,i=void 0;try{for(var a,o=t.referencingObjects[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;s.addItemAsRelationship(e),this.setItemDirty(s,!0)}}catch(u){r=!0,i=u}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}this.resolveReferencesForItem(e),this.setItemDirty(e,!0)}},{key:"addItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.addItems([e],t)}},{key:"addItems",value:function(e){var t=this;e.forEach((function(e){t.itemsHash[e.uuid]||(t.itemsHash[e.uuid]=e,t.items.push(e))}))}},{key:"addItemSyncObserver",value:function(e,t,n){this.addItemSyncObserverWithPriority({id:e,types:t,callback:n,priority:1})}},{key:"addItemSyncObserverWithPriority",value:function(e){var t=e.id,n=e.priority,r=e.types,i=e.callback;Array.isArray(r)||(r=[r]),this.itemSyncObservers.push({id:t,types:r,priority:n,callback:i})}},{key:"removeItemSyncObserver",value:function(e){_.remove(this.itemSyncObservers,_.find(this.itemSyncObservers,{id:e}))}},{key:"getDirtyItems",value:function(){return this.items.filter((function(e){return 1==e.dirty&&!e.dummy&&(!e.errorDecrypting||e.deleted)}))}},{key:"clearDirtyItems",value:function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=e[Symbol.iterator]();!(t=(i=a.next()).done);t=!0)i.value.setDirty(!1)}catch(o){n=!0,r=o}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}}},{key:"removeAndDirtyAllRelationshipsForItem",value:function(e){if(!e.errorDecrypting){var t=!0,n=!1,r=void 0;try{for(var i,a=e.content.references[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value,s=this.findItem(o.uuid);s&&(e.removeItemAsRelationship(s),s.hasRelationshipWithItem(e)&&(s.removeItemAsRelationship(e),this.setItemDirty(s,!0)))}}catch(h){n=!0,r=h}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}}var u=!0,c=!1,l=void 0;try{for(var d,p=e.referencingObjects[Symbol.iterator]();!(u=(d=p.next()).done);u=!0){var f=d.value;f.removeItemAsRelationship(e),this.setItemDirty(f,!0)}}catch(h){c=!0,l=h}finally{try{u||null==p.return||p.return()}finally{if(c)throw l}}e.referencingObjects=[]}},{key:"setAllItemsDirty",value:function(){var e=this.allItems;this.setItemsDirty(e,!0)}},{key:"setItemToBeDeleted",value:function(e){e.deleted=!0,e.dummy||this.setItemDirty(e,!0),this.removeAndDirtyAllRelationshipsForItem(e)}},{key:"removeItemLocally",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_.remove(this.items,{uuid:t.uuid}),delete this.itemsHash[t.uuid],t.isBeingRemovedLocally();case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"allItemsMatchingTypes",value:function(e){return this.allItems.filter((function(t){return(_.includes(e,t.content_type)||_.includes(e,"*"))&&!t.dummy}))}},{key:"invalidItems",value:function(){return this.allItems.filter((function(e){return e.errorDecrypting}))}},{key:"validItemsForContentType",value:function(e){return this.allItems.filter((function(t){return t.content_type==e&&!t.errorDecrypting}))}},{key:"findItem",value:function(e){return this.itemsHash[e]}},{key:"findItems",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value,c=this.itemsHash[u];(c||t)&&n.push(c)}}catch(l){i=!0,a=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}},{key:"itemsMatchingPredicate",value:function(e){return this.itemsMatchingPredicates([e])}},{key:"itemsMatchingPredicates",value:function(e){return this.filterItemsWithPredicates(this.allItems,e)}},{key:"filterItemsWithPredicates",value:function(e,t){return e.filter((function(e){var n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;if(!e.satisfiesPredicate(s))return!1}}catch(u){r=!0,i=u}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return!0}))}},{key:"importItems",value:function(){var t=g(r.mark((function t(n){var i,a,o,s,u,c,l,d,p,f,h,g,m,_,v,y,b,D,E,C,S,x,k,T,w,A,O;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=[],a={},o=!0,s=!1,u=void 0,t.prev=5,c=n[Symbol.iterator]();case 7:if(o=(l=c.next()).done){t.next=18;break}if(d=l.value,p=this.findItem(d.uuid)){t.next=13;break}return a[d.uuid]={},t.abrupt("continue",15);case 13:f=this.duplicateItemWithoutAdding(p),a[d.uuid]={frozenValue:f,itemRef:p};case 15:o=!0,t.next=7;break;case 18:t.next=24;break;case 20:t.prev=20,t.t0=t.catch(5),s=!0,u=t.t0;case 24:t.prev=24,t.prev=25,o||null==c.return||c.return();case 27:if(t.prev=27,!s){t.next=30;break}throw u;case 30:return t.finish(27);case 31:return t.finish(24);case 32:h=!0,g=!1,m=void 0,t.prev=35,_=n[Symbol.iterator]();case 37:if(h=(v=_.next()).done){t.next=52;break}if(y=v.value,b=a[y.uuid],D=b.frozenValue,E=b.itemRef,!D||E.errorDecrypting){t.next=47;break}return t.next=43,this.createDuplicateItemFromResponseItem(y);case 43:C=t.sent,y.deleted||D.isItemContentEqualWith(C)||(this.addDuplicatedItemAsConflict({duplicate:C,duplicateOf:E}),i.push(C)),t.next=49;break;case 47:i.push(y),E&&E.errorDecrypting&&(E.errorDecrypting=!1);case 49:h=!0,t.next=37;break;case 52:t.next=58;break;case 54:t.prev=54,t.t1=t.catch(35),g=!0,m=t.t1;case 58:t.prev=58,t.prev=59,h||null==_.return||_.return();case 61:if(t.prev=61,!g){t.next=64;break}throw m;case 64:return t.finish(61);case 65:return t.finish(58);case 66:return t.next=68,this.mapResponseItemsToLocalModels(i,e.MappingSourceFileImport);case 68:for(S=t.sent,x=!0,k=!1,T=void 0,t.prev=72,w=S[Symbol.iterator]();!(x=(A=w.next()).done);x=!0)O=A.value,this.setItemDirty(O,!0,!1),O.deleted=!1;t.next=80;break;case 76:t.prev=76,t.t2=t.catch(72),k=!0,T=t.t2;case 80:t.prev=80,t.prev=81,x||null==w.return||w.return();case 83:if(t.prev=83,!k){t.next=86;break}throw T;case 86:return t.finish(83);case 87:return t.finish(80);case 88:return t.abrupt("return",S);case 89:case"end":return t.stop()}}),t,this,[[5,20,24,32],[25,,27,31],[35,54,58,66],[59,,61,65],[72,76,80,88],[81,,83,87]])})));function n(e){return t.apply(this,arguments)}return n}()},{key:"getAllItemsJSONData",value:function(){var e=g(r.mark((function e(t,n,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getJSONDataForItems(this.allItems,t,n,i));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"getJSONDataForItems",value:function(){var e=g(r.mark((function e(t,n,i,a){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t.map((function(e){return new R(e,n,i).paramsForExportFile()}))).then((function(e){if(a&&0==e.length)return null;var t={items:e};return n&&(t.auth_params=i),JSON.stringify(t,null,2)})));case 1:case"end":return e.stop()}}),e)})));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:"computeDataIntegrityHash",value:function(){var e=g(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=this.allNondummyItems.sort((function(e,t){return t.updated_at-e.updated_at})),n=t.map((function(e){return e.updatedAtTimestamp()})),i=n.join(","),e.next=6,SFJS.crypto.sha256(i);case 6:return a=e.sent,e.abrupt("return",a);case 10:return e.prev=10,e.t0=e.catch(0),console.error("Error computing data integrity hash",e.t0),e.abrupt("return",null);case 14:case"end":return e.stop()}}),e,this,[[0,10]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"allItems",get:function(){return this.items.slice()}},{key:"allNondummyItems",get:function(){return this.items.filter((function(e){return!e.dummy}))}}]),e}();i.SFModelManager=x;var k=function(){function e(t,n,r){m(this,e),this.modelManager=t,this.syncManager=n,this.singletonManager=r,this.loadPrivileges(),e.CredentialAccountPassword="CredentialAccountPassword",e.CredentialLocalPasscode="CredentialLocalPasscode",e.ActionManageExtensions="ActionManageExtensions",e.ActionManageBackups="ActionManageBackups",e.ActionViewProtectedNotes="ActionViewProtectedNotes",e.ActionManagePrivileges="ActionManagePrivileges",e.ActionManagePasscode="ActionManagePasscode",e.ActionDeleteNote="ActionDeleteNote",e.SessionExpiresAtKey="SessionExpiresAtKey",e.SessionLengthKey="SessionLengthKey",e.SessionLengthNone=0,e.SessionLengthFiveMinutes=300,e.SessionLengthOneHour=3600,e.SessionLengthOneWeek=604800,this.availableActions=[e.ActionViewProtectedNotes,e.ActionDeleteNote,e.ActionManagePasscode,e.ActionManageBackups,e.ActionManageExtensions,e.ActionManagePrivileges],this.availableCredentials=[e.CredentialAccountPassword,e.CredentialLocalPasscode],this.sessionLengths=[e.SessionLengthNone,e.SessionLengthFiveMinutes,e.SessionLengthOneHour,e.SessionLengthOneWeek,e.SessionLengthIndefinite]}return y(e,[{key:"setDelegate",value:function(e){this.delegate=e}},{key:"getAvailableActions",value:function(){return this.availableActions}},{key:"getAvailableCredentials",value:function(){return this.availableCredentials}},{key:"netCredentialsForAction",value:function(){var t=g(r.mark((function t(n){var i,a,o,s,u,c,l,d;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPrivileges();case 2:t.t0=n,i=t.sent.getCredentialsForAction(t.t0),a=[],o=!0,s=!1,u=void 0,t.prev=8,c=i[Symbol.iterator]();case 10:if(o=(l=c.next()).done){t.next=27;break}if((d=l.value)!=e.CredentialAccountPassword){t.next=19;break}return t.next=15,this.delegate.isOffline();case 15:t.sent||a.push(d),t.next=24;break;case 19:if(d!=e.CredentialLocalPasscode){t.next=24;break}return t.next=22,this.delegate.hasLocalPasscode();case 22:t.sent&&a.push(d);case 24:o=!0,t.next=10;break;case 27:t.next=33;break;case 29:t.prev=29,t.t1=t.catch(8),s=!0,u=t.t1;case 33:t.prev=33,t.prev=34,o||null==c.return||c.return();case 36:if(t.prev=36,!s){t.next=39;break}throw u;case 39:return t.finish(36);case 40:return t.finish(33);case 41:return t.abrupt("return",a);case 42:case"end":return t.stop()}}),t,this,[[8,29,33,41],[34,,36,40]])})));function n(e){return t.apply(this,arguments)}return n}()},{key:"loadPrivileges",value:function(){var e=g(r.mark((function e(){var t=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.loadPromise){e.next=2;break}return e.abrupt("return",this.loadPromise);case 2:return this.loadPromise=new Promise((function(e,n){var i=B.contentType(),a=new M("content_type","=",i);t.singletonManager.registerSingleton([a],(function(n){t.privileges=n,e(n)}),function(){var n=g(r.mark((function n(a){var o;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=new B({content_type:i}),SFJS.crypto.generateUUIDSync){n.next=4;break}return n.next=4,o.initUUID();case 4:t.modelManager.addItem(o),t.modelManager.setItemDirty(o,!0),t.syncManager.sync(),a(o),e(o);case 9:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())})),e.abrupt("return",this.loadPromise);case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getPrivileges",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.privileges){e.next=4;break}return e.abrupt("return",this.privileges);case 4:return e.abrupt("return",this.loadPrivileges());case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"displayInfoForCredential",value:function(t){var n={};return n[e.CredentialAccountPassword]={label:"Account Password",prompt:"Please enter your account password."},n[e.CredentialLocalPasscode]={label:"Local Passcode",prompt:"Please enter your local passcode."},n[t]}},{key:"displayInfoForAction",value:function(t){var n={};return n[e.ActionManageExtensions]={label:"Manage Extensions"},n[e.ActionManageBackups]={label:"Download/Import Backups"},n[e.ActionViewProtectedNotes]={label:"View Protected Notes"},n[e.ActionManagePrivileges]={label:"Manage Privileges"},n[e.ActionManagePasscode]={label:"Manage Passcode"},n[e.ActionDeleteNote]={label:"Delete Notes"},n[t]}},{key:"getSessionLengthOptions",value:function(){return[{value:e.SessionLengthNone,label:"Don't Remember"},{value:e.SessionLengthFiveMinutes,label:"5 Minutes"},{value:e.SessionLengthOneHour,label:"1 Hour"},{value:e.SessionLengthOneWeek,label:"1 Week"}]}},{key:"setSessionLength",value:function(){var t=g(r.mark((function t(n){var i;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=function(e){var t=new Date;return t.setSeconds(t.getSeconds()+e),t}(n),t.abrupt("return",Promise.all([this.delegate.saveToStorage(e.SessionExpiresAtKey,JSON.stringify(i)),this.delegate.saveToStorage(e.SessionLengthKey,JSON.stringify(n))]));case 3:case"end":return t.stop()}}),t,this)})));function n(e){return t.apply(this,arguments)}return n}()},{key:"clearSession",value:function(){var t=g(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.setSessionLength(e.SessionLengthNone));case 1:case"end":return t.stop()}}),t,this)})));function n(){return t.apply(this,arguments)}return n}()},{key:"getSelectedSessionLength",value:function(){var t=g(r.mark((function t(){var n;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.delegate.getFromStorage(e.SessionLengthKey);case 2:if(!(n=t.sent)){t.next=7;break}return t.abrupt("return",JSON.parse(n));case 7:return t.abrupt("return",e.SessionLengthNone);case 8:case"end":return t.stop()}}),t,this)})));function n(){return t.apply(this,arguments)}return n}()},{key:"getSessionExpirey",value:function(){var t=g(r.mark((function t(){var n;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.delegate.getFromStorage(e.SessionExpiresAtKey);case 2:if(!(n=t.sent)){t.next=7;break}return t.abrupt("return",new Date(JSON.parse(n)));case 7:return t.abrupt("return",new Date);case 8:case"end":return t.stop()}}),t,this)})));function n(){return t.apply(this,arguments)}return n}()},{key:"actionHasPrivilegesConfigured",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.netCredentialsForAction(t);case 2:return e.t0=e.sent.length,e.abrupt("return",e.t0>0);case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"actionRequiresPrivilege",value:function(){var e=g(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getSessionExpirey();case 2:if(!(e.sent>new Date)){e.next=5;break}return e.abrupt("return",!1);case 5:return e.next=7,this.netCredentialsForAction(t);case 7:return n=e.sent,e.abrupt("return",n.length>0);case 9:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"savePrivileges",value:function(){var e=g(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getPrivileges();case 2:t=e.sent,this.modelManager.setItemDirty(t,!0),this.syncManager.sync();case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"authenticateAction",value:function(){var e=g(r.mark((function e(t,n){var i,a,o,s,u,c,l,d,p;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.netCredentialsForAction(t);case 2:i=e.sent,a=[],o=[],s=!0,u=!1,c=void 0,e.prev=7,l=i[Symbol.iterator]();case 9:if(s=(d=l.next()).done){e.next=18;break}return p=d.value,e.next=13,this._verifyAuthenticationParameters(p,n[p]);case 13:e.sent?a.push(p):o.push(p);case 15:s=!0,e.next=9;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(7),u=!0,c=e.t0;case 24:e.prev=24,e.prev=25,s||null==l.return||l.return();case 27:if(e.prev=27,!u){e.next=30;break}throw c;case 30:return e.finish(27);case 31:return e.finish(24);case 32:return e.abrupt("return",{success:0==o.length,successfulCredentials:a,failedCredentials:o});case 33:case"end":return e.stop()}}),e,this,[[7,20,24,32],[25,,27,31]])})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"_verifyAuthenticationParameters",value:function(){var t=g(r.mark((function t(n,i){var a,o,s=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",s.delegate.verifyAccountPassword(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",s.delegate.verifyLocalPasscode(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),n!=e.CredentialAccountPassword){t.next=6;break}return t.abrupt("return",a(i));case 6:if(n!=e.CredentialLocalPasscode){t.next=8;break}return t.abrupt("return",o(i));case 8:case"end":return t.stop()}}),t)})));function n(e,n){return t.apply(this,arguments)}return n}()}]),e}();i.SFPrivilegesManager=k;var T="sessionHistory_persist",w="sessionHistory_revisions",A="sessionHistory_autoOptimize",O=function(){function e(t,n,r,i,a){var o=this;m(this,e),this.modelManager=t,this.storageManager=n,this.$timeout=a||setTimeout.bind(window),this.keyRequestHandler=r,this.loadFromDisk().then((function(){o.modelManager.addItemSyncObserver("session-history",i,(function(e,t,n,r,i){if(r!==x.MappingSourceLocalDirtied){var a=!0,s=!1,u=void 0;try{for(var c,l=e[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var d=c.value;try{o.addHistoryEntryForItem(d)}catch(p){console.log("Caught exception while trying to add item history entry",p)}}}catch(f){s=!0,u=f}finally{try{a||null==l.return||l.return()}finally{if(s)throw u}}}}))}))}return y(e,[{key:"encryptionParams",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.keyRequestHandler());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"addHistoryEntryForItem",value:function(e){var t=this,n={uuid:e.uuid,content_type:e.content_type,updated_at:e.updated_at,content:e.getContentCopy()},r=this.historySession.addEntryForItem(n);this.autoOptimize&&this.historySession.optimizeHistoryForItem(e),r&&this.diskEnabled&&(this.diskTimeout&&(this.$timeout.hasOwnProperty("cancel")?this.$timeout.cancel(this.diskTimeout):clearTimeout(this.diskTimeout)),this.diskTimeout=this.$timeout((function(){t.saveToDisk()}),2e3))}},{key:"historyForItem",value:function(e){return this.historySession.historyForItem(e)}},{key:"clearHistoryForItem",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.historySession.clearItemHistory(t),e.abrupt("return",this.saveToDisk());case 2:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"clearAllHistory",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.historySession.clearAllHistory(),e.abrupt("return",this.storageManager.removeItem(w));case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"toggleDiskSaving",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.diskEnabled=!this.diskEnabled,!this.diskEnabled){e.next=6;break}this.storageManager.setItem(T,JSON.stringify(!0)),this.saveToDisk(),e.next=8;break;case 6:return this.storageManager.setItem(T,JSON.stringify(!1)),e.abrupt("return",this.storageManager.removeItem(w));case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"saveToDisk",value:function(){var e=g(r.mark((function e(){var t,n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.diskEnabled){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.encryptionParams();case 4:t=e.sent,new R(this.historySession,t.keys,t.auth_params).paramsForSync().then((function(e){n.storageManager.setItem(w,JSON.stringify(e))}));case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"loadFromDisk",value:function(){var e=g(r.mark((function e(){var t,n,i,a,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.storageManager.getItem(T);case 2:return(t=e.sent)&&(this.diskEnabled=JSON.parse(t)),e.next=6,this.storageManager.getItem(w);case 6:if(!(n=e.sent)){e.next=18;break}return n=JSON.parse(n),e.next=11,this.encryptionParams();case 11:return i=e.sent,e.next=14,SFJS.itemTransformer.decryptItem(n,i.keys);case 14:a=new j(n),this.historySession=a,e.next=19;break;case 18:this.historySession=new j;case 19:return e.next=21,this.storageManager.getItem(A);case 21:o=e.sent,this.autoOptimize=!o||JSON.parse(o);case 23:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"toggleAutoOptimize",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.autoOptimize=!this.autoOptimize,this.autoOptimize?this.storageManager.setItem(A,JSON.stringify(!0)):this.storageManager.setItem(A,JSON.stringify(!1));case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}]),e}();i.SFSessionHistoryManager=O;var N=function(){function e(t,n){var r=this;m(this,e),this.syncManager=n,this.modelManager=t,this.singletonHandlers=[],t.addItemSyncObserverWithPriority({id:"sf-singleton-manager",types:"*",priority:-1,callback:function(e,n,i,a,o){a!==x.MappingSourceLocalDirtied&&r.resolveSingletons(t.allNondummyItems,null,!0)}}),n.addEventHandler((function(e,n){if("local-data-loaded"==e)r.resolveSingletons(t.allNondummyItems,null,!0),r.initialDataLoaded=!0;else if("sync:completed"==e){if(!r.initialDataLoaded)return;r.resolveSingletons(n.retrievedItems,n.savedItems)}})),t.addModelUuidChangeObserver("singleton-manager",(function(e,t){var n=!0,i=!1,a=void 0;try{for(var o,s=r.singletonHandlers[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;u.singleton&&M.ItemSatisfiesPredicates(t,u.predicates)&&(u.singleton=null,r.resolveSingletons([t]))}}catch(c){i=!0,a=c}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}}))}return y(e,[{key:"registerSingleton",value:function(e,t,n){this.singletonHandlers.push({predicates:e,resolutionCallback:t,createBlock:n})}},{key:"resolveSingletons",value:function(e,t,n){var r=this;e=e||[],t=t||[];var i=!0,a=!1,o=void 0;try{for(var s,u=function(){var i=s.value,a=i.predicates.slice(),o=r.modelManager.filterItemsWithPredicates(e,a),u=function(){i.createBlock&&(i.pendingCreateBlockCallback=!0,i.createBlock((function(e){i.singleton=e,i.pendingCreateBlockCallback=!1,i.resolutionCallback&&i.resolutionCallback(e)})))},c=r.modelManager.filterItemsWithPredicates(t,a).length;if(o.length>0||c>0){var l=r.modelManager.itemsMatchingPredicates(a);if(l.length>=2){var d=l.sort((function(e,t){return e.errorDecrypting?1:t.errorDecrypting||e.created_at=this.MaxDiscordanceBeforeOutOfSync&&(this.outOfSync||(this.outOfSync=!0,this.notifyEvent("enter-out-of-sync"))),e.abrupt("return",!1);case 13:return this.outOfSync&&(this.outOfSync=!1,this.notifyEvent("exit-out-of-sync")),this.syncDiscordance=0,e.abrupt("return",!0);case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"isOutOfSync",value:function(){return this.outOfSync}},{key:"getServerURL",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.storageManager.getItem("server");case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0=window._default_sf_server;case 5:return e.abrupt("return",e.t0);case 6:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getSyncURL",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getServerURL();case 2:return e.t0=e.sent,e.abrupt("return",e.t0+"/items/sync");case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"registerSyncStatusObserver",value:function(e){var t={key:new Date,callback:e};return this.syncStatusObservers.push(t),t}},{key:"removeSyncStatusObserver",value:function(e){_.pull(this.syncStatusObservers,e)}},{key:"syncStatusDidChange",value:function(){var e=this;this.syncStatusObservers.forEach((function(t){t.callback(e.syncStatus)}))}},{key:"addEventHandler",value:function(e){return this.eventHandlers.push(e),e}},{key:"removeEventHandler",value:function(e){_.pull(this.eventHandlers,e)}},{key:"notifyEvent",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var a,o=this.eventHandlers[Symbol.iterator]();!(n=(a=o.next()).done);n=!0)(0,a.value)(e,t||{})}catch(s){r=!0,i=s}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}},{key:"setKeyRequestHandler",value:function(e){this.keyRequestHandler=e}},{key:"getActiveKeyInfo",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.keyRequestHandler(t));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"initialDataLoaded",value:function(){return!0===this._initialDataLoaded}},{key:"_sortLocalItems",value:function(e){var t=this;return e.sort((function(e,n){var r=new Date(n.updated_at)-new Date(e.updated_at),i=t.contentTypeLoadPriority,a=0,o=0;return i&&(a=i.indexOf(e.content_type),o=i.indexOf(n.content_type),-1==a&&(a=i.length),-1==o&&(o=i.length)),a==o?r:a0&&void 0!==c[0]?c[0]:{},i=n.incrementalCallback,a=n.batchSize,!(o=n.options)||!o.simulateHighLatency){t.next=5;break}return s=o.simulatedLatency||1e3,t.next=5,this._awaitSleep(s);case 5:if(!this.loadLocalDataPromise){t.next=7;break}return t.abrupt("return",this.loadLocalDataPromise);case 7:return a||(a=100),this.loadLocalDataPromise=this.storageManager.getAllModels().then((function(t){var n=(t=(t=u._sortLocalItems(t)).filter((function(e){var t=u.modelManager.findItem(e.uuid);return!t||new Date(e.dirtiedDate)>t.dirtiedDate}))).length,o=0,s=[],c=function(){var l=g(r.mark((function l(){var d,p;return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return d=t.slice(o,o+a),r.next=3,u.handleItemsResponse(d,null,x.MappingSourceLocalRetrieved,e.KeyRequestLoadLocal);case 3:if(p=r.sent,s.push(p),!((o+=d.length)0)){t.next=23;break}return t.next=23,Promise.all(c.map(function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a.storageManager.deleteModel(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 23:return t.next=25,a.getActiveKeyInfo(e.KeyRequestSaveLocal);case 25:if(_=t.sent,!(u.length>0)){t.next=33;break}return t.next=29,Promise.all(u.map(function(){var e=g(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new R(t,_.keys,_.auth_params),e.next=3,n.paramsForLocalStorage();case 3:return n=e.sent,i&&delete n.dirty,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).catch((function(e){return s(e)}));case 29:return v=t.sent,t.next=32,a.storageManager.saveModels(v).catch((function(e){console.error("Error writing items",e),a.syncStatus.localError=e,a.syncStatusDidChange(),s()}));case 32:a.syncStatus.localError&&(a.syncStatus.localError=null,a.syncStatusDidChange());case 33:o();case 34:case"end":return t.stop()}}),t,null,[[4,8,12,20],[13,,15,19]])})));return function(e,n){return t.apply(this,arguments)}}()));case 3:case"end":return t.stop()}}),t)})));function n(e,n){return t.apply(this,arguments)}return n}()},{key:"syncOffline",value:function(){var e=g(r.mark((function e(t){var n,i,a,o,s,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=!0,i=!1,a=void 0,e.prev=3,o=t[Symbol.iterator]();!(n=(s=o.next()).done);n=!0)s.value.updated_at=new Date;e.next=11;break;case 7:e.prev=7,e.t0=e.catch(3),i=!0,a=e.t0;case 11:e.prev=11,e.prev=12,n||null==o.return||o.return();case 14:if(e.prev=14,!i){e.next=17;break}throw a;case 17:return e.finish(14);case 18:return e.finish(11);case 19:return e.abrupt("return",this.writeItemsToLocalStorage(t,!0).then((function(e){var n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;s.deleted&&u.modelManager.removeItemLocally(s)}}catch(c){r=!0,i=c}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return u.modelManager.clearDirtyItems(t),u.modelManager.didSyncModelsOffline(t),u.notifyEvent("sync:completed",{savedItems:t}),{saved_items:t}})));case 20:case"end":return e.stop()}}),e,this,[[3,7,11,19],[12,,14,18]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"markAllItemsDirtyAndSaveOffline",value:function(){var e=g(r.mark((function e(t){var n,i,a,o,s,u,c,l,d,p,f,h,g;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=28;break}n=this.modelManager.allNondummyItems.filter((function(e){return!e.errorDecrypting})).slice(),i=!0,a=!1,o=void 0,e.prev=5,s=n[Symbol.iterator]();case 7:if(i=(u=s.next()).done){e.next=14;break}return c=u.value,e.next=11,this.modelManager.alternateUUIDForItem(c);case 11:i=!0,e.next=7;break;case 14:e.next=20;break;case 16:e.prev=16,e.t0=e.catch(5),a=!0,o=e.t0;case 20:e.prev=20,e.prev=21,i||null==s.return||s.return();case 23:if(e.prev=23,!a){e.next=26;break}throw o;case 26:return e.finish(23);case 27:return e.finish(20);case 28:for(l=this.modelManager.allNondummyItems,d=!0,p=!1,f=void 0,e.prev=32,h=l[Symbol.iterator]();!(d=(g=h.next()).done);d=!0)g.value.setDirty(!0);e.next=40;break;case 36:e.prev=36,e.t1=e.catch(32),p=!0,f=e.t1;case 40:e.prev=40,e.prev=41,d||null==h.return||h.return();case 43:if(e.prev=43,!p){e.next=46;break}throw f;case 46:return e.finish(43);case 47:return e.finish(40);case 48:return e.abrupt("return",this.writeItemsToLocalStorage(l,!1));case 49:case"end":return e.stop()}}),e,this,[[5,16,20,28],[21,,23,27],[32,36,40,48],[41,,43,47]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"setSyncToken",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._syncToken=t,e.next=3,this.storageManager.setItem("syncToken",t);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getSyncToken",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._syncToken){e.next=4;break}return e.next=3,this.storageManager.getItem("syncToken");case 3:this._syncToken=e.sent;case 4:return e.abrupt("return",this._syncToken);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setCursorToken",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._cursorToken=t,!t){e.next=6;break}return e.next=4,this.storageManager.setItem("cursorToken",t);case 4:e.next=8;break;case 6:return e.next=8,this.storageManager.removeItem("cursorToken");case 8:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getCursorToken",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._cursorToken){e.next=4;break}return e.next=3,this.storageManager.getItem("cursorToken");case 3:this._cursorToken=e.sent;case 4:return e.abrupt("return",this._cursorToken);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"clearQueuedCallbacks",value:function(){this._queuedCallbacks=[]}},{key:"callQueuedCallbacks",value:function(e){var t=this.queuedCallbacks;if(t.length){var n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0)(0,a.value)(e)}catch(s){r=!0,i=s}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}this.clearQueuedCallbacks()}}},{key:"beginCheckingIfSyncIsTakingTooLong",value:function(){this.syncStatus.checker&&this.stopCheckingIfSyncIsTakingTooLong(),this.syncStatus.checker=this.$interval(function(){(new Date-this.syncStatus.syncStart)/1e3>5&&(this.notifyEvent("sync:taking-too-long"),this.stopCheckingIfSyncIsTakingTooLong())}.bind(this),500)}},{key:"stopCheckingIfSyncIsTakingTooLong",value:function(){this.$interval.hasOwnProperty("cancel")?this.$interval.cancel(this.syncStatus.checker):clearInterval(this.syncStatus.checker),this.syncStatus.checker=null}},{key:"lockSyncing",value:function(){this.syncLocked=!0}},{key:"unlockSyncing",value:function(){this.syncLocked=!1}},{key:"sync",value:function(){var t=g(r.mark((function t(){var n,i=this,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:{},!this.syncLocked){t.next=4;break}return console.log("Sync Locked, Returning;"),t.abrupt("return");case 4:return t.abrupt("return",new Promise(function(){var t=g(r.mark((function t(a,o){var s,u,c,l,d,p,f,h,g,m,_,v,y,b;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n||(n={}),s=i.modelManager.getDirtyItems(),u=s.filter((function(e){return!i.lastDirtyItemsSave||e.dirtiedDate>i.lastDirtyItemsSave})),t.next=5,i.getActiveKeyInfo(e.KeyRequestLoadSaveAccount);case 5:if(c=t.sent,l=i.syncStatus.syncOpInProgress,d=i.initialDataLoaded(),!l&&d){t.next=16;break}return i.performSyncAgainOnCompletion=!0,i.lastDirtyItemsSave=new Date,t.next=13,i.writeItemsToLocalStorage(u,!1);case 13:return l&&(i.queuedCallbacks.push(a),i.loggingEnabled&&console.warn("Attempting to sync while existing sync is in progress.")),d||(i.loggingEnabled&&console.warn("(1) Attempting to perform online sync before local data has loaded"),a()),t.abrupt("return");case 16:if(i.syncStatus.syncOpInProgress=!0,!c.offline){t.next=19;break}return t.abrupt("return",i.syncOffline(s).then((function(e){i.syncStatus.syncOpInProgress=!1,a(e)})).catch((function(e){i.notifyEvent("sync-exception",e)})));case 19:if(i.initialDataLoaded()){t.next=22;break}return console.error("Attempting to perform online sync before local data has loaded"),t.abrupt("return");case 22:return i.loggingEnabled&&console.log("Syncing online user."),p=i.syncStatus.needsMoreSync,i.syncStatus.syncStart=new Date,i.beginCheckingIfSyncIsTakingTooLong(),f=i.PerSyncItemUploadLimit,(h=s.slice(0,f)).lengthi.syncStatus.total&&(i.syncStatus.total=i.syncStatus.current),i.syncStatusDidChange(),t.next=34,i.writeItemsToLocalStorage(u,!1);case 34:return i.lastDirtyItemsSave=new Date,n.onPreSyncSave&&n.onPreSyncSave(),i.allRetreivedItems||(i.allRetreivedItems=[]),i.allSavedItems||(i.allSavedItems=[]),(g={}).limit=i.ServerItemDownloadLimit,n.performIntegrityCheck&&(g.compute_integrity=!0),t.prev=41,t.next=44,Promise.all(h.map((function(e){var t=new R(e,c.keys,c.auth_params);return t.additionalFields=n.additionalFields,t.paramsForSync()}))).then((function(e){g.items=e}));case 44:t.next=49;break;case 46:t.prev=46,t.t0=t.catch(41),i.notifyEvent("sync-exception",t.t0);case 49:for(m=!0,_=!1,v=void 0,t.prev=52,y=h[Symbol.iterator]();!(m=(b=y.next()).done);m=!0)b.value.dirtyCount=0;t.next=60;break;case 56:t.prev=56,t.t1=t.catch(52),_=!0,v=t.t1;case 60:t.prev=60,t.prev=61,m||null==y.return||y.return();case 63:if(t.prev=63,!_){t.next=66;break}throw v;case 66:return t.finish(63);case 67:return t.finish(60);case 68:return t.next=70,i.getSyncToken();case 70:return g.sync_token=t.sent,t.next=73,i.getCursorToken();case 73:return g.cursor_token=t.sent,g.api=C.getApiVersion(),i.loggingEnabled&&console.log("Syncing with params",g),t.prev=76,t.t2=i.httpManager,t.next=80,i.getSyncURL();case 80:t.t3=t.sent,t.t4=g,t.t5=function(e){i.handleSyncSuccess(h,e,n).then((function(){a(e)})).catch((function(e){console.log("Caught sync success exception:",e),i.handleSyncError(e,null,s).then((function(t){i.notifyEvent("sync-exception",e),a(t)}))}))},t.t6=function(e,t){i.handleSyncError(e,t,s).then((function(e){a(e)}))},t.t2.postAuthenticatedAbsolute.call(t.t2,t.t3,t.t4,t.t5,t.t6),t.next=90;break;case 87:t.prev=87,t.t7=t.catch(76),console.log("Sync exception caught:",t.t7);case 90:case"end":return t.stop()}}),t,null,[[41,46],[52,56,60,68],[61,,63,67],[76,87]])})));return function(e,n){return t.apply(this,arguments)}}()));case 5:case"end":return t.stop()}}),t,this)})));function n(){return t.apply(this,arguments)}return n}()},{key:"_awaitSleep",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.warn("Simulating high latency sync request",t),e.abrupt("return",new Promise((function(e,n){setTimeout((function(){e()}),t)})));case 2:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"handleSyncSuccess",value:function(){var t=g(r.mark((function t(n,i,a){var o,s,u,c,l,d,p,f,h,g,m,_,v,y,b,D,E=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!a.simulateHighLatency){t.next=4;break}return o=a.simulatedLatency||1e3,t.next=4,this._awaitSleep(o);case 4:for(this.syncStatus.error=null,this.loggingEnabled&&console.log("Sync response",i),s=this.allSavedItems.map((function(e){return e.uuid})),u=i.saved_items.map((function(e){return e.uuid})),i.retrieved_items=i.retrieved_items.filter((function(e){var t=s.includes(e.uuid),n=u.includes(e.uuid);if(t||n)return!1;var r=E.modelManager.findItem(e.uuid);return!r||!r.dirty})),c=[],l=!0,d=!1,p=void 0,t.prev=13,f=n[Symbol.iterator]();!(l=(h=f.next()).done);l=!0)0==(g=h.value).dirtyCount&&c.push(g);t.next=21;break;case 17:t.prev=17,t.t0=t.catch(13),d=!0,p=t.t0;case 21:t.prev=21,t.prev=22,l||null==f.return||f.return();case 24:if(t.prev=24,!d){t.next=27;break}throw p;case 27:return t.finish(24);case 28:return t.finish(21);case 29:return this.modelManager.clearDirtyItems(c),t.next=32,this.handleItemsResponse(i.retrieved_items,null,x.MappingSourceRemoteRetrieved,e.KeyRequestLoadSaveAccount);case 32:return m=t.sent,this.allRetreivedItems=this.allRetreivedItems.concat(m),this.syncStatus.retrievedCount=this.allRetreivedItems.length,_=["content","auth_hash"],t.next=38,this.handleItemsResponse(i.saved_items,_,x.MappingSourceRemoteSaved,e.KeyRequestLoadSaveAccount);case 38:return v=t.sent,this.allSavedItems=this.allSavedItems.concat(v),y=i.unsaved,t.next=43,this.deprecated_handleUnsavedItemsResponse(y);case 43:return t.next=45,this.handleConflictsResponse(i.conflicts);case 45:if(b=t.sent,D=b&&b.length>0,!b){t.next=50;break}return t.next=50,this.writeItemsToLocalStorage(b,!1);case 50:return t.next=52,this.writeItemsToLocalStorage(v,!1);case 52:return t.next=54,this.writeItemsToLocalStorage(m,!1);case 54:if(!i.integrity_hash||i.cursor_token){t.next=59;break}return t.next=57,this.handleServerIntegrityHash(i.integrity_hash);case 57:t.sent||this.syncDiscordance=this.majorDataChangeThreshold||v.length>=this.majorDataChangeThreshold||y&&y.length>=this.majorDataChangeThreshold||b&&b.length>=this.majorDataChangeThreshold)&&this.notifyEvent("major-data-change"),this.callQueuedCallbacks(i),this.notifyEvent("sync:completed",{retrievedItems:this.allRetreivedItems,savedItems:this.allSavedItems}),this.allRetreivedItems=[],this.allSavedItems=[],this.performSyncAgainOnCompletion&&(this.performSyncAgainOnCompletion=!1,setTimeout((function(){E.sync(a)}),10)),t.abrupt("return",i);case 88:case"end":return t.stop()}}),t,this,[[13,17,21,29],[22,,24,28]])})));function n(e,n,r){return t.apply(this,arguments)}return n}()},{key:"handleSyncError",value:function(){var e=g(r.mark((function e(t,n,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("Sync error: ",t),401==n&&this.notifyEvent("sync-session-invalid"),t?"string"==typeof t&&(t={error:{message:t}}):t={error:{message:"Could not connect to server."}},this.syncStatus.syncOpInProgress=!1,this.syncStatus.error=t.error,this.syncStatusDidChange(),this.writeItemsToLocalStorage(i,!1),this.modelManager.didSyncModelsOffline(i),this.stopCheckingIfSyncIsTakingTooLong(),this.notifyEvent("sync:error",t.error),this.callQueuedCallbacks({error:"Sync error"}),e.abrupt("return",t);case 12:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"handleItemsResponse",value:function(){var e=g(r.mark((function e(t,n,i,a){var o,s,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getActiveKeyInfo(a);case 2:return o=e.sent.keys,e.next=5,SFJS.itemTransformer.decryptMultipleItems(t,o);case 5:return e.next=7,this.modelManager.mapResponseItemsToLocalModelsOmittingFields(t,n,i);case 7:return s=e.sent,(u=s.filter((function(e){var t=e.errorDecryptingValueChanged;return e.errorDecryptingValueChanged=!1,t}))).length>0&&this.writeItemsToLocalStorage(u,!1),e.abrupt("return",s);case 11:case"end":return e.stop()}}),e,this)})));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:"refreshErroredItems",value:function(){var t=g(r.mark((function t(){var n;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((n=this.modelManager.allNondummyItems.filter((function(e){return 1==e.errorDecrypting}))).length>0)){t.next=3;break}return t.abrupt("return",this.handleItemsResponse(n,null,x.MappingSourceLocalRetrieved,e.KeyRequestLoadSaveAccount));case 3:case"end":return t.stop()}}),t,this)})));function n(){return t.apply(this,arguments)}return n}()},{key:"handleConflictsResponse",value:function(){var t=g(r.mark((function t(n){var i,a,o,s,u,c,l,d,p,f,h,g,m,_,v,y,b,D,E,C,S,k,T,w,A,O,N,I,F,L,R,M;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n&&0!=n.length){t.next=2;break}return t.abrupt("return");case 2:this.loggingEnabled&&console.log("Handle Conflicted Items:",n),i={},a=!0,o=!1,s=void 0,t.prev=7,u=n[Symbol.iterator]();case 9:if(a=(c=u.next()).done){t.next=21;break}if(l=c.value,d=l.server_item||l.unsaved_item,p=this.modelManager.findItem(d.uuid)){t.next=16;break}return i[d.uuid]={},t.abrupt("continue",18);case 16:f=p.getContentCopy(),i[d.uuid]={frozenContent:f,itemRef:p};case 18:a=!0,t.next=9;break;case 21:t.next=27;break;case 23:t.prev=23,t.t0=t.catch(7),o=!0,s=t.t0;case 27:t.prev=27,t.prev=28,a||null==u.return||u.return();case 30:if(t.prev=30,!o){t.next=33;break}throw s;case 33:return t.finish(30);case 34:return t.finish(27);case 35:h=[],g=!0,m=!1,_=void 0,t.prev=39,v=n[Symbol.iterator]();case 41:if(g=(y=v.next()).done){t.next=91;break}return b=y.value,D=b.server_item||b.unsaved_item,t.t1=SFJS.itemTransformer,t.t2=[D],t.next=48,this.getActiveKeyInfo(e.KeyRequestLoadSaveAccount);case 48:return t.t3=t.sent.keys,t.next=51,t.t1.decryptMultipleItems.call(t.t1,t.t2,t.t3);case 51:if(E=i[D.uuid],C=E.frozenContent,S=E.itemRef){t.next=54;break}return t.abrupt("continue",88);case 54:if(h.push(S),"uuid_conflict"!==b.type){t.next=62;break}return t.next=58,this.modelManager.alternateUUIDForItem(S);case 58:k=t.sent,h.push(k),t.next=88;break;case 62:if("sync_conflict"!==b.type){t.next=86;break}return t.next=65,this.modelManager.createDuplicateItemFromResponseItem(D);case 65:if(T=t.sent,w=this.modelManager.duplicateItemWithCustomContent({content:C,duplicateOf:S}),A=!w.isItemContentEqualWith(T),O=!S.isItemContentEqualWith(T),N=!1,I=!1,F=!1,L=!1,D.deleted||S.deleted?L=!0:A?(R=20,(new Date-S.client_updated_at)/1e30&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(){var i=g(r.mark((function i(a,o){var s;return r.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s={limit:n.limit||500,sync_token:n.syncToken,cursor_token:n.cursorToken,content_type:n.contentType,event:n.event,api:C.getApiVersion()},i.prev=1,i.t0=t.httpManager,i.next=5,t.getSyncURL();case 5:i.t1=i.sent,i.t2=s,i.t3=function(){var i=g(r.mark((function i(o){var s,u;return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n.retrievedItems||(n.retrievedItems=[]),s=o.retrieved_items,r.next=4,t.getActiveKeyInfo(e.KeyRequestLoadSaveAccount);case 4:return u=r.sent.keys,r.next=7,SFJS.itemTransformer.decryptMultipleItems(s,u);case 7:n.retrievedItems=n.retrievedItems.concat(s.map((function(e){return t.modelManager.createItem(e)}))),n.syncToken=o.sync_token,n.cursorToken=o.cursor_token,n.cursorToken?t.stateless_downloadAllItems(n).then(a):a(n.retrievedItems);case 11:case"end":return r.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}(),i.t4=function(e,t){o(e)},i.t0.postAuthenticatedAbsolute.call(i.t0,i.t1,i.t2,i.t3,i.t4),i.next=16;break;case 12:i.prev=12,i.t5=i.catch(1),console.log("Download all items exception caught:",i.t5),o(i.t5);case 16:case"end":return i.stop()}}),i,null,[[1,12]])})));return function(e,t){return i.apply(this,arguments)}}())}},{key:"resolveOutOfSync",value:function(){var e=g(r.mark((function e(){var t=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.stateless_downloadAllItems({event:"resolve-out-of-sync"}).then(function(){var e=g(r.mark((function e(n){var i,a,o,s,u,c,l,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=[],a=!0,o=!1,s=void 0,e.prev=4,u=n[Symbol.iterator]();case 6:if(a=(c=u.next()).done){e.next=18;break}if(l=c.value,!(d=t.modelManager.findItem(l.uuid))){e.next=14;break}if(l.isItemContentEqualWith(d)){e.next=14;break}return e.next=14,t.modelManager.duplicateItemAndAddAsConflict(d);case 14:i.push(l);case 15:a=!0,e.next=6;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(4),o=!0,s=e.t0;case 24:e.prev=24,e.prev=25,a||null==u.return||u.return();case 27:if(e.prev=27,!o){e.next=30;break}throw s;case 30:return e.finish(27);case 31:return e.finish(24);case 32:return e.next=34,t.modelManager.mapResponseItemsToLocalModelsWithOptions({items:i,source:x.MappingSourceRemoteRetrieved});case 34:return e.next=36,t.writeItemsToLocalStorage(t.modelManager.allNondummyItems);case 36:return e.abrupt("return",t.sync({performIntegrityCheck:!0}));case 37:case"end":return e.stop()}}),e,null,[[4,20,24,32],[25,,27,31]])})));return function(t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"handleSignout",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.outOfSync=!1,this.loadLocalDataPromise=null,this.performSyncAgainOnCompletion=!1,this.syncStatus.syncOpInProgress=!1,this._queuedCallbacks=[],this.syncStatus={},e.abrupt("return",this.clearSyncToken());case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"clearSyncToken",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._syncToken=null,this._cursorToken=null,e.abrupt("return",this.storageManager.removeItem("syncToken"));case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"__setLocalDataNotLoaded",value:function(){this.loadLocalDataPromise=null,this._initialDataLoaded=!1}},{key:"queuedCallbacks",get:function(){return this._queuedCallbacks||(this._queuedCallbacks=[]),this._queuedCallbacks}}]),e}();i.SFSyncManager=L;var P=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(this,e),this.content={},this.referencingObjects=[],this.updateFromJSON(t),this.uuid||"undefined"!==typeof SFJS&&SFJS.crypto.generateUUIDSync&&(this.uuid=SFJS.crypto.generateUUIDSync()),"object"!==f(this.content)||this.content.references||(this.content.references=[])}return y(e,[{key:"initUUID",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.uuid){e.next=4;break}return e.next=3,SFJS.crypto.generateUUID();case 3:this.uuid=e.sent;case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"updateFromJSON",value:function(t){if(t){this.deleted=t.deleted,this.uuid=t.uuid,this.enc_item_key=t.enc_item_key,this.auth_hash=t.auth_hash,this.auth_params=t.auth_params;for(var n=0,r=["errorDecrypting","dirty","dirtyCount","dirtiedDate","dummy"];n"==n.operator?g>h:"<="==n.operator?g<=h:">="==n.operator?g>=h:"startsWith"==n.operator?g.startsWith(h):"in"==n.operator?-1!=h.indexOf(g):"includes"==n.operator?this.resolveIncludesPredicate(g,h):"matches"==n.operator&&new RegExp(h).test(g)}},{key:"resolveIncludesPredicate",value:function(t,n){if("string"==typeof n)return t.includes(n);var r;r=Array.isArray(n)?e.fromArray(n):n;var i=!0,a=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(this.ObjectSatisfiesPredicate(c,r))return!0}}catch(l){a=!0,o=l}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}return!1}},{key:"ItemSatisfiesPredicate",value:function(t,n){return Array.isArray(n)&&(n=e.fromArray(n)),this.ObjectSatisfiesPredicate(t,n)}},{key:"ItemSatisfiesPredicates",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;if(!this.ItemSatisfiesPredicate(e,s))return!1}}catch(u){r=!0,i=u}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return!0}},{key:"DateFromString",value:function(e){var t=e.split("."),n=t[1],r=new Date,i=parseInt(t[0]);return"days"==n?r.setDate(r.getDate()-i):"hours"==n&&r.setHours(r.getHours()-i),r}},{key:"IsRecursiveOperator",value:function(e){return["and","or"].includes(e)}}]),e}();i.SFPredicate=M;var B=function(e){function t(e){var r;return m(this,t),(r=n(this,o(t).call(this,e))).content.desktopPrivileges||(r.content.desktopPrivileges={}),r}return s(t,e),y(t,null,[{key:"contentType",value:function(){return"SN|Privileges"}}]),y(t,[{key:"setCredentialsForAction",value:function(e,t){this.content.desktopPrivileges[e]=t}},{key:"getCredentialsForAction",value:function(e){return this.content.desktopPrivileges[e]||[]}},{key:"toggleCredentialForAction",value:function(e,t){this.isCredentialRequiredForAction(e,t)?this.removeCredentialForAction(e,t):this.addCredentialForAction(e,t)}},{key:"removeCredentialForAction",value:function(e,t){_.pull(this.content.desktopPrivileges[e],t)}},{key:"addCredentialForAction",value:function(e,t){var n=this.getCredentialsForAction(e);n.push(t),this.setCredentialsForAction(e,n)}},{key:"isCredentialRequiredForAction",value:function(e,t){return this.getCredentialsForAction(e).includes(t)}}]),t}(P);i.SFPrivileges=B;var j=function(e){function t(e){var r;return m(this,t),(r=n(this,o(t).call(this,e))).content.itemUUIDToItemHistoryMapping||(r.content.itemUUIDToItemHistoryMapping={}),Object.keys(r.content.itemUUIDToItemHistoryMapping).forEach((function(e){var t=r.content.itemUUIDToItemHistoryMapping[e];r.content.itemUUIDToItemHistoryMapping[e]=new U(t)})),r}return s(t,e),y(t,[{key:"addEntryForItem",value:function(e){return this.historyForItem(e).addHistoryEntryForItem(e)}},{key:"historyForItem",value:function(e){var t=this.content.itemUUIDToItemHistoryMapping[e.uuid];return t||(t=this.content.itemUUIDToItemHistoryMapping[e.uuid]=new U),t}},{key:"clearItemHistory",value:function(e){this.historyForItem(e).clear()}},{key:"clearAllHistory",value:function(){this.content.itemUUIDToItemHistoryMapping={}}},{key:"optimizeHistoryForItem",value:function(e){var n=this.historyForItem(e);n.entries.length>t.LargeItemEntryAmountThreshold&&n.optimize()}}]),t}(P);i.SFHistorySession=j,j.LargeItemEntryAmountThreshold=60;var U=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(m(this,e),this.entries||(this.entries=[]),t.entries){var n=!0,r=!1,i=void 0;try{for(var a,o=t.entries[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value,u=this.createEntryForItem(s.item);u.setPreviousEntry(this.getLastEntry()),this.entries.push(u)}}catch(c){r=!0,i=c}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}}return y(e,[{key:"createEntryForItem",value:function(t){var n=e.HistoryEntryClassMapping&&e.HistoryEntryClassMapping[t.content_type];return n||(n=V),new n(t)}},{key:"getLastEntry",value:function(){return this.entries[this.entries.length-1]}},{key:"addHistoryEntryForItem",value:function(e){var t=this.createEntryForItem(e),n=this.getLastEntry();if(t.setPreviousEntry(n),!t.isSameAsEntry(n))return this.entries.push(t),t}},{key:"clear",value:function(){this.entries.length=0}},{key:"optimize",value:function(){var t=this,n=[],r=function(t){return t.deltaSize()>e.LargeEntryDeltaThreshold},i=function(e,i,a){if(a?n.push(e):-1!==(i=n.indexOf(e))&&n.splice(i,1),a&&r(e)&&-1==e.operationVector()){var o=t.entries[i-1];o&&n.push(o)}};this.entries.forEach((function(e,n){if(0==n||n==t.entries.length-1)i(e,n,!0);else{var a=r(e);i(e,n,a)}})),this.entries=this.entries.filter((function(e,t){return-1!==n.indexOf(e)}))}}]),e}();i.SFItemHistory=U,U.LargeEntryDeltaThreshold=15;var V=function(){function e(t){m(this,e),this.item=P.deepMerge({},t),this.defaultContentKeyToDiffOn="text",this.textCharDiffLength=0,"string"==typeof this.item.updated_at&&(this.item.updated_at=new Date(this.item.updated_at))}return y(e,[{key:"setPreviousEntry",value:function(e){this.hasPreviousEntry=null!=e,this.item.content[this.defaultContentKeyToDiffOn]&&(this.textCharDiffLength=e?this.item.content[this.defaultContentKeyToDiffOn].length-e.item.content[this.defaultContentKeyToDiffOn].length:this.item.content[this.defaultContentKeyToDiffOn].length)}},{key:"operationVector",value:function(){return void 0!=this.textCharDiffLength?this.hasPreviousEntry&&0!=this.textCharDiffLength?this.textCharDiffLength<0?-1:1:0:1}},{key:"deltaSize",value:function(){return void 0!=this.textCharDiffLength?Math.abs(this.textCharDiffLength):1}},{key:"isSameAsEntry",value:function(e){if(!e)return!1;var t=new P(this.item),n=new P(e.item);return t.isItemContentEqualWith(n)}}]),e}();i.SFItemHistoryEntry=V,E="undefined"!==typeof window?window:"undefined"!==typeof e?e:null;var z=function(){function e(){m(this,e),this.DefaultPBKDF2Length=768}return y(e,[{key:"generateUUIDSync",value:function(){var e=E.crypto||E.msCrypto;if(e){var t=new Uint32Array(4);e.getRandomValues(t);var n=-1;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){n++;var r=t[n>>3]>>n%8*4&15;return("x"==e?r:3&r|8).toString(16)}))}var r=(new Date).getTime();return E.performance&&"function"===typeof E.performance.now&&(r+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=(r+16*Math.random())%16|0;return r=Math.floor(r/16),("x"==e?t:3&t|8).toString(16)}))}},{key:"generateUUID",value:function(){var e=g(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.generateUUIDSync());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"timingSafeEqual",value:function(e,t){var n=String(e),r=String(t),i=n.length,a=0;i!==r.length&&(r=n,a=1);for(var o=0;o0&&void 0!==h[0]?h[0]:{},i=n.ciphertextToAuth,a=n.contentCiphertext,o=n.encryptionKey,s=n.iv,u=n.authHash,c=n.authKey,!(h.length>1?h[1]:void 0)||u){e.next=5;break}return console.error("Auth hash is required."),e.abrupt("return");case 5:if(!u){e.next=12;break}return e.next=8,this.hmac256(i,c);case 8:if(l=e.sent,!1!==this.timingSafeEqual(u,l)){e.next=12;break}return console.error("Auth hash does not match, returning null."),e.abrupt("return",null);case 12:return d=t.enc.Hex.parse(o),p=t.enc.Hex.parse(s||""),f=t.AES.decrypt(a,d,{iv:p,mode:t.mode.CBC,padding:t.pad.Pkcs7}),e.abrupt("return",f.toString(t.enc.Utf8));case 16:case"end":return e.stop()}}),e,this)})));function n(){return e.apply(this,arguments)}return n}()},{key:"encryptText",value:function(){var e=g(r.mark((function e(n,i,a){var o,s,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.enc.Hex.parse(i),s=t.enc.Hex.parse(a||""),u=t.AES.encrypt(n,o,{iv:s,mode:t.mode.CBC,padding:t.pad.Pkcs7}),e.abrupt("return",u.toString());case 4:case"end":return e.stop()}}),e)})));function n(t,n,r){return e.apply(this,arguments)}return n}()},{key:"generateRandomKey",value:function(){var e=g(r.mark((function e(n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.lib.WordArray.random(n/8).toString());case 1:case"end":return e.stop()}}),e)})));function n(t){return e.apply(this,arguments)}return n}()},{key:"generateItemEncryptionKey",value:function(){var e=g(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=512,n=1,e.next=4,this.generateRandomKey(t);case 4:return i=e.sent,e.next=7,this.generateRandomKey(t);case 7:return a=e.sent,e.abrupt("return",this.pbkdf2(a,i,n,t));case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"firstHalfOfKey",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.substring(0,t.length/2));case 1:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"secondHalfOfKey",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.substring(t.length/2,t.length));case 1:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"base64",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E.btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)}))));case 1:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"base64Decode",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E.atob(t));case 1:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"sha256",value:function(){var e=g(r.mark((function e(n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.SHA256(n).toString());case 1:case"end":return e.stop()}}),e)})));function n(t){return e.apply(this,arguments)}return n}()},{key:"hmac256",value:function(){var e=g(r.mark((function e(n,i){var a,o,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.enc.Hex.parse(i),o=t.enc.Utf8.parse(n),s=t.HmacSHA256(o,a).toString(),e.abrupt("return",s);case 4:case"end":return e.stop()}}),e)})));function n(t,n){return e.apply(this,arguments)}return n}()},{key:"generateSalt",value:function(){var e=g(r.mark((function e(t,n,i,a){var o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sha256([t,"SF",n,i,a].join(":"));case 2:return o=e.sent,e.abrupt("return",o);case 4:case"end":return e.stop()}}),e,this)})));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:"generateSymmetricKeyPair",value:function(){var e=g(r.mark((function e(){var t,n,i,a,o,s,u,c,l,d,p=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},n=t.password,i=t.pw_salt,a=t.pw_cost,e.next=3,this.pbkdf2(n,i,a,this.DefaultPBKDF2Length);case 3:return o=e.sent,s=o.length,u=s/3,c=o.slice(0,u),l=o.slice(u,2*u),d=o.slice(2*u,3*u),e.abrupt("return",[c,l,d]);case 10:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"computeEncryptionKeysForUser",value:function(){var e=g(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("003"!=n.version){e.next=9;break}if(n.identifier){e.next=4;break}return console.error("authParams is missing identifier."),e.abrupt("return");case 4:return e.next=6,this.generateSalt(n.identifier,n.version,n.pw_cost,n.pw_nonce);case 6:i=e.sent,e.next=10;break;case 9:i=n.pw_salt;case 10:return e.abrupt("return",this.generateSymmetricKeyPair({password:t,pw_salt:i,pw_cost:n.pw_cost}).then((function(e){return{pw:e[0],mk:e[1],ak:e[2]}})));case 11:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"generateInitialKeysAndAuthParamsForUser",value:function(){var e=g(r.mark((function e(t,n){var i,a,o,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this.SFJS.version,a=this.SFJS.defaultPasswordGenerationCost,e.next=4,this.generateRandomKey(256);case 4:return o=e.sent,e.next=7,this.generateSalt(t,i,a,o);case 7:return s=e.sent,e.abrupt("return",this.generateSymmetricKeyPair({password:n,pw_salt:s,pw_cost:a}).then((function(e){var n={pw_nonce:o,pw_cost:a,identifier:t,version:i};return{keys:{pw:e[0],mk:e[1],ak:e[2]},authParams:n}})));case 9:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),e}();i.SFAbstractCrypto=z;var H=function(e){function i(){return m(this,i),n(this,o(i).apply(this,arguments))}return s(i,e),y(i,[{key:"pbkdf2",value:function(){var e=g(r.mark((function e(n,i,a,o){var s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={keySize:o/32,hasher:t.algo.SHA512,iterations:a},e.abrupt("return",t.PBKDF2(n,i,s).toString());case 2:case"end":return e.stop()}}),e)})));function n(t,n,r,i){return e.apply(this,arguments)}return n}()}]),i}(z);i.SFCryptoJS=H;var W=(E="undefined"!==typeof window?window:"undefined"!==typeof e?e:null).crypto?E.crypto.subtle:null,K=function(e){function t(){return m(this,t),n(this,o(t).apply(this,arguments))}return s(t,e),y(t,[{key:"pbkdf2",value:function(){var e=g(r.mark((function e(t,n,i,a){var o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.webCryptoImportKey(t,"PBKDF2",["deriveBits"]);case 2:if(o=e.sent){e.next=6;break}return console.log("Key is null, unable to continue"),e.abrupt("return",null);case 6:return e.abrupt("return",this.webCryptoDeriveBits(o,n,i,a));case 7:case"end":return e.stop()}}),e,this)})));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:"generateRandomKey",value:function(){var e=g(r.mark((function e(t){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!0,e.abrupt("return",W.generateKey({name:"AES-CBC",length:t},n,["encrypt","decrypt"]).then((function(e){return W.exportKey("raw",e).then(function(){var e=g(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.arrayBufferToHexString(new Uint8Array(t));case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.error("Error exporting key",e)}))})).catch((function(e){console.error("Error generating key",e)})));case 2:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"generateItemEncryptionKey",value:function(){var e=g(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=256,e.abrupt("return",Promise.all([this.generateRandomKey(t),this.generateRandomKey(t)]).then((function(e){return e.join("")})));case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"encryptText",value:function(){var e=g(r.mark((function e(t,n,i){var a,o,s,u,c,l=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i){e.next=6;break}return e.next=3,this.hexStringToArrayBuffer(i);case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=new ArrayBuffer(16);case 7:return a=e.t0,o={name:"AES-CBC",iv:a},e.next=11,this.hexStringToArrayBuffer(n);case 11:return s=e.sent,e.next=14,this.webCryptoImportKey(s,o.name,["encrypt"]);case 14:return u=e.sent,e.next=17,this.stringToArrayBuffer(t);case 17:return c=e.sent,e.abrupt("return",crypto.subtle.encrypt(o,u,c).then(function(){var e=g(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.arrayBufferToBase64(t);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 19:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"decryptText",value:function(){var e=g(r.mark((function e(){var t,n,i,a,o,s,u,c,l,d,p,f,h,m=this,_=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=_.length>0&&void 0!==_[0]?_[0]:{},n=t.ciphertextToAuth,i=t.contentCiphertext,a=t.encryptionKey,o=t.iv,s=t.authHash,u=t.authKey,!(_.length>1?_[1]:void 0)||s){e.next=5;break}return console.error("Auth hash is required."),e.abrupt("return");case 5:if(!s){e.next=12;break}return e.next=8,this.hmac256(n,u);case 8:if(c=e.sent,!1!==this.timingSafeEqual(s,c)){e.next=12;break}return console.error("Auth hash does not match, returning null. ".concat(s," != ").concat(c)),e.abrupt("return",null);case 12:if(!o){e.next=18;break}return e.next=15,this.hexStringToArrayBuffer(o);case 15:e.t0=e.sent,e.next=19;break;case 18:e.t0=new ArrayBuffer(16);case 19:return l=e.t0,d={name:"AES-CBC",iv:l},e.next=23,this.hexStringToArrayBuffer(a);case 23:return p=e.sent,e.next=26,this.webCryptoImportKey(p,d.name,["decrypt"]);case 26:return f=e.sent,e.next=29,this.base64ToArrayBuffer(i);case 29:return h=e.sent,e.abrupt("return",crypto.subtle.decrypt(d,f,h).then(function(){var e=g(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.arrayBufferToString(t);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.error("Error decrypting:",e)})));case 31:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"hmac256",value:function(){var e=g(r.mark((function e(t,n){var i,a,o,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.hexStringToArrayBuffer(n);case 2:return i=e.sent,e.next=5,this.webCryptoImportKey(i,"HMAC",["sign"],{name:"SHA-256"});case 5:return a=e.sent,e.next=8,this.stringToArrayBuffer(t);case 8:return o=e.sent,e.abrupt("return",crypto.subtle.sign({name:"HMAC"},a,o).then(function(){var e=g(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.arrayBufferToHexString(t);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.error("Error computing hmac",e)})));case 10:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"webCryptoImportKey",value:function(){var e=g(r.mark((function e(t,n,i,a){var o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!==typeof t){e.next=6;break}return e.next=3,this.stringToArrayBuffer(t);case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=t;case 7:return o=e.t0,e.abrupt("return",W.importKey("raw",o,{name:n,hash:a},!1,i).then((function(e){return e})).catch((function(e){return console.error(e),null})));case 9:case"end":return e.stop()}}),e,this)})));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:"webCryptoDeriveBits",value:function(){var e=g(r.mark((function e(t,n,i,a){var o,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stringToArrayBuffer(n);case 2:return e.t0=e.sent,e.t1=i,e.t2={name:"SHA-512"},o={name:"PBKDF2",salt:e.t0,iterations:e.t1,hash:e.t2},e.abrupt("return",W.deriveBits(o,t,a).then(function(){var e=g(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.arrayBufferToHexString(new Uint8Array(t));case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){return console.error(e),null})));case 7:case"end":return e.stop()}}),e,this)})));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:"stringToArrayBuffer",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new Blob([t]),i=new FileReader;i.onload=function(t){e(t.target.result)},i.readAsArrayBuffer(r)})));case 1:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"arrayBufferToString",value:function(){var e=g(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new Blob([t]),i=new FileReader;i.onload=function(t){e(t.target.result)},i.readAsText(r)})));case 1:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"arrayBufferToHexString",value:function(){var e=g(r.mark((function e(t){var n,i,a,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=new Uint8Array(t),i="",o=0;o5e3)||this.crypto instanceof K}},{key:"supportedVersions",value:function(){return["001","002","003"]}},{key:"isVersionNewerThanLibraryVersion",value:function(e){var t=this.version();return parseInt(e)>parseInt(t)}},{key:"isProtocolVersionOutdated",value:function(e){var t={"001":Date.parse("2018-01-01"),"002":Date.parse("2020-01-01")}[e];return!!t&&new Date>t}},{key:"costMinimumForVersion",value:function(e){return{"001":3e3,"002":3e3,"003":11e4}[e]}},{key:"defaultPasswordGenerationCost",value:function(){return this.costMinimumForVersion(this.version())}}]),e}();if(i.StandardFile=G,E)try{E.StandardFile=G,E.SFJS=new G,E.SFCryptoWeb=K,E.SFCryptoJS=H,E.SFItemTransformer=q,E.SFModelManager=x,E.SFItem=P,E.SFItemParams=R,E.SFHttpManager=C,E.SFStorageManager=I,E.SFSyncManager=L,E.SFAuthManager=D,E.SFMigrationManager=S,E.SFAlertManager=b,E.SFPredicate=M,E.SFHistorySession=j,E.SFSessionHistoryManager=O,E.SFItemHistory=U,E.SFItemHistoryEntry=V,E.SFPrivilegesManager=k,E.SFPrivileges=B,E.SFSingletonManager=N}catch(Y){console.log("Exception while exporting window variables",Y)}}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}]},{},[1])(1)}).call(t,n(3))},function(e,t){!function(t){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,a="function"===typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag",c="object"===typeof e,l=t.regeneratorRuntime;if(l)c&&(e.exports=l);else{(l=t.regeneratorRuntime=c?e.exports:{}).wrap=b;var d="suspendedStart",p="suspendedYield",f="executing",h="completed",g={},m={};m[o]=function(){return this};var _=Object.getPrototypeOf,v=_&&_(_(N([])));v&&v!==r&&i.call(v,o)&&(m=v);var y=S.prototype=E.prototype=Object.create(m);C.prototype=y.constructor=S,S.constructor=C,S[u]=C.displayName="GeneratorFunction",l.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===C||"GeneratorFunction"===(t.displayName||t.name))},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(y),e},l.awrap=function(e){return{__await:e}},x(k.prototype),k.prototype[s]=function(){return this},l.AsyncIterator=k,l.async=function(e,t,n,r){var i=new k(b(e,t,n,r));return l.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(y),y[u]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},l.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=N,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,i){return s.type="throw",s.arg=e,t.next=r,i&&(t.method="next",t.arg=n),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:N(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),g}}}function b(e,t,n,r){var i=t&&t.prototype instanceof E?t:E,a=Object.create(i.prototype),o=new O(r||[]);return a._invoke=function(e,t,n){var r=d;return function(i,a){if(r===f)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw a;return I()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=T(o,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var u=D(e,t,n);if("normal"===u.type){if(r=n.done?h:p,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(e,n,o),a}function D(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function E(){}function C(){}function S(){}function x(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function k(e){function t(n,r,a,o){var s=D(e[n],e,r);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"===typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,a,o)}),(function(e){t("throw",e,a,o)})):Promise.resolve(c).then((function(e){u.value=e,a(u)}),o)}o(s.arg)}var n;this._invoke=function(e,r){function i(){return new Promise((function(n,i){t(e,r,n,i)}))}return n=n?n.then(i,i):i()}}function T(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,T(e,t),"throw"===t.method))return g;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=D(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,g;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,g):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function N(e){if(e){var t=e[o];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r=0?this.items[l]=c:this.items.push(c);case 15:n=!0,r.next=5;break;case 18:r.next=24;break;case 20:r.prev=20,r.t0=r.catch(3),i=!0,a=r.t0;case 24:r.prev=24,r.prev=25,n||null==s.return||s.return();case 27:if(r.prev=27,!i){r.next=30;break}throw a;case 30:return r.finish(27);case 31:return r.finish(24);case 32:this.notifyObserversOfEvent(e.BridgeEventReceivedItems);case 33:case"end":return r.stop()}}),null,this,[[3,20,24,32],[25,,27,31]])}},{key:"indexOfItem",value:function(e){for(var t in this.items)if(this.items[t].uuid==e.uuid)return t;return-1}},{key:"removeItemFromItems",value:function(e){this.items=this.items.filter((function(t){return t.uuid!==e.uuid}))}},{key:"createItem",value:function(e,t){this.createItems([e],t)}},{key:"createItems",value:function(e,t){this.componentManager.createItems(e,(function(e){t&&t(e.map((function(e){return new o.SFItem(e)})))}))}},{key:"saveItem",value:function(e){return r.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.saveItems([e]));case 1:case"end":return t.stop()}}),null,this)}},{key:"saveItems",value:function(t){var n=this;return r.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(r,i){n.componentManager.saveItems(t,(function(t){r(t),n.notifyObserversOfEvent(e.BridgeEventSavedItem)}))})));case 1:case"end":return r.stop()}}))}},{key:"indexOfItem",value:function(e){for(var t in this.items)if(this.items[t].uuid==e.uuid)return t;return-1}},{key:"deleteItem",value:function(e,t){this.deleteItems([e],t)}},{key:"deleteItems",value:function(e,t){this.componentManager.deleteItems(e,t)}},{key:"removeItemFromItems",value:function(e){this.items=this.items.filter((function(t){return t.uuid!==e.uuid}))}}])&&s(t.prototype,n),i&&s(t,i),e}();u(c,"FileItemContentTypeKey","SN|FileSafe|File"),u(c,"FileSafeCredentialsContentType","SN|FileSafe|Credentials"),u(c,"FileDescriptorContentTypeKey","SN|FileSafe|FileMetadata"),u(c,"FileSafeIntegrationContentTypeKey","SN|FileSafe|Integration"),u(c,"BridgeEventLoadedCredentials","BridgeEventLoadedCredentials"),u(c,"BridgeEventReceivedItems","BridgeEventReceivedItems"),u(c,"BridgeEventSavedItem","BridgeEventSavedItem")},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",(function(){return f}));var i=n(2),a=n(7),o=n(8),s=n(9),u=n(10),c=n(12),l=n(0);n.n(l);function d(e,t){for(var n=0;n(t=G(t,e)).length)n=e;else{var r=0,i=-1,a=-1,o=(n=t).length;for(0>r&&(r=-r>o?0:o+r),0>(i=i>o?o:i)&&(i+=o),o=r>i?0:i-r>>>0,r>>>=0,i=Array(o);++aa?$e:o,a=1),t=Object(t);++is))return!1;if((u=a.get(e))&&a.get(t))return u==t;var u=-1,c=!0,l=2&n?new x:$e;for(a.set(e,t),a.set(t,e);++u(n=null==n?0:Le(n))&&(n=Gt(r+n,0)),h(e,ae(t,3),n)):-1}function ye(e){return null!=e&&e.length?L(e,1):[]}function be(e){var t=null==e?0:e.length;return t?e[t-1]:$e}function De(e,t){var n;if(e&&e.length&&t&&t.length){var r=g,i=-1,a=(n=t).length;for(e===n&&(n=Q(n));++i=e}function we(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ae(e){return null!=e&&"object"==typeof e}function Oe(e){return!(!Ae(e)||"[object Object]"!=M(e))&&(null===(e=Rt(e))||"function"==typeof(e=Tt.call(e,"constructor")&&e.constructor)&&e instanceof e&&kt.call(e)==Ot)}function Ne(e){return"string"==typeof e||!Sn(e)&&Ae(e)&&"[object String]"==M(e)}function Ie(e){return"symbol"==typeof e||Ae(e)&&"[object Symbol]"==M(e)}function Fe(e){return e?(e=Pe(e))===Qe||e===-Qe?17976931348623157e292*(0>e?-1:1):e===e?e:0:0===e?e:0}function Le(e){var t=(e=Fe(e))%1;return e===e?t?e-t:e:0}function Pe(e){if("number"==typeof e)return e;if(Ie(e))return Xe;if(we(e)&&(e=we(e="function"==typeof e.valueOf?e.valueOf():e)?e+"":e),"string"!=typeof e)return 0===e?e:+e;e=e.replace(rt,"");var t=st.test(e);return t||ct.test(e)?ht(e.slice(2),t?2:8):ot.test(e)?Xe:+e}function Re(e){return X(e,Ve(e))}function Me(e){return null==e?"":K(e)}function Be(e,t,n){return(e=null==e?$e:P(e,t))===$e?n:e}function je(e,t){var n;if(n=null!=e){for(var r,i=-1,a=(r=G(t,n=e)).length,o=!1;++i(e=O(t,e)))&&(e==t.length-1?t.pop():jt.call(t,e,1),--this.size,!0)},C.prototype.get=function(e){var t=this.__data__;return 0>(e=O(t,e))?$e:t[e][1]},C.prototype.has=function(e){return-1r?(++this.size,n.push([e,t])):n[r][1]=t,this},S.prototype.clear=function(){this.size=0,this.__data__={hash:new E,map:new(Qt||C),string:new E}},S.prototype.delete=function(e){return e=oe(this,e).delete(e),this.size-=e?1:0,e},S.prototype.get=function(e){return oe(this,e).get(e)},S.prototype.has=function(e){return oe(this,e).has(e)},S.prototype.set=function(e,t){var n=oe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},x.prototype.add=x.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},x.prototype.has=function(e){return this.__data__.has(e)},k.prototype.clear=function(){this.__data__=new C,this.size=0},k.prototype.delete=function(e){var t=this.__data__;return e=t.delete(e),this.size=t.size,e},k.prototype.get=function(e){return this.__data__.get(e)},k.prototype.has=function(e){return this.__data__.has(e)},k.prototype.set=function(e,t){var n=this.__data__;if(n instanceof C){var r=n.__data__;if(!Qt||199>r.length)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new S(r)}return n.set(e,t),this.size=n.size,this};var pn=function(e,t){if(null==e)return e;if(!Se(e))return function(e,t){return e&&fn(e,t,Ue)}(e,t);for(var n=e.length,r=-1,i=Object(e);++rn&&(n=Gt(r+n,0)),Ne(e)?n<=r&&-10){var i=!0,a=!1,o=void 0;try{for(var s,u=t.integrations[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(c!=e){t.setIntegrationAsDefault(c);break}}}catch(l){a=!0,o=l}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}}}))}},{key:"integrations",get:function(){return this.extensionBridge.filterItems(o.a.FileSafeIntegrationContentTypeKey)}}])&&s(t.prototype,n),i&&s(t,i),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n(1),a=(n.n(i),n(0)),o=(n.n(a),n(2));function s(e,t){for(var n=0;n0&&(e=n.credentials[0]),e})),u(this,"setCredentialAsDefault",(function(e){var t=n.getDefaultCredentials();t&&(t.content.isDefault=!1),e.content.isDefault=!0,n.extensionBridge.saveItems([t,e])})),u(this,"deleteCredential",(function(e){n.extensionBridge.deleteItem(e)})),this.extensionBridge=r,this.onCredentialLoad=i,this.credentials=[],this.extensionBridge.addEventHandler((function(e){e==o.a.BridgeEventReceivedItems&&n.reloadCredentials()}))}var t,n,i;return t=e,(n=[{key:"reloadCredentials",value:function(){this.credentials=[];var e=this.extensionBridge.filterItems(o.a.FileSafeCredentialsContentType);if(0!=e.length){var t=!0,n=!1,r=void 0;try{for(var i,a=e[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var s=i.value;this.credentials.find((function(e){return e.uuid==s.uuid}))||this.credentials.push(s)}}catch(u){n=!0,r=u}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}this.onCredentialLoad(),this.credentials.length>0&&this.didLoadCredentials()}}},{key:"createNewCredentials",value:function(){var e,t,n,i,s;return r.async((function(u){for(;;)switch(u.prev=u.next){case 0:return e=256,u.next=3,r.awrap(SFJS.crypto.generateRandomKey(e));case 3:return t=u.sent,u.next=6,r.awrap(SFJS.crypto.generateRandomKey(e));case 6:return n=u.sent,u.next=9,r.awrap(SFJS.crypto.generateInitialKeysAndAuthParamsForUser(t,n));case 9:return(i=u.sent).isDefault=0==this.credentials.length,s=new a.SFItem({content_type:o.a.FileSafeCredentialsContentType,content:i}),this.extensionBridge.saveItem(s),this.didLoadCredentials(),u.abrupt("return",s);case 15:case"end":return u.stop()}}),null,this)}},{key:"didLoadCredentials",value:function(){this.extensionBridge.notifyObserversOfEvent(o.a.BridgeEventLoadedCredentials)}},{key:"credentialForFileDescriptor",value:function(e){return this.credentials.find((function(t){return e.content.references.find((function(e){return e.uuid==t.uuid}))}))}},{key:"getAllCredentials",value:function(){return this.credentials}},{key:"saveCredential",value:function(e){this.extensionBridge.saveItem(e)}}])&&s(t.prototype,n),i&&s(t,i),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n(1),a=(n.n(i),n(0)),o=(n.n(a),n(11)),s=n.n(o),u=n(2);function c(e,t){for(var n=0;n3&&void 0!==arguments[3]&&arguments[3],a=document.createElement("a");a.setAttribute("download",t);var o=this.tempUrlForData(e,n);a.href=o,a.setAttribute("target","_blank"),i?window.location.href=a.href:(document.body.appendChild(a),a.click(),a.remove()),setTimeout((function(){r.revokeTempUrl(o)}),500)}},{key:"tempUrlForData",value:function(e,t){return window.URL.createObjectURL(new Blob([e],{type:t||"text/json"}))}},{key:"revokeTempUrl",value:function(e){window.URL.revokeObjectURL(e)}},{key:"copyTextToClipboard",value:function(e){if(window.clipboardData&&window.clipboardData.setData)return clipboardData.setData("Text",e);var t;if(document.queryCommandSupported&&document.queryCommandSupported("copy"))try{(t=document.createElement("textarea")).setAttribute("readonly",!0),t.setAttribute("contenteditable",!0),t.style.position="fixed",t.value=e,document.body.appendChild(t),t.focus(),t.select();var n=document.createRange();n.selectNodeContents(t);var r=window.getSelection();r.removeAllRanges(),r.addRange(n),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch(i){console.error(i)}finally{document.body.removeChild(t)}}}],(n=null)&&r(t.prototype,n),i&&r(t,i),e}()}])},function(e,t,n){},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),o=r[0],s=r[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,o,s)),l=0,d=s>0?o-4:o;for(n=0;n>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;su?u:s+o));1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],i=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,a,o=[],s=t;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<>1,l=-7,d=n?i-1:0,p=n?-1:1,f=e[t+d];for(d+=p,a=f&(1<<-l)-1,f>>=-l,l+=s;l>0;a=256*a+e[t+d],d+=p,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=r;l>0;o=256*o+e[t+d],d+=p,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),a-=c}return(f?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,u,c=8*a-i-1,l=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,h=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+d>=1?p/u:p*Math.pow(2,1-d))*u>=2&&(o++,u/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(t*u-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=h,s/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=h,o/=256,c-=8);e[n+f-h]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r=n(155);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(257),i=n(287);function a(t,n,o){return i()?e.exports=a=Reflect.construct:e.exports=a=function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&r(a,n.prototype),a},a.apply(null,arguments)}e.exports=a},function(e,t,n){var r=n(285);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}},function(e,t,n){var r=n(288),i=n(232),a=(n(155),n(230),n(124));function o(t,n){e.exports=o=function(e,t){return new l(e,void 0,t)};var s=i(RegExp),u=RegExp.prototype,c=new WeakMap;function l(e,t,n){var r=s.call(this,e,t);return c.set(r,n||c.get(e)),r}function d(e,t){var n=c.get(t);return Object.keys(n).reduce((function(t,r){return t[r]=e[n[r]],t}),Object.create(null))}return a(l,s),l.prototype.exec=function(e){var t=u.exec.call(this,e);return t&&(t.groups=d(t,this)),t},l.prototype[Symbol.replace]=function(e,t){if("string"===typeof t){var n=c.get(this);return u[Symbol.replace].call(this,e,t.replace(/\$<([^>]+)>/g,(function(e,t){return"$"+n[t]})))}if("function"===typeof t){var i=this;return u[Symbol.replace].call(this,e,(function(){var e=[];return e.push.apply(e,arguments),"object"!==r(e[e.length-1])&&e.push(d(e,i)),t.apply(this,e)}))}return u[Symbol.replace].call(this,e,t)},o.apply(this,arguments)}e.exports=o},function(e,t,n){"use strict";e.exports=function(e){if(e)throw e}},function(e,t){e.exports=function(e){return null!=e&&null!=e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";e.exports=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},function(e,t,n){"use strict";var r=n(429);e.exports=a,a.wrap=r;var i=[].slice;function a(){var e=[],t={run:function(){var t=-1,n=i.call(arguments,0,-1),a=arguments[arguments.length-1];if("function"!==typeof a)throw new Error("Expected function as last argument, not "+a);function o(s){var u=e[++t],c=i.call(arguments,0),l=c.slice(1),d=n.length,p=-1;if(s)a(s);else{for(;++po.length;s&&o.push(i);try{t=e.apply(null,o)}catch(u){if(s&&n)throw u;return i(u)}s||(t&&"function"===typeof t.then?t.then(a,i):t instanceof Error?i(t):a(t))};function i(){n||(n=!0,t.apply(null,arguments))}function a(e){i(null,e)}}},function(e,t,n){"use strict";e.exports=n(431)},function(e,t,n){"use strict";var r=n(432),i=n(433);e.exports=i,i.prototype.message=function(e,t,n){var i=new r(e,t,n);this.path&&(i.name=this.path+":"+i.name,i.file=this.path);return i.fatal=!1,this.messages.push(i),i},i.prototype.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},i.prototype.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}},function(e,t,n){"use strict";var r=n(289);function i(){}e.exports=o,i.prototype=Error.prototype,o.prototype=new i;var a=o.prototype;function o(e,t,n){var i,a,o;"string"===typeof t&&(n=t,t=null),i=function(e){var t,n=[null,null];"string"===typeof e&&(-1===(t=e.indexOf(":"))?n[1]=e:(n[0]=e.slice(0,t),n[1]=e.slice(t+1)));return n}(n),a=r(t)||"1:1",o={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(o=t,t=t.start):o.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=a,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=o,this.source=i[0],this.ruleId=i[1]}a.file="",a.name="",a.reason="",a.message="",a.stack="",a.fatal=null,a.column=null,a.line=null},function(e,t,n){"use strict";var r=n(434),i=n(435),a=n(436);e.exports=u;var o={}.hasOwnProperty,s=["history","path","basename","stem","extname","dirname"];function u(e){var t,n;if(e){if("string"===typeof e||a(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof u))return new u(e);for(this.data={},this.messages=[],this.history=[],this.cwd=i.cwd(),n=-1;++n-1)throw new Error("`"+t+"` cannot be a path: did not expect `"+r.sep+"`")}function l(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function d(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}u.prototype.toString=function(e){return(this.contents||"").toString(e)},Object.defineProperty(u.prototype,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){l(e,"path"),this.path!==e&&this.history.push(e)}}),Object.defineProperty(u.prototype,"dirname",{get:function(){return"string"===typeof this.path?r.dirname(this.path):void 0},set:function(e){d(this.path,"dirname"),this.path=r.join(e||"",this.basename)}}),Object.defineProperty(u.prototype,"basename",{get:function(){return"string"===typeof this.path?r.basename(this.path):void 0},set:function(e){l(e,"basename"),c(e,"basename"),this.path=r.join(this.dirname||"",e)}}),Object.defineProperty(u.prototype,"extname",{get:function(){return"string"===typeof this.path?r.extname(this.path):void 0},set:function(e){if(c(e,"extname"),d(this.path,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.indexOf(".",1)>-1)throw new Error("`extname` cannot contain multiple dots")}this.path=r.join(this.dirname,this.stem+(e||""))}}),Object.defineProperty(u.prototype,"stem",{get:function(){return"string"===typeof this.path?r.basename(this.path,this.extname):void 0},set:function(e){l(e,"stem"),c(e,"stem"),this.path=r.join(this.dirname||"",e+(this.extname||""))}})},function(e,t,n){"use strict";function r(e){var t,n;return i(e),t=47===e.charCodeAt(0),(n=function(e,t){var n,r,i="",a=0,o=-1,s=0,u=-1;for(;++u<=e.length;){if(u2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",a=0):a=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),o=u,s=0;continue}}else if(i.length){i="",a=0,o=u,s=0;continue}t&&(i=i.length?i+"/..":"..",a=2)}else i.length?i+="/"+e.slice(o+1,u):i=e.slice(o+1,u),a=u-o-1;o=u,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t)).length||t||(n="."),n.length&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}function i(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}t.basename=function(e,t){var n,r,a,o,s=0,u=-1;if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');if(i(e),n=e.length,void 0===t||!t.length||t.length>e.length){for(;n--;)if(47===e.charCodeAt(n)){if(a){s=n+1;break}}else u<0&&(a=!0,u=n+1);return u<0?"":e.slice(s,u)}if(t===e)return"";r=-1,o=t.length-1;for(;n--;)if(47===e.charCodeAt(n)){if(a){s=n+1;break}}else r<0&&(a=!0,r=n+1),o>-1&&(e.charCodeAt(n)===t.charCodeAt(o--)?o<0&&(u=n):(o=-1,u=r));s===u?u=r:u<0&&(u=e.length);return e.slice(s,u)},t.dirname=function(e){var t,n,r;if(i(e),!e.length)return".";t=-1,r=e.length;for(;--r;)if(47===e.charCodeAt(r)){if(n){t=r;break}}else n||(n=!0);return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)},t.extname=function(e){var t,n,r,a=-1,o=0,s=-1,u=0;i(e),r=e.length;for(;r--;)if(47!==(n=e.charCodeAt(r)))s<0&&(t=!0,s=r+1),46===n?a<0?a=r:1!==u&&(u=1):a>-1&&(u=-1);else if(t){o=r+1;break}if(a<0||s<0||0===u||1===u&&a===s-1&&a===o+1)return"";return e.slice(a,s)},t.join=function(){var e,t=-1;for(;++t-1&&(M.call(this,e),B.call(this,e))}function U(){h("atHardBreak",!0)}function V(){var e=this.resume();this.stack[this.stack.length-1].value=e}function z(){var e=this.resume();this.stack[this.stack.length-1].value=e}function H(){var e=this.resume();this.stack[this.stack.length-1].value=e}function W(){var e=this.stack[this.stack.length-1];g("inReference")?(e.type+="Reference",e.referenceType=g("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),h("referenceType")}function K(){var e=this.stack[this.stack.length-1];g("inReference")?(e.type+="Reference",e.referenceType=g("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),h("referenceType")}function q(e){this.stack[this.stack.length-2].identifier=o(this.sliceSerialize(e)).toLowerCase()}function G(){var e=this.stack[this.stack.length-1],t=this.resume();this.stack[this.stack.length-1].label=t,h("inReference",!0),"link"===this.stack[this.stack.length-1].type?this.stack[this.stack.length-1].children=e.children:this.stack[this.stack.length-1].alt=t}function Y(){var e=this.resume();this.stack[this.stack.length-1].url=e}function J(){var e=this.resume();this.stack[this.stack.length-1].title=e}function $(){h("inReference")}function Q(){h("referenceType","collapsed")}function X(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=o(this.sliceSerialize(e)).toLowerCase(),h("referenceType","full")}function Z(e){h("characterReferenceType",e.type)}function ee(e){var t,n,r=this.sliceSerialize(e),i=g("characterReferenceType");i?(t=s(r,"characterReferenceMarkerNumeric"===i?10:16),h("characterReferenceType")):t=d(r),(n=this.stack.pop()).value+=t,n.position.end=m(e.end)}function te(e){B.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function ne(e){B.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function re(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function ae(){return{type:"inlineCode",value:""}}function oe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function se(){return{type:"emphasis",children:[]}}function ue(){return{type:"heading",depth:void 0,children:[]}}function ce(){return{type:"break"}}function le(){return{type:"html",value:""}}function de(){return{type:"image",title:null,url:"",alt:null}}function pe(){return{type:"link",title:null,url:"",children:[]}}function fe(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function he(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ge(){return{type:"paragraph",children:[]}}function me(){return{type:"strong",children:[]}}function _e(){return{type:"text",value:""}}function ve(){return{type:"thematicBreak"}}}(n)(l(u(n).document().write(c()(e,t,!0))))};var r=n(290),i=n(210),a=n(291),o=n(211),s=n(439),u=n(440),c=n(475),l=n(476),d=n(262),p=n(289);function f(e,t){var n,r;for(n in t)r=a.call(e,n)?e[n]:e[n]={},"canContainEols"===n?e[n]=[].concat(r,t[n]):Object.assign(r,t[n])}},function(e,t,n){"use strict";var r=n(233);e.exports=function(e,t){var n=parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535===(65535&n)||65534===(65535&n)||n>1114111?"\ufffd":r(n)}},function(e,t,n){"use strict";var r=n(259),i=n(441),a=n(442),o=n(443),s=n(294),u=n(295),c=n(446),l=n(449);e.exports=function(e){var t={defined:[],constructs:u([l].concat(r((e||{}).extensions))),content:n(i),document:n(a),flow:n(o),string:n(s.string),text:n(s.text)};return t;function n(e){return function(n){return c(t,e,n)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(97),i=n(94),a=function(e){var t,n=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,n,"linePrefix")}),(function(t){return e.enter("paragraph"),a(t)}));return n;function a(n){var r=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=r),t=r,o(n)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):r(t)?(e.consume(t),e.exit("chunkText"),a):(e.consume(t),o)}};t.tokenize=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(97),i=n(94),a=n(212),o=function(e){var t,n,i,o=this,c=[],l=0,d={tokenize:function(e,r){var i=0;return t={},l;function l(r){return it;)o.containerState=c[a][1],c[a][0].exit.call(o,e);c.length=t}},s={tokenize:function(e,t,n){return i(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},u={tokenize:function(e,t,n){return i(e,e.lazy(this.parser.constructs.flow,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}};t.tokenize=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(94),i=n(212),a=n(444),o=function(e){var t=this,n=e.attempt(i,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,o,r(e,e.attempt(this.parser.constructs.flow,o,e.attempt(a,o)),"linePrefix")));return n;function o(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}};t.tokenize=o},function(e,t,n){"use strict";var r=n(97),i=n(94),a=n(185),o=n(293),s={tokenize:function(e,t){var n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(t)};function i(t){return null===t?a(t):r(t)?e.check(u,o,a)(t):(e.consume(t),i)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n=n.next=e.enter("chunkContent",{contentType:"content",previous:n}),i}},resolve:function(e){return o(e),e},interruptible:!0,lazy:!0},u={tokenize:function(e,t,n){var o=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,s,"linePrefix")};function s(i){return null===i||r(i)?n(i):o.parser.constructs.disable.null.indexOf("codeIndented")>-1||a(o.events,"linePrefix")<4?e.interrupt(o.parser.constructs.flow,n,t)(i):t(i)}},partial:!0};e.exports=s},function(e,t,n){"use strict";var r=[].splice;e.exports=r},function(e,t,n){"use strict";var r=n(210),i=n(157),a=n(260),o=n(259),s=n(97),u=n(176),c=n(213),l=n(447),d=n(448);e.exports=function(e,t,n){var p=n?u(n):{line:1,column:1,offset:0},f={},h=[],g=[],m=[],_={consume:function(e){s(e)?(p.line++,p.column=1,p.offset+=-3===e?2:1,T()):-1!==e&&(p.column++,p.offset++);p._bufferIndex<0?p._index++:(p._bufferIndex++,p._bufferIndex===g[p._index].length&&(p._bufferIndex=-1,p._index++));v.previous=e},enter:function(e,t){var n=t||{};return n.type=e,n.start=D(),v.events.push(["enter",n,v]),m.push(n),n},exit:function(e){var t=m.pop();return t.end=D(),v.events.push(["exit",t,v]),t},attempt:x((function(e,t){k(e,t.from)})),check:x(S),interrupt:x(S,{interrupt:!0}),lazy:x(S,{lazy:!0})},v={previous:null,events:[],parser:e,sliceStream:b,sliceSerialize:function(e){return l(b(e))},now:D,defineSkip:function(e){f[e.line]=e.column,T()},write:function(e){if(g=a(g,e),E(),null!==g[g.length-1])return[];return k(t,0),v.events=c(h,v.events,v),v.events}},y=t.tokenize.call(v,_);return t.resolveAll&&h.push(t),p._index=0,p._bufferIndex=-1,v;function b(e){return d(g,e)}function D(){return u(p)}function E(){for(var e,t;p._index-1)return g();return e.tokenize.call(t?r({},v,t):v,_,h,g)(n)}}function h(t){return e(c,l),i}function g(e){return l.restore(),++u-1&&(n[0]=n[0].slice(i)),o>0&&n.push(e[a].slice(0,o))),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(294),i=n(450),a=n(453),o=n(455),s=n(456),u=n(458),c=n(460),l=n(461),d=n(462),p=n(463),f=n(464),h=n(465),g=n(466),m=n(469),_=n(263),v=n(470),y=n(471),b=n(472),D=n(304),E=n(473),C=n(474),S={42:E,43:E,45:E,48:E,49:E,50:E,51:E,52:E,53:E,54:E,55:E,56:E,57:E,62:o},x={91:p},k={"-2":l,"-1":l,32:l},T={35:h,42:D,45:[C,D],60:g,61:C,95:D,96:c,126:c},w={38:u,92:s},A={"-5":b,"-4":b,"-3":b,33:v,38:u,42:i,60:[a,m],91:y,92:[f,s],93:_,95:i,96:d},O={null:[i,r.resolver]};t.contentInitial=x,t.disable={null:[]},t.document=S,t.flow=T,t.flowInitial=k,t.insideSpan=O,t.string=w,t.text=A},function(e,t,n){"use strict";var r=n(157),i=n(260),a=n(176),o=n(213),s=n(296),u=n(452),c={name:"attention",tokenize:function(e,t){var n,r=s(this.previous);return function(t){return e.enter("attentionSequence"),n=t,i(t)};function i(a){var o,u,c,l;return a===n?(e.consume(a),i):(o=e.exit("attentionSequence"),c=!(u=s(a))||2===u&&r,l=!r||2===r&&u,o._open=42===n?c:c&&(r||!l),o._close=42===n?l:l&&(u||!c),t(a))}},resolveAll:function(e,t){var n,s,c,l,d,p,f,h,g=-1;for(;++g1&&e[g][1].end.offset-e[g][1].start.offset>1?2:1,l={type:p>1?"strongSequence":"emphasisSequence",start:u(a(e[n][1].end),-p),end:a(e[n][1].end)},d={type:p>1?"strongSequence":"emphasisSequence",start:a(e[g][1].start),end:u(a(e[g][1].start),p)},c={type:p>1?"strongText":"emphasisText",start:a(e[n][1].end),end:a(e[g][1].start)},s={type:p>1?"strong":"emphasis",start:a(l.start),end:a(d.end)},e[n][1].end=a(l.start),e[g][1].start=a(d.end),f=[],e[n][1].end.offset-e[n][1].start.offset&&(f=i(f,[["enter",e[n][1],t],["exit",e[n][1],t]])),f=i(f,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",c,t]]),f=i(f,o(t.parser.constructs.insideSpan.null,e.slice(n+1,g),t)),f=i(f,[["exit",c,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[g][1].end.offset-e[g][1].start.offset?(h=2,f=i(f,[["enter",e[g][1],t],["exit",e[g][1],t]])):h=0,r(e,n-1,g-n+3,f),g=n+f.length-h-2;break}g=-1;for(;++g-1?void 0:4)}},exit:function(e){e.exit("blockQuote")}};e.exports=a},function(e,t,n){"use strict";var r=n(457),i={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),i};function i(i){return r(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}};e.exports=i},function(e,t,n){"use strict";var r=n(177)(/[!-/:-@[-`{-~]/);e.exports=r},function(e,t,n){"use strict";var r=n(262),i=n(214),a=n(299),o=n(459);function s(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var u=s(r),c={name:"characterReference",tokenize:function(e,t,n){var r,s,c=this,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),d};function d(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),r=31,s=i,f(t))}function p(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,s=o,f):(e.enter("characterReferenceValue"),r=7,s=a,f(t))}function f(a){var o;return 59===a&&l?(o=e.exit("characterReferenceValue"),s!==i||u.default(c.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)):s(a)&&l++-1?void 0:4);function o(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(t)}function u(t){return t===s?(e.consume(t),a++,u):ao&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(o===a-1||a-4>o&&"whitespace"===e[a-2][1].type)&&(a-=o+1===a?2:4);a>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[a][1].end},i={type:"chunkText",start:e[o][1].start,end:e[a][1].end,contentType:"text"},r(e,o,a-o+1,[["enter",n,t],["enter",i,t],["exit",i,t],["exit",n,t]]));return e}};e.exports=u},function(e,t,n){"use strict";var r=n(233),i=n(214),a=n(97),o=n(166),s=n(212),u=n(167),c=n(234),l=n(467),d=n(468),p={name:"htmlFlow",tokenize:function(e,t,n){var s,p,h,g,m,_=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),v};function v(i){return 33===i?(e.consume(i),y):47===i?(e.consume(i),E):63===i?(e.consume(i),s=3,_.interrupt?t:z):c(i)?(e.consume(i),h=r(i),p=!0,C):n(i)}function y(r){return 45===r?(e.consume(r),s=2,b):91===r?(e.consume(r),s=5,h="CDATA[",g=0,D):c(r)?(e.consume(r),s=4,_.interrupt?t:z):n(r)}function b(r){return 45===r?(e.consume(r),_.interrupt?t:z):n(r)}function D(r){return r===h.charCodeAt(g++)?(e.consume(r),g===h.length?_.interrupt?t:P:D):n(r)}function E(t){return c(t)?(e.consume(t),h=r(t),C):n(t)}function C(a){return null===a||47===a||62===a||u(a)?47!==a&&p&&d.indexOf(h.toLowerCase())>-1?(s=1,_.interrupt?t(a):P(a)):l.indexOf(h.toLowerCase())>-1?(s=6,47===a?(e.consume(a),S):_.interrupt?t(a):P(a)):(s=7,_.interrupt?n(a):p?k(a):x(a)):45===a||i(a)?(e.consume(a),h+=r(a),C):n(a)}function S(r){return 62===r?(e.consume(r),_.interrupt?t:P):n(r)}function x(t){return o(t)?(e.consume(t),x):F(t)}function k(t){return 47===t?(e.consume(t),F):58===t||95===t||c(t)?(e.consume(t),T):o(t)?(e.consume(t),k):F(t)}function T(t){return 45===t||46===t||58===t||95===t||i(t)?(e.consume(t),T):w(t)}function w(t){return 61===t?(e.consume(t),A):o(t)?(e.consume(t),w):k(t)}function A(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),m=t,O):o(t)?(e.consume(t),A):(m=void 0,N(t))}function O(t){return t===m?(e.consume(t),I):null===t||a(t)?n(t):(e.consume(t),O)}function N(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||u(t)?w(t):(e.consume(t),N)}function I(e){return 47===e||62===e||o(e)?k(e):n(e)}function F(t){return 62===t?(e.consume(t),L):n(t)}function L(t){return o(t)?(e.consume(t),L):null===t||a(t)?P(t):n(t)}function P(t){return 45===t&&2===s?(e.consume(t),B):60===t&&1===s?(e.consume(t),j):62===t&&4===s?(e.consume(t),H):63===t&&3===s?(e.consume(t),z):93===t&&5===s?(e.consume(t),V):!a(t)||6!==s&&7!==s?null===t||a(t)?R(t):(e.consume(t),P):e.check(f,H,R)(t)}function R(t){return e.exit("htmlFlowData"),M(t)}function M(t){return null===t?W(t):a(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M):(e.enter("htmlFlowData"),P(t))}function B(t){return 45===t?(e.consume(t),z):P(t)}function j(t){return 47===t?(e.consume(t),h="",U):P(t)}function U(t){return 62===t&&d.indexOf(h.toLowerCase())>-1?(e.consume(t),H):c(t)&&h.length<8?(e.consume(t),h+=r(t),U):P(t)}function V(t){return 93===t?(e.consume(t),z):P(t)}function z(t){return 62===t?(e.consume(t),H):P(t)}function H(t){return null===t||a(t)?(e.exit("htmlFlowData"),W(t)):(e.consume(t),H)}function W(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){var t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},f={tokenize:function(e,t,n){return function(r){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),e.attempt(s,t,n)}},partial:!0};e.exports=p},function(e,t,n){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},function(e,t,n){"use strict";e.exports=["pre","script","style","textarea"]},function(e,t,n){"use strict";var r=n(214),i=n(97),a=n(166),o=n(94),s=n(167),u=n(234),c={name:"htmlText",tokenize:function(e,t,n){var c,l,d,p,f=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),h};function h(t){return 33===t?(e.consume(t),g):47===t?(e.consume(t),w):63===t?(e.consume(t),k):u(t)?(e.consume(t),N):n(t)}function g(t){return 45===t?(e.consume(t),m):91===t?(e.consume(t),l="CDATA[",d=0,D):u(t)?(e.consume(t),x):n(t)}function m(t){return 45===t?(e.consume(t),_):n(t)}function _(t){return null===t||62===t?n(t):45===t?(e.consume(t),v):y(t)}function v(e){return null===e||62===e?n(e):y(e)}function y(t){return null===t?n(t):45===t?(e.consume(t),b):i(t)?(p=y,j(t)):(e.consume(t),y)}function b(t){return 45===t?(e.consume(t),V):y(t)}function D(t){return t===l.charCodeAt(d++)?(e.consume(t),d===l.length?E:D):n(t)}function E(t){return null===t?n(t):93===t?(e.consume(t),C):i(t)?(p=E,j(t)):(e.consume(t),E)}function C(t){return 93===t?(e.consume(t),S):E(t)}function S(t){return 62===t?V(t):93===t?(e.consume(t),S):E(t)}function x(t){return null===t||62===t?V(t):i(t)?(p=x,j(t)):(e.consume(t),x)}function k(t){return null===t?n(t):63===t?(e.consume(t),T):i(t)?(p=k,j(t)):(e.consume(t),k)}function T(e){return 62===e?V(e):k(e)}function w(t){return u(t)?(e.consume(t),A):n(t)}function A(t){return 45===t||r(t)?(e.consume(t),A):O(t)}function O(t){return i(t)?(p=O,j(t)):a(t)?(e.consume(t),O):V(t)}function N(t){return 45===t||r(t)?(e.consume(t),N):47===t||62===t||s(t)?I(t):n(t)}function I(t){return 47===t?(e.consume(t),V):58===t||95===t||u(t)?(e.consume(t),F):i(t)?(p=I,j(t)):a(t)?(e.consume(t),I):V(t)}function F(t){return 45===t||46===t||58===t||95===t||r(t)?(e.consume(t),F):L(t)}function L(t){return 61===t?(e.consume(t),P):i(t)?(p=L,j(t)):a(t)?(e.consume(t),L):I(t)}function P(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),c=t,R):i(t)?(p=P,j(t)):a(t)?(e.consume(t),P):(e.consume(t),c=void 0,B)}function R(t){return t===c?(e.consume(t),M):null===t?n(t):i(t)?(p=R,j(t)):(e.consume(t),R)}function M(e){return 62===e||47===e||s(e)?I(e):n(e)}function B(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):62===t||s(t)?I(t):(e.consume(t),B)}function j(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o(e,U,"linePrefix",f.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}function U(t){return e.enter("htmlTextData"),p(t)}function V(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}}};e.exports=c},function(e,t,n){"use strict";var r={name:"labelStartImage",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:n(263).resolveAll};e.exports=r},function(e,t,n){"use strict";var r={name:"labelStartLink",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:n(263).resolveAll};e.exports=r},function(e,t,n){"use strict";var r=n(94),i={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r(e,t,"linePrefix")}}};e.exports=i},function(e,t,n){"use strict";var r=n(166),i=n(94),a=n(212),o=n(292),s=n(185),u=n(299),c=n(304),l={name:"list",tokenize:function(e,t,n){var i=this,l=s(i.events,"linePrefix"),p=0;return function(t){var r=i.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===r?!i.containerState.marker||t===i.containerState.marker:u(t)){if(i.containerState.type||(i.containerState.type=r,e.enter(r,{_container:!0})),"listUnordered"===r)return e.enter("listItemPrefix"),42===t||45===t?e.check(c,n,h)(t):h(t);if(!i.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(t)}return n(t)};function f(t){return u(t)&&++p<10?(e.consume(t),f):(!i.interrupt||p<2)&&(i.containerState.marker?t===i.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),h(t)):n(t)}function h(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||t,e.check(a,i.interrupt?n:g,e.attempt(d,_,m))}function g(e){return i.containerState.initialBlankLine=!0,l++,_(e)}function m(t){return r(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),_):n(t)}function _(n){return i.containerState.size=l+o(i.sliceStream(e.exit("listItemPrefix"))),t(n)}},continuation:{tokenize:function(e,t,n){var o=this;return o.containerState._closeFlow=void 0,e.check(a,(function(e){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,t(e)}),(function(n){if(o.containerState.furtherBlankLines||!r(n))return o.containerState.furtherBlankLines=o.containerState.initialBlankLine=void 0,s(n);return o.containerState.furtherBlankLines=o.containerState.initialBlankLine=void 0,e.attempt(p,t,s)(n)}));function s(r){return o.containerState._closeFlow=!0,o.interrupt=void 0,i(e,e.attempt(l,t,n),"linePrefix",o.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)(r)}}},exit:function(e){e.exit(this.containerState.type)}},d={tokenize:function(e,t,n){var a=this;return i(e,(function(e){return r(e)||!s(a.events,"listItemPrefixWhitespace")?n(e):t(e)}),"listItemPrefixWhitespace",a.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:5)},partial:!0},p={tokenize:function(e,t,n){var r=this;return i(e,(function(e){return s(r.events,"listItemIndent")===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};e.exports=l},function(e,t,n){"use strict";var r=n(97),i=n(94),a=n(176),o={name:"setextUnderline",tokenize:function(e,t,n){var a,o,s=this,u=s.events.length;for(;u--;)if("lineEnding"!==s.events[u][1].type&&"linePrefix"!==s.events[u][1].type&&"content"!==s.events[u][1].type){o="paragraph"===s.events[u][1].type;break}return function(t){if(!s.lazy&&(s.interrupt||o))return e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),a=t,c(t);return n(t)};function c(t){return t===a?(e.consume(t),c):(e.exit("setextHeadingLineSequence"),i(e,l,"lineSuffix")(t))}function l(i){return null===i||r(i)?(e.exit("setextHeadingLine"),t(i)):n(i)}},resolveTo:function(e,t){var n,r,i,o,s=e.length;for(;s--;)if("enter"===e[s][0]){if("content"===e[s][1].type){n=s;break}"paragraph"===e[s][1].type&&(r=s)}else"content"===e[s][1].type&&e.splice(s,1),i||"definition"!==e[s][1].type||(i=s);o={type:"setextHeading",start:a(e[r][1].start),end:a(e[e.length-1][1].end)},e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=a(e[i][1].end)):e[n][1]=o;return e.push(["exit",o,t]),e}};e.exports=o},function(e,t,n){"use strict";var r=/[\0\t\n\r]/g;e.exports=function(){var e,t=!0,n=1,i="";return function(a,o,s){var u,c,l,d,p,f=[];a=i+a.toString(o),l=0,i="",t&&(65279===a.charCodeAt(0)&&l++,t=void 0);for(;l":""))+")");return g;function g(){var i,f,h=p.concat(r),g=[];if((!t||l(r,d,p[p.length-1]||null))&&(g=function(e){if(null!==e&&"object"===typeof e&&"length"in e)return e;if("number"===typeof e)return[a,e];return[e]}(n(r,p)))[0]===s)return g;if(r.children&&g[0]!==o)for(f=(u?r.children.length:-1)+c;f>-1&&f0&&l.children.unshift(r("text"," ")),l.children.unshift(e(null,"input",{type:"checkbox",checked:t.checked,disabled:!0})),p.className=["task-list-item"]);o=c.length,s=-1;for(;++s1:t}},function(e,t,n){"use strict";e.exports=function(e,t){return e(t,"p",r(e,t))};var r=n(134)},function(e,t,n){"use strict";e.exports=function(e,t){return e.augment(t,r("root",i(a(e,t))))};var r=n(144),i=n(215),a=n(134)},function(e,t,n){"use strict";e.exports=function(e,t){return e(t,"strong",r(e,t))};var r=n(134)},function(e,t,n){"use strict";e.exports=function(e,t){var n,o,s,u,c,l=t.children,d=l.length,p=t.align||[],f=p.length,h=[];for(;d--;){for(o=l[d].children,u=0===d?"th":"td",n=f||o.length,s=[];n--;)c=o[n],s[n]=e(c,u,{align:p[n]},c?a(e,c):[]);h[d]=e(l[d],"tr",i(s,!0))}return e(t,"table",i([e(h[0].position,"thead",i([h[0]],!0))].concat(h[1]?e({start:r.start(h[1]),end:r.end(h[h.length-1])},"tbody",i(h.slice(1),!0)):[]),!0))};var r=n(264),i=n(215),a=n(134)},function(e,t,n){"use strict";e.exports=function(e,t){return e.augment(t,r("text",String(t.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g,"$1")))};var r=n(144)},function(e,t,n){"use strict";var r=n(238),i=n(194),a=n(319),o=r.boolean,s=r.overloadedBoolean,u=r.booleanish,c=r.number,l=r.spaceSeparated,d=r.commaSeparated;e.exports=i({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:a,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:d,acceptCharset:l,accessKey:l,action:null,allow:null,allowFullScreen:o,allowPaymentRequest:o,allowUserMedia:o,alt:null,as:null,async:o,autoCapitalize:null,autoComplete:l,autoFocus:o,autoPlay:o,capture:o,charSet:null,checked:o,cite:null,className:l,cols:c,colSpan:null,content:null,contentEditable:u,controls:o,controlsList:l,coords:c|d,crossOrigin:null,data:null,dateTime:null,decoding:null,default:o,defer:o,dir:null,dirName:null,disabled:o,download:s,draggable:u,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:o,formTarget:null,headers:l,height:c,hidden:o,high:c,href:null,hrefLang:null,htmlFor:l,httpEquiv:l,id:null,imageSizes:null,imageSrcSet:d,inputMode:null,integrity:null,is:null,isMap:o,itemId:null,itemProp:l,itemRef:l,itemScope:o,itemType:l,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:o,low:c,manifest:null,max:null,maxLength:c,media:null,method:null,min:null,minLength:c,multiple:o,muted:o,name:null,nonce:null,noModule:o,noValidate:o,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:o,optimum:c,pattern:null,ping:l,placeholder:null,playsInline:o,poster:null,preload:null,readOnly:o,referrerPolicy:null,rel:l,required:o,reversed:o,rows:c,rowSpan:c,sandbox:l,scope:null,scoped:o,seamless:o,selected:o,shape:null,size:c,sizes:null,slot:null,span:c,spellCheck:u,src:null,srcDoc:null,srcLang:null,srcSet:d,start:c,step:null,style:null,tabIndex:c,target:null,title:null,translate:null,type:null,typeMustMatch:o,useMap:null,value:u,width:c,wrap:null,align:null,aLink:null,archive:l,axis:null,background:null,bgColor:null,border:c,borderColor:null,bottomMargin:c,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:o,declare:o,event:null,face:null,frame:null,frameBorder:null,hSpace:c,leftMargin:c,link:null,longDesc:null,lowSrc:null,marginHeight:c,marginWidth:c,noResize:o,noHref:o,noShade:o,noWrap:o,object:null,profile:null,prompt:null,rev:null,rightMargin:c,rules:null,scheme:null,scrolling:u,standby:null,summary:null,text:null,topMargin:c,valueType:null,version:null,vAlign:null,vLink:null,vSpace:c,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:o,disableRemotePlayback:o,prefix:null,property:null,results:c,security:null,unselectable:null}})},function(e,t,n){"use strict";var r=n(238),i=n(194),a=n(320),o=r.boolean,s=r.number,u=r.spaceSeparated,c=r.commaSeparated,l=r.commaOrSpaceSeparated;e.exports=i({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:a,properties:{about:l,accentHeight:s,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:s,amplitude:s,arabicForm:null,ascent:s,attributeName:null,attributeType:null,azimuth:s,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:s,by:null,calcMode:null,capHeight:s,className:u,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:s,diffuseConstant:s,direction:null,display:null,dur:null,divisor:s,dominantBaseline:null,download:o,dx:null,dy:null,edgeMode:null,editable:null,elevation:s,enableBackground:null,end:null,event:null,exponent:s,externalResourcesRequired:null,fill:null,fillOpacity:s,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:c,g2:c,glyphName:c,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:s,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:s,horizOriginX:s,horizOriginY:s,id:null,ideographic:s,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:s,k:s,k1:s,k2:s,k3:s,k4:s,kernelMatrix:l,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:s,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:s,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:s,overlineThickness:s,paintOrder:null,panose1:null,path:null,pathLength:s,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:u,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:s,pointsAtY:s,pointsAtZ:s,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:l,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:l,rev:l,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:l,requiredFeatures:l,requiredFonts:l,requiredFormats:l,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:s,specularExponent:s,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:s,strikethroughThickness:s,string:null,stroke:null,strokeDashArray:l,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:s,strokeOpacity:s,strokeWidth:null,style:null,surfaceScale:s,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:l,tabIndex:s,tableValues:null,target:null,targetX:s,targetY:s,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:l,to:null,transform:null,u1:null,u2:null,underlinePosition:s,underlineThickness:s,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:s,values:null,vAlphabetic:s,vMathematical:s,vectorEffect:null,vHanging:s,vIdeographic:s,version:null,vertAdvY:s,vertOriginX:s,vertOriginY:s,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:s,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}})},function(e){e.exports=JSON.parse('{"classId":"classID","dataType":"datatype","itemId":"itemID","strokeDashArray":"strokeDasharray","strokeDashOffset":"strokeDashoffset","strokeLineCap":"strokeLinecap","strokeLineJoin":"strokeLinejoin","strokeMiterLimit":"strokeMiterlimit","typeOf":"typeof","xLinkActuate":"xlinkActuate","xLinkArcRole":"xlinkArcrole","xLinkHref":"xlinkHref","xLinkRole":"xlinkRole","xLinkShow":"xlinkShow","xLinkTitle":"xlinkTitle","xLinkType":"xlinkType","xmlnsXLink":"xmlnsXlink"}')},function(e,t,n){var r=n(507);e.exports=function(e,t){var n,i=null;if(!e||"string"!==typeof e)return i;for(var a,o,s=r(e),u="function"===typeof t,c=0,l=s.length;cr&&s0)return u999?n(u):93===u?i?(e.exit("chunkString"),d=e.exit("footnoteCallString"),o.indexOf(r(a.sliceSerialize(d)))<0?n(u):function(n){return e.enter("footnoteCallLabelMarker"),e.consume(n),e.exit("footnoteCallLabelMarker"),e.exit("footnoteCall"),t}(u)):n(u):(e.consume(u),u<0||32===u||(i=!0),92===u?l:c)}function l(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function h(e,t,n){return function(t){return 94!==t?n(t):(e.enter("inlineNoteStart"),e.enter("inlineNoteMarker"),e.consume(t),e.exit("inlineNoteMarker"),r)};function r(r){return 91!==r?n(r):(e.enter("inlineNoteStartMarker"),e.consume(r),e.exit("inlineNoteStartMarker"),e.exit("inlineNoteStart"),t)}}function g(e,t,n){var r=this;return function(i){var a,o=r.events.length;for(;o--;)if("inlineNoteStart"===r.events[o][1].type){a=!0;break}if(93!==i||!a)return n(i);return e.enter("inlineNoteEnd"),e.enter("inlineNoteEndMarker"),e.consume(i),e.exit("inlineNoteEndMarker"),e.exit("inlineNoteEnd"),t}}function m(e,t,n){var a,o,s=this,u=s.parser.footnotes||(s.parser.footnotes=[]),c=0;return function(t){if(91!==t)return n(t);return e.enter("footnoteDefinition")._container=!0,e.enter("footnoteDefinitionLabel"),e.enter("footnoteDefinitionLabelMarker"),e.consume(t),e.exit("footnoteDefinitionLabelMarker"),l};function l(t){return 94!==t?n(t):(e.enter("footnoteDefinitionMarker"),e.consume(t),e.exit("footnoteDefinitionMarker"),e.enter("footnoteDefinitionLabelString"),d)}function d(t){var i;return null===t||91===t||c>999?n(t):93===t?o?(i=e.exit("footnoteDefinitionLabelString"),a=r(s.sliceSerialize(i)),e.enter("footnoteDefinitionLabelMarker"),e.consume(t),e.exit("footnoteDefinitionLabelMarker"),e.exit("footnoteDefinitionLabel"),h):n(t):-5===t||-4===t||-3===t?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),c++,d):(e.enter("chunkString").contentType="string",p(t))}function p(t){return null===t||-5===t||-4===t||-3===t||91===t||93===t||c>999?(e.exit("chunkString"),d(t)):(t<0||32===t||(o=!0),c++,e.consume(t),92===t?f:p)}function f(t){return 91===t||92===t||93===t?(e.consume(t),c++,p):p(t)}function h(t){return 58!==t?n(t):(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),e.check(i,g,m))}function g(e){return s.containerState.initialBlankLine=!0,_(e)}function m(t){return-2===t||-1===t||32===t?(e.enter("footnoteDefinitionWhitespace"),e.consume(t),e.exit("footnoteDefinitionWhitespace"),_(t)):_(t)}function _(e){return u.indexOf(a)<0&&u.push(a),t(e)}}function _(e,t,n){var r=this;return e.check(i,(function(e){r.containerState.initialBlankLine&&(r.containerState.furtherBlankLines=!0);return t(e)}),(function(i){if(r.containerState.furtherBlankLines||-2!==i&&-1!==i&&32!==i)return n(i);return r.containerState.initialBlankLine=void 0,r.containerState.furtherBlankLines=void 0,e.attempt(l,t,n)(i)}))}function v(e){e.exit("footnoteDefinition")}},function(e,t,n){var r=n(211);t.canContainEols=["footnote"],t.enter={footnoteDefinition:function(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)},footnoteDefinitionLabelString:function(){this.buffer()},footnoteCall:function(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)},footnoteCallString:function(){this.buffer()},inlineNote:function(e){this.enter({type:"footnote",children:[]},e)}},t.exit={footnoteDefinition:function(e){this.exit(e)},footnoteDefinitionLabelString:function(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=r(this.sliceSerialize(e)).toLowerCase()},footnoteCall:function(e){this.exit(e)},footnoteCallString:function(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=r(this.sliceSerialize(e)).toLowerCase()},inlineNote:function(e){this.exit(e)}}},function(e,t,n){t.unsafe=[{character:"[",inConstruct:["phrasing","label","reference"]}],t.handlers={footnote:c,footnoteDefinition:function(e,t,n){var i,u=n.enter("footnoteDefinition"),c=n.enter("label"),l="[^"+s(n,r(e),{before:"^",after:"]"})+"]:";return c(),i=o(a(e,n),(function(e,t,n){if(t)return(n?"":" ")+e;return(n?l:l+" ")+e})),u(),i},footnoteReference:u};var r=n(520),i=n(268),a=n(323),o=n(324),s=n(325);function u(e,t,n){var i=n.enter("footnoteReference"),a=n.enter("reference"),o=s(n,r(e),{before:"^",after:"]"});return a(),i(),"[^"+o+"]"}function c(e,t,n){var r=n.enter("footnote"),a=n.enter("label"),o="^["+i(e,n,{before:"[",after:"]"})+"]";return a(),r(),o}u.peek=function(){return"["},c.peek=function(){return"^"}},function(e,t,n){e.exports=function(e){if(e.label||!e.identifier)return e.label||"";return e.identifier.replace(i,"$1").replace(a,o)};var r=n(262),i=/\\([!-/:-@[-`{-~])/g,a=/&(#(\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function o(e,t){return r(t)||e}},function(e,t,n){"use strict";var r,i=n(522),a=n(531),o=n(536);e.exports=function(e){var t=this.data();!r&&(this.Parser&&this.Parser.prototype&&this.Parser.prototype.blockTokenizers||this.Compiler&&this.Compiler.prototype&&this.Compiler.prototype.visitors)&&(r=!0,console.warn("[remark-gfm] Warning: please upgrade to remark 13 to use this plugin"));function n(e,n){t[e]?t[e].push(n):t[e]=[n]}n("micromarkExtensions",i(e)),n("fromMarkdownExtensions",a),n("toMarkdownExtensions",o(e))}},function(e,t,n){e.exports=n(523)},function(e,t,n){var r=n(295),i=n(524),a=n(526),o=n(527),s=n(529);e.exports=function(e){return r([i,a(e),o,s])}},function(e,t,n){e.exports=n(525)},function(e,t,n){var r=n(234),i=n(214),a=n(261),o=n(97),s=n(297),u=n(298),c={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(t){return 87===t||t-32===87?(e.consume(t),i):n(t)}function i(t){return 87===t||t-32===87?(e.consume(t),a):n(t)}function a(t){return 46===t?(e.consume(t),s):n(t)}function s(e){return null===e||o(e)?n(e):t(e)}}},l={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(t){return 84===t||t-32===84?(e.consume(t),i):n(t)}function i(t){return 84===t||t-32===84?(e.consume(t),o):n(t)}function o(t){return 80===t||t-32===80?(e.consume(t),c):n(t)}function c(t){return 83===t||t-32===83?(e.consume(t),l):l(t)}function l(t){return 58===t?(e.consume(t),d):n(t)}function d(t){return 47===t?(e.consume(t),p):n(t)}function p(t){return 47===t?(e.consume(t),f):n(t)}function f(e){return a(e)||u(e)||s(e)?n(e):t(e)}}},d={tokenize:function(e,t,n){var r,i,o;return s;function s(t){return 47===t||a(t)||u(t)?d(t):38===t?e.check(m,d,c)(t):46===t||E(t)?e.check(h,d,c)(t):(l(),e.consume(t),s)}function c(t){return 46===t?(o=i,i=void 0,l(),e.consume(t),s):(95===t&&(i=!0),l(),e.consume(t),s)}function l(){r||(e.enter("literalAutolinkDomain"),r=!0)}function d(a){return!r||o||i?n(a):(e.exit("literalAutolinkDomain"),t(a))}}},p={tokenize:function(e,t){var n=0;return function(n){return 47===n?function(t){return e.enter("literalAutolinkPath"),r(t)}(n):t(n)};function r(t){return 38===t?e.check(m,o,i)(t):(40===t&&n++,41===t?e.check(g,a,i)(t):C(t)?o(t):E(t)?e.check(f,o,i)(t):(e.consume(t),r))}function i(t){return e.consume(t),r}function a(e){return--n<0?o(e):i(e)}function o(n){return e.exit("literalAutolinkPath"),t(n)}}},f={tokenize:function(e,t,n){return function(t){return e.enter("literalAutolinkPunctuation"),e.consume(t),r};function r(r){return e.exit("literalAutolinkPunctuation"),C(r)?t(r):n(r)}}},h={tokenize:function(e,t,n){return function(t){return e.enter("literalAutolinkPunctuation"),e.consume(t),r};function r(i){return E(i)?(e.consume(i),r):(e.exit("literalAutolinkPunctuation"),C(i)?t(i):n(i))}}},g={tokenize:function(e,t,n){return function(t){return e.enter("literalAutolinkParen"),e.consume(t),r};function r(r){return e.exit("literalAutolinkParen"),C(r)||41===r?t(r):n(r)}}},m={tokenize:function(e,t,n){return function(t){return e.enter("literalAutolinkCharacterReferenceNamed"),e.consume(t),i};function i(t){return r(t)?(e.consume(t),i):59===t?(e.consume(t),a):n(t)}function a(r){return e.exit("literalAutolinkCharacterReferenceNamed"),C(r)?t(r):n(r)}}},_={tokenize:function(e,t,n){var r=this;return function(t){if(87!==t&&t-32!==87||!x(r.previous))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(c,e.attempt(d,e.attempt(p,i),n),n)(t)};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:x},v={tokenize:function(e,t,n){var r=this;return function(t){if(72!==t&&t-32!==72||!x(r.previous))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.check(l,e.attempt(d,e.attempt(p,i),n),n)(t)};function i(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:x},y={tokenize:function(e,t,n){var r,a=this;return function(t){if(!S(t)||!x(a.previous))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(t)};function o(t){return S(t)?(e.consume(t),o):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(f,d,u)(t):45===t||95===t?e.check(f,n,c)(t):i(t)?(e.consume(t),s):d(t)}function u(t){return e.consume(t),r=!0,s}function c(t){return e.consume(t),l}function l(t){return 46===t?e.check(f,n,u)(t):s(t)}function d(i){return r?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:x},b={};t.text=b;for(var D=48;D<123;)b[D]=y,58===++D?D=65:91===D&&(D=97);function E(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function C(e){return null===e||e<0||32===e||60===e}function S(e){return 43===e||45===e||46===e||95===e||i(e)}function x(e){return null===e||e<0||32===e||40===e||42===e||95===e||126===e}b[43]=y,b[45]=y,b[46]=y,b[95]=y,b[72]=[y,v],b[104]=[y,v],b[87]=[y,_],b[119]=[y,_]},function(e,t,n){e.exports=function(e){var t=(e||{}).singleTilde,n={tokenize:function(e,n,i){var a=this.previous,o=this.events,s=0;return u;function u(t){return 126!==t||126===a&&"characterEscape"!==o[o.length-1][1].type?i(t):(e.enter("strikethroughSequenceTemporary"),c(t))}function c(o){var u,l,d=r(a);return 126===o?s>1?i(o):(e.consume(o),s++,c):s<2&&!t?i(o):(u=e.exit("strikethroughSequenceTemporary"),l=r(o),u._open=!l||2===l&&d,u._close=!d||2===d&&l,n(o))}},resolveAll:function(e,t){var n,r,s,u,c=-1;for(;++cP&&(P=d);++lp)&&(L[l]=f)),I.push(h);O[w]=I,N[w]=F}var R;if(l=-1,d=P,"object"===typeof S&&"length"in S)for(;++lL[l]&&(L[l]=f),F[l]=f),I[l]=h;O.splice(1,0,I),N.splice(1,0,F),w=-1,A=O.length,g=[];for(;++w-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+".");u=d.length+1,("tab"===p||"mixed"===p&&(t&&t.spread||e.spread))&&(u=4*Math.ceil(u/4));return l=n.enter("listItem"),c=s(o(e,n),(function(e,t,n){if(t)return(n?"":r(" ",u))+e;return(n?d:d+r(" ",u-d.length))+e})),l(),c};var r=n(216),i=n(544),a=n(545),o=n(323),s=n(324)},function(e,t){e.exports=function(e){var t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}},function(e,t){e.exports=function(e){var t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}},function(e,t){e.exports=function e(t,n){var r,i=-1;if(n.extensions)for(;++ia&&(a=i):i=1,n=r+1,r=e.indexOf(t,n);return a}},function(e,t,n){"use strict";var r=n(558),i=n(168),a=n(326)();function o(e){a.reset(),i(e,"heading",(function(e){var t=e.data||(e.data={}),n=t.hProperties||(t.hProperties={}),i=n.id;i=i?a.slug(i,!0):a.slug(r(e)),t.id=i,n.id=i}))}e.exports=function(){return o}},function(e,t,n){"use strict";function r(e){return e&&(e.value||e.alt||e.title||"children"in e&&i(e.children)||"length"in e&&i(e))||""}function i(e){for(var t=[],n=e.length,i=-1;++i1){t.spread=!0;break}}function a(e){var t=[],n=-1;if(e)for(;++ns.relevance&&(s=u),u.relevance>n.relevance&&(s=n,n=u));s.language&&(n.secondBest=s);return n},t.registerLanguage=function(e,t){r.registerLanguage(e,t)},t.listLanguages=function(){return r.listLanguages()},t.registerAlias=function(e,t){var n,i=e;t&&((i={})[e]=t);for(n in i)r.registerAliases(i[n],{languageName:n})},s.prototype.addText=function(e){var t,n,r=this.stack;if(""===e)return;t=r[r.length-1],(n=t.children[t.children.length-1])&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e})},s.prototype.addKeyword=function(e,t){this.openNode(t),this.addText(e),this.closeNode()},s.prototype.addSublanguage=function(e,t){var n=this.stack,r=n[n.length-1],i=e.rootNode.children,a=t?{type:"element",tagName:"span",properties:{className:[t]},children:i}:i;r.children=r.children.concat(a)},s.prototype.openNode=function(e){var t=this.stack,n=this.options.classPrefix+e,r=t[t.length-1],i={type:"element",tagName:"span",properties:{className:[n]},children:[]};r.children.push(i),t.push(i)},s.prototype.closeNode=function(){this.stack.pop()},s.prototype.closeAllNodes=u,s.prototype.finalize=u,s.prototype.toHTML=function(){return""};var a="hljs-";function o(e,t,n){var o,u=r.configure({}),c=(n||{}).prefix;if("string"!==typeof e)throw i("Expected `string` for name, got `%s`",e);if(!r.getLanguage(e))throw i("Unknown language: `%s` is not registered",e);if("string"!==typeof t)throw i("Expected `string` for value, got `%s`",t);if(null!==c&&void 0!==c||(c=a),r.configure({__emitter:s,classPrefix:c}),o=r.highlight(e,t,!0),r.configure(u||{}),o.errorRaised)throw o.errorRaised;return{relevance:o.relevance,language:o.language,value:o.emitter.rootNode.children}}function s(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function u(){}},function(e,t,n){var r=n(165),i=n(156),a=n(124),o=n(133),s=n(88),u=n(93);function c(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||c(n)})),e}var l=c,d=c;l.default=d;var p=function(){"use strict";function e(t){s(this,e),void 0===t.data&&(t.data={}),this.data=t.data}return u(e,[{key:"ignoreMatch",value:function(){this.ignore=!0}}]),e}();function f(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function h(e){var t=Object.create(null);for(var n in e)t[n]=e[n];for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a")}},{key:"value",value:function(){return this.buffer}},{key:"span",value:function(e){this.buffer+='')}}]),e}(),_=function(e){"use strict";a(n,e);var t=o(n);function n(e){var r;return s(this,n),(r=t.call(this)).options=e,r}return u(n,[{key:"addKeyword",value:function(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}},{key:"addText",value:function(e){""!==e&&this.add(e)}},{key:"addSublanguage",value:function(e,t){var n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}},{key:"toHTML",value:function(){return new m(this,this.options).value()}},{key:"finalize",value:function(){return!0}}]),n}(function(){"use strict";function e(){s(this,e),this.rootNode={children:[]},this.stack=[this.rootNode]}return u(e,[{key:"add",value:function(e){this.top.children.push(e)}},{key:"openNode",value:function(e){var t={kind:e,children:[]};this.add(t),this.stack.push(t)}},{key:"closeNode",value:function(){if(this.stack.length>1)return this.stack.pop()}},{key:"closeAllNodes",value:function(){for(;this.closeNode(););}},{key:"toJSON",value:function(){return JSON.stringify(this.rootNode,null,4)}},{key:"walk",value:function(e){return this.constructor._walk(e,this.rootNode)}},{key:"top",get:function(){return this.stack[this.stack.length-1]}},{key:"root",get:function(){return this.rootNode}}],[{key:"_walk",value:function(e,t){var n=this;return"string"===typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((function(t){return n._walk(e,t)})),e.closeNode(t)),e}},{key:"_collapse",value:function(t){"string"!==typeof t&&t.children&&(t.children.every((function(e){return"string"===typeof e}))?t.children=[t.children.join("")]:t.children.forEach((function(t){e._collapse(t)})))}}]),e}());function v(e){return e?"string"===typeof e?e:e.source:null}function y(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=h({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(A),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},N=O("//","$"),I=O("/\\*","\\*/"),F=O("#","$"),L={className:"number",begin:C,relevance:0},P={className:"number",begin:S,relevance:0},R={className:"number",begin:x,relevance:0},M={className:"number",begin:C+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},B={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[k,{begin:/\[/,end:/\]/,relevance:0,contains:[k]}]}]},j={className:"title",begin:D,relevance:0},U={className:"title",begin:E,relevance:0},V={begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},z=Object.freeze({__proto__:null,IDENT_RE:D,UNDERSCORE_IDENT_RE:E,NUMBER_RE:C,C_NUMBER_RE:S,BINARY_NUMBER_RE:x,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=/^#![ ]*\//;return e.binary&&(e.begin=y(t,/.*\b/,e.binary,/\b.*/)),h({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":function(e,t){0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:k,APOS_STRING_MODE:T,QUOTE_STRING_MODE:w,PHRASAL_WORDS_MODE:A,COMMENT:O,C_LINE_COMMENT_MODE:N,C_BLOCK_COMMENT_MODE:I,HASH_COMMENT_MODE:F,NUMBER_MODE:L,C_NUMBER_MODE:P,BINARY_NUMBER_MODE:R,CSS_NUMBER_MODE:M,REGEXP_MODE:B,TITLE_MODE:j,UNDERSCORE_TITLE_MODE:U,METHOD_GUARD:V,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":function(e,t){t.data._beginMatch=e[1]},"on:end":function(e,t){t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function H(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function W(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=H,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords)}function K(e,t){Array.isArray(e.illegal)&&(e.illegal=b.apply(void 0,i(e.illegal)))}function q(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function G(e,t){void 0===e.relevance&&(e.relevance=1)}var Y=["of","and","for","in","not","or","if","then","parent","list","value"];function J(e,t){return t?Number(t):function(e){return Y.includes(e.toLowerCase())}(e)?0:1}function $(e,t){t.plugins;function n(t,n){return new RegExp(v(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}var a=function(){"use strict";function e(){s(this,e),this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}return u(e,[{key:"addRule",value:function(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(e)+1}},{key:"compile",value:function(){0===this.regexes.length&&(this.exec=function(){return null});var e=this.regexes.map((function(e){return e[1]}));this.matcherRe=n(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"|",n=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,i="",a=0;a0&&(i+=t),i+="(";s.length>0;){var u=n.exec(s);if(null==u){i+=s;break}i+=s.substring(0,u.index),s=s.substring(u.index+u[0].length),"\\"===u[0][0]&&u[1]?i+="\\"+String(Number(u[1])+o):(i+=u[0],"("===u[0]&&r++)}i+=")"}return i}(e),!0),this.lastIndex=0}},{key:"exec",value:function(e){this.matcherRe.lastIndex=this.lastIndex;var t=this.matcherRe.exec(e);if(!t)return null;var n=t.findIndex((function(e,t){return t>0&&void 0!==e})),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}]),e}(),o=function(){"use strict";function e(){s(this,e),this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}return u(e,[{key:"getMatcher",value:function(e){if(this.multiRegexes[e])return this.multiRegexes[e];var t=new a;return this.rules.slice(e).forEach((function(e){var n=r(e,2),i=n[0],a=n[1];return t.addRule(i,a)})),t.compile(),this.multiRegexes[e]=t,t}},{key:"resumingScanAtSamePosition",value:function(){return 0!==this.regexIndex}},{key:"considerAll",value:function(){this.regexIndex=0}},{key:"addRule",value:function(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}},{key:"exec",value:function(e){var t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;var n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{var r=this.getMatcher(0);r.lastIndex=this.lastIndex+1,n=r.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}]),e}();if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=h(e.classNameAliases||{}),function t(r,a){var s,u=r;if(r.compiled)return u;[q].forEach((function(e){return e(r,a)})),e.compilerExtensions.forEach((function(e){return e(r,a)})),r.__beforeBegin=null,[W,K,G].forEach((function(e){return e(r,a)})),r.compiled=!0;var c=null;if("object"===typeof r.keywords&&(c=r.keywords.$pattern,delete r.keywords.$pattern),r.keywords&&(r.keywords=function(e,t){var n={};return"string"===typeof e?r("keyword",e):Object.keys(e).forEach((function(t){r(t,e[t])})),n;function r(e,r){t&&(r=r.toLowerCase()),r.split(" ").forEach((function(t){var r=t.split("|");n[r[0]]=[e,J(r[0],r[1])]}))}}(r.keywords,e.case_insensitive)),r.lexemes&&c)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return c=c||r.lexemes||/\w+/,u.keywordPatternRe=n(c,!0),a&&(r.begin||(r.begin=/\B|\b/),u.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(u.endRe=n(r.end)),u.terminatorEnd=v(r.end)||"",r.endsWithParent&&a.terminatorEnd&&(u.terminatorEnd+=(r.end?"|":"")+a.terminatorEnd)),r.illegal&&(u.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=(s=[]).concat.apply(s,i(r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return h(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(Q(e))return h(e,{starts:e.starts?h(e.starts):null});if(Object.isFrozen(e))return h(e);return e}("self"===e?r:e)})))),r.contains.forEach((function(e){t(e,u)})),r.starts&&t(r.starts,a),u.matcher=function(e){var t=new o;return e.contains.forEach((function(e){return t.addRule(e.begin,{rule:e,type:"begin"})})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(u),u}(e)}function Q(e){return!!e&&(e.endsWithParent||Q(e.starts))}function X(e){var t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className:function(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted:function(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn('The language "'.concat(this.language,'" you specified could not be found.')),this.unknownLanguage=!0,f(this.code);var t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect:function(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:function(){return!0}},render:function(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install:function(e){e.component("highlightjs",t)}}}}var Z={"after:highlightBlock":function(e){var t=e.block,n=e.result,r=e.text,i=te(t);if(i.length){var a=document.createElement("div");a.innerHTML=n.value,n.value=function(e,t,n){var r=0,i="",a=[];function o(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function u(e){i+=""}function c(e){("start"===e.event?s:u)(e.node)}for(;e.length||t.length;){var l=o();if(i+=f(n.substring(r,l[0].offset)),r=l[0].offset,l===e){a.reverse().forEach(u);do{c(l.splice(0,1)[0]),l=o()}while(l===e&&l.length&&l[0].offset===r);a.reverse().forEach(s)}else"start"===l[0].event?a.push(l[0].node):a.pop(),c(l.splice(0,1)[0])}return i+f(n.substr(r))}(i,te(a),r)}}};function ee(e){return e.nodeName.toLowerCase()}function te(e){var t=[];return function e(n,r){for(var i=n.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:r,node:i}),r=e(i,r),ee(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:i}));return r}(e,0),t}var ne=function(e){console.error(e)},re=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i]+>|\t|)+|\n)/gm,s="Could not find the language '{}', did you forget to load/include a language module?",u={disableAutodetect:!0,name:"Plain text",contains:[]},c={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:_};function d(e){return c.noHighlightRe.test(e)}function f(e,t,n,r){var i={code:t,language:e};x("before:highlight",i);var a=i.result?i.result:h(i.language,i.code,n,r);return a.code=i.code,x("after:highlight",a),a}function h(e,n,o,u){var l=n;function d(e,t){var n=S.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function f(){null!=T.subLanguage?function(){if(""!==O){var e=null;if("string"===typeof T.subLanguage){if(!t[T.subLanguage])return void A.addText(O);e=h(T.subLanguage,O,!0,w[T.subLanguage]),w[T.subLanguage]=e.top}else e=g(O,T.subLanguage.length?T.subLanguage:null);T.relevance>0&&(N+=e.relevance),A.addSublanguage(e.emitter,e.language)}}():function(){if(T.keywords){var e=0;T.keywordPatternRe.lastIndex=0;for(var t=T.keywordPatternRe.exec(O),n="";t;){n+=O.substring(e,t.index);var i=d(T,t);if(i){var a=r(i,2),o=a[0],s=a[1];A.addText(n),n="",N+=s;var u=S.classNameAliases[o]||o;A.addKeyword(t[0],u)}else n+=t[0];e=T.keywordPatternRe.lastIndex,t=T.keywordPatternRe.exec(O)}n+=O.substr(e),A.addText(n)}else A.addText(O)}(),O=""}function m(e){return e.className&&A.openNode(S.classNameAliases[e.className]||e.className),T=Object.create(e,{parent:{value:T}})}function _(e,t,n){var r=function(e,t){var n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){var i=new p(e);e["on:end"](t,i),i.ignore&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function v(e){return 0===T.matcher.regexIndex?(O+=e[0],1):(L=!0,0)}function y(e){for(var t=e[0],n=e.rule,r=new p(n),i=0,a=[n.__beforeBegin,n["on:begin"]];i")+'"');throw s.mode=T,s}if("end"===n.type){var u=b(n);if(u!==se)return u}if("illegal"===n.type&&""===r)return 1;if(F>1e5&&F>3*n.index)throw new Error("potential infinite loop, way more iterations than matches");return O+=r,r.length}var S=E(e);if(!S)throw ne(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');var x=$(S,{plugins:i}),k="",T=u||x,w={},A=new c.__emitter(c);!function(){for(var e=[],t=T;t!==S;t=t.parent)t.className&&e.unshift(t.className);e.forEach((function(e){return A.openNode(e)}))}();var O="",N=0,I=0,F=0,L=!1;try{for(T.matcher.considerAll();;){F++,L?L=!1:T.matcher.considerAll(),T.matcher.lastIndex=I;var P=T.matcher.exec(l);if(!P)break;var R=C(l.substring(I,P.index),P);I=P.index+R}return C(l.substr(I)),A.closeAllNodes(),A.finalize(),k=A.toHTML(),{relevance:N,value:k,language:e,illegal:!1,emitter:A,top:T}}catch(M){if(M.message&&M.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:M.message,context:l.slice(I-100,I+100),mode:M.mode},sofar:k,relevance:0,value:ae(l),emitter:A};if(a)return{illegal:!1,relevance:0,value:ae(l),emitter:A,language:e,top:T,errorRaised:M};throw M}}function g(e,n){n=n||c.languages||Object.keys(t);var i=function(e){var t={relevance:0,emitter:new c.__emitter(c),value:ae(e),illegal:!1,top:u};return t.emitter.addText(e),t}(e),a=n.filter(E).filter(S).map((function(t){return h(t,e,!1)}));a.unshift(i);var o=a.sort((function(e,t){if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(E(e.language).supersetOf===t.language)return 1;if(E(t.language).supersetOf===e.language)return-1}return 0})),s=r(o,2),l=s[0],d=s[1],p=l;return p.second_best=d,p}var m={"before:highlightBlock":function(e){var t=e.block;c.useBR&&(t.innerHTML=t.innerHTML.replace(/\n/g,"").replace(//g,"\n"))},"after:highlightBlock":function(e){var t=e.result;c.useBR&&(t.value=t.value.replace(/\n/g,"
    "))}},v=/^(<[^>]+>|\t)+/gm,y={"after:highlightBlock":function(e){var t=e.result;c.tabReplace&&(t.value=t.value.replace(v,(function(e){return e.replace(/\t/g,c.tabReplace)})))}};function b(e){var t=function(e){var t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";var n=c.languageDetectRe.exec(t);if(n){var r=E(n[1]);return r||(re(s.replace("{}",n[1])),re("Falling back to no-highlight mode for this block.",e)),r?n[1]:"no-highlight"}return t.split(/\s+/).find((function(e){return d(e)||E(e)}))}(e);if(!d(t)){x("before:highlightBlock",{block:e,language:t});var r=e.textContent,i=t?f(t,r,!0):g(r);x("after:highlightBlock",{block:e,result:i,text:r}),e.innerHTML=i.value,function(e,t,r){var i=t?n[t]:r;e.classList.add("hljs"),i&&e.classList.add(i)}(e,t,i.language),e.result={language:i.language,re:i.relevance,relavance:i.relevance},i.second_best&&(e.second_best={language:i.second_best.language,re:i.second_best.relevance,relavance:i.second_best.relevance})}}var D=function e(){e.called||(e.called=!0,document.querySelectorAll("pre code").forEach(b))};function E(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function C(e,t){var r=t.languageName;"string"===typeof e&&(e=[e]),e.forEach((function(e){n[e]=r}))}function S(e){var t=E(e);return t&&!t.disableAutodetect}function x(e,t){var n=e;i.forEach((function(e){e[n]&&e[n](t)}))}for(var k in Object.assign(e,{highlight:f,highlightAuto:g,fixMarkup:function(e){return ie("10.2.0","fixMarkup will be removed entirely in v11.0"),ie("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),t=e,c.tabReplace||c.useBR?t.replace(o,(function(e){return"\n"===e?c.useBR?"
    ":e:c.tabReplace?e.replace(/\t/g,c.tabReplace):e})):t;var t},highlightBlock:b,configure:function(e){e.useBR&&(ie("10.3.0","'useBR' will be removed entirely in v11.0"),ie("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),c=oe(c,e)},initHighlighting:D,initHighlightingOnLoad:function(){window.addEventListener("DOMContentLoaded",D,!1)},registerLanguage:function(n,r){var i=null;try{i=r(e)}catch(o){if(ne("Language definition for '{}' could not be registered.".replace("{}",n)),!a)throw o;ne(o),i=u}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&C(i.aliases,{languageName:n})},listLanguages:function(){return Object.keys(t)},getLanguage:E,registerAliases:C,requireLanguage:function(e){ie("10.4.0","requireLanguage will be removed entirely in v11."),ie("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");var t=E(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:S,inherit:oe,addPlugin:function(e){i.push(e)},vuePlugin:X(e).VuePlugin}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString="10.5.0",z)"object"===typeof z[k]&&l(z[k]);return Object.assign(e,z),e.addPlugin(m),e.addPlugin(Z),e.addPlugin(y),e}({});e.exports=ue},function(e,t,n){"use strict";var r=n(570),i=a(Error);function a(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&(t=r.apply(null,arguments)),new e(t)}}e.exports=i,i.eval=a(EvalError),i.range=a(RangeError),i.reference=a(ReferenceError),i.syntax=a(SyntaxError),i.type=a(TypeError),i.uri=a(URIError),i.create=a},function(e,t,n){!function(){var t;function n(e){for(var t,n,r,i,a=1,o=[].slice.call(arguments),s=0,u=e.length,c="",l=!1,d=!1,p=function(){return o[a++]},f=function(){for(var n="";/\d/.test(e[s]);)n+=e[s++],t=e[s];return n.length>0?parseInt(n):null};s|$)",illegal:n,contains:[{beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",beginKeywords:"not null constant access function procedure in out aliased exception"},{className:"type",begin:t,endsParent:!0,relevance:0}]};return{name:"Ada",case_insensitive:!0,keywords:{keyword:"abort else new return abs elsif not reverse abstract end accept entry select access exception of separate aliased exit or some all others subtype and for out synchronized array function overriding at tagged generic package task begin goto pragma terminate body private then if procedure type case in protected constant interface is raise use declare range delay limited record when delta loop rem while digits renames with do mod requeue xor",literal:"True False"},contains:[r,{className:"string",begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{className:"number",begin:"\\b(\\d(_|\\d)*#\\w+(\\.\\w+)?#([eE][-+]?\\d(_|\\d)*)?|\\d(_|\\d)*(\\.\\d(_|\\d)*)?([eE][-+]?\\d(_|\\d)*)?)",relevance:0},{className:"symbol",begin:"'"+t},{className:"title",begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:n},{begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",keywords:"overriding function procedure with is renames return",returnBegin:!0,contains:[r,{className:"title",begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",excludeBegin:!0,excludeEnd:!0,illegal:n},i,{className:"type",begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,excludeEnd:!0,endsParent:!0,illegal:n}]},{className:"type",begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:n},i]}}},function(e,t){e.exports=function(e){var t={className:"built_in",begin:"\\b(void|bool|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|string|ref|array|double|float|auto|dictionary)"},n={className:"symbol",begin:"[a-zA-Z0-9_]+@"},r={className:"keyword",begin:"<",end:">",contains:[t,n]};return t.contains=[r],n.contains=[r],{name:"AngelScript",aliases:["asc"],keywords:"for in|0 break continue while do|0 return if else case switch namespace is cast or and xor not get|0 in inout|10 out override set|0 private public const default|0 final shared external mixin|10 enum typedef funcdef this super import from interface abstract|0 try catch protected explicit property",illegal:"(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])",contains:[{className:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE],relevance:0},{className:"string",begin:'"""',end:'"""'},{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE],relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:"^\\s*\\[",end:"\\]"},{beginKeywords:"interface namespace",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]},{beginKeywords:"class",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+",contains:[{begin:"[:,]\\s*",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]}]}]},t,n,{className:"literal",begin:"\\b(null|true|false)"},{className:"number",relevance:0,begin:"(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)"}]}}},function(e,t){e.exports=function(e){var t={className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,contains:[t,{className:"number",begin:/:\d{1,5}/},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",begin:/[\$%]\{/,end:/\}/,contains:["self",{className:"number",begin:/[$%]\d+/}]},t,{className:"number",begin:/\d+/},e.QUOTE_STRING_MODE]}}],illegal:/\S/}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r|=>|\[\[/}}},function(e,t){e.exports=function(e){var t="[A-Za-z_][0-9A-Za-z_]*",n={keyword:"if for while var new function do return void else break",literal:"BackSlash DoubleQuote false ForwardSlash Infinity NaN NewLine null PI SingleQuote Tab TextFormatting true undefined",built_in:"Abs Acos Angle Attachments Area AreaGeodetic Asin Atan Atan2 Average Bearing Boolean Buffer BufferGeodetic Ceil Centroid Clip Console Constrain Contains Cos Count Crosses Cut Date DateAdd DateDiff Day Decode DefaultValue Dictionary Difference Disjoint Distance DistanceGeodetic Distinct DomainCode DomainName Equals Exp Extent Feature FeatureSet FeatureSetByAssociation FeatureSetById FeatureSetByPortalItem FeatureSetByRelationshipName FeatureSetByTitle FeatureSetByUrl Filter First Floor Geometry GroupBy Guid HasKey Hour IIf IndexOf Intersection Intersects IsEmpty IsNan IsSelfIntersecting Length LengthGeodetic Log Max Mean Millisecond Min Minute Month MultiPartToSinglePart Multipoint NextSequenceValue Now Number OrderBy Overlaps Point Polygon Polyline Portal Pow Random Relate Reverse RingIsClockWise Round Second SetGeometry Sin Sort Sqrt Stdev Sum SymmetricDifference Tan Text Timestamp Today ToLocal Top Touches ToUTC TrackCurrentTime TrackGeometryWindow TrackIndex TrackStartTime TrackWindow TypeOf Union UrlEncode Variance Weekday When Within Year "},r={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},i={className:"subst",begin:"\\$\\{",end:"\\}",keywords:n,contains:[]},a={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,i]};i.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,r,e.REGEXP_MODE];var o=i.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]);return{name:"ArcGIS Arcade",aliases:["arcade"],keywords:n,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"symbol",begin:"\\$[datastore|feature|layer|map|measure|sourcefeature|sourcelayer|targetfeature|targetlayer|value|view]+"},r,{begin:/[{,]\s*/,relevance:0,contains:[{begin:t+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:t,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(return)\\b)\\s*",keywords:"return",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+t+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,contains:o}]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:t}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:o}],illegal:/\[|%/},{begin:/\$[(.]/}],illegal:/#(?!!)/}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(e){return function(){for(var e=arguments.length,t=new Array(e),r=0;r]+>")+")",o={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t,e.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:r(i)+e.IDENT_RE,relevance:0},d=r(i)+e.IDENT_RE+"\\s*\\(",p={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},f=[c,o,t,e.C_BLOCK_COMMENT_MODE,u,s],h={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:f.concat([{begin:/\(/,end:/\)/,keywords:p,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[t,e.C_BLOCK_COMMENT_MODE,s,u,o,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,s,u,o]}]},o,t,e.C_BLOCK_COMMENT_MODE,c]};return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:p,disableAutodetect:!0,illegal:"",keywords:p,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:p},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:s,keywords:p}}}(e);return t.disableAutodetect=!1,t.name="C++",t.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],t}e.exports=function(e){var t="boolean byte word String",n="setup loop KeyboardController MouseController SoftwareSerial EthernetServer EthernetClient LiquidCrystal RobotControl GSMVoiceCall EthernetUDP EsploraTFT HttpClient RobotMotor WiFiClient GSMScanner FileSystem Scheduler GSMServer YunClient YunServer IPAddress GSMClient GSMModem Keyboard Ethernet Console GSMBand Esplora Stepper Process WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage Client Server GSMPIN FileIO Bridge Serial EEPROM Stream Mouse Audio Servo File Task GPRS WiFi Wire TFT GSM SPI SD runShellCommandAsynchronously analogWriteResolution retrieveCallingNumber printFirmwareVersion analogReadResolution sendDigitalPortPair noListenOnLocalhost readJoystickButton setFirmwareVersion readJoystickSwitch scrollDisplayRight getVoiceCallStatus scrollDisplayLeft writeMicroseconds delayMicroseconds beginTransmission getSignalStrength runAsynchronously getAsynchronously listenOnLocalhost getCurrentCarrier readAccelerometer messageAvailable sendDigitalPorts lineFollowConfig countryNameWrite runShellCommand readStringUntil rewindDirectory readTemperature setClockDivider readLightSensor endTransmission analogReference detachInterrupt countryNameRead attachInterrupt encryptionType readBytesUntil robotNameWrite readMicrophone robotNameRead cityNameWrite userNameWrite readJoystickY readJoystickX mouseReleased openNextFile scanNetworks noInterrupts digitalWrite beginSpeaker mousePressed isActionDone mouseDragged displayLogos noAutoscroll addParameter remoteNumber getModifiers keyboardRead userNameRead waitContinue processInput parseCommand printVersion readNetworks writeMessage blinkVersion cityNameRead readMessage setDataMode parsePacket isListening setBitOrder beginPacket isDirectory motorsWrite drawCompass digitalRead clearScreen serialEvent rightToLeft setTextSize leftToRight requestFrom keyReleased compassRead analogWrite interrupts WiFiServer disconnect playMelody parseFloat autoscroll getPINUsed setPINUsed setTimeout sendAnalog readSlider analogRead beginWrite createChar motorsStop keyPressed tempoWrite readButton subnetMask debugPrint macAddress writeGreen randomSeed attachGPRS readString sendString remotePort releaseAll mouseMoved background getXChange getYChange answerCall getResult voiceCall endPacket constrain getSocket writeJSON getButton available connected findUntil readBytes exitValue readGreen writeBlue startLoop IPAddress isPressed sendSysex pauseMode gatewayIP setCursor getOemKey tuneWrite noDisplay loadImage switchPIN onRequest onReceive changePIN playFile noBuffer parseInt overflow checkPIN knobRead beginTFT bitClear updateIR bitWrite position writeRGB highByte writeRed setSpeed readBlue noStroke remoteIP transfer shutdown hangCall beginSMS endWrite attached maintain noCursor checkReg checkPUK shiftOut isValid shiftIn pulseIn connect println localIP pinMode getIMEI display noBlink process getBand running beginSD drawBMP lowByte setBand release bitRead prepare pointTo readRed setMode noFill remove listen stroke detach attach noTone exists buffer height bitSet circle config cursor random IRread setDNS endSMS getKey micros millis begin print write ready flush width isPIN blink clear press mkdir rmdir close point yield image BSSID click delay read text move peek beep rect line open seek fill size turn stop home find step tone sqrt RSSI SSID end bit tan cos sin pow map abs max min get run put",r="DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL DEFAULT OUTPUT INPUT HIGH LOW",a=i(e),o=a.keywords;return o.keyword+=" "+t,o.literal+=" "+r,o.built_in+=" "+n,a.name="Arduino",a.aliases=["ino"],a.supersetOf="cpp",a}},function(e,t){e.exports=function(e){var t={variants:[e.COMMENT("^[ \\t]*(?=#)","$",{relevance:0,excludeBegin:!0}),e.COMMENT("[;@]","$",{relevance:0}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]};return{name:"ARM Assembly",case_insensitive:!0,aliases:["arm"],keywords:{$pattern:"\\.?"+e.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?(?=\\s)"},t,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"[=#]\\w+"}],relevance:0}]}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(e){return i("(?=",e,")")}function i(){for(var e=arguments.length,t=new Array(e),r=0;r`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[o,c,u,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[o,s,c,u]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:i(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:l}]},{className:"tag",begin:i(/<\//,r(i(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0}]}]}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|-+|\\.+|[^\\n]+?::)\\s+"},{className:"symbol",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10}].concat([{begin:/\\[*_`]/},{begin:/\\\\\*{2}[^\n]*?\*{2}/},{begin:/\\\\_{2}[^\n]*_{2}/},{begin:/\\\\`{2}[^\n]*`{2}/},{begin:/[:;}][*_`](?![*_`])/}],t,n,[{className:"string",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:/`{2}/,end:/(\n{2}|`{2})/},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+?\\[[^[]*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}])}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},r,t]},{className:"symbol",begin:"@[A-z0-9_]+"},{className:"function",beginKeywords:"Func",end:"$",illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[n,r,i]}]}]}}},function(e,t){e.exports=function(e){return{name:"AVR Assembly",case_insensitive:!0,keywords:{$pattern:"\\.?"+e.IDENT_RE,keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",meta:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT(";","$",{relevance:0}),e.C_NUMBER_MODE,e.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"symbol",begin:"^[A-Za-z0-9_.$]+:"},{className:"meta",begin:"#",end:"$"},{className:"subst",begin:"@[0-9]+"}]}}},function(e,t){e.exports=function(e){return{name:"Awk",keywords:{keyword:"BEGIN END if else while do for in break continue delete next nextfile function func exit|10"},contains:[{className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},e.REGEXP_MODE,e.HASH_COMMENT_MODE,e.NUMBER_MODE]}}},function(e,t){e.exports=function(e){return{name:"X++",aliases:["x++"],keywords:{keyword:["abstract","as","asc","avg","break","breakpoint","by","byref","case","catch","changecompany","class","client","client","common","const","continue","count","crosscompany","delegate","delete_from","desc","display","div","do","edit","else","eventhandler","exists","extends","final","finally","firstfast","firstonly","firstonly1","firstonly10","firstonly100","firstonly1000","flush","for","forceliterals","forcenestedloop","forceplaceholders","forceselectorder","forupdate","from","generateonly","group","hint","if","implements","in","index","insert_recordset","interface","internal","is","join","like","maxof","minof","mod","namespace","new","next","nofetch","notexists","optimisticlock","order","outer","pessimisticlock","print","private","protected","public","readonly","repeatableread","retry","return","reverse","select","server","setting","static","sum","super","switch","this","throw","try","ttsabort","ttsbegin","ttscommit","unchecked","update_recordset","using","validtimestate","void","where","while"].join(" "),built_in:["anytype","boolean","byte","char","container","date","double","enum","guid","int","int64","long","real","short","str","utcdatetime","var"].join(" "),literal:["default","false","null","true"].join(" ")},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,illegal:":",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]}]}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r/},{begin:/::=/,end:/$/,contains:[{begin://},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}]}}},function(e,t){e.exports=function(e){var t={className:"literal",begin:/[+-]/,relevance:0};return{name:"Brainfuck",aliases:["bf"],contains:[e.COMMENT("[^\\[\\]\\.,\\+\\-<> \r\n]","[\\[\\]\\.,\\+\\-<> \r\n]",{returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/(?:\+\+|--)/,contains:[t]},t]}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(e){return function(){for(var e=arguments.length,t=new Array(e),r=0;r]+>")+")",o={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t,e.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:r(i)+e.IDENT_RE,relevance:0},d=r(i)+e.IDENT_RE+"\\s*\\(",p={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},f=[c,o,t,e.C_BLOCK_COMMENT_MODE,u,s],h={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:f.concat([{begin:/\(/,end:/\)/,keywords:p,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[t,e.C_BLOCK_COMMENT_MODE,s,u,o,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,s,u,o]}]},o,t,e.C_BLOCK_COMMENT_MODE,c]};return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:p,disableAutodetect:!0,illegal:"",keywords:p,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:p},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:s,keywords:p}}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(e){return function(){for(var e=arguments.length,t=new Array(e),r=0;r]+>")+")",o={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t,e.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:r(i)+e.IDENT_RE,relevance:0},d=r(i)+e.IDENT_RE+"\\s*\\(",p={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},f=[c,o,t,e.C_BLOCK_COMMENT_MODE,u,s],h={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:f.concat([{begin:/\(/,end:/\)/,keywords:p,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[t,e.C_BLOCK_COMMENT_MODE,s,u,o,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,s,u,o]}]},o,t,e.C_BLOCK_COMMENT_MODE,c]};return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:p,disableAutodetect:!0,illegal:"",keywords:p,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:p},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:s,keywords:p}}}(e);return t.name="C",t.aliases=["c","h"],t}},function(e,t){e.exports=function(e){var t="div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to until while with var",n=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],r={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},i={className:"string",begin:/(#\d+)+/},a={className:"function",beginKeywords:"procedure",end:/[:;]/,keywords:"procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[r,i]}].concat(n)},o={className:"class",begin:"OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)",returnBegin:!0,contains:[e.TITLE_MODE,a]};return{name:"C/AL",case_insensitive:!0,keywords:{keyword:t,literal:"false true"},illegal:/\/\*/,contains:[r,i,{className:"number",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},{className:"string",begin:'"',end:'"'},e.NUMBER_MODE,o,a]}}},function(e,t){e.exports=function(e){return{name:"Cap\u2019n Proto",aliases:["capnp"],keywords:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.HASH_COMMENT_MODE,{className:"meta",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"symbol",begin:/@\d+\b/},{className:"class",beginKeywords:"struct enum",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"class",beginKeywords:"interface",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]}]}}},function(e,t){e.exports=function(e){var t="assembly module package import alias class interface object given value assign void function new of extends satisfies abstracts in out return break continue throw assert dynamic if else switch case for while try catch finally then let this outer super is exists nonempty",n={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:t,relevance:10},r=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[n]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return n.contains=r,{name:"Ceylon",keywords:{keyword:t+" shared abstract formal default actual variable late native deprecated final sealed annotation suppressWarnings small",meta:"doc by license see throws tagged"},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"meta",begin:'@[a-z]\\w*(?::"[^"]*")?'}].concat(r)}}},function(e,t){e.exports=function(e){return{name:"Clean",aliases:["clean","icl","dcl"],keywords:{keyword:"if let in with where case of class instance otherwise implementation definition system module from import qualified as special code inline foreign export ccall stdcall generic derive infix infixl infixr",built_in:"Int Real Char Bool",literal:"True False"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{begin:"->|<-[|:]?|#!?|>>=|\\{\\||\\|\\}|:==|=:|<>"}]}}},function(e,t){e.exports=function(e){var t="a-zA-Z_\\-!.?+*=<>&#'",n="["+t+"]["+t+"0-9/;:]*",r="def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord",i={$pattern:n,"builtin-name":r+" cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},a={begin:n,relevance:0},o={className:"number",begin:"[-+]?\\d+(\\.\\d+)?",relevance:0},s=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),u=e.COMMENT(";","$",{relevance:0}),c={className:"literal",begin:/\b(true|false|nil)\b/},l={begin:"[\\[\\{]",end:"[\\]\\}]"},d={className:"comment",begin:"\\^"+n},p=e.COMMENT("\\^\\{","\\}"),f={className:"symbol",begin:"[:]{1,2}"+n},h={begin:"\\(",end:"\\)"},g={endsWithParent:!0,relevance:0},m={keywords:i,className:"name",begin:n,relevance:0,starts:g},_=[h,s,d,p,u,f,l,o,c,a],v={beginKeywords:r,lexemes:n,end:'(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',contains:[{className:"title",begin:n,relevance:0,excludeEnd:!0,endsParent:!0}].concat(_)};return h.contains=[e.COMMENT("comment",""),v,m,g],g.contains=_,l.contains=_,p.contains=[l],{name:"Clojure",aliases:["clj"],illegal:/\S/,contains:[h,s,d,p,u,f,l,o,c]}}},function(e,t){e.exports=function(e){return{name:"Clojure REPL",contains:[{className:"meta",begin:/^([\w.-]+|\s*#_)?=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}},function(e,t){e.exports=function(e){return{name:"CMake",aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"break cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro endwhile execute_process file find_file find_library find_package find_path find_program foreach function get_cmake_property get_directory_property get_filename_component get_property if include include_guard list macro mark_as_advanced math message option return separate_arguments set_directory_properties set_property set site_name string unset variable_watch while add_compile_definitions add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_link_options add_subdirectory add_test aux_source_directory build_command create_test_sourcelist define_property enable_language enable_testing export fltk_wrap_ui get_source_file_property get_target_property get_test_property include_directories include_external_msproject include_regular_expression install link_directories link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions set_source_files_properties set_target_properties set_tests_properties source_group target_compile_definitions target_compile_features target_compile_options target_include_directories target_link_directories target_link_libraries target_link_options target_sources try_compile try_run ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload build_name exec_program export_library_dependencies install_files install_programs install_targets load_command make_directory output_required_files remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or not command policy target test exists is_newer_than is_directory is_symlink is_absolute matches less greater equal less_equal greater_equal strless strgreater strequal strless_equal strgreater_equal version_less version_greater version_equal version_less_equal version_greater_equal in_list defined"},contains:[{className:"variable",begin:/\$\{/,end:/\}/},e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}},function(e,t){var n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],r=["true","false","null","undefined","NaN","Infinity"],i=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);e.exports=function(e){var t,a={keyword:n.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((t=["var","const","let","function","static"],function(e){return!t.includes(e)})).join(" "),literal:r.concat(["yes","no","on","off"]).join(" "),built_in:i.concat(["npm","print"]).join(" ")},o="[A-Za-z$_][0-9A-Za-z$_]*",s={className:"subst",begin:/#\{/,end:/\}/,keywords:a},u=[e.BINARY_NUMBER_MODE,e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[s,e.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+o},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];s.contains=u;var c=e.inherit(e.TITLE_MODE,{begin:o}),l="(\\(.*\\)\\s*)?\\B[-=]>",d={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:a,contains:["self"].concat(u)}]};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:a,illegal:/\/\*/,contains:u.concat([e.COMMENT("###","###"),e.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+o+"\\s*=\\s*"+l,end:"[-=]>",returnBegin:!0,contains:[c,d]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:l,end:"[-=]>",returnBegin:!0,contains:[d]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[c]},c]},{begin:o+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}},function(e,t){e.exports=function(e){return{name:"Coq",keywords:{keyword:"_|0 as at cofix else end exists exists2 fix for forall fun if IF in let match mod Prop return Set then Type using where with Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture Conjectures Constant constr Constraint Constructors Context Corollary CreateHintDb Cut Declare Defined Definition Delimit Dependencies Dependent Derive Drop eauto End Equality Eval Example Existential Existentials Existing Export exporting Extern Extract Extraction Fact Field Fields File Fixpoint Focus for From Function Functional Generalizable Global Goal Grab Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident Identity If Immediate Implicit Import Include Inductive Infix Info Initial Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation Obligations Opaque Open Optimize Options Parameter Parameters Parametric Path Paths pattern Polymorphic Preterm Print Printing Program Projections Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused Unfold Universe Universes Unset Unshelve using Variable Variables Variant Verbose Visibility where with",built_in:"abstract absurd admit after apply as assert assumption at auto autorewrite autounfold before bottom btauto by case case_eq cbn cbv change classical_left classical_right clear clearbody cofix compare compute congruence constr_eq constructor contradict contradiction cut cutrewrite cycle decide decompose dependent destruct destruction dintuition discriminate discrR do double dtauto eapply eassumption eauto ecase econstructor edestruct ediscriminate eelim eexact eexists einduction einjection eleft elim elimtype enough equality erewrite eright esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail field field_simplify field_simplify_eq first firstorder fix fold fourier functional generalize generalizing gfail give_up has_evar hnf idtac in induction injection instantiate intro intro_pattern intros intuition inversion inversion_clear is_evar is_var lapply lazy left lia lra move native_compute nia nsatz omega once pattern pose progress proof psatz quote record red refine reflexivity remember rename repeat replace revert revgoals rewrite rewrite_strat right ring ring_simplify rtauto set setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve specialize split split_Rabs split_Rmult stepl stepr subst sum swap symmetry tactic tauto time timeout top transitivity trivial try tryif unfold unify until using vm_compute with"},contains:[e.QUOTE_STRING_MODE,e.COMMENT("\\(\\*","\\*\\)"),e.C_NUMBER_MODE,{className:"type",excludeBegin:!0,begin:"\\|\\s*",end:"\\w+"},{begin:/[-=]>/}]}}},function(e,t){e.exports=function(e){return{name:"Cach\xe9 Object Script",case_insensitive:!0,aliases:["cos","cls"],keywords:"property parameter class classmethod clientmethod extends as break catch close continue do d|0 else elseif for goto halt hang h|0 if job j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 tcommit throw trollback try tstart use view while write w|0 xecute x|0 zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit zsync ascii",contains:[{className:"number",begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)",relevance:0},{className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"comment",begin:/;/,end:"$",relevance:0},{className:"built_in",begin:/(?:\$\$?|\.\.)\^?[a-zA-Z]+/},{className:"built_in",begin:/\$\$\$[a-zA-Z]+/},{className:"built_in",begin:/%[a-z]+(?:\.[a-z]+)*/},{className:"symbol",begin:/\^%?[a-zA-Z][\w]*/},{className:"keyword",begin:/##class|##super|#define|#dim/},{begin:/&sql\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"sql"},{begin:/&(js|jscript|javascript)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"},{begin:/&html<\s*\s*>/,subLanguage:"xml"}]}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(e){return function(){for(var e=arguments.length,t=new Array(e),r=0;r]+>")+")",o={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t,e.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:r(i)+e.IDENT_RE,relevance:0},d=r(i)+e.IDENT_RE+"\\s*\\(",p={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},f=[c,o,t,e.C_BLOCK_COMMENT_MODE,u,s],h={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:p,contains:f.concat([{begin:/\(/,end:/\)/,keywords:p,contains:f.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:p,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:p,relevance:0},{begin:d,returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[t,e.C_BLOCK_COMMENT_MODE,s,u,o,{begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,s,u,o]}]},o,t,e.C_BLOCK_COMMENT_MODE,c]};return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:p,disableAutodetect:!0,illegal:"",keywords:p,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:p},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:s,keywords:p}}}(e);return t.disableAutodetect=!1,t.name="C++",t.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],t}},function(e,t){e.exports=function(e){var t="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml";return{name:"crmsh",aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:"params meta operations op rule attributes utilization read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\ number string",literal:"Master Started Slave Stopped start promote demote stop monitor true false"},contains:[e.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:"primitive rsc_template",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+t.split(" ").join("|")+")\\s+",keywords:t,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:"property rsc_defaults op_defaults",starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},e.QUOTE_STRING_MODE,{className:"meta",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"literal",begin:"[-]?(infinity|inf)",relevance:0},{className:"attr",begin:/([A-Za-z$_#][\w_-]+)=/,relevance:0},{className:"tag",begin:"",relevance:0}]}}},function(e,t){e.exports=function(e){var t="(_?[ui](8|16|32|64|128))?",n="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?",r="[A-Za-z_]\\w*(::\\w+)*(\\?|!)?",i={$pattern:"[a-zA-Z_]\\w*[!?=]?",keyword:"abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},a={className:"subst",begin:/#\{/,end:/\}/,keywords:i},o={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:i};function s(e,t){var n=[{begin:e,end:t}];return n[0].contains=n,n}var u={className:"string",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[Qwi]?\\(",end:"\\)",contains:s("\\(","\\)")},{begin:"%[Qwi]?\\[",end:"\\]",contains:s("\\[","\\]")},{begin:"%[Qwi]?\\{",end:/\}/,contains:s(/\{/,/\}/)},{begin:"%[Qwi]?<",end:">",contains:s("<",">")},{begin:"%[Qwi]?\\|",end:"\\|"},{begin:/<<-\w+$/,end:/^\s*\w+$/}],relevance:0},c={className:"string",variants:[{begin:"%q\\(",end:"\\)",contains:s("\\(","\\)")},{begin:"%q\\[",end:"\\]",contains:s("\\[","\\]")},{begin:"%q\\{",end:/\}/,contains:s(/\{/,/\}/)},{begin:"%q<",end:">",contains:s("<",">")},{begin:"%q\\|",end:"\\|"},{begin:/<<-'\w+'$/,end:/^\s*\w+$/}],relevance:0},l={begin:"(?!%\\})("+e.RE_STARTERS_RE+"|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",keywords:"case if select unless until when while",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/(?!\\/)",end:"/[a-z]*"}]}],relevance:0},d=[o,u,c,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:"%r\\(",end:"\\)",contains:s("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:s("\\[","\\]")},{begin:"%r\\{",end:/\}/,contains:s(/\{/,/\}/)},{begin:"%r<",end:">",contains:s("<",">")},{begin:"%r\\|",end:"\\|"}],relevance:0},l,{className:"meta",begin:"@\\[",end:"\\]",contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"})]},e.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:r}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:r})]},{beginKeywords:"annotation",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:r})],relevance:2},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})],relevance:2},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[u,{begin:n}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]+)"+t},{begin:"\\b0o([0-7_]+)"+t},{begin:"\\b0x([A-Fa-f0-9_]+)"+t},{begin:"\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?(_?f(32|64))?(?!_)"},{begin:"\\b([1-9][0-9_]*|0)"+t}],relevance:0}];return a.contains=d,o.contains=d.slice(1),{name:"Crystal",aliases:["cr"],keywords:i,contains:d}}},function(e,t){e.exports=function(e){var t={keyword:["abstract","as","base","break","case","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]).join(" "),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","unit","ushort"].join(" "),literal:["default","false","null","true"].join(" ")},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),r={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},i={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},a=e.inherit(i,{illegal:/\n/}),o={className:"subst",begin:/\{/,end:/\}/,keywords:t},s=e.inherit(o,{illegal:/\n/}),u={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,s]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},o]},l=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]});o.contains=[c,u,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE],s.contains=[l,u,a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];var d={variants:[c,u,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},p={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},f=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",h={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},d,r,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,p,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,p,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"meta-string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+f+"\\s+)+"+e.IDENT_RE+"\\s*(<.+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<.+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,p],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[d,r,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},h]}}},function(e,t){e.exports=function(e){return{name:"CSP",case_insensitive:!1,keywords:{$pattern:"[a-zA-Z][a-zA-Z0-9_-]*",keyword:"base-uri child-src connect-src default-src font-src form-action frame-ancestors frame-src img-src media-src object-src plugin-types report-uri sandbox script-src style-src"},contains:[{className:"string",begin:"'",end:"'"},{className:"attribute",begin:"^Content",end:":",excludeEnd:!0}]}}},function(e,t){e.exports=function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={begin:/([*]\s?)?(?:[A-Z_.\-\\]+|--[a-zA-Z0-9_-]+)\s*(\/\*\*\/)?:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:"\\."+t},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9_+()"'.-]+/},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",illegal:/:/,returnBegin:!0,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/,className:"attribute"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:t,relevance:0},{begin:/\{/,end:/\}/,illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,{begin:/;/},n]}]}}},function(e,t){e.exports=function(e){var t={$pattern:e.UNDERSCORE_IDENT_RE,keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},n="((0|[1-9][\\d_]*)|0[bB][01_]+|0[xX]([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))",r="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",i={className:"number",begin:"\\b"+n+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},a={className:"number",begin:"\\b(((0[xX](([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)\\.([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)|\\.?([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))[pP][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))|((0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(\\.\\d*|([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)))|\\d+\\.(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)|\\.(0|[1-9][\\d_]*)([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))?))([fF]|L|i|[fF]i|Li)?|"+n+"(i|[fF]i|Li))",relevance:0},o={className:"string",begin:"'("+r+"|.)",end:"'",illegal:"."},s={className:"string",begin:'"',contains:[{begin:r,relevance:0}],end:'"[cwd]?'},u=e.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{name:"D",keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,u,{className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},s,{className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},{className:"string",begin:"`",end:"`[cwd]?"},{className:"string",begin:'q"\\{',end:'\\}"'},a,i,o,{className:"meta",begin:"^#!",end:"$",relevance:5},{className:"meta",begin:"#(line)",end:"$",relevance:5},{className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"}]}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:r(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.+?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},i={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},a={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};i.contains.push(a),a.contains.push(i);var o=[t,n];return i.contains=i.contains.concat(o),a.contains=a.contains.concat(o),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:o=o.concat(i,a)},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:o}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i,a,{className:"quote",begin:"^>\\s+",contains:o,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}},function(e,t){e.exports=function(e){var t={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"}]},n={className:"subst",variants:[{begin:/\$\{/,end:/\}/}],keywords:"true false null this is new super"},r={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,n]}]};n.contains=[e.C_NUMBER_MODE,r];var i=["Comparable","DateTime","Duration","Function","Iterable","Iterator","List","Map","Match","Object","Pattern","RegExp","Set","Stopwatch","String","StringBuffer","StringSink","Symbol","Type","Uri","bool","double","int","num","Element","ElementList"],a=i.map((function(e){return"".concat(e,"?")}));return{name:"Dart",keywords:{keyword:"abstract as assert async await break case catch class const continue covariant default deferred do dynamic else enum export extends extension external factory false final finally for Function get hide if implements import in inferface is late library mixin new null on operator part required rethrow return set show static super switch sync this throw true try typedef var void while with yield",built_in:i.concat(a).concat(["Never","Null","dynamic","print","document","querySelector","querySelectorAll","window"]).join(" "),$pattern:/[A-Za-z][A-Za-z0-9_]*\??/},contains:[r,e.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),e.COMMENT(/\/{3,} ?/,/$/,{contains:[{subLanguage:"markdown",begin:".",end:"$",relevance:0}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"},{begin:"=>"}]}}},function(e,t){e.exports=function(e){var t="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure absolute reintroduce operator as is abstract alias assembler bitpacked break continue cppdecl cvar enumerator experimental platform deprecated unimplemented dynamic export far16 forward generic helper implements interrupt iochecks local name nodefault noreturn nostackframe oldfpccall otherwise saveregisters softfloat specialize strict unaligned varargs ",n=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],r={className:"meta",variants:[{begin:/\{\$/,end:/\}/},{begin:/\(\*\$/,end:/\*\)/}]},i={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},a={className:"string",begin:/(#\d+)+/},o={begin:e.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE]},s={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[i,a,r].concat(n)},r].concat(n)};return{name:"Delphi",aliases:["dpr","dfm","pas","pascal","freepascal","lazarus","lpr","lfm"],case_insensitive:!0,keywords:t,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[i,a,e.NUMBER_MODE,{className:"number",relevance:0,variants:[{begin:"\\$[0-9A-Fa-f]+"},{begin:"&[0-7]+"},{begin:"%[01]+"}]},o,s,r].concat(n)}}},function(e,t){e.exports=function(e){return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^--- +\d+,\d+ +----$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/^index/,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/},{begin:/^diff --git/,end:/$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}},function(e,t){e.exports=function(e){var t={begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE]};return{name:"Django",aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{%\s*comment\s*%\}/,/\{%\s*endcomment\s*%\}/),e.COMMENT(/\{#/,/#\}/),{className:"template-tag",begin:/\{%/,end:/%\}/,contains:[{className:"name",begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{endsWithParent:!0,keywords:"in by as",contains:[t],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[t]}]}}},function(e,t){e.exports=function(e){return{name:"DNS Zone",aliases:["bind","zone"],keywords:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:/^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{className:"number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b"},e.inherit(e.NUMBER_MODE,{begin:/\b\d+[dhwm]?/})]}}},function(e,t){e.exports=function(e){return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:"from maintainer expose env arg user onbuild stopsignal",contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"",illegal:"\\n"}]},t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i={className:"variable",begin:/&[a-z\d_]*\b/},a={className:"meta-keyword",begin:"/[a-z][a-z\\d-]*/"},o={className:"symbol",begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},s={className:"params",begin:"<",end:">",contains:[n,i]},u={className:"class",begin:/[a-zA-Z_][a-zA-Z\d_@]*\s\{/,end:/[{;=]/,returnBegin:!0,excludeEnd:!0};return{name:"Device Tree",keywords:"",contains:[{className:"class",begin:"/\\s*\\{",end:/\};/,relevance:10,contains:[i,a,o,u,s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,t]},i,a,o,u,s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,t,r,{begin:e.IDENT_RE+"::",keywords:""}]}}},function(e,t){e.exports=function(e){return{name:"Dust",aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"template-tag",begin:/\{[#\/]/,end:/\}/,illegal:/;/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,starts:{endsWithParent:!0,relevance:0,contains:[e.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{/,end:/\}/,illegal:/;/,keywords:"if eq ne lt lte gt gte select default math sep"}]}}},function(e,t){e.exports=function(e){var t=e.COMMENT(/\(\*/,/\*\)/);return{name:"Extended Backus-Naur Form",illegal:/\S/,contains:[t,{className:"attribute",begin:/^[ ]*[a-zA-Z]+([\s_-]+[a-zA-Z]+)*/},{begin:/=/,end:/[.;]/,contains:[t,{className:"meta",begin:/\?.*\?/},{className:"string",variants:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"`",end:"`"}]}]}]}}},function(e,t){e.exports=function(e){var t="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",n={$pattern:t,keyword:"and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote require import with|0"},r={className:"subst",begin:/#\{/,end:/\}/,keywords:n},i={className:"number",begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[1-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)",relevance:0},a={className:"string",begin:"~[a-z](?=[/|([{<\"'])",contains:[{endsParent:!0,contains:[{contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin://}]}]}]},o={className:"string",begin:"~[A-Z](?=[/|([{<\"'])",contains:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin://}]},s={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:/~S"""/,end:/"""/,contains:[]},{begin:/~S"/,end:/"/,contains:[]},{begin:/~S'''/,end:/'''/,contains:[]},{begin:/~S'/,end:/'/,contains:[]},{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},u={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:t,endsParent:!0})]},c=e.inherit(u,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),l=[s,o,a,e.HASH_COMMENT_MODE,c,u,{begin:"::"},{className:"symbol",begin:":(?![\\s:])",contains:[s,{begin:"[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?"}],relevance:0},{className:"symbol",begin:t+":(?!:)",relevance:0},i,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))"},{begin:"->"},{begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[e.HASH_COMMENT_MODE,{begin:/\/: (?=\d+\s*[,\]])/,relevance:0,contains:[i]},{className:"regexp",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return r.contains=l,{name:"Elixir",keywords:n,contains:l}}},function(e,t){e.exports=function(e){var t={variants:[e.COMMENT("--","$"),e.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},n={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},r={begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},t]};return{name:"Elm",keywords:"let in if then else case of where module import exposing type alias as infix infixl infixr port effect command subscription",contains:[{beginKeywords:"port effect module",end:"exposing",keywords:"port effect module where command subscription exposing",contains:[r,t],illegal:"\\W\\.|;"},{begin:"import",end:"$",keywords:"import as exposing",contains:[r,t],illegal:"\\W\\.|;"},{begin:"type",end:"$",keywords:"type alias",contains:[n,r,{begin:/\{/,end:/\}/,contains:r.contains},t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"port",end:"$",keywords:"port",contains:[t]},{className:"string",begin:"'\\\\?.",end:"'",illegal:"."},e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,n,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}],illegal:/;/}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r"},s=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),e.COMMENT("^__END__","\\n$")],u={className:"subst",begin:/#\{/,end:/\}/,keywords:i},c={className:"string",contains:[e.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<[-~]?'?(\w+)\n(?:[^\n]*\n)*?\s*\1\b/,returnBegin:!0,contains:[{begin:/<<[-~]?'?/},e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,u]})]}]},l="[0-9](_?[0-9])*",d={className:"number",relevance:0,variants:[{begin:"\\b(".concat("[1-9](_?[0-9])*|0",")(\\.(").concat(l,"))?([eE][+-]?(").concat(l,")|r)?i?\\b")},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},p={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:i},f=[c,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(s)},{className:"function",begin:r(/def\s*/,(t=n+"\\s*(\\(|;|$)",r("(?=",t,")"))),keywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:n}),p].concat(s)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[c,{begin:n}],relevance:0},d,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,relevance:0,keywords:i},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(o,s),relevance:0}].concat(o,s);u.contains=f,p.contains=f;var h=[{begin:/^\s*=>/,starts:{end:"$",contains:f}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",contains:f}}];return s.unshift(o),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:i,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(h).concat(s).concat(f)}}},function(e,t){e.exports=function(e){return{name:"ERB",subLanguage:"xml",contains:[e.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r ",relevance:10},e.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:r(/\?(::)?/,/([A-Z]\w*)/,/((::)[A-Z]\w*)*/)},{begin:"->"},{begin:"ok"},{begin:"!"},{begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}},function(e,t){e.exports=function(e){var t="[a-z'][a-zA-Z0-9_']*",n="("+t+":"+t+"|"+t+")",r={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},i=e.COMMENT("%","$"),a={className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},o={begin:"fun\\s+"+t+"/\\d+"},s={begin:n+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{begin:n,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},u={begin:/\{/,end:/\}/,relevance:0},c={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},l={begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},d={begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0},{begin:/\{/,end:/\}/,relevance:0}]},p={beginKeywords:"fun receive if try case",end:"end",keywords:r};p.contains=[i,o,e.inherit(e.APOS_STRING_MODE,{className:""}),p,s,e.QUOTE_STRING_MODE,a,u,c,l,d];var f=[i,o,p,s,e.QUOTE_STRING_MODE,a,u,c,l,d];s.contains[1].contains=f,u.contains=f,d.contains[1].contains=f;var h={className:"params",begin:"\\(",end:"\\)",contains:f};return{name:"Erlang",aliases:["erl"],keywords:r,illegal:"(",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[h,e.inherit(e.TITLE_MODE,{begin:t})],starts:{end:";|\\.",keywords:r,contains:f}},i,{begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,keywords:{$pattern:"-"+e.IDENT_RE,keyword:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec"},contains:[h]},a,e.QUOTE_STRING_MODE,d,c,l,u,{begin:/\.$/}]}}},function(e,t){e.exports=function(e){return{name:"Excel formulae",aliases:["xlsx","xls"],case_insensitive:!0,keywords:{$pattern:/[a-zA-Z][\w\.]*/,built_in:"ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST"},contains:[{begin:/^=/,end:/[^=]/,returnEnd:!0,illegal:/=/,relevance:10},{className:"symbol",begin:/\b[A-Z]{1,2}\d+\b/,end:/[^\d]/,excludeEnd:!0,relevance:0},{className:"symbol",begin:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,relevance:0},e.BACKSLASH_ESCAPE,e.QUOTE_STRING_MODE,{className:"number",begin:e.NUMBER_RE+"(%)?",relevance:0},e.COMMENT(/\bN\(/,/\)/,{excludeBegin:!0,excludeEnd:!0,illegal:/\n/})]}}},function(e,t){e.exports=function(e){return{name:"FIX",contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attr"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}},function(e,t){e.exports=function(e){var t={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[{className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/}]};return{name:"Flix",keywords:{literal:"true false",keyword:"case class def else enum if impl import in lat rel index let match namespace switch type yield with"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},{className:"string",variants:[{begin:'"',end:'"'}]},t,e.C_NUMBER_MODE]}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r",contains:[e.inherit(e.TITLE_MODE,{begin:/'[a-zA-Z0-9_]+/})]};return{name:"F#",aliases:["fs"],keywords:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",illegal:/\/\*/,contains:[{className:"keyword",begin:/\b(yield|return|let|do)!/},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:'"""',end:'"""'},e.COMMENT("\\(\\*(\\s)","\\*\\)",{contains:["self"]}),{className:"class",beginKeywords:"type",end:"\\(|=|$",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE,t]},{className:"meta",begin:"\\[<",end:">\\]",relevance:10},{className:"symbol",begin:"\\B('[A-Za-z])\\b",contains:[e.BACKSLASH_ESCAPE]},e.C_LINE_COMMENT_MODE,e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),e.C_NUMBER_MODE]}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r<:,()$[\]_.{}!+%^-]+/,u={begin:/[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/,excludeBegin:!0,end:"$",endsWithParent:!0,contains:[a,o,{className:"comment",begin:r(s,(t=r(/[ ]+/,s),r("(",t,")*"))),relevance:0}]};return{name:"GAMS",aliases:["gms"],case_insensitive:!0,keywords:n,contains:[e.COMMENT(/^\$ontext/,/^\$offtext/),{className:"meta",begin:"^\\$[a-z0-9]+",end:"$",returnBegin:!0,contains:[{className:"meta-keyword",begin:"^\\$[a-z0-9]+"}]},e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{beginKeywords:"set sets parameter parameters variable variables scalar scalars equation equations",end:";",contains:[e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,o,u]},{beginKeywords:"table",end:";",returnBegin:!0,contains:[{beginKeywords:"table",end:"$",contains:[u]},e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE]},{className:"function",begin:/^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,returnBegin:!0,contains:[{className:"title",begin:/^[a-z0-9_]+/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},i]},e.C_NUMBER_MODE,i]}}},function(e,t){e.exports=function(e){var t={keyword:"bool break call callexe checkinterrupt clear clearg closeall cls comlog compile continue create debug declare delete disable dlibrary dllcall do dos ed edit else elseif enable end endfor endif endp endo errorlog errorlogat expr external fn for format goto gosub graph if keyword let lib library line load loadarray loadexe loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow matrix msym ndpclex new open output outwidth plot plotsym pop prcsn print printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen scroll setarray show sparse stop string struct system trace trap threadfor threadendfor threadbegin threadjoin threadstat threadend until use while winprint ne ge le gt lt and xor or not eq eqv",built_in:"abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 indicesf indicesfn indnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribute h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin sylvester strtrim",literal:"DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES DB_TRANSACTIONS DB_UNICODE DB_VIEWS __STDIN __STDOUT __STDERR __FILE_DIR"},n=e.COMMENT("@","@"),r={className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{"meta-keyword":"include"},contains:[{className:"meta-string",begin:'"',end:'"',illegal:"\\n"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n]},i={begin:/\bstruct\s+/,end:/\s/,keywords:"struct",contains:[{className:"type",begin:e.UNDERSCORE_IDENT_RE,relevance:0}]},a=[{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,endsWithParent:!0,relevance:0,contains:[{className:"literal",begin:/\.\.\./},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,i]}],o={className:"title",begin:e.UNDERSCORE_IDENT_RE,relevance:0},s=function(t,r,i){var s=e.inherit({className:"function",beginKeywords:t,end:r,excludeEnd:!0,contains:[].concat(a)},i||{});return s.contains.push(o),s.contains.push(e.C_NUMBER_MODE),s.contains.push(e.C_BLOCK_COMMENT_MODE),s.contains.push(n),s},u={className:"built_in",begin:"\\b("+t.built_in.split(" ").join("|")+")\\b"},c={className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE],relevance:0},l={begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,keywords:t,relevance:0,contains:[{beginKeywords:t.keyword},u,{className:"built_in",begin:e.UNDERSCORE_IDENT_RE,relevance:0}]},d={begin:/\(/,end:/\)/,relevance:0,keywords:{built_in:t.built_in,literal:t.literal},contains:[e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,u,l,c,"self"]};return l.contains.push(d),{name:"GAUSS",aliases:["gss"],case_insensitive:!0,keywords:t,illegal:/(\{[%#]|[%#]\}| <- )/,contains:[e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,c,r,{className:"keyword",begin:/\bexternal (matrix|string|array|sparse matrix|struct|proc|keyword|fn)/},s("proc keyword",";"),s("fn","="),{beginKeywords:"for threadfor",end:/;/,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE,n,d]},{variants:[{begin:e.UNDERSCORE_IDENT_RE+"\\."+e.UNDERSCORE_IDENT_RE},{begin:e.UNDERSCORE_IDENT_RE+"\\s*="}],relevance:0},l,i]}}},function(e,t){e.exports=function(e){var t={$pattern:"[A-Z_][A-Z0-9_.]*",keyword:"IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR"},n=e.inherit(e.C_NUMBER_MODE,{begin:"([-+]?((\\.\\d+)|(\\d+)(\\.\\d*)?))|"+e.C_NUMBER_RE}),r=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT(/\(/,/\)/),n,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"name",begin:"([G])([0-9]+\\.?[0-9]?)"},{className:"name",begin:"([M])([0-9]+\\.?[0-9]?)"},{className:"attr",begin:"(VC|VS|#)",end:"(\\d+)"},{className:"attr",begin:"(VZOFX|VZOFY|VZOFZ)"},{className:"built_in",begin:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",contains:[n],end:"\\]"},{className:"symbol",variants:[{begin:"N",end:"\\d+",illegal:"\\W"}]}];return{name:"G-code (ISO 6983)",aliases:["nc"],case_insensitive:!0,keywords:t,contains:[{className:"meta",begin:"%"},{className:"meta",begin:"([O])([0-9]+)"}].concat(r)}}},function(e,t){e.exports=function(e){return{name:"Gherkin",aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",contains:[{className:"symbol",begin:"\\*",relevance:0},{className:"meta",begin:"@[^@\\s]+"},{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},e.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},e.QUOTE_STRING_MODE]}}},function(e,t){e.exports=function(e){return{name:"GLSL",keywords:{keyword:"break continue discard do else for if return while switch case default attribute binding buffer ccw centroid centroid varying coherent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_adjacency uniform varying vertices volatile writeonly",type:"atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void",built_in:"gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow",literal:"true false"},illegal:'"',contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"}]}}},function(e,t){e.exports=function(e){return{name:"GML",aliases:["gml","GML"],case_insensitive:!1,keywords:{keyword:"begin end if then else while do for break continue with until repeat exit and or xor not return mod div switch case default var globalvar enum #macro #region #endregion",built_in:"is_real is_string is_array is_undefined is_int32 is_int64 is_ptr is_vec3 is_vec4 is_matrix is_bool typeof variable_global_exists variable_global_get variable_global_set variable_instance_exists variable_instance_get variable_instance_set variable_instance_get_names array_length_1d array_length_2d array_height_2d array_equals array_create array_copy random random_range irandom irandom_range random_set_seed random_get_seed randomize randomise choose abs round floor ceil sign frac sqrt sqr exp ln log2 log10 sin cos tan arcsin arccos arctan arctan2 dsin dcos dtan darcsin darccos darctan darctan2 degtorad radtodeg power logn min max mean median clamp lerp dot_product dot_product_3d dot_product_normalised dot_product_3d_normalised dot_product_normalized dot_product_3d_normalized math_set_epsilon math_get_epsilon angle_difference point_distance_3d point_distance point_direction lengthdir_x lengthdir_y real string int64 ptr string_format chr ansi_char ord string_length string_byte_length string_pos string_copy string_char_at string_ord_at string_byte_at string_set_byte_at string_delete string_insert string_lower string_upper string_repeat string_letters string_digits string_lettersdigits string_replace string_replace_all string_count string_hash_to_newline clipboard_has_text clipboard_set_text clipboard_get_text date_current_datetime date_create_datetime date_valid_datetime date_inc_year date_inc_month date_inc_week date_inc_day date_inc_hour date_inc_minute date_inc_second date_get_year date_get_month date_get_week date_get_day date_get_hour date_get_minute date_get_second date_get_weekday date_get_day_of_year date_get_hour_of_year date_get_minute_of_year date_get_second_of_year date_year_span date_month_span date_week_span date_day_span date_hour_span date_minute_span date_second_span date_compare_datetime date_compare_date date_compare_time date_date_of date_time_of date_datetime_string date_date_string date_time_string date_days_in_month date_days_in_year date_leap_year date_is_today date_set_timezone date_get_timezone game_set_speed game_get_speed motion_set motion_add place_free place_empty place_meeting place_snapped move_random move_snap move_towards_point move_contact_solid move_contact_all move_outside_solid move_outside_all move_bounce_solid move_bounce_all move_wrap distance_to_point distance_to_object position_empty position_meeting path_start path_end mp_linear_step mp_potential_step mp_linear_step_object mp_potential_step_object mp_potential_settings mp_linear_path mp_potential_path mp_linear_path_object mp_potential_path_object mp_grid_create mp_grid_destroy mp_grid_clear_all mp_grid_clear_cell mp_grid_clear_rectangle mp_grid_add_cell mp_grid_get_cell mp_grid_add_rectangle mp_grid_add_instances mp_grid_path mp_grid_draw mp_grid_to_ds_grid collision_point collision_rectangle collision_circle collision_ellipse collision_line collision_point_list collision_rectangle_list collision_circle_list collision_ellipse_list collision_line_list instance_position_list instance_place_list point_in_rectangle point_in_triangle point_in_circle rectangle_in_rectangle rectangle_in_triangle rectangle_in_circle instance_find instance_exists instance_number instance_position instance_nearest instance_furthest instance_place instance_create_depth instance_create_layer instance_copy instance_change instance_destroy position_destroy position_change instance_id_get instance_deactivate_all instance_deactivate_object instance_deactivate_region instance_activate_all instance_activate_object instance_activate_region room_goto room_goto_previous room_goto_next room_previous room_next room_restart game_end game_restart game_load game_save game_save_buffer game_load_buffer event_perform event_user event_perform_object event_inherited show_debug_message show_debug_overlay debug_event debug_get_callstack alarm_get alarm_set font_texture_page_size keyboard_set_map keyboard_get_map keyboard_unset_map keyboard_check keyboard_check_pressed keyboard_check_released keyboard_check_direct keyboard_get_numlock keyboard_set_numlock keyboard_key_press keyboard_key_release keyboard_clear io_clear mouse_check_button mouse_check_button_pressed mouse_check_button_released mouse_wheel_up mouse_wheel_down mouse_clear draw_self draw_sprite draw_sprite_pos draw_sprite_ext draw_sprite_stretched draw_sprite_stretched_ext draw_sprite_tiled draw_sprite_tiled_ext draw_sprite_part draw_sprite_part_ext draw_sprite_general draw_clear draw_clear_alpha draw_point draw_line draw_line_width draw_rectangle draw_roundrect draw_roundrect_ext draw_triangle draw_circle draw_ellipse draw_set_circle_precision draw_arrow draw_button draw_path draw_healthbar draw_getpixel draw_getpixel_ext draw_set_colour draw_set_color draw_set_alpha draw_get_colour draw_get_color draw_get_alpha merge_colour make_colour_rgb make_colour_hsv colour_get_red colour_get_green colour_get_blue colour_get_hue colour_get_saturation colour_get_value merge_color make_color_rgb make_color_hsv color_get_red color_get_green color_get_blue color_get_hue color_get_saturation color_get_value merge_color screen_save screen_save_part draw_set_font draw_set_halign draw_set_valign draw_text draw_text_ext string_width string_height string_width_ext string_height_ext draw_text_transformed draw_text_ext_transformed draw_text_colour draw_text_ext_colour draw_text_transformed_colour draw_text_ext_transformed_colour draw_text_color draw_text_ext_color draw_text_transformed_color draw_text_ext_transformed_color draw_point_colour draw_line_colour draw_line_width_colour draw_rectangle_colour draw_roundrect_colour draw_roundrect_colour_ext draw_triangle_colour draw_circle_colour draw_ellipse_colour draw_point_color draw_line_color draw_line_width_color draw_rectangle_color draw_roundrect_color draw_roundrect_color_ext draw_triangle_color draw_circle_color draw_ellipse_color draw_primitive_begin draw_vertex draw_vertex_colour draw_vertex_color draw_primitive_end sprite_get_uvs font_get_uvs sprite_get_texture font_get_texture texture_get_width texture_get_height texture_get_uvs draw_primitive_begin_texture draw_vertex_texture draw_vertex_texture_colour draw_vertex_texture_color texture_global_scale surface_create surface_create_ext surface_resize surface_free surface_exists surface_get_width surface_get_height surface_get_texture surface_set_target surface_set_target_ext surface_reset_target surface_depth_disable surface_get_depth_disable draw_surface draw_surface_stretched draw_surface_tiled draw_surface_part draw_surface_ext draw_surface_stretched_ext draw_surface_tiled_ext draw_surface_part_ext draw_surface_general surface_getpixel surface_getpixel_ext surface_save surface_save_part surface_copy surface_copy_part application_surface_draw_enable application_get_position application_surface_enable application_surface_is_enabled display_get_width display_get_height display_get_orientation display_get_gui_width display_get_gui_height display_reset display_mouse_get_x display_mouse_get_y display_mouse_set display_set_ui_visibility window_set_fullscreen window_get_fullscreen window_set_caption window_set_min_width window_set_max_width window_set_min_height window_set_max_height window_get_visible_rects window_get_caption window_set_cursor window_get_cursor window_set_colour window_get_colour window_set_color window_get_color window_set_position window_set_size window_set_rectangle window_center window_get_x window_get_y window_get_width window_get_height window_mouse_get_x window_mouse_get_y window_mouse_set window_view_mouse_get_x window_view_mouse_get_y window_views_mouse_get_x window_views_mouse_get_y audio_listener_position audio_listener_velocity audio_listener_orientation audio_emitter_position audio_emitter_create audio_emitter_free audio_emitter_exists audio_emitter_pitch audio_emitter_velocity audio_emitter_falloff audio_emitter_gain audio_play_sound audio_play_sound_on audio_play_sound_at audio_stop_sound audio_resume_music audio_music_is_playing audio_resume_sound audio_pause_sound audio_pause_music audio_channel_num audio_sound_length audio_get_type audio_falloff_set_model audio_play_music audio_stop_music audio_master_gain audio_music_gain audio_sound_gain audio_sound_pitch audio_stop_all audio_resume_all audio_pause_all audio_is_playing audio_is_paused audio_exists audio_sound_set_track_position audio_sound_get_track_position audio_emitter_get_gain audio_emitter_get_pitch audio_emitter_get_x audio_emitter_get_y audio_emitter_get_z audio_emitter_get_vx audio_emitter_get_vy audio_emitter_get_vz audio_listener_set_position audio_listener_set_velocity audio_listener_set_orientation audio_listener_get_data audio_set_master_gain audio_get_master_gain audio_sound_get_gain audio_sound_get_pitch audio_get_name audio_sound_set_track_position audio_sound_get_track_position audio_create_stream audio_destroy_stream audio_create_sync_group audio_destroy_sync_group audio_play_in_sync_group audio_start_sync_group audio_stop_sync_group audio_pause_sync_group audio_resume_sync_group audio_sync_group_get_track_pos audio_sync_group_debug audio_sync_group_is_playing audio_debug audio_group_load audio_group_unload audio_group_is_loaded audio_group_load_progress audio_group_name audio_group_stop_all audio_group_set_gain audio_create_buffer_sound audio_free_buffer_sound audio_create_play_queue audio_free_play_queue audio_queue_sound audio_get_recorder_count audio_get_recorder_info audio_start_recording audio_stop_recording audio_sound_get_listener_mask audio_emitter_get_listener_mask audio_get_listener_mask audio_sound_set_listener_mask audio_emitter_set_listener_mask audio_set_listener_mask audio_get_listener_count audio_get_listener_info audio_system show_message show_message_async clickable_add clickable_add_ext clickable_change clickable_change_ext clickable_delete clickable_exists clickable_set_style show_question show_question_async get_integer get_string get_integer_async get_string_async get_login_async get_open_filename get_save_filename get_open_filename_ext get_save_filename_ext show_error highscore_clear highscore_add highscore_value highscore_name draw_highscore sprite_exists sprite_get_name sprite_get_number sprite_get_width sprite_get_height sprite_get_xoffset sprite_get_yoffset sprite_get_bbox_left sprite_get_bbox_right sprite_get_bbox_top sprite_get_bbox_bottom sprite_save sprite_save_strip sprite_set_cache_size sprite_set_cache_size_ext sprite_get_tpe sprite_prefetch sprite_prefetch_multi sprite_flush sprite_flush_multi sprite_set_speed sprite_get_speed_type sprite_get_speed font_exists font_get_name font_get_fontname font_get_bold font_get_italic font_get_first font_get_last font_get_size font_set_cache_size path_exists path_get_name path_get_length path_get_time path_get_kind path_get_closed path_get_precision path_get_number path_get_point_x path_get_point_y path_get_point_speed path_get_x path_get_y path_get_speed script_exists script_get_name timeline_add timeline_delete timeline_clear timeline_exists timeline_get_name timeline_moment_clear timeline_moment_add_script timeline_size timeline_max_moment object_exists object_get_name object_get_sprite object_get_solid object_get_visible object_get_persistent object_get_mask object_get_parent object_get_physics object_is_ancestor room_exists room_get_name sprite_set_offset sprite_duplicate sprite_assign sprite_merge sprite_add sprite_replace sprite_create_from_surface sprite_add_from_surface sprite_delete sprite_set_alpha_from_sprite sprite_collision_mask font_add_enable_aa font_add_get_enable_aa font_add font_add_sprite font_add_sprite_ext font_replace font_replace_sprite font_replace_sprite_ext font_delete path_set_kind path_set_closed path_set_precision path_add path_assign path_duplicate path_append path_delete path_add_point path_insert_point path_change_point path_delete_point path_clear_points path_reverse path_mirror path_flip path_rotate path_rescale path_shift script_execute object_set_sprite object_set_solid object_set_visible object_set_persistent object_set_mask room_set_width room_set_height room_set_persistent room_set_background_colour room_set_background_color room_set_view room_set_viewport room_get_viewport room_set_view_enabled room_add room_duplicate room_assign room_instance_add room_instance_clear room_get_camera room_set_camera asset_get_index asset_get_type file_text_open_from_string file_text_open_read file_text_open_write file_text_open_append file_text_close file_text_write_string file_text_write_real file_text_writeln file_text_read_string file_text_read_real file_text_readln file_text_eof file_text_eoln file_exists file_delete file_rename file_copy directory_exists directory_create directory_destroy file_find_first file_find_next file_find_close file_attributes filename_name filename_path filename_dir filename_drive filename_ext filename_change_ext file_bin_open file_bin_rewrite file_bin_close file_bin_position file_bin_size file_bin_seek file_bin_write_byte file_bin_read_byte parameter_count parameter_string environment_get_variable ini_open_from_string ini_open ini_close ini_read_string ini_read_real ini_write_string ini_write_real ini_key_exists ini_section_exists ini_key_delete ini_section_delete ds_set_precision ds_exists ds_stack_create ds_stack_destroy ds_stack_clear ds_stack_copy ds_stack_size ds_stack_empty ds_stack_push ds_stack_pop ds_stack_top ds_stack_write ds_stack_read ds_queue_create ds_queue_destroy ds_queue_clear ds_queue_copy ds_queue_size ds_queue_empty ds_queue_enqueue ds_queue_dequeue ds_queue_head ds_queue_tail ds_queue_write ds_queue_read ds_list_create ds_list_destroy ds_list_clear ds_list_copy ds_list_size ds_list_empty ds_list_add ds_list_insert ds_list_replace ds_list_delete ds_list_find_index ds_list_find_value ds_list_mark_as_list ds_list_mark_as_map ds_list_sort ds_list_shuffle ds_list_write ds_list_read ds_list_set ds_map_create ds_map_destroy ds_map_clear ds_map_copy ds_map_size ds_map_empty ds_map_add ds_map_add_list ds_map_add_map ds_map_replace ds_map_replace_map ds_map_replace_list ds_map_delete ds_map_exists ds_map_find_value ds_map_find_previous ds_map_find_next ds_map_find_first ds_map_find_last ds_map_write ds_map_read ds_map_secure_save ds_map_secure_load ds_map_secure_load_buffer ds_map_secure_save_buffer ds_map_set ds_priority_create ds_priority_destroy ds_priority_clear ds_priority_copy ds_priority_size ds_priority_empty ds_priority_add ds_priority_change_priority ds_priority_find_priority ds_priority_delete_value ds_priority_delete_min ds_priority_find_min ds_priority_delete_max ds_priority_find_max ds_priority_write ds_priority_read ds_grid_create ds_grid_destroy ds_grid_copy ds_grid_resize ds_grid_width ds_grid_height ds_grid_clear ds_grid_set ds_grid_add ds_grid_multiply ds_grid_set_region ds_grid_add_region ds_grid_multiply_region ds_grid_set_disk ds_grid_add_disk ds_grid_multiply_disk ds_grid_set_grid_region ds_grid_add_grid_region ds_grid_multiply_grid_region ds_grid_get ds_grid_get_sum ds_grid_get_max ds_grid_get_min ds_grid_get_mean ds_grid_get_disk_sum ds_grid_get_disk_min ds_grid_get_disk_max ds_grid_get_disk_mean ds_grid_value_exists ds_grid_value_x ds_grid_value_y ds_grid_value_disk_exists ds_grid_value_disk_x ds_grid_value_disk_y ds_grid_shuffle ds_grid_write ds_grid_read ds_grid_sort ds_grid_set ds_grid_get effect_create_below effect_create_above effect_clear part_type_create part_type_destroy part_type_exists part_type_clear part_type_shape part_type_sprite part_type_size part_type_scale part_type_orientation part_type_life part_type_step part_type_death part_type_speed part_type_direction part_type_gravity part_type_colour1 part_type_colour2 part_type_colour3 part_type_colour_mix part_type_colour_rgb part_type_colour_hsv part_type_color1 part_type_color2 part_type_color3 part_type_color_mix part_type_color_rgb part_type_color_hsv part_type_alpha1 part_type_alpha2 part_type_alpha3 part_type_blend part_system_create part_system_create_layer part_system_destroy part_system_exists part_system_clear part_system_draw_order part_system_depth part_system_position part_system_automatic_update part_system_automatic_draw part_system_update part_system_drawit part_system_get_layer part_system_layer part_particles_create part_particles_create_colour part_particles_create_color part_particles_clear part_particles_count part_emitter_create part_emitter_destroy part_emitter_destroy_all part_emitter_exists part_emitter_clear part_emitter_region part_emitter_burst part_emitter_stream external_call external_define external_free window_handle window_device matrix_get matrix_set matrix_build_identity matrix_build matrix_build_lookat matrix_build_projection_ortho matrix_build_projection_perspective matrix_build_projection_perspective_fov matrix_multiply matrix_transform_vertex matrix_stack_push matrix_stack_pop matrix_stack_multiply matrix_stack_set matrix_stack_clear matrix_stack_top matrix_stack_is_empty browser_input_capture os_get_config os_get_info os_get_language os_get_region os_lock_orientation display_get_dpi_x display_get_dpi_y display_set_gui_size display_set_gui_maximise display_set_gui_maximize device_mouse_dbclick_enable display_set_timing_method display_get_timing_method display_set_sleep_margin display_get_sleep_margin virtual_key_add virtual_key_hide virtual_key_delete virtual_key_show draw_enable_drawevent draw_enable_swf_aa draw_set_swf_aa_level draw_get_swf_aa_level draw_texture_flush draw_flush gpu_set_blendenable gpu_set_ztestenable gpu_set_zfunc gpu_set_zwriteenable gpu_set_lightingenable gpu_set_fog gpu_set_cullmode gpu_set_blendmode gpu_set_blendmode_ext gpu_set_blendmode_ext_sepalpha gpu_set_colorwriteenable gpu_set_colourwriteenable gpu_set_alphatestenable gpu_set_alphatestref gpu_set_alphatestfunc gpu_set_texfilter gpu_set_texfilter_ext gpu_set_texrepeat gpu_set_texrepeat_ext gpu_set_tex_filter gpu_set_tex_filter_ext gpu_set_tex_repeat gpu_set_tex_repeat_ext gpu_set_tex_mip_filter gpu_set_tex_mip_filter_ext gpu_set_tex_mip_bias gpu_set_tex_mip_bias_ext gpu_set_tex_min_mip gpu_set_tex_min_mip_ext gpu_set_tex_max_mip gpu_set_tex_max_mip_ext gpu_set_tex_max_aniso gpu_set_tex_max_aniso_ext gpu_set_tex_mip_enable gpu_set_tex_mip_enable_ext gpu_get_blendenable gpu_get_ztestenable gpu_get_zfunc gpu_get_zwriteenable gpu_get_lightingenable gpu_get_fog gpu_get_cullmode gpu_get_blendmode gpu_get_blendmode_ext gpu_get_blendmode_ext_sepalpha gpu_get_blendmode_src gpu_get_blendmode_dest gpu_get_blendmode_srcalpha gpu_get_blendmode_destalpha gpu_get_colorwriteenable gpu_get_colourwriteenable gpu_get_alphatestenable gpu_get_alphatestref gpu_get_alphatestfunc gpu_get_texfilter gpu_get_texfilter_ext gpu_get_texrepeat gpu_get_texrepeat_ext gpu_get_tex_filter gpu_get_tex_filter_ext gpu_get_tex_repeat gpu_get_tex_repeat_ext gpu_get_tex_mip_filter gpu_get_tex_mip_filter_ext gpu_get_tex_mip_bias gpu_get_tex_mip_bias_ext gpu_get_tex_min_mip gpu_get_tex_min_mip_ext gpu_get_tex_max_mip gpu_get_tex_max_mip_ext gpu_get_tex_max_aniso gpu_get_tex_max_aniso_ext gpu_get_tex_mip_enable gpu_get_tex_mip_enable_ext gpu_push_state gpu_pop_state gpu_get_state gpu_set_state draw_light_define_ambient draw_light_define_direction draw_light_define_point draw_light_enable draw_set_lighting draw_light_get_ambient draw_light_get draw_get_lighting shop_leave_rating url_get_domain url_open url_open_ext url_open_full get_timer achievement_login achievement_logout achievement_post achievement_increment achievement_post_score achievement_available achievement_show_achievements achievement_show_leaderboards achievement_load_friends achievement_load_leaderboard achievement_send_challenge achievement_load_progress achievement_reset achievement_login_status achievement_get_pic achievement_show_challenge_notifications achievement_get_challenges achievement_event achievement_show achievement_get_info cloud_file_save cloud_string_save cloud_synchronise ads_enable ads_disable ads_setup ads_engagement_launch ads_engagement_available ads_engagement_active ads_event ads_event_preload ads_set_reward_callback ads_get_display_height ads_get_display_width ads_move ads_interstitial_available ads_interstitial_display device_get_tilt_x device_get_tilt_y device_get_tilt_z device_is_keypad_open device_mouse_check_button device_mouse_check_button_pressed device_mouse_check_button_released device_mouse_x device_mouse_y device_mouse_raw_x device_mouse_raw_y device_mouse_x_to_gui device_mouse_y_to_gui iap_activate iap_status iap_enumerate_products iap_restore_all iap_acquire iap_consume iap_product_details iap_purchase_details facebook_init facebook_login facebook_status facebook_graph_request facebook_dialog facebook_logout facebook_launch_offerwall facebook_post_message facebook_send_invite facebook_user_id facebook_accesstoken facebook_check_permission facebook_request_read_permissions facebook_request_publish_permissions gamepad_is_supported gamepad_get_device_count gamepad_is_connected gamepad_get_description gamepad_get_button_threshold gamepad_set_button_threshold gamepad_get_axis_deadzone gamepad_set_axis_deadzone gamepad_button_count gamepad_button_check gamepad_button_check_pressed gamepad_button_check_released gamepad_button_value gamepad_axis_count gamepad_axis_value gamepad_set_vibration gamepad_set_colour gamepad_set_color os_is_paused window_has_focus code_is_compiled http_get http_get_file http_post_string http_request json_encode json_decode zip_unzip load_csv base64_encode base64_decode md5_string_unicode md5_string_utf8 md5_file os_is_network_connected sha1_string_unicode sha1_string_utf8 sha1_file os_powersave_enable analytics_event analytics_event_ext win8_livetile_tile_notification win8_livetile_tile_clear win8_livetile_badge_notification win8_livetile_badge_clear win8_livetile_queue_enable win8_secondarytile_pin win8_secondarytile_badge_notification win8_secondarytile_delete win8_livetile_notification_begin win8_livetile_notification_secondary_begin win8_livetile_notification_expiry win8_livetile_notification_tag win8_livetile_notification_text_add win8_livetile_notification_image_add win8_livetile_notification_end win8_appbar_enable win8_appbar_add_element win8_appbar_remove_element win8_settingscharm_add_entry win8_settingscharm_add_html_entry win8_settingscharm_add_xaml_entry win8_settingscharm_set_xaml_property win8_settingscharm_get_xaml_property win8_settingscharm_remove_entry win8_share_image win8_share_screenshot win8_share_file win8_share_url win8_share_text win8_search_enable win8_search_disable win8_search_add_suggestions win8_device_touchscreen_available win8_license_initialize_sandbox win8_license_trial_version winphone_license_trial_version winphone_tile_title winphone_tile_count winphone_tile_back_title winphone_tile_back_content winphone_tile_back_content_wide winphone_tile_front_image winphone_tile_front_image_small winphone_tile_front_image_wide winphone_tile_back_image winphone_tile_back_image_wide winphone_tile_background_colour winphone_tile_background_color winphone_tile_icon_image winphone_tile_small_icon_image winphone_tile_wide_content winphone_tile_cycle_images winphone_tile_small_background_image physics_world_create physics_world_gravity physics_world_update_speed physics_world_update_iterations physics_world_draw_debug physics_pause_enable physics_fixture_create physics_fixture_set_kinematic physics_fixture_set_density physics_fixture_set_awake physics_fixture_set_restitution physics_fixture_set_friction physics_fixture_set_collision_group physics_fixture_set_sensor physics_fixture_set_linear_damping physics_fixture_set_angular_damping physics_fixture_set_circle_shape physics_fixture_set_box_shape physics_fixture_set_edge_shape physics_fixture_set_polygon_shape physics_fixture_set_chain_shape physics_fixture_add_point physics_fixture_bind physics_fixture_bind_ext physics_fixture_delete physics_apply_force physics_apply_impulse physics_apply_angular_impulse physics_apply_local_force physics_apply_local_impulse physics_apply_torque physics_mass_properties physics_draw_debug physics_test_overlap physics_remove_fixture physics_set_friction physics_set_density physics_set_restitution physics_get_friction physics_get_density physics_get_restitution physics_joint_distance_create physics_joint_rope_create physics_joint_revolute_create physics_joint_prismatic_create physics_joint_pulley_create physics_joint_wheel_create physics_joint_weld_create physics_joint_friction_create physics_joint_gear_create physics_joint_enable_motor physics_joint_get_value physics_joint_set_value physics_joint_delete physics_particle_create physics_particle_delete physics_particle_delete_region_circle physics_particle_delete_region_box physics_particle_delete_region_poly physics_particle_set_flags physics_particle_set_category_flags physics_particle_draw physics_particle_draw_ext physics_particle_count physics_particle_get_data physics_particle_get_data_particle physics_particle_group_begin physics_particle_group_circle physics_particle_group_box physics_particle_group_polygon physics_particle_group_add_point physics_particle_group_end physics_particle_group_join physics_particle_group_delete physics_particle_group_count physics_particle_group_get_data physics_particle_group_get_mass physics_particle_group_get_inertia physics_particle_group_get_centre_x physics_particle_group_get_centre_y physics_particle_group_get_vel_x physics_particle_group_get_vel_y physics_particle_group_get_ang_vel physics_particle_group_get_x physics_particle_group_get_y physics_particle_group_get_angle physics_particle_set_group_flags physics_particle_get_group_flags physics_particle_get_max_count physics_particle_get_radius physics_particle_get_density physics_particle_get_damping physics_particle_get_gravity_scale physics_particle_set_max_count physics_particle_set_radius physics_particle_set_density physics_particle_set_damping physics_particle_set_gravity_scale network_create_socket network_create_socket_ext network_create_server network_create_server_raw network_connect network_connect_raw network_send_packet network_send_raw network_send_broadcast network_send_udp network_send_udp_raw network_set_timeout network_set_config network_resolve network_destroy buffer_create buffer_write buffer_read buffer_seek buffer_get_surface buffer_set_surface buffer_delete buffer_exists buffer_get_type buffer_get_alignment buffer_poke buffer_peek buffer_save buffer_save_ext buffer_load buffer_load_ext buffer_load_partial buffer_copy buffer_fill buffer_get_size buffer_tell buffer_resize buffer_md5 buffer_sha1 buffer_base64_encode buffer_base64_decode buffer_base64_decode_ext buffer_sizeof buffer_get_address buffer_create_from_vertex_buffer buffer_create_from_vertex_buffer_ext buffer_copy_from_vertex_buffer buffer_async_group_begin buffer_async_group_option buffer_async_group_end buffer_load_async buffer_save_async gml_release_mode gml_pragma steam_activate_overlay steam_is_overlay_enabled steam_is_overlay_activated steam_get_persona_name steam_initialised steam_is_cloud_enabled_for_app steam_is_cloud_enabled_for_account steam_file_persisted steam_get_quota_total steam_get_quota_free steam_file_write steam_file_write_file steam_file_read steam_file_delete steam_file_exists steam_file_size steam_file_share steam_is_screenshot_requested steam_send_screenshot steam_is_user_logged_on steam_get_user_steam_id steam_user_owns_dlc steam_user_installed_dlc steam_set_achievement steam_get_achievement steam_clear_achievement steam_set_stat_int steam_set_stat_float steam_set_stat_avg_rate steam_get_stat_int steam_get_stat_float steam_get_stat_avg_rate steam_reset_all_stats steam_reset_all_stats_achievements steam_stats_ready steam_create_leaderboard steam_upload_score steam_upload_score_ext steam_download_scores_around_user steam_download_scores steam_download_friends_scores steam_upload_score_buffer steam_upload_score_buffer_ext steam_current_game_language steam_available_languages steam_activate_overlay_browser steam_activate_overlay_user steam_activate_overlay_store steam_get_user_persona_name steam_get_app_id steam_get_user_account_id steam_ugc_download steam_ugc_create_item steam_ugc_start_item_update steam_ugc_set_item_title steam_ugc_set_item_description steam_ugc_set_item_visibility steam_ugc_set_item_tags steam_ugc_set_item_content steam_ugc_set_item_preview steam_ugc_submit_item_update steam_ugc_get_item_update_progress steam_ugc_subscribe_item steam_ugc_unsubscribe_item steam_ugc_num_subscribed_items steam_ugc_get_subscribed_items steam_ugc_get_item_install_info steam_ugc_get_item_update_info steam_ugc_request_item_details steam_ugc_create_query_user steam_ugc_create_query_user_ex steam_ugc_create_query_all steam_ugc_create_query_all_ex steam_ugc_query_set_cloud_filename_filter steam_ugc_query_set_match_any_tag steam_ugc_query_set_search_text steam_ugc_query_set_ranked_by_trend_days steam_ugc_query_add_required_tag steam_ugc_query_add_excluded_tag steam_ugc_query_set_return_long_description steam_ugc_query_set_return_total_only steam_ugc_query_set_allow_cached_response steam_ugc_send_query shader_set shader_get_name shader_reset shader_current shader_is_compiled shader_get_sampler_index shader_get_uniform shader_set_uniform_i shader_set_uniform_i_array shader_set_uniform_f shader_set_uniform_f_array shader_set_uniform_matrix shader_set_uniform_matrix_array shader_enable_corner_id texture_set_stage texture_get_texel_width texture_get_texel_height shaders_are_supported vertex_format_begin vertex_format_end vertex_format_delete vertex_format_add_position vertex_format_add_position_3d vertex_format_add_colour vertex_format_add_color vertex_format_add_normal vertex_format_add_texcoord vertex_format_add_textcoord vertex_format_add_custom vertex_create_buffer vertex_create_buffer_ext vertex_delete_buffer vertex_begin vertex_end vertex_position vertex_position_3d vertex_colour vertex_color vertex_argb vertex_texcoord vertex_normal vertex_float1 vertex_float2 vertex_float3 vertex_float4 vertex_ubyte4 vertex_submit vertex_freeze vertex_get_number vertex_get_buffer_size vertex_create_buffer_from_buffer vertex_create_buffer_from_buffer_ext push_local_notification push_get_first_local_notification push_get_next_local_notification push_cancel_local_notification skeleton_animation_set skeleton_animation_get skeleton_animation_mix skeleton_animation_set_ext skeleton_animation_get_ext skeleton_animation_get_duration skeleton_animation_get_frames skeleton_animation_clear skeleton_skin_set skeleton_skin_get skeleton_attachment_set skeleton_attachment_get skeleton_attachment_create skeleton_collision_draw_set skeleton_bone_data_get skeleton_bone_data_set skeleton_bone_state_get skeleton_bone_state_set skeleton_get_minmax skeleton_get_num_bounds skeleton_get_bounds skeleton_animation_get_frame skeleton_animation_set_frame draw_skeleton draw_skeleton_time draw_skeleton_instance draw_skeleton_collision skeleton_animation_list skeleton_skin_list skeleton_slot_data layer_get_id layer_get_id_at_depth layer_get_depth layer_create layer_destroy layer_destroy_instances layer_add_instance layer_has_instance layer_set_visible layer_get_visible layer_exists layer_x layer_y layer_get_x layer_get_y layer_hspeed layer_vspeed layer_get_hspeed layer_get_vspeed layer_script_begin layer_script_end layer_shader layer_get_script_begin layer_get_script_end layer_get_shader layer_set_target_room layer_get_target_room layer_reset_target_room layer_get_all layer_get_all_elements layer_get_name layer_depth layer_get_element_layer layer_get_element_type layer_element_move layer_force_draw_depth layer_is_draw_depth_forced layer_get_forced_depth layer_background_get_id layer_background_exists layer_background_create layer_background_destroy layer_background_visible layer_background_change layer_background_sprite layer_background_htiled layer_background_vtiled layer_background_stretch layer_background_yscale layer_background_xscale layer_background_blend layer_background_alpha layer_background_index layer_background_speed layer_background_get_visible layer_background_get_sprite layer_background_get_htiled layer_background_get_vtiled layer_background_get_stretch layer_background_get_yscale layer_background_get_xscale layer_background_get_blend layer_background_get_alpha layer_background_get_index layer_background_get_speed layer_sprite_get_id layer_sprite_exists layer_sprite_create layer_sprite_destroy layer_sprite_change layer_sprite_index layer_sprite_speed layer_sprite_xscale layer_sprite_yscale layer_sprite_angle layer_sprite_blend layer_sprite_alpha layer_sprite_x layer_sprite_y layer_sprite_get_sprite layer_sprite_get_index layer_sprite_get_speed layer_sprite_get_xscale layer_sprite_get_yscale layer_sprite_get_angle layer_sprite_get_blend layer_sprite_get_alpha layer_sprite_get_x layer_sprite_get_y layer_tilemap_get_id layer_tilemap_exists layer_tilemap_create layer_tilemap_destroy tilemap_tileset tilemap_x tilemap_y tilemap_set tilemap_set_at_pixel tilemap_get_tileset tilemap_get_tile_width tilemap_get_tile_height tilemap_get_width tilemap_get_height tilemap_get_x tilemap_get_y tilemap_get tilemap_get_at_pixel tilemap_get_cell_x_at_pixel tilemap_get_cell_y_at_pixel tilemap_clear draw_tilemap draw_tile tilemap_set_global_mask tilemap_get_global_mask tilemap_set_mask tilemap_get_mask tilemap_get_frame tile_set_empty tile_set_index tile_set_flip tile_set_mirror tile_set_rotate tile_get_empty tile_get_index tile_get_flip tile_get_mirror tile_get_rotate layer_tile_exists layer_tile_create layer_tile_destroy layer_tile_change layer_tile_xscale layer_tile_yscale layer_tile_blend layer_tile_alpha layer_tile_x layer_tile_y layer_tile_region layer_tile_visible layer_tile_get_sprite layer_tile_get_xscale layer_tile_get_yscale layer_tile_get_blend layer_tile_get_alpha layer_tile_get_x layer_tile_get_y layer_tile_get_region layer_tile_get_visible layer_instance_get_instance instance_activate_layer instance_deactivate_layer camera_create camera_create_view camera_destroy camera_apply camera_get_active camera_get_default camera_set_default camera_set_view_mat camera_set_proj_mat camera_set_update_script camera_set_begin_script camera_set_end_script camera_set_view_pos camera_set_view_size camera_set_view_speed camera_set_view_border camera_set_view_angle camera_set_view_target camera_get_view_mat camera_get_proj_mat camera_get_update_script camera_get_begin_script camera_get_end_script camera_get_view_x camera_get_view_y camera_get_view_width camera_get_view_height camera_get_view_speed_x camera_get_view_speed_y camera_get_view_border_x camera_get_view_border_y camera_get_view_angle camera_get_view_target view_get_camera view_get_visible view_get_xport view_get_yport view_get_wport view_get_hport view_get_surface_id view_set_camera view_set_visible view_set_xport view_set_yport view_set_wport view_set_hport view_set_surface_id gesture_drag_time gesture_drag_distance gesture_flick_speed gesture_double_tap_time gesture_double_tap_distance gesture_pinch_distance gesture_pinch_angle_towards gesture_pinch_angle_away gesture_rotate_time gesture_rotate_angle gesture_tap_count gesture_get_drag_time gesture_get_drag_distance gesture_get_flick_speed gesture_get_double_tap_time gesture_get_double_tap_distance gesture_get_pinch_distance gesture_get_pinch_angle_towards gesture_get_pinch_angle_away gesture_get_rotate_time gesture_get_rotate_angle gesture_get_tap_count keyboard_virtual_show keyboard_virtual_hide keyboard_virtual_status keyboard_virtual_height",literal:"self other all noone global local undefined pointer_invalid pointer_null path_action_stop path_action_restart path_action_continue path_action_reverse true false pi GM_build_date GM_version GM_runtime_version timezone_local timezone_utc gamespeed_fps gamespeed_microseconds ev_create ev_destroy ev_step ev_alarm ev_keyboard ev_mouse ev_collision ev_other ev_draw ev_draw_begin ev_draw_end ev_draw_pre ev_draw_post ev_keypress ev_keyrelease ev_trigger ev_left_button ev_right_button ev_middle_button ev_no_button ev_left_press ev_right_press ev_middle_press ev_left_release ev_right_release ev_middle_release ev_mouse_enter ev_mouse_leave ev_mouse_wheel_up ev_mouse_wheel_down ev_global_left_button ev_global_right_button ev_global_middle_button ev_global_left_press ev_global_right_press ev_global_middle_press ev_global_left_release ev_global_right_release ev_global_middle_release ev_joystick1_left ev_joystick1_right ev_joystick1_up ev_joystick1_down ev_joystick1_button1 ev_joystick1_button2 ev_joystick1_button3 ev_joystick1_button4 ev_joystick1_button5 ev_joystick1_button6 ev_joystick1_button7 ev_joystick1_button8 ev_joystick2_left ev_joystick2_right ev_joystick2_up ev_joystick2_down ev_joystick2_button1 ev_joystick2_button2 ev_joystick2_button3 ev_joystick2_button4 ev_joystick2_button5 ev_joystick2_button6 ev_joystick2_button7 ev_joystick2_button8 ev_outside ev_boundary ev_game_start ev_game_end ev_room_start ev_room_end ev_no_more_lives ev_animation_end ev_end_of_path ev_no_more_health ev_close_button ev_user0 ev_user1 ev_user2 ev_user3 ev_user4 ev_user5 ev_user6 ev_user7 ev_user8 ev_user9 ev_user10 ev_user11 ev_user12 ev_user13 ev_user14 ev_user15 ev_step_normal ev_step_begin ev_step_end ev_gui ev_gui_begin ev_gui_end ev_cleanup ev_gesture ev_gesture_tap ev_gesture_double_tap ev_gesture_drag_start ev_gesture_dragging ev_gesture_drag_end ev_gesture_flick ev_gesture_pinch_start ev_gesture_pinch_in ev_gesture_pinch_out ev_gesture_pinch_end ev_gesture_rotate_start ev_gesture_rotating ev_gesture_rotate_end ev_global_gesture_tap ev_global_gesture_double_tap ev_global_gesture_drag_start ev_global_gesture_dragging ev_global_gesture_drag_end ev_global_gesture_flick ev_global_gesture_pinch_start ev_global_gesture_pinch_in ev_global_gesture_pinch_out ev_global_gesture_pinch_end ev_global_gesture_rotate_start ev_global_gesture_rotating ev_global_gesture_rotate_end vk_nokey vk_anykey vk_enter vk_return vk_shift vk_control vk_alt vk_escape vk_space vk_backspace vk_tab vk_pause vk_printscreen vk_left vk_right vk_up vk_down vk_home vk_end vk_delete vk_insert vk_pageup vk_pagedown vk_f1 vk_f2 vk_f3 vk_f4 vk_f5 vk_f6 vk_f7 vk_f8 vk_f9 vk_f10 vk_f11 vk_f12 vk_numpad0 vk_numpad1 vk_numpad2 vk_numpad3 vk_numpad4 vk_numpad5 vk_numpad6 vk_numpad7 vk_numpad8 vk_numpad9 vk_divide vk_multiply vk_subtract vk_add vk_decimal vk_lshift vk_lcontrol vk_lalt vk_rshift vk_rcontrol vk_ralt mb_any mb_none mb_left mb_right mb_middle c_aqua c_black c_blue c_dkgray c_fuchsia c_gray c_green c_lime c_ltgray c_maroon c_navy c_olive c_purple c_red c_silver c_teal c_white c_yellow c_orange fa_left fa_center fa_right fa_top fa_middle fa_bottom pr_pointlist pr_linelist pr_linestrip pr_trianglelist pr_trianglestrip pr_trianglefan bm_complex bm_normal bm_add bm_max bm_subtract bm_zero bm_one bm_src_colour bm_inv_src_colour bm_src_color bm_inv_src_color bm_src_alpha bm_inv_src_alpha bm_dest_alpha bm_inv_dest_alpha bm_dest_colour bm_inv_dest_colour bm_dest_color bm_inv_dest_color bm_src_alpha_sat tf_point tf_linear tf_anisotropic mip_off mip_on mip_markedonly audio_falloff_none audio_falloff_inverse_distance audio_falloff_inverse_distance_clamped audio_falloff_linear_distance audio_falloff_linear_distance_clamped audio_falloff_exponent_distance audio_falloff_exponent_distance_clamped audio_old_system audio_new_system audio_mono audio_stereo audio_3d cr_default cr_none cr_arrow cr_cross cr_beam cr_size_nesw cr_size_ns cr_size_nwse cr_size_we cr_uparrow cr_hourglass cr_drag cr_appstart cr_handpoint cr_size_all spritespeed_framespersecond spritespeed_framespergameframe asset_object asset_unknown asset_sprite asset_sound asset_room asset_path asset_script asset_font asset_timeline asset_tiles asset_shader fa_readonly fa_hidden fa_sysfile fa_volumeid fa_directory fa_archive ds_type_map ds_type_list ds_type_stack ds_type_queue ds_type_grid ds_type_priority ef_explosion ef_ring ef_ellipse ef_firework ef_smoke ef_smokeup ef_star ef_spark ef_flare ef_cloud ef_rain ef_snow pt_shape_pixel pt_shape_disk pt_shape_square pt_shape_line pt_shape_star pt_shape_circle pt_shape_ring pt_shape_sphere pt_shape_flare pt_shape_spark pt_shape_explosion pt_shape_cloud pt_shape_smoke pt_shape_snow ps_distr_linear ps_distr_gaussian ps_distr_invgaussian ps_shape_rectangle ps_shape_ellipse ps_shape_diamond ps_shape_line ty_real ty_string dll_cdecl dll_stdcall matrix_view matrix_projection matrix_world os_win32 os_windows os_macosx os_ios os_android os_symbian os_linux os_unknown os_winphone os_tizen os_win8native os_wiiu os_3ds os_psvita os_bb10 os_ps4 os_xboxone os_ps3 os_xbox360 os_uwp os_tvos os_switch browser_not_a_browser browser_unknown browser_ie browser_firefox browser_chrome browser_safari browser_safari_mobile browser_opera browser_tizen browser_edge browser_windows_store browser_ie_mobile device_ios_unknown device_ios_iphone device_ios_iphone_retina device_ios_ipad device_ios_ipad_retina device_ios_iphone5 device_ios_iphone6 device_ios_iphone6plus device_emulator device_tablet display_landscape display_landscape_flipped display_portrait display_portrait_flipped tm_sleep tm_countvsyncs of_challenge_win of_challen ge_lose of_challenge_tie leaderboard_type_number leaderboard_type_time_mins_secs cmpfunc_never cmpfunc_less cmpfunc_equal cmpfunc_lessequal cmpfunc_greater cmpfunc_notequal cmpfunc_greaterequal cmpfunc_always cull_noculling cull_clockwise cull_counterclockwise lighttype_dir lighttype_point iap_ev_storeload iap_ev_product iap_ev_purchase iap_ev_consume iap_ev_restore iap_storeload_ok iap_storeload_failed iap_status_uninitialised iap_status_unavailable iap_status_loading iap_status_available iap_status_processing iap_status_restoring iap_failed iap_unavailable iap_available iap_purchased iap_canceled iap_refunded fb_login_default fb_login_fallback_to_webview fb_login_no_fallback_to_webview fb_login_forcing_webview fb_login_use_system_account fb_login_forcing_safari phy_joint_anchor_1_x phy_joint_anchor_1_y phy_joint_anchor_2_x phy_joint_anchor_2_y phy_joint_reaction_force_x phy_joint_reaction_force_y phy_joint_reaction_torque phy_joint_motor_speed phy_joint_angle phy_joint_motor_torque phy_joint_max_motor_torque phy_joint_translation phy_joint_speed phy_joint_motor_force phy_joint_max_motor_force phy_joint_length_1 phy_joint_length_2 phy_joint_damping_ratio phy_joint_frequency phy_joint_lower_angle_limit phy_joint_upper_angle_limit phy_joint_angle_limits phy_joint_max_length phy_joint_max_torque phy_joint_max_force phy_debug_render_aabb phy_debug_render_collision_pairs phy_debug_render_coms phy_debug_render_core_shapes phy_debug_render_joints phy_debug_render_obb phy_debug_render_shapes phy_particle_flag_water phy_particle_flag_zombie phy_particle_flag_wall phy_particle_flag_spring phy_particle_flag_elastic phy_particle_flag_viscous phy_particle_flag_powder phy_particle_flag_tensile phy_particle_flag_colourmixing phy_particle_flag_colormixing phy_particle_group_flag_solid phy_particle_group_flag_rigid phy_particle_data_flag_typeflags phy_particle_data_flag_position phy_particle_data_flag_velocity phy_particle_data_flag_colour phy_particle_data_flag_color phy_particle_data_flag_category achievement_our_info achievement_friends_info achievement_leaderboard_info achievement_achievement_info achievement_filter_all_players achievement_filter_friends_only achievement_filter_favorites_only achievement_type_achievement_challenge achievement_type_score_challenge achievement_pic_loaded achievement_show_ui achievement_show_profile achievement_show_leaderboard achievement_show_achievement achievement_show_bank achievement_show_friend_picker achievement_show_purchase_prompt network_socket_tcp network_socket_udp network_socket_bluetooth network_type_connect network_type_disconnect network_type_data network_type_non_blocking_connect network_config_connect_timeout network_config_use_non_blocking_socket network_config_enable_reliable_udp network_config_disable_reliable_udp buffer_fixed buffer_grow buffer_wrap buffer_fast buffer_vbuffer buffer_network buffer_u8 buffer_s8 buffer_u16 buffer_s16 buffer_u32 buffer_s32 buffer_u64 buffer_f16 buffer_f32 buffer_f64 buffer_bool buffer_text buffer_string buffer_surface_copy buffer_seek_start buffer_seek_relative buffer_seek_end buffer_generalerror buffer_outofspace buffer_outofbounds buffer_invalidtype text_type button_type input_type ANSI_CHARSET DEFAULT_CHARSET EASTEUROPE_CHARSET RUSSIAN_CHARSET SYMBOL_CHARSET SHIFTJIS_CHARSET HANGEUL_CHARSET GB2312_CHARSET CHINESEBIG5_CHARSET JOHAB_CHARSET HEBREW_CHARSET ARABIC_CHARSET GREEK_CHARSET TURKISH_CHARSET VIETNAMESE_CHARSET THAI_CHARSET MAC_CHARSET BALTIC_CHARSET OEM_CHARSET gp_face1 gp_face2 gp_face3 gp_face4 gp_shoulderl gp_shoulderr gp_shoulderlb gp_shoulderrb gp_select gp_start gp_stickl gp_stickr gp_padu gp_padd gp_padl gp_padr gp_axislh gp_axislv gp_axisrh gp_axisrv ov_friends ov_community ov_players ov_settings ov_gamegroup ov_achievements lb_sort_none lb_sort_ascending lb_sort_descending lb_disp_none lb_disp_numeric lb_disp_time_sec lb_disp_time_ms ugc_result_success ugc_filetype_community ugc_filetype_microtrans ugc_visibility_public ugc_visibility_friends_only ugc_visibility_private ugc_query_RankedByVote ugc_query_RankedByPublicationDate ugc_query_AcceptedForGameRankedByAcceptanceDate ugc_query_RankedByTrend ugc_query_FavoritedByFriendsRankedByPublicationDate ugc_query_CreatedByFriendsRankedByPublicationDate ugc_query_RankedByNumTimesReported ugc_query_CreatedByFollowedUsersRankedByPublicationDate ugc_query_NotYetRated ugc_query_RankedByTotalVotesAsc ugc_query_RankedByVotesUp ugc_query_RankedByTextSearch ugc_sortorder_CreationOrderDesc ugc_sortorder_CreationOrderAsc ugc_sortorder_TitleAsc ugc_sortorder_LastUpdatedDesc ugc_sortorder_SubscriptionDateDesc ugc_sortorder_VoteScoreDesc ugc_sortorder_ForModeration ugc_list_Published ugc_list_VotedOn ugc_list_VotedUp ugc_list_VotedDown ugc_list_WillVoteLater ugc_list_Favorited ugc_list_Subscribed ugc_list_UsedOrPlayed ugc_list_Followed ugc_match_Items ugc_match_Items_Mtx ugc_match_Items_ReadyToUse ugc_match_Collections ugc_match_Artwork ugc_match_Videos ugc_match_Screenshots ugc_match_AllGuides ugc_match_WebGuides ugc_match_IntegratedGuides ugc_match_UsableInGame ugc_match_ControllerBindings vertex_usage_position vertex_usage_colour vertex_usage_color vertex_usage_normal vertex_usage_texcoord vertex_usage_textcoord vertex_usage_blendweight vertex_usage_blendindices vertex_usage_psize vertex_usage_tangent vertex_usage_binormal vertex_usage_fog vertex_usage_depth vertex_usage_sample vertex_type_float1 vertex_type_float2 vertex_type_float3 vertex_type_float4 vertex_type_colour vertex_type_color vertex_type_ubyte4 layerelementtype_undefined layerelementtype_background layerelementtype_instance layerelementtype_oldtilemap layerelementtype_sprite layerelementtype_tilemap layerelementtype_particlesystem layerelementtype_tile tile_rotate tile_flip tile_mirror tile_index_mask kbv_type_default kbv_type_ascii kbv_type_url kbv_type_email kbv_type_numbers kbv_type_phone kbv_type_phone_name kbv_returnkey_default kbv_returnkey_go kbv_returnkey_google kbv_returnkey_join kbv_returnkey_next kbv_returnkey_route kbv_returnkey_search kbv_returnkey_send kbv_returnkey_yahoo kbv_returnkey_done kbv_returnkey_continue kbv_returnkey_emergency kbv_autocapitalize_none kbv_autocapitalize_words kbv_autocapitalize_sentences kbv_autocapitalize_characters",symbol:"argument_relative argument argument0 argument1 argument2 argument3 argument4 argument5 argument6 argument7 argument8 argument9 argument10 argument11 argument12 argument13 argument14 argument15 argument_count x y xprevious yprevious xstart ystart hspeed vspeed direction speed friction gravity gravity_direction path_index path_position path_positionprevious path_speed path_scale path_orientation path_endaction object_index id solid persistent mask_index instance_count instance_id room_speed fps fps_real current_time current_year current_month current_day current_weekday current_hour current_minute current_second alarm timeline_index timeline_position timeline_speed timeline_running timeline_loop room room_first room_last room_width room_height room_caption room_persistent score lives health show_score show_lives show_health caption_score caption_lives caption_health event_type event_number event_object event_action application_surface gamemaker_pro gamemaker_registered gamemaker_version error_occurred error_last debug_mode keyboard_key keyboard_lastkey keyboard_lastchar keyboard_string mouse_x mouse_y mouse_button mouse_lastbutton cursor_sprite visible sprite_index sprite_width sprite_height sprite_xoffset sprite_yoffset image_number image_index image_speed depth image_xscale image_yscale image_angle image_alpha image_blend bbox_left bbox_right bbox_top bbox_bottom layer background_colour background_showcolour background_color background_showcolor view_enabled view_current view_visible view_xview view_yview view_wview view_hview view_xport view_yport view_wport view_hport view_angle view_hborder view_vborder view_hspeed view_vspeed view_object view_surface_id view_camera game_id game_display_name game_project_name game_save_id working_directory temp_directory program_directory browser_width browser_height os_type os_device os_browser os_version display_aa async_load delta_time webgl_enabled event_data iap_data phy_rotation phy_position_x phy_position_y phy_angular_velocity phy_linear_velocity_x phy_linear_velocity_y phy_speed_x phy_speed_y phy_speed phy_angular_damping phy_linear_damping phy_bullet phy_fixed_rotation phy_active phy_mass phy_inertia phy_com_x phy_com_y phy_dynamic phy_kinematic phy_sleeping phy_collision_points phy_collision_x phy_collision_y phy_col_normal_x phy_col_normal_y phy_position_xprevious phy_position_yprevious"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}},function(e,t){e.exports=function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{name:"Go",aliases:["golang"],keywords:t,illegal:"1&&void 0!==arguments[1]?arguments[1]:{};return t.variants=e,t}e.exports=function(e){var t="[A-Za-z0-9_$]+",n=i([e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]})]),a={className:"regexp",begin:/~?\/[^\/\n]+\//,contains:[e.BACKSLASH_ESCAPE]},o=i([e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]),s=i([{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:"\\$/",end:"/\\$",relevance:10},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE],{className:"string"});return{name:"Groovy",keywords:{built_in:"this super",literal:"true false null",keyword:"byte short char int long boolean float double void def as in assert trait abstract static volatile transient public private protected synchronized final class interface enum if else for while switch case break default continue throw throws try catch finally implements extends new import package return instanceof"},contains:[e.SHEBANG({binary:"groovy",relevance:10}),n,s,a,o,{className:"class",beginKeywords:"class interface trait enum",end:/\{/,illegal:":",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{className:"meta",begin:"@[A-Za-z]+",relevance:0},{className:"attr",begin:t+"[ \t]*:"},{begin:/\?/,end:/:/,relevance:0,contains:[n,s,a,o,"self"]},{className:"symbol",begin:"^[ \t]*"+r(t+":"),excludeBegin:!0,end:t+":",relevance:0}],illegal:/#|<\//}}},function(e,t){e.exports=function(e){return{name:"HAML",case_insensitive:!0,contains:[{className:"meta",begin:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",relevance:10},e.COMMENT("^\\s*(!=#|=#|-#|/).*$",!1,{relevance:0}),{begin:"^\\s*(-|=|!=)(?!#)",starts:{end:"\\n",subLanguage:"ruby"}},{className:"tag",begin:"^\\s*%",contains:[{className:"selector-tag",begin:"\\w+"},{className:"selector-id",begin:"#[\\w-]+"},{className:"selector-class",begin:"\\.[\\w-]+"},{begin:/\{\s*/,end:/\s*\}/,contains:[{begin:":\\w+\\s*=>",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:":\\w+"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:"\\w+",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:/#\{/,starts:{end:/\}/,subLanguage:"ruby"}}]}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r@\[\\\]^`{|}~]+/,s=function(){for(var e=arguments.length,t=new Array(e),r=0;r|<-"}]}}},function(e,t){e.exports=function(e){return{name:"Haxe",aliases:["hx"],keywords:{keyword:"break case cast catch continue default do dynamic else enum extern for function here if import in inline never new override package private get set public return static super switch this throw trace try typedef untyped using var while Int Float String Bool Dynamic Void Array ",built_in:"trace this",literal:"true false null _"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"},{className:"subst",begin:"\\$",end:/\W\}/}]},e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"@:",end:"$"},{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elseif end error"}},{className:"type",begin:":[ \t]*",end:"[^A-Za-z0-9_ \t\\->]",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:":[ \t]*",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"new *",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"class",beginKeywords:"enum",end:"\\{",contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"abstract",end:"[\\{$]",contains:[{className:"type",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"from +",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"to +",end:"\\W",excludeBegin:!0,excludeEnd:!0},e.TITLE_MODE],keywords:{keyword:"abstract from to"}},{className:"class",begin:"\\b(class|interface) +",end:"[\\{$]",excludeEnd:!0,keywords:"class interface",contains:[{className:"keyword",begin:"\\b(extends|implements) +",keywords:"extends implements",contains:[{className:"type",begin:e.IDENT_RE,relevance:0}]},e.TITLE_MODE]},{className:"function",beginKeywords:"function",end:"\\(",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE]}],illegal:/<\//}}},function(e,t){e.exports=function(e){return{name:"HSP",case_insensitive:!0,keywords:{$pattern:/[\w._]+/,keyword:"goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",begin:/\{"/,end:/"\}/,contains:[e.BACKSLASH_ESCAPE]},e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib"},contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),e.NUMBER_MODE,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"symbol",begin:"^\\*(\\w+|@)"},e.NUMBER_MODE,e.C_NUMBER_MODE]}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r@\[\\\]^`{|}~]+/,s=function(){for(var e=arguments.length,t=new Array(e),r=0;r >= >> >>= @ @= ^ ^= abs accumulate all and any ap-compose ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast callable calling-module-name car case cdr chain chr coll? combinations compile compress cond cons cons? continue count curry cut cycle dec def default-method defclass defmacro defmacro-alias defmacro/g! defmain defmethod defmulti defn defn-alias defnc defnr defreader defseq del delattr delete-route dict-comp dir disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first flatten float? fn fnc fnr for for* format fraction genexpr gensym get getattr global globals group-by hasattr hash hex id identity if if* if-not if-python2 import in inc input instance? integer integer-char? integer? interleave interpose is is-coll is-cons is-empty is-even is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass iter iterable? iterate iterator? keyword keyword? lambda last len let lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all map max merge-with method-decorator min multi-decorator multicombinations name neg? next none? nonlocal not not-in not? nth numeric? oct odd? open or ord partition permutations pos? post-route postwalk pow prewalk print product profile/calls profile/cpu put-route quasiquote quote raise range read read-str recursive-replace reduce remove repeat repeatedly repr require rest round route route-with-methods rwm second seq set-comp setattr setv some sorted string string? sum switch symbol? take take-nth take-while tee try unless unquote unquote-splicing vars walk when while with with* with-decorator with-gensyms xi xor yield yield-from zero? zip zip-longest | |= ~"},i={begin:n,relevance:0},a={className:"number",begin:"[-+]?\\d+(\\.\\d+)?",relevance:0},o=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),s=e.COMMENT(";","$",{relevance:0}),u={className:"literal",begin:/\b([Tt]rue|[Ff]alse|nil|None)\b/},c={begin:"[\\[\\{]",end:"[\\]\\}]"},l={className:"comment",begin:"\\^"+n},d=e.COMMENT("\\^\\{","\\}"),p={className:"symbol",begin:"[:]{1,2}"+n},f={begin:"\\(",end:"\\)"},h={endsWithParent:!0,relevance:0},g={className:"name",relevance:0,keywords:r,begin:n,starts:h},m=[f,o,l,d,s,p,c,a,u,i];return f.contains=[e.COMMENT("comment",""),g,h],h.contains=m,c.contains=m,{name:"Hy",aliases:["hylang"],illegal:/\S/,contains:[e.SHEBANG(),f,o,l,d,s,p,c,a,u]}}},function(e,t){e.exports=function(e){return{name:"Inform 7",aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:"\\[",end:"\\]"}]},{className:"section",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\(This",end:"\\)"}]},{className:"comment",begin:"\\[",end:"\\]",contains:["self"]}]}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:n,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:n,relevance:0,contains:[r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i,r]}}},function(e,t){var n="[A-Za-z$_][0-9A-Za-z$_]*",r=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],i=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function o(e){return e?"string"===typeof e?e:e.source:null}function s(e){return u("(?=",e,")")}function u(){for(var e=arguments.length,t=new Array(e),n=0;n",c="",l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:function(e,t){var n=e[0].length+e.index,r=e.input[n];"<"!==r?">"===r&&(function(e,t){var n=t.after,r="",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:C}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:o,end:c},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:d,contains:["self",e.inherit(e.TITLE_MODE,{begin:t}),S],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[S,e.inherit(e.TITLE_MODE,{begin:t})]},{variants:[{begin:"\\."+t},{begin:"\\$"+t}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:t}),"self",S]},{begin:"(get|set)\\s+(?="+t+"\\()",end:/\{/,keywords:"get set",contains:[e.inherit(e.TITLE_MODE,{begin:t}),{begin:/\(\)/},S]},{begin:/\$[(.]/}]}}},function(e,t){e.exports=function(e){var t={className:"params",begin:/\(/,end:/\)/,contains:[{begin:/[\w-]+ *=/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/[\w-]+/}]}],relevance:0};return{name:"JBoss CLI",aliases:["wildfly-cli"],keywords:{$pattern:"[a-z-]+",keyword:"alias batch cd clear command connect connection-factory connection-info data-source deploy deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias undeploy unset version xa-data-source",literal:"true false"},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"params",begin:/--[\w\-=\/]+/},{className:"function",begin:/:[\w\-.]+/,relevance:0},{className:"string",begin:/\B([\/.])[\w\-.\/=]+/},t]}}},function(e,t){e.exports=function(e){var t={literal:"true false null"},n=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],r=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],i={end:",",endsWithParent:!0,excludeEnd:!0,contains:r,keywords:t},a={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(i,{begin:/:/})].concat(n),illegal:"\\S"},o={begin:"\\[",end:"\\]",contains:[e.inherit(i)],illegal:"\\S"};return r.push(a,o),n.forEach((function(e){r.push(e)})),{name:"JSON",contains:r,keywords:t,illegal:"\\S"}}},function(e,t){e.exports=function(e){var t="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",n={$pattern:t,keyword:["baremodule","begin","break","catch","ccall","const","continue","do","else","elseif","end","export","false","finally","for","function","global","if","import","in","isa","let","local","macro","module","quote","return","true","try","using","where","while"].join(" "),literal:["ARGS","C_NULL","DEPOT_PATH","ENDIAN_BOM","ENV","Inf","Inf16","Inf32","Inf64","InsertionSort","LOAD_PATH","MergeSort","NaN","NaN16","NaN32","NaN64","PROGRAM_FILE","QuickSort","RoundDown","RoundFromZero","RoundNearest","RoundNearestTiesAway","RoundNearestTiesUp","RoundToZero","RoundUp","VERSION|0","devnull","false","im","missing","nothing","pi","stderr","stdin","stdout","true","undef","\u03c0","\u212f"].join(" "),built_in:["AbstractArray","AbstractChannel","AbstractChar","AbstractDict","AbstractDisplay","AbstractFloat","AbstractIrrational","AbstractMatrix","AbstractRange","AbstractSet","AbstractString","AbstractUnitRange","AbstractVecOrMat","AbstractVector","Any","ArgumentError","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError","LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","ProcessFailedException","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","TaskFailedException","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","UndefKeywordError","UndefRefError","UndefVarError","Union","UnionAll","UnitRange","Unsigned","Val","Vararg","VecElement","VecOrMat","Vector","VersionNumber","WeakKeyDict","WeakRef"].join(" ")},r={keywords:n,illegal:/<\//},i={className:"subst",begin:/\$\(/,end:/\)/,keywords:n},a={className:"variable",begin:"\\$"+t},o={className:"string",contains:[e.BACKSLASH_ESCAPE,i,a],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},s={className:"string",contains:[e.BACKSLASH_ESCAPE,i,a],begin:"`",end:"`"},u={className:"meta",begin:"@"+t};return r.name="Julia",r.contains=[{className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},{className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},o,s,u,{className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]},e.HASH_COMMENT_MODE,{className:"keyword",begin:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{begin:/<:/}],i.contains=r.contains,r}},function(e,t){e.exports=function(e){return{name:"Julia REPL",contains:[{className:"meta",begin:/^julia>/,relevance:10,starts:{end:/^(?![ ]{6})/,subLanguage:"julia"},aliases:["jldoctest"]}]}}},function(e,t){var n="[0-9](_*[0-9])*",r="\\.(".concat(n,")"),i="[0-9a-fA-F](_*[0-9a-fA-F])*",a={className:"number",variants:[{begin:"(\\b(".concat(n,")((").concat(r,")|\\.)?|(").concat(r,"))")+"[eE][+-]?(".concat(n,")[fFdD]?\\b")},{begin:"\\b(".concat(n,")((").concat(r,")[fFdD]?\\b|\\.([fFdD]\\b)?)")},{begin:"(".concat(r,")[fFdD]?\\b")},{begin:"\\b(".concat(n,")[fFdD]\\b")},{begin:"\\b0[xX]((".concat(i,")\\.?|(").concat(i,")?\\.(").concat(i,"))")+"[pP][+-]?(".concat(n,")[fFdD]?\\b")},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:"\\b0[xX](".concat(i,")[lL]?\\b")},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};e.exports=function(e){var t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[i,r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,r]}]};r.contains.push(o);var s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},u={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"meta-string"})]}]},c=a,l=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},p=d;return p.variants[1].contains=[d],d.variants[1].contains=[p],{name:"Kotlin",aliases:["kt"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,l,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,s,u,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,l],relevance:0},e.C_LINE_COMMENT_MODE,l,s,u,o,e.C_NUMBER_MODE]},l]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},s,u]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},c]}}},function(e,t){e.exports=function(e){var t="[a-zA-Z_][\\w.]*",n="<\\?(lasso(script)?|=)",r="\\]|\\?>",i={$pattern:"[a-zA-Z_][\\w.]*|&[lg]t;",literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},a=e.COMMENT("\x3c!--","--\x3e",{relevance:0}),o={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[a]}},s={className:"meta",begin:"\\[/noprocess|"+n},u={className:"symbol",begin:"'[a-zA-Z_][\\w.]*'"},c=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(e.C_NUMBER_MODE,{begin:e.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$][a-zA-Z_][\\w.]*"},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"type",begin:"::\\s*",end:t,illegal:"\\W"},{className:"params",variants:[{begin:"-(?!infinity)[a-zA-Z_][\\w.]*",relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[u]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z_][\\w.]*(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:i,contains:[{className:"meta",begin:r,relevance:0,starts:{end:"\\[|"+n,returnEnd:!0,relevance:0,contains:[a]}},o,s,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",keywords:i,contains:[{className:"meta",begin:r,relevance:0,starts:{end:"\\[noprocess\\]|"+n,returnEnd:!0,contains:[a]}},o,s].concat(c)}},{className:"meta",begin:"\\[",relevance:0},{className:"meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(c)}}},function(e,t,n){var r=n(156);function i(e){return e?"string"===typeof e?e:e.source:null}function a(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:"string";return e.END_SAME_AS_BEGIN({className:t,begin:/(.|\r?\n)/,end:/(.|\r?\n)/,excludeBegin:!0,excludeEnd:!0,endsParent:!0})},m=function(e){return{className:"string",end:"(?=\\\\end\\{"+e+"\\})"}},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"string";return{relevance:0,begin:/\{/,starts:{endsParent:!0,contains:[{className:e,end:/(?=\})/,endsParent:!0,contains:[{begin:/\{/,end:/\}/,relevance:0,contains:["self"]}]}]}}},v=[].concat(r(["verb","lstinline"].map((function(e){return f(e,{contains:[g()]})}))),[f("mint",p(l,{contains:[g()]})),f("mintinline",p(l,{contains:[_(),g()]})),f("url",{contains:[_("link"),_("link")]}),f("hyperref",{contains:[_("link")]}),f("href",p(d,{contains:[_("link")]}))],r((t=[]).concat.apply(t,r(["","\\*"].map((function(e){return[h("verbatim"+e,m("verbatim"+e)),h("filecontents"+e,p(l,m("filecontents"+e)))].concat(r(["","B","L"].map((function(t){return h(t+"Verbatim"+e,p(d,m(t+"Verbatim"+e)))}))))}))))),[h("minted",p(d,p(l,m("minted"))))]);return{name:"LaTeX",aliases:["TeX"],contains:[].concat(r(v),i)}}},function(e,t){e.exports=function(e){return{name:"LDIF",contains:[{className:"attribute",begin:"^dn",end:": ",excludeEnd:!0,starts:{end:"$",relevance:0},relevance:10},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,starts:{end:"$",relevance:0}},{className:"literal",begin:"^-",end:"$"},e.HASH_COMMENT_MODE]}}},function(e,t){e.exports=function(e){return{name:"Leaf",contains:[{className:"function",begin:"#+[A-Za-z_0-9]*\\(",end:/ \{/,returnBegin:!0,excludeEnd:!0,contains:[{className:"keyword",begin:"#+"},{className:"title",begin:"[A-Za-z_][A-Za-z_0-9]*"},{className:"params",begin:"\\(",end:"\\)",endsParent:!0,contains:[{className:"string",begin:'"',end:'"'},{className:"variable",begin:"[A-Za-z_][A-Za-z_0-9]*"}]}]}]}}},function(e,t){e.exports=function(e){var t="([\\w-]+|@\\{[\\w-]+\\})",n=[],r=[],i=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},a=function(e,t,n){return{className:e,begin:t,relevance:n}},o={begin:"\\(",end:"\\)",contains:r,relevance:0};r.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i("'"),i('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},a("number","#[0-9A-Fa-f]+\\b"),o,a("variable","@@?[\\w-]+",10),a("variable","@\\{[\\w-]+\\}"),a("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"});var s=r.concat({begin:/\{/,end:/\}/,contains:n}),u={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(r)},c={begin:t+"\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:t,end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:r}}]},l={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:r,relevance:0}},d={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:s}},p={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:t,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,u,a("keyword","all\\b"),a("variable","@\\{[\\w-]+\\}"),a("selector-tag",t+"%?",0),a("selector-id","#"+t),a("selector-class","\\."+t,0),a("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9_\-+()"'.]+/},{begin:"\\(",end:"\\)",contains:s},{begin:"!important"}]};return n.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l,d,c,p),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:n}}},function(e,t){e.exports=function(e){var t="[a-zA-Z_\\-+\\*\\/<=>&#][a-zA-Z0-9_\\-+*\\/<=>&#!]*",n="\\|[^]*?\\|",r="(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|-)?\\d+)?",i={className:"literal",begin:"\\b(t{1}|nil)\\b"},a={className:"number",variants:[{begin:r,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+r+" +"+r,end:"\\)"}]},o=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),s=e.COMMENT(";","$",{relevance:0}),u={begin:"\\*",end:"\\*"},c={className:"symbol",begin:"[:&]"+t},l={begin:t,relevance:0},d={begin:n},p={contains:[a,o,u,c,{begin:"\\(",end:"\\)",contains:["self",i,o,a,l]},l],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{name:"quote"}},{begin:"'"+n}]},f={variants:[{begin:"'"+t},{begin:"#'"+t+"(::"+t+")*"}]},h={begin:"\\(\\s*",end:"\\)"},g={endsWithParent:!0,relevance:0};return h.contains=[{className:"name",variants:[{begin:t,relevance:0},{begin:n}]},g],g.contains=[p,f,h,i,a,o,s,u,c,d,l],{name:"Lisp",illegal:/\S/,contains:[a,e.SHEBANG(),i,o,s,p,f,h,l]}}},function(e,t){e.exports=function(e){var t={className:"variable",variants:[{begin:"\\b([gtps][A-Z]{1}[a-zA-Z0-9]*)(\\[.+\\])?(?:\\s*?)"},{begin:"\\$_[A-Z]+"}],relevance:0},n=[e.C_BLOCK_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("--","$"),e.COMMENT("[^:]//","$")],r=e.inherit(e.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z][A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),i=e.inherit(e.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{name:"LiveCode",case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",literal:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress difference directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge messageAuthenticationCode messageDigest millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetDriver libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load extension loadedExtensions multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract symmetric union unload vectorDotProduct wait write"},contains:[t,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[t,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[i,r],relevance:0},{beginKeywords:"command on",end:"$",contains:[t,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r]},{className:"meta",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r].concat(n),illegal:";$|^\\[|^=|&|\\{"}}},function(e,t){var n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],r=["true","false","null","undefined","NaN","Infinity"],i=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);e.exports=function(e){var t={keyword:n.concat(["then","unless","until","loop","of","by","when","and","or","is","isnt","not","it","that","otherwise","from","to","til","fallthrough","case","enum","native","list","map","__hasProp","__extends","__slice","__bind","__indexOf"]).join(" "),literal:r.concat(["yes","no","on","off","it","that","void"]).join(" "),built_in:i.concat(["npm","print"]).join(" ")},a="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",o=e.inherit(e.TITLE_MODE,{begin:a}),s={className:"subst",begin:/#\{/,end:/\}/,keywords:t},u={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:t},c=[e.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s,u]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,u]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"regexp",variants:[{begin:"//",end:"//[gim]*",contains:[s,e.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/}]},{begin:"@"+a},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];s.contains=c;var l={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(c)}]};return{name:"LiveScript",aliases:["ls"],keywords:t,illegal:/\/\*/,contains:c.concat([e.COMMENT("\\/\\*","\\*\\/"),e.HASH_COMMENT_MODE,{begin:"(#=>|=>|\\|>>|-?->|!->)"},{className:"function",contains:[o,l],returnBegin:!0,variants:[{begin:"("+a+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B->\\*?",end:"->\\*?"},{begin:"("+a+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\)\\s*)?\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+a+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[o]},o]},{begin:a+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}},function(e,t){function n(e){return e?"string"===typeof e?e:e.source:null}function r(){for(var e=arguments.length,t=new Array(e),r=0;r
    "):i},e}(),M=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n":""},e}(),j=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e},t.toMarkup=function(){var e="","\\gt",!0),$(Q,Z,ce,"\u2208","\\in",!0),$(Q,Z,ce,"\ue020","\\@not"),$(Q,Z,ce,"\u2282","\\subset",!0),$(Q,Z,ce,"\u2283","\\supset",!0),$(Q,Z,ce,"\u2286","\\subseteq",!0),$(Q,Z,ce,"\u2287","\\supseteq",!0),$(Q,ee,ce,"\u2288","\\nsubseteq",!0),$(Q,ee,ce,"\u2289","\\nsupseteq",!0),$(Q,Z,ce,"\u22a8","\\models"),$(Q,Z,ce,"\u2190","\\leftarrow",!0),$(Q,Z,ce,"\u2264","\\le"),$(Q,Z,ce,"\u2264","\\leq",!0),$(Q,Z,ce,"<","\\lt",!0),$(Q,Z,ce,"\u2192","\\rightarrow",!0),$(Q,Z,ce,"\u2192","\\to"),$(Q,ee,ce,"\u2271","\\ngeq",!0),$(Q,ee,ce,"\u2270","\\nleq",!0),$(Q,Z,le,"\xa0","\\ "),$(Q,Z,le,"\xa0","~"),$(Q,Z,le,"\xa0","\\space"),$(Q,Z,le,"\xa0","\\nobreakspace"),$(X,Z,le,"\xa0","\\ "),$(X,Z,le,"\xa0"," "),$(X,Z,le,"\xa0","~"),$(X,Z,le,"\xa0","\\space"),$(X,Z,le,"\xa0","\\nobreakspace"),$(Q,Z,le,null,"\\nobreak"),$(Q,Z,le,null,"\\allowbreak"),$(Q,Z,ue,",",","),$(Q,Z,ue,";",";"),$(Q,ee,ne,"\u22bc","\\barwedge",!0),$(Q,ee,ne,"\u22bb","\\veebar",!0),$(Q,Z,ne,"\u2299","\\odot",!0),$(Q,Z,ne,"\u2295","\\oplus",!0),$(Q,Z,ne,"\u2297","\\otimes",!0),$(Q,Z,de,"\u2202","\\partial",!0),$(Q,Z,ne,"\u2298","\\oslash",!0),$(Q,ee,ne,"\u229a","\\circledcirc",!0),$(Q,ee,ne,"\u22a1","\\boxdot",!0),$(Q,Z,ne,"\u25b3","\\bigtriangleup"),$(Q,Z,ne,"\u25bd","\\bigtriangledown"),$(Q,Z,ne,"\u2020","\\dagger"),$(Q,Z,ne,"\u22c4","\\diamond"),$(Q,Z,ne,"\u22c6","\\star"),$(Q,Z,ne,"\u25c3","\\triangleleft"),$(Q,Z,ne,"\u25b9","\\triangleright"),$(Q,Z,se,"{","\\{"),$(X,Z,de,"{","\\{"),$(X,Z,de,"{","\\textbraceleft"),$(Q,Z,re,"}","\\}"),$(X,Z,de,"}","\\}"),$(X,Z,de,"}","\\textbraceright"),$(Q,Z,se,"{","\\lbrace"),$(Q,Z,re,"}","\\rbrace"),$(Q,Z,se,"[","\\lbrack",!0),$(X,Z,de,"[","\\lbrack",!0),$(Q,Z,re,"]","\\rbrack",!0),$(X,Z,de,"]","\\rbrack",!0),$(Q,Z,se,"(","\\lparen",!0),$(Q,Z,re,")","\\rparen",!0),$(X,Z,de,"<","\\textless",!0),$(X,Z,de,">","\\textgreater",!0),$(Q,Z,se,"\u230a","\\lfloor",!0),$(Q,Z,re,"\u230b","\\rfloor",!0),$(Q,Z,se,"\u2308","\\lceil",!0),$(Q,Z,re,"\u2309","\\rceil",!0),$(Q,Z,de,"\\","\\backslash"),$(Q,Z,de,"\u2223","|"),$(Q,Z,de,"\u2223","\\vert"),$(X,Z,de,"|","\\textbar",!0),$(Q,Z,de,"\u2225","\\|"),$(Q,Z,de,"\u2225","\\Vert"),$(X,Z,de,"\u2225","\\textbardbl"),$(X,Z,de,"~","\\textasciitilde"),$(X,Z,de,"\\","\\textbackslash"),$(X,Z,de,"^","\\textasciicircum"),$(Q,Z,ce,"\u2191","\\uparrow",!0),$(Q,Z,ce,"\u21d1","\\Uparrow",!0),$(Q,Z,ce,"\u2193","\\downarrow",!0),$(Q,Z,ce,"\u21d3","\\Downarrow",!0),$(Q,Z,ce,"\u2195","\\updownarrow",!0),$(Q,Z,ce,"\u21d5","\\Updownarrow",!0),$(Q,Z,oe,"\u2210","\\coprod"),$(Q,Z,oe,"\u22c1","\\bigvee"),$(Q,Z,oe,"\u22c0","\\bigwedge"),$(Q,Z,oe,"\u2a04","\\biguplus"),$(Q,Z,oe,"\u22c2","\\bigcap"),$(Q,Z,oe,"\u22c3","\\bigcup"),$(Q,Z,oe,"\u222b","\\int"),$(Q,Z,oe,"\u222b","\\intop"),$(Q,Z,oe,"\u222c","\\iint"),$(Q,Z,oe,"\u222d","\\iiint"),$(Q,Z,oe,"\u220f","\\prod"),$(Q,Z,oe,"\u2211","\\sum"),$(Q,Z,oe,"\u2a02","\\bigotimes"),$(Q,Z,oe,"\u2a01","\\bigoplus"),$(Q,Z,oe,"\u2a00","\\bigodot"),$(Q,Z,oe,"\u222e","\\oint"),$(Q,Z,oe,"\u2a06","\\bigsqcup"),$(Q,Z,oe,"\u222b","\\smallint"),$(X,Z,ie,"\u2026","\\textellipsis"),$(Q,Z,ie,"\u2026","\\mathellipsis"),$(X,Z,ie,"\u2026","\\ldots",!0),$(Q,Z,ie,"\u2026","\\ldots",!0),$(Q,Z,ie,"\u22ef","\\@cdots",!0),$(Q,Z,ie,"\u22f1","\\ddots",!0),$(Q,Z,de,"\u22ee","\\varvdots"),$(Q,Z,te,"\u02ca","\\acute"),$(Q,Z,te,"\u02cb","\\grave"),$(Q,Z,te,"\xa8","\\ddot"),$(Q,Z,te,"~","\\tilde"),$(Q,Z,te,"\u02c9","\\bar"),$(Q,Z,te,"\u02d8","\\breve"),$(Q,Z,te,"\u02c7","\\check"),$(Q,Z,te,"^","\\hat"),$(Q,Z,te,"\u20d7","\\vec"),$(Q,Z,te,"\u02d9","\\dot"),$(Q,Z,te,"\u02da","\\mathring"),$(Q,Z,ae,"\ue131","\\@imath"),$(Q,Z,ae,"\ue237","\\@jmath"),$(Q,Z,de,"\u0131","\u0131"),$(Q,Z,de,"\u0237","\u0237"),$(X,Z,de,"\u0131","\\i",!0),$(X,Z,de,"\u0237","\\j",!0),$(X,Z,de,"\xdf","\\ss",!0),$(X,Z,de,"\xe6","\\ae",!0),$(X,Z,de,"\u0153","\\oe",!0),$(X,Z,de,"\xf8","\\o",!0),$(X,Z,de,"\xc6","\\AE",!0),$(X,Z,de,"\u0152","\\OE",!0),$(X,Z,de,"\xd8","\\O",!0),$(X,Z,te,"\u02ca","\\'"),$(X,Z,te,"\u02cb","\\`"),$(X,Z,te,"\u02c6","\\^"),$(X,Z,te,"\u02dc","\\~"),$(X,Z,te,"\u02c9","\\="),$(X,Z,te,"\u02d8","\\u"),$(X,Z,te,"\u02d9","\\."),$(X,Z,te,"\u02da","\\r"),$(X,Z,te,"\u02c7","\\v"),$(X,Z,te,"\xa8",'\\"'),$(X,Z,te,"\u02dd","\\H"),$(X,Z,te,"\u25ef","\\textcircled");var pe={"--":!0,"---":!0,"``":!0,"''":!0};$(X,Z,de,"\u2013","--",!0),$(X,Z,de,"\u2013","\\textendash"),$(X,Z,de,"\u2014","---",!0),$(X,Z,de,"\u2014","\\textemdash"),$(X,Z,de,"\u2018","`",!0),$(X,Z,de,"\u2018","\\textquoteleft"),$(X,Z,de,"\u2019","'",!0),$(X,Z,de,"\u2019","\\textquoteright"),$(X,Z,de,"\u201c","``",!0),$(X,Z,de,"\u201c","\\textquotedblleft"),$(X,Z,de,"\u201d","''",!0),$(X,Z,de,"\u201d","\\textquotedblright"),$(Q,Z,de,"\xb0","\\degree",!0),$(X,Z,de,"\xb0","\\degree"),$(X,Z,de,"\xb0","\\textdegree",!0),$(Q,Z,de,"\xa3","\\pounds"),$(Q,Z,de,"\xa3","\\mathsterling",!0),$(X,Z,de,"\xa3","\\pounds"),$(X,Z,de,"\xa3","\\textsterling",!0),$(Q,ee,de,"\u2720","\\maltese"),$(X,ee,de,"\u2720","\\maltese");for(var fe='0123456789/@."',he=0;he=5?0:e>=3?1:2]){var n=K[t]={cssEmPerMu:z.quad[t]/18};for(var r in z)z.hasOwnProperty(r)&&(n[r]=z[r][t])}return K[t]}(this.size)),this._fontMetrics},t.getColor=function(){return this.phantom?"transparent":this.color},e}();Pe.BASESIZE=6;var Re=Pe,Me={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Be={ex:!0,em:!0,mu:!0},je=function(e){return"string"!==typeof e&&(e=e.unit),e in Me||e in Be||"ex"===e},Ue=function(e,t){var n;if(e.unit in Me)n=Me[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new o("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},Ve=function(e,t,n){return J[n][e]&&J[n][e].replace&&(e=J[n][e].replace),{value:e,metrics:W(e,t,n)}},ze=function(e,t,n,r,i){var a,o=Ve(e,t,n),s=o.metrics;if(e=o.value,s){var u=s.italic;("text"===n||r&&"mathit"===r.font)&&(u=0),a=new R(e,s.height,s.depth,u,s.skew,s.width,i)}else"undefined"!==typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),a=new R(e,0,0,0,0,0,i);if(r){a.maxFontSize=r.sizeMultiplier,r.style.isTight()&&a.classes.push("mtight");var c=r.getColor();c&&(a.style.color=c)}return a},He=function(e,t){if(w(e.classes)!==w(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var r in t.style)if(t.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;return!0},We=function(e){for(var t=0,n=0,r=0,i=0;it&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Ke=function(e,t,n,r){var i=new I(e,t,n,r);return We(i),i},qe=function(e,t,n,r){return new I(e,t,n,r)},Ge=function(e){var t=new T(e);return We(t),t},Ye=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Je={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},$e={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659],leftParenInner:["leftParenInner",.875,.3],rightParenInner:["rightParenInner",.875,.3]},Qe={fontMap:Je,makeSymbol:ze,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&Ve(e,"Main-Bold",t).metrics?ze(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===J[t][e].font?ze(e,"Main-Regular",t,n,r):ze(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:Ke,makeSvgSpan:qe,makeLineSpan:function(e,t,n){var r=Ke([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=r.height+"em",r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){var i=new F(e,t,n,r);return We(i),i},makeFragment:Ge,wrapFragment:function(e,t){return e instanceof T?Ke([],[e],t):e},makeVList:function(e,t){for(var n=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a0&&(a.push(Dt(o,t)),o=[]),a.push(i[s]));o.length>0&&a.push(Dt(o,t)),n&&((r=Dt(ht(n,t,!0))).classes=["tag"],a.push(r));var c=ct(["katex-html"],a);if(c.setAttribute("aria-hidden","true"),r){var l=r.children[0];l.style.height=c.height+c.depth+"em",l.style.verticalAlign=-c.depth+"em"}return c}function Ct(e){return new T(e)}var St=function(){function e(e,t){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=e,this.attributes={},this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.getAttribute=function(e){return this.attributes[e]},t.toNode=function(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n"},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),xt=function(){function e(e){this.text=void 0,this.text=e}var t=e.prototype;return t.toNode=function(){return document.createTextNode(this.text)},t.toMarkup=function(){return d.escape(this.toText())},t.toText=function(){return this.text},e}(),kt={MathNode:St,TextNode:xt,SpaceNode:function(){function e(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}var t=e.prototype;return t.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",this.width+"em"),e},t.toMarkup=function(){return this.character?""+this.character+"":''},t.toText=function(){return this.character?this.character:" "},e}(),newDocumentFragment:Ct},Tt=function(e,t,n){return!J[t][e]||!J[t][e].replace||55349===e.charCodeAt(0)||pe.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.substr(4,2)||n.font&&"tt"===n.font.substr(4,2))||(e=J[t][e].replace),new kt.TextNode(e)},wt=function(e){return 1===e.length?e[0]:new kt.MathNode("mrow",e)},At=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var i=e.text;return d.contains(["\\imath","\\jmath"],i)?null:(J[r][i]&&J[r][i].replace&&(i=J[r][i].replace),W(i,Qe.fontMap[n].fontName,r)?Qe.fontMap[n].variant:null)},Ot=function(e,t,n){if(1===e.length){var r=It(e[0],t);return n&&r instanceof St&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var i,a=[],o=0;o0&&(f.text=f.text.slice(0,1)+"\u0338"+f.text.slice(1),a.pop())}}}a.push(s),i=s}return a},Nt=function(e,t,n){return wt(Ot(e,t,n))},It=function(e,t){if(!e)return new kt.MathNode("mrow");if(at[e.type])return at[e.type](e,t);throw new o("Got group of unknown type: '"+e.type+"'")};function Ft(e,t,n,r,i){var a,o=Ot(e,n);a=1===o.length&&o[0]instanceof St&&d.contains(["mrow","mtable"],o[0].type)?o[0]:new kt.MathNode("mrow",o);var s=new kt.MathNode("annotation",[new kt.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var u=new kt.MathNode("semantics",[a,s]),c=new kt.MathNode("math",[u]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var l=i?"katex":"katex-mathml";return Qe.makeSpan([l],[c])}var Lt=function(e){return new Re({style:e.displayMode?D.DISPLAY:D.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Pt=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=Qe.makeSpan(n,[e])}return e},Rt=function(e,t,n){var r,i=Lt(n);if("mathml"===n.output)return Ft(e,t,i,n.displayMode,!0);if("html"===n.output){var a=Et(e,i);r=Qe.makeSpan(["katex"],[a])}else{var o=Ft(e,t,i,n.displayMode,!1),s=Et(e,i);r=Qe.makeSpan(["katex"],[o,s])}return Pt(r,n)},Mt={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb"},Bt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},jt=function(e,t,n,r){var i,a=e.height+e.depth+2*n;if(/fbox|color/.test(t)){if(i=Qe.makeSpan(["stretchy",t],[],r),"fbox"===t){var o=r.color&&r.getColor();o&&(i.style.borderColor=o)}}else{var s=[];/^[bx]cancel$/.test(t)&&s.push(new j({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&s.push(new j({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new M(s,{width:"100%",height:a+"em"});i=Qe.makeSvgSpan([],[u],r)}return i.height=a,i.style.height=a+"em",i},Ut=function(e){var t=new kt.MathNode("mo",[new kt.TextNode(Mt[e.substr(1)])]);return t.setAttribute("stretchy","true"),t},Vt=function(e,t){var n=function(){var n=4e5,r=e.label.substr(1);if(d.contains(["widehat","widecheck","widetilde","utilde"],r)){var i,a,o,s="ordgroup"===(h=e.base).type?h.body.length:1;if(s>5)"widehat"===r||"widecheck"===r?(i=420,n=2364,o=.42,a=r+"4"):(i=312,n=2340,o=.34,a="tilde4");else{var u=[1,1,2,2,3,3][s];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][u],i=[0,239,300,360,420][u],o=[0,.24,.3,.3,.36,.42][u],a=r+u):(n=[0,600,1033,2339,2340][u],i=[0,260,286,306,312][u],o=[0,.26,.286,.3,.306,.34][u],a="tilde"+u)}var c=new B(a),l=new M([c],{width:"100%",height:o+"em",viewBox:"0 0 "+n+" "+i,preserveAspectRatio:"none"});return{span:Qe.makeSvgSpan([],[l],t),minWidth:0,height:o}}var p,f,h,g=[],m=Bt[r],_=m[0],v=m[1],y=m[2],b=y/1e3,D=_.length;if(1===D)p=["hide-tail"],f=[m[3]];else if(2===D)p=["halfarrow-left","halfarrow-right"],f=["xMinYMin","xMaxYMin"];else{if(3!==D)throw new Error("Correct katexImagesData or update code here to support\n "+D+" children.");p=["brace-left","brace-center","brace-right"],f=["xMinYMin","xMidYMin","xMaxYMin"]}for(var E=0;E0&&(r.style.minWidth=i+"em"),r};function zt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Ht(e){var t=Wt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Wt(e){return e&&("atom"===e.type||G.hasOwnProperty(e.type))?e:null}var Kt=function(e,t){var n,r,i;e&&"supsub"===e.type?(n=(r=zt(e.base,"accent")).base,e.base=n,i=function(e){if(e instanceof I)return e;throw new Error("Expected span but got "+String(e)+".")}(bt(e,t)),e.base=r):n=(r=zt(e,"accent")).base;var a=bt(n,t.havingCrampedStyle()),o=0;if(r.isShifty&&d.isCharacterBox(n)){var s=d.getBaseElem(n);o=U(bt(s,t.havingCrampedStyle())).skew}var u,c=Math.min(a.height,t.fontMetrics().xHeight);if(r.isStretchy)u=Vt(r,t),u=Qe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:u,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+2*o+"em)",marginLeft:2*o+"em"}:void 0}]},t);else{var l,p;"\\vec"===r.label?(l=Qe.staticSvg("vec",t),p=Qe.svgData.vec[1]):((l=U(l=Qe.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,p=l.width),u=Qe.makeSpan(["accent-body"],[l]);var f="\\textcircled"===r.label;f&&(u.classes.push("accent-full"),c=a.height);var h=o;f||(h-=p/2),u.style.left=h+"em","\\textcircled"===r.label&&(u.style.top=".2em"),u=Qe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-c},{type:"elem",elem:u}]},t)}var g=Qe.makeSpan(["mord","accent"],[u],t);return i?(i.children[0]=g,i.height=Math.max(g.height,i.height),i.classes[0]="mord",i):g},qt=function(e,t){var n=e.isStretchy?Ut(e.label):new kt.MathNode("mo",[Tt(e.label,e.mode)]),r=new kt.MathNode("mover",[It(e.base,t),n]);return r.setAttribute("accent","true"),r},Gt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(e){return"\\"+e})).join("|"));ot({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(e,t){var n=t[0],r=!Gt.test(e.funcName),i=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:Kt,mathmlBuilder:qt}),ot({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var n=t[0];return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Kt,mathmlBuilder:qt}),ot({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:function(e,t){var n=bt(e.base,t),r=Vt(e,t),i="\\utilde"===e.label?.12:0,a=Qe.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]},t);return Qe.makeSpan(["mord","accentunder"],[a],t)},mathmlBuilder:function(e,t){var n=Ut(e.label),r=new kt.MathNode("munder",[It(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Yt=function(e){var t=new kt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};ot({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,n){var r=e.parser,i=e.funcName;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder:function(e,t){var n,r=t.style,i=t.havingStyle(r.sup()),a=Qe.wrapFragment(bt(e.body,i,t),t);a.classes.push("x-arrow-pad"),e.below&&(i=t.havingStyle(r.sub()),(n=Qe.wrapFragment(bt(e.below,i,t),t)).classes.push("x-arrow-pad"));var o,s=Vt(e,t),u=-t.fontMetrics().axisHeight+.5*s.height,c=-t.fontMetrics().axisHeight-.5*s.height-.111;if((a.depth>.25||"\\xleftequilibrium"===e.label)&&(c-=a.depth),n){var l=-t.fontMetrics().axisHeight+n.height+.5*s.height+.111;o=Qe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:c},{type:"elem",elem:s,shift:u},{type:"elem",elem:n,shift:l}]},t)}else o=Qe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:c},{type:"elem",elem:s,shift:u}]},t);return o.children[0].children[0].children[1].classes.push("svg-align"),Qe.makeSpan(["mrel","x-arrow"],[o],t)},mathmlBuilder:function(e,t){var n,r=Ut(e.label);if(e.body){var i=Yt(It(e.body,t));if(e.below){var a=Yt(It(e.below,t));n=new kt.MathNode("munderover",[r,a,i])}else n=new kt.MathNode("mover",[r,i])}else if(e.below){var o=Yt(It(e.below,t));n=new kt.MathNode("munder",[r,o])}else n=Yt(),n=new kt.MathNode("mover",[r,n]);return n}}),ot({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){for(var n=e.parser,r=zt(t[0],"ordgroup").body,i="",a=0;a","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],fn=[0,1.2,1.8,2.4,3],hn=[{type:"small",style:D.SCRIPTSCRIPT},{type:"small",style:D.SCRIPT},{type:"small",style:D.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],gn=[{type:"small",style:D.SCRIPTSCRIPT},{type:"small",style:D.SCRIPT},{type:"small",style:D.TEXT},{type:"stack"}],mn=[{type:"small",style:D.SCRIPTSCRIPT},{type:"small",style:D.SCRIPT},{type:"small",style:D.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],_n=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},vn=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);it)return n[i]}return n[n.length-1]},yn=function(e,t,n,r,i,a){var o;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),o=d.contains(pn,e)?hn:d.contains(ln,e)?mn:gn;var s=vn(e,t,o,r);return"small"===s.type?function(e,t,n,r,i,a){var o=Qe.makeSymbol(e,"Main-Regular",i,r),s=tn(o,t,r,a);return n&&nn(s,r,t),s}(e,s.style,n,r,i,a):"large"===s.type?rn(e,s.size,n,r,i,a):sn(e,t,n,r,i,a)},bn=function(e,t){var n,r,i=t.havingBaseSizing(),a=vn("\\surd",e*i.sizeMultiplier,mn,i),o=i.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),u=0,c=0,l=0;return"small"===a.type?(e<1?o=1:e<1.4&&(o=.7),c=(1+s)/o,(n=cn("sqrtMain",u=(1+s+un)/o,l=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",r=.833/o):"large"===a.type?(l=1080*fn[a.size],c=(fn[a.size]+s)/o,u=(fn[a.size]+s+un)/o,(n=cn("sqrtSize"+a.size,u,l,s,t)).style.minWidth="1.02em",r=1/o):(u=e+s+un,c=e+s,l=Math.floor(1e3*e+s)+80,(n=cn("sqrtTall",u,l,s,t)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=u+"em",{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},Dn=function(e,t,n,r,i){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),d.contains(ln,e)||d.contains(pn,e))return rn(e,t,!1,n,r,i);if(d.contains(dn,e))return sn(e,fn[t],!1,n,r,i);throw new o("Illegal delimiter: '"+e+"'")},En=yn,Cn=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=5/r.fontMetrics().ptPerEm,u=Math.max(t-o,n+o),c=Math.max(u/500*901,2*u-s);return yn(e,c,!0,r,i,a)},Sn={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},xn=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function kn(e,t){var n=Wt(e);if(n&&d.contains(xn,n.text))return n;throw new o(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Tn(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ot({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1},handler:function(e,t){var n=kn(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Sn[e.funcName].size,mclass:Sn[e.funcName].mclass,delim:n.text}},htmlBuilder:function(e,t){return"."===e.delim?Qe.makeSpan([e.mclass]):Dn(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t=[];"."!==e.delim&&t.push(Tt(e.delim,e.mode));var n=new kt.MathNode("mo",t);return"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n}}),ot({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(e,t){var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!==typeof n)throw new o("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:kn(t[0],e).text,color:n}}}),ot({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(e,t){var n=kn(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=zt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:function(e,t){Tn(e);for(var n,r,i=ht(e.body,t,!0,["mopen","mclose"]),a=0,o=0,s=!1,u=0;u-1?"mpadded":"menclose",[It(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};ot({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(e,t,n){var r=e.parser,i=e.funcName,a=zt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:wn,mathmlBuilder:An}),ot({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(e,t,n){var r=e.parser,i=e.funcName,a=zt(t[0],"color-token").color,o=zt(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:wn,mathmlBuilder:An}),ot({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\fbox",body:t[0]}}}),ot({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(e,t,n){var r=e.parser,i=e.funcName,a=t[0];return{type:"enclose",mode:r.mode,label:i,body:a}},htmlBuilder:wn,mathmlBuilder:An});var On={};function Nn(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,a=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:i},u=0;u0&&(y+=.25),c.push({pos:y,isDashed:e[t]})}for(b(a[0]),n=0;n0&&(S<(w+=v)&&(S=w),w=0),e.addJot&&(S+=g),x.height=C,x.depth=S,y+=C,x.pos=y,y+=S+w,u[n]=x,b(a[n+1])}var A,O,N=y/2+t.fontMetrics().axisHeight,I=e.cols||[],F=[];for(r=0,O=0;r=s)){var B=void 0;(r>0||e.hskipBeforeAndAfter)&&0!==(B=d.deflt(L.pregap,f))&&((A=Qe.makeSpan(["arraycolsep"],[])).style.width=B+"em",F.push(A));var j=[];for(n=0;n0){for(var H=Qe.makeLineSpan("hline",t,l),W=Qe.makeLineSpan("hdashline",t,l),K=[{type:"elem",elem:u,shift:0}];c.length>0;){var q=c.pop(),G=q.pos-N;q.isDashed?K.push({type:"elem",elem:W,shift:G}):K.push({type:"elem",elem:H,shift:G})}u=Qe.makeVList({positionType:"individualShift",children:K},t)}return Qe.makeSpan(["mord"],[u],t)},Rn={c:"center ",l:"left ",r:"right "},Mn=function(e,t){var n=new kt.MathNode("mtable",e.body.map((function(e){return new kt.MathNode("mtr",e.map((function(e){return new kt.MathNode("mtd",[It(e,t)])})))}))),r=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);n.setAttribute("rowspacing",r+"em");var i="",a="";if(e.cols&&e.cols.length>0){var o=e.cols,s="",u=!1,c=0,l=o.length;"separator"===o[0].type&&(i+="top ",c=1),"separator"===o[o.length-1].type&&(i+="bottom ",l-=1);for(var d=c;d0?"left ":"",i+=m[m.length-1].length>0?"right ":"";for(var _=1;_0&&l&&(f=1),r[d]={type:"align",align:p,pregap:f,postgap:0}}return i.colSeparationType=l?"align":"alignat",i};Nn({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var n={cols:(Wt(t[0])?[t[0]]:zt(t[0],"ordgroup").body).map((function(e){var t=Ht(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new o("Unknown column alignment: "+t,e)})),hskipBeforeAndAfter:!0};return Fn(e.parser,n,Ln(e.envName))},htmlBuilder:Pn,mathmlBuilder:Mn}),Nn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName],n=Fn(e.parser,{hskipBeforeAndAfter:!1},Ln(e.envName));return t?{type:"leftright",mode:e.mode,body:[n],left:t[0],right:t[1],rightColor:void 0}:n},htmlBuilder:Pn,mathmlBuilder:Mn}),Nn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t=Fn(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Pn,mathmlBuilder:Mn}),Nn({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var n=(Wt(t[0])?[t[0]]:zt(t[0],"ordgroup").body).map((function(e){var t=Ht(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new o("Unknown column alignment: "+t,e)}));if(n.length>1)throw new o("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=Fn(e.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new o("{subarray} can contain only one column");return r},htmlBuilder:Pn,mathmlBuilder:Mn}),Nn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t=Fn(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Ln(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Pn,mathmlBuilder:Mn}),Nn({type:"array",names:["aligned"],props:{numArgs:0},handler:Bn,htmlBuilder:Pn,mathmlBuilder:Mn}),Nn({type:"array",names:["gathered"],props:{numArgs:0},handler:function(e){return Fn(e.parser,{cols:[{type:"align",align:"c"}],addJot:!0},"display")},htmlBuilder:Pn,mathmlBuilder:Mn}),Nn({type:"array",names:["alignedat"],props:{numArgs:1},handler:Bn,htmlBuilder:Pn,mathmlBuilder:Mn}),ot({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(e,t){throw new o(e.funcName+" valid only within array environment")}});var jn=On;ot({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];if("ordgroup"!==i.type)throw new o("Invalid environment name",i);for(var a="",s=0;s=D.SCRIPT.id?n.text():D.DISPLAY:"text"===e&&n.size===D.DISPLAY.size?n=D.TEXT:"script"===e?n=D.SCRIPT:"scriptscript"===e&&(n=D.SCRIPTSCRIPT),n},Yn=function(e,t){var n,r=Gn(e.size,t.style),i=r.fracNum(),a=r.fracDen();n=t.havingStyle(i);var o=bt(e.numer,n,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,u=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*d:7*d,h=t.fontMetrics().denom1):(l>0?(p=t.fontMetrics().num2,f=d):(p=t.fontMetrics().num3,f=3*d),h=t.fontMetrics().denom2),c){var b=t.fontMetrics().axisHeight;p-o.depth-(b+.5*l)0&&(t="."===(t=e)?null:t),t};ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var n,r=e.parser,i=t[4],a=t[5],o="atom"===t[0].type&&"open"===t[0].family?Qn(t[0].text):null,s="atom"===t[1].type&&"close"===t[1].family?Qn(t[1].text):null,u=zt(t[2],"size"),c=null;n=!!u.isBlank||(c=u.value).number>0;var l="auto",d=t[3];if("ordgroup"===d.type){if(d.body.length>0){var p=zt(d.body[0],"textord");l=$n[Number(p.text)]}}else d=zt(d,"textord"),l=$n[Number(d.text)];return{type:"genfrac",mode:r.mode,numer:i,denom:a,continued:!1,hasBarLine:n,barSize:c,leftDelim:o,rightDelim:s,size:l}},htmlBuilder:Yn,mathmlBuilder:Jn}),ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var n=e.parser,r=(e.funcName,e.token);return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:zt(t[0],"size").value,token:r}}}),ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var n=e.parser,r=(e.funcName,t[0]),i=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(zt(t[1],"infix").size),a=t[2],o=i.number>0;return{type:"genfrac",mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Yn,mathmlBuilder:Jn});var Xn=function(e,t){var n,r,i=t.style;"supsub"===e.type?(n=e.sup?bt(e.sup,t.havingStyle(i.sup()),t):bt(e.sub,t.havingStyle(i.sub()),t),r=zt(e.base,"horizBrace")):r=zt(e,"horizBrace");var a,o=bt(r.base,t.havingBaseStyle(D.DISPLAY)),s=Vt(r,t);if(r.isOver?(a=Qe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(a=Qe.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var u=Qe.makeSpan(["mord",r.isOver?"mover":"munder"],[a],t);a=r.isOver?Qe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Qe.makeVList({positionType:"bottom",positionData:u.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:u}]},t)}return Qe.makeSpan(["mord",r.isOver?"mover":"munder"],[a],t)};ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var n=e.parser,r=e.funcName;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:Xn,mathmlBuilder:function(e,t){var n=Ut(e.label);return new kt.MathNode(e.isOver?"mover":"munder",[It(e.base,t),n])}}),ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=t[1],i=zt(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:ut(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var n=ht(e.body,t,!1);return Qe.makeAnchor(e.href,[],n,t)},mathmlBuilder:function(e,t){var n=Nt(e.body,t);return n instanceof St||(n=new St("mrow",[n])),n.setAttribute("href",e.href),n}}),ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=zt(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],a=0;a0&&(r=Ue(e.totalheight,t)-n,r=Number(r.toFixed(2)));var i=0;e.width.number>0&&(i=Ue(e.width,t));var a={height:n+r+"em"};i>0&&(a.width=i+"em"),r>0&&(a.verticalAlign=-r+"em");var o=new L(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:function(e,t){var n=new kt.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=Ue(e.height,t),i=0;if(e.totalheight.number>0&&(i=(i=Ue(e.totalheight,t)-r).toFixed(2),n.setAttribute("valign","-"+i+"em")),n.setAttribute("height",r+i+"em"),e.width.number>0){var a=Ue(e.width,t);n.setAttribute("width",a+"em")}return n.setAttribute("src",e.src),n}}),ot({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=zt(t[0],"size");if(n.settings.strict){var a="m"===r[1],o="mu"===i.value.unit;a?(o||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+i.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):o&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder:function(e,t){return Qe.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var n=Ue(e.dimension,t);return new kt.SpaceNode(n)}}),ot({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:function(e,t){var n;"clap"===e.alignment?(n=Qe.makeSpan([],[bt(e.body,t)]),n=Qe.makeSpan(["inner"],[n],t)):n=Qe.makeSpan(["inner"],[bt(e.body,t)]);var r=Qe.makeSpan(["fix"],[]),i=Qe.makeSpan([e.alignment],[n,r],t),a=Qe.makeSpan(["strut"]);return a.style.height=i.height+i.depth+"em",a.style.verticalAlign=-i.depth+"em",i.children.unshift(a),i=Qe.makeSpan(["thinbox"],[i],t),Qe.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:function(e,t){var n=new kt.MathNode("mpadded",[It(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),ot({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var n=e.funcName,r=e.parser,i=r.mode;r.switchMode("math");var a="\\("===n?"\\)":"$",o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:o}}}),ot({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new o("Mismatched "+e.funcName)}});var er=function(e,t){switch(t.style.size){case D.DISPLAY.size:return e.display;case D.TEXT.size:return e.text;case D.SCRIPT.size:return e.script;case D.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ot({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:ut(t[0]),text:ut(t[1]),script:ut(t[2]),scriptscript:ut(t[3])}},htmlBuilder:function(e,t){var n=er(e,t),r=ht(n,t,!1);return Qe.makeFragment(r)},mathmlBuilder:function(e,t){var n=er(e,t);return Nt(n,t)}});var tr=function(e,t,n,r,i,a,o){var s,u,c;if(e=Qe.makeSpan([],[e]),t){var l=bt(t,r.havingStyle(i.sup()),r);u={elem:l,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-l.depth)}}if(n){var d=bt(n,r.havingStyle(i.sub()),r);s={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}if(u&&s){var p=r.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;c=Qe.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:-a+"em"},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:a+"em"},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(s){var f=e.height-o;c=Qe.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:-a+"em"},{type:"kern",size:s.kern},{type:"elem",elem:e}]},r)}else{if(!u)return e;var h=e.depth+o;c=Qe.makeVList({positionType:"bottom",positionData:h,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:a+"em"},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}return Qe.makeSpan(["mop","op-limits"],[c],r)},nr=["\\smallint"],rr=function(e,t){var n,r,i,a=!1;"supsub"===e.type?(n=e.sup,r=e.sub,i=zt(e.base,"op"),a=!0):i=zt(e,"op");var o,s=t.style,u=!1;if(s.size===D.DISPLAY.size&&i.symbol&&!d.contains(nr,i.name)&&(u=!0),i.symbol){var c=u?"Size2-Regular":"Size1-Regular",l="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(l=i.name.substr(1),i.name="oiint"===l?"\\iint":"\\iiint"),o=Qe.makeSymbol(i.name,c,"math",t,["mop","op-symbol",u?"large-op":"small-op"]),l.length>0){var p=o.italic,f=Qe.staticSvg(l+"Size"+(u?"2":"1"),t);o=Qe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:f,shift:u?.08:0}]},t),i.name="\\"+l,o.classes.unshift("mop"),o.italic=p}}else if(i.body){var h=ht(i.body,t,!0);1===h.length&&h[0]instanceof R?(o=h[0]).classes[0]="mop":o=Qe.makeSpan(["mop"],Qe.tryCombineChars(h),t)}else{for(var g=[],m=1;m0){for(var s=i.body.map((function(e){var t=e.text;return"string"===typeof t?{type:"textord",mode:e.mode,text:t}:e})),u=ht(s,t.withFont("mathrm"),!0),c=0;c=0?s.setAttribute("height","+"+i+"em"):(s.setAttribute("height",i+"em"),s.setAttribute("depth","+"+-i+"em")),s.setAttribute("voffset",i+"em"),s}});var cr=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ot({type:"sizing",names:cr,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:cr.indexOf(r)+1,body:a}},htmlBuilder:function(e,t){var n=t.havingSize(e.size);return ur(e.body,n,t)},mathmlBuilder:function(e,t){var n=t.havingSize(e.size),r=Ot(e.body,n),i=new kt.MathNode("mstyle",r);return i.setAttribute("mathsize",n.sizeMultiplier+"em"),i}}),ot({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,n){var r=e.parser,i=!1,a=!1,o=n[0]&&zt(n[0],"ordgroup");if(o)for(var s="",u=0;un.height+n.depth+a&&(a=(a+d-n.height-n.depth)/2);var p=u.height-n.height-a-c;n.style.paddingLeft=l+"em";var f=Qe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+p)},{type:"elem",elem:u},{type:"kern",size:c}]},t);if(e.index){var h=t.havingStyle(D.SCRIPTSCRIPT),g=bt(e.index,h,t),m=.6*(f.height-f.depth),_=Qe.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:g}]},t),v=Qe.makeSpan(["root"],[_]);return Qe.makeSpan(["mord","sqrt"],[v,f],t)}return Qe.makeSpan(["mord","sqrt"],[f],t)},mathmlBuilder:function(e,t){var n=e.body,r=e.index;return r?new kt.MathNode("mroot",[It(n,t),It(r,t)]):new kt.MathNode("msqrt",[It(n,t)])}});var lr={display:D.DISPLAY,text:D.TEXT,script:D.SCRIPT,scriptscript:D.SCRIPTSCRIPT};ot({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:o,body:a}},htmlBuilder:function(e,t){var n=lr[e.style],r=t.havingStyle(n).withFont("");return ur(e.body,r,t)},mathmlBuilder:function(e,t){var n=lr[e.style],r=t.havingStyle(n),i=Ot(e.body,r),a=new kt.MathNode("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}}),st({type:"supsub",htmlBuilder:function(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===D.DISPLAY.size||n.alwaysHandleSupSub)?rr:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===D.DISPLAY.size||n.limits)?sr:null:"accent"===n.type?d.isCharacterBox(n.base)?Kt:null:"horizBrace"===n.type&&!e.sub===n.isOver?Xn:null:null}(e,t);if(n)return n(e,t);var r,i,a,o=e.base,s=e.sup,u=e.sub,c=bt(o,t),l=t.fontMetrics(),p=0,f=0,h=o&&d.isCharacterBox(o);if(s){var g=t.havingStyle(t.style.sup());r=bt(s,g,t),h||(p=c.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(u){var m=t.havingStyle(t.style.sub());i=bt(u,m,t),h||(f=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}a=t.style===D.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2;var _,v=t.sizeMultiplier,y=.5/l.ptPerEm/v+"em",b=null;if(i){var E=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof R||E)&&(b=-c.italic+"em")}if(r&&i){p=Math.max(p,a,r.depth+.25*l.xHeight),f=Math.max(f,l.sub2);var C=4*l.defaultRuleThickness;if(p-r.depth-(i.height-f)0&&(p+=S,f-=S)}var x=[{type:"elem",elem:i,shift:f,marginRight:y,marginLeft:b},{type:"elem",elem:r,shift:-p,marginRight:y}];_=Qe.makeVList({positionType:"individualShift",children:x},t)}else if(i){f=Math.max(f,l.sub1,i.height-.8*l.xHeight);var k=[{type:"elem",elem:i,marginLeft:b,marginRight:y}];_=Qe.makeVList({positionType:"shift",positionData:f,children:k},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");p=Math.max(p,a,r.depth+.25*l.xHeight),_=Qe.makeVList({positionType:"shift",positionData:-p,children:[{type:"elem",elem:r,marginRight:y}]},t)}var T=vt(c,"right")||"mord";return Qe.makeSpan([T],[c,Qe.makeSpan(["msupsub"],[_])],t)},mathmlBuilder:function(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var i,a=[It(e.base,t)];if(e.sub&&a.push(It(e.sub,t)),e.sup&&a.push(It(e.sup,t)),r)i=n?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;i=o&&"op"===o.type&&o.limits&&t.style===D.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===D.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;i=s&&"op"===s.type&&s.limits&&(t.style===D.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===D.DISPLAY)?"munder":"msub"}else{var u=e.base;i=u&&"op"===u.type&&u.limits&&(t.style===D.DISPLAY||u.alwaysHandleSupSub)||u&&"operatorname"===u.type&&u.alwaysHandleSupSub&&(u.limits||t.style===D.DISPLAY)?"mover":"msup"}return new kt.MathNode(i,a)}}),st({type:"atom",htmlBuilder:function(e,t){return Qe.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var n=new kt.MathNode("mo",[Tt(e.text,e.mode)]);if("bin"===e.family){var r=At(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var dr={mi:"italic",mn:"normal",mtext:"normal"};st({type:"mathord",htmlBuilder:function(e,t){return Qe.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var n=new kt.MathNode("mi",[Tt(e.text,e.mode,t)]),r=At(e,t)||"italic";return r!==dr[n.type]&&n.setAttribute("mathvariant",r),n}}),st({type:"textord",htmlBuilder:function(e,t){return Qe.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var n,r=Tt(e.text,e.mode,t),i=At(e,t)||"normal";return n="text"===e.mode?new kt.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new kt.MathNode("mn",[r]):"\\prime"===e.text?new kt.MathNode("mo",[r]):new kt.MathNode("mi",[r]),i!==dr[n.type]&&n.setAttribute("mathvariant",i),n}});var pr={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},fr={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};st({type:"spacing",htmlBuilder:function(e,t){if(fr.hasOwnProperty(e.text)){var n=fr[e.text].className||"";if("text"===e.mode){var r=Qe.makeOrd(e,t,"textord");return r.classes.push(n),r}return Qe.makeSpan(["mspace",n],[Qe.mathsym(e.text,e.mode,t)],t)}if(pr.hasOwnProperty(e.text))return Qe.makeSpan(["mspace",pr[e.text]],[],t);throw new o('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!fr.hasOwnProperty(e.text)){if(pr.hasOwnProperty(e.text))return new kt.MathNode("mspace");throw new o('Unknown type of space "'+e.text+'"')}return new kt.MathNode("mtext",[new kt.TextNode("\xa0")])}});var hr=function(){var e=new kt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};st({type:"tag",mathmlBuilder:function(e,t){var n=new kt.MathNode("mtable",[new kt.MathNode("mtr",[hr(),new kt.MathNode("mtd",[Nt(e.body,t)]),hr(),new kt.MathNode("mtd",[Nt(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var gr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},mr={"\\textbf":"textbf","\\textmd":"textmd"},_r={"\\textit":"textit","\\textup":"textup"},vr=function(e,t){var n=e.font;return n?gr[n]?t.withTextFontFamily(gr[n]):mr[n]?t.withTextFontWeight(mr[n]):t.withTextFontShape(_r[n]):t};ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:"text",mode:n.mode,body:ut(i),font:r}},htmlBuilder:function(e,t){var n=vr(e,t),r=ht(e.body,n,!0);return Qe.makeSpan(["mord","text"],Qe.tryCombineChars(r),n)},mathmlBuilder:function(e,t){var n=vr(e,t);return Nt(e.body,n)}}),ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var n=bt(e.body,t),r=Qe.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,a=Qe.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]},t);return Qe.makeSpan(["mord","underline"],[a],t)},mathmlBuilder:function(e,t){var n=new kt.MathNode("mo",[new kt.TextNode("\u203e")]);n.setAttribute("stretchy","true");var r=new kt.MathNode("munder",[It(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,n){throw new o("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var n=yr(e),r=[],i=t.havingStyle(t.style.text()),a=0;a0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}this.current[e]=t},e}(),xr={},kr=xr;function Tr(e,t){xr[e]=t}Tr("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Tr("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Tr("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Tr("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Tr("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Tr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Tr("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var wr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Tr("\\char",(function(e){var t,n=e.popToken(),r="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new o("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(null==(r=wr[n.text])||r>=t)throw new o("Invalid base-"+t+" digit "+n.text);for(var i;null!=(i=wr[e.future().text])&&i":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Tr("\\dots",(function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in Or?t=Or[n]:("\\not"===n.substr(0,4)||n in J.math&&d.contains(["bin","rel"],J.math[n].group))&&(t="\\dotsb"),t}));var Nr={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Tr("\\dotso",(function(e){return e.future().text in Nr?"\\ldots\\,":"\\ldots"})),Tr("\\dotsc",(function(e){var t=e.future().text;return t in Nr&&","!==t?"\\ldots\\,":"\\ldots"})),Tr("\\cdots",(function(e){return e.future().text in Nr?"\\@cdots\\,":"\\@cdots"})),Tr("\\dotsb","\\cdots"),Tr("\\dotsm","\\cdots"),Tr("\\dotsi","\\!\\cdots"),Tr("\\dotsx","\\ldots\\,"),Tr("\\DOTSI","\\relax"),Tr("\\DOTSB","\\relax"),Tr("\\DOTSX","\\relax"),Tr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Tr("\\,","\\tmspace+{3mu}{.1667em}"),Tr("\\thinspace","\\,"),Tr("\\>","\\mskip{4mu}"),Tr("\\:","\\tmspace+{4mu}{.2222em}"),Tr("\\medspace","\\:"),Tr("\\;","\\tmspace+{5mu}{.2777em}"),Tr("\\thickspace","\\;"),Tr("\\!","\\tmspace-{3mu}{.1667em}"),Tr("\\negthinspace","\\!"),Tr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Tr("\\negthickspace","\\tmspace-{5mu}{.277em}"),Tr("\\enspace","\\kern.5em "),Tr("\\enskip","\\hskip.5em\\relax"),Tr("\\quad","\\hskip1em\\relax"),Tr("\\qquad","\\hskip2em\\relax"),Tr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Tr("\\tag@paren","\\tag@literal{({#1})}"),Tr("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new o("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Tr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Tr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Tr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Tr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Tr("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Tr("\\\\","\\newline"),Tr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Ir=V["Main-Regular"]["T".charCodeAt(0)][1]-.7*V["Main-Regular"]["A".charCodeAt(0)][1]+"em";Tr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Ir+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Tr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Ir+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Tr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Tr("\\@hspace","\\hskip #1\\relax"),Tr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Tr("\\ordinarycolon",":"),Tr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Tr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Tr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Tr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Tr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Tr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Tr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Tr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Tr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Tr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Tr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Tr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Tr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Tr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Tr("\u2237","\\dblcolon"),Tr("\u2239","\\eqcolon"),Tr("\u2254","\\coloneqq"),Tr("\u2255","\\eqqcolon"),Tr("\u2a74","\\Coloneqq"),Tr("\\ratio","\\vcentcolon"),Tr("\\coloncolon","\\dblcolon"),Tr("\\colonequals","\\coloneqq"),Tr("\\coloncolonequals","\\Coloneqq"),Tr("\\equalscolon","\\eqqcolon"),Tr("\\equalscoloncolon","\\Eqqcolon"),Tr("\\colonminus","\\coloneq"),Tr("\\coloncolonminus","\\Coloneq"),Tr("\\minuscolon","\\eqcolon"),Tr("\\minuscoloncolon","\\Eqcolon"),Tr("\\coloncolonapprox","\\Colonapprox"),Tr("\\coloncolonsim","\\Colonsim"),Tr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Tr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Tr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Tr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Tr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Tr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Tr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Tr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Tr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Tr("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Tr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Tr("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Tr("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Tr("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Tr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Tr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Tr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Tr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Tr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Tr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Tr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Tr("\\imath","\\html@mathml{\\@imath}{\u0131}"),Tr("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Tr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Tr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Tr("\u27e6","\\llbracket"),Tr("\u27e7","\\rrbracket"),Tr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Tr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Tr("\u2983","\\lBrace"),Tr("\u2984","\\rBrace"),Tr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Tr("\u29b5","\\minuso"),Tr("\\darr","\\downarrow"),Tr("\\dArr","\\Downarrow"),Tr("\\Darr","\\Downarrow"),Tr("\\lang","\\langle"),Tr("\\rang","\\rangle"),Tr("\\uarr","\\uparrow"),Tr("\\uArr","\\Uparrow"),Tr("\\Uarr","\\Uparrow"),Tr("\\N","\\mathbb{N}"),Tr("\\R","\\mathbb{R}"),Tr("\\Z","\\mathbb{Z}"),Tr("\\alef","\\aleph"),Tr("\\alefsym","\\aleph"),Tr("\\Alpha","\\mathrm{A}"),Tr("\\Beta","\\mathrm{B}"),Tr("\\bull","\\bullet"),Tr("\\Chi","\\mathrm{X}"),Tr("\\clubs","\\clubsuit"),Tr("\\cnums","\\mathbb{C}"),Tr("\\Complex","\\mathbb{C}"),Tr("\\Dagger","\\ddagger"),Tr("\\diamonds","\\diamondsuit"),Tr("\\empty","\\emptyset"),Tr("\\Epsilon","\\mathrm{E}"),Tr("\\Eta","\\mathrm{H}"),Tr("\\exist","\\exists"),Tr("\\harr","\\leftrightarrow"),Tr("\\hArr","\\Leftrightarrow"),Tr("\\Harr","\\Leftrightarrow"),Tr("\\hearts","\\heartsuit"),Tr("\\image","\\Im"),Tr("\\infin","\\infty"),Tr("\\Iota","\\mathrm{I}"),Tr("\\isin","\\in"),Tr("\\Kappa","\\mathrm{K}"),Tr("\\larr","\\leftarrow"),Tr("\\lArr","\\Leftarrow"),Tr("\\Larr","\\Leftarrow"),Tr("\\lrarr","\\leftrightarrow"),Tr("\\lrArr","\\Leftrightarrow"),Tr("\\Lrarr","\\Leftrightarrow"),Tr("\\Mu","\\mathrm{M}"),Tr("\\natnums","\\mathbb{N}"),Tr("\\Nu","\\mathrm{N}"),Tr("\\Omicron","\\mathrm{O}"),Tr("\\plusmn","\\pm"),Tr("\\rarr","\\rightarrow"),Tr("\\rArr","\\Rightarrow"),Tr("\\Rarr","\\Rightarrow"),Tr("\\real","\\Re"),Tr("\\reals","\\mathbb{R}"),Tr("\\Reals","\\mathbb{R}"),Tr("\\Rho","\\mathrm{P}"),Tr("\\sdot","\\cdot"),Tr("\\sect","\\S"),Tr("\\spades","\\spadesuit"),Tr("\\sub","\\subset"),Tr("\\sube","\\subseteq"),Tr("\\supe","\\supseteq"),Tr("\\Tau","\\mathrm{T}"),Tr("\\thetasym","\\vartheta"),Tr("\\weierp","\\wp"),Tr("\\Zeta","\\mathrm{Z}"),Tr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Tr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Tr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Tr("\\bra","\\mathinner{\\langle{#1}|}"),Tr("\\ket","\\mathinner{|{#1}\\rangle}"),Tr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Tr("\\Bra","\\left\\langle#1\\right|"),Tr("\\Ket","\\left|#1\\right\\rangle"),Tr("\\blue","\\textcolor{##6495ed}{#1}"),Tr("\\orange","\\textcolor{##ffa500}{#1}"),Tr("\\pink","\\textcolor{##ff00af}{#1}"),Tr("\\red","\\textcolor{##df0030}{#1}"),Tr("\\green","\\textcolor{##28ae7b}{#1}"),Tr("\\gray","\\textcolor{gray}{#1}"),Tr("\\purple","\\textcolor{##9d38bd}{#1}"),Tr("\\blueA","\\textcolor{##ccfaff}{#1}"),Tr("\\blueB","\\textcolor{##80f6ff}{#1}"),Tr("\\blueC","\\textcolor{##63d9ea}{#1}"),Tr("\\blueD","\\textcolor{##11accd}{#1}"),Tr("\\blueE","\\textcolor{##0c7f99}{#1}"),Tr("\\tealA","\\textcolor{##94fff5}{#1}"),Tr("\\tealB","\\textcolor{##26edd5}{#1}"),Tr("\\tealC","\\textcolor{##01d1c1}{#1}"),Tr("\\tealD","\\textcolor{##01a995}{#1}"),Tr("\\tealE","\\textcolor{##208170}{#1}"),Tr("\\greenA","\\textcolor{##b6ffb0}{#1}"),Tr("\\greenB","\\textcolor{##8af281}{#1}"),Tr("\\greenC","\\textcolor{##74cf70}{#1}"),Tr("\\greenD","\\textcolor{##1fab54}{#1}"),Tr("\\greenE","\\textcolor{##0d923f}{#1}"),Tr("\\goldA","\\textcolor{##ffd0a9}{#1}"),Tr("\\goldB","\\textcolor{##ffbb71}{#1}"),Tr("\\goldC","\\textcolor{##ff9c39}{#1}"),Tr("\\goldD","\\textcolor{##e07d10}{#1}"),Tr("\\goldE","\\textcolor{##a75a05}{#1}"),Tr("\\redA","\\textcolor{##fca9a9}{#1}"),Tr("\\redB","\\textcolor{##ff8482}{#1}"),Tr("\\redC","\\textcolor{##f9685d}{#1}"),Tr("\\redD","\\textcolor{##e84d39}{#1}"),Tr("\\redE","\\textcolor{##bc2612}{#1}"),Tr("\\maroonA","\\textcolor{##ffbde0}{#1}"),Tr("\\maroonB","\\textcolor{##ff92c6}{#1}"),Tr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Tr("\\maroonD","\\textcolor{##ca337c}{#1}"),Tr("\\maroonE","\\textcolor{##9e034e}{#1}"),Tr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Tr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Tr("\\purpleC","\\textcolor{##aa87ff}{#1}"),Tr("\\purpleD","\\textcolor{##7854ab}{#1}"),Tr("\\purpleE","\\textcolor{##543b78}{#1}"),Tr("\\mintA","\\textcolor{##f5f9e8}{#1}"),Tr("\\mintB","\\textcolor{##edf2df}{#1}"),Tr("\\mintC","\\textcolor{##e0e5cc}{#1}"),Tr("\\grayA","\\textcolor{##f6f7f7}{#1}"),Tr("\\grayB","\\textcolor{##f0f1f2}{#1}"),Tr("\\grayC","\\textcolor{##e3e5e6}{#1}"),Tr("\\grayD","\\textcolor{##d6d8da}{#1}"),Tr("\\grayE","\\textcolor{##babec2}{#1}"),Tr("\\grayF","\\textcolor{##888d93}{#1}"),Tr("\\grayG","\\textcolor{##626569}{#1}"),Tr("\\grayH","\\textcolor{##3b3e40}{#1}"),Tr("\\grayI","\\textcolor{##21242c}{#1}"),Tr("\\kaBlue","\\textcolor{##314453}{#1}"),Tr("\\kaGreen","\\textcolor{##71B307}{#1}");var Fr={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Lr=function(){function e(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Sr(kr,t.macros),this.mode=n,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new Cr(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.consumeSpaces=function(){for(;" "===this.future().text;)this.stack.pop()},t.consumeArgs=function(e){for(var t=[],n=0;nthis.settings.maxExpand)throw new o("Too many expansions: infinite loop or need to increase maxExpand setting");var i=r.tokens;if(r.numArgs)for(var a=this.consumeArgs(r.numArgs),s=(i=i.slice()).length-1;s>=0;--s){var u=i[s];if("#"===u.text){if(0===s)throw new o("Incomplete placeholder at end of macro body",u);if("#"===(u=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(u.text))throw new o("Not a valid argument number",u);var c;(c=i).splice.apply(c,[s,2].concat(a[+u.text-1]))}}}return this.pushTokens(i),i},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof i){if("\\relax"!==e.text&&!e.treatAsRelax)return this.stack.pop();this.stack.pop()}}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new i(e)]):void 0},t.expandTokens=function(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;){var r=this.expandOnce(!0);r instanceof i&&(r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;var n="function"===typeof t?t(this):t;if("string"===typeof n){var r=0;if(-1!==n.indexOf("#"))for(var i=n.replace(/##/g,"");-1!==i.indexOf("#"+(r+1));)++r;for(var a=new Cr(n,this.settings),o=[],s=a.lex();"EOF"!==s.text;)o.push(s),s=a.lex();return o.reverse(),{tokens:o,numArgs:r}}return n},t.isDefined=function(e){return this.macros.has(e)||br.hasOwnProperty(e)||J.math.hasOwnProperty(e)||J.text.hasOwnProperty(e)||Fr.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"===typeof t||"function"===typeof t||!t.unexpandable:br.hasOwnProperty(e)},e}(),Pr={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"}},Rr={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\u010f":"d\u030c","\u1e0b":"d\u0307","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u013a":"l\u0301","\u013e":"l\u030c","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\u010e":"D\u030c","\u1e0a":"D\u0307","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0139":"L\u0301","\u013d":"L\u030c","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u0164":"T\u030c","\u1e6a":"T\u0307","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"},Mr=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Lr(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new o("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e},t.parseExpression=function(t,n){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var i=this.fetch();if(-1!==e.endOfExpression.indexOf(i.text))break;if(n&&i.text===n)break;if(t&&br[i.text]&&br[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;"internal"!==a.type&&r.push(a)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)},t.handleInfixNodes=function(e){for(var t,n=-1,r=0;r0&&!c||0===s&&!c&&"math"===this.mode,d=this.parseGroupOfType("argument to '"+e+"'",u,c,r,l);if(!d){if(c){a.push(null);continue}throw new o("Expected group after '"+e+"'",this.fetch())}(c?a:i).push(d)}return{args:i,optArgs:a}},t.parseGroupOfType=function(e,t,n,r,i){switch(t){case"color":return i&&this.consumeSpaces(),this.parseColorGroup(n);case"size":return i&&this.consumeSpaces(),this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n,i);case"math":case"text":return this.parseGroup(e,n,r,void 0,t,i);case"hbox":var a=this.parseGroup(e,n,r,void 0,"text",i);return a?{type:"styling",mode:a.mode,body:[a],style:"text"}:a;case"raw":if(i&&this.consumeSpaces(),n&&"{"===this.fetch().text)return null;var s=this.parseStringGroup("raw",n,!0);if(s)return{type:"raw",mode:"text",string:s.text};throw new o("Expected raw group",this.fetch());case"original":case null:case void 0:return this.parseGroup(e,n,r,void 0,void 0,i);default:throw new o("Unknown group type as "+e,this.fetch())}},t.consumeSpaces=function(){for(;" "===this.fetch().text;)this.consume()},t.parseStringGroup=function(e,t,n){var r=t?"[":"{",i=t?"]":"}",a=this.fetch();if(a.text!==r){if(t)return null;if(n&&"EOF"!==a.text&&/[^{}[\]]/.test(a.text))return this.consume(),a}var s=this.mode;this.mode="text",this.expect(r);for(var u,c="",l=this.fetch(),d=0,p=l;(u=this.fetch()).text!==i||n&&d>0;){switch(u.text){case"EOF":throw new o("Unexpected end of input in "+e,l.range(p,c));case r:d++;break;case i:d--}c+=(p=u).text,this.consume()}return this.expect(i),this.mode=s,l.range(p,c)},t.parseRegexGroup=function(e,t){var n=this.mode;this.mode="text";for(var r,i=this.fetch(),a=i,s="";"EOF"!==(r=this.fetch()).text&&e.test(s+r.text);)s+=(a=r).text,this.consume();if(""===s)throw new o("Invalid "+t+": '"+i.text+"'",i);return this.mode=n,i.range(a,s)},t.parseColorGroup=function(e){var t=this.parseStringGroup("color",e);if(!t)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new o("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}},t.parseSizeGroup=function(e){var t,n=!1;if(!(t=e||"{"===this.fetch().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new o("Invalid size: '"+t.text+"'",t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!je(i))throw new o("Invalid unit: '"+i.unit+"'",t);return{type:"size",mode:this.mode,value:i,isBlank:n}},t.parseUrlGroup=function(e,t){this.gullet.lexer.setCatcode("%",13);var n=this.parseStringGroup("url",e,!0);if(this.gullet.lexer.setCatcode("%",14),!n)return null;var r=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}},t.parseGroup=function(t,n,i,a,s,u){var c=this.mode;s&&this.switchMode(s),u&&this.consumeSpaces();var l,d=this.fetch(),p=d.text;if(n?"["===p:"{"===p||"\\begingroup"===p){this.consume();var f=e.endOfGroup[p];this.gullet.beginGroup();var h=this.parseExpression(!1,f),g=this.fetch();this.expect(f),this.gullet.endGroup(),l={type:"ordgroup",mode:this.mode,loc:r.range(d,g),body:h,semisimple:"\\begingroup"===p||void 0}}else if(n)l=null;else if(null==(l=this.parseFunction(a,t,i)||this.parseSymbol())&&"\\"===p[0]&&!Fr.hasOwnProperty(p)){if(this.settings.throwOnError)throw new o("Undefined control sequence: "+p,d);l=this.formatUnsupportedCmd(p),this.consume()}return s&&this.switchMode(c),l},t.formLigatures=function(e){for(var t=e.length-1,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var u,c=J[this.mode][t].group,l=r.range(e);if(q.hasOwnProperty(c)){var d=c;u={type:"atom",mode:this.mode,family:d,loc:l,text:t}}else u={type:c,mode:this.mode,loc:l,text:t};a=u}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(S(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),a={type:"textord",mode:"text",loc:r.range(e),text:t}}if(this.consume(),s)for(var p=0;p-1&&t-1&&ee)return{line:t+1,column:e-(n[t-1]||0)+1,offset:e};return{}}}},function(e,t,n){"use strict";var r=n(88),i=n(93),a=n(269),o=n(270),s=a.CODE_POINTS,u=function(){function e(){r(this,e),this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536}return i(e,[{key:"_err",value:function(){}},{key:"_addGap",value:function(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}},{key:"_processSurrogate",value:function(e){if(this.pos!==this.lastCharPos){var t=this.html.charCodeAt(this.pos+1);if(a.isSurrogatePair(t))return this.pos++,this._addGap(),a.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,s.EOF;return this._err(o.surrogateInInputStream),e}},{key:"dropParsedChunk",value:function(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}},{key:"write",value:function(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}},{key:"insertHtmlAtCurrentPos",value:function(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}},{key:"advance",value:function(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,s.EOF;var e=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&e===s.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):e===s.CARRIAGE_RETURN?(this.skipNextNewLine=!0,s.LINE_FEED):(this.skipNextNewLine=!1,a.isSurrogate(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===s.LINE_FEED||e===s.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}},{key:"_checkForProblematicCharacters",value:function(e){a.isControlCodePoint(e)?this._err(o.controlCharacterInInputStream):a.isUndefinedCodePoint(e)&&this._err(o.noncharacterInInputStream)}},{key:"retreat",value:function(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}]),e}();e.exports=u},function(e,t,n){"use strict";e.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])},function(e,t,n){"use strict";var r=n(88),i=n(93),a=n(195),o=a.TAG_NAMES,s=a.NAMESPACES;function u(e){switch(e.length){case 1:return e===o.P;case 2:return e===o.RB||e===o.RP||e===o.RT||e===o.DD||e===o.DT||e===o.LI;case 3:return e===o.RTC;case 6:return e===o.OPTION;case 8:return e===o.OPTGROUP}return!1}function c(e){switch(e.length){case 1:return e===o.P;case 2:return e===o.RB||e===o.RP||e===o.RT||e===o.DD||e===o.DT||e===o.LI||e===o.TD||e===o.TH||e===o.TR;case 3:return e===o.RTC;case 5:return e===o.TBODY||e===o.TFOOT||e===o.THEAD;case 6:return e===o.OPTION;case 7:return e===o.CAPTION;case 8:return e===o.OPTGROUP||e===o.COLGROUP}return!1}function l(e,t){switch(e.length){case 2:if(e===o.TD||e===o.TH)return t===s.HTML;if(e===o.MI||e===o.MO||e===o.MN||e===o.MS)return t===s.MATHML;break;case 4:if(e===o.HTML)return t===s.HTML;if(e===o.DESC)return t===s.SVG;break;case 5:if(e===o.TABLE)return t===s.HTML;if(e===o.MTEXT)return t===s.MATHML;if(e===o.TITLE)return t===s.SVG;break;case 6:return(e===o.APPLET||e===o.OBJECT)&&t===s.HTML;case 7:return(e===o.CAPTION||e===o.MARQUEE)&&t===s.HTML;case 8:return e===o.TEMPLATE&&t===s.HTML;case 13:return e===o.FOREIGN_OBJECT&&t===s.SVG;case 14:return e===o.ANNOTATION_XML&&t===s.MATHML}return!1}var d=function(){function e(t,n){r(this,e),this.stackTop=-1,this.items=[],this.current=t,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=n}return i(e,[{key:"_indexOf",value:function(e){for(var t=-1,n=this.stackTop;n>=0;n--)if(this.items[n]===e){t=n;break}return t}},{key:"_isInTemplate",value:function(){return this.currentTagName===o.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===s.HTML}},{key:"_updateCurrentElement",value:function(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}},{key:"push",value:function(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}},{key:"pop",value:function(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}},{key:"replace",value:function(e,t){var n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement()}},{key:"insertAfter",value:function(e,t){var n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement()}},{key:"popUntilTagNamePopped",value:function(e){for(;this.stackTop>-1;){var t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===s.HTML)break}}},{key:"popUntilElementPopped",value:function(e){for(;this.stackTop>-1;){var t=this.current;if(this.pop(),t===e)break}}},{key:"popUntilNumberedHeaderPopped",value:function(){for(;this.stackTop>-1;){var e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===o.H1||e===o.H2||e===o.H3||e===o.H4||e===o.H5||e===o.H6&&t===s.HTML)break}}},{key:"popUntilTableCellPopped",value:function(){for(;this.stackTop>-1;){var e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===o.TD||e===o.TH&&t===s.HTML)break}}},{key:"popAllUpToHtmlElement",value:function(){this.stackTop=0,this._updateCurrentElement()}},{key:"clearBackToTableContext",value:function(){for(;this.currentTagName!==o.TABLE&&this.currentTagName!==o.TEMPLATE&&this.currentTagName!==o.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop()}},{key:"clearBackToTableBodyContext",value:function(){for(;this.currentTagName!==o.TBODY&&this.currentTagName!==o.TFOOT&&this.currentTagName!==o.THEAD&&this.currentTagName!==o.TEMPLATE&&this.currentTagName!==o.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop()}},{key:"clearBackToTableRowContext",value:function(){for(;this.currentTagName!==o.TR&&this.currentTagName!==o.TEMPLATE&&this.currentTagName!==o.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop()}},{key:"remove",value:function(e){for(var t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}},{key:"tryPeekProperlyNestedBodyElement",value:function(){var e=this.items[1];return e&&this.treeAdapter.getTagName(e)===o.BODY?e:null}},{key:"contains",value:function(e){return this._indexOf(e)>-1}},{key:"getCommonAncestor",value:function(e){var t=this._indexOf(e);return--t>=0?this.items[t]:null}},{key:"isRootHtmlElementCurrent",value:function(){return 0===this.stackTop&&this.currentTagName===o.HTML}},{key:"hasInScope",value:function(e){for(var t=this.stackTop;t>=0;t--){var n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===s.HTML)return!0;if(l(n,r))return!1}return!0}},{key:"hasNumberedHeaderInScope",value:function(){for(var e=this.stackTop;e>=0;e--){var t=this.treeAdapter.getTagName(this.items[e]),n=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===o.H1||t===o.H2||t===o.H3||t===o.H4||t===o.H5||t===o.H6)&&n===s.HTML)return!0;if(l(t,n))return!1}return!0}},{key:"hasInListItemScope",value:function(e){for(var t=this.stackTop;t>=0;t--){var n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===s.HTML)return!0;if((n===o.UL||n===o.OL)&&r===s.HTML||l(n,r))return!1}return!0}},{key:"hasInButtonScope",value:function(e){for(var t=this.stackTop;t>=0;t--){var n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===s.HTML)return!0;if(n===o.BUTTON&&r===s.HTML||l(n,r))return!1}return!0}},{key:"hasInTableScope",value:function(e){for(var t=this.stackTop;t>=0;t--){var n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===s.HTML){if(n===e)return!0;if(n===o.TABLE||n===o.TEMPLATE||n===o.HTML)return!1}}return!0}},{key:"hasTableBodyContextInTableScope",value:function(){for(var e=this.stackTop;e>=0;e--){var t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===s.HTML){if(t===o.TBODY||t===o.THEAD||t===o.TFOOT)return!0;if(t===o.TABLE||t===o.HTML)return!1}}return!0}},{key:"hasInSelectScope",value:function(e){for(var t=this.stackTop;t>=0;t--){var n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===s.HTML){if(n===e)return!0;if(n!==o.OPTION&&n!==o.OPTGROUP)return!1}}return!0}},{key:"generateImpliedEndTags",value:function(){for(;u(this.currentTagName);)this.pop()}},{key:"generateImpliedEndTagsThoroughly",value:function(){for(;c(this.currentTagName);)this.pop()}},{key:"generateImpliedEndTagsWithExclusion",value:function(e){for(;u(this.currentTagName)&&this.currentTagName!==e;)this.pop()}}]),e}();e.exports=d},function(e,t,n){"use strict";var r=n(88),i=n(93),a=function(){function e(t){r(this,e),this.length=0,this.entries=[],this.treeAdapter=t,this.bookmark=null}return i(e,[{key:"_getNoahArkConditionCandidates",value:function(t){var n=[];if(this.length>=3)for(var r=this.treeAdapter.getAttrList(t).length,i=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t),o=this.length-1;o>=0;o--){var s=this.entries[o];if(s.type===e.MARKER_ENTRY)break;var u=s.element,c=this.treeAdapter.getAttrList(u);this.treeAdapter.getTagName(u)===i&&this.treeAdapter.getNamespaceURI(u)===a&&c.length===r&&n.push({idx:o,attrs:c})}return n.length<3?[]:n}},{key:"_ensureNoahArkCondition",value:function(e){var t=this._getNoahArkConditionCandidates(e),n=t.length;if(n){for(var r=this.treeAdapter.getAttrList(e),i=r.length,a=Object.create(null),o=0;o=2;d--)this.entries.splice(t[d].idx,1),this.length--}}},{key:"insertMarker",value:function(){this.entries.push({type:e.MARKER_ENTRY}),this.length++}},{key:"pushElement",value:function(t,n){this._ensureNoahArkCondition(t),this.entries.push({type:e.ELEMENT_ENTRY,element:t,token:n}),this.length++}},{key:"insertElementAfterBookmark",value:function(t,n){for(var r=this.length-1;r>=0&&this.entries[r]!==this.bookmark;r--);this.entries.splice(r+1,0,{type:e.ELEMENT_ENTRY,element:t,token:n}),this.length++}},{key:"removeEntry",value:function(e){for(var t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}},{key:"clearToLastMarker",value:function(){for(;this.length;){var t=this.entries.pop();if(this.length--,t.type===e.MARKER_ENTRY)break}}},{key:"getElementEntryInScopeWithTagName",value:function(t){for(var n=this.length-1;n>=0;n--){var r=this.entries[n];if(r.type===e.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(r.element)===t)return r}return null}},{key:"getElementEntry",value:function(t){for(var n=this.length-1;n>=0;n--){var r=this.entries[n];if(r.type===e.ELEMENT_ENTRY&&r.element===t)return r}return null}}]),e}();a.MARKER_ENTRY="MARKER_ENTRY",a.ELEMENT_ENTRY="ELEMENT_ENTRY",e.exports=a},function(e,t,n){"use strict";var r=n(88),i=n(93),a=n(124),o=n(133),s=n(169),u=n(242),c=n(332),l=n(778),d=n(195).TAG_NAMES,p=function(e){a(n,e);var t=o(n);function n(e){var i;return r(this,n),(i=t.call(this,e)).parser=e,i.treeAdapter=i.parser.treeAdapter,i.posTracker=null,i.lastStartTagToken=null,i.lastFosterParentingLocation=null,i.currentToken=null,i}return i(n,[{key:"_setStartLocation",value:function(e){var t=null;this.lastStartTagToken&&((t=Object.assign({},this.lastStartTagToken.location)).startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}},{key:"_setEndLocation",value:function(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){var n=t.location,r=this.treeAdapter.getTagName(e),i={};t.type===u.END_TAG_TOKEN&&r===t.tagName?(i.endTag=Object.assign({},n),i.endLine=n.endLine,i.endCol=n.endCol,i.endOffset=n.endOffset):(i.endLine=n.startLine,i.endCol=n.startCol,i.endOffset=n.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}},{key:"_getOverriddenMethods",value:function(e,t){return{_bootstrap:function(n,r){t._bootstrap.call(this,n,r),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;var i=s.install(this.tokenizer,c);e.posTracker=i.posTracker,s.install(this.openElements,l,{onItemPop:function(t){e._setEndLocation(t,e.currentToken)}})},_runParsingLoop:function(n){t._runParsingLoop.call(this,n);for(var r=this.openElements.stackTop;r>=0;r--)e._setEndLocation(this.openElements.items[r],e.currentToken)},_processTokenInForeignContent:function(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n)},_processToken:function(n){if(e.currentToken=n,t._processToken.call(this,n),n.type===u.END_TAG_TOKEN&&(n.tagName===d.HTML||n.tagName===d.BODY&&this.openElements.hasInScope(d.BODY)))for(var r=this.openElements.stackTop;r>=0;r--){var i=this.openElements.items[r];if(this.treeAdapter.getTagName(i)===n.tagName){e._setEndLocation(i,n);break}}},_setDocumentType:function(e){t._setDocumentType.call(this,e);for(var n=this.treeAdapter.getChildNodes(this.document),r=n.length,i=0;i0;n--)e.onItemPop(this.items[n]);t.popAllUpToHtmlElement.call(this)},remove:function(n){e.onItemPop(this.current),t.remove.call(this,n)}}}}]),n}(n(169));e.exports=s},function(e,t,n){"use strict";var r=n(88),i=n(93),a=n(124),o=n(133),s=n(271),u=n(780),c=n(332),l=n(169),d=function(e){a(n,e);var t=o(n);function n(e,i){var a;return r(this,n),(a=t.call(this,e,i)).opts=i,a.ctLoc=null,a.locBeforeToken=!1,a}return i(n,[{key:"_setErrorLocation",value:function(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}},{key:"_getOverriddenMethods",value:function(e,t){return{_bootstrap:function(n,r){t._bootstrap.call(this,n,r),l.install(this.tokenizer,u,e.opts),l.install(this.tokenizer,c)},_processInputToken:function(n){e.ctLoc=n.location,t._processInputToken.call(this,n)},_err:function(t,n){e.locBeforeToken=n&&n.beforeToken,e._reportError(t)}}}}]),n}(s);e.exports=d},function(e,t,n){"use strict";var r=n(88),i=n(124),a=n(133),o=n(271),s=n(781),u=n(169),c=function(e){i(n,e);var t=a(n);function n(e,i){var a;r(this,n),a=t.call(this,e,i);var o=u.install(e.preprocessor,s,i);return a.posTracker=o.posTracker,a}return n}(o);e.exports=c},function(e,t,n){"use strict";var r=n(88),i=n(93),a=n(193),o=n(155),s=n(124),u=n(133),c=n(271),l=n(333),d=n(169),p=function(e){s(n,e);var t=u(n);function n(e,i){var a;return r(this,n),(a=t.call(this,e,i)).posTracker=d.install(e,l),a.lastErrOffset=-1,a}return i(n,[{key:"_reportError",value:function(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,a(o(n.prototype),"_reportError",this).call(this,e))}}]),n}(c);e.exports=p},function(e,t,n){"use strict";var r=n(195).DOCUMENT_MODE;t.createDocument=function(){return{nodeName:"#document",mode:r.NO_QUIRKS,childNodes:[]}},t.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}},t.createElement=function(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},t.createCommentNode=function(e){return{nodeName:"#comment",data:e,parentNode:null}};var i=function(e){return{nodeName:"#text",value:e,parentNode:null}},a=t.appendChild=function(e,t){e.childNodes.push(t),t.parentNode=e},o=t.insertBefore=function(e,t,n){var r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e};t.setTemplateContent=function(e,t){e.content=t},t.getTemplateContent=function(e){return e.content},t.setDocumentType=function(e,t,n,r){for(var i=null,o=0;o-1)return r.QUIRKS;var l=null===t?o:a;if(d(n,l))return r.QUIRKS;if(d(n,l=null===t?u:c))return r.LIMITED_QUIRKS}return r.NO_QUIRKS},t.serializeContent=function(e,t,n){var r="!DOCTYPE ";return e&&(r+=e),t?r+=" PUBLIC "+l(t):n&&(r+=" SYSTEM"),null!==n&&(r+=" "+l(n)),r}},function(e,t,n){"use strict";var r,i=n(164),a=n(242),o=n(195),s=o.TAG_NAMES,u=o.NAMESPACES,c=o.ATTRS,l="text/html",d="application/xhtml+xml",p={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},f={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:u.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:u.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:u.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:u.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:u.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:u.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:u.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:u.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:u.XML},"xml:space":{prefix:"xml",name:"space",namespace:u.XML},xmlns:{prefix:"",name:"xmlns",namespace:u.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:u.XMLNS}},h=t.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},g=(i(r={},s.B,!0),i(r,s.BIG,!0),i(r,s.BLOCKQUOTE,!0),i(r,s.BODY,!0),i(r,s.BR,!0),i(r,s.CENTER,!0),i(r,s.CODE,!0),i(r,s.DD,!0),i(r,s.DIV,!0),i(r,s.DL,!0),i(r,s.DT,!0),i(r,s.EM,!0),i(r,s.EMBED,!0),i(r,s.H1,!0),i(r,s.H2,!0),i(r,s.H3,!0),i(r,s.H4,!0),i(r,s.H5,!0),i(r,s.H6,!0),i(r,s.HEAD,!0),i(r,s.HR,!0),i(r,s.I,!0),i(r,s.IMG,!0),i(r,s.LI,!0),i(r,s.LISTING,!0),i(r,s.MENU,!0),i(r,s.META,!0),i(r,s.NOBR,!0),i(r,s.OL,!0),i(r,s.P,!0),i(r,s.PRE,!0),i(r,s.RUBY,!0),i(r,s.S,!0),i(r,s.SMALL,!0),i(r,s.SPAN,!0),i(r,s.STRONG,!0),i(r,s.STRIKE,!0),i(r,s.SUB,!0),i(r,s.SUP,!0),i(r,s.TABLE,!0),i(r,s.TT,!0),i(r,s.U,!0),i(r,s.UL,!0),i(r,s.VAR,!0),r);t.causesExit=function(e){var t=e.tagName;return!!(t===s.FONT&&(null!==a.getTokenAttr(e,c.COLOR)||null!==a.getTokenAttr(e,c.SIZE)||null!==a.getTokenAttr(e,c.FACE)))||g[t]},t.adjustTokenMathMLAttrs=function(e){for(var t=0;t`","url":false},"abruptClosingOfEmptyComment":{"reason":"Unexpected abruptly closed empty comment","description":"Unexpected `>` or `->`. Expected `--\x3e` to close comments"},"abruptDoctypePublicIdentifier":{"reason":"Unexpected abruptly closed public identifier","description":"Unexpected `>`. Expected a closing `\\"` or `\'` after the public identifier"},"abruptDoctypeSystemIdentifier":{"reason":"Unexpected abruptly closed system identifier","description":"Unexpected `>`. Expected a closing `\\"` or `\'` after the identifier identifier"},"absenceOfDigitsInNumericCharacterReference":{"reason":"Unexpected non-digit at start of numeric character reference","description":"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},"cdataInHtmlContent":{"reason":"Unexpected CDATA section in HTML","description":"Unexpected `` in ``","description":"Unexpected text character `%c`. Only use text in `

    ');\r\n let renderedViewLine = null;\r\n if (monospaceAssumptionsAreValid && canUseFastRenderedViewLine && lineData.isBasicASCII && options.useMonospaceOptimizations && output.containsForeignElements === 0 /* None */) {\r\n if (lineData.content.length < 300 && renderLineInput.lineTokens.getCount() < 100) {\r\n // Browser rounding errors have been observed in Chrome and IE, so using the fast\r\n // view line only for short lines. Please test before removing the length check...\r\n // ---\r\n // Another rounding error has been observed on Linux in VSCode, where width\r\n // rounding errors add up to an observable large number...\r\n // ---\r\n // Also see another example of rounding errors on Windows in\r\n // https://github.com/microsoft/vscode/issues/33178\r\n renderedViewLine = new FastRenderedViewLine(this._renderedViewLine ? this._renderedViewLine.domNode : null, renderLineInput, output.characterMapping);\r\n }\r\n }\r\n if (!renderedViewLine) {\r\n renderedViewLine = createRenderedLine(this._renderedViewLine ? this._renderedViewLine.domNode : null, renderLineInput, output.characterMapping, output.containsRTL, output.containsForeignElements);\r\n }\r\n this._renderedViewLine = renderedViewLine;\r\n return true;\r\n }\r\n layoutLine(lineNumber, deltaTop) {\r\n if (this._renderedViewLine && this._renderedViewLine.domNode) {\r\n this._renderedViewLine.domNode.setTop(deltaTop);\r\n this._renderedViewLine.domNode.setHeight(this._options.lineHeight);\r\n }\r\n }\r\n // --- end IVisibleLineData\r\n getWidth() {\r\n if (!this._renderedViewLine) {\r\n return 0;\r\n }\r\n return this._renderedViewLine.getWidth();\r\n }\r\n getWidthIsFast() {\r\n if (!this._renderedViewLine) {\r\n return true;\r\n }\r\n return this._renderedViewLine.getWidthIsFast();\r\n }\r\n needsMonospaceFontCheck() {\r\n if (!this._renderedViewLine) {\r\n return false;\r\n }\r\n return (this._renderedViewLine instanceof FastRenderedViewLine);\r\n }\r\n monospaceAssumptionsAreValid() {\r\n if (!this._renderedViewLine) {\r\n return monospaceAssumptionsAreValid;\r\n }\r\n if (this._renderedViewLine instanceof FastRenderedViewLine) {\r\n return this._renderedViewLine.monospaceAssumptionsAreValid();\r\n }\r\n return monospaceAssumptionsAreValid;\r\n }\r\n onMonospaceAssumptionsInvalidated() {\r\n if (this._renderedViewLine && this._renderedViewLine instanceof FastRenderedViewLine) {\r\n this._renderedViewLine = this._renderedViewLine.toSlowRenderedLine();\r\n }\r\n }\r\n getVisibleRangesForRange(startColumn, endColumn, context) {\r\n if (!this._renderedViewLine) {\r\n return null;\r\n }\r\n startColumn = startColumn | 0; // @perf\r\n endColumn = endColumn | 0; // @perf\r\n startColumn = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, startColumn));\r\n endColumn = Math.min(this._renderedViewLine.input.lineContent.length + 1, Math.max(1, endColumn));\r\n const stopRenderingLineAfter = this._renderedViewLine.input.stopRenderingLineAfter | 0; // @perf\r\n let outsideRenderedLine = false;\r\n if (stopRenderingLineAfter !== -1 && startColumn > stopRenderingLineAfter + 1 && endColumn > stopRenderingLineAfter + 1) {\r\n // This range is obviously not visible\r\n outsideRenderedLine = true;\r\n }\r\n if (stopRenderingLineAfter !== -1 && startColumn > stopRenderingLineAfter + 1) {\r\n startColumn = stopRenderingLineAfter + 1;\r\n }\r\n if (stopRenderingLineAfter !== -1 && endColumn > stopRenderingLineAfter + 1) {\r\n endColumn = stopRenderingLineAfter + 1;\r\n }\r\n const horizontalRanges = this._renderedViewLine.getVisibleRangesForRange(startColumn, endColumn, context);\r\n if (horizontalRanges && horizontalRanges.length > 0) {\r\n return new VisibleRanges(outsideRenderedLine, horizontalRanges);\r\n }\r\n return null;\r\n }\r\n getColumnOfNodeOffset(lineNumber, spanNode, offset) {\r\n if (!this._renderedViewLine) {\r\n return 1;\r\n }\r\n return this._renderedViewLine.getColumnOfNodeOffset(lineNumber, spanNode, offset);\r\n }\r\n}\r\nViewLine.CLASS_NAME = 'view-line';\r\n/**\r\n * A rendered line which is guaranteed to contain only regular ASCII and is rendered with a monospace font.\r\n */\r\nclass FastRenderedViewLine {\r\n constructor(domNode, renderLineInput, characterMapping) {\r\n this.domNode = domNode;\r\n this.input = renderLineInput;\r\n this._characterMapping = characterMapping;\r\n this._charWidth = renderLineInput.spaceWidth;\r\n }\r\n getWidth() {\r\n return this._getCharPosition(this._characterMapping.length);\r\n }\r\n getWidthIsFast() {\r\n return true;\r\n }\r\n monospaceAssumptionsAreValid() {\r\n if (!this.domNode) {\r\n return monospaceAssumptionsAreValid;\r\n }\r\n const expectedWidth = this.getWidth();\r\n const actualWidth = this.domNode.domNode.firstChild.offsetWidth;\r\n if (Math.abs(expectedWidth - actualWidth) >= 2) {\r\n // more than 2px off\r\n console.warn(`monospace assumptions have been violated, therefore disabling monospace optimizations!`);\r\n monospaceAssumptionsAreValid = false;\r\n }\r\n return monospaceAssumptionsAreValid;\r\n }\r\n toSlowRenderedLine() {\r\n return createRenderedLine(this.domNode, this.input, this._characterMapping, false, 0 /* None */);\r\n }\r\n getVisibleRangesForRange(startColumn, endColumn, context) {\r\n const startPosition = this._getCharPosition(startColumn);\r\n const endPosition = this._getCharPosition(endColumn);\r\n return [new HorizontalRange(startPosition, endPosition - startPosition)];\r\n }\r\n _getCharPosition(column) {\r\n const charOffset = this._characterMapping.getAbsoluteOffsets();\r\n if (charOffset.length === 0) {\r\n // No characters on this line\r\n return 0;\r\n }\r\n return Math.round(this._charWidth * charOffset[column - 1]);\r\n }\r\n getColumnOfNodeOffset(lineNumber, spanNode, offset) {\r\n const spanNodeTextContentLength = spanNode.textContent.length;\r\n let spanIndex = -1;\r\n while (spanNode) {\r\n spanNode = spanNode.previousSibling;\r\n spanIndex++;\r\n }\r\n const charOffset = this._characterMapping.partDataToCharOffset(spanIndex, spanNodeTextContentLength, offset);\r\n return charOffset + 1;\r\n }\r\n}\r\n/**\r\n * Every time we render a line, we save what we have rendered in an instance of this class.\r\n */\r\nclass RenderedViewLine {\r\n constructor(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) {\r\n this.domNode = domNode;\r\n this.input = renderLineInput;\r\n this._characterMapping = characterMapping;\r\n this._isWhitespaceOnly = /^\\s*$/.test(renderLineInput.lineContent);\r\n this._containsForeignElements = containsForeignElements;\r\n this._cachedWidth = -1;\r\n this._pixelOffsetCache = null;\r\n if (!containsRTL || this._characterMapping.length === 0 /* the line is empty */) {\r\n this._pixelOffsetCache = new Int32Array(Math.max(2, this._characterMapping.length + 1));\r\n for (let column = 0, len = this._characterMapping.length; column <= len; column++) {\r\n this._pixelOffsetCache[column] = -1;\r\n }\r\n }\r\n }\r\n // --- Reading from the DOM methods\r\n _getReadingTarget(myDomNode) {\r\n return myDomNode.domNode.firstChild;\r\n }\r\n /**\r\n * Width of the line in pixels\r\n */\r\n getWidth() {\r\n if (!this.domNode) {\r\n return 0;\r\n }\r\n if (this._cachedWidth === -1) {\r\n this._cachedWidth = this._getReadingTarget(this.domNode).offsetWidth;\r\n }\r\n return this._cachedWidth;\r\n }\r\n getWidthIsFast() {\r\n if (this._cachedWidth === -1) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * Visible ranges for a model range\r\n */\r\n getVisibleRangesForRange(startColumn, endColumn, context) {\r\n if (!this.domNode) {\r\n return null;\r\n }\r\n if (this._pixelOffsetCache !== null) {\r\n // the text is LTR\r\n const startOffset = this._readPixelOffset(this.domNode, startColumn, context);\r\n if (startOffset === -1) {\r\n return null;\r\n }\r\n const endOffset = this._readPixelOffset(this.domNode, endColumn, context);\r\n if (endOffset === -1) {\r\n return null;\r\n }\r\n return [new HorizontalRange(startOffset, endOffset - startOffset)];\r\n }\r\n return this._readVisibleRangesForRange(this.domNode, startColumn, endColumn, context);\r\n }\r\n _readVisibleRangesForRange(domNode, startColumn, endColumn, context) {\r\n if (startColumn === endColumn) {\r\n const pixelOffset = this._readPixelOffset(domNode, startColumn, context);\r\n if (pixelOffset === -1) {\r\n return null;\r\n }\r\n else {\r\n return [new HorizontalRange(pixelOffset, 0)];\r\n }\r\n }\r\n else {\r\n return this._readRawVisibleRangesForRange(domNode, startColumn, endColumn, context);\r\n }\r\n }\r\n _readPixelOffset(domNode, column, context) {\r\n if (this._characterMapping.length === 0) {\r\n // This line has no content\r\n if (this._containsForeignElements === 0 /* None */) {\r\n // We can assume the line is really empty\r\n return 0;\r\n }\r\n if (this._containsForeignElements === 2 /* After */) {\r\n // We have foreign elements after the (empty) line\r\n return 0;\r\n }\r\n if (this._containsForeignElements === 1 /* Before */) {\r\n // We have foreign elements before the (empty) line\r\n return this.getWidth();\r\n }\r\n // We have foreign elements before & after the (empty) line\r\n const readingTarget = this._getReadingTarget(domNode);\r\n if (readingTarget.firstChild) {\r\n return readingTarget.firstChild.offsetWidth;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n if (this._pixelOffsetCache !== null) {\r\n // the text is LTR\r\n const cachedPixelOffset = this._pixelOffsetCache[column];\r\n if (cachedPixelOffset !== -1) {\r\n return cachedPixelOffset;\r\n }\r\n const result = this._actualReadPixelOffset(domNode, column, context);\r\n this._pixelOffsetCache[column] = result;\r\n return result;\r\n }\r\n return this._actualReadPixelOffset(domNode, column, context);\r\n }\r\n _actualReadPixelOffset(domNode, column, context) {\r\n if (this._characterMapping.length === 0) {\r\n // This line has no content\r\n const r = RangeUtil.readHorizontalRanges(this._getReadingTarget(domNode), 0, 0, 0, 0, context.clientRectDeltaLeft, context.endNode);\r\n if (!r || r.length === 0) {\r\n return -1;\r\n }\r\n return r[0].left;\r\n }\r\n if (column === this._characterMapping.length && this._isWhitespaceOnly && this._containsForeignElements === 0 /* None */) {\r\n // This branch helps in the case of whitespace only lines which have a width set\r\n return this.getWidth();\r\n }\r\n const partData = this._characterMapping.charOffsetToPartData(column - 1);\r\n const partIndex = CharacterMapping.getPartIndex(partData);\r\n const charOffsetInPart = CharacterMapping.getCharIndex(partData);\r\n const r = RangeUtil.readHorizontalRanges(this._getReadingTarget(domNode), partIndex, charOffsetInPart, partIndex, charOffsetInPart, context.clientRectDeltaLeft, context.endNode);\r\n if (!r || r.length === 0) {\r\n return -1;\r\n }\r\n const result = r[0].left;\r\n if (this.input.isBasicASCII) {\r\n const charOffset = this._characterMapping.getAbsoluteOffsets();\r\n const expectedResult = Math.round(this.input.spaceWidth * charOffset[column - 1]);\r\n if (Math.abs(expectedResult - result) <= 1) {\r\n return expectedResult;\r\n }\r\n }\r\n return result;\r\n }\r\n _readRawVisibleRangesForRange(domNode, startColumn, endColumn, context) {\r\n if (startColumn === 1 && endColumn === this._characterMapping.length) {\r\n // This branch helps IE with bidi text & gives a performance boost to other browsers when reading visible ranges for an entire line\r\n return [new HorizontalRange(0, this.getWidth())];\r\n }\r\n const startPartData = this._characterMapping.charOffsetToPartData(startColumn - 1);\r\n const startPartIndex = CharacterMapping.getPartIndex(startPartData);\r\n const startCharOffsetInPart = CharacterMapping.getCharIndex(startPartData);\r\n const endPartData = this._characterMapping.charOffsetToPartData(endColumn - 1);\r\n const endPartIndex = CharacterMapping.getPartIndex(endPartData);\r\n const endCharOffsetInPart = CharacterMapping.getCharIndex(endPartData);\r\n return RangeUtil.readHorizontalRanges(this._getReadingTarget(domNode), startPartIndex, startCharOffsetInPart, endPartIndex, endCharOffsetInPart, context.clientRectDeltaLeft, context.endNode);\r\n }\r\n /**\r\n * Returns the column for the text found at a specific offset inside a rendered dom node\r\n */\r\n getColumnOfNodeOffset(lineNumber, spanNode, offset) {\r\n const spanNodeTextContentLength = spanNode.textContent.length;\r\n let spanIndex = -1;\r\n while (spanNode) {\r\n spanNode = spanNode.previousSibling;\r\n spanIndex++;\r\n }\r\n const charOffset = this._characterMapping.partDataToCharOffset(spanIndex, spanNodeTextContentLength, offset);\r\n return charOffset + 1;\r\n }\r\n}\r\nclass WebKitRenderedViewLine extends RenderedViewLine {\r\n _readVisibleRangesForRange(domNode, startColumn, endColumn, context) {\r\n const output = super._readVisibleRangesForRange(domNode, startColumn, endColumn, context);\r\n if (!output || output.length === 0 || startColumn === endColumn || (startColumn === 1 && endColumn === this._characterMapping.length)) {\r\n return output;\r\n }\r\n // WebKit is buggy and returns an expanded range (to contain words in some cases)\r\n // The last client rect is enlarged (I think)\r\n if (!this.input.containsRTL) {\r\n // This is an attempt to patch things up\r\n // Find position of last column\r\n const endPixelOffset = this._readPixelOffset(domNode, endColumn, context);\r\n if (endPixelOffset !== -1) {\r\n const lastRange = output[output.length - 1];\r\n if (lastRange.left < endPixelOffset) {\r\n // Trim down the width of the last visible range to not go after the last column's position\r\n lastRange.width = endPixelOffset - lastRange.left;\r\n }\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nconst createRenderedLine = (function () {\r\n if (browser.isWebKit) {\r\n return createWebKitRenderedLine;\r\n }\r\n return createNormalRenderedLine;\r\n})();\r\nfunction createWebKitRenderedLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) {\r\n return new WebKitRenderedViewLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements);\r\n}\r\nfunction createNormalRenderedLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements) {\r\n return new RenderedViewLine(domNode, renderLineInput, characterMapping, containsRTL, containsForeignElements);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as browser from '../../../base/browser/browser.js';\r\nimport { PageCoordinates } from '../editorDom.js';\r\nimport { PartFingerprints } from '../view/viewPart.js';\r\nimport { ViewLine } from '../viewParts/lines/viewLine.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range as EditorRange } from '../../common/core/range.js';\r\nimport { CursorColumns } from '../../common/controller/cursorCommon.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { AtomicTabMoveOperations } from '../../common/controller/cursorAtomicMoveOperations.js';\r\nexport class PointerHandlerLastRenderData {\r\n constructor(lastViewCursorsRenderData, lastTextareaPosition) {\r\n this.lastViewCursorsRenderData = lastViewCursorsRenderData;\r\n this.lastTextareaPosition = lastTextareaPosition;\r\n }\r\n}\r\nexport class MouseTarget {\r\n constructor(element, type, mouseColumn = 0, position = null, range = null, detail = null) {\r\n this.element = element;\r\n this.type = type;\r\n this.mouseColumn = mouseColumn;\r\n this.position = position;\r\n if (!range && position) {\r\n range = new EditorRange(position.lineNumber, position.column, position.lineNumber, position.column);\r\n }\r\n this.range = range;\r\n this.detail = detail;\r\n }\r\n static _typeToString(type) {\r\n if (type === 1 /* TEXTAREA */) {\r\n return 'TEXTAREA';\r\n }\r\n if (type === 2 /* GUTTER_GLYPH_MARGIN */) {\r\n return 'GUTTER_GLYPH_MARGIN';\r\n }\r\n if (type === 3 /* GUTTER_LINE_NUMBERS */) {\r\n return 'GUTTER_LINE_NUMBERS';\r\n }\r\n if (type === 4 /* GUTTER_LINE_DECORATIONS */) {\r\n return 'GUTTER_LINE_DECORATIONS';\r\n }\r\n if (type === 5 /* GUTTER_VIEW_ZONE */) {\r\n return 'GUTTER_VIEW_ZONE';\r\n }\r\n if (type === 6 /* CONTENT_TEXT */) {\r\n return 'CONTENT_TEXT';\r\n }\r\n if (type === 7 /* CONTENT_EMPTY */) {\r\n return 'CONTENT_EMPTY';\r\n }\r\n if (type === 8 /* CONTENT_VIEW_ZONE */) {\r\n return 'CONTENT_VIEW_ZONE';\r\n }\r\n if (type === 9 /* CONTENT_WIDGET */) {\r\n return 'CONTENT_WIDGET';\r\n }\r\n if (type === 10 /* OVERVIEW_RULER */) {\r\n return 'OVERVIEW_RULER';\r\n }\r\n if (type === 11 /* SCROLLBAR */) {\r\n return 'SCROLLBAR';\r\n }\r\n if (type === 12 /* OVERLAY_WIDGET */) {\r\n return 'OVERLAY_WIDGET';\r\n }\r\n return 'UNKNOWN';\r\n }\r\n static toString(target) {\r\n return this._typeToString(target.type) + ': ' + target.position + ' - ' + target.range + ' - ' + target.detail;\r\n }\r\n toString() {\r\n return MouseTarget.toString(this);\r\n }\r\n}\r\nclass ElementPath {\r\n static isTextArea(path) {\r\n return (path.length === 2\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[1] === 6 /* TextArea */);\r\n }\r\n static isChildOfViewLines(path) {\r\n return (path.length >= 4\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[3] === 7 /* ViewLines */);\r\n }\r\n static isStrictChildOfViewLines(path) {\r\n return (path.length > 4\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[3] === 7 /* ViewLines */);\r\n }\r\n static isChildOfScrollableElement(path) {\r\n return (path.length >= 2\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[1] === 5 /* ScrollableElement */);\r\n }\r\n static isChildOfMinimap(path) {\r\n return (path.length >= 2\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[1] === 8 /* Minimap */);\r\n }\r\n static isChildOfContentWidgets(path) {\r\n return (path.length >= 4\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[3] === 1 /* ContentWidgets */);\r\n }\r\n static isChildOfOverflowingContentWidgets(path) {\r\n return (path.length >= 1\r\n && path[0] === 2 /* OverflowingContentWidgets */);\r\n }\r\n static isChildOfOverlayWidgets(path) {\r\n return (path.length >= 2\r\n && path[0] === 3 /* OverflowGuard */\r\n && path[1] === 4 /* OverlayWidgets */);\r\n }\r\n}\r\nexport class HitTestContext {\r\n constructor(context, viewHelper, lastRenderData) {\r\n this.model = context.model;\r\n const options = context.configuration.options;\r\n this.layoutInfo = options.get(124 /* layoutInfo */);\r\n this.viewDomNode = viewHelper.viewDomNode;\r\n this.lineHeight = options.get(53 /* lineHeight */);\r\n this.stickyTabStops = options.get(99 /* stickyTabStops */);\r\n this.typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n this.lastRenderData = lastRenderData;\r\n this._context = context;\r\n this._viewHelper = viewHelper;\r\n }\r\n getZoneAtCoord(mouseVerticalOffset) {\r\n return HitTestContext.getZoneAtCoord(this._context, mouseVerticalOffset);\r\n }\r\n static getZoneAtCoord(context, mouseVerticalOffset) {\r\n // The target is either a view zone or the empty space after the last view-line\r\n const viewZoneWhitespace = context.viewLayout.getWhitespaceAtVerticalOffset(mouseVerticalOffset);\r\n if (viewZoneWhitespace) {\r\n const viewZoneMiddle = viewZoneWhitespace.verticalOffset + viewZoneWhitespace.height / 2;\r\n const lineCount = context.model.getLineCount();\r\n let positionBefore = null;\r\n let position;\r\n let positionAfter = null;\r\n if (viewZoneWhitespace.afterLineNumber !== lineCount) {\r\n // There are more lines after this view zone\r\n positionAfter = new Position(viewZoneWhitespace.afterLineNumber + 1, 1);\r\n }\r\n if (viewZoneWhitespace.afterLineNumber > 0) {\r\n // There are more lines above this view zone\r\n positionBefore = new Position(viewZoneWhitespace.afterLineNumber, context.model.getLineMaxColumn(viewZoneWhitespace.afterLineNumber));\r\n }\r\n if (positionAfter === null) {\r\n position = positionBefore;\r\n }\r\n else if (positionBefore === null) {\r\n position = positionAfter;\r\n }\r\n else if (mouseVerticalOffset < viewZoneMiddle) {\r\n position = positionBefore;\r\n }\r\n else {\r\n position = positionAfter;\r\n }\r\n return {\r\n viewZoneId: viewZoneWhitespace.id,\r\n afterLineNumber: viewZoneWhitespace.afterLineNumber,\r\n positionBefore: positionBefore,\r\n positionAfter: positionAfter,\r\n position: position\r\n };\r\n }\r\n return null;\r\n }\r\n getFullLineRangeAtCoord(mouseVerticalOffset) {\r\n if (this._context.viewLayout.isAfterLines(mouseVerticalOffset)) {\r\n // Below the last line\r\n const lineNumber = this._context.model.getLineCount();\r\n const maxLineColumn = this._context.model.getLineMaxColumn(lineNumber);\r\n return {\r\n range: new EditorRange(lineNumber, maxLineColumn, lineNumber, maxLineColumn),\r\n isAfterLines: true\r\n };\r\n }\r\n const lineNumber = this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset);\r\n const maxLineColumn = this._context.model.getLineMaxColumn(lineNumber);\r\n return {\r\n range: new EditorRange(lineNumber, 1, lineNumber, maxLineColumn),\r\n isAfterLines: false\r\n };\r\n }\r\n getLineNumberAtVerticalOffset(mouseVerticalOffset) {\r\n return this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset);\r\n }\r\n isAfterLines(mouseVerticalOffset) {\r\n return this._context.viewLayout.isAfterLines(mouseVerticalOffset);\r\n }\r\n isInTopPadding(mouseVerticalOffset) {\r\n return this._context.viewLayout.isInTopPadding(mouseVerticalOffset);\r\n }\r\n isInBottomPadding(mouseVerticalOffset) {\r\n return this._context.viewLayout.isInBottomPadding(mouseVerticalOffset);\r\n }\r\n getVerticalOffsetForLineNumber(lineNumber) {\r\n return this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber);\r\n }\r\n findAttribute(element, attr) {\r\n return HitTestContext._findAttribute(element, attr, this._viewHelper.viewDomNode);\r\n }\r\n static _findAttribute(element, attr, stopAt) {\r\n while (element && element !== document.body) {\r\n if (element.hasAttribute && element.hasAttribute(attr)) {\r\n return element.getAttribute(attr);\r\n }\r\n if (element === stopAt) {\r\n return null;\r\n }\r\n element = element.parentNode;\r\n }\r\n return null;\r\n }\r\n getLineWidth(lineNumber) {\r\n return this._viewHelper.getLineWidth(lineNumber);\r\n }\r\n visibleRangeForPosition(lineNumber, column) {\r\n return this._viewHelper.visibleRangeForPosition(lineNumber, column);\r\n }\r\n getPositionFromDOMInfo(spanNode, offset) {\r\n return this._viewHelper.getPositionFromDOMInfo(spanNode, offset);\r\n }\r\n getCurrentScrollTop() {\r\n return this._context.viewLayout.getCurrentScrollTop();\r\n }\r\n getCurrentScrollLeft() {\r\n return this._context.viewLayout.getCurrentScrollLeft();\r\n }\r\n}\r\nclass BareHitTestRequest {\r\n constructor(ctx, editorPos, pos) {\r\n this.editorPos = editorPos;\r\n this.pos = pos;\r\n this.mouseVerticalOffset = Math.max(0, ctx.getCurrentScrollTop() + pos.y - editorPos.y);\r\n this.mouseContentHorizontalOffset = ctx.getCurrentScrollLeft() + pos.x - editorPos.x - ctx.layoutInfo.contentLeft;\r\n this.isInMarginArea = (pos.x - editorPos.x < ctx.layoutInfo.contentLeft && pos.x - editorPos.x >= ctx.layoutInfo.glyphMarginLeft);\r\n this.isInContentArea = !this.isInMarginArea;\r\n this.mouseColumn = Math.max(0, MouseTargetFactory._getMouseColumn(this.mouseContentHorizontalOffset, ctx.typicalHalfwidthCharacterWidth));\r\n }\r\n}\r\nclass HitTestRequest extends BareHitTestRequest {\r\n constructor(ctx, editorPos, pos, target) {\r\n super(ctx, editorPos, pos);\r\n this._ctx = ctx;\r\n if (target) {\r\n this.target = target;\r\n this.targetPath = PartFingerprints.collect(target, ctx.viewDomNode);\r\n }\r\n else {\r\n this.target = null;\r\n this.targetPath = new Uint8Array(0);\r\n }\r\n }\r\n toString() {\r\n return `pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\\n\\ttarget: ${this.target ? this.target.outerHTML : null}`;\r\n }\r\n fulfill(type, position = null, range = null, detail = null) {\r\n let mouseColumn = this.mouseColumn;\r\n if (position && position.column < this._ctx.model.getLineMaxColumn(position.lineNumber)) {\r\n // Most likely, the line contains foreign decorations...\r\n mouseColumn = CursorColumns.visibleColumnFromColumn(this._ctx.model.getLineContent(position.lineNumber), position.column, this._ctx.model.getTextModelOptions().tabSize) + 1;\r\n }\r\n return new MouseTarget(this.target, type, mouseColumn, position, range, detail);\r\n }\r\n withTarget(target) {\r\n return new HitTestRequest(this._ctx, this.editorPos, this.pos, target);\r\n }\r\n}\r\nconst EMPTY_CONTENT_AFTER_LINES = { isAfterLines: true };\r\nfunction createEmptyContentDataInLines(horizontalDistanceToText) {\r\n return {\r\n isAfterLines: false,\r\n horizontalDistanceToText: horizontalDistanceToText\r\n };\r\n}\r\nexport class MouseTargetFactory {\r\n constructor(context, viewHelper) {\r\n this._context = context;\r\n this._viewHelper = viewHelper;\r\n }\r\n mouseTargetIsWidget(e) {\r\n const t = e.target;\r\n const path = PartFingerprints.collect(t, this._viewHelper.viewDomNode);\r\n // Is it a content widget?\r\n if (ElementPath.isChildOfContentWidgets(path) || ElementPath.isChildOfOverflowingContentWidgets(path)) {\r\n return true;\r\n }\r\n // Is it an overlay widget?\r\n if (ElementPath.isChildOfOverlayWidgets(path)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n createMouseTarget(lastRenderData, editorPos, pos, target) {\r\n const ctx = new HitTestContext(this._context, this._viewHelper, lastRenderData);\r\n const request = new HitTestRequest(ctx, editorPos, pos, target);\r\n try {\r\n const r = MouseTargetFactory._createMouseTarget(ctx, request, false);\r\n // console.log(r.toString());\r\n return r;\r\n }\r\n catch (err) {\r\n // console.log(err);\r\n return request.fulfill(0 /* UNKNOWN */);\r\n }\r\n }\r\n static _createMouseTarget(ctx, request, domHitTestExecuted) {\r\n // console.log(`${domHitTestExecuted ? '=>' : ''}CAME IN REQUEST: ${request}`);\r\n // First ensure the request has a target\r\n if (request.target === null) {\r\n if (domHitTestExecuted) {\r\n // Still no target... and we have already executed hit test...\r\n return request.fulfill(0 /* UNKNOWN */);\r\n }\r\n const hitTestResult = MouseTargetFactory._doHitTest(ctx, request);\r\n if (hitTestResult.position) {\r\n return MouseTargetFactory.createMouseTargetFromHitTestPosition(ctx, request, hitTestResult.position.lineNumber, hitTestResult.position.column);\r\n }\r\n return this._createMouseTarget(ctx, request.withTarget(hitTestResult.hitTarget), true);\r\n }\r\n // we know for a fact that request.target is not null\r\n const resolvedRequest = request;\r\n let result = null;\r\n result = result || MouseTargetFactory._hitTestContentWidget(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestOverlayWidget(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestMinimap(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestScrollbarSlider(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestViewZone(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestMargin(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestViewCursor(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestTextArea(ctx, resolvedRequest);\r\n result = result || MouseTargetFactory._hitTestViewLines(ctx, resolvedRequest, domHitTestExecuted);\r\n result = result || MouseTargetFactory._hitTestScrollbar(ctx, resolvedRequest);\r\n return (result || request.fulfill(0 /* UNKNOWN */));\r\n }\r\n static _hitTestContentWidget(ctx, request) {\r\n // Is it a content widget?\r\n if (ElementPath.isChildOfContentWidgets(request.targetPath) || ElementPath.isChildOfOverflowingContentWidgets(request.targetPath)) {\r\n const widgetId = ctx.findAttribute(request.target, 'widgetId');\r\n if (widgetId) {\r\n return request.fulfill(9 /* CONTENT_WIDGET */, null, null, widgetId);\r\n }\r\n else {\r\n return request.fulfill(0 /* UNKNOWN */);\r\n }\r\n }\r\n return null;\r\n }\r\n static _hitTestOverlayWidget(ctx, request) {\r\n // Is it an overlay widget?\r\n if (ElementPath.isChildOfOverlayWidgets(request.targetPath)) {\r\n const widgetId = ctx.findAttribute(request.target, 'widgetId');\r\n if (widgetId) {\r\n return request.fulfill(12 /* OVERLAY_WIDGET */, null, null, widgetId);\r\n }\r\n else {\r\n return request.fulfill(0 /* UNKNOWN */);\r\n }\r\n }\r\n return null;\r\n }\r\n static _hitTestViewCursor(ctx, request) {\r\n if (request.target) {\r\n // Check if we've hit a painted cursor\r\n const lastViewCursorsRenderData = ctx.lastRenderData.lastViewCursorsRenderData;\r\n for (const d of lastViewCursorsRenderData) {\r\n if (request.target === d.domNode) {\r\n return request.fulfill(6 /* CONTENT_TEXT */, d.position);\r\n }\r\n }\r\n }\r\n if (request.isInContentArea) {\r\n // Edge has a bug when hit-testing the exact position of a cursor,\r\n // instead of returning the correct dom node, it returns the\r\n // first or last rendered view line dom node, therefore help it out\r\n // and first check if we are on top of a cursor\r\n const lastViewCursorsRenderData = ctx.lastRenderData.lastViewCursorsRenderData;\r\n const mouseContentHorizontalOffset = request.mouseContentHorizontalOffset;\r\n const mouseVerticalOffset = request.mouseVerticalOffset;\r\n for (const d of lastViewCursorsRenderData) {\r\n if (mouseContentHorizontalOffset < d.contentLeft) {\r\n // mouse position is to the left of the cursor\r\n continue;\r\n }\r\n if (mouseContentHorizontalOffset > d.contentLeft + d.width) {\r\n // mouse position is to the right of the cursor\r\n continue;\r\n }\r\n const cursorVerticalOffset = ctx.getVerticalOffsetForLineNumber(d.position.lineNumber);\r\n if (cursorVerticalOffset <= mouseVerticalOffset\r\n && mouseVerticalOffset <= cursorVerticalOffset + d.height) {\r\n return request.fulfill(6 /* CONTENT_TEXT */, d.position);\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n static _hitTestViewZone(ctx, request) {\r\n const viewZoneData = ctx.getZoneAtCoord(request.mouseVerticalOffset);\r\n if (viewZoneData) {\r\n const mouseTargetType = (request.isInContentArea ? 8 /* CONTENT_VIEW_ZONE */ : 5 /* GUTTER_VIEW_ZONE */);\r\n return request.fulfill(mouseTargetType, viewZoneData.position, null, viewZoneData);\r\n }\r\n return null;\r\n }\r\n static _hitTestTextArea(ctx, request) {\r\n // Is it the textarea?\r\n if (ElementPath.isTextArea(request.targetPath)) {\r\n if (ctx.lastRenderData.lastTextareaPosition) {\r\n return request.fulfill(6 /* CONTENT_TEXT */, ctx.lastRenderData.lastTextareaPosition);\r\n }\r\n return request.fulfill(1 /* TEXTAREA */, ctx.lastRenderData.lastTextareaPosition);\r\n }\r\n return null;\r\n }\r\n static _hitTestMargin(ctx, request) {\r\n if (request.isInMarginArea) {\r\n const res = ctx.getFullLineRangeAtCoord(request.mouseVerticalOffset);\r\n const pos = res.range.getStartPosition();\r\n let offset = Math.abs(request.pos.x - request.editorPos.x);\r\n const detail = {\r\n isAfterLines: res.isAfterLines,\r\n glyphMarginLeft: ctx.layoutInfo.glyphMarginLeft,\r\n glyphMarginWidth: ctx.layoutInfo.glyphMarginWidth,\r\n lineNumbersWidth: ctx.layoutInfo.lineNumbersWidth,\r\n offsetX: offset\r\n };\r\n offset -= ctx.layoutInfo.glyphMarginLeft;\r\n if (offset <= ctx.layoutInfo.glyphMarginWidth) {\r\n // On the glyph margin\r\n return request.fulfill(2 /* GUTTER_GLYPH_MARGIN */, pos, res.range, detail);\r\n }\r\n offset -= ctx.layoutInfo.glyphMarginWidth;\r\n if (offset <= ctx.layoutInfo.lineNumbersWidth) {\r\n // On the line numbers\r\n return request.fulfill(3 /* GUTTER_LINE_NUMBERS */, pos, res.range, detail);\r\n }\r\n offset -= ctx.layoutInfo.lineNumbersWidth;\r\n // On the line decorations\r\n return request.fulfill(4 /* GUTTER_LINE_DECORATIONS */, pos, res.range, detail);\r\n }\r\n return null;\r\n }\r\n static _hitTestViewLines(ctx, request, domHitTestExecuted) {\r\n if (!ElementPath.isChildOfViewLines(request.targetPath)) {\r\n return null;\r\n }\r\n if (ctx.isInTopPadding(request.mouseVerticalOffset)) {\r\n return request.fulfill(7 /* CONTENT_EMPTY */, new Position(1, 1), undefined, EMPTY_CONTENT_AFTER_LINES);\r\n }\r\n // Check if it is below any lines and any view zones\r\n if (ctx.isAfterLines(request.mouseVerticalOffset) || ctx.isInBottomPadding(request.mouseVerticalOffset)) {\r\n // This most likely indicates it happened after the last view-line\r\n const lineCount = ctx.model.getLineCount();\r\n const maxLineColumn = ctx.model.getLineMaxColumn(lineCount);\r\n return request.fulfill(7 /* CONTENT_EMPTY */, new Position(lineCount, maxLineColumn), undefined, EMPTY_CONTENT_AFTER_LINES);\r\n }\r\n if (domHitTestExecuted) {\r\n // Check if we are hitting a view-line (can happen in the case of inline decorations on empty lines)\r\n // See https://github.com/microsoft/vscode/issues/46942\r\n if (ElementPath.isStrictChildOfViewLines(request.targetPath)) {\r\n const lineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\r\n if (ctx.model.getLineLength(lineNumber) === 0) {\r\n const lineWidth = ctx.getLineWidth(lineNumber);\r\n const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\r\n return request.fulfill(7 /* CONTENT_EMPTY */, new Position(lineNumber, 1), undefined, detail);\r\n }\r\n const lineWidth = ctx.getLineWidth(lineNumber);\r\n if (request.mouseContentHorizontalOffset >= lineWidth) {\r\n const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\r\n const pos = new Position(lineNumber, ctx.model.getLineMaxColumn(lineNumber));\r\n return request.fulfill(7 /* CONTENT_EMPTY */, pos, undefined, detail);\r\n }\r\n }\r\n // We have already executed hit test...\r\n return request.fulfill(0 /* UNKNOWN */);\r\n }\r\n const hitTestResult = MouseTargetFactory._doHitTest(ctx, request);\r\n if (hitTestResult.position) {\r\n return MouseTargetFactory.createMouseTargetFromHitTestPosition(ctx, request, hitTestResult.position.lineNumber, hitTestResult.position.column);\r\n }\r\n return this._createMouseTarget(ctx, request.withTarget(hitTestResult.hitTarget), true);\r\n }\r\n static _hitTestMinimap(ctx, request) {\r\n if (ElementPath.isChildOfMinimap(request.targetPath)) {\r\n const possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\r\n const maxColumn = ctx.model.getLineMaxColumn(possibleLineNumber);\r\n return request.fulfill(11 /* SCROLLBAR */, new Position(possibleLineNumber, maxColumn));\r\n }\r\n return null;\r\n }\r\n static _hitTestScrollbarSlider(ctx, request) {\r\n if (ElementPath.isChildOfScrollableElement(request.targetPath)) {\r\n if (request.target && request.target.nodeType === 1) {\r\n const className = request.target.className;\r\n if (className && /\\b(slider|scrollbar)\\b/.test(className)) {\r\n const possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\r\n const maxColumn = ctx.model.getLineMaxColumn(possibleLineNumber);\r\n return request.fulfill(11 /* SCROLLBAR */, new Position(possibleLineNumber, maxColumn));\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n static _hitTestScrollbar(ctx, request) {\r\n // Is it the overview ruler?\r\n // Is it a child of the scrollable element?\r\n if (ElementPath.isChildOfScrollableElement(request.targetPath)) {\r\n const possibleLineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\r\n const maxColumn = ctx.model.getLineMaxColumn(possibleLineNumber);\r\n return request.fulfill(11 /* SCROLLBAR */, new Position(possibleLineNumber, maxColumn));\r\n }\r\n return null;\r\n }\r\n getMouseColumn(editorPos, pos) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const mouseContentHorizontalOffset = this._context.viewLayout.getCurrentScrollLeft() + pos.x - editorPos.x - layoutInfo.contentLeft;\r\n return MouseTargetFactory._getMouseColumn(mouseContentHorizontalOffset, options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth);\r\n }\r\n static _getMouseColumn(mouseContentHorizontalOffset, typicalHalfwidthCharacterWidth) {\r\n if (mouseContentHorizontalOffset < 0) {\r\n return 1;\r\n }\r\n const chars = Math.round(mouseContentHorizontalOffset / typicalHalfwidthCharacterWidth);\r\n return (chars + 1);\r\n }\r\n static createMouseTargetFromHitTestPosition(ctx, request, lineNumber, column) {\r\n const pos = new Position(lineNumber, column);\r\n const lineWidth = ctx.getLineWidth(lineNumber);\r\n if (request.mouseContentHorizontalOffset > lineWidth) {\r\n if (browser.isEdgeLegacy && pos.column === 1) {\r\n // See https://github.com/microsoft/vscode/issues/10875\r\n const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\r\n return request.fulfill(7 /* CONTENT_EMPTY */, new Position(lineNumber, ctx.model.getLineMaxColumn(lineNumber)), undefined, detail);\r\n }\r\n const detail = createEmptyContentDataInLines(request.mouseContentHorizontalOffset - lineWidth);\r\n return request.fulfill(7 /* CONTENT_EMPTY */, pos, undefined, detail);\r\n }\r\n const visibleRange = ctx.visibleRangeForPosition(lineNumber, column);\r\n if (!visibleRange) {\r\n return request.fulfill(0 /* UNKNOWN */, pos);\r\n }\r\n const columnHorizontalOffset = visibleRange.left;\r\n if (request.mouseContentHorizontalOffset === columnHorizontalOffset) {\r\n return request.fulfill(6 /* CONTENT_TEXT */, pos);\r\n }\r\n const points = [];\r\n points.push({ offset: visibleRange.left, column: column });\r\n if (column > 1) {\r\n const visibleRange = ctx.visibleRangeForPosition(lineNumber, column - 1);\r\n if (visibleRange) {\r\n points.push({ offset: visibleRange.left, column: column - 1 });\r\n }\r\n }\r\n const lineMaxColumn = ctx.model.getLineMaxColumn(lineNumber);\r\n if (column < lineMaxColumn) {\r\n const visibleRange = ctx.visibleRangeForPosition(lineNumber, column + 1);\r\n if (visibleRange) {\r\n points.push({ offset: visibleRange.left, column: column + 1 });\r\n }\r\n }\r\n points.sort((a, b) => a.offset - b.offset);\r\n for (let i = 1; i < points.length; i++) {\r\n const prev = points[i - 1];\r\n const curr = points[i];\r\n if (prev.offset <= request.mouseContentHorizontalOffset && request.mouseContentHorizontalOffset <= curr.offset) {\r\n const rng = new EditorRange(lineNumber, prev.column, lineNumber, curr.column);\r\n return request.fulfill(6 /* CONTENT_TEXT */, pos, rng);\r\n }\r\n }\r\n return request.fulfill(6 /* CONTENT_TEXT */, pos);\r\n }\r\n /**\r\n * Most probably WebKit browsers and Edge\r\n */\r\n static _doHitTestWithCaretRangeFromPoint(ctx, request) {\r\n // In Chrome, especially on Linux it is possible to click between lines,\r\n // so try to adjust the `hity` below so that it lands in the center of a line\r\n const lineNumber = ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);\r\n const lineVerticalOffset = ctx.getVerticalOffsetForLineNumber(lineNumber);\r\n const lineCenteredVerticalOffset = lineVerticalOffset + Math.floor(ctx.lineHeight / 2);\r\n let adjustedPageY = request.pos.y + (lineCenteredVerticalOffset - request.mouseVerticalOffset);\r\n if (adjustedPageY <= request.editorPos.y) {\r\n adjustedPageY = request.editorPos.y + 1;\r\n }\r\n if (adjustedPageY >= request.editorPos.y + ctx.layoutInfo.height) {\r\n adjustedPageY = request.editorPos.y + ctx.layoutInfo.height - 1;\r\n }\r\n const adjustedPage = new PageCoordinates(request.pos.x, adjustedPageY);\r\n const r = this._actualDoHitTestWithCaretRangeFromPoint(ctx, adjustedPage.toClientCoordinates());\r\n if (r.position) {\r\n return r;\r\n }\r\n // Also try to hit test without the adjustment (for the edge cases that we are near the top or bottom)\r\n return this._actualDoHitTestWithCaretRangeFromPoint(ctx, request.pos.toClientCoordinates());\r\n }\r\n static _actualDoHitTestWithCaretRangeFromPoint(ctx, coords) {\r\n const shadowRoot = dom.getShadowRoot(ctx.viewDomNode);\r\n let range;\r\n if (shadowRoot) {\r\n if (typeof shadowRoot.caretRangeFromPoint === 'undefined') {\r\n range = shadowCaretRangeFromPoint(shadowRoot, coords.clientX, coords.clientY);\r\n }\r\n else {\r\n range = shadowRoot.caretRangeFromPoint(coords.clientX, coords.clientY);\r\n }\r\n }\r\n else {\r\n range = document.caretRangeFromPoint(coords.clientX, coords.clientY);\r\n }\r\n if (!range || !range.startContainer) {\r\n return {\r\n position: null,\r\n hitTarget: null\r\n };\r\n }\r\n // Chrome always hits a TEXT_NODE, while Edge sometimes hits a token span\r\n const startContainer = range.startContainer;\r\n let hitTarget = null;\r\n if (startContainer.nodeType === startContainer.TEXT_NODE) {\r\n // startContainer is expected to be the token text\r\n const parent1 = startContainer.parentNode; // expected to be the token span\r\n const parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line container span\r\n const parent3 = parent2 ? parent2.parentNode : null; // expected to be the view line div\r\n const parent3ClassName = parent3 && parent3.nodeType === parent3.ELEMENT_NODE ? parent3.className : null;\r\n if (parent3ClassName === ViewLine.CLASS_NAME) {\r\n const p = ctx.getPositionFromDOMInfo(parent1, range.startOffset);\r\n return {\r\n position: p,\r\n hitTarget: null\r\n };\r\n }\r\n else {\r\n hitTarget = startContainer.parentNode;\r\n }\r\n }\r\n else if (startContainer.nodeType === startContainer.ELEMENT_NODE) {\r\n // startContainer is expected to be the token span\r\n const parent1 = startContainer.parentNode; // expected to be the view line container span\r\n const parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line div\r\n const parent2ClassName = parent2 && parent2.nodeType === parent2.ELEMENT_NODE ? parent2.className : null;\r\n if (parent2ClassName === ViewLine.CLASS_NAME) {\r\n const p = ctx.getPositionFromDOMInfo(startContainer, startContainer.textContent.length);\r\n return {\r\n position: p,\r\n hitTarget: null\r\n };\r\n }\r\n else {\r\n hitTarget = startContainer;\r\n }\r\n }\r\n return {\r\n position: null,\r\n hitTarget: hitTarget\r\n };\r\n }\r\n /**\r\n * Most probably Gecko\r\n */\r\n static _doHitTestWithCaretPositionFromPoint(ctx, coords) {\r\n const hitResult = document.caretPositionFromPoint(coords.clientX, coords.clientY);\r\n if (hitResult.offsetNode.nodeType === hitResult.offsetNode.TEXT_NODE) {\r\n // offsetNode is expected to be the token text\r\n const parent1 = hitResult.offsetNode.parentNode; // expected to be the token span\r\n const parent2 = parent1 ? parent1.parentNode : null; // expected to be the view line container span\r\n const parent3 = parent2 ? parent2.parentNode : null; // expected to be the view line div\r\n const parent3ClassName = parent3 && parent3.nodeType === parent3.ELEMENT_NODE ? parent3.className : null;\r\n if (parent3ClassName === ViewLine.CLASS_NAME) {\r\n const p = ctx.getPositionFromDOMInfo(hitResult.offsetNode.parentNode, hitResult.offset);\r\n return {\r\n position: p,\r\n hitTarget: null\r\n };\r\n }\r\n else {\r\n return {\r\n position: null,\r\n hitTarget: hitResult.offsetNode.parentNode\r\n };\r\n }\r\n }\r\n // For inline decorations, Gecko sometimes returns the `` of the line and the offset is the `` with the inline decoration\r\n // Some other times, it returns the `` with the inline decoration\r\n if (hitResult.offsetNode.nodeType === hitResult.offsetNode.ELEMENT_NODE) {\r\n const parent1 = hitResult.offsetNode.parentNode;\r\n const parent1ClassName = parent1 && parent1.nodeType === parent1.ELEMENT_NODE ? parent1.className : null;\r\n const parent2 = parent1 ? parent1.parentNode : null;\r\n const parent2ClassName = parent2 && parent2.nodeType === parent2.ELEMENT_NODE ? parent2.className : null;\r\n if (parent1ClassName === ViewLine.CLASS_NAME) {\r\n // it returned the `` of the line and the offset is the `` with the inline decoration\r\n const tokenSpan = hitResult.offsetNode.childNodes[Math.min(hitResult.offset, hitResult.offsetNode.childNodes.length - 1)];\r\n if (tokenSpan) {\r\n const p = ctx.getPositionFromDOMInfo(tokenSpan, 0);\r\n return {\r\n position: p,\r\n hitTarget: null\r\n };\r\n }\r\n }\r\n else if (parent2ClassName === ViewLine.CLASS_NAME) {\r\n // it returned the `` with the inline decoration\r\n const p = ctx.getPositionFromDOMInfo(hitResult.offsetNode, 0);\r\n return {\r\n position: p,\r\n hitTarget: null\r\n };\r\n }\r\n }\r\n return {\r\n position: null,\r\n hitTarget: hitResult.offsetNode\r\n };\r\n }\r\n /**\r\n * Most probably IE\r\n */\r\n static _doHitTestWithMoveToPoint(ctx, coords) {\r\n let resultPosition = null;\r\n let resultHitTarget = null;\r\n const textRange = document.body.createTextRange();\r\n try {\r\n textRange.moveToPoint(coords.clientX, coords.clientY);\r\n }\r\n catch (err) {\r\n return {\r\n position: null,\r\n hitTarget: null\r\n };\r\n }\r\n textRange.collapse(true);\r\n // Now, let's do our best to figure out what we hit :)\r\n const parentElement = textRange ? textRange.parentElement() : null;\r\n const parent1 = parentElement ? parentElement.parentNode : null;\r\n const parent2 = parent1 ? parent1.parentNode : null;\r\n const parent2ClassName = parent2 && parent2.nodeType === parent2.ELEMENT_NODE ? parent2.className : '';\r\n if (parent2ClassName === ViewLine.CLASS_NAME) {\r\n const rangeToContainEntireSpan = textRange.duplicate();\r\n rangeToContainEntireSpan.moveToElementText(parentElement);\r\n rangeToContainEntireSpan.setEndPoint('EndToStart', textRange);\r\n resultPosition = ctx.getPositionFromDOMInfo(parentElement, rangeToContainEntireSpan.text.length);\r\n // Move range out of the span node, IE doesn't like having many ranges in\r\n // the same spot and will act badly for lines containing dashes ('-')\r\n rangeToContainEntireSpan.moveToElementText(ctx.viewDomNode);\r\n }\r\n else {\r\n // Looks like we've hit the hover or something foreign\r\n resultHitTarget = parentElement;\r\n }\r\n // Move range out of the span node, IE doesn't like having many ranges in\r\n // the same spot and will act badly for lines containing dashes ('-')\r\n textRange.moveToElementText(ctx.viewDomNode);\r\n return {\r\n position: resultPosition,\r\n hitTarget: resultHitTarget\r\n };\r\n }\r\n static _snapToSoftTabBoundary(position, viewModel) {\r\n const lineContent = viewModel.getLineContent(position.lineNumber);\r\n const { tabSize } = viewModel.getTextModelOptions();\r\n const newPosition = AtomicTabMoveOperations.atomicPosition(lineContent, position.column - 1, tabSize, 2 /* Nearest */);\r\n if (newPosition !== -1) {\r\n return new Position(position.lineNumber, newPosition + 1);\r\n }\r\n return position;\r\n }\r\n static _doHitTest(ctx, request) {\r\n // State of the art (18.10.2012):\r\n // The spec says browsers should support document.caretPositionFromPoint, but nobody implemented it (http://dev.w3.org/csswg/cssom-view/)\r\n // Gecko:\r\n // - they tried to implement it once, but failed: https://bugzilla.mozilla.org/show_bug.cgi?id=654352\r\n // - however, they do give out rangeParent/rangeOffset properties on mouse events\r\n // Webkit:\r\n // - they have implemented a previous version of the spec which was using document.caretRangeFromPoint\r\n // IE:\r\n // - they have a proprietary method on ranges, moveToPoint: https://msdn.microsoft.com/en-us/library/ie/ms536632(v=vs.85).aspx\r\n // 24.08.2016: Edge has added WebKit's document.caretRangeFromPoint, but it is quite buggy\r\n // - when hit testing the cursor it returns the first or the last line in the viewport\r\n // - it inconsistently hits text nodes or span nodes, while WebKit only hits text nodes\r\n // - when toggling render whitespace on, and hit testing in the empty content after a line, it always hits offset 0 of the first span of the line\r\n // Thank you browsers for making this so 'easy' :)\r\n let result;\r\n if (typeof document.caretRangeFromPoint === 'function') {\r\n result = this._doHitTestWithCaretRangeFromPoint(ctx, request);\r\n }\r\n else if (document.caretPositionFromPoint) {\r\n result = this._doHitTestWithCaretPositionFromPoint(ctx, request.pos.toClientCoordinates());\r\n }\r\n else if (document.body.createTextRange) {\r\n result = this._doHitTestWithMoveToPoint(ctx, request.pos.toClientCoordinates());\r\n }\r\n else {\r\n result = {\r\n position: null,\r\n hitTarget: null\r\n };\r\n }\r\n // Snap to the nearest soft tab boundary if atomic soft tabs are enabled.\r\n if (result.position && ctx.stickyTabStops) {\r\n result.position = this._snapToSoftTabBoundary(result.position, ctx.model);\r\n }\r\n return result;\r\n }\r\n}\r\nexport function shadowCaretRangeFromPoint(shadowRoot, x, y) {\r\n const range = document.createRange();\r\n // Get the element under the point\r\n let el = shadowRoot.elementFromPoint(x, y);\r\n if (el !== null) {\r\n // Get the last child of the element until its firstChild is a text node\r\n // This assumes that the pointer is on the right of the line, out of the tokens\r\n // and that we want to get the offset of the last token of the line\r\n while (el && el.firstChild && el.firstChild.nodeType !== el.firstChild.TEXT_NODE && el.lastChild && el.lastChild.firstChild) {\r\n el = el.lastChild;\r\n }\r\n // Grab its rect\r\n const rect = el.getBoundingClientRect();\r\n // And its font\r\n const font = window.getComputedStyle(el, null).getPropertyValue('font');\r\n // And also its txt content\r\n const text = el.innerText;\r\n // Position the pixel cursor at the left of the element\r\n let pixelCursor = rect.left;\r\n let offset = 0;\r\n let step;\r\n // If the point is on the right of the box put the cursor after the last character\r\n if (x > rect.left + rect.width) {\r\n offset = text.length;\r\n }\r\n else {\r\n const charWidthReader = CharWidthReader.getInstance();\r\n // Goes through all the characters of the innerText, and checks if the x of the point\r\n // belongs to the character.\r\n for (let i = 0; i < text.length + 1; i++) {\r\n // The step is half the width of the character\r\n step = charWidthReader.getCharWidth(text.charAt(i), font) / 2;\r\n // Move to the center of the character\r\n pixelCursor += step;\r\n // If the x of the point is smaller that the position of the cursor, the point is over that character\r\n if (x < pixelCursor) {\r\n offset = i;\r\n break;\r\n }\r\n // Move between the current character and the next\r\n pixelCursor += step;\r\n }\r\n }\r\n // Creates a range with the text node of the element and set the offset found\r\n range.setStart(el.firstChild, offset);\r\n range.setEnd(el.firstChild, offset);\r\n }\r\n return range;\r\n}\r\nclass CharWidthReader {\r\n constructor() {\r\n this._cache = {};\r\n this._canvas = document.createElement('canvas');\r\n }\r\n static getInstance() {\r\n if (!CharWidthReader._INSTANCE) {\r\n CharWidthReader._INSTANCE = new CharWidthReader();\r\n }\r\n return CharWidthReader._INSTANCE;\r\n }\r\n getCharWidth(char, font) {\r\n const cacheKey = char + font;\r\n if (this._cache[cacheKey]) {\r\n return this._cache[cacheKey];\r\n }\r\n const context = this._canvas.getContext('2d');\r\n context.font = font;\r\n const metrics = context.measureText(char);\r\n const width = metrics.width;\r\n this._cache[cacheKey] = width;\r\n return width;\r\n }\r\n}\r\nCharWidthReader._INSTANCE = null;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { StandardWheelEvent } from '../../../base/browser/mouseEvent.js';\r\nimport { TimeoutTimer } from '../../../base/common/async.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport * as platform from '../../../base/common/platform.js';\r\nimport { HitTestContext, MouseTarget, MouseTargetFactory } from './mouseTarget.js';\r\nimport { ClientCoordinates, EditorMouseEventFactory, GlobalEditorMouseMoveMonitor, createEditorPagePosition } from '../editorDom.js';\r\nimport { EditorZoom } from '../../common/config/editorZoom.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { ViewEventHandler } from '../../common/viewModel/viewEventHandler.js';\r\n/**\r\n * Merges mouse events when mouse move events are throttled\r\n */\r\nexport function createMouseMoveEventMerger(mouseTargetFactory) {\r\n return function (lastEvent, currentEvent) {\r\n let targetIsWidget = false;\r\n if (mouseTargetFactory) {\r\n targetIsWidget = mouseTargetFactory.mouseTargetIsWidget(currentEvent);\r\n }\r\n if (!targetIsWidget) {\r\n currentEvent.preventDefault();\r\n }\r\n return currentEvent;\r\n };\r\n}\r\nexport class MouseHandler extends ViewEventHandler {\r\n constructor(context, viewController, viewHelper) {\r\n super();\r\n this._context = context;\r\n this.viewController = viewController;\r\n this.viewHelper = viewHelper;\r\n this.mouseTargetFactory = new MouseTargetFactory(this._context, viewHelper);\r\n this._mouseDownOperation = this._register(new MouseDownOperation(this._context, this.viewController, this.viewHelper, (e, testEventTarget) => this._createMouseTarget(e, testEventTarget), (e) => this._getMouseColumn(e)));\r\n this.lastMouseLeaveTime = -1;\r\n const mouseEvents = new EditorMouseEventFactory(this.viewHelper.viewDomNode);\r\n this._register(mouseEvents.onContextMenu(this.viewHelper.viewDomNode, (e) => this._onContextMenu(e, true)));\r\n this._register(mouseEvents.onMouseMoveThrottled(this.viewHelper.viewDomNode, (e) => this._onMouseMove(e), createMouseMoveEventMerger(this.mouseTargetFactory), MouseHandler.MOUSE_MOVE_MINIMUM_TIME));\r\n this._register(mouseEvents.onMouseUp(this.viewHelper.viewDomNode, (e) => this._onMouseUp(e)));\r\n this._register(mouseEvents.onMouseLeave(this.viewHelper.viewDomNode, (e) => this._onMouseLeave(e)));\r\n this._register(mouseEvents.onMouseDown(this.viewHelper.viewDomNode, (e) => this._onMouseDown(e)));\r\n const onMouseWheel = (browserEvent) => {\r\n this.viewController.emitMouseWheel(browserEvent);\r\n if (!this._context.configuration.options.get(62 /* mouseWheelZoom */)) {\r\n return;\r\n }\r\n const e = new StandardWheelEvent(browserEvent);\r\n const doMouseWheelZoom = (platform.isMacintosh\r\n ? (browserEvent.metaKey && !browserEvent.ctrlKey && !browserEvent.shiftKey && !browserEvent.altKey)\r\n : (browserEvent.ctrlKey && !browserEvent.metaKey && !browserEvent.shiftKey && !browserEvent.altKey));\r\n if (doMouseWheelZoom) {\r\n const zoomLevel = EditorZoom.getZoomLevel();\r\n const delta = e.deltaY > 0 ? 1 : -1;\r\n EditorZoom.setZoomLevel(zoomLevel + delta);\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n };\r\n this._register(dom.addDisposableListener(this.viewHelper.viewDomNode, dom.EventType.MOUSE_WHEEL, onMouseWheel, { capture: true, passive: false }));\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onCursorStateChanged(e) {\r\n this._mouseDownOperation.onCursorStateChanged(e);\r\n return false;\r\n }\r\n onFocusChanged(e) {\r\n return false;\r\n }\r\n onScrollChanged(e) {\r\n this._mouseDownOperation.onScrollChanged();\r\n return false;\r\n }\r\n // --- end event handlers\r\n getTargetAtClientPoint(clientX, clientY) {\r\n const clientPos = new ClientCoordinates(clientX, clientY);\r\n const pos = clientPos.toPageCoordinates();\r\n const editorPos = createEditorPagePosition(this.viewHelper.viewDomNode);\r\n if (pos.y < editorPos.y || pos.y > editorPos.y + editorPos.height || pos.x < editorPos.x || pos.x > editorPos.x + editorPos.width) {\r\n return null;\r\n }\r\n return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), editorPos, pos, null);\r\n }\r\n _createMouseTarget(e, testEventTarget) {\r\n return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), e.editorPos, e.pos, testEventTarget ? e.target : null);\r\n }\r\n _getMouseColumn(e) {\r\n return this.mouseTargetFactory.getMouseColumn(e.editorPos, e.pos);\r\n }\r\n _onContextMenu(e, testEventTarget) {\r\n this.viewController.emitContextMenu({\r\n event: e,\r\n target: this._createMouseTarget(e, testEventTarget)\r\n });\r\n }\r\n _onMouseMove(e) {\r\n if (this._mouseDownOperation.isActive()) {\r\n // In selection/drag operation\r\n return;\r\n }\r\n const actualMouseMoveTime = e.timestamp;\r\n if (actualMouseMoveTime < this.lastMouseLeaveTime) {\r\n // Due to throttling, this event occurred before the mouse left the editor, therefore ignore it.\r\n return;\r\n }\r\n this.viewController.emitMouseMove({\r\n event: e,\r\n target: this._createMouseTarget(e, true)\r\n });\r\n }\r\n _onMouseLeave(e) {\r\n this.lastMouseLeaveTime = (new Date()).getTime();\r\n this.viewController.emitMouseLeave({\r\n event: e,\r\n target: null\r\n });\r\n }\r\n _onMouseUp(e) {\r\n this.viewController.emitMouseUp({\r\n event: e,\r\n target: this._createMouseTarget(e, true)\r\n });\r\n }\r\n _onMouseDown(e) {\r\n const t = this._createMouseTarget(e, true);\r\n const targetIsContent = (t.type === 6 /* CONTENT_TEXT */ || t.type === 7 /* CONTENT_EMPTY */);\r\n const targetIsGutter = (t.type === 2 /* GUTTER_GLYPH_MARGIN */ || t.type === 3 /* GUTTER_LINE_NUMBERS */ || t.type === 4 /* GUTTER_LINE_DECORATIONS */);\r\n const targetIsLineNumbers = (t.type === 3 /* GUTTER_LINE_NUMBERS */);\r\n const selectOnLineNumbers = this._context.configuration.options.get(93 /* selectOnLineNumbers */);\r\n const targetIsViewZone = (t.type === 8 /* CONTENT_VIEW_ZONE */ || t.type === 5 /* GUTTER_VIEW_ZONE */);\r\n const targetIsWidget = (t.type === 9 /* CONTENT_WIDGET */);\r\n let shouldHandle = e.leftButton || e.middleButton;\r\n if (platform.isMacintosh && e.leftButton && e.ctrlKey) {\r\n shouldHandle = false;\r\n }\r\n const focus = () => {\r\n e.preventDefault();\r\n this.viewHelper.focusTextArea();\r\n };\r\n if (shouldHandle && (targetIsContent || (targetIsLineNumbers && selectOnLineNumbers))) {\r\n focus();\r\n this._mouseDownOperation.start(t.type, e);\r\n }\r\n else if (targetIsGutter) {\r\n // Do not steal focus\r\n e.preventDefault();\r\n }\r\n else if (targetIsViewZone) {\r\n const viewZoneData = t.detail;\r\n if (this.viewHelper.shouldSuppressMouseDownOnViewZone(viewZoneData.viewZoneId)) {\r\n focus();\r\n this._mouseDownOperation.start(t.type, e);\r\n e.preventDefault();\r\n }\r\n }\r\n else if (targetIsWidget && this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)) {\r\n focus();\r\n e.preventDefault();\r\n }\r\n this.viewController.emitMouseDown({\r\n event: e,\r\n target: t\r\n });\r\n }\r\n}\r\nMouseHandler.MOUSE_MOVE_MINIMUM_TIME = 100; // ms\r\nclass MouseDownOperation extends Disposable {\r\n constructor(context, viewController, viewHelper, createMouseTarget, getMouseColumn) {\r\n super();\r\n this._context = context;\r\n this._viewController = viewController;\r\n this._viewHelper = viewHelper;\r\n this._createMouseTarget = createMouseTarget;\r\n this._getMouseColumn = getMouseColumn;\r\n this._mouseMoveMonitor = this._register(new GlobalEditorMouseMoveMonitor(this._viewHelper.viewDomNode));\r\n this._onScrollTimeout = this._register(new TimeoutTimer());\r\n this._mouseState = new MouseDownState();\r\n this._currentSelection = new Selection(1, 1, 1, 1);\r\n this._isActive = false;\r\n this._lastMouseEvent = null;\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n isActive() {\r\n return this._isActive;\r\n }\r\n _onMouseDownThenMove(e) {\r\n this._lastMouseEvent = e;\r\n this._mouseState.setModifiers(e);\r\n const position = this._findMousePosition(e, true);\r\n if (!position) {\r\n // Ignoring because position is unknown\r\n return;\r\n }\r\n if (this._mouseState.isDragAndDrop) {\r\n this._viewController.emitMouseDrag({\r\n event: e,\r\n target: position\r\n });\r\n }\r\n else {\r\n this._dispatchMouse(position, true);\r\n }\r\n }\r\n start(targetType, e) {\r\n this._lastMouseEvent = e;\r\n this._mouseState.setStartedOnLineNumbers(targetType === 3 /* GUTTER_LINE_NUMBERS */);\r\n this._mouseState.setStartButtons(e);\r\n this._mouseState.setModifiers(e);\r\n const position = this._findMousePosition(e, true);\r\n if (!position || !position.position) {\r\n // Ignoring because position is unknown\r\n return;\r\n }\r\n this._mouseState.trySetCount(e.detail, position.position);\r\n // Overwrite the detail of the MouseEvent, as it will be sent out in an event and contributions might rely on it.\r\n e.detail = this._mouseState.count;\r\n const options = this._context.configuration.options;\r\n if (!options.get(75 /* readOnly */)\r\n && options.get(27 /* dragAndDrop */)\r\n && !options.get(15 /* columnSelection */)\r\n && !this._mouseState.altKey // we don't support multiple mouse\r\n && e.detail < 2 // only single click on a selection can work\r\n && !this._isActive // the mouse is not down yet\r\n && !this._currentSelection.isEmpty() // we don't drag single cursor\r\n && (position.type === 6 /* CONTENT_TEXT */) // single click on text\r\n && position.position && this._currentSelection.containsPosition(position.position) // single click on a selection\r\n ) {\r\n this._mouseState.isDragAndDrop = true;\r\n this._isActive = true;\r\n this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, createMouseMoveEventMerger(null), (e) => this._onMouseDownThenMove(e), (browserEvent) => {\r\n const position = this._findMousePosition(this._lastMouseEvent, true);\r\n if (browserEvent && browserEvent instanceof KeyboardEvent) {\r\n // cancel\r\n this._viewController.emitMouseDropCanceled();\r\n }\r\n else {\r\n this._viewController.emitMouseDrop({\r\n event: this._lastMouseEvent,\r\n target: (position ? this._createMouseTarget(this._lastMouseEvent, true) : null) // Ignoring because position is unknown, e.g., Content View Zone\r\n });\r\n }\r\n this._stop();\r\n });\r\n return;\r\n }\r\n this._mouseState.isDragAndDrop = false;\r\n this._dispatchMouse(position, e.shiftKey);\r\n if (!this._isActive) {\r\n this._isActive = true;\r\n this._mouseMoveMonitor.startMonitoring(e.target, e.buttons, createMouseMoveEventMerger(null), (e) => this._onMouseDownThenMove(e), () => this._stop());\r\n }\r\n }\r\n _stop() {\r\n this._isActive = false;\r\n this._onScrollTimeout.cancel();\r\n }\r\n onScrollChanged() {\r\n if (!this._isActive) {\r\n return;\r\n }\r\n this._onScrollTimeout.setIfNotSet(() => {\r\n if (!this._lastMouseEvent) {\r\n return;\r\n }\r\n const position = this._findMousePosition(this._lastMouseEvent, false);\r\n if (!position) {\r\n // Ignoring because position is unknown\r\n return;\r\n }\r\n if (this._mouseState.isDragAndDrop) {\r\n // Ignoring because users are dragging the text\r\n return;\r\n }\r\n this._dispatchMouse(position, true);\r\n }, 10);\r\n }\r\n onCursorStateChanged(e) {\r\n this._currentSelection = e.selections[0];\r\n }\r\n _getPositionOutsideEditor(e) {\r\n const editorContent = e.editorPos;\r\n const model = this._context.model;\r\n const viewLayout = this._context.viewLayout;\r\n const mouseColumn = this._getMouseColumn(e);\r\n if (e.posy < editorContent.y) {\r\n const verticalOffset = Math.max(viewLayout.getCurrentScrollTop() - (editorContent.y - e.posy), 0);\r\n const viewZoneData = HitTestContext.getZoneAtCoord(this._context, verticalOffset);\r\n if (viewZoneData) {\r\n const newPosition = this._helpPositionJumpOverViewZone(viewZoneData);\r\n if (newPosition) {\r\n return new MouseTarget(null, 13 /* OUTSIDE_EDITOR */, mouseColumn, newPosition);\r\n }\r\n }\r\n const aboveLineNumber = viewLayout.getLineNumberAtVerticalOffset(verticalOffset);\r\n return new MouseTarget(null, 13 /* OUTSIDE_EDITOR */, mouseColumn, new Position(aboveLineNumber, 1));\r\n }\r\n if (e.posy > editorContent.y + editorContent.height) {\r\n const verticalOffset = viewLayout.getCurrentScrollTop() + (e.posy - editorContent.y);\r\n const viewZoneData = HitTestContext.getZoneAtCoord(this._context, verticalOffset);\r\n if (viewZoneData) {\r\n const newPosition = this._helpPositionJumpOverViewZone(viewZoneData);\r\n if (newPosition) {\r\n return new MouseTarget(null, 13 /* OUTSIDE_EDITOR */, mouseColumn, newPosition);\r\n }\r\n }\r\n const belowLineNumber = viewLayout.getLineNumberAtVerticalOffset(verticalOffset);\r\n return new MouseTarget(null, 13 /* OUTSIDE_EDITOR */, mouseColumn, new Position(belowLineNumber, model.getLineMaxColumn(belowLineNumber)));\r\n }\r\n const possibleLineNumber = viewLayout.getLineNumberAtVerticalOffset(viewLayout.getCurrentScrollTop() + (e.posy - editorContent.y));\r\n if (e.posx < editorContent.x) {\r\n return new MouseTarget(null, 13 /* OUTSIDE_EDITOR */, mouseColumn, new Position(possibleLineNumber, 1));\r\n }\r\n if (e.posx > editorContent.x + editorContent.width) {\r\n return new MouseTarget(null, 13 /* OUTSIDE_EDITOR */, mouseColumn, new Position(possibleLineNumber, model.getLineMaxColumn(possibleLineNumber)));\r\n }\r\n return null;\r\n }\r\n _findMousePosition(e, testEventTarget) {\r\n const positionOutsideEditor = this._getPositionOutsideEditor(e);\r\n if (positionOutsideEditor) {\r\n return positionOutsideEditor;\r\n }\r\n const t = this._createMouseTarget(e, testEventTarget);\r\n const hintedPosition = t.position;\r\n if (!hintedPosition) {\r\n return null;\r\n }\r\n if (t.type === 8 /* CONTENT_VIEW_ZONE */ || t.type === 5 /* GUTTER_VIEW_ZONE */) {\r\n const newPosition = this._helpPositionJumpOverViewZone(t.detail);\r\n if (newPosition) {\r\n return new MouseTarget(t.element, t.type, t.mouseColumn, newPosition, null, t.detail);\r\n }\r\n }\r\n return t;\r\n }\r\n _helpPositionJumpOverViewZone(viewZoneData) {\r\n // Force position on view zones to go above or below depending on where selection started from\r\n const selectionStart = new Position(this._currentSelection.selectionStartLineNumber, this._currentSelection.selectionStartColumn);\r\n const positionBefore = viewZoneData.positionBefore;\r\n const positionAfter = viewZoneData.positionAfter;\r\n if (positionBefore && positionAfter) {\r\n if (positionBefore.isBefore(selectionStart)) {\r\n return positionBefore;\r\n }\r\n else {\r\n return positionAfter;\r\n }\r\n }\r\n return null;\r\n }\r\n _dispatchMouse(position, inSelectionMode) {\r\n if (!position.position) {\r\n return;\r\n }\r\n this._viewController.dispatchMouse({\r\n position: position.position,\r\n mouseColumn: position.mouseColumn,\r\n startedOnLineNumbers: this._mouseState.startedOnLineNumbers,\r\n inSelectionMode: inSelectionMode,\r\n mouseDownCount: this._mouseState.count,\r\n altKey: this._mouseState.altKey,\r\n ctrlKey: this._mouseState.ctrlKey,\r\n metaKey: this._mouseState.metaKey,\r\n shiftKey: this._mouseState.shiftKey,\r\n leftButton: this._mouseState.leftButton,\r\n middleButton: this._mouseState.middleButton,\r\n });\r\n }\r\n}\r\nclass MouseDownState {\r\n constructor() {\r\n this._altKey = false;\r\n this._ctrlKey = false;\r\n this._metaKey = false;\r\n this._shiftKey = false;\r\n this._leftButton = false;\r\n this._middleButton = false;\r\n this._startedOnLineNumbers = false;\r\n this._lastMouseDownPosition = null;\r\n this._lastMouseDownPositionEqualCount = 0;\r\n this._lastMouseDownCount = 0;\r\n this._lastSetMouseDownCountTime = 0;\r\n this.isDragAndDrop = false;\r\n }\r\n get altKey() { return this._altKey; }\r\n get ctrlKey() { return this._ctrlKey; }\r\n get metaKey() { return this._metaKey; }\r\n get shiftKey() { return this._shiftKey; }\r\n get leftButton() { return this._leftButton; }\r\n get middleButton() { return this._middleButton; }\r\n get startedOnLineNumbers() { return this._startedOnLineNumbers; }\r\n get count() {\r\n return this._lastMouseDownCount;\r\n }\r\n setModifiers(source) {\r\n this._altKey = source.altKey;\r\n this._ctrlKey = source.ctrlKey;\r\n this._metaKey = source.metaKey;\r\n this._shiftKey = source.shiftKey;\r\n }\r\n setStartButtons(source) {\r\n this._leftButton = source.leftButton;\r\n this._middleButton = source.middleButton;\r\n }\r\n setStartedOnLineNumbers(startedOnLineNumbers) {\r\n this._startedOnLineNumbers = startedOnLineNumbers;\r\n }\r\n trySetCount(setMouseDownCount, newMouseDownPosition) {\r\n // a. Invalidate multiple clicking if too much time has passed (will be hit by IE because the detail field of mouse events contains garbage in IE10)\r\n const currentTime = (new Date()).getTime();\r\n if (currentTime - this._lastSetMouseDownCountTime > MouseDownState.CLEAR_MOUSE_DOWN_COUNT_TIME) {\r\n setMouseDownCount = 1;\r\n }\r\n this._lastSetMouseDownCountTime = currentTime;\r\n // b. Ensure that we don't jump from single click to triple click in one go (will be hit by IE because the detail field of mouse events contains garbage in IE10)\r\n if (setMouseDownCount > this._lastMouseDownCount + 1) {\r\n setMouseDownCount = this._lastMouseDownCount + 1;\r\n }\r\n // c. Invalidate multiple clicking if the logical position is different\r\n if (this._lastMouseDownPosition && this._lastMouseDownPosition.equals(newMouseDownPosition)) {\r\n this._lastMouseDownPositionEqualCount++;\r\n }\r\n else {\r\n this._lastMouseDownPositionEqualCount = 1;\r\n }\r\n this._lastMouseDownPosition = newMouseDownPosition;\r\n // Finally set the lastMouseDownCount\r\n this._lastMouseDownCount = Math.min(setMouseDownCount, this._lastMouseDownPositionEqualCount);\r\n }\r\n}\r\nMouseDownState.CLEAR_MOUSE_DOWN_COUNT_TIME = 400; // ms\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport * as platform from '../../../base/common/platform.js';\r\nimport { EventType, Gesture } from '../../../base/browser/touch.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { MouseHandler, createMouseMoveEventMerger } from './mouseHandler.js';\r\nimport { EditorMouseEvent, EditorPointerEventFactory } from '../editorDom.js';\r\nimport { BrowserFeatures } from '../../../base/browser/canIUse.js';\r\nfunction gestureChangeEventMerger(lastEvent, currentEvent) {\r\n const r = {\r\n translationY: currentEvent.translationY,\r\n translationX: currentEvent.translationX\r\n };\r\n if (lastEvent) {\r\n r.translationY += lastEvent.translationY;\r\n r.translationX += lastEvent.translationX;\r\n }\r\n return r;\r\n}\r\n/**\r\n * Basically Edge but should be modified to handle any pointerEnabled, even without support of MSGesture\r\n */\r\nclass StandardPointerHandler extends MouseHandler {\r\n constructor(context, viewController, viewHelper) {\r\n super(context, viewController, viewHelper);\r\n this.viewHelper.linesContentDomNode.style.touchAction = 'none';\r\n // TODO@Alex -> this expects that the view is added in 100 ms, might not be the case\r\n // This handler should be added when the dom node is in the dom tree\r\n this._installGestureHandlerTimeout = window.setTimeout(() => {\r\n this._installGestureHandlerTimeout = -1;\r\n // TODO@Alex: replace the usage of MSGesture here with something that works across all browsers\r\n if (window.MSGesture) {\r\n const touchGesture = new MSGesture();\r\n const penGesture = new MSGesture();\r\n touchGesture.target = this.viewHelper.linesContentDomNode;\r\n penGesture.target = this.viewHelper.linesContentDomNode;\r\n this.viewHelper.linesContentDomNode.addEventListener('pointerdown', (e) => {\r\n const pointerType = e.pointerType;\r\n if (pointerType === 'mouse') {\r\n this._lastPointerType = 'mouse';\r\n return;\r\n }\r\n else if (pointerType === 'touch') {\r\n this._lastPointerType = 'touch';\r\n touchGesture.addPointer(e.pointerId);\r\n }\r\n else {\r\n this._lastPointerType = 'pen';\r\n penGesture.addPointer(e.pointerId);\r\n }\r\n });\r\n this._register(dom.addDisposableThrottledListener(this.viewHelper.linesContentDomNode, 'MSGestureChange', (e) => this._onGestureChange(e), gestureChangeEventMerger));\r\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, 'MSGestureTap', (e) => this._onCaptureGestureTap(e), true));\r\n }\r\n }, 100);\r\n this._lastPointerType = 'mouse';\r\n }\r\n _onMouseDown(e) {\r\n if (this._lastPointerType === 'mouse') {\r\n super._onMouseDown(e);\r\n }\r\n }\r\n _onCaptureGestureTap(rawEvent) {\r\n const e = new EditorMouseEvent(rawEvent, this.viewHelper.viewDomNode);\r\n const t = this._createMouseTarget(e, false);\r\n if (t.position) {\r\n this.viewController.moveTo(t.position);\r\n }\r\n // IE does not want to focus when coming in from the browser's address bar\r\n if (e.browserEvent.fromElement) {\r\n e.preventDefault();\r\n this.viewHelper.focusTextArea();\r\n }\r\n else {\r\n // TODO@Alex -> cancel this is focus is lost\r\n setTimeout(() => {\r\n this.viewHelper.focusTextArea();\r\n });\r\n }\r\n }\r\n _onGestureChange(e) {\r\n this._context.model.deltaScrollNow(-e.translationX, -e.translationY);\r\n }\r\n dispose() {\r\n window.clearTimeout(this._installGestureHandlerTimeout);\r\n super.dispose();\r\n }\r\n}\r\n/**\r\n * Currently only tested on iOS 13/ iPadOS.\r\n */\r\nexport class PointerEventHandler extends MouseHandler {\r\n constructor(context, viewController, viewHelper) {\r\n super(context, viewController, viewHelper);\r\n this._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));\r\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e)));\r\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e)));\r\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Contextmenu, (e) => this._onContextMenu(new EditorMouseEvent(e, this.viewHelper.viewDomNode), false)));\r\n this._lastPointerType = 'mouse';\r\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, 'pointerdown', (e) => {\r\n const pointerType = e.pointerType;\r\n if (pointerType === 'mouse') {\r\n this._lastPointerType = 'mouse';\r\n return;\r\n }\r\n else if (pointerType === 'touch') {\r\n this._lastPointerType = 'touch';\r\n }\r\n else {\r\n this._lastPointerType = 'pen';\r\n }\r\n }));\r\n // PonterEvents\r\n const pointerEvents = new EditorPointerEventFactory(this.viewHelper.viewDomNode);\r\n this._register(pointerEvents.onPointerMoveThrottled(this.viewHelper.viewDomNode, (e) => this._onMouseMove(e), createMouseMoveEventMerger(this.mouseTargetFactory), MouseHandler.MOUSE_MOVE_MINIMUM_TIME));\r\n this._register(pointerEvents.onPointerUp(this.viewHelper.viewDomNode, (e) => this._onMouseUp(e)));\r\n this._register(pointerEvents.onPointerLeave(this.viewHelper.viewDomNode, (e) => this._onMouseLeave(e)));\r\n this._register(pointerEvents.onPointerDown(this.viewHelper.viewDomNode, (e) => this._onMouseDown(e)));\r\n }\r\n onTap(event) {\r\n if (!event.initialTarget || !this.viewHelper.linesContentDomNode.contains(event.initialTarget)) {\r\n return;\r\n }\r\n event.preventDefault();\r\n this.viewHelper.focusTextArea();\r\n const target = this._createMouseTarget(new EditorMouseEvent(event, this.viewHelper.viewDomNode), false);\r\n if (target.position) {\r\n // this.viewController.moveTo(target.position);\r\n this.viewController.dispatchMouse({\r\n position: target.position,\r\n mouseColumn: target.position.column,\r\n startedOnLineNumbers: false,\r\n mouseDownCount: event.tapCount,\r\n inSelectionMode: false,\r\n altKey: false,\r\n ctrlKey: false,\r\n metaKey: false,\r\n shiftKey: false,\r\n leftButton: false,\r\n middleButton: false,\r\n });\r\n }\r\n }\r\n onChange(e) {\r\n if (this._lastPointerType === 'touch') {\r\n this._context.model.deltaScrollNow(-e.translationX, -e.translationY);\r\n }\r\n }\r\n _onMouseDown(e) {\r\n if (e.browserEvent.pointerType === 'touch') {\r\n return;\r\n }\r\n super._onMouseDown(e);\r\n }\r\n}\r\nclass TouchHandler extends MouseHandler {\r\n constructor(context, viewController, viewHelper) {\r\n super(context, viewController, viewHelper);\r\n this._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));\r\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Tap, (e) => this.onTap(e)));\r\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Change, (e) => this.onChange(e)));\r\n this._register(dom.addDisposableListener(this.viewHelper.linesContentDomNode, EventType.Contextmenu, (e) => this._onContextMenu(new EditorMouseEvent(e, this.viewHelper.viewDomNode), false)));\r\n }\r\n onTap(event) {\r\n event.preventDefault();\r\n this.viewHelper.focusTextArea();\r\n const target = this._createMouseTarget(new EditorMouseEvent(event, this.viewHelper.viewDomNode), false);\r\n if (target.position) {\r\n this.viewController.moveTo(target.position);\r\n }\r\n }\r\n onChange(e) {\r\n this._context.model.deltaScrollNow(-e.translationX, -e.translationY);\r\n }\r\n}\r\nexport class PointerHandler extends Disposable {\r\n constructor(context, viewController, viewHelper) {\r\n super();\r\n if ((platform.isIOS && BrowserFeatures.pointerEvents)) {\r\n this.handler = this._register(new PointerEventHandler(context, viewController, viewHelper));\r\n }\r\n else if (window.TouchEvent) {\r\n this.handler = this._register(new TouchHandler(context, viewController, viewHelper));\r\n }\r\n else if (window.navigator.pointerEnabled || window.PointerEvent) {\r\n this.handler = this._register(new StandardPointerHandler(context, viewController, viewHelper));\r\n }\r\n else {\r\n this.handler = this._register(new MouseHandler(context, viewController, viewHelper));\r\n }\r\n }\r\n getTargetAtClientPoint(clientX, clientY) {\r\n return this.handler.getTargetAtClientPoint(clientX, clientY);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { ViewEventHandler } from '../../common/viewModel/viewEventHandler.js';\r\nexport class DynamicViewOverlay extends ViewEventHandler {\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './lineNumbers.css';\r\nimport * as platform from '../../../../base/common/platform.js';\r\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay.js';\r\nimport { Position } from '../../../common/core/position.js';\r\nimport { editorActiveLineNumber, editorLineNumbers } from '../../../common/view/editorColorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\r\nexport class LineNumbersOverlay extends DynamicViewOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n this._readConfig();\r\n this._lastCursorModelPosition = new Position(1, 1);\r\n this._renderResult = null;\r\n this._context.addEventHandler(this);\r\n }\r\n _readConfig() {\r\n const options = this._context.configuration.options;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n const lineNumbers = options.get(54 /* lineNumbers */);\r\n this._renderLineNumbers = lineNumbers.renderType;\r\n this._renderCustomLineNumbers = lineNumbers.renderFn;\r\n this._renderFinalNewline = options.get(79 /* renderFinalNewline */);\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineNumbersLeft = layoutInfo.lineNumbersLeft;\r\n this._lineNumbersWidth = layoutInfo.lineNumbersWidth;\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n this._readConfig();\r\n return true;\r\n }\r\n onCursorStateChanged(e) {\r\n const primaryViewPosition = e.selections[0].getPosition();\r\n this._lastCursorModelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(primaryViewPosition);\r\n if (this._renderLineNumbers === 2 /* Relative */ || this._renderLineNumbers === 3 /* Interval */) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n _getLineRenderLineNumber(viewLineNumber) {\r\n const modelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Position(viewLineNumber, 1));\r\n if (modelPosition.column !== 1) {\r\n return '';\r\n }\r\n const modelLineNumber = modelPosition.lineNumber;\r\n if (this._renderCustomLineNumbers) {\r\n return this._renderCustomLineNumbers(modelLineNumber);\r\n }\r\n if (this._renderLineNumbers === 2 /* Relative */) {\r\n const diff = Math.abs(this._lastCursorModelPosition.lineNumber - modelLineNumber);\r\n if (diff === 0) {\r\n return '' + modelLineNumber + '';\r\n }\r\n return String(diff);\r\n }\r\n if (this._renderLineNumbers === 3 /* Interval */) {\r\n if (this._lastCursorModelPosition.lineNumber === modelLineNumber) {\r\n return String(modelLineNumber);\r\n }\r\n if (modelLineNumber % 10 === 0) {\r\n return String(modelLineNumber);\r\n }\r\n return '';\r\n }\r\n return String(modelLineNumber);\r\n }\r\n prepareRender(ctx) {\r\n if (this._renderLineNumbers === 0 /* Off */) {\r\n this._renderResult = null;\r\n return;\r\n }\r\n const lineHeightClassName = (platform.isLinux ? (this._lineHeight % 2 === 0 ? ' lh-even' : ' lh-odd') : '');\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const common = '
    ';\r\n const lineCount = this._context.model.getLineCount();\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n if (!this._renderFinalNewline) {\r\n if (lineNumber === lineCount && this._context.model.getLineLength(lineNumber) === 0) {\r\n // Do not render last (empty) line\r\n output[lineIndex] = '';\r\n continue;\r\n }\r\n }\r\n const renderLineNumber = this._getLineRenderLineNumber(lineNumber);\r\n if (renderLineNumber) {\r\n output[lineIndex] = (common\r\n + renderLineNumber\r\n + '
    ');\r\n }\r\n else {\r\n output[lineIndex] = '';\r\n }\r\n }\r\n this._renderResult = output;\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderResult) {\r\n return '';\r\n }\r\n const lineIndex = lineNumber - startLineNumber;\r\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\r\n return '';\r\n }\r\n return this._renderResult[lineIndex];\r\n }\r\n}\r\nLineNumbersOverlay.CLASS_NAME = 'line-numbers';\r\n// theming\r\nregisterThemingParticipant((theme, collector) => {\r\n const lineNumbers = theme.getColor(editorLineNumbers);\r\n if (lineNumbers) {\r\n collector.addRule(`.monaco-editor .line-numbers { color: ${lineNumbers}; }`);\r\n }\r\n const activeLineNumber = theme.getColor(editorActiveLineNumber);\r\n if (activeLineNumber) {\r\n collector.addRule(`.monaco-editor .current-line ~ .line-numbers { color: ${activeLineNumber}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport { ViewPart } from '../../view/viewPart.js';\r\nexport class Margin extends ViewPart {\r\n constructor(context) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._canUseLayerHinting = !options.get(25 /* disableLayerHinting */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._glyphMarginLeft = layoutInfo.glyphMarginLeft;\r\n this._glyphMarginWidth = layoutInfo.glyphMarginWidth;\r\n this._domNode = createFastDomNode(document.createElement('div'));\r\n this._domNode.setClassName(Margin.OUTER_CLASS_NAME);\r\n this._domNode.setPosition('absolute');\r\n this._domNode.setAttribute('role', 'presentation');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._glyphMarginBackgroundDomNode = createFastDomNode(document.createElement('div'));\r\n this._glyphMarginBackgroundDomNode.setClassName(Margin.CLASS_NAME);\r\n this._domNode.appendChild(this._glyphMarginBackgroundDomNode);\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._canUseLayerHinting = !options.get(25 /* disableLayerHinting */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._glyphMarginLeft = layoutInfo.glyphMarginLeft;\r\n this._glyphMarginWidth = layoutInfo.glyphMarginWidth;\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return super.onScrollChanged(e) || e.scrollTopChanged;\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n // Nothing to read\r\n }\r\n render(ctx) {\r\n this._domNode.setLayerHinting(this._canUseLayerHinting);\r\n this._domNode.setContain('strict');\r\n const adjustedScrollTop = ctx.scrollTop - ctx.bigNumbersDelta;\r\n this._domNode.setTop(-adjustedScrollTop);\r\n const height = Math.min(ctx.scrollHeight, 1000000);\r\n this._domNode.setHeight(height);\r\n this._domNode.setWidth(this._contentLeft);\r\n this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft);\r\n this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth);\r\n this._glyphMarginBackgroundDomNode.setHeight(height);\r\n }\r\n}\r\nMargin.CLASS_NAME = 'glyph-margin';\r\nMargin.OUTER_CLASS_NAME = 'margin';\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './textAreaHandler.css';\r\nimport * as nls from '../../../nls.js';\r\nimport * as browser from '../../../base/browser/browser.js';\r\nimport { createFastDomNode } from '../../../base/browser/fastDomNode.js';\r\nimport * as platform from '../../../base/common/platform.js';\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { Configuration } from '../config/configuration.js';\r\nimport { CopyOptions, TextAreaInput } from './textAreaInput.js';\r\nimport { PagedScreenReaderStrategy, TextAreaState } from './textAreaState.js';\r\nimport { PartFingerprints, ViewPart } from '../view/viewPart.js';\r\nimport { LineNumbersOverlay } from '../viewParts/lineNumbers/lineNumbers.js';\r\nimport { Margin } from '../viewParts/margin/margin.js';\r\nimport { EditorOptions } from '../../common/config/editorOptions.js';\r\nimport { getMapForWordSeparators } from '../../common/controller/wordCharacterClassifier.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { MOUSE_CURSOR_TEXT_CSS_CLASS_NAME } from '../../../base/browser/ui/mouseCursor/mouseCursor.js';\r\nclass VisibleTextAreaData {\r\n constructor(top, left, width) {\r\n this.top = top;\r\n this.left = left;\r\n this.width = width;\r\n }\r\n setWidth(width) {\r\n return new VisibleTextAreaData(this.top, this.left, width);\r\n }\r\n}\r\nconst canUseZeroSizeTextarea = (browser.isFirefox);\r\nexport class TextAreaHandler extends ViewPart {\r\n constructor(context, viewController, viewHelper) {\r\n super(context);\r\n // --- end view API\r\n this._primaryCursorPosition = new Position(1, 1);\r\n this._primaryCursorVisibleRange = null;\r\n this._viewController = viewController;\r\n this._viewHelper = viewHelper;\r\n this._scrollLeft = 0;\r\n this._scrollTop = 0;\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._setAccessibilityOptions(options);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._contentHeight = layoutInfo.height;\r\n this._fontInfo = options.get(38 /* fontInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._emptySelectionClipboard = options.get(28 /* emptySelectionClipboard */);\r\n this._copyWithSyntaxHighlighting = options.get(18 /* copyWithSyntaxHighlighting */);\r\n this._visibleTextArea = null;\r\n this._selections = [new Selection(1, 1, 1, 1)];\r\n this._modelSelections = [new Selection(1, 1, 1, 1)];\r\n this._lastRenderPosition = null;\r\n // Text Area (The focus will always be in the textarea when the cursor is blinking)\r\n this.textArea = createFastDomNode(document.createElement('textarea'));\r\n PartFingerprints.write(this.textArea, 6 /* TextArea */);\r\n this.textArea.setClassName(`inputarea ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);\r\n this.textArea.setAttribute('wrap', 'off');\r\n this.textArea.setAttribute('autocorrect', 'off');\r\n this.textArea.setAttribute('autocapitalize', 'off');\r\n this.textArea.setAttribute('autocomplete', 'off');\r\n this.textArea.setAttribute('spellcheck', 'false');\r\n this.textArea.setAttribute('aria-label', this._getAriaLabel(options));\r\n this.textArea.setAttribute('tabindex', String(options.get(107 /* tabIndex */)));\r\n this.textArea.setAttribute('role', 'textbox');\r\n this.textArea.setAttribute('aria-roledescription', nls.localize('editor', \"editor\"));\r\n this.textArea.setAttribute('aria-multiline', 'true');\r\n this.textArea.setAttribute('aria-haspopup', 'false');\r\n this.textArea.setAttribute('aria-autocomplete', 'both');\r\n if (platform.isWeb && options.get(75 /* readOnly */)) {\r\n this.textArea.setAttribute('readonly', 'true');\r\n }\r\n this.textAreaCover = createFastDomNode(document.createElement('div'));\r\n this.textAreaCover.setPosition('absolute');\r\n const simpleModel = {\r\n getLineCount: () => {\r\n return this._context.model.getLineCount();\r\n },\r\n getLineMaxColumn: (lineNumber) => {\r\n return this._context.model.getLineMaxColumn(lineNumber);\r\n },\r\n getValueInRange: (range, eol) => {\r\n return this._context.model.getValueInRange(range, eol);\r\n }\r\n };\r\n const textAreaInputHost = {\r\n getDataToCopy: (generateHTML) => {\r\n const rawTextToCopy = this._context.model.getPlainTextToCopy(this._modelSelections, this._emptySelectionClipboard, platform.isWindows);\r\n const newLineCharacter = this._context.model.getEOL();\r\n const isFromEmptySelection = (this._emptySelectionClipboard && this._modelSelections.length === 1 && this._modelSelections[0].isEmpty());\r\n const multicursorText = (Array.isArray(rawTextToCopy) ? rawTextToCopy : null);\r\n const text = (Array.isArray(rawTextToCopy) ? rawTextToCopy.join(newLineCharacter) : rawTextToCopy);\r\n let html = undefined;\r\n let mode = null;\r\n if (generateHTML) {\r\n if (CopyOptions.forceCopyWithSyntaxHighlighting || (this._copyWithSyntaxHighlighting && text.length < 65536)) {\r\n const richText = this._context.model.getRichTextToCopy(this._modelSelections, this._emptySelectionClipboard);\r\n if (richText) {\r\n html = richText.html;\r\n mode = richText.mode;\r\n }\r\n }\r\n }\r\n return {\r\n isFromEmptySelection,\r\n multicursorText,\r\n text,\r\n html,\r\n mode\r\n };\r\n },\r\n getScreenReaderContent: (currentState) => {\r\n if (this._accessibilitySupport === 1 /* Disabled */) {\r\n // We know for a fact that a screen reader is not attached\r\n // On OSX, we write the character before the cursor to allow for \"long-press\" composition\r\n // Also on OSX, we write the word before the cursor to allow for the Accessibility Keyboard to give good hints\r\n if (platform.isMacintosh) {\r\n const selection = this._selections[0];\r\n if (selection.isEmpty()) {\r\n const position = selection.getStartPosition();\r\n let textBefore = this._getWordBeforePosition(position);\r\n if (textBefore.length === 0) {\r\n textBefore = this._getCharacterBeforePosition(position);\r\n }\r\n if (textBefore.length > 0) {\r\n return new TextAreaState(textBefore, textBefore.length, textBefore.length, position, position);\r\n }\r\n }\r\n }\r\n return TextAreaState.EMPTY;\r\n }\r\n return PagedScreenReaderStrategy.fromEditorSelection(currentState, simpleModel, this._selections[0], this._accessibilityPageSize, this._accessibilitySupport === 0 /* Unknown */);\r\n },\r\n deduceModelPosition: (viewAnchorPosition, deltaOffset, lineFeedCnt) => {\r\n return this._context.model.deduceModelPositionRelativeToViewPosition(viewAnchorPosition, deltaOffset, lineFeedCnt);\r\n }\r\n };\r\n this._textAreaInput = this._register(new TextAreaInput(textAreaInputHost, this.textArea));\r\n this._register(this._textAreaInput.onKeyDown((e) => {\r\n this._viewController.emitKeyDown(e);\r\n }));\r\n this._register(this._textAreaInput.onKeyUp((e) => {\r\n this._viewController.emitKeyUp(e);\r\n }));\r\n this._register(this._textAreaInput.onPaste((e) => {\r\n let pasteOnNewLine = false;\r\n let multicursorText = null;\r\n let mode = null;\r\n if (e.metadata) {\r\n pasteOnNewLine = (this._emptySelectionClipboard && !!e.metadata.isFromEmptySelection);\r\n multicursorText = (typeof e.metadata.multicursorText !== 'undefined' ? e.metadata.multicursorText : null);\r\n mode = e.metadata.mode;\r\n }\r\n this._viewController.paste(e.text, pasteOnNewLine, multicursorText, mode);\r\n }));\r\n this._register(this._textAreaInput.onCut(() => {\r\n this._viewController.cut();\r\n }));\r\n this._register(this._textAreaInput.onType((e) => {\r\n if (e.replaceCharCnt) {\r\n this._viewController.replacePreviousChar(e.text, e.replaceCharCnt);\r\n }\r\n else {\r\n this._viewController.type(e.text);\r\n }\r\n }));\r\n this._register(this._textAreaInput.onSelectionChangeRequest((modelSelection) => {\r\n this._viewController.setSelection(modelSelection);\r\n }));\r\n this._register(this._textAreaInput.onCompositionStart((e) => {\r\n const lineNumber = this._selections[0].startLineNumber;\r\n const column = this._selections[0].startColumn - (e.moveOneCharacterLeft ? 1 : 0);\r\n this._context.model.revealRange('keyboard', true, new Range(lineNumber, column, lineNumber, column), 0 /* Simple */, 1 /* Immediate */);\r\n // Find range pixel position\r\n const visibleRange = this._viewHelper.visibleRangeForPositionRelativeToEditor(lineNumber, column);\r\n if (visibleRange) {\r\n this._visibleTextArea = new VisibleTextAreaData(this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber), visibleRange.left, canUseZeroSizeTextarea ? 0 : 1);\r\n this._render();\r\n }\r\n // Show the textarea\r\n this.textArea.setClassName(`inputarea ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`);\r\n this._viewController.compositionStart();\r\n this._context.model.onCompositionStart();\r\n }));\r\n this._register(this._textAreaInput.onCompositionUpdate((e) => {\r\n // adjust width by its size\r\n this._visibleTextArea = this._visibleTextArea.setWidth(measureText(e.data, this._fontInfo));\r\n this._render();\r\n }));\r\n this._register(this._textAreaInput.onCompositionEnd(() => {\r\n this._visibleTextArea = null;\r\n this._render();\r\n this.textArea.setClassName(`inputarea ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);\r\n this._viewController.compositionEnd();\r\n this._context.model.onCompositionEnd();\r\n }));\r\n this._register(this._textAreaInput.onFocus(() => {\r\n this._context.model.setHasFocus(true);\r\n }));\r\n this._register(this._textAreaInput.onBlur(() => {\r\n this._context.model.setHasFocus(false);\r\n }));\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n _getWordBeforePosition(position) {\r\n const lineContent = this._context.model.getLineContent(position.lineNumber);\r\n const wordSeparators = getMapForWordSeparators(this._context.configuration.options.get(110 /* wordSeparators */));\r\n let column = position.column;\r\n let distance = 0;\r\n while (column > 1) {\r\n const charCode = lineContent.charCodeAt(column - 2);\r\n const charClass = wordSeparators.get(charCode);\r\n if (charClass !== 0 /* Regular */ || distance > 50) {\r\n return lineContent.substring(column - 1, position.column - 1);\r\n }\r\n distance++;\r\n column--;\r\n }\r\n return lineContent.substring(0, position.column - 1);\r\n }\r\n _getCharacterBeforePosition(position) {\r\n if (position.column > 1) {\r\n const lineContent = this._context.model.getLineContent(position.lineNumber);\r\n const charBefore = lineContent.charAt(position.column - 2);\r\n if (!strings.isHighSurrogate(charBefore.charCodeAt(0))) {\r\n return charBefore;\r\n }\r\n }\r\n return '';\r\n }\r\n _getAriaLabel(options) {\r\n const accessibilitySupport = options.get(2 /* accessibilitySupport */);\r\n if (accessibilitySupport === 1 /* Disabled */) {\r\n return nls.localize('accessibilityOffAriaLabel', \"The editor is not accessible at this time. Press {0} for options.\", platform.isLinux ? 'Shift+Alt+F1' : 'Alt+F1');\r\n }\r\n return options.get(4 /* ariaLabel */);\r\n }\r\n _setAccessibilityOptions(options) {\r\n this._accessibilitySupport = options.get(2 /* accessibilitySupport */);\r\n const accessibilityPageSize = options.get(3 /* accessibilityPageSize */);\r\n if (this._accessibilitySupport === 2 /* Enabled */ && accessibilityPageSize === EditorOptions.accessibilityPageSize.defaultValue) {\r\n // If a screen reader is attached and the default value is not set we shuold automatically increase the page size to 100 for a better experience\r\n // If we put more than 100 lines the nvda can not handle this https://github.com/microsoft/vscode/issues/89717\r\n this._accessibilityPageSize = 100;\r\n }\r\n else {\r\n this._accessibilityPageSize = accessibilityPageSize;\r\n }\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._setAccessibilityOptions(options);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._contentHeight = layoutInfo.height;\r\n this._fontInfo = options.get(38 /* fontInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._emptySelectionClipboard = options.get(28 /* emptySelectionClipboard */);\r\n this._copyWithSyntaxHighlighting = options.get(18 /* copyWithSyntaxHighlighting */);\r\n this.textArea.setAttribute('aria-label', this._getAriaLabel(options));\r\n this.textArea.setAttribute('tabindex', String(options.get(107 /* tabIndex */)));\r\n if (platform.isWeb && e.hasChanged(75 /* readOnly */)) {\r\n if (options.get(75 /* readOnly */)) {\r\n this.textArea.setAttribute('readonly', 'true');\r\n }\r\n else {\r\n this.textArea.removeAttribute('readonly');\r\n }\r\n }\r\n if (e.hasChanged(2 /* accessibilitySupport */)) {\r\n this._textAreaInput.writeScreenReaderContent('strategy changed');\r\n }\r\n return true;\r\n }\r\n onCursorStateChanged(e) {\r\n this._selections = e.selections.slice(0);\r\n this._modelSelections = e.modelSelections.slice(0);\r\n this._textAreaInput.writeScreenReaderContent('selection changed');\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n // true for inline decorations that can end up relayouting text\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n this._scrollLeft = e.scrollLeft;\r\n this._scrollTop = e.scrollTop;\r\n return true;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n // --- begin view API\r\n isFocused() {\r\n return this._textAreaInput.isFocused();\r\n }\r\n focusTextArea() {\r\n this._textAreaInput.focusTextArea();\r\n }\r\n getLastRenderData() {\r\n return this._lastRenderPosition;\r\n }\r\n setAriaOptions(options) {\r\n if (options.activeDescendant) {\r\n this.textArea.setAttribute('aria-haspopup', 'true');\r\n this.textArea.setAttribute('aria-autocomplete', 'list');\r\n this.textArea.setAttribute('aria-activedescendant', options.activeDescendant);\r\n }\r\n else {\r\n this.textArea.setAttribute('aria-haspopup', 'false');\r\n this.textArea.setAttribute('aria-autocomplete', 'both');\r\n this.textArea.removeAttribute('aria-activedescendant');\r\n }\r\n if (options.role) {\r\n this.textArea.setAttribute('role', options.role);\r\n }\r\n }\r\n prepareRender(ctx) {\r\n this._primaryCursorPosition = new Position(this._selections[0].positionLineNumber, this._selections[0].positionColumn);\r\n this._primaryCursorVisibleRange = ctx.visibleRangeForPosition(this._primaryCursorPosition);\r\n }\r\n render(ctx) {\r\n this._textAreaInput.writeScreenReaderContent('render');\r\n this._render();\r\n }\r\n _render() {\r\n if (this._visibleTextArea) {\r\n // The text area is visible for composition reasons\r\n this._renderInsideEditor(null, this._visibleTextArea.top - this._scrollTop, this._contentLeft + this._visibleTextArea.left - this._scrollLeft, this._visibleTextArea.width, this._lineHeight);\r\n return;\r\n }\r\n if (!this._primaryCursorVisibleRange) {\r\n // The primary cursor is outside the viewport => place textarea to the top left\r\n this._renderAtTopLeft();\r\n return;\r\n }\r\n const left = this._contentLeft + this._primaryCursorVisibleRange.left - this._scrollLeft;\r\n if (left < this._contentLeft || left > this._contentLeft + this._contentWidth) {\r\n // cursor is outside the viewport\r\n this._renderAtTopLeft();\r\n return;\r\n }\r\n const top = this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber) - this._scrollTop;\r\n if (top < 0 || top > this._contentHeight) {\r\n // cursor is outside the viewport\r\n this._renderAtTopLeft();\r\n return;\r\n }\r\n // The primary cursor is in the viewport (at least vertically) => place textarea on the cursor\r\n if (platform.isMacintosh) {\r\n // For the popup emoji input, we will make the text area as high as the line height\r\n // We will also make the fontSize and lineHeight the correct dimensions to help with the placement of these pickers\r\n this._renderInsideEditor(this._primaryCursorPosition, top, left, canUseZeroSizeTextarea ? 0 : 1, this._lineHeight);\r\n return;\r\n }\r\n this._renderInsideEditor(this._primaryCursorPosition, top, left, canUseZeroSizeTextarea ? 0 : 1, canUseZeroSizeTextarea ? 0 : 1);\r\n }\r\n _renderInsideEditor(renderedPosition, top, left, width, height) {\r\n this._lastRenderPosition = renderedPosition;\r\n const ta = this.textArea;\r\n const tac = this.textAreaCover;\r\n Configuration.applyFontInfo(ta, this._fontInfo);\r\n ta.setTop(top);\r\n ta.setLeft(left);\r\n ta.setWidth(width);\r\n ta.setHeight(height);\r\n tac.setTop(0);\r\n tac.setLeft(0);\r\n tac.setWidth(0);\r\n tac.setHeight(0);\r\n }\r\n _renderAtTopLeft() {\r\n this._lastRenderPosition = null;\r\n const ta = this.textArea;\r\n const tac = this.textAreaCover;\r\n Configuration.applyFontInfo(ta, this._fontInfo);\r\n ta.setTop(0);\r\n ta.setLeft(0);\r\n tac.setTop(0);\r\n tac.setLeft(0);\r\n if (canUseZeroSizeTextarea) {\r\n ta.setWidth(0);\r\n ta.setHeight(0);\r\n tac.setWidth(0);\r\n tac.setHeight(0);\r\n return;\r\n }\r\n // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea)\r\n // specifically, when doing Korean IME, setting the textarea to 0x0 breaks IME badly.\r\n ta.setWidth(1);\r\n ta.setHeight(1);\r\n tac.setWidth(1);\r\n tac.setHeight(1);\r\n const options = this._context.configuration.options;\r\n if (options.get(44 /* glyphMargin */)) {\r\n tac.setClassName('monaco-editor-background textAreaCover ' + Margin.OUTER_CLASS_NAME);\r\n }\r\n else {\r\n if (options.get(54 /* lineNumbers */).renderType !== 0 /* Off */) {\r\n tac.setClassName('monaco-editor-background textAreaCover ' + LineNumbersOverlay.CLASS_NAME);\r\n }\r\n else {\r\n tac.setClassName('monaco-editor-background textAreaCover');\r\n }\r\n }\r\n }\r\n}\r\nfunction measureText(text, fontInfo) {\r\n // adjust width by its size\r\n const canvasElem = document.createElement('canvas');\r\n const context = canvasElem.getContext('2d');\r\n context.font = createFontString(fontInfo);\r\n const metrics = context.measureText(text);\r\n if (browser.isFirefox) {\r\n return metrics.width + 2; // +2 for Japanese...\r\n }\r\n else {\r\n return metrics.width;\r\n }\r\n}\r\nfunction createFontString(bareFontInfo) {\r\n return doCreateFontString('normal', bareFontInfo.fontWeight, bareFontInfo.fontSize, bareFontInfo.lineHeight, bareFontInfo.fontFamily);\r\n}\r\nfunction doCreateFontString(fontStyle, fontWeight, fontSize, lineHeight, fontFamily) {\r\n // The full font syntax is:\r\n // style | variant | weight | stretch | size/line-height | fontFamily\r\n // (https://developer.mozilla.org/en-US/docs/Web/CSS/font)\r\n // But it appears Edge and IE11 cannot properly parse `stretch`.\r\n return `${fontStyle} normal ${fontWeight} ${fontSize}px / ${lineHeight}px ${fontFamily}`;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\nimport { createFastDomNode } from '../../../base/browser/fastDomNode.js';\r\nimport { createStringBuilder } from '../../common/core/stringBuilder.js';\r\nexport class RenderedLinesCollection {\r\n constructor(createLine) {\r\n this._createLine = createLine;\r\n this._set(1, []);\r\n }\r\n flush() {\r\n this._set(1, []);\r\n }\r\n _set(rendLineNumberStart, lines) {\r\n this._lines = lines;\r\n this._rendLineNumberStart = rendLineNumberStart;\r\n }\r\n _get() {\r\n return {\r\n rendLineNumberStart: this._rendLineNumberStart,\r\n lines: this._lines\r\n };\r\n }\r\n /**\r\n * @returns Inclusive line number that is inside this collection\r\n */\r\n getStartLineNumber() {\r\n return this._rendLineNumberStart;\r\n }\r\n /**\r\n * @returns Inclusive line number that is inside this collection\r\n */\r\n getEndLineNumber() {\r\n return this._rendLineNumberStart + this._lines.length - 1;\r\n }\r\n getCount() {\r\n return this._lines.length;\r\n }\r\n getLine(lineNumber) {\r\n const lineIndex = lineNumber - this._rendLineNumberStart;\r\n if (lineIndex < 0 || lineIndex >= this._lines.length) {\r\n throw new Error('Illegal value for lineNumber');\r\n }\r\n return this._lines[lineIndex];\r\n }\r\n /**\r\n * @returns Lines that were removed from this collection\r\n */\r\n onLinesDeleted(deleteFromLineNumber, deleteToLineNumber) {\r\n if (this.getCount() === 0) {\r\n // no lines\r\n return null;\r\n }\r\n const startLineNumber = this.getStartLineNumber();\r\n const endLineNumber = this.getEndLineNumber();\r\n if (deleteToLineNumber < startLineNumber) {\r\n // deleting above the viewport\r\n const deleteCnt = deleteToLineNumber - deleteFromLineNumber + 1;\r\n this._rendLineNumberStart -= deleteCnt;\r\n return null;\r\n }\r\n if (deleteFromLineNumber > endLineNumber) {\r\n // deleted below the viewport\r\n return null;\r\n }\r\n // Record what needs to be deleted\r\n let deleteStartIndex = 0;\r\n let deleteCount = 0;\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - this._rendLineNumberStart;\r\n if (deleteFromLineNumber <= lineNumber && lineNumber <= deleteToLineNumber) {\r\n // this is a line to be deleted\r\n if (deleteCount === 0) {\r\n // this is the first line to be deleted\r\n deleteStartIndex = lineIndex;\r\n deleteCount = 1;\r\n }\r\n else {\r\n deleteCount++;\r\n }\r\n }\r\n }\r\n // Adjust this._rendLineNumberStart for lines deleted above\r\n if (deleteFromLineNumber < startLineNumber) {\r\n // Something was deleted above\r\n let deleteAboveCount = 0;\r\n if (deleteToLineNumber < startLineNumber) {\r\n // the entire deleted lines are above\r\n deleteAboveCount = deleteToLineNumber - deleteFromLineNumber + 1;\r\n }\r\n else {\r\n deleteAboveCount = startLineNumber - deleteFromLineNumber;\r\n }\r\n this._rendLineNumberStart -= deleteAboveCount;\r\n }\r\n const deleted = this._lines.splice(deleteStartIndex, deleteCount);\r\n return deleted;\r\n }\r\n onLinesChanged(changeFromLineNumber, changeToLineNumber) {\r\n if (this.getCount() === 0) {\r\n // no lines\r\n return false;\r\n }\r\n const startLineNumber = this.getStartLineNumber();\r\n const endLineNumber = this.getEndLineNumber();\r\n let someoneNotified = false;\r\n for (let changedLineNumber = changeFromLineNumber; changedLineNumber <= changeToLineNumber; changedLineNumber++) {\r\n if (changedLineNumber >= startLineNumber && changedLineNumber <= endLineNumber) {\r\n // Notify the line\r\n this._lines[changedLineNumber - this._rendLineNumberStart].onContentChanged();\r\n someoneNotified = true;\r\n }\r\n }\r\n return someoneNotified;\r\n }\r\n onLinesInserted(insertFromLineNumber, insertToLineNumber) {\r\n if (this.getCount() === 0) {\r\n // no lines\r\n return null;\r\n }\r\n const insertCnt = insertToLineNumber - insertFromLineNumber + 1;\r\n const startLineNumber = this.getStartLineNumber();\r\n const endLineNumber = this.getEndLineNumber();\r\n if (insertFromLineNumber <= startLineNumber) {\r\n // inserting above the viewport\r\n this._rendLineNumberStart += insertCnt;\r\n return null;\r\n }\r\n if (insertFromLineNumber > endLineNumber) {\r\n // inserting below the viewport\r\n return null;\r\n }\r\n if (insertCnt + insertFromLineNumber > endLineNumber) {\r\n // insert inside the viewport in such a way that all remaining lines are pushed outside\r\n const deleted = this._lines.splice(insertFromLineNumber - this._rendLineNumberStart, endLineNumber - insertFromLineNumber + 1);\r\n return deleted;\r\n }\r\n // insert inside the viewport, push out some lines, but not all remaining lines\r\n const newLines = [];\r\n for (let i = 0; i < insertCnt; i++) {\r\n newLines[i] = this._createLine();\r\n }\r\n const insertIndex = insertFromLineNumber - this._rendLineNumberStart;\r\n const beforeLines = this._lines.slice(0, insertIndex);\r\n const afterLines = this._lines.slice(insertIndex, this._lines.length - insertCnt);\r\n const deletedLines = this._lines.slice(this._lines.length - insertCnt, this._lines.length);\r\n this._lines = beforeLines.concat(newLines).concat(afterLines);\r\n return deletedLines;\r\n }\r\n onTokensChanged(ranges) {\r\n if (this.getCount() === 0) {\r\n // no lines\r\n return false;\r\n }\r\n const startLineNumber = this.getStartLineNumber();\r\n const endLineNumber = this.getEndLineNumber();\r\n let notifiedSomeone = false;\r\n for (let i = 0, len = ranges.length; i < len; i++) {\r\n const rng = ranges[i];\r\n if (rng.toLineNumber < startLineNumber || rng.fromLineNumber > endLineNumber) {\r\n // range outside viewport\r\n continue;\r\n }\r\n const from = Math.max(startLineNumber, rng.fromLineNumber);\r\n const to = Math.min(endLineNumber, rng.toLineNumber);\r\n for (let lineNumber = from; lineNumber <= to; lineNumber++) {\r\n const lineIndex = lineNumber - this._rendLineNumberStart;\r\n this._lines[lineIndex].onTokensChanged();\r\n notifiedSomeone = true;\r\n }\r\n }\r\n return notifiedSomeone;\r\n }\r\n}\r\nexport class VisibleLinesCollection {\r\n constructor(host) {\r\n this._host = host;\r\n this.domNode = this._createDomNode();\r\n this._linesCollection = new RenderedLinesCollection(() => this._host.createVisibleLine());\r\n }\r\n _createDomNode() {\r\n const domNode = createFastDomNode(document.createElement('div'));\r\n domNode.setClassName('view-layer');\r\n domNode.setPosition('absolute');\r\n domNode.domNode.setAttribute('role', 'presentation');\r\n domNode.domNode.setAttribute('aria-hidden', 'true');\r\n return domNode;\r\n }\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n onFlushed(e) {\r\n this._linesCollection.flush();\r\n // No need to clear the dom node because a full .innerHTML will occur in ViewLayerRenderer._render\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return this._linesCollection.onLinesChanged(e.fromLineNumber, e.toLineNumber);\r\n }\r\n onLinesDeleted(e) {\r\n const deleted = this._linesCollection.onLinesDeleted(e.fromLineNumber, e.toLineNumber);\r\n if (deleted) {\r\n // Remove from DOM\r\n for (let i = 0, len = deleted.length; i < len; i++) {\r\n const lineDomNode = deleted[i].getDomNode();\r\n if (lineDomNode) {\r\n this.domNode.domNode.removeChild(lineDomNode);\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n const deleted = this._linesCollection.onLinesInserted(e.fromLineNumber, e.toLineNumber);\r\n if (deleted) {\r\n // Remove from DOM\r\n for (let i = 0, len = deleted.length; i < len; i++) {\r\n const lineDomNode = deleted[i].getDomNode();\r\n if (lineDomNode) {\r\n this.domNode.domNode.removeChild(lineDomNode);\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged;\r\n }\r\n onTokensChanged(e) {\r\n return this._linesCollection.onTokensChanged(e.ranges);\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // ---- end view event handlers\r\n getStartLineNumber() {\r\n return this._linesCollection.getStartLineNumber();\r\n }\r\n getEndLineNumber() {\r\n return this._linesCollection.getEndLineNumber();\r\n }\r\n getVisibleLine(lineNumber) {\r\n return this._linesCollection.getLine(lineNumber);\r\n }\r\n renderLines(viewportData) {\r\n const inp = this._linesCollection._get();\r\n const renderer = new ViewLayerRenderer(this.domNode.domNode, this._host, viewportData);\r\n const ctx = {\r\n rendLineNumberStart: inp.rendLineNumberStart,\r\n lines: inp.lines,\r\n linesLength: inp.lines.length\r\n };\r\n // Decide if this render will do a single update (single large .innerHTML) or many updates (inserting/removing dom nodes)\r\n const resCtx = renderer.render(ctx, viewportData.startLineNumber, viewportData.endLineNumber, viewportData.relativeVerticalOffset);\r\n this._linesCollection._set(resCtx.rendLineNumberStart, resCtx.lines);\r\n }\r\n}\r\nclass ViewLayerRenderer {\r\n constructor(domNode, host, viewportData) {\r\n this.domNode = domNode;\r\n this.host = host;\r\n this.viewportData = viewportData;\r\n }\r\n render(inContext, startLineNumber, stopLineNumber, deltaTop) {\r\n const ctx = {\r\n rendLineNumberStart: inContext.rendLineNumberStart,\r\n lines: inContext.lines.slice(0),\r\n linesLength: inContext.linesLength\r\n };\r\n if ((ctx.rendLineNumberStart + ctx.linesLength - 1 < startLineNumber) || (stopLineNumber < ctx.rendLineNumberStart)) {\r\n // There is no overlap whatsoever\r\n ctx.rendLineNumberStart = startLineNumber;\r\n ctx.linesLength = stopLineNumber - startLineNumber + 1;\r\n ctx.lines = [];\r\n for (let x = startLineNumber; x <= stopLineNumber; x++) {\r\n ctx.lines[x - startLineNumber] = this.host.createVisibleLine();\r\n }\r\n this._finishRendering(ctx, true, deltaTop);\r\n return ctx;\r\n }\r\n // Update lines which will remain untouched\r\n this._renderUntouchedLines(ctx, Math.max(startLineNumber - ctx.rendLineNumberStart, 0), Math.min(stopLineNumber - ctx.rendLineNumberStart, ctx.linesLength - 1), deltaTop, startLineNumber);\r\n if (ctx.rendLineNumberStart > startLineNumber) {\r\n // Insert lines before\r\n const fromLineNumber = startLineNumber;\r\n const toLineNumber = Math.min(stopLineNumber, ctx.rendLineNumberStart - 1);\r\n if (fromLineNumber <= toLineNumber) {\r\n this._insertLinesBefore(ctx, fromLineNumber, toLineNumber, deltaTop, startLineNumber);\r\n ctx.linesLength += toLineNumber - fromLineNumber + 1;\r\n }\r\n }\r\n else if (ctx.rendLineNumberStart < startLineNumber) {\r\n // Remove lines before\r\n const removeCnt = Math.min(ctx.linesLength, startLineNumber - ctx.rendLineNumberStart);\r\n if (removeCnt > 0) {\r\n this._removeLinesBefore(ctx, removeCnt);\r\n ctx.linesLength -= removeCnt;\r\n }\r\n }\r\n ctx.rendLineNumberStart = startLineNumber;\r\n if (ctx.rendLineNumberStart + ctx.linesLength - 1 < stopLineNumber) {\r\n // Insert lines after\r\n const fromLineNumber = ctx.rendLineNumberStart + ctx.linesLength;\r\n const toLineNumber = stopLineNumber;\r\n if (fromLineNumber <= toLineNumber) {\r\n this._insertLinesAfter(ctx, fromLineNumber, toLineNumber, deltaTop, startLineNumber);\r\n ctx.linesLength += toLineNumber - fromLineNumber + 1;\r\n }\r\n }\r\n else if (ctx.rendLineNumberStart + ctx.linesLength - 1 > stopLineNumber) {\r\n // Remove lines after\r\n const fromLineNumber = Math.max(0, stopLineNumber - ctx.rendLineNumberStart + 1);\r\n const toLineNumber = ctx.linesLength - 1;\r\n const removeCnt = toLineNumber - fromLineNumber + 1;\r\n if (removeCnt > 0) {\r\n this._removeLinesAfter(ctx, removeCnt);\r\n ctx.linesLength -= removeCnt;\r\n }\r\n }\r\n this._finishRendering(ctx, false, deltaTop);\r\n return ctx;\r\n }\r\n _renderUntouchedLines(ctx, startIndex, endIndex, deltaTop, deltaLN) {\r\n const rendLineNumberStart = ctx.rendLineNumberStart;\r\n const lines = ctx.lines;\r\n for (let i = startIndex; i <= endIndex; i++) {\r\n const lineNumber = rendLineNumberStart + i;\r\n lines[i].layoutLine(lineNumber, deltaTop[lineNumber - deltaLN]);\r\n }\r\n }\r\n _insertLinesBefore(ctx, fromLineNumber, toLineNumber, deltaTop, deltaLN) {\r\n const newLines = [];\r\n let newLinesLen = 0;\r\n for (let lineNumber = fromLineNumber; lineNumber <= toLineNumber; lineNumber++) {\r\n newLines[newLinesLen++] = this.host.createVisibleLine();\r\n }\r\n ctx.lines = newLines.concat(ctx.lines);\r\n }\r\n _removeLinesBefore(ctx, removeCount) {\r\n for (let i = 0; i < removeCount; i++) {\r\n const lineDomNode = ctx.lines[i].getDomNode();\r\n if (lineDomNode) {\r\n this.domNode.removeChild(lineDomNode);\r\n }\r\n }\r\n ctx.lines.splice(0, removeCount);\r\n }\r\n _insertLinesAfter(ctx, fromLineNumber, toLineNumber, deltaTop, deltaLN) {\r\n const newLines = [];\r\n let newLinesLen = 0;\r\n for (let lineNumber = fromLineNumber; lineNumber <= toLineNumber; lineNumber++) {\r\n newLines[newLinesLen++] = this.host.createVisibleLine();\r\n }\r\n ctx.lines = ctx.lines.concat(newLines);\r\n }\r\n _removeLinesAfter(ctx, removeCount) {\r\n const removeIndex = ctx.linesLength - removeCount;\r\n for (let i = 0; i < removeCount; i++) {\r\n const lineDomNode = ctx.lines[removeIndex + i].getDomNode();\r\n if (lineDomNode) {\r\n this.domNode.removeChild(lineDomNode);\r\n }\r\n }\r\n ctx.lines.splice(removeIndex, removeCount);\r\n }\r\n _finishRenderingNewLines(ctx, domNodeIsEmpty, newLinesHTML, wasNew) {\r\n if (ViewLayerRenderer._ttPolicy) {\r\n newLinesHTML = ViewLayerRenderer._ttPolicy.createHTML(newLinesHTML);\r\n }\r\n const lastChild = this.domNode.lastChild;\r\n if (domNodeIsEmpty || !lastChild) {\r\n this.domNode.innerHTML = newLinesHTML; // explains the ugly casts -> https://github.com/microsoft/vscode/issues/106396#issuecomment-692625393;\r\n }\r\n else {\r\n lastChild.insertAdjacentHTML('afterend', newLinesHTML);\r\n }\r\n let currChild = this.domNode.lastChild;\r\n for (let i = ctx.linesLength - 1; i >= 0; i--) {\r\n const line = ctx.lines[i];\r\n if (wasNew[i]) {\r\n line.setDomNode(currChild);\r\n currChild = currChild.previousSibling;\r\n }\r\n }\r\n }\r\n _finishRenderingInvalidLines(ctx, invalidLinesHTML, wasInvalid) {\r\n const hugeDomNode = document.createElement('div');\r\n if (ViewLayerRenderer._ttPolicy) {\r\n invalidLinesHTML = ViewLayerRenderer._ttPolicy.createHTML(invalidLinesHTML);\r\n }\r\n hugeDomNode.innerHTML = invalidLinesHTML;\r\n for (let i = 0; i < ctx.linesLength; i++) {\r\n const line = ctx.lines[i];\r\n if (wasInvalid[i]) {\r\n const source = hugeDomNode.firstChild;\r\n const lineDomNode = line.getDomNode();\r\n lineDomNode.parentNode.replaceChild(source, lineDomNode);\r\n line.setDomNode(source);\r\n }\r\n }\r\n }\r\n _finishRendering(ctx, domNodeIsEmpty, deltaTop) {\r\n const sb = ViewLayerRenderer._sb;\r\n const linesLength = ctx.linesLength;\r\n const lines = ctx.lines;\r\n const rendLineNumberStart = ctx.rendLineNumberStart;\r\n const wasNew = [];\r\n {\r\n sb.reset();\r\n let hadNewLine = false;\r\n for (let i = 0; i < linesLength; i++) {\r\n const line = lines[i];\r\n wasNew[i] = false;\r\n const lineDomNode = line.getDomNode();\r\n if (lineDomNode) {\r\n // line is not new\r\n continue;\r\n }\r\n const renderResult = line.renderLine(i + rendLineNumberStart, deltaTop[i], this.viewportData, sb);\r\n if (!renderResult) {\r\n // line does not need rendering\r\n continue;\r\n }\r\n wasNew[i] = true;\r\n hadNewLine = true;\r\n }\r\n if (hadNewLine) {\r\n this._finishRenderingNewLines(ctx, domNodeIsEmpty, sb.build(), wasNew);\r\n }\r\n }\r\n {\r\n sb.reset();\r\n let hadInvalidLine = false;\r\n const wasInvalid = [];\r\n for (let i = 0; i < linesLength; i++) {\r\n const line = lines[i];\r\n wasInvalid[i] = false;\r\n if (wasNew[i]) {\r\n // line was new\r\n continue;\r\n }\r\n const renderResult = line.renderLine(i + rendLineNumberStart, deltaTop[i], this.viewportData, sb);\r\n if (!renderResult) {\r\n // line does not need rendering\r\n continue;\r\n }\r\n wasInvalid[i] = true;\r\n hadInvalidLine = true;\r\n }\r\n if (hadInvalidLine) {\r\n this._finishRenderingInvalidLines(ctx, sb.build(), wasInvalid);\r\n }\r\n }\r\n }\r\n}\r\nViewLayerRenderer._ttPolicy = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('editorViewLayer', { createHTML: value => value });\r\nViewLayerRenderer._sb = createStringBuilder(100000);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { CoreNavigationCommands } from '../controller/coreCommands.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport * as platform from '../../../base/common/platform.js';\r\nexport class ViewController {\r\n constructor(configuration, viewModel, userInputEvents, commandDelegate) {\r\n this.configuration = configuration;\r\n this.viewModel = viewModel;\r\n this.userInputEvents = userInputEvents;\r\n this.commandDelegate = commandDelegate;\r\n }\r\n paste(text, pasteOnNewLine, multicursorText, mode) {\r\n this.commandDelegate.paste(text, pasteOnNewLine, multicursorText, mode);\r\n }\r\n type(text) {\r\n this.commandDelegate.type(text);\r\n }\r\n replacePreviousChar(text, replaceCharCnt) {\r\n this.commandDelegate.replacePreviousChar(text, replaceCharCnt);\r\n }\r\n compositionStart() {\r\n this.commandDelegate.startComposition();\r\n }\r\n compositionEnd() {\r\n this.commandDelegate.endComposition();\r\n }\r\n cut() {\r\n this.commandDelegate.cut();\r\n }\r\n setSelection(modelSelection) {\r\n CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel, {\r\n source: 'keyboard',\r\n selection: modelSelection\r\n });\r\n }\r\n _validateViewColumn(viewPosition) {\r\n const minColumn = this.viewModel.getLineMinColumn(viewPosition.lineNumber);\r\n if (viewPosition.column < minColumn) {\r\n return new Position(viewPosition.lineNumber, minColumn);\r\n }\r\n return viewPosition;\r\n }\r\n _hasMulticursorModifier(data) {\r\n switch (this.configuration.options.get(64 /* multiCursorModifier */)) {\r\n case 'altKey':\r\n return data.altKey;\r\n case 'ctrlKey':\r\n return data.ctrlKey;\r\n case 'metaKey':\r\n return data.metaKey;\r\n default:\r\n return false;\r\n }\r\n }\r\n _hasNonMulticursorModifier(data) {\r\n switch (this.configuration.options.get(64 /* multiCursorModifier */)) {\r\n case 'altKey':\r\n return data.ctrlKey || data.metaKey;\r\n case 'ctrlKey':\r\n return data.altKey || data.metaKey;\r\n case 'metaKey':\r\n return data.ctrlKey || data.altKey;\r\n default:\r\n return false;\r\n }\r\n }\r\n dispatchMouse(data) {\r\n const options = this.configuration.options;\r\n const selectionClipboardIsOn = (platform.isLinux && options.get(91 /* selectionClipboard */));\r\n const columnSelection = options.get(15 /* columnSelection */);\r\n if (data.middleButton && !selectionClipboardIsOn) {\r\n this._columnSelect(data.position, data.mouseColumn, data.inSelectionMode);\r\n }\r\n else if (data.startedOnLineNumbers) {\r\n // If the dragging started on the gutter, then have operations work on the entire line\r\n if (this._hasMulticursorModifier(data)) {\r\n if (data.inSelectionMode) {\r\n this._lastCursorLineSelect(data.position);\r\n }\r\n else {\r\n this._createCursor(data.position, true);\r\n }\r\n }\r\n else {\r\n if (data.inSelectionMode) {\r\n this._lineSelectDrag(data.position);\r\n }\r\n else {\r\n this._lineSelect(data.position);\r\n }\r\n }\r\n }\r\n else if (data.mouseDownCount >= 4) {\r\n this._selectAll();\r\n }\r\n else if (data.mouseDownCount === 3) {\r\n if (this._hasMulticursorModifier(data)) {\r\n if (data.inSelectionMode) {\r\n this._lastCursorLineSelectDrag(data.position);\r\n }\r\n else {\r\n this._lastCursorLineSelect(data.position);\r\n }\r\n }\r\n else {\r\n if (data.inSelectionMode) {\r\n this._lineSelectDrag(data.position);\r\n }\r\n else {\r\n this._lineSelect(data.position);\r\n }\r\n }\r\n }\r\n else if (data.mouseDownCount === 2) {\r\n if (this._hasMulticursorModifier(data)) {\r\n this._lastCursorWordSelect(data.position);\r\n }\r\n else {\r\n if (data.inSelectionMode) {\r\n this._wordSelectDrag(data.position);\r\n }\r\n else {\r\n this._wordSelect(data.position);\r\n }\r\n }\r\n }\r\n else {\r\n if (this._hasMulticursorModifier(data)) {\r\n if (!this._hasNonMulticursorModifier(data)) {\r\n if (data.shiftKey) {\r\n this._columnSelect(data.position, data.mouseColumn, true);\r\n }\r\n else {\r\n // Do multi-cursor operations only when purely alt is pressed\r\n if (data.inSelectionMode) {\r\n this._lastCursorMoveToSelect(data.position);\r\n }\r\n else {\r\n this._createCursor(data.position, false);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n if (data.inSelectionMode) {\r\n if (data.altKey) {\r\n this._columnSelect(data.position, data.mouseColumn, true);\r\n }\r\n else {\r\n if (columnSelection) {\r\n this._columnSelect(data.position, data.mouseColumn, true);\r\n }\r\n else {\r\n this._moveToSelect(data.position);\r\n }\r\n }\r\n }\r\n else {\r\n this.moveTo(data.position);\r\n }\r\n }\r\n }\r\n }\r\n _usualArgs(viewPosition) {\r\n viewPosition = this._validateViewColumn(viewPosition);\r\n return {\r\n source: 'mouse',\r\n position: this._convertViewToModelPosition(viewPosition),\r\n viewPosition: viewPosition\r\n };\r\n }\r\n moveTo(viewPosition) {\r\n CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _moveToSelect(viewPosition) {\r\n CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _columnSelect(viewPosition, mouseColumn, doColumnSelect) {\r\n viewPosition = this._validateViewColumn(viewPosition);\r\n CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel, {\r\n source: 'mouse',\r\n position: this._convertViewToModelPosition(viewPosition),\r\n viewPosition: viewPosition,\r\n mouseColumn: mouseColumn,\r\n doColumnSelect: doColumnSelect\r\n });\r\n }\r\n _createCursor(viewPosition, wholeLine) {\r\n viewPosition = this._validateViewColumn(viewPosition);\r\n CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel, {\r\n source: 'mouse',\r\n position: this._convertViewToModelPosition(viewPosition),\r\n viewPosition: viewPosition,\r\n wholeLine: wholeLine\r\n });\r\n }\r\n _lastCursorMoveToSelect(viewPosition) {\r\n CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _wordSelect(viewPosition) {\r\n CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _wordSelectDrag(viewPosition) {\r\n CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _lastCursorWordSelect(viewPosition) {\r\n CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _lineSelect(viewPosition) {\r\n CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _lineSelectDrag(viewPosition) {\r\n CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _lastCursorLineSelect(viewPosition) {\r\n CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _lastCursorLineSelectDrag(viewPosition) {\r\n CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel, this._usualArgs(viewPosition));\r\n }\r\n _selectAll() {\r\n CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel, { source: 'mouse' });\r\n }\r\n // ----------------------\r\n _convertViewToModelPosition(viewPosition) {\r\n return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(viewPosition);\r\n }\r\n emitKeyDown(e) {\r\n this.userInputEvents.emitKeyDown(e);\r\n }\r\n emitKeyUp(e) {\r\n this.userInputEvents.emitKeyUp(e);\r\n }\r\n emitContextMenu(e) {\r\n this.userInputEvents.emitContextMenu(e);\r\n }\r\n emitMouseMove(e) {\r\n this.userInputEvents.emitMouseMove(e);\r\n }\r\n emitMouseLeave(e) {\r\n this.userInputEvents.emitMouseLeave(e);\r\n }\r\n emitMouseUp(e) {\r\n this.userInputEvents.emitMouseUp(e);\r\n }\r\n emitMouseDown(e) {\r\n this.userInputEvents.emitMouseDown(e);\r\n }\r\n emitMouseDrag(e) {\r\n this.userInputEvents.emitMouseDrag(e);\r\n }\r\n emitMouseDrop(e) {\r\n this.userInputEvents.emitMouseDrop(e);\r\n }\r\n emitMouseDropCanceled() {\r\n this.userInputEvents.emitMouseDropCanceled();\r\n }\r\n emitMouseWheel(e) {\r\n this.userInputEvents.emitMouseWheel(e);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { MouseTarget } from '../controller/mouseTarget.js';\r\nexport class ViewUserInputEvents {\r\n constructor(coordinatesConverter) {\r\n this.onKeyDown = null;\r\n this.onKeyUp = null;\r\n this.onContextMenu = null;\r\n this.onMouseMove = null;\r\n this.onMouseLeave = null;\r\n this.onMouseDown = null;\r\n this.onMouseUp = null;\r\n this.onMouseDrag = null;\r\n this.onMouseDrop = null;\r\n this.onMouseDropCanceled = null;\r\n this.onMouseWheel = null;\r\n this._coordinatesConverter = coordinatesConverter;\r\n }\r\n emitKeyDown(e) {\r\n if (this.onKeyDown) {\r\n this.onKeyDown(e);\r\n }\r\n }\r\n emitKeyUp(e) {\r\n if (this.onKeyUp) {\r\n this.onKeyUp(e);\r\n }\r\n }\r\n emitContextMenu(e) {\r\n if (this.onContextMenu) {\r\n this.onContextMenu(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseMove(e) {\r\n if (this.onMouseMove) {\r\n this.onMouseMove(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseLeave(e) {\r\n if (this.onMouseLeave) {\r\n this.onMouseLeave(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseDown(e) {\r\n if (this.onMouseDown) {\r\n this.onMouseDown(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseUp(e) {\r\n if (this.onMouseUp) {\r\n this.onMouseUp(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseDrag(e) {\r\n if (this.onMouseDrag) {\r\n this.onMouseDrag(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseDrop(e) {\r\n if (this.onMouseDrop) {\r\n this.onMouseDrop(this._convertViewToModelMouseEvent(e));\r\n }\r\n }\r\n emitMouseDropCanceled() {\r\n if (this.onMouseDropCanceled) {\r\n this.onMouseDropCanceled();\r\n }\r\n }\r\n emitMouseWheel(e) {\r\n if (this.onMouseWheel) {\r\n this.onMouseWheel(e);\r\n }\r\n }\r\n _convertViewToModelMouseEvent(e) {\r\n if (e.target) {\r\n return {\r\n event: e.event,\r\n target: this._convertViewToModelMouseTarget(e.target)\r\n };\r\n }\r\n return e;\r\n }\r\n _convertViewToModelMouseTarget(target) {\r\n return ViewUserInputEvents.convertViewToModelMouseTarget(target, this._coordinatesConverter);\r\n }\r\n static convertViewToModelMouseTarget(target, coordinatesConverter) {\r\n return new ExternalMouseTarget(target.element, target.type, target.mouseColumn, target.position ? coordinatesConverter.convertViewPositionToModelPosition(target.position) : null, target.range ? coordinatesConverter.convertViewRangeToModelRange(target.range) : null, target.detail);\r\n }\r\n}\r\nclass ExternalMouseTarget {\r\n constructor(element, type, mouseColumn, position, range, detail) {\r\n this.element = element;\r\n this.type = type;\r\n this.mouseColumn = mouseColumn;\r\n this.position = position;\r\n this.range = range;\r\n this.detail = detail;\r\n }\r\n toString() {\r\n return MouseTarget.toString(this);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { createFastDomNode } from '../../../base/browser/fastDomNode.js';\r\nimport { Configuration } from '../config/configuration.js';\r\nimport { VisibleLinesCollection } from './viewLayer.js';\r\nimport { ViewPart } from './viewPart.js';\r\nexport class ViewOverlays extends ViewPart {\r\n constructor(context) {\r\n super(context);\r\n this._visibleLines = new VisibleLinesCollection(this);\r\n this.domNode = this._visibleLines.domNode;\r\n this._dynamicOverlays = [];\r\n this._isFocused = false;\r\n this.domNode.setClassName('view-overlays');\r\n }\r\n shouldRender() {\r\n if (super.shouldRender()) {\r\n return true;\r\n }\r\n for (let i = 0, len = this._dynamicOverlays.length; i < len; i++) {\r\n const dynamicOverlay = this._dynamicOverlays[i];\r\n if (dynamicOverlay.shouldRender()) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n dispose() {\r\n super.dispose();\r\n for (let i = 0, len = this._dynamicOverlays.length; i < len; i++) {\r\n const dynamicOverlay = this._dynamicOverlays[i];\r\n dynamicOverlay.dispose();\r\n }\r\n this._dynamicOverlays = [];\r\n }\r\n getDomNode() {\r\n return this.domNode;\r\n }\r\n // ---- begin IVisibleLinesHost\r\n createVisibleLine() {\r\n return new ViewOverlayLine(this._context.configuration, this._dynamicOverlays);\r\n }\r\n // ---- end IVisibleLinesHost\r\n addDynamicOverlay(overlay) {\r\n this._dynamicOverlays.push(overlay);\r\n }\r\n // ----- event handlers\r\n onConfigurationChanged(e) {\r\n this._visibleLines.onConfigurationChanged(e);\r\n const startLineNumber = this._visibleLines.getStartLineNumber();\r\n const endLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n const line = this._visibleLines.getVisibleLine(lineNumber);\r\n line.onConfigurationChanged(e);\r\n }\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return this._visibleLines.onFlushed(e);\r\n }\r\n onFocusChanged(e) {\r\n this._isFocused = e.isFocused;\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return this._visibleLines.onLinesChanged(e);\r\n }\r\n onLinesDeleted(e) {\r\n return this._visibleLines.onLinesDeleted(e);\r\n }\r\n onLinesInserted(e) {\r\n return this._visibleLines.onLinesInserted(e);\r\n }\r\n onScrollChanged(e) {\r\n return this._visibleLines.onScrollChanged(e) || true;\r\n }\r\n onTokensChanged(e) {\r\n return this._visibleLines.onTokensChanged(e);\r\n }\r\n onZonesChanged(e) {\r\n return this._visibleLines.onZonesChanged(e);\r\n }\r\n // ----- end event handlers\r\n prepareRender(ctx) {\r\n const toRender = this._dynamicOverlays.filter(overlay => overlay.shouldRender());\r\n for (let i = 0, len = toRender.length; i < len; i++) {\r\n const dynamicOverlay = toRender[i];\r\n dynamicOverlay.prepareRender(ctx);\r\n dynamicOverlay.onDidRender();\r\n }\r\n }\r\n render(ctx) {\r\n // Overwriting to bypass `shouldRender` flag\r\n this._viewOverlaysRender(ctx);\r\n this.domNode.toggleClassName('focused', this._isFocused);\r\n }\r\n _viewOverlaysRender(ctx) {\r\n this._visibleLines.renderLines(ctx.viewportData);\r\n }\r\n}\r\nexport class ViewOverlayLine {\r\n constructor(configuration, dynamicOverlays) {\r\n this._configuration = configuration;\r\n this._lineHeight = this._configuration.options.get(53 /* lineHeight */);\r\n this._dynamicOverlays = dynamicOverlays;\r\n this._domNode = null;\r\n this._renderedContent = null;\r\n }\r\n getDomNode() {\r\n if (!this._domNode) {\r\n return null;\r\n }\r\n return this._domNode.domNode;\r\n }\r\n setDomNode(domNode) {\r\n this._domNode = createFastDomNode(domNode);\r\n }\r\n onContentChanged() {\r\n // Nothing\r\n }\r\n onTokensChanged() {\r\n // Nothing\r\n }\r\n onConfigurationChanged(e) {\r\n this._lineHeight = this._configuration.options.get(53 /* lineHeight */);\r\n }\r\n renderLine(lineNumber, deltaTop, viewportData, sb) {\r\n let result = '';\r\n for (let i = 0, len = this._dynamicOverlays.length; i < len; i++) {\r\n const dynamicOverlay = this._dynamicOverlays[i];\r\n result += dynamicOverlay.render(viewportData.startLineNumber, lineNumber);\r\n }\r\n if (this._renderedContent === result) {\r\n // No rendering needed\r\n return false;\r\n }\r\n this._renderedContent = result;\r\n sb.appendASCIIString('
    ');\r\n sb.appendASCIIString(result);\r\n sb.appendASCIIString('
    ');\r\n return true;\r\n }\r\n layoutLine(lineNumber, deltaTop) {\r\n if (this._domNode) {\r\n this._domNode.setTop(deltaTop);\r\n this._domNode.setHeight(this._lineHeight);\r\n }\r\n }\r\n}\r\nexport class ContentViewOverlays extends ViewOverlays {\r\n constructor(context) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this.domNode.setHeight(0);\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._contentWidth = layoutInfo.contentWidth;\r\n return super.onConfigurationChanged(e) || true;\r\n }\r\n onScrollChanged(e) {\r\n return super.onScrollChanged(e) || e.scrollWidthChanged;\r\n }\r\n // --- end event handlers\r\n _viewOverlaysRender(ctx) {\r\n super._viewOverlaysRender(ctx);\r\n this.domNode.setWidth(Math.max(ctx.scrollWidth, this._contentWidth));\r\n }\r\n}\r\nexport class MarginViewOverlays extends ViewOverlays {\r\n constructor(context) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this.domNode.setClassName('margin-view-overlays');\r\n this.domNode.setWidth(1);\r\n Configuration.applyFontInfo(this.domNode, options.get(38 /* fontInfo */));\r\n }\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n Configuration.applyFontInfo(this.domNode, options.get(38 /* fontInfo */));\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n return super.onConfigurationChanged(e) || true;\r\n }\r\n onScrollChanged(e) {\r\n return super.onScrollChanged(e) || e.scrollHeightChanged;\r\n }\r\n _viewOverlaysRender(ctx) {\r\n super._viewOverlaysRender(ctx);\r\n const height = Math.min(ctx.scrollHeight, 1000000);\r\n this.domNode.setHeight(height);\r\n this.domNode.setWidth(this._contentLeft);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as dom from '../../../../base/browser/dom.js';\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport { PartFingerprints, ViewPart } from '../../view/viewPart.js';\r\nclass Coordinate {\r\n constructor(top, left) {\r\n this.top = top;\r\n this.left = left;\r\n }\r\n}\r\nexport class ViewContentWidgets extends ViewPart {\r\n constructor(context, viewDomNode) {\r\n super(context);\r\n this._viewDomNode = viewDomNode;\r\n this._widgets = {};\r\n this.domNode = createFastDomNode(document.createElement('div'));\r\n PartFingerprints.write(this.domNode, 1 /* ContentWidgets */);\r\n this.domNode.setClassName('contentWidgets');\r\n this.domNode.setPosition('absolute');\r\n this.domNode.setTop(0);\r\n this.overflowingContentWidgetsDomNode = createFastDomNode(document.createElement('div'));\r\n PartFingerprints.write(this.overflowingContentWidgetsDomNode, 2 /* OverflowingContentWidgets */);\r\n this.overflowingContentWidgetsDomNode.setClassName('overflowingContentWidgets');\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._widgets = {};\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const keys = Object.keys(this._widgets);\r\n for (const widgetId of keys) {\r\n this._widgets[widgetId].onConfigurationChanged(e);\r\n }\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n // true for inline decorations that can end up relayouting text\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLineMappingChanged(e) {\r\n const keys = Object.keys(this._widgets);\r\n for (const widgetId of keys) {\r\n this._widgets[widgetId].onLineMappingChanged(e);\r\n }\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return true;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // ---- end view event handlers\r\n addWidget(_widget) {\r\n const myWidget = new Widget(this._context, this._viewDomNode, _widget);\r\n this._widgets[myWidget.id] = myWidget;\r\n if (myWidget.allowEditorOverflow) {\r\n this.overflowingContentWidgetsDomNode.appendChild(myWidget.domNode);\r\n }\r\n else {\r\n this.domNode.appendChild(myWidget.domNode);\r\n }\r\n this.setShouldRender();\r\n }\r\n setWidgetPosition(widget, range, preference) {\r\n const myWidget = this._widgets[widget.getId()];\r\n myWidget.setPosition(range, preference);\r\n this.setShouldRender();\r\n }\r\n removeWidget(widget) {\r\n const widgetId = widget.getId();\r\n if (this._widgets.hasOwnProperty(widgetId)) {\r\n const myWidget = this._widgets[widgetId];\r\n delete this._widgets[widgetId];\r\n const domNode = myWidget.domNode.domNode;\r\n domNode.parentNode.removeChild(domNode);\r\n domNode.removeAttribute('monaco-visible-content-widget');\r\n this.setShouldRender();\r\n }\r\n }\r\n shouldSuppressMouseDownOnWidget(widgetId) {\r\n if (this._widgets.hasOwnProperty(widgetId)) {\r\n return this._widgets[widgetId].suppressMouseDown;\r\n }\r\n return false;\r\n }\r\n onBeforeRender(viewportData) {\r\n const keys = Object.keys(this._widgets);\r\n for (const widgetId of keys) {\r\n this._widgets[widgetId].onBeforeRender(viewportData);\r\n }\r\n }\r\n prepareRender(ctx) {\r\n const keys = Object.keys(this._widgets);\r\n for (const widgetId of keys) {\r\n this._widgets[widgetId].prepareRender(ctx);\r\n }\r\n }\r\n render(ctx) {\r\n const keys = Object.keys(this._widgets);\r\n for (const widgetId of keys) {\r\n this._widgets[widgetId].render(ctx);\r\n }\r\n }\r\n}\r\nclass Widget {\r\n constructor(context, viewDomNode, actual) {\r\n this._context = context;\r\n this._viewDomNode = viewDomNode;\r\n this._actual = actual;\r\n this.domNode = createFastDomNode(this._actual.getDomNode());\r\n this.id = this._actual.getId();\r\n this.allowEditorOverflow = this._actual.allowEditorOverflow || false;\r\n this.suppressMouseDown = this._actual.suppressMouseDown || false;\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._fixedOverflowWidgets = options.get(32 /* fixedOverflowWidgets */);\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._range = null;\r\n this._viewRange = null;\r\n this._preference = [];\r\n this._cachedDomNodeClientWidth = -1;\r\n this._cachedDomNodeClientHeight = -1;\r\n this._maxWidth = this._getMaxWidth();\r\n this._isVisible = false;\r\n this._renderData = null;\r\n this.domNode.setPosition((this._fixedOverflowWidgets && this.allowEditorOverflow) ? 'fixed' : 'absolute');\r\n this.domNode.setVisibility('hidden');\r\n this.domNode.setAttribute('widgetId', this.id);\r\n this.domNode.setMaxWidth(this._maxWidth);\r\n }\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._maxWidth = this._getMaxWidth();\r\n }\r\n }\r\n onLineMappingChanged(e) {\r\n this._setPosition(this._range);\r\n }\r\n _setPosition(range) {\r\n this._range = range;\r\n this._viewRange = null;\r\n if (this._range) {\r\n // Do not trust that widgets give a valid position\r\n const validModelRange = this._context.model.validateModelRange(this._range);\r\n if (this._context.model.coordinatesConverter.modelPositionIsVisible(validModelRange.getStartPosition()) || this._context.model.coordinatesConverter.modelPositionIsVisible(validModelRange.getEndPosition())) {\r\n this._viewRange = this._context.model.coordinatesConverter.convertModelRangeToViewRange(validModelRange);\r\n }\r\n }\r\n }\r\n _getMaxWidth() {\r\n return (this.allowEditorOverflow\r\n ? window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth\r\n : this._contentWidth);\r\n }\r\n setPosition(range, preference) {\r\n this._setPosition(range);\r\n this._preference = preference;\r\n this._cachedDomNodeClientWidth = -1;\r\n this._cachedDomNodeClientHeight = -1;\r\n }\r\n _layoutBoxInViewport(topLeft, bottomLeft, width, height, ctx) {\r\n // Our visible box is split horizontally by the current line => 2 boxes\r\n // a) the box above the line\r\n const aboveLineTop = topLeft.top;\r\n const heightAboveLine = aboveLineTop;\r\n // b) the box under the line\r\n const underLineTop = bottomLeft.top + this._lineHeight;\r\n const heightUnderLine = ctx.viewportHeight - underLineTop;\r\n const aboveTop = aboveLineTop - height;\r\n const fitsAbove = (heightAboveLine >= height);\r\n const belowTop = underLineTop;\r\n const fitsBelow = (heightUnderLine >= height);\r\n // And its left\r\n let actualAboveLeft = topLeft.left;\r\n let actualBelowLeft = bottomLeft.left;\r\n if (actualAboveLeft + width > ctx.scrollLeft + ctx.viewportWidth) {\r\n actualAboveLeft = ctx.scrollLeft + ctx.viewportWidth - width;\r\n }\r\n if (actualBelowLeft + width > ctx.scrollLeft + ctx.viewportWidth) {\r\n actualBelowLeft = ctx.scrollLeft + ctx.viewportWidth - width;\r\n }\r\n if (actualAboveLeft < ctx.scrollLeft) {\r\n actualAboveLeft = ctx.scrollLeft;\r\n }\r\n if (actualBelowLeft < ctx.scrollLeft) {\r\n actualBelowLeft = ctx.scrollLeft;\r\n }\r\n return {\r\n fitsAbove: fitsAbove,\r\n aboveTop: aboveTop,\r\n aboveLeft: actualAboveLeft,\r\n fitsBelow: fitsBelow,\r\n belowTop: belowTop,\r\n belowLeft: actualBelowLeft,\r\n };\r\n }\r\n _layoutHorizontalSegmentInPage(windowSize, domNodePosition, left, width) {\r\n // Initially, the limits are defined as the dom node limits\r\n const MIN_LIMIT = Math.max(0, domNodePosition.left - width);\r\n const MAX_LIMIT = Math.min(domNodePosition.left + domNodePosition.width + width, windowSize.width);\r\n let absoluteLeft = domNodePosition.left + left - dom.StandardWindow.scrollX;\r\n if (absoluteLeft + width > MAX_LIMIT) {\r\n const delta = absoluteLeft - (MAX_LIMIT - width);\r\n absoluteLeft -= delta;\r\n left -= delta;\r\n }\r\n if (absoluteLeft < MIN_LIMIT) {\r\n const delta = absoluteLeft - MIN_LIMIT;\r\n absoluteLeft -= delta;\r\n left -= delta;\r\n }\r\n return [left, absoluteLeft];\r\n }\r\n _layoutBoxInPage(topLeft, bottomLeft, width, height, ctx) {\r\n const aboveTop = topLeft.top - height;\r\n const belowTop = bottomLeft.top + this._lineHeight;\r\n const domNodePosition = dom.getDomNodePagePosition(this._viewDomNode.domNode);\r\n const absoluteAboveTop = domNodePosition.top + aboveTop - dom.StandardWindow.scrollY;\r\n const absoluteBelowTop = domNodePosition.top + belowTop - dom.StandardWindow.scrollY;\r\n const windowSize = dom.getClientArea(document.body);\r\n const [aboveLeft, absoluteAboveLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, topLeft.left - ctx.scrollLeft + this._contentLeft, width);\r\n const [belowLeft, absoluteBelowLeft] = this._layoutHorizontalSegmentInPage(windowSize, domNodePosition, bottomLeft.left - ctx.scrollLeft + this._contentLeft, width);\r\n // Leave some clearance to the top/bottom\r\n const TOP_PADDING = 22;\r\n const BOTTOM_PADDING = 22;\r\n const fitsAbove = (absoluteAboveTop >= TOP_PADDING);\r\n const fitsBelow = (absoluteBelowTop + height <= windowSize.height - BOTTOM_PADDING);\r\n if (this._fixedOverflowWidgets) {\r\n return {\r\n fitsAbove,\r\n aboveTop: Math.max(absoluteAboveTop, TOP_PADDING),\r\n aboveLeft: absoluteAboveLeft,\r\n fitsBelow,\r\n belowTop: absoluteBelowTop,\r\n belowLeft: absoluteBelowLeft\r\n };\r\n }\r\n return {\r\n fitsAbove,\r\n aboveTop: aboveTop,\r\n aboveLeft,\r\n fitsBelow,\r\n belowTop,\r\n belowLeft\r\n };\r\n }\r\n _prepareRenderWidgetAtExactPositionOverflowing(topLeft) {\r\n return new Coordinate(topLeft.top, topLeft.left + this._contentLeft);\r\n }\r\n /**\r\n * Compute `this._topLeft`\r\n */\r\n _getTopAndBottomLeft(ctx) {\r\n if (!this._viewRange) {\r\n return [null, null];\r\n }\r\n const visibleRangesForRange = ctx.linesVisibleRangesForRange(this._viewRange, false);\r\n if (!visibleRangesForRange || visibleRangesForRange.length === 0) {\r\n return [null, null];\r\n }\r\n let firstLine = visibleRangesForRange[0];\r\n let lastLine = visibleRangesForRange[0];\r\n for (const visibleRangesForLine of visibleRangesForRange) {\r\n if (visibleRangesForLine.lineNumber < firstLine.lineNumber) {\r\n firstLine = visibleRangesForLine;\r\n }\r\n if (visibleRangesForLine.lineNumber > lastLine.lineNumber) {\r\n lastLine = visibleRangesForLine;\r\n }\r\n }\r\n let firstLineMinLeft = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; //firstLine.Constants.MAX_SAFE_SMALL_INTEGER;\r\n for (const visibleRange of firstLine.ranges) {\r\n if (visibleRange.left < firstLineMinLeft) {\r\n firstLineMinLeft = visibleRange.left;\r\n }\r\n }\r\n let lastLineMinLeft = 1073741824 /* MAX_SAFE_SMALL_INTEGER */; //lastLine.Constants.MAX_SAFE_SMALL_INTEGER;\r\n for (const visibleRange of lastLine.ranges) {\r\n if (visibleRange.left < lastLineMinLeft) {\r\n lastLineMinLeft = visibleRange.left;\r\n }\r\n }\r\n const topForPosition = ctx.getVerticalOffsetForLineNumber(firstLine.lineNumber) - ctx.scrollTop;\r\n const topLeft = new Coordinate(topForPosition, firstLineMinLeft);\r\n const topForBottomLine = ctx.getVerticalOffsetForLineNumber(lastLine.lineNumber) - ctx.scrollTop;\r\n const bottomLeft = new Coordinate(topForBottomLine, lastLineMinLeft);\r\n return [topLeft, bottomLeft];\r\n }\r\n _prepareRenderWidget(ctx) {\r\n const [topLeft, bottomLeft] = this._getTopAndBottomLeft(ctx);\r\n if (!topLeft || !bottomLeft) {\r\n return null;\r\n }\r\n if (this._cachedDomNodeClientWidth === -1 || this._cachedDomNodeClientHeight === -1) {\r\n let preferredDimensions = null;\r\n if (typeof this._actual.beforeRender === 'function') {\r\n preferredDimensions = safeInvoke(this._actual.beforeRender, this._actual);\r\n }\r\n if (preferredDimensions) {\r\n this._cachedDomNodeClientWidth = preferredDimensions.width;\r\n this._cachedDomNodeClientHeight = preferredDimensions.height;\r\n }\r\n else {\r\n const domNode = this.domNode.domNode;\r\n this._cachedDomNodeClientWidth = domNode.clientWidth;\r\n this._cachedDomNodeClientHeight = domNode.clientHeight;\r\n }\r\n }\r\n let placement;\r\n if (this.allowEditorOverflow) {\r\n placement = this._layoutBoxInPage(topLeft, bottomLeft, this._cachedDomNodeClientWidth, this._cachedDomNodeClientHeight, ctx);\r\n }\r\n else {\r\n placement = this._layoutBoxInViewport(topLeft, bottomLeft, this._cachedDomNodeClientWidth, this._cachedDomNodeClientHeight, ctx);\r\n }\r\n // Do two passes, first for perfect fit, second picks first option\r\n if (this._preference) {\r\n for (let pass = 1; pass <= 2; pass++) {\r\n for (const pref of this._preference) {\r\n // placement\r\n if (pref === 1 /* ABOVE */) {\r\n if (!placement) {\r\n // Widget outside of viewport\r\n return null;\r\n }\r\n if (pass === 2 || placement.fitsAbove) {\r\n return { coordinate: new Coordinate(placement.aboveTop, placement.aboveLeft), position: 1 /* ABOVE */ };\r\n }\r\n }\r\n else if (pref === 2 /* BELOW */) {\r\n if (!placement) {\r\n // Widget outside of viewport\r\n return null;\r\n }\r\n if (pass === 2 || placement.fitsBelow) {\r\n return { coordinate: new Coordinate(placement.belowTop, placement.belowLeft), position: 2 /* BELOW */ };\r\n }\r\n }\r\n else {\r\n if (this.allowEditorOverflow) {\r\n return { coordinate: this._prepareRenderWidgetAtExactPositionOverflowing(topLeft), position: 0 /* EXACT */ };\r\n }\r\n else {\r\n return { coordinate: topLeft, position: 0 /* EXACT */ };\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n * On this first pass, we ensure that the content widget (if it is in the viewport) has the max width set correctly.\r\n */\r\n onBeforeRender(viewportData) {\r\n if (!this._viewRange || !this._preference) {\r\n return;\r\n }\r\n if (this._viewRange.endLineNumber < viewportData.startLineNumber || this._viewRange.startLineNumber > viewportData.endLineNumber) {\r\n // Outside of viewport\r\n return;\r\n }\r\n this.domNode.setMaxWidth(this._maxWidth);\r\n }\r\n prepareRender(ctx) {\r\n this._renderData = this._prepareRenderWidget(ctx);\r\n }\r\n render(ctx) {\r\n if (!this._renderData) {\r\n // This widget should be invisible\r\n if (this._isVisible) {\r\n this.domNode.removeAttribute('monaco-visible-content-widget');\r\n this._isVisible = false;\r\n this.domNode.setVisibility('hidden');\r\n }\r\n if (typeof this._actual.afterRender === 'function') {\r\n safeInvoke(this._actual.afterRender, this._actual, null);\r\n }\r\n return;\r\n }\r\n // This widget should be visible\r\n if (this.allowEditorOverflow) {\r\n this.domNode.setTop(this._renderData.coordinate.top);\r\n this.domNode.setLeft(this._renderData.coordinate.left);\r\n }\r\n else {\r\n this.domNode.setTop(this._renderData.coordinate.top + ctx.scrollTop - ctx.bigNumbersDelta);\r\n this.domNode.setLeft(this._renderData.coordinate.left);\r\n }\r\n if (!this._isVisible) {\r\n this.domNode.setVisibility('inherit');\r\n this.domNode.setAttribute('monaco-visible-content-widget', 'true');\r\n this._isVisible = true;\r\n }\r\n if (typeof this._actual.afterRender === 'function') {\r\n safeInvoke(this._actual.afterRender, this._actual, this._renderData.position);\r\n }\r\n }\r\n}\r\nfunction safeInvoke(fn, thisArg, ...args) {\r\n try {\r\n return fn.call(thisArg, ...args);\r\n }\r\n catch (_a) {\r\n // ignore\r\n return null;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './currentLineHighlight.css';\r\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay.js';\r\nimport { editorLineHighlight, editorLineHighlightBorder } from '../../../common/view/editorColorRegistry.js';\r\nimport * as arrays from '../../../../base/common/arrays.js';\r\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\r\nimport { Selection } from '../../../common/core/selection.js';\r\nlet isRenderedUsingBorder = true;\r\nexport class AbstractLineHighlightOverlay extends DynamicViewOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._renderLineHighlight = options.get(80 /* renderLineHighlight */);\r\n this._renderLineHighlightOnlyWhenFocus = options.get(81 /* renderLineHighlightOnlyWhenFocus */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._selectionIsEmpty = true;\r\n this._focused = false;\r\n this._cursorLineNumbers = [1];\r\n this._selections = [new Selection(1, 1, 1, 1)];\r\n this._renderData = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n super.dispose();\r\n }\r\n _readFromSelections() {\r\n let hasChanged = false;\r\n // Only render the first selection when using border\r\n const renderSelections = isRenderedUsingBorder ? this._selections.slice(0, 1) : this._selections;\r\n const cursorsLineNumbers = renderSelections.map(s => s.positionLineNumber);\r\n cursorsLineNumbers.sort((a, b) => a - b);\r\n if (!arrays.equals(this._cursorLineNumbers, cursorsLineNumbers)) {\r\n this._cursorLineNumbers = cursorsLineNumbers;\r\n hasChanged = true;\r\n }\r\n const selectionIsEmpty = renderSelections.every(s => s.isEmpty());\r\n if (this._selectionIsEmpty !== selectionIsEmpty) {\r\n this._selectionIsEmpty = selectionIsEmpty;\r\n hasChanged = true;\r\n }\r\n return hasChanged;\r\n }\r\n // --- begin event handlers\r\n onThemeChanged(e) {\r\n return this._readFromSelections();\r\n }\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._renderLineHighlight = options.get(80 /* renderLineHighlight */);\r\n this._renderLineHighlightOnlyWhenFocus = options.get(81 /* renderLineHighlightOnlyWhenFocus */);\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this._contentWidth = layoutInfo.contentWidth;\r\n return true;\r\n }\r\n onCursorStateChanged(e) {\r\n this._selections = e.selections;\r\n return this._readFromSelections();\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollWidthChanged || e.scrollTopChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n onFocusChanged(e) {\r\n if (!this._renderLineHighlightOnlyWhenFocus) {\r\n return false;\r\n }\r\n this._focused = e.isFocused;\r\n return true;\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n if (!this._shouldRenderThis()) {\r\n this._renderData = null;\r\n return;\r\n }\r\n const renderedLine = this._renderOne(ctx);\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const len = this._cursorLineNumbers.length;\r\n let index = 0;\r\n const renderData = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n while (index < len && this._cursorLineNumbers[index] < lineNumber) {\r\n index++;\r\n }\r\n if (index < len && this._cursorLineNumbers[index] === lineNumber) {\r\n renderData[lineIndex] = renderedLine;\r\n }\r\n else {\r\n renderData[lineIndex] = '';\r\n }\r\n }\r\n this._renderData = renderData;\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderData) {\r\n return '';\r\n }\r\n const lineIndex = lineNumber - startLineNumber;\r\n if (lineIndex >= this._renderData.length) {\r\n return '';\r\n }\r\n return this._renderData[lineIndex];\r\n }\r\n}\r\nexport class CurrentLineHighlightOverlay extends AbstractLineHighlightOverlay {\r\n _renderOne(ctx) {\r\n const className = 'current-line' + (this._shouldRenderOther() ? ' current-line-both' : '');\r\n return `
    `;\r\n }\r\n _shouldRenderThis() {\r\n return ((this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all')\r\n && this._selectionIsEmpty\r\n && (!this._renderLineHighlightOnlyWhenFocus || this._focused));\r\n }\r\n _shouldRenderOther() {\r\n return ((this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all')\r\n && (!this._renderLineHighlightOnlyWhenFocus || this._focused));\r\n }\r\n}\r\nexport class CurrentLineMarginHighlightOverlay extends AbstractLineHighlightOverlay {\r\n _renderOne(ctx) {\r\n const className = 'current-line' + (this._shouldRenderMargin() ? ' current-line-margin' : '') + (this._shouldRenderOther() ? ' current-line-margin-both' : '');\r\n return `
    `;\r\n }\r\n _shouldRenderMargin() {\r\n return ((this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all')\r\n && (!this._renderLineHighlightOnlyWhenFocus || this._focused));\r\n }\r\n _shouldRenderThis() {\r\n return true;\r\n }\r\n _shouldRenderOther() {\r\n return ((this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all')\r\n && this._selectionIsEmpty\r\n && (!this._renderLineHighlightOnlyWhenFocus || this._focused));\r\n }\r\n}\r\nregisterThemingParticipant((theme, collector) => {\r\n isRenderedUsingBorder = false;\r\n const lineHighlight = theme.getColor(editorLineHighlight);\r\n if (lineHighlight) {\r\n collector.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${lineHighlight}; }`);\r\n collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${lineHighlight}; border: none; }`);\r\n }\r\n if (!lineHighlight || lineHighlight.isTransparent() || theme.defines(editorLineHighlightBorder)) {\r\n const lineHighlightBorder = theme.getColor(editorLineHighlightBorder);\r\n if (lineHighlightBorder) {\r\n isRenderedUsingBorder = true;\r\n collector.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${lineHighlightBorder}; }`);\r\n collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${lineHighlightBorder}; }`);\r\n if (theme.type === 'hc') {\r\n collector.addRule(`.monaco-editor .view-overlays .current-line { border-width: 1px; }`);\r\n collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }`);\r\n }\r\n }\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './decorations.css';\r\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay.js';\r\nimport { Range } from '../../../common/core/range.js';\r\nimport { HorizontalRange } from '../../../common/view/renderingContext.js';\r\nexport class DecorationsOverlay extends DynamicViewOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n this._renderResult = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged || e.scrollWidthChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n const _decorations = ctx.getDecorationsInViewport();\r\n // Keep only decorations with `className`\r\n let decorations = [], decorationsLen = 0;\r\n for (let i = 0, len = _decorations.length; i < len; i++) {\r\n const d = _decorations[i];\r\n if (d.options.className) {\r\n decorations[decorationsLen++] = d;\r\n }\r\n }\r\n // Sort decorations for consistent render output\r\n decorations = decorations.sort((a, b) => {\r\n if (a.options.zIndex < b.options.zIndex) {\r\n return -1;\r\n }\r\n if (a.options.zIndex > b.options.zIndex) {\r\n return 1;\r\n }\r\n const aClassName = a.options.className;\r\n const bClassName = b.options.className;\r\n if (aClassName < bClassName) {\r\n return -1;\r\n }\r\n if (aClassName > bClassName) {\r\n return 1;\r\n }\r\n return Range.compareRangesUsingStarts(a.range, b.range);\r\n });\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n output[lineIndex] = '';\r\n }\r\n // Render first whole line decorations and then regular decorations\r\n this._renderWholeLineDecorations(ctx, decorations, output);\r\n this._renderNormalDecorations(ctx, decorations, output);\r\n this._renderResult = output;\r\n }\r\n _renderWholeLineDecorations(ctx, decorations, output) {\r\n const lineHeight = String(this._lineHeight);\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n for (let i = 0, lenI = decorations.length; i < lenI; i++) {\r\n const d = decorations[i];\r\n if (!d.options.isWholeLine) {\r\n continue;\r\n }\r\n const decorationOutput = ('
    ');\r\n const startLineNumber = Math.max(d.range.startLineNumber, visibleStartLineNumber);\r\n const endLineNumber = Math.min(d.range.endLineNumber, visibleEndLineNumber);\r\n for (let j = startLineNumber; j <= endLineNumber; j++) {\r\n const lineIndex = j - visibleStartLineNumber;\r\n output[lineIndex] += decorationOutput;\r\n }\r\n }\r\n }\r\n _renderNormalDecorations(ctx, decorations, output) {\r\n const lineHeight = String(this._lineHeight);\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n let prevClassName = null;\r\n let prevShowIfCollapsed = false;\r\n let prevRange = null;\r\n for (let i = 0, lenI = decorations.length; i < lenI; i++) {\r\n const d = decorations[i];\r\n if (d.options.isWholeLine) {\r\n continue;\r\n }\r\n const className = d.options.className;\r\n const showIfCollapsed = Boolean(d.options.showIfCollapsed);\r\n let range = d.range;\r\n if (showIfCollapsed && range.endColumn === 1 && range.endLineNumber !== range.startLineNumber) {\r\n range = new Range(range.startLineNumber, range.startColumn, range.endLineNumber - 1, this._context.model.getLineMaxColumn(range.endLineNumber - 1));\r\n }\r\n if (prevClassName === className && prevShowIfCollapsed === showIfCollapsed && Range.areIntersectingOrTouching(prevRange, range)) {\r\n // merge into previous decoration\r\n prevRange = Range.plusRange(prevRange, range);\r\n continue;\r\n }\r\n // flush previous decoration\r\n if (prevClassName !== null) {\r\n this._renderNormalDecoration(ctx, prevRange, prevClassName, prevShowIfCollapsed, lineHeight, visibleStartLineNumber, output);\r\n }\r\n prevClassName = className;\r\n prevShowIfCollapsed = showIfCollapsed;\r\n prevRange = range;\r\n }\r\n if (prevClassName !== null) {\r\n this._renderNormalDecoration(ctx, prevRange, prevClassName, prevShowIfCollapsed, lineHeight, visibleStartLineNumber, output);\r\n }\r\n }\r\n _renderNormalDecoration(ctx, range, className, showIfCollapsed, lineHeight, visibleStartLineNumber, output) {\r\n const linesVisibleRanges = ctx.linesVisibleRangesForRange(range, /*TODO@Alex*/ className === 'findMatch');\r\n if (!linesVisibleRanges) {\r\n return;\r\n }\r\n for (let j = 0, lenJ = linesVisibleRanges.length; j < lenJ; j++) {\r\n const lineVisibleRanges = linesVisibleRanges[j];\r\n if (lineVisibleRanges.outsideRenderedLine) {\r\n continue;\r\n }\r\n const lineIndex = lineVisibleRanges.lineNumber - visibleStartLineNumber;\r\n if (showIfCollapsed && lineVisibleRanges.ranges.length === 1) {\r\n const singleVisibleRange = lineVisibleRanges.ranges[0];\r\n if (singleVisibleRange.width === 0) {\r\n // collapsed range case => make the decoration visible by faking its width\r\n lineVisibleRanges.ranges[0] = new HorizontalRange(singleVisibleRange.left, this._typicalHalfwidthCharacterWidth);\r\n }\r\n }\r\n for (let k = 0, lenK = lineVisibleRanges.ranges.length; k < lenK; k++) {\r\n const visibleRange = lineVisibleRanges.ranges[k];\r\n const decorationOutput = ('
    ');\r\n output[lineIndex] += decorationOutput;\r\n }\r\n }\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderResult) {\r\n return '';\r\n }\r\n const lineIndex = lineNumber - startLineNumber;\r\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\r\n return '';\r\n }\r\n return this._renderResult[lineIndex];\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as dom from '../../../../base/browser/dom.js';\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport { SmoothScrollableElement } from '../../../../base/browser/ui/scrollbar/scrollableElement.js';\r\nimport { PartFingerprints, ViewPart } from '../../view/viewPart.js';\r\nimport { getThemeTypeSelector } from '../../../../platform/theme/common/themeService.js';\r\nexport class EditorScrollbar extends ViewPart {\r\n constructor(context, linesContent, viewDomNode, overflowGuardDomNode) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n const scrollbar = options.get(87 /* scrollbar */);\r\n const mouseWheelScrollSensitivity = options.get(61 /* mouseWheelScrollSensitivity */);\r\n const fastScrollSensitivity = options.get(30 /* fastScrollSensitivity */);\r\n const scrollPredominantAxis = options.get(90 /* scrollPredominantAxis */);\r\n const scrollbarOptions = {\r\n listenOnDomNode: viewDomNode.domNode,\r\n className: 'editor-scrollable' + ' ' + getThemeTypeSelector(context.theme.type),\r\n useShadows: false,\r\n lazyRender: true,\r\n vertical: scrollbar.vertical,\r\n horizontal: scrollbar.horizontal,\r\n verticalHasArrows: scrollbar.verticalHasArrows,\r\n horizontalHasArrows: scrollbar.horizontalHasArrows,\r\n verticalScrollbarSize: scrollbar.verticalScrollbarSize,\r\n verticalSliderSize: scrollbar.verticalSliderSize,\r\n horizontalScrollbarSize: scrollbar.horizontalScrollbarSize,\r\n horizontalSliderSize: scrollbar.horizontalSliderSize,\r\n handleMouseWheel: scrollbar.handleMouseWheel,\r\n alwaysConsumeMouseWheel: scrollbar.alwaysConsumeMouseWheel,\r\n arrowSize: scrollbar.arrowSize,\r\n mouseWheelScrollSensitivity: mouseWheelScrollSensitivity,\r\n fastScrollSensitivity: fastScrollSensitivity,\r\n scrollPredominantAxis: scrollPredominantAxis,\r\n scrollByPage: scrollbar.scrollByPage,\r\n };\r\n this.scrollbar = this._register(new SmoothScrollableElement(linesContent.domNode, scrollbarOptions, this._context.viewLayout.getScrollable()));\r\n PartFingerprints.write(this.scrollbar.getDomNode(), 5 /* ScrollableElement */);\r\n this.scrollbarDomNode = createFastDomNode(this.scrollbar.getDomNode());\r\n this.scrollbarDomNode.setPosition('absolute');\r\n this._setLayout();\r\n // When having a zone widget that calls .focus() on one of its dom elements,\r\n // the browser will try desperately to reveal that dom node, unexpectedly\r\n // changing the .scrollTop of this.linesContent\r\n const onBrowserDesperateReveal = (domNode, lookAtScrollTop, lookAtScrollLeft) => {\r\n const newScrollPosition = {};\r\n if (lookAtScrollTop) {\r\n const deltaTop = domNode.scrollTop;\r\n if (deltaTop) {\r\n newScrollPosition.scrollTop = this._context.viewLayout.getCurrentScrollTop() + deltaTop;\r\n domNode.scrollTop = 0;\r\n }\r\n }\r\n if (lookAtScrollLeft) {\r\n const deltaLeft = domNode.scrollLeft;\r\n if (deltaLeft) {\r\n newScrollPosition.scrollLeft = this._context.viewLayout.getCurrentScrollLeft() + deltaLeft;\r\n domNode.scrollLeft = 0;\r\n }\r\n }\r\n this._context.model.setScrollPosition(newScrollPosition, 1 /* Immediate */);\r\n };\r\n // I've seen this happen both on the view dom node & on the lines content dom node.\r\n this._register(dom.addDisposableListener(viewDomNode.domNode, 'scroll', (e) => onBrowserDesperateReveal(viewDomNode.domNode, true, true)));\r\n this._register(dom.addDisposableListener(linesContent.domNode, 'scroll', (e) => onBrowserDesperateReveal(linesContent.domNode, true, false)));\r\n this._register(dom.addDisposableListener(overflowGuardDomNode.domNode, 'scroll', (e) => onBrowserDesperateReveal(overflowGuardDomNode.domNode, true, false)));\r\n this._register(dom.addDisposableListener(this.scrollbarDomNode.domNode, 'scroll', (e) => onBrowserDesperateReveal(this.scrollbarDomNode.domNode, true, false)));\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n _setLayout() {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this.scrollbarDomNode.setLeft(layoutInfo.contentLeft);\r\n const minimap = options.get(59 /* minimap */);\r\n const side = minimap.side;\r\n if (side === 'right') {\r\n this.scrollbarDomNode.setWidth(layoutInfo.contentWidth + layoutInfo.minimap.minimapWidth);\r\n }\r\n else {\r\n this.scrollbarDomNode.setWidth(layoutInfo.contentWidth);\r\n }\r\n this.scrollbarDomNode.setHeight(layoutInfo.height);\r\n }\r\n getOverviewRulerLayoutInfo() {\r\n return this.scrollbar.getOverviewRulerLayoutInfo();\r\n }\r\n getDomNode() {\r\n return this.scrollbarDomNode;\r\n }\r\n delegateVerticalScrollbarMouseDown(browserEvent) {\r\n this.scrollbar.delegateVerticalScrollbarMouseDown(browserEvent);\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n if (e.hasChanged(87 /* scrollbar */)\r\n || e.hasChanged(61 /* mouseWheelScrollSensitivity */)\r\n || e.hasChanged(30 /* fastScrollSensitivity */)) {\r\n const options = this._context.configuration.options;\r\n const scrollbar = options.get(87 /* scrollbar */);\r\n const mouseWheelScrollSensitivity = options.get(61 /* mouseWheelScrollSensitivity */);\r\n const fastScrollSensitivity = options.get(30 /* fastScrollSensitivity */);\r\n const scrollPredominantAxis = options.get(90 /* scrollPredominantAxis */);\r\n const newOpts = {\r\n handleMouseWheel: scrollbar.handleMouseWheel,\r\n mouseWheelScrollSensitivity: mouseWheelScrollSensitivity,\r\n fastScrollSensitivity: fastScrollSensitivity,\r\n scrollPredominantAxis: scrollPredominantAxis\r\n };\r\n this.scrollbar.updateOptions(newOpts);\r\n }\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n this._setLayout();\r\n }\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return true;\r\n }\r\n onThemeChanged(e) {\r\n this.scrollbar.updateClassName('editor-scrollable' + ' ' + getThemeTypeSelector(this._context.theme.type));\r\n return true;\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n // Nothing to do\r\n }\r\n render(ctx) {\r\n this.scrollbar.renderNow();\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './glyphMargin.css';\r\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay.js';\r\nexport class DecorationToRender {\r\n constructor(startLineNumber, endLineNumber, className) {\r\n this.startLineNumber = +startLineNumber;\r\n this.endLineNumber = +endLineNumber;\r\n this.className = String(className);\r\n }\r\n}\r\nexport class DedupOverlay extends DynamicViewOverlay {\r\n _render(visibleStartLineNumber, visibleEndLineNumber, decorations) {\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n output[lineIndex] = [];\r\n }\r\n if (decorations.length === 0) {\r\n return output;\r\n }\r\n decorations.sort((a, b) => {\r\n if (a.className === b.className) {\r\n if (a.startLineNumber === b.startLineNumber) {\r\n return a.endLineNumber - b.endLineNumber;\r\n }\r\n return a.startLineNumber - b.startLineNumber;\r\n }\r\n return (a.className < b.className ? -1 : 1);\r\n });\r\n let prevClassName = null;\r\n let prevEndLineIndex = 0;\r\n for (let i = 0, len = decorations.length; i < len; i++) {\r\n const d = decorations[i];\r\n const className = d.className;\r\n let startLineIndex = Math.max(d.startLineNumber, visibleStartLineNumber) - visibleStartLineNumber;\r\n const endLineIndex = Math.min(d.endLineNumber, visibleEndLineNumber) - visibleStartLineNumber;\r\n if (prevClassName === className) {\r\n startLineIndex = Math.max(prevEndLineIndex + 1, startLineIndex);\r\n prevEndLineIndex = Math.max(prevEndLineIndex, endLineIndex);\r\n }\r\n else {\r\n prevClassName = className;\r\n prevEndLineIndex = endLineIndex;\r\n }\r\n for (let i = startLineIndex; i <= prevEndLineIndex; i++) {\r\n output[i].push(prevClassName);\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nexport class GlyphMarginOverlay extends DedupOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._glyphMargin = options.get(44 /* glyphMargin */);\r\n this._glyphMarginLeft = layoutInfo.glyphMarginLeft;\r\n this._glyphMarginWidth = layoutInfo.glyphMarginWidth;\r\n this._renderResult = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._glyphMargin = options.get(44 /* glyphMargin */);\r\n this._glyphMarginLeft = layoutInfo.glyphMarginLeft;\r\n this._glyphMarginWidth = layoutInfo.glyphMarginWidth;\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n _getDecorations(ctx) {\r\n const decorations = ctx.getDecorationsInViewport();\r\n let r = [], rLen = 0;\r\n for (let i = 0, len = decorations.length; i < len; i++) {\r\n const d = decorations[i];\r\n const glyphMarginClassName = d.options.glyphMarginClassName;\r\n if (glyphMarginClassName) {\r\n r[rLen++] = new DecorationToRender(d.range.startLineNumber, d.range.endLineNumber, glyphMarginClassName);\r\n }\r\n }\r\n return r;\r\n }\r\n prepareRender(ctx) {\r\n if (!this._glyphMargin) {\r\n this._renderResult = null;\r\n return;\r\n }\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));\r\n const lineHeight = this._lineHeight.toString();\r\n const left = this._glyphMarginLeft.toString();\r\n const width = this._glyphMarginWidth.toString();\r\n const common = '\" style=\"left:' + left + 'px;width:' + width + 'px' + ';height:' + lineHeight + 'px;\">';\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n const classNames = toRender[lineIndex];\r\n if (classNames.length === 0) {\r\n output[lineIndex] = '';\r\n }\r\n else {\r\n output[lineIndex] = ('
    = this._renderResult.length) {\r\n return '';\r\n }\r\n return this._renderResult[lineIndex];\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './indentGuides.css';\r\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay.js';\r\nimport { Position } from '../../../common/core/position.js';\r\nimport { editorActiveIndentGuides, editorIndentGuides } from '../../../common/view/editorColorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\r\nexport class IndentGuidesOverlay extends DynamicViewOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n this._primaryLineNumber = 0;\r\n const options = this._context.configuration.options;\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._spaceWidth = fontInfo.spaceWidth;\r\n this._enabled = options.get(78 /* renderIndentGuides */);\r\n this._activeIndentEnabled = options.get(47 /* highlightActiveIndentGuide */);\r\n this._maxIndentLeft = wrappingInfo.wrappingColumn === -1 ? -1 : (wrappingInfo.wrappingColumn * fontInfo.typicalHalfwidthCharacterWidth);\r\n this._renderResult = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._spaceWidth = fontInfo.spaceWidth;\r\n this._enabled = options.get(78 /* renderIndentGuides */);\r\n this._activeIndentEnabled = options.get(47 /* highlightActiveIndentGuide */);\r\n this._maxIndentLeft = wrappingInfo.wrappingColumn === -1 ? -1 : (wrappingInfo.wrappingColumn * fontInfo.typicalHalfwidthCharacterWidth);\r\n return true;\r\n }\r\n onCursorStateChanged(e) {\r\n const selection = e.selections[0];\r\n const newPrimaryLineNumber = selection.isEmpty() ? selection.positionLineNumber : 0;\r\n if (this._primaryLineNumber !== newPrimaryLineNumber) {\r\n this._primaryLineNumber = newPrimaryLineNumber;\r\n return true;\r\n }\r\n return false;\r\n }\r\n onDecorationsChanged(e) {\r\n // true for inline decorations\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged; // || e.scrollWidthChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n onLanguageConfigurationChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n if (!this._enabled) {\r\n this._renderResult = null;\r\n return;\r\n }\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const { indentSize } = this._context.model.getTextModelOptions();\r\n const indentWidth = indentSize * this._spaceWidth;\r\n const scrollWidth = ctx.scrollWidth;\r\n const lineHeight = this._lineHeight;\r\n const indents = this._context.model.getLinesIndentGuides(visibleStartLineNumber, visibleEndLineNumber);\r\n let activeIndentStartLineNumber = 0;\r\n let activeIndentEndLineNumber = 0;\r\n let activeIndentLevel = 0;\r\n if (this._activeIndentEnabled && this._primaryLineNumber) {\r\n const activeIndentInfo = this._context.model.getActiveIndentGuide(this._primaryLineNumber, visibleStartLineNumber, visibleEndLineNumber);\r\n activeIndentStartLineNumber = activeIndentInfo.startLineNumber;\r\n activeIndentEndLineNumber = activeIndentInfo.endLineNumber;\r\n activeIndentLevel = activeIndentInfo.indent;\r\n }\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const containsActiveIndentGuide = (activeIndentStartLineNumber <= lineNumber && lineNumber <= activeIndentEndLineNumber);\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n const indent = indents[lineIndex];\r\n let result = '';\r\n if (indent >= 1) {\r\n const leftMostVisiblePosition = ctx.visibleRangeForPosition(new Position(lineNumber, 1));\r\n let left = leftMostVisiblePosition ? leftMostVisiblePosition.left : 0;\r\n for (let i = 1; i <= indent; i++) {\r\n const className = (containsActiveIndentGuide && i === activeIndentLevel ? 'cigra' : 'cigr');\r\n result += `
    `;\r\n left += indentWidth;\r\n if (left > scrollWidth || (this._maxIndentLeft > 0 && left > this._maxIndentLeft)) {\r\n break;\r\n }\r\n }\r\n }\r\n output[lineIndex] = result;\r\n }\r\n this._renderResult = output;\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderResult) {\r\n return '';\r\n }\r\n const lineIndex = lineNumber - startLineNumber;\r\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\r\n return '';\r\n }\r\n return this._renderResult[lineIndex];\r\n }\r\n}\r\nregisterThemingParticipant((theme, collector) => {\r\n const editorIndentGuidesColor = theme.getColor(editorIndentGuides);\r\n if (editorIndentGuidesColor) {\r\n collector.addRule(`.monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ${editorIndentGuidesColor} inset; }`);\r\n }\r\n const editorActiveIndentGuidesColor = theme.getColor(editorActiveIndentGuides) || editorIndentGuidesColor;\r\n if (editorActiveIndentGuidesColor) {\r\n collector.addRule(`.monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ${editorActiveIndentGuidesColor} inset; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './viewLines.css';\r\nimport * as platform from '../../../../base/common/platform.js';\r\nimport { RunOnceScheduler } from '../../../../base/common/async.js';\r\nimport { Configuration } from '../../config/configuration.js';\r\nimport { VisibleLinesCollection } from '../../view/viewLayer.js';\r\nimport { PartFingerprints, ViewPart } from '../../view/viewPart.js';\r\nimport { DomReadingContext, ViewLine, ViewLineOptions } from './viewLine.js';\r\nimport { Position } from '../../../common/core/position.js';\r\nimport { Range } from '../../../common/core/range.js';\r\nimport { LineVisibleRanges, HorizontalPosition } from '../../../common/view/renderingContext.js';\r\nimport { MOUSE_CURSOR_TEXT_CSS_CLASS_NAME } from '../../../../base/browser/ui/mouseCursor/mouseCursor.js';\r\nclass LastRenderedData {\r\n constructor() {\r\n this._currentVisibleRange = new Range(1, 1, 1, 1);\r\n }\r\n getCurrentVisibleRange() {\r\n return this._currentVisibleRange;\r\n }\r\n setCurrentVisibleRange(currentVisibleRange) {\r\n this._currentVisibleRange = currentVisibleRange;\r\n }\r\n}\r\nclass HorizontalRevealRangeRequest {\r\n constructor(lineNumber, startColumn, endColumn, startScrollTop, stopScrollTop, scrollType) {\r\n this.lineNumber = lineNumber;\r\n this.startColumn = startColumn;\r\n this.endColumn = endColumn;\r\n this.startScrollTop = startScrollTop;\r\n this.stopScrollTop = stopScrollTop;\r\n this.scrollType = scrollType;\r\n this.type = 'range';\r\n this.minLineNumber = lineNumber;\r\n this.maxLineNumber = lineNumber;\r\n }\r\n}\r\nclass HorizontalRevealSelectionsRequest {\r\n constructor(selections, startScrollTop, stopScrollTop, scrollType) {\r\n this.selections = selections;\r\n this.startScrollTop = startScrollTop;\r\n this.stopScrollTop = stopScrollTop;\r\n this.scrollType = scrollType;\r\n this.type = 'selections';\r\n let minLineNumber = selections[0].startLineNumber;\r\n let maxLineNumber = selections[0].endLineNumber;\r\n for (let i = 1, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n minLineNumber = Math.min(minLineNumber, selection.startLineNumber);\r\n maxLineNumber = Math.max(maxLineNumber, selection.endLineNumber);\r\n }\r\n this.minLineNumber = minLineNumber;\r\n this.maxLineNumber = maxLineNumber;\r\n }\r\n}\r\nexport class ViewLines extends ViewPart {\r\n constructor(context, linesContent) {\r\n super(context);\r\n this._linesContent = linesContent;\r\n this._textRangeRestingSpot = document.createElement('div');\r\n this._visibleLines = new VisibleLinesCollection(this);\r\n this.domNode = this._visibleLines.domNode;\r\n const conf = this._context.configuration;\r\n const options = this._context.configuration.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\r\n this._isViewportWrapping = wrappingInfo.isViewportWrapping;\r\n this._revealHorizontalRightPadding = options.get(84 /* revealHorizontalRightPadding */);\r\n this._cursorSurroundingLines = options.get(22 /* cursorSurroundingLines */);\r\n this._cursorSurroundingLinesStyle = options.get(23 /* cursorSurroundingLinesStyle */);\r\n this._canUseLayerHinting = !options.get(25 /* disableLayerHinting */);\r\n this._viewLineOptions = new ViewLineOptions(conf, this._context.theme.type);\r\n PartFingerprints.write(this.domNode, 7 /* ViewLines */);\r\n this.domNode.setClassName(`view-lines ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);\r\n Configuration.applyFontInfo(this.domNode, fontInfo);\r\n // --- width & height\r\n this._maxLineWidth = 0;\r\n this._asyncUpdateLineWidths = new RunOnceScheduler(() => {\r\n this._updateLineWidthsSlow();\r\n }, 200);\r\n this._asyncCheckMonospaceFontAssumptions = new RunOnceScheduler(() => {\r\n this._checkMonospaceFontAssumptions();\r\n }, 2000);\r\n this._lastRenderedData = new LastRenderedData();\r\n this._horizontalRevealRequest = null;\r\n }\r\n dispose() {\r\n this._asyncUpdateLineWidths.dispose();\r\n this._asyncCheckMonospaceFontAssumptions.dispose();\r\n super.dispose();\r\n }\r\n getDomNode() {\r\n return this.domNode;\r\n }\r\n // ---- begin IVisibleLinesHost\r\n createVisibleLine() {\r\n return new ViewLine(this._viewLineOptions);\r\n }\r\n // ---- end IVisibleLinesHost\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n this._visibleLines.onConfigurationChanged(e);\r\n if (e.hasChanged(125 /* wrappingInfo */)) {\r\n this._maxLineWidth = 0;\r\n }\r\n const options = this._context.configuration.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\r\n this._isViewportWrapping = wrappingInfo.isViewportWrapping;\r\n this._revealHorizontalRightPadding = options.get(84 /* revealHorizontalRightPadding */);\r\n this._cursorSurroundingLines = options.get(22 /* cursorSurroundingLines */);\r\n this._cursorSurroundingLinesStyle = options.get(23 /* cursorSurroundingLinesStyle */);\r\n this._canUseLayerHinting = !options.get(25 /* disableLayerHinting */);\r\n Configuration.applyFontInfo(this.domNode, fontInfo);\r\n this._onOptionsMaybeChanged();\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n this._maxLineWidth = 0;\r\n }\r\n return true;\r\n }\r\n _onOptionsMaybeChanged() {\r\n const conf = this._context.configuration;\r\n const newViewLineOptions = new ViewLineOptions(conf, this._context.theme.type);\r\n if (!this._viewLineOptions.equals(newViewLineOptions)) {\r\n this._viewLineOptions = newViewLineOptions;\r\n const startLineNumber = this._visibleLines.getStartLineNumber();\r\n const endLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n const line = this._visibleLines.getVisibleLine(lineNumber);\r\n line.onOptionsChanged(this._viewLineOptions);\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n onCursorStateChanged(e) {\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n let r = false;\r\n for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\r\n r = this._visibleLines.getVisibleLine(lineNumber).onSelectionChanged() || r;\r\n }\r\n return r;\r\n }\r\n onDecorationsChanged(e) {\r\n if (true /*e.inlineDecorationsChanged*/) {\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\r\n this._visibleLines.getVisibleLine(lineNumber).onDecorationsChanged();\r\n }\r\n }\r\n return true;\r\n }\r\n onFlushed(e) {\r\n const shouldRender = this._visibleLines.onFlushed(e);\r\n this._maxLineWidth = 0;\r\n return shouldRender;\r\n }\r\n onLinesChanged(e) {\r\n return this._visibleLines.onLinesChanged(e);\r\n }\r\n onLinesDeleted(e) {\r\n return this._visibleLines.onLinesDeleted(e);\r\n }\r\n onLinesInserted(e) {\r\n return this._visibleLines.onLinesInserted(e);\r\n }\r\n onRevealRangeRequest(e) {\r\n // Using the future viewport here in order to handle multiple\r\n // incoming reveal range requests that might all desire to be animated\r\n const desiredScrollTop = this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(), e.source, e.range, e.selections, e.verticalType);\r\n if (desiredScrollTop === -1) {\r\n // marker to abort the reveal range request\r\n return false;\r\n }\r\n // validate the new desired scroll top\r\n let newScrollPosition = this._context.viewLayout.validateScrollPosition({ scrollTop: desiredScrollTop });\r\n if (e.revealHorizontal) {\r\n if (e.range && e.range.startLineNumber !== e.range.endLineNumber) {\r\n // Two or more lines? => scroll to base (That's how you see most of the two lines)\r\n newScrollPosition = {\r\n scrollTop: newScrollPosition.scrollTop,\r\n scrollLeft: 0\r\n };\r\n }\r\n else if (e.range) {\r\n // We don't necessarily know the horizontal offset of this range since the line might not be in the view...\r\n this._horizontalRevealRequest = new HorizontalRevealRangeRequest(e.range.startLineNumber, e.range.startColumn, e.range.endColumn, this._context.viewLayout.getCurrentScrollTop(), newScrollPosition.scrollTop, e.scrollType);\r\n }\r\n else if (e.selections && e.selections.length > 0) {\r\n this._horizontalRevealRequest = new HorizontalRevealSelectionsRequest(e.selections, this._context.viewLayout.getCurrentScrollTop(), newScrollPosition.scrollTop, e.scrollType);\r\n }\r\n }\r\n else {\r\n this._horizontalRevealRequest = null;\r\n }\r\n const scrollTopDelta = Math.abs(this._context.viewLayout.getCurrentScrollTop() - newScrollPosition.scrollTop);\r\n const scrollType = (scrollTopDelta <= this._lineHeight ? 1 /* Immediate */ : e.scrollType);\r\n this._context.model.setScrollPosition(newScrollPosition, scrollType);\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n if (this._horizontalRevealRequest && e.scrollLeftChanged) {\r\n // cancel any outstanding horizontal reveal request if someone else scrolls horizontally.\r\n this._horizontalRevealRequest = null;\r\n }\r\n if (this._horizontalRevealRequest && e.scrollTopChanged) {\r\n const min = Math.min(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest.stopScrollTop);\r\n const max = Math.max(this._horizontalRevealRequest.startScrollTop, this._horizontalRevealRequest.stopScrollTop);\r\n if (e.scrollTop < min || e.scrollTop > max) {\r\n // cancel any outstanding horizontal reveal request if someone else scrolls vertically.\r\n this._horizontalRevealRequest = null;\r\n }\r\n }\r\n this.domNode.setWidth(e.scrollWidth);\r\n return this._visibleLines.onScrollChanged(e) || true;\r\n }\r\n onTokensChanged(e) {\r\n return this._visibleLines.onTokensChanged(e);\r\n }\r\n onZonesChanged(e) {\r\n this._context.model.setMaxLineWidth(this._maxLineWidth);\r\n return this._visibleLines.onZonesChanged(e);\r\n }\r\n onThemeChanged(e) {\r\n return this._onOptionsMaybeChanged();\r\n }\r\n // ---- end view event handlers\r\n // ----------- HELPERS FOR OTHERS\r\n getPositionFromDOMInfo(spanNode, offset) {\r\n const viewLineDomNode = this._getViewLineDomNode(spanNode);\r\n if (viewLineDomNode === null) {\r\n // Couldn't find view line node\r\n return null;\r\n }\r\n const lineNumber = this._getLineNumberFor(viewLineDomNode);\r\n if (lineNumber === -1) {\r\n // Couldn't find view line node\r\n return null;\r\n }\r\n if (lineNumber < 1 || lineNumber > this._context.model.getLineCount()) {\r\n // lineNumber is outside range\r\n return null;\r\n }\r\n if (this._context.model.getLineMaxColumn(lineNumber) === 1) {\r\n // Line is empty\r\n return new Position(lineNumber, 1);\r\n }\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) {\r\n // Couldn't find line\r\n return null;\r\n }\r\n let column = this._visibleLines.getVisibleLine(lineNumber).getColumnOfNodeOffset(lineNumber, spanNode, offset);\r\n const minColumn = this._context.model.getLineMinColumn(lineNumber);\r\n if (column < minColumn) {\r\n column = minColumn;\r\n }\r\n return new Position(lineNumber, column);\r\n }\r\n _getViewLineDomNode(node) {\r\n while (node && node.nodeType === 1) {\r\n if (node.className === ViewLine.CLASS_NAME) {\r\n return node;\r\n }\r\n node = node.parentElement;\r\n }\r\n return null;\r\n }\r\n /**\r\n * @returns the line number of this view line dom node.\r\n */\r\n _getLineNumberFor(domNode) {\r\n const startLineNumber = this._visibleLines.getStartLineNumber();\r\n const endLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n const line = this._visibleLines.getVisibleLine(lineNumber);\r\n if (domNode === line.getDomNode()) {\r\n return lineNumber;\r\n }\r\n }\r\n return -1;\r\n }\r\n getLineWidth(lineNumber) {\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) {\r\n // Couldn't find line\r\n return -1;\r\n }\r\n return this._visibleLines.getVisibleLine(lineNumber).getWidth();\r\n }\r\n linesVisibleRangesForRange(_range, includeNewLines) {\r\n if (this.shouldRender()) {\r\n // Cannot read from the DOM because it is dirty\r\n // i.e. the model & the dom are out of sync, so I'd be reading something stale\r\n return null;\r\n }\r\n const originalEndLineNumber = _range.endLineNumber;\r\n const range = Range.intersectRanges(_range, this._lastRenderedData.getCurrentVisibleRange());\r\n if (!range) {\r\n return null;\r\n }\r\n let visibleRanges = [], visibleRangesLen = 0;\r\n const domReadingContext = new DomReadingContext(this.domNode.domNode, this._textRangeRestingSpot);\r\n let nextLineModelLineNumber = 0;\r\n if (includeNewLines) {\r\n nextLineModelLineNumber = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Position(range.startLineNumber, 1)).lineNumber;\r\n }\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = range.startLineNumber; lineNumber <= range.endLineNumber; lineNumber++) {\r\n if (lineNumber < rendStartLineNumber || lineNumber > rendEndLineNumber) {\r\n continue;\r\n }\r\n const startColumn = lineNumber === range.startLineNumber ? range.startColumn : 1;\r\n const endColumn = lineNumber === range.endLineNumber ? range.endColumn : this._context.model.getLineMaxColumn(lineNumber);\r\n const visibleRangesForLine = this._visibleLines.getVisibleLine(lineNumber).getVisibleRangesForRange(startColumn, endColumn, domReadingContext);\r\n if (!visibleRangesForLine) {\r\n continue;\r\n }\r\n if (includeNewLines && lineNumber < originalEndLineNumber) {\r\n const currentLineModelLineNumber = nextLineModelLineNumber;\r\n nextLineModelLineNumber = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Position(lineNumber + 1, 1)).lineNumber;\r\n if (currentLineModelLineNumber !== nextLineModelLineNumber) {\r\n visibleRangesForLine.ranges[visibleRangesForLine.ranges.length - 1].width += this._typicalHalfwidthCharacterWidth;\r\n }\r\n }\r\n visibleRanges[visibleRangesLen++] = new LineVisibleRanges(visibleRangesForLine.outsideRenderedLine, lineNumber, visibleRangesForLine.ranges);\r\n }\r\n if (visibleRangesLen === 0) {\r\n return null;\r\n }\r\n return visibleRanges;\r\n }\r\n _visibleRangesForLineRange(lineNumber, startColumn, endColumn) {\r\n if (this.shouldRender()) {\r\n // Cannot read from the DOM because it is dirty\r\n // i.e. the model & the dom are out of sync, so I'd be reading something stale\r\n return null;\r\n }\r\n if (lineNumber < this._visibleLines.getStartLineNumber() || lineNumber > this._visibleLines.getEndLineNumber()) {\r\n return null;\r\n }\r\n return this._visibleLines.getVisibleLine(lineNumber).getVisibleRangesForRange(startColumn, endColumn, new DomReadingContext(this.domNode.domNode, this._textRangeRestingSpot));\r\n }\r\n visibleRangeForPosition(position) {\r\n const visibleRanges = this._visibleRangesForLineRange(position.lineNumber, position.column, position.column);\r\n if (!visibleRanges) {\r\n return null;\r\n }\r\n return new HorizontalPosition(visibleRanges.outsideRenderedLine, visibleRanges.ranges[0].left);\r\n }\r\n // --- implementation\r\n updateLineWidths() {\r\n this._updateLineWidths(false);\r\n }\r\n /**\r\n * Updates the max line width if it is fast to compute.\r\n * Returns true if all lines were taken into account.\r\n * Returns false if some lines need to be reevaluated (in a slow fashion).\r\n */\r\n _updateLineWidthsFast() {\r\n return this._updateLineWidths(true);\r\n }\r\n _updateLineWidthsSlow() {\r\n this._updateLineWidths(false);\r\n }\r\n _updateLineWidths(fast) {\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n let localMaxLineWidth = 1;\r\n let allWidthsComputed = true;\r\n for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\r\n const visibleLine = this._visibleLines.getVisibleLine(lineNumber);\r\n if (fast && !visibleLine.getWidthIsFast()) {\r\n // Cannot compute width in a fast way for this line\r\n allWidthsComputed = false;\r\n continue;\r\n }\r\n localMaxLineWidth = Math.max(localMaxLineWidth, visibleLine.getWidth());\r\n }\r\n if (allWidthsComputed && rendStartLineNumber === 1 && rendEndLineNumber === this._context.model.getLineCount()) {\r\n // we know the max line width for all the lines\r\n this._maxLineWidth = 0;\r\n }\r\n this._ensureMaxLineWidth(localMaxLineWidth);\r\n return allWidthsComputed;\r\n }\r\n _checkMonospaceFontAssumptions() {\r\n // Problems with monospace assumptions are more apparent for longer lines,\r\n // as small rounding errors start to sum up, so we will select the longest\r\n // line for a closer inspection\r\n let longestLineNumber = -1;\r\n let longestWidth = -1;\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\r\n const visibleLine = this._visibleLines.getVisibleLine(lineNumber);\r\n if (visibleLine.needsMonospaceFontCheck()) {\r\n const lineWidth = visibleLine.getWidth();\r\n if (lineWidth > longestWidth) {\r\n longestWidth = lineWidth;\r\n longestLineNumber = lineNumber;\r\n }\r\n }\r\n }\r\n if (longestLineNumber === -1) {\r\n return;\r\n }\r\n if (!this._visibleLines.getVisibleLine(longestLineNumber).monospaceAssumptionsAreValid()) {\r\n for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\r\n const visibleLine = this._visibleLines.getVisibleLine(lineNumber);\r\n visibleLine.onMonospaceAssumptionsInvalidated();\r\n }\r\n }\r\n }\r\n prepareRender() {\r\n throw new Error('Not supported');\r\n }\r\n render() {\r\n throw new Error('Not supported');\r\n }\r\n renderText(viewportData) {\r\n // (1) render lines - ensures lines are in the DOM\r\n this._visibleLines.renderLines(viewportData);\r\n this._lastRenderedData.setCurrentVisibleRange(viewportData.visibleRange);\r\n this.domNode.setWidth(this._context.viewLayout.getScrollWidth());\r\n this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(), 1000000));\r\n // (2) compute horizontal scroll position:\r\n // - this must happen after the lines are in the DOM since it might need a line that rendered just now\r\n // - it might change `scrollWidth` and `scrollLeft`\r\n if (this._horizontalRevealRequest) {\r\n const horizontalRevealRequest = this._horizontalRevealRequest;\r\n // Check that we have the line that contains the horizontal range in the viewport\r\n if (viewportData.startLineNumber <= horizontalRevealRequest.minLineNumber && horizontalRevealRequest.maxLineNumber <= viewportData.endLineNumber) {\r\n this._horizontalRevealRequest = null;\r\n // allow `visibleRangesForRange2` to work\r\n this.onDidRender();\r\n // compute new scroll position\r\n const newScrollLeft = this._computeScrollLeftToReveal(horizontalRevealRequest);\r\n if (newScrollLeft) {\r\n if (!this._isViewportWrapping) {\r\n // ensure `scrollWidth` is large enough\r\n this._ensureMaxLineWidth(newScrollLeft.maxHorizontalOffset);\r\n }\r\n // set `scrollLeft`\r\n this._context.model.setScrollPosition({\r\n scrollLeft: newScrollLeft.scrollLeft\r\n }, horizontalRevealRequest.scrollType);\r\n }\r\n }\r\n }\r\n // Update max line width (not so important, it is just so the horizontal scrollbar doesn't get too small)\r\n if (!this._updateLineWidthsFast()) {\r\n // Computing the width of some lines would be slow => delay it\r\n this._asyncUpdateLineWidths.schedule();\r\n }\r\n if (platform.isLinux && !this._asyncCheckMonospaceFontAssumptions.isScheduled()) {\r\n const rendStartLineNumber = this._visibleLines.getStartLineNumber();\r\n const rendEndLineNumber = this._visibleLines.getEndLineNumber();\r\n for (let lineNumber = rendStartLineNumber; lineNumber <= rendEndLineNumber; lineNumber++) {\r\n const visibleLine = this._visibleLines.getVisibleLine(lineNumber);\r\n if (visibleLine.needsMonospaceFontCheck()) {\r\n this._asyncCheckMonospaceFontAssumptions.schedule();\r\n break;\r\n }\r\n }\r\n }\r\n // (3) handle scrolling\r\n this._linesContent.setLayerHinting(this._canUseLayerHinting);\r\n this._linesContent.setContain('strict');\r\n const adjustedScrollTop = this._context.viewLayout.getCurrentScrollTop() - viewportData.bigNumbersDelta;\r\n this._linesContent.setTop(-adjustedScrollTop);\r\n this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft());\r\n }\r\n // --- width\r\n _ensureMaxLineWidth(lineWidth) {\r\n const iLineWidth = Math.ceil(lineWidth);\r\n if (this._maxLineWidth < iLineWidth) {\r\n this._maxLineWidth = iLineWidth;\r\n this._context.model.setMaxLineWidth(this._maxLineWidth);\r\n }\r\n }\r\n _computeScrollTopToRevealRange(viewport, source, range, selections, verticalType) {\r\n const viewportStartY = viewport.top;\r\n const viewportHeight = viewport.height;\r\n const viewportEndY = viewportStartY + viewportHeight;\r\n let boxIsSingleRange;\r\n let boxStartY;\r\n let boxEndY;\r\n // Have a box that includes one extra line height (for the horizontal scrollbar)\r\n if (selections && selections.length > 0) {\r\n let minLineNumber = selections[0].startLineNumber;\r\n let maxLineNumber = selections[0].endLineNumber;\r\n for (let i = 1, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n minLineNumber = Math.min(minLineNumber, selection.startLineNumber);\r\n maxLineNumber = Math.max(maxLineNumber, selection.endLineNumber);\r\n }\r\n boxIsSingleRange = false;\r\n boxStartY = this._context.viewLayout.getVerticalOffsetForLineNumber(minLineNumber);\r\n boxEndY = this._context.viewLayout.getVerticalOffsetForLineNumber(maxLineNumber) + this._lineHeight;\r\n }\r\n else if (range) {\r\n boxIsSingleRange = true;\r\n boxStartY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.startLineNumber);\r\n boxEndY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.endLineNumber) + this._lineHeight;\r\n }\r\n else {\r\n return -1;\r\n }\r\n const shouldIgnoreScrollOff = source === 'mouse' && this._cursorSurroundingLinesStyle === 'default';\r\n if (!shouldIgnoreScrollOff) {\r\n const context = Math.min((viewportHeight / this._lineHeight) / 2, this._cursorSurroundingLines);\r\n boxStartY -= context * this._lineHeight;\r\n boxEndY += Math.max(0, (context - 1)) * this._lineHeight;\r\n }\r\n if (verticalType === 0 /* Simple */ || verticalType === 4 /* Bottom */) {\r\n // Reveal one line more when the last line would be covered by the scrollbar - arrow down case or revealing a line explicitly at bottom\r\n boxEndY += this._lineHeight;\r\n }\r\n let newScrollTop;\r\n if (boxEndY - boxStartY > viewportHeight) {\r\n // the box is larger than the viewport ... scroll to its top\r\n if (!boxIsSingleRange) {\r\n // do not reveal multiple cursors if there are more than fit the viewport\r\n return -1;\r\n }\r\n newScrollTop = boxStartY;\r\n }\r\n else if (verticalType === 5 /* NearTop */ || verticalType === 6 /* NearTopIfOutsideViewport */) {\r\n if (verticalType === 6 /* NearTopIfOutsideViewport */ && viewportStartY <= boxStartY && boxEndY <= viewportEndY) {\r\n // Box is already in the viewport... do nothing\r\n newScrollTop = viewportStartY;\r\n }\r\n else {\r\n // We want a gap that is 20% of the viewport, but with a minimum of 5 lines\r\n const desiredGapAbove = Math.max(5 * this._lineHeight, viewportHeight * 0.2);\r\n // Try to scroll just above the box with the desired gap\r\n const desiredScrollTop = boxStartY - desiredGapAbove;\r\n // But ensure that the box is not pushed out of viewport\r\n const minScrollTop = boxEndY - viewportHeight;\r\n newScrollTop = Math.max(minScrollTop, desiredScrollTop);\r\n }\r\n }\r\n else if (verticalType === 1 /* Center */ || verticalType === 2 /* CenterIfOutsideViewport */) {\r\n if (verticalType === 2 /* CenterIfOutsideViewport */ && viewportStartY <= boxStartY && boxEndY <= viewportEndY) {\r\n // Box is already in the viewport... do nothing\r\n newScrollTop = viewportStartY;\r\n }\r\n else {\r\n // Box is outside the viewport... center it\r\n const boxMiddleY = (boxStartY + boxEndY) / 2;\r\n newScrollTop = Math.max(0, boxMiddleY - viewportHeight / 2);\r\n }\r\n }\r\n else {\r\n newScrollTop = this._computeMinimumScrolling(viewportStartY, viewportEndY, boxStartY, boxEndY, verticalType === 3 /* Top */, verticalType === 4 /* Bottom */);\r\n }\r\n return newScrollTop;\r\n }\r\n _computeScrollLeftToReveal(horizontalRevealRequest) {\r\n const viewport = this._context.viewLayout.getCurrentViewport();\r\n const viewportStartX = viewport.left;\r\n const viewportEndX = viewportStartX + viewport.width;\r\n let boxStartX = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n let boxEndX = 0;\r\n if (horizontalRevealRequest.type === 'range') {\r\n const visibleRanges = this._visibleRangesForLineRange(horizontalRevealRequest.lineNumber, horizontalRevealRequest.startColumn, horizontalRevealRequest.endColumn);\r\n if (!visibleRanges) {\r\n return null;\r\n }\r\n for (const visibleRange of visibleRanges.ranges) {\r\n boxStartX = Math.min(boxStartX, visibleRange.left);\r\n boxEndX = Math.max(boxEndX, visibleRange.left + visibleRange.width);\r\n }\r\n }\r\n else {\r\n for (const selection of horizontalRevealRequest.selections) {\r\n if (selection.startLineNumber !== selection.endLineNumber) {\r\n return null;\r\n }\r\n const visibleRanges = this._visibleRangesForLineRange(selection.startLineNumber, selection.startColumn, selection.endColumn);\r\n if (!visibleRanges) {\r\n return null;\r\n }\r\n for (const visibleRange of visibleRanges.ranges) {\r\n boxStartX = Math.min(boxStartX, visibleRange.left);\r\n boxEndX = Math.max(boxEndX, visibleRange.left + visibleRange.width);\r\n }\r\n }\r\n }\r\n boxStartX = Math.max(0, boxStartX - ViewLines.HORIZONTAL_EXTRA_PX);\r\n boxEndX += this._revealHorizontalRightPadding;\r\n if (horizontalRevealRequest.type === 'selections' && boxEndX - boxStartX > viewport.width) {\r\n return null;\r\n }\r\n const newScrollLeft = this._computeMinimumScrolling(viewportStartX, viewportEndX, boxStartX, boxEndX);\r\n return {\r\n scrollLeft: newScrollLeft,\r\n maxHorizontalOffset: boxEndX\r\n };\r\n }\r\n _computeMinimumScrolling(viewportStart, viewportEnd, boxStart, boxEnd, revealAtStart, revealAtEnd) {\r\n viewportStart = viewportStart | 0;\r\n viewportEnd = viewportEnd | 0;\r\n boxStart = boxStart | 0;\r\n boxEnd = boxEnd | 0;\r\n revealAtStart = !!revealAtStart;\r\n revealAtEnd = !!revealAtEnd;\r\n const viewportLength = viewportEnd - viewportStart;\r\n const boxLength = boxEnd - boxStart;\r\n if (boxLength < viewportLength) {\r\n // The box would fit in the viewport\r\n if (revealAtStart) {\r\n return boxStart;\r\n }\r\n if (revealAtEnd) {\r\n return Math.max(0, boxEnd - viewportLength);\r\n }\r\n if (boxStart < viewportStart) {\r\n // The box is above the viewport\r\n return boxStart;\r\n }\r\n else if (boxEnd > viewportEnd) {\r\n // The box is below the viewport\r\n return Math.max(0, boxEnd - viewportLength);\r\n }\r\n }\r\n else {\r\n // The box would not fit in the viewport\r\n // Reveal the beginning of the box\r\n return boxStart;\r\n }\r\n return viewportStart;\r\n }\r\n}\r\n/**\r\n * Adds this amount of pixels to the right of lines (no-one wants to type near the edge of the viewport)\r\n */\r\nViewLines.HORIZONTAL_EXTRA_PX = 30;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './linesDecorations.css';\r\nimport { DecorationToRender, DedupOverlay } from '../glyphMargin/glyphMargin.js';\r\nexport class LinesDecorationsOverlay extends DedupOverlay {\r\n constructor(context) {\r\n super();\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._decorationsLeft = layoutInfo.decorationsLeft;\r\n this._decorationsWidth = layoutInfo.decorationsWidth;\r\n this._renderResult = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._decorationsLeft = layoutInfo.decorationsLeft;\r\n this._decorationsWidth = layoutInfo.decorationsWidth;\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n _getDecorations(ctx) {\r\n const decorations = ctx.getDecorationsInViewport();\r\n let r = [], rLen = 0;\r\n for (let i = 0, len = decorations.length; i < len; i++) {\r\n const d = decorations[i];\r\n const linesDecorationsClassName = d.options.linesDecorationsClassName;\r\n if (linesDecorationsClassName) {\r\n r[rLen++] = new DecorationToRender(d.range.startLineNumber, d.range.endLineNumber, linesDecorationsClassName);\r\n }\r\n const firstLineDecorationClassName = d.options.firstLineDecorationClassName;\r\n if (firstLineDecorationClassName) {\r\n r[rLen++] = new DecorationToRender(d.range.startLineNumber, d.range.startLineNumber, firstLineDecorationClassName);\r\n }\r\n }\r\n return r;\r\n }\r\n prepareRender(ctx) {\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));\r\n const left = this._decorationsLeft.toString();\r\n const width = this._decorationsWidth.toString();\r\n const common = '\" style=\"left:' + left + 'px;width:' + width + 'px;\">
    ';\r\n const output = [];\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n const classNames = toRender[lineIndex];\r\n let lineOutput = '';\r\n for (let i = 0, len = classNames.length; i < len; i++) {\r\n lineOutput += '
    ';\r\n }\r\n output[lineIndex] = lineOutput;\r\n }\r\n this._renderResult = output;\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderResult) {\r\n return '';\r\n }\r\n return this._renderResult[lineNumber - startLineNumber];\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * A very VM friendly rgba datastructure.\r\n * Please don't touch unless you take a look at the IR.\r\n */\r\nexport class RGBA8 {\r\n constructor(r, g, b, a) {\r\n this.r = RGBA8._clamp(r);\r\n this.g = RGBA8._clamp(g);\r\n this.b = RGBA8._clamp(b);\r\n this.a = RGBA8._clamp(a);\r\n }\r\n equals(other) {\r\n return (this.r === other.r\r\n && this.g === other.g\r\n && this.b === other.b\r\n && this.a === other.a);\r\n }\r\n static _clamp(c) {\r\n if (c < 0) {\r\n return 0;\r\n }\r\n if (c > 255) {\r\n return 255;\r\n }\r\n return c | 0;\r\n }\r\n}\r\nRGBA8.Empty = new RGBA8(0, 0, 0, 0);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { RGBA8 } from '../core/rgba.js';\r\nimport { TokenizationRegistry } from '../modes.js';\r\nexport class MinimapTokensColorTracker {\r\n constructor() {\r\n this._onDidChange = new Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this._updateColorMap();\r\n TokenizationRegistry.onDidChange(e => {\r\n if (e.changedColorMap) {\r\n this._updateColorMap();\r\n }\r\n });\r\n }\r\n static getInstance() {\r\n if (!this._INSTANCE) {\r\n this._INSTANCE = new MinimapTokensColorTracker();\r\n }\r\n return this._INSTANCE;\r\n }\r\n _updateColorMap() {\r\n const colorMap = TokenizationRegistry.getColorMap();\r\n if (!colorMap) {\r\n this._colors = [RGBA8.Empty];\r\n this._backgroundIsLight = true;\r\n return;\r\n }\r\n this._colors = [RGBA8.Empty];\r\n for (let colorId = 1; colorId < colorMap.length; colorId++) {\r\n const source = colorMap[colorId].rgba;\r\n // Use a VM friendly data-type\r\n this._colors[colorId] = new RGBA8(source.r, source.g, source.b, Math.round(source.a * 255));\r\n }\r\n let backgroundLuminosity = colorMap[2 /* DefaultBackground */].getRelativeLuminance();\r\n this._backgroundIsLight = backgroundLuminosity >= 0.5;\r\n this._onDidChange.fire(undefined);\r\n }\r\n getColor(colorId) {\r\n if (colorId < 1 || colorId >= this._colors.length) {\r\n // background color (basically invisible)\r\n colorId = 2 /* DefaultBackground */;\r\n }\r\n return this._colors[colorId];\r\n }\r\n backgroundIsLight() {\r\n return this._backgroundIsLight;\r\n }\r\n}\r\nMinimapTokensColorTracker._INSTANCE = null;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport const allCharCodes = (() => {\r\n const v = [];\r\n for (let i = 32 /* START_CH_CODE */; i <= 126 /* END_CH_CODE */; i++) {\r\n v.push(i);\r\n }\r\n v.push(65533 /* UNKNOWN_CODE */);\r\n return v;\r\n})();\r\nexport const getCharIndex = (chCode, fontScale) => {\r\n chCode -= 32 /* START_CH_CODE */;\r\n if (chCode < 0 || chCode > 96 /* CHAR_COUNT */) {\r\n if (fontScale <= 2) {\r\n // for smaller scales, we can get away with using any ASCII character...\r\n return (chCode + 96 /* CHAR_COUNT */) % 96 /* CHAR_COUNT */;\r\n }\r\n return 96 /* CHAR_COUNT */ - 1; // unknown symbol\r\n }\r\n return chCode;\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { getCharIndex } from './minimapCharSheet.js';\r\nimport { toUint8 } from '../../../../base/common/uint.js';\r\nexport class MinimapCharRenderer {\r\n constructor(charData, scale) {\r\n this.scale = scale;\r\n this.charDataNormal = MinimapCharRenderer.soften(charData, 12 / 15);\r\n this.charDataLight = MinimapCharRenderer.soften(charData, 50 / 60);\r\n }\r\n static soften(input, ratio) {\r\n let result = new Uint8ClampedArray(input.length);\r\n for (let i = 0, len = input.length; i < len; i++) {\r\n result[i] = toUint8(input[i] * ratio);\r\n }\r\n return result;\r\n }\r\n renderChar(target, dx, dy, chCode, color, backgroundColor, fontScale, useLighterFont, force1pxHeight) {\r\n const charWidth = 1 /* BASE_CHAR_WIDTH */ * this.scale;\r\n const charHeight = 2 /* BASE_CHAR_HEIGHT */ * this.scale;\r\n const renderHeight = (force1pxHeight ? 1 : charHeight);\r\n if (dx + charWidth > target.width || dy + renderHeight > target.height) {\r\n console.warn('bad render request outside image data');\r\n return;\r\n }\r\n const charData = useLighterFont ? this.charDataLight : this.charDataNormal;\r\n const charIndex = getCharIndex(chCode, fontScale);\r\n const destWidth = target.width * 4 /* RGBA_CHANNELS_CNT */;\r\n const backgroundR = backgroundColor.r;\r\n const backgroundG = backgroundColor.g;\r\n const backgroundB = backgroundColor.b;\r\n const deltaR = color.r - backgroundR;\r\n const deltaG = color.g - backgroundG;\r\n const deltaB = color.b - backgroundB;\r\n const dest = target.data;\r\n let sourceOffset = charIndex * charWidth * charHeight;\r\n let row = dy * destWidth + dx * 4 /* RGBA_CHANNELS_CNT */;\r\n for (let y = 0; y < renderHeight; y++) {\r\n let column = row;\r\n for (let x = 0; x < charWidth; x++) {\r\n const c = charData[sourceOffset++] / 255;\r\n dest[column++] = backgroundR + deltaR * c;\r\n dest[column++] = backgroundG + deltaG * c;\r\n dest[column++] = backgroundB + deltaB * c;\r\n column++;\r\n }\r\n row += destWidth;\r\n }\r\n }\r\n blockRenderChar(target, dx, dy, color, backgroundColor, useLighterFont, force1pxHeight) {\r\n const charWidth = 1 /* BASE_CHAR_WIDTH */ * this.scale;\r\n const charHeight = 2 /* BASE_CHAR_HEIGHT */ * this.scale;\r\n const renderHeight = (force1pxHeight ? 1 : charHeight);\r\n if (dx + charWidth > target.width || dy + renderHeight > target.height) {\r\n console.warn('bad render request outside image data');\r\n return;\r\n }\r\n const destWidth = target.width * 4 /* RGBA_CHANNELS_CNT */;\r\n const c = 0.5;\r\n const backgroundR = backgroundColor.r;\r\n const backgroundG = backgroundColor.g;\r\n const backgroundB = backgroundColor.b;\r\n const deltaR = color.r - backgroundR;\r\n const deltaG = color.g - backgroundG;\r\n const deltaB = color.b - backgroundB;\r\n const colorR = backgroundR + deltaR * c;\r\n const colorG = backgroundG + deltaG * c;\r\n const colorB = backgroundB + deltaB * c;\r\n const dest = target.data;\r\n let row = dy * destWidth + dx * 4 /* RGBA_CHANNELS_CNT */;\r\n for (let y = 0; y < renderHeight; y++) {\r\n let column = row;\r\n for (let x = 0; x < charWidth; x++) {\r\n dest[column++] = colorR;\r\n dest[column++] = colorG;\r\n dest[column++] = colorB;\r\n column++;\r\n }\r\n row += destWidth;\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { once } from '../../../../base/common/functional.js';\r\nconst charTable = {\r\n '0': 0,\r\n '1': 1,\r\n '2': 2,\r\n '3': 3,\r\n '4': 4,\r\n '5': 5,\r\n '6': 6,\r\n '7': 7,\r\n '8': 8,\r\n '9': 9,\r\n A: 10,\r\n B: 11,\r\n C: 12,\r\n D: 13,\r\n E: 14,\r\n F: 15\r\n};\r\nconst decodeData = (str) => {\r\n const output = new Uint8ClampedArray(str.length / 2);\r\n for (let i = 0; i < str.length; i += 2) {\r\n output[i >> 1] = (charTable[str[i]] << 4) | (charTable[str[i + 1]] & 0xF);\r\n }\r\n return output;\r\n};\r\n/*\r\nconst encodeData = (data: Uint8ClampedArray, length: string) => {\r\n const chars = '0123456789ABCDEF';\r\n let output = '';\r\n for (let i = 0; i < data.length; i++) {\r\n output += chars[data[i] >> 4] + chars[data[i] & 0xf];\r\n }\r\n return output;\r\n};\r\n*/\r\n/**\r\n * Map of minimap scales to prebaked sample data at those scales. We don't\r\n * sample much larger data, because then font family becomes visible, which\r\n * is use-configurable.\r\n */\r\nexport const prebakedMiniMaps = {\r\n 1: once(() => decodeData('0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792')),\r\n 2: once(() => decodeData('000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126'))\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { MinimapCharRenderer } from './minimapCharRenderer.js';\r\nimport { allCharCodes } from './minimapCharSheet.js';\r\nimport { prebakedMiniMaps } from './minimapPreBaked.js';\r\nimport { toUint8 } from '../../../../base/common/uint.js';\r\n/**\r\n * Creates character renderers. It takes a 'scale' that determines how large\r\n * characters should be drawn. Using this, it draws data into a canvas and\r\n * then downsamples the characters as necessary for the current display.\r\n * This makes rendering more efficient, rather than drawing a full (tiny)\r\n * font, or downsampling in real-time.\r\n */\r\nexport class MinimapCharRendererFactory {\r\n /**\r\n * Creates a new character renderer factory with the given scale.\r\n */\r\n static create(scale, fontFamily) {\r\n // renderers are immutable. By default we'll 'create' a new minimap\r\n // character renderer whenever we switch editors, no need to do extra work.\r\n if (this.lastCreated && scale === this.lastCreated.scale && fontFamily === this.lastFontFamily) {\r\n return this.lastCreated;\r\n }\r\n let factory;\r\n if (prebakedMiniMaps[scale]) {\r\n factory = new MinimapCharRenderer(prebakedMiniMaps[scale](), scale);\r\n }\r\n else {\r\n factory = MinimapCharRendererFactory.createFromSampleData(MinimapCharRendererFactory.createSampleData(fontFamily).data, scale);\r\n }\r\n this.lastFontFamily = fontFamily;\r\n this.lastCreated = factory;\r\n return factory;\r\n }\r\n /**\r\n * Creates the font sample data, writing to a canvas.\r\n */\r\n static createSampleData(fontFamily) {\r\n const canvas = document.createElement('canvas');\r\n const ctx = canvas.getContext('2d');\r\n canvas.style.height = `${16 /* SAMPLED_CHAR_HEIGHT */}px`;\r\n canvas.height = 16 /* SAMPLED_CHAR_HEIGHT */;\r\n canvas.width = 96 /* CHAR_COUNT */ * 10 /* SAMPLED_CHAR_WIDTH */;\r\n canvas.style.width = 96 /* CHAR_COUNT */ * 10 /* SAMPLED_CHAR_WIDTH */ + 'px';\r\n ctx.fillStyle = '#ffffff';\r\n ctx.font = `bold ${16 /* SAMPLED_CHAR_HEIGHT */}px ${fontFamily}`;\r\n ctx.textBaseline = 'middle';\r\n let x = 0;\r\n for (const code of allCharCodes) {\r\n ctx.fillText(String.fromCharCode(code), x, 16 /* SAMPLED_CHAR_HEIGHT */ / 2);\r\n x += 10 /* SAMPLED_CHAR_WIDTH */;\r\n }\r\n return ctx.getImageData(0, 0, 96 /* CHAR_COUNT */ * 10 /* SAMPLED_CHAR_WIDTH */, 16 /* SAMPLED_CHAR_HEIGHT */);\r\n }\r\n /**\r\n * Creates a character renderer from the canvas sample data.\r\n */\r\n static createFromSampleData(source, scale) {\r\n const expectedLength = 16 /* SAMPLED_CHAR_HEIGHT */ * 10 /* SAMPLED_CHAR_WIDTH */ * 4 /* RGBA_CHANNELS_CNT */ * 96 /* CHAR_COUNT */;\r\n if (source.length !== expectedLength) {\r\n throw new Error('Unexpected source in MinimapCharRenderer');\r\n }\r\n let charData = MinimapCharRendererFactory._downsample(source, scale);\r\n return new MinimapCharRenderer(charData, scale);\r\n }\r\n static _downsampleChar(source, sourceOffset, dest, destOffset, scale) {\r\n const width = 1 /* BASE_CHAR_WIDTH */ * scale;\r\n const height = 2 /* BASE_CHAR_HEIGHT */ * scale;\r\n let targetIndex = destOffset;\r\n let brightest = 0;\r\n // This is essentially an ad-hoc rescaling algorithm. Standard approaches\r\n // like bicubic interpolation are awesome for scaling between image sizes,\r\n // but don't work so well when scaling to very small pixel values, we end\r\n // up with blurry, indistinct forms.\r\n //\r\n // The approach taken here is simply mapping each source pixel to the target\r\n // pixels, and taking the weighted values for all pixels in each, and then\r\n // averaging them out. Finally we apply an intensity boost in _downsample,\r\n // since when scaling to the smallest pixel sizes there's more black space\r\n // which causes characters to be much less distinct.\r\n for (let y = 0; y < height; y++) {\r\n // 1. For this destination pixel, get the source pixels we're sampling\r\n // from (x1, y1) to the next pixel (x2, y2)\r\n const sourceY1 = (y / height) * 16 /* SAMPLED_CHAR_HEIGHT */;\r\n const sourceY2 = ((y + 1) / height) * 16 /* SAMPLED_CHAR_HEIGHT */;\r\n for (let x = 0; x < width; x++) {\r\n const sourceX1 = (x / width) * 10 /* SAMPLED_CHAR_WIDTH */;\r\n const sourceX2 = ((x + 1) / width) * 10 /* SAMPLED_CHAR_WIDTH */;\r\n // 2. Sample all of them, summing them up and weighting them. Similar\r\n // to bilinear interpolation.\r\n let value = 0;\r\n let samples = 0;\r\n for (let sy = sourceY1; sy < sourceY2; sy++) {\r\n const sourceRow = sourceOffset + Math.floor(sy) * 3840 /* RGBA_SAMPLED_ROW_WIDTH */;\r\n const yBalance = 1 - (sy - Math.floor(sy));\r\n for (let sx = sourceX1; sx < sourceX2; sx++) {\r\n const xBalance = 1 - (sx - Math.floor(sx));\r\n const sourceIndex = sourceRow + Math.floor(sx) * 4 /* RGBA_CHANNELS_CNT */;\r\n const weight = xBalance * yBalance;\r\n samples += weight;\r\n value += ((source[sourceIndex] * source[sourceIndex + 3]) / 255) * weight;\r\n }\r\n }\r\n const final = value / samples;\r\n brightest = Math.max(brightest, final);\r\n dest[targetIndex++] = toUint8(final);\r\n }\r\n }\r\n return brightest;\r\n }\r\n static _downsample(data, scale) {\r\n const pixelsPerCharacter = 2 /* BASE_CHAR_HEIGHT */ * scale * 1 /* BASE_CHAR_WIDTH */ * scale;\r\n const resultLen = pixelsPerCharacter * 96 /* CHAR_COUNT */;\r\n const result = new Uint8ClampedArray(resultLen);\r\n let resultOffset = 0;\r\n let sourceOffset = 0;\r\n let brightest = 0;\r\n for (let charIndex = 0; charIndex < 96 /* CHAR_COUNT */; charIndex++) {\r\n brightest = Math.max(brightest, this._downsampleChar(data, sourceOffset, result, resultOffset, scale));\r\n resultOffset += pixelsPerCharacter;\r\n sourceOffset += 10 /* SAMPLED_CHAR_WIDTH */ * 4 /* RGBA_CHANNELS_CNT */;\r\n }\r\n if (brightest > 0) {\r\n const adjust = 255 / brightest;\r\n for (let i = 0; i < resultLen; i++) {\r\n result[i] *= adjust;\r\n }\r\n }\r\n return result;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './minimap.css';\r\nimport * as dom from '../../../../base/browser/dom.js';\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport { GlobalMouseMoveMonitor, standardMouseMoveMerger } from '../../../../base/browser/globalMouseMoveMonitor.js';\r\nimport { Disposable } from '../../../../base/common/lifecycle.js';\r\nimport * as platform from '../../../../base/common/platform.js';\r\nimport * as strings from '../../../../base/common/strings.js';\r\nimport { RenderedLinesCollection } from '../../view/viewLayer.js';\r\nimport { PartFingerprints, ViewPart } from '../../view/viewPart.js';\r\nimport { MINIMAP_GUTTER_WIDTH, EditorLayoutInfoComputer } from '../../../common/config/editorOptions.js';\r\nimport { Range } from '../../../common/core/range.js';\r\nimport { RGBA8 } from '../../../common/core/rgba.js';\r\nimport { MinimapTokensColorTracker } from '../../../common/viewModel/minimapTokensColorTracker.js';\r\nimport { ViewModelDecoration } from '../../../common/viewModel/viewModel.js';\r\nimport { minimapSelection, scrollbarShadow, minimapBackground, minimapSliderBackground, minimapSliderHoverBackground, minimapSliderActiveBackground } from '../../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\r\nimport { Selection } from '../../../common/core/selection.js';\r\nimport { EventType, Gesture } from '../../../../base/browser/touch.js';\r\nimport { MinimapCharRendererFactory } from './minimapCharRendererFactory.js';\r\nimport { MinimapPosition } from '../../../common/model.js';\r\nimport { once } from '../../../../base/common/functional.js';\r\n/**\r\n * The orthogonal distance to the slider at which dragging \"resets\". This implements \"snapping\"\r\n */\r\nconst MOUSE_DRAG_RESET_DISTANCE = 140;\r\nconst GUTTER_DECORATION_WIDTH = 2;\r\nclass MinimapOptions {\r\n constructor(configuration, theme, tokensColorTracker) {\r\n const options = configuration.options;\r\n const pixelRatio = options.get(122 /* pixelRatio */);\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const minimapLayout = layoutInfo.minimap;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const minimapOpts = options.get(59 /* minimap */);\r\n this.renderMinimap = minimapLayout.renderMinimap;\r\n this.size = minimapOpts.size;\r\n this.minimapHeightIsEditorHeight = minimapLayout.minimapHeightIsEditorHeight;\r\n this.scrollBeyondLastLine = options.get(89 /* scrollBeyondLastLine */);\r\n this.showSlider = minimapOpts.showSlider;\r\n this.pixelRatio = pixelRatio;\r\n this.typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\r\n this.lineHeight = options.get(53 /* lineHeight */);\r\n this.minimapLeft = minimapLayout.minimapLeft;\r\n this.minimapWidth = minimapLayout.minimapWidth;\r\n this.minimapHeight = layoutInfo.height;\r\n this.canvasInnerWidth = minimapLayout.minimapCanvasInnerWidth;\r\n this.canvasInnerHeight = minimapLayout.minimapCanvasInnerHeight;\r\n this.canvasOuterWidth = minimapLayout.minimapCanvasOuterWidth;\r\n this.canvasOuterHeight = minimapLayout.minimapCanvasOuterHeight;\r\n this.isSampling = minimapLayout.minimapIsSampling;\r\n this.editorHeight = layoutInfo.height;\r\n this.fontScale = minimapLayout.minimapScale;\r\n this.minimapLineHeight = minimapLayout.minimapLineHeight;\r\n this.minimapCharWidth = 1 /* BASE_CHAR_WIDTH */ * this.fontScale;\r\n this.charRenderer = once(() => MinimapCharRendererFactory.create(this.fontScale, fontInfo.fontFamily));\r\n this.backgroundColor = MinimapOptions._getMinimapBackground(theme, tokensColorTracker);\r\n }\r\n static _getMinimapBackground(theme, tokensColorTracker) {\r\n const themeColor = theme.getColor(minimapBackground);\r\n if (themeColor) {\r\n return new RGBA8(themeColor.rgba.r, themeColor.rgba.g, themeColor.rgba.b, themeColor.rgba.a);\r\n }\r\n return tokensColorTracker.getColor(2 /* DefaultBackground */);\r\n }\r\n equals(other) {\r\n return (this.renderMinimap === other.renderMinimap\r\n && this.size === other.size\r\n && this.minimapHeightIsEditorHeight === other.minimapHeightIsEditorHeight\r\n && this.scrollBeyondLastLine === other.scrollBeyondLastLine\r\n && this.showSlider === other.showSlider\r\n && this.pixelRatio === other.pixelRatio\r\n && this.typicalHalfwidthCharacterWidth === other.typicalHalfwidthCharacterWidth\r\n && this.lineHeight === other.lineHeight\r\n && this.minimapLeft === other.minimapLeft\r\n && this.minimapWidth === other.minimapWidth\r\n && this.minimapHeight === other.minimapHeight\r\n && this.canvasInnerWidth === other.canvasInnerWidth\r\n && this.canvasInnerHeight === other.canvasInnerHeight\r\n && this.canvasOuterWidth === other.canvasOuterWidth\r\n && this.canvasOuterHeight === other.canvasOuterHeight\r\n && this.isSampling === other.isSampling\r\n && this.editorHeight === other.editorHeight\r\n && this.fontScale === other.fontScale\r\n && this.minimapLineHeight === other.minimapLineHeight\r\n && this.minimapCharWidth === other.minimapCharWidth\r\n && this.backgroundColor && this.backgroundColor.equals(other.backgroundColor));\r\n }\r\n}\r\nclass MinimapLayout {\r\n constructor(scrollTop, scrollHeight, sliderNeeded, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber) {\r\n this.scrollTop = scrollTop;\r\n this.scrollHeight = scrollHeight;\r\n this.sliderNeeded = sliderNeeded;\r\n this._computedSliderRatio = computedSliderRatio;\r\n this.sliderTop = sliderTop;\r\n this.sliderHeight = sliderHeight;\r\n this.startLineNumber = startLineNumber;\r\n this.endLineNumber = endLineNumber;\r\n }\r\n /**\r\n * Compute a desired `scrollPosition` such that the slider moves by `delta`.\r\n */\r\n getDesiredScrollTopFromDelta(delta) {\r\n return Math.round(this.scrollTop + delta / this._computedSliderRatio);\r\n }\r\n getDesiredScrollTopFromTouchLocation(pageY) {\r\n return Math.round((pageY - this.sliderHeight / 2) / this._computedSliderRatio);\r\n }\r\n static create(options, viewportStartLineNumber, viewportEndLineNumber, viewportStartLineNumberVerticalOffset, viewportHeight, viewportContainsWhitespaceGaps, lineCount, realLineCount, scrollTop, scrollHeight, previousLayout) {\r\n const pixelRatio = options.pixelRatio;\r\n const minimapLineHeight = options.minimapLineHeight;\r\n const minimapLinesFitting = Math.floor(options.canvasInnerHeight / minimapLineHeight);\r\n const lineHeight = options.lineHeight;\r\n if (options.minimapHeightIsEditorHeight) {\r\n const logicalScrollHeight = (realLineCount * options.lineHeight\r\n + (options.scrollBeyondLastLine ? viewportHeight - options.lineHeight : 0));\r\n const sliderHeight = Math.max(1, Math.floor(viewportHeight * viewportHeight / logicalScrollHeight));\r\n const maxMinimapSliderTop = Math.max(0, options.minimapHeight - sliderHeight);\r\n // The slider can move from 0 to `maxMinimapSliderTop`\r\n // in the same way `scrollTop` can move from 0 to `scrollHeight` - `viewportHeight`.\r\n const computedSliderRatio = (maxMinimapSliderTop) / (scrollHeight - viewportHeight);\r\n const sliderTop = (scrollTop * computedSliderRatio);\r\n const sliderNeeded = (maxMinimapSliderTop > 0);\r\n const maxLinesFitting = Math.floor(options.canvasInnerHeight / options.minimapLineHeight);\r\n return new MinimapLayout(scrollTop, scrollHeight, sliderNeeded, computedSliderRatio, sliderTop, sliderHeight, 1, Math.min(lineCount, maxLinesFitting));\r\n }\r\n // The visible line count in a viewport can change due to a number of reasons:\r\n // a) with the same viewport width, different scroll positions can result in partial lines being visible:\r\n // e.g. for a line height of 20, and a viewport height of 600\r\n // * scrollTop = 0 => visible lines are [1, 30]\r\n // * scrollTop = 10 => visible lines are [1, 31] (with lines 1 and 31 partially visible)\r\n // * scrollTop = 20 => visible lines are [2, 31]\r\n // b) whitespace gaps might make their way in the viewport (which results in a decrease in the visible line count)\r\n // c) we could be in the scroll beyond last line case (which also results in a decrease in the visible line count, down to possibly only one line being visible)\r\n // We must first establish a desirable slider height.\r\n let sliderHeight;\r\n if (viewportContainsWhitespaceGaps && viewportEndLineNumber !== lineCount) {\r\n // case b) from above: there are whitespace gaps in the viewport.\r\n // In this case, the height of the slider directly reflects the visible line count.\r\n const viewportLineCount = viewportEndLineNumber - viewportStartLineNumber + 1;\r\n sliderHeight = Math.floor(viewportLineCount * minimapLineHeight / pixelRatio);\r\n }\r\n else {\r\n // The slider has a stable height\r\n const expectedViewportLineCount = viewportHeight / lineHeight;\r\n sliderHeight = Math.floor(expectedViewportLineCount * minimapLineHeight / pixelRatio);\r\n }\r\n let maxMinimapSliderTop;\r\n if (options.scrollBeyondLastLine) {\r\n // The minimap slider, when dragged all the way down, will contain the last line at its top\r\n maxMinimapSliderTop = (lineCount - 1) * minimapLineHeight / pixelRatio;\r\n }\r\n else {\r\n // The minimap slider, when dragged all the way down, will contain the last line at its bottom\r\n maxMinimapSliderTop = Math.max(0, lineCount * minimapLineHeight / pixelRatio - sliderHeight);\r\n }\r\n maxMinimapSliderTop = Math.min(options.minimapHeight - sliderHeight, maxMinimapSliderTop);\r\n // The slider can move from 0 to `maxMinimapSliderTop`\r\n // in the same way `scrollTop` can move from 0 to `scrollHeight` - `viewportHeight`.\r\n const computedSliderRatio = (maxMinimapSliderTop) / (scrollHeight - viewportHeight);\r\n const sliderTop = (scrollTop * computedSliderRatio);\r\n let extraLinesAtTheBottom = 0;\r\n if (options.scrollBeyondLastLine) {\r\n const expectedViewportLineCount = viewportHeight / lineHeight;\r\n extraLinesAtTheBottom = expectedViewportLineCount - 1;\r\n }\r\n if (minimapLinesFitting >= lineCount + extraLinesAtTheBottom) {\r\n // All lines fit in the minimap\r\n const startLineNumber = 1;\r\n const endLineNumber = lineCount;\r\n const sliderNeeded = (maxMinimapSliderTop > 0);\r\n return new MinimapLayout(scrollTop, scrollHeight, sliderNeeded, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber);\r\n }\r\n else {\r\n let startLineNumber = Math.max(1, Math.floor(viewportStartLineNumber - sliderTop * pixelRatio / minimapLineHeight));\r\n // Avoid flickering caused by a partial viewport start line\r\n // by being consistent w.r.t. the previous layout decision\r\n if (previousLayout && previousLayout.scrollHeight === scrollHeight) {\r\n if (previousLayout.scrollTop > scrollTop) {\r\n // Scrolling up => never increase `startLineNumber`\r\n startLineNumber = Math.min(startLineNumber, previousLayout.startLineNumber);\r\n }\r\n if (previousLayout.scrollTop < scrollTop) {\r\n // Scrolling down => never decrease `startLineNumber`\r\n startLineNumber = Math.max(startLineNumber, previousLayout.startLineNumber);\r\n }\r\n }\r\n const endLineNumber = Math.min(lineCount, startLineNumber + minimapLinesFitting - 1);\r\n const partialLine = (scrollTop - viewportStartLineNumberVerticalOffset) / lineHeight;\r\n const sliderTopAligned = (viewportStartLineNumber - startLineNumber + partialLine) * minimapLineHeight / pixelRatio;\r\n return new MinimapLayout(scrollTop, scrollHeight, true, computedSliderRatio, sliderTopAligned, sliderHeight, startLineNumber, endLineNumber);\r\n }\r\n }\r\n}\r\nclass MinimapLine {\r\n constructor(dy) {\r\n this.dy = dy;\r\n }\r\n onContentChanged() {\r\n this.dy = -1;\r\n }\r\n onTokensChanged() {\r\n this.dy = -1;\r\n }\r\n}\r\nMinimapLine.INVALID = new MinimapLine(-1);\r\nclass RenderData {\r\n constructor(renderedLayout, imageData, lines) {\r\n this.renderedLayout = renderedLayout;\r\n this._imageData = imageData;\r\n this._renderedLines = new RenderedLinesCollection(() => MinimapLine.INVALID);\r\n this._renderedLines._set(renderedLayout.startLineNumber, lines);\r\n }\r\n /**\r\n * Check if the current RenderData matches accurately the new desired layout and no painting is needed.\r\n */\r\n linesEquals(layout) {\r\n if (!this.scrollEquals(layout)) {\r\n return false;\r\n }\r\n const tmp = this._renderedLines._get();\r\n const lines = tmp.lines;\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n if (lines[i].dy === -1) {\r\n // This line is invalid\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n /**\r\n * Check if the current RenderData matches the new layout's scroll position\r\n */\r\n scrollEquals(layout) {\r\n return this.renderedLayout.startLineNumber === layout.startLineNumber\r\n && this.renderedLayout.endLineNumber === layout.endLineNumber;\r\n }\r\n _get() {\r\n const tmp = this._renderedLines._get();\r\n return {\r\n imageData: this._imageData,\r\n rendLineNumberStart: tmp.rendLineNumberStart,\r\n lines: tmp.lines\r\n };\r\n }\r\n onLinesChanged(changeFromLineNumber, changeToLineNumber) {\r\n return this._renderedLines.onLinesChanged(changeFromLineNumber, changeToLineNumber);\r\n }\r\n onLinesDeleted(deleteFromLineNumber, deleteToLineNumber) {\r\n this._renderedLines.onLinesDeleted(deleteFromLineNumber, deleteToLineNumber);\r\n }\r\n onLinesInserted(insertFromLineNumber, insertToLineNumber) {\r\n this._renderedLines.onLinesInserted(insertFromLineNumber, insertToLineNumber);\r\n }\r\n onTokensChanged(ranges) {\r\n return this._renderedLines.onTokensChanged(ranges);\r\n }\r\n}\r\n/**\r\n * Some sort of double buffering.\r\n *\r\n * Keeps two buffers around that will be rotated for painting.\r\n * Always gives a buffer that is filled with the background color.\r\n */\r\nclass MinimapBuffers {\r\n constructor(ctx, WIDTH, HEIGHT, background) {\r\n this._backgroundFillData = MinimapBuffers._createBackgroundFillData(WIDTH, HEIGHT, background);\r\n this._buffers = [\r\n ctx.createImageData(WIDTH, HEIGHT),\r\n ctx.createImageData(WIDTH, HEIGHT)\r\n ];\r\n this._lastUsedBuffer = 0;\r\n }\r\n getBuffer() {\r\n // rotate buffers\r\n this._lastUsedBuffer = 1 - this._lastUsedBuffer;\r\n const result = this._buffers[this._lastUsedBuffer];\r\n // fill with background color\r\n result.data.set(this._backgroundFillData);\r\n return result;\r\n }\r\n static _createBackgroundFillData(WIDTH, HEIGHT, background) {\r\n const backgroundR = background.r;\r\n const backgroundG = background.g;\r\n const backgroundB = background.b;\r\n const result = new Uint8ClampedArray(WIDTH * HEIGHT * 4);\r\n let offset = 0;\r\n for (let i = 0; i < HEIGHT; i++) {\r\n for (let j = 0; j < WIDTH; j++) {\r\n result[offset] = backgroundR;\r\n result[offset + 1] = backgroundG;\r\n result[offset + 2] = backgroundB;\r\n result[offset + 3] = 255;\r\n offset += 4;\r\n }\r\n }\r\n return result;\r\n }\r\n}\r\nclass MinimapSamplingState {\r\n constructor(samplingRatio, minimapLines) {\r\n this.samplingRatio = samplingRatio;\r\n this.minimapLines = minimapLines;\r\n }\r\n static compute(options, viewLineCount, oldSamplingState) {\r\n if (options.renderMinimap === 0 /* None */ || !options.isSampling) {\r\n return [null, []];\r\n }\r\n // ratio is intentionally not part of the layout to avoid the layout changing all the time\r\n // so we need to recompute it again...\r\n const pixelRatio = options.pixelRatio;\r\n const lineHeight = options.lineHeight;\r\n const scrollBeyondLastLine = options.scrollBeyondLastLine;\r\n const { minimapLineCount } = EditorLayoutInfoComputer.computeContainedMinimapLineCount({\r\n viewLineCount: viewLineCount,\r\n scrollBeyondLastLine: scrollBeyondLastLine,\r\n height: options.editorHeight,\r\n lineHeight: lineHeight,\r\n pixelRatio: pixelRatio\r\n });\r\n const ratio = viewLineCount / minimapLineCount;\r\n const halfRatio = ratio / 2;\r\n if (!oldSamplingState || oldSamplingState.minimapLines.length === 0) {\r\n let result = [];\r\n result[0] = 1;\r\n if (minimapLineCount > 1) {\r\n for (let i = 0, lastIndex = minimapLineCount - 1; i < lastIndex; i++) {\r\n result[i] = Math.round(i * ratio + halfRatio);\r\n }\r\n result[minimapLineCount - 1] = viewLineCount;\r\n }\r\n return [new MinimapSamplingState(ratio, result), []];\r\n }\r\n const oldMinimapLines = oldSamplingState.minimapLines;\r\n const oldLength = oldMinimapLines.length;\r\n let result = [];\r\n let oldIndex = 0;\r\n let oldDeltaLineCount = 0;\r\n let minViewLineNumber = 1;\r\n const MAX_EVENT_COUNT = 10; // generate at most 10 events, if there are more than 10 changes, just flush all previous data\r\n let events = [];\r\n let lastEvent = null;\r\n for (let i = 0; i < minimapLineCount; i++) {\r\n const fromViewLineNumber = Math.max(minViewLineNumber, Math.round(i * ratio));\r\n const toViewLineNumber = Math.max(fromViewLineNumber, Math.round((i + 1) * ratio));\r\n while (oldIndex < oldLength && oldMinimapLines[oldIndex] < fromViewLineNumber) {\r\n if (events.length < MAX_EVENT_COUNT) {\r\n const oldMinimapLineNumber = oldIndex + 1 + oldDeltaLineCount;\r\n if (lastEvent && lastEvent.type === 'deleted' && lastEvent._oldIndex === oldIndex - 1) {\r\n lastEvent.deleteToLineNumber++;\r\n }\r\n else {\r\n lastEvent = { type: 'deleted', _oldIndex: oldIndex, deleteFromLineNumber: oldMinimapLineNumber, deleteToLineNumber: oldMinimapLineNumber };\r\n events.push(lastEvent);\r\n }\r\n oldDeltaLineCount--;\r\n }\r\n oldIndex++;\r\n }\r\n let selectedViewLineNumber;\r\n if (oldIndex < oldLength && oldMinimapLines[oldIndex] <= toViewLineNumber) {\r\n // reuse the old sampled line\r\n selectedViewLineNumber = oldMinimapLines[oldIndex];\r\n oldIndex++;\r\n }\r\n else {\r\n if (i === 0) {\r\n selectedViewLineNumber = 1;\r\n }\r\n else if (i + 1 === minimapLineCount) {\r\n selectedViewLineNumber = viewLineCount;\r\n }\r\n else {\r\n selectedViewLineNumber = Math.round(i * ratio + halfRatio);\r\n }\r\n if (events.length < MAX_EVENT_COUNT) {\r\n const oldMinimapLineNumber = oldIndex + 1 + oldDeltaLineCount;\r\n if (lastEvent && lastEvent.type === 'inserted' && lastEvent._i === i - 1) {\r\n lastEvent.insertToLineNumber++;\r\n }\r\n else {\r\n lastEvent = { type: 'inserted', _i: i, insertFromLineNumber: oldMinimapLineNumber, insertToLineNumber: oldMinimapLineNumber };\r\n events.push(lastEvent);\r\n }\r\n oldDeltaLineCount++;\r\n }\r\n }\r\n result[i] = selectedViewLineNumber;\r\n minViewLineNumber = selectedViewLineNumber;\r\n }\r\n if (events.length < MAX_EVENT_COUNT) {\r\n while (oldIndex < oldLength) {\r\n const oldMinimapLineNumber = oldIndex + 1 + oldDeltaLineCount;\r\n if (lastEvent && lastEvent.type === 'deleted' && lastEvent._oldIndex === oldIndex - 1) {\r\n lastEvent.deleteToLineNumber++;\r\n }\r\n else {\r\n lastEvent = { type: 'deleted', _oldIndex: oldIndex, deleteFromLineNumber: oldMinimapLineNumber, deleteToLineNumber: oldMinimapLineNumber };\r\n events.push(lastEvent);\r\n }\r\n oldDeltaLineCount--;\r\n oldIndex++;\r\n }\r\n }\r\n else {\r\n // too many events, just give up\r\n events = [{ type: 'flush' }];\r\n }\r\n return [new MinimapSamplingState(ratio, result), events];\r\n }\r\n modelLineToMinimapLine(lineNumber) {\r\n return Math.min(this.minimapLines.length, Math.max(1, Math.round(lineNumber / this.samplingRatio)));\r\n }\r\n /**\r\n * Will return null if the model line ranges are not intersecting with a sampled model line.\r\n */\r\n modelLineRangeToMinimapLineRange(fromLineNumber, toLineNumber) {\r\n let fromLineIndex = this.modelLineToMinimapLine(fromLineNumber) - 1;\r\n while (fromLineIndex > 0 && this.minimapLines[fromLineIndex - 1] >= fromLineNumber) {\r\n fromLineIndex--;\r\n }\r\n let toLineIndex = this.modelLineToMinimapLine(toLineNumber) - 1;\r\n while (toLineIndex + 1 < this.minimapLines.length && this.minimapLines[toLineIndex + 1] <= toLineNumber) {\r\n toLineIndex++;\r\n }\r\n if (fromLineIndex === toLineIndex) {\r\n const sampledLineNumber = this.minimapLines[fromLineIndex];\r\n if (sampledLineNumber < fromLineNumber || sampledLineNumber > toLineNumber) {\r\n // This line is not part of the sampled lines ==> nothing to do\r\n return null;\r\n }\r\n }\r\n return [fromLineIndex + 1, toLineIndex + 1];\r\n }\r\n /**\r\n * Will always return a range, even if it is not intersecting with a sampled model line.\r\n */\r\n decorationLineRangeToMinimapLineRange(startLineNumber, endLineNumber) {\r\n let minimapLineStart = this.modelLineToMinimapLine(startLineNumber);\r\n let minimapLineEnd = this.modelLineToMinimapLine(endLineNumber);\r\n if (startLineNumber !== endLineNumber && minimapLineEnd === minimapLineStart) {\r\n if (minimapLineEnd === this.minimapLines.length) {\r\n if (minimapLineStart > 1) {\r\n minimapLineStart--;\r\n }\r\n }\r\n else {\r\n minimapLineEnd++;\r\n }\r\n }\r\n return [minimapLineStart, minimapLineEnd];\r\n }\r\n onLinesDeleted(e) {\r\n // have the mapping be sticky\r\n const deletedLineCount = e.toLineNumber - e.fromLineNumber + 1;\r\n let changeStartIndex = this.minimapLines.length;\r\n let changeEndIndex = 0;\r\n for (let i = this.minimapLines.length - 1; i >= 0; i--) {\r\n if (this.minimapLines[i] < e.fromLineNumber) {\r\n break;\r\n }\r\n if (this.minimapLines[i] <= e.toLineNumber) {\r\n // this line got deleted => move to previous available\r\n this.minimapLines[i] = Math.max(1, e.fromLineNumber - 1);\r\n changeStartIndex = Math.min(changeStartIndex, i);\r\n changeEndIndex = Math.max(changeEndIndex, i);\r\n }\r\n else {\r\n this.minimapLines[i] -= deletedLineCount;\r\n }\r\n }\r\n return [changeStartIndex, changeEndIndex];\r\n }\r\n onLinesInserted(e) {\r\n // have the mapping be sticky\r\n const insertedLineCount = e.toLineNumber - e.fromLineNumber + 1;\r\n for (let i = this.minimapLines.length - 1; i >= 0; i--) {\r\n if (this.minimapLines[i] < e.fromLineNumber) {\r\n break;\r\n }\r\n this.minimapLines[i] += insertedLineCount;\r\n }\r\n }\r\n}\r\nexport class Minimap extends ViewPart {\r\n constructor(context) {\r\n super(context);\r\n this.tokensColorTracker = MinimapTokensColorTracker.getInstance();\r\n this._selections = [];\r\n this._minimapSelections = null;\r\n this.options = new MinimapOptions(this._context.configuration, this._context.theme, this.tokensColorTracker);\r\n const [samplingState,] = MinimapSamplingState.compute(this.options, this._context.model.getLineCount(), null);\r\n this._samplingState = samplingState;\r\n this._shouldCheckSampling = false;\r\n this._actual = new InnerMinimap(context.theme, this);\r\n }\r\n dispose() {\r\n this._actual.dispose();\r\n super.dispose();\r\n }\r\n getDomNode() {\r\n return this._actual.getDomNode();\r\n }\r\n _onOptionsMaybeChanged() {\r\n const opts = new MinimapOptions(this._context.configuration, this._context.theme, this.tokensColorTracker);\r\n if (this.options.equals(opts)) {\r\n return false;\r\n }\r\n this.options = opts;\r\n this._recreateLineSampling();\r\n this._actual.onDidChangeOptions();\r\n return true;\r\n }\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n return this._onOptionsMaybeChanged();\r\n }\r\n onCursorStateChanged(e) {\r\n this._selections = e.selections;\r\n this._minimapSelections = null;\r\n return this._actual.onSelectionChanged();\r\n }\r\n onDecorationsChanged(e) {\r\n if (e.affectsMinimap) {\r\n return this._actual.onDecorationsChanged();\r\n }\r\n return false;\r\n }\r\n onFlushed(e) {\r\n if (this._samplingState) {\r\n this._shouldCheckSampling = true;\r\n }\r\n return this._actual.onFlushed();\r\n }\r\n onLinesChanged(e) {\r\n if (this._samplingState) {\r\n const minimapLineRange = this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber, e.toLineNumber);\r\n if (minimapLineRange) {\r\n return this._actual.onLinesChanged(minimapLineRange[0], minimapLineRange[1]);\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n else {\r\n return this._actual.onLinesChanged(e.fromLineNumber, e.toLineNumber);\r\n }\r\n }\r\n onLinesDeleted(e) {\r\n if (this._samplingState) {\r\n const [changeStartIndex, changeEndIndex] = this._samplingState.onLinesDeleted(e);\r\n if (changeStartIndex <= changeEndIndex) {\r\n this._actual.onLinesChanged(changeStartIndex + 1, changeEndIndex + 1);\r\n }\r\n this._shouldCheckSampling = true;\r\n return true;\r\n }\r\n else {\r\n return this._actual.onLinesDeleted(e.fromLineNumber, e.toLineNumber);\r\n }\r\n }\r\n onLinesInserted(e) {\r\n if (this._samplingState) {\r\n this._samplingState.onLinesInserted(e);\r\n this._shouldCheckSampling = true;\r\n return true;\r\n }\r\n else {\r\n return this._actual.onLinesInserted(e.fromLineNumber, e.toLineNumber);\r\n }\r\n }\r\n onScrollChanged(e) {\r\n return this._actual.onScrollChanged();\r\n }\r\n onThemeChanged(e) {\r\n this._context.model.invalidateMinimapColorCache();\r\n this._actual.onThemeChanged();\r\n this._onOptionsMaybeChanged();\r\n return true;\r\n }\r\n onTokensChanged(e) {\r\n if (this._samplingState) {\r\n let ranges = [];\r\n for (const range of e.ranges) {\r\n const minimapLineRange = this._samplingState.modelLineRangeToMinimapLineRange(range.fromLineNumber, range.toLineNumber);\r\n if (minimapLineRange) {\r\n ranges.push({ fromLineNumber: minimapLineRange[0], toLineNumber: minimapLineRange[1] });\r\n }\r\n }\r\n if (ranges.length) {\r\n return this._actual.onTokensChanged(ranges);\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n else {\r\n return this._actual.onTokensChanged(e.ranges);\r\n }\r\n }\r\n onTokensColorsChanged(e) {\r\n this._onOptionsMaybeChanged();\r\n return this._actual.onTokensColorsChanged();\r\n }\r\n onZonesChanged(e) {\r\n return this._actual.onZonesChanged();\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n if (this._shouldCheckSampling) {\r\n this._shouldCheckSampling = false;\r\n this._recreateLineSampling();\r\n }\r\n }\r\n render(ctx) {\r\n let viewportStartLineNumber = ctx.visibleRange.startLineNumber;\r\n let viewportEndLineNumber = ctx.visibleRange.endLineNumber;\r\n if (this._samplingState) {\r\n viewportStartLineNumber = this._samplingState.modelLineToMinimapLine(viewportStartLineNumber);\r\n viewportEndLineNumber = this._samplingState.modelLineToMinimapLine(viewportEndLineNumber);\r\n }\r\n const minimapCtx = {\r\n viewportContainsWhitespaceGaps: (ctx.viewportData.whitespaceViewportData.length > 0),\r\n scrollWidth: ctx.scrollWidth,\r\n scrollHeight: ctx.scrollHeight,\r\n viewportStartLineNumber: viewportStartLineNumber,\r\n viewportEndLineNumber: viewportEndLineNumber,\r\n viewportStartLineNumberVerticalOffset: ctx.getVerticalOffsetForLineNumber(viewportStartLineNumber),\r\n scrollTop: ctx.scrollTop,\r\n scrollLeft: ctx.scrollLeft,\r\n viewportWidth: ctx.viewportWidth,\r\n viewportHeight: ctx.viewportHeight,\r\n };\r\n this._actual.render(minimapCtx);\r\n }\r\n //#region IMinimapModel\r\n _recreateLineSampling() {\r\n this._minimapSelections = null;\r\n const wasSampling = Boolean(this._samplingState);\r\n const [samplingState, events] = MinimapSamplingState.compute(this.options, this._context.model.getLineCount(), this._samplingState);\r\n this._samplingState = samplingState;\r\n if (wasSampling && this._samplingState) {\r\n // was sampling, is sampling\r\n for (const event of events) {\r\n switch (event.type) {\r\n case 'deleted':\r\n this._actual.onLinesDeleted(event.deleteFromLineNumber, event.deleteToLineNumber);\r\n break;\r\n case 'inserted':\r\n this._actual.onLinesInserted(event.insertFromLineNumber, event.insertToLineNumber);\r\n break;\r\n case 'flush':\r\n this._actual.onFlushed();\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n getLineCount() {\r\n if (this._samplingState) {\r\n return this._samplingState.minimapLines.length;\r\n }\r\n return this._context.model.getLineCount();\r\n }\r\n getRealLineCount() {\r\n return this._context.model.getLineCount();\r\n }\r\n getLineContent(lineNumber) {\r\n if (this._samplingState) {\r\n return this._context.model.getLineContent(this._samplingState.minimapLines[lineNumber - 1]);\r\n }\r\n return this._context.model.getLineContent(lineNumber);\r\n }\r\n getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed) {\r\n if (this._samplingState) {\r\n let result = [];\r\n for (let lineIndex = 0, lineCount = endLineNumber - startLineNumber + 1; lineIndex < lineCount; lineIndex++) {\r\n if (needed[lineIndex]) {\r\n result[lineIndex] = this._context.model.getViewLineData(this._samplingState.minimapLines[startLineNumber + lineIndex - 1]);\r\n }\r\n else {\r\n result[lineIndex] = null;\r\n }\r\n }\r\n return result;\r\n }\r\n return this._context.model.getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed).data;\r\n }\r\n getSelections() {\r\n if (this._minimapSelections === null) {\r\n if (this._samplingState) {\r\n this._minimapSelections = [];\r\n for (const selection of this._selections) {\r\n const [minimapLineStart, minimapLineEnd] = this._samplingState.decorationLineRangeToMinimapLineRange(selection.startLineNumber, selection.endLineNumber);\r\n this._minimapSelections.push(new Selection(minimapLineStart, selection.startColumn, minimapLineEnd, selection.endColumn));\r\n }\r\n }\r\n else {\r\n this._minimapSelections = this._selections;\r\n }\r\n }\r\n return this._minimapSelections;\r\n }\r\n getMinimapDecorationsInViewport(startLineNumber, endLineNumber) {\r\n let visibleRange;\r\n if (this._samplingState) {\r\n const modelStartLineNumber = this._samplingState.minimapLines[startLineNumber - 1];\r\n const modelEndLineNumber = this._samplingState.minimapLines[endLineNumber - 1];\r\n visibleRange = new Range(modelStartLineNumber, 1, modelEndLineNumber, this._context.model.getLineMaxColumn(modelEndLineNumber));\r\n }\r\n else {\r\n visibleRange = new Range(startLineNumber, 1, endLineNumber, this._context.model.getLineMaxColumn(endLineNumber));\r\n }\r\n const decorations = this._context.model.getDecorationsInViewport(visibleRange);\r\n if (this._samplingState) {\r\n let result = [];\r\n for (const decoration of decorations) {\r\n if (!decoration.options.minimap) {\r\n continue;\r\n }\r\n const range = decoration.range;\r\n const minimapStartLineNumber = this._samplingState.modelLineToMinimapLine(range.startLineNumber);\r\n const minimapEndLineNumber = this._samplingState.modelLineToMinimapLine(range.endLineNumber);\r\n result.push(new ViewModelDecoration(new Range(minimapStartLineNumber, range.startColumn, minimapEndLineNumber, range.endColumn), decoration.options));\r\n }\r\n return result;\r\n }\r\n return decorations;\r\n }\r\n getOptions() {\r\n return this._context.model.getTextModelOptions();\r\n }\r\n revealLineNumber(lineNumber) {\r\n if (this._samplingState) {\r\n lineNumber = this._samplingState.minimapLines[lineNumber - 1];\r\n }\r\n this._context.model.revealRange('mouse', false, new Range(lineNumber, 1, lineNumber, 1), 1 /* Center */, 0 /* Smooth */);\r\n }\r\n setScrollTop(scrollTop) {\r\n this._context.model.setScrollPosition({\r\n scrollTop: scrollTop\r\n }, 1 /* Immediate */);\r\n }\r\n}\r\nclass InnerMinimap extends Disposable {\r\n constructor(theme, model) {\r\n super();\r\n this._renderDecorations = false;\r\n this._gestureInProgress = false;\r\n this._theme = theme;\r\n this._model = model;\r\n this._lastRenderData = null;\r\n this._buffers = null;\r\n this._selectionColor = this._theme.getColor(minimapSelection);\r\n this._domNode = createFastDomNode(document.createElement('div'));\r\n PartFingerprints.write(this._domNode, 8 /* Minimap */);\r\n this._domNode.setClassName(this._getMinimapDomNodeClassName());\r\n this._domNode.setPosition('absolute');\r\n this._domNode.setAttribute('role', 'presentation');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._shadow = createFastDomNode(document.createElement('div'));\r\n this._shadow.setClassName('minimap-shadow-hidden');\r\n this._domNode.appendChild(this._shadow);\r\n this._canvas = createFastDomNode(document.createElement('canvas'));\r\n this._canvas.setPosition('absolute');\r\n this._canvas.setLeft(0);\r\n this._domNode.appendChild(this._canvas);\r\n this._decorationsCanvas = createFastDomNode(document.createElement('canvas'));\r\n this._decorationsCanvas.setPosition('absolute');\r\n this._decorationsCanvas.setClassName('minimap-decorations-layer');\r\n this._decorationsCanvas.setLeft(0);\r\n this._domNode.appendChild(this._decorationsCanvas);\r\n this._slider = createFastDomNode(document.createElement('div'));\r\n this._slider.setPosition('absolute');\r\n this._slider.setClassName('minimap-slider');\r\n this._slider.setLayerHinting(true);\r\n this._slider.setContain('strict');\r\n this._domNode.appendChild(this._slider);\r\n this._sliderHorizontal = createFastDomNode(document.createElement('div'));\r\n this._sliderHorizontal.setPosition('absolute');\r\n this._sliderHorizontal.setClassName('minimap-slider-horizontal');\r\n this._slider.appendChild(this._sliderHorizontal);\r\n this._applyLayout();\r\n this._mouseDownListener = dom.addStandardDisposableListener(this._domNode.domNode, 'mousedown', (e) => {\r\n e.preventDefault();\r\n const renderMinimap = this._model.options.renderMinimap;\r\n if (renderMinimap === 0 /* None */) {\r\n return;\r\n }\r\n if (!this._lastRenderData) {\r\n return;\r\n }\r\n if (this._model.options.size !== 'proportional') {\r\n if (e.leftButton && this._lastRenderData) {\r\n // pretend the click occured in the center of the slider\r\n const position = dom.getDomNodePagePosition(this._slider.domNode);\r\n const initialPosY = position.top + position.height / 2;\r\n this._startSliderDragging(e.buttons, e.posx, initialPosY, e.posy, this._lastRenderData.renderedLayout);\r\n }\r\n return;\r\n }\r\n const minimapLineHeight = this._model.options.minimapLineHeight;\r\n const internalOffsetY = (this._model.options.canvasInnerHeight / this._model.options.canvasOuterHeight) * e.browserEvent.offsetY;\r\n const lineIndex = Math.floor(internalOffsetY / minimapLineHeight);\r\n let lineNumber = lineIndex + this._lastRenderData.renderedLayout.startLineNumber;\r\n lineNumber = Math.min(lineNumber, this._model.getLineCount());\r\n this._model.revealLineNumber(lineNumber);\r\n });\r\n this._sliderMouseMoveMonitor = new GlobalMouseMoveMonitor();\r\n this._sliderMouseDownListener = dom.addStandardDisposableListener(this._slider.domNode, 'mousedown', (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n if (e.leftButton && this._lastRenderData) {\r\n this._startSliderDragging(e.buttons, e.posx, e.posy, e.posy, this._lastRenderData.renderedLayout);\r\n }\r\n });\r\n this._gestureDisposable = Gesture.addTarget(this._domNode.domNode);\r\n this._sliderTouchStartListener = dom.addDisposableListener(this._domNode.domNode, EventType.Start, (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n if (this._lastRenderData) {\r\n this._slider.toggleClassName('active', true);\r\n this._gestureInProgress = true;\r\n this.scrollDueToTouchEvent(e);\r\n }\r\n }, { passive: false });\r\n this._sliderTouchMoveListener = dom.addDisposableListener(this._domNode.domNode, EventType.Change, (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n if (this._lastRenderData && this._gestureInProgress) {\r\n this.scrollDueToTouchEvent(e);\r\n }\r\n }, { passive: false });\r\n this._sliderTouchEndListener = dom.addStandardDisposableListener(this._domNode.domNode, EventType.End, (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this._gestureInProgress = false;\r\n this._slider.toggleClassName('active', false);\r\n });\r\n }\r\n _startSliderDragging(initialButtons, initialPosX, initialPosY, posy, initialSliderState) {\r\n this._slider.toggleClassName('active', true);\r\n const handleMouseMove = (posy, posx) => {\r\n const mouseOrthogonalDelta = Math.abs(posx - initialPosX);\r\n if (platform.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) {\r\n // The mouse has wondered away from the scrollbar => reset dragging\r\n this._model.setScrollTop(initialSliderState.scrollTop);\r\n return;\r\n }\r\n const mouseDelta = posy - initialPosY;\r\n this._model.setScrollTop(initialSliderState.getDesiredScrollTopFromDelta(mouseDelta));\r\n };\r\n if (posy !== initialPosY) {\r\n handleMouseMove(posy, initialPosX);\r\n }\r\n this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode, initialButtons, standardMouseMoveMerger, (mouseMoveData) => handleMouseMove(mouseMoveData.posy, mouseMoveData.posx), () => {\r\n this._slider.toggleClassName('active', false);\r\n });\r\n }\r\n scrollDueToTouchEvent(touch) {\r\n const startY = this._domNode.domNode.getBoundingClientRect().top;\r\n const scrollTop = this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(touch.pageY - startY);\r\n this._model.setScrollTop(scrollTop);\r\n }\r\n dispose() {\r\n this._mouseDownListener.dispose();\r\n this._sliderMouseMoveMonitor.dispose();\r\n this._sliderMouseDownListener.dispose();\r\n this._gestureDisposable.dispose();\r\n this._sliderTouchStartListener.dispose();\r\n this._sliderTouchMoveListener.dispose();\r\n this._sliderTouchEndListener.dispose();\r\n super.dispose();\r\n }\r\n _getMinimapDomNodeClassName() {\r\n if (this._model.options.showSlider === 'always') {\r\n return 'minimap slider-always';\r\n }\r\n return 'minimap slider-mouseover';\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n _applyLayout() {\r\n this._domNode.setLeft(this._model.options.minimapLeft);\r\n this._domNode.setWidth(this._model.options.minimapWidth);\r\n this._domNode.setHeight(this._model.options.minimapHeight);\r\n this._shadow.setHeight(this._model.options.minimapHeight);\r\n this._canvas.setWidth(this._model.options.canvasOuterWidth);\r\n this._canvas.setHeight(this._model.options.canvasOuterHeight);\r\n this._canvas.domNode.width = this._model.options.canvasInnerWidth;\r\n this._canvas.domNode.height = this._model.options.canvasInnerHeight;\r\n this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth);\r\n this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight);\r\n this._decorationsCanvas.domNode.width = this._model.options.canvasInnerWidth;\r\n this._decorationsCanvas.domNode.height = this._model.options.canvasInnerHeight;\r\n this._slider.setWidth(this._model.options.minimapWidth);\r\n }\r\n _getBuffer() {\r\n if (!this._buffers) {\r\n if (this._model.options.canvasInnerWidth > 0 && this._model.options.canvasInnerHeight > 0) {\r\n this._buffers = new MinimapBuffers(this._canvas.domNode.getContext('2d'), this._model.options.canvasInnerWidth, this._model.options.canvasInnerHeight, this._model.options.backgroundColor);\r\n }\r\n }\r\n return this._buffers ? this._buffers.getBuffer() : null;\r\n }\r\n // ---- begin view event handlers\r\n onDidChangeOptions() {\r\n this._lastRenderData = null;\r\n this._buffers = null;\r\n this._applyLayout();\r\n this._domNode.setClassName(this._getMinimapDomNodeClassName());\r\n }\r\n onSelectionChanged() {\r\n this._renderDecorations = true;\r\n return true;\r\n }\r\n onDecorationsChanged() {\r\n this._renderDecorations = true;\r\n return true;\r\n }\r\n onFlushed() {\r\n this._lastRenderData = null;\r\n return true;\r\n }\r\n onLinesChanged(changeFromLineNumber, changeToLineNumber) {\r\n if (this._lastRenderData) {\r\n return this._lastRenderData.onLinesChanged(changeFromLineNumber, changeToLineNumber);\r\n }\r\n return false;\r\n }\r\n onLinesDeleted(deleteFromLineNumber, deleteToLineNumber) {\r\n if (this._lastRenderData) {\r\n this._lastRenderData.onLinesDeleted(deleteFromLineNumber, deleteToLineNumber);\r\n }\r\n return true;\r\n }\r\n onLinesInserted(insertFromLineNumber, insertToLineNumber) {\r\n if (this._lastRenderData) {\r\n this._lastRenderData.onLinesInserted(insertFromLineNumber, insertToLineNumber);\r\n }\r\n return true;\r\n }\r\n onScrollChanged() {\r\n this._renderDecorations = true;\r\n return true;\r\n }\r\n onThemeChanged() {\r\n this._selectionColor = this._theme.getColor(minimapSelection);\r\n this._renderDecorations = true;\r\n return true;\r\n }\r\n onTokensChanged(ranges) {\r\n if (this._lastRenderData) {\r\n return this._lastRenderData.onTokensChanged(ranges);\r\n }\r\n return false;\r\n }\r\n onTokensColorsChanged() {\r\n this._lastRenderData = null;\r\n this._buffers = null;\r\n return true;\r\n }\r\n onZonesChanged() {\r\n this._lastRenderData = null;\r\n return true;\r\n }\r\n // --- end event handlers\r\n render(renderingCtx) {\r\n const renderMinimap = this._model.options.renderMinimap;\r\n if (renderMinimap === 0 /* None */) {\r\n this._shadow.setClassName('minimap-shadow-hidden');\r\n this._sliderHorizontal.setWidth(0);\r\n this._sliderHorizontal.setHeight(0);\r\n return;\r\n }\r\n if (renderingCtx.scrollLeft + renderingCtx.viewportWidth >= renderingCtx.scrollWidth) {\r\n this._shadow.setClassName('minimap-shadow-hidden');\r\n }\r\n else {\r\n this._shadow.setClassName('minimap-shadow-visible');\r\n }\r\n const layout = MinimapLayout.create(this._model.options, renderingCtx.viewportStartLineNumber, renderingCtx.viewportEndLineNumber, renderingCtx.viewportStartLineNumberVerticalOffset, renderingCtx.viewportHeight, renderingCtx.viewportContainsWhitespaceGaps, this._model.getLineCount(), this._model.getRealLineCount(), renderingCtx.scrollTop, renderingCtx.scrollHeight, this._lastRenderData ? this._lastRenderData.renderedLayout : null);\r\n this._slider.setDisplay(layout.sliderNeeded ? 'block' : 'none');\r\n this._slider.setTop(layout.sliderTop);\r\n this._slider.setHeight(layout.sliderHeight);\r\n // Compute horizontal slider coordinates\r\n const scrollLeftChars = renderingCtx.scrollLeft / this._model.options.typicalHalfwidthCharacterWidth;\r\n const horizontalSliderLeft = Math.min(this._model.options.minimapWidth, Math.round(scrollLeftChars * this._model.options.minimapCharWidth / this._model.options.pixelRatio));\r\n this._sliderHorizontal.setLeft(horizontalSliderLeft);\r\n this._sliderHorizontal.setWidth(this._model.options.minimapWidth - horizontalSliderLeft);\r\n this._sliderHorizontal.setTop(0);\r\n this._sliderHorizontal.setHeight(layout.sliderHeight);\r\n this.renderDecorations(layout);\r\n this._lastRenderData = this.renderLines(layout);\r\n }\r\n renderDecorations(layout) {\r\n if (this._renderDecorations) {\r\n this._renderDecorations = false;\r\n const selections = this._model.getSelections();\r\n const decorations = this._model.getMinimapDecorationsInViewport(layout.startLineNumber, layout.endLineNumber);\r\n const { canvasInnerWidth, canvasInnerHeight } = this._model.options;\r\n const lineHeight = this._model.options.minimapLineHeight;\r\n const characterWidth = this._model.options.minimapCharWidth;\r\n const tabSize = this._model.getOptions().tabSize;\r\n const canvasContext = this._decorationsCanvas.domNode.getContext('2d');\r\n canvasContext.clearRect(0, 0, canvasInnerWidth, canvasInnerHeight);\r\n const lineOffsetMap = new Map();\r\n for (let i = 0; i < selections.length; i++) {\r\n const selection = selections[i];\r\n for (let line = selection.startLineNumber; line <= selection.endLineNumber; line++) {\r\n this.renderDecorationOnLine(canvasContext, lineOffsetMap, selection, this._selectionColor, layout, line, lineHeight, lineHeight, tabSize, characterWidth);\r\n }\r\n }\r\n // Loop over decorations, ignoring those that don't have the minimap property set and rendering rectangles for each line the decoration spans\r\n for (let i = 0; i < decorations.length; i++) {\r\n const decoration = decorations[i];\r\n if (!decoration.options.minimap) {\r\n continue;\r\n }\r\n const decorationColor = decoration.options.minimap.getColor(this._theme);\r\n for (let line = decoration.range.startLineNumber; line <= decoration.range.endLineNumber; line++) {\r\n switch (decoration.options.minimap.position) {\r\n case MinimapPosition.Inline:\r\n this.renderDecorationOnLine(canvasContext, lineOffsetMap, decoration.range, decorationColor, layout, line, lineHeight, lineHeight, tabSize, characterWidth);\r\n continue;\r\n case MinimapPosition.Gutter:\r\n const y = (line - layout.startLineNumber) * lineHeight;\r\n const x = 2;\r\n this.renderDecoration(canvasContext, decorationColor, x, y, GUTTER_DECORATION_WIDTH, lineHeight);\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n renderDecorationOnLine(canvasContext, lineOffsetMap, decorationRange, decorationColor, layout, lineNumber, height, lineHeight, tabSize, charWidth) {\r\n const y = (lineNumber - layout.startLineNumber) * lineHeight;\r\n // Skip rendering the line if it's vertically outside our viewport\r\n if (y + height < 0 || y > this._model.options.canvasInnerHeight) {\r\n return;\r\n }\r\n // Cache line offset data so that it is only read once per line\r\n let lineIndexToXOffset = lineOffsetMap.get(lineNumber);\r\n const isFirstDecorationForLine = !lineIndexToXOffset;\r\n if (!lineIndexToXOffset) {\r\n const lineData = this._model.getLineContent(lineNumber);\r\n lineIndexToXOffset = [MINIMAP_GUTTER_WIDTH];\r\n for (let i = 1; i < lineData.length + 1; i++) {\r\n const charCode = lineData.charCodeAt(i - 1);\r\n const dx = charCode === 9 /* Tab */\r\n ? tabSize * charWidth\r\n : strings.isFullWidthCharacter(charCode)\r\n ? 2 * charWidth\r\n : charWidth;\r\n lineIndexToXOffset[i] = lineIndexToXOffset[i - 1] + dx;\r\n }\r\n lineOffsetMap.set(lineNumber, lineIndexToXOffset);\r\n }\r\n const { startColumn, endColumn, startLineNumber, endLineNumber } = decorationRange;\r\n const x = startLineNumber === lineNumber ? lineIndexToXOffset[startColumn - 1] : MINIMAP_GUTTER_WIDTH;\r\n const endColumnForLine = endLineNumber > lineNumber ? lineIndexToXOffset.length - 1 : endColumn - 1;\r\n if (endColumnForLine > 0) {\r\n // If the decoration starts at the last character of the column and spans over it, ensure it has a width\r\n const width = lineIndexToXOffset[endColumnForLine] - x || 2;\r\n this.renderDecoration(canvasContext, decorationColor, x, y, width, height);\r\n }\r\n if (isFirstDecorationForLine) {\r\n this.renderLineHighlight(canvasContext, decorationColor, y, height);\r\n }\r\n }\r\n renderLineHighlight(canvasContext, decorationColor, y, height) {\r\n canvasContext.fillStyle = decorationColor && decorationColor.transparent(0.5).toString() || '';\r\n canvasContext.fillRect(MINIMAP_GUTTER_WIDTH, y, canvasContext.canvas.width, height);\r\n }\r\n renderDecoration(canvasContext, decorationColor, x, y, width, height) {\r\n canvasContext.fillStyle = decorationColor && decorationColor.toString() || '';\r\n canvasContext.fillRect(x, y, width, height);\r\n }\r\n renderLines(layout) {\r\n const startLineNumber = layout.startLineNumber;\r\n const endLineNumber = layout.endLineNumber;\r\n const minimapLineHeight = this._model.options.minimapLineHeight;\r\n // Check if nothing changed w.r.t. lines from last frame\r\n if (this._lastRenderData && this._lastRenderData.linesEquals(layout)) {\r\n const _lastData = this._lastRenderData._get();\r\n // Nice!! Nothing changed from last frame\r\n return new RenderData(layout, _lastData.imageData, _lastData.lines);\r\n }\r\n // Oh well!! We need to repaint some lines...\r\n const imageData = this._getBuffer();\r\n if (!imageData) {\r\n // 0 width or 0 height canvas, nothing to do\r\n return null;\r\n }\r\n // Render untouched lines by using last rendered data.\r\n let [_dirtyY1, _dirtyY2, needed] = InnerMinimap._renderUntouchedLines(imageData, startLineNumber, endLineNumber, minimapLineHeight, this._lastRenderData);\r\n // Fetch rendering info from view model for rest of lines that need rendering.\r\n const lineInfo = this._model.getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed);\r\n const tabSize = this._model.getOptions().tabSize;\r\n const background = this._model.options.backgroundColor;\r\n const tokensColorTracker = this._model.tokensColorTracker;\r\n const useLighterFont = tokensColorTracker.backgroundIsLight();\r\n const renderMinimap = this._model.options.renderMinimap;\r\n const charRenderer = this._model.options.charRenderer();\r\n const fontScale = this._model.options.fontScale;\r\n const minimapCharWidth = this._model.options.minimapCharWidth;\r\n const baseCharHeight = (renderMinimap === 1 /* Text */ ? 2 /* BASE_CHAR_HEIGHT */ : 2 /* BASE_CHAR_HEIGHT */ + 1);\r\n const renderMinimapLineHeight = baseCharHeight * fontScale;\r\n const innerLinePadding = (minimapLineHeight > renderMinimapLineHeight ? Math.floor((minimapLineHeight - renderMinimapLineHeight) / 2) : 0);\r\n // Render the rest of lines\r\n let dy = 0;\r\n const renderedLines = [];\r\n for (let lineIndex = 0, lineCount = endLineNumber - startLineNumber + 1; lineIndex < lineCount; lineIndex++) {\r\n if (needed[lineIndex]) {\r\n InnerMinimap._renderLine(imageData, background, useLighterFont, renderMinimap, minimapCharWidth, tokensColorTracker, charRenderer, dy, innerLinePadding, tabSize, lineInfo[lineIndex], fontScale, minimapLineHeight);\r\n }\r\n renderedLines[lineIndex] = new MinimapLine(dy);\r\n dy += minimapLineHeight;\r\n }\r\n const dirtyY1 = (_dirtyY1 === -1 ? 0 : _dirtyY1);\r\n const dirtyY2 = (_dirtyY2 === -1 ? imageData.height : _dirtyY2);\r\n const dirtyHeight = dirtyY2 - dirtyY1;\r\n // Finally, paint to the canvas\r\n const ctx = this._canvas.domNode.getContext('2d');\r\n ctx.putImageData(imageData, 0, 0, 0, dirtyY1, imageData.width, dirtyHeight);\r\n // Save rendered data for reuse on next frame if possible\r\n return new RenderData(layout, imageData, renderedLines);\r\n }\r\n static _renderUntouchedLines(target, startLineNumber, endLineNumber, minimapLineHeight, lastRenderData) {\r\n const needed = [];\r\n if (!lastRenderData) {\r\n for (let i = 0, len = endLineNumber - startLineNumber + 1; i < len; i++) {\r\n needed[i] = true;\r\n }\r\n return [-1, -1, needed];\r\n }\r\n const _lastData = lastRenderData._get();\r\n const lastTargetData = _lastData.imageData.data;\r\n const lastStartLineNumber = _lastData.rendLineNumberStart;\r\n const lastLines = _lastData.lines;\r\n const lastLinesLength = lastLines.length;\r\n const WIDTH = target.width;\r\n const targetData = target.data;\r\n const maxDestPixel = (endLineNumber - startLineNumber + 1) * minimapLineHeight * WIDTH * 4;\r\n let dirtyPixel1 = -1; // the pixel offset up to which all the data is equal to the prev frame\r\n let dirtyPixel2 = -1; // the pixel offset after which all the data is equal to the prev frame\r\n let copySourceStart = -1;\r\n let copySourceEnd = -1;\r\n let copyDestStart = -1;\r\n let copyDestEnd = -1;\r\n let dest_dy = 0;\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - startLineNumber;\r\n const lastLineIndex = lineNumber - lastStartLineNumber;\r\n const source_dy = (lastLineIndex >= 0 && lastLineIndex < lastLinesLength ? lastLines[lastLineIndex].dy : -1);\r\n if (source_dy === -1) {\r\n needed[lineIndex] = true;\r\n dest_dy += minimapLineHeight;\r\n continue;\r\n }\r\n const sourceStart = source_dy * WIDTH * 4;\r\n const sourceEnd = (source_dy + minimapLineHeight) * WIDTH * 4;\r\n const destStart = dest_dy * WIDTH * 4;\r\n const destEnd = (dest_dy + minimapLineHeight) * WIDTH * 4;\r\n if (copySourceEnd === sourceStart && copyDestEnd === destStart) {\r\n // contiguous zone => extend copy request\r\n copySourceEnd = sourceEnd;\r\n copyDestEnd = destEnd;\r\n }\r\n else {\r\n if (copySourceStart !== -1) {\r\n // flush existing copy request\r\n targetData.set(lastTargetData.subarray(copySourceStart, copySourceEnd), copyDestStart);\r\n if (dirtyPixel1 === -1 && copySourceStart === 0 && copySourceStart === copyDestStart) {\r\n dirtyPixel1 = copySourceEnd;\r\n }\r\n if (dirtyPixel2 === -1 && copySourceEnd === maxDestPixel && copySourceStart === copyDestStart) {\r\n dirtyPixel2 = copySourceStart;\r\n }\r\n }\r\n copySourceStart = sourceStart;\r\n copySourceEnd = sourceEnd;\r\n copyDestStart = destStart;\r\n copyDestEnd = destEnd;\r\n }\r\n needed[lineIndex] = false;\r\n dest_dy += minimapLineHeight;\r\n }\r\n if (copySourceStart !== -1) {\r\n // flush existing copy request\r\n targetData.set(lastTargetData.subarray(copySourceStart, copySourceEnd), copyDestStart);\r\n if (dirtyPixel1 === -1 && copySourceStart === 0 && copySourceStart === copyDestStart) {\r\n dirtyPixel1 = copySourceEnd;\r\n }\r\n if (dirtyPixel2 === -1 && copySourceEnd === maxDestPixel && copySourceStart === copyDestStart) {\r\n dirtyPixel2 = copySourceStart;\r\n }\r\n }\r\n const dirtyY1 = (dirtyPixel1 === -1 ? -1 : dirtyPixel1 / (WIDTH * 4));\r\n const dirtyY2 = (dirtyPixel2 === -1 ? -1 : dirtyPixel2 / (WIDTH * 4));\r\n return [dirtyY1, dirtyY2, needed];\r\n }\r\n static _renderLine(target, backgroundColor, useLighterFont, renderMinimap, charWidth, colorTracker, minimapCharRenderer, dy, innerLinePadding, tabSize, lineData, fontScale, minimapLineHeight) {\r\n const content = lineData.content;\r\n const tokens = lineData.tokens;\r\n const maxDx = target.width - charWidth;\r\n const force1pxHeight = (minimapLineHeight === 1);\r\n let dx = MINIMAP_GUTTER_WIDTH;\r\n let charIndex = 0;\r\n let tabsCharDelta = 0;\r\n for (let tokenIndex = 0, tokensLen = tokens.getCount(); tokenIndex < tokensLen; tokenIndex++) {\r\n const tokenEndIndex = tokens.getEndOffset(tokenIndex);\r\n const tokenColorId = tokens.getForeground(tokenIndex);\r\n const tokenColor = colorTracker.getColor(tokenColorId);\r\n for (; charIndex < tokenEndIndex; charIndex++) {\r\n if (dx > maxDx) {\r\n // hit edge of minimap\r\n return;\r\n }\r\n const charCode = content.charCodeAt(charIndex);\r\n if (charCode === 9 /* Tab */) {\r\n const insertSpacesCount = tabSize - (charIndex + tabsCharDelta) % tabSize;\r\n tabsCharDelta += insertSpacesCount - 1;\r\n // No need to render anything since tab is invisible\r\n dx += insertSpacesCount * charWidth;\r\n }\r\n else if (charCode === 32 /* Space */) {\r\n // No need to render anything since space is invisible\r\n dx += charWidth;\r\n }\r\n else {\r\n // Render twice for a full width character\r\n const count = strings.isFullWidthCharacter(charCode) ? 2 : 1;\r\n for (let i = 0; i < count; i++) {\r\n if (renderMinimap === 2 /* Blocks */) {\r\n minimapCharRenderer.blockRenderChar(target, dx, dy + innerLinePadding, tokenColor, backgroundColor, useLighterFont, force1pxHeight);\r\n }\r\n else { // RenderMinimap.Text\r\n minimapCharRenderer.renderChar(target, dx, dy + innerLinePadding, charCode, tokenColor, backgroundColor, fontScale, useLighterFont, force1pxHeight);\r\n }\r\n dx += charWidth;\r\n if (dx > maxDx) {\r\n // hit edge of minimap\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\nregisterThemingParticipant((theme, collector) => {\r\n const minimapBackgroundValue = theme.getColor(minimapBackground);\r\n if (minimapBackgroundValue) {\r\n collector.addRule(`.monaco-editor .minimap > canvas { opacity: ${minimapBackgroundValue.rgba.a}; will-change: opacity; }`);\r\n }\r\n const sliderBackground = theme.getColor(minimapSliderBackground);\r\n if (sliderBackground) {\r\n collector.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${sliderBackground}; }`);\r\n }\r\n const sliderHoverBackground = theme.getColor(minimapSliderHoverBackground);\r\n if (sliderHoverBackground) {\r\n collector.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${sliderHoverBackground}; }`);\r\n }\r\n const sliderActiveBackground = theme.getColor(minimapSliderActiveBackground);\r\n if (sliderActiveBackground) {\r\n collector.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${sliderActiveBackground}; }`);\r\n }\r\n const shadow = theme.getColor(scrollbarShadow);\r\n if (shadow) {\r\n collector.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${shadow} -6px 0 6px -6px inset; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './overlayWidgets.css';\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport { PartFingerprints, ViewPart } from '../../view/viewPart.js';\r\nexport class ViewOverlayWidgets extends ViewPart {\r\n constructor(context) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._widgets = {};\r\n this._verticalScrollbarWidth = layoutInfo.verticalScrollbarWidth;\r\n this._minimapWidth = layoutInfo.minimap.minimapWidth;\r\n this._horizontalScrollbarHeight = layoutInfo.horizontalScrollbarHeight;\r\n this._editorHeight = layoutInfo.height;\r\n this._editorWidth = layoutInfo.width;\r\n this._domNode = createFastDomNode(document.createElement('div'));\r\n PartFingerprints.write(this._domNode, 4 /* OverlayWidgets */);\r\n this._domNode.setClassName('overlayWidgets');\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._widgets = {};\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._verticalScrollbarWidth = layoutInfo.verticalScrollbarWidth;\r\n this._minimapWidth = layoutInfo.minimap.minimapWidth;\r\n this._horizontalScrollbarHeight = layoutInfo.horizontalScrollbarHeight;\r\n this._editorHeight = layoutInfo.height;\r\n this._editorWidth = layoutInfo.width;\r\n return true;\r\n }\r\n // ---- end view event handlers\r\n addWidget(widget) {\r\n const domNode = createFastDomNode(widget.getDomNode());\r\n this._widgets[widget.getId()] = {\r\n widget: widget,\r\n preference: null,\r\n domNode: domNode\r\n };\r\n // This is sync because a widget wants to be in the dom\r\n domNode.setPosition('absolute');\r\n domNode.setAttribute('widgetId', widget.getId());\r\n this._domNode.appendChild(domNode);\r\n this.setShouldRender();\r\n }\r\n setWidgetPosition(widget, preference) {\r\n const widgetData = this._widgets[widget.getId()];\r\n if (widgetData.preference === preference) {\r\n return false;\r\n }\r\n widgetData.preference = preference;\r\n this.setShouldRender();\r\n return true;\r\n }\r\n removeWidget(widget) {\r\n const widgetId = widget.getId();\r\n if (this._widgets.hasOwnProperty(widgetId)) {\r\n const widgetData = this._widgets[widgetId];\r\n const domNode = widgetData.domNode.domNode;\r\n delete this._widgets[widgetId];\r\n domNode.parentNode.removeChild(domNode);\r\n this.setShouldRender();\r\n }\r\n }\r\n _renderWidget(widgetData) {\r\n const domNode = widgetData.domNode;\r\n if (widgetData.preference === null) {\r\n domNode.unsetTop();\r\n return;\r\n }\r\n if (widgetData.preference === 0 /* TOP_RIGHT_CORNER */) {\r\n domNode.setTop(0);\r\n domNode.setRight((2 * this._verticalScrollbarWidth) + this._minimapWidth);\r\n }\r\n else if (widgetData.preference === 1 /* BOTTOM_RIGHT_CORNER */) {\r\n const widgetHeight = domNode.domNode.clientHeight;\r\n domNode.setTop((this._editorHeight - widgetHeight - 2 * this._horizontalScrollbarHeight));\r\n domNode.setRight((2 * this._verticalScrollbarWidth) + this._minimapWidth);\r\n }\r\n else if (widgetData.preference === 2 /* TOP_CENTER */) {\r\n domNode.setTop(0);\r\n domNode.domNode.style.right = '50%';\r\n }\r\n }\r\n prepareRender(ctx) {\r\n // Nothing to read\r\n }\r\n render(ctx) {\r\n this._domNode.setWidth(this._editorWidth);\r\n const keys = Object.keys(this._widgets);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const widgetId = keys[i];\r\n this._renderWidget(this._widgets[widgetId]);\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport { Color } from '../../../../base/common/color.js';\r\nimport { ViewPart } from '../../view/viewPart.js';\r\nimport { Position } from '../../../common/core/position.js';\r\nimport { TokenizationRegistry } from '../../../common/modes.js';\r\nimport { editorCursorForeground, editorOverviewRulerBorder, editorOverviewRulerBackground } from '../../../common/view/editorColorRegistry.js';\r\nclass Settings {\r\n constructor(config, theme) {\r\n const options = config.options;\r\n this.lineHeight = options.get(53 /* lineHeight */);\r\n this.pixelRatio = options.get(122 /* pixelRatio */);\r\n this.overviewRulerLanes = options.get(68 /* overviewRulerLanes */);\r\n this.renderBorder = options.get(67 /* overviewRulerBorder */);\r\n const borderColor = theme.getColor(editorOverviewRulerBorder);\r\n this.borderColor = borderColor ? borderColor.toString() : null;\r\n this.hideCursor = options.get(46 /* hideCursorInOverviewRuler */);\r\n const cursorColor = theme.getColor(editorCursorForeground);\r\n this.cursorColor = cursorColor ? cursorColor.transparent(0.7).toString() : null;\r\n this.themeType = theme.type;\r\n const minimapOpts = options.get(59 /* minimap */);\r\n const minimapEnabled = minimapOpts.enabled;\r\n const minimapSide = minimapOpts.side;\r\n const backgroundColor = minimapEnabled\r\n ? theme.getColor(editorOverviewRulerBackground) || TokenizationRegistry.getDefaultBackground()\r\n : null;\r\n if (backgroundColor === null || minimapSide === 'left') {\r\n this.backgroundColor = null;\r\n }\r\n else {\r\n this.backgroundColor = Color.Format.CSS.formatHex(backgroundColor);\r\n }\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const position = layoutInfo.overviewRuler;\r\n this.top = position.top;\r\n this.right = position.right;\r\n this.domWidth = position.width;\r\n this.domHeight = position.height;\r\n if (this.overviewRulerLanes === 0) {\r\n // overview ruler is off\r\n this.canvasWidth = 0;\r\n this.canvasHeight = 0;\r\n }\r\n else {\r\n this.canvasWidth = (this.domWidth * this.pixelRatio) | 0;\r\n this.canvasHeight = (this.domHeight * this.pixelRatio) | 0;\r\n }\r\n const [x, w] = this._initLanes(1, this.canvasWidth, this.overviewRulerLanes);\r\n this.x = x;\r\n this.w = w;\r\n }\r\n _initLanes(canvasLeftOffset, canvasWidth, laneCount) {\r\n const remainingWidth = canvasWidth - canvasLeftOffset;\r\n if (laneCount >= 3) {\r\n const leftWidth = Math.floor(remainingWidth / 3);\r\n const rightWidth = Math.floor(remainingWidth / 3);\r\n const centerWidth = remainingWidth - leftWidth - rightWidth;\r\n const leftOffset = canvasLeftOffset;\r\n const centerOffset = leftOffset + leftWidth;\r\n const rightOffset = leftOffset + leftWidth + centerWidth;\r\n return [\r\n [\r\n 0,\r\n leftOffset,\r\n centerOffset,\r\n leftOffset,\r\n rightOffset,\r\n leftOffset,\r\n centerOffset,\r\n leftOffset, // Left | Center | Right\r\n ], [\r\n 0,\r\n leftWidth,\r\n centerWidth,\r\n leftWidth + centerWidth,\r\n rightWidth,\r\n leftWidth + centerWidth + rightWidth,\r\n centerWidth + rightWidth,\r\n leftWidth + centerWidth + rightWidth, // Left | Center | Right\r\n ]\r\n ];\r\n }\r\n else if (laneCount === 2) {\r\n const leftWidth = Math.floor(remainingWidth / 2);\r\n const rightWidth = remainingWidth - leftWidth;\r\n const leftOffset = canvasLeftOffset;\r\n const rightOffset = leftOffset + leftWidth;\r\n return [\r\n [\r\n 0,\r\n leftOffset,\r\n leftOffset,\r\n leftOffset,\r\n rightOffset,\r\n leftOffset,\r\n leftOffset,\r\n leftOffset, // Left | Center | Right\r\n ], [\r\n 0,\r\n leftWidth,\r\n leftWidth,\r\n leftWidth,\r\n rightWidth,\r\n leftWidth + rightWidth,\r\n leftWidth + rightWidth,\r\n leftWidth + rightWidth, // Left | Center | Right\r\n ]\r\n ];\r\n }\r\n else {\r\n const offset = canvasLeftOffset;\r\n const width = remainingWidth;\r\n return [\r\n [\r\n 0,\r\n offset,\r\n offset,\r\n offset,\r\n offset,\r\n offset,\r\n offset,\r\n offset, // Left | Center | Right\r\n ], [\r\n 0,\r\n width,\r\n width,\r\n width,\r\n width,\r\n width,\r\n width,\r\n width, // Left | Center | Right\r\n ]\r\n ];\r\n }\r\n }\r\n equals(other) {\r\n return (this.lineHeight === other.lineHeight\r\n && this.pixelRatio === other.pixelRatio\r\n && this.overviewRulerLanes === other.overviewRulerLanes\r\n && this.renderBorder === other.renderBorder\r\n && this.borderColor === other.borderColor\r\n && this.hideCursor === other.hideCursor\r\n && this.cursorColor === other.cursorColor\r\n && this.themeType === other.themeType\r\n && this.backgroundColor === other.backgroundColor\r\n && this.top === other.top\r\n && this.right === other.right\r\n && this.domWidth === other.domWidth\r\n && this.domHeight === other.domHeight\r\n && this.canvasWidth === other.canvasWidth\r\n && this.canvasHeight === other.canvasHeight);\r\n }\r\n}\r\nexport class DecorationsOverviewRuler extends ViewPart {\r\n constructor(context) {\r\n super(context);\r\n this._domNode = createFastDomNode(document.createElement('canvas'));\r\n this._domNode.setClassName('decorationsOverviewRuler');\r\n this._domNode.setPosition('absolute');\r\n this._domNode.setLayerHinting(true);\r\n this._domNode.setContain('strict');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._updateSettings(false);\r\n this._tokensColorTrackerListener = TokenizationRegistry.onDidChange((e) => {\r\n if (e.changedColorMap) {\r\n this._updateSettings(true);\r\n }\r\n });\r\n this._cursorPositions = [];\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._tokensColorTrackerListener.dispose();\r\n }\r\n _updateSettings(renderNow) {\r\n const newSettings = new Settings(this._context.configuration, this._context.theme);\r\n if (this._settings && this._settings.equals(newSettings)) {\r\n // nothing to do\r\n return false;\r\n }\r\n this._settings = newSettings;\r\n this._domNode.setTop(this._settings.top);\r\n this._domNode.setRight(this._settings.right);\r\n this._domNode.setWidth(this._settings.domWidth);\r\n this._domNode.setHeight(this._settings.domHeight);\r\n this._domNode.domNode.width = this._settings.canvasWidth;\r\n this._domNode.domNode.height = this._settings.canvasHeight;\r\n if (renderNow) {\r\n this._render();\r\n }\r\n return true;\r\n }\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n return this._updateSettings(false);\r\n }\r\n onCursorStateChanged(e) {\r\n this._cursorPositions = [];\r\n for (let i = 0, len = e.selections.length; i < len; i++) {\r\n this._cursorPositions[i] = e.selections[i].getPosition();\r\n }\r\n this._cursorPositions.sort(Position.compare);\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n if (e.affectsOverviewRuler) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollHeightChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n onThemeChanged(e) {\r\n // invalidate color cache\r\n this._context.model.invalidateOverviewRulerColorCache();\r\n return this._updateSettings(false);\r\n }\r\n // ---- end view event handlers\r\n getDomNode() {\r\n return this._domNode.domNode;\r\n }\r\n prepareRender(ctx) {\r\n // Nothing to read\r\n }\r\n render(editorCtx) {\r\n this._render();\r\n }\r\n _render() {\r\n if (this._settings.overviewRulerLanes === 0) {\r\n // overview ruler is off\r\n this._domNode.setBackgroundColor(this._settings.backgroundColor ? this._settings.backgroundColor : '');\r\n return;\r\n }\r\n const canvasWidth = this._settings.canvasWidth;\r\n const canvasHeight = this._settings.canvasHeight;\r\n const lineHeight = this._settings.lineHeight;\r\n const viewLayout = this._context.viewLayout;\r\n const outerHeight = this._context.viewLayout.getScrollHeight();\r\n const heightRatio = canvasHeight / outerHeight;\r\n const decorations = this._context.model.getAllOverviewRulerDecorations(this._context.theme);\r\n const minDecorationHeight = (6 /* MIN_DECORATION_HEIGHT */ * this._settings.pixelRatio) | 0;\r\n const halfMinDecorationHeight = (minDecorationHeight / 2) | 0;\r\n const canvasCtx = this._domNode.domNode.getContext('2d');\r\n if (this._settings.backgroundColor === null) {\r\n canvasCtx.clearRect(0, 0, canvasWidth, canvasHeight);\r\n }\r\n else {\r\n canvasCtx.fillStyle = this._settings.backgroundColor;\r\n canvasCtx.fillRect(0, 0, canvasWidth, canvasHeight);\r\n }\r\n const x = this._settings.x;\r\n const w = this._settings.w;\r\n // Avoid flickering by always rendering the colors in the same order\r\n // colors that don't use transparency will be sorted last (they start with #)\r\n const colors = Object.keys(decorations);\r\n colors.sort();\r\n for (let cIndex = 0, cLen = colors.length; cIndex < cLen; cIndex++) {\r\n const color = colors[cIndex];\r\n const colorDecorations = decorations[color];\r\n canvasCtx.fillStyle = color;\r\n let prevLane = 0;\r\n let prevY1 = 0;\r\n let prevY2 = 0;\r\n for (let i = 0, len = colorDecorations.length; i < len; i++) {\r\n const lane = colorDecorations[3 * i];\r\n const startLineNumber = colorDecorations[3 * i + 1];\r\n const endLineNumber = colorDecorations[3 * i + 2];\r\n let y1 = (viewLayout.getVerticalOffsetForLineNumber(startLineNumber) * heightRatio) | 0;\r\n let y2 = ((viewLayout.getVerticalOffsetForLineNumber(endLineNumber) + lineHeight) * heightRatio) | 0;\r\n const height = y2 - y1;\r\n if (height < minDecorationHeight) {\r\n let yCenter = ((y1 + y2) / 2) | 0;\r\n if (yCenter < halfMinDecorationHeight) {\r\n yCenter = halfMinDecorationHeight;\r\n }\r\n else if (yCenter + halfMinDecorationHeight > canvasHeight) {\r\n yCenter = canvasHeight - halfMinDecorationHeight;\r\n }\r\n y1 = yCenter - halfMinDecorationHeight;\r\n y2 = yCenter + halfMinDecorationHeight;\r\n }\r\n if (y1 > prevY2 + 1 || lane !== prevLane) {\r\n // flush prev\r\n if (i !== 0) {\r\n canvasCtx.fillRect(x[prevLane], prevY1, w[prevLane], prevY2 - prevY1);\r\n }\r\n prevLane = lane;\r\n prevY1 = y1;\r\n prevY2 = y2;\r\n }\r\n else {\r\n // merge into prev\r\n if (y2 > prevY2) {\r\n prevY2 = y2;\r\n }\r\n }\r\n }\r\n canvasCtx.fillRect(x[prevLane], prevY1, w[prevLane], prevY2 - prevY1);\r\n }\r\n // Draw cursors\r\n if (!this._settings.hideCursor && this._settings.cursorColor) {\r\n const cursorHeight = (2 * this._settings.pixelRatio) | 0;\r\n const halfCursorHeight = (cursorHeight / 2) | 0;\r\n const cursorX = this._settings.x[7 /* Full */];\r\n const cursorW = this._settings.w[7 /* Full */];\r\n canvasCtx.fillStyle = this._settings.cursorColor;\r\n let prevY1 = -100;\r\n let prevY2 = -100;\r\n for (let i = 0, len = this._cursorPositions.length; i < len; i++) {\r\n const cursor = this._cursorPositions[i];\r\n let yCenter = (viewLayout.getVerticalOffsetForLineNumber(cursor.lineNumber) * heightRatio) | 0;\r\n if (yCenter < halfCursorHeight) {\r\n yCenter = halfCursorHeight;\r\n }\r\n else if (yCenter + halfCursorHeight > canvasHeight) {\r\n yCenter = canvasHeight - halfCursorHeight;\r\n }\r\n const y1 = yCenter - halfCursorHeight;\r\n const y2 = y1 + cursorHeight;\r\n if (y1 > prevY2 + 1) {\r\n // flush prev\r\n if (i !== 0) {\r\n canvasCtx.fillRect(cursorX, prevY1, cursorW, prevY2 - prevY1);\r\n }\r\n prevY1 = y1;\r\n prevY2 = y2;\r\n }\r\n else {\r\n // merge into prev\r\n if (y2 > prevY2) {\r\n prevY2 = y2;\r\n }\r\n }\r\n }\r\n canvasCtx.fillRect(cursorX, prevY1, cursorW, prevY2 - prevY1);\r\n }\r\n if (this._settings.renderBorder && this._settings.borderColor && this._settings.overviewRulerLanes > 0) {\r\n canvasCtx.beginPath();\r\n canvasCtx.lineWidth = 1;\r\n canvasCtx.strokeStyle = this._settings.borderColor;\r\n canvasCtx.moveTo(0, 0);\r\n canvasCtx.lineTo(0, canvasHeight);\r\n canvasCtx.stroke();\r\n canvasCtx.moveTo(0, 0);\r\n canvasCtx.lineTo(canvasWidth, 0);\r\n canvasCtx.stroke();\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport { OverviewZoneManager } from '../../../common/view/overviewZoneManager.js';\r\nimport { ViewEventHandler } from '../../../common/viewModel/viewEventHandler.js';\r\nexport class OverviewRuler extends ViewEventHandler {\r\n constructor(context, cssClassName) {\r\n super();\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n this._domNode = createFastDomNode(document.createElement('canvas'));\r\n this._domNode.setClassName(cssClassName);\r\n this._domNode.setPosition('absolute');\r\n this._domNode.setLayerHinting(true);\r\n this._domNode.setContain('strict');\r\n this._zoneManager = new OverviewZoneManager((lineNumber) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber));\r\n this._zoneManager.setDOMWidth(0);\r\n this._zoneManager.setDOMHeight(0);\r\n this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight());\r\n this._zoneManager.setLineHeight(options.get(53 /* lineHeight */));\r\n this._zoneManager.setPixelRatio(options.get(122 /* pixelRatio */));\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n super.dispose();\r\n }\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n if (e.hasChanged(53 /* lineHeight */)) {\r\n this._zoneManager.setLineHeight(options.get(53 /* lineHeight */));\r\n this._render();\r\n }\r\n if (e.hasChanged(122 /* pixelRatio */)) {\r\n this._zoneManager.setPixelRatio(options.get(122 /* pixelRatio */));\r\n this._domNode.setWidth(this._zoneManager.getDOMWidth());\r\n this._domNode.setHeight(this._zoneManager.getDOMHeight());\r\n this._domNode.domNode.width = this._zoneManager.getCanvasWidth();\r\n this._domNode.domNode.height = this._zoneManager.getCanvasHeight();\r\n this._render();\r\n }\r\n return true;\r\n }\r\n onFlushed(e) {\r\n this._render();\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n if (e.scrollHeightChanged) {\r\n this._zoneManager.setOuterHeight(e.scrollHeight);\r\n this._render();\r\n }\r\n return true;\r\n }\r\n onZonesChanged(e) {\r\n this._render();\r\n return true;\r\n }\r\n // ---- end view event handlers\r\n getDomNode() {\r\n return this._domNode.domNode;\r\n }\r\n setLayout(position) {\r\n this._domNode.setTop(position.top);\r\n this._domNode.setRight(position.right);\r\n let hasChanged = false;\r\n hasChanged = this._zoneManager.setDOMWidth(position.width) || hasChanged;\r\n hasChanged = this._zoneManager.setDOMHeight(position.height) || hasChanged;\r\n if (hasChanged) {\r\n this._domNode.setWidth(this._zoneManager.getDOMWidth());\r\n this._domNode.setHeight(this._zoneManager.getDOMHeight());\r\n this._domNode.domNode.width = this._zoneManager.getCanvasWidth();\r\n this._domNode.domNode.height = this._zoneManager.getCanvasHeight();\r\n this._render();\r\n }\r\n }\r\n setZones(zones) {\r\n this._zoneManager.setZones(zones);\r\n this._render();\r\n }\r\n _render() {\r\n if (this._zoneManager.getOuterHeight() === 0) {\r\n return false;\r\n }\r\n const width = this._zoneManager.getCanvasWidth();\r\n const height = this._zoneManager.getCanvasHeight();\r\n const colorZones = this._zoneManager.resolveColorZones();\r\n const id2Color = this._zoneManager.getId2Color();\r\n const ctx = this._domNode.domNode.getContext('2d');\r\n ctx.clearRect(0, 0, width, height);\r\n if (colorZones.length > 0) {\r\n this._renderOneLane(ctx, colorZones, id2Color, width);\r\n }\r\n return true;\r\n }\r\n _renderOneLane(ctx, colorZones, id2Color, width) {\r\n let currentColorId = 0;\r\n let currentFrom = 0;\r\n let currentTo = 0;\r\n for (const zone of colorZones) {\r\n const zoneColorId = zone.colorId;\r\n const zoneFrom = zone.from;\r\n const zoneTo = zone.to;\r\n if (zoneColorId !== currentColorId) {\r\n ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);\r\n currentColorId = zoneColorId;\r\n ctx.fillStyle = id2Color[currentColorId];\r\n currentFrom = zoneFrom;\r\n currentTo = zoneTo;\r\n }\r\n else {\r\n if (currentTo >= zoneFrom) {\r\n currentTo = Math.max(currentTo, zoneTo);\r\n }\r\n else {\r\n ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);\r\n currentFrom = zoneFrom;\r\n currentTo = zoneTo;\r\n }\r\n }\r\n }\r\n ctx.fillRect(0, currentFrom, width, currentTo - currentFrom);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './rulers.css';\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport { ViewPart } from '../../view/viewPart.js';\r\nimport { editorRuler } from '../../../common/view/editorColorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\r\nexport class Rulers extends ViewPart {\r\n constructor(context) {\r\n super(context);\r\n this.domNode = createFastDomNode(document.createElement('div'));\r\n this.domNode.setAttribute('role', 'presentation');\r\n this.domNode.setAttribute('aria-hidden', 'true');\r\n this.domNode.setClassName('view-rulers');\r\n this._renderedRulers = [];\r\n const options = this._context.configuration.options;\r\n this._rulers = options.get(86 /* rulers */);\r\n this._typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n this._rulers = options.get(86 /* rulers */);\r\n this._typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollHeightChanged;\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n // Nothing to read\r\n }\r\n _ensureRulersCount() {\r\n const currentCount = this._renderedRulers.length;\r\n const desiredCount = this._rulers.length;\r\n if (currentCount === desiredCount) {\r\n // Nothing to do\r\n return;\r\n }\r\n if (currentCount < desiredCount) {\r\n const { tabSize } = this._context.model.getTextModelOptions();\r\n const rulerWidth = tabSize;\r\n let addCount = desiredCount - currentCount;\r\n while (addCount > 0) {\r\n const node = createFastDomNode(document.createElement('div'));\r\n node.setClassName('view-ruler');\r\n node.setWidth(rulerWidth);\r\n this.domNode.appendChild(node);\r\n this._renderedRulers.push(node);\r\n addCount--;\r\n }\r\n return;\r\n }\r\n let removeCount = currentCount - desiredCount;\r\n while (removeCount > 0) {\r\n const node = this._renderedRulers.pop();\r\n this.domNode.removeChild(node);\r\n removeCount--;\r\n }\r\n }\r\n render(ctx) {\r\n this._ensureRulersCount();\r\n for (let i = 0, len = this._rulers.length; i < len; i++) {\r\n const node = this._renderedRulers[i];\r\n const ruler = this._rulers[i];\r\n node.setBoxShadow(ruler.color ? `1px 0 0 0 ${ruler.color} inset` : ``);\r\n node.setHeight(Math.min(ctx.scrollHeight, 1000000));\r\n node.setLeft(ruler.column * this._typicalHalfwidthCharacterWidth);\r\n }\r\n }\r\n}\r\nregisterThemingParticipant((theme, collector) => {\r\n const rulerColor = theme.getColor(editorRuler);\r\n if (rulerColor) {\r\n collector.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${rulerColor} inset; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './scrollDecoration.css';\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport { ViewPart } from '../../view/viewPart.js';\r\nimport { scrollbarShadow } from '../../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\r\nexport class ScrollDecorationViewPart extends ViewPart {\r\n constructor(context) {\r\n super(context);\r\n this._scrollTop = 0;\r\n this._width = 0;\r\n this._updateWidth();\r\n this._shouldShow = false;\r\n const options = this._context.configuration.options;\r\n const scrollbar = options.get(87 /* scrollbar */);\r\n this._useShadows = scrollbar.useShadows;\r\n this._domNode = createFastDomNode(document.createElement('div'));\r\n this._domNode.setAttribute('role', 'presentation');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n _updateShouldShow() {\r\n const newShouldShow = (this._useShadows && this._scrollTop > 0);\r\n if (this._shouldShow !== newShouldShow) {\r\n this._shouldShow = newShouldShow;\r\n return true;\r\n }\r\n return false;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n _updateWidth() {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n if (layoutInfo.minimap.renderMinimap === 0 || (layoutInfo.minimap.minimapWidth > 0 && layoutInfo.minimap.minimapLeft === 0)) {\r\n this._width = layoutInfo.width;\r\n }\r\n else {\r\n this._width = layoutInfo.width - layoutInfo.minimap.minimapWidth - layoutInfo.verticalScrollbarWidth;\r\n }\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const scrollbar = options.get(87 /* scrollbar */);\r\n this._useShadows = scrollbar.useShadows;\r\n this._updateWidth();\r\n this._updateShouldShow();\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n this._scrollTop = e.scrollTop;\r\n return this._updateShouldShow();\r\n }\r\n // --- end event handlers\r\n prepareRender(ctx) {\r\n // Nothing to read\r\n }\r\n render(ctx) {\r\n this._domNode.setWidth(this._width);\r\n this._domNode.setClassName(this._shouldShow ? 'scroll-decoration' : '');\r\n }\r\n}\r\nregisterThemingParticipant((theme, collector) => {\r\n const shadow = theme.getColor(scrollbarShadow);\r\n if (shadow) {\r\n collector.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${shadow} 0 6px 6px -6px inset; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './selections.css';\r\nimport * as browser from '../../../../base/browser/browser.js';\r\nimport { DynamicViewOverlay } from '../../view/dynamicViewOverlay.js';\r\nimport { editorInactiveSelection, editorSelectionBackground, editorSelectionForeground } from '../../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\r\nclass HorizontalRangeWithStyle {\r\n constructor(other) {\r\n this.left = other.left;\r\n this.width = other.width;\r\n this.startStyle = null;\r\n this.endStyle = null;\r\n }\r\n}\r\nclass LineVisibleRangesWithStyle {\r\n constructor(lineNumber, ranges) {\r\n this.lineNumber = lineNumber;\r\n this.ranges = ranges;\r\n }\r\n}\r\nfunction toStyledRange(item) {\r\n return new HorizontalRangeWithStyle(item);\r\n}\r\nfunction toStyled(item) {\r\n return new LineVisibleRangesWithStyle(item.lineNumber, item.ranges.map(toStyledRange));\r\n}\r\n// TODO@Alex: Remove this once IE11 fixes Bug #524217\r\n// The problem in IE11 is that it does some sort of auto-zooming to accomodate for displays with different pixel density.\r\n// Unfortunately, this auto-zooming is buggy around dealing with rounded borders\r\nconst isIEWithZoomingIssuesNearRoundedBorders = browser.isEdgeLegacy;\r\nexport class SelectionsOverlay extends DynamicViewOverlay {\r\n constructor(context) {\r\n super();\r\n this._previousFrameVisibleRangesWithStyle = [];\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._roundedSelection = options.get(85 /* roundedSelection */);\r\n this._typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n this._selections = [];\r\n this._renderResult = null;\r\n this._context.addEventHandler(this);\r\n }\r\n dispose() {\r\n this._context.removeEventHandler(this);\r\n this._renderResult = null;\r\n super.dispose();\r\n }\r\n // --- begin event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._roundedSelection = options.get(85 /* roundedSelection */);\r\n this._typicalHalfwidthCharacterWidth = options.get(38 /* fontInfo */).typicalHalfwidthCharacterWidth;\r\n return true;\r\n }\r\n onCursorStateChanged(e) {\r\n this._selections = e.selections.slice(0);\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n // true for inline decorations that can end up relayouting text\r\n return true; //e.inlineDecorationsChanged;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n _visibleRangesHaveGaps(linesVisibleRanges) {\r\n for (let i = 0, len = linesVisibleRanges.length; i < len; i++) {\r\n const lineVisibleRanges = linesVisibleRanges[i];\r\n if (lineVisibleRanges.ranges.length > 1) {\r\n // There are two ranges on the same line\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n _enrichVisibleRangesWithStyle(viewport, linesVisibleRanges, previousFrame) {\r\n const epsilon = this._typicalHalfwidthCharacterWidth / 4;\r\n let previousFrameTop = null;\r\n let previousFrameBottom = null;\r\n if (previousFrame && previousFrame.length > 0 && linesVisibleRanges.length > 0) {\r\n const topLineNumber = linesVisibleRanges[0].lineNumber;\r\n if (topLineNumber === viewport.startLineNumber) {\r\n for (let i = 0; !previousFrameTop && i < previousFrame.length; i++) {\r\n if (previousFrame[i].lineNumber === topLineNumber) {\r\n previousFrameTop = previousFrame[i].ranges[0];\r\n }\r\n }\r\n }\r\n const bottomLineNumber = linesVisibleRanges[linesVisibleRanges.length - 1].lineNumber;\r\n if (bottomLineNumber === viewport.endLineNumber) {\r\n for (let i = previousFrame.length - 1; !previousFrameBottom && i >= 0; i--) {\r\n if (previousFrame[i].lineNumber === bottomLineNumber) {\r\n previousFrameBottom = previousFrame[i].ranges[0];\r\n }\r\n }\r\n }\r\n if (previousFrameTop && !previousFrameTop.startStyle) {\r\n previousFrameTop = null;\r\n }\r\n if (previousFrameBottom && !previousFrameBottom.startStyle) {\r\n previousFrameBottom = null;\r\n }\r\n }\r\n for (let i = 0, len = linesVisibleRanges.length; i < len; i++) {\r\n // We know for a fact that there is precisely one range on each line\r\n const curLineRange = linesVisibleRanges[i].ranges[0];\r\n const curLeft = curLineRange.left;\r\n const curRight = curLineRange.left + curLineRange.width;\r\n const startStyle = {\r\n top: 0 /* EXTERN */,\r\n bottom: 0 /* EXTERN */\r\n };\r\n const endStyle = {\r\n top: 0 /* EXTERN */,\r\n bottom: 0 /* EXTERN */\r\n };\r\n if (i > 0) {\r\n // Look above\r\n const prevLeft = linesVisibleRanges[i - 1].ranges[0].left;\r\n const prevRight = linesVisibleRanges[i - 1].ranges[0].left + linesVisibleRanges[i - 1].ranges[0].width;\r\n if (abs(curLeft - prevLeft) < epsilon) {\r\n startStyle.top = 2 /* FLAT */;\r\n }\r\n else if (curLeft > prevLeft) {\r\n startStyle.top = 1 /* INTERN */;\r\n }\r\n if (abs(curRight - prevRight) < epsilon) {\r\n endStyle.top = 2 /* FLAT */;\r\n }\r\n else if (prevLeft < curRight && curRight < prevRight) {\r\n endStyle.top = 1 /* INTERN */;\r\n }\r\n }\r\n else if (previousFrameTop) {\r\n // Accept some hiccups near the viewport edges to save on repaints\r\n startStyle.top = previousFrameTop.startStyle.top;\r\n endStyle.top = previousFrameTop.endStyle.top;\r\n }\r\n if (i + 1 < len) {\r\n // Look below\r\n const nextLeft = linesVisibleRanges[i + 1].ranges[0].left;\r\n const nextRight = linesVisibleRanges[i + 1].ranges[0].left + linesVisibleRanges[i + 1].ranges[0].width;\r\n if (abs(curLeft - nextLeft) < epsilon) {\r\n startStyle.bottom = 2 /* FLAT */;\r\n }\r\n else if (nextLeft < curLeft && curLeft < nextRight) {\r\n startStyle.bottom = 1 /* INTERN */;\r\n }\r\n if (abs(curRight - nextRight) < epsilon) {\r\n endStyle.bottom = 2 /* FLAT */;\r\n }\r\n else if (curRight < nextRight) {\r\n endStyle.bottom = 1 /* INTERN */;\r\n }\r\n }\r\n else if (previousFrameBottom) {\r\n // Accept some hiccups near the viewport edges to save on repaints\r\n startStyle.bottom = previousFrameBottom.startStyle.bottom;\r\n endStyle.bottom = previousFrameBottom.endStyle.bottom;\r\n }\r\n curLineRange.startStyle = startStyle;\r\n curLineRange.endStyle = endStyle;\r\n }\r\n }\r\n _getVisibleRangesWithStyle(selection, ctx, previousFrame) {\r\n const _linesVisibleRanges = ctx.linesVisibleRangesForRange(selection, true) || [];\r\n const linesVisibleRanges = _linesVisibleRanges.map(toStyled);\r\n const visibleRangesHaveGaps = this._visibleRangesHaveGaps(linesVisibleRanges);\r\n if (!isIEWithZoomingIssuesNearRoundedBorders && !visibleRangesHaveGaps && this._roundedSelection) {\r\n this._enrichVisibleRangesWithStyle(ctx.visibleRange, linesVisibleRanges, previousFrame);\r\n }\r\n // The visible ranges are sorted TOP-BOTTOM and LEFT-RIGHT\r\n return linesVisibleRanges;\r\n }\r\n _createSelectionPiece(top, height, className, left, width) {\r\n return ('
    ');\r\n }\r\n _actualRenderOneSelection(output2, visibleStartLineNumber, hasMultipleSelections, visibleRanges) {\r\n if (visibleRanges.length === 0) {\r\n return;\r\n }\r\n const visibleRangesHaveStyle = !!visibleRanges[0].ranges[0].startStyle;\r\n const fullLineHeight = (this._lineHeight).toString();\r\n const reducedLineHeight = (this._lineHeight - 1).toString();\r\n const firstLineNumber = visibleRanges[0].lineNumber;\r\n const lastLineNumber = visibleRanges[visibleRanges.length - 1].lineNumber;\r\n for (let i = 0, len = visibleRanges.length; i < len; i++) {\r\n const lineVisibleRanges = visibleRanges[i];\r\n const lineNumber = lineVisibleRanges.lineNumber;\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n const lineHeight = hasMultipleSelections ? (lineNumber === lastLineNumber || lineNumber === firstLineNumber ? reducedLineHeight : fullLineHeight) : fullLineHeight;\r\n const top = hasMultipleSelections ? (lineNumber === firstLineNumber ? 1 : 0) : 0;\r\n let innerCornerOutput = '';\r\n let restOfSelectionOutput = '';\r\n for (let j = 0, lenJ = lineVisibleRanges.ranges.length; j < lenJ; j++) {\r\n const visibleRange = lineVisibleRanges.ranges[j];\r\n if (visibleRangesHaveStyle) {\r\n const startStyle = visibleRange.startStyle;\r\n const endStyle = visibleRange.endStyle;\r\n if (startStyle.top === 1 /* INTERN */ || startStyle.bottom === 1 /* INTERN */) {\r\n // Reverse rounded corner to the left\r\n // First comes the selection (blue layer)\r\n innerCornerOutput += this._createSelectionPiece(top, lineHeight, SelectionsOverlay.SELECTION_CLASS_NAME, visibleRange.left - SelectionsOverlay.ROUNDED_PIECE_WIDTH, SelectionsOverlay.ROUNDED_PIECE_WIDTH);\r\n // Second comes the background (white layer) with inverse border radius\r\n let className = SelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME;\r\n if (startStyle.top === 1 /* INTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_TOP_RIGHT;\r\n }\r\n if (startStyle.bottom === 1 /* INTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_RIGHT;\r\n }\r\n innerCornerOutput += this._createSelectionPiece(top, lineHeight, className, visibleRange.left - SelectionsOverlay.ROUNDED_PIECE_WIDTH, SelectionsOverlay.ROUNDED_PIECE_WIDTH);\r\n }\r\n if (endStyle.top === 1 /* INTERN */ || endStyle.bottom === 1 /* INTERN */) {\r\n // Reverse rounded corner to the right\r\n // First comes the selection (blue layer)\r\n innerCornerOutput += this._createSelectionPiece(top, lineHeight, SelectionsOverlay.SELECTION_CLASS_NAME, visibleRange.left + visibleRange.width, SelectionsOverlay.ROUNDED_PIECE_WIDTH);\r\n // Second comes the background (white layer) with inverse border radius\r\n let className = SelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME;\r\n if (endStyle.top === 1 /* INTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_TOP_LEFT;\r\n }\r\n if (endStyle.bottom === 1 /* INTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_LEFT;\r\n }\r\n innerCornerOutput += this._createSelectionPiece(top, lineHeight, className, visibleRange.left + visibleRange.width, SelectionsOverlay.ROUNDED_PIECE_WIDTH);\r\n }\r\n }\r\n let className = SelectionsOverlay.SELECTION_CLASS_NAME;\r\n if (visibleRangesHaveStyle) {\r\n const startStyle = visibleRange.startStyle;\r\n const endStyle = visibleRange.endStyle;\r\n if (startStyle.top === 0 /* EXTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_TOP_LEFT;\r\n }\r\n if (startStyle.bottom === 0 /* EXTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_LEFT;\r\n }\r\n if (endStyle.top === 0 /* EXTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_TOP_RIGHT;\r\n }\r\n if (endStyle.bottom === 0 /* EXTERN */) {\r\n className += ' ' + SelectionsOverlay.SELECTION_BOTTOM_RIGHT;\r\n }\r\n }\r\n restOfSelectionOutput += this._createSelectionPiece(top, lineHeight, className, visibleRange.left, visibleRange.width);\r\n }\r\n output2[lineIndex][0] += innerCornerOutput;\r\n output2[lineIndex][1] += restOfSelectionOutput;\r\n }\r\n }\r\n prepareRender(ctx) {\r\n // Build HTML for inner corners separate from HTML for the rest of selections,\r\n // as the inner corner HTML can interfere with that of other selections.\r\n // In final render, make sure to place the inner corner HTML before the rest of selection HTML. See issue #77777.\r\n const output = [];\r\n const visibleStartLineNumber = ctx.visibleRange.startLineNumber;\r\n const visibleEndLineNumber = ctx.visibleRange.endLineNumber;\r\n for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - visibleStartLineNumber;\r\n output[lineIndex] = ['', ''];\r\n }\r\n const thisFrameVisibleRangesWithStyle = [];\r\n for (let i = 0, len = this._selections.length; i < len; i++) {\r\n const selection = this._selections[i];\r\n if (selection.isEmpty()) {\r\n thisFrameVisibleRangesWithStyle[i] = null;\r\n continue;\r\n }\r\n const visibleRangesWithStyle = this._getVisibleRangesWithStyle(selection, ctx, this._previousFrameVisibleRangesWithStyle[i]);\r\n thisFrameVisibleRangesWithStyle[i] = visibleRangesWithStyle;\r\n this._actualRenderOneSelection(output, visibleStartLineNumber, this._selections.length > 1, visibleRangesWithStyle);\r\n }\r\n this._previousFrameVisibleRangesWithStyle = thisFrameVisibleRangesWithStyle;\r\n this._renderResult = output.map(([internalCorners, restOfSelection]) => internalCorners + restOfSelection);\r\n }\r\n render(startLineNumber, lineNumber) {\r\n if (!this._renderResult) {\r\n return '';\r\n }\r\n const lineIndex = lineNumber - startLineNumber;\r\n if (lineIndex < 0 || lineIndex >= this._renderResult.length) {\r\n return '';\r\n }\r\n return this._renderResult[lineIndex];\r\n }\r\n}\r\nSelectionsOverlay.SELECTION_CLASS_NAME = 'selected-text';\r\nSelectionsOverlay.SELECTION_TOP_LEFT = 'top-left-radius';\r\nSelectionsOverlay.SELECTION_BOTTOM_LEFT = 'bottom-left-radius';\r\nSelectionsOverlay.SELECTION_TOP_RIGHT = 'top-right-radius';\r\nSelectionsOverlay.SELECTION_BOTTOM_RIGHT = 'bottom-right-radius';\r\nSelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME = 'monaco-editor-background';\r\nSelectionsOverlay.ROUNDED_PIECE_WIDTH = 10;\r\nregisterThemingParticipant((theme, collector) => {\r\n const editorSelectionColor = theme.getColor(editorSelectionBackground);\r\n if (editorSelectionColor) {\r\n collector.addRule(`.monaco-editor .focused .selected-text { background-color: ${editorSelectionColor}; }`);\r\n }\r\n const editorInactiveSelectionColor = theme.getColor(editorInactiveSelection);\r\n if (editorInactiveSelectionColor) {\r\n collector.addRule(`.monaco-editor .selected-text { background-color: ${editorInactiveSelectionColor}; }`);\r\n }\r\n const editorSelectionForegroundColor = theme.getColor(editorSelectionForeground);\r\n if (editorSelectionForegroundColor && !editorSelectionForegroundColor.isTransparent()) {\r\n collector.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${editorSelectionForegroundColor}; }`);\r\n }\r\n});\r\nfunction abs(n) {\r\n return n < 0 ? -n : n;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as dom from '../../../../base/browser/dom.js';\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport * as strings from '../../../../base/common/strings.js';\r\nimport { Configuration } from '../../config/configuration.js';\r\nimport { TextEditorCursorStyle } from '../../../common/config/editorOptions.js';\r\nimport { Position } from '../../../common/core/position.js';\r\nimport { Range } from '../../../common/core/range.js';\r\nimport { MOUSE_CURSOR_TEXT_CSS_CLASS_NAME } from '../../../../base/browser/ui/mouseCursor/mouseCursor.js';\r\nclass ViewCursorRenderData {\r\n constructor(top, left, width, height, textContent, textContentClassName) {\r\n this.top = top;\r\n this.left = left;\r\n this.width = width;\r\n this.height = height;\r\n this.textContent = textContent;\r\n this.textContentClassName = textContentClassName;\r\n }\r\n}\r\nexport class ViewCursor {\r\n constructor(context) {\r\n this._context = context;\r\n const options = this._context.configuration.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n this._cursorStyle = options.get(21 /* cursorStyle */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\r\n this._lineCursorWidth = Math.min(options.get(24 /* cursorWidth */), this._typicalHalfwidthCharacterWidth);\r\n this._isVisible = true;\r\n // Create the dom node\r\n this._domNode = createFastDomNode(document.createElement('div'));\r\n this._domNode.setClassName(`cursor ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);\r\n this._domNode.setHeight(this._lineHeight);\r\n this._domNode.setTop(0);\r\n this._domNode.setLeft(0);\r\n Configuration.applyFontInfo(this._domNode, fontInfo);\r\n this._domNode.setDisplay('none');\r\n this._position = new Position(1, 1);\r\n this._lastRenderedContent = '';\r\n this._renderData = null;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return this._position;\r\n }\r\n show() {\r\n if (!this._isVisible) {\r\n this._domNode.setVisibility('inherit');\r\n this._isVisible = true;\r\n }\r\n }\r\n hide() {\r\n if (this._isVisible) {\r\n this._domNode.setVisibility('hidden');\r\n this._isVisible = false;\r\n }\r\n }\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n this._cursorStyle = options.get(21 /* cursorStyle */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\r\n this._lineCursorWidth = Math.min(options.get(24 /* cursorWidth */), this._typicalHalfwidthCharacterWidth);\r\n Configuration.applyFontInfo(this._domNode, fontInfo);\r\n return true;\r\n }\r\n onCursorPositionChanged(position) {\r\n this._position = position;\r\n return true;\r\n }\r\n _prepareRender(ctx) {\r\n let textContent = '';\r\n if (this._cursorStyle === TextEditorCursorStyle.Line || this._cursorStyle === TextEditorCursorStyle.LineThin) {\r\n const visibleRange = ctx.visibleRangeForPosition(this._position);\r\n if (!visibleRange || visibleRange.outsideRenderedLine) {\r\n // Outside viewport\r\n return null;\r\n }\r\n let width;\r\n if (this._cursorStyle === TextEditorCursorStyle.Line) {\r\n width = dom.computeScreenAwareSize(this._lineCursorWidth > 0 ? this._lineCursorWidth : 2);\r\n if (width > 2) {\r\n const lineContent = this._context.model.getLineContent(this._position.lineNumber);\r\n const nextCharLength = strings.nextCharLength(lineContent, this._position.column - 1);\r\n textContent = lineContent.substr(this._position.column - 1, nextCharLength);\r\n }\r\n }\r\n else {\r\n width = dom.computeScreenAwareSize(1);\r\n }\r\n let left = visibleRange.left;\r\n if (width >= 2 && left >= 1) {\r\n // try to center cursor\r\n left -= 1;\r\n }\r\n const top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta;\r\n return new ViewCursorRenderData(top, left, width, this._lineHeight, textContent, '');\r\n }\r\n const lineContent = this._context.model.getLineContent(this._position.lineNumber);\r\n const nextCharLength = strings.nextCharLength(lineContent, this._position.column - 1);\r\n const visibleRangeForCharacter = ctx.linesVisibleRangesForRange(new Range(this._position.lineNumber, this._position.column, this._position.lineNumber, this._position.column + nextCharLength), false);\r\n if (!visibleRangeForCharacter || visibleRangeForCharacter.length === 0) {\r\n // Outside viewport\r\n return null;\r\n }\r\n const firstVisibleRangeForCharacter = visibleRangeForCharacter[0];\r\n if (firstVisibleRangeForCharacter.outsideRenderedLine || firstVisibleRangeForCharacter.ranges.length === 0) {\r\n // Outside viewport\r\n return null;\r\n }\r\n const range = firstVisibleRangeForCharacter.ranges[0];\r\n const width = range.width < 1 ? this._typicalHalfwidthCharacterWidth : range.width;\r\n let textContentClassName = '';\r\n if (this._cursorStyle === TextEditorCursorStyle.Block) {\r\n const lineData = this._context.model.getViewLineData(this._position.lineNumber);\r\n textContent = lineContent.substr(this._position.column - 1, nextCharLength);\r\n const tokenIndex = lineData.tokens.findTokenIndexAtOffset(this._position.column - 1);\r\n textContentClassName = lineData.tokens.getClassName(tokenIndex);\r\n }\r\n let top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta;\r\n let height = this._lineHeight;\r\n // Underline might interfere with clicking\r\n if (this._cursorStyle === TextEditorCursorStyle.Underline || this._cursorStyle === TextEditorCursorStyle.UnderlineThin) {\r\n top += this._lineHeight - 2;\r\n height = 2;\r\n }\r\n return new ViewCursorRenderData(top, range.left, width, height, textContent, textContentClassName);\r\n }\r\n prepareRender(ctx) {\r\n this._renderData = this._prepareRender(ctx);\r\n }\r\n render(ctx) {\r\n if (!this._renderData) {\r\n this._domNode.setDisplay('none');\r\n return null;\r\n }\r\n if (this._lastRenderedContent !== this._renderData.textContent) {\r\n this._lastRenderedContent = this._renderData.textContent;\r\n this._domNode.domNode.textContent = this._lastRenderedContent;\r\n }\r\n this._domNode.setClassName(`cursor ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ${this._renderData.textContentClassName}`);\r\n this._domNode.setDisplay('block');\r\n this._domNode.setTop(this._renderData.top);\r\n this._domNode.setLeft(this._renderData.left);\r\n this._domNode.setWidth(this._renderData.width);\r\n this._domNode.setLineHeight(this._renderData.height);\r\n this._domNode.setHeight(this._renderData.height);\r\n return {\r\n domNode: this._domNode.domNode,\r\n position: this._position,\r\n contentLeft: this._renderData.left,\r\n height: this._renderData.height,\r\n width: 2\r\n };\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './viewCursors.css';\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport { IntervalTimer, TimeoutTimer } from '../../../../base/common/async.js';\r\nimport { ViewPart } from '../../view/viewPart.js';\r\nimport { ViewCursor } from './viewCursor.js';\r\nimport { TextEditorCursorStyle } from '../../../common/config/editorOptions.js';\r\nimport { editorCursorBackground, editorCursorForeground } from '../../../common/view/editorColorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\r\nexport class ViewCursors extends ViewPart {\r\n constructor(context) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n this._readOnly = options.get(75 /* readOnly */);\r\n this._cursorBlinking = options.get(19 /* cursorBlinking */);\r\n this._cursorStyle = options.get(21 /* cursorStyle */);\r\n this._cursorSmoothCaretAnimation = options.get(20 /* cursorSmoothCaretAnimation */);\r\n this._selectionIsEmpty = true;\r\n this._isComposingInput = false;\r\n this._isVisible = false;\r\n this._primaryCursor = new ViewCursor(this._context);\r\n this._secondaryCursors = [];\r\n this._renderData = [];\r\n this._domNode = createFastDomNode(document.createElement('div'));\r\n this._domNode.setAttribute('role', 'presentation');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._updateDomClassName();\r\n this._domNode.appendChild(this._primaryCursor.getDomNode());\r\n this._startCursorBlinkAnimation = new TimeoutTimer();\r\n this._cursorFlatBlinkInterval = new IntervalTimer();\r\n this._blinkingEnabled = false;\r\n this._editorHasFocus = false;\r\n this._updateBlinking();\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._startCursorBlinkAnimation.dispose();\r\n this._cursorFlatBlinkInterval.dispose();\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n // --- begin event handlers\r\n onCompositionStart(e) {\r\n this._isComposingInput = true;\r\n this._updateBlinking();\r\n return true;\r\n }\r\n onCompositionEnd(e) {\r\n this._isComposingInput = false;\r\n this._updateBlinking();\r\n return true;\r\n }\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n this._readOnly = options.get(75 /* readOnly */);\r\n this._cursorBlinking = options.get(19 /* cursorBlinking */);\r\n this._cursorStyle = options.get(21 /* cursorStyle */);\r\n this._cursorSmoothCaretAnimation = options.get(20 /* cursorSmoothCaretAnimation */);\r\n this._updateBlinking();\r\n this._updateDomClassName();\r\n this._primaryCursor.onConfigurationChanged(e);\r\n for (let i = 0, len = this._secondaryCursors.length; i < len; i++) {\r\n this._secondaryCursors[i].onConfigurationChanged(e);\r\n }\r\n return true;\r\n }\r\n _onCursorPositionChanged(position, secondaryPositions) {\r\n this._primaryCursor.onCursorPositionChanged(position);\r\n this._updateBlinking();\r\n if (this._secondaryCursors.length < secondaryPositions.length) {\r\n // Create new cursors\r\n const addCnt = secondaryPositions.length - this._secondaryCursors.length;\r\n for (let i = 0; i < addCnt; i++) {\r\n const newCursor = new ViewCursor(this._context);\r\n this._domNode.domNode.insertBefore(newCursor.getDomNode().domNode, this._primaryCursor.getDomNode().domNode.nextSibling);\r\n this._secondaryCursors.push(newCursor);\r\n }\r\n }\r\n else if (this._secondaryCursors.length > secondaryPositions.length) {\r\n // Remove some cursors\r\n const removeCnt = this._secondaryCursors.length - secondaryPositions.length;\r\n for (let i = 0; i < removeCnt; i++) {\r\n this._domNode.removeChild(this._secondaryCursors[0].getDomNode());\r\n this._secondaryCursors.splice(0, 1);\r\n }\r\n }\r\n for (let i = 0; i < secondaryPositions.length; i++) {\r\n this._secondaryCursors[i].onCursorPositionChanged(secondaryPositions[i]);\r\n }\r\n }\r\n onCursorStateChanged(e) {\r\n const positions = [];\r\n for (let i = 0, len = e.selections.length; i < len; i++) {\r\n positions[i] = e.selections[i].getPosition();\r\n }\r\n this._onCursorPositionChanged(positions[0], positions.slice(1));\r\n const selectionIsEmpty = e.selections[0].isEmpty();\r\n if (this._selectionIsEmpty !== selectionIsEmpty) {\r\n this._selectionIsEmpty = selectionIsEmpty;\r\n this._updateDomClassName();\r\n }\r\n return true;\r\n }\r\n onDecorationsChanged(e) {\r\n // true for inline decorations that can end up relayouting text\r\n return true;\r\n }\r\n onFlushed(e) {\r\n return true;\r\n }\r\n onFocusChanged(e) {\r\n this._editorHasFocus = e.isFocused;\r\n this._updateBlinking();\r\n return false;\r\n }\r\n onLinesChanged(e) {\r\n return true;\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return true;\r\n }\r\n onTokensChanged(e) {\r\n const shouldRender = (position) => {\r\n for (let i = 0, len = e.ranges.length; i < len; i++) {\r\n if (e.ranges[i].fromLineNumber <= position.lineNumber && position.lineNumber <= e.ranges[i].toLineNumber) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n if (shouldRender(this._primaryCursor.getPosition())) {\r\n return true;\r\n }\r\n for (const secondaryCursor of this._secondaryCursors) {\r\n if (shouldRender(secondaryCursor.getPosition())) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n // --- end event handlers\r\n // ---- blinking logic\r\n _getCursorBlinking() {\r\n if (this._isComposingInput) {\r\n // avoid double cursors\r\n return 0 /* Hidden */;\r\n }\r\n if (!this._editorHasFocus) {\r\n return 0 /* Hidden */;\r\n }\r\n if (this._readOnly) {\r\n return 5 /* Solid */;\r\n }\r\n return this._cursorBlinking;\r\n }\r\n _updateBlinking() {\r\n this._startCursorBlinkAnimation.cancel();\r\n this._cursorFlatBlinkInterval.cancel();\r\n const blinkingStyle = this._getCursorBlinking();\r\n // hidden and solid are special as they involve no animations\r\n const isHidden = (blinkingStyle === 0 /* Hidden */);\r\n const isSolid = (blinkingStyle === 5 /* Solid */);\r\n if (isHidden) {\r\n this._hide();\r\n }\r\n else {\r\n this._show();\r\n }\r\n this._blinkingEnabled = false;\r\n this._updateDomClassName();\r\n if (!isHidden && !isSolid) {\r\n if (blinkingStyle === 1 /* Blink */) {\r\n // flat blinking is handled by JavaScript to save battery life due to Chromium step timing issue https://bugs.chromium.org/p/chromium/issues/detail?id=361587\r\n this._cursorFlatBlinkInterval.cancelAndSet(() => {\r\n if (this._isVisible) {\r\n this._hide();\r\n }\r\n else {\r\n this._show();\r\n }\r\n }, ViewCursors.BLINK_INTERVAL);\r\n }\r\n else {\r\n this._startCursorBlinkAnimation.setIfNotSet(() => {\r\n this._blinkingEnabled = true;\r\n this._updateDomClassName();\r\n }, ViewCursors.BLINK_INTERVAL);\r\n }\r\n }\r\n }\r\n // --- end blinking logic\r\n _updateDomClassName() {\r\n this._domNode.setClassName(this._getClassName());\r\n }\r\n _getClassName() {\r\n let result = 'cursors-layer';\r\n if (!this._selectionIsEmpty) {\r\n result += ' has-selection';\r\n }\r\n switch (this._cursorStyle) {\r\n case TextEditorCursorStyle.Line:\r\n result += ' cursor-line-style';\r\n break;\r\n case TextEditorCursorStyle.Block:\r\n result += ' cursor-block-style';\r\n break;\r\n case TextEditorCursorStyle.Underline:\r\n result += ' cursor-underline-style';\r\n break;\r\n case TextEditorCursorStyle.LineThin:\r\n result += ' cursor-line-thin-style';\r\n break;\r\n case TextEditorCursorStyle.BlockOutline:\r\n result += ' cursor-block-outline-style';\r\n break;\r\n case TextEditorCursorStyle.UnderlineThin:\r\n result += ' cursor-underline-thin-style';\r\n break;\r\n default:\r\n result += ' cursor-line-style';\r\n }\r\n if (this._blinkingEnabled) {\r\n switch (this._getCursorBlinking()) {\r\n case 1 /* Blink */:\r\n result += ' cursor-blink';\r\n break;\r\n case 2 /* Smooth */:\r\n result += ' cursor-smooth';\r\n break;\r\n case 3 /* Phase */:\r\n result += ' cursor-phase';\r\n break;\r\n case 4 /* Expand */:\r\n result += ' cursor-expand';\r\n break;\r\n case 5 /* Solid */:\r\n result += ' cursor-solid';\r\n break;\r\n default:\r\n result += ' cursor-solid';\r\n }\r\n }\r\n else {\r\n result += ' cursor-solid';\r\n }\r\n if (this._cursorSmoothCaretAnimation) {\r\n result += ' cursor-smooth-caret-animation';\r\n }\r\n return result;\r\n }\r\n _show() {\r\n this._primaryCursor.show();\r\n for (let i = 0, len = this._secondaryCursors.length; i < len; i++) {\r\n this._secondaryCursors[i].show();\r\n }\r\n this._isVisible = true;\r\n }\r\n _hide() {\r\n this._primaryCursor.hide();\r\n for (let i = 0, len = this._secondaryCursors.length; i < len; i++) {\r\n this._secondaryCursors[i].hide();\r\n }\r\n this._isVisible = false;\r\n }\r\n // ---- IViewPart implementation\r\n prepareRender(ctx) {\r\n this._primaryCursor.prepareRender(ctx);\r\n for (let i = 0, len = this._secondaryCursors.length; i < len; i++) {\r\n this._secondaryCursors[i].prepareRender(ctx);\r\n }\r\n }\r\n render(ctx) {\r\n let renderData = [], renderDataLen = 0;\r\n const primaryRenderData = this._primaryCursor.render(ctx);\r\n if (primaryRenderData) {\r\n renderData[renderDataLen++] = primaryRenderData;\r\n }\r\n for (let i = 0, len = this._secondaryCursors.length; i < len; i++) {\r\n const secondaryRenderData = this._secondaryCursors[i].render(ctx);\r\n if (secondaryRenderData) {\r\n renderData[renderDataLen++] = secondaryRenderData;\r\n }\r\n }\r\n this._renderData = renderData;\r\n }\r\n getLastRenderData() {\r\n return this._renderData;\r\n }\r\n}\r\nViewCursors.BLINK_INTERVAL = 500;\r\nregisterThemingParticipant((theme, collector) => {\r\n const caret = theme.getColor(editorCursorForeground);\r\n if (caret) {\r\n let caretBackground = theme.getColor(editorCursorBackground);\r\n if (!caretBackground) {\r\n caretBackground = caret.opposite();\r\n }\r\n collector.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${caret}; border-color: ${caret}; color: ${caretBackground}; }`);\r\n if (theme.type === 'hc') {\r\n collector.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${caretBackground}; border-right: 1px solid ${caretBackground}; }`);\r\n }\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\r\nimport { ViewPart } from '../../view/viewPart.js';\r\nimport { Position } from '../../../common/core/position.js';\r\nconst invalidFunc = () => { throw new Error(`Invalid change accessor`); };\r\nexport class ViewZones extends ViewPart {\r\n constructor(context) {\r\n super(context);\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._contentLeft = layoutInfo.contentLeft;\r\n this.domNode = createFastDomNode(document.createElement('div'));\r\n this.domNode.setClassName('view-zones');\r\n this.domNode.setPosition('absolute');\r\n this.domNode.setAttribute('role', 'presentation');\r\n this.domNode.setAttribute('aria-hidden', 'true');\r\n this.marginDomNode = createFastDomNode(document.createElement('div'));\r\n this.marginDomNode.setClassName('margin-view-zones');\r\n this.marginDomNode.setPosition('absolute');\r\n this.marginDomNode.setAttribute('role', 'presentation');\r\n this.marginDomNode.setAttribute('aria-hidden', 'true');\r\n this._zones = {};\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._zones = {};\r\n }\r\n // ---- begin view event handlers\r\n _recomputeWhitespacesProps() {\r\n const whitespaces = this._context.viewLayout.getWhitespaces();\r\n const oldWhitespaces = new Map();\r\n for (const whitespace of whitespaces) {\r\n oldWhitespaces.set(whitespace.id, whitespace);\r\n }\r\n let hadAChange = false;\r\n this._context.model.changeWhitespace((whitespaceAccessor) => {\r\n const keys = Object.keys(this._zones);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const id = keys[i];\r\n const zone = this._zones[id];\r\n const props = this._computeWhitespaceProps(zone.delegate);\r\n const oldWhitespace = oldWhitespaces.get(id);\r\n if (oldWhitespace && (oldWhitespace.afterLineNumber !== props.afterViewLineNumber || oldWhitespace.height !== props.heightInPx)) {\r\n whitespaceAccessor.changeOneWhitespace(id, props.afterViewLineNumber, props.heightInPx);\r\n this._safeCallOnComputedHeight(zone.delegate, props.heightInPx);\r\n hadAChange = true;\r\n }\r\n }\r\n });\r\n return hadAChange;\r\n }\r\n onConfigurationChanged(e) {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._lineHeight = options.get(53 /* lineHeight */);\r\n this._contentWidth = layoutInfo.contentWidth;\r\n this._contentLeft = layoutInfo.contentLeft;\r\n if (e.hasChanged(53 /* lineHeight */)) {\r\n this._recomputeWhitespacesProps();\r\n }\r\n return true;\r\n }\r\n onLineMappingChanged(e) {\r\n return this._recomputeWhitespacesProps();\r\n }\r\n onLinesDeleted(e) {\r\n return true;\r\n }\r\n onScrollChanged(e) {\r\n return e.scrollTopChanged || e.scrollWidthChanged;\r\n }\r\n onZonesChanged(e) {\r\n return true;\r\n }\r\n onLinesInserted(e) {\r\n return true;\r\n }\r\n // ---- end view event handlers\r\n _getZoneOrdinal(zone) {\r\n if (typeof zone.afterColumn !== 'undefined') {\r\n return zone.afterColumn;\r\n }\r\n return 10000;\r\n }\r\n _computeWhitespaceProps(zone) {\r\n if (zone.afterLineNumber === 0) {\r\n return {\r\n afterViewLineNumber: 0,\r\n heightInPx: this._heightInPixels(zone),\r\n minWidthInPx: this._minWidthInPixels(zone)\r\n };\r\n }\r\n let zoneAfterModelPosition;\r\n if (typeof zone.afterColumn !== 'undefined') {\r\n zoneAfterModelPosition = this._context.model.validateModelPosition({\r\n lineNumber: zone.afterLineNumber,\r\n column: zone.afterColumn\r\n });\r\n }\r\n else {\r\n const validAfterLineNumber = this._context.model.validateModelPosition({\r\n lineNumber: zone.afterLineNumber,\r\n column: 1\r\n }).lineNumber;\r\n zoneAfterModelPosition = new Position(validAfterLineNumber, this._context.model.getModelLineMaxColumn(validAfterLineNumber));\r\n }\r\n let zoneBeforeModelPosition;\r\n if (zoneAfterModelPosition.column === this._context.model.getModelLineMaxColumn(zoneAfterModelPosition.lineNumber)) {\r\n zoneBeforeModelPosition = this._context.model.validateModelPosition({\r\n lineNumber: zoneAfterModelPosition.lineNumber + 1,\r\n column: 1\r\n });\r\n }\r\n else {\r\n zoneBeforeModelPosition = this._context.model.validateModelPosition({\r\n lineNumber: zoneAfterModelPosition.lineNumber,\r\n column: zoneAfterModelPosition.column + 1\r\n });\r\n }\r\n const viewPosition = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(zoneAfterModelPosition);\r\n const isVisible = this._context.model.coordinatesConverter.modelPositionIsVisible(zoneBeforeModelPosition);\r\n return {\r\n afterViewLineNumber: viewPosition.lineNumber,\r\n heightInPx: (isVisible ? this._heightInPixels(zone) : 0),\r\n minWidthInPx: this._minWidthInPixels(zone)\r\n };\r\n }\r\n changeViewZones(callback) {\r\n let zonesHaveChanged = false;\r\n this._context.model.changeWhitespace((whitespaceAccessor) => {\r\n const changeAccessor = {\r\n addZone: (zone) => {\r\n zonesHaveChanged = true;\r\n return this._addZone(whitespaceAccessor, zone);\r\n },\r\n removeZone: (id) => {\r\n if (!id) {\r\n return;\r\n }\r\n zonesHaveChanged = this._removeZone(whitespaceAccessor, id) || zonesHaveChanged;\r\n },\r\n layoutZone: (id) => {\r\n if (!id) {\r\n return;\r\n }\r\n zonesHaveChanged = this._layoutZone(whitespaceAccessor, id) || zonesHaveChanged;\r\n }\r\n };\r\n safeInvoke1Arg(callback, changeAccessor);\r\n // Invalidate changeAccessor\r\n changeAccessor.addZone = invalidFunc;\r\n changeAccessor.removeZone = invalidFunc;\r\n changeAccessor.layoutZone = invalidFunc;\r\n });\r\n return zonesHaveChanged;\r\n }\r\n _addZone(whitespaceAccessor, zone) {\r\n const props = this._computeWhitespaceProps(zone);\r\n const whitespaceId = whitespaceAccessor.insertWhitespace(props.afterViewLineNumber, this._getZoneOrdinal(zone), props.heightInPx, props.minWidthInPx);\r\n const myZone = {\r\n whitespaceId: whitespaceId,\r\n delegate: zone,\r\n isVisible: false,\r\n domNode: createFastDomNode(zone.domNode),\r\n marginDomNode: zone.marginDomNode ? createFastDomNode(zone.marginDomNode) : null\r\n };\r\n this._safeCallOnComputedHeight(myZone.delegate, props.heightInPx);\r\n myZone.domNode.setPosition('absolute');\r\n myZone.domNode.domNode.style.width = '100%';\r\n myZone.domNode.setDisplay('none');\r\n myZone.domNode.setAttribute('monaco-view-zone', myZone.whitespaceId);\r\n this.domNode.appendChild(myZone.domNode);\r\n if (myZone.marginDomNode) {\r\n myZone.marginDomNode.setPosition('absolute');\r\n myZone.marginDomNode.domNode.style.width = '100%';\r\n myZone.marginDomNode.setDisplay('none');\r\n myZone.marginDomNode.setAttribute('monaco-view-zone', myZone.whitespaceId);\r\n this.marginDomNode.appendChild(myZone.marginDomNode);\r\n }\r\n this._zones[myZone.whitespaceId] = myZone;\r\n this.setShouldRender();\r\n return myZone.whitespaceId;\r\n }\r\n _removeZone(whitespaceAccessor, id) {\r\n if (this._zones.hasOwnProperty(id)) {\r\n const zone = this._zones[id];\r\n delete this._zones[id];\r\n whitespaceAccessor.removeWhitespace(zone.whitespaceId);\r\n zone.domNode.removeAttribute('monaco-visible-view-zone');\r\n zone.domNode.removeAttribute('monaco-view-zone');\r\n zone.domNode.domNode.parentNode.removeChild(zone.domNode.domNode);\r\n if (zone.marginDomNode) {\r\n zone.marginDomNode.removeAttribute('monaco-visible-view-zone');\r\n zone.marginDomNode.removeAttribute('monaco-view-zone');\r\n zone.marginDomNode.domNode.parentNode.removeChild(zone.marginDomNode.domNode);\r\n }\r\n this.setShouldRender();\r\n return true;\r\n }\r\n return false;\r\n }\r\n _layoutZone(whitespaceAccessor, id) {\r\n if (this._zones.hasOwnProperty(id)) {\r\n const zone = this._zones[id];\r\n const props = this._computeWhitespaceProps(zone.delegate);\r\n // const newOrdinal = this._getZoneOrdinal(zone.delegate);\r\n whitespaceAccessor.changeOneWhitespace(zone.whitespaceId, props.afterViewLineNumber, props.heightInPx);\r\n // TODO@Alex: change `newOrdinal` too\r\n this._safeCallOnComputedHeight(zone.delegate, props.heightInPx);\r\n this.setShouldRender();\r\n return true;\r\n }\r\n return false;\r\n }\r\n shouldSuppressMouseDownOnViewZone(id) {\r\n if (this._zones.hasOwnProperty(id)) {\r\n const zone = this._zones[id];\r\n return Boolean(zone.delegate.suppressMouseDown);\r\n }\r\n return false;\r\n }\r\n _heightInPixels(zone) {\r\n if (typeof zone.heightInPx === 'number') {\r\n return zone.heightInPx;\r\n }\r\n if (typeof zone.heightInLines === 'number') {\r\n return this._lineHeight * zone.heightInLines;\r\n }\r\n return this._lineHeight;\r\n }\r\n _minWidthInPixels(zone) {\r\n if (typeof zone.minWidthInPx === 'number') {\r\n return zone.minWidthInPx;\r\n }\r\n return 0;\r\n }\r\n _safeCallOnComputedHeight(zone, height) {\r\n if (typeof zone.onComputedHeight === 'function') {\r\n try {\r\n zone.onComputedHeight(height);\r\n }\r\n catch (e) {\r\n onUnexpectedError(e);\r\n }\r\n }\r\n }\r\n _safeCallOnDomNodeTop(zone, top) {\r\n if (typeof zone.onDomNodeTop === 'function') {\r\n try {\r\n zone.onDomNodeTop(top);\r\n }\r\n catch (e) {\r\n onUnexpectedError(e);\r\n }\r\n }\r\n }\r\n prepareRender(ctx) {\r\n // Nothing to read\r\n }\r\n render(ctx) {\r\n const visibleWhitespaces = ctx.viewportData.whitespaceViewportData;\r\n const visibleZones = {};\r\n let hasVisibleZone = false;\r\n for (let i = 0, len = visibleWhitespaces.length; i < len; i++) {\r\n visibleZones[visibleWhitespaces[i].id] = visibleWhitespaces[i];\r\n hasVisibleZone = true;\r\n }\r\n const keys = Object.keys(this._zones);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const id = keys[i];\r\n const zone = this._zones[id];\r\n let newTop = 0;\r\n let newHeight = 0;\r\n let newDisplay = 'none';\r\n if (visibleZones.hasOwnProperty(id)) {\r\n newTop = visibleZones[id].verticalOffset - ctx.bigNumbersDelta;\r\n newHeight = visibleZones[id].height;\r\n newDisplay = 'block';\r\n // zone is visible\r\n if (!zone.isVisible) {\r\n zone.domNode.setAttribute('monaco-visible-view-zone', 'true');\r\n zone.isVisible = true;\r\n }\r\n this._safeCallOnDomNodeTop(zone.delegate, ctx.getScrolledTopFromAbsoluteTop(visibleZones[id].verticalOffset));\r\n }\r\n else {\r\n if (zone.isVisible) {\r\n zone.domNode.removeAttribute('monaco-visible-view-zone');\r\n zone.isVisible = false;\r\n }\r\n this._safeCallOnDomNodeTop(zone.delegate, ctx.getScrolledTopFromAbsoluteTop(-1000000));\r\n }\r\n zone.domNode.setTop(newTop);\r\n zone.domNode.setHeight(newHeight);\r\n zone.domNode.setDisplay(newDisplay);\r\n if (zone.marginDomNode) {\r\n zone.marginDomNode.setTop(newTop);\r\n zone.marginDomNode.setHeight(newHeight);\r\n zone.marginDomNode.setDisplay(newDisplay);\r\n }\r\n }\r\n if (hasVisibleZone) {\r\n this.domNode.setWidth(Math.max(ctx.scrollWidth, this._contentWidth));\r\n this.marginDomNode.setWidth(this._contentLeft);\r\n }\r\n }\r\n}\r\nfunction safeInvoke1Arg(func, arg1) {\r\n try {\r\n return func(arg1);\r\n }\r\n catch (e) {\r\n onUnexpectedError(e);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport class EditorTheme {\r\n constructor(theme) {\r\n this._theme = theme;\r\n }\r\n get type() {\r\n return this._theme.type;\r\n }\r\n update(theme) {\r\n this._theme = theme;\r\n }\r\n getColor(color) {\r\n return this._theme.getColor(color);\r\n }\r\n}\r\nexport class ViewContext {\r\n constructor(configuration, theme, model) {\r\n this.configuration = configuration;\r\n this.theme = new EditorTheme(theme);\r\n this.model = model;\r\n this.viewLayout = model.viewLayout;\r\n }\r\n addEventHandler(eventHandler) {\r\n this.model.addViewEventHandler(eventHandler);\r\n }\r\n removeEventHandler(eventHandler) {\r\n this.model.removeViewEventHandler(eventHandler);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Range } from '../core/range.js';\r\n/**\r\n * Contains all data needed to render at a specific viewport.\r\n */\r\nexport class ViewportData {\r\n constructor(selections, partialData, whitespaceViewportData, model) {\r\n this.selections = selections;\r\n this.startLineNumber = partialData.startLineNumber | 0;\r\n this.endLineNumber = partialData.endLineNumber | 0;\r\n this.relativeVerticalOffset = partialData.relativeVerticalOffset;\r\n this.bigNumbersDelta = partialData.bigNumbersDelta | 0;\r\n this.whitespaceViewportData = whitespaceViewportData;\r\n this._model = model;\r\n this.visibleRange = new Range(partialData.startLineNumber, this._model.getLineMinColumn(partialData.startLineNumber), partialData.endLineNumber, this._model.getLineMaxColumn(partialData.endLineNumber));\r\n }\r\n getViewLineRenderingData(lineNumber) {\r\n return this._model.getViewLineRenderingData(this.visibleRange, lineNumber);\r\n }\r\n getDecorationsInViewport() {\r\n return this._model.getDecorationsInViewport(this.visibleRange);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport * as browser from '../../../base/browser/browser.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { createFastDomNode } from '../../../base/browser/fastDomNode.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { PointerHandler } from '../controller/pointerHandler.js';\r\nimport { TextAreaHandler } from '../controller/textAreaHandler.js';\r\nimport { ViewController } from './viewController.js';\r\nimport { ViewUserInputEvents } from './viewUserInputEvents.js';\r\nimport { ContentViewOverlays, MarginViewOverlays } from './viewOverlays.js';\r\nimport { PartFingerprints } from './viewPart.js';\r\nimport { ViewContentWidgets } from '../viewParts/contentWidgets/contentWidgets.js';\r\nimport { CurrentLineHighlightOverlay, CurrentLineMarginHighlightOverlay } from '../viewParts/currentLineHighlight/currentLineHighlight.js';\r\nimport { DecorationsOverlay } from '../viewParts/decorations/decorations.js';\r\nimport { EditorScrollbar } from '../viewParts/editorScrollbar/editorScrollbar.js';\r\nimport { GlyphMarginOverlay } from '../viewParts/glyphMargin/glyphMargin.js';\r\nimport { IndentGuidesOverlay } from '../viewParts/indentGuides/indentGuides.js';\r\nimport { LineNumbersOverlay } from '../viewParts/lineNumbers/lineNumbers.js';\r\nimport { ViewLines } from '../viewParts/lines/viewLines.js';\r\nimport { LinesDecorationsOverlay } from '../viewParts/linesDecorations/linesDecorations.js';\r\nimport { Margin } from '../viewParts/margin/margin.js';\r\nimport { MarginViewLineDecorationsOverlay } from '../viewParts/marginDecorations/marginDecorations.js';\r\nimport { Minimap } from '../viewParts/minimap/minimap.js';\r\nimport { ViewOverlayWidgets } from '../viewParts/overlayWidgets/overlayWidgets.js';\r\nimport { DecorationsOverviewRuler } from '../viewParts/overviewRuler/decorationsOverviewRuler.js';\r\nimport { OverviewRuler } from '../viewParts/overviewRuler/overviewRuler.js';\r\nimport { Rulers } from '../viewParts/rulers/rulers.js';\r\nimport { ScrollDecorationViewPart } from '../viewParts/scrollDecoration/scrollDecoration.js';\r\nimport { SelectionsOverlay } from '../viewParts/selections/selections.js';\r\nimport { ViewCursors } from '../viewParts/viewCursors/viewCursors.js';\r\nimport { ViewZones } from '../viewParts/viewZones/viewZones.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { RenderingContext } from '../../common/view/renderingContext.js';\r\nimport { ViewContext } from '../../common/view/viewContext.js';\r\nimport { ViewportData } from '../../common/viewLayout/viewLinesViewportData.js';\r\nimport { ViewEventHandler } from '../../common/viewModel/viewEventHandler.js';\r\nimport { getThemeTypeSelector } from '../../../platform/theme/common/themeService.js';\r\nimport { PointerHandlerLastRenderData } from '../controller/mouseTarget.js';\r\nexport class View extends ViewEventHandler {\r\n constructor(commandDelegate, configuration, themeService, model, userInputEvents, overflowWidgetsDomNode) {\r\n super();\r\n this._selections = [new Selection(1, 1, 1, 1)];\r\n this._renderAnimationFrame = null;\r\n const viewController = new ViewController(configuration, model, userInputEvents, commandDelegate);\r\n // The view context is passed on to most classes (basically to reduce param. counts in ctors)\r\n this._context = new ViewContext(configuration, themeService.getColorTheme(), model);\r\n this._configPixelRatio = this._configPixelRatio = this._context.configuration.options.get(122 /* pixelRatio */);\r\n // Ensure the view is the first event handler in order to update the layout\r\n this._context.addEventHandler(this);\r\n this._register(themeService.onDidColorThemeChange(theme => {\r\n this._context.theme.update(theme);\r\n this._context.model.onDidColorThemeChange();\r\n this.render(true, false);\r\n }));\r\n this._viewParts = [];\r\n // Keyboard handler\r\n this._textAreaHandler = new TextAreaHandler(this._context, viewController, this._createTextAreaHandlerHelper());\r\n this._viewParts.push(this._textAreaHandler);\r\n // These two dom nodes must be constructed up front, since references are needed in the layout provider (scrolling & co.)\r\n this._linesContent = createFastDomNode(document.createElement('div'));\r\n this._linesContent.setClassName('lines-content' + ' monaco-editor-background');\r\n this._linesContent.setPosition('absolute');\r\n this.domNode = createFastDomNode(document.createElement('div'));\r\n this.domNode.setClassName(this._getEditorClassName());\r\n // Set role 'code' for better screen reader support https://github.com/microsoft/vscode/issues/93438\r\n this.domNode.setAttribute('role', 'code');\r\n this._overflowGuardContainer = createFastDomNode(document.createElement('div'));\r\n PartFingerprints.write(this._overflowGuardContainer, 3 /* OverflowGuard */);\r\n this._overflowGuardContainer.setClassName('overflow-guard');\r\n this._scrollbar = new EditorScrollbar(this._context, this._linesContent, this.domNode, this._overflowGuardContainer);\r\n this._viewParts.push(this._scrollbar);\r\n // View Lines\r\n this._viewLines = new ViewLines(this._context, this._linesContent);\r\n // View Zones\r\n this._viewZones = new ViewZones(this._context);\r\n this._viewParts.push(this._viewZones);\r\n // Decorations overview ruler\r\n const decorationsOverviewRuler = new DecorationsOverviewRuler(this._context);\r\n this._viewParts.push(decorationsOverviewRuler);\r\n const scrollDecoration = new ScrollDecorationViewPart(this._context);\r\n this._viewParts.push(scrollDecoration);\r\n const contentViewOverlays = new ContentViewOverlays(this._context);\r\n this._viewParts.push(contentViewOverlays);\r\n contentViewOverlays.addDynamicOverlay(new CurrentLineHighlightOverlay(this._context));\r\n contentViewOverlays.addDynamicOverlay(new SelectionsOverlay(this._context));\r\n contentViewOverlays.addDynamicOverlay(new IndentGuidesOverlay(this._context));\r\n contentViewOverlays.addDynamicOverlay(new DecorationsOverlay(this._context));\r\n const marginViewOverlays = new MarginViewOverlays(this._context);\r\n this._viewParts.push(marginViewOverlays);\r\n marginViewOverlays.addDynamicOverlay(new CurrentLineMarginHighlightOverlay(this._context));\r\n marginViewOverlays.addDynamicOverlay(new GlyphMarginOverlay(this._context));\r\n marginViewOverlays.addDynamicOverlay(new MarginViewLineDecorationsOverlay(this._context));\r\n marginViewOverlays.addDynamicOverlay(new LinesDecorationsOverlay(this._context));\r\n marginViewOverlays.addDynamicOverlay(new LineNumbersOverlay(this._context));\r\n const margin = new Margin(this._context);\r\n margin.getDomNode().appendChild(this._viewZones.marginDomNode);\r\n margin.getDomNode().appendChild(marginViewOverlays.getDomNode());\r\n this._viewParts.push(margin);\r\n // Content widgets\r\n this._contentWidgets = new ViewContentWidgets(this._context, this.domNode);\r\n this._viewParts.push(this._contentWidgets);\r\n this._viewCursors = new ViewCursors(this._context);\r\n this._viewParts.push(this._viewCursors);\r\n // Overlay widgets\r\n this._overlayWidgets = new ViewOverlayWidgets(this._context);\r\n this._viewParts.push(this._overlayWidgets);\r\n const rulers = new Rulers(this._context);\r\n this._viewParts.push(rulers);\r\n const minimap = new Minimap(this._context);\r\n this._viewParts.push(minimap);\r\n // -------------- Wire dom nodes up\r\n if (decorationsOverviewRuler) {\r\n const overviewRulerData = this._scrollbar.getOverviewRulerLayoutInfo();\r\n overviewRulerData.parent.insertBefore(decorationsOverviewRuler.getDomNode(), overviewRulerData.insertBefore);\r\n }\r\n this._linesContent.appendChild(contentViewOverlays.getDomNode());\r\n this._linesContent.appendChild(rulers.domNode);\r\n this._linesContent.appendChild(this._viewZones.domNode);\r\n this._linesContent.appendChild(this._viewLines.getDomNode());\r\n this._linesContent.appendChild(this._contentWidgets.domNode);\r\n this._linesContent.appendChild(this._viewCursors.getDomNode());\r\n this._overflowGuardContainer.appendChild(margin.getDomNode());\r\n this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode());\r\n this._overflowGuardContainer.appendChild(scrollDecoration.getDomNode());\r\n this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea);\r\n this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover);\r\n this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode());\r\n this._overflowGuardContainer.appendChild(minimap.getDomNode());\r\n this.domNode.appendChild(this._overflowGuardContainer);\r\n if (overflowWidgetsDomNode) {\r\n overflowWidgetsDomNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode);\r\n }\r\n else {\r\n this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode);\r\n }\r\n this._applyLayout();\r\n // Pointer handler\r\n this._pointerHandler = this._register(new PointerHandler(this._context, viewController, this._createPointerHandlerHelper()));\r\n }\r\n _flushAccumulatedAndRenderNow() {\r\n this._renderNow();\r\n }\r\n _createPointerHandlerHelper() {\r\n return {\r\n viewDomNode: this.domNode.domNode,\r\n linesContentDomNode: this._linesContent.domNode,\r\n focusTextArea: () => {\r\n this.focus();\r\n },\r\n getLastRenderData: () => {\r\n const lastViewCursorsRenderData = this._viewCursors.getLastRenderData() || [];\r\n const lastTextareaPosition = this._textAreaHandler.getLastRenderData();\r\n return new PointerHandlerLastRenderData(lastViewCursorsRenderData, lastTextareaPosition);\r\n },\r\n shouldSuppressMouseDownOnViewZone: (viewZoneId) => {\r\n return this._viewZones.shouldSuppressMouseDownOnViewZone(viewZoneId);\r\n },\r\n shouldSuppressMouseDownOnWidget: (widgetId) => {\r\n return this._contentWidgets.shouldSuppressMouseDownOnWidget(widgetId);\r\n },\r\n getPositionFromDOMInfo: (spanNode, offset) => {\r\n this._flushAccumulatedAndRenderNow();\r\n return this._viewLines.getPositionFromDOMInfo(spanNode, offset);\r\n },\r\n visibleRangeForPosition: (lineNumber, column) => {\r\n this._flushAccumulatedAndRenderNow();\r\n return this._viewLines.visibleRangeForPosition(new Position(lineNumber, column));\r\n },\r\n getLineWidth: (lineNumber) => {\r\n this._flushAccumulatedAndRenderNow();\r\n return this._viewLines.getLineWidth(lineNumber);\r\n }\r\n };\r\n }\r\n _createTextAreaHandlerHelper() {\r\n return {\r\n visibleRangeForPositionRelativeToEditor: (lineNumber, column) => {\r\n this._flushAccumulatedAndRenderNow();\r\n return this._viewLines.visibleRangeForPosition(new Position(lineNumber, column));\r\n }\r\n };\r\n }\r\n _applyLayout() {\r\n const options = this._context.configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this.domNode.setWidth(layoutInfo.width);\r\n this.domNode.setHeight(layoutInfo.height);\r\n this._overflowGuardContainer.setWidth(layoutInfo.width);\r\n this._overflowGuardContainer.setHeight(layoutInfo.height);\r\n this._linesContent.setWidth(1000000);\r\n this._linesContent.setHeight(1000000);\r\n }\r\n _getEditorClassName() {\r\n const focused = this._textAreaHandler.isFocused() ? ' focused' : '';\r\n return this._context.configuration.options.get(121 /* editorClassName */) + ' ' + getThemeTypeSelector(this._context.theme.type) + focused;\r\n }\r\n // --- begin event handlers\r\n handleEvents(events) {\r\n super.handleEvents(events);\r\n this._scheduleRender();\r\n }\r\n onConfigurationChanged(e) {\r\n this._configPixelRatio = this._context.configuration.options.get(122 /* pixelRatio */);\r\n this.domNode.setClassName(this._getEditorClassName());\r\n this._applyLayout();\r\n return false;\r\n }\r\n onCursorStateChanged(e) {\r\n this._selections = e.selections;\r\n return false;\r\n }\r\n onFocusChanged(e) {\r\n this.domNode.setClassName(this._getEditorClassName());\r\n return false;\r\n }\r\n onThemeChanged(e) {\r\n this.domNode.setClassName(this._getEditorClassName());\r\n return false;\r\n }\r\n // --- end event handlers\r\n dispose() {\r\n if (this._renderAnimationFrame !== null) {\r\n this._renderAnimationFrame.dispose();\r\n this._renderAnimationFrame = null;\r\n }\r\n this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove();\r\n this._context.removeEventHandler(this);\r\n this._viewLines.dispose();\r\n // Destroy view parts\r\n for (const viewPart of this._viewParts) {\r\n viewPart.dispose();\r\n }\r\n super.dispose();\r\n }\r\n _scheduleRender() {\r\n if (this._renderAnimationFrame === null) {\r\n this._renderAnimationFrame = dom.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this), 100);\r\n }\r\n }\r\n _onRenderScheduled() {\r\n this._renderAnimationFrame = null;\r\n this._flushAccumulatedAndRenderNow();\r\n }\r\n _renderNow() {\r\n safeInvokeNoArg(() => this._actualRender());\r\n }\r\n _getViewPartsToRender() {\r\n let result = [], resultLen = 0;\r\n for (const viewPart of this._viewParts) {\r\n if (viewPart.shouldRender()) {\r\n result[resultLen++] = viewPart;\r\n }\r\n }\r\n return result;\r\n }\r\n _actualRender() {\r\n if (!dom.isInDOM(this.domNode.domNode)) {\r\n return;\r\n }\r\n let viewPartsToRender = this._getViewPartsToRender();\r\n if (!this._viewLines.shouldRender() && viewPartsToRender.length === 0) {\r\n // Nothing to render\r\n return;\r\n }\r\n const partialViewportData = this._context.viewLayout.getLinesViewportData();\r\n this._context.model.setViewport(partialViewportData.startLineNumber, partialViewportData.endLineNumber, partialViewportData.centeredLineNumber);\r\n const viewportData = new ViewportData(this._selections, partialViewportData, this._context.viewLayout.getWhitespaceViewportData(), this._context.model);\r\n if (this._contentWidgets.shouldRender()) {\r\n // Give the content widgets a chance to set their max width before a possible synchronous layout\r\n this._contentWidgets.onBeforeRender(viewportData);\r\n }\r\n if (this._viewLines.shouldRender()) {\r\n this._viewLines.renderText(viewportData);\r\n this._viewLines.onDidRender();\r\n // Rendering of viewLines might cause scroll events to occur, so collect view parts to render again\r\n viewPartsToRender = this._getViewPartsToRender();\r\n }\r\n const renderingContext = new RenderingContext(this._context.viewLayout, viewportData, this._viewLines);\r\n // Render the rest of the parts\r\n for (const viewPart of viewPartsToRender) {\r\n viewPart.prepareRender(renderingContext);\r\n }\r\n for (const viewPart of viewPartsToRender) {\r\n viewPart.render(renderingContext);\r\n viewPart.onDidRender();\r\n }\r\n // Try to detect browser zooming and paint again if necessary\r\n if (Math.abs(browser.getPixelRatio() - this._configPixelRatio) > 0.001) {\r\n // looks like the pixel ratio has changed\r\n this._context.configuration.updatePixelRatio();\r\n }\r\n }\r\n // --- BEGIN CodeEditor helpers\r\n delegateVerticalScrollbarMouseDown(browserEvent) {\r\n this._scrollbar.delegateVerticalScrollbarMouseDown(browserEvent);\r\n }\r\n restoreState(scrollPosition) {\r\n this._context.model.setScrollPosition({ scrollTop: scrollPosition.scrollTop }, 1 /* Immediate */);\r\n this._context.model.tokenizeViewport();\r\n this._renderNow();\r\n this._viewLines.updateLineWidths();\r\n this._context.model.setScrollPosition({ scrollLeft: scrollPosition.scrollLeft }, 1 /* Immediate */);\r\n }\r\n getOffsetForColumn(modelLineNumber, modelColumn) {\r\n const modelPosition = this._context.model.validateModelPosition({\r\n lineNumber: modelLineNumber,\r\n column: modelColumn\r\n });\r\n const viewPosition = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);\r\n this._flushAccumulatedAndRenderNow();\r\n const visibleRange = this._viewLines.visibleRangeForPosition(new Position(viewPosition.lineNumber, viewPosition.column));\r\n if (!visibleRange) {\r\n return -1;\r\n }\r\n return visibleRange.left;\r\n }\r\n getTargetAtClientPoint(clientX, clientY) {\r\n const mouseTarget = this._pointerHandler.getTargetAtClientPoint(clientX, clientY);\r\n if (!mouseTarget) {\r\n return null;\r\n }\r\n return ViewUserInputEvents.convertViewToModelMouseTarget(mouseTarget, this._context.model.coordinatesConverter);\r\n }\r\n createOverviewRuler(cssClassName) {\r\n return new OverviewRuler(this._context, cssClassName);\r\n }\r\n change(callback) {\r\n this._viewZones.changeViewZones(callback);\r\n this._scheduleRender();\r\n }\r\n render(now, everything) {\r\n if (everything) {\r\n // Force everything to render...\r\n this._viewLines.forceShouldRender();\r\n for (const viewPart of this._viewParts) {\r\n viewPart.forceShouldRender();\r\n }\r\n }\r\n if (now) {\r\n this._flushAccumulatedAndRenderNow();\r\n }\r\n else {\r\n this._scheduleRender();\r\n }\r\n }\r\n focus() {\r\n this._textAreaHandler.focusTextArea();\r\n }\r\n isFocused() {\r\n return this._textAreaHandler.isFocused();\r\n }\r\n setAriaOptions(options) {\r\n this._textAreaHandler.setAriaOptions(options);\r\n }\r\n addContentWidget(widgetData) {\r\n this._contentWidgets.addWidget(widgetData.widget);\r\n this.layoutContentWidget(widgetData);\r\n this._scheduleRender();\r\n }\r\n layoutContentWidget(widgetData) {\r\n let newRange = widgetData.position ? widgetData.position.range || null : null;\r\n if (newRange === null) {\r\n const newPosition = widgetData.position ? widgetData.position.position : null;\r\n if (newPosition !== null) {\r\n newRange = new Range(newPosition.lineNumber, newPosition.column, newPosition.lineNumber, newPosition.column);\r\n }\r\n }\r\n const newPreference = widgetData.position ? widgetData.position.preference : null;\r\n this._contentWidgets.setWidgetPosition(widgetData.widget, newRange, newPreference);\r\n this._scheduleRender();\r\n }\r\n removeContentWidget(widgetData) {\r\n this._contentWidgets.removeWidget(widgetData.widget);\r\n this._scheduleRender();\r\n }\r\n addOverlayWidget(widgetData) {\r\n this._overlayWidgets.addWidget(widgetData.widget);\r\n this.layoutOverlayWidget(widgetData);\r\n this._scheduleRender();\r\n }\r\n layoutOverlayWidget(widgetData) {\r\n const newPreference = widgetData.position ? widgetData.position.preference : null;\r\n const shouldRender = this._overlayWidgets.setWidgetPosition(widgetData.widget, newPreference);\r\n if (shouldRender) {\r\n this._scheduleRender();\r\n }\r\n }\r\n removeOverlayWidget(widgetData) {\r\n this._overlayWidgets.removeWidget(widgetData.widget);\r\n this._scheduleRender();\r\n }\r\n}\r\nfunction safeInvokeNoArg(func) {\r\n try {\r\n return func();\r\n }\r\n catch (e) {\r\n onUnexpectedError(e);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { CursorState, SingleCursorState } from './cursorCommon.js';\r\nimport { Position } from '../core/position.js';\r\nimport { Range } from '../core/range.js';\r\nimport { Selection } from '../core/selection.js';\r\nexport class OneCursor {\r\n constructor(context) {\r\n this._selTrackedRange = null;\r\n this._trackSelection = true;\r\n this._setState(context, new SingleCursorState(new Range(1, 1, 1, 1), 0, new Position(1, 1), 0), new SingleCursorState(new Range(1, 1, 1, 1), 0, new Position(1, 1), 0));\r\n }\r\n dispose(context) {\r\n this._removeTrackedRange(context);\r\n }\r\n startTrackingSelection(context) {\r\n this._trackSelection = true;\r\n this._updateTrackedRange(context);\r\n }\r\n stopTrackingSelection(context) {\r\n this._trackSelection = false;\r\n this._removeTrackedRange(context);\r\n }\r\n _updateTrackedRange(context) {\r\n if (!this._trackSelection) {\r\n // don't track the selection\r\n return;\r\n }\r\n this._selTrackedRange = context.model._setTrackedRange(this._selTrackedRange, this.modelState.selection, 0 /* AlwaysGrowsWhenTypingAtEdges */);\r\n }\r\n _removeTrackedRange(context) {\r\n this._selTrackedRange = context.model._setTrackedRange(this._selTrackedRange, null, 0 /* AlwaysGrowsWhenTypingAtEdges */);\r\n }\r\n asCursorState() {\r\n return new CursorState(this.modelState, this.viewState);\r\n }\r\n readSelectionFromMarkers(context) {\r\n const range = context.model._getTrackedRange(this._selTrackedRange);\r\n if (this.modelState.selection.getDirection() === 0 /* LTR */) {\r\n return new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\r\n }\r\n return new Selection(range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn);\r\n }\r\n ensureValidState(context) {\r\n this._setState(context, this.modelState, this.viewState);\r\n }\r\n setState(context, modelState, viewState) {\r\n this._setState(context, modelState, viewState);\r\n }\r\n _setState(context, modelState, viewState) {\r\n if (!modelState) {\r\n if (!viewState) {\r\n return;\r\n }\r\n // We only have the view state => compute the model state\r\n const selectionStart = context.model.validateRange(context.coordinatesConverter.convertViewRangeToModelRange(viewState.selectionStart));\r\n const position = context.model.validatePosition(context.coordinatesConverter.convertViewPositionToModelPosition(viewState.position));\r\n modelState = new SingleCursorState(selectionStart, viewState.selectionStartLeftoverVisibleColumns, position, viewState.leftoverVisibleColumns);\r\n }\r\n else {\r\n // Validate new model state\r\n const selectionStart = context.model.validateRange(modelState.selectionStart);\r\n const selectionStartLeftoverVisibleColumns = modelState.selectionStart.equalsRange(selectionStart) ? modelState.selectionStartLeftoverVisibleColumns : 0;\r\n const position = context.model.validatePosition(modelState.position);\r\n const leftoverVisibleColumns = modelState.position.equals(position) ? modelState.leftoverVisibleColumns : 0;\r\n modelState = new SingleCursorState(selectionStart, selectionStartLeftoverVisibleColumns, position, leftoverVisibleColumns);\r\n }\r\n if (!viewState) {\r\n // We only have the model state => compute the view state\r\n const viewSelectionStart1 = context.coordinatesConverter.convertModelPositionToViewPosition(new Position(modelState.selectionStart.startLineNumber, modelState.selectionStart.startColumn));\r\n const viewSelectionStart2 = context.coordinatesConverter.convertModelPositionToViewPosition(new Position(modelState.selectionStart.endLineNumber, modelState.selectionStart.endColumn));\r\n const viewSelectionStart = new Range(viewSelectionStart1.lineNumber, viewSelectionStart1.column, viewSelectionStart2.lineNumber, viewSelectionStart2.column);\r\n const viewPosition = context.coordinatesConverter.convertModelPositionToViewPosition(modelState.position);\r\n viewState = new SingleCursorState(viewSelectionStart, modelState.selectionStartLeftoverVisibleColumns, viewPosition, modelState.leftoverVisibleColumns);\r\n }\r\n else {\r\n // Validate new view state\r\n const viewSelectionStart = context.coordinatesConverter.validateViewRange(viewState.selectionStart, modelState.selectionStart);\r\n const viewPosition = context.coordinatesConverter.validateViewPosition(viewState.position, modelState.position);\r\n viewState = new SingleCursorState(viewSelectionStart, modelState.selectionStartLeftoverVisibleColumns, viewPosition, modelState.leftoverVisibleColumns);\r\n }\r\n this.modelState = modelState;\r\n this.viewState = viewState;\r\n this._updateTrackedRange(context);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { CursorState } from './cursorCommon.js';\r\nimport { OneCursor } from './oneCursor.js';\r\nimport { Selection } from '../core/selection.js';\r\nexport class CursorCollection {\r\n constructor(context) {\r\n this.context = context;\r\n this.primaryCursor = new OneCursor(context);\r\n this.secondaryCursors = [];\r\n this.lastAddedCursorIndex = 0;\r\n }\r\n dispose() {\r\n this.primaryCursor.dispose(this.context);\r\n this.killSecondaryCursors();\r\n }\r\n startTrackingSelections() {\r\n this.primaryCursor.startTrackingSelection(this.context);\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n this.secondaryCursors[i].startTrackingSelection(this.context);\r\n }\r\n }\r\n stopTrackingSelections() {\r\n this.primaryCursor.stopTrackingSelection(this.context);\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n this.secondaryCursors[i].stopTrackingSelection(this.context);\r\n }\r\n }\r\n updateContext(context) {\r\n this.context = context;\r\n }\r\n ensureValidState() {\r\n this.primaryCursor.ensureValidState(this.context);\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n this.secondaryCursors[i].ensureValidState(this.context);\r\n }\r\n }\r\n readSelectionFromMarkers() {\r\n let result = [];\r\n result[0] = this.primaryCursor.readSelectionFromMarkers(this.context);\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n result[i + 1] = this.secondaryCursors[i].readSelectionFromMarkers(this.context);\r\n }\r\n return result;\r\n }\r\n getAll() {\r\n let result = [];\r\n result[0] = this.primaryCursor.asCursorState();\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n result[i + 1] = this.secondaryCursors[i].asCursorState();\r\n }\r\n return result;\r\n }\r\n getViewPositions() {\r\n let result = [];\r\n result[0] = this.primaryCursor.viewState.position;\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n result[i + 1] = this.secondaryCursors[i].viewState.position;\r\n }\r\n return result;\r\n }\r\n getTopMostViewPosition() {\r\n let result = this.primaryCursor.viewState.position;\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n const viewPosition = this.secondaryCursors[i].viewState.position;\r\n if (viewPosition.isBefore(result)) {\r\n result = viewPosition;\r\n }\r\n }\r\n return result;\r\n }\r\n getBottomMostViewPosition() {\r\n let result = this.primaryCursor.viewState.position;\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n const viewPosition = this.secondaryCursors[i].viewState.position;\r\n if (result.isBeforeOrEqual(viewPosition)) {\r\n result = viewPosition;\r\n }\r\n }\r\n return result;\r\n }\r\n getSelections() {\r\n let result = [];\r\n result[0] = this.primaryCursor.modelState.selection;\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n result[i + 1] = this.secondaryCursors[i].modelState.selection;\r\n }\r\n return result;\r\n }\r\n getViewSelections() {\r\n let result = [];\r\n result[0] = this.primaryCursor.viewState.selection;\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n result[i + 1] = this.secondaryCursors[i].viewState.selection;\r\n }\r\n return result;\r\n }\r\n setSelections(selections) {\r\n this.setStates(CursorState.fromModelSelections(selections));\r\n }\r\n getPrimaryCursor() {\r\n return this.primaryCursor.asCursorState();\r\n }\r\n setStates(states) {\r\n if (states === null) {\r\n return;\r\n }\r\n this.primaryCursor.setState(this.context, states[0].modelState, states[0].viewState);\r\n this._setSecondaryStates(states.slice(1));\r\n }\r\n /**\r\n * Creates or disposes secondary cursors as necessary to match the number of `secondarySelections`.\r\n */\r\n _setSecondaryStates(secondaryStates) {\r\n const secondaryCursorsLength = this.secondaryCursors.length;\r\n const secondaryStatesLength = secondaryStates.length;\r\n if (secondaryCursorsLength < secondaryStatesLength) {\r\n let createCnt = secondaryStatesLength - secondaryCursorsLength;\r\n for (let i = 0; i < createCnt; i++) {\r\n this._addSecondaryCursor();\r\n }\r\n }\r\n else if (secondaryCursorsLength > secondaryStatesLength) {\r\n let removeCnt = secondaryCursorsLength - secondaryStatesLength;\r\n for (let i = 0; i < removeCnt; i++) {\r\n this._removeSecondaryCursor(this.secondaryCursors.length - 1);\r\n }\r\n }\r\n for (let i = 0; i < secondaryStatesLength; i++) {\r\n this.secondaryCursors[i].setState(this.context, secondaryStates[i].modelState, secondaryStates[i].viewState);\r\n }\r\n }\r\n killSecondaryCursors() {\r\n this._setSecondaryStates([]);\r\n }\r\n _addSecondaryCursor() {\r\n this.secondaryCursors.push(new OneCursor(this.context));\r\n this.lastAddedCursorIndex = this.secondaryCursors.length;\r\n }\r\n getLastAddedCursorIndex() {\r\n if (this.secondaryCursors.length === 0 || this.lastAddedCursorIndex === 0) {\r\n return 0;\r\n }\r\n return this.lastAddedCursorIndex;\r\n }\r\n _removeSecondaryCursor(removeIndex) {\r\n if (this.lastAddedCursorIndex >= removeIndex + 1) {\r\n this.lastAddedCursorIndex--;\r\n }\r\n this.secondaryCursors[removeIndex].dispose(this.context);\r\n this.secondaryCursors.splice(removeIndex, 1);\r\n }\r\n _getAll() {\r\n let result = [];\r\n result[0] = this.primaryCursor;\r\n for (let i = 0, len = this.secondaryCursors.length; i < len; i++) {\r\n result[i + 1] = this.secondaryCursors[i];\r\n }\r\n return result;\r\n }\r\n normalize() {\r\n if (this.secondaryCursors.length === 0) {\r\n return;\r\n }\r\n let cursors = this._getAll();\r\n let sortedCursors = [];\r\n for (let i = 0, len = cursors.length; i < len; i++) {\r\n sortedCursors.push({\r\n index: i,\r\n selection: cursors[i].modelState.selection,\r\n });\r\n }\r\n sortedCursors.sort((a, b) => {\r\n if (a.selection.startLineNumber === b.selection.startLineNumber) {\r\n return a.selection.startColumn - b.selection.startColumn;\r\n }\r\n return a.selection.startLineNumber - b.selection.startLineNumber;\r\n });\r\n for (let sortedCursorIndex = 0; sortedCursorIndex < sortedCursors.length - 1; sortedCursorIndex++) {\r\n const current = sortedCursors[sortedCursorIndex];\r\n const next = sortedCursors[sortedCursorIndex + 1];\r\n const currentSelection = current.selection;\r\n const nextSelection = next.selection;\r\n if (!this.context.cursorConfig.multiCursorMergeOverlapping) {\r\n continue;\r\n }\r\n let shouldMergeCursors;\r\n if (nextSelection.isEmpty() || currentSelection.isEmpty()) {\r\n // Merge touching cursors if one of them is collapsed\r\n shouldMergeCursors = nextSelection.getStartPosition().isBeforeOrEqual(currentSelection.getEndPosition());\r\n }\r\n else {\r\n // Merge only overlapping cursors (i.e. allow touching ranges)\r\n shouldMergeCursors = nextSelection.getStartPosition().isBefore(currentSelection.getEndPosition());\r\n }\r\n if (shouldMergeCursors) {\r\n const winnerSortedCursorIndex = current.index < next.index ? sortedCursorIndex : sortedCursorIndex + 1;\r\n const looserSortedCursorIndex = current.index < next.index ? sortedCursorIndex + 1 : sortedCursorIndex;\r\n const looserIndex = sortedCursors[looserSortedCursorIndex].index;\r\n const winnerIndex = sortedCursors[winnerSortedCursorIndex].index;\r\n const looserSelection = sortedCursors[looserSortedCursorIndex].selection;\r\n const winnerSelection = sortedCursors[winnerSortedCursorIndex].selection;\r\n if (!looserSelection.equalsSelection(winnerSelection)) {\r\n const resultingRange = looserSelection.plusRange(winnerSelection);\r\n const looserSelectionIsLTR = (looserSelection.selectionStartLineNumber === looserSelection.startLineNumber && looserSelection.selectionStartColumn === looserSelection.startColumn);\r\n const winnerSelectionIsLTR = (winnerSelection.selectionStartLineNumber === winnerSelection.startLineNumber && winnerSelection.selectionStartColumn === winnerSelection.startColumn);\r\n // Give more importance to the last added cursor (think Ctrl-dragging + hitting another cursor)\r\n let resultingSelectionIsLTR;\r\n if (looserIndex === this.lastAddedCursorIndex) {\r\n resultingSelectionIsLTR = looserSelectionIsLTR;\r\n this.lastAddedCursorIndex = winnerIndex;\r\n }\r\n else {\r\n // Winner takes it all\r\n resultingSelectionIsLTR = winnerSelectionIsLTR;\r\n }\r\n let resultingSelection;\r\n if (resultingSelectionIsLTR) {\r\n resultingSelection = new Selection(resultingRange.startLineNumber, resultingRange.startColumn, resultingRange.endLineNumber, resultingRange.endColumn);\r\n }\r\n else {\r\n resultingSelection = new Selection(resultingRange.endLineNumber, resultingRange.endColumn, resultingRange.startLineNumber, resultingRange.startColumn);\r\n }\r\n sortedCursors[winnerSortedCursorIndex].selection = resultingSelection;\r\n const resultingState = CursorState.fromModelSelection(resultingSelection);\r\n cursors[winnerIndex].setState(this.context, resultingState.modelState, resultingState.viewState);\r\n }\r\n for (const sortedCursor of sortedCursors) {\r\n if (sortedCursor.index > looserIndex) {\r\n sortedCursor.index--;\r\n }\r\n }\r\n cursors.splice(looserIndex, 1);\r\n sortedCursors.splice(looserSortedCursorIndex, 1);\r\n this._removeSecondaryCursor(looserIndex - 1);\r\n sortedCursorIndex--;\r\n }\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport class ViewCompositionStartEvent {\r\n constructor() {\r\n this.type = 0 /* ViewCompositionStart */;\r\n }\r\n}\r\nexport class ViewCompositionEndEvent {\r\n constructor() {\r\n this.type = 1 /* ViewCompositionEnd */;\r\n }\r\n}\r\nexport class ViewConfigurationChangedEvent {\r\n constructor(source) {\r\n this.type = 2 /* ViewConfigurationChanged */;\r\n this._source = source;\r\n }\r\n hasChanged(id) {\r\n return this._source.hasChanged(id);\r\n }\r\n}\r\nexport class ViewCursorStateChangedEvent {\r\n constructor(selections, modelSelections) {\r\n this.type = 3 /* ViewCursorStateChanged */;\r\n this.selections = selections;\r\n this.modelSelections = modelSelections;\r\n }\r\n}\r\nexport class ViewDecorationsChangedEvent {\r\n constructor(source) {\r\n this.type = 4 /* ViewDecorationsChanged */;\r\n if (source) {\r\n this.affectsMinimap = source.affectsMinimap;\r\n this.affectsOverviewRuler = source.affectsOverviewRuler;\r\n }\r\n else {\r\n this.affectsMinimap = true;\r\n this.affectsOverviewRuler = true;\r\n }\r\n }\r\n}\r\nexport class ViewFlushedEvent {\r\n constructor() {\r\n this.type = 5 /* ViewFlushed */;\r\n // Nothing to do\r\n }\r\n}\r\nexport class ViewFocusChangedEvent {\r\n constructor(isFocused) {\r\n this.type = 6 /* ViewFocusChanged */;\r\n this.isFocused = isFocused;\r\n }\r\n}\r\nexport class ViewLanguageConfigurationEvent {\r\n constructor() {\r\n this.type = 7 /* ViewLanguageConfigurationChanged */;\r\n }\r\n}\r\nexport class ViewLineMappingChangedEvent {\r\n constructor() {\r\n this.type = 8 /* ViewLineMappingChanged */;\r\n // Nothing to do\r\n }\r\n}\r\nexport class ViewLinesChangedEvent {\r\n constructor(fromLineNumber, toLineNumber) {\r\n this.type = 9 /* ViewLinesChanged */;\r\n this.fromLineNumber = fromLineNumber;\r\n this.toLineNumber = toLineNumber;\r\n }\r\n}\r\nexport class ViewLinesDeletedEvent {\r\n constructor(fromLineNumber, toLineNumber) {\r\n this.type = 10 /* ViewLinesDeleted */;\r\n this.fromLineNumber = fromLineNumber;\r\n this.toLineNumber = toLineNumber;\r\n }\r\n}\r\nexport class ViewLinesInsertedEvent {\r\n constructor(fromLineNumber, toLineNumber) {\r\n this.type = 11 /* ViewLinesInserted */;\r\n this.fromLineNumber = fromLineNumber;\r\n this.toLineNumber = toLineNumber;\r\n }\r\n}\r\nexport class ViewRevealRangeRequestEvent {\r\n constructor(source, range, selections, verticalType, revealHorizontal, scrollType) {\r\n this.type = 12 /* ViewRevealRangeRequest */;\r\n this.source = source;\r\n this.range = range;\r\n this.selections = selections;\r\n this.verticalType = verticalType;\r\n this.revealHorizontal = revealHorizontal;\r\n this.scrollType = scrollType;\r\n }\r\n}\r\nexport class ViewScrollChangedEvent {\r\n constructor(source) {\r\n this.type = 13 /* ViewScrollChanged */;\r\n this.scrollWidth = source.scrollWidth;\r\n this.scrollLeft = source.scrollLeft;\r\n this.scrollHeight = source.scrollHeight;\r\n this.scrollTop = source.scrollTop;\r\n this.scrollWidthChanged = source.scrollWidthChanged;\r\n this.scrollLeftChanged = source.scrollLeftChanged;\r\n this.scrollHeightChanged = source.scrollHeightChanged;\r\n this.scrollTopChanged = source.scrollTopChanged;\r\n }\r\n}\r\nexport class ViewThemeChangedEvent {\r\n constructor() {\r\n this.type = 14 /* ViewThemeChanged */;\r\n }\r\n}\r\nexport class ViewTokensChangedEvent {\r\n constructor(ranges) {\r\n this.type = 15 /* ViewTokensChanged */;\r\n this.ranges = ranges;\r\n }\r\n}\r\nexport class ViewTokensColorsChangedEvent {\r\n constructor() {\r\n this.type = 16 /* ViewTokensColorsChanged */;\r\n // Nothing to do\r\n }\r\n}\r\nexport class ViewZonesChangedEvent {\r\n constructor() {\r\n this.type = 17 /* ViewZonesChanged */;\r\n // Nothing to do\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nexport class ViewModelEventDispatcher extends Disposable {\r\n constructor() {\r\n super();\r\n this._onEvent = this._register(new Emitter());\r\n this.onEvent = this._onEvent.event;\r\n this._eventHandlers = [];\r\n this._viewEventQueue = null;\r\n this._isConsumingViewEventQueue = false;\r\n this._collector = null;\r\n this._collectorCnt = 0;\r\n this._outgoingEvents = [];\r\n }\r\n emitOutgoingEvent(e) {\r\n this._addOutgoingEvent(e);\r\n this._emitOugoingEvents();\r\n }\r\n _addOutgoingEvent(e) {\r\n for (let i = 0, len = this._outgoingEvents.length; i < len; i++) {\r\n if (this._outgoingEvents[i].kind === e.kind) {\r\n this._outgoingEvents[i] = this._outgoingEvents[i].merge(e);\r\n return;\r\n }\r\n }\r\n // not merged\r\n this._outgoingEvents.push(e);\r\n }\r\n _emitOugoingEvents() {\r\n while (this._outgoingEvents.length > 0) {\r\n if (this._collector || this._isConsumingViewEventQueue) {\r\n // right now collecting or emitting view events, so let's postpone emitting\r\n return;\r\n }\r\n const event = this._outgoingEvents.shift();\r\n if (event.isNoOp()) {\r\n continue;\r\n }\r\n this._onEvent.fire(event);\r\n }\r\n }\r\n addViewEventHandler(eventHandler) {\r\n for (let i = 0, len = this._eventHandlers.length; i < len; i++) {\r\n if (this._eventHandlers[i] === eventHandler) {\r\n console.warn('Detected duplicate listener in ViewEventDispatcher', eventHandler);\r\n }\r\n }\r\n this._eventHandlers.push(eventHandler);\r\n }\r\n removeViewEventHandler(eventHandler) {\r\n for (let i = 0; i < this._eventHandlers.length; i++) {\r\n if (this._eventHandlers[i] === eventHandler) {\r\n this._eventHandlers.splice(i, 1);\r\n break;\r\n }\r\n }\r\n }\r\n beginEmitViewEvents() {\r\n this._collectorCnt++;\r\n if (this._collectorCnt === 1) {\r\n this._collector = new ViewModelEventsCollector();\r\n }\r\n return this._collector;\r\n }\r\n endEmitViewEvents() {\r\n this._collectorCnt--;\r\n if (this._collectorCnt === 0) {\r\n const outgoingEvents = this._collector.outgoingEvents;\r\n const viewEvents = this._collector.viewEvents;\r\n this._collector = null;\r\n for (const outgoingEvent of outgoingEvents) {\r\n this._addOutgoingEvent(outgoingEvent);\r\n }\r\n if (viewEvents.length > 0) {\r\n this._emitMany(viewEvents);\r\n }\r\n }\r\n this._emitOugoingEvents();\r\n }\r\n emitSingleViewEvent(event) {\r\n try {\r\n const eventsCollector = this.beginEmitViewEvents();\r\n eventsCollector.emitViewEvent(event);\r\n }\r\n finally {\r\n this.endEmitViewEvents();\r\n }\r\n }\r\n _emitMany(events) {\r\n if (this._viewEventQueue) {\r\n this._viewEventQueue = this._viewEventQueue.concat(events);\r\n }\r\n else {\r\n this._viewEventQueue = events;\r\n }\r\n if (!this._isConsumingViewEventQueue) {\r\n this._consumeViewEventQueue();\r\n }\r\n }\r\n _consumeViewEventQueue() {\r\n try {\r\n this._isConsumingViewEventQueue = true;\r\n this._doConsumeQueue();\r\n }\r\n finally {\r\n this._isConsumingViewEventQueue = false;\r\n }\r\n }\r\n _doConsumeQueue() {\r\n while (this._viewEventQueue) {\r\n // Empty event queue, as events might come in while sending these off\r\n const events = this._viewEventQueue;\r\n this._viewEventQueue = null;\r\n // Use a clone of the event handlers list, as they might remove themselves\r\n const eventHandlers = this._eventHandlers.slice(0);\r\n for (const eventHandler of eventHandlers) {\r\n eventHandler.handleEvents(events);\r\n }\r\n }\r\n }\r\n}\r\nexport class ViewModelEventsCollector {\r\n constructor() {\r\n this.viewEvents = [];\r\n this.outgoingEvents = [];\r\n }\r\n emitViewEvent(event) {\r\n this.viewEvents.push(event);\r\n }\r\n emitOutgoingEvent(e) {\r\n this.outgoingEvents.push(e);\r\n }\r\n}\r\nexport class ContentSizeChangedEvent {\r\n constructor(oldContentWidth, oldContentHeight, contentWidth, contentHeight) {\r\n this.kind = 0 /* ContentSizeChanged */;\r\n this._oldContentWidth = oldContentWidth;\r\n this._oldContentHeight = oldContentHeight;\r\n this.contentWidth = contentWidth;\r\n this.contentHeight = contentHeight;\r\n this.contentWidthChanged = (this._oldContentWidth !== this.contentWidth);\r\n this.contentHeightChanged = (this._oldContentHeight !== this.contentHeight);\r\n }\r\n isNoOp() {\r\n return (!this.contentWidthChanged && !this.contentHeightChanged);\r\n }\r\n merge(other) {\r\n if (other.kind !== 0 /* ContentSizeChanged */) {\r\n return this;\r\n }\r\n return new ContentSizeChangedEvent(this._oldContentWidth, this._oldContentHeight, other.contentWidth, other.contentHeight);\r\n }\r\n}\r\nexport class FocusChangedEvent {\r\n constructor(oldHasFocus, hasFocus) {\r\n this.kind = 1 /* FocusChanged */;\r\n this.oldHasFocus = oldHasFocus;\r\n this.hasFocus = hasFocus;\r\n }\r\n isNoOp() {\r\n return (this.oldHasFocus === this.hasFocus);\r\n }\r\n merge(other) {\r\n if (other.kind !== 1 /* FocusChanged */) {\r\n return this;\r\n }\r\n return new FocusChangedEvent(this.oldHasFocus, other.hasFocus);\r\n }\r\n}\r\nexport class ScrollChangedEvent {\r\n constructor(oldScrollWidth, oldScrollLeft, oldScrollHeight, oldScrollTop, scrollWidth, scrollLeft, scrollHeight, scrollTop) {\r\n this.kind = 2 /* ScrollChanged */;\r\n this._oldScrollWidth = oldScrollWidth;\r\n this._oldScrollLeft = oldScrollLeft;\r\n this._oldScrollHeight = oldScrollHeight;\r\n this._oldScrollTop = oldScrollTop;\r\n this.scrollWidth = scrollWidth;\r\n this.scrollLeft = scrollLeft;\r\n this.scrollHeight = scrollHeight;\r\n this.scrollTop = scrollTop;\r\n this.scrollWidthChanged = (this._oldScrollWidth !== this.scrollWidth);\r\n this.scrollLeftChanged = (this._oldScrollLeft !== this.scrollLeft);\r\n this.scrollHeightChanged = (this._oldScrollHeight !== this.scrollHeight);\r\n this.scrollTopChanged = (this._oldScrollTop !== this.scrollTop);\r\n }\r\n isNoOp() {\r\n return (!this.scrollWidthChanged && !this.scrollLeftChanged && !this.scrollHeightChanged && !this.scrollTopChanged);\r\n }\r\n merge(other) {\r\n if (other.kind !== 2 /* ScrollChanged */) {\r\n return this;\r\n }\r\n return new ScrollChangedEvent(this._oldScrollWidth, this._oldScrollLeft, this._oldScrollHeight, this._oldScrollTop, other.scrollWidth, other.scrollLeft, other.scrollHeight, other.scrollTop);\r\n }\r\n}\r\nexport class ViewZonesChangedEvent {\r\n constructor() {\r\n this.kind = 3 /* ViewZonesChanged */;\r\n }\r\n isNoOp() {\r\n return false;\r\n }\r\n merge(other) {\r\n return this;\r\n }\r\n}\r\nexport class CursorStateChangedEvent {\r\n constructor(oldSelections, selections, oldModelVersionId, modelVersionId, source, reason, reachedMaxCursorCount) {\r\n this.kind = 5 /* CursorStateChanged */;\r\n this.oldSelections = oldSelections;\r\n this.selections = selections;\r\n this.oldModelVersionId = oldModelVersionId;\r\n this.modelVersionId = modelVersionId;\r\n this.source = source;\r\n this.reason = reason;\r\n this.reachedMaxCursorCount = reachedMaxCursorCount;\r\n }\r\n static _selectionsAreEqual(a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n if (!a || !b) {\r\n return false;\r\n }\r\n const aLen = a.length;\r\n const bLen = b.length;\r\n if (aLen !== bLen) {\r\n return false;\r\n }\r\n for (let i = 0; i < aLen; i++) {\r\n if (!a[i].equalsSelection(b[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n isNoOp() {\r\n return (CursorStateChangedEvent._selectionsAreEqual(this.oldSelections, this.selections)\r\n && this.oldModelVersionId === this.modelVersionId);\r\n }\r\n merge(other) {\r\n if (other.kind !== 5 /* CursorStateChanged */) {\r\n return this;\r\n }\r\n return new CursorStateChangedEvent(this.oldSelections, other.selections, this.oldModelVersionId, other.modelVersionId, other.source, other.reason, this.reachedMaxCursorCount || other.reachedMaxCursorCount);\r\n }\r\n}\r\nexport class ReadOnlyEditAttemptEvent {\r\n constructor() {\r\n this.kind = 4 /* ReadOnlyEditAttempt */;\r\n }\r\n isNoOp() {\r\n return false;\r\n }\r\n merge(other) {\r\n return this;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { CursorCollection } from './cursorCollection.js';\r\nimport { CursorColumns, CursorContext, CursorState, EditOperationResult } from './cursorCommon.js';\r\nimport { DeleteOperations } from './cursorDeleteOperations.js';\r\nimport { TypeOperations, TypeWithAutoClosingCommand } from './cursorTypeOperations.js';\r\nimport { Range } from '../core/range.js';\r\nimport { Selection } from '../core/selection.js';\r\nimport { ViewCursorStateChangedEvent, ViewRevealRangeRequestEvent } from '../view/viewEvents.js';\r\nimport { dispose, Disposable } from '../../../base/common/lifecycle.js';\r\nimport { CursorStateChangedEvent } from '../viewModel/viewModelEventDispatcher.js';\r\n/**\r\n * A snapshot of the cursor and the model state\r\n */\r\nexport class CursorModelState {\r\n constructor(model, cursor) {\r\n this.modelVersionId = model.getVersionId();\r\n this.cursorState = cursor.getCursorStates();\r\n }\r\n equals(other) {\r\n if (!other) {\r\n return false;\r\n }\r\n if (this.modelVersionId !== other.modelVersionId) {\r\n return false;\r\n }\r\n if (this.cursorState.length !== other.cursorState.length) {\r\n return false;\r\n }\r\n for (let i = 0, len = this.cursorState.length; i < len; i++) {\r\n if (!this.cursorState[i].equals(other.cursorState[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n}\r\nclass AutoClosedAction {\r\n constructor(model, autoClosedCharactersDecorations, autoClosedEnclosingDecorations) {\r\n this._model = model;\r\n this._autoClosedCharactersDecorations = autoClosedCharactersDecorations;\r\n this._autoClosedEnclosingDecorations = autoClosedEnclosingDecorations;\r\n }\r\n static getAllAutoClosedCharacters(autoClosedActions) {\r\n let autoClosedCharacters = [];\r\n for (const autoClosedAction of autoClosedActions) {\r\n autoClosedCharacters = autoClosedCharacters.concat(autoClosedAction.getAutoClosedCharactersRanges());\r\n }\r\n return autoClosedCharacters;\r\n }\r\n dispose() {\r\n this._autoClosedCharactersDecorations = this._model.deltaDecorations(this._autoClosedCharactersDecorations, []);\r\n this._autoClosedEnclosingDecorations = this._model.deltaDecorations(this._autoClosedEnclosingDecorations, []);\r\n }\r\n getAutoClosedCharactersRanges() {\r\n let result = [];\r\n for (let i = 0; i < this._autoClosedCharactersDecorations.length; i++) {\r\n const decorationRange = this._model.getDecorationRange(this._autoClosedCharactersDecorations[i]);\r\n if (decorationRange) {\r\n result.push(decorationRange);\r\n }\r\n }\r\n return result;\r\n }\r\n isValid(selections) {\r\n let enclosingRanges = [];\r\n for (let i = 0; i < this._autoClosedEnclosingDecorations.length; i++) {\r\n const decorationRange = this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]);\r\n if (decorationRange) {\r\n enclosingRanges.push(decorationRange);\r\n if (decorationRange.startLineNumber !== decorationRange.endLineNumber) {\r\n // Stop tracking if the range becomes multiline...\r\n return false;\r\n }\r\n }\r\n }\r\n enclosingRanges.sort(Range.compareRangesUsingStarts);\r\n selections.sort(Range.compareRangesUsingStarts);\r\n for (let i = 0; i < selections.length; i++) {\r\n if (i >= enclosingRanges.length) {\r\n return false;\r\n }\r\n if (!enclosingRanges[i].strictContainsRange(selections[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n}\r\nexport class Cursor extends Disposable {\r\n constructor(model, viewModel, coordinatesConverter, cursorConfig) {\r\n super();\r\n this._model = model;\r\n this._knownModelVersionId = this._model.getVersionId();\r\n this._viewModel = viewModel;\r\n this._coordinatesConverter = coordinatesConverter;\r\n this.context = new CursorContext(this._model, this._coordinatesConverter, cursorConfig);\r\n this._cursors = new CursorCollection(this.context);\r\n this._hasFocus = false;\r\n this._isHandling = false;\r\n this._isDoingComposition = false;\r\n this._selectionsWhenCompositionStarted = null;\r\n this._columnSelectData = null;\r\n this._autoClosedActions = [];\r\n this._prevEditOperationType = 0 /* Other */;\r\n }\r\n dispose() {\r\n this._cursors.dispose();\r\n this._autoClosedActions = dispose(this._autoClosedActions);\r\n super.dispose();\r\n }\r\n updateConfiguration(cursorConfig) {\r\n this.context = new CursorContext(this._model, this._coordinatesConverter, cursorConfig);\r\n this._cursors.updateContext(this.context);\r\n }\r\n onLineMappingChanged(eventsCollector) {\r\n if (this._knownModelVersionId !== this._model.getVersionId()) {\r\n // There are model change events that I didn't yet receive.\r\n //\r\n // This can happen when editing the model, and the view model receives the change events first,\r\n // and the view model emits line mapping changed events, all before the cursor gets a chance to\r\n // recover from markers.\r\n //\r\n // The model change listener above will be called soon and we'll ensure a valid cursor state there.\r\n return;\r\n }\r\n // Ensure valid state\r\n this.setStates(eventsCollector, 'viewModel', 0 /* NotSet */, this.getCursorStates());\r\n }\r\n setHasFocus(hasFocus) {\r\n this._hasFocus = hasFocus;\r\n }\r\n _validateAutoClosedActions() {\r\n if (this._autoClosedActions.length > 0) {\r\n let selections = this._cursors.getSelections();\r\n for (let i = 0; i < this._autoClosedActions.length; i++) {\r\n const autoClosedAction = this._autoClosedActions[i];\r\n if (!autoClosedAction.isValid(selections)) {\r\n autoClosedAction.dispose();\r\n this._autoClosedActions.splice(i, 1);\r\n i--;\r\n }\r\n }\r\n }\r\n }\r\n // ------ some getters/setters\r\n getPrimaryCursorState() {\r\n return this._cursors.getPrimaryCursor();\r\n }\r\n getLastAddedCursorIndex() {\r\n return this._cursors.getLastAddedCursorIndex();\r\n }\r\n getCursorStates() {\r\n return this._cursors.getAll();\r\n }\r\n setStates(eventsCollector, source, reason, states) {\r\n let reachedMaxCursorCount = false;\r\n if (states !== null && states.length > Cursor.MAX_CURSOR_COUNT) {\r\n states = states.slice(0, Cursor.MAX_CURSOR_COUNT);\r\n reachedMaxCursorCount = true;\r\n }\r\n const oldState = new CursorModelState(this._model, this);\r\n this._cursors.setStates(states);\r\n this._cursors.normalize();\r\n this._columnSelectData = null;\r\n this._validateAutoClosedActions();\r\n return this._emitStateChangedIfNecessary(eventsCollector, source, reason, oldState, reachedMaxCursorCount);\r\n }\r\n setCursorColumnSelectData(columnSelectData) {\r\n this._columnSelectData = columnSelectData;\r\n }\r\n revealPrimary(eventsCollector, source, revealHorizontal, scrollType) {\r\n const viewPositions = this._cursors.getViewPositions();\r\n if (viewPositions.length > 1) {\r\n this._emitCursorRevealRange(eventsCollector, source, null, this._cursors.getViewSelections(), 0 /* Simple */, revealHorizontal, scrollType);\r\n return;\r\n }\r\n else {\r\n const viewPosition = viewPositions[0];\r\n const viewRange = new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column);\r\n this._emitCursorRevealRange(eventsCollector, source, viewRange, null, 0 /* Simple */, revealHorizontal, scrollType);\r\n }\r\n }\r\n _revealPrimaryCursor(eventsCollector, source, verticalType, revealHorizontal, scrollType) {\r\n const viewPositions = this._cursors.getViewPositions();\r\n if (viewPositions.length > 1) {\r\n this._emitCursorRevealRange(eventsCollector, source, null, this._cursors.getViewSelections(), verticalType, revealHorizontal, scrollType);\r\n }\r\n else {\r\n const viewPosition = viewPositions[0];\r\n const viewRange = new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column);\r\n this._emitCursorRevealRange(eventsCollector, source, viewRange, null, verticalType, revealHorizontal, scrollType);\r\n }\r\n }\r\n _emitCursorRevealRange(eventsCollector, source, viewRange, viewSelections, verticalType, revealHorizontal, scrollType) {\r\n eventsCollector.emitViewEvent(new ViewRevealRangeRequestEvent(source, viewRange, viewSelections, verticalType, revealHorizontal, scrollType));\r\n }\r\n saveState() {\r\n let result = [];\r\n const selections = this._cursors.getSelections();\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n result.push({\r\n inSelectionMode: !selection.isEmpty(),\r\n selectionStart: {\r\n lineNumber: selection.selectionStartLineNumber,\r\n column: selection.selectionStartColumn,\r\n },\r\n position: {\r\n lineNumber: selection.positionLineNumber,\r\n column: selection.positionColumn,\r\n }\r\n });\r\n }\r\n return result;\r\n }\r\n restoreState(eventsCollector, states) {\r\n let desiredSelections = [];\r\n for (let i = 0, len = states.length; i < len; i++) {\r\n const state = states[i];\r\n let positionLineNumber = 1;\r\n let positionColumn = 1;\r\n // Avoid missing properties on the literal\r\n if (state.position && state.position.lineNumber) {\r\n positionLineNumber = state.position.lineNumber;\r\n }\r\n if (state.position && state.position.column) {\r\n positionColumn = state.position.column;\r\n }\r\n let selectionStartLineNumber = positionLineNumber;\r\n let selectionStartColumn = positionColumn;\r\n // Avoid missing properties on the literal\r\n if (state.selectionStart && state.selectionStart.lineNumber) {\r\n selectionStartLineNumber = state.selectionStart.lineNumber;\r\n }\r\n if (state.selectionStart && state.selectionStart.column) {\r\n selectionStartColumn = state.selectionStart.column;\r\n }\r\n desiredSelections.push({\r\n selectionStartLineNumber: selectionStartLineNumber,\r\n selectionStartColumn: selectionStartColumn,\r\n positionLineNumber: positionLineNumber,\r\n positionColumn: positionColumn\r\n });\r\n }\r\n this.setStates(eventsCollector, 'restoreState', 0 /* NotSet */, CursorState.fromModelSelections(desiredSelections));\r\n this.revealPrimary(eventsCollector, 'restoreState', true, 1 /* Immediate */);\r\n }\r\n onModelContentChanged(eventsCollector, e) {\r\n this._knownModelVersionId = e.versionId;\r\n if (this._isHandling) {\r\n return;\r\n }\r\n const hadFlushEvent = e.containsEvent(1 /* Flush */);\r\n this._prevEditOperationType = 0 /* Other */;\r\n if (hadFlushEvent) {\r\n // a model.setValue() was called\r\n this._cursors.dispose();\r\n this._cursors = new CursorCollection(this.context);\r\n this._validateAutoClosedActions();\r\n this._emitStateChangedIfNecessary(eventsCollector, 'model', 1 /* ContentFlush */, null, false);\r\n }\r\n else {\r\n if (this._hasFocus && e.resultingSelection && e.resultingSelection.length > 0) {\r\n const cursorState = CursorState.fromModelSelections(e.resultingSelection);\r\n if (this.setStates(eventsCollector, 'modelChange', e.isUndoing ? 5 /* Undo */ : e.isRedoing ? 6 /* Redo */ : 2 /* RecoverFromMarkers */, cursorState)) {\r\n this._revealPrimaryCursor(eventsCollector, 'modelChange', 0 /* Simple */, true, 0 /* Smooth */);\r\n }\r\n }\r\n else {\r\n const selectionsFromMarkers = this._cursors.readSelectionFromMarkers();\r\n this.setStates(eventsCollector, 'modelChange', 2 /* RecoverFromMarkers */, CursorState.fromModelSelections(selectionsFromMarkers));\r\n }\r\n }\r\n }\r\n getSelection() {\r\n return this._cursors.getPrimaryCursor().modelState.selection;\r\n }\r\n getTopMostViewPosition() {\r\n return this._cursors.getTopMostViewPosition();\r\n }\r\n getBottomMostViewPosition() {\r\n return this._cursors.getBottomMostViewPosition();\r\n }\r\n getCursorColumnSelectData() {\r\n if (this._columnSelectData) {\r\n return this._columnSelectData;\r\n }\r\n const primaryCursor = this._cursors.getPrimaryCursor();\r\n const viewSelectionStart = primaryCursor.viewState.selectionStart.getStartPosition();\r\n const viewPosition = primaryCursor.viewState.position;\r\n return {\r\n isReal: false,\r\n fromViewLineNumber: viewSelectionStart.lineNumber,\r\n fromViewVisualColumn: CursorColumns.visibleColumnFromColumn2(this.context.cursorConfig, this._viewModel, viewSelectionStart),\r\n toViewLineNumber: viewPosition.lineNumber,\r\n toViewVisualColumn: CursorColumns.visibleColumnFromColumn2(this.context.cursorConfig, this._viewModel, viewPosition),\r\n };\r\n }\r\n getSelections() {\r\n return this._cursors.getSelections();\r\n }\r\n setSelections(eventsCollector, source, selections, reason) {\r\n this.setStates(eventsCollector, source, reason, CursorState.fromModelSelections(selections));\r\n }\r\n getPrevEditOperationType() {\r\n return this._prevEditOperationType;\r\n }\r\n setPrevEditOperationType(type) {\r\n this._prevEditOperationType = type;\r\n }\r\n // ------ auxiliary handling logic\r\n _pushAutoClosedAction(autoClosedCharactersRanges, autoClosedEnclosingRanges) {\r\n let autoClosedCharactersDeltaDecorations = [];\r\n let autoClosedEnclosingDeltaDecorations = [];\r\n for (let i = 0, len = autoClosedCharactersRanges.length; i < len; i++) {\r\n autoClosedCharactersDeltaDecorations.push({\r\n range: autoClosedCharactersRanges[i],\r\n options: {\r\n inlineClassName: 'auto-closed-character',\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */\r\n }\r\n });\r\n autoClosedEnclosingDeltaDecorations.push({\r\n range: autoClosedEnclosingRanges[i],\r\n options: {\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */\r\n }\r\n });\r\n }\r\n const autoClosedCharactersDecorations = this._model.deltaDecorations([], autoClosedCharactersDeltaDecorations);\r\n const autoClosedEnclosingDecorations = this._model.deltaDecorations([], autoClosedEnclosingDeltaDecorations);\r\n this._autoClosedActions.push(new AutoClosedAction(this._model, autoClosedCharactersDecorations, autoClosedEnclosingDecorations));\r\n }\r\n _executeEditOperation(opResult) {\r\n if (!opResult) {\r\n // Nothing to execute\r\n return;\r\n }\r\n if (opResult.shouldPushStackElementBefore) {\r\n this._model.pushStackElement();\r\n }\r\n const result = CommandExecutor.executeCommands(this._model, this._cursors.getSelections(), opResult.commands);\r\n if (result) {\r\n // The commands were applied correctly\r\n this._interpretCommandResult(result);\r\n // Check for auto-closing closed characters\r\n let autoClosedCharactersRanges = [];\r\n let autoClosedEnclosingRanges = [];\r\n for (let i = 0; i < opResult.commands.length; i++) {\r\n const command = opResult.commands[i];\r\n if (command instanceof TypeWithAutoClosingCommand && command.enclosingRange && command.closeCharacterRange) {\r\n autoClosedCharactersRanges.push(command.closeCharacterRange);\r\n autoClosedEnclosingRanges.push(command.enclosingRange);\r\n }\r\n }\r\n if (autoClosedCharactersRanges.length > 0) {\r\n this._pushAutoClosedAction(autoClosedCharactersRanges, autoClosedEnclosingRanges);\r\n }\r\n this._prevEditOperationType = opResult.type;\r\n }\r\n if (opResult.shouldPushStackElementAfter) {\r\n this._model.pushStackElement();\r\n }\r\n }\r\n _interpretCommandResult(cursorState) {\r\n if (!cursorState || cursorState.length === 0) {\r\n cursorState = this._cursors.readSelectionFromMarkers();\r\n }\r\n this._columnSelectData = null;\r\n this._cursors.setSelections(cursorState);\r\n this._cursors.normalize();\r\n }\r\n // -----------------------------------------------------------------------------------------------------------\r\n // ----- emitting events\r\n _emitStateChangedIfNecessary(eventsCollector, source, reason, oldState, reachedMaxCursorCount) {\r\n const newState = new CursorModelState(this._model, this);\r\n if (newState.equals(oldState)) {\r\n return false;\r\n }\r\n const selections = this._cursors.getSelections();\r\n const viewSelections = this._cursors.getViewSelections();\r\n // Let the view get the event first.\r\n eventsCollector.emitViewEvent(new ViewCursorStateChangedEvent(viewSelections, selections));\r\n // Only after the view has been notified, let the rest of the world know...\r\n if (!oldState\r\n || oldState.cursorState.length !== newState.cursorState.length\r\n || newState.cursorState.some((newCursorState, i) => !newCursorState.modelState.equals(oldState.cursorState[i].modelState))) {\r\n const oldSelections = oldState ? oldState.cursorState.map(s => s.modelState.selection) : null;\r\n const oldModelVersionId = oldState ? oldState.modelVersionId : 0;\r\n eventsCollector.emitOutgoingEvent(new CursorStateChangedEvent(oldSelections, selections, oldModelVersionId, newState.modelVersionId, source || 'keyboard', reason, reachedMaxCursorCount));\r\n }\r\n return true;\r\n }\r\n // -----------------------------------------------------------------------------------------------------------\r\n // ----- handlers beyond this point\r\n _findAutoClosingPairs(edits) {\r\n if (!edits.length) {\r\n return null;\r\n }\r\n let indices = [];\r\n for (let i = 0, len = edits.length; i < len; i++) {\r\n const edit = edits[i];\r\n if (!edit.text || edit.text.indexOf('\\n') >= 0) {\r\n return null;\r\n }\r\n const m = edit.text.match(/([)\\]}>'\"`])([^)\\]}>'\"`]*)$/);\r\n if (!m) {\r\n return null;\r\n }\r\n const closeChar = m[1];\r\n const autoClosingPairsCandidates = this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(closeChar);\r\n if (!autoClosingPairsCandidates || autoClosingPairsCandidates.length !== 1) {\r\n return null;\r\n }\r\n const openChar = autoClosingPairsCandidates[0].open;\r\n const closeCharIndex = edit.text.length - m[2].length - 1;\r\n const openCharIndex = edit.text.lastIndexOf(openChar, closeCharIndex - 1);\r\n if (openCharIndex === -1) {\r\n return null;\r\n }\r\n indices.push([openCharIndex, closeCharIndex]);\r\n }\r\n return indices;\r\n }\r\n executeEdits(eventsCollector, source, edits, cursorStateComputer) {\r\n let autoClosingIndices = null;\r\n if (source === 'snippet') {\r\n autoClosingIndices = this._findAutoClosingPairs(edits);\r\n }\r\n if (autoClosingIndices) {\r\n edits[0]._isTracked = true;\r\n }\r\n let autoClosedCharactersRanges = [];\r\n let autoClosedEnclosingRanges = [];\r\n const selections = this._model.pushEditOperations(this.getSelections(), edits, (undoEdits) => {\r\n if (autoClosingIndices) {\r\n for (let i = 0, len = autoClosingIndices.length; i < len; i++) {\r\n const [openCharInnerIndex, closeCharInnerIndex] = autoClosingIndices[i];\r\n const undoEdit = undoEdits[i];\r\n const lineNumber = undoEdit.range.startLineNumber;\r\n const openCharIndex = undoEdit.range.startColumn - 1 + openCharInnerIndex;\r\n const closeCharIndex = undoEdit.range.startColumn - 1 + closeCharInnerIndex;\r\n autoClosedCharactersRanges.push(new Range(lineNumber, closeCharIndex + 1, lineNumber, closeCharIndex + 2));\r\n autoClosedEnclosingRanges.push(new Range(lineNumber, openCharIndex + 1, lineNumber, closeCharIndex + 2));\r\n }\r\n }\r\n const selections = cursorStateComputer(undoEdits);\r\n if (selections) {\r\n // Don't recover the selection from markers because\r\n // we know what it should be.\r\n this._isHandling = true;\r\n }\r\n return selections;\r\n });\r\n if (selections) {\r\n this._isHandling = false;\r\n this.setSelections(eventsCollector, source, selections, 0 /* NotSet */);\r\n }\r\n if (autoClosedCharactersRanges.length > 0) {\r\n this._pushAutoClosedAction(autoClosedCharactersRanges, autoClosedEnclosingRanges);\r\n }\r\n }\r\n _executeEdit(callback, eventsCollector, source, cursorChangeReason = 0 /* NotSet */) {\r\n if (this.context.cursorConfig.readOnly) {\r\n // we cannot edit when read only...\r\n return;\r\n }\r\n const oldState = new CursorModelState(this._model, this);\r\n this._cursors.stopTrackingSelections();\r\n this._isHandling = true;\r\n try {\r\n this._cursors.ensureValidState();\r\n callback();\r\n }\r\n catch (err) {\r\n onUnexpectedError(err);\r\n }\r\n this._isHandling = false;\r\n this._cursors.startTrackingSelections();\r\n this._validateAutoClosedActions();\r\n if (this._emitStateChangedIfNecessary(eventsCollector, source, cursorChangeReason, oldState, false)) {\r\n this._revealPrimaryCursor(eventsCollector, source, 0 /* Simple */, true, 0 /* Smooth */);\r\n }\r\n }\r\n setIsDoingComposition(isDoingComposition) {\r\n this._isDoingComposition = isDoingComposition;\r\n }\r\n startComposition(eventsCollector) {\r\n this._selectionsWhenCompositionStarted = this.getSelections().slice(0);\r\n }\r\n endComposition(eventsCollector, source) {\r\n this._executeEdit(() => {\r\n if (source === 'keyboard') {\r\n // composition finishes, let's check if we need to auto complete if necessary.\r\n const autoClosedCharacters = AutoClosedAction.getAllAutoClosedCharacters(this._autoClosedActions);\r\n this._executeEditOperation(TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType, this.context.cursorConfig, this._model, this._selectionsWhenCompositionStarted, this.getSelections(), autoClosedCharacters));\r\n this._selectionsWhenCompositionStarted = null;\r\n }\r\n }, eventsCollector, source);\r\n }\r\n type(eventsCollector, text, source) {\r\n this._executeEdit(() => {\r\n if (source === 'keyboard') {\r\n // If this event is coming straight from the keyboard, look for electric characters and enter\r\n const len = text.length;\r\n let offset = 0;\r\n while (offset < len) {\r\n const charLength = strings.nextCharLength(text, offset);\r\n const chr = text.substr(offset, charLength);\r\n // Here we must interpret each typed character individually\r\n const autoClosedCharacters = AutoClosedAction.getAllAutoClosedCharacters(this._autoClosedActions);\r\n this._executeEditOperation(TypeOperations.typeWithInterceptors(this._isDoingComposition, this._prevEditOperationType, this.context.cursorConfig, this._model, this.getSelections(), autoClosedCharacters, chr));\r\n offset += charLength;\r\n }\r\n }\r\n else {\r\n this._executeEditOperation(TypeOperations.typeWithoutInterceptors(this._prevEditOperationType, this.context.cursorConfig, this._model, this.getSelections(), text));\r\n }\r\n }, eventsCollector, source);\r\n }\r\n replacePreviousChar(eventsCollector, text, replaceCharCnt, source) {\r\n this._executeEdit(() => {\r\n this._executeEditOperation(TypeOperations.replacePreviousChar(this._prevEditOperationType, this.context.cursorConfig, this._model, this.getSelections(), text, replaceCharCnt));\r\n }, eventsCollector, source);\r\n }\r\n paste(eventsCollector, text, pasteOnNewLine, multicursorText, source) {\r\n this._executeEdit(() => {\r\n this._executeEditOperation(TypeOperations.paste(this.context.cursorConfig, this._model, this.getSelections(), text, pasteOnNewLine, multicursorText || []));\r\n }, eventsCollector, source, 4 /* Paste */);\r\n }\r\n cut(eventsCollector, source) {\r\n this._executeEdit(() => {\r\n this._executeEditOperation(DeleteOperations.cut(this.context.cursorConfig, this._model, this.getSelections()));\r\n }, eventsCollector, source);\r\n }\r\n executeCommand(eventsCollector, command, source) {\r\n this._executeEdit(() => {\r\n this._cursors.killSecondaryCursors();\r\n this._executeEditOperation(new EditOperationResult(0 /* Other */, [command], {\r\n shouldPushStackElementBefore: false,\r\n shouldPushStackElementAfter: false\r\n }));\r\n }, eventsCollector, source);\r\n }\r\n executeCommands(eventsCollector, commands, source) {\r\n this._executeEdit(() => {\r\n this._executeEditOperation(new EditOperationResult(0 /* Other */, commands, {\r\n shouldPushStackElementBefore: false,\r\n shouldPushStackElementAfter: false\r\n }));\r\n }, eventsCollector, source);\r\n }\r\n}\r\nCursor.MAX_CURSOR_COUNT = 10000;\r\nclass CommandExecutor {\r\n static executeCommands(model, selectionsBefore, commands) {\r\n const ctx = {\r\n model: model,\r\n selectionsBefore: selectionsBefore,\r\n trackedRanges: [],\r\n trackedRangesDirection: []\r\n };\r\n const result = this._innerExecuteCommands(ctx, commands);\r\n for (let i = 0, len = ctx.trackedRanges.length; i < len; i++) {\r\n ctx.model._setTrackedRange(ctx.trackedRanges[i], null, 0 /* AlwaysGrowsWhenTypingAtEdges */);\r\n }\r\n return result;\r\n }\r\n static _innerExecuteCommands(ctx, commands) {\r\n if (this._arrayIsEmpty(commands)) {\r\n return null;\r\n }\r\n const commandsData = this._getEditOperations(ctx, commands);\r\n if (commandsData.operations.length === 0) {\r\n return null;\r\n }\r\n const rawOperations = commandsData.operations;\r\n const loserCursorsMap = this._getLoserCursorMap(rawOperations);\r\n if (loserCursorsMap.hasOwnProperty('0')) {\r\n // These commands are very messed up\r\n console.warn('Ignoring commands');\r\n return null;\r\n }\r\n // Remove operations belonging to losing cursors\r\n let filteredOperations = [];\r\n for (let i = 0, len = rawOperations.length; i < len; i++) {\r\n if (!loserCursorsMap.hasOwnProperty(rawOperations[i].identifier.major.toString())) {\r\n filteredOperations.push(rawOperations[i]);\r\n }\r\n }\r\n // TODO@Alex: find a better way to do this.\r\n // give the hint that edit operations are tracked to the model\r\n if (commandsData.hadTrackedEditOperation && filteredOperations.length > 0) {\r\n filteredOperations[0]._isTracked = true;\r\n }\r\n let selectionsAfter = ctx.model.pushEditOperations(ctx.selectionsBefore, filteredOperations, (inverseEditOperations) => {\r\n let groupedInverseEditOperations = [];\r\n for (let i = 0; i < ctx.selectionsBefore.length; i++) {\r\n groupedInverseEditOperations[i] = [];\r\n }\r\n for (const op of inverseEditOperations) {\r\n if (!op.identifier) {\r\n // perhaps auto whitespace trim edits\r\n continue;\r\n }\r\n groupedInverseEditOperations[op.identifier.major].push(op);\r\n }\r\n const minorBasedSorter = (a, b) => {\r\n return a.identifier.minor - b.identifier.minor;\r\n };\r\n let cursorSelections = [];\r\n for (let i = 0; i < ctx.selectionsBefore.length; i++) {\r\n if (groupedInverseEditOperations[i].length > 0) {\r\n groupedInverseEditOperations[i].sort(minorBasedSorter);\r\n cursorSelections[i] = commands[i].computeCursorState(ctx.model, {\r\n getInverseEditOperations: () => {\r\n return groupedInverseEditOperations[i];\r\n },\r\n getTrackedSelection: (id) => {\r\n const idx = parseInt(id, 10);\r\n const range = ctx.model._getTrackedRange(ctx.trackedRanges[idx]);\r\n if (ctx.trackedRangesDirection[idx] === 0 /* LTR */) {\r\n return new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);\r\n }\r\n return new Selection(range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn);\r\n }\r\n });\r\n }\r\n else {\r\n cursorSelections[i] = ctx.selectionsBefore[i];\r\n }\r\n }\r\n return cursorSelections;\r\n });\r\n if (!selectionsAfter) {\r\n selectionsAfter = ctx.selectionsBefore;\r\n }\r\n // Extract losing cursors\r\n let losingCursors = [];\r\n for (let losingCursorIndex in loserCursorsMap) {\r\n if (loserCursorsMap.hasOwnProperty(losingCursorIndex)) {\r\n losingCursors.push(parseInt(losingCursorIndex, 10));\r\n }\r\n }\r\n // Sort losing cursors descending\r\n losingCursors.sort((a, b) => {\r\n return b - a;\r\n });\r\n // Remove losing cursors\r\n for (const losingCursor of losingCursors) {\r\n selectionsAfter.splice(losingCursor, 1);\r\n }\r\n return selectionsAfter;\r\n }\r\n static _arrayIsEmpty(commands) {\r\n for (let i = 0, len = commands.length; i < len; i++) {\r\n if (commands[i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n static _getEditOperations(ctx, commands) {\r\n let operations = [];\r\n let hadTrackedEditOperation = false;\r\n for (let i = 0, len = commands.length; i < len; i++) {\r\n const command = commands[i];\r\n if (command) {\r\n const r = this._getEditOperationsFromCommand(ctx, i, command);\r\n operations = operations.concat(r.operations);\r\n hadTrackedEditOperation = hadTrackedEditOperation || r.hadTrackedEditOperation;\r\n }\r\n }\r\n return {\r\n operations: operations,\r\n hadTrackedEditOperation: hadTrackedEditOperation\r\n };\r\n }\r\n static _getEditOperationsFromCommand(ctx, majorIdentifier, command) {\r\n // This method acts as a transaction, if the command fails\r\n // everything it has done is ignored\r\n let operations = [];\r\n let operationMinor = 0;\r\n const addEditOperation = (range, text, forceMoveMarkers = false) => {\r\n if (Range.isEmpty(range) && text === '') {\r\n // This command wants to add a no-op => no thank you\r\n return;\r\n }\r\n operations.push({\r\n identifier: {\r\n major: majorIdentifier,\r\n minor: operationMinor++\r\n },\r\n range: range,\r\n text: text,\r\n forceMoveMarkers: forceMoveMarkers,\r\n isAutoWhitespaceEdit: command.insertsAutoWhitespace\r\n });\r\n };\r\n let hadTrackedEditOperation = false;\r\n const addTrackedEditOperation = (selection, text, forceMoveMarkers) => {\r\n hadTrackedEditOperation = true;\r\n addEditOperation(selection, text, forceMoveMarkers);\r\n };\r\n const trackSelection = (_selection, trackPreviousOnEmpty) => {\r\n const selection = Selection.liftSelection(_selection);\r\n let stickiness;\r\n if (selection.isEmpty()) {\r\n if (typeof trackPreviousOnEmpty === 'boolean') {\r\n if (trackPreviousOnEmpty) {\r\n stickiness = 2 /* GrowsOnlyWhenTypingBefore */;\r\n }\r\n else {\r\n stickiness = 3 /* GrowsOnlyWhenTypingAfter */;\r\n }\r\n }\r\n else {\r\n // Try to lock it with surrounding text\r\n const maxLineColumn = ctx.model.getLineMaxColumn(selection.startLineNumber);\r\n if (selection.startColumn === maxLineColumn) {\r\n stickiness = 2 /* GrowsOnlyWhenTypingBefore */;\r\n }\r\n else {\r\n stickiness = 3 /* GrowsOnlyWhenTypingAfter */;\r\n }\r\n }\r\n }\r\n else {\r\n stickiness = 1 /* NeverGrowsWhenTypingAtEdges */;\r\n }\r\n const l = ctx.trackedRanges.length;\r\n const id = ctx.model._setTrackedRange(null, selection, stickiness);\r\n ctx.trackedRanges[l] = id;\r\n ctx.trackedRangesDirection[l] = selection.getDirection();\r\n return l.toString();\r\n };\r\n const editOperationBuilder = {\r\n addEditOperation: addEditOperation,\r\n addTrackedEditOperation: addTrackedEditOperation,\r\n trackSelection: trackSelection\r\n };\r\n try {\r\n command.getEditOperations(ctx.model, editOperationBuilder);\r\n }\r\n catch (e) {\r\n // TODO@Alex use notification service if this should be user facing\r\n // e.friendlyMessage = nls.localize('corrupt.commands', \"Unexpected exception while executing command.\");\r\n onUnexpectedError(e);\r\n return {\r\n operations: [],\r\n hadTrackedEditOperation: false\r\n };\r\n }\r\n return {\r\n operations: operations,\r\n hadTrackedEditOperation: hadTrackedEditOperation\r\n };\r\n }\r\n static _getLoserCursorMap(operations) {\r\n // This is destructive on the array\r\n operations = operations.slice(0);\r\n // Sort operations with last one first\r\n operations.sort((a, b) => {\r\n // Note the minus!\r\n return -(Range.compareRangesUsingEnds(a.range, b.range));\r\n });\r\n // Operations can not overlap!\r\n let loserCursorsMap = {};\r\n for (let i = 1; i < operations.length; i++) {\r\n const previousOp = operations[i - 1];\r\n const currentOp = operations[i];\r\n if (Range.getStartPosition(previousOp.range).isBefore(Range.getEndPosition(currentOp.range))) {\r\n let loserMajor;\r\n if (previousOp.identifier.major > currentOp.identifier.major) {\r\n // previousOp loses the battle\r\n loserMajor = previousOp.identifier.major;\r\n }\r\n else {\r\n loserMajor = currentOp.identifier.major;\r\n }\r\n loserCursorsMap[loserMajor.toString()] = true;\r\n for (let j = 0; j < operations.length; j++) {\r\n if (operations[j].identifier.major === loserMajor) {\r\n operations.splice(j, 1);\r\n if (j < i) {\r\n i--;\r\n }\r\n j--;\r\n }\r\n }\r\n if (i > 0) {\r\n i--;\r\n }\r\n }\r\n }\r\n return loserCursorsMap;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as strings from '../../../base/common/strings.js';\r\nclass PendingChanges {\r\n constructor() {\r\n this._hasPending = false;\r\n this._inserts = [];\r\n this._changes = [];\r\n this._removes = [];\r\n }\r\n insert(x) {\r\n this._hasPending = true;\r\n this._inserts.push(x);\r\n }\r\n change(x) {\r\n this._hasPending = true;\r\n this._changes.push(x);\r\n }\r\n remove(x) {\r\n this._hasPending = true;\r\n this._removes.push(x);\r\n }\r\n mustCommit() {\r\n return this._hasPending;\r\n }\r\n commit(linesLayout) {\r\n if (!this._hasPending) {\r\n return;\r\n }\r\n const inserts = this._inserts;\r\n const changes = this._changes;\r\n const removes = this._removes;\r\n this._hasPending = false;\r\n this._inserts = [];\r\n this._changes = [];\r\n this._removes = [];\r\n linesLayout._commitPendingChanges(inserts, changes, removes);\r\n }\r\n}\r\nexport class EditorWhitespace {\r\n constructor(id, afterLineNumber, ordinal, height, minWidth) {\r\n this.id = id;\r\n this.afterLineNumber = afterLineNumber;\r\n this.ordinal = ordinal;\r\n this.height = height;\r\n this.minWidth = minWidth;\r\n this.prefixSum = 0;\r\n }\r\n}\r\n/**\r\n * Layouting of objects that take vertical space (by having a height) and push down other objects.\r\n *\r\n * These objects are basically either text (lines) or spaces between those lines (whitespaces).\r\n * This provides commodity operations for working with lines that contain whitespace that pushes lines lower (vertically).\r\n */\r\nexport class LinesLayout {\r\n constructor(lineCount, lineHeight, paddingTop, paddingBottom) {\r\n this._instanceId = strings.singleLetterHash(++LinesLayout.INSTANCE_COUNT);\r\n this._pendingChanges = new PendingChanges();\r\n this._lastWhitespaceId = 0;\r\n this._arr = [];\r\n this._prefixSumValidIndex = -1;\r\n this._minWidth = -1; /* marker for not being computed */\r\n this._lineCount = lineCount;\r\n this._lineHeight = lineHeight;\r\n this._paddingTop = paddingTop;\r\n this._paddingBottom = paddingBottom;\r\n }\r\n /**\r\n * Find the insertion index for a new value inside a sorted array of values.\r\n * If the value is already present in the sorted array, the insertion index will be after the already existing value.\r\n */\r\n static findInsertionIndex(arr, afterLineNumber, ordinal) {\r\n let low = 0;\r\n let high = arr.length;\r\n while (low < high) {\r\n const mid = ((low + high) >>> 1);\r\n if (afterLineNumber === arr[mid].afterLineNumber) {\r\n if (ordinal < arr[mid].ordinal) {\r\n high = mid;\r\n }\r\n else {\r\n low = mid + 1;\r\n }\r\n }\r\n else if (afterLineNumber < arr[mid].afterLineNumber) {\r\n high = mid;\r\n }\r\n else {\r\n low = mid + 1;\r\n }\r\n }\r\n return low;\r\n }\r\n /**\r\n * Change the height of a line in pixels.\r\n */\r\n setLineHeight(lineHeight) {\r\n this._checkPendingChanges();\r\n this._lineHeight = lineHeight;\r\n }\r\n /**\r\n * Changes the padding used to calculate vertical offsets.\r\n */\r\n setPadding(paddingTop, paddingBottom) {\r\n this._paddingTop = paddingTop;\r\n this._paddingBottom = paddingBottom;\r\n }\r\n /**\r\n * Set the number of lines.\r\n *\r\n * @param lineCount New number of lines.\r\n */\r\n onFlushed(lineCount) {\r\n this._checkPendingChanges();\r\n this._lineCount = lineCount;\r\n }\r\n changeWhitespace(callback) {\r\n let hadAChange = false;\r\n try {\r\n const accessor = {\r\n insertWhitespace: (afterLineNumber, ordinal, heightInPx, minWidth) => {\r\n hadAChange = true;\r\n afterLineNumber = afterLineNumber | 0;\r\n ordinal = ordinal | 0;\r\n heightInPx = heightInPx | 0;\r\n minWidth = minWidth | 0;\r\n const id = this._instanceId + (++this._lastWhitespaceId);\r\n this._pendingChanges.insert(new EditorWhitespace(id, afterLineNumber, ordinal, heightInPx, minWidth));\r\n return id;\r\n },\r\n changeOneWhitespace: (id, newAfterLineNumber, newHeight) => {\r\n hadAChange = true;\r\n newAfterLineNumber = newAfterLineNumber | 0;\r\n newHeight = newHeight | 0;\r\n this._pendingChanges.change({ id, newAfterLineNumber, newHeight });\r\n },\r\n removeWhitespace: (id) => {\r\n hadAChange = true;\r\n this._pendingChanges.remove({ id });\r\n }\r\n };\r\n callback(accessor);\r\n }\r\n finally {\r\n this._pendingChanges.commit(this);\r\n }\r\n return hadAChange;\r\n }\r\n _commitPendingChanges(inserts, changes, removes) {\r\n if (inserts.length > 0 || removes.length > 0) {\r\n this._minWidth = -1; /* marker for not being computed */\r\n }\r\n if (inserts.length + changes.length + removes.length <= 1) {\r\n // when only one thing happened, handle it \"delicately\"\r\n for (const insert of inserts) {\r\n this._insertWhitespace(insert);\r\n }\r\n for (const change of changes) {\r\n this._changeOneWhitespace(change.id, change.newAfterLineNumber, change.newHeight);\r\n }\r\n for (const remove of removes) {\r\n const index = this._findWhitespaceIndex(remove.id);\r\n if (index === -1) {\r\n continue;\r\n }\r\n this._removeWhitespace(index);\r\n }\r\n return;\r\n }\r\n // simply rebuild the entire datastructure\r\n const toRemove = new Set();\r\n for (const remove of removes) {\r\n toRemove.add(remove.id);\r\n }\r\n const toChange = new Map();\r\n for (const change of changes) {\r\n toChange.set(change.id, change);\r\n }\r\n const applyRemoveAndChange = (whitespaces) => {\r\n let result = [];\r\n for (const whitespace of whitespaces) {\r\n if (toRemove.has(whitespace.id)) {\r\n continue;\r\n }\r\n if (toChange.has(whitespace.id)) {\r\n const change = toChange.get(whitespace.id);\r\n whitespace.afterLineNumber = change.newAfterLineNumber;\r\n whitespace.height = change.newHeight;\r\n }\r\n result.push(whitespace);\r\n }\r\n return result;\r\n };\r\n const result = applyRemoveAndChange(this._arr).concat(applyRemoveAndChange(inserts));\r\n result.sort((a, b) => {\r\n if (a.afterLineNumber === b.afterLineNumber) {\r\n return a.ordinal - b.ordinal;\r\n }\r\n return a.afterLineNumber - b.afterLineNumber;\r\n });\r\n this._arr = result;\r\n this._prefixSumValidIndex = -1;\r\n }\r\n _checkPendingChanges() {\r\n if (this._pendingChanges.mustCommit()) {\r\n this._pendingChanges.commit(this);\r\n }\r\n }\r\n _insertWhitespace(whitespace) {\r\n const insertIndex = LinesLayout.findInsertionIndex(this._arr, whitespace.afterLineNumber, whitespace.ordinal);\r\n this._arr.splice(insertIndex, 0, whitespace);\r\n this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, insertIndex - 1);\r\n }\r\n _findWhitespaceIndex(id) {\r\n const arr = this._arr;\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (arr[i].id === id) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }\r\n _changeOneWhitespace(id, newAfterLineNumber, newHeight) {\r\n const index = this._findWhitespaceIndex(id);\r\n if (index === -1) {\r\n return;\r\n }\r\n if (this._arr[index].height !== newHeight) {\r\n this._arr[index].height = newHeight;\r\n this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, index - 1);\r\n }\r\n if (this._arr[index].afterLineNumber !== newAfterLineNumber) {\r\n // `afterLineNumber` changed for this whitespace\r\n // Record old whitespace\r\n const whitespace = this._arr[index];\r\n // Since changing `afterLineNumber` can trigger a reordering, we're gonna remove this whitespace\r\n this._removeWhitespace(index);\r\n whitespace.afterLineNumber = newAfterLineNumber;\r\n // And add it again\r\n this._insertWhitespace(whitespace);\r\n }\r\n }\r\n _removeWhitespace(removeIndex) {\r\n this._arr.splice(removeIndex, 1);\r\n this._prefixSumValidIndex = Math.min(this._prefixSumValidIndex, removeIndex - 1);\r\n }\r\n /**\r\n * Notify the layouter that lines have been deleted (a continuous zone of lines).\r\n *\r\n * @param fromLineNumber The line number at which the deletion started, inclusive\r\n * @param toLineNumber The line number at which the deletion ended, inclusive\r\n */\r\n onLinesDeleted(fromLineNumber, toLineNumber) {\r\n this._checkPendingChanges();\r\n fromLineNumber = fromLineNumber | 0;\r\n toLineNumber = toLineNumber | 0;\r\n this._lineCount -= (toLineNumber - fromLineNumber + 1);\r\n for (let i = 0, len = this._arr.length; i < len; i++) {\r\n const afterLineNumber = this._arr[i].afterLineNumber;\r\n if (fromLineNumber <= afterLineNumber && afterLineNumber <= toLineNumber) {\r\n // The line this whitespace was after has been deleted\r\n // => move whitespace to before first deleted line\r\n this._arr[i].afterLineNumber = fromLineNumber - 1;\r\n }\r\n else if (afterLineNumber > toLineNumber) {\r\n // The line this whitespace was after has been moved up\r\n // => move whitespace up\r\n this._arr[i].afterLineNumber -= (toLineNumber - fromLineNumber + 1);\r\n }\r\n }\r\n }\r\n /**\r\n * Notify the layouter that lines have been inserted (a continuous zone of lines).\r\n *\r\n * @param fromLineNumber The line number at which the insertion started, inclusive\r\n * @param toLineNumber The line number at which the insertion ended, inclusive.\r\n */\r\n onLinesInserted(fromLineNumber, toLineNumber) {\r\n this._checkPendingChanges();\r\n fromLineNumber = fromLineNumber | 0;\r\n toLineNumber = toLineNumber | 0;\r\n this._lineCount += (toLineNumber - fromLineNumber + 1);\r\n for (let i = 0, len = this._arr.length; i < len; i++) {\r\n const afterLineNumber = this._arr[i].afterLineNumber;\r\n if (fromLineNumber <= afterLineNumber) {\r\n this._arr[i].afterLineNumber += (toLineNumber - fromLineNumber + 1);\r\n }\r\n }\r\n }\r\n /**\r\n * Get the sum of all the whitespaces.\r\n */\r\n getWhitespacesTotalHeight() {\r\n this._checkPendingChanges();\r\n if (this._arr.length === 0) {\r\n return 0;\r\n }\r\n return this.getWhitespacesAccumulatedHeight(this._arr.length - 1);\r\n }\r\n /**\r\n * Return the sum of the heights of the whitespaces at [0..index].\r\n * This includes the whitespace at `index`.\r\n *\r\n * @param index The index of the whitespace.\r\n * @return The sum of the heights of all whitespaces before the one at `index`, including the one at `index`.\r\n */\r\n getWhitespacesAccumulatedHeight(index) {\r\n this._checkPendingChanges();\r\n index = index | 0;\r\n let startIndex = Math.max(0, this._prefixSumValidIndex + 1);\r\n if (startIndex === 0) {\r\n this._arr[0].prefixSum = this._arr[0].height;\r\n startIndex++;\r\n }\r\n for (let i = startIndex; i <= index; i++) {\r\n this._arr[i].prefixSum = this._arr[i - 1].prefixSum + this._arr[i].height;\r\n }\r\n this._prefixSumValidIndex = Math.max(this._prefixSumValidIndex, index);\r\n return this._arr[index].prefixSum;\r\n }\r\n /**\r\n * Get the sum of heights for all objects.\r\n *\r\n * @return The sum of heights for all objects.\r\n */\r\n getLinesTotalHeight() {\r\n this._checkPendingChanges();\r\n const linesHeight = this._lineHeight * this._lineCount;\r\n const whitespacesHeight = this.getWhitespacesTotalHeight();\r\n return linesHeight + whitespacesHeight + this._paddingTop + this._paddingBottom;\r\n }\r\n /**\r\n * Returns the accumulated height of whitespaces before the given line number.\r\n *\r\n * @param lineNumber The line number\r\n */\r\n getWhitespaceAccumulatedHeightBeforeLineNumber(lineNumber) {\r\n this._checkPendingChanges();\r\n lineNumber = lineNumber | 0;\r\n const lastWhitespaceBeforeLineNumber = this._findLastWhitespaceBeforeLineNumber(lineNumber);\r\n if (lastWhitespaceBeforeLineNumber === -1) {\r\n return 0;\r\n }\r\n return this.getWhitespacesAccumulatedHeight(lastWhitespaceBeforeLineNumber);\r\n }\r\n _findLastWhitespaceBeforeLineNumber(lineNumber) {\r\n lineNumber = lineNumber | 0;\r\n // Find the whitespace before line number\r\n const arr = this._arr;\r\n let low = 0;\r\n let high = arr.length - 1;\r\n while (low <= high) {\r\n const delta = (high - low) | 0;\r\n const halfDelta = (delta / 2) | 0;\r\n const mid = (low + halfDelta) | 0;\r\n if (arr[mid].afterLineNumber < lineNumber) {\r\n if (mid + 1 >= arr.length || arr[mid + 1].afterLineNumber >= lineNumber) {\r\n return mid;\r\n }\r\n else {\r\n low = (mid + 1) | 0;\r\n }\r\n }\r\n else {\r\n high = (mid - 1) | 0;\r\n }\r\n }\r\n return -1;\r\n }\r\n _findFirstWhitespaceAfterLineNumber(lineNumber) {\r\n lineNumber = lineNumber | 0;\r\n const lastWhitespaceBeforeLineNumber = this._findLastWhitespaceBeforeLineNumber(lineNumber);\r\n const firstWhitespaceAfterLineNumber = lastWhitespaceBeforeLineNumber + 1;\r\n if (firstWhitespaceAfterLineNumber < this._arr.length) {\r\n return firstWhitespaceAfterLineNumber;\r\n }\r\n return -1;\r\n }\r\n /**\r\n * Find the index of the first whitespace which has `afterLineNumber` >= `lineNumber`.\r\n * @return The index of the first whitespace with `afterLineNumber` >= `lineNumber` or -1 if no whitespace is found.\r\n */\r\n getFirstWhitespaceIndexAfterLineNumber(lineNumber) {\r\n this._checkPendingChanges();\r\n lineNumber = lineNumber | 0;\r\n return this._findFirstWhitespaceAfterLineNumber(lineNumber);\r\n }\r\n /**\r\n * Get the vertical offset (the sum of heights for all objects above) a certain line number.\r\n *\r\n * @param lineNumber The line number\r\n * @return The sum of heights for all objects above `lineNumber`.\r\n */\r\n getVerticalOffsetForLineNumber(lineNumber) {\r\n this._checkPendingChanges();\r\n lineNumber = lineNumber | 0;\r\n let previousLinesHeight;\r\n if (lineNumber > 1) {\r\n previousLinesHeight = this._lineHeight * (lineNumber - 1);\r\n }\r\n else {\r\n previousLinesHeight = 0;\r\n }\r\n const previousWhitespacesHeight = this.getWhitespaceAccumulatedHeightBeforeLineNumber(lineNumber);\r\n return previousLinesHeight + previousWhitespacesHeight + this._paddingTop;\r\n }\r\n /**\r\n * The maximum min width for all whitespaces.\r\n */\r\n getWhitespaceMinWidth() {\r\n this._checkPendingChanges();\r\n if (this._minWidth === -1) {\r\n let minWidth = 0;\r\n for (let i = 0, len = this._arr.length; i < len; i++) {\r\n minWidth = Math.max(minWidth, this._arr[i].minWidth);\r\n }\r\n this._minWidth = minWidth;\r\n }\r\n return this._minWidth;\r\n }\r\n /**\r\n * Check if `verticalOffset` is below all lines.\r\n */\r\n isAfterLines(verticalOffset) {\r\n this._checkPendingChanges();\r\n const totalHeight = this.getLinesTotalHeight();\r\n return verticalOffset > totalHeight;\r\n }\r\n isInTopPadding(verticalOffset) {\r\n if (this._paddingTop === 0) {\r\n return false;\r\n }\r\n this._checkPendingChanges();\r\n return (verticalOffset < this._paddingTop);\r\n }\r\n isInBottomPadding(verticalOffset) {\r\n if (this._paddingBottom === 0) {\r\n return false;\r\n }\r\n this._checkPendingChanges();\r\n const totalHeight = this.getLinesTotalHeight();\r\n return (verticalOffset >= totalHeight - this._paddingBottom);\r\n }\r\n /**\r\n * Find the first line number that is at or after vertical offset `verticalOffset`.\r\n * i.e. if getVerticalOffsetForLine(line) is x and getVerticalOffsetForLine(line + 1) is y, then\r\n * getLineNumberAtOrAfterVerticalOffset(i) = line, x <= i < y.\r\n *\r\n * @param verticalOffset The vertical offset to search at.\r\n * @return The line number at or after vertical offset `verticalOffset`.\r\n */\r\n getLineNumberAtOrAfterVerticalOffset(verticalOffset) {\r\n this._checkPendingChanges();\r\n verticalOffset = verticalOffset | 0;\r\n if (verticalOffset < 0) {\r\n return 1;\r\n }\r\n const linesCount = this._lineCount | 0;\r\n const lineHeight = this._lineHeight;\r\n let minLineNumber = 1;\r\n let maxLineNumber = linesCount;\r\n while (minLineNumber < maxLineNumber) {\r\n const midLineNumber = ((minLineNumber + maxLineNumber) / 2) | 0;\r\n const midLineNumberVerticalOffset = this.getVerticalOffsetForLineNumber(midLineNumber) | 0;\r\n if (verticalOffset >= midLineNumberVerticalOffset + lineHeight) {\r\n // vertical offset is after mid line number\r\n minLineNumber = midLineNumber + 1;\r\n }\r\n else if (verticalOffset >= midLineNumberVerticalOffset) {\r\n // Hit\r\n return midLineNumber;\r\n }\r\n else {\r\n // vertical offset is before mid line number, but mid line number could still be what we're searching for\r\n maxLineNumber = midLineNumber;\r\n }\r\n }\r\n if (minLineNumber > linesCount) {\r\n return linesCount;\r\n }\r\n return minLineNumber;\r\n }\r\n /**\r\n * Get all the lines and their relative vertical offsets that are positioned between `verticalOffset1` and `verticalOffset2`.\r\n *\r\n * @param verticalOffset1 The beginning of the viewport.\r\n * @param verticalOffset2 The end of the viewport.\r\n * @return A structure describing the lines positioned between `verticalOffset1` and `verticalOffset2`.\r\n */\r\n getLinesViewportData(verticalOffset1, verticalOffset2) {\r\n this._checkPendingChanges();\r\n verticalOffset1 = verticalOffset1 | 0;\r\n verticalOffset2 = verticalOffset2 | 0;\r\n const lineHeight = this._lineHeight;\r\n // Find first line number\r\n // We don't live in a perfect world, so the line number might start before or after verticalOffset1\r\n const startLineNumber = this.getLineNumberAtOrAfterVerticalOffset(verticalOffset1) | 0;\r\n const startLineNumberVerticalOffset = this.getVerticalOffsetForLineNumber(startLineNumber) | 0;\r\n let endLineNumber = this._lineCount | 0;\r\n // Also keep track of what whitespace we've got\r\n let whitespaceIndex = this.getFirstWhitespaceIndexAfterLineNumber(startLineNumber) | 0;\r\n const whitespaceCount = this.getWhitespacesCount() | 0;\r\n let currentWhitespaceHeight;\r\n let currentWhitespaceAfterLineNumber;\r\n if (whitespaceIndex === -1) {\r\n whitespaceIndex = whitespaceCount;\r\n currentWhitespaceAfterLineNumber = endLineNumber + 1;\r\n currentWhitespaceHeight = 0;\r\n }\r\n else {\r\n currentWhitespaceAfterLineNumber = this.getAfterLineNumberForWhitespaceIndex(whitespaceIndex) | 0;\r\n currentWhitespaceHeight = this.getHeightForWhitespaceIndex(whitespaceIndex) | 0;\r\n }\r\n let currentVerticalOffset = startLineNumberVerticalOffset;\r\n let currentLineRelativeOffset = currentVerticalOffset;\r\n // IE (all versions) cannot handle units above about 1,533,908 px, so every 500k pixels bring numbers down\r\n const STEP_SIZE = 500000;\r\n let bigNumbersDelta = 0;\r\n if (startLineNumberVerticalOffset >= STEP_SIZE) {\r\n // Compute a delta that guarantees that lines are positioned at `lineHeight` increments\r\n bigNumbersDelta = Math.floor(startLineNumberVerticalOffset / STEP_SIZE) * STEP_SIZE;\r\n bigNumbersDelta = Math.floor(bigNumbersDelta / lineHeight) * lineHeight;\r\n currentLineRelativeOffset -= bigNumbersDelta;\r\n }\r\n const linesOffsets = [];\r\n const verticalCenter = verticalOffset1 + (verticalOffset2 - verticalOffset1) / 2;\r\n let centeredLineNumber = -1;\r\n // Figure out how far the lines go\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n if (centeredLineNumber === -1) {\r\n const currentLineTop = currentVerticalOffset;\r\n const currentLineBottom = currentVerticalOffset + lineHeight;\r\n if ((currentLineTop <= verticalCenter && verticalCenter < currentLineBottom) || currentLineTop > verticalCenter) {\r\n centeredLineNumber = lineNumber;\r\n }\r\n }\r\n // Count current line height in the vertical offsets\r\n currentVerticalOffset += lineHeight;\r\n linesOffsets[lineNumber - startLineNumber] = currentLineRelativeOffset;\r\n // Next line starts immediately after this one\r\n currentLineRelativeOffset += lineHeight;\r\n while (currentWhitespaceAfterLineNumber === lineNumber) {\r\n // Push down next line with the height of the current whitespace\r\n currentLineRelativeOffset += currentWhitespaceHeight;\r\n // Count current whitespace in the vertical offsets\r\n currentVerticalOffset += currentWhitespaceHeight;\r\n whitespaceIndex++;\r\n if (whitespaceIndex >= whitespaceCount) {\r\n currentWhitespaceAfterLineNumber = endLineNumber + 1;\r\n }\r\n else {\r\n currentWhitespaceAfterLineNumber = this.getAfterLineNumberForWhitespaceIndex(whitespaceIndex) | 0;\r\n currentWhitespaceHeight = this.getHeightForWhitespaceIndex(whitespaceIndex) | 0;\r\n }\r\n }\r\n if (currentVerticalOffset >= verticalOffset2) {\r\n // We have covered the entire viewport area, time to stop\r\n endLineNumber = lineNumber;\r\n break;\r\n }\r\n }\r\n if (centeredLineNumber === -1) {\r\n centeredLineNumber = endLineNumber;\r\n }\r\n const endLineNumberVerticalOffset = this.getVerticalOffsetForLineNumber(endLineNumber) | 0;\r\n let completelyVisibleStartLineNumber = startLineNumber;\r\n let completelyVisibleEndLineNumber = endLineNumber;\r\n if (completelyVisibleStartLineNumber < completelyVisibleEndLineNumber) {\r\n if (startLineNumberVerticalOffset < verticalOffset1) {\r\n completelyVisibleStartLineNumber++;\r\n }\r\n }\r\n if (completelyVisibleStartLineNumber < completelyVisibleEndLineNumber) {\r\n if (endLineNumberVerticalOffset + lineHeight > verticalOffset2) {\r\n completelyVisibleEndLineNumber--;\r\n }\r\n }\r\n return {\r\n bigNumbersDelta: bigNumbersDelta,\r\n startLineNumber: startLineNumber,\r\n endLineNumber: endLineNumber,\r\n relativeVerticalOffset: linesOffsets,\r\n centeredLineNumber: centeredLineNumber,\r\n completelyVisibleStartLineNumber: completelyVisibleStartLineNumber,\r\n completelyVisibleEndLineNumber: completelyVisibleEndLineNumber\r\n };\r\n }\r\n getVerticalOffsetForWhitespaceIndex(whitespaceIndex) {\r\n this._checkPendingChanges();\r\n whitespaceIndex = whitespaceIndex | 0;\r\n const afterLineNumber = this.getAfterLineNumberForWhitespaceIndex(whitespaceIndex);\r\n let previousLinesHeight;\r\n if (afterLineNumber >= 1) {\r\n previousLinesHeight = this._lineHeight * afterLineNumber;\r\n }\r\n else {\r\n previousLinesHeight = 0;\r\n }\r\n let previousWhitespacesHeight;\r\n if (whitespaceIndex > 0) {\r\n previousWhitespacesHeight = this.getWhitespacesAccumulatedHeight(whitespaceIndex - 1);\r\n }\r\n else {\r\n previousWhitespacesHeight = 0;\r\n }\r\n return previousLinesHeight + previousWhitespacesHeight + this._paddingTop;\r\n }\r\n getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset) {\r\n this._checkPendingChanges();\r\n verticalOffset = verticalOffset | 0;\r\n let minWhitespaceIndex = 0;\r\n let maxWhitespaceIndex = this.getWhitespacesCount() - 1;\r\n if (maxWhitespaceIndex < 0) {\r\n return -1;\r\n }\r\n // Special case: nothing to be found\r\n const maxWhitespaceVerticalOffset = this.getVerticalOffsetForWhitespaceIndex(maxWhitespaceIndex);\r\n const maxWhitespaceHeight = this.getHeightForWhitespaceIndex(maxWhitespaceIndex);\r\n if (verticalOffset >= maxWhitespaceVerticalOffset + maxWhitespaceHeight) {\r\n return -1;\r\n }\r\n while (minWhitespaceIndex < maxWhitespaceIndex) {\r\n const midWhitespaceIndex = Math.floor((minWhitespaceIndex + maxWhitespaceIndex) / 2);\r\n const midWhitespaceVerticalOffset = this.getVerticalOffsetForWhitespaceIndex(midWhitespaceIndex);\r\n const midWhitespaceHeight = this.getHeightForWhitespaceIndex(midWhitespaceIndex);\r\n if (verticalOffset >= midWhitespaceVerticalOffset + midWhitespaceHeight) {\r\n // vertical offset is after whitespace\r\n minWhitespaceIndex = midWhitespaceIndex + 1;\r\n }\r\n else if (verticalOffset >= midWhitespaceVerticalOffset) {\r\n // Hit\r\n return midWhitespaceIndex;\r\n }\r\n else {\r\n // vertical offset is before whitespace, but midWhitespaceIndex might still be what we're searching for\r\n maxWhitespaceIndex = midWhitespaceIndex;\r\n }\r\n }\r\n return minWhitespaceIndex;\r\n }\r\n /**\r\n * Get exactly the whitespace that is layouted at `verticalOffset`.\r\n *\r\n * @param verticalOffset The vertical offset.\r\n * @return Precisely the whitespace that is layouted at `verticaloffset` or null.\r\n */\r\n getWhitespaceAtVerticalOffset(verticalOffset) {\r\n this._checkPendingChanges();\r\n verticalOffset = verticalOffset | 0;\r\n const candidateIndex = this.getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset);\r\n if (candidateIndex < 0) {\r\n return null;\r\n }\r\n if (candidateIndex >= this.getWhitespacesCount()) {\r\n return null;\r\n }\r\n const candidateTop = this.getVerticalOffsetForWhitespaceIndex(candidateIndex);\r\n if (candidateTop > verticalOffset) {\r\n return null;\r\n }\r\n const candidateHeight = this.getHeightForWhitespaceIndex(candidateIndex);\r\n const candidateId = this.getIdForWhitespaceIndex(candidateIndex);\r\n const candidateAfterLineNumber = this.getAfterLineNumberForWhitespaceIndex(candidateIndex);\r\n return {\r\n id: candidateId,\r\n afterLineNumber: candidateAfterLineNumber,\r\n verticalOffset: candidateTop,\r\n height: candidateHeight\r\n };\r\n }\r\n /**\r\n * Get a list of whitespaces that are positioned between `verticalOffset1` and `verticalOffset2`.\r\n *\r\n * @param verticalOffset1 The beginning of the viewport.\r\n * @param verticalOffset2 The end of the viewport.\r\n * @return An array with all the whitespaces in the viewport. If no whitespace is in viewport, the array is empty.\r\n */\r\n getWhitespaceViewportData(verticalOffset1, verticalOffset2) {\r\n this._checkPendingChanges();\r\n verticalOffset1 = verticalOffset1 | 0;\r\n verticalOffset2 = verticalOffset2 | 0;\r\n const startIndex = this.getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset1);\r\n const endIndex = this.getWhitespacesCount() - 1;\r\n if (startIndex < 0) {\r\n return [];\r\n }\r\n let result = [];\r\n for (let i = startIndex; i <= endIndex; i++) {\r\n const top = this.getVerticalOffsetForWhitespaceIndex(i);\r\n const height = this.getHeightForWhitespaceIndex(i);\r\n if (top >= verticalOffset2) {\r\n break;\r\n }\r\n result.push({\r\n id: this.getIdForWhitespaceIndex(i),\r\n afterLineNumber: this.getAfterLineNumberForWhitespaceIndex(i),\r\n verticalOffset: top,\r\n height: height\r\n });\r\n }\r\n return result;\r\n }\r\n /**\r\n * Get all whitespaces.\r\n */\r\n getWhitespaces() {\r\n this._checkPendingChanges();\r\n return this._arr.slice(0);\r\n }\r\n /**\r\n * The number of whitespaces.\r\n */\r\n getWhitespacesCount() {\r\n this._checkPendingChanges();\r\n return this._arr.length;\r\n }\r\n /**\r\n * Get the `id` for whitespace at index `index`.\r\n *\r\n * @param index The index of the whitespace.\r\n * @return `id` of whitespace at `index`.\r\n */\r\n getIdForWhitespaceIndex(index) {\r\n this._checkPendingChanges();\r\n index = index | 0;\r\n return this._arr[index].id;\r\n }\r\n /**\r\n * Get the `afterLineNumber` for whitespace at index `index`.\r\n *\r\n * @param index The index of the whitespace.\r\n * @return `afterLineNumber` of whitespace at `index`.\r\n */\r\n getAfterLineNumberForWhitespaceIndex(index) {\r\n this._checkPendingChanges();\r\n index = index | 0;\r\n return this._arr[index].afterLineNumber;\r\n }\r\n /**\r\n * Get the `height` for whitespace at index `index`.\r\n *\r\n * @param index The index of the whitespace.\r\n * @return `height` of whitespace at `index`.\r\n */\r\n getHeightForWhitespaceIndex(index) {\r\n this._checkPendingChanges();\r\n index = index | 0;\r\n return this._arr[index].height;\r\n }\r\n}\r\nLinesLayout.INSTANCE_COUNT = 0;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { Scrollable } from '../../../base/common/scrollable.js';\r\nimport { LinesLayout } from './linesLayout.js';\r\nimport { Viewport } from '../viewModel/viewModel.js';\r\nimport { ContentSizeChangedEvent } from '../viewModel/viewModelEventDispatcher.js';\r\nconst SMOOTH_SCROLLING_TIME = 125;\r\nclass EditorScrollDimensions {\r\n constructor(width, contentWidth, height, contentHeight) {\r\n width = width | 0;\r\n contentWidth = contentWidth | 0;\r\n height = height | 0;\r\n contentHeight = contentHeight | 0;\r\n if (width < 0) {\r\n width = 0;\r\n }\r\n if (contentWidth < 0) {\r\n contentWidth = 0;\r\n }\r\n if (height < 0) {\r\n height = 0;\r\n }\r\n if (contentHeight < 0) {\r\n contentHeight = 0;\r\n }\r\n this.width = width;\r\n this.contentWidth = contentWidth;\r\n this.scrollWidth = Math.max(width, contentWidth);\r\n this.height = height;\r\n this.contentHeight = contentHeight;\r\n this.scrollHeight = Math.max(height, contentHeight);\r\n }\r\n equals(other) {\r\n return (this.width === other.width\r\n && this.contentWidth === other.contentWidth\r\n && this.height === other.height\r\n && this.contentHeight === other.contentHeight);\r\n }\r\n}\r\nclass EditorScrollable extends Disposable {\r\n constructor(smoothScrollDuration, scheduleAtNextAnimationFrame) {\r\n super();\r\n this._onDidContentSizeChange = this._register(new Emitter());\r\n this.onDidContentSizeChange = this._onDidContentSizeChange.event;\r\n this._dimensions = new EditorScrollDimensions(0, 0, 0, 0);\r\n this._scrollable = this._register(new Scrollable(smoothScrollDuration, scheduleAtNextAnimationFrame));\r\n this.onDidScroll = this._scrollable.onScroll;\r\n }\r\n getScrollable() {\r\n return this._scrollable;\r\n }\r\n setSmoothScrollDuration(smoothScrollDuration) {\r\n this._scrollable.setSmoothScrollDuration(smoothScrollDuration);\r\n }\r\n validateScrollPosition(scrollPosition) {\r\n return this._scrollable.validateScrollPosition(scrollPosition);\r\n }\r\n getScrollDimensions() {\r\n return this._dimensions;\r\n }\r\n setScrollDimensions(dimensions) {\r\n if (this._dimensions.equals(dimensions)) {\r\n return;\r\n }\r\n const oldDimensions = this._dimensions;\r\n this._dimensions = dimensions;\r\n this._scrollable.setScrollDimensions({\r\n width: dimensions.width,\r\n scrollWidth: dimensions.scrollWidth,\r\n height: dimensions.height,\r\n scrollHeight: dimensions.scrollHeight\r\n }, true);\r\n const contentWidthChanged = (oldDimensions.contentWidth !== dimensions.contentWidth);\r\n const contentHeightChanged = (oldDimensions.contentHeight !== dimensions.contentHeight);\r\n if (contentWidthChanged || contentHeightChanged) {\r\n this._onDidContentSizeChange.fire(new ContentSizeChangedEvent(oldDimensions.contentWidth, oldDimensions.contentHeight, dimensions.contentWidth, dimensions.contentHeight));\r\n }\r\n }\r\n getFutureScrollPosition() {\r\n return this._scrollable.getFutureScrollPosition();\r\n }\r\n getCurrentScrollPosition() {\r\n return this._scrollable.getCurrentScrollPosition();\r\n }\r\n setScrollPositionNow(update) {\r\n this._scrollable.setScrollPositionNow(update);\r\n }\r\n setScrollPositionSmooth(update) {\r\n this._scrollable.setScrollPositionSmooth(update);\r\n }\r\n}\r\nexport class ViewLayout extends Disposable {\r\n constructor(configuration, lineCount, scheduleAtNextAnimationFrame) {\r\n super();\r\n this._configuration = configuration;\r\n const options = this._configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const padding = options.get(69 /* padding */);\r\n this._linesLayout = new LinesLayout(lineCount, options.get(53 /* lineHeight */), padding.top, padding.bottom);\r\n this._scrollable = this._register(new EditorScrollable(0, scheduleAtNextAnimationFrame));\r\n this._configureSmoothScrollDuration();\r\n this._scrollable.setScrollDimensions(new EditorScrollDimensions(layoutInfo.contentWidth, 0, layoutInfo.height, 0));\r\n this.onDidScroll = this._scrollable.onDidScroll;\r\n this.onDidContentSizeChange = this._scrollable.onDidContentSizeChange;\r\n this._updateHeight();\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n getScrollable() {\r\n return this._scrollable.getScrollable();\r\n }\r\n onHeightMaybeChanged() {\r\n this._updateHeight();\r\n }\r\n _configureSmoothScrollDuration() {\r\n this._scrollable.setSmoothScrollDuration(this._configuration.options.get(98 /* smoothScrolling */) ? SMOOTH_SCROLLING_TIME : 0);\r\n }\r\n // ---- begin view event handlers\r\n onConfigurationChanged(e) {\r\n const options = this._configuration.options;\r\n if (e.hasChanged(53 /* lineHeight */)) {\r\n this._linesLayout.setLineHeight(options.get(53 /* lineHeight */));\r\n }\r\n if (e.hasChanged(69 /* padding */)) {\r\n const padding = options.get(69 /* padding */);\r\n this._linesLayout.setPadding(padding.top, padding.bottom);\r\n }\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const width = layoutInfo.contentWidth;\r\n const height = layoutInfo.height;\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n const contentWidth = scrollDimensions.contentWidth;\r\n this._scrollable.setScrollDimensions(new EditorScrollDimensions(width, scrollDimensions.contentWidth, height, this._getContentHeight(width, height, contentWidth)));\r\n }\r\n else {\r\n this._updateHeight();\r\n }\r\n if (e.hasChanged(98 /* smoothScrolling */)) {\r\n this._configureSmoothScrollDuration();\r\n }\r\n }\r\n onFlushed(lineCount) {\r\n this._linesLayout.onFlushed(lineCount);\r\n }\r\n onLinesDeleted(fromLineNumber, toLineNumber) {\r\n this._linesLayout.onLinesDeleted(fromLineNumber, toLineNumber);\r\n }\r\n onLinesInserted(fromLineNumber, toLineNumber) {\r\n this._linesLayout.onLinesInserted(fromLineNumber, toLineNumber);\r\n }\r\n // ---- end view event handlers\r\n _getHorizontalScrollbarHeight(width, scrollWidth) {\r\n const options = this._configuration.options;\r\n const scrollbar = options.get(87 /* scrollbar */);\r\n if (scrollbar.horizontal === 2 /* Hidden */) {\r\n // horizontal scrollbar not visible\r\n return 0;\r\n }\r\n if (width >= scrollWidth) {\r\n // horizontal scrollbar not visible\r\n return 0;\r\n }\r\n return scrollbar.horizontalScrollbarSize;\r\n }\r\n _getContentHeight(width, height, contentWidth) {\r\n const options = this._configuration.options;\r\n let result = this._linesLayout.getLinesTotalHeight();\r\n if (options.get(89 /* scrollBeyondLastLine */)) {\r\n result += Math.max(0, height - options.get(53 /* lineHeight */) - options.get(69 /* padding */).bottom);\r\n }\r\n else {\r\n result += this._getHorizontalScrollbarHeight(width, contentWidth);\r\n }\r\n return result;\r\n }\r\n _updateHeight() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n const width = scrollDimensions.width;\r\n const height = scrollDimensions.height;\r\n const contentWidth = scrollDimensions.contentWidth;\r\n this._scrollable.setScrollDimensions(new EditorScrollDimensions(width, scrollDimensions.contentWidth, height, this._getContentHeight(width, height, contentWidth)));\r\n }\r\n // ---- Layouting logic\r\n getCurrentViewport() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n const currentScrollPosition = this._scrollable.getCurrentScrollPosition();\r\n return new Viewport(currentScrollPosition.scrollTop, currentScrollPosition.scrollLeft, scrollDimensions.width, scrollDimensions.height);\r\n }\r\n getFutureViewport() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n const currentScrollPosition = this._scrollable.getFutureScrollPosition();\r\n return new Viewport(currentScrollPosition.scrollTop, currentScrollPosition.scrollLeft, scrollDimensions.width, scrollDimensions.height);\r\n }\r\n _computeContentWidth(maxLineWidth) {\r\n const options = this._configuration.options;\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n if (wrappingInfo.isViewportWrapping) {\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const minimap = options.get(59 /* minimap */);\r\n if (maxLineWidth > layoutInfo.contentWidth + fontInfo.typicalHalfwidthCharacterWidth) {\r\n // This is a case where viewport wrapping is on, but the line extends above the viewport\r\n if (minimap.enabled && minimap.side === 'right') {\r\n // We need to accomodate the scrollbar width\r\n return maxLineWidth + layoutInfo.verticalScrollbarWidth;\r\n }\r\n }\r\n return maxLineWidth;\r\n }\r\n else {\r\n const extraHorizontalSpace = options.get(88 /* scrollBeyondLastColumn */) * fontInfo.typicalHalfwidthCharacterWidth;\r\n const whitespaceMinWidth = this._linesLayout.getWhitespaceMinWidth();\r\n return Math.max(maxLineWidth + extraHorizontalSpace, whitespaceMinWidth);\r\n }\r\n }\r\n setMaxLineWidth(maxLineWidth) {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n // const newScrollWidth = ;\r\n this._scrollable.setScrollDimensions(new EditorScrollDimensions(scrollDimensions.width, this._computeContentWidth(maxLineWidth), scrollDimensions.height, scrollDimensions.contentHeight));\r\n // The height might depend on the fact that there is a horizontal scrollbar or not\r\n this._updateHeight();\r\n }\r\n // ---- view state\r\n saveState() {\r\n const currentScrollPosition = this._scrollable.getFutureScrollPosition();\r\n let scrollTop = currentScrollPosition.scrollTop;\r\n let firstLineNumberInViewport = this._linesLayout.getLineNumberAtOrAfterVerticalOffset(scrollTop);\r\n let whitespaceAboveFirstLine = this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(firstLineNumberInViewport);\r\n return {\r\n scrollTop: scrollTop,\r\n scrollTopWithoutViewZones: scrollTop - whitespaceAboveFirstLine,\r\n scrollLeft: currentScrollPosition.scrollLeft\r\n };\r\n }\r\n // ---- IVerticalLayoutProvider\r\n changeWhitespace(callback) {\r\n const hadAChange = this._linesLayout.changeWhitespace(callback);\r\n if (hadAChange) {\r\n this.onHeightMaybeChanged();\r\n }\r\n return hadAChange;\r\n }\r\n getVerticalOffsetForLineNumber(lineNumber) {\r\n return this._linesLayout.getVerticalOffsetForLineNumber(lineNumber);\r\n }\r\n isAfterLines(verticalOffset) {\r\n return this._linesLayout.isAfterLines(verticalOffset);\r\n }\r\n isInTopPadding(verticalOffset) {\r\n return this._linesLayout.isInTopPadding(verticalOffset);\r\n }\r\n isInBottomPadding(verticalOffset) {\r\n return this._linesLayout.isInBottomPadding(verticalOffset);\r\n }\r\n getLineNumberAtVerticalOffset(verticalOffset) {\r\n return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(verticalOffset);\r\n }\r\n getWhitespaceAtVerticalOffset(verticalOffset) {\r\n return this._linesLayout.getWhitespaceAtVerticalOffset(verticalOffset);\r\n }\r\n getLinesViewportData() {\r\n const visibleBox = this.getCurrentViewport();\r\n return this._linesLayout.getLinesViewportData(visibleBox.top, visibleBox.top + visibleBox.height);\r\n }\r\n getLinesViewportDataAtScrollTop(scrollTop) {\r\n // do some minimal validations on scrollTop\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n if (scrollTop + scrollDimensions.height > scrollDimensions.scrollHeight) {\r\n scrollTop = scrollDimensions.scrollHeight - scrollDimensions.height;\r\n }\r\n if (scrollTop < 0) {\r\n scrollTop = 0;\r\n }\r\n return this._linesLayout.getLinesViewportData(scrollTop, scrollTop + scrollDimensions.height);\r\n }\r\n getWhitespaceViewportData() {\r\n const visibleBox = this.getCurrentViewport();\r\n return this._linesLayout.getWhitespaceViewportData(visibleBox.top, visibleBox.top + visibleBox.height);\r\n }\r\n getWhitespaces() {\r\n return this._linesLayout.getWhitespaces();\r\n }\r\n // ---- IScrollingProvider\r\n getContentWidth() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n return scrollDimensions.contentWidth;\r\n }\r\n getScrollWidth() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n return scrollDimensions.scrollWidth;\r\n }\r\n getContentHeight() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n return scrollDimensions.contentHeight;\r\n }\r\n getScrollHeight() {\r\n const scrollDimensions = this._scrollable.getScrollDimensions();\r\n return scrollDimensions.scrollHeight;\r\n }\r\n getCurrentScrollLeft() {\r\n const currentScrollPosition = this._scrollable.getCurrentScrollPosition();\r\n return currentScrollPosition.scrollLeft;\r\n }\r\n getCurrentScrollTop() {\r\n const currentScrollPosition = this._scrollable.getCurrentScrollPosition();\r\n return currentScrollPosition.scrollTop;\r\n }\r\n validateScrollPosition(scrollPosition) {\r\n return this._scrollable.validateScrollPosition(scrollPosition);\r\n }\r\n setScrollPosition(position, type) {\r\n if (type === 1 /* Immediate */) {\r\n this._scrollable.setScrollPositionNow(position);\r\n }\r\n else {\r\n this._scrollable.setScrollPositionSmooth(position);\r\n }\r\n }\r\n deltaScrollNow(deltaScrollLeft, deltaScrollTop) {\r\n const currentScrollPosition = this._scrollable.getCurrentScrollPosition();\r\n this._scrollable.setScrollPositionNow({\r\n scrollLeft: currentScrollPosition.scrollLeft + deltaScrollLeft,\r\n scrollTop: currentScrollPosition.scrollTop + deltaScrollTop\r\n });\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as arrays from '../../../base/common/arrays.js';\r\nimport { Position } from '../core/position.js';\r\nimport { Range } from '../core/range.js';\r\nimport { ModelDecorationOptions } from '../model/textModel.js';\r\nimport * as viewEvents from '../view/viewEvents.js';\r\nimport { PrefixSumIndexOfResult } from './prefixSumComputer.js';\r\nimport { LineBreakData, ViewLineData } from './viewModel.js';\r\nexport class CoordinatesConverter {\r\n constructor(lines) {\r\n this._lines = lines;\r\n }\r\n // View -> Model conversion and related methods\r\n convertViewPositionToModelPosition(viewPosition) {\r\n return this._lines.convertViewPositionToModelPosition(viewPosition.lineNumber, viewPosition.column);\r\n }\r\n convertViewRangeToModelRange(viewRange) {\r\n return this._lines.convertViewRangeToModelRange(viewRange);\r\n }\r\n validateViewPosition(viewPosition, expectedModelPosition) {\r\n return this._lines.validateViewPosition(viewPosition.lineNumber, viewPosition.column, expectedModelPosition);\r\n }\r\n validateViewRange(viewRange, expectedModelRange) {\r\n return this._lines.validateViewRange(viewRange, expectedModelRange);\r\n }\r\n // Model -> View conversion and related methods\r\n convertModelPositionToViewPosition(modelPosition) {\r\n return this._lines.convertModelPositionToViewPosition(modelPosition.lineNumber, modelPosition.column);\r\n }\r\n convertModelRangeToViewRange(modelRange) {\r\n return this._lines.convertModelRangeToViewRange(modelRange);\r\n }\r\n modelPositionIsVisible(modelPosition) {\r\n return this._lines.modelPositionIsVisible(modelPosition.lineNumber, modelPosition.column);\r\n }\r\n getModelLineViewLineCount(modelLineNumber) {\r\n return this._lines.getModelLineViewLineCount(modelLineNumber);\r\n }\r\n}\r\nclass LineNumberMapper {\r\n constructor(viewLineCounts) {\r\n this._counts = viewLineCounts;\r\n this._isValid = false;\r\n this._validEndIndex = -1;\r\n this._modelToView = [];\r\n this._viewToModel = [];\r\n }\r\n _invalidate(index) {\r\n this._isValid = false;\r\n this._validEndIndex = Math.min(this._validEndIndex, index - 1);\r\n }\r\n _ensureValid() {\r\n if (this._isValid) {\r\n return;\r\n }\r\n for (let i = this._validEndIndex + 1, len = this._counts.length; i < len; i++) {\r\n const viewLineCount = this._counts[i];\r\n const viewLinesAbove = (i > 0 ? this._modelToView[i - 1] : 0);\r\n this._modelToView[i] = viewLinesAbove + viewLineCount;\r\n for (let j = 0; j < viewLineCount; j++) {\r\n this._viewToModel[viewLinesAbove + j] = i;\r\n }\r\n }\r\n // trim things\r\n this._modelToView.length = this._counts.length;\r\n this._viewToModel.length = this._modelToView[this._modelToView.length - 1];\r\n // mark as valid\r\n this._isValid = true;\r\n this._validEndIndex = this._counts.length - 1;\r\n }\r\n changeValue(index, value) {\r\n if (this._counts[index] === value) {\r\n // no change\r\n return;\r\n }\r\n this._counts[index] = value;\r\n this._invalidate(index);\r\n }\r\n removeValues(start, deleteCount) {\r\n this._counts.splice(start, deleteCount);\r\n this._invalidate(start);\r\n }\r\n insertValues(insertIndex, insertArr) {\r\n this._counts = arrays.arrayInsert(this._counts, insertIndex, insertArr);\r\n this._invalidate(insertIndex);\r\n }\r\n getTotalValue() {\r\n this._ensureValid();\r\n return this._viewToModel.length;\r\n }\r\n getAccumulatedValue(index) {\r\n this._ensureValid();\r\n return this._modelToView[index];\r\n }\r\n getIndexOf(accumulatedValue) {\r\n this._ensureValid();\r\n const modelLineIndex = this._viewToModel[accumulatedValue];\r\n const viewLinesAbove = (modelLineIndex > 0 ? this._modelToView[modelLineIndex - 1] : 0);\r\n return new PrefixSumIndexOfResult(modelLineIndex, accumulatedValue - viewLinesAbove);\r\n }\r\n}\r\nexport class SplitLinesCollection {\r\n constructor(model, domLineBreaksComputerFactory, monospaceLineBreaksComputerFactory, fontInfo, tabSize, wrappingStrategy, wrappingColumn, wrappingIndent) {\r\n this.model = model;\r\n this._validModelVersionId = -1;\r\n this._domLineBreaksComputerFactory = domLineBreaksComputerFactory;\r\n this._monospaceLineBreaksComputerFactory = monospaceLineBreaksComputerFactory;\r\n this.fontInfo = fontInfo;\r\n this.tabSize = tabSize;\r\n this.wrappingStrategy = wrappingStrategy;\r\n this.wrappingColumn = wrappingColumn;\r\n this.wrappingIndent = wrappingIndent;\r\n this._constructLines(/*resetHiddenAreas*/ true, null);\r\n }\r\n dispose() {\r\n this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, []);\r\n }\r\n createCoordinatesConverter() {\r\n return new CoordinatesConverter(this);\r\n }\r\n _constructLines(resetHiddenAreas, previousLineBreaks) {\r\n this.lines = [];\r\n if (resetHiddenAreas) {\r\n this.hiddenAreasIds = [];\r\n }\r\n let linesContent = this.model.getLinesContent();\r\n const lineCount = linesContent.length;\r\n const lineBreaksComputer = this.createLineBreaksComputer();\r\n for (let i = 0; i < lineCount; i++) {\r\n lineBreaksComputer.addRequest(linesContent[i], previousLineBreaks ? previousLineBreaks[i] : null);\r\n }\r\n const linesBreaks = lineBreaksComputer.finalize();\r\n let values = [];\r\n let hiddenAreas = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(Range.compareRangesUsingStarts);\r\n let hiddenAreaStart = 1, hiddenAreaEnd = 0;\r\n let hiddenAreaIdx = -1;\r\n let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2;\r\n for (let i = 0; i < lineCount; i++) {\r\n let lineNumber = i + 1;\r\n if (lineNumber === nextLineNumberToUpdateHiddenArea) {\r\n hiddenAreaIdx++;\r\n hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber;\r\n hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber;\r\n nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2;\r\n }\r\n let isInHiddenArea = (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd);\r\n let line = createSplitLine(linesBreaks[i], !isInHiddenArea);\r\n values[i] = line.getViewLineCount();\r\n this.lines[i] = line;\r\n }\r\n this._validModelVersionId = this.model.getVersionId();\r\n this.prefixSumComputer = new LineNumberMapper(values);\r\n }\r\n getHiddenAreas() {\r\n return this.hiddenAreasIds.map((decId) => {\r\n return this.model.getDecorationRange(decId);\r\n });\r\n }\r\n _reduceRanges(_ranges) {\r\n if (_ranges.length === 0) {\r\n return [];\r\n }\r\n let ranges = _ranges.map(r => this.model.validateRange(r)).sort(Range.compareRangesUsingStarts);\r\n let result = [];\r\n let currentRangeStart = ranges[0].startLineNumber;\r\n let currentRangeEnd = ranges[0].endLineNumber;\r\n for (let i = 1, len = ranges.length; i < len; i++) {\r\n let range = ranges[i];\r\n if (range.startLineNumber > currentRangeEnd + 1) {\r\n result.push(new Range(currentRangeStart, 1, currentRangeEnd, 1));\r\n currentRangeStart = range.startLineNumber;\r\n currentRangeEnd = range.endLineNumber;\r\n }\r\n else if (range.endLineNumber > currentRangeEnd) {\r\n currentRangeEnd = range.endLineNumber;\r\n }\r\n }\r\n result.push(new Range(currentRangeStart, 1, currentRangeEnd, 1));\r\n return result;\r\n }\r\n setHiddenAreas(_ranges) {\r\n let newRanges = this._reduceRanges(_ranges);\r\n // BEGIN TODO@Martin: Please stop calling this method on each model change!\r\n let oldRanges = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(Range.compareRangesUsingStarts);\r\n if (newRanges.length === oldRanges.length) {\r\n let hasDifference = false;\r\n for (let i = 0; i < newRanges.length; i++) {\r\n if (!newRanges[i].equalsRange(oldRanges[i])) {\r\n hasDifference = true;\r\n break;\r\n }\r\n }\r\n if (!hasDifference) {\r\n return false;\r\n }\r\n }\r\n // END TODO@Martin: Please stop calling this method on each model change!\r\n let newDecorations = [];\r\n for (const newRange of newRanges) {\r\n newDecorations.push({\r\n range: newRange,\r\n options: ModelDecorationOptions.EMPTY\r\n });\r\n }\r\n this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, newDecorations);\r\n let hiddenAreas = newRanges;\r\n let hiddenAreaStart = 1, hiddenAreaEnd = 0;\r\n let hiddenAreaIdx = -1;\r\n let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2;\r\n let hasVisibleLine = false;\r\n for (let i = 0; i < this.lines.length; i++) {\r\n let lineNumber = i + 1;\r\n if (lineNumber === nextLineNumberToUpdateHiddenArea) {\r\n hiddenAreaIdx++;\r\n hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber;\r\n hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber;\r\n nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2;\r\n }\r\n let lineChanged = false;\r\n if (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd) {\r\n // Line should be hidden\r\n if (this.lines[i].isVisible()) {\r\n this.lines[i] = this.lines[i].setVisible(false);\r\n lineChanged = true;\r\n }\r\n }\r\n else {\r\n hasVisibleLine = true;\r\n // Line should be visible\r\n if (!this.lines[i].isVisible()) {\r\n this.lines[i] = this.lines[i].setVisible(true);\r\n lineChanged = true;\r\n }\r\n }\r\n if (lineChanged) {\r\n let newOutputLineCount = this.lines[i].getViewLineCount();\r\n this.prefixSumComputer.changeValue(i, newOutputLineCount);\r\n }\r\n }\r\n if (!hasVisibleLine) {\r\n // Cannot have everything be hidden => reveal everything!\r\n this.setHiddenAreas([]);\r\n }\r\n return true;\r\n }\r\n modelPositionIsVisible(modelLineNumber, _modelColumn) {\r\n if (modelLineNumber < 1 || modelLineNumber > this.lines.length) {\r\n // invalid arguments\r\n return false;\r\n }\r\n return this.lines[modelLineNumber - 1].isVisible();\r\n }\r\n getModelLineViewLineCount(modelLineNumber) {\r\n if (modelLineNumber < 1 || modelLineNumber > this.lines.length) {\r\n // invalid arguments\r\n return 1;\r\n }\r\n return this.lines[modelLineNumber - 1].getViewLineCount();\r\n }\r\n setTabSize(newTabSize) {\r\n if (this.tabSize === newTabSize) {\r\n return false;\r\n }\r\n this.tabSize = newTabSize;\r\n this._constructLines(/*resetHiddenAreas*/ false, null);\r\n return true;\r\n }\r\n setWrappingSettings(fontInfo, wrappingStrategy, wrappingColumn, wrappingIndent) {\r\n const equalFontInfo = this.fontInfo.equals(fontInfo);\r\n const equalWrappingStrategy = (this.wrappingStrategy === wrappingStrategy);\r\n const equalWrappingColumn = (this.wrappingColumn === wrappingColumn);\r\n const equalWrappingIndent = (this.wrappingIndent === wrappingIndent);\r\n if (equalFontInfo && equalWrappingStrategy && equalWrappingColumn && equalWrappingIndent) {\r\n return false;\r\n }\r\n const onlyWrappingColumnChanged = (equalFontInfo && equalWrappingStrategy && !equalWrappingColumn && equalWrappingIndent);\r\n this.fontInfo = fontInfo;\r\n this.wrappingStrategy = wrappingStrategy;\r\n this.wrappingColumn = wrappingColumn;\r\n this.wrappingIndent = wrappingIndent;\r\n let previousLineBreaks = null;\r\n if (onlyWrappingColumnChanged) {\r\n previousLineBreaks = [];\r\n for (let i = 0, len = this.lines.length; i < len; i++) {\r\n previousLineBreaks[i] = this.lines[i].getLineBreakData();\r\n }\r\n }\r\n this._constructLines(/*resetHiddenAreas*/ false, previousLineBreaks);\r\n return true;\r\n }\r\n createLineBreaksComputer() {\r\n const lineBreaksComputerFactory = (this.wrappingStrategy === 'advanced'\r\n ? this._domLineBreaksComputerFactory\r\n : this._monospaceLineBreaksComputerFactory);\r\n return lineBreaksComputerFactory.createLineBreaksComputer(this.fontInfo, this.tabSize, this.wrappingColumn, this.wrappingIndent);\r\n }\r\n onModelFlushed() {\r\n this._constructLines(/*resetHiddenAreas*/ true, null);\r\n }\r\n onModelLinesDeleted(versionId, fromLineNumber, toLineNumber) {\r\n if (versionId <= this._validModelVersionId) {\r\n // Here we check for versionId in case the lines were reconstructed in the meantime.\r\n // We don't want to apply stale change events on top of a newer read model state.\r\n return null;\r\n }\r\n let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1);\r\n let outputToLineNumber = this.prefixSumComputer.getAccumulatedValue(toLineNumber - 1);\r\n this.lines.splice(fromLineNumber - 1, toLineNumber - fromLineNumber + 1);\r\n this.prefixSumComputer.removeValues(fromLineNumber - 1, toLineNumber - fromLineNumber + 1);\r\n return new viewEvents.ViewLinesDeletedEvent(outputFromLineNumber, outputToLineNumber);\r\n }\r\n onModelLinesInserted(versionId, fromLineNumber, _toLineNumber, lineBreaks) {\r\n if (versionId <= this._validModelVersionId) {\r\n // Here we check for versionId in case the lines were reconstructed in the meantime.\r\n // We don't want to apply stale change events on top of a newer read model state.\r\n return null;\r\n }\r\n // cannot use this.getHiddenAreas() because those decorations have already seen the effect of this model change\r\n const isInHiddenArea = (fromLineNumber > 2 && !this.lines[fromLineNumber - 2].isVisible());\r\n let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1);\r\n let totalOutputLineCount = 0;\r\n let insertLines = [];\r\n let insertPrefixSumValues = [];\r\n for (let i = 0, len = lineBreaks.length; i < len; i++) {\r\n let line = createSplitLine(lineBreaks[i], !isInHiddenArea);\r\n insertLines.push(line);\r\n let outputLineCount = line.getViewLineCount();\r\n totalOutputLineCount += outputLineCount;\r\n insertPrefixSumValues[i] = outputLineCount;\r\n }\r\n // TODO@Alex: use arrays.arrayInsert\r\n this.lines = this.lines.slice(0, fromLineNumber - 1).concat(insertLines).concat(this.lines.slice(fromLineNumber - 1));\r\n this.prefixSumComputer.insertValues(fromLineNumber - 1, insertPrefixSumValues);\r\n return new viewEvents.ViewLinesInsertedEvent(outputFromLineNumber, outputFromLineNumber + totalOutputLineCount - 1);\r\n }\r\n onModelLineChanged(versionId, lineNumber, lineBreakData) {\r\n if (versionId <= this._validModelVersionId) {\r\n // Here we check for versionId in case the lines were reconstructed in the meantime.\r\n // We don't want to apply stale change events on top of a newer read model state.\r\n return [false, null, null, null];\r\n }\r\n let lineIndex = lineNumber - 1;\r\n let oldOutputLineCount = this.lines[lineIndex].getViewLineCount();\r\n let isVisible = this.lines[lineIndex].isVisible();\r\n let line = createSplitLine(lineBreakData, isVisible);\r\n this.lines[lineIndex] = line;\r\n let newOutputLineCount = this.lines[lineIndex].getViewLineCount();\r\n let lineMappingChanged = false;\r\n let changeFrom = 0;\r\n let changeTo = -1;\r\n let insertFrom = 0;\r\n let insertTo = -1;\r\n let deleteFrom = 0;\r\n let deleteTo = -1;\r\n if (oldOutputLineCount > newOutputLineCount) {\r\n changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1);\r\n changeTo = changeFrom + newOutputLineCount - 1;\r\n deleteFrom = changeTo + 1;\r\n deleteTo = deleteFrom + (oldOutputLineCount - newOutputLineCount) - 1;\r\n lineMappingChanged = true;\r\n }\r\n else if (oldOutputLineCount < newOutputLineCount) {\r\n changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1);\r\n changeTo = changeFrom + oldOutputLineCount - 1;\r\n insertFrom = changeTo + 1;\r\n insertTo = insertFrom + (newOutputLineCount - oldOutputLineCount) - 1;\r\n lineMappingChanged = true;\r\n }\r\n else {\r\n changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1);\r\n changeTo = changeFrom + newOutputLineCount - 1;\r\n }\r\n this.prefixSumComputer.changeValue(lineIndex, newOutputLineCount);\r\n const viewLinesChangedEvent = (changeFrom <= changeTo ? new viewEvents.ViewLinesChangedEvent(changeFrom, changeTo) : null);\r\n const viewLinesInsertedEvent = (insertFrom <= insertTo ? new viewEvents.ViewLinesInsertedEvent(insertFrom, insertTo) : null);\r\n const viewLinesDeletedEvent = (deleteFrom <= deleteTo ? new viewEvents.ViewLinesDeletedEvent(deleteFrom, deleteTo) : null);\r\n return [lineMappingChanged, viewLinesChangedEvent, viewLinesInsertedEvent, viewLinesDeletedEvent];\r\n }\r\n acceptVersionId(versionId) {\r\n this._validModelVersionId = versionId;\r\n if (this.lines.length === 1 && !this.lines[0].isVisible()) {\r\n // At least one line must be visible => reset hidden areas\r\n this.setHiddenAreas([]);\r\n }\r\n }\r\n getViewLineCount() {\r\n return this.prefixSumComputer.getTotalValue();\r\n }\r\n _toValidViewLineNumber(viewLineNumber) {\r\n if (viewLineNumber < 1) {\r\n return 1;\r\n }\r\n const viewLineCount = this.getViewLineCount();\r\n if (viewLineNumber > viewLineCount) {\r\n return viewLineCount;\r\n }\r\n return viewLineNumber | 0;\r\n }\r\n getActiveIndentGuide(viewLineNumber, minLineNumber, maxLineNumber) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n minLineNumber = this._toValidViewLineNumber(minLineNumber);\r\n maxLineNumber = this._toValidViewLineNumber(maxLineNumber);\r\n const modelPosition = this.convertViewPositionToModelPosition(viewLineNumber, this.getViewLineMinColumn(viewLineNumber));\r\n const modelMinPosition = this.convertViewPositionToModelPosition(minLineNumber, this.getViewLineMinColumn(minLineNumber));\r\n const modelMaxPosition = this.convertViewPositionToModelPosition(maxLineNumber, this.getViewLineMinColumn(maxLineNumber));\r\n const result = this.model.getActiveIndentGuide(modelPosition.lineNumber, modelMinPosition.lineNumber, modelMaxPosition.lineNumber);\r\n const viewStartPosition = this.convertModelPositionToViewPosition(result.startLineNumber, 1);\r\n const viewEndPosition = this.convertModelPositionToViewPosition(result.endLineNumber, this.model.getLineMaxColumn(result.endLineNumber));\r\n return {\r\n startLineNumber: viewStartPosition.lineNumber,\r\n endLineNumber: viewEndPosition.lineNumber,\r\n indent: result.indent\r\n };\r\n }\r\n getViewLinesIndentGuides(viewStartLineNumber, viewEndLineNumber) {\r\n viewStartLineNumber = this._toValidViewLineNumber(viewStartLineNumber);\r\n viewEndLineNumber = this._toValidViewLineNumber(viewEndLineNumber);\r\n const modelStart = this.convertViewPositionToModelPosition(viewStartLineNumber, this.getViewLineMinColumn(viewStartLineNumber));\r\n const modelEnd = this.convertViewPositionToModelPosition(viewEndLineNumber, this.getViewLineMaxColumn(viewEndLineNumber));\r\n let result = [];\r\n let resultRepeatCount = [];\r\n let resultRepeatOption = [];\r\n const modelStartLineIndex = modelStart.lineNumber - 1;\r\n const modelEndLineIndex = modelEnd.lineNumber - 1;\r\n let reqStart = null;\r\n for (let modelLineIndex = modelStartLineIndex; modelLineIndex <= modelEndLineIndex; modelLineIndex++) {\r\n const line = this.lines[modelLineIndex];\r\n if (line.isVisible()) {\r\n let viewLineStartIndex = line.getViewLineNumberOfModelPosition(0, modelLineIndex === modelStartLineIndex ? modelStart.column : 1);\r\n let viewLineEndIndex = line.getViewLineNumberOfModelPosition(0, this.model.getLineMaxColumn(modelLineIndex + 1));\r\n let count = viewLineEndIndex - viewLineStartIndex + 1;\r\n let option = 0 /* BlockNone */;\r\n if (count > 1 && line.getViewLineMinColumn(this.model, modelLineIndex + 1, viewLineEndIndex) === 1) {\r\n // wrapped lines should block indent guides\r\n option = (viewLineStartIndex === 0 ? 1 /* BlockSubsequent */ : 2 /* BlockAll */);\r\n }\r\n resultRepeatCount.push(count);\r\n resultRepeatOption.push(option);\r\n // merge into previous request\r\n if (reqStart === null) {\r\n reqStart = new Position(modelLineIndex + 1, 0);\r\n }\r\n }\r\n else {\r\n // hit invisible line => flush request\r\n if (reqStart !== null) {\r\n result = result.concat(this.model.getLinesIndentGuides(reqStart.lineNumber, modelLineIndex));\r\n reqStart = null;\r\n }\r\n }\r\n }\r\n if (reqStart !== null) {\r\n result = result.concat(this.model.getLinesIndentGuides(reqStart.lineNumber, modelEnd.lineNumber));\r\n reqStart = null;\r\n }\r\n const viewLineCount = viewEndLineNumber - viewStartLineNumber + 1;\r\n let viewIndents = new Array(viewLineCount);\r\n let currIndex = 0;\r\n for (let i = 0, len = result.length; i < len; i++) {\r\n let value = result[i];\r\n let count = Math.min(viewLineCount - currIndex, resultRepeatCount[i]);\r\n let option = resultRepeatOption[i];\r\n let blockAtIndex;\r\n if (option === 2 /* BlockAll */) {\r\n blockAtIndex = 0;\r\n }\r\n else if (option === 1 /* BlockSubsequent */) {\r\n blockAtIndex = 1;\r\n }\r\n else {\r\n blockAtIndex = count;\r\n }\r\n for (let j = 0; j < count; j++) {\r\n if (j === blockAtIndex) {\r\n value = 0;\r\n }\r\n viewIndents[currIndex++] = value;\r\n }\r\n }\r\n return viewIndents;\r\n }\r\n getViewLineContent(viewLineNumber) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n return this.lines[lineIndex].getViewLineContent(this.model, lineIndex + 1, remainder);\r\n }\r\n getViewLineLength(viewLineNumber) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n return this.lines[lineIndex].getViewLineLength(this.model, lineIndex + 1, remainder);\r\n }\r\n getViewLineMinColumn(viewLineNumber) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n return this.lines[lineIndex].getViewLineMinColumn(this.model, lineIndex + 1, remainder);\r\n }\r\n getViewLineMaxColumn(viewLineNumber) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n return this.lines[lineIndex].getViewLineMaxColumn(this.model, lineIndex + 1, remainder);\r\n }\r\n getViewLineData(viewLineNumber) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n return this.lines[lineIndex].getViewLineData(this.model, lineIndex + 1, remainder);\r\n }\r\n getViewLinesData(viewStartLineNumber, viewEndLineNumber, needed) {\r\n viewStartLineNumber = this._toValidViewLineNumber(viewStartLineNumber);\r\n viewEndLineNumber = this._toValidViewLineNumber(viewEndLineNumber);\r\n let start = this.prefixSumComputer.getIndexOf(viewStartLineNumber - 1);\r\n let viewLineNumber = viewStartLineNumber;\r\n let startModelLineIndex = start.index;\r\n let startRemainder = start.remainder;\r\n let result = [];\r\n for (let modelLineIndex = startModelLineIndex, len = this.model.getLineCount(); modelLineIndex < len; modelLineIndex++) {\r\n let line = this.lines[modelLineIndex];\r\n if (!line.isVisible()) {\r\n continue;\r\n }\r\n let fromViewLineIndex = (modelLineIndex === startModelLineIndex ? startRemainder : 0);\r\n let remainingViewLineCount = line.getViewLineCount() - fromViewLineIndex;\r\n let lastLine = false;\r\n if (viewLineNumber + remainingViewLineCount > viewEndLineNumber) {\r\n lastLine = true;\r\n remainingViewLineCount = viewEndLineNumber - viewLineNumber + 1;\r\n }\r\n let toViewLineIndex = fromViewLineIndex + remainingViewLineCount;\r\n line.getViewLinesData(this.model, modelLineIndex + 1, fromViewLineIndex, toViewLineIndex, viewLineNumber - viewStartLineNumber, needed, result);\r\n viewLineNumber += remainingViewLineCount;\r\n if (lastLine) {\r\n break;\r\n }\r\n }\r\n return result;\r\n }\r\n validateViewPosition(viewLineNumber, viewColumn, expectedModelPosition) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n let line = this.lines[lineIndex];\r\n let minColumn = line.getViewLineMinColumn(this.model, lineIndex + 1, remainder);\r\n let maxColumn = line.getViewLineMaxColumn(this.model, lineIndex + 1, remainder);\r\n if (viewColumn < minColumn) {\r\n viewColumn = minColumn;\r\n }\r\n if (viewColumn > maxColumn) {\r\n viewColumn = maxColumn;\r\n }\r\n let computedModelColumn = line.getModelColumnOfViewPosition(remainder, viewColumn);\r\n let computedModelPosition = this.model.validatePosition(new Position(lineIndex + 1, computedModelColumn));\r\n if (computedModelPosition.equals(expectedModelPosition)) {\r\n return new Position(viewLineNumber, viewColumn);\r\n }\r\n return this.convertModelPositionToViewPosition(expectedModelPosition.lineNumber, expectedModelPosition.column);\r\n }\r\n validateViewRange(viewRange, expectedModelRange) {\r\n const validViewStart = this.validateViewPosition(viewRange.startLineNumber, viewRange.startColumn, expectedModelRange.getStartPosition());\r\n const validViewEnd = this.validateViewPosition(viewRange.endLineNumber, viewRange.endColumn, expectedModelRange.getEndPosition());\r\n return new Range(validViewStart.lineNumber, validViewStart.column, validViewEnd.lineNumber, validViewEnd.column);\r\n }\r\n convertViewPositionToModelPosition(viewLineNumber, viewColumn) {\r\n viewLineNumber = this._toValidViewLineNumber(viewLineNumber);\r\n let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1);\r\n let lineIndex = r.index;\r\n let remainder = r.remainder;\r\n let inputColumn = this.lines[lineIndex].getModelColumnOfViewPosition(remainder, viewColumn);\r\n // console.log('out -> in ' + viewLineNumber + ',' + viewColumn + ' ===> ' + (lineIndex+1) + ',' + inputColumn);\r\n return this.model.validatePosition(new Position(lineIndex + 1, inputColumn));\r\n }\r\n convertViewRangeToModelRange(viewRange) {\r\n const start = this.convertViewPositionToModelPosition(viewRange.startLineNumber, viewRange.startColumn);\r\n const end = this.convertViewPositionToModelPosition(viewRange.endLineNumber, viewRange.endColumn);\r\n return new Range(start.lineNumber, start.column, end.lineNumber, end.column);\r\n }\r\n convertModelPositionToViewPosition(_modelLineNumber, _modelColumn) {\r\n const validPosition = this.model.validatePosition(new Position(_modelLineNumber, _modelColumn));\r\n const inputLineNumber = validPosition.lineNumber;\r\n const inputColumn = validPosition.column;\r\n let lineIndex = inputLineNumber - 1, lineIndexChanged = false;\r\n while (lineIndex > 0 && !this.lines[lineIndex].isVisible()) {\r\n lineIndex--;\r\n lineIndexChanged = true;\r\n }\r\n if (lineIndex === 0 && !this.lines[lineIndex].isVisible()) {\r\n // Could not reach a real line\r\n // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + 1 + ',' + 1);\r\n return new Position(1, 1);\r\n }\r\n const deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1));\r\n let r;\r\n if (lineIndexChanged) {\r\n r = this.lines[lineIndex].getViewPositionOfModelPosition(deltaLineNumber, this.model.getLineMaxColumn(lineIndex + 1));\r\n }\r\n else {\r\n r = this.lines[inputLineNumber - 1].getViewPositionOfModelPosition(deltaLineNumber, inputColumn);\r\n }\r\n // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + r.lineNumber + ',' + r);\r\n return r;\r\n }\r\n convertModelRangeToViewRange(modelRange) {\r\n let start = this.convertModelPositionToViewPosition(modelRange.startLineNumber, modelRange.startColumn);\r\n let end = this.convertModelPositionToViewPosition(modelRange.endLineNumber, modelRange.endColumn);\r\n if (modelRange.startLineNumber === modelRange.endLineNumber && start.lineNumber !== end.lineNumber) {\r\n // This is a single line range that ends up taking more lines due to wrapping\r\n if (end.column === this.getViewLineMinColumn(end.lineNumber)) {\r\n // the end column lands on the first column of the next line\r\n return new Range(start.lineNumber, start.column, end.lineNumber - 1, this.getViewLineMaxColumn(end.lineNumber - 1));\r\n }\r\n }\r\n return new Range(start.lineNumber, start.column, end.lineNumber, end.column);\r\n }\r\n _getViewLineNumberForModelPosition(inputLineNumber, inputColumn) {\r\n let lineIndex = inputLineNumber - 1;\r\n if (this.lines[lineIndex].isVisible()) {\r\n // this model line is visible\r\n const deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1));\r\n return this.lines[lineIndex].getViewLineNumberOfModelPosition(deltaLineNumber, inputColumn);\r\n }\r\n // this model line is not visible\r\n while (lineIndex > 0 && !this.lines[lineIndex].isVisible()) {\r\n lineIndex--;\r\n }\r\n if (lineIndex === 0 && !this.lines[lineIndex].isVisible()) {\r\n // Could not reach a real line\r\n return 1;\r\n }\r\n const deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1));\r\n return this.lines[lineIndex].getViewLineNumberOfModelPosition(deltaLineNumber, this.model.getLineMaxColumn(lineIndex + 1));\r\n }\r\n getAllOverviewRulerDecorations(ownerId, filterOutValidation, theme) {\r\n const decorations = this.model.getOverviewRulerDecorations(ownerId, filterOutValidation);\r\n const result = new OverviewRulerDecorations();\r\n for (const decoration of decorations) {\r\n const opts = decoration.options.overviewRuler;\r\n const lane = opts ? opts.position : 0;\r\n if (lane === 0) {\r\n continue;\r\n }\r\n const color = opts.getColor(theme);\r\n const viewStartLineNumber = this._getViewLineNumberForModelPosition(decoration.range.startLineNumber, decoration.range.startColumn);\r\n const viewEndLineNumber = this._getViewLineNumberForModelPosition(decoration.range.endLineNumber, decoration.range.endColumn);\r\n result.accept(color, viewStartLineNumber, viewEndLineNumber, lane);\r\n }\r\n return result.result;\r\n }\r\n getDecorationsInRange(range, ownerId, filterOutValidation) {\r\n const modelStart = this.convertViewPositionToModelPosition(range.startLineNumber, range.startColumn);\r\n const modelEnd = this.convertViewPositionToModelPosition(range.endLineNumber, range.endColumn);\r\n if (modelEnd.lineNumber - modelStart.lineNumber <= range.endLineNumber - range.startLineNumber) {\r\n // most likely there are no hidden lines => fast path\r\n // fetch decorations from column 1 to cover the case of wrapped lines that have whole line decorations at column 1\r\n return this.model.getDecorationsInRange(new Range(modelStart.lineNumber, 1, modelEnd.lineNumber, modelEnd.column), ownerId, filterOutValidation);\r\n }\r\n let result = [];\r\n const modelStartLineIndex = modelStart.lineNumber - 1;\r\n const modelEndLineIndex = modelEnd.lineNumber - 1;\r\n let reqStart = null;\r\n for (let modelLineIndex = modelStartLineIndex; modelLineIndex <= modelEndLineIndex; modelLineIndex++) {\r\n const line = this.lines[modelLineIndex];\r\n if (line.isVisible()) {\r\n // merge into previous request\r\n if (reqStart === null) {\r\n reqStart = new Position(modelLineIndex + 1, modelLineIndex === modelStartLineIndex ? modelStart.column : 1);\r\n }\r\n }\r\n else {\r\n // hit invisible line => flush request\r\n if (reqStart !== null) {\r\n const maxLineColumn = this.model.getLineMaxColumn(modelLineIndex);\r\n result = result.concat(this.model.getDecorationsInRange(new Range(reqStart.lineNumber, reqStart.column, modelLineIndex, maxLineColumn), ownerId, filterOutValidation));\r\n reqStart = null;\r\n }\r\n }\r\n }\r\n if (reqStart !== null) {\r\n result = result.concat(this.model.getDecorationsInRange(new Range(reqStart.lineNumber, reqStart.column, modelEnd.lineNumber, modelEnd.column), ownerId, filterOutValidation));\r\n reqStart = null;\r\n }\r\n result.sort((a, b) => {\r\n const res = Range.compareRangesUsingStarts(a.range, b.range);\r\n if (res === 0) {\r\n if (a.id < b.id) {\r\n return -1;\r\n }\r\n if (a.id > b.id) {\r\n return 1;\r\n }\r\n return 0;\r\n }\r\n return res;\r\n });\r\n // Eliminate duplicate decorations that might have intersected our visible ranges multiple times\r\n let finalResult = [], finalResultLen = 0;\r\n let prevDecId = null;\r\n for (const dec of result) {\r\n const decId = dec.id;\r\n if (prevDecId === decId) {\r\n // skip\r\n continue;\r\n }\r\n prevDecId = decId;\r\n finalResult[finalResultLen++] = dec;\r\n }\r\n return finalResult;\r\n }\r\n}\r\nclass VisibleIdentitySplitLine {\r\n constructor() { }\r\n isVisible() {\r\n return true;\r\n }\r\n setVisible(isVisible) {\r\n if (isVisible) {\r\n return this;\r\n }\r\n return InvisibleIdentitySplitLine.INSTANCE;\r\n }\r\n getLineBreakData() {\r\n return null;\r\n }\r\n getViewLineCount() {\r\n return 1;\r\n }\r\n getViewLineContent(model, modelLineNumber, _outputLineIndex) {\r\n return model.getLineContent(modelLineNumber);\r\n }\r\n getViewLineLength(model, modelLineNumber, _outputLineIndex) {\r\n return model.getLineLength(modelLineNumber);\r\n }\r\n getViewLineMinColumn(model, modelLineNumber, _outputLineIndex) {\r\n return model.getLineMinColumn(modelLineNumber);\r\n }\r\n getViewLineMaxColumn(model, modelLineNumber, _outputLineIndex) {\r\n return model.getLineMaxColumn(modelLineNumber);\r\n }\r\n getViewLineData(model, modelLineNumber, _outputLineIndex) {\r\n let lineTokens = model.getLineTokens(modelLineNumber);\r\n let lineContent = lineTokens.getLineContent();\r\n return new ViewLineData(lineContent, false, 1, lineContent.length + 1, 0, lineTokens.inflate());\r\n }\r\n getViewLinesData(model, modelLineNumber, _fromOuputLineIndex, _toOutputLineIndex, globalStartIndex, needed, result) {\r\n if (!needed[globalStartIndex]) {\r\n result[globalStartIndex] = null;\r\n return;\r\n }\r\n result[globalStartIndex] = this.getViewLineData(model, modelLineNumber, 0);\r\n }\r\n getModelColumnOfViewPosition(_outputLineIndex, outputColumn) {\r\n return outputColumn;\r\n }\r\n getViewPositionOfModelPosition(deltaLineNumber, inputColumn) {\r\n return new Position(deltaLineNumber, inputColumn);\r\n }\r\n getViewLineNumberOfModelPosition(deltaLineNumber, _inputColumn) {\r\n return deltaLineNumber;\r\n }\r\n}\r\nVisibleIdentitySplitLine.INSTANCE = new VisibleIdentitySplitLine();\r\nclass InvisibleIdentitySplitLine {\r\n constructor() { }\r\n isVisible() {\r\n return false;\r\n }\r\n setVisible(isVisible) {\r\n if (!isVisible) {\r\n return this;\r\n }\r\n return VisibleIdentitySplitLine.INSTANCE;\r\n }\r\n getLineBreakData() {\r\n return null;\r\n }\r\n getViewLineCount() {\r\n return 0;\r\n }\r\n getViewLineContent(_model, _modelLineNumber, _outputLineIndex) {\r\n throw new Error('Not supported');\r\n }\r\n getViewLineLength(_model, _modelLineNumber, _outputLineIndex) {\r\n throw new Error('Not supported');\r\n }\r\n getViewLineMinColumn(_model, _modelLineNumber, _outputLineIndex) {\r\n throw new Error('Not supported');\r\n }\r\n getViewLineMaxColumn(_model, _modelLineNumber, _outputLineIndex) {\r\n throw new Error('Not supported');\r\n }\r\n getViewLineData(_model, _modelLineNumber, _outputLineIndex) {\r\n throw new Error('Not supported');\r\n }\r\n getViewLinesData(_model, _modelLineNumber, _fromOuputLineIndex, _toOutputLineIndex, _globalStartIndex, _needed, _result) {\r\n throw new Error('Not supported');\r\n }\r\n getModelColumnOfViewPosition(_outputLineIndex, _outputColumn) {\r\n throw new Error('Not supported');\r\n }\r\n getViewPositionOfModelPosition(_deltaLineNumber, _inputColumn) {\r\n throw new Error('Not supported');\r\n }\r\n getViewLineNumberOfModelPosition(_deltaLineNumber, _inputColumn) {\r\n throw new Error('Not supported');\r\n }\r\n}\r\nInvisibleIdentitySplitLine.INSTANCE = new InvisibleIdentitySplitLine();\r\nexport class SplitLine {\r\n constructor(lineBreakData, isVisible) {\r\n this._lineBreakData = lineBreakData;\r\n this._isVisible = isVisible;\r\n }\r\n isVisible() {\r\n return this._isVisible;\r\n }\r\n setVisible(isVisible) {\r\n this._isVisible = isVisible;\r\n return this;\r\n }\r\n getLineBreakData() {\r\n return this._lineBreakData;\r\n }\r\n getViewLineCount() {\r\n if (!this._isVisible) {\r\n return 0;\r\n }\r\n return this._lineBreakData.breakOffsets.length;\r\n }\r\n getInputStartOffsetOfOutputLineIndex(outputLineIndex) {\r\n return LineBreakData.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, outputLineIndex, 0);\r\n }\r\n getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex) {\r\n if (outputLineIndex + 1 === this._lineBreakData.breakOffsets.length) {\r\n return model.getLineMaxColumn(modelLineNumber) - 1;\r\n }\r\n return LineBreakData.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, outputLineIndex + 1, 0);\r\n }\r\n getViewLineContent(model, modelLineNumber, outputLineIndex) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex);\r\n let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex);\r\n let r = model.getValueInRange({\r\n startLineNumber: modelLineNumber,\r\n startColumn: startOffset + 1,\r\n endLineNumber: modelLineNumber,\r\n endColumn: endOffset + 1\r\n });\r\n if (outputLineIndex > 0) {\r\n r = spaces(this._lineBreakData.wrappedTextIndentLength) + r;\r\n }\r\n return r;\r\n }\r\n getViewLineLength(model, modelLineNumber, outputLineIndex) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex);\r\n let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex);\r\n let r = endOffset - startOffset;\r\n if (outputLineIndex > 0) {\r\n r = this._lineBreakData.wrappedTextIndentLength + r;\r\n }\r\n return r;\r\n }\r\n getViewLineMinColumn(_model, _modelLineNumber, outputLineIndex) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n if (outputLineIndex > 0) {\r\n return this._lineBreakData.wrappedTextIndentLength + 1;\r\n }\r\n return 1;\r\n }\r\n getViewLineMaxColumn(model, modelLineNumber, outputLineIndex) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n return this.getViewLineContent(model, modelLineNumber, outputLineIndex).length + 1;\r\n }\r\n getViewLineData(model, modelLineNumber, outputLineIndex) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex);\r\n let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex);\r\n let lineContent = model.getValueInRange({\r\n startLineNumber: modelLineNumber,\r\n startColumn: startOffset + 1,\r\n endLineNumber: modelLineNumber,\r\n endColumn: endOffset + 1\r\n });\r\n if (outputLineIndex > 0) {\r\n lineContent = spaces(this._lineBreakData.wrappedTextIndentLength) + lineContent;\r\n }\r\n let minColumn = (outputLineIndex > 0 ? this._lineBreakData.wrappedTextIndentLength + 1 : 1);\r\n let maxColumn = lineContent.length + 1;\r\n let continuesWithWrappedLine = (outputLineIndex + 1 < this.getViewLineCount());\r\n let deltaStartIndex = 0;\r\n if (outputLineIndex > 0) {\r\n deltaStartIndex = this._lineBreakData.wrappedTextIndentLength;\r\n }\r\n let lineTokens = model.getLineTokens(modelLineNumber);\r\n const startVisibleColumn = (outputLineIndex === 0 ? 0 : this._lineBreakData.breakOffsetsVisibleColumn[outputLineIndex - 1]);\r\n return new ViewLineData(lineContent, continuesWithWrappedLine, minColumn, maxColumn, startVisibleColumn, lineTokens.sliceAndInflate(startOffset, endOffset, deltaStartIndex));\r\n }\r\n getViewLinesData(model, modelLineNumber, fromOuputLineIndex, toOutputLineIndex, globalStartIndex, needed, result) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n for (let outputLineIndex = fromOuputLineIndex; outputLineIndex < toOutputLineIndex; outputLineIndex++) {\r\n let globalIndex = globalStartIndex + outputLineIndex - fromOuputLineIndex;\r\n if (!needed[globalIndex]) {\r\n result[globalIndex] = null;\r\n continue;\r\n }\r\n result[globalIndex] = this.getViewLineData(model, modelLineNumber, outputLineIndex);\r\n }\r\n }\r\n getModelColumnOfViewPosition(outputLineIndex, outputColumn) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n let adjustedColumn = outputColumn - 1;\r\n if (outputLineIndex > 0) {\r\n if (adjustedColumn < this._lineBreakData.wrappedTextIndentLength) {\r\n adjustedColumn = 0;\r\n }\r\n else {\r\n adjustedColumn -= this._lineBreakData.wrappedTextIndentLength;\r\n }\r\n }\r\n return LineBreakData.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets, outputLineIndex, adjustedColumn) + 1;\r\n }\r\n getViewPositionOfModelPosition(deltaLineNumber, inputColumn) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n let r = LineBreakData.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets, inputColumn - 1);\r\n let outputLineIndex = r.outputLineIndex;\r\n let outputColumn = r.outputOffset + 1;\r\n if (outputLineIndex > 0) {\r\n outputColumn += this._lineBreakData.wrappedTextIndentLength;\r\n }\r\n //\t\tconsole.log('in -> out ' + deltaLineNumber + ',' + inputColumn + ' ===> ' + (deltaLineNumber+outputLineIndex) + ',' + outputColumn);\r\n return new Position(deltaLineNumber + outputLineIndex, outputColumn);\r\n }\r\n getViewLineNumberOfModelPosition(deltaLineNumber, inputColumn) {\r\n if (!this._isVisible) {\r\n throw new Error('Not supported');\r\n }\r\n const r = LineBreakData.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets, inputColumn - 1);\r\n return (deltaLineNumber + r.outputLineIndex);\r\n }\r\n}\r\nlet _spaces = [''];\r\nfunction spaces(count) {\r\n if (count >= _spaces.length) {\r\n for (let i = 1; i <= count; i++) {\r\n _spaces[i] = _makeSpaces(i);\r\n }\r\n }\r\n return _spaces[count];\r\n}\r\nfunction _makeSpaces(count) {\r\n return new Array(count + 1).join(' ');\r\n}\r\nfunction createSplitLine(lineBreakData, isVisible) {\r\n if (lineBreakData === null) {\r\n // No mapping needed\r\n if (isVisible) {\r\n return VisibleIdentitySplitLine.INSTANCE;\r\n }\r\n return InvisibleIdentitySplitLine.INSTANCE;\r\n }\r\n else {\r\n return new SplitLine(lineBreakData, isVisible);\r\n }\r\n}\r\nexport class IdentityCoordinatesConverter {\r\n constructor(lines) {\r\n this._lines = lines;\r\n }\r\n _validPosition(pos) {\r\n return this._lines.model.validatePosition(pos);\r\n }\r\n _validRange(range) {\r\n return this._lines.model.validateRange(range);\r\n }\r\n // View -> Model conversion and related methods\r\n convertViewPositionToModelPosition(viewPosition) {\r\n return this._validPosition(viewPosition);\r\n }\r\n convertViewRangeToModelRange(viewRange) {\r\n return this._validRange(viewRange);\r\n }\r\n validateViewPosition(_viewPosition, expectedModelPosition) {\r\n return this._validPosition(expectedModelPosition);\r\n }\r\n validateViewRange(_viewRange, expectedModelRange) {\r\n return this._validRange(expectedModelRange);\r\n }\r\n // Model -> View conversion and related methods\r\n convertModelPositionToViewPosition(modelPosition) {\r\n return this._validPosition(modelPosition);\r\n }\r\n convertModelRangeToViewRange(modelRange) {\r\n return this._validRange(modelRange);\r\n }\r\n modelPositionIsVisible(modelPosition) {\r\n const lineCount = this._lines.model.getLineCount();\r\n if (modelPosition.lineNumber < 1 || modelPosition.lineNumber > lineCount) {\r\n // invalid arguments\r\n return false;\r\n }\r\n return true;\r\n }\r\n getModelLineViewLineCount(modelLineNumber) {\r\n return 1;\r\n }\r\n}\r\nexport class IdentityLinesCollection {\r\n constructor(model) {\r\n this.model = model;\r\n }\r\n dispose() {\r\n }\r\n createCoordinatesConverter() {\r\n return new IdentityCoordinatesConverter(this);\r\n }\r\n getHiddenAreas() {\r\n return [];\r\n }\r\n setHiddenAreas(_ranges) {\r\n return false;\r\n }\r\n setTabSize(_newTabSize) {\r\n return false;\r\n }\r\n setWrappingSettings(_fontInfo, _wrappingStrategy, _wrappingColumn, _wrappingIndent) {\r\n return false;\r\n }\r\n createLineBreaksComputer() {\r\n let result = [];\r\n return {\r\n addRequest: (lineText, previousLineBreakData) => {\r\n result.push(null);\r\n },\r\n finalize: () => {\r\n return result;\r\n }\r\n };\r\n }\r\n onModelFlushed() {\r\n }\r\n onModelLinesDeleted(_versionId, fromLineNumber, toLineNumber) {\r\n return new viewEvents.ViewLinesDeletedEvent(fromLineNumber, toLineNumber);\r\n }\r\n onModelLinesInserted(_versionId, fromLineNumber, toLineNumber, lineBreaks) {\r\n return new viewEvents.ViewLinesInsertedEvent(fromLineNumber, toLineNumber);\r\n }\r\n onModelLineChanged(_versionId, lineNumber, lineBreakData) {\r\n return [false, new viewEvents.ViewLinesChangedEvent(lineNumber, lineNumber), null, null];\r\n }\r\n acceptVersionId(_versionId) {\r\n }\r\n getViewLineCount() {\r\n return this.model.getLineCount();\r\n }\r\n getActiveIndentGuide(viewLineNumber, _minLineNumber, _maxLineNumber) {\r\n return {\r\n startLineNumber: viewLineNumber,\r\n endLineNumber: viewLineNumber,\r\n indent: 0\r\n };\r\n }\r\n getViewLinesIndentGuides(viewStartLineNumber, viewEndLineNumber) {\r\n const viewLineCount = viewEndLineNumber - viewStartLineNumber + 1;\r\n let result = new Array(viewLineCount);\r\n for (let i = 0; i < viewLineCount; i++) {\r\n result[i] = 0;\r\n }\r\n return result;\r\n }\r\n getViewLineContent(viewLineNumber) {\r\n return this.model.getLineContent(viewLineNumber);\r\n }\r\n getViewLineLength(viewLineNumber) {\r\n return this.model.getLineLength(viewLineNumber);\r\n }\r\n getViewLineMinColumn(viewLineNumber) {\r\n return this.model.getLineMinColumn(viewLineNumber);\r\n }\r\n getViewLineMaxColumn(viewLineNumber) {\r\n return this.model.getLineMaxColumn(viewLineNumber);\r\n }\r\n getViewLineData(viewLineNumber) {\r\n let lineTokens = this.model.getLineTokens(viewLineNumber);\r\n let lineContent = lineTokens.getLineContent();\r\n return new ViewLineData(lineContent, false, 1, lineContent.length + 1, 0, lineTokens.inflate());\r\n }\r\n getViewLinesData(viewStartLineNumber, viewEndLineNumber, needed) {\r\n const lineCount = this.model.getLineCount();\r\n viewStartLineNumber = Math.min(Math.max(1, viewStartLineNumber), lineCount);\r\n viewEndLineNumber = Math.min(Math.max(1, viewEndLineNumber), lineCount);\r\n let result = [];\r\n for (let lineNumber = viewStartLineNumber; lineNumber <= viewEndLineNumber; lineNumber++) {\r\n let idx = lineNumber - viewStartLineNumber;\r\n if (!needed[idx]) {\r\n result[idx] = null;\r\n }\r\n result[idx] = this.getViewLineData(lineNumber);\r\n }\r\n return result;\r\n }\r\n getAllOverviewRulerDecorations(ownerId, filterOutValidation, theme) {\r\n const decorations = this.model.getOverviewRulerDecorations(ownerId, filterOutValidation);\r\n const result = new OverviewRulerDecorations();\r\n for (const decoration of decorations) {\r\n const opts = decoration.options.overviewRuler;\r\n const lane = opts ? opts.position : 0;\r\n if (lane === 0) {\r\n continue;\r\n }\r\n const color = opts.getColor(theme);\r\n const viewStartLineNumber = decoration.range.startLineNumber;\r\n const viewEndLineNumber = decoration.range.endLineNumber;\r\n result.accept(color, viewStartLineNumber, viewEndLineNumber, lane);\r\n }\r\n return result.result;\r\n }\r\n getDecorationsInRange(range, ownerId, filterOutValidation) {\r\n return this.model.getDecorationsInRange(range, ownerId, filterOutValidation);\r\n }\r\n}\r\nclass OverviewRulerDecorations {\r\n constructor() {\r\n this.result = Object.create(null);\r\n }\r\n accept(color, startLineNumber, endLineNumber, lane) {\r\n let prev = this.result[color];\r\n if (prev) {\r\n const prevLane = prev[prev.length - 3];\r\n const prevEndLineNumber = prev[prev.length - 1];\r\n if (prevLane === lane && prevEndLineNumber + 1 >= startLineNumber) {\r\n // merge into prev\r\n if (endLineNumber > prevEndLineNumber) {\r\n prev[prev.length - 1] = endLineNumber;\r\n }\r\n return;\r\n }\r\n // push\r\n prev.push(lane, startLineNumber, endLineNumber);\r\n }\r\n else {\r\n this.result[color] = [lane, startLineNumber, endLineNumber];\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\nimport { createStringBuilder } from '../../common/core/stringBuilder.js';\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { Configuration } from '../config/configuration.js';\r\nimport { LineBreakData } from '../../common/viewModel/viewModel.js';\r\nconst ttPolicy = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('domLineBreaksComputer', { createHTML: value => value });\r\nexport class DOMLineBreaksComputerFactory {\r\n static create() {\r\n return new DOMLineBreaksComputerFactory();\r\n }\r\n constructor() {\r\n }\r\n createLineBreaksComputer(fontInfo, tabSize, wrappingColumn, wrappingIndent) {\r\n tabSize = tabSize | 0; //@perf\r\n wrappingColumn = +wrappingColumn; //@perf\r\n let requests = [];\r\n return {\r\n addRequest: (lineText, previousLineBreakData) => {\r\n requests.push(lineText);\r\n },\r\n finalize: () => {\r\n return createLineBreaks(requests, fontInfo, tabSize, wrappingColumn, wrappingIndent);\r\n }\r\n };\r\n }\r\n}\r\nfunction createLineBreaks(requests, fontInfo, tabSize, firstLineBreakColumn, wrappingIndent) {\r\n var _a;\r\n if (firstLineBreakColumn === -1) {\r\n const result = [];\r\n for (let i = 0, len = requests.length; i < len; i++) {\r\n result[i] = null;\r\n }\r\n return result;\r\n }\r\n const overallWidth = Math.round(firstLineBreakColumn * fontInfo.typicalHalfwidthCharacterWidth);\r\n // Cannot respect WrappingIndent.Indent and WrappingIndent.DeepIndent because that would require\r\n // two dom layouts, in order to first set the width of the first line, and then set the width of the wrapped lines\r\n if (wrappingIndent === 2 /* Indent */ || wrappingIndent === 3 /* DeepIndent */) {\r\n wrappingIndent = 1 /* Same */;\r\n }\r\n const containerDomNode = document.createElement('div');\r\n Configuration.applyFontInfoSlow(containerDomNode, fontInfo);\r\n const sb = createStringBuilder(10000);\r\n const firstNonWhitespaceIndices = [];\r\n const wrappedTextIndentLengths = [];\r\n const renderLineContents = [];\r\n const allCharOffsets = [];\r\n const allVisibleColumns = [];\r\n for (let i = 0; i < requests.length; i++) {\r\n const lineContent = requests[i];\r\n let firstNonWhitespaceIndex = 0;\r\n let wrappedTextIndentLength = 0;\r\n let width = overallWidth;\r\n if (wrappingIndent !== 0 /* None */) {\r\n firstNonWhitespaceIndex = strings.firstNonWhitespaceIndex(lineContent);\r\n if (firstNonWhitespaceIndex === -1) {\r\n // all whitespace line\r\n firstNonWhitespaceIndex = 0;\r\n }\r\n else {\r\n // Track existing indent\r\n for (let i = 0; i < firstNonWhitespaceIndex; i++) {\r\n const charWidth = (lineContent.charCodeAt(i) === 9 /* Tab */\r\n ? (tabSize - (wrappedTextIndentLength % tabSize))\r\n : 1);\r\n wrappedTextIndentLength += charWidth;\r\n }\r\n const indentWidth = Math.ceil(fontInfo.spaceWidth * wrappedTextIndentLength);\r\n // Force sticking to beginning of line if no character would fit except for the indentation\r\n if (indentWidth + fontInfo.typicalFullwidthCharacterWidth > overallWidth) {\r\n firstNonWhitespaceIndex = 0;\r\n wrappedTextIndentLength = 0;\r\n }\r\n else {\r\n width = overallWidth - indentWidth;\r\n }\r\n }\r\n }\r\n const renderLineContent = lineContent.substr(firstNonWhitespaceIndex);\r\n const tmp = renderLine(renderLineContent, wrappedTextIndentLength, tabSize, width, sb);\r\n firstNonWhitespaceIndices[i] = firstNonWhitespaceIndex;\r\n wrappedTextIndentLengths[i] = wrappedTextIndentLength;\r\n renderLineContents[i] = renderLineContent;\r\n allCharOffsets[i] = tmp[0];\r\n allVisibleColumns[i] = tmp[1];\r\n }\r\n const html = sb.build();\r\n const trustedhtml = (_a = ttPolicy === null || ttPolicy === void 0 ? void 0 : ttPolicy.createHTML(html)) !== null && _a !== void 0 ? _a : html;\r\n containerDomNode.innerHTML = trustedhtml;\r\n containerDomNode.style.position = 'absolute';\r\n containerDomNode.style.top = '10000';\r\n containerDomNode.style.wordWrap = 'break-word';\r\n document.body.appendChild(containerDomNode);\r\n let range = document.createRange();\r\n const lineDomNodes = Array.prototype.slice.call(containerDomNode.children, 0);\r\n let result = [];\r\n for (let i = 0; i < requests.length; i++) {\r\n const lineDomNode = lineDomNodes[i];\r\n const breakOffsets = readLineBreaks(range, lineDomNode, renderLineContents[i], allCharOffsets[i]);\r\n if (breakOffsets === null) {\r\n result[i] = null;\r\n continue;\r\n }\r\n const firstNonWhitespaceIndex = firstNonWhitespaceIndices[i];\r\n const wrappedTextIndentLength = wrappedTextIndentLengths[i];\r\n const visibleColumns = allVisibleColumns[i];\r\n const breakOffsetsVisibleColumn = [];\r\n for (let j = 0, len = breakOffsets.length; j < len; j++) {\r\n breakOffsetsVisibleColumn[j] = visibleColumns[breakOffsets[j]];\r\n }\r\n if (firstNonWhitespaceIndex !== 0) {\r\n // All break offsets are relative to the renderLineContent, make them absolute again\r\n for (let j = 0, len = breakOffsets.length; j < len; j++) {\r\n breakOffsets[j] += firstNonWhitespaceIndex;\r\n }\r\n }\r\n result[i] = new LineBreakData(breakOffsets, breakOffsetsVisibleColumn, wrappedTextIndentLength);\r\n }\r\n document.body.removeChild(containerDomNode);\r\n return result;\r\n}\r\nfunction renderLine(lineContent, initialVisibleColumn, tabSize, width, sb) {\r\n sb.appendASCIIString('
    ');\r\n // if (containsRTL) {\r\n // \tsb.appendASCIIString('\" dir=\"ltr');\r\n // }\r\n const len = lineContent.length;\r\n let visibleColumn = initialVisibleColumn;\r\n let charOffset = 0;\r\n let charOffsets = [];\r\n let visibleColumns = [];\r\n let nextCharCode = (0 < len ? lineContent.charCodeAt(0) : 0 /* Null */);\r\n sb.appendASCIIString('');\r\n for (let charIndex = 0; charIndex < len; charIndex++) {\r\n if (charIndex !== 0 && charIndex % 16384 /* SPAN_MODULO_LIMIT */ === 0) {\r\n sb.appendASCIIString('');\r\n }\r\n charOffsets[charIndex] = charOffset;\r\n visibleColumns[charIndex] = visibleColumn;\r\n const charCode = nextCharCode;\r\n nextCharCode = (charIndex + 1 < len ? lineContent.charCodeAt(charIndex + 1) : 0 /* Null */);\r\n let producedCharacters = 1;\r\n let charWidth = 1;\r\n switch (charCode) {\r\n case 9 /* Tab */:\r\n producedCharacters = (tabSize - (visibleColumn % tabSize));\r\n charWidth = producedCharacters;\r\n for (let space = 1; space <= producedCharacters; space++) {\r\n if (space < producedCharacters) {\r\n sb.write1(0xA0); //  \r\n }\r\n else {\r\n sb.appendASCII(32 /* Space */);\r\n }\r\n }\r\n break;\r\n case 32 /* Space */:\r\n if (nextCharCode === 32 /* Space */) {\r\n sb.write1(0xA0); //  \r\n }\r\n else {\r\n sb.appendASCII(32 /* Space */);\r\n }\r\n break;\r\n case 60 /* LessThan */:\r\n sb.appendASCIIString('<');\r\n break;\r\n case 62 /* GreaterThan */:\r\n sb.appendASCIIString('>');\r\n break;\r\n case 38 /* Ampersand */:\r\n sb.appendASCIIString('&');\r\n break;\r\n case 0 /* Null */:\r\n sb.appendASCIIString('�');\r\n break;\r\n case 65279 /* UTF8_BOM */:\r\n case 8232 /* LINE_SEPARATOR */:\r\n case 8233 /* PARAGRAPH_SEPARATOR */:\r\n case 133 /* NEXT_LINE */:\r\n sb.write1(0xFFFD);\r\n break;\r\n default:\r\n if (strings.isFullWidthCharacter(charCode)) {\r\n charWidth++;\r\n }\r\n // if (renderControlCharacters && charCode < 32) {\r\n // \tsb.write1(9216 + charCode);\r\n // } else {\r\n sb.write1(charCode);\r\n // }\r\n }\r\n charOffset += producedCharacters;\r\n visibleColumn += charWidth;\r\n }\r\n sb.appendASCIIString('');\r\n charOffsets[lineContent.length] = charOffset;\r\n visibleColumns[lineContent.length] = visibleColumn;\r\n sb.appendASCIIString('
    ');\r\n return [charOffsets, visibleColumns];\r\n}\r\nfunction readLineBreaks(range, lineDomNode, lineContent, charOffsets) {\r\n if (lineContent.length <= 1) {\r\n return null;\r\n }\r\n const spans = Array.prototype.slice.call(lineDomNode.children, 0);\r\n const breakOffsets = [];\r\n try {\r\n discoverBreaks(range, spans, charOffsets, 0, null, lineContent.length - 1, null, breakOffsets);\r\n }\r\n catch (err) {\r\n console.log(err);\r\n return null;\r\n }\r\n if (breakOffsets.length === 0) {\r\n return null;\r\n }\r\n breakOffsets.push(lineContent.length);\r\n return breakOffsets;\r\n}\r\nfunction discoverBreaks(range, spans, charOffsets, low, lowRects, high, highRects, result) {\r\n if (low === high) {\r\n return;\r\n }\r\n lowRects = lowRects || readClientRect(range, spans, charOffsets[low], charOffsets[low + 1]);\r\n highRects = highRects || readClientRect(range, spans, charOffsets[high], charOffsets[high + 1]);\r\n if (Math.abs(lowRects[0].top - highRects[0].top) <= 0.1) {\r\n // same line\r\n return;\r\n }\r\n // there is at least one line break between these two offsets\r\n if (low + 1 === high) {\r\n // the two characters are adjacent, so the line break must be exactly between them\r\n result.push(high);\r\n return;\r\n }\r\n const mid = low + ((high - low) / 2) | 0;\r\n const midRects = readClientRect(range, spans, charOffsets[mid], charOffsets[mid + 1]);\r\n discoverBreaks(range, spans, charOffsets, low, lowRects, mid, midRects, result);\r\n discoverBreaks(range, spans, charOffsets, mid, midRects, high, highRects, result);\r\n}\r\nfunction readClientRect(range, spans, startOffset, endOffset) {\r\n range.setStart(spans[(startOffset / 16384 /* SPAN_MODULO_LIMIT */) | 0].firstChild, startOffset % 16384 /* SPAN_MODULO_LIMIT */);\r\n range.setEnd(spans[(endOffset / 16384 /* SPAN_MODULO_LIMIT */) | 0].firstChild, endOffset % 16384 /* SPAN_MODULO_LIMIT */);\r\n return range.getClientRects();\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Position } from '../core/position.js';\r\nimport { Range } from '../core/range.js';\r\nimport { InlineDecoration, ViewModelDecoration } from './viewModel.js';\r\nimport { filterValidationDecorations } from '../config/editorOptions.js';\r\nexport class ViewModelDecorations {\r\n constructor(editorId, model, configuration, linesCollection, coordinatesConverter) {\r\n this.editorId = editorId;\r\n this.model = model;\r\n this.configuration = configuration;\r\n this._linesCollection = linesCollection;\r\n this._coordinatesConverter = coordinatesConverter;\r\n this._decorationsCache = Object.create(null);\r\n this._cachedModelDecorationsResolver = null;\r\n this._cachedModelDecorationsResolverViewRange = null;\r\n }\r\n _clearCachedModelDecorationsResolver() {\r\n this._cachedModelDecorationsResolver = null;\r\n this._cachedModelDecorationsResolverViewRange = null;\r\n }\r\n dispose() {\r\n this._decorationsCache = Object.create(null);\r\n this._clearCachedModelDecorationsResolver();\r\n }\r\n reset() {\r\n this._decorationsCache = Object.create(null);\r\n this._clearCachedModelDecorationsResolver();\r\n }\r\n onModelDecorationsChanged() {\r\n this._decorationsCache = Object.create(null);\r\n this._clearCachedModelDecorationsResolver();\r\n }\r\n onLineMappingChanged() {\r\n this._decorationsCache = Object.create(null);\r\n this._clearCachedModelDecorationsResolver();\r\n }\r\n _getOrCreateViewModelDecoration(modelDecoration) {\r\n const id = modelDecoration.id;\r\n let r = this._decorationsCache[id];\r\n if (!r) {\r\n const modelRange = modelDecoration.range;\r\n const options = modelDecoration.options;\r\n let viewRange;\r\n if (options.isWholeLine) {\r\n const start = this._coordinatesConverter.convertModelPositionToViewPosition(new Position(modelRange.startLineNumber, 1));\r\n const end = this._coordinatesConverter.convertModelPositionToViewPosition(new Position(modelRange.endLineNumber, this.model.getLineMaxColumn(modelRange.endLineNumber)));\r\n viewRange = new Range(start.lineNumber, start.column, end.lineNumber, end.column);\r\n }\r\n else {\r\n viewRange = this._coordinatesConverter.convertModelRangeToViewRange(modelRange);\r\n }\r\n r = new ViewModelDecoration(viewRange, options);\r\n this._decorationsCache[id] = r;\r\n }\r\n return r;\r\n }\r\n getDecorationsViewportData(viewRange) {\r\n let cacheIsValid = (this._cachedModelDecorationsResolver !== null);\r\n cacheIsValid = cacheIsValid && (viewRange.equalsRange(this._cachedModelDecorationsResolverViewRange));\r\n if (!cacheIsValid) {\r\n this._cachedModelDecorationsResolver = this._getDecorationsViewportData(viewRange);\r\n this._cachedModelDecorationsResolverViewRange = viewRange;\r\n }\r\n return this._cachedModelDecorationsResolver;\r\n }\r\n _getDecorationsViewportData(viewportRange) {\r\n const modelDecorations = this._linesCollection.getDecorationsInRange(viewportRange, this.editorId, filterValidationDecorations(this.configuration.options));\r\n const startLineNumber = viewportRange.startLineNumber;\r\n const endLineNumber = viewportRange.endLineNumber;\r\n let decorationsInViewport = [], decorationsInViewportLen = 0;\r\n let inlineDecorations = [];\r\n for (let j = startLineNumber; j <= endLineNumber; j++) {\r\n inlineDecorations[j - startLineNumber] = [];\r\n }\r\n for (let i = 0, len = modelDecorations.length; i < len; i++) {\r\n let modelDecoration = modelDecorations[i];\r\n let decorationOptions = modelDecoration.options;\r\n let viewModelDecoration = this._getOrCreateViewModelDecoration(modelDecoration);\r\n let viewRange = viewModelDecoration.range;\r\n decorationsInViewport[decorationsInViewportLen++] = viewModelDecoration;\r\n if (decorationOptions.inlineClassName) {\r\n let inlineDecoration = new InlineDecoration(viewRange, decorationOptions.inlineClassName, decorationOptions.inlineClassNameAffectsLetterSpacing ? 3 /* RegularAffectingLetterSpacing */ : 0 /* Regular */);\r\n let intersectedStartLineNumber = Math.max(startLineNumber, viewRange.startLineNumber);\r\n let intersectedEndLineNumber = Math.min(endLineNumber, viewRange.endLineNumber);\r\n for (let j = intersectedStartLineNumber; j <= intersectedEndLineNumber; j++) {\r\n inlineDecorations[j - startLineNumber].push(inlineDecoration);\r\n }\r\n }\r\n if (decorationOptions.beforeContentClassName) {\r\n if (startLineNumber <= viewRange.startLineNumber && viewRange.startLineNumber <= endLineNumber) {\r\n let inlineDecoration = new InlineDecoration(new Range(viewRange.startLineNumber, viewRange.startColumn, viewRange.startLineNumber, viewRange.startColumn), decorationOptions.beforeContentClassName, 1 /* Before */);\r\n inlineDecorations[viewRange.startLineNumber - startLineNumber].push(inlineDecoration);\r\n }\r\n }\r\n if (decorationOptions.afterContentClassName) {\r\n if (startLineNumber <= viewRange.endLineNumber && viewRange.endLineNumber <= endLineNumber) {\r\n let inlineDecoration = new InlineDecoration(new Range(viewRange.endLineNumber, viewRange.endColumn, viewRange.endLineNumber, viewRange.endColumn), decorationOptions.afterContentClassName, 2 /* After */);\r\n inlineDecorations[viewRange.endLineNumber - startLineNumber].push(inlineDecoration);\r\n }\r\n }\r\n }\r\n return {\r\n decorations: decorationsInViewport,\r\n inlineDecorations: inlineDecorations\r\n };\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Color } from '../../../base/common/color.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { EDITOR_FONT_DEFAULTS, filterValidationDecorations } from '../config/editorOptions.js';\r\nimport { Position } from '../core/position.js';\r\nimport { Range } from '../core/range.js';\r\nimport { TokenizationRegistry } from '../modes.js';\r\nimport { tokenizeLineToHTML } from '../modes/textToHtmlTokenizer.js';\r\nimport { MinimapTokensColorTracker } from './minimapTokensColorTracker.js';\r\nimport * as viewEvents from '../view/viewEvents.js';\r\nimport { ViewLayout } from '../viewLayout/viewLayout.js';\r\nimport { IdentityLinesCollection, SplitLinesCollection } from './splitLinesCollection.js';\r\nimport { MinimapLinesRenderingData, ViewLineRenderingData } from './viewModel.js';\r\nimport { ViewModelDecorations } from './viewModelDecorations.js';\r\nimport { RunOnceScheduler } from '../../../base/common/async.js';\r\nimport * as platform from '../../../base/common/platform.js';\r\nimport { Cursor } from '../controller/cursor.js';\r\nimport { CursorConfiguration } from '../controller/cursorCommon.js';\r\nimport { ViewModelEventDispatcher, FocusChangedEvent, ScrollChangedEvent, ViewZonesChangedEvent, ReadOnlyEditAttemptEvent } from './viewModelEventDispatcher.js';\r\nconst USE_IDENTITY_LINES_COLLECTION = true;\r\nexport class ViewModel extends Disposable {\r\n constructor(editorId, configuration, model, domLineBreaksComputerFactory, monospaceLineBreaksComputerFactory, scheduleAtNextAnimationFrame) {\r\n super();\r\n this._editorId = editorId;\r\n this._configuration = configuration;\r\n this.model = model;\r\n this._eventDispatcher = new ViewModelEventDispatcher();\r\n this.onEvent = this._eventDispatcher.onEvent;\r\n this.cursorConfig = new CursorConfiguration(this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration);\r\n this._tokenizeViewportSoon = this._register(new RunOnceScheduler(() => this.tokenizeViewport(), 50));\r\n this._updateConfigurationViewLineCount = this._register(new RunOnceScheduler(() => this._updateConfigurationViewLineCountNow(), 0));\r\n this._hasFocus = false;\r\n this._viewportStartLine = -1;\r\n this._viewportStartLineTrackedRange = null;\r\n this._viewportStartLineDelta = 0;\r\n if (USE_IDENTITY_LINES_COLLECTION && this.model.isTooLargeForTokenization()) {\r\n this._lines = new IdentityLinesCollection(this.model);\r\n }\r\n else {\r\n const options = this._configuration.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const wrappingStrategy = options.get(118 /* wrappingStrategy */);\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n const wrappingIndent = options.get(117 /* wrappingIndent */);\r\n this._lines = new SplitLinesCollection(this.model, domLineBreaksComputerFactory, monospaceLineBreaksComputerFactory, fontInfo, this.model.getOptions().tabSize, wrappingStrategy, wrappingInfo.wrappingColumn, wrappingIndent);\r\n }\r\n this.coordinatesConverter = this._lines.createCoordinatesConverter();\r\n this._cursor = this._register(new Cursor(model, this, this.coordinatesConverter, this.cursorConfig));\r\n this.viewLayout = this._register(new ViewLayout(this._configuration, this.getLineCount(), scheduleAtNextAnimationFrame));\r\n this._register(this.viewLayout.onDidScroll((e) => {\r\n if (e.scrollTopChanged) {\r\n this._tokenizeViewportSoon.schedule();\r\n }\r\n this._eventDispatcher.emitSingleViewEvent(new viewEvents.ViewScrollChangedEvent(e));\r\n this._eventDispatcher.emitOutgoingEvent(new ScrollChangedEvent(e.oldScrollWidth, e.oldScrollLeft, e.oldScrollHeight, e.oldScrollTop, e.scrollWidth, e.scrollLeft, e.scrollHeight, e.scrollTop));\r\n }));\r\n this._register(this.viewLayout.onDidContentSizeChange((e) => {\r\n this._eventDispatcher.emitOutgoingEvent(e);\r\n }));\r\n this._decorations = new ViewModelDecorations(this._editorId, this.model, this._configuration, this._lines, this.coordinatesConverter);\r\n this._registerModelEvents();\r\n this._register(this._configuration.onDidChangeFast((e) => {\r\n try {\r\n const eventsCollector = this._eventDispatcher.beginEmitViewEvents();\r\n this._onConfigurationChanged(eventsCollector, e);\r\n }\r\n finally {\r\n this._eventDispatcher.endEmitViewEvents();\r\n }\r\n }));\r\n this._register(MinimapTokensColorTracker.getInstance().onDidChange(() => {\r\n this._eventDispatcher.emitSingleViewEvent(new viewEvents.ViewTokensColorsChangedEvent());\r\n }));\r\n this._updateConfigurationViewLineCountNow();\r\n }\r\n dispose() {\r\n // First remove listeners, as disposing the lines might end up sending\r\n // model decoration changed events ... and we no longer care about them ...\r\n super.dispose();\r\n this._decorations.dispose();\r\n this._lines.dispose();\r\n this.invalidateMinimapColorCache();\r\n this._viewportStartLineTrackedRange = this.model._setTrackedRange(this._viewportStartLineTrackedRange, null, 1 /* NeverGrowsWhenTypingAtEdges */);\r\n this._eventDispatcher.dispose();\r\n }\r\n createLineBreaksComputer() {\r\n return this._lines.createLineBreaksComputer();\r\n }\r\n addViewEventHandler(eventHandler) {\r\n this._eventDispatcher.addViewEventHandler(eventHandler);\r\n }\r\n removeViewEventHandler(eventHandler) {\r\n this._eventDispatcher.removeViewEventHandler(eventHandler);\r\n }\r\n _updateConfigurationViewLineCountNow() {\r\n this._configuration.setViewLineCount(this._lines.getViewLineCount());\r\n }\r\n tokenizeViewport() {\r\n const linesViewportData = this.viewLayout.getLinesViewportData();\r\n const startPosition = this.coordinatesConverter.convertViewPositionToModelPosition(new Position(linesViewportData.startLineNumber, 1));\r\n const endPosition = this.coordinatesConverter.convertViewPositionToModelPosition(new Position(linesViewportData.endLineNumber, 1));\r\n this.model.tokenizeViewport(startPosition.lineNumber, endPosition.lineNumber);\r\n }\r\n setHasFocus(hasFocus) {\r\n this._hasFocus = hasFocus;\r\n this._cursor.setHasFocus(hasFocus);\r\n this._eventDispatcher.emitSingleViewEvent(new viewEvents.ViewFocusChangedEvent(hasFocus));\r\n this._eventDispatcher.emitOutgoingEvent(new FocusChangedEvent(!hasFocus, hasFocus));\r\n }\r\n onCompositionStart() {\r\n this._eventDispatcher.emitSingleViewEvent(new viewEvents.ViewCompositionStartEvent());\r\n }\r\n onCompositionEnd() {\r\n this._eventDispatcher.emitSingleViewEvent(new viewEvents.ViewCompositionEndEvent());\r\n }\r\n onDidColorThemeChange() {\r\n this._eventDispatcher.emitSingleViewEvent(new viewEvents.ViewThemeChangedEvent());\r\n }\r\n _onConfigurationChanged(eventsCollector, e) {\r\n // We might need to restore the current centered view range, so save it (if available)\r\n let previousViewportStartModelPosition = null;\r\n if (this._viewportStartLine !== -1) {\r\n let previousViewportStartViewPosition = new Position(this._viewportStartLine, this.getLineMinColumn(this._viewportStartLine));\r\n previousViewportStartModelPosition = this.coordinatesConverter.convertViewPositionToModelPosition(previousViewportStartViewPosition);\r\n }\r\n let restorePreviousViewportStart = false;\r\n const options = this._configuration.options;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const wrappingStrategy = options.get(118 /* wrappingStrategy */);\r\n const wrappingInfo = options.get(125 /* wrappingInfo */);\r\n const wrappingIndent = options.get(117 /* wrappingIndent */);\r\n if (this._lines.setWrappingSettings(fontInfo, wrappingStrategy, wrappingInfo.wrappingColumn, wrappingIndent)) {\r\n eventsCollector.emitViewEvent(new viewEvents.ViewFlushedEvent());\r\n eventsCollector.emitViewEvent(new viewEvents.ViewLineMappingChangedEvent());\r\n eventsCollector.emitViewEvent(new viewEvents.ViewDecorationsChangedEvent(null));\r\n this._cursor.onLineMappingChanged(eventsCollector);\r\n this._decorations.onLineMappingChanged();\r\n this.viewLayout.onFlushed(this.getLineCount());\r\n if (this.viewLayout.getCurrentScrollTop() !== 0) {\r\n // Never change the scroll position from 0 to something else...\r\n restorePreviousViewportStart = true;\r\n }\r\n this._updateConfigurationViewLineCount.schedule();\r\n }\r\n if (e.hasChanged(75 /* readOnly */)) {\r\n // Must read again all decorations due to readOnly filtering\r\n this._decorations.reset();\r\n eventsCollector.emitViewEvent(new viewEvents.ViewDecorationsChangedEvent(null));\r\n }\r\n eventsCollector.emitViewEvent(new viewEvents.ViewConfigurationChangedEvent(e));\r\n this.viewLayout.onConfigurationChanged(e);\r\n if (restorePreviousViewportStart && previousViewportStartModelPosition) {\r\n const viewPosition = this.coordinatesConverter.convertModelPositionToViewPosition(previousViewportStartModelPosition);\r\n const viewPositionTop = this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber);\r\n this.viewLayout.setScrollPosition({ scrollTop: viewPositionTop + this._viewportStartLineDelta }, 1 /* Immediate */);\r\n }\r\n if (CursorConfiguration.shouldRecreate(e)) {\r\n this.cursorConfig = new CursorConfiguration(this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration);\r\n this._cursor.updateConfiguration(this.cursorConfig);\r\n }\r\n }\r\n _registerModelEvents() {\r\n this._register(this.model.onDidChangeRawContentFast((e) => {\r\n try {\r\n const eventsCollector = this._eventDispatcher.beginEmitViewEvents();\r\n let hadOtherModelChange = false;\r\n let hadModelLineChangeThatChangedLineMapping = false;\r\n const changes = e.changes;\r\n const versionId = e.versionId;\r\n // Do a first pass to compute line mappings, and a second pass to actually interpret them\r\n const lineBreaksComputer = this._lines.createLineBreaksComputer();\r\n for (const change of changes) {\r\n switch (change.changeType) {\r\n case 4 /* LinesInserted */: {\r\n for (const line of change.detail) {\r\n lineBreaksComputer.addRequest(line, null);\r\n }\r\n break;\r\n }\r\n case 2 /* LineChanged */: {\r\n lineBreaksComputer.addRequest(change.detail, null);\r\n break;\r\n }\r\n }\r\n }\r\n const lineBreaks = lineBreaksComputer.finalize();\r\n let lineBreaksOffset = 0;\r\n for (const change of changes) {\r\n switch (change.changeType) {\r\n case 1 /* Flush */: {\r\n this._lines.onModelFlushed();\r\n eventsCollector.emitViewEvent(new viewEvents.ViewFlushedEvent());\r\n this._decorations.reset();\r\n this.viewLayout.onFlushed(this.getLineCount());\r\n hadOtherModelChange = true;\r\n break;\r\n }\r\n case 3 /* LinesDeleted */: {\r\n const linesDeletedEvent = this._lines.onModelLinesDeleted(versionId, change.fromLineNumber, change.toLineNumber);\r\n if (linesDeletedEvent !== null) {\r\n eventsCollector.emitViewEvent(linesDeletedEvent);\r\n this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber, linesDeletedEvent.toLineNumber);\r\n }\r\n hadOtherModelChange = true;\r\n break;\r\n }\r\n case 4 /* LinesInserted */: {\r\n const insertedLineBreaks = lineBreaks.slice(lineBreaksOffset, lineBreaksOffset + change.detail.length);\r\n lineBreaksOffset += change.detail.length;\r\n const linesInsertedEvent = this._lines.onModelLinesInserted(versionId, change.fromLineNumber, change.toLineNumber, insertedLineBreaks);\r\n if (linesInsertedEvent !== null) {\r\n eventsCollector.emitViewEvent(linesInsertedEvent);\r\n this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber, linesInsertedEvent.toLineNumber);\r\n }\r\n hadOtherModelChange = true;\r\n break;\r\n }\r\n case 2 /* LineChanged */: {\r\n const changedLineBreakData = lineBreaks[lineBreaksOffset];\r\n lineBreaksOffset++;\r\n const [lineMappingChanged, linesChangedEvent, linesInsertedEvent, linesDeletedEvent] = this._lines.onModelLineChanged(versionId, change.lineNumber, changedLineBreakData);\r\n hadModelLineChangeThatChangedLineMapping = lineMappingChanged;\r\n if (linesChangedEvent) {\r\n eventsCollector.emitViewEvent(linesChangedEvent);\r\n }\r\n if (linesInsertedEvent) {\r\n eventsCollector.emitViewEvent(linesInsertedEvent);\r\n this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber, linesInsertedEvent.toLineNumber);\r\n }\r\n if (linesDeletedEvent) {\r\n eventsCollector.emitViewEvent(linesDeletedEvent);\r\n this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber, linesDeletedEvent.toLineNumber);\r\n }\r\n break;\r\n }\r\n case 5 /* EOLChanged */: {\r\n // Nothing to do. The new version will be accepted below\r\n break;\r\n }\r\n }\r\n }\r\n this._lines.acceptVersionId(versionId);\r\n this.viewLayout.onHeightMaybeChanged();\r\n if (!hadOtherModelChange && hadModelLineChangeThatChangedLineMapping) {\r\n eventsCollector.emitViewEvent(new viewEvents.ViewLineMappingChangedEvent());\r\n eventsCollector.emitViewEvent(new viewEvents.ViewDecorationsChangedEvent(null));\r\n this._cursor.onLineMappingChanged(eventsCollector);\r\n this._decorations.onLineMappingChanged();\r\n }\r\n }\r\n finally {\r\n this._eventDispatcher.endEmitViewEvents();\r\n }\r\n // Update the configuration and reset the centered view line\r\n this._viewportStartLine = -1;\r\n this._configuration.setMaxLineNumber(this.model.getLineCount());\r\n this._updateConfigurationViewLineCountNow();\r\n // Recover viewport\r\n if (!this._hasFocus && this.model.getAttachedEditorCount() >= 2 && this._viewportStartLineTrackedRange) {\r\n const modelRange = this.model._getTrackedRange(this._viewportStartLineTrackedRange);\r\n if (modelRange) {\r\n const viewPosition = this.coordinatesConverter.convertModelPositionToViewPosition(modelRange.getStartPosition());\r\n const viewPositionTop = this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber);\r\n this.viewLayout.setScrollPosition({ scrollTop: viewPositionTop + this._viewportStartLineDelta }, 1 /* Immediate */);\r\n }\r\n }\r\n try {\r\n const eventsCollector = this._eventDispatcher.beginEmitViewEvents();\r\n this._cursor.onModelContentChanged(eventsCollector, e);\r\n }\r\n finally {\r\n this._eventDispatcher.endEmitViewEvents();\r\n }\r\n }));\r\n this._register(this.model.onDidChangeTokens((e) => {\r\n let viewRanges = [];\r\n for (let j = 0, lenJ = e.ranges.length; j < lenJ; j++) {\r\n const modelRange = e.ranges[j];\r\n const viewStartLineNumber = this.coordinatesConverter.convertModelPositionToViewPosition(new Position(modelRange.fromLineNumber, 1)).lineNumber;\r\n const viewEndLineNumber = this.coordinatesConverter.convertModelPositionToViewPosition(new Position(modelRange.toLineNumber, this.model.getLineMaxColumn(modelRange.toLineNumber))).lineNumber;\r\n viewRanges[j] = {\r\n fromLineNumber: viewStartLineNumber,\r\n toLineNumber: viewEndLineNumber\r\n };\r\n }\r\n this._eventDispatcher.emitSingleViewEvent(new viewEvents.ViewTokensChangedEvent(viewRanges));\r\n if (e.tokenizationSupportChanged) {\r\n this._tokenizeViewportSoon.schedule();\r\n }\r\n }));\r\n this._register(this.model.onDidChangeLanguageConfiguration((e) => {\r\n this._eventDispatcher.emitSingleViewEvent(new viewEvents.ViewLanguageConfigurationEvent());\r\n this.cursorConfig = new CursorConfiguration(this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration);\r\n this._cursor.updateConfiguration(this.cursorConfig);\r\n }));\r\n this._register(this.model.onDidChangeLanguage((e) => {\r\n this.cursorConfig = new CursorConfiguration(this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration);\r\n this._cursor.updateConfiguration(this.cursorConfig);\r\n }));\r\n this._register(this.model.onDidChangeOptions((e) => {\r\n // A tab size change causes a line mapping changed event => all view parts will repaint OK, no further event needed here\r\n if (this._lines.setTabSize(this.model.getOptions().tabSize)) {\r\n try {\r\n const eventsCollector = this._eventDispatcher.beginEmitViewEvents();\r\n eventsCollector.emitViewEvent(new viewEvents.ViewFlushedEvent());\r\n eventsCollector.emitViewEvent(new viewEvents.ViewLineMappingChangedEvent());\r\n eventsCollector.emitViewEvent(new viewEvents.ViewDecorationsChangedEvent(null));\r\n this._cursor.onLineMappingChanged(eventsCollector);\r\n this._decorations.onLineMappingChanged();\r\n this.viewLayout.onFlushed(this.getLineCount());\r\n }\r\n finally {\r\n this._eventDispatcher.endEmitViewEvents();\r\n }\r\n this._updateConfigurationViewLineCount.schedule();\r\n }\r\n this.cursorConfig = new CursorConfiguration(this.model.getLanguageIdentifier(), this.model.getOptions(), this._configuration);\r\n this._cursor.updateConfiguration(this.cursorConfig);\r\n }));\r\n this._register(this.model.onDidChangeDecorations((e) => {\r\n this._decorations.onModelDecorationsChanged();\r\n this._eventDispatcher.emitSingleViewEvent(new viewEvents.ViewDecorationsChangedEvent(e));\r\n }));\r\n }\r\n setHiddenAreas(ranges) {\r\n try {\r\n const eventsCollector = this._eventDispatcher.beginEmitViewEvents();\r\n let lineMappingChanged = this._lines.setHiddenAreas(ranges);\r\n if (lineMappingChanged) {\r\n eventsCollector.emitViewEvent(new viewEvents.ViewFlushedEvent());\r\n eventsCollector.emitViewEvent(new viewEvents.ViewLineMappingChangedEvent());\r\n eventsCollector.emitViewEvent(new viewEvents.ViewDecorationsChangedEvent(null));\r\n this._cursor.onLineMappingChanged(eventsCollector);\r\n this._decorations.onLineMappingChanged();\r\n this.viewLayout.onFlushed(this.getLineCount());\r\n this.viewLayout.onHeightMaybeChanged();\r\n }\r\n }\r\n finally {\r\n this._eventDispatcher.endEmitViewEvents();\r\n }\r\n this._updateConfigurationViewLineCount.schedule();\r\n }\r\n getVisibleRangesPlusViewportAboveBelow() {\r\n const layoutInfo = this._configuration.options.get(124 /* layoutInfo */);\r\n const lineHeight = this._configuration.options.get(53 /* lineHeight */);\r\n const linesAround = Math.max(20, Math.round(layoutInfo.height / lineHeight));\r\n const partialData = this.viewLayout.getLinesViewportData();\r\n const startViewLineNumber = Math.max(1, partialData.completelyVisibleStartLineNumber - linesAround);\r\n const endViewLineNumber = Math.min(this.getLineCount(), partialData.completelyVisibleEndLineNumber + linesAround);\r\n return this._toModelVisibleRanges(new Range(startViewLineNumber, this.getLineMinColumn(startViewLineNumber), endViewLineNumber, this.getLineMaxColumn(endViewLineNumber)));\r\n }\r\n getVisibleRanges() {\r\n const visibleViewRange = this.getCompletelyVisibleViewRange();\r\n return this._toModelVisibleRanges(visibleViewRange);\r\n }\r\n _toModelVisibleRanges(visibleViewRange) {\r\n const visibleRange = this.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange);\r\n const hiddenAreas = this._lines.getHiddenAreas();\r\n if (hiddenAreas.length === 0) {\r\n return [visibleRange];\r\n }\r\n let result = [], resultLen = 0;\r\n let startLineNumber = visibleRange.startLineNumber;\r\n let startColumn = visibleRange.startColumn;\r\n let endLineNumber = visibleRange.endLineNumber;\r\n let endColumn = visibleRange.endColumn;\r\n for (let i = 0, len = hiddenAreas.length; i < len; i++) {\r\n const hiddenStartLineNumber = hiddenAreas[i].startLineNumber;\r\n const hiddenEndLineNumber = hiddenAreas[i].endLineNumber;\r\n if (hiddenEndLineNumber < startLineNumber) {\r\n continue;\r\n }\r\n if (hiddenStartLineNumber > endLineNumber) {\r\n continue;\r\n }\r\n if (startLineNumber < hiddenStartLineNumber) {\r\n result[resultLen++] = new Range(startLineNumber, startColumn, hiddenStartLineNumber - 1, this.model.getLineMaxColumn(hiddenStartLineNumber - 1));\r\n }\r\n startLineNumber = hiddenEndLineNumber + 1;\r\n startColumn = 1;\r\n }\r\n if (startLineNumber < endLineNumber || (startLineNumber === endLineNumber && startColumn < endColumn)) {\r\n result[resultLen++] = new Range(startLineNumber, startColumn, endLineNumber, endColumn);\r\n }\r\n return result;\r\n }\r\n getCompletelyVisibleViewRange() {\r\n const partialData = this.viewLayout.getLinesViewportData();\r\n const startViewLineNumber = partialData.completelyVisibleStartLineNumber;\r\n const endViewLineNumber = partialData.completelyVisibleEndLineNumber;\r\n return new Range(startViewLineNumber, this.getLineMinColumn(startViewLineNumber), endViewLineNumber, this.getLineMaxColumn(endViewLineNumber));\r\n }\r\n getCompletelyVisibleViewRangeAtScrollTop(scrollTop) {\r\n const partialData = this.viewLayout.getLinesViewportDataAtScrollTop(scrollTop);\r\n const startViewLineNumber = partialData.completelyVisibleStartLineNumber;\r\n const endViewLineNumber = partialData.completelyVisibleEndLineNumber;\r\n return new Range(startViewLineNumber, this.getLineMinColumn(startViewLineNumber), endViewLineNumber, this.getLineMaxColumn(endViewLineNumber));\r\n }\r\n saveState() {\r\n const compatViewState = this.viewLayout.saveState();\r\n const scrollTop = compatViewState.scrollTop;\r\n const firstViewLineNumber = this.viewLayout.getLineNumberAtVerticalOffset(scrollTop);\r\n const firstPosition = this.coordinatesConverter.convertViewPositionToModelPosition(new Position(firstViewLineNumber, this.getLineMinColumn(firstViewLineNumber)));\r\n const firstPositionDeltaTop = this.viewLayout.getVerticalOffsetForLineNumber(firstViewLineNumber) - scrollTop;\r\n return {\r\n scrollLeft: compatViewState.scrollLeft,\r\n firstPosition: firstPosition,\r\n firstPositionDeltaTop: firstPositionDeltaTop\r\n };\r\n }\r\n reduceRestoreState(state) {\r\n if (typeof state.firstPosition === 'undefined') {\r\n // This is a view state serialized by an older version\r\n return this._reduceRestoreStateCompatibility(state);\r\n }\r\n const modelPosition = this.model.validatePosition(state.firstPosition);\r\n const viewPosition = this.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);\r\n const scrollTop = this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber) - state.firstPositionDeltaTop;\r\n return {\r\n scrollLeft: state.scrollLeft,\r\n scrollTop: scrollTop\r\n };\r\n }\r\n _reduceRestoreStateCompatibility(state) {\r\n return {\r\n scrollLeft: state.scrollLeft,\r\n scrollTop: state.scrollTopWithoutViewZones\r\n };\r\n }\r\n getTabSize() {\r\n return this.model.getOptions().tabSize;\r\n }\r\n getTextModelOptions() {\r\n return this.model.getOptions();\r\n }\r\n getLineCount() {\r\n return this._lines.getViewLineCount();\r\n }\r\n /**\r\n * Gives a hint that a lot of requests are about to come in for these line numbers.\r\n */\r\n setViewport(startLineNumber, endLineNumber, centeredLineNumber) {\r\n this._viewportStartLine = startLineNumber;\r\n let position = this.coordinatesConverter.convertViewPositionToModelPosition(new Position(startLineNumber, this.getLineMinColumn(startLineNumber)));\r\n this._viewportStartLineTrackedRange = this.model._setTrackedRange(this._viewportStartLineTrackedRange, new Range(position.lineNumber, position.column, position.lineNumber, position.column), 1 /* NeverGrowsWhenTypingAtEdges */);\r\n const viewportStartLineTop = this.viewLayout.getVerticalOffsetForLineNumber(startLineNumber);\r\n const scrollTop = this.viewLayout.getCurrentScrollTop();\r\n this._viewportStartLineDelta = scrollTop - viewportStartLineTop;\r\n }\r\n getActiveIndentGuide(lineNumber, minLineNumber, maxLineNumber) {\r\n return this._lines.getActiveIndentGuide(lineNumber, minLineNumber, maxLineNumber);\r\n }\r\n getLinesIndentGuides(startLineNumber, endLineNumber) {\r\n return this._lines.getViewLinesIndentGuides(startLineNumber, endLineNumber);\r\n }\r\n getLineContent(lineNumber) {\r\n return this._lines.getViewLineContent(lineNumber);\r\n }\r\n getLineLength(lineNumber) {\r\n return this._lines.getViewLineLength(lineNumber);\r\n }\r\n getLineMinColumn(lineNumber) {\r\n return this._lines.getViewLineMinColumn(lineNumber);\r\n }\r\n getLineMaxColumn(lineNumber) {\r\n return this._lines.getViewLineMaxColumn(lineNumber);\r\n }\r\n getLineFirstNonWhitespaceColumn(lineNumber) {\r\n const result = strings.firstNonWhitespaceIndex(this.getLineContent(lineNumber));\r\n if (result === -1) {\r\n return 0;\r\n }\r\n return result + 1;\r\n }\r\n getLineLastNonWhitespaceColumn(lineNumber) {\r\n const result = strings.lastNonWhitespaceIndex(this.getLineContent(lineNumber));\r\n if (result === -1) {\r\n return 0;\r\n }\r\n return result + 2;\r\n }\r\n getDecorationsInViewport(visibleRange) {\r\n return this._decorations.getDecorationsViewportData(visibleRange).decorations;\r\n }\r\n getViewLineRenderingData(visibleRange, lineNumber) {\r\n let mightContainRTL = this.model.mightContainRTL();\r\n let mightContainNonBasicASCII = this.model.mightContainNonBasicASCII();\r\n let tabSize = this.getTabSize();\r\n let lineData = this._lines.getViewLineData(lineNumber);\r\n let allInlineDecorations = this._decorations.getDecorationsViewportData(visibleRange).inlineDecorations;\r\n let inlineDecorations = allInlineDecorations[lineNumber - visibleRange.startLineNumber];\r\n return new ViewLineRenderingData(lineData.minColumn, lineData.maxColumn, lineData.content, lineData.continuesWithWrappedLine, mightContainRTL, mightContainNonBasicASCII, lineData.tokens, inlineDecorations, tabSize, lineData.startVisibleColumn);\r\n }\r\n getViewLineData(lineNumber) {\r\n return this._lines.getViewLineData(lineNumber);\r\n }\r\n getMinimapLinesRenderingData(startLineNumber, endLineNumber, needed) {\r\n let result = this._lines.getViewLinesData(startLineNumber, endLineNumber, needed);\r\n return new MinimapLinesRenderingData(this.getTabSize(), result);\r\n }\r\n getAllOverviewRulerDecorations(theme) {\r\n return this._lines.getAllOverviewRulerDecorations(this._editorId, filterValidationDecorations(this._configuration.options), theme);\r\n }\r\n invalidateOverviewRulerColorCache() {\r\n const decorations = this.model.getOverviewRulerDecorations();\r\n for (const decoration of decorations) {\r\n const opts = decoration.options.overviewRuler;\r\n if (opts) {\r\n opts.invalidateCachedColor();\r\n }\r\n }\r\n }\r\n invalidateMinimapColorCache() {\r\n const decorations = this.model.getAllDecorations();\r\n for (const decoration of decorations) {\r\n const opts = decoration.options.minimap;\r\n if (opts) {\r\n opts.invalidateCachedColor();\r\n }\r\n }\r\n }\r\n getValueInRange(range, eol) {\r\n const modelRange = this.coordinatesConverter.convertViewRangeToModelRange(range);\r\n return this.model.getValueInRange(modelRange, eol);\r\n }\r\n getModelLineMaxColumn(modelLineNumber) {\r\n return this.model.getLineMaxColumn(modelLineNumber);\r\n }\r\n validateModelPosition(position) {\r\n return this.model.validatePosition(position);\r\n }\r\n validateModelRange(range) {\r\n return this.model.validateRange(range);\r\n }\r\n deduceModelPositionRelativeToViewPosition(viewAnchorPosition, deltaOffset, lineFeedCnt) {\r\n const modelAnchor = this.coordinatesConverter.convertViewPositionToModelPosition(viewAnchorPosition);\r\n if (this.model.getEOL().length === 2) {\r\n // This model uses CRLF, so the delta must take that into account\r\n if (deltaOffset < 0) {\r\n deltaOffset -= lineFeedCnt;\r\n }\r\n else {\r\n deltaOffset += lineFeedCnt;\r\n }\r\n }\r\n const modelAnchorOffset = this.model.getOffsetAt(modelAnchor);\r\n const resultOffset = modelAnchorOffset + deltaOffset;\r\n return this.model.getPositionAt(resultOffset);\r\n }\r\n getEOL() {\r\n return this.model.getEOL();\r\n }\r\n getPlainTextToCopy(modelRanges, emptySelectionClipboard, forceCRLF) {\r\n const newLineCharacter = forceCRLF ? '\\r\\n' : this.model.getEOL();\r\n modelRanges = modelRanges.slice(0);\r\n modelRanges.sort(Range.compareRangesUsingStarts);\r\n let hasEmptyRange = false;\r\n let hasNonEmptyRange = false;\r\n for (const range of modelRanges) {\r\n if (range.isEmpty()) {\r\n hasEmptyRange = true;\r\n }\r\n else {\r\n hasNonEmptyRange = true;\r\n }\r\n }\r\n if (!hasNonEmptyRange) {\r\n // all ranges are empty\r\n if (!emptySelectionClipboard) {\r\n return '';\r\n }\r\n const modelLineNumbers = modelRanges.map((r) => r.startLineNumber);\r\n let result = '';\r\n for (let i = 0; i < modelLineNumbers.length; i++) {\r\n if (i > 0 && modelLineNumbers[i - 1] === modelLineNumbers[i]) {\r\n continue;\r\n }\r\n result += this.model.getLineContent(modelLineNumbers[i]) + newLineCharacter;\r\n }\r\n return result;\r\n }\r\n if (hasEmptyRange && emptySelectionClipboard) {\r\n // mixed empty selections and non-empty selections\r\n let result = [];\r\n let prevModelLineNumber = 0;\r\n for (const modelRange of modelRanges) {\r\n const modelLineNumber = modelRange.startLineNumber;\r\n if (modelRange.isEmpty()) {\r\n if (modelLineNumber !== prevModelLineNumber) {\r\n result.push(this.model.getLineContent(modelLineNumber));\r\n }\r\n }\r\n else {\r\n result.push(this.model.getValueInRange(modelRange, forceCRLF ? 2 /* CRLF */ : 0 /* TextDefined */));\r\n }\r\n prevModelLineNumber = modelLineNumber;\r\n }\r\n return result.length === 1 ? result[0] : result;\r\n }\r\n let result = [];\r\n for (const modelRange of modelRanges) {\r\n if (!modelRange.isEmpty()) {\r\n result.push(this.model.getValueInRange(modelRange, forceCRLF ? 2 /* CRLF */ : 0 /* TextDefined */));\r\n }\r\n }\r\n return result.length === 1 ? result[0] : result;\r\n }\r\n getRichTextToCopy(modelRanges, emptySelectionClipboard) {\r\n const languageId = this.model.getLanguageIdentifier();\r\n if (languageId.id === 1 /* PlainText */) {\r\n return null;\r\n }\r\n if (modelRanges.length !== 1) {\r\n // no multiple selection support at this time\r\n return null;\r\n }\r\n let range = modelRanges[0];\r\n if (range.isEmpty()) {\r\n if (!emptySelectionClipboard) {\r\n // nothing to copy\r\n return null;\r\n }\r\n const lineNumber = range.startLineNumber;\r\n range = new Range(lineNumber, this.model.getLineMinColumn(lineNumber), lineNumber, this.model.getLineMaxColumn(lineNumber));\r\n }\r\n const fontInfo = this._configuration.options.get(38 /* fontInfo */);\r\n const colorMap = this._getColorMap();\r\n const fontFamily = fontInfo.fontFamily === EDITOR_FONT_DEFAULTS.fontFamily ? fontInfo.fontFamily : `'${fontInfo.fontFamily}', ${EDITOR_FONT_DEFAULTS.fontFamily}`;\r\n return {\r\n mode: languageId.language,\r\n html: (`
    `\r\n + this._getHTMLToCopy(range, colorMap)\r\n + '
    ')\r\n };\r\n }\r\n _getHTMLToCopy(modelRange, colorMap) {\r\n const startLineNumber = modelRange.startLineNumber;\r\n const startColumn = modelRange.startColumn;\r\n const endLineNumber = modelRange.endLineNumber;\r\n const endColumn = modelRange.endColumn;\r\n const tabSize = this.getTabSize();\r\n let result = '';\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n const lineTokens = this.model.getLineTokens(lineNumber);\r\n const lineContent = lineTokens.getLineContent();\r\n const startOffset = (lineNumber === startLineNumber ? startColumn - 1 : 0);\r\n const endOffset = (lineNumber === endLineNumber ? endColumn - 1 : lineContent.length);\r\n if (lineContent === '') {\r\n result += '
    ';\r\n }\r\n else {\r\n result += tokenizeLineToHTML(lineContent, lineTokens.inflate(), colorMap, startOffset, endOffset, tabSize, platform.isWindows);\r\n }\r\n }\r\n return result;\r\n }\r\n _getColorMap() {\r\n let colorMap = TokenizationRegistry.getColorMap();\r\n let result = ['#000000'];\r\n if (colorMap) {\r\n for (let i = 1, len = colorMap.length; i < len; i++) {\r\n result[i] = Color.Format.CSS.formatHex(colorMap[i]);\r\n }\r\n }\r\n return result;\r\n }\r\n //#region model\r\n pushStackElement() {\r\n this.model.pushStackElement();\r\n }\r\n //#endregion\r\n //#region cursor operations\r\n getPrimaryCursorState() {\r\n return this._cursor.getPrimaryCursorState();\r\n }\r\n getLastAddedCursorIndex() {\r\n return this._cursor.getLastAddedCursorIndex();\r\n }\r\n getCursorStates() {\r\n return this._cursor.getCursorStates();\r\n }\r\n setCursorStates(source, reason, states) {\r\n this._withViewEventsCollector(eventsCollector => this._cursor.setStates(eventsCollector, source, reason, states));\r\n }\r\n getCursorColumnSelectData() {\r\n return this._cursor.getCursorColumnSelectData();\r\n }\r\n setCursorColumnSelectData(columnSelectData) {\r\n this._cursor.setCursorColumnSelectData(columnSelectData);\r\n }\r\n getPrevEditOperationType() {\r\n return this._cursor.getPrevEditOperationType();\r\n }\r\n setPrevEditOperationType(type) {\r\n this._cursor.setPrevEditOperationType(type);\r\n }\r\n getSelection() {\r\n return this._cursor.getSelection();\r\n }\r\n getSelections() {\r\n return this._cursor.getSelections();\r\n }\r\n getPosition() {\r\n return this._cursor.getPrimaryCursorState().modelState.position;\r\n }\r\n setSelections(source, selections, reason = 0 /* NotSet */) {\r\n this._withViewEventsCollector(eventsCollector => this._cursor.setSelections(eventsCollector, source, selections, reason));\r\n }\r\n saveCursorState() {\r\n return this._cursor.saveState();\r\n }\r\n restoreCursorState(states) {\r\n this._withViewEventsCollector(eventsCollector => this._cursor.restoreState(eventsCollector, states));\r\n }\r\n _executeCursorEdit(callback) {\r\n if (this._cursor.context.cursorConfig.readOnly) {\r\n // we cannot edit when read only...\r\n this._eventDispatcher.emitOutgoingEvent(new ReadOnlyEditAttemptEvent());\r\n return;\r\n }\r\n this._withViewEventsCollector(callback);\r\n }\r\n executeEdits(source, edits, cursorStateComputer) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.executeEdits(eventsCollector, source, edits, cursorStateComputer));\r\n }\r\n startComposition() {\r\n this._cursor.setIsDoingComposition(true);\r\n this._executeCursorEdit(eventsCollector => this._cursor.startComposition(eventsCollector));\r\n }\r\n endComposition(source) {\r\n this._cursor.setIsDoingComposition(false);\r\n this._executeCursorEdit(eventsCollector => this._cursor.endComposition(eventsCollector, source));\r\n }\r\n type(text, source) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.type(eventsCollector, text, source));\r\n }\r\n replacePreviousChar(text, replaceCharCnt, source) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.replacePreviousChar(eventsCollector, text, replaceCharCnt, source));\r\n }\r\n paste(text, pasteOnNewLine, multicursorText, source) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.paste(eventsCollector, text, pasteOnNewLine, multicursorText, source));\r\n }\r\n cut(source) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.cut(eventsCollector, source));\r\n }\r\n executeCommand(command, source) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.executeCommand(eventsCollector, command, source));\r\n }\r\n executeCommands(commands, source) {\r\n this._executeCursorEdit(eventsCollector => this._cursor.executeCommands(eventsCollector, commands, source));\r\n }\r\n revealPrimaryCursor(source, revealHorizontal) {\r\n this._withViewEventsCollector(eventsCollector => this._cursor.revealPrimary(eventsCollector, source, revealHorizontal, 0 /* Smooth */));\r\n }\r\n revealTopMostCursor(source) {\r\n const viewPosition = this._cursor.getTopMostViewPosition();\r\n const viewRange = new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column);\r\n this._withViewEventsCollector(eventsCollector => eventsCollector.emitViewEvent(new viewEvents.ViewRevealRangeRequestEvent(source, viewRange, null, 0 /* Simple */, true, 0 /* Smooth */)));\r\n }\r\n revealBottomMostCursor(source) {\r\n const viewPosition = this._cursor.getBottomMostViewPosition();\r\n const viewRange = new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column);\r\n this._withViewEventsCollector(eventsCollector => eventsCollector.emitViewEvent(new viewEvents.ViewRevealRangeRequestEvent(source, viewRange, null, 0 /* Simple */, true, 0 /* Smooth */)));\r\n }\r\n revealRange(source, revealHorizontal, viewRange, verticalType, scrollType) {\r\n this._withViewEventsCollector(eventsCollector => eventsCollector.emitViewEvent(new viewEvents.ViewRevealRangeRequestEvent(source, viewRange, null, verticalType, revealHorizontal, scrollType)));\r\n }\r\n //#endregion\r\n //#region viewLayout\r\n getVerticalOffsetForLineNumber(viewLineNumber) {\r\n return this.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber);\r\n }\r\n getScrollTop() {\r\n return this.viewLayout.getCurrentScrollTop();\r\n }\r\n setScrollTop(newScrollTop, scrollType) {\r\n this.viewLayout.setScrollPosition({ scrollTop: newScrollTop }, scrollType);\r\n }\r\n setScrollPosition(position, type) {\r\n this.viewLayout.setScrollPosition(position, type);\r\n }\r\n deltaScrollNow(deltaScrollLeft, deltaScrollTop) {\r\n this.viewLayout.deltaScrollNow(deltaScrollLeft, deltaScrollTop);\r\n }\r\n changeWhitespace(callback) {\r\n const hadAChange = this.viewLayout.changeWhitespace(callback);\r\n if (hadAChange) {\r\n this._eventDispatcher.emitSingleViewEvent(new viewEvents.ViewZonesChangedEvent());\r\n this._eventDispatcher.emitOutgoingEvent(new ViewZonesChangedEvent());\r\n }\r\n }\r\n setMaxLineWidth(maxLineWidth) {\r\n this.viewLayout.setMaxLineWidth(maxLineWidth);\r\n }\r\n //#endregion\r\n _withViewEventsCollector(callback) {\r\n try {\r\n const eventsCollector = this._eventDispatcher.beginEmitViewEvents();\r\n callback(eventsCollector);\r\n }\r\n finally {\r\n this._eventDispatcher.endEmitViewEvents();\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { CharacterClassifier } from '../core/characterClassifier.js';\r\nimport { LineBreakData } from './viewModel.js';\r\nclass WrappingCharacterClassifier extends CharacterClassifier {\r\n constructor(BREAK_BEFORE, BREAK_AFTER) {\r\n super(0 /* NONE */);\r\n for (let i = 0; i < BREAK_BEFORE.length; i++) {\r\n this.set(BREAK_BEFORE.charCodeAt(i), 1 /* BREAK_BEFORE */);\r\n }\r\n for (let i = 0; i < BREAK_AFTER.length; i++) {\r\n this.set(BREAK_AFTER.charCodeAt(i), 2 /* BREAK_AFTER */);\r\n }\r\n }\r\n get(charCode) {\r\n if (charCode >= 0 && charCode < 256) {\r\n return this._asciiMap[charCode];\r\n }\r\n else {\r\n // Initialize CharacterClass.BREAK_IDEOGRAPHIC for these Unicode ranges:\r\n // 1. CJK Unified Ideographs (0x4E00 -- 0x9FFF)\r\n // 2. CJK Unified Ideographs Extension A (0x3400 -- 0x4DBF)\r\n // 3. Hiragana and Katakana (0x3040 -- 0x30FF)\r\n if ((charCode >= 0x3040 && charCode <= 0x30FF)\r\n || (charCode >= 0x3400 && charCode <= 0x4DBF)\r\n || (charCode >= 0x4E00 && charCode <= 0x9FFF)) {\r\n return 3 /* BREAK_IDEOGRAPHIC */;\r\n }\r\n return (this._map.get(charCode) || this._defaultValue);\r\n }\r\n }\r\n}\r\nlet arrPool1 = [];\r\nlet arrPool2 = [];\r\nexport class MonospaceLineBreaksComputerFactory {\r\n constructor(breakBeforeChars, breakAfterChars) {\r\n this.classifier = new WrappingCharacterClassifier(breakBeforeChars, breakAfterChars);\r\n }\r\n static create(options) {\r\n return new MonospaceLineBreaksComputerFactory(options.get(113 /* wordWrapBreakBeforeCharacters */), options.get(112 /* wordWrapBreakAfterCharacters */));\r\n }\r\n createLineBreaksComputer(fontInfo, tabSize, wrappingColumn, wrappingIndent) {\r\n tabSize = tabSize | 0; //@perf\r\n wrappingColumn = +wrappingColumn; //@perf\r\n let requests = [];\r\n let previousBreakingData = [];\r\n return {\r\n addRequest: (lineText, previousLineBreakData) => {\r\n requests.push(lineText);\r\n previousBreakingData.push(previousLineBreakData);\r\n },\r\n finalize: () => {\r\n const columnsForFullWidthChar = fontInfo.typicalFullwidthCharacterWidth / fontInfo.typicalHalfwidthCharacterWidth; //@perf\r\n let result = [];\r\n for (let i = 0, len = requests.length; i < len; i++) {\r\n const previousLineBreakData = previousBreakingData[i];\r\n if (previousLineBreakData) {\r\n result[i] = createLineBreaksFromPreviousLineBreaks(this.classifier, previousLineBreakData, requests[i], tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent);\r\n }\r\n else {\r\n result[i] = createLineBreaks(this.classifier, requests[i], tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent);\r\n }\r\n }\r\n arrPool1.length = 0;\r\n arrPool2.length = 0;\r\n return result;\r\n }\r\n };\r\n }\r\n}\r\nfunction createLineBreaksFromPreviousLineBreaks(classifier, previousBreakingData, lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent) {\r\n if (firstLineBreakColumn === -1) {\r\n return null;\r\n }\r\n const len = lineText.length;\r\n if (len <= 1) {\r\n return null;\r\n }\r\n const prevBreakingOffsets = previousBreakingData.breakOffsets;\r\n const prevBreakingOffsetsVisibleColumn = previousBreakingData.breakOffsetsVisibleColumn;\r\n const wrappedTextIndentLength = computeWrappedTextIndentLength(lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent);\r\n const wrappedLineBreakColumn = firstLineBreakColumn - wrappedTextIndentLength;\r\n let breakingOffsets = arrPool1;\r\n let breakingOffsetsVisibleColumn = arrPool2;\r\n let breakingOffsetsCount = 0;\r\n let lastBreakingOffset = 0;\r\n let lastBreakingOffsetVisibleColumn = 0;\r\n let breakingColumn = firstLineBreakColumn;\r\n const prevLen = prevBreakingOffsets.length;\r\n let prevIndex = 0;\r\n if (prevIndex >= 0) {\r\n let bestDistance = Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex] - breakingColumn);\r\n while (prevIndex + 1 < prevLen) {\r\n const distance = Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex + 1] - breakingColumn);\r\n if (distance >= bestDistance) {\r\n break;\r\n }\r\n bestDistance = distance;\r\n prevIndex++;\r\n }\r\n }\r\n while (prevIndex < prevLen) {\r\n // Allow for prevIndex to be -1 (for the case where we hit a tab when walking backwards from the first break)\r\n let prevBreakOffset = prevIndex < 0 ? 0 : prevBreakingOffsets[prevIndex];\r\n let prevBreakOffsetVisibleColumn = prevIndex < 0 ? 0 : prevBreakingOffsetsVisibleColumn[prevIndex];\r\n if (lastBreakingOffset > prevBreakOffset) {\r\n prevBreakOffset = lastBreakingOffset;\r\n prevBreakOffsetVisibleColumn = lastBreakingOffsetVisibleColumn;\r\n }\r\n let breakOffset = 0;\r\n let breakOffsetVisibleColumn = 0;\r\n let forcedBreakOffset = 0;\r\n let forcedBreakOffsetVisibleColumn = 0;\r\n // initially, we search as much as possible to the right (if it fits)\r\n if (prevBreakOffsetVisibleColumn <= breakingColumn) {\r\n let visibleColumn = prevBreakOffsetVisibleColumn;\r\n let prevCharCode = prevBreakOffset === 0 ? 0 /* Null */ : lineText.charCodeAt(prevBreakOffset - 1);\r\n let prevCharCodeClass = prevBreakOffset === 0 ? 0 /* NONE */ : classifier.get(prevCharCode);\r\n let entireLineFits = true;\r\n for (let i = prevBreakOffset; i < len; i++) {\r\n const charStartOffset = i;\r\n const charCode = lineText.charCodeAt(i);\r\n let charCodeClass;\r\n let charWidth;\r\n if (strings.isHighSurrogate(charCode)) {\r\n // A surrogate pair must always be considered as a single unit, so it is never to be broken\r\n i++;\r\n charCodeClass = 0 /* NONE */;\r\n charWidth = 2;\r\n }\r\n else {\r\n charCodeClass = classifier.get(charCode);\r\n charWidth = computeCharWidth(charCode, visibleColumn, tabSize, columnsForFullWidthChar);\r\n }\r\n if (charStartOffset > lastBreakingOffset && canBreak(prevCharCode, prevCharCodeClass, charCode, charCodeClass)) {\r\n breakOffset = charStartOffset;\r\n breakOffsetVisibleColumn = visibleColumn;\r\n }\r\n visibleColumn += charWidth;\r\n // check if adding character at `i` will go over the breaking column\r\n if (visibleColumn > breakingColumn) {\r\n // We need to break at least before character at `i`:\r\n if (charStartOffset > lastBreakingOffset) {\r\n forcedBreakOffset = charStartOffset;\r\n forcedBreakOffsetVisibleColumn = visibleColumn - charWidth;\r\n }\r\n else {\r\n // we need to advance at least by one character\r\n forcedBreakOffset = i + 1;\r\n forcedBreakOffsetVisibleColumn = visibleColumn;\r\n }\r\n if (visibleColumn - breakOffsetVisibleColumn > wrappedLineBreakColumn) {\r\n // Cannot break at `breakOffset` => reset it if it was set\r\n breakOffset = 0;\r\n }\r\n entireLineFits = false;\r\n break;\r\n }\r\n prevCharCode = charCode;\r\n prevCharCodeClass = charCodeClass;\r\n }\r\n if (entireLineFits) {\r\n // there is no more need to break => stop the outer loop!\r\n if (breakingOffsetsCount > 0) {\r\n // Add last segment, no need to assign to `lastBreakingOffset` and `lastBreakingOffsetVisibleColumn`\r\n breakingOffsets[breakingOffsetsCount] = prevBreakingOffsets[prevBreakingOffsets.length - 1];\r\n breakingOffsetsVisibleColumn[breakingOffsetsCount] = prevBreakingOffsetsVisibleColumn[prevBreakingOffsets.length - 1];\r\n breakingOffsetsCount++;\r\n }\r\n break;\r\n }\r\n }\r\n if (breakOffset === 0) {\r\n // must search left\r\n let visibleColumn = prevBreakOffsetVisibleColumn;\r\n let charCode = lineText.charCodeAt(prevBreakOffset);\r\n let charCodeClass = classifier.get(charCode);\r\n let hitATabCharacter = false;\r\n for (let i = prevBreakOffset - 1; i >= lastBreakingOffset; i--) {\r\n const charStartOffset = i + 1;\r\n const prevCharCode = lineText.charCodeAt(i);\r\n if (prevCharCode === 9 /* Tab */) {\r\n // cannot determine the width of a tab when going backwards, so we must go forwards\r\n hitATabCharacter = true;\r\n break;\r\n }\r\n let prevCharCodeClass;\r\n let prevCharWidth;\r\n if (strings.isLowSurrogate(prevCharCode)) {\r\n // A surrogate pair must always be considered as a single unit, so it is never to be broken\r\n i--;\r\n prevCharCodeClass = 0 /* NONE */;\r\n prevCharWidth = 2;\r\n }\r\n else {\r\n prevCharCodeClass = classifier.get(prevCharCode);\r\n prevCharWidth = (strings.isFullWidthCharacter(prevCharCode) ? columnsForFullWidthChar : 1);\r\n }\r\n if (visibleColumn <= breakingColumn) {\r\n if (forcedBreakOffset === 0) {\r\n forcedBreakOffset = charStartOffset;\r\n forcedBreakOffsetVisibleColumn = visibleColumn;\r\n }\r\n if (visibleColumn <= breakingColumn - wrappedLineBreakColumn) {\r\n // went too far!\r\n break;\r\n }\r\n if (canBreak(prevCharCode, prevCharCodeClass, charCode, charCodeClass)) {\r\n breakOffset = charStartOffset;\r\n breakOffsetVisibleColumn = visibleColumn;\r\n break;\r\n }\r\n }\r\n visibleColumn -= prevCharWidth;\r\n charCode = prevCharCode;\r\n charCodeClass = prevCharCodeClass;\r\n }\r\n if (breakOffset !== 0) {\r\n const remainingWidthOfNextLine = wrappedLineBreakColumn - (forcedBreakOffsetVisibleColumn - breakOffsetVisibleColumn);\r\n if (remainingWidthOfNextLine <= tabSize) {\r\n const charCodeAtForcedBreakOffset = lineText.charCodeAt(forcedBreakOffset);\r\n let charWidth;\r\n if (strings.isHighSurrogate(charCodeAtForcedBreakOffset)) {\r\n // A surrogate pair must always be considered as a single unit, so it is never to be broken\r\n charWidth = 2;\r\n }\r\n else {\r\n charWidth = computeCharWidth(charCodeAtForcedBreakOffset, forcedBreakOffsetVisibleColumn, tabSize, columnsForFullWidthChar);\r\n }\r\n if (remainingWidthOfNextLine - charWidth < 0) {\r\n // it is not worth it to break at breakOffset, it just introduces an extra needless line!\r\n breakOffset = 0;\r\n }\r\n }\r\n }\r\n if (hitATabCharacter) {\r\n // cannot determine the width of a tab when going backwards, so we must go forwards from the previous break\r\n prevIndex--;\r\n continue;\r\n }\r\n }\r\n if (breakOffset === 0) {\r\n // Could not find a good breaking point\r\n breakOffset = forcedBreakOffset;\r\n breakOffsetVisibleColumn = forcedBreakOffsetVisibleColumn;\r\n }\r\n if (breakOffset <= lastBreakingOffset) {\r\n // Make sure that we are advancing (at least one character)\r\n const charCode = lineText.charCodeAt(lastBreakingOffset);\r\n if (strings.isHighSurrogate(charCode)) {\r\n // A surrogate pair must always be considered as a single unit, so it is never to be broken\r\n breakOffset = lastBreakingOffset + 2;\r\n breakOffsetVisibleColumn = lastBreakingOffsetVisibleColumn + 2;\r\n }\r\n else {\r\n breakOffset = lastBreakingOffset + 1;\r\n breakOffsetVisibleColumn = lastBreakingOffsetVisibleColumn + computeCharWidth(charCode, lastBreakingOffsetVisibleColumn, tabSize, columnsForFullWidthChar);\r\n }\r\n }\r\n lastBreakingOffset = breakOffset;\r\n breakingOffsets[breakingOffsetsCount] = breakOffset;\r\n lastBreakingOffsetVisibleColumn = breakOffsetVisibleColumn;\r\n breakingOffsetsVisibleColumn[breakingOffsetsCount] = breakOffsetVisibleColumn;\r\n breakingOffsetsCount++;\r\n breakingColumn = breakOffsetVisibleColumn + wrappedLineBreakColumn;\r\n while (prevIndex < 0 || (prevIndex < prevLen && prevBreakingOffsetsVisibleColumn[prevIndex] < breakOffsetVisibleColumn)) {\r\n prevIndex++;\r\n }\r\n let bestDistance = Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex] - breakingColumn);\r\n while (prevIndex + 1 < prevLen) {\r\n const distance = Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex + 1] - breakingColumn);\r\n if (distance >= bestDistance) {\r\n break;\r\n }\r\n bestDistance = distance;\r\n prevIndex++;\r\n }\r\n }\r\n if (breakingOffsetsCount === 0) {\r\n return null;\r\n }\r\n // Doing here some object reuse which ends up helping a huge deal with GC pauses!\r\n breakingOffsets.length = breakingOffsetsCount;\r\n breakingOffsetsVisibleColumn.length = breakingOffsetsCount;\r\n arrPool1 = previousBreakingData.breakOffsets;\r\n arrPool2 = previousBreakingData.breakOffsetsVisibleColumn;\r\n previousBreakingData.breakOffsets = breakingOffsets;\r\n previousBreakingData.breakOffsetsVisibleColumn = breakingOffsetsVisibleColumn;\r\n previousBreakingData.wrappedTextIndentLength = wrappedTextIndentLength;\r\n return previousBreakingData;\r\n}\r\nfunction createLineBreaks(classifier, lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent) {\r\n if (firstLineBreakColumn === -1) {\r\n return null;\r\n }\r\n const len = lineText.length;\r\n if (len <= 1) {\r\n return null;\r\n }\r\n const wrappedTextIndentLength = computeWrappedTextIndentLength(lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent);\r\n const wrappedLineBreakColumn = firstLineBreakColumn - wrappedTextIndentLength;\r\n let breakingOffsets = [];\r\n let breakingOffsetsVisibleColumn = [];\r\n let breakingOffsetsCount = 0;\r\n let breakOffset = 0;\r\n let breakOffsetVisibleColumn = 0;\r\n let breakingColumn = firstLineBreakColumn;\r\n let prevCharCode = lineText.charCodeAt(0);\r\n let prevCharCodeClass = classifier.get(prevCharCode);\r\n let visibleColumn = computeCharWidth(prevCharCode, 0, tabSize, columnsForFullWidthChar);\r\n let startOffset = 1;\r\n if (strings.isHighSurrogate(prevCharCode)) {\r\n // A surrogate pair must always be considered as a single unit, so it is never to be broken\r\n visibleColumn += 1;\r\n prevCharCode = lineText.charCodeAt(1);\r\n prevCharCodeClass = classifier.get(prevCharCode);\r\n startOffset++;\r\n }\r\n for (let i = startOffset; i < len; i++) {\r\n const charStartOffset = i;\r\n const charCode = lineText.charCodeAt(i);\r\n let charCodeClass;\r\n let charWidth;\r\n if (strings.isHighSurrogate(charCode)) {\r\n // A surrogate pair must always be considered as a single unit, so it is never to be broken\r\n i++;\r\n charCodeClass = 0 /* NONE */;\r\n charWidth = 2;\r\n }\r\n else {\r\n charCodeClass = classifier.get(charCode);\r\n charWidth = computeCharWidth(charCode, visibleColumn, tabSize, columnsForFullWidthChar);\r\n }\r\n if (canBreak(prevCharCode, prevCharCodeClass, charCode, charCodeClass)) {\r\n breakOffset = charStartOffset;\r\n breakOffsetVisibleColumn = visibleColumn;\r\n }\r\n visibleColumn += charWidth;\r\n // check if adding character at `i` will go over the breaking column\r\n if (visibleColumn > breakingColumn) {\r\n // We need to break at least before character at `i`:\r\n if (breakOffset === 0 || visibleColumn - breakOffsetVisibleColumn > wrappedLineBreakColumn) {\r\n // Cannot break at `breakOffset`, must break at `i`\r\n breakOffset = charStartOffset;\r\n breakOffsetVisibleColumn = visibleColumn - charWidth;\r\n }\r\n breakingOffsets[breakingOffsetsCount] = breakOffset;\r\n breakingOffsetsVisibleColumn[breakingOffsetsCount] = breakOffsetVisibleColumn;\r\n breakingOffsetsCount++;\r\n breakingColumn = breakOffsetVisibleColumn + wrappedLineBreakColumn;\r\n breakOffset = 0;\r\n }\r\n prevCharCode = charCode;\r\n prevCharCodeClass = charCodeClass;\r\n }\r\n if (breakingOffsetsCount === 0) {\r\n return null;\r\n }\r\n // Add last segment\r\n breakingOffsets[breakingOffsetsCount] = len;\r\n breakingOffsetsVisibleColumn[breakingOffsetsCount] = visibleColumn;\r\n return new LineBreakData(breakingOffsets, breakingOffsetsVisibleColumn, wrappedTextIndentLength);\r\n}\r\nfunction computeCharWidth(charCode, visibleColumn, tabSize, columnsForFullWidthChar) {\r\n if (charCode === 9 /* Tab */) {\r\n return (tabSize - (visibleColumn % tabSize));\r\n }\r\n if (strings.isFullWidthCharacter(charCode)) {\r\n return columnsForFullWidthChar;\r\n }\r\n if (charCode < 32) {\r\n // when using `editor.renderControlCharacters`, the substitutions are often wide\r\n return columnsForFullWidthChar;\r\n }\r\n return 1;\r\n}\r\nfunction tabCharacterWidth(visibleColumn, tabSize) {\r\n return (tabSize - (visibleColumn % tabSize));\r\n}\r\n/**\r\n * Kinsoku Shori : Don't break after a leading character, like an open bracket\r\n * Kinsoku Shori : Don't break before a trailing character, like a period\r\n */\r\nfunction canBreak(prevCharCode, prevCharCodeClass, charCode, charCodeClass) {\r\n return (charCode !== 32 /* Space */\r\n && ((prevCharCodeClass === 2 /* BREAK_AFTER */)\r\n || (prevCharCodeClass === 3 /* BREAK_IDEOGRAPHIC */ && charCodeClass !== 2 /* BREAK_AFTER */)\r\n || (charCodeClass === 1 /* BREAK_BEFORE */)\r\n || (charCodeClass === 3 /* BREAK_IDEOGRAPHIC */ && prevCharCodeClass !== 1 /* BREAK_BEFORE */)));\r\n}\r\nfunction computeWrappedTextIndentLength(lineText, tabSize, firstLineBreakColumn, columnsForFullWidthChar, wrappingIndent) {\r\n let wrappedTextIndentLength = 0;\r\n if (wrappingIndent !== 0 /* None */) {\r\n const firstNonWhitespaceIndex = strings.firstNonWhitespaceIndex(lineText);\r\n if (firstNonWhitespaceIndex !== -1) {\r\n // Track existing indent\r\n for (let i = 0; i < firstNonWhitespaceIndex; i++) {\r\n const charWidth = (lineText.charCodeAt(i) === 9 /* Tab */ ? tabCharacterWidth(wrappedTextIndentLength, tabSize) : 1);\r\n wrappedTextIndentLength += charWidth;\r\n }\r\n // Increase indent of continuation lines, if desired\r\n const numberOfAdditionalTabs = (wrappingIndent === 3 /* DeepIndent */ ? 2 : wrappingIndent === 2 /* Indent */ ? 1 : 0);\r\n for (let i = 0; i < numberOfAdditionalTabs; i++) {\r\n const charWidth = tabCharacterWidth(wrappedTextIndentLength, tabSize);\r\n wrappedTextIndentLength += charWidth;\r\n }\r\n // Force sticking to beginning of line if no character would fit except for the indentation\r\n if (wrappedTextIndentLength + columnsForFullWidthChar > firstLineBreakColumn) {\r\n wrappedTextIndentLength = 0;\r\n }\r\n }\r\n }\r\n return wrappedTextIndentLength;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport './media/editor.css';\r\nimport * as nls from '../../../nls.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Disposable, dispose } from '../../../base/common/lifecycle.js';\r\nimport { Schemas } from '../../../base/common/network.js';\r\nimport { Configuration } from '../config/configuration.js';\r\nimport { EditorExtensionsRegistry } from '../editorExtensions.js';\r\nimport { ICodeEditorService } from '../services/codeEditorService.js';\r\nimport { View } from '../view/viewImpl.js';\r\nimport { ViewUserInputEvents } from '../view/viewUserInputEvents.js';\r\nimport { filterValidationDecorations } from '../../common/config/editorOptions.js';\r\nimport { Cursor } from '../../common/controller/cursor.js';\r\nimport { CursorColumns } from '../../common/controller/cursorCommon.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { InternalEditorAction } from '../../common/editorAction.js';\r\nimport * as editorCommon from '../../common/editorCommon.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport * as modes from '../../common/modes.js';\r\nimport { editorUnnecessaryCodeBorder, editorUnnecessaryCodeOpacity } from '../../common/view/editorColorRegistry.js';\r\nimport { editorErrorBorder, editorErrorForeground, editorHintBorder, editorHintForeground, editorInfoBorder, editorInfoForeground, editorWarningBorder, editorWarningForeground, editorForeground, editorErrorBackground, editorInfoBackground, editorWarningBackground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { ViewModel } from '../../common/viewModel/viewModelImpl.js';\r\nimport { ICommandService } from '../../../platform/commands/common/commands.js';\r\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { ServiceCollection } from '../../../platform/instantiation/common/serviceCollection.js';\r\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\r\nimport { IThemeService, registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport { IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';\r\nimport { withNullAsUndefined } from '../../../base/common/types.js';\r\nimport { MonospaceLineBreaksComputerFactory } from '../../common/viewModel/monospaceLineBreaksComputer.js';\r\nimport { DOMLineBreaksComputerFactory } from '../view/domLineBreaksComputer.js';\r\nimport { WordOperations } from '../../common/controller/cursorWordOperations.js';\r\nlet EDITOR_ID = 0;\r\nclass ModelData {\r\n constructor(model, viewModel, view, hasRealView, listenersToRemove) {\r\n this.model = model;\r\n this.viewModel = viewModel;\r\n this.view = view;\r\n this.hasRealView = hasRealView;\r\n this.listenersToRemove = listenersToRemove;\r\n }\r\n dispose() {\r\n dispose(this.listenersToRemove);\r\n this.model.onBeforeDetached();\r\n if (this.hasRealView) {\r\n this.view.dispose();\r\n }\r\n this.viewModel.dispose();\r\n }\r\n}\r\nlet CodeEditorWidget = class CodeEditorWidget extends Disposable {\r\n constructor(domElement, _options, codeEditorWidgetOptions, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService) {\r\n super();\r\n //#region Eventing\r\n this._onDidDispose = this._register(new Emitter());\r\n this.onDidDispose = this._onDidDispose.event;\r\n this._onDidChangeModelContent = this._register(new Emitter());\r\n this.onDidChangeModelContent = this._onDidChangeModelContent.event;\r\n this._onDidChangeModelLanguage = this._register(new Emitter());\r\n this.onDidChangeModelLanguage = this._onDidChangeModelLanguage.event;\r\n this._onDidChangeModelLanguageConfiguration = this._register(new Emitter());\r\n this.onDidChangeModelLanguageConfiguration = this._onDidChangeModelLanguageConfiguration.event;\r\n this._onDidChangeModelOptions = this._register(new Emitter());\r\n this.onDidChangeModelOptions = this._onDidChangeModelOptions.event;\r\n this._onDidChangeModelDecorations = this._register(new Emitter());\r\n this.onDidChangeModelDecorations = this._onDidChangeModelDecorations.event;\r\n this._onDidChangeConfiguration = this._register(new Emitter());\r\n this.onDidChangeConfiguration = this._onDidChangeConfiguration.event;\r\n this._onDidChangeModel = this._register(new Emitter());\r\n this.onDidChangeModel = this._onDidChangeModel.event;\r\n this._onDidChangeCursorPosition = this._register(new Emitter());\r\n this.onDidChangeCursorPosition = this._onDidChangeCursorPosition.event;\r\n this._onDidChangeCursorSelection = this._register(new Emitter());\r\n this.onDidChangeCursorSelection = this._onDidChangeCursorSelection.event;\r\n this._onDidAttemptReadOnlyEdit = this._register(new Emitter());\r\n this.onDidAttemptReadOnlyEdit = this._onDidAttemptReadOnlyEdit.event;\r\n this._onDidLayoutChange = this._register(new Emitter());\r\n this.onDidLayoutChange = this._onDidLayoutChange.event;\r\n this._editorTextFocus = this._register(new BooleanEventEmitter());\r\n this.onDidFocusEditorText = this._editorTextFocus.onDidChangeToTrue;\r\n this.onDidBlurEditorText = this._editorTextFocus.onDidChangeToFalse;\r\n this._editorWidgetFocus = this._register(new BooleanEventEmitter());\r\n this.onDidFocusEditorWidget = this._editorWidgetFocus.onDidChangeToTrue;\r\n this.onDidBlurEditorWidget = this._editorWidgetFocus.onDidChangeToFalse;\r\n this._onWillType = this._register(new Emitter());\r\n this.onWillType = this._onWillType.event;\r\n this._onDidType = this._register(new Emitter());\r\n this.onDidType = this._onDidType.event;\r\n this._onDidCompositionStart = this._register(new Emitter());\r\n this.onDidCompositionStart = this._onDidCompositionStart.event;\r\n this._onDidCompositionEnd = this._register(new Emitter());\r\n this.onDidCompositionEnd = this._onDidCompositionEnd.event;\r\n this._onDidPaste = this._register(new Emitter());\r\n this.onDidPaste = this._onDidPaste.event;\r\n this._onMouseUp = this._register(new Emitter());\r\n this.onMouseUp = this._onMouseUp.event;\r\n this._onMouseDown = this._register(new Emitter());\r\n this.onMouseDown = this._onMouseDown.event;\r\n this._onMouseDrag = this._register(new Emitter());\r\n this.onMouseDrag = this._onMouseDrag.event;\r\n this._onMouseDrop = this._register(new Emitter());\r\n this.onMouseDrop = this._onMouseDrop.event;\r\n this._onMouseDropCanceled = this._register(new Emitter());\r\n this.onMouseDropCanceled = this._onMouseDropCanceled.event;\r\n this._onContextMenu = this._register(new Emitter());\r\n this.onContextMenu = this._onContextMenu.event;\r\n this._onMouseMove = this._register(new Emitter());\r\n this.onMouseMove = this._onMouseMove.event;\r\n this._onMouseLeave = this._register(new Emitter());\r\n this.onMouseLeave = this._onMouseLeave.event;\r\n this._onMouseWheel = this._register(new Emitter());\r\n this.onMouseWheel = this._onMouseWheel.event;\r\n this._onKeyUp = this._register(new Emitter());\r\n this.onKeyUp = this._onKeyUp.event;\r\n this._onKeyDown = this._register(new Emitter());\r\n this.onKeyDown = this._onKeyDown.event;\r\n this._onDidContentSizeChange = this._register(new Emitter());\r\n this.onDidContentSizeChange = this._onDidContentSizeChange.event;\r\n this._onDidScrollChange = this._register(new Emitter());\r\n this.onDidScrollChange = this._onDidScrollChange.event;\r\n this._onDidChangeViewZones = this._register(new Emitter());\r\n this.onDidChangeViewZones = this._onDidChangeViewZones.event;\r\n const options = Object.assign({}, _options);\r\n this._domElement = domElement;\r\n this._overflowWidgetsDomNode = options.overflowWidgetsDomNode;\r\n delete options.overflowWidgetsDomNode;\r\n this._id = (++EDITOR_ID);\r\n this._decorationTypeKeysToIds = {};\r\n this._decorationTypeSubtypes = {};\r\n this.isSimpleWidget = codeEditorWidgetOptions.isSimpleWidget || false;\r\n this._telemetryData = codeEditorWidgetOptions.telemetryData;\r\n this._configuration = this._register(this._createConfiguration(options, accessibilityService));\r\n this._register(this._configuration.onDidChange((e) => {\r\n this._onDidChangeConfiguration.fire(e);\r\n const options = this._configuration.options;\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n this._onDidLayoutChange.fire(layoutInfo);\r\n }\r\n }));\r\n this._contextKeyService = this._register(contextKeyService.createScoped(this._domElement));\r\n this._notificationService = notificationService;\r\n this._codeEditorService = codeEditorService;\r\n this._commandService = commandService;\r\n this._themeService = themeService;\r\n this._register(new EditorContextKeysManager(this, this._contextKeyService));\r\n this._register(new EditorModeContext(this, this._contextKeyService));\r\n this._instantiationService = instantiationService.createChild(new ServiceCollection([IContextKeyService, this._contextKeyService]));\r\n this._modelData = null;\r\n this._contributions = {};\r\n this._actions = {};\r\n this._focusTracker = new CodeEditorWidgetFocusTracker(domElement);\r\n this._focusTracker.onChange(() => {\r\n this._editorWidgetFocus.setValue(this._focusTracker.hasFocus());\r\n });\r\n this._contentWidgets = {};\r\n this._overlayWidgets = {};\r\n let contributions;\r\n if (Array.isArray(codeEditorWidgetOptions.contributions)) {\r\n contributions = codeEditorWidgetOptions.contributions;\r\n }\r\n else {\r\n contributions = EditorExtensionsRegistry.getEditorContributions();\r\n }\r\n for (const desc of contributions) {\r\n try {\r\n const contribution = this._instantiationService.createInstance(desc.ctor, this);\r\n this._contributions[desc.id] = contribution;\r\n }\r\n catch (err) {\r\n onUnexpectedError(err);\r\n }\r\n }\r\n EditorExtensionsRegistry.getEditorActions().forEach((action) => {\r\n const internalAction = new InternalEditorAction(action.id, action.label, action.alias, withNullAsUndefined(action.precondition), () => {\r\n return this._instantiationService.invokeFunction((accessor) => {\r\n return Promise.resolve(action.runEditorCommand(accessor, this, null));\r\n });\r\n }, this._contextKeyService);\r\n this._actions[internalAction.id] = internalAction;\r\n });\r\n this._codeEditorService.addCodeEditor(this);\r\n }\r\n _createConfiguration(options, accessibilityService) {\r\n return new Configuration(this.isSimpleWidget, options, this._domElement, accessibilityService);\r\n }\r\n getId() {\r\n return this.getEditorType() + ':' + this._id;\r\n }\r\n getEditorType() {\r\n return editorCommon.EditorType.ICodeEditor;\r\n }\r\n dispose() {\r\n this._codeEditorService.removeCodeEditor(this);\r\n this._focusTracker.dispose();\r\n const keys = Object.keys(this._contributions);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const contributionId = keys[i];\r\n this._contributions[contributionId].dispose();\r\n }\r\n this._removeDecorationTypes();\r\n this._postDetachModelCleanup(this._detachModel());\r\n this._onDidDispose.fire();\r\n super.dispose();\r\n }\r\n invokeWithinContext(fn) {\r\n return this._instantiationService.invokeFunction(fn);\r\n }\r\n updateOptions(newOptions) {\r\n this._configuration.updateOptions(newOptions);\r\n }\r\n getOptions() {\r\n return this._configuration.options;\r\n }\r\n getOption(id) {\r\n return this._configuration.options.get(id);\r\n }\r\n getRawOptions() {\r\n return this._configuration.getRawOptions();\r\n }\r\n getOverflowWidgetsDomNode() {\r\n return this._overflowWidgetsDomNode;\r\n }\r\n getConfiguredWordAtPosition(position) {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return WordOperations.getWordAtPosition(this._modelData.model, this._configuration.options.get(110 /* wordSeparators */), position);\r\n }\r\n getValue(options = null) {\r\n if (!this._modelData) {\r\n return '';\r\n }\r\n const preserveBOM = (options && options.preserveBOM) ? true : false;\r\n let eolPreference = 0 /* TextDefined */;\r\n if (options && options.lineEnding && options.lineEnding === '\\n') {\r\n eolPreference = 1 /* LF */;\r\n }\r\n else if (options && options.lineEnding && options.lineEnding === '\\r\\n') {\r\n eolPreference = 2 /* CRLF */;\r\n }\r\n return this._modelData.model.getValue(eolPreference, preserveBOM);\r\n }\r\n setValue(newValue) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.model.setValue(newValue);\r\n }\r\n getModel() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return this._modelData.model;\r\n }\r\n setModel(_model = null) {\r\n const model = _model;\r\n if (this._modelData === null && model === null) {\r\n // Current model is the new model\r\n return;\r\n }\r\n if (this._modelData && this._modelData.model === model) {\r\n // Current model is the new model\r\n return;\r\n }\r\n const hasTextFocus = this.hasTextFocus();\r\n const detachedModel = this._detachModel();\r\n this._attachModel(model);\r\n if (hasTextFocus && this.hasModel()) {\r\n this.focus();\r\n }\r\n const e = {\r\n oldModelUrl: detachedModel ? detachedModel.uri : null,\r\n newModelUrl: model ? model.uri : null\r\n };\r\n this._removeDecorationTypes();\r\n this._onDidChangeModel.fire(e);\r\n this._postDetachModelCleanup(detachedModel);\r\n }\r\n _removeDecorationTypes() {\r\n this._decorationTypeKeysToIds = {};\r\n if (this._decorationTypeSubtypes) {\r\n for (let decorationType in this._decorationTypeSubtypes) {\r\n const subTypes = this._decorationTypeSubtypes[decorationType];\r\n for (let subType in subTypes) {\r\n this._removeDecorationType(decorationType + '-' + subType);\r\n }\r\n }\r\n this._decorationTypeSubtypes = {};\r\n }\r\n }\r\n getVisibleRanges() {\r\n if (!this._modelData) {\r\n return [];\r\n }\r\n return this._modelData.viewModel.getVisibleRanges();\r\n }\r\n getVisibleRangesPlusViewportAboveBelow() {\r\n if (!this._modelData) {\r\n return [];\r\n }\r\n return this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow();\r\n }\r\n getWhitespaces() {\r\n if (!this._modelData) {\r\n return [];\r\n }\r\n return this._modelData.viewModel.viewLayout.getWhitespaces();\r\n }\r\n static _getVerticalOffsetForPosition(modelData, modelLineNumber, modelColumn) {\r\n const modelPosition = modelData.model.validatePosition({\r\n lineNumber: modelLineNumber,\r\n column: modelColumn\r\n });\r\n const viewPosition = modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);\r\n return modelData.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber);\r\n }\r\n getTopForLineNumber(lineNumber) {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, lineNumber, 1);\r\n }\r\n getTopForPosition(lineNumber, column) {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, lineNumber, column);\r\n }\r\n setHiddenAreas(ranges) {\r\n if (this._modelData) {\r\n this._modelData.viewModel.setHiddenAreas(ranges.map(r => Range.lift(r)));\r\n }\r\n }\r\n getVisibleColumnFromPosition(rawPosition) {\r\n if (!this._modelData) {\r\n return rawPosition.column;\r\n }\r\n const position = this._modelData.model.validatePosition(rawPosition);\r\n const tabSize = this._modelData.model.getOptions().tabSize;\r\n return CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(position.lineNumber), position.column, tabSize) + 1;\r\n }\r\n getPosition() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return this._modelData.viewModel.getPosition();\r\n }\r\n setPosition(position) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n if (!Position.isIPosition(position)) {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._modelData.viewModel.setSelections('api', [{\r\n selectionStartLineNumber: position.lineNumber,\r\n selectionStartColumn: position.column,\r\n positionLineNumber: position.lineNumber,\r\n positionColumn: position.column\r\n }]);\r\n }\r\n _sendRevealRange(modelRange, verticalType, revealHorizontal, scrollType) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n if (!Range.isIRange(modelRange)) {\r\n throw new Error('Invalid arguments');\r\n }\r\n const validatedModelRange = this._modelData.model.validateRange(modelRange);\r\n const viewRange = this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(validatedModelRange);\r\n this._modelData.viewModel.revealRange('api', revealHorizontal, viewRange, verticalType, scrollType);\r\n }\r\n revealLine(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLine(lineNumber, 0 /* Simple */, scrollType);\r\n }\r\n revealLineInCenter(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLine(lineNumber, 1 /* Center */, scrollType);\r\n }\r\n revealLineInCenterIfOutsideViewport(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLine(lineNumber, 2 /* CenterIfOutsideViewport */, scrollType);\r\n }\r\n revealLineNearTop(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLine(lineNumber, 5 /* NearTop */, scrollType);\r\n }\r\n _revealLine(lineNumber, revealType, scrollType) {\r\n if (typeof lineNumber !== 'number') {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._sendRevealRange(new Range(lineNumber, 1, lineNumber, 1), revealType, false, scrollType);\r\n }\r\n revealPosition(position, scrollType = 0 /* Smooth */) {\r\n this._revealPosition(position, 0 /* Simple */, true, scrollType);\r\n }\r\n revealPositionInCenter(position, scrollType = 0 /* Smooth */) {\r\n this._revealPosition(position, 1 /* Center */, true, scrollType);\r\n }\r\n revealPositionInCenterIfOutsideViewport(position, scrollType = 0 /* Smooth */) {\r\n this._revealPosition(position, 2 /* CenterIfOutsideViewport */, true, scrollType);\r\n }\r\n revealPositionNearTop(position, scrollType = 0 /* Smooth */) {\r\n this._revealPosition(position, 5 /* NearTop */, true, scrollType);\r\n }\r\n _revealPosition(position, verticalType, revealHorizontal, scrollType) {\r\n if (!Position.isIPosition(position)) {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._sendRevealRange(new Range(position.lineNumber, position.column, position.lineNumber, position.column), verticalType, revealHorizontal, scrollType);\r\n }\r\n getSelection() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return this._modelData.viewModel.getSelection();\r\n }\r\n getSelections() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return this._modelData.viewModel.getSelections();\r\n }\r\n setSelection(something) {\r\n const isSelection = Selection.isISelection(something);\r\n const isRange = Range.isIRange(something);\r\n if (!isSelection && !isRange) {\r\n throw new Error('Invalid arguments');\r\n }\r\n if (isSelection) {\r\n this._setSelectionImpl(something);\r\n }\r\n else if (isRange) {\r\n // act as if it was an IRange\r\n const selection = {\r\n selectionStartLineNumber: something.startLineNumber,\r\n selectionStartColumn: something.startColumn,\r\n positionLineNumber: something.endLineNumber,\r\n positionColumn: something.endColumn\r\n };\r\n this._setSelectionImpl(selection);\r\n }\r\n }\r\n _setSelectionImpl(sel) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n const selection = new Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn);\r\n this._modelData.viewModel.setSelections('api', [selection]);\r\n }\r\n revealLines(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLines(startLineNumber, endLineNumber, 0 /* Simple */, scrollType);\r\n }\r\n revealLinesInCenter(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLines(startLineNumber, endLineNumber, 1 /* Center */, scrollType);\r\n }\r\n revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLines(startLineNumber, endLineNumber, 2 /* CenterIfOutsideViewport */, scrollType);\r\n }\r\n revealLinesNearTop(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._revealLines(startLineNumber, endLineNumber, 5 /* NearTop */, scrollType);\r\n }\r\n _revealLines(startLineNumber, endLineNumber, verticalType, scrollType) {\r\n if (typeof startLineNumber !== 'number' || typeof endLineNumber !== 'number') {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._sendRevealRange(new Range(startLineNumber, 1, endLineNumber, 1), verticalType, false, scrollType);\r\n }\r\n revealRange(range, scrollType = 0 /* Smooth */, revealVerticalInCenter = false, revealHorizontal = true) {\r\n this._revealRange(range, revealVerticalInCenter ? 1 /* Center */ : 0 /* Simple */, revealHorizontal, scrollType);\r\n }\r\n revealRangeInCenter(range, scrollType = 0 /* Smooth */) {\r\n this._revealRange(range, 1 /* Center */, true, scrollType);\r\n }\r\n revealRangeInCenterIfOutsideViewport(range, scrollType = 0 /* Smooth */) {\r\n this._revealRange(range, 2 /* CenterIfOutsideViewport */, true, scrollType);\r\n }\r\n revealRangeNearTop(range, scrollType = 0 /* Smooth */) {\r\n this._revealRange(range, 5 /* NearTop */, true, scrollType);\r\n }\r\n revealRangeNearTopIfOutsideViewport(range, scrollType = 0 /* Smooth */) {\r\n this._revealRange(range, 6 /* NearTopIfOutsideViewport */, true, scrollType);\r\n }\r\n revealRangeAtTop(range, scrollType = 0 /* Smooth */) {\r\n this._revealRange(range, 3 /* Top */, true, scrollType);\r\n }\r\n _revealRange(range, verticalType, revealHorizontal, scrollType) {\r\n if (!Range.isIRange(range)) {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._sendRevealRange(Range.lift(range), verticalType, revealHorizontal, scrollType);\r\n }\r\n setSelections(ranges, source = 'api', reason = 0 /* NotSet */) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n if (!ranges || ranges.length === 0) {\r\n throw new Error('Invalid arguments');\r\n }\r\n for (let i = 0, len = ranges.length; i < len; i++) {\r\n if (!Selection.isISelection(ranges[i])) {\r\n throw new Error('Invalid arguments');\r\n }\r\n }\r\n this._modelData.viewModel.setSelections(source, ranges, reason);\r\n }\r\n getContentWidth() {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return this._modelData.viewModel.viewLayout.getContentWidth();\r\n }\r\n getScrollWidth() {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return this._modelData.viewModel.viewLayout.getScrollWidth();\r\n }\r\n getScrollLeft() {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return this._modelData.viewModel.viewLayout.getCurrentScrollLeft();\r\n }\r\n getContentHeight() {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return this._modelData.viewModel.viewLayout.getContentHeight();\r\n }\r\n getScrollHeight() {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return this._modelData.viewModel.viewLayout.getScrollHeight();\r\n }\r\n getScrollTop() {\r\n if (!this._modelData) {\r\n return -1;\r\n }\r\n return this._modelData.viewModel.viewLayout.getCurrentScrollTop();\r\n }\r\n setScrollLeft(newScrollLeft, scrollType = 1 /* Immediate */) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n if (typeof newScrollLeft !== 'number') {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._modelData.viewModel.setScrollPosition({\r\n scrollLeft: newScrollLeft\r\n }, scrollType);\r\n }\r\n setScrollTop(newScrollTop, scrollType = 1 /* Immediate */) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n if (typeof newScrollTop !== 'number') {\r\n throw new Error('Invalid arguments');\r\n }\r\n this._modelData.viewModel.setScrollPosition({\r\n scrollTop: newScrollTop\r\n }, scrollType);\r\n }\r\n setScrollPosition(position, scrollType = 1 /* Immediate */) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.setScrollPosition(position, scrollType);\r\n }\r\n saveViewState() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n const contributionsState = {};\r\n const keys = Object.keys(this._contributions);\r\n for (const id of keys) {\r\n const contribution = this._contributions[id];\r\n if (typeof contribution.saveViewState === 'function') {\r\n contributionsState[id] = contribution.saveViewState();\r\n }\r\n }\r\n const cursorState = this._modelData.viewModel.saveCursorState();\r\n const viewState = this._modelData.viewModel.saveState();\r\n return {\r\n cursorState: cursorState,\r\n viewState: viewState,\r\n contributionsState: contributionsState\r\n };\r\n }\r\n restoreViewState(s) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return;\r\n }\r\n const codeEditorState = s;\r\n if (codeEditorState && codeEditorState.cursorState && codeEditorState.viewState) {\r\n const cursorState = codeEditorState.cursorState;\r\n if (Array.isArray(cursorState)) {\r\n this._modelData.viewModel.restoreCursorState(cursorState);\r\n }\r\n else {\r\n // Backwards compatibility\r\n this._modelData.viewModel.restoreCursorState([cursorState]);\r\n }\r\n const contributionsState = codeEditorState.contributionsState || {};\r\n const keys = Object.keys(this._contributions);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const id = keys[i];\r\n const contribution = this._contributions[id];\r\n if (typeof contribution.restoreViewState === 'function') {\r\n contribution.restoreViewState(contributionsState[id]);\r\n }\r\n }\r\n const reducedState = this._modelData.viewModel.reduceRestoreState(codeEditorState.viewState);\r\n this._modelData.view.restoreState(reducedState);\r\n }\r\n }\r\n getContribution(id) {\r\n return (this._contributions[id] || null);\r\n }\r\n getActions() {\r\n const result = [];\r\n const keys = Object.keys(this._actions);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const id = keys[i];\r\n result.push(this._actions[id]);\r\n }\r\n return result;\r\n }\r\n getSupportedActions() {\r\n let result = this.getActions();\r\n result = result.filter(action => action.isSupported());\r\n return result;\r\n }\r\n getAction(id) {\r\n return this._actions[id] || null;\r\n }\r\n trigger(source, handlerId, payload) {\r\n payload = payload || {};\r\n switch (handlerId) {\r\n case \"compositionStart\" /* CompositionStart */:\r\n this._startComposition();\r\n return;\r\n case \"compositionEnd\" /* CompositionEnd */:\r\n this._endComposition(source);\r\n return;\r\n case \"type\" /* Type */: {\r\n const args = payload;\r\n this._type(source, args.text || '');\r\n return;\r\n }\r\n case \"replacePreviousChar\" /* ReplacePreviousChar */: {\r\n const args = payload;\r\n this._replacePreviousChar(source, args.text || '', args.replaceCharCnt || 0);\r\n return;\r\n }\r\n case \"paste\" /* Paste */: {\r\n const args = payload;\r\n this._paste(source, args.text || '', args.pasteOnNewLine || false, args.multicursorText || null, args.mode || null);\r\n return;\r\n }\r\n case \"cut\" /* Cut */:\r\n this._cut(source);\r\n return;\r\n }\r\n const action = this.getAction(handlerId);\r\n if (action) {\r\n Promise.resolve(action.run()).then(undefined, onUnexpectedError);\r\n return;\r\n }\r\n if (!this._modelData) {\r\n return;\r\n }\r\n if (this._triggerEditorCommand(source, handlerId, payload)) {\r\n return;\r\n }\r\n this._commandService.executeCommand(handlerId, payload);\r\n }\r\n _startComposition() {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.startComposition();\r\n this._onDidCompositionStart.fire();\r\n }\r\n _endComposition(source) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.endComposition(source);\r\n this._onDidCompositionEnd.fire();\r\n }\r\n _type(source, text) {\r\n if (!this._modelData || text.length === 0) {\r\n return;\r\n }\r\n if (source === 'keyboard') {\r\n this._onWillType.fire(text);\r\n }\r\n this._modelData.viewModel.type(text, source);\r\n if (source === 'keyboard') {\r\n this._onDidType.fire(text);\r\n }\r\n }\r\n _replacePreviousChar(source, text, replaceCharCnt) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.replacePreviousChar(text, replaceCharCnt, source);\r\n }\r\n _paste(source, text, pasteOnNewLine, multicursorText, mode) {\r\n if (!this._modelData || text.length === 0) {\r\n return;\r\n }\r\n const startPosition = this._modelData.viewModel.getSelection().getStartPosition();\r\n this._modelData.viewModel.paste(text, pasteOnNewLine, multicursorText, source);\r\n const endPosition = this._modelData.viewModel.getSelection().getStartPosition();\r\n if (source === 'keyboard') {\r\n this._onDidPaste.fire({\r\n range: new Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column),\r\n mode: mode\r\n });\r\n }\r\n }\r\n _cut(source) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.cut(source);\r\n }\r\n _triggerEditorCommand(source, handlerId, payload) {\r\n const command = EditorExtensionsRegistry.getEditorCommand(handlerId);\r\n if (command) {\r\n payload = payload || {};\r\n payload.source = source;\r\n this._instantiationService.invokeFunction((accessor) => {\r\n Promise.resolve(command.runEditorCommand(accessor, this, payload)).then(undefined, onUnexpectedError);\r\n });\r\n return true;\r\n }\r\n return false;\r\n }\r\n _getViewModel() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return this._modelData.viewModel;\r\n }\r\n pushUndoStop() {\r\n if (!this._modelData) {\r\n return false;\r\n }\r\n if (this._configuration.options.get(75 /* readOnly */)) {\r\n // read only editor => sorry!\r\n return false;\r\n }\r\n this._modelData.model.pushStackElement();\r\n return true;\r\n }\r\n popUndoStop() {\r\n if (!this._modelData) {\r\n return false;\r\n }\r\n if (this._configuration.options.get(75 /* readOnly */)) {\r\n // read only editor => sorry!\r\n return false;\r\n }\r\n this._modelData.model.popStackElement();\r\n return true;\r\n }\r\n executeEdits(source, edits, endCursorState) {\r\n if (!this._modelData) {\r\n return false;\r\n }\r\n if (this._configuration.options.get(75 /* readOnly */)) {\r\n // read only editor => sorry!\r\n return false;\r\n }\r\n let cursorStateComputer;\r\n if (!endCursorState) {\r\n cursorStateComputer = () => null;\r\n }\r\n else if (Array.isArray(endCursorState)) {\r\n cursorStateComputer = () => endCursorState;\r\n }\r\n else {\r\n cursorStateComputer = endCursorState;\r\n }\r\n this._modelData.viewModel.executeEdits(source, edits, cursorStateComputer);\r\n return true;\r\n }\r\n executeCommand(source, command) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.executeCommand(command, source);\r\n }\r\n executeCommands(source, commands) {\r\n if (!this._modelData) {\r\n return;\r\n }\r\n this._modelData.viewModel.executeCommands(commands, source);\r\n }\r\n changeDecorations(callback) {\r\n if (!this._modelData) {\r\n // callback will not be called\r\n return null;\r\n }\r\n return this._modelData.model.changeDecorations(callback, this._id);\r\n }\r\n getLineDecorations(lineNumber) {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n return this._modelData.model.getLineDecorations(lineNumber, this._id, filterValidationDecorations(this._configuration.options));\r\n }\r\n deltaDecorations(oldDecorations, newDecorations) {\r\n if (!this._modelData) {\r\n return [];\r\n }\r\n if (oldDecorations.length === 0 && newDecorations.length === 0) {\r\n return oldDecorations;\r\n }\r\n return this._modelData.model.deltaDecorations(oldDecorations, newDecorations, this._id);\r\n }\r\n removeDecorations(decorationTypeKey) {\r\n // remove decorations for type and sub type\r\n const oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey];\r\n if (oldDecorationsIds) {\r\n this.deltaDecorations(oldDecorationsIds, []);\r\n }\r\n if (this._decorationTypeKeysToIds.hasOwnProperty(decorationTypeKey)) {\r\n delete this._decorationTypeKeysToIds[decorationTypeKey];\r\n }\r\n if (this._decorationTypeSubtypes.hasOwnProperty(decorationTypeKey)) {\r\n delete this._decorationTypeSubtypes[decorationTypeKey];\r\n }\r\n }\r\n getLayoutInfo() {\r\n const options = this._configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n return layoutInfo;\r\n }\r\n createOverviewRuler(cssClassName) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return null;\r\n }\r\n return this._modelData.view.createOverviewRuler(cssClassName);\r\n }\r\n getContainerDomNode() {\r\n return this._domElement;\r\n }\r\n getDomNode() {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return null;\r\n }\r\n return this._modelData.view.domNode.domNode;\r\n }\r\n delegateVerticalScrollbarMouseDown(browserEvent) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return;\r\n }\r\n this._modelData.view.delegateVerticalScrollbarMouseDown(browserEvent);\r\n }\r\n layout(dimension) {\r\n this._configuration.observeReferenceElement(dimension);\r\n this.render();\r\n }\r\n focus() {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return;\r\n }\r\n this._modelData.view.focus();\r\n }\r\n hasTextFocus() {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return false;\r\n }\r\n return this._modelData.view.isFocused();\r\n }\r\n hasWidgetFocus() {\r\n return this._focusTracker && this._focusTracker.hasFocus();\r\n }\r\n addContentWidget(widget) {\r\n const widgetData = {\r\n widget: widget,\r\n position: widget.getPosition()\r\n };\r\n if (this._contentWidgets.hasOwnProperty(widget.getId())) {\r\n console.warn('Overwriting a content widget with the same id.');\r\n }\r\n this._contentWidgets[widget.getId()] = widgetData;\r\n if (this._modelData && this._modelData.hasRealView) {\r\n this._modelData.view.addContentWidget(widgetData);\r\n }\r\n }\r\n layoutContentWidget(widget) {\r\n const widgetId = widget.getId();\r\n if (this._contentWidgets.hasOwnProperty(widgetId)) {\r\n const widgetData = this._contentWidgets[widgetId];\r\n widgetData.position = widget.getPosition();\r\n if (this._modelData && this._modelData.hasRealView) {\r\n this._modelData.view.layoutContentWidget(widgetData);\r\n }\r\n }\r\n }\r\n removeContentWidget(widget) {\r\n const widgetId = widget.getId();\r\n if (this._contentWidgets.hasOwnProperty(widgetId)) {\r\n const widgetData = this._contentWidgets[widgetId];\r\n delete this._contentWidgets[widgetId];\r\n if (this._modelData && this._modelData.hasRealView) {\r\n this._modelData.view.removeContentWidget(widgetData);\r\n }\r\n }\r\n }\r\n addOverlayWidget(widget) {\r\n const widgetData = {\r\n widget: widget,\r\n position: widget.getPosition()\r\n };\r\n if (this._overlayWidgets.hasOwnProperty(widget.getId())) {\r\n console.warn('Overwriting an overlay widget with the same id.');\r\n }\r\n this._overlayWidgets[widget.getId()] = widgetData;\r\n if (this._modelData && this._modelData.hasRealView) {\r\n this._modelData.view.addOverlayWidget(widgetData);\r\n }\r\n }\r\n layoutOverlayWidget(widget) {\r\n const widgetId = widget.getId();\r\n if (this._overlayWidgets.hasOwnProperty(widgetId)) {\r\n const widgetData = this._overlayWidgets[widgetId];\r\n widgetData.position = widget.getPosition();\r\n if (this._modelData && this._modelData.hasRealView) {\r\n this._modelData.view.layoutOverlayWidget(widgetData);\r\n }\r\n }\r\n }\r\n removeOverlayWidget(widget) {\r\n const widgetId = widget.getId();\r\n if (this._overlayWidgets.hasOwnProperty(widgetId)) {\r\n const widgetData = this._overlayWidgets[widgetId];\r\n delete this._overlayWidgets[widgetId];\r\n if (this._modelData && this._modelData.hasRealView) {\r\n this._modelData.view.removeOverlayWidget(widgetData);\r\n }\r\n }\r\n }\r\n changeViewZones(callback) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return;\r\n }\r\n this._modelData.view.change(callback);\r\n }\r\n getTargetAtClientPoint(clientX, clientY) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return null;\r\n }\r\n return this._modelData.view.getTargetAtClientPoint(clientX, clientY);\r\n }\r\n getScrolledVisiblePosition(rawPosition) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return null;\r\n }\r\n const position = this._modelData.model.validatePosition(rawPosition);\r\n const options = this._configuration.options;\r\n const layoutInfo = options.get(124 /* layoutInfo */);\r\n const top = CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, position.lineNumber, position.column) - this.getScrollTop();\r\n const left = this._modelData.view.getOffsetForColumn(position.lineNumber, position.column) + layoutInfo.glyphMarginWidth + layoutInfo.lineNumbersWidth + layoutInfo.decorationsWidth - this.getScrollLeft();\r\n return {\r\n top: top,\r\n left: left,\r\n height: options.get(53 /* lineHeight */)\r\n };\r\n }\r\n getOffsetForColumn(lineNumber, column) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return -1;\r\n }\r\n return this._modelData.view.getOffsetForColumn(lineNumber, column);\r\n }\r\n render(forceRedraw = false) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return;\r\n }\r\n this._modelData.view.render(true, forceRedraw);\r\n }\r\n setAriaOptions(options) {\r\n if (!this._modelData || !this._modelData.hasRealView) {\r\n return;\r\n }\r\n this._modelData.view.setAriaOptions(options);\r\n }\r\n applyFontInfo(target) {\r\n Configuration.applyFontInfoSlow(target, this._configuration.options.get(38 /* fontInfo */));\r\n }\r\n _attachModel(model) {\r\n if (!model) {\r\n this._modelData = null;\r\n return;\r\n }\r\n const listenersToRemove = [];\r\n this._domElement.setAttribute('data-mode-id', model.getLanguageIdentifier().language);\r\n this._configuration.setIsDominatedByLongLines(model.isDominatedByLongLines());\r\n this._configuration.setMaxLineNumber(model.getLineCount());\r\n model.onBeforeAttached();\r\n const viewModel = new ViewModel(this._id, this._configuration, model, DOMLineBreaksComputerFactory.create(), MonospaceLineBreaksComputerFactory.create(this._configuration.options), (callback) => dom.scheduleAtNextAnimationFrame(callback));\r\n listenersToRemove.push(model.onDidChangeDecorations((e) => this._onDidChangeModelDecorations.fire(e)));\r\n listenersToRemove.push(model.onDidChangeLanguage((e) => {\r\n this._domElement.setAttribute('data-mode-id', model.getLanguageIdentifier().language);\r\n this._onDidChangeModelLanguage.fire(e);\r\n }));\r\n listenersToRemove.push(model.onDidChangeLanguageConfiguration((e) => this._onDidChangeModelLanguageConfiguration.fire(e)));\r\n listenersToRemove.push(model.onDidChangeContent((e) => this._onDidChangeModelContent.fire(e)));\r\n listenersToRemove.push(model.onDidChangeOptions((e) => this._onDidChangeModelOptions.fire(e)));\r\n // Someone might destroy the model from under the editor, so prevent any exceptions by setting a null model\r\n listenersToRemove.push(model.onWillDispose(() => this.setModel(null)));\r\n listenersToRemove.push(viewModel.onEvent((e) => {\r\n switch (e.kind) {\r\n case 0 /* ContentSizeChanged */:\r\n this._onDidContentSizeChange.fire(e);\r\n break;\r\n case 1 /* FocusChanged */:\r\n this._editorTextFocus.setValue(e.hasFocus);\r\n break;\r\n case 2 /* ScrollChanged */:\r\n this._onDidScrollChange.fire(e);\r\n break;\r\n case 3 /* ViewZonesChanged */:\r\n this._onDidChangeViewZones.fire();\r\n break;\r\n case 4 /* ReadOnlyEditAttempt */:\r\n this._onDidAttemptReadOnlyEdit.fire();\r\n break;\r\n case 5 /* CursorStateChanged */: {\r\n if (e.reachedMaxCursorCount) {\r\n this._notificationService.warn(nls.localize('cursors.maximum', \"The number of cursors has been limited to {0}.\", Cursor.MAX_CURSOR_COUNT));\r\n }\r\n const positions = [];\r\n for (let i = 0, len = e.selections.length; i < len; i++) {\r\n positions[i] = e.selections[i].getPosition();\r\n }\r\n const e1 = {\r\n position: positions[0],\r\n secondaryPositions: positions.slice(1),\r\n reason: e.reason,\r\n source: e.source\r\n };\r\n this._onDidChangeCursorPosition.fire(e1);\r\n const e2 = {\r\n selection: e.selections[0],\r\n secondarySelections: e.selections.slice(1),\r\n modelVersionId: e.modelVersionId,\r\n oldSelections: e.oldSelections,\r\n oldModelVersionId: e.oldModelVersionId,\r\n source: e.source,\r\n reason: e.reason\r\n };\r\n this._onDidChangeCursorSelection.fire(e2);\r\n break;\r\n }\r\n }\r\n }));\r\n const [view, hasRealView] = this._createView(viewModel);\r\n if (hasRealView) {\r\n this._domElement.appendChild(view.domNode.domNode);\r\n let keys = Object.keys(this._contentWidgets);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const widgetId = keys[i];\r\n view.addContentWidget(this._contentWidgets[widgetId]);\r\n }\r\n keys = Object.keys(this._overlayWidgets);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const widgetId = keys[i];\r\n view.addOverlayWidget(this._overlayWidgets[widgetId]);\r\n }\r\n view.render(false, true);\r\n view.domNode.domNode.setAttribute('data-uri', model.uri.toString());\r\n }\r\n this._modelData = new ModelData(model, viewModel, view, hasRealView, listenersToRemove);\r\n }\r\n _createView(viewModel) {\r\n let commandDelegate;\r\n if (this.isSimpleWidget) {\r\n commandDelegate = {\r\n paste: (text, pasteOnNewLine, multicursorText, mode) => {\r\n this._paste('keyboard', text, pasteOnNewLine, multicursorText, mode);\r\n },\r\n type: (text) => {\r\n this._type('keyboard', text);\r\n },\r\n replacePreviousChar: (text, replaceCharCnt) => {\r\n this._replacePreviousChar('keyboard', text, replaceCharCnt);\r\n },\r\n startComposition: () => {\r\n this._startComposition();\r\n },\r\n endComposition: () => {\r\n this._endComposition('keyboard');\r\n },\r\n cut: () => {\r\n this._cut('keyboard');\r\n }\r\n };\r\n }\r\n else {\r\n commandDelegate = {\r\n paste: (text, pasteOnNewLine, multicursorText, mode) => {\r\n const payload = { text, pasteOnNewLine, multicursorText, mode };\r\n this._commandService.executeCommand(\"paste\" /* Paste */, payload);\r\n },\r\n type: (text) => {\r\n const payload = { text };\r\n this._commandService.executeCommand(\"type\" /* Type */, payload);\r\n },\r\n replacePreviousChar: (text, replaceCharCnt) => {\r\n const payload = { text, replaceCharCnt };\r\n this._commandService.executeCommand(\"replacePreviousChar\" /* ReplacePreviousChar */, payload);\r\n },\r\n startComposition: () => {\r\n this._commandService.executeCommand(\"compositionStart\" /* CompositionStart */, {});\r\n },\r\n endComposition: () => {\r\n this._commandService.executeCommand(\"compositionEnd\" /* CompositionEnd */, {});\r\n },\r\n cut: () => {\r\n this._commandService.executeCommand(\"cut\" /* Cut */, {});\r\n }\r\n };\r\n }\r\n const viewUserInputEvents = new ViewUserInputEvents(viewModel.coordinatesConverter);\r\n viewUserInputEvents.onKeyDown = (e) => this._onKeyDown.fire(e);\r\n viewUserInputEvents.onKeyUp = (e) => this._onKeyUp.fire(e);\r\n viewUserInputEvents.onContextMenu = (e) => this._onContextMenu.fire(e);\r\n viewUserInputEvents.onMouseMove = (e) => this._onMouseMove.fire(e);\r\n viewUserInputEvents.onMouseLeave = (e) => this._onMouseLeave.fire(e);\r\n viewUserInputEvents.onMouseDown = (e) => this._onMouseDown.fire(e);\r\n viewUserInputEvents.onMouseUp = (e) => this._onMouseUp.fire(e);\r\n viewUserInputEvents.onMouseDrag = (e) => this._onMouseDrag.fire(e);\r\n viewUserInputEvents.onMouseDrop = (e) => this._onMouseDrop.fire(e);\r\n viewUserInputEvents.onMouseDropCanceled = (e) => this._onMouseDropCanceled.fire(e);\r\n viewUserInputEvents.onMouseWheel = (e) => this._onMouseWheel.fire(e);\r\n const view = new View(commandDelegate, this._configuration, this._themeService, viewModel, viewUserInputEvents, this._overflowWidgetsDomNode);\r\n return [view, true];\r\n }\r\n _postDetachModelCleanup(detachedModel) {\r\n if (detachedModel) {\r\n detachedModel.removeAllDecorationsWithOwnerId(this._id);\r\n }\r\n }\r\n _detachModel() {\r\n if (!this._modelData) {\r\n return null;\r\n }\r\n const model = this._modelData.model;\r\n const removeDomNode = this._modelData.hasRealView ? this._modelData.view.domNode.domNode : null;\r\n this._modelData.dispose();\r\n this._modelData = null;\r\n this._domElement.removeAttribute('data-mode-id');\r\n if (removeDomNode && this._domElement.contains(removeDomNode)) {\r\n this._domElement.removeChild(removeDomNode);\r\n }\r\n return model;\r\n }\r\n _removeDecorationType(key) {\r\n this._codeEditorService.removeDecorationType(key);\r\n }\r\n hasModel() {\r\n return (this._modelData !== null);\r\n }\r\n};\r\nCodeEditorWidget = __decorate([\r\n __param(3, IInstantiationService),\r\n __param(4, ICodeEditorService),\r\n __param(5, ICommandService),\r\n __param(6, IContextKeyService),\r\n __param(7, IThemeService),\r\n __param(8, INotificationService),\r\n __param(9, IAccessibilityService)\r\n], CodeEditorWidget);\r\nexport { CodeEditorWidget };\r\nexport class BooleanEventEmitter extends Disposable {\r\n constructor() {\r\n super();\r\n this._onDidChangeToTrue = this._register(new Emitter());\r\n this.onDidChangeToTrue = this._onDidChangeToTrue.event;\r\n this._onDidChangeToFalse = this._register(new Emitter());\r\n this.onDidChangeToFalse = this._onDidChangeToFalse.event;\r\n this._value = 0 /* NotSet */;\r\n }\r\n setValue(_value) {\r\n const value = (_value ? 2 /* True */ : 1 /* False */);\r\n if (this._value === value) {\r\n return;\r\n }\r\n this._value = value;\r\n if (this._value === 2 /* True */) {\r\n this._onDidChangeToTrue.fire();\r\n }\r\n else if (this._value === 1 /* False */) {\r\n this._onDidChangeToFalse.fire();\r\n }\r\n }\r\n}\r\nclass EditorContextKeysManager extends Disposable {\r\n constructor(editor, contextKeyService) {\r\n super();\r\n this._editor = editor;\r\n contextKeyService.createKey('editorId', editor.getId());\r\n this._editorSimpleInput = EditorContextKeys.editorSimpleInput.bindTo(contextKeyService);\r\n this._editorFocus = EditorContextKeys.focus.bindTo(contextKeyService);\r\n this._textInputFocus = EditorContextKeys.textInputFocus.bindTo(contextKeyService);\r\n this._editorTextFocus = EditorContextKeys.editorTextFocus.bindTo(contextKeyService);\r\n this._editorTabMovesFocus = EditorContextKeys.tabMovesFocus.bindTo(contextKeyService);\r\n this._editorReadonly = EditorContextKeys.readOnly.bindTo(contextKeyService);\r\n this._inDiffEditor = EditorContextKeys.inDiffEditor.bindTo(contextKeyService);\r\n this._editorColumnSelection = EditorContextKeys.columnSelection.bindTo(contextKeyService);\r\n this._hasMultipleSelections = EditorContextKeys.hasMultipleSelections.bindTo(contextKeyService);\r\n this._hasNonEmptySelection = EditorContextKeys.hasNonEmptySelection.bindTo(contextKeyService);\r\n this._canUndo = EditorContextKeys.canUndo.bindTo(contextKeyService);\r\n this._canRedo = EditorContextKeys.canRedo.bindTo(contextKeyService);\r\n this._register(this._editor.onDidChangeConfiguration(() => this._updateFromConfig()));\r\n this._register(this._editor.onDidChangeCursorSelection(() => this._updateFromSelection()));\r\n this._register(this._editor.onDidFocusEditorWidget(() => this._updateFromFocus()));\r\n this._register(this._editor.onDidBlurEditorWidget(() => this._updateFromFocus()));\r\n this._register(this._editor.onDidFocusEditorText(() => this._updateFromFocus()));\r\n this._register(this._editor.onDidBlurEditorText(() => this._updateFromFocus()));\r\n this._register(this._editor.onDidChangeModel(() => this._updateFromModel()));\r\n this._register(this._editor.onDidChangeConfiguration(() => this._updateFromModel()));\r\n this._updateFromConfig();\r\n this._updateFromSelection();\r\n this._updateFromFocus();\r\n this._updateFromModel();\r\n this._editorSimpleInput.set(this._editor.isSimpleWidget);\r\n }\r\n _updateFromConfig() {\r\n const options = this._editor.getOptions();\r\n this._editorTabMovesFocus.set(options.get(123 /* tabFocusMode */));\r\n this._editorReadonly.set(options.get(75 /* readOnly */));\r\n this._inDiffEditor.set(options.get(49 /* inDiffEditor */));\r\n this._editorColumnSelection.set(options.get(15 /* columnSelection */));\r\n }\r\n _updateFromSelection() {\r\n const selections = this._editor.getSelections();\r\n if (!selections) {\r\n this._hasMultipleSelections.reset();\r\n this._hasNonEmptySelection.reset();\r\n }\r\n else {\r\n this._hasMultipleSelections.set(selections.length > 1);\r\n this._hasNonEmptySelection.set(selections.some(s => !s.isEmpty()));\r\n }\r\n }\r\n _updateFromFocus() {\r\n this._editorFocus.set(this._editor.hasWidgetFocus() && !this._editor.isSimpleWidget);\r\n this._editorTextFocus.set(this._editor.hasTextFocus() && !this._editor.isSimpleWidget);\r\n this._textInputFocus.set(this._editor.hasTextFocus());\r\n }\r\n _updateFromModel() {\r\n const model = this._editor.getModel();\r\n this._canUndo.set(Boolean(model && model.canUndo()));\r\n this._canRedo.set(Boolean(model && model.canRedo()));\r\n }\r\n}\r\nexport class EditorModeContext extends Disposable {\r\n constructor(_editor, _contextKeyService) {\r\n super();\r\n this._editor = _editor;\r\n this._contextKeyService = _contextKeyService;\r\n this._langId = EditorContextKeys.languageId.bindTo(_contextKeyService);\r\n this._hasCompletionItemProvider = EditorContextKeys.hasCompletionItemProvider.bindTo(_contextKeyService);\r\n this._hasCodeActionsProvider = EditorContextKeys.hasCodeActionsProvider.bindTo(_contextKeyService);\r\n this._hasCodeLensProvider = EditorContextKeys.hasCodeLensProvider.bindTo(_contextKeyService);\r\n this._hasDefinitionProvider = EditorContextKeys.hasDefinitionProvider.bindTo(_contextKeyService);\r\n this._hasDeclarationProvider = EditorContextKeys.hasDeclarationProvider.bindTo(_contextKeyService);\r\n this._hasImplementationProvider = EditorContextKeys.hasImplementationProvider.bindTo(_contextKeyService);\r\n this._hasTypeDefinitionProvider = EditorContextKeys.hasTypeDefinitionProvider.bindTo(_contextKeyService);\r\n this._hasHoverProvider = EditorContextKeys.hasHoverProvider.bindTo(_contextKeyService);\r\n this._hasDocumentHighlightProvider = EditorContextKeys.hasDocumentHighlightProvider.bindTo(_contextKeyService);\r\n this._hasDocumentSymbolProvider = EditorContextKeys.hasDocumentSymbolProvider.bindTo(_contextKeyService);\r\n this._hasReferenceProvider = EditorContextKeys.hasReferenceProvider.bindTo(_contextKeyService);\r\n this._hasRenameProvider = EditorContextKeys.hasRenameProvider.bindTo(_contextKeyService);\r\n this._hasSignatureHelpProvider = EditorContextKeys.hasSignatureHelpProvider.bindTo(_contextKeyService);\r\n this._hasInlineHintsProvider = EditorContextKeys.hasInlineHintsProvider.bindTo(_contextKeyService);\r\n this._hasDocumentFormattingProvider = EditorContextKeys.hasDocumentFormattingProvider.bindTo(_contextKeyService);\r\n this._hasDocumentSelectionFormattingProvider = EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(_contextKeyService);\r\n this._hasMultipleDocumentFormattingProvider = EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(_contextKeyService);\r\n this._hasMultipleDocumentSelectionFormattingProvider = EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(_contextKeyService);\r\n this._isInWalkThrough = EditorContextKeys.isInWalkThroughSnippet.bindTo(_contextKeyService);\r\n const update = () => this._update();\r\n // update when model/mode changes\r\n this._register(_editor.onDidChangeModel(update));\r\n this._register(_editor.onDidChangeModelLanguage(update));\r\n // update when registries change\r\n this._register(modes.CompletionProviderRegistry.onDidChange(update));\r\n this._register(modes.CodeActionProviderRegistry.onDidChange(update));\r\n this._register(modes.CodeLensProviderRegistry.onDidChange(update));\r\n this._register(modes.DefinitionProviderRegistry.onDidChange(update));\r\n this._register(modes.DeclarationProviderRegistry.onDidChange(update));\r\n this._register(modes.ImplementationProviderRegistry.onDidChange(update));\r\n this._register(modes.TypeDefinitionProviderRegistry.onDidChange(update));\r\n this._register(modes.HoverProviderRegistry.onDidChange(update));\r\n this._register(modes.DocumentHighlightProviderRegistry.onDidChange(update));\r\n this._register(modes.DocumentSymbolProviderRegistry.onDidChange(update));\r\n this._register(modes.ReferenceProviderRegistry.onDidChange(update));\r\n this._register(modes.RenameProviderRegistry.onDidChange(update));\r\n this._register(modes.DocumentFormattingEditProviderRegistry.onDidChange(update));\r\n this._register(modes.DocumentRangeFormattingEditProviderRegistry.onDidChange(update));\r\n this._register(modes.SignatureHelpProviderRegistry.onDidChange(update));\r\n this._register(modes.InlineHintsProviderRegistry.onDidChange(update));\r\n update();\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n reset() {\r\n this._contextKeyService.bufferChangeEvents(() => {\r\n this._langId.reset();\r\n this._hasCompletionItemProvider.reset();\r\n this._hasCodeActionsProvider.reset();\r\n this._hasCodeLensProvider.reset();\r\n this._hasDefinitionProvider.reset();\r\n this._hasDeclarationProvider.reset();\r\n this._hasImplementationProvider.reset();\r\n this._hasTypeDefinitionProvider.reset();\r\n this._hasHoverProvider.reset();\r\n this._hasDocumentHighlightProvider.reset();\r\n this._hasDocumentSymbolProvider.reset();\r\n this._hasReferenceProvider.reset();\r\n this._hasRenameProvider.reset();\r\n this._hasDocumentFormattingProvider.reset();\r\n this._hasDocumentSelectionFormattingProvider.reset();\r\n this._hasSignatureHelpProvider.reset();\r\n this._isInWalkThrough.reset();\r\n });\r\n }\r\n _update() {\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n this.reset();\r\n return;\r\n }\r\n this._contextKeyService.bufferChangeEvents(() => {\r\n this._langId.set(model.getLanguageIdentifier().language);\r\n this._hasCompletionItemProvider.set(modes.CompletionProviderRegistry.has(model));\r\n this._hasCodeActionsProvider.set(modes.CodeActionProviderRegistry.has(model));\r\n this._hasCodeLensProvider.set(modes.CodeLensProviderRegistry.has(model));\r\n this._hasDefinitionProvider.set(modes.DefinitionProviderRegistry.has(model));\r\n this._hasDeclarationProvider.set(modes.DeclarationProviderRegistry.has(model));\r\n this._hasImplementationProvider.set(modes.ImplementationProviderRegistry.has(model));\r\n this._hasTypeDefinitionProvider.set(modes.TypeDefinitionProviderRegistry.has(model));\r\n this._hasHoverProvider.set(modes.HoverProviderRegistry.has(model));\r\n this._hasDocumentHighlightProvider.set(modes.DocumentHighlightProviderRegistry.has(model));\r\n this._hasDocumentSymbolProvider.set(modes.DocumentSymbolProviderRegistry.has(model));\r\n this._hasReferenceProvider.set(modes.ReferenceProviderRegistry.has(model));\r\n this._hasRenameProvider.set(modes.RenameProviderRegistry.has(model));\r\n this._hasSignatureHelpProvider.set(modes.SignatureHelpProviderRegistry.has(model));\r\n this._hasInlineHintsProvider.set(modes.InlineHintsProviderRegistry.has(model));\r\n this._hasDocumentFormattingProvider.set(modes.DocumentFormattingEditProviderRegistry.has(model) || modes.DocumentRangeFormattingEditProviderRegistry.has(model));\r\n this._hasDocumentSelectionFormattingProvider.set(modes.DocumentRangeFormattingEditProviderRegistry.has(model));\r\n this._hasMultipleDocumentFormattingProvider.set(modes.DocumentFormattingEditProviderRegistry.all(model).length + modes.DocumentRangeFormattingEditProviderRegistry.all(model).length > 1);\r\n this._hasMultipleDocumentSelectionFormattingProvider.set(modes.DocumentRangeFormattingEditProviderRegistry.all(model).length > 1);\r\n this._isInWalkThrough.set(model.uri.scheme === Schemas.walkThroughSnippet);\r\n });\r\n }\r\n}\r\nclass CodeEditorWidgetFocusTracker extends Disposable {\r\n constructor(domElement) {\r\n super();\r\n this._onChange = this._register(new Emitter());\r\n this.onChange = this._onChange.event;\r\n this._hasFocus = false;\r\n this._domFocusTracker = this._register(dom.trackFocus(domElement));\r\n this._register(this._domFocusTracker.onDidFocus(() => {\r\n this._hasFocus = true;\r\n this._onChange.fire(undefined);\r\n }));\r\n this._register(this._domFocusTracker.onDidBlur(() => {\r\n this._hasFocus = false;\r\n this._onChange.fire(undefined);\r\n }));\r\n }\r\n hasFocus() {\r\n return this._hasFocus;\r\n }\r\n}\r\nconst squigglyStart = encodeURIComponent(``);\r\nfunction getSquigglySVGData(color) {\r\n return squigglyStart + encodeURIComponent(color.toString()) + squigglyEnd;\r\n}\r\nconst dotdotdotStart = encodeURIComponent(``);\r\nfunction getDotDotDotSVGData(color) {\r\n return dotdotdotStart + encodeURIComponent(color.toString()) + dotdotdotEnd;\r\n}\r\nregisterThemingParticipant((theme, collector) => {\r\n const errorBorderColor = theme.getColor(editorErrorBorder);\r\n if (errorBorderColor) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-error\" /* EditorErrorDecoration */} { border-bottom: 4px double ${errorBorderColor}; }`);\r\n }\r\n const errorForeground = theme.getColor(editorErrorForeground);\r\n if (errorForeground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-error\" /* EditorErrorDecoration */} { background: url(\"data:image/svg+xml,${getSquigglySVGData(errorForeground)}\") repeat-x bottom left; }`);\r\n }\r\n const errorBackground = theme.getColor(editorErrorBackground);\r\n if (errorBackground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-error\" /* EditorErrorDecoration */}::before { display: block; content: ''; width: 100%; height: 100%; background: ${errorBackground}; }`);\r\n }\r\n const warningBorderColor = theme.getColor(editorWarningBorder);\r\n if (warningBorderColor) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-warning\" /* EditorWarningDecoration */} { border-bottom: 4px double ${warningBorderColor}; }`);\r\n }\r\n const warningForeground = theme.getColor(editorWarningForeground);\r\n if (warningForeground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-warning\" /* EditorWarningDecoration */} { background: url(\"data:image/svg+xml,${getSquigglySVGData(warningForeground)}\") repeat-x bottom left; }`);\r\n }\r\n const warningBackground = theme.getColor(editorWarningBackground);\r\n if (warningBackground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-warning\" /* EditorWarningDecoration */}::before { display: block; content: ''; width: 100%; height: 100%; background: ${warningBackground}; }`);\r\n }\r\n const infoBorderColor = theme.getColor(editorInfoBorder);\r\n if (infoBorderColor) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-info\" /* EditorInfoDecoration */} { border-bottom: 4px double ${infoBorderColor}; }`);\r\n }\r\n const infoForeground = theme.getColor(editorInfoForeground);\r\n if (infoForeground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-info\" /* EditorInfoDecoration */} { background: url(\"data:image/svg+xml,${getSquigglySVGData(infoForeground)}\") repeat-x bottom left; }`);\r\n }\r\n const infoBackground = theme.getColor(editorInfoBackground);\r\n if (infoBackground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-info\" /* EditorInfoDecoration */}::before { display: block; content: ''; width: 100%; height: 100%; background: ${infoBackground}; }`);\r\n }\r\n const hintBorderColor = theme.getColor(editorHintBorder);\r\n if (hintBorderColor) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-hint\" /* EditorHintDecoration */} { border-bottom: 2px dotted ${hintBorderColor}; }`);\r\n }\r\n const hintForeground = theme.getColor(editorHintForeground);\r\n if (hintForeground) {\r\n collector.addRule(`.monaco-editor .${\"squiggly-hint\" /* EditorHintDecoration */} { background: url(\"data:image/svg+xml,${getDotDotDotSVGData(hintForeground)}\") no-repeat bottom left; }`);\r\n }\r\n const unnecessaryForeground = theme.getColor(editorUnnecessaryCodeOpacity);\r\n if (unnecessaryForeground) {\r\n collector.addRule(`.monaco-editor.showUnused .${\"squiggly-inline-unnecessary\" /* EditorUnnecessaryInlineDecoration */} { opacity: ${unnecessaryForeground.rgba.a}; }`);\r\n }\r\n const unnecessaryBorder = theme.getColor(editorUnnecessaryCodeBorder);\r\n if (unnecessaryBorder) {\r\n collector.addRule(`.monaco-editor.showUnused .${\"squiggly-unnecessary\" /* EditorUnnecessaryDecoration */} { border-bottom: 2px dashed ${unnecessaryBorder}; }`);\r\n }\r\n const deprecatedForeground = theme.getColor(editorForeground) || 'inherit';\r\n collector.addRule(`.monaco-editor.showDeprecated .${\"squiggly-inline-deprecated\" /* EditorDeprecatedInlineDecoration */} { text-decoration: line-through; text-decoration-color: ${deprecatedForeground}}`);\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { isWindows } from './platform.js';\r\nimport { startsWithIgnoreCase } from './strings.js';\r\nimport { sep, posix, normalize } from './path.js';\r\n/**\r\n * Takes a Windows OS path and changes backward slashes to forward slashes.\r\n * This should only be done for OS paths from Windows (or user provided paths potentially from Windows).\r\n * Using it on a Linux or MaxOS path might change it.\r\n */\r\nexport function toSlashes(osPath) {\r\n return osPath.replace(/[\\\\/]/g, posix.sep);\r\n}\r\nexport function isEqualOrParent(base, parentCandidate, ignoreCase, separator = sep) {\r\n if (base === parentCandidate) {\r\n return true;\r\n }\r\n if (!base || !parentCandidate) {\r\n return false;\r\n }\r\n if (parentCandidate.length > base.length) {\r\n return false;\r\n }\r\n if (ignoreCase) {\r\n const beginsWith = startsWithIgnoreCase(base, parentCandidate);\r\n if (!beginsWith) {\r\n return false;\r\n }\r\n if (parentCandidate.length === base.length) {\r\n return true; // same path, different casing\r\n }\r\n let sepOffset = parentCandidate.length;\r\n if (parentCandidate.charAt(parentCandidate.length - 1) === separator) {\r\n sepOffset--; // adjust the expected sep offset in case our candidate already ends in separator character\r\n }\r\n return base.charAt(sepOffset) === separator;\r\n }\r\n if (parentCandidate.charAt(parentCandidate.length - 1) !== separator) {\r\n parentCandidate += separator;\r\n }\r\n return base.indexOf(parentCandidate) === 0;\r\n}\r\nexport function isWindowsDriveLetter(char0) {\r\n return char0 >= 65 /* A */ && char0 <= 90 /* Z */ || char0 >= 97 /* a */ && char0 <= 122 /* z */;\r\n}\r\nexport function isRootOrDriveLetter(path) {\r\n const pathNormalized = normalize(path);\r\n if (isWindows) {\r\n if (path.length > 3) {\r\n return false;\r\n }\r\n return hasDriveLetter(pathNormalized) &&\r\n (path.length === 2 || pathNormalized.charCodeAt(2) === 92 /* Backslash */);\r\n }\r\n return pathNormalized === posix.sep;\r\n}\r\nexport function hasDriveLetter(path) {\r\n if (isWindows) {\r\n return isWindowsDriveLetter(path.charCodeAt(0)) && path.charCodeAt(1) === 58 /* Colon */;\r\n }\r\n return false;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { ReplaceCommand } from '../commands/replaceCommand.js';\r\nimport { CursorColumns, EditOperationResult, isQuote } from './cursorCommon.js';\r\nimport { MoveOperations } from './cursorMoveOperations.js';\r\nimport { Range } from '../core/range.js';\r\nexport class DeleteOperations {\r\n static deleteRight(prevEditOperationType, config, model, selections) {\r\n let commands = [];\r\n let shouldPushStackElementBefore = (prevEditOperationType !== 3 /* DeletingRight */);\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n let deleteSelection = selection;\r\n if (deleteSelection.isEmpty()) {\r\n let position = selection.getPosition();\r\n let rightOfPosition = MoveOperations.right(config, model, position.lineNumber, position.column);\r\n deleteSelection = new Range(rightOfPosition.lineNumber, rightOfPosition.column, position.lineNumber, position.column);\r\n }\r\n if (deleteSelection.isEmpty()) {\r\n // Probably at end of file => ignore\r\n commands[i] = null;\r\n continue;\r\n }\r\n if (deleteSelection.startLineNumber !== deleteSelection.endLineNumber) {\r\n shouldPushStackElementBefore = true;\r\n }\r\n commands[i] = new ReplaceCommand(deleteSelection, '');\r\n }\r\n return [shouldPushStackElementBefore, commands];\r\n }\r\n static isAutoClosingPairDelete(autoClosingBrackets, autoClosingQuotes, autoClosingPairsOpen, model, selections) {\r\n if (autoClosingBrackets === 'never' && autoClosingQuotes === 'never') {\r\n return false;\r\n }\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n const position = selection.getPosition();\r\n if (!selection.isEmpty()) {\r\n return false;\r\n }\r\n const lineText = model.getLineContent(position.lineNumber);\r\n if (position.column < 2 || position.column >= lineText.length + 1) {\r\n return false;\r\n }\r\n const character = lineText.charAt(position.column - 2);\r\n const autoClosingPairCandidates = autoClosingPairsOpen.get(character);\r\n if (!autoClosingPairCandidates) {\r\n return false;\r\n }\r\n if (isQuote(character)) {\r\n if (autoClosingQuotes === 'never') {\r\n return false;\r\n }\r\n }\r\n else {\r\n if (autoClosingBrackets === 'never') {\r\n return false;\r\n }\r\n }\r\n const afterCharacter = lineText.charAt(position.column - 1);\r\n let foundAutoClosingPair = false;\r\n for (const autoClosingPairCandidate of autoClosingPairCandidates) {\r\n if (autoClosingPairCandidate.open === character && autoClosingPairCandidate.close === afterCharacter) {\r\n foundAutoClosingPair = true;\r\n }\r\n }\r\n if (!foundAutoClosingPair) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n static _runAutoClosingPairDelete(config, model, selections) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const position = selections[i].getPosition();\r\n const deleteSelection = new Range(position.lineNumber, position.column - 1, position.lineNumber, position.column + 1);\r\n commands[i] = new ReplaceCommand(deleteSelection, '');\r\n }\r\n return [true, commands];\r\n }\r\n static deleteLeft(prevEditOperationType, config, model, selections) {\r\n if (this.isAutoClosingPairDelete(config.autoClosingBrackets, config.autoClosingQuotes, config.autoClosingPairs.autoClosingPairsOpenByEnd, model, selections)) {\r\n return this._runAutoClosingPairDelete(config, model, selections);\r\n }\r\n let commands = [];\r\n let shouldPushStackElementBefore = (prevEditOperationType !== 2 /* DeletingLeft */);\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n let deleteSelection = selection;\r\n if (deleteSelection.isEmpty()) {\r\n let position = selection.getPosition();\r\n if (config.useTabStops && position.column > 1) {\r\n let lineContent = model.getLineContent(position.lineNumber);\r\n let firstNonWhitespaceIndex = strings.firstNonWhitespaceIndex(lineContent);\r\n let lastIndentationColumn = (firstNonWhitespaceIndex === -1\r\n ? /* entire string is whitespace */ lineContent.length + 1\r\n : firstNonWhitespaceIndex + 1);\r\n if (position.column <= lastIndentationColumn) {\r\n let fromVisibleColumn = CursorColumns.visibleColumnFromColumn2(config, model, position);\r\n let toVisibleColumn = CursorColumns.prevIndentTabStop(fromVisibleColumn, config.indentSize);\r\n let toColumn = CursorColumns.columnFromVisibleColumn2(config, model, position.lineNumber, toVisibleColumn);\r\n deleteSelection = new Range(position.lineNumber, toColumn, position.lineNumber, position.column);\r\n }\r\n else {\r\n deleteSelection = new Range(position.lineNumber, position.column - 1, position.lineNumber, position.column);\r\n }\r\n }\r\n else {\r\n let leftOfPosition = MoveOperations.left(config, model, position.lineNumber, position.column);\r\n deleteSelection = new Range(leftOfPosition.lineNumber, leftOfPosition.column, position.lineNumber, position.column);\r\n }\r\n }\r\n if (deleteSelection.isEmpty()) {\r\n // Probably at beginning of file => ignore\r\n commands[i] = null;\r\n continue;\r\n }\r\n if (deleteSelection.startLineNumber !== deleteSelection.endLineNumber) {\r\n shouldPushStackElementBefore = true;\r\n }\r\n commands[i] = new ReplaceCommand(deleteSelection, '');\r\n }\r\n return [shouldPushStackElementBefore, commands];\r\n }\r\n static cut(config, model, selections) {\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n const selection = selections[i];\r\n if (selection.isEmpty()) {\r\n if (config.emptySelectionClipboard) {\r\n // This is a full line cut\r\n let position = selection.getPosition();\r\n let startLineNumber, startColumn, endLineNumber, endColumn;\r\n if (position.lineNumber < model.getLineCount()) {\r\n // Cutting a line in the middle of the model\r\n startLineNumber = position.lineNumber;\r\n startColumn = 1;\r\n endLineNumber = position.lineNumber + 1;\r\n endColumn = 1;\r\n }\r\n else if (position.lineNumber > 1) {\r\n // Cutting the last line & there are more than 1 lines in the model\r\n startLineNumber = position.lineNumber - 1;\r\n startColumn = model.getLineMaxColumn(position.lineNumber - 1);\r\n endLineNumber = position.lineNumber;\r\n endColumn = model.getLineMaxColumn(position.lineNumber);\r\n }\r\n else {\r\n // Cutting the single line that the model contains\r\n startLineNumber = position.lineNumber;\r\n startColumn = 1;\r\n endLineNumber = position.lineNumber;\r\n endColumn = model.getLineMaxColumn(position.lineNumber);\r\n }\r\n let deleteSelection = new Range(startLineNumber, startColumn, endLineNumber, endColumn);\r\n if (!deleteSelection.isEmpty()) {\r\n commands[i] = new ReplaceCommand(deleteSelection, '');\r\n }\r\n else {\r\n commands[i] = null;\r\n }\r\n }\r\n else {\r\n // Cannot cut empty selection\r\n commands[i] = null;\r\n }\r\n }\r\n else {\r\n commands[i] = new ReplaceCommand(selection, '');\r\n }\r\n }\r\n return new EditOperationResult(0 /* Other */, commands, {\r\n shouldPushStackElementBefore: true,\r\n shouldPushStackElementAfter: true\r\n });\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as DOM from './dom.js';\r\nexport function renderText(text, options = {}) {\r\n const element = createElement(options);\r\n element.textContent = text;\r\n return element;\r\n}\r\nexport function renderFormattedText(formattedText, options = {}) {\r\n const element = createElement(options);\r\n _renderFormattedText(element, parseFormattedText(formattedText), options.actionHandler);\r\n return element;\r\n}\r\nexport function createElement(options) {\r\n const tagName = options.inline ? 'span' : 'div';\r\n const element = document.createElement(tagName);\r\n if (options.className) {\r\n element.className = options.className;\r\n }\r\n return element;\r\n}\r\nclass StringStream {\r\n constructor(source) {\r\n this.source = source;\r\n this.index = 0;\r\n }\r\n eos() {\r\n return this.index >= this.source.length;\r\n }\r\n next() {\r\n const next = this.peek();\r\n this.advance();\r\n return next;\r\n }\r\n peek() {\r\n return this.source[this.index];\r\n }\r\n advance() {\r\n this.index++;\r\n }\r\n}\r\nfunction _renderFormattedText(element, treeNode, actionHandler) {\r\n let child;\r\n if (treeNode.type === 2 /* Text */) {\r\n child = document.createTextNode(treeNode.content || '');\r\n }\r\n else if (treeNode.type === 3 /* Bold */) {\r\n child = document.createElement('b');\r\n }\r\n else if (treeNode.type === 4 /* Italics */) {\r\n child = document.createElement('i');\r\n }\r\n else if (treeNode.type === 5 /* Action */ && actionHandler) {\r\n const a = document.createElement('a');\r\n a.href = '#';\r\n actionHandler.disposeables.add(DOM.addStandardDisposableListener(a, 'click', (event) => {\r\n actionHandler.callback(String(treeNode.index), event);\r\n }));\r\n child = a;\r\n }\r\n else if (treeNode.type === 7 /* NewLine */) {\r\n child = document.createElement('br');\r\n }\r\n else if (treeNode.type === 1 /* Root */) {\r\n child = element;\r\n }\r\n if (child && element !== child) {\r\n element.appendChild(child);\r\n }\r\n if (child && Array.isArray(treeNode.children)) {\r\n treeNode.children.forEach((nodeChild) => {\r\n _renderFormattedText(child, nodeChild, actionHandler);\r\n });\r\n }\r\n}\r\nfunction parseFormattedText(content) {\r\n const root = {\r\n type: 1 /* Root */,\r\n children: []\r\n };\r\n let actionViewItemIndex = 0;\r\n let current = root;\r\n const stack = [];\r\n const stream = new StringStream(content);\r\n while (!stream.eos()) {\r\n let next = stream.next();\r\n const isEscapedFormatType = (next === '\\\\' && formatTagType(stream.peek()) !== 0 /* Invalid */);\r\n if (isEscapedFormatType) {\r\n next = stream.next(); // unread the backslash if it escapes a format tag type\r\n }\r\n if (!isEscapedFormatType && isFormatTag(next) && next === stream.peek()) {\r\n stream.advance();\r\n if (current.type === 2 /* Text */) {\r\n current = stack.pop();\r\n }\r\n const type = formatTagType(next);\r\n if (current.type === type || (current.type === 5 /* Action */ && type === 6 /* ActionClose */)) {\r\n current = stack.pop();\r\n }\r\n else {\r\n const newCurrent = {\r\n type: type,\r\n children: []\r\n };\r\n if (type === 5 /* Action */) {\r\n newCurrent.index = actionViewItemIndex;\r\n actionViewItemIndex++;\r\n }\r\n current.children.push(newCurrent);\r\n stack.push(current);\r\n current = newCurrent;\r\n }\r\n }\r\n else if (next === '\\n') {\r\n if (current.type === 2 /* Text */) {\r\n current = stack.pop();\r\n }\r\n current.children.push({\r\n type: 7 /* NewLine */\r\n });\r\n }\r\n else {\r\n if (current.type !== 2 /* Text */) {\r\n const textCurrent = {\r\n type: 2 /* Text */,\r\n content: next\r\n };\r\n current.children.push(textCurrent);\r\n stack.push(current);\r\n current = textCurrent;\r\n }\r\n else {\r\n current.content += next;\r\n }\r\n }\r\n }\r\n if (current.type === 2 /* Text */) {\r\n current = stack.pop();\r\n }\r\n if (stack.length) {\r\n // incorrectly formatted string literal\r\n }\r\n return root;\r\n}\r\nfunction isFormatTag(char) {\r\n return formatTagType(char) !== 0 /* Invalid */;\r\n}\r\nfunction formatTagType(char) {\r\n switch (char) {\r\n case '*':\r\n return 3 /* Bold */;\r\n case '_':\r\n return 4 /* Italics */;\r\n case '[':\r\n return 5 /* Action */;\r\n case ']':\r\n return 6 /* ActionClose */;\r\n default:\r\n return 0 /* Invalid */;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as browser from '../../../base/browser/browser.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { RunOnceScheduler } from '../../../base/common/async.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport * as platform from '../../../base/common/platform.js';\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { TextAreaState, _debugComposition } from './textAreaState.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { BrowserFeatures } from '../../../base/browser/canIUse.js';\r\nexport const CopyOptions = {\r\n forceCopyWithSyntaxHighlighting: false\r\n};\r\n/**\r\n * Every time we write to the clipboard, we record a bit of extra metadata here.\r\n * Every time we read from the cipboard, if the text matches our last written text,\r\n * we can fetch the previous metadata.\r\n */\r\nexport class InMemoryClipboardMetadataManager {\r\n constructor() {\r\n this._lastState = null;\r\n }\r\n set(lastCopiedValue, data) {\r\n this._lastState = { lastCopiedValue, data };\r\n }\r\n get(pastedText) {\r\n if (this._lastState && this._lastState.lastCopiedValue === pastedText) {\r\n // match!\r\n return this._lastState.data;\r\n }\r\n this._lastState = null;\r\n return null;\r\n }\r\n}\r\nInMemoryClipboardMetadataManager.INSTANCE = new InMemoryClipboardMetadataManager();\r\n/**\r\n * Writes screen reader content to the textarea and is able to analyze its input events to generate:\r\n * - onCut\r\n * - onPaste\r\n * - onType\r\n *\r\n * Composition events are generated for presentation purposes (composition input is reflected in onType).\r\n */\r\nexport class TextAreaInput extends Disposable {\r\n constructor(host, textArea) {\r\n super();\r\n this.textArea = textArea;\r\n this._onFocus = this._register(new Emitter());\r\n this.onFocus = this._onFocus.event;\r\n this._onBlur = this._register(new Emitter());\r\n this.onBlur = this._onBlur.event;\r\n this._onKeyDown = this._register(new Emitter());\r\n this.onKeyDown = this._onKeyDown.event;\r\n this._onKeyUp = this._register(new Emitter());\r\n this.onKeyUp = this._onKeyUp.event;\r\n this._onCut = this._register(new Emitter());\r\n this.onCut = this._onCut.event;\r\n this._onPaste = this._register(new Emitter());\r\n this.onPaste = this._onPaste.event;\r\n this._onType = this._register(new Emitter());\r\n this.onType = this._onType.event;\r\n this._onCompositionStart = this._register(new Emitter());\r\n this.onCompositionStart = this._onCompositionStart.event;\r\n this._onCompositionUpdate = this._register(new Emitter());\r\n this.onCompositionUpdate = this._onCompositionUpdate.event;\r\n this._onCompositionEnd = this._register(new Emitter());\r\n this.onCompositionEnd = this._onCompositionEnd.event;\r\n this._onSelectionChangeRequest = this._register(new Emitter());\r\n this.onSelectionChangeRequest = this._onSelectionChangeRequest.event;\r\n this._host = host;\r\n this._textArea = this._register(new TextAreaWrapper(textArea));\r\n this._asyncTriggerCut = this._register(new RunOnceScheduler(() => this._onCut.fire(), 0));\r\n this._asyncFocusGainWriteScreenReaderContent = this._register(new RunOnceScheduler(() => this.writeScreenReaderContent('asyncFocusGain'), 0));\r\n this._textAreaState = TextAreaState.EMPTY;\r\n this._selectionChangeListener = null;\r\n this.writeScreenReaderContent('ctor');\r\n this._hasFocus = false;\r\n this._isDoingComposition = false;\r\n this._nextCommand = 0 /* Type */;\r\n let lastKeyDown = null;\r\n this._register(dom.addStandardDisposableListener(textArea.domNode, 'keydown', (e) => {\r\n if (e.keyCode === 109 /* KEY_IN_COMPOSITION */\r\n || (this._isDoingComposition && e.keyCode === 1 /* Backspace */)) {\r\n // Stop propagation for keyDown events if the IME is processing key input\r\n e.stopPropagation();\r\n }\r\n if (e.equals(9 /* Escape */)) {\r\n // Prevent default always for `Esc`, otherwise it will generate a keypress\r\n // See https://msdn.microsoft.com/en-us/library/ie/ms536939(v=vs.85).aspx\r\n e.preventDefault();\r\n }\r\n lastKeyDown = e;\r\n this._onKeyDown.fire(e);\r\n }));\r\n this._register(dom.addStandardDisposableListener(textArea.domNode, 'keyup', (e) => {\r\n this._onKeyUp.fire(e);\r\n }));\r\n this._register(dom.addDisposableListener(textArea.domNode, 'compositionstart', (e) => {\r\n if (_debugComposition) {\r\n console.log(`[compositionstart]`, e);\r\n }\r\n if (this._isDoingComposition) {\r\n return;\r\n }\r\n this._isDoingComposition = true;\r\n let moveOneCharacterLeft = false;\r\n if (platform.isMacintosh\r\n && lastKeyDown\r\n && lastKeyDown.equals(109 /* KEY_IN_COMPOSITION */)\r\n && this._textAreaState.selectionStart === this._textAreaState.selectionEnd\r\n && this._textAreaState.selectionStart > 0\r\n && this._textAreaState.value.substr(this._textAreaState.selectionStart - 1, 1) === e.data) {\r\n // Handling long press case on macOS + arrow key => pretend the character was selected\r\n if (lastKeyDown.code === 'ArrowRight' || lastKeyDown.code === 'ArrowLeft') {\r\n if (_debugComposition) {\r\n console.log(`[compositionstart] Handling long press case on macOS + arrow key`, e);\r\n }\r\n moveOneCharacterLeft = true;\r\n }\r\n }\r\n if (moveOneCharacterLeft) {\r\n this._textAreaState = new TextAreaState(this._textAreaState.value, this._textAreaState.selectionStart - 1, this._textAreaState.selectionEnd, this._textAreaState.selectionStartPosition ? new Position(this._textAreaState.selectionStartPosition.lineNumber, this._textAreaState.selectionStartPosition.column - 1) : null, this._textAreaState.selectionEndPosition);\r\n }\r\n else {\r\n this._setAndWriteTextAreaState('compositionstart', TextAreaState.EMPTY);\r\n }\r\n this._onCompositionStart.fire({ moveOneCharacterLeft });\r\n }));\r\n /**\r\n * Deduce the typed input from a text area's value and the last observed state.\r\n */\r\n const deduceInputFromTextAreaValue = (couldBeEmojiInput) => {\r\n const oldState = this._textAreaState;\r\n const newState = TextAreaState.readFromTextArea(this._textArea);\r\n return [newState, TextAreaState.deduceInput(oldState, newState, couldBeEmojiInput)];\r\n };\r\n /**\r\n * Deduce the composition input from a string.\r\n */\r\n const deduceComposition = (text) => {\r\n const oldState = this._textAreaState;\r\n const newState = TextAreaState.selectedText(text);\r\n const typeInput = {\r\n text: newState.value,\r\n replaceCharCnt: oldState.selectionEnd - oldState.selectionStart\r\n };\r\n return [newState, typeInput];\r\n };\r\n this._register(dom.addDisposableListener(textArea.domNode, 'compositionupdate', (e) => {\r\n if (_debugComposition) {\r\n console.log(`[compositionupdate]`, e);\r\n }\r\n const [newState, typeInput] = deduceComposition(e.data || '');\r\n this._textAreaState = newState;\r\n this._onType.fire(typeInput);\r\n this._onCompositionUpdate.fire(e);\r\n }));\r\n this._register(dom.addDisposableListener(textArea.domNode, 'compositionend', (e) => {\r\n if (_debugComposition) {\r\n console.log(`[compositionend]`, e);\r\n }\r\n // https://github.com/microsoft/monaco-editor/issues/1663\r\n // On iOS 13.2, Chinese system IME randomly trigger an additional compositionend event with empty data\r\n if (!this._isDoingComposition) {\r\n return;\r\n }\r\n const [newState, typeInput] = deduceComposition(e.data || '');\r\n this._textAreaState = newState;\r\n this._onType.fire(typeInput);\r\n // isChrome: the textarea is not updated correctly when composition ends\r\n // isFirefox: the textarea is not updated correctly after inserting emojis\r\n // => we cannot assume the text at the end consists only of the composited text\r\n if (browser.isChrome || browser.isFirefox) {\r\n this._textAreaState = TextAreaState.readFromTextArea(this._textArea);\r\n }\r\n if (!this._isDoingComposition) {\r\n return;\r\n }\r\n this._isDoingComposition = false;\r\n this._onCompositionEnd.fire();\r\n }));\r\n this._register(dom.addDisposableListener(textArea.domNode, 'input', () => {\r\n // Pretend here we touched the text area, as the `input` event will most likely\r\n // result in a `selectionchange` event which we want to ignore\r\n this._textArea.setIgnoreSelectionChangeTime('received input event');\r\n if (this._isDoingComposition) {\r\n return;\r\n }\r\n const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/ platform.isMacintosh);\r\n if (typeInput.replaceCharCnt === 0 && typeInput.text.length === 1 && strings.isHighSurrogate(typeInput.text.charCodeAt(0))) {\r\n // Ignore invalid input but keep it around for next time\r\n return;\r\n }\r\n this._textAreaState = newState;\r\n if (this._nextCommand === 0 /* Type */) {\r\n if (typeInput.text !== '') {\r\n this._onType.fire(typeInput);\r\n }\r\n }\r\n else {\r\n if (typeInput.text !== '' || typeInput.replaceCharCnt !== 0) {\r\n this._firePaste(typeInput.text, null);\r\n }\r\n this._nextCommand = 0 /* Type */;\r\n }\r\n }));\r\n // --- Clipboard operations\r\n this._register(dom.addDisposableListener(textArea.domNode, 'cut', (e) => {\r\n // Pretend here we touched the text area, as the `cut` event will most likely\r\n // result in a `selectionchange` event which we want to ignore\r\n this._textArea.setIgnoreSelectionChangeTime('received cut event');\r\n this._ensureClipboardGetsEditorSelection(e);\r\n this._asyncTriggerCut.schedule();\r\n }));\r\n this._register(dom.addDisposableListener(textArea.domNode, 'copy', (e) => {\r\n this._ensureClipboardGetsEditorSelection(e);\r\n }));\r\n this._register(dom.addDisposableListener(textArea.domNode, 'paste', (e) => {\r\n // Pretend here we touched the text area, as the `paste` event will most likely\r\n // result in a `selectionchange` event which we want to ignore\r\n this._textArea.setIgnoreSelectionChangeTime('received paste event');\r\n if (ClipboardEventUtils.canUseTextData(e)) {\r\n const [pastePlainText, metadata] = ClipboardEventUtils.getTextData(e);\r\n if (pastePlainText !== '') {\r\n this._firePaste(pastePlainText, metadata);\r\n }\r\n }\r\n else {\r\n if (this._textArea.getSelectionStart() !== this._textArea.getSelectionEnd()) {\r\n // Clean up the textarea, to get a clean paste\r\n this._setAndWriteTextAreaState('paste', TextAreaState.EMPTY);\r\n }\r\n this._nextCommand = 1 /* Paste */;\r\n }\r\n }));\r\n this._register(dom.addDisposableListener(textArea.domNode, 'focus', () => {\r\n const hadFocus = this._hasFocus;\r\n this._setHasFocus(true);\r\n if (browser.isSafari && !hadFocus && this._hasFocus) {\r\n // When \"tabbing into\" the textarea, immediately after dispatching the 'focus' event,\r\n // Safari will always move the selection at offset 0 in the textarea\r\n this._asyncFocusGainWriteScreenReaderContent.schedule();\r\n }\r\n }));\r\n this._register(dom.addDisposableListener(textArea.domNode, 'blur', () => {\r\n if (this._isDoingComposition) {\r\n // See https://github.com/microsoft/vscode/issues/112621\r\n // where compositionend is not triggered when the editor\r\n // is taken off-dom during a composition\r\n // Clear the flag to be able to write to the textarea\r\n this._isDoingComposition = false;\r\n // Clear the textarea to avoid an unwanted cursor type\r\n this.writeScreenReaderContent('blurWithoutCompositionEnd');\r\n // Fire artificial composition end\r\n this._onCompositionEnd.fire();\r\n }\r\n this._setHasFocus(false);\r\n }));\r\n }\r\n _installSelectionChangeListener() {\r\n // See https://github.com/microsoft/vscode/issues/27216 and https://github.com/microsoft/vscode/issues/98256\r\n // When using a Braille display, it is possible for users to reposition the\r\n // system caret. This is reflected in Chrome as a `selectionchange` event.\r\n //\r\n // The `selectionchange` event appears to be emitted under numerous other circumstances,\r\n // so it is quite a challenge to distinguish a `selectionchange` coming in from a user\r\n // using a Braille display from all the other cases.\r\n //\r\n // The problems with the `selectionchange` event are:\r\n // * the event is emitted when the textarea is focused programmatically -- textarea.focus()\r\n // * the event is emitted when the selection is changed in the textarea programmatically -- textarea.setSelectionRange(...)\r\n // * the event is emitted when the value of the textarea is changed programmatically -- textarea.value = '...'\r\n // * the event is emitted when tabbing into the textarea\r\n // * the event is emitted asynchronously (sometimes with a delay as high as a few tens of ms)\r\n // * the event sometimes comes in bursts for a single logical textarea operation\r\n // `selectionchange` events often come multiple times for a single logical change\r\n // so throttle multiple `selectionchange` events that burst in a short period of time.\r\n let previousSelectionChangeEventTime = 0;\r\n return dom.addDisposableListener(document, 'selectionchange', (e) => {\r\n if (!this._hasFocus) {\r\n return;\r\n }\r\n if (this._isDoingComposition) {\r\n return;\r\n }\r\n if (!browser.isChrome) {\r\n // Support only for Chrome until testing happens on other browsers\r\n return;\r\n }\r\n const now = Date.now();\r\n const delta1 = now - previousSelectionChangeEventTime;\r\n previousSelectionChangeEventTime = now;\r\n if (delta1 < 5) {\r\n // received another `selectionchange` event within 5ms of the previous `selectionchange` event\r\n // => ignore it\r\n return;\r\n }\r\n const delta2 = now - this._textArea.getIgnoreSelectionChangeTime();\r\n this._textArea.resetSelectionChangeTime();\r\n if (delta2 < 100) {\r\n // received a `selectionchange` event within 100ms since we touched the textarea\r\n // => ignore it, since we caused it\r\n return;\r\n }\r\n if (!this._textAreaState.selectionStartPosition || !this._textAreaState.selectionEndPosition) {\r\n // Cannot correlate a position in the textarea with a position in the editor...\r\n return;\r\n }\r\n const newValue = this._textArea.getValue();\r\n if (this._textAreaState.value !== newValue) {\r\n // Cannot correlate a position in the textarea with a position in the editor...\r\n return;\r\n }\r\n const newSelectionStart = this._textArea.getSelectionStart();\r\n const newSelectionEnd = this._textArea.getSelectionEnd();\r\n if (this._textAreaState.selectionStart === newSelectionStart && this._textAreaState.selectionEnd === newSelectionEnd) {\r\n // Nothing to do...\r\n return;\r\n }\r\n const _newSelectionStartPosition = this._textAreaState.deduceEditorPosition(newSelectionStart);\r\n const newSelectionStartPosition = this._host.deduceModelPosition(_newSelectionStartPosition[0], _newSelectionStartPosition[1], _newSelectionStartPosition[2]);\r\n const _newSelectionEndPosition = this._textAreaState.deduceEditorPosition(newSelectionEnd);\r\n const newSelectionEndPosition = this._host.deduceModelPosition(_newSelectionEndPosition[0], _newSelectionEndPosition[1], _newSelectionEndPosition[2]);\r\n const newSelection = new Selection(newSelectionStartPosition.lineNumber, newSelectionStartPosition.column, newSelectionEndPosition.lineNumber, newSelectionEndPosition.column);\r\n this._onSelectionChangeRequest.fire(newSelection);\r\n });\r\n }\r\n dispose() {\r\n super.dispose();\r\n if (this._selectionChangeListener) {\r\n this._selectionChangeListener.dispose();\r\n this._selectionChangeListener = null;\r\n }\r\n }\r\n focusTextArea() {\r\n // Setting this._hasFocus and writing the screen reader content\r\n // will result in a focus() and setSelectionRange() in the textarea\r\n this._setHasFocus(true);\r\n // If the editor is off DOM, focus cannot be really set, so let's double check that we have managed to set the focus\r\n this.refreshFocusState();\r\n }\r\n isFocused() {\r\n return this._hasFocus;\r\n }\r\n refreshFocusState() {\r\n const shadowRoot = dom.getShadowRoot(this.textArea.domNode);\r\n if (shadowRoot) {\r\n this._setHasFocus(shadowRoot.activeElement === this.textArea.domNode);\r\n }\r\n else if (dom.isInDOM(this.textArea.domNode)) {\r\n this._setHasFocus(document.activeElement === this.textArea.domNode);\r\n }\r\n else {\r\n this._setHasFocus(false);\r\n }\r\n }\r\n _setHasFocus(newHasFocus) {\r\n if (this._hasFocus === newHasFocus) {\r\n // no change\r\n return;\r\n }\r\n this._hasFocus = newHasFocus;\r\n if (this._selectionChangeListener) {\r\n this._selectionChangeListener.dispose();\r\n this._selectionChangeListener = null;\r\n }\r\n if (this._hasFocus) {\r\n this._selectionChangeListener = this._installSelectionChangeListener();\r\n }\r\n if (this._hasFocus) {\r\n this.writeScreenReaderContent('focusgain');\r\n }\r\n if (this._hasFocus) {\r\n this._onFocus.fire();\r\n }\r\n else {\r\n this._onBlur.fire();\r\n }\r\n }\r\n _setAndWriteTextAreaState(reason, textAreaState) {\r\n if (!this._hasFocus) {\r\n textAreaState = textAreaState.collapseSelection();\r\n }\r\n textAreaState.writeToTextArea(reason, this._textArea, this._hasFocus);\r\n this._textAreaState = textAreaState;\r\n }\r\n writeScreenReaderContent(reason) {\r\n if (this._isDoingComposition) {\r\n // Do not write to the text area when doing composition\r\n return;\r\n }\r\n this._setAndWriteTextAreaState(reason, this._host.getScreenReaderContent(this._textAreaState));\r\n }\r\n _ensureClipboardGetsEditorSelection(e) {\r\n const dataToCopy = this._host.getDataToCopy(ClipboardEventUtils.canUseTextData(e) && BrowserFeatures.clipboard.richText);\r\n const storedMetadata = {\r\n version: 1,\r\n isFromEmptySelection: dataToCopy.isFromEmptySelection,\r\n multicursorText: dataToCopy.multicursorText,\r\n mode: dataToCopy.mode\r\n };\r\n InMemoryClipboardMetadataManager.INSTANCE.set(\r\n // When writing \"LINE\\r\\n\" to the clipboard and then pasting,\r\n // Firefox pastes \"LINE\\n\", so let's work around this quirk\r\n (browser.isFirefox ? dataToCopy.text.replace(/\\r\\n/g, '\\n') : dataToCopy.text), storedMetadata);\r\n if (!ClipboardEventUtils.canUseTextData(e)) {\r\n // Looks like an old browser. The strategy is to place the text\r\n // we'd like to be copied to the clipboard in the textarea and select it.\r\n this._setAndWriteTextAreaState('copy or cut', TextAreaState.selectedText(dataToCopy.text));\r\n return;\r\n }\r\n ClipboardEventUtils.setTextData(e, dataToCopy.text, dataToCopy.html, storedMetadata);\r\n }\r\n _firePaste(text, metadata) {\r\n if (!metadata) {\r\n // try the in-memory store\r\n metadata = InMemoryClipboardMetadataManager.INSTANCE.get(text);\r\n }\r\n this._onPaste.fire({\r\n text: text,\r\n metadata: metadata\r\n });\r\n }\r\n}\r\nclass ClipboardEventUtils {\r\n static canUseTextData(e) {\r\n if (e.clipboardData) {\r\n return true;\r\n }\r\n if (window.clipboardData) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n static getTextData(e) {\r\n if (e.clipboardData) {\r\n e.preventDefault();\r\n const text = e.clipboardData.getData('text/plain');\r\n let metadata = null;\r\n const rawmetadata = e.clipboardData.getData('vscode-editor-data');\r\n if (typeof rawmetadata === 'string') {\r\n try {\r\n metadata = JSON.parse(rawmetadata);\r\n if (metadata.version !== 1) {\r\n metadata = null;\r\n }\r\n }\r\n catch (err) {\r\n // no problem!\r\n }\r\n }\r\n return [text, metadata];\r\n }\r\n if (window.clipboardData) {\r\n e.preventDefault();\r\n const text = window.clipboardData.getData('Text');\r\n return [text, null];\r\n }\r\n throw new Error('ClipboardEventUtils.getTextData: Cannot use text data!');\r\n }\r\n static setTextData(e, text, html, metadata) {\r\n if (e.clipboardData) {\r\n e.clipboardData.setData('text/plain', text);\r\n if (typeof html === 'string') {\r\n e.clipboardData.setData('text/html', html);\r\n }\r\n e.clipboardData.setData('vscode-editor-data', JSON.stringify(metadata));\r\n e.preventDefault();\r\n return;\r\n }\r\n if (window.clipboardData) {\r\n window.clipboardData.setData('Text', text);\r\n e.preventDefault();\r\n return;\r\n }\r\n throw new Error('ClipboardEventUtils.setTextData: Cannot use text data!');\r\n }\r\n}\r\nclass TextAreaWrapper extends Disposable {\r\n constructor(_textArea) {\r\n super();\r\n this._actual = _textArea;\r\n this._ignoreSelectionChangeTime = 0;\r\n }\r\n setIgnoreSelectionChangeTime(reason) {\r\n this._ignoreSelectionChangeTime = Date.now();\r\n }\r\n getIgnoreSelectionChangeTime() {\r\n return this._ignoreSelectionChangeTime;\r\n }\r\n resetSelectionChangeTime() {\r\n this._ignoreSelectionChangeTime = 0;\r\n }\r\n getValue() {\r\n // console.log('current value: ' + this._textArea.value);\r\n return this._actual.domNode.value;\r\n }\r\n setValue(reason, value) {\r\n const textArea = this._actual.domNode;\r\n if (textArea.value === value) {\r\n // No change\r\n return;\r\n }\r\n // console.log('reason: ' + reason + ', current value: ' + textArea.value + ' => new value: ' + value);\r\n this.setIgnoreSelectionChangeTime('setValue');\r\n textArea.value = value;\r\n }\r\n getSelectionStart() {\r\n return this._actual.domNode.selectionStart;\r\n }\r\n getSelectionEnd() {\r\n return this._actual.domNode.selectionEnd;\r\n }\r\n setSelectionRange(reason, selectionStart, selectionEnd) {\r\n const textArea = this._actual.domNode;\r\n let activeElement = null;\r\n const shadowRoot = dom.getShadowRoot(textArea);\r\n if (shadowRoot) {\r\n activeElement = shadowRoot.activeElement;\r\n }\r\n else {\r\n activeElement = document.activeElement;\r\n }\r\n const currentIsFocused = (activeElement === textArea);\r\n const currentSelectionStart = textArea.selectionStart;\r\n const currentSelectionEnd = textArea.selectionEnd;\r\n if (currentIsFocused && currentSelectionStart === selectionStart && currentSelectionEnd === selectionEnd) {\r\n // No change\r\n // Firefox iframe bug https://github.com/microsoft/monaco-editor/issues/643#issuecomment-367871377\r\n if (browser.isFirefox && window.parent !== window) {\r\n textArea.focus();\r\n }\r\n return;\r\n }\r\n // console.log('reason: ' + reason + ', setSelectionRange: ' + selectionStart + ' -> ' + selectionEnd);\r\n if (currentIsFocused) {\r\n // No need to focus, only need to change the selection range\r\n this.setIgnoreSelectionChangeTime('setSelectionRange');\r\n textArea.setSelectionRange(selectionStart, selectionEnd);\r\n if (browser.isFirefox && window.parent !== window) {\r\n textArea.focus();\r\n }\r\n return;\r\n }\r\n // If the focus is outside the textarea, browsers will try really hard to reveal the textarea.\r\n // Here, we try to undo the browser's desperate reveal.\r\n try {\r\n const scrollState = dom.saveParentsScrollTop(textArea);\r\n this.setIgnoreSelectionChangeTime('setSelectionRange');\r\n textArea.focus();\r\n textArea.setSelectionRange(selectionStart, selectionEnd);\r\n dom.restoreParentsScrollTop(textArea, scrollState);\r\n }\r\n catch (e) {\r\n // Sometimes IE throws when setting selection (e.g. textarea is off-DOM)\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport class ColorZone {\r\n constructor(from, to, colorId) {\r\n this.from = from | 0;\r\n this.to = to | 0;\r\n this.colorId = colorId | 0;\r\n }\r\n static compare(a, b) {\r\n if (a.colorId === b.colorId) {\r\n if (a.from === b.from) {\r\n return a.to - b.to;\r\n }\r\n return a.from - b.from;\r\n }\r\n return a.colorId - b.colorId;\r\n }\r\n}\r\n/**\r\n * A zone in the overview ruler\r\n */\r\nexport class OverviewRulerZone {\r\n constructor(startLineNumber, endLineNumber, color) {\r\n this.startLineNumber = startLineNumber;\r\n this.endLineNumber = endLineNumber;\r\n this.color = color;\r\n this._colorZone = null;\r\n }\r\n static compare(a, b) {\r\n if (a.color === b.color) {\r\n if (a.startLineNumber === b.startLineNumber) {\r\n return a.endLineNumber - b.endLineNumber;\r\n }\r\n return a.startLineNumber - b.startLineNumber;\r\n }\r\n return a.color < b.color ? -1 : 1;\r\n }\r\n setColorZone(colorZone) {\r\n this._colorZone = colorZone;\r\n }\r\n getColorZones() {\r\n return this._colorZone;\r\n }\r\n}\r\nexport class OverviewZoneManager {\r\n constructor(getVerticalOffsetForLine) {\r\n this._getVerticalOffsetForLine = getVerticalOffsetForLine;\r\n this._zones = [];\r\n this._colorZonesInvalid = false;\r\n this._lineHeight = 0;\r\n this._domWidth = 0;\r\n this._domHeight = 0;\r\n this._outerHeight = 0;\r\n this._pixelRatio = 1;\r\n this._lastAssignedId = 0;\r\n this._color2Id = Object.create(null);\r\n this._id2Color = [];\r\n }\r\n getId2Color() {\r\n return this._id2Color;\r\n }\r\n setZones(newZones) {\r\n this._zones = newZones;\r\n this._zones.sort(OverviewRulerZone.compare);\r\n }\r\n setLineHeight(lineHeight) {\r\n if (this._lineHeight === lineHeight) {\r\n return false;\r\n }\r\n this._lineHeight = lineHeight;\r\n this._colorZonesInvalid = true;\r\n return true;\r\n }\r\n setPixelRatio(pixelRatio) {\r\n this._pixelRatio = pixelRatio;\r\n this._colorZonesInvalid = true;\r\n }\r\n getDOMWidth() {\r\n return this._domWidth;\r\n }\r\n getCanvasWidth() {\r\n return this._domWidth * this._pixelRatio;\r\n }\r\n setDOMWidth(width) {\r\n if (this._domWidth === width) {\r\n return false;\r\n }\r\n this._domWidth = width;\r\n this._colorZonesInvalid = true;\r\n return true;\r\n }\r\n getDOMHeight() {\r\n return this._domHeight;\r\n }\r\n getCanvasHeight() {\r\n return this._domHeight * this._pixelRatio;\r\n }\r\n setDOMHeight(height) {\r\n if (this._domHeight === height) {\r\n return false;\r\n }\r\n this._domHeight = height;\r\n this._colorZonesInvalid = true;\r\n return true;\r\n }\r\n getOuterHeight() {\r\n return this._outerHeight;\r\n }\r\n setOuterHeight(outerHeight) {\r\n if (this._outerHeight === outerHeight) {\r\n return false;\r\n }\r\n this._outerHeight = outerHeight;\r\n this._colorZonesInvalid = true;\r\n return true;\r\n }\r\n resolveColorZones() {\r\n const colorZonesInvalid = this._colorZonesInvalid;\r\n const lineHeight = Math.floor(this._lineHeight); // @perf\r\n const totalHeight = Math.floor(this.getCanvasHeight()); // @perf\r\n const outerHeight = Math.floor(this._outerHeight); // @perf\r\n const heightRatio = totalHeight / outerHeight;\r\n const halfMinimumHeight = Math.floor(4 /* MINIMUM_HEIGHT */ * this._pixelRatio / 2);\r\n let allColorZones = [];\r\n for (let i = 0, len = this._zones.length; i < len; i++) {\r\n const zone = this._zones[i];\r\n if (!colorZonesInvalid) {\r\n const colorZone = zone.getColorZones();\r\n if (colorZone) {\r\n allColorZones.push(colorZone);\r\n continue;\r\n }\r\n }\r\n const y1 = Math.floor(heightRatio * (this._getVerticalOffsetForLine(zone.startLineNumber)));\r\n const y2 = Math.floor(heightRatio * (this._getVerticalOffsetForLine(zone.endLineNumber) + lineHeight));\r\n let ycenter = Math.floor((y1 + y2) / 2);\r\n let halfHeight = (y2 - ycenter);\r\n if (halfHeight < halfMinimumHeight) {\r\n halfHeight = halfMinimumHeight;\r\n }\r\n if (ycenter - halfHeight < 0) {\r\n ycenter = halfHeight;\r\n }\r\n if (ycenter + halfHeight > totalHeight) {\r\n ycenter = totalHeight - halfHeight;\r\n }\r\n const color = zone.color;\r\n let colorId = this._color2Id[color];\r\n if (!colorId) {\r\n colorId = (++this._lastAssignedId);\r\n this._color2Id[color] = colorId;\r\n this._id2Color[colorId] = color;\r\n }\r\n const colorZone = new ColorZone(ycenter - halfHeight, ycenter + halfHeight, colorId);\r\n zone.setColorZone(colorZone);\r\n allColorZones.push(colorZone);\r\n }\r\n this._colorZonesInvalid = false;\r\n allColorZones.sort(ColorZone.compare);\r\n return allColorZones;\r\n }\r\n}\r\n","import '../../editor/editor.api.js';\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n'use strict';\r\nimport { typescriptVersion as tsversion } from './lib/typescriptServicesMetadata.js'; // do not import the whole typescriptServices here\r\nimport { languages, Emitter } from './fillers/monaco-editor-core.js';\r\n//#region enums copied from typescript to prevent loading the entire typescriptServices ---\r\nexport var ModuleKind;\r\n(function (ModuleKind) {\r\n ModuleKind[ModuleKind[\"None\"] = 0] = \"None\";\r\n ModuleKind[ModuleKind[\"CommonJS\"] = 1] = \"CommonJS\";\r\n ModuleKind[ModuleKind[\"AMD\"] = 2] = \"AMD\";\r\n ModuleKind[ModuleKind[\"UMD\"] = 3] = \"UMD\";\r\n ModuleKind[ModuleKind[\"System\"] = 4] = \"System\";\r\n ModuleKind[ModuleKind[\"ES2015\"] = 5] = \"ES2015\";\r\n ModuleKind[ModuleKind[\"ESNext\"] = 99] = \"ESNext\";\r\n})(ModuleKind || (ModuleKind = {}));\r\nexport var JsxEmit;\r\n(function (JsxEmit) {\r\n JsxEmit[JsxEmit[\"None\"] = 0] = \"None\";\r\n JsxEmit[JsxEmit[\"Preserve\"] = 1] = \"Preserve\";\r\n JsxEmit[JsxEmit[\"React\"] = 2] = \"React\";\r\n JsxEmit[JsxEmit[\"ReactNative\"] = 3] = \"ReactNative\";\r\n JsxEmit[JsxEmit[\"ReactJSX\"] = 4] = \"ReactJSX\";\r\n JsxEmit[JsxEmit[\"ReactJSXDev\"] = 5] = \"ReactJSXDev\";\r\n})(JsxEmit || (JsxEmit = {}));\r\nexport var NewLineKind;\r\n(function (NewLineKind) {\r\n NewLineKind[NewLineKind[\"CarriageReturnLineFeed\"] = 0] = \"CarriageReturnLineFeed\";\r\n NewLineKind[NewLineKind[\"LineFeed\"] = 1] = \"LineFeed\";\r\n})(NewLineKind || (NewLineKind = {}));\r\nexport var ScriptTarget;\r\n(function (ScriptTarget) {\r\n ScriptTarget[ScriptTarget[\"ES3\"] = 0] = \"ES3\";\r\n ScriptTarget[ScriptTarget[\"ES5\"] = 1] = \"ES5\";\r\n ScriptTarget[ScriptTarget[\"ES2015\"] = 2] = \"ES2015\";\r\n ScriptTarget[ScriptTarget[\"ES2016\"] = 3] = \"ES2016\";\r\n ScriptTarget[ScriptTarget[\"ES2017\"] = 4] = \"ES2017\";\r\n ScriptTarget[ScriptTarget[\"ES2018\"] = 5] = \"ES2018\";\r\n ScriptTarget[ScriptTarget[\"ES2019\"] = 6] = \"ES2019\";\r\n ScriptTarget[ScriptTarget[\"ES2020\"] = 7] = \"ES2020\";\r\n ScriptTarget[ScriptTarget[\"ESNext\"] = 99] = \"ESNext\";\r\n ScriptTarget[ScriptTarget[\"JSON\"] = 100] = \"JSON\";\r\n ScriptTarget[ScriptTarget[\"Latest\"] = 99] = \"Latest\";\r\n})(ScriptTarget || (ScriptTarget = {}));\r\nexport var ModuleResolutionKind;\r\n(function (ModuleResolutionKind) {\r\n ModuleResolutionKind[ModuleResolutionKind[\"Classic\"] = 1] = \"Classic\";\r\n ModuleResolutionKind[ModuleResolutionKind[\"NodeJs\"] = 2] = \"NodeJs\";\r\n})(ModuleResolutionKind || (ModuleResolutionKind = {}));\r\n// --- TypeScript configuration and defaults ---------\r\nvar LanguageServiceDefaultsImpl = /** @class */ (function () {\r\n function LanguageServiceDefaultsImpl(compilerOptions, diagnosticsOptions, workerOptions) {\r\n this._onDidChange = new Emitter();\r\n this._onDidExtraLibsChange = new Emitter();\r\n this._extraLibs = Object.create(null);\r\n this._removedExtraLibs = Object.create(null);\r\n this._eagerModelSync = false;\r\n this.setCompilerOptions(compilerOptions);\r\n this.setDiagnosticsOptions(diagnosticsOptions);\r\n this.setWorkerOptions(workerOptions);\r\n this._onDidExtraLibsChangeTimeout = -1;\r\n }\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"onDidChange\", {\r\n get: function () {\r\n return this._onDidChange.event;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"onDidExtraLibsChange\", {\r\n get: function () {\r\n return this._onDidExtraLibsChange.event;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"workerOptions\", {\r\n get: function () {\r\n return this._workerOptions;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n LanguageServiceDefaultsImpl.prototype.getExtraLibs = function () {\r\n return this._extraLibs;\r\n };\r\n LanguageServiceDefaultsImpl.prototype.addExtraLib = function (content, _filePath) {\r\n var _this = this;\r\n var filePath;\r\n if (typeof _filePath === 'undefined') {\r\n filePath = \"ts:extralib-\" + Math.random().toString(36).substring(2, 15);\r\n }\r\n else {\r\n filePath = _filePath;\r\n }\r\n if (this._extraLibs[filePath] && this._extraLibs[filePath].content === content) {\r\n // no-op, there already exists an extra lib with this content\r\n return {\r\n dispose: function () { }\r\n };\r\n }\r\n var myVersion = 1;\r\n if (this._removedExtraLibs[filePath]) {\r\n myVersion = this._removedExtraLibs[filePath] + 1;\r\n }\r\n if (this._extraLibs[filePath]) {\r\n myVersion = this._extraLibs[filePath].version + 1;\r\n }\r\n this._extraLibs[filePath] = {\r\n content: content,\r\n version: myVersion\r\n };\r\n this._fireOnDidExtraLibsChangeSoon();\r\n return {\r\n dispose: function () {\r\n var extraLib = _this._extraLibs[filePath];\r\n if (!extraLib) {\r\n return;\r\n }\r\n if (extraLib.version !== myVersion) {\r\n return;\r\n }\r\n delete _this._extraLibs[filePath];\r\n _this._removedExtraLibs[filePath] = myVersion;\r\n _this._fireOnDidExtraLibsChangeSoon();\r\n }\r\n };\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setExtraLibs = function (libs) {\r\n for (var filePath in this._extraLibs) {\r\n this._removedExtraLibs[filePath] = this._extraLibs[filePath].version;\r\n }\r\n // clear out everything\r\n this._extraLibs = Object.create(null);\r\n if (libs && libs.length > 0) {\r\n for (var _i = 0, libs_1 = libs; _i < libs_1.length; _i++) {\r\n var lib = libs_1[_i];\r\n var filePath = lib.filePath || \"ts:extralib-\" + Math.random().toString(36).substring(2, 15);\r\n var content = lib.content;\r\n var myVersion = 1;\r\n if (this._removedExtraLibs[filePath]) {\r\n myVersion = this._removedExtraLibs[filePath] + 1;\r\n }\r\n this._extraLibs[filePath] = {\r\n content: content,\r\n version: myVersion\r\n };\r\n }\r\n }\r\n this._fireOnDidExtraLibsChangeSoon();\r\n };\r\n LanguageServiceDefaultsImpl.prototype._fireOnDidExtraLibsChangeSoon = function () {\r\n var _this = this;\r\n if (this._onDidExtraLibsChangeTimeout !== -1) {\r\n // already scheduled\r\n return;\r\n }\r\n this._onDidExtraLibsChangeTimeout = setTimeout(function () {\r\n _this._onDidExtraLibsChangeTimeout = -1;\r\n _this._onDidExtraLibsChange.fire(undefined);\r\n }, 0);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.getCompilerOptions = function () {\r\n return this._compilerOptions;\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setCompilerOptions = function (options) {\r\n this._compilerOptions = options || Object.create(null);\r\n this._onDidChange.fire(undefined);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.getDiagnosticsOptions = function () {\r\n return this._diagnosticsOptions;\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setDiagnosticsOptions = function (options) {\r\n this._diagnosticsOptions = options || Object.create(null);\r\n this._onDidChange.fire(undefined);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setWorkerOptions = function (options) {\r\n this._workerOptions = options || Object.create(null);\r\n this._onDidChange.fire(undefined);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setMaximumWorkerIdleTime = function (value) { };\r\n LanguageServiceDefaultsImpl.prototype.setEagerModelSync = function (value) {\r\n // doesn't fire an event since no\r\n // worker restart is required here\r\n this._eagerModelSync = value;\r\n };\r\n LanguageServiceDefaultsImpl.prototype.getEagerModelSync = function () {\r\n return this._eagerModelSync;\r\n };\r\n return LanguageServiceDefaultsImpl;\r\n}());\r\nexport var typescriptVersion = tsversion;\r\nexport var typescriptDefaults = new LanguageServiceDefaultsImpl({ allowNonTsExtensions: true, target: ScriptTarget.Latest }, { noSemanticValidation: false, noSyntaxValidation: false }, {});\r\nexport var javascriptDefaults = new LanguageServiceDefaultsImpl({ allowNonTsExtensions: true, allowJs: true, target: ScriptTarget.Latest }, { noSemanticValidation: true, noSyntaxValidation: false }, {});\r\nexport var getTypeScriptWorker = function () {\r\n return getMode().then(function (mode) { return mode.getTypeScriptWorker(); });\r\n};\r\nexport var getJavaScriptWorker = function () {\r\n return getMode().then(function (mode) { return mode.getJavaScriptWorker(); });\r\n};\r\n// export to the global based API\r\nlanguages.typescript = {\r\n ModuleKind: ModuleKind,\r\n JsxEmit: JsxEmit,\r\n NewLineKind: NewLineKind,\r\n ScriptTarget: ScriptTarget,\r\n ModuleResolutionKind: ModuleResolutionKind,\r\n typescriptVersion: typescriptVersion,\r\n typescriptDefaults: typescriptDefaults,\r\n javascriptDefaults: javascriptDefaults,\r\n getTypeScriptWorker: getTypeScriptWorker,\r\n getJavaScriptWorker: getJavaScriptWorker\r\n};\r\n// --- Registration to monaco editor ---\r\nfunction getMode() {\r\n return import('./tsMode.js');\r\n}\r\nlanguages.onLanguage('typescript', function () {\r\n return getMode().then(function (mode) { return mode.setupTypeScript(typescriptDefaults); });\r\n});\r\nlanguages.onLanguage('javascript', function () {\r\n return getMode().then(function (mode) { return mode.setupJavaScript(javascriptDefaults); });\r\n});\r\n","//\r\n// **NOTE**: Do not edit directly! This file is generated using `npm run import-typescript`\r\n//\r\nexport var typescriptVersion = \"4.1.3\";\r\n","import '../../editor/editor.api.js';\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { languages, Emitter } from './fillers/monaco-editor-core.js';\r\n// --- CSS configuration and defaults ---------\r\nvar LanguageServiceDefaultsImpl = /** @class */ (function () {\r\n function LanguageServiceDefaultsImpl(languageId, diagnosticsOptions, modeConfiguration) {\r\n this._onDidChange = new Emitter();\r\n this._languageId = languageId;\r\n this.setDiagnosticsOptions(diagnosticsOptions);\r\n this.setModeConfiguration(modeConfiguration);\r\n }\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"onDidChange\", {\r\n get: function () {\r\n return this._onDidChange.event;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"languageId\", {\r\n get: function () {\r\n return this._languageId;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"modeConfiguration\", {\r\n get: function () {\r\n return this._modeConfiguration;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"diagnosticsOptions\", {\r\n get: function () {\r\n return this._diagnosticsOptions;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n LanguageServiceDefaultsImpl.prototype.setDiagnosticsOptions = function (options) {\r\n this._diagnosticsOptions = options || Object.create(null);\r\n this._onDidChange.fire(this);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setModeConfiguration = function (modeConfiguration) {\r\n this._modeConfiguration = modeConfiguration || Object.create(null);\r\n this._onDidChange.fire(this);\r\n };\r\n return LanguageServiceDefaultsImpl;\r\n}());\r\nvar diagnosticDefault = {\r\n validate: true,\r\n lint: {\r\n compatibleVendorPrefixes: 'ignore',\r\n vendorPrefix: 'warning',\r\n duplicateProperties: 'warning',\r\n emptyRules: 'warning',\r\n importStatement: 'ignore',\r\n boxModel: 'ignore',\r\n universalSelector: 'ignore',\r\n zeroUnits: 'ignore',\r\n fontFaceProperties: 'warning',\r\n hexColorLength: 'error',\r\n argumentsInColorFunction: 'error',\r\n unknownProperties: 'warning',\r\n ieHack: 'ignore',\r\n unknownVendorSpecificProperties: 'ignore',\r\n propertyIgnoredDueToDisplay: 'warning',\r\n important: 'ignore',\r\n float: 'ignore',\r\n idSelector: 'ignore'\r\n }\r\n};\r\nvar modeConfigurationDefault = {\r\n completionItems: true,\r\n hovers: true,\r\n documentSymbols: true,\r\n definitions: true,\r\n references: true,\r\n documentHighlights: true,\r\n rename: true,\r\n colors: true,\r\n foldingRanges: true,\r\n diagnostics: true,\r\n selectionRanges: true\r\n};\r\nexport var cssDefaults = new LanguageServiceDefaultsImpl('css', diagnosticDefault, modeConfigurationDefault);\r\nexport var scssDefaults = new LanguageServiceDefaultsImpl('scss', diagnosticDefault, modeConfigurationDefault);\r\nexport var lessDefaults = new LanguageServiceDefaultsImpl('less', diagnosticDefault, modeConfigurationDefault);\r\n// export to the global based API\r\nlanguages.css = { cssDefaults: cssDefaults, lessDefaults: lessDefaults, scssDefaults: scssDefaults };\r\n// --- Registration to monaco editor ---\r\nfunction getMode() {\r\n return import('./cssMode.js');\r\n}\r\nlanguages.onLanguage('less', function () {\r\n getMode().then(function (mode) { return mode.setupMode(lessDefaults); });\r\n});\r\nlanguages.onLanguage('scss', function () {\r\n getMode().then(function (mode) { return mode.setupMode(scssDefaults); });\r\n});\r\nlanguages.onLanguage('css', function () {\r\n getMode().then(function (mode) { return mode.setupMode(cssDefaults); });\r\n});\r\n","import '../../editor/editor.api.js';\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Emitter, languages } from './fillers/monaco-editor-core.js';\r\nvar LanguageServiceDefaultsImpl = /** @class */ (function () {\r\n function LanguageServiceDefaultsImpl(languageId, diagnosticsOptions, modeConfiguration) {\r\n this._onDidChange = new Emitter();\r\n this._languageId = languageId;\r\n this.setDiagnosticsOptions(diagnosticsOptions);\r\n this.setModeConfiguration(modeConfiguration);\r\n }\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"onDidChange\", {\r\n get: function () {\r\n return this._onDidChange.event;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"languageId\", {\r\n get: function () {\r\n return this._languageId;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"modeConfiguration\", {\r\n get: function () {\r\n return this._modeConfiguration;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"diagnosticsOptions\", {\r\n get: function () {\r\n return this._diagnosticsOptions;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n LanguageServiceDefaultsImpl.prototype.setDiagnosticsOptions = function (options) {\r\n this._diagnosticsOptions = options || Object.create(null);\r\n this._onDidChange.fire(this);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setModeConfiguration = function (modeConfiguration) {\r\n this._modeConfiguration = modeConfiguration || Object.create(null);\r\n this._onDidChange.fire(this);\r\n };\r\n return LanguageServiceDefaultsImpl;\r\n}());\r\nvar diagnosticDefault = {\r\n validate: true,\r\n allowComments: true,\r\n schemas: [],\r\n enableSchemaRequest: false,\r\n schemaRequest: 'warning',\r\n schemaValidation: 'warning'\r\n};\r\nvar modeConfigurationDefault = {\r\n documentFormattingEdits: true,\r\n documentRangeFormattingEdits: true,\r\n completionItems: true,\r\n hovers: true,\r\n documentSymbols: true,\r\n tokens: true,\r\n colors: true,\r\n foldingRanges: true,\r\n diagnostics: true,\r\n selectionRanges: true\r\n};\r\nexport var jsonDefaults = new LanguageServiceDefaultsImpl('json', diagnosticDefault, modeConfigurationDefault);\r\n// export to the global based API\r\nlanguages.json = { jsonDefaults: jsonDefaults };\r\n// --- Registration to monaco editor ---\r\nfunction getMode() {\r\n return import('./jsonMode.js');\r\n}\r\nlanguages.register({\r\n id: 'json',\r\n extensions: ['.json', '.bowerrc', '.jshintrc', '.jscsrc', '.eslintrc', '.babelrc', '.har'],\r\n aliases: ['JSON', 'json'],\r\n mimetypes: ['application/json']\r\n});\r\nlanguages.onLanguage('json', function () {\r\n getMode().then(function (mode) { return mode.setupMode(jsonDefaults); });\r\n});\r\n","import '../../editor/editor.api.js';\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { languages, Emitter } from './fillers/monaco-editor-core.js';\r\n// --- HTML configuration and defaults ---------\r\nvar LanguageServiceDefaultsImpl = /** @class */ (function () {\r\n function LanguageServiceDefaultsImpl(languageId, options, modeConfiguration) {\r\n this._onDidChange = new Emitter();\r\n this._languageId = languageId;\r\n this.setOptions(options);\r\n this.setModeConfiguration(modeConfiguration);\r\n }\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"onDidChange\", {\r\n get: function () {\r\n return this._onDidChange.event;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"languageId\", {\r\n get: function () {\r\n return this._languageId;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"options\", {\r\n get: function () {\r\n return this._options;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(LanguageServiceDefaultsImpl.prototype, \"modeConfiguration\", {\r\n get: function () {\r\n return this._modeConfiguration;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n LanguageServiceDefaultsImpl.prototype.setOptions = function (options) {\r\n this._options = options || Object.create(null);\r\n this._onDidChange.fire(this);\r\n };\r\n LanguageServiceDefaultsImpl.prototype.setModeConfiguration = function (modeConfiguration) {\r\n this._modeConfiguration = modeConfiguration || Object.create(null);\r\n this._onDidChange.fire(this);\r\n };\r\n return LanguageServiceDefaultsImpl;\r\n}());\r\nvar formatDefaults = {\r\n tabSize: 4,\r\n insertSpaces: false,\r\n wrapLineLength: 120,\r\n unformatted: 'default\": \"a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',\r\n contentUnformatted: 'pre',\r\n indentInnerHtml: false,\r\n preserveNewLines: true,\r\n maxPreserveNewLines: null,\r\n indentHandlebars: false,\r\n endWithNewline: false,\r\n extraLiners: 'head, body, /html',\r\n wrapAttributes: 'auto'\r\n};\r\nvar htmlOptionsDefault = {\r\n format: formatDefaults,\r\n suggest: { html5: true, angular1: true, ionic: true }\r\n};\r\nvar handlebarOptionsDefault = {\r\n format: formatDefaults,\r\n suggest: { html5: true }\r\n};\r\nvar razorOptionsDefault = {\r\n format: formatDefaults,\r\n suggest: { html5: true, razor: true }\r\n};\r\nfunction getConfigurationDefault(languageId) {\r\n return {\r\n completionItems: true,\r\n hovers: true,\r\n documentSymbols: true,\r\n links: true,\r\n documentHighlights: true,\r\n rename: true,\r\n colors: true,\r\n foldingRanges: true,\r\n selectionRanges: true,\r\n diagnostics: languageId === htmlLanguageId,\r\n documentFormattingEdits: languageId === htmlLanguageId,\r\n documentRangeFormattingEdits: languageId === htmlLanguageId // turned off for Razor and Handlebar\r\n };\r\n}\r\nvar htmlLanguageId = 'html';\r\nvar handlebarsLanguageId = 'handlebars';\r\nvar razorLanguageId = 'razor';\r\nexport var htmlDefaults = new LanguageServiceDefaultsImpl(htmlLanguageId, htmlOptionsDefault, getConfigurationDefault(htmlLanguageId));\r\nexport var handlebarDefaults = new LanguageServiceDefaultsImpl(handlebarsLanguageId, handlebarOptionsDefault, getConfigurationDefault(handlebarsLanguageId));\r\nexport var razorDefaults = new LanguageServiceDefaultsImpl(razorLanguageId, razorOptionsDefault, getConfigurationDefault(razorLanguageId));\r\n// export to the global based API\r\nlanguages.html = { htmlDefaults: htmlDefaults, razorDefaults: razorDefaults, handlebarDefaults: handlebarDefaults };\r\n// --- Registration to monaco editor ---\r\nfunction getMode() {\r\n return import('./htmlMode.js');\r\n}\r\nlanguages.onLanguage(htmlLanguageId, function () {\r\n getMode().then(function (mode) { return mode.setupMode(htmlDefaults); });\r\n});\r\nlanguages.onLanguage(handlebarsLanguageId, function () {\r\n getMode().then(function (mode) { return mode.setupMode(handlebarDefaults); });\r\n});\r\nlanguages.onLanguage(razorLanguageId, function () {\r\n getMode().then(function (mode) { return mode.setupMode(razorDefaults); });\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { languages } from './fillers/monaco-editor-core.js';\r\nvar languageDefinitions = {};\r\nvar lazyLanguageLoaders = {};\r\nvar LazyLanguageLoader = /** @class */ (function () {\r\n function LazyLanguageLoader(languageId) {\r\n var _this = this;\r\n this._languageId = languageId;\r\n this._loadingTriggered = false;\r\n this._lazyLoadPromise = new Promise(function (resolve, reject) {\r\n _this._lazyLoadPromiseResolve = resolve;\r\n _this._lazyLoadPromiseReject = reject;\r\n });\r\n }\r\n LazyLanguageLoader.getOrCreate = function (languageId) {\r\n if (!lazyLanguageLoaders[languageId]) {\r\n lazyLanguageLoaders[languageId] = new LazyLanguageLoader(languageId);\r\n }\r\n return lazyLanguageLoaders[languageId];\r\n };\r\n LazyLanguageLoader.prototype.whenLoaded = function () {\r\n return this._lazyLoadPromise;\r\n };\r\n LazyLanguageLoader.prototype.load = function () {\r\n var _this = this;\r\n if (!this._loadingTriggered) {\r\n this._loadingTriggered = true;\r\n languageDefinitions[this._languageId].loader().then(function (mod) { return _this._lazyLoadPromiseResolve(mod); }, function (err) { return _this._lazyLoadPromiseReject(err); });\r\n }\r\n return this._lazyLoadPromise;\r\n };\r\n return LazyLanguageLoader;\r\n}());\r\nexport function loadLanguage(languageId) {\r\n return LazyLanguageLoader.getOrCreate(languageId).load();\r\n}\r\nexport function registerLanguage(def) {\r\n var languageId = def.id;\r\n languageDefinitions[languageId] = def;\r\n languages.register(def);\r\n var lazyLanguageLoader = LazyLanguageLoader.getOrCreate(languageId);\r\n languages.setMonarchTokensProvider(languageId, lazyLanguageLoader.whenLoaded().then(function (mod) { return mod.language; }));\r\n languages.onLanguage(languageId, function () {\r\n lazyLanguageLoader.load().then(function (mod) {\r\n languages.setLanguageConfiguration(languageId, mod.conf);\r\n });\r\n });\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'abap',\r\n extensions: ['.abap'],\r\n aliases: ['abap', 'ABAP'],\r\n loader: function () { return import('./abap.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'apex',\r\n extensions: ['.cls'],\r\n aliases: ['Apex', 'apex'],\r\n mimetypes: ['text/x-apex-source', 'text/x-apex'],\r\n loader: function () { return import('./apex.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'azcli',\r\n extensions: ['.azcli'],\r\n aliases: ['Azure CLI', 'azcli'],\r\n loader: function () { return import('./azcli.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'bat',\r\n extensions: ['.bat', '.cmd'],\r\n aliases: ['Batch', 'bat'],\r\n loader: function () { return import('./bat.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'cameligo',\r\n extensions: ['.mligo'],\r\n aliases: ['Cameligo'],\r\n loader: function () { return import('./cameligo.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'clojure',\r\n extensions: ['.clj', '.cljs', '.cljc', '.edn'],\r\n aliases: ['clojure', 'Clojure'],\r\n loader: function () { return import('./clojure.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'coffeescript',\r\n extensions: ['.coffee'],\r\n aliases: ['CoffeeScript', 'coffeescript', 'coffee'],\r\n mimetypes: ['text/x-coffeescript', 'text/coffeescript'],\r\n loader: function () { return import('./coffee.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'c',\r\n extensions: ['.c', '.h'],\r\n aliases: ['C', 'c'],\r\n loader: function () { return import('./cpp.js'); }\r\n});\r\nregisterLanguage({\r\n id: 'cpp',\r\n extensions: ['.cpp', '.cc', '.cxx', '.hpp', '.hh', '.hxx'],\r\n aliases: ['C++', 'Cpp', 'cpp'],\r\n loader: function () { return import('./cpp.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'csharp',\r\n extensions: ['.cs', '.csx', '.cake'],\r\n aliases: ['C#', 'csharp'],\r\n loader: function () { return import('./csharp.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'csp',\r\n extensions: [],\r\n aliases: ['CSP', 'csp'],\r\n loader: function () { return import('./csp.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'css',\r\n extensions: ['.css'],\r\n aliases: ['CSS', 'css'],\r\n mimetypes: ['text/css'],\r\n loader: function () { return import('./css.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'dart',\r\n extensions: ['.dart'],\r\n aliases: ['Dart', 'dart'],\r\n mimetypes: ['text/x-dart-source', 'text/x-dart'],\r\n loader: function () { return import('./dart.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'dockerfile',\r\n extensions: ['.dockerfile'],\r\n filenames: ['Dockerfile'],\r\n aliases: ['Dockerfile'],\r\n loader: function () { return import('./dockerfile.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'ecl',\r\n extensions: ['.ecl'],\r\n aliases: ['ECL', 'Ecl', 'ecl'],\r\n loader: function () { return import('./ecl.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'fsharp',\r\n extensions: ['.fs', '.fsi', '.ml', '.mli', '.fsx', '.fsscript'],\r\n aliases: ['F#', 'FSharp', 'fsharp'],\r\n loader: function () { return import('./fsharp.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'go',\r\n extensions: ['.go'],\r\n aliases: ['Go'],\r\n loader: function () { return import('./go.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'graphql',\r\n extensions: ['.graphql', '.gql'],\r\n aliases: ['GraphQL', 'graphql', 'gql'],\r\n mimetypes: ['application/graphql'],\r\n loader: function () { return import('./graphql.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'handlebars',\r\n extensions: ['.handlebars', '.hbs'],\r\n aliases: ['Handlebars', 'handlebars'],\r\n mimetypes: ['text/x-handlebars-template'],\r\n loader: function () { return import('./handlebars.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'hcl',\r\n extensions: ['.tf', '.tfvars', '.hcl'],\r\n aliases: ['Terraform', 'tf', 'HCL', 'hcl'],\r\n loader: function () { return import('./hcl.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'html',\r\n extensions: ['.html', '.htm', '.shtml', '.xhtml', '.mdoc', '.jsp', '.asp', '.aspx', '.jshtm'],\r\n aliases: ['HTML', 'htm', 'html', 'xhtml'],\r\n mimetypes: ['text/html', 'text/x-jshtm', 'text/template', 'text/ng-template'],\r\n loader: function () { return import('./html.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'ini',\r\n extensions: ['.ini', '.properties', '.gitconfig'],\r\n filenames: ['config', '.gitattributes', '.gitconfig', '.editorconfig'],\r\n aliases: ['Ini', 'ini'],\r\n loader: function () { return import('./ini.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'java',\r\n extensions: ['.java', '.jav'],\r\n aliases: ['Java', 'java'],\r\n mimetypes: ['text/x-java-source', 'text/x-java'],\r\n loader: function () { return import('./java.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'javascript',\r\n extensions: ['.js', '.es6', '.jsx', '.mjs'],\r\n firstLine: '^#!.*\\\\bnode',\r\n filenames: ['jakefile'],\r\n aliases: ['JavaScript', 'javascript', 'js'],\r\n mimetypes: ['text/javascript'],\r\n loader: function () { return import('./javascript.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'julia',\r\n extensions: ['.jl'],\r\n aliases: ['julia', 'Julia'],\r\n loader: function () { return import('./julia.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'kotlin',\r\n extensions: ['.kt'],\r\n aliases: ['Kotlin', 'kotlin'],\r\n mimetypes: ['text/x-kotlin-source', 'text/x-kotlin'],\r\n loader: function () { return import('./kotlin.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'less',\r\n extensions: ['.less'],\r\n aliases: ['Less', 'less'],\r\n mimetypes: ['text/x-less', 'text/less'],\r\n loader: function () { return import('./less.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'lexon',\r\n extensions: ['.lex'],\r\n aliases: ['Lexon'],\r\n loader: function () { return import('./lexon.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'lua',\r\n extensions: ['.lua'],\r\n aliases: ['Lua', 'lua'],\r\n loader: function () { return import('./lua.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'm3',\r\n extensions: ['.m3', '.i3', '.mg', '.ig'],\r\n aliases: ['Modula-3', 'Modula3', 'modula3', 'm3'],\r\n loader: function () { return import('./m3.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'markdown',\r\n extensions: ['.md', '.markdown', '.mdown', '.mkdn', '.mkd', '.mdwn', '.mdtxt', '.mdtext'],\r\n aliases: ['Markdown', 'markdown'],\r\n loader: function () { return import('./markdown.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'mips',\r\n extensions: ['.s'],\r\n aliases: ['MIPS', 'MIPS-V'],\r\n mimetypes: ['text/x-mips', 'text/mips', 'text/plaintext'],\r\n loader: function () { return import('./mips.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'msdax',\r\n extensions: ['.dax', '.msdax'],\r\n aliases: ['DAX', 'MSDAX'],\r\n loader: function () { return import('./msdax.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'mysql',\r\n extensions: [],\r\n aliases: ['MySQL', 'mysql'],\r\n loader: function () { return import('./mysql.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'objective-c',\r\n extensions: ['.m'],\r\n aliases: ['Objective-C'],\r\n loader: function () { return import('./objective-c.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'pascal',\r\n extensions: ['.pas', '.p', '.pp'],\r\n aliases: ['Pascal', 'pas'],\r\n mimetypes: ['text/x-pascal-source', 'text/x-pascal'],\r\n loader: function () { return import('./pascal.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'pascaligo',\r\n extensions: ['.ligo'],\r\n aliases: ['Pascaligo', 'ligo'],\r\n loader: function () { return import('./pascaligo.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'perl',\r\n extensions: ['.pl'],\r\n aliases: ['Perl', 'pl'],\r\n loader: function () { return import('./perl.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'pgsql',\r\n extensions: [],\r\n aliases: ['PostgreSQL', 'postgres', 'pg', 'postgre'],\r\n loader: function () { return import('./pgsql.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'php',\r\n extensions: ['.php', '.php4', '.php5', '.phtml', '.ctp'],\r\n aliases: ['PHP', 'php'],\r\n mimetypes: ['application/x-php'],\r\n loader: function () { return import('./php.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'postiats',\r\n extensions: ['.dats', '.sats', '.hats'],\r\n aliases: ['ATS', 'ATS/Postiats'],\r\n loader: function () { return import('./postiats.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'powerquery',\r\n extensions: ['.pq', '.pqm'],\r\n aliases: ['PQ', 'M', 'Power Query', 'Power Query M'],\r\n loader: function () { return import('./powerquery.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'powershell',\r\n extensions: ['.ps1', '.psm1', '.psd1'],\r\n aliases: ['PowerShell', 'powershell', 'ps', 'ps1'],\r\n loader: function () { return import('./powershell.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'pug',\r\n extensions: ['.jade', '.pug'],\r\n aliases: ['Pug', 'Jade', 'jade'],\r\n loader: function () { return import('./pug.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'python',\r\n extensions: ['.py', '.rpy', '.pyw', '.cpy', '.gyp', '.gypi'],\r\n aliases: ['Python', 'py'],\r\n firstLine: '^#!/.*\\\\bpython[0-9.-]*\\\\b',\r\n loader: function () { return import('./python.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'r',\r\n extensions: ['.r', '.rhistory', '.rmd', '.rprofile', '.rt'],\r\n aliases: ['R', 'r'],\r\n loader: function () { return import('./r.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'razor',\r\n extensions: ['.cshtml'],\r\n aliases: ['Razor', 'razor'],\r\n mimetypes: ['text/x-cshtml'],\r\n loader: function () { return import('./razor.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'redis',\r\n extensions: ['.redis'],\r\n aliases: ['redis'],\r\n loader: function () { return import('./redis.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'redshift',\r\n extensions: [],\r\n aliases: ['Redshift', 'redshift'],\r\n loader: function () { return import('./redshift.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'restructuredtext',\r\n extensions: ['.rst'],\r\n aliases: ['reStructuredText', 'restructuredtext'],\r\n loader: function () { return import('./restructuredtext.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'ruby',\r\n extensions: ['.rb', '.rbx', '.rjs', '.gemspec', '.pp'],\r\n filenames: ['rakefile', 'Gemfile'],\r\n aliases: ['Ruby', 'rb'],\r\n loader: function () { return import('./ruby.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'rust',\r\n extensions: ['.rs', '.rlib'],\r\n aliases: ['Rust', 'rust'],\r\n loader: function () { return import('./rust.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'sb',\r\n extensions: ['.sb'],\r\n aliases: ['Small Basic', 'sb'],\r\n loader: function () { return import('./sb.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'scala',\r\n extensions: ['.scala', '.sc', '.sbt'],\r\n aliases: ['Scala', 'scala', 'SBT', 'Sbt', 'sbt', 'Dotty', 'dotty'],\r\n mimetypes: ['text/x-scala-source', 'text/x-scala', 'text/x-sbt', 'text/x-dotty'],\r\n loader: function () { return import('./scala.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'scheme',\r\n extensions: ['.scm', '.ss', '.sch', '.rkt'],\r\n aliases: ['scheme', 'Scheme'],\r\n loader: function () { return import('./scheme.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'scss',\r\n extensions: ['.scss'],\r\n aliases: ['Sass', 'sass', 'scss'],\r\n mimetypes: ['text/x-scss', 'text/scss'],\r\n loader: function () { return import('./scss.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'shell',\r\n extensions: ['.sh', '.bash'],\r\n aliases: ['Shell', 'sh'],\r\n loader: function () { return import('./shell.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'sol',\r\n extensions: ['.sol'],\r\n aliases: ['sol', 'solidity', 'Solidity'],\r\n loader: function () { return import('./solidity.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'aes',\r\n extensions: ['.aes'],\r\n aliases: ['aes', 'sophia', 'Sophia'],\r\n loader: function () { return import('./sophia.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'sql',\r\n extensions: ['.sql'],\r\n aliases: ['SQL'],\r\n loader: function () { return import('./sql.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'st',\r\n extensions: ['.st', '.iecst', '.iecplc', '.lc3lib'],\r\n aliases: ['StructuredText', 'scl', 'stl'],\r\n loader: function () { return import('./st.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'swift',\r\n aliases: ['Swift', 'swift'],\r\n extensions: ['.swift'],\r\n mimetypes: ['text/swift'],\r\n loader: function () { return import('./swift.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'systemverilog',\r\n extensions: ['.sv', '.svh'],\r\n aliases: ['SV', 'sv', 'SystemVerilog', 'systemverilog'],\r\n loader: function () { return import('./systemverilog.js'); }\r\n});\r\nregisterLanguage({\r\n id: 'verilog',\r\n extensions: ['.v', '.vh'],\r\n aliases: ['V', 'v', 'Verilog', 'verilog'],\r\n loader: function () { return import('./systemverilog.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'tcl',\r\n extensions: ['.tcl'],\r\n aliases: ['tcl', 'Tcl', 'tcltk', 'TclTk', 'tcl/tk', 'Tcl/Tk'],\r\n loader: function () { return import('./tcl.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'twig',\r\n extensions: ['.twig'],\r\n aliases: ['Twig', 'twig'],\r\n mimetypes: ['text/x-twig'],\r\n loader: function () { return import('./twig.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'typescript',\r\n extensions: ['.ts', '.tsx'],\r\n aliases: ['TypeScript', 'ts', 'typescript'],\r\n mimetypes: ['text/typescript'],\r\n loader: function () { return import('./typescript.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'vb',\r\n extensions: ['.vb'],\r\n aliases: ['Visual Basic', 'vb'],\r\n loader: function () { return import('./vb.js'); }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerLanguage } from '../_.contribution.js';\r\nregisterLanguage({\r\n id: 'xml',\r\n extensions: [\r\n '.xml',\r\n '.dtd',\r\n '.ascx',\r\n '.csproj',\r\n '.config',\r\n '.wxi',\r\n '.wxl',\r\n '.wxs',\r\n '.xaml',\r\n '.svg',\r\n '.svgz',\r\n '.opf',\r\n '.xsl'\r\n ],\r\n firstLine: '(\\\\<\\\\?xml.*)|(\\\\ ' '.repeat(g1.length))\r\n .replace(/^>/gm, '\\\\>')\r\n .replace(/\\n/g, newlineStyle === 1 /* Break */ ? '\\\\\\n' : '\\n\\n');\r\n return this;\r\n }\r\n appendMarkdown(value) {\r\n this.value += value;\r\n return this;\r\n }\r\n appendCodeblock(langId, code) {\r\n this.value += '\\n```';\r\n this.value += langId;\r\n this.value += '\\n';\r\n this.value += code;\r\n this.value += '\\n```\\n';\r\n return this;\r\n }\r\n}\r\nexport function isEmptyMarkdownString(oneOrMany) {\r\n if (isMarkdownString(oneOrMany)) {\r\n return !oneOrMany.value;\r\n }\r\n else if (Array.isArray(oneOrMany)) {\r\n return oneOrMany.every(isEmptyMarkdownString);\r\n }\r\n else {\r\n return true;\r\n }\r\n}\r\nexport function isMarkdownString(thing) {\r\n if (thing instanceof MarkdownString) {\r\n return true;\r\n }\r\n else if (thing && typeof thing === 'object') {\r\n return typeof thing.value === 'string'\r\n && (typeof thing.isTrusted === 'boolean' || thing.isTrusted === undefined)\r\n && (typeof thing.supportThemeIcons === 'boolean' || thing.supportThemeIcons === undefined);\r\n }\r\n return false;\r\n}\r\nexport function markedStringsEquals(a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n else if (!a || !b) {\r\n return false;\r\n }\r\n else if (Array.isArray(a) && Array.isArray(b)) {\r\n return equals(a, b, markdownStringEqual);\r\n }\r\n else if (isMarkdownString(a) && isMarkdownString(b)) {\r\n return markdownStringEqual(a, b);\r\n }\r\n else {\r\n return false;\r\n }\r\n}\r\nfunction markdownStringEqual(a, b) {\r\n if (a === b) {\r\n return true;\r\n }\r\n else if (!a || !b) {\r\n return false;\r\n }\r\n else {\r\n return a.value === b.value && a.isTrusted === b.isTrusted && a.supportThemeIcons === b.supportThemeIcons;\r\n }\r\n}\r\nexport function escapeMarkdownSyntaxTokens(text) {\r\n // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\r\n return text.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&');\r\n}\r\nexport function removeMarkdownEscapes(text) {\r\n if (!text) {\r\n return text;\r\n }\r\n return text.replace(/\\\\([\\\\`*_{}[\\]()#+\\-.!])/g, '$1');\r\n}\r\nexport function parseHrefAndDimensions(href) {\r\n const dimensions = [];\r\n const splitted = href.split('|').map(s => s.trim());\r\n href = splitted[0];\r\n const parameters = splitted[1];\r\n if (parameters) {\r\n const heightFromParams = /height=(\\d+)/.exec(parameters);\r\n const widthFromParams = /width=(\\d+)/.exec(parameters);\r\n const height = heightFromParams ? heightFromParams[1] : '';\r\n const width = widthFromParams ? widthFromParams[1] : '';\r\n const widthIsFinite = isFinite(parseInt(width));\r\n const heightIsFinite = isFinite(parseInt(height));\r\n if (widthIsFinite) {\r\n dimensions.push(`width=\"${width}\"`);\r\n }\r\n if (heightIsFinite) {\r\n dimensions.push(`height=\"${height}\"`);\r\n }\r\n }\r\n return { href, dimensions };\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport './anchorSelect.css';\r\nimport { EditorAction, registerEditorAction, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { localize } from '../../../nls.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { KeyChord } from '../../../base/common/keyCodes.js';\r\nimport { RawContextKey, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { MarkdownString } from '../../../base/common/htmlContent.js';\r\nimport { alert } from '../../../base/browser/ui/aria/aria.js';\r\nexport const SelectionAnchorSet = new RawContextKey('selectionAnchorSet', false);\r\nlet SelectionAnchorController = class SelectionAnchorController {\r\n constructor(editor, contextKeyService) {\r\n this.editor = editor;\r\n this.selectionAnchorSetContextKey = SelectionAnchorSet.bindTo(contextKeyService);\r\n this.modelChangeListener = editor.onDidChangeModel(() => this.selectionAnchorSetContextKey.reset());\r\n }\r\n static get(editor) {\r\n return editor.getContribution(SelectionAnchorController.ID);\r\n }\r\n setSelectionAnchor() {\r\n if (this.editor.hasModel()) {\r\n const position = this.editor.getPosition();\r\n const previousDecorations = this.decorationId ? [this.decorationId] : [];\r\n const newDecorationId = this.editor.deltaDecorations(previousDecorations, [{\r\n range: Selection.fromPositions(position, position),\r\n options: {\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n hoverMessage: new MarkdownString().appendText(localize('selectionAnchor', \"Selection Anchor\")),\r\n className: 'selection-anchor'\r\n }\r\n }]);\r\n this.decorationId = newDecorationId[0];\r\n this.selectionAnchorSetContextKey.set(!!this.decorationId);\r\n alert(localize('anchorSet', \"Anchor set at {0}:{1}\", position.lineNumber, position.column));\r\n }\r\n }\r\n goToSelectionAnchor() {\r\n if (this.editor.hasModel() && this.decorationId) {\r\n const anchorPosition = this.editor.getModel().getDecorationRange(this.decorationId);\r\n if (anchorPosition) {\r\n this.editor.setPosition(anchorPosition.getStartPosition());\r\n }\r\n }\r\n }\r\n selectFromAnchorToCursor() {\r\n if (this.editor.hasModel() && this.decorationId) {\r\n const start = this.editor.getModel().getDecorationRange(this.decorationId);\r\n if (start) {\r\n const end = this.editor.getPosition();\r\n this.editor.setSelection(Selection.fromPositions(start.getStartPosition(), end));\r\n this.cancelSelectionAnchor();\r\n }\r\n }\r\n }\r\n cancelSelectionAnchor() {\r\n if (this.decorationId) {\r\n this.editor.deltaDecorations([this.decorationId], []);\r\n this.decorationId = undefined;\r\n this.selectionAnchorSetContextKey.set(false);\r\n }\r\n }\r\n dispose() {\r\n this.cancelSelectionAnchor();\r\n this.modelChangeListener.dispose();\r\n }\r\n};\r\nSelectionAnchorController.ID = 'editor.contrib.selectionAnchorController';\r\nSelectionAnchorController = __decorate([\r\n __param(1, IContextKeyService)\r\n], SelectionAnchorController);\r\nclass SetSelectionAnchor extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.setSelectionAnchor',\r\n label: localize('setSelectionAnchor', \"Set Selection Anchor\"),\r\n alias: 'Set Selection Anchor',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 32 /* KEY_B */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const controller = SelectionAnchorController.get(editor);\r\n controller.setSelectionAnchor();\r\n });\r\n }\r\n}\r\nclass GoToSelectionAnchor extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.goToSelectionAnchor',\r\n label: localize('goToSelectionAnchor', \"Go to Selection Anchor\"),\r\n alias: 'Go to Selection Anchor',\r\n precondition: SelectionAnchorSet,\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const controller = SelectionAnchorController.get(editor);\r\n controller.goToSelectionAnchor();\r\n });\r\n }\r\n}\r\nclass SelectFromAnchorToCursor extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.selectFromAnchorToCursor',\r\n label: localize('selectFromAnchorToCursor', \"Select from Anchor to Cursor\"),\r\n alias: 'Select from Anchor to Cursor',\r\n precondition: SelectionAnchorSet,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 41 /* KEY_K */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const controller = SelectionAnchorController.get(editor);\r\n controller.selectFromAnchorToCursor();\r\n });\r\n }\r\n}\r\nclass CancelSelectionAnchor extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.cancelSelectionAnchor',\r\n label: localize('cancelSelectionAnchor', \"Cancel Selection Anchor\"),\r\n alias: 'Cancel Selection Anchor',\r\n precondition: SelectionAnchorSet,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 9 /* Escape */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const controller = SelectionAnchorController.get(editor);\r\n controller.cancelSelectionAnchor();\r\n });\r\n }\r\n}\r\nregisterEditorContribution(SelectionAnchorController.ID, SelectionAnchorController);\r\nregisterEditorAction(SetSelectionAnchor);\r\nregisterEditorAction(GoToSelectionAnchor);\r\nregisterEditorAction(SelectFromAnchorToCursor);\r\nregisterEditorAction(CancelSelectionAnchor);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './bracketMatching.css';\r\nimport * as nls from '../../../nls.js';\r\nimport { RunOnceScheduler } from '../../../base/common/async.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { EditorAction, registerEditorAction, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { OverviewRulerLane } from '../../common/model.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { editorBracketMatchBackground, editorBracketMatchBorder } from '../../common/view/editorColorRegistry.js';\r\nimport { registerColor } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant, themeColorFromId } from '../../../platform/theme/common/themeService.js';\r\nimport { MenuRegistry, MenuId } from '../../../platform/actions/common/actions.js';\r\nconst overviewRulerBracketMatchForeground = registerColor('editorOverviewRuler.bracketMatchForeground', { dark: '#A0A0A0', light: '#A0A0A0', hc: '#A0A0A0' }, nls.localize('overviewRulerBracketMatchForeground', 'Overview ruler marker color for matching brackets.'));\r\nclass JumpToBracketAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.jumpToBracket',\r\n label: nls.localize('smartSelect.jumpBracket', \"Go to Bracket\"),\r\n alias: 'Go to Bracket',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 88 /* US_BACKSLASH */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n let controller = BracketMatchingController.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n controller.jumpToBracket();\r\n }\r\n}\r\nclass SelectToBracketAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.selectToBracket',\r\n label: nls.localize('smartSelect.selectToBracket', \"Select to Bracket\"),\r\n alias: 'Select to Bracket',\r\n precondition: undefined,\r\n description: {\r\n description: `Select to Bracket`,\r\n args: [{\r\n name: 'args',\r\n schema: {\r\n type: 'object',\r\n properties: {\r\n 'selectBrackets': {\r\n type: 'boolean',\r\n default: true\r\n }\r\n },\r\n }\r\n }]\r\n }\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n const controller = BracketMatchingController.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n let selectBrackets = true;\r\n if (args && args.selectBrackets === false) {\r\n selectBrackets = false;\r\n }\r\n controller.selectToBracket(selectBrackets);\r\n }\r\n}\r\nclass BracketsData {\r\n constructor(position, brackets, options) {\r\n this.position = position;\r\n this.brackets = brackets;\r\n this.options = options;\r\n }\r\n}\r\nexport class BracketMatchingController extends Disposable {\r\n constructor(editor) {\r\n super();\r\n this._editor = editor;\r\n this._lastBracketsData = [];\r\n this._lastVersionId = 0;\r\n this._decorations = [];\r\n this._updateBracketsSoon = this._register(new RunOnceScheduler(() => this._updateBrackets(), 50));\r\n this._matchBrackets = this._editor.getOption(58 /* matchBrackets */);\r\n this._updateBracketsSoon.schedule();\r\n this._register(editor.onDidChangeCursorPosition((e) => {\r\n if (this._matchBrackets === 'never') {\r\n // Early exit if nothing needs to be done!\r\n // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;)\r\n return;\r\n }\r\n this._updateBracketsSoon.schedule();\r\n }));\r\n this._register(editor.onDidChangeModelContent((e) => {\r\n this._updateBracketsSoon.schedule();\r\n }));\r\n this._register(editor.onDidChangeModel((e) => {\r\n this._lastBracketsData = [];\r\n this._decorations = [];\r\n this._updateBracketsSoon.schedule();\r\n }));\r\n this._register(editor.onDidChangeModelLanguageConfiguration((e) => {\r\n this._lastBracketsData = [];\r\n this._updateBracketsSoon.schedule();\r\n }));\r\n this._register(editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(58 /* matchBrackets */)) {\r\n this._matchBrackets = this._editor.getOption(58 /* matchBrackets */);\r\n this._decorations = this._editor.deltaDecorations(this._decorations, []);\r\n this._lastBracketsData = [];\r\n this._lastVersionId = 0;\r\n this._updateBracketsSoon.schedule();\r\n }\r\n }));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(BracketMatchingController.ID);\r\n }\r\n jumpToBracket() {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const newSelections = this._editor.getSelections().map(selection => {\r\n const position = selection.getStartPosition();\r\n // find matching brackets if position is on a bracket\r\n const brackets = model.matchBracket(position);\r\n let newCursorPosition = null;\r\n if (brackets) {\r\n if (brackets[0].containsPosition(position)) {\r\n newCursorPosition = brackets[1].getStartPosition();\r\n }\r\n else if (brackets[1].containsPosition(position)) {\r\n newCursorPosition = brackets[0].getStartPosition();\r\n }\r\n }\r\n else {\r\n // find the enclosing brackets if the position isn't on a matching bracket\r\n const enclosingBrackets = model.findEnclosingBrackets(position);\r\n if (enclosingBrackets) {\r\n newCursorPosition = enclosingBrackets[0].getStartPosition();\r\n }\r\n else {\r\n // no enclosing brackets, try the very first next bracket\r\n const nextBracket = model.findNextBracket(position);\r\n if (nextBracket && nextBracket.range) {\r\n newCursorPosition = nextBracket.range.getStartPosition();\r\n }\r\n }\r\n }\r\n if (newCursorPosition) {\r\n return new Selection(newCursorPosition.lineNumber, newCursorPosition.column, newCursorPosition.lineNumber, newCursorPosition.column);\r\n }\r\n return new Selection(position.lineNumber, position.column, position.lineNumber, position.column);\r\n });\r\n this._editor.setSelections(newSelections);\r\n this._editor.revealRange(newSelections[0]);\r\n }\r\n selectToBracket(selectBrackets) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const newSelections = [];\r\n this._editor.getSelections().forEach(selection => {\r\n const position = selection.getStartPosition();\r\n let brackets = model.matchBracket(position);\r\n if (!brackets) {\r\n brackets = model.findEnclosingBrackets(position);\r\n if (!brackets) {\r\n const nextBracket = model.findNextBracket(position);\r\n if (nextBracket && nextBracket.range) {\r\n brackets = model.matchBracket(nextBracket.range.getStartPosition());\r\n }\r\n }\r\n }\r\n let selectFrom = null;\r\n let selectTo = null;\r\n if (brackets) {\r\n brackets.sort(Range.compareRangesUsingStarts);\r\n const [open, close] = brackets;\r\n selectFrom = selectBrackets ? open.getStartPosition() : open.getEndPosition();\r\n selectTo = selectBrackets ? close.getEndPosition() : close.getStartPosition();\r\n }\r\n if (selectFrom && selectTo) {\r\n newSelections.push(new Selection(selectFrom.lineNumber, selectFrom.column, selectTo.lineNumber, selectTo.column));\r\n }\r\n });\r\n if (newSelections.length > 0) {\r\n this._editor.setSelections(newSelections);\r\n this._editor.revealRange(newSelections[0]);\r\n }\r\n }\r\n _updateBrackets() {\r\n if (this._matchBrackets === 'never') {\r\n return;\r\n }\r\n this._recomputeBrackets();\r\n let newDecorations = [], newDecorationsLen = 0;\r\n for (const bracketData of this._lastBracketsData) {\r\n let brackets = bracketData.brackets;\r\n if (brackets) {\r\n newDecorations[newDecorationsLen++] = { range: brackets[0], options: bracketData.options };\r\n newDecorations[newDecorationsLen++] = { range: brackets[1], options: bracketData.options };\r\n }\r\n }\r\n this._decorations = this._editor.deltaDecorations(this._decorations, newDecorations);\r\n }\r\n _recomputeBrackets() {\r\n if (!this._editor.hasModel()) {\r\n // no model => no brackets!\r\n this._lastBracketsData = [];\r\n this._lastVersionId = 0;\r\n return;\r\n }\r\n const selections = this._editor.getSelections();\r\n if (selections.length > 100) {\r\n // no bracket matching for high numbers of selections\r\n this._lastBracketsData = [];\r\n this._lastVersionId = 0;\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const versionId = model.getVersionId();\r\n let previousData = [];\r\n if (this._lastVersionId === versionId) {\r\n // use the previous data only if the model is at the same version id\r\n previousData = this._lastBracketsData;\r\n }\r\n let positions = [], positionsLen = 0;\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n let selection = selections[i];\r\n if (selection.isEmpty()) {\r\n // will bracket match a cursor only if the selection is collapsed\r\n positions[positionsLen++] = selection.getStartPosition();\r\n }\r\n }\r\n // sort positions for `previousData` cache hits\r\n if (positions.length > 1) {\r\n positions.sort(Position.compare);\r\n }\r\n let newData = [], newDataLen = 0;\r\n let previousIndex = 0, previousLen = previousData.length;\r\n for (let i = 0, len = positions.length; i < len; i++) {\r\n let position = positions[i];\r\n while (previousIndex < previousLen && previousData[previousIndex].position.isBefore(position)) {\r\n previousIndex++;\r\n }\r\n if (previousIndex < previousLen && previousData[previousIndex].position.equals(position)) {\r\n newData[newDataLen++] = previousData[previousIndex];\r\n }\r\n else {\r\n let brackets = model.matchBracket(position);\r\n let options = BracketMatchingController._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;\r\n if (!brackets && this._matchBrackets === 'always') {\r\n brackets = model.findEnclosingBrackets(position, 20 /* give at most 20ms to compute */);\r\n options = BracketMatchingController._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER;\r\n }\r\n newData[newDataLen++] = new BracketsData(position, brackets, options);\r\n }\r\n }\r\n this._lastBracketsData = newData;\r\n this._lastVersionId = versionId;\r\n }\r\n}\r\nBracketMatchingController.ID = 'editor.contrib.bracketMatchingController';\r\nBracketMatchingController._DECORATION_OPTIONS_WITH_OVERVIEW_RULER = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'bracket-match',\r\n overviewRuler: {\r\n color: themeColorFromId(overviewRulerBracketMatchForeground),\r\n position: OverviewRulerLane.Center\r\n }\r\n});\r\nBracketMatchingController._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'bracket-match'\r\n});\r\nregisterEditorContribution(BracketMatchingController.ID, BracketMatchingController);\r\nregisterEditorAction(SelectToBracketAction);\r\nregisterEditorAction(JumpToBracketAction);\r\nregisterThemingParticipant((theme, collector) => {\r\n const bracketMatchBackground = theme.getColor(editorBracketMatchBackground);\r\n if (bracketMatchBackground) {\r\n collector.addRule(`.monaco-editor .bracket-match { background-color: ${bracketMatchBackground}; }`);\r\n }\r\n const bracketMatchBorder = theme.getColor(editorBracketMatchBorder);\r\n if (bracketMatchBorder) {\r\n collector.addRule(`.monaco-editor .bracket-match { border: 1px solid ${bracketMatchBorder}; }`);\r\n }\r\n});\r\n// Go to menu\r\nMenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {\r\n group: '5_infile_nav',\r\n command: {\r\n id: 'editor.action.jumpToBracket',\r\n title: nls.localize({ key: 'miGoToBracket', comment: ['&& denotes a mnemonic'] }, \"Go to &&Bracket\")\r\n },\r\n order: 2\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nexport class MoveCaretCommand {\r\n constructor(selection, isMovingLeft) {\r\n this._selection = selection;\r\n this._isMovingLeft = isMovingLeft;\r\n }\r\n getEditOperations(model, builder) {\r\n if (this._selection.startLineNumber !== this._selection.endLineNumber || this._selection.isEmpty()) {\r\n return;\r\n }\r\n const lineNumber = this._selection.startLineNumber;\r\n const startColumn = this._selection.startColumn;\r\n const endColumn = this._selection.endColumn;\r\n if (this._isMovingLeft && startColumn === 1) {\r\n return;\r\n }\r\n if (!this._isMovingLeft && endColumn === model.getLineMaxColumn(lineNumber)) {\r\n return;\r\n }\r\n if (this._isMovingLeft) {\r\n const rangeBefore = new Range(lineNumber, startColumn - 1, lineNumber, startColumn);\r\n const charBefore = model.getValueInRange(rangeBefore);\r\n builder.addEditOperation(rangeBefore, null);\r\n builder.addEditOperation(new Range(lineNumber, endColumn, lineNumber, endColumn), charBefore);\r\n }\r\n else {\r\n const rangeAfter = new Range(lineNumber, endColumn, lineNumber, endColumn + 1);\r\n const charAfter = model.getValueInRange(rangeAfter);\r\n builder.addEditOperation(rangeAfter, null);\r\n builder.addEditOperation(new Range(lineNumber, startColumn, lineNumber, startColumn), charAfter);\r\n }\r\n }\r\n computeCursorState(model, helper) {\r\n if (this._isMovingLeft) {\r\n return new Selection(this._selection.startLineNumber, this._selection.startColumn - 1, this._selection.endLineNumber, this._selection.endColumn - 1);\r\n }\r\n else {\r\n return new Selection(this._selection.startLineNumber, this._selection.startColumn + 1, this._selection.endLineNumber, this._selection.endColumn + 1);\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../../nls.js';\r\nimport { EditorAction, registerEditorAction } from '../../browser/editorExtensions.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { MoveCaretCommand } from './moveCaretCommand.js';\r\nclass MoveCaretAction extends EditorAction {\r\n constructor(left, opts) {\r\n super(opts);\r\n this.left = left;\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n let commands = [];\r\n let selections = editor.getSelections();\r\n for (const selection of selections) {\r\n commands.push(new MoveCaretCommand(selection, this.left));\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass MoveCaretLeftAction extends MoveCaretAction {\r\n constructor() {\r\n super(true, {\r\n id: 'editor.action.moveCarretLeftAction',\r\n label: nls.localize('caret.moveLeft', \"Move Selected Text Left\"),\r\n alias: 'Move Selected Text Left',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nclass MoveCaretRightAction extends MoveCaretAction {\r\n constructor() {\r\n super(false, {\r\n id: 'editor.action.moveCarretRightAction',\r\n label: nls.localize('caret.moveRight', \"Move Selected Text Right\"),\r\n alias: 'Move Selected Text Right',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nregisterEditorAction(MoveCaretLeftAction);\r\nregisterEditorAction(MoveCaretRightAction);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../../nls.js';\r\nimport { EditorAction, registerEditorAction } from '../../browser/editorExtensions.js';\r\nimport { ReplaceCommand } from '../../common/commands/replaceCommand.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { MoveOperations } from '../../common/controller/cursorMoveOperations.js';\r\nclass TransposeLettersAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.transposeLetters',\r\n label: nls.localize('transposeLetters.label', \"Transpose Letters\"),\r\n alias: 'Transpose Letters',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: {\r\n primary: 256 /* WinCtrl */ | 50 /* KEY_T */\r\n },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n let model = editor.getModel();\r\n let commands = [];\r\n let selections = editor.getSelections();\r\n for (let selection of selections) {\r\n if (!selection.isEmpty()) {\r\n continue;\r\n }\r\n let lineNumber = selection.startLineNumber;\r\n let column = selection.startColumn;\r\n let lastColumn = model.getLineMaxColumn(lineNumber);\r\n if (lineNumber === 1 && (column === 1 || (column === 2 && lastColumn === 2))) {\r\n // at beginning of file, nothing to do\r\n continue;\r\n }\r\n // handle special case: when at end of line, transpose left two chars\r\n // otherwise, transpose left and right chars\r\n let endPosition = (column === lastColumn) ?\r\n selection.getPosition() :\r\n MoveOperations.rightPosition(model, selection.getPosition().lineNumber, selection.getPosition().column);\r\n let middlePosition = MoveOperations.leftPosition(model, endPosition.lineNumber, endPosition.column);\r\n let beginPosition = MoveOperations.leftPosition(model, middlePosition.lineNumber, middlePosition.column);\r\n let leftChar = model.getValueInRange(Range.fromPositions(beginPosition, middlePosition));\r\n let rightChar = model.getValueInRange(Range.fromPositions(middlePosition, endPosition));\r\n let replaceRange = Range.fromPositions(beginPosition, endPosition);\r\n commands.push(new ReplaceCommand(replaceRange, rightChar + leftChar));\r\n }\r\n if (commands.length > 0) {\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n }\r\n}\r\nregisterEditorAction(TransposeLettersAction);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport * as browser from '../../../base/browser/browser.js';\r\nimport * as platform from '../../../base/common/platform.js';\r\nimport { CopyOptions, InMemoryClipboardMetadataManager } from '../../browser/controller/textAreaInput.js';\r\nimport { EditorAction, registerEditorAction, MultiCommand } from '../../browser/editorExtensions.js';\r\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { MenuId } from '../../../platform/actions/common/actions.js';\r\nimport { IClipboardService } from '../../../platform/clipboard/common/clipboardService.js';\r\nconst CLIPBOARD_CONTEXT_MENU_GROUP = '9_cutcopypaste';\r\nconst supportsCut = (platform.isNative || document.queryCommandSupported('cut'));\r\nconst supportsCopy = (platform.isNative || document.queryCommandSupported('copy'));\r\n// IE and Edge have trouble with setting html content in clipboard\r\nconst supportsCopyWithSyntaxHighlighting = (supportsCopy && !browser.isEdgeLegacy);\r\n// Firefox only supports navigator.clipboard.readText() in browser extensions.\r\n// See https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText#Browser_compatibility\r\n// When loading over http, navigator.clipboard can be undefined. See https://github.com/microsoft/monaco-editor/issues/2313\r\nconst supportsPaste = (typeof navigator.clipboard === 'undefined' || browser.isFirefox) ? document.queryCommandSupported('paste') : true;\r\nfunction registerCommand(command) {\r\n command.register();\r\n return command;\r\n}\r\nexport const CutAction = supportsCut ? registerCommand(new MultiCommand({\r\n id: 'editor.action.clipboardCutAction',\r\n precondition: undefined,\r\n kbOpts: (\r\n // Do not bind cut keybindings in the browser,\r\n // since browsers do that for us and it avoids security prompts\r\n platform.isNative ? {\r\n primary: 2048 /* CtrlCmd */ | 54 /* KEY_X */,\r\n win: { primary: 2048 /* CtrlCmd */ | 54 /* KEY_X */, secondary: [1024 /* Shift */ | 20 /* Delete */] },\r\n weight: 100 /* EditorContrib */\r\n } : undefined),\r\n menuOpts: [{\r\n menuId: MenuId.MenubarEditMenu,\r\n group: '2_ccp',\r\n title: nls.localize({ key: 'miCut', comment: ['&& denotes a mnemonic'] }, \"Cu&&t\"),\r\n order: 1\r\n }, {\r\n menuId: MenuId.EditorContext,\r\n group: CLIPBOARD_CONTEXT_MENU_GROUP,\r\n title: nls.localize('actions.clipboard.cutLabel', \"Cut\"),\r\n when: EditorContextKeys.writable,\r\n order: 1,\r\n }, {\r\n menuId: MenuId.CommandPalette,\r\n group: '',\r\n title: nls.localize('actions.clipboard.cutLabel', \"Cut\"),\r\n order: 1\r\n }]\r\n})) : undefined;\r\nexport const CopyAction = supportsCopy ? registerCommand(new MultiCommand({\r\n id: 'editor.action.clipboardCopyAction',\r\n precondition: undefined,\r\n kbOpts: (\r\n // Do not bind copy keybindings in the browser,\r\n // since browsers do that for us and it avoids security prompts\r\n platform.isNative ? {\r\n primary: 2048 /* CtrlCmd */ | 33 /* KEY_C */,\r\n win: { primary: 2048 /* CtrlCmd */ | 33 /* KEY_C */, secondary: [2048 /* CtrlCmd */ | 19 /* Insert */] },\r\n weight: 100 /* EditorContrib */\r\n } : undefined),\r\n menuOpts: [{\r\n menuId: MenuId.MenubarEditMenu,\r\n group: '2_ccp',\r\n title: nls.localize({ key: 'miCopy', comment: ['&& denotes a mnemonic'] }, \"&&Copy\"),\r\n order: 2\r\n }, {\r\n menuId: MenuId.EditorContext,\r\n group: CLIPBOARD_CONTEXT_MENU_GROUP,\r\n title: nls.localize('actions.clipboard.copyLabel', \"Copy\"),\r\n order: 2,\r\n }, {\r\n menuId: MenuId.CommandPalette,\r\n group: '',\r\n title: nls.localize('actions.clipboard.copyLabel', \"Copy\"),\r\n order: 1\r\n }]\r\n})) : undefined;\r\nexport const PasteAction = supportsPaste ? registerCommand(new MultiCommand({\r\n id: 'editor.action.clipboardPasteAction',\r\n precondition: undefined,\r\n kbOpts: (\r\n // Do not bind paste keybindings in the browser,\r\n // since browsers do that for us and it avoids security prompts\r\n platform.isNative ? {\r\n primary: 2048 /* CtrlCmd */ | 52 /* KEY_V */,\r\n win: { primary: 2048 /* CtrlCmd */ | 52 /* KEY_V */, secondary: [1024 /* Shift */ | 19 /* Insert */] },\r\n linux: { primary: 2048 /* CtrlCmd */ | 52 /* KEY_V */, secondary: [1024 /* Shift */ | 19 /* Insert */] },\r\n weight: 100 /* EditorContrib */\r\n } : undefined),\r\n menuOpts: [{\r\n menuId: MenuId.MenubarEditMenu,\r\n group: '2_ccp',\r\n title: nls.localize({ key: 'miPaste', comment: ['&& denotes a mnemonic'] }, \"&&Paste\"),\r\n order: 3\r\n }, {\r\n menuId: MenuId.EditorContext,\r\n group: CLIPBOARD_CONTEXT_MENU_GROUP,\r\n title: nls.localize('actions.clipboard.pasteLabel', \"Paste\"),\r\n when: EditorContextKeys.writable,\r\n order: 3,\r\n }, {\r\n menuId: MenuId.CommandPalette,\r\n group: '',\r\n title: nls.localize('actions.clipboard.pasteLabel', \"Paste\"),\r\n order: 1\r\n }]\r\n})) : undefined;\r\nclass ExecCommandCopyWithSyntaxHighlightingAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.clipboardCopyWithSyntaxHighlightingAction',\r\n label: nls.localize('actions.clipboard.copyWithSyntaxHighlightingLabel', \"Copy With Syntax Highlighting\"),\r\n alias: 'Copy With Syntax Highlighting',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const emptySelectionClipboard = editor.getOption(28 /* emptySelectionClipboard */);\r\n if (!emptySelectionClipboard && editor.getSelection().isEmpty()) {\r\n return;\r\n }\r\n CopyOptions.forceCopyWithSyntaxHighlighting = true;\r\n editor.focus();\r\n document.execCommand('copy');\r\n CopyOptions.forceCopyWithSyntaxHighlighting = false;\r\n }\r\n}\r\nfunction registerExecCommandImpl(target, browserCommand) {\r\n if (!target) {\r\n return;\r\n }\r\n // 1. handle case when focus is in editor.\r\n target.addImplementation(10000, (accessor, args) => {\r\n // Only if editor text focus (i.e. not if editor has widget focus).\r\n const focusedEditor = accessor.get(ICodeEditorService).getFocusedCodeEditor();\r\n if (focusedEditor && focusedEditor.hasTextFocus()) {\r\n // Do not execute if there is no selection and empty selection clipboard is off\r\n const emptySelectionClipboard = focusedEditor.getOption(28 /* emptySelectionClipboard */);\r\n const selection = focusedEditor.getSelection();\r\n if (selection && selection.isEmpty() && !emptySelectionClipboard) {\r\n return true;\r\n }\r\n document.execCommand(browserCommand);\r\n return true;\r\n }\r\n return false;\r\n });\r\n // 2. (default) handle case when focus is somewhere else.\r\n target.addImplementation(0, (accessor, args) => {\r\n document.execCommand(browserCommand);\r\n return true;\r\n });\r\n}\r\nregisterExecCommandImpl(CutAction, 'cut');\r\nregisterExecCommandImpl(CopyAction, 'copy');\r\nif (PasteAction) {\r\n // 1. Paste: handle case when focus is in editor.\r\n PasteAction.addImplementation(10000, (accessor, args) => {\r\n const codeEditorService = accessor.get(ICodeEditorService);\r\n const clipboardService = accessor.get(IClipboardService);\r\n // Only if editor text focus (i.e. not if editor has widget focus).\r\n const focusedEditor = codeEditorService.getFocusedCodeEditor();\r\n if (focusedEditor && focusedEditor.hasTextFocus()) {\r\n const result = document.execCommand('paste');\r\n // Use the clipboard service if document.execCommand('paste') was not successful\r\n if (!result && platform.isWeb) {\r\n (() => __awaiter(void 0, void 0, void 0, function* () {\r\n const clipboardText = yield clipboardService.readText();\r\n if (clipboardText !== '') {\r\n const metadata = InMemoryClipboardMetadataManager.INSTANCE.get(clipboardText);\r\n let pasteOnNewLine = false;\r\n let multicursorText = null;\r\n let mode = null;\r\n if (metadata) {\r\n pasteOnNewLine = (focusedEditor.getOption(28 /* emptySelectionClipboard */) && !!metadata.isFromEmptySelection);\r\n multicursorText = (typeof metadata.multicursorText !== 'undefined' ? metadata.multicursorText : null);\r\n mode = metadata.mode;\r\n }\r\n focusedEditor.trigger('keyboard', \"paste\" /* Paste */, {\r\n text: clipboardText,\r\n pasteOnNewLine,\r\n multicursorText,\r\n mode\r\n });\r\n }\r\n }))();\r\n return true;\r\n }\r\n return true;\r\n }\r\n return false;\r\n });\r\n // 2. Paste: (default) handle case when focus is somewhere else.\r\n PasteAction.addImplementation(0, (accessor, args) => {\r\n document.execCommand('paste');\r\n return true;\r\n });\r\n}\r\nif (supportsCopyWithSyntaxHighlighting) {\r\n registerEditorAction(ExecCommandCopyWithSyntaxHighlightingAction);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport class Lazy {\r\n constructor(executor) {\r\n this.executor = executor;\r\n this._didRun = false;\r\n }\r\n /**\r\n * Get the wrapped value.\r\n *\r\n * This will force evaluation of the lazy value if it has not been resolved yet. Lazy values are only\r\n * resolved once. `getValue` will re-throw exceptions that are hit while resolving the value\r\n */\r\n getValue() {\r\n if (!this._didRun) {\r\n try {\r\n this._value = this.executor();\r\n }\r\n catch (err) {\r\n this._error = err;\r\n }\r\n finally {\r\n this._didRun = true;\r\n }\r\n }\r\n if (this._error) {\r\n throw this._error;\r\n }\r\n return this._value;\r\n }\r\n /**\r\n * Get the wrapped value without forcing evaluation.\r\n */\r\n get rawValue() { return this._value; }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport class CodeActionKind {\r\n constructor(value) {\r\n this.value = value;\r\n }\r\n equals(other) {\r\n return this.value === other.value;\r\n }\r\n contains(other) {\r\n return this.equals(other) || this.value === '' || other.value.startsWith(this.value + CodeActionKind.sep);\r\n }\r\n intersects(other) {\r\n return this.contains(other) || other.contains(this);\r\n }\r\n append(part) {\r\n return new CodeActionKind(this.value + CodeActionKind.sep + part);\r\n }\r\n}\r\nCodeActionKind.sep = '.';\r\nCodeActionKind.None = new CodeActionKind('@@none@@'); // Special code action that contains nothing\r\nCodeActionKind.Empty = new CodeActionKind('');\r\nCodeActionKind.QuickFix = new CodeActionKind('quickfix');\r\nCodeActionKind.Refactor = new CodeActionKind('refactor');\r\nCodeActionKind.Source = new CodeActionKind('source');\r\nCodeActionKind.SourceOrganizeImports = CodeActionKind.Source.append('organizeImports');\r\nCodeActionKind.SourceFixAll = CodeActionKind.Source.append('fixAll');\r\nexport function mayIncludeActionsOfKind(filter, providedKind) {\r\n // A provided kind may be a subset or superset of our filtered kind.\r\n if (filter.include && !filter.include.intersects(providedKind)) {\r\n return false;\r\n }\r\n if (filter.excludes) {\r\n if (filter.excludes.some(exclude => excludesAction(providedKind, exclude, filter.include))) {\r\n return false;\r\n }\r\n }\r\n // Don't return source actions unless they are explicitly requested\r\n if (!filter.includeSourceActions && CodeActionKind.Source.contains(providedKind)) {\r\n return false;\r\n }\r\n return true;\r\n}\r\nexport function filtersAction(filter, action) {\r\n const actionKind = action.kind ? new CodeActionKind(action.kind) : undefined;\r\n // Filter out actions by kind\r\n if (filter.include) {\r\n if (!actionKind || !filter.include.contains(actionKind)) {\r\n return false;\r\n }\r\n }\r\n if (filter.excludes) {\r\n if (actionKind && filter.excludes.some(exclude => excludesAction(actionKind, exclude, filter.include))) {\r\n return false;\r\n }\r\n }\r\n // Don't return source actions unless they are explicitly requested\r\n if (!filter.includeSourceActions) {\r\n if (actionKind && CodeActionKind.Source.contains(actionKind)) {\r\n return false;\r\n }\r\n }\r\n if (filter.onlyIncludePreferredActions) {\r\n if (!action.isPreferred) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nfunction excludesAction(providedKind, exclude, include) {\r\n if (!exclude.contains(providedKind)) {\r\n return false;\r\n }\r\n if (include && exclude.contains(include)) {\r\n // The include is more specific, don't filter out\r\n return false;\r\n }\r\n return true;\r\n}\r\nexport class CodeActionCommandArgs {\r\n constructor(kind, apply, preferred) {\r\n this.kind = kind;\r\n this.apply = apply;\r\n this.preferred = preferred;\r\n }\r\n static fromUser(arg, defaults) {\r\n if (!arg || typeof arg !== 'object') {\r\n return new CodeActionCommandArgs(defaults.kind, defaults.apply, false);\r\n }\r\n return new CodeActionCommandArgs(CodeActionCommandArgs.getKindFromUser(arg, defaults.kind), CodeActionCommandArgs.getApplyFromUser(arg, defaults.apply), CodeActionCommandArgs.getPreferredUser(arg));\r\n }\r\n static getApplyFromUser(arg, defaultAutoApply) {\r\n switch (typeof arg.apply === 'string' ? arg.apply.toLowerCase() : '') {\r\n case 'first': return \"first\" /* First */;\r\n case 'never': return \"never\" /* Never */;\r\n case 'ifsingle': return \"ifSingle\" /* IfSingle */;\r\n default: return defaultAutoApply;\r\n }\r\n }\r\n static getKindFromUser(arg, defaultKind) {\r\n return typeof arg.kind === 'string'\r\n ? new CodeActionKind(arg.kind)\r\n : defaultKind;\r\n }\r\n static getPreferredUser(arg) {\r\n return typeof arg.preferred === 'boolean'\r\n ? arg.preferred\r\n : false;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { equals, flatten, isNonEmptyArray, mergeSort, coalesce } from '../../../base/common/arrays.js';\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { illegalArgument, isPromiseCanceledError, onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport { Disposable, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { TextModelCancellationTokenSource } from '../../browser/core/editorState.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport * as modes from '../../common/modes.js';\r\nimport { IModelService } from '../../common/services/modelService.js';\r\nimport { CodeActionKind, filtersAction, mayIncludeActionsOfKind } from './types.js';\r\nimport { Progress } from '../../../platform/progress/common/progress.js';\r\nimport { CommandsRegistry } from '../../../platform/commands/common/commands.js';\r\nexport const codeActionCommandId = 'editor.action.codeAction';\r\nexport const refactorCommandId = 'editor.action.refactor';\r\nexport const sourceActionCommandId = 'editor.action.sourceAction';\r\nexport const organizeImportsCommandId = 'editor.action.organizeImports';\r\nexport const fixAllCommandId = 'editor.action.fixAll';\r\nexport class CodeActionItem {\r\n constructor(action, provider) {\r\n this.action = action;\r\n this.provider = provider;\r\n }\r\n resolve(token) {\r\n var _a;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (((_a = this.provider) === null || _a === void 0 ? void 0 : _a.resolveCodeAction) && !this.action.edit) {\r\n let action;\r\n try {\r\n action = yield this.provider.resolveCodeAction(this.action, token);\r\n }\r\n catch (err) {\r\n onUnexpectedExternalError(err);\r\n }\r\n if (action) {\r\n this.action.edit = action.edit;\r\n }\r\n }\r\n return this;\r\n });\r\n }\r\n}\r\nclass ManagedCodeActionSet extends Disposable {\r\n constructor(actions, documentation, disposables) {\r\n super();\r\n this.documentation = documentation;\r\n this._register(disposables);\r\n this.allActions = mergeSort([...actions], ManagedCodeActionSet.codeActionsComparator);\r\n this.validActions = this.allActions.filter(({ action }) => !action.disabled);\r\n }\r\n static codeActionsComparator({ action: a }, { action: b }) {\r\n if (a.isPreferred && !b.isPreferred) {\r\n return -1;\r\n }\r\n else if (!a.isPreferred && b.isPreferred) {\r\n return 1;\r\n }\r\n if (isNonEmptyArray(a.diagnostics)) {\r\n if (isNonEmptyArray(b.diagnostics)) {\r\n return a.diagnostics[0].message.localeCompare(b.diagnostics[0].message);\r\n }\r\n else {\r\n return -1;\r\n }\r\n }\r\n else if (isNonEmptyArray(b.diagnostics)) {\r\n return 1;\r\n }\r\n else {\r\n return 0; // both have no diagnostics\r\n }\r\n }\r\n get hasAutoFix() {\r\n return this.validActions.some(({ action: fix }) => !!fix.kind && CodeActionKind.QuickFix.contains(new CodeActionKind(fix.kind)) && !!fix.isPreferred);\r\n }\r\n}\r\nconst emptyCodeActionsResponse = { actions: [], documentation: undefined };\r\nexport function getCodeActions(model, rangeOrSelection, trigger, progress, token) {\r\n var _a;\r\n const filter = trigger.filter || {};\r\n const codeActionContext = {\r\n only: (_a = filter.include) === null || _a === void 0 ? void 0 : _a.value,\r\n trigger: trigger.type,\r\n };\r\n const cts = new TextModelCancellationTokenSource(model, token);\r\n const providers = getCodeActionProviders(model, filter);\r\n const disposables = new DisposableStore();\r\n const promises = providers.map((provider) => __awaiter(this, void 0, void 0, function* () {\r\n try {\r\n progress.report(provider);\r\n const providedCodeActions = yield provider.provideCodeActions(model, rangeOrSelection, codeActionContext, cts.token);\r\n if (providedCodeActions) {\r\n disposables.add(providedCodeActions);\r\n }\r\n if (cts.token.isCancellationRequested) {\r\n return emptyCodeActionsResponse;\r\n }\r\n const filteredActions = ((providedCodeActions === null || providedCodeActions === void 0 ? void 0 : providedCodeActions.actions) || []).filter(action => action && filtersAction(filter, action));\r\n const documentation = getDocumentation(provider, filteredActions, filter.include);\r\n return {\r\n actions: filteredActions.map(action => new CodeActionItem(action, provider)),\r\n documentation\r\n };\r\n }\r\n catch (err) {\r\n if (isPromiseCanceledError(err)) {\r\n throw err;\r\n }\r\n onUnexpectedExternalError(err);\r\n return emptyCodeActionsResponse;\r\n }\r\n }));\r\n const listener = modes.CodeActionProviderRegistry.onDidChange(() => {\r\n const newProviders = modes.CodeActionProviderRegistry.all(model);\r\n if (!equals(newProviders, providers)) {\r\n cts.cancel();\r\n }\r\n });\r\n return Promise.all(promises).then(actions => {\r\n const allActions = flatten(actions.map(x => x.actions));\r\n const allDocumentation = coalesce(actions.map(x => x.documentation));\r\n return new ManagedCodeActionSet(allActions, allDocumentation, disposables);\r\n })\r\n .finally(() => {\r\n listener.dispose();\r\n cts.dispose();\r\n });\r\n}\r\nfunction getCodeActionProviders(model, filter) {\r\n return modes.CodeActionProviderRegistry.all(model)\r\n // Don't include providers that we know will not return code actions of interest\r\n .filter(provider => {\r\n if (!provider.providedCodeActionKinds) {\r\n // We don't know what type of actions this provider will return.\r\n return true;\r\n }\r\n return provider.providedCodeActionKinds.some(kind => mayIncludeActionsOfKind(filter, new CodeActionKind(kind)));\r\n });\r\n}\r\nfunction getDocumentation(provider, providedCodeActions, only) {\r\n if (!provider.documentation) {\r\n return undefined;\r\n }\r\n const documentation = provider.documentation.map(entry => ({ kind: new CodeActionKind(entry.kind), command: entry.command }));\r\n if (only) {\r\n let currentBest;\r\n for (const entry of documentation) {\r\n if (entry.kind.contains(only)) {\r\n if (!currentBest) {\r\n currentBest = entry;\r\n }\r\n else {\r\n // Take best match\r\n if (currentBest.kind.contains(entry.kind)) {\r\n currentBest = entry;\r\n }\r\n }\r\n }\r\n }\r\n if (currentBest) {\r\n return currentBest === null || currentBest === void 0 ? void 0 : currentBest.command;\r\n }\r\n }\r\n // Otherwise, check to see if any of the provided actions match.\r\n for (const action of providedCodeActions) {\r\n if (!action.kind) {\r\n continue;\r\n }\r\n for (const entry of documentation) {\r\n if (entry.kind.contains(new CodeActionKind(action.kind))) {\r\n return entry.command;\r\n }\r\n }\r\n }\r\n return undefined;\r\n}\r\nCommandsRegistry.registerCommand('_executeCodeActionProvider', function (accessor, ...args) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const [resource, rangeOrSelection, kind, itemResolveCount] = args;\r\n if (!(resource instanceof URI)) {\r\n throw illegalArgument();\r\n }\r\n const model = accessor.get(IModelService).getModel(resource);\r\n if (!model) {\r\n throw illegalArgument();\r\n }\r\n const validatedRangeOrSelection = Selection.isISelection(rangeOrSelection)\r\n ? Selection.liftSelection(rangeOrSelection)\r\n : Range.isIRange(rangeOrSelection)\r\n ? model.validateRange(rangeOrSelection)\r\n : undefined;\r\n if (!validatedRangeOrSelection) {\r\n throw illegalArgument();\r\n }\r\n const codeActionSet = yield getCodeActions(model, validatedRangeOrSelection, { type: 2 /* Manual */, filter: { includeSourceActions: true, include: kind && kind.value ? new CodeActionKind(kind.value) : undefined } }, Progress.None, CancellationToken.None);\r\n const resolving = [];\r\n const resolveCount = Math.min(codeActionSet.validActions.length, typeof itemResolveCount === 'number' ? itemResolveCount : 0);\r\n for (let i = 0; i < resolveCount; i++) {\r\n resolving.push(codeActionSet.validActions[i].resolve(CancellationToken.None));\r\n }\r\n try {\r\n yield Promise.all(resolving);\r\n return codeActionSet.validActions.map(item => item.action);\r\n }\r\n finally {\r\n setTimeout(() => codeActionSet.dispose(), 100);\r\n }\r\n });\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport './messageController.css';\r\nimport * as nls from '../../../nls.js';\r\nimport { TimeoutTimer } from '../../../base/common/async.js';\r\nimport { DisposableStore, MutableDisposable } from '../../../base/common/lifecycle.js';\r\nimport { alert } from '../../../base/browser/ui/aria/aria.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { registerEditorContribution, EditorCommand, registerEditorCommand } from '../../browser/editorExtensions.js';\r\nimport { IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport { inputValidationInfoBorder, inputValidationInfoBackground, inputValidationInfoForeground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { ColorScheme } from '../../../platform/theme/common/theme.js';\r\nlet MessageController = class MessageController {\r\n constructor(editor, contextKeyService) {\r\n this._messageWidget = new MutableDisposable();\r\n this._messageListeners = new DisposableStore();\r\n this._editor = editor;\r\n this._visible = MessageController.MESSAGE_VISIBLE.bindTo(contextKeyService);\r\n this._editorListener = this._editor.onDidAttemptReadOnlyEdit(() => this._onDidAttemptReadOnlyEdit());\r\n }\r\n static get(editor) {\r\n return editor.getContribution(MessageController.ID);\r\n }\r\n dispose() {\r\n this._editorListener.dispose();\r\n this._messageListeners.dispose();\r\n this._messageWidget.dispose();\r\n this._visible.reset();\r\n }\r\n showMessage(message, position) {\r\n alert(message);\r\n this._visible.set(true);\r\n this._messageWidget.clear();\r\n this._messageListeners.clear();\r\n this._messageWidget.value = new MessageWidget(this._editor, position, message);\r\n // close on blur, cursor, model change, dispose\r\n this._messageListeners.add(this._editor.onDidBlurEditorText(() => this.closeMessage()));\r\n this._messageListeners.add(this._editor.onDidChangeCursorPosition(() => this.closeMessage()));\r\n this._messageListeners.add(this._editor.onDidDispose(() => this.closeMessage()));\r\n this._messageListeners.add(this._editor.onDidChangeModel(() => this.closeMessage()));\r\n // 3sec\r\n this._messageListeners.add(new TimeoutTimer(() => this.closeMessage(), 3000));\r\n // close on mouse move\r\n let bounds;\r\n this._messageListeners.add(this._editor.onMouseMove(e => {\r\n // outside the text area\r\n if (!e.target.position) {\r\n return;\r\n }\r\n if (!bounds) {\r\n // define bounding box around position and first mouse occurance\r\n bounds = new Range(position.lineNumber - 3, 1, e.target.position.lineNumber + 3, 1);\r\n }\r\n else if (!bounds.containsPosition(e.target.position)) {\r\n // check if position is still in bounds\r\n this.closeMessage();\r\n }\r\n }));\r\n }\r\n closeMessage() {\r\n this._visible.reset();\r\n this._messageListeners.clear();\r\n if (this._messageWidget.value) {\r\n this._messageListeners.add(MessageWidget.fadeOut(this._messageWidget.value));\r\n }\r\n }\r\n _onDidAttemptReadOnlyEdit() {\r\n if (this._editor.hasModel()) {\r\n this.showMessage(nls.localize('editor.readonly', \"Cannot edit in read-only editor\"), this._editor.getPosition());\r\n }\r\n }\r\n};\r\nMessageController.ID = 'editor.contrib.messageController';\r\nMessageController.MESSAGE_VISIBLE = new RawContextKey('messageVisible', false);\r\nMessageController = __decorate([\r\n __param(1, IContextKeyService)\r\n], MessageController);\r\nexport { MessageController };\r\nconst MessageCommand = EditorCommand.bindToContribution(MessageController.get);\r\nregisterEditorCommand(new MessageCommand({\r\n id: 'leaveEditorMessage',\r\n precondition: MessageController.MESSAGE_VISIBLE,\r\n handler: c => c.closeMessage(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 30,\r\n primary: 9 /* Escape */\r\n }\r\n}));\r\nclass MessageWidget {\r\n constructor(editor, { lineNumber, column }, text) {\r\n // Editor.IContentWidget.allowEditorOverflow\r\n this.allowEditorOverflow = true;\r\n this.suppressMouseDown = false;\r\n this._editor = editor;\r\n this._editor.revealLinesInCenterIfOutsideViewport(lineNumber, lineNumber, 0 /* Smooth */);\r\n this._position = { lineNumber, column: column - 1 };\r\n this._domNode = document.createElement('div');\r\n this._domNode.classList.add('monaco-editor-overlaymessage');\r\n const anchorTop = document.createElement('div');\r\n anchorTop.classList.add('anchor', 'top');\r\n this._domNode.appendChild(anchorTop);\r\n const message = document.createElement('div');\r\n message.classList.add('message');\r\n message.textContent = text;\r\n this._domNode.appendChild(message);\r\n const anchorBottom = document.createElement('div');\r\n anchorBottom.classList.add('anchor', 'below');\r\n this._domNode.appendChild(anchorBottom);\r\n this._editor.addContentWidget(this);\r\n this._domNode.classList.add('fadeIn');\r\n }\r\n static fadeOut(messageWidget) {\r\n let handle;\r\n const dispose = () => {\r\n messageWidget.dispose();\r\n clearTimeout(handle);\r\n messageWidget.getDomNode().removeEventListener('animationend', dispose);\r\n };\r\n handle = setTimeout(dispose, 110);\r\n messageWidget.getDomNode().addEventListener('animationend', dispose);\r\n messageWidget.getDomNode().classList.add('fadeOut');\r\n return { dispose };\r\n }\r\n dispose() {\r\n this._editor.removeContentWidget(this);\r\n }\r\n getId() {\r\n return 'messageoverlay';\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return { position: this._position, preference: [1 /* ABOVE */, 2 /* BELOW */] };\r\n }\r\n afterRender(position) {\r\n this._domNode.classList.toggle('below', position === 2 /* BELOW */);\r\n }\r\n}\r\nregisterEditorContribution(MessageController.ID, MessageController);\r\nregisterThemingParticipant((theme, collector) => {\r\n const border = theme.getColor(inputValidationInfoBorder);\r\n if (border) {\r\n let borderWidth = theme.type === ColorScheme.HIGH_CONTRAST ? 2 : 1;\r\n collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${border}; }`);\r\n collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${border}; }`);\r\n collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${borderWidth}px solid ${border}; }`);\r\n }\r\n const background = theme.getColor(inputValidationInfoBackground);\r\n if (background) {\r\n collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${background}; }`);\r\n }\r\n const foreground = theme.getColor(inputValidationInfoForeground);\r\n if (foreground) {\r\n collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${foreground}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { getDomNodePagePosition } from '../../../base/browser/dom.js';\r\nimport { Action, Separator } from '../../../base/common/actions.js';\r\nimport { canceled } from '../../../base/common/errors.js';\r\nimport { Lazy } from '../../../base/common/lazy.js';\r\nimport { Disposable, MutableDisposable } from '../../../base/common/lifecycle.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { CodeActionProviderRegistry } from '../../common/modes.js';\r\nimport { codeActionCommandId, CodeActionItem, fixAllCommandId, organizeImportsCommandId, refactorCommandId, sourceActionCommandId } from './codeAction.js';\r\nimport { CodeActionCommandArgs, CodeActionKind } from './types.js';\r\nimport { IContextMenuService } from '../../../platform/contextview/browser/contextView.js';\r\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding.js';\r\nclass CodeActionAction extends Action {\r\n constructor(action, callback) {\r\n super(action.command ? action.command.id : action.title, stripNewlines(action.title), undefined, !action.disabled, callback);\r\n this.action = action;\r\n }\r\n}\r\nfunction stripNewlines(str) {\r\n return str.replace(/\\r\\n|\\r|\\n/g, ' ');\r\n}\r\nlet CodeActionMenu = class CodeActionMenu extends Disposable {\r\n constructor(_editor, _delegate, _contextMenuService, keybindingService) {\r\n super();\r\n this._editor = _editor;\r\n this._delegate = _delegate;\r\n this._contextMenuService = _contextMenuService;\r\n this._visible = false;\r\n this._showingActions = this._register(new MutableDisposable());\r\n this._keybindingResolver = new CodeActionKeybindingResolver({\r\n getKeybindings: () => keybindingService.getKeybindings()\r\n });\r\n }\r\n get isVisible() {\r\n return this._visible;\r\n }\r\n show(trigger, codeActions, at, options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const actionsToShow = options.includeDisabledActions ? codeActions.allActions : codeActions.validActions;\r\n if (!actionsToShow.length) {\r\n this._visible = false;\r\n return;\r\n }\r\n if (!this._editor.getDomNode()) {\r\n // cancel when editor went off-dom\r\n this._visible = false;\r\n throw canceled();\r\n }\r\n this._visible = true;\r\n this._showingActions.value = codeActions;\r\n const menuActions = this.getMenuActions(trigger, actionsToShow, codeActions.documentation);\r\n const anchor = Position.isIPosition(at) ? this._toCoords(at) : at || { x: 0, y: 0 };\r\n const resolver = this._keybindingResolver.getResolver();\r\n this._contextMenuService.showContextMenu({\r\n domForShadowRoot: this._editor.getDomNode(),\r\n getAnchor: () => anchor,\r\n getActions: () => menuActions,\r\n onHide: () => {\r\n this._visible = false;\r\n this._editor.focus();\r\n },\r\n autoSelectFirstItem: true,\r\n getKeyBinding: action => action instanceof CodeActionAction ? resolver(action.action) : undefined,\r\n });\r\n });\r\n }\r\n getMenuActions(trigger, actionsToShow, documentation) {\r\n var _a, _b;\r\n const toCodeActionAction = (item) => new CodeActionAction(item.action, () => this._delegate.onSelectCodeAction(item));\r\n const result = actionsToShow\r\n .map(toCodeActionAction);\r\n const allDocumentation = [...documentation];\r\n const model = this._editor.getModel();\r\n if (model && result.length) {\r\n for (const provider of CodeActionProviderRegistry.all(model)) {\r\n if (provider._getAdditionalMenuItems) {\r\n allDocumentation.push(...provider._getAdditionalMenuItems({ trigger: trigger.type, only: (_b = (_a = trigger.filter) === null || _a === void 0 ? void 0 : _a.include) === null || _b === void 0 ? void 0 : _b.value }, actionsToShow.map(item => item.action)));\r\n }\r\n }\r\n }\r\n if (allDocumentation.length) {\r\n result.push(new Separator(), ...allDocumentation.map(command => toCodeActionAction(new CodeActionItem({\r\n title: command.title,\r\n command: command,\r\n }, undefined))));\r\n }\r\n return result;\r\n }\r\n _toCoords(position) {\r\n if (!this._editor.hasModel()) {\r\n return { x: 0, y: 0 };\r\n }\r\n this._editor.revealPosition(position, 1 /* Immediate */);\r\n this._editor.render();\r\n // Translate to absolute editor position\r\n const cursorCoords = this._editor.getScrolledVisiblePosition(position);\r\n const editorCoords = getDomNodePagePosition(this._editor.getDomNode());\r\n const x = editorCoords.left + cursorCoords.left;\r\n const y = editorCoords.top + cursorCoords.top + cursorCoords.height;\r\n return { x, y };\r\n }\r\n};\r\nCodeActionMenu = __decorate([\r\n __param(2, IContextMenuService),\r\n __param(3, IKeybindingService)\r\n], CodeActionMenu);\r\nexport { CodeActionMenu };\r\nexport class CodeActionKeybindingResolver {\r\n constructor(_keybindingProvider) {\r\n this._keybindingProvider = _keybindingProvider;\r\n }\r\n getResolver() {\r\n // Lazy since we may not actually ever read the value\r\n const allCodeActionBindings = new Lazy(() => this._keybindingProvider.getKeybindings()\r\n .filter(item => CodeActionKeybindingResolver.codeActionCommands.indexOf(item.command) >= 0)\r\n .filter(item => item.resolvedKeybinding)\r\n .map((item) => {\r\n // Special case these commands since they come built-in with VS Code and don't use 'commandArgs'\r\n let commandArgs = item.commandArgs;\r\n if (item.command === organizeImportsCommandId) {\r\n commandArgs = { kind: CodeActionKind.SourceOrganizeImports.value };\r\n }\r\n else if (item.command === fixAllCommandId) {\r\n commandArgs = { kind: CodeActionKind.SourceFixAll.value };\r\n }\r\n return Object.assign({ resolvedKeybinding: item.resolvedKeybinding }, CodeActionCommandArgs.fromUser(commandArgs, {\r\n kind: CodeActionKind.None,\r\n apply: \"never\" /* Never */\r\n }));\r\n }));\r\n return (action) => {\r\n if (action.kind) {\r\n const binding = this.bestKeybindingForCodeAction(action, allCodeActionBindings.getValue());\r\n return binding === null || binding === void 0 ? void 0 : binding.resolvedKeybinding;\r\n }\r\n return undefined;\r\n };\r\n }\r\n bestKeybindingForCodeAction(action, candidates) {\r\n if (!action.kind) {\r\n return undefined;\r\n }\r\n const kind = new CodeActionKind(action.kind);\r\n return candidates\r\n .filter(candidate => candidate.kind.contains(kind))\r\n .filter(candidate => {\r\n if (candidate.preferred) {\r\n // If the candidate keybinding only applies to preferred actions, the this action must also be preferred\r\n return action.isPreferred;\r\n }\r\n return true;\r\n })\r\n .reduceRight((currentBest, candidate) => {\r\n if (!currentBest) {\r\n return candidate;\r\n }\r\n // Select the more specific binding\r\n return currentBest.kind.contains(candidate.kind) ? candidate : currentBest;\r\n }, undefined);\r\n }\r\n}\r\nCodeActionKeybindingResolver.codeActionCommands = [\r\n refactorCommandId,\r\n codeActionCommandId,\r\n sourceActionCommandId,\r\n organizeImportsCommandId,\r\n fixAllCommandId\r\n];\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { GlobalMouseMoveMonitor, standardMouseMoveMerger } from '../../../base/browser/globalMouseMoveMonitor.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport './lightBulbWidget.css';\r\nimport { TextModel } from '../../common/model/textModel.js';\r\nimport * as nls from '../../../nls.js';\r\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding.js';\r\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport { editorLightBulbForeground, editorLightBulbAutoFixForeground, editorBackground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { Gesture } from '../../../base/browser/touch.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nvar LightBulbState;\r\n(function (LightBulbState) {\r\n LightBulbState.Hidden = { type: 0 /* Hidden */ };\r\n class Showing {\r\n constructor(actions, trigger, editorPosition, widgetPosition) {\r\n this.actions = actions;\r\n this.trigger = trigger;\r\n this.editorPosition = editorPosition;\r\n this.widgetPosition = widgetPosition;\r\n this.type = 1 /* Showing */;\r\n }\r\n }\r\n LightBulbState.Showing = Showing;\r\n})(LightBulbState || (LightBulbState = {}));\r\nlet LightBulbWidget = class LightBulbWidget extends Disposable {\r\n constructor(_editor, _quickFixActionId, _preferredFixActionId, _keybindingService) {\r\n super();\r\n this._editor = _editor;\r\n this._quickFixActionId = _quickFixActionId;\r\n this._preferredFixActionId = _preferredFixActionId;\r\n this._keybindingService = _keybindingService;\r\n this._onClick = this._register(new Emitter());\r\n this.onClick = this._onClick.event;\r\n this._state = LightBulbState.Hidden;\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = Codicon.lightBulb.classNames;\r\n this._editor.addContentWidget(this);\r\n this._register(this._editor.onDidChangeModelContent(_ => {\r\n // cancel when the line in question has been removed\r\n const editorModel = this._editor.getModel();\r\n if (this.state.type !== 1 /* Showing */ || !editorModel || this.state.editorPosition.lineNumber >= editorModel.getLineCount()) {\r\n this.hide();\r\n }\r\n }));\r\n Gesture.ignoreTarget(this._domNode);\r\n this._register(dom.addStandardDisposableGenericMouseDownListner(this._domNode, e => {\r\n if (this.state.type !== 1 /* Showing */) {\r\n return;\r\n }\r\n // Make sure that focus / cursor location is not lost when clicking widget icon\r\n this._editor.focus();\r\n e.preventDefault();\r\n // a bit of extra work to make sure the menu\r\n // doesn't cover the line-text\r\n const { top, height } = dom.getDomNodePagePosition(this._domNode);\r\n const lineHeight = this._editor.getOption(53 /* lineHeight */);\r\n let pad = Math.floor(lineHeight / 3);\r\n if (this.state.widgetPosition.position !== null && this.state.widgetPosition.position.lineNumber < this.state.editorPosition.lineNumber) {\r\n pad += lineHeight;\r\n }\r\n this._onClick.fire({\r\n x: e.posx,\r\n y: top + height + pad,\r\n actions: this.state.actions,\r\n trigger: this.state.trigger,\r\n });\r\n }));\r\n this._register(dom.addDisposableListener(this._domNode, 'mouseenter', (e) => {\r\n if ((e.buttons & 1) !== 1) {\r\n return;\r\n }\r\n // mouse enters lightbulb while the primary/left button\r\n // is being pressed -> hide the lightbulb and block future\r\n // showings until mouse is released\r\n this.hide();\r\n const monitor = new GlobalMouseMoveMonitor();\r\n monitor.startMonitoring(e.target, e.buttons, standardMouseMoveMerger, () => { }, () => {\r\n monitor.dispose();\r\n });\r\n }));\r\n this._register(this._editor.onDidChangeConfiguration(e => {\r\n // hide when told to do so\r\n if (e.hasChanged(51 /* lightbulb */) && !this._editor.getOption(51 /* lightbulb */).enabled) {\r\n this.hide();\r\n }\r\n }));\r\n this._updateLightBulbTitleAndIcon();\r\n this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon, this));\r\n }\r\n dispose() {\r\n super.dispose();\r\n this._editor.removeContentWidget(this);\r\n }\r\n getId() {\r\n return 'LightBulbWidget';\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return this._state.type === 1 /* Showing */ ? this._state.widgetPosition : null;\r\n }\r\n update(actions, trigger, atPosition) {\r\n if (actions.validActions.length <= 0) {\r\n return this.hide();\r\n }\r\n const options = this._editor.getOptions();\r\n if (!options.get(51 /* lightbulb */).enabled) {\r\n return this.hide();\r\n }\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return this.hide();\r\n }\r\n const { lineNumber, column } = model.validatePosition(atPosition);\r\n const tabSize = model.getOptions().tabSize;\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const lineContent = model.getLineContent(lineNumber);\r\n const indent = TextModel.computeIndentLevel(lineContent, tabSize);\r\n const lineHasSpace = fontInfo.spaceWidth * indent > 22;\r\n const isFolded = (lineNumber) => {\r\n return lineNumber > 2 && this._editor.getTopForLineNumber(lineNumber) === this._editor.getTopForLineNumber(lineNumber - 1);\r\n };\r\n let effectiveLineNumber = lineNumber;\r\n if (!lineHasSpace) {\r\n if (lineNumber > 1 && !isFolded(lineNumber - 1)) {\r\n effectiveLineNumber -= 1;\r\n }\r\n else if (!isFolded(lineNumber + 1)) {\r\n effectiveLineNumber += 1;\r\n }\r\n else if (column * fontInfo.spaceWidth < 22) {\r\n // cannot show lightbulb above/below and showing\r\n // it inline would overlay the cursor...\r\n return this.hide();\r\n }\r\n }\r\n this.state = new LightBulbState.Showing(actions, trigger, atPosition, {\r\n position: { lineNumber: effectiveLineNumber, column: 1 },\r\n preference: LightBulbWidget._posPref\r\n });\r\n this._editor.layoutContentWidget(this);\r\n }\r\n hide() {\r\n this.state = LightBulbState.Hidden;\r\n this._editor.layoutContentWidget(this);\r\n }\r\n get state() { return this._state; }\r\n set state(value) {\r\n this._state = value;\r\n this._updateLightBulbTitleAndIcon();\r\n }\r\n _updateLightBulbTitleAndIcon() {\r\n if (this.state.type === 1 /* Showing */ && this.state.actions.hasAutoFix) {\r\n // update icon\r\n this._domNode.classList.remove(...Codicon.lightBulb.classNamesArray);\r\n this._domNode.classList.add(...Codicon.lightbulbAutofix.classNamesArray);\r\n const preferredKb = this._keybindingService.lookupKeybinding(this._preferredFixActionId);\r\n if (preferredKb) {\r\n this.title = nls.localize('prefferedQuickFixWithKb', \"Show Fixes. Preferred Fix Available ({0})\", preferredKb.getLabel());\r\n return;\r\n }\r\n }\r\n // update icon\r\n this._domNode.classList.remove(...Codicon.lightbulbAutofix.classNamesArray);\r\n this._domNode.classList.add(...Codicon.lightBulb.classNamesArray);\r\n const kb = this._keybindingService.lookupKeybinding(this._quickFixActionId);\r\n if (kb) {\r\n this.title = nls.localize('quickFixWithKb', \"Show Fixes ({0})\", kb.getLabel());\r\n }\r\n else {\r\n this.title = nls.localize('quickFix', \"Show Fixes\");\r\n }\r\n }\r\n set title(value) {\r\n this._domNode.title = value;\r\n }\r\n};\r\nLightBulbWidget._posPref = [0 /* EXACT */];\r\nLightBulbWidget = __decorate([\r\n __param(3, IKeybindingService)\r\n], LightBulbWidget);\r\nexport { LightBulbWidget };\r\nregisterThemingParticipant((theme, collector) => {\r\n var _a;\r\n const editorBackgroundColor = (_a = theme.getColor(editorBackground)) === null || _a === void 0 ? void 0 : _a.transparent(0.7);\r\n // Lightbulb Icon\r\n const editorLightBulbForegroundColor = theme.getColor(editorLightBulbForeground);\r\n if (editorLightBulbForegroundColor) {\r\n collector.addRule(`\n\t\t.monaco-editor .contentWidgets ${Codicon.lightBulb.cssSelector} {\n\t\t\tcolor: ${editorLightBulbForegroundColor};\n\t\t\tbackground-color: ${editorBackgroundColor};\n\t\t}`);\r\n }\r\n // Lightbulb Auto Fix Icon\r\n const editorLightBulbAutoFixForegroundColor = theme.getColor(editorLightBulbAutoFixForeground);\r\n if (editorLightBulbAutoFixForegroundColor) {\r\n collector.addRule(`\n\t\t.monaco-editor .contentWidgets ${Codicon.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${editorLightBulbAutoFixForegroundColor};\n\t\t\tbackground-color: ${editorBackgroundColor};\n\t\t}`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { Lazy } from '../../../base/common/lazy.js';\r\nimport { Disposable, MutableDisposable } from '../../../base/common/lifecycle.js';\r\nimport { MessageController } from '../message/messageController.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { CodeActionMenu } from './codeActionMenu.js';\r\nimport { LightBulbWidget } from './lightBulbWidget.js';\r\nlet CodeActionUi = class CodeActionUi extends Disposable {\r\n constructor(_editor, quickFixActionId, preferredFixActionId, delegate, instantiationService) {\r\n super();\r\n this._editor = _editor;\r\n this.delegate = delegate;\r\n this._activeCodeActions = this._register(new MutableDisposable());\r\n this._codeActionWidget = new Lazy(() => {\r\n return this._register(instantiationService.createInstance(CodeActionMenu, this._editor, {\r\n onSelectCodeAction: (action) => __awaiter(this, void 0, void 0, function* () {\r\n this.delegate.applyCodeAction(action, /* retrigger */ true);\r\n })\r\n }));\r\n });\r\n this._lightBulbWidget = new Lazy(() => {\r\n const widget = this._register(instantiationService.createInstance(LightBulbWidget, this._editor, quickFixActionId, preferredFixActionId));\r\n this._register(widget.onClick(e => this.showCodeActionList(e.trigger, e.actions, e, { includeDisabledActions: false })));\r\n return widget;\r\n });\r\n }\r\n update(newState) {\r\n var _a, _b, _c;\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (newState.type !== 1 /* Triggered */) {\r\n (_a = this._lightBulbWidget.rawValue) === null || _a === void 0 ? void 0 : _a.hide();\r\n return;\r\n }\r\n let actions;\r\n try {\r\n actions = yield newState.actions;\r\n }\r\n catch (e) {\r\n onUnexpectedError(e);\r\n return;\r\n }\r\n this._lightBulbWidget.getValue().update(actions, newState.trigger, newState.position);\r\n if (newState.trigger.type === 2 /* Manual */) {\r\n if ((_b = newState.trigger.filter) === null || _b === void 0 ? void 0 : _b.include) { // Triggered for specific scope\r\n // Check to see if we want to auto apply.\r\n const validActionToApply = this.tryGetValidActionToApply(newState.trigger, actions);\r\n if (validActionToApply) {\r\n try {\r\n yield this.delegate.applyCodeAction(validActionToApply, false);\r\n }\r\n finally {\r\n actions.dispose();\r\n }\r\n return;\r\n }\r\n // Check to see if there is an action that we would have applied were it not invalid\r\n if (newState.trigger.context) {\r\n const invalidAction = this.getInvalidActionThatWouldHaveBeenApplied(newState.trigger, actions);\r\n if (invalidAction && invalidAction.action.disabled) {\r\n MessageController.get(this._editor).showMessage(invalidAction.action.disabled, newState.trigger.context.position);\r\n actions.dispose();\r\n return;\r\n }\r\n }\r\n }\r\n const includeDisabledActions = !!((_c = newState.trigger.filter) === null || _c === void 0 ? void 0 : _c.include);\r\n if (newState.trigger.context) {\r\n if (!actions.allActions.length || !includeDisabledActions && !actions.validActions.length) {\r\n MessageController.get(this._editor).showMessage(newState.trigger.context.notAvailableMessage, newState.trigger.context.position);\r\n this._activeCodeActions.value = actions;\r\n actions.dispose();\r\n return;\r\n }\r\n }\r\n this._activeCodeActions.value = actions;\r\n this._codeActionWidget.getValue().show(newState.trigger, actions, newState.position, { includeDisabledActions });\r\n }\r\n else {\r\n // auto magically triggered\r\n if (this._codeActionWidget.getValue().isVisible) {\r\n // TODO: Figure out if we should update the showing menu?\r\n actions.dispose();\r\n }\r\n else {\r\n this._activeCodeActions.value = actions;\r\n }\r\n }\r\n });\r\n }\r\n getInvalidActionThatWouldHaveBeenApplied(trigger, actions) {\r\n if (!actions.allActions.length) {\r\n return undefined;\r\n }\r\n if ((trigger.autoApply === \"first\" /* First */ && actions.validActions.length === 0)\r\n || (trigger.autoApply === \"ifSingle\" /* IfSingle */ && actions.allActions.length === 1)) {\r\n return actions.allActions.find(({ action }) => action.disabled);\r\n }\r\n return undefined;\r\n }\r\n tryGetValidActionToApply(trigger, actions) {\r\n if (!actions.validActions.length) {\r\n return undefined;\r\n }\r\n if ((trigger.autoApply === \"first\" /* First */ && actions.validActions.length > 0)\r\n || (trigger.autoApply === \"ifSingle\" /* IfSingle */ && actions.validActions.length === 1)) {\r\n return actions.validActions[0];\r\n }\r\n return undefined;\r\n }\r\n showCodeActionList(trigger, actions, at, options) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this._codeActionWidget.getValue().show(trigger, actions, at, options);\r\n });\r\n }\r\n};\r\nCodeActionUi = __decorate([\r\n __param(4, IInstantiationService)\r\n], CodeActionUi);\r\nexport { CodeActionUi };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { createCancelablePromise, TimeoutTimer } from '../../../base/common/async.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Disposable, MutableDisposable } from '../../../base/common/lifecycle.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { CodeActionProviderRegistry } from '../../common/modes.js';\r\nimport { RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { Progress } from '../../../platform/progress/common/progress.js';\r\nimport { getCodeActions } from './codeAction.js';\r\nimport { isEqual } from '../../../base/common/resources.js';\r\nexport const SUPPORTED_CODE_ACTIONS = new RawContextKey('supportedCodeAction', '');\r\nclass CodeActionOracle extends Disposable {\r\n constructor(_editor, _markerService, _signalChange, _delay = 250) {\r\n super();\r\n this._editor = _editor;\r\n this._markerService = _markerService;\r\n this._signalChange = _signalChange;\r\n this._delay = _delay;\r\n this._autoTriggerTimer = this._register(new TimeoutTimer());\r\n this._register(this._markerService.onMarkerChanged(e => this._onMarkerChanges(e)));\r\n this._register(this._editor.onDidChangeCursorPosition(() => this._onCursorChange()));\r\n }\r\n trigger(trigger) {\r\n const selection = this._getRangeOfSelectionUnlessWhitespaceEnclosed(trigger);\r\n return this._createEventAndSignalChange(trigger, selection);\r\n }\r\n _onMarkerChanges(resources) {\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n if (resources.some(resource => isEqual(resource, model.uri))) {\r\n this._autoTriggerTimer.cancelAndSet(() => {\r\n this.trigger({ type: 1 /* Auto */ });\r\n }, this._delay);\r\n }\r\n }\r\n _onCursorChange() {\r\n this._autoTriggerTimer.cancelAndSet(() => {\r\n this.trigger({ type: 1 /* Auto */ });\r\n }, this._delay);\r\n }\r\n _getRangeOfMarker(selection) {\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return undefined;\r\n }\r\n for (const marker of this._markerService.read({ resource: model.uri })) {\r\n const markerRange = model.validateRange(marker);\r\n if (Range.intersectRanges(markerRange, selection)) {\r\n return Range.lift(markerRange);\r\n }\r\n }\r\n return undefined;\r\n }\r\n _getRangeOfSelectionUnlessWhitespaceEnclosed(trigger) {\r\n if (!this._editor.hasModel()) {\r\n return undefined;\r\n }\r\n const model = this._editor.getModel();\r\n const selection = this._editor.getSelection();\r\n if (selection.isEmpty() && trigger.type === 1 /* Auto */) {\r\n const { lineNumber, column } = selection.getPosition();\r\n const line = model.getLineContent(lineNumber);\r\n if (line.length === 0) {\r\n // empty line\r\n return undefined;\r\n }\r\n else if (column === 1) {\r\n // look only right\r\n if (/\\s/.test(line[0])) {\r\n return undefined;\r\n }\r\n }\r\n else if (column === model.getLineMaxColumn(lineNumber)) {\r\n // look only left\r\n if (/\\s/.test(line[line.length - 1])) {\r\n return undefined;\r\n }\r\n }\r\n else {\r\n // look left and right\r\n if (/\\s/.test(line[column - 2]) && /\\s/.test(line[column - 1])) {\r\n return undefined;\r\n }\r\n }\r\n }\r\n return selection;\r\n }\r\n _createEventAndSignalChange(trigger, selection) {\r\n const model = this._editor.getModel();\r\n if (!selection || !model) {\r\n // cancel\r\n this._signalChange(undefined);\r\n return undefined;\r\n }\r\n const markerRange = this._getRangeOfMarker(selection);\r\n const position = markerRange ? markerRange.getStartPosition() : selection.getStartPosition();\r\n const e = {\r\n trigger,\r\n selection,\r\n position\r\n };\r\n this._signalChange(e);\r\n return e;\r\n }\r\n}\r\nexport var CodeActionsState;\r\n(function (CodeActionsState) {\r\n CodeActionsState.Empty = { type: 0 /* Empty */ };\r\n class Triggered {\r\n constructor(trigger, rangeOrSelection, position, actions) {\r\n this.trigger = trigger;\r\n this.rangeOrSelection = rangeOrSelection;\r\n this.position = position;\r\n this.actions = actions;\r\n this.type = 1 /* Triggered */;\r\n }\r\n }\r\n CodeActionsState.Triggered = Triggered;\r\n})(CodeActionsState || (CodeActionsState = {}));\r\nexport class CodeActionModel extends Disposable {\r\n constructor(_editor, _markerService, contextKeyService, _progressService) {\r\n super();\r\n this._editor = _editor;\r\n this._markerService = _markerService;\r\n this._progressService = _progressService;\r\n this._codeActionOracle = this._register(new MutableDisposable());\r\n this._state = CodeActionsState.Empty;\r\n this._onDidChangeState = this._register(new Emitter());\r\n this.onDidChangeState = this._onDidChangeState.event;\r\n this._supportedCodeActions = SUPPORTED_CODE_ACTIONS.bindTo(contextKeyService);\r\n this._register(this._editor.onDidChangeModel(() => this._update()));\r\n this._register(this._editor.onDidChangeModelLanguage(() => this._update()));\r\n this._register(CodeActionProviderRegistry.onDidChange(() => this._update()));\r\n this._update();\r\n }\r\n dispose() {\r\n super.dispose();\r\n this.setState(CodeActionsState.Empty, true);\r\n }\r\n _update() {\r\n this._codeActionOracle.value = undefined;\r\n this.setState(CodeActionsState.Empty);\r\n const model = this._editor.getModel();\r\n if (model\r\n && CodeActionProviderRegistry.has(model)\r\n && !this._editor.getOption(75 /* readOnly */)) {\r\n const supportedActions = [];\r\n for (const provider of CodeActionProviderRegistry.all(model)) {\r\n if (Array.isArray(provider.providedCodeActionKinds)) {\r\n supportedActions.push(...provider.providedCodeActionKinds);\r\n }\r\n }\r\n this._supportedCodeActions.set(supportedActions.join(' '));\r\n this._codeActionOracle.value = new CodeActionOracle(this._editor, this._markerService, trigger => {\r\n var _a;\r\n if (!trigger) {\r\n this.setState(CodeActionsState.Empty);\r\n return;\r\n }\r\n const actions = createCancelablePromise(token => getCodeActions(model, trigger.selection, trigger.trigger, Progress.None, token));\r\n if (trigger.trigger.type === 2 /* Manual */) {\r\n (_a = this._progressService) === null || _a === void 0 ? void 0 : _a.showWhile(actions, 250);\r\n }\r\n this.setState(new CodeActionsState.Triggered(trigger.trigger, trigger.selection, trigger.position, actions));\r\n }, undefined);\r\n this._codeActionOracle.value.trigger({ type: 1 /* Auto */ });\r\n }\r\n else {\r\n this._supportedCodeActions.reset();\r\n }\r\n }\r\n trigger(trigger) {\r\n if (this._codeActionOracle.value) {\r\n this._codeActionOracle.value.trigger(trigger);\r\n }\r\n }\r\n setState(newState, skipNotify) {\r\n if (newState === this._state) {\r\n return;\r\n }\r\n // Cancel old request\r\n if (this._state.type === 1 /* Triggered */) {\r\n this._state.actions.cancel();\r\n }\r\n this._state = newState;\r\n if (!skipNotify) {\r\n this._onDidChangeState.fire(newState);\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { Lazy } from '../../../base/common/lazy.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { escapeRegExpCharacters } from '../../../base/common/strings.js';\r\nimport { EditorAction, EditorCommand } from '../../browser/editorExtensions.js';\r\nimport { IBulkEditService, ResourceEdit } from '../../browser/services/bulkEditService.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { codeActionCommandId, fixAllCommandId, organizeImportsCommandId, refactorCommandId, sourceActionCommandId } from './codeAction.js';\r\nimport { CodeActionUi } from './codeActionUi.js';\r\nimport { MessageController } from '../message/messageController.js';\r\nimport * as nls from '../../../nls.js';\r\nimport { ICommandService } from '../../../platform/commands/common/commands.js';\r\nimport { ContextKeyExpr, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { IMarkerService } from '../../../platform/markers/common/markers.js';\r\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\r\nimport { IEditorProgressService } from '../../../platform/progress/common/progress.js';\r\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';\r\nimport { CodeActionModel, SUPPORTED_CODE_ACTIONS } from './codeActionModel.js';\r\nimport { CodeActionCommandArgs, CodeActionKind } from './types.js';\r\nfunction contextKeyForSupportedActions(kind) {\r\n return ContextKeyExpr.regex(SUPPORTED_CODE_ACTIONS.keys()[0], new RegExp('(\\\\s|^)' + escapeRegExpCharacters(kind.value) + '\\\\b'));\r\n}\r\nconst argsSchema = {\r\n type: 'object',\r\n defaultSnippets: [{ body: { kind: '' } }],\r\n properties: {\r\n 'kind': {\r\n type: 'string',\r\n description: nls.localize('args.schema.kind', \"Kind of the code action to run.\"),\r\n },\r\n 'apply': {\r\n type: 'string',\r\n description: nls.localize('args.schema.apply', \"Controls when the returned actions are applied.\"),\r\n default: \"ifSingle\" /* IfSingle */,\r\n enum: [\"first\" /* First */, \"ifSingle\" /* IfSingle */, \"never\" /* Never */],\r\n enumDescriptions: [\r\n nls.localize('args.schema.apply.first', \"Always apply the first returned code action.\"),\r\n nls.localize('args.schema.apply.ifSingle', \"Apply the first returned code action if it is the only one.\"),\r\n nls.localize('args.schema.apply.never', \"Do not apply the returned code actions.\"),\r\n ]\r\n },\r\n 'preferred': {\r\n type: 'boolean',\r\n default: false,\r\n description: nls.localize('args.schema.preferred', \"Controls if only preferred code actions should be returned.\"),\r\n }\r\n }\r\n};\r\nlet QuickFixController = class QuickFixController extends Disposable {\r\n constructor(editor, markerService, contextKeyService, progressService, _instantiationService) {\r\n super();\r\n this._instantiationService = _instantiationService;\r\n this._editor = editor;\r\n this._model = this._register(new CodeActionModel(this._editor, markerService, contextKeyService, progressService));\r\n this._register(this._model.onDidChangeState(newState => this.update(newState)));\r\n this._ui = new Lazy(() => this._register(new CodeActionUi(editor, QuickFixAction.Id, AutoFixAction.Id, {\r\n applyCodeAction: (action, retrigger) => __awaiter(this, void 0, void 0, function* () {\r\n try {\r\n yield this._applyCodeAction(action);\r\n }\r\n finally {\r\n if (retrigger) {\r\n this._trigger({ type: 1 /* Auto */, filter: {} });\r\n }\r\n }\r\n })\r\n }, this._instantiationService)));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(QuickFixController.ID);\r\n }\r\n update(newState) {\r\n this._ui.getValue().update(newState);\r\n }\r\n showCodeActions(trigger, actions, at) {\r\n return this._ui.getValue().showCodeActionList(trigger, actions, at, { includeDisabledActions: false });\r\n }\r\n manualTriggerAtCurrentPosition(notAvailableMessage, filter, autoApply) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n MessageController.get(this._editor).closeMessage();\r\n const triggerPosition = this._editor.getPosition();\r\n this._trigger({ type: 2 /* Manual */, filter, autoApply, context: { notAvailableMessage, position: triggerPosition } });\r\n }\r\n _trigger(trigger) {\r\n return this._model.trigger(trigger);\r\n }\r\n _applyCodeAction(action) {\r\n return this._instantiationService.invokeFunction(applyCodeAction, action, this._editor);\r\n }\r\n};\r\nQuickFixController.ID = 'editor.contrib.quickFixController';\r\nQuickFixController = __decorate([\r\n __param(1, IMarkerService),\r\n __param(2, IContextKeyService),\r\n __param(3, IEditorProgressService),\r\n __param(4, IInstantiationService)\r\n], QuickFixController);\r\nexport { QuickFixController };\r\nexport function applyCodeAction(accessor, item, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const bulkEditService = accessor.get(IBulkEditService);\r\n const commandService = accessor.get(ICommandService);\r\n const telemetryService = accessor.get(ITelemetryService);\r\n const notificationService = accessor.get(INotificationService);\r\n telemetryService.publicLog2('codeAction.applyCodeAction', {\r\n codeActionTitle: item.action.title,\r\n codeActionKind: item.action.kind,\r\n codeActionIsPreferred: !!item.action.isPreferred,\r\n });\r\n yield item.resolve(CancellationToken.None);\r\n if (item.action.edit) {\r\n yield bulkEditService.apply(ResourceEdit.convert(item.action.edit), { editor, label: item.action.title });\r\n }\r\n if (item.action.command) {\r\n try {\r\n yield commandService.executeCommand(item.action.command.id, ...(item.action.command.arguments || []));\r\n }\r\n catch (err) {\r\n const message = asMessage(err);\r\n notificationService.error(typeof message === 'string'\r\n ? message\r\n : nls.localize('applyCodeActionFailed', \"An unknown error occurred while applying the code action\"));\r\n }\r\n }\r\n });\r\n}\r\nfunction asMessage(err) {\r\n if (typeof err === 'string') {\r\n return err;\r\n }\r\n else if (err instanceof Error && typeof err.message === 'string') {\r\n return err.message;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\nfunction triggerCodeActionsForEditorSelection(editor, notAvailableMessage, filter, autoApply) {\r\n if (editor.hasModel()) {\r\n const controller = QuickFixController.get(editor);\r\n if (controller) {\r\n controller.manualTriggerAtCurrentPosition(notAvailableMessage, filter, autoApply);\r\n }\r\n }\r\n}\r\nexport class QuickFixAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: QuickFixAction.Id,\r\n label: nls.localize('quickfix.trigger.label', \"Quick Fix...\"),\r\n alias: 'Quick Fix...',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 84 /* US_DOT */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return triggerCodeActionsForEditorSelection(editor, nls.localize('editor.action.quickFix.noneMessage', \"No code actions available\"), undefined, undefined);\r\n }\r\n}\r\nQuickFixAction.Id = 'editor.action.quickFix';\r\nexport class CodeActionCommand extends EditorCommand {\r\n constructor() {\r\n super({\r\n id: codeActionCommandId,\r\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),\r\n description: {\r\n description: 'Trigger a code action',\r\n args: [{ name: 'args', schema: argsSchema, }]\r\n }\r\n });\r\n }\r\n runEditorCommand(_accessor, editor, userArgs) {\r\n const args = CodeActionCommandArgs.fromUser(userArgs, {\r\n kind: CodeActionKind.Empty,\r\n apply: \"ifSingle\" /* IfSingle */,\r\n });\r\n return triggerCodeActionsForEditorSelection(editor, typeof (userArgs === null || userArgs === void 0 ? void 0 : userArgs.kind) === 'string'\r\n ? args.preferred\r\n ? nls.localize('editor.action.codeAction.noneMessage.preferred.kind', \"No preferred code actions for '{0}' available\", userArgs.kind)\r\n : nls.localize('editor.action.codeAction.noneMessage.kind', \"No code actions for '{0}' available\", userArgs.kind)\r\n : args.preferred\r\n ? nls.localize('editor.action.codeAction.noneMessage.preferred', \"No preferred code actions available\")\r\n : nls.localize('editor.action.codeAction.noneMessage', \"No code actions available\"), {\r\n include: args.kind,\r\n includeSourceActions: true,\r\n onlyIncludePreferredActions: args.preferred,\r\n }, args.apply);\r\n }\r\n}\r\nexport class RefactorAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: refactorCommandId,\r\n label: nls.localize('refactor.label', \"Refactor...\"),\r\n alias: 'Refactor...',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 48 /* KEY_R */,\r\n mac: {\r\n primary: 256 /* WinCtrl */ | 1024 /* Shift */ | 48 /* KEY_R */\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: '1_modification',\r\n order: 2,\r\n when: ContextKeyExpr.and(EditorContextKeys.writable, contextKeyForSupportedActions(CodeActionKind.Refactor)),\r\n },\r\n description: {\r\n description: 'Refactor...',\r\n args: [{ name: 'args', schema: argsSchema }]\r\n }\r\n });\r\n }\r\n run(_accessor, editor, userArgs) {\r\n const args = CodeActionCommandArgs.fromUser(userArgs, {\r\n kind: CodeActionKind.Refactor,\r\n apply: \"never\" /* Never */\r\n });\r\n return triggerCodeActionsForEditorSelection(editor, typeof (userArgs === null || userArgs === void 0 ? void 0 : userArgs.kind) === 'string'\r\n ? args.preferred\r\n ? nls.localize('editor.action.refactor.noneMessage.preferred.kind', \"No preferred refactorings for '{0}' available\", userArgs.kind)\r\n : nls.localize('editor.action.refactor.noneMessage.kind', \"No refactorings for '{0}' available\", userArgs.kind)\r\n : args.preferred\r\n ? nls.localize('editor.action.refactor.noneMessage.preferred', \"No preferred refactorings available\")\r\n : nls.localize('editor.action.refactor.noneMessage', \"No refactorings available\"), {\r\n include: CodeActionKind.Refactor.contains(args.kind) ? args.kind : CodeActionKind.None,\r\n onlyIncludePreferredActions: args.preferred,\r\n }, args.apply);\r\n }\r\n}\r\nexport class SourceAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: sourceActionCommandId,\r\n label: nls.localize('source.label', \"Source Action...\"),\r\n alias: 'Source Action...',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCodeActionsProvider),\r\n contextMenuOpts: {\r\n group: '1_modification',\r\n order: 2.1,\r\n when: ContextKeyExpr.and(EditorContextKeys.writable, contextKeyForSupportedActions(CodeActionKind.Source)),\r\n },\r\n description: {\r\n description: 'Source Action...',\r\n args: [{ name: 'args', schema: argsSchema }]\r\n }\r\n });\r\n }\r\n run(_accessor, editor, userArgs) {\r\n const args = CodeActionCommandArgs.fromUser(userArgs, {\r\n kind: CodeActionKind.Source,\r\n apply: \"never\" /* Never */\r\n });\r\n return triggerCodeActionsForEditorSelection(editor, typeof (userArgs === null || userArgs === void 0 ? void 0 : userArgs.kind) === 'string'\r\n ? args.preferred\r\n ? nls.localize('editor.action.source.noneMessage.preferred.kind', \"No preferred source actions for '{0}' available\", userArgs.kind)\r\n : nls.localize('editor.action.source.noneMessage.kind', \"No source actions for '{0}' available\", userArgs.kind)\r\n : args.preferred\r\n ? nls.localize('editor.action.source.noneMessage.preferred', \"No preferred source actions available\")\r\n : nls.localize('editor.action.source.noneMessage', \"No source actions available\"), {\r\n include: CodeActionKind.Source.contains(args.kind) ? args.kind : CodeActionKind.None,\r\n includeSourceActions: true,\r\n onlyIncludePreferredActions: args.preferred,\r\n }, args.apply);\r\n }\r\n}\r\nexport class OrganizeImportsAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: organizeImportsCommandId,\r\n label: nls.localize('organizeImports.label', \"Organize Imports\"),\r\n alias: 'Organize Imports',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, contextKeyForSupportedActions(CodeActionKind.SourceOrganizeImports)),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 45 /* KEY_O */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return triggerCodeActionsForEditorSelection(editor, nls.localize('editor.action.organize.noneMessage', \"No organize imports action available\"), { include: CodeActionKind.SourceOrganizeImports, includeSourceActions: true }, \"ifSingle\" /* IfSingle */);\r\n }\r\n}\r\nexport class FixAllAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: fixAllCommandId,\r\n label: nls.localize('fixAll.label', \"Fix All\"),\r\n alias: 'Fix All',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, contextKeyForSupportedActions(CodeActionKind.SourceFixAll))\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return triggerCodeActionsForEditorSelection(editor, nls.localize('fixAll.noneMessage', \"No fix all action available\"), { include: CodeActionKind.SourceFixAll, includeSourceActions: true }, \"ifSingle\" /* IfSingle */);\r\n }\r\n}\r\nexport class AutoFixAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: AutoFixAction.Id,\r\n label: nls.localize('autoFix.label', \"Auto Fix...\"),\r\n alias: 'Auto Fix...',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, contextKeyForSupportedActions(CodeActionKind.QuickFix)),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 512 /* Alt */ | 1024 /* Shift */ | 84 /* US_DOT */,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 84 /* US_DOT */\r\n },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n return triggerCodeActionsForEditorSelection(editor, nls.localize('editor.action.autoFix.noneMessage', \"No auto fixes available\"), {\r\n include: CodeActionKind.QuickFix,\r\n onlyIncludePreferredActions: true\r\n }, \"ifSingle\" /* IfSingle */);\r\n }\r\n}\r\nAutoFixAction.Id = 'editor.action.autoFix';\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerEditorAction, registerEditorCommand, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { CodeActionCommand, OrganizeImportsAction, QuickFixAction, QuickFixController, RefactorAction, SourceAction, AutoFixAction, FixAllAction } from './codeActionCommands.js';\r\nregisterEditorContribution(QuickFixController.ID, QuickFixController);\r\nregisterEditorAction(QuickFixAction);\r\nregisterEditorAction(RefactorAction);\r\nregisterEditorAction(SourceAction);\r\nregisterEditorAction(OrganizeImportsAction);\r\nregisterEditorAction(AutoFixAction);\r\nregisterEditorAction(FixAllAction);\r\nregisterEditorCommand(new CodeActionCommand());\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { mergeSort } from '../../../base/common/arrays.js';\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { illegalArgument, onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { CodeLensProviderRegistry } from '../../common/modes.js';\r\nimport { IModelService } from '../../common/services/modelService.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { CommandsRegistry } from '../../../platform/commands/common/commands.js';\r\nimport { assertType } from '../../../base/common/types.js';\r\nexport class CodeLensModel {\r\n constructor() {\r\n this.lenses = [];\r\n this._disposables = new DisposableStore();\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n }\r\n add(list, provider) {\r\n this._disposables.add(list);\r\n for (const symbol of list.lenses) {\r\n this.lenses.push({ symbol, provider });\r\n }\r\n }\r\n}\r\nexport function getCodeLensModel(model, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const provider = CodeLensProviderRegistry.ordered(model);\r\n const providerRanks = new Map();\r\n const result = new CodeLensModel();\r\n const promises = provider.map((provider, i) => __awaiter(this, void 0, void 0, function* () {\r\n providerRanks.set(provider, i);\r\n try {\r\n const list = yield Promise.resolve(provider.provideCodeLenses(model, token));\r\n if (list) {\r\n result.add(list, provider);\r\n }\r\n }\r\n catch (err) {\r\n onUnexpectedExternalError(err);\r\n }\r\n }));\r\n yield Promise.all(promises);\r\n result.lenses = mergeSort(result.lenses, (a, b) => {\r\n // sort by lineNumber, provider-rank, and column\r\n if (a.symbol.range.startLineNumber < b.symbol.range.startLineNumber) {\r\n return -1;\r\n }\r\n else if (a.symbol.range.startLineNumber > b.symbol.range.startLineNumber) {\r\n return 1;\r\n }\r\n else if ((providerRanks.get(a.provider)) < (providerRanks.get(b.provider))) {\r\n return -1;\r\n }\r\n else if ((providerRanks.get(a.provider)) > (providerRanks.get(b.provider))) {\r\n return 1;\r\n }\r\n else if (a.symbol.range.startColumn < b.symbol.range.startColumn) {\r\n return -1;\r\n }\r\n else if (a.symbol.range.startColumn > b.symbol.range.startColumn) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n });\r\n return result;\r\n });\r\n}\r\nCommandsRegistry.registerCommand('_executeCodeLensProvider', function (accessor, ...args) {\r\n let [uri, itemResolveCount] = args;\r\n assertType(URI.isUri(uri));\r\n assertType(typeof itemResolveCount === 'number' || !itemResolveCount);\r\n const model = accessor.get(IModelService).getModel(uri);\r\n if (!model) {\r\n throw illegalArgument();\r\n }\r\n const result = [];\r\n const disposables = new DisposableStore();\r\n return getCodeLensModel(model, CancellationToken.None).then(value => {\r\n disposables.add(value);\r\n let resolve = [];\r\n for (const item of value.lenses) {\r\n if (itemResolveCount === undefined || itemResolveCount === null || Boolean(item.symbol.command)) {\r\n result.push(item.symbol);\r\n }\r\n else if (itemResolveCount-- > 0 && item.provider.resolveCodeLens) {\r\n resolve.push(Promise.resolve(item.provider.resolveCodeLens(model, item.symbol, CancellationToken.None)).then(symbol => result.push(symbol || item.symbol)));\r\n }\r\n }\r\n return Promise.all(resolve);\r\n }).then(() => {\r\n return result;\r\n }).finally(() => {\r\n // make sure to return results, then (on next tick)\r\n // dispose the results\r\n setTimeout(() => disposables.dispose(), 100);\r\n });\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './codelensWidget.css';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { editorCodeLensForeground } from '../../common/view/editorColorRegistry.js';\r\nimport { editorActiveLinkForeground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport { renderLabelWithIcons } from '../../../base/browser/ui/iconLabel/iconLabels.js';\r\nclass CodeLensViewZone {\r\n constructor(afterLineNumber, heightInPx, onHeight) {\r\n this.afterLineNumber = afterLineNumber;\r\n this.heightInPx = heightInPx;\r\n this._onHeight = onHeight;\r\n this.suppressMouseDown = true;\r\n this.domNode = document.createElement('div');\r\n }\r\n onComputedHeight(height) {\r\n if (this._lastHeight === undefined) {\r\n this._lastHeight = height;\r\n }\r\n else if (this._lastHeight !== height) {\r\n this._lastHeight = height;\r\n this._onHeight();\r\n }\r\n }\r\n}\r\nclass CodeLensContentWidget {\r\n constructor(editor, className, line) {\r\n // Editor.IContentWidget.allowEditorOverflow\r\n this.allowEditorOverflow = false;\r\n this.suppressMouseDown = true;\r\n this._commands = new Map();\r\n this._isEmpty = true;\r\n this._editor = editor;\r\n this._id = `codelens.widget-${(CodeLensContentWidget._idPool++)}`;\r\n this.updatePosition(line);\r\n this._domNode = document.createElement('span');\r\n this._domNode.className = `codelens-decoration ${className}`;\r\n }\r\n withCommands(lenses, animate) {\r\n this._commands.clear();\r\n let children = [];\r\n let hasSymbol = false;\r\n for (let i = 0; i < lenses.length; i++) {\r\n const lens = lenses[i];\r\n if (!lens) {\r\n continue;\r\n }\r\n hasSymbol = true;\r\n if (lens.command) {\r\n const title = renderLabelWithIcons(lens.command.title.trim());\r\n if (lens.command.id) {\r\n children.push(dom.$('a', { id: String(i) }, ...title));\r\n this._commands.set(String(i), lens.command);\r\n }\r\n else {\r\n children.push(dom.$('span', undefined, ...title));\r\n }\r\n if (i + 1 < lenses.length) {\r\n children.push(dom.$('span', undefined, '\\u00a0|\\u00a0'));\r\n }\r\n }\r\n }\r\n if (!hasSymbol) {\r\n // symbols but no commands\r\n dom.reset(this._domNode, dom.$('span', undefined, 'no commands'));\r\n }\r\n else {\r\n // symbols and commands\r\n dom.reset(this._domNode, ...children);\r\n if (this._isEmpty && animate) {\r\n this._domNode.classList.add('fadein');\r\n }\r\n this._isEmpty = false;\r\n }\r\n }\r\n getCommand(link) {\r\n return link.parentElement === this._domNode\r\n ? this._commands.get(link.id)\r\n : undefined;\r\n }\r\n getId() {\r\n return this._id;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n updatePosition(line) {\r\n const column = this._editor.getModel().getLineFirstNonWhitespaceColumn(line);\r\n this._widgetPosition = {\r\n position: { lineNumber: line, column: column },\r\n preference: [1 /* ABOVE */]\r\n };\r\n }\r\n getPosition() {\r\n return this._widgetPosition || null;\r\n }\r\n}\r\nCodeLensContentWidget._idPool = 0;\r\nexport class CodeLensHelper {\r\n constructor() {\r\n this._removeDecorations = [];\r\n this._addDecorations = [];\r\n this._addDecorationsCallbacks = [];\r\n }\r\n addDecoration(decoration, callback) {\r\n this._addDecorations.push(decoration);\r\n this._addDecorationsCallbacks.push(callback);\r\n }\r\n removeDecoration(decorationId) {\r\n this._removeDecorations.push(decorationId);\r\n }\r\n commit(changeAccessor) {\r\n let resultingDecorations = changeAccessor.deltaDecorations(this._removeDecorations, this._addDecorations);\r\n for (let i = 0, len = resultingDecorations.length; i < len; i++) {\r\n this._addDecorationsCallbacks[i](resultingDecorations[i]);\r\n }\r\n }\r\n}\r\nexport class CodeLensWidget {\r\n constructor(data, editor, className, helper, viewZoneChangeAccessor, heightInPx, updateCallback) {\r\n this._isDisposed = false;\r\n this._editor = editor;\r\n this._className = className;\r\n this._data = data;\r\n // create combined range, track all ranges with decorations,\r\n // check if there is already something to render\r\n this._decorationIds = [];\r\n let range;\r\n let lenses = [];\r\n this._data.forEach((codeLensData, i) => {\r\n if (codeLensData.symbol.command) {\r\n lenses.push(codeLensData.symbol);\r\n }\r\n helper.addDecoration({\r\n range: codeLensData.symbol.range,\r\n options: ModelDecorationOptions.EMPTY\r\n }, id => this._decorationIds[i] = id);\r\n // the range contains all lenses on this line\r\n if (!range) {\r\n range = Range.lift(codeLensData.symbol.range);\r\n }\r\n else {\r\n range = Range.plusRange(range, codeLensData.symbol.range);\r\n }\r\n });\r\n this._viewZone = new CodeLensViewZone(range.startLineNumber - 1, heightInPx, updateCallback);\r\n this._viewZoneId = viewZoneChangeAccessor.addZone(this._viewZone);\r\n if (lenses.length > 0) {\r\n this._createContentWidgetIfNecessary();\r\n this._contentWidget.withCommands(lenses, false);\r\n }\r\n }\r\n _createContentWidgetIfNecessary() {\r\n if (!this._contentWidget) {\r\n this._contentWidget = new CodeLensContentWidget(this._editor, this._className, this._viewZone.afterLineNumber + 1);\r\n this._editor.addContentWidget(this._contentWidget);\r\n }\r\n else {\r\n this._editor.layoutContentWidget(this._contentWidget);\r\n }\r\n }\r\n dispose(helper, viewZoneChangeAccessor) {\r\n this._decorationIds.forEach(helper.removeDecoration, helper);\r\n this._decorationIds = [];\r\n if (viewZoneChangeAccessor) {\r\n viewZoneChangeAccessor.removeZone(this._viewZoneId);\r\n }\r\n if (this._contentWidget) {\r\n this._editor.removeContentWidget(this._contentWidget);\r\n this._contentWidget = undefined;\r\n }\r\n this._isDisposed = true;\r\n }\r\n isDisposed() {\r\n return this._isDisposed;\r\n }\r\n isValid() {\r\n return this._decorationIds.some((id, i) => {\r\n const range = this._editor.getModel().getDecorationRange(id);\r\n const symbol = this._data[i].symbol;\r\n return !!(range && Range.isEmpty(symbol.range) === range.isEmpty());\r\n });\r\n }\r\n updateCodeLensSymbols(data, helper) {\r\n this._decorationIds.forEach(helper.removeDecoration, helper);\r\n this._decorationIds = [];\r\n this._data = data;\r\n this._data.forEach((codeLensData, i) => {\r\n helper.addDecoration({\r\n range: codeLensData.symbol.range,\r\n options: ModelDecorationOptions.EMPTY\r\n }, id => this._decorationIds[i] = id);\r\n });\r\n }\r\n updateHeight(height, viewZoneChangeAccessor) {\r\n this._viewZone.heightInPx = height;\r\n viewZoneChangeAccessor.layoutZone(this._viewZoneId);\r\n if (this._contentWidget) {\r\n this._editor.layoutContentWidget(this._contentWidget);\r\n }\r\n }\r\n computeIfNecessary(model) {\r\n if (!this._viewZone.domNode.hasAttribute('monaco-visible-view-zone')) {\r\n return null;\r\n }\r\n // Read editor current state\r\n for (let i = 0; i < this._decorationIds.length; i++) {\r\n const range = model.getDecorationRange(this._decorationIds[i]);\r\n if (range) {\r\n this._data[i].symbol.range = range;\r\n }\r\n }\r\n return this._data;\r\n }\r\n updateCommands(symbols) {\r\n this._createContentWidgetIfNecessary();\r\n this._contentWidget.withCommands(symbols, true);\r\n for (let i = 0; i < this._data.length; i++) {\r\n const resolved = symbols[i];\r\n if (resolved) {\r\n const { symbol } = this._data[i];\r\n symbol.command = resolved.command || symbol.command;\r\n }\r\n }\r\n }\r\n getCommand(link) {\r\n var _a;\r\n return (_a = this._contentWidget) === null || _a === void 0 ? void 0 : _a.getCommand(link);\r\n }\r\n getLineNumber() {\r\n const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]);\r\n if (range) {\r\n return range.startLineNumber;\r\n }\r\n return -1;\r\n }\r\n update(viewZoneChangeAccessor) {\r\n if (this.isValid()) {\r\n const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]);\r\n if (range) {\r\n this._viewZone.afterLineNumber = range.startLineNumber - 1;\r\n viewZoneChangeAccessor.layoutZone(this._viewZoneId);\r\n if (this._contentWidget) {\r\n this._contentWidget.updatePosition(range.startLineNumber);\r\n this._editor.layoutContentWidget(this._contentWidget);\r\n }\r\n }\r\n }\r\n }\r\n getItems() {\r\n return this._data;\r\n }\r\n}\r\nregisterThemingParticipant((theme, collector) => {\r\n const codeLensForeground = theme.getColor(editorCodeLensForeground);\r\n if (codeLensForeground) {\r\n collector.addRule(`.monaco-editor .codelens-decoration { color: ${codeLensForeground}; }`);\r\n collector.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${codeLensForeground}; }`);\r\n }\r\n const activeLinkForeground = theme.getColor(editorActiveLinkForeground);\r\n if (activeLinkForeground) {\r\n collector.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${activeLinkForeground} !important; }`);\r\n collector.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${activeLinkForeground} !important; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { registerSingleton } from '../../../platform/instantiation/common/extensions.js';\r\nimport { CodeLensModel } from './codelens.js';\r\nimport { LRUCache } from '../../../base/common/map.js';\r\nimport { IStorageService, WillSaveStateReason } from '../../../platform/storage/common/storage.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { runWhenIdle } from '../../../base/common/async.js';\r\nimport { once } from '../../../base/common/functional.js';\r\nexport const ICodeLensCache = createDecorator('ICodeLensCache');\r\nclass CacheItem {\r\n constructor(lineCount, data) {\r\n this.lineCount = lineCount;\r\n this.data = data;\r\n }\r\n}\r\nlet CodeLensCache = class CodeLensCache {\r\n constructor(storageService) {\r\n this._fakeProvider = new class {\r\n provideCodeLenses() {\r\n throw new Error('not supported');\r\n }\r\n };\r\n this._cache = new LRUCache(20, 0.75);\r\n // remove old data\r\n const oldkey = 'codelens/cache';\r\n runWhenIdle(() => storageService.remove(oldkey, 1 /* WORKSPACE */));\r\n // restore lens data on start\r\n const key = 'codelens/cache2';\r\n const raw = storageService.get(key, 1 /* WORKSPACE */, '{}');\r\n this._deserialize(raw);\r\n // store lens data on shutdown\r\n once(storageService.onWillSaveState)(e => {\r\n if (e.reason === WillSaveStateReason.SHUTDOWN) {\r\n storageService.store(key, this._serialize(), 1 /* WORKSPACE */, 1 /* MACHINE */);\r\n }\r\n });\r\n }\r\n put(model, data) {\r\n // create a copy of the model that is without command-ids\r\n // but with comand-labels\r\n const copyItems = data.lenses.map(item => {\r\n var _a;\r\n return {\r\n range: item.symbol.range,\r\n command: item.symbol.command && { id: '', title: (_a = item.symbol.command) === null || _a === void 0 ? void 0 : _a.title },\r\n };\r\n });\r\n const copyModel = new CodeLensModel();\r\n copyModel.add({ lenses: copyItems, dispose: () => { } }, this._fakeProvider);\r\n const item = new CacheItem(model.getLineCount(), copyModel);\r\n this._cache.set(model.uri.toString(), item);\r\n }\r\n get(model) {\r\n const item = this._cache.get(model.uri.toString());\r\n return item && item.lineCount === model.getLineCount() ? item.data : undefined;\r\n }\r\n delete(model) {\r\n this._cache.delete(model.uri.toString());\r\n }\r\n // --- persistence\r\n _serialize() {\r\n const data = Object.create(null);\r\n for (const [key, value] of this._cache) {\r\n const lines = new Set();\r\n for (const d of value.data.lenses) {\r\n lines.add(d.symbol.range.startLineNumber);\r\n }\r\n data[key] = {\r\n lineCount: value.lineCount,\r\n lines: [...lines.values()]\r\n };\r\n }\r\n return JSON.stringify(data);\r\n }\r\n _deserialize(raw) {\r\n try {\r\n const data = JSON.parse(raw);\r\n for (const key in data) {\r\n const element = data[key];\r\n const lenses = [];\r\n for (const line of element.lines) {\r\n lenses.push({ range: new Range(line, 1, line, 11) });\r\n }\r\n const model = new CodeLensModel();\r\n model.add({ lenses, dispose() { } }, this._fakeProvider);\r\n this._cache.set(key, new CacheItem(element.lineCount, model));\r\n }\r\n }\r\n catch (_a) {\r\n // ignore...\r\n }\r\n }\r\n};\r\nCodeLensCache = __decorate([\r\n __param(0, IStorageService)\r\n], CodeLensCache);\r\nexport { CodeLensCache };\r\nregisterSingleton(ICodeLensCache, CodeLensCache);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { RunOnceScheduler, createCancelablePromise, disposableTimeout } from '../../../base/common/async.js';\r\nimport { onUnexpectedError, onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport { toDisposable, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { StableEditorScrollState } from '../../browser/core/editorState.js';\r\nimport { registerEditorContribution, registerEditorAction, EditorAction } from '../../browser/editorExtensions.js';\r\nimport { CodeLensProviderRegistry } from '../../common/modes.js';\r\nimport { getCodeLensModel } from './codelens.js';\r\nimport { CodeLensWidget, CodeLensHelper } from './codelensWidget.js';\r\nimport { ICommandService } from '../../../platform/commands/common/commands.js';\r\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\r\nimport { ICodeLensCache } from './codeLensCache.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { hash } from '../../../base/common/hash.js';\r\nimport { IQuickInputService } from '../../../platform/quickinput/common/quickInput.js';\r\nimport { localize } from '../../../nls.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { LanguageFeatureRequestDelays } from '../../common/modes/languageFeatureRegistry.js';\r\nlet CodeLensContribution = class CodeLensContribution {\r\n constructor(_editor, _commandService, _notificationService, _codeLensCache) {\r\n this._editor = _editor;\r\n this._commandService = _commandService;\r\n this._notificationService = _notificationService;\r\n this._codeLensCache = _codeLensCache;\r\n this._disposables = new DisposableStore();\r\n this._localToDispose = new DisposableStore();\r\n this._lenses = [];\r\n this._getCodeLensModelDelays = new LanguageFeatureRequestDelays(CodeLensProviderRegistry, 250, 2500);\r\n this._oldCodeLensModels = new DisposableStore();\r\n this._resolveCodeLensesDelays = new LanguageFeatureRequestDelays(CodeLensProviderRegistry, 250, 2500);\r\n this._resolveCodeLensesScheduler = new RunOnceScheduler(() => this._resolveCodeLensesInViewport(), this._resolveCodeLensesDelays.min);\r\n this._disposables.add(this._editor.onDidChangeModel(() => this._onModelChange()));\r\n this._disposables.add(this._editor.onDidChangeModelLanguage(() => this._onModelChange()));\r\n this._disposables.add(this._editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(38 /* fontInfo */) || e.hasChanged(13 /* codeLensFontSize */) || e.hasChanged(12 /* codeLensFontFamily */)) {\r\n this._updateLensStyle();\r\n }\r\n if (e.hasChanged(11 /* codeLens */)) {\r\n this._onModelChange();\r\n }\r\n }));\r\n this._disposables.add(CodeLensProviderRegistry.onDidChange(this._onModelChange, this));\r\n this._onModelChange();\r\n this._styleClassName = '_' + hash(this._editor.getId()).toString(16);\r\n this._styleElement = dom.createStyleSheet(dom.isInShadowDOM(this._editor.getContainerDomNode())\r\n ? this._editor.getContainerDomNode()\r\n : undefined);\r\n this._updateLensStyle();\r\n }\r\n dispose() {\r\n var _a;\r\n this._localDispose();\r\n this._disposables.dispose();\r\n this._oldCodeLensModels.dispose();\r\n (_a = this._currentCodeLensModel) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._styleElement.remove();\r\n }\r\n _getLayoutInfo() {\r\n let fontSize = this._editor.getOption(13 /* codeLensFontSize */);\r\n let codeLensHeight;\r\n if (!fontSize || fontSize < 5) {\r\n fontSize = (this._editor.getOption(40 /* fontSize */) * .9) | 0;\r\n codeLensHeight = this._editor.getOption(53 /* lineHeight */);\r\n }\r\n else {\r\n codeLensHeight = (fontSize * Math.max(1.3, this._editor.getOption(53 /* lineHeight */) / this._editor.getOption(40 /* fontSize */))) | 0;\r\n }\r\n return { codeLensHeight, fontSize };\r\n }\r\n _updateLensStyle() {\r\n var _a;\r\n const { codeLensHeight, fontSize } = this._getLayoutInfo();\r\n const fontFamily = this._editor.getOption(12 /* codeLensFontFamily */);\r\n const editorFontInfo = this._editor.getOption(38 /* fontInfo */);\r\n const fontFamilyVar = `--codelens-font-family${this._styleClassName}`;\r\n let newStyle = `\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${codeLensHeight}px; font-size: ${fontSize}px; padding-right: ${Math.round(fontSize * 0.5)}px; font-feature-settings: ${editorFontInfo.fontFeatureSettings} }\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${codeLensHeight}px; font-size: ${fontSize}px; }\n\t\t`;\r\n if (fontFamily) {\r\n newStyle += `.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${fontFamilyVar})}`;\r\n }\r\n this._styleElement.textContent = newStyle;\r\n (_a = this._editor.getDomNode()) === null || _a === void 0 ? void 0 : _a.style.setProperty(fontFamilyVar, fontFamily !== null && fontFamily !== void 0 ? fontFamily : 'inherit');\r\n //\r\n this._editor.changeViewZones(accessor => {\r\n for (let lens of this._lenses) {\r\n lens.updateHeight(codeLensHeight, accessor);\r\n }\r\n });\r\n }\r\n _localDispose() {\r\n var _a, _b, _c;\r\n (_a = this._getCodeLensModelPromise) === null || _a === void 0 ? void 0 : _a.cancel();\r\n this._getCodeLensModelPromise = undefined;\r\n (_b = this._resolveCodeLensesPromise) === null || _b === void 0 ? void 0 : _b.cancel();\r\n this._resolveCodeLensesPromise = undefined;\r\n this._localToDispose.clear();\r\n this._oldCodeLensModels.clear();\r\n (_c = this._currentCodeLensModel) === null || _c === void 0 ? void 0 : _c.dispose();\r\n }\r\n _onModelChange() {\r\n this._localDispose();\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n if (!this._editor.getOption(11 /* codeLens */)) {\r\n return;\r\n }\r\n const cachedLenses = this._codeLensCache.get(model);\r\n if (cachedLenses) {\r\n this._renderCodeLensSymbols(cachedLenses);\r\n }\r\n if (!CodeLensProviderRegistry.has(model)) {\r\n // no provider -> return but check with\r\n // cached lenses. they expire after 30 seconds\r\n if (cachedLenses) {\r\n this._localToDispose.add(disposableTimeout(() => {\r\n const cachedLensesNow = this._codeLensCache.get(model);\r\n if (cachedLenses === cachedLensesNow) {\r\n this._codeLensCache.delete(model);\r\n this._onModelChange();\r\n }\r\n }, 30 * 1000));\r\n }\r\n return;\r\n }\r\n for (const provider of CodeLensProviderRegistry.all(model)) {\r\n if (typeof provider.onDidChange === 'function') {\r\n let registration = provider.onDidChange(() => scheduler.schedule());\r\n this._localToDispose.add(registration);\r\n }\r\n }\r\n const scheduler = new RunOnceScheduler(() => {\r\n var _a;\r\n const t1 = Date.now();\r\n (_a = this._getCodeLensModelPromise) === null || _a === void 0 ? void 0 : _a.cancel();\r\n this._getCodeLensModelPromise = createCancelablePromise(token => getCodeLensModel(model, token));\r\n this._getCodeLensModelPromise.then(result => {\r\n if (this._currentCodeLensModel) {\r\n this._oldCodeLensModels.add(this._currentCodeLensModel);\r\n }\r\n this._currentCodeLensModel = result;\r\n // cache model to reduce flicker\r\n this._codeLensCache.put(model, result);\r\n // update moving average\r\n const newDelay = this._getCodeLensModelDelays.update(model, Date.now() - t1);\r\n scheduler.delay = newDelay;\r\n // render lenses\r\n this._renderCodeLensSymbols(result);\r\n this._resolveCodeLensesInViewport();\r\n }, onUnexpectedError);\r\n }, this._getCodeLensModelDelays.get(model));\r\n this._localToDispose.add(scheduler);\r\n this._localToDispose.add(toDisposable(() => this._resolveCodeLensesScheduler.cancel()));\r\n this._localToDispose.add(this._editor.onDidChangeModelContent(() => {\r\n this._editor.changeDecorations(decorationsAccessor => {\r\n this._editor.changeViewZones(viewZonesAccessor => {\r\n let toDispose = [];\r\n let lastLensLineNumber = -1;\r\n this._lenses.forEach((lens) => {\r\n if (!lens.isValid() || lastLensLineNumber === lens.getLineNumber()) {\r\n // invalid -> lens collapsed, attach range doesn't exist anymore\r\n // line_number -> lenses should never be on the same line\r\n toDispose.push(lens);\r\n }\r\n else {\r\n lens.update(viewZonesAccessor);\r\n lastLensLineNumber = lens.getLineNumber();\r\n }\r\n });\r\n let helper = new CodeLensHelper();\r\n toDispose.forEach((l) => {\r\n l.dispose(helper, viewZonesAccessor);\r\n this._lenses.splice(this._lenses.indexOf(l), 1);\r\n });\r\n helper.commit(decorationsAccessor);\r\n });\r\n });\r\n // Ask for all references again\r\n scheduler.schedule();\r\n }));\r\n this._localToDispose.add(this._editor.onDidFocusEditorWidget(() => {\r\n scheduler.schedule();\r\n }));\r\n this._localToDispose.add(this._editor.onDidScrollChange(e => {\r\n if (e.scrollTopChanged && this._lenses.length > 0) {\r\n this._resolveCodeLensesInViewportSoon();\r\n }\r\n }));\r\n this._localToDispose.add(this._editor.onDidLayoutChange(() => {\r\n this._resolveCodeLensesInViewportSoon();\r\n }));\r\n this._localToDispose.add(toDisposable(() => {\r\n if (this._editor.getModel()) {\r\n const scrollState = StableEditorScrollState.capture(this._editor);\r\n this._editor.changeDecorations(decorationsAccessor => {\r\n this._editor.changeViewZones(viewZonesAccessor => {\r\n this._disposeAllLenses(decorationsAccessor, viewZonesAccessor);\r\n });\r\n });\r\n scrollState.restore(this._editor);\r\n }\r\n else {\r\n // No accessors available\r\n this._disposeAllLenses(undefined, undefined);\r\n }\r\n }));\r\n this._localToDispose.add(this._editor.onMouseDown(e => {\r\n if (e.target.type !== 9 /* CONTENT_WIDGET */) {\r\n return;\r\n }\r\n let target = e.target.element;\r\n if ((target === null || target === void 0 ? void 0 : target.tagName) === 'SPAN') {\r\n target = target.parentElement;\r\n }\r\n if ((target === null || target === void 0 ? void 0 : target.tagName) === 'A') {\r\n for (const lens of this._lenses) {\r\n let command = lens.getCommand(target);\r\n if (command) {\r\n this._commandService.executeCommand(command.id, ...(command.arguments || [])).catch(err => this._notificationService.error(err));\r\n break;\r\n }\r\n }\r\n }\r\n }));\r\n scheduler.schedule();\r\n }\r\n _disposeAllLenses(decChangeAccessor, viewZoneChangeAccessor) {\r\n const helper = new CodeLensHelper();\r\n for (const lens of this._lenses) {\r\n lens.dispose(helper, viewZoneChangeAccessor);\r\n }\r\n if (decChangeAccessor) {\r\n helper.commit(decChangeAccessor);\r\n }\r\n this._lenses.length = 0;\r\n }\r\n _renderCodeLensSymbols(symbols) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n let maxLineNumber = this._editor.getModel().getLineCount();\r\n let groups = [];\r\n let lastGroup;\r\n for (let symbol of symbols.lenses) {\r\n let line = symbol.symbol.range.startLineNumber;\r\n if (line < 1 || line > maxLineNumber) {\r\n // invalid code lens\r\n continue;\r\n }\r\n else if (lastGroup && lastGroup[lastGroup.length - 1].symbol.range.startLineNumber === line) {\r\n // on same line as previous\r\n lastGroup.push(symbol);\r\n }\r\n else {\r\n // on later line as previous\r\n lastGroup = [symbol];\r\n groups.push(lastGroup);\r\n }\r\n }\r\n const scrollState = StableEditorScrollState.capture(this._editor);\r\n const layoutInfo = this._getLayoutInfo();\r\n this._editor.changeDecorations(decorationsAccessor => {\r\n this._editor.changeViewZones(viewZoneAccessor => {\r\n const helper = new CodeLensHelper();\r\n let codeLensIndex = 0;\r\n let groupsIndex = 0;\r\n while (groupsIndex < groups.length && codeLensIndex < this._lenses.length) {\r\n let symbolsLineNumber = groups[groupsIndex][0].symbol.range.startLineNumber;\r\n let codeLensLineNumber = this._lenses[codeLensIndex].getLineNumber();\r\n if (codeLensLineNumber < symbolsLineNumber) {\r\n this._lenses[codeLensIndex].dispose(helper, viewZoneAccessor);\r\n this._lenses.splice(codeLensIndex, 1);\r\n }\r\n else if (codeLensLineNumber === symbolsLineNumber) {\r\n this._lenses[codeLensIndex].updateCodeLensSymbols(groups[groupsIndex], helper);\r\n groupsIndex++;\r\n codeLensIndex++;\r\n }\r\n else {\r\n this._lenses.splice(codeLensIndex, 0, new CodeLensWidget(groups[groupsIndex], this._editor, this._styleClassName, helper, viewZoneAccessor, layoutInfo.codeLensHeight, () => this._resolveCodeLensesInViewportSoon()));\r\n codeLensIndex++;\r\n groupsIndex++;\r\n }\r\n }\r\n // Delete extra code lenses\r\n while (codeLensIndex < this._lenses.length) {\r\n this._lenses[codeLensIndex].dispose(helper, viewZoneAccessor);\r\n this._lenses.splice(codeLensIndex, 1);\r\n }\r\n // Create extra symbols\r\n while (groupsIndex < groups.length) {\r\n this._lenses.push(new CodeLensWidget(groups[groupsIndex], this._editor, this._styleClassName, helper, viewZoneAccessor, layoutInfo.codeLensHeight, () => this._resolveCodeLensesInViewportSoon()));\r\n groupsIndex++;\r\n }\r\n helper.commit(decorationsAccessor);\r\n });\r\n });\r\n scrollState.restore(this._editor);\r\n }\r\n _resolveCodeLensesInViewportSoon() {\r\n const model = this._editor.getModel();\r\n if (model) {\r\n this._resolveCodeLensesScheduler.schedule();\r\n }\r\n }\r\n _resolveCodeLensesInViewport() {\r\n var _a;\r\n (_a = this._resolveCodeLensesPromise) === null || _a === void 0 ? void 0 : _a.cancel();\r\n this._resolveCodeLensesPromise = undefined;\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n const toResolve = [];\r\n const lenses = [];\r\n this._lenses.forEach((lens) => {\r\n const request = lens.computeIfNecessary(model);\r\n if (request) {\r\n toResolve.push(request);\r\n lenses.push(lens);\r\n }\r\n });\r\n if (toResolve.length === 0) {\r\n return;\r\n }\r\n const t1 = Date.now();\r\n const resolvePromise = createCancelablePromise(token => {\r\n const promises = toResolve.map((request, i) => {\r\n const resolvedSymbols = new Array(request.length);\r\n const promises = request.map((request, i) => {\r\n if (!request.symbol.command && typeof request.provider.resolveCodeLens === 'function') {\r\n return Promise.resolve(request.provider.resolveCodeLens(model, request.symbol, token)).then(symbol => {\r\n resolvedSymbols[i] = symbol;\r\n }, onUnexpectedExternalError);\r\n }\r\n else {\r\n resolvedSymbols[i] = request.symbol;\r\n return Promise.resolve(undefined);\r\n }\r\n });\r\n return Promise.all(promises).then(() => {\r\n if (!token.isCancellationRequested && !lenses[i].isDisposed()) {\r\n lenses[i].updateCommands(resolvedSymbols);\r\n }\r\n });\r\n });\r\n return Promise.all(promises);\r\n });\r\n this._resolveCodeLensesPromise = resolvePromise;\r\n this._resolveCodeLensesPromise.then(() => {\r\n // update moving average\r\n const newDelay = this._resolveCodeLensesDelays.update(model, Date.now() - t1);\r\n this._resolveCodeLensesScheduler.delay = newDelay;\r\n if (this._currentCodeLensModel) { // update the cached state with new resolved items\r\n this._codeLensCache.put(model, this._currentCodeLensModel);\r\n }\r\n this._oldCodeLensModels.clear(); // dispose old models once we have updated the UI with the current model\r\n if (resolvePromise === this._resolveCodeLensesPromise) {\r\n this._resolveCodeLensesPromise = undefined;\r\n }\r\n }, err => {\r\n onUnexpectedError(err); // can also be cancellation!\r\n if (resolvePromise === this._resolveCodeLensesPromise) {\r\n this._resolveCodeLensesPromise = undefined;\r\n }\r\n });\r\n }\r\n getLenses() {\r\n return this._lenses;\r\n }\r\n};\r\nCodeLensContribution.ID = 'css.editor.codeLens';\r\nCodeLensContribution = __decorate([\r\n __param(1, ICommandService),\r\n __param(2, INotificationService),\r\n __param(3, ICodeLensCache)\r\n], CodeLensContribution);\r\nexport { CodeLensContribution };\r\nregisterEditorContribution(CodeLensContribution.ID, CodeLensContribution);\r\nregisterEditorAction(class ShowLensesInCurrentLine extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'codelens.showLensesInCurrentLine',\r\n precondition: EditorContextKeys.hasCodeLensProvider,\r\n label: localize('showLensOnLine', \"Show CodeLens Commands For Current Line\"),\r\n alias: 'Show CodeLens Commands For Current Line',\r\n });\r\n }\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const quickInputService = accessor.get(IQuickInputService);\r\n const commandService = accessor.get(ICommandService);\r\n const notificationService = accessor.get(INotificationService);\r\n const lineNumber = editor.getSelection().positionLineNumber;\r\n const codelensController = editor.getContribution(CodeLensContribution.ID);\r\n const items = [];\r\n for (let lens of codelensController.getLenses()) {\r\n if (lens.getLineNumber() === lineNumber) {\r\n for (let item of lens.getItems()) {\r\n const { command } = item.symbol;\r\n if (command) {\r\n items.push({\r\n label: command.title,\r\n command: command\r\n });\r\n }\r\n }\r\n }\r\n }\r\n if (items.length === 0) {\r\n // We dont want an empty picker\r\n return;\r\n }\r\n const item = yield quickInputService.pick(items, { canPickMany: false });\r\n if (!item) {\r\n // Nothing picked\r\n return;\r\n }\r\n try {\r\n yield commandService.executeCommand(item.command.id, ...(item.command.arguments || []));\r\n }\r\n catch (err) {\r\n notificationService.error(err);\r\n }\r\n });\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { illegalArgument } from '../../../base/common/errors.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { ColorProviderRegistry } from '../../common/modes.js';\r\nimport { IModelService } from '../../common/services/modelService.js';\r\nimport { CommandsRegistry } from '../../../platform/commands/common/commands.js';\r\nexport function getColors(model, token) {\r\n const colors = [];\r\n const providers = ColorProviderRegistry.ordered(model).reverse();\r\n const promises = providers.map(provider => Promise.resolve(provider.provideDocumentColors(model, token)).then(result => {\r\n if (Array.isArray(result)) {\r\n for (let colorInfo of result) {\r\n colors.push({ colorInfo, provider });\r\n }\r\n }\r\n }));\r\n return Promise.all(promises).then(() => colors);\r\n}\r\nexport function getColorPresentations(model, colorInfo, provider, token) {\r\n return Promise.resolve(provider.provideColorPresentations(model, colorInfo, token));\r\n}\r\nCommandsRegistry.registerCommand('_executeDocumentColorProvider', function (accessor, ...args) {\r\n const [resource] = args;\r\n if (!(resource instanceof URI)) {\r\n throw illegalArgument();\r\n }\r\n const model = accessor.get(IModelService).getModel(resource);\r\n if (!model) {\r\n throw illegalArgument();\r\n }\r\n const rawCIs = [];\r\n const providers = ColorProviderRegistry.ordered(model).reverse();\r\n const promises = providers.map(provider => Promise.resolve(provider.provideDocumentColors(model, CancellationToken.None)).then(result => {\r\n if (Array.isArray(result)) {\r\n for (let ci of result) {\r\n rawCIs.push({ range: ci.range, color: [ci.color.red, ci.color.green, ci.color.blue, ci.color.alpha] });\r\n }\r\n }\r\n }));\r\n return Promise.all(promises).then(() => rawCIs);\r\n});\r\nCommandsRegistry.registerCommand('_executeColorPresentationProvider', function (accessor, ...args) {\r\n const [color, context] = args;\r\n const { uri, range } = context;\r\n if (!(uri instanceof URI) || !Array.isArray(color) || color.length !== 4 || !Range.isIRange(range)) {\r\n throw illegalArgument();\r\n }\r\n const [red, green, blue, alpha] = color;\r\n const model = accessor.get(IModelService).getModel(uri);\r\n if (!model) {\r\n throw illegalArgument();\r\n }\r\n const colorInfo = {\r\n range,\r\n color: { red, green, blue, alpha }\r\n };\r\n const presentations = [];\r\n const providers = ColorProviderRegistry.ordered(model).reverse();\r\n const promises = providers.map(provider => Promise.resolve(provider.provideColorPresentations(model, colorInfo, CancellationToken.None)).then(result => {\r\n if (Array.isArray(result)) {\r\n presentations.push(...result);\r\n }\r\n }));\r\n return Promise.all(promises).then(() => presentations);\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { TimeoutTimer, createCancelablePromise } from '../../../base/common/async.js';\r\nimport { RGBA } from '../../../base/common/color.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { hash } from '../../../base/common/hash.js';\r\nimport { Disposable, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { ColorProviderRegistry } from '../../common/modes.js';\r\nimport { getColors } from './color.js';\r\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\r\nconst MAX_DECORATORS = 500;\r\nlet ColorDetector = class ColorDetector extends Disposable {\r\n constructor(_editor, _codeEditorService, _configurationService) {\r\n super();\r\n this._editor = _editor;\r\n this._codeEditorService = _codeEditorService;\r\n this._configurationService = _configurationService;\r\n this._localToDispose = this._register(new DisposableStore());\r\n this._decorationsIds = [];\r\n this._colorDatas = new Map();\r\n this._colorDecoratorIds = [];\r\n this._decorationsTypes = new Set();\r\n this._register(_editor.onDidChangeModel(() => {\r\n this._isEnabled = this.isEnabled();\r\n this.onModelChanged();\r\n }));\r\n this._register(_editor.onDidChangeModelLanguage(() => this.onModelChanged()));\r\n this._register(ColorProviderRegistry.onDidChange(() => this.onModelChanged()));\r\n this._register(_editor.onDidChangeConfiguration(() => {\r\n let prevIsEnabled = this._isEnabled;\r\n this._isEnabled = this.isEnabled();\r\n if (prevIsEnabled !== this._isEnabled) {\r\n if (this._isEnabled) {\r\n this.onModelChanged();\r\n }\r\n else {\r\n this.removeAllDecorations();\r\n }\r\n }\r\n }));\r\n this._timeoutTimer = null;\r\n this._computePromise = null;\r\n this._isEnabled = this.isEnabled();\r\n this.onModelChanged();\r\n }\r\n isEnabled() {\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return false;\r\n }\r\n const languageId = model.getLanguageIdentifier();\r\n // handle deprecated settings. [languageId].colorDecorators.enable\r\n const deprecatedConfig = this._configurationService.getValue(languageId.language);\r\n if (deprecatedConfig) {\r\n const colorDecorators = deprecatedConfig['colorDecorators']; // deprecatedConfig.valueOf('.colorDecorators.enable');\r\n if (colorDecorators && colorDecorators['enable'] !== undefined && !colorDecorators['enable']) {\r\n return colorDecorators['enable'];\r\n }\r\n }\r\n return this._editor.getOption(14 /* colorDecorators */);\r\n }\r\n static get(editor) {\r\n return editor.getContribution(this.ID);\r\n }\r\n dispose() {\r\n this.stop();\r\n this.removeAllDecorations();\r\n super.dispose();\r\n }\r\n onModelChanged() {\r\n this.stop();\r\n if (!this._isEnabled) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n if (!model || !ColorProviderRegistry.has(model)) {\r\n return;\r\n }\r\n this._localToDispose.add(this._editor.onDidChangeModelContent(() => {\r\n if (!this._timeoutTimer) {\r\n this._timeoutTimer = new TimeoutTimer();\r\n this._timeoutTimer.cancelAndSet(() => {\r\n this._timeoutTimer = null;\r\n this.beginCompute();\r\n }, ColorDetector.RECOMPUTE_TIME);\r\n }\r\n }));\r\n this.beginCompute();\r\n }\r\n beginCompute() {\r\n this._computePromise = createCancelablePromise(token => {\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return Promise.resolve([]);\r\n }\r\n return getColors(model, token);\r\n });\r\n this._computePromise.then((colorInfos) => {\r\n this.updateDecorations(colorInfos);\r\n this.updateColorDecorators(colorInfos);\r\n this._computePromise = null;\r\n }, onUnexpectedError);\r\n }\r\n stop() {\r\n if (this._timeoutTimer) {\r\n this._timeoutTimer.cancel();\r\n this._timeoutTimer = null;\r\n }\r\n if (this._computePromise) {\r\n this._computePromise.cancel();\r\n this._computePromise = null;\r\n }\r\n this._localToDispose.clear();\r\n }\r\n updateDecorations(colorDatas) {\r\n const decorations = colorDatas.map(c => ({\r\n range: {\r\n startLineNumber: c.colorInfo.range.startLineNumber,\r\n startColumn: c.colorInfo.range.startColumn,\r\n endLineNumber: c.colorInfo.range.endLineNumber,\r\n endColumn: c.colorInfo.range.endColumn\r\n },\r\n options: ModelDecorationOptions.EMPTY\r\n }));\r\n this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, decorations);\r\n this._colorDatas = new Map();\r\n this._decorationsIds.forEach((id, i) => this._colorDatas.set(id, colorDatas[i]));\r\n }\r\n updateColorDecorators(colorData) {\r\n let decorations = [];\r\n let newDecorationsTypes = {};\r\n for (let i = 0; i < colorData.length && decorations.length < MAX_DECORATORS; i++) {\r\n const { red, green, blue, alpha } = colorData[i].colorInfo.color;\r\n const rgba = new RGBA(Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha);\r\n let subKey = hash(`rgba(${rgba.r},${rgba.g},${rgba.b},${rgba.a})`).toString(16);\r\n let color = `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})`;\r\n let key = 'colorBox-' + subKey;\r\n if (!this._decorationsTypes.has(key) && !newDecorationsTypes[key]) {\r\n this._codeEditorService.registerDecorationType(key, {\r\n before: {\r\n contentText: ' ',\r\n border: 'solid 0.1em #000',\r\n margin: '0.1em 0.2em 0 0.2em',\r\n width: '0.8em',\r\n height: '0.8em',\r\n backgroundColor: color\r\n },\r\n dark: {\r\n before: {\r\n border: 'solid 0.1em #eee'\r\n }\r\n }\r\n }, undefined, this._editor);\r\n }\r\n newDecorationsTypes[key] = true;\r\n decorations.push({\r\n range: {\r\n startLineNumber: colorData[i].colorInfo.range.startLineNumber,\r\n startColumn: colorData[i].colorInfo.range.startColumn,\r\n endLineNumber: colorData[i].colorInfo.range.endLineNumber,\r\n endColumn: colorData[i].colorInfo.range.endColumn\r\n },\r\n options: this._codeEditorService.resolveDecorationOptions(key, true)\r\n });\r\n }\r\n this._decorationsTypes.forEach(subType => {\r\n if (!newDecorationsTypes[subType]) {\r\n this._codeEditorService.removeDecorationType(subType);\r\n }\r\n });\r\n this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, decorations);\r\n }\r\n removeAllDecorations() {\r\n this._decorationsIds = this._editor.deltaDecorations(this._decorationsIds, []);\r\n this._colorDecoratorIds = this._editor.deltaDecorations(this._colorDecoratorIds, []);\r\n this._decorationsTypes.forEach(subType => {\r\n this._codeEditorService.removeDecorationType(subType);\r\n });\r\n }\r\n getColorData(position) {\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return null;\r\n }\r\n const decorations = model\r\n .getDecorationsInRange(Range.fromPositions(position, position))\r\n .filter(d => this._colorDatas.has(d.id));\r\n if (decorations.length === 0) {\r\n return null;\r\n }\r\n return this._colorDatas.get(decorations[0].id);\r\n }\r\n};\r\nColorDetector.ID = 'editor.contrib.colorDetector';\r\nColorDetector.RECOMPUTE_TIME = 1000; // ms\r\nColorDetector = __decorate([\r\n __param(1, ICodeEditorService),\r\n __param(2, IConfigurationService)\r\n], ColorDetector);\r\nexport { ColorDetector };\r\nregisterEditorContribution(ColorDetector.ID, ColorDetector);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Emitter } from '../../../base/common/event.js';\r\nexport class ColorPickerModel {\r\n constructor(color, availableColorPresentations, presentationIndex) {\r\n this.presentationIndex = presentationIndex;\r\n this._onColorFlushed = new Emitter();\r\n this.onColorFlushed = this._onColorFlushed.event;\r\n this._onDidChangeColor = new Emitter();\r\n this.onDidChangeColor = this._onDidChangeColor.event;\r\n this._onDidChangePresentation = new Emitter();\r\n this.onDidChangePresentation = this._onDidChangePresentation.event;\r\n this.originalColor = color;\r\n this._color = color;\r\n this._colorPresentations = availableColorPresentations;\r\n }\r\n get color() {\r\n return this._color;\r\n }\r\n set color(color) {\r\n if (this._color.equals(color)) {\r\n return;\r\n }\r\n this._color = color;\r\n this._onDidChangeColor.fire(color);\r\n }\r\n get presentation() { return this.colorPresentations[this.presentationIndex]; }\r\n get colorPresentations() {\r\n return this._colorPresentations;\r\n }\r\n set colorPresentations(colorPresentations) {\r\n this._colorPresentations = colorPresentations;\r\n if (this.presentationIndex > colorPresentations.length - 1) {\r\n this.presentationIndex = 0;\r\n }\r\n this._onDidChangePresentation.fire(this.presentation);\r\n }\r\n selectNextColorPresentation() {\r\n this.presentationIndex = (this.presentationIndex + 1) % this.colorPresentations.length;\r\n this.flushColor();\r\n this._onDidChangePresentation.fire(this.presentation);\r\n }\r\n guessColorPresentation(color, originalText) {\r\n for (let i = 0; i < this.colorPresentations.length; i++) {\r\n if (originalText.toLowerCase() === this.colorPresentations[i].label) {\r\n this.presentationIndex = i;\r\n this._onDidChangePresentation.fire(this.presentation);\r\n break;\r\n }\r\n }\r\n }\r\n flushColor() {\r\n this._onColorFlushed.fire(this._color);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './colorPicker.css';\r\nimport { onDidChangeZoomLevel } from '../../../base/browser/browser.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { GlobalMouseMoveMonitor, standardMouseMoveMerger } from '../../../base/browser/globalMouseMoveMonitor.js';\r\nimport { Widget } from '../../../base/browser/ui/widget.js';\r\nimport { Color, HSVA, RGBA } from '../../../base/common/color.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { editorHoverBackground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nconst $ = dom.$;\r\nexport class ColorPickerHeader extends Disposable {\r\n constructor(container, model, themeService) {\r\n super();\r\n this.model = model;\r\n this.domNode = $('.colorpicker-header');\r\n dom.append(container, this.domNode);\r\n this.pickedColorNode = dom.append(this.domNode, $('.picked-color'));\r\n const colorBox = dom.append(this.domNode, $('.original-color'));\r\n colorBox.style.backgroundColor = Color.Format.CSS.format(this.model.originalColor) || '';\r\n this.backgroundColor = themeService.getColorTheme().getColor(editorHoverBackground) || Color.white;\r\n this._register(registerThemingParticipant((theme, collector) => {\r\n this.backgroundColor = theme.getColor(editorHoverBackground) || Color.white;\r\n }));\r\n this._register(dom.addDisposableListener(this.pickedColorNode, dom.EventType.CLICK, () => this.model.selectNextColorPresentation()));\r\n this._register(dom.addDisposableListener(colorBox, dom.EventType.CLICK, () => {\r\n this.model.color = this.model.originalColor;\r\n this.model.flushColor();\r\n }));\r\n this._register(model.onDidChangeColor(this.onDidChangeColor, this));\r\n this._register(model.onDidChangePresentation(this.onDidChangePresentation, this));\r\n this.pickedColorNode.style.backgroundColor = Color.Format.CSS.format(model.color) || '';\r\n this.pickedColorNode.classList.toggle('light', model.color.rgba.a < 0.5 ? this.backgroundColor.isLighter() : model.color.isLighter());\r\n }\r\n onDidChangeColor(color) {\r\n this.pickedColorNode.style.backgroundColor = Color.Format.CSS.format(color) || '';\r\n this.pickedColorNode.classList.toggle('light', color.rgba.a < 0.5 ? this.backgroundColor.isLighter() : color.isLighter());\r\n this.onDidChangePresentation();\r\n }\r\n onDidChangePresentation() {\r\n this.pickedColorNode.textContent = this.model.presentation ? this.model.presentation.label : '';\r\n }\r\n}\r\nexport class ColorPickerBody extends Disposable {\r\n constructor(container, model, pixelRatio) {\r\n super();\r\n this.model = model;\r\n this.pixelRatio = pixelRatio;\r\n this.domNode = $('.colorpicker-body');\r\n dom.append(container, this.domNode);\r\n this.saturationBox = new SaturationBox(this.domNode, this.model, this.pixelRatio);\r\n this._register(this.saturationBox);\r\n this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange, this));\r\n this._register(this.saturationBox.onColorFlushed(this.flushColor, this));\r\n this.opacityStrip = new OpacityStrip(this.domNode, this.model);\r\n this._register(this.opacityStrip);\r\n this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange, this));\r\n this._register(this.opacityStrip.onColorFlushed(this.flushColor, this));\r\n this.hueStrip = new HueStrip(this.domNode, this.model);\r\n this._register(this.hueStrip);\r\n this._register(this.hueStrip.onDidChange(this.onDidHueChange, this));\r\n this._register(this.hueStrip.onColorFlushed(this.flushColor, this));\r\n }\r\n flushColor() {\r\n this.model.flushColor();\r\n }\r\n onDidSaturationValueChange({ s, v }) {\r\n const hsva = this.model.color.hsva;\r\n this.model.color = new Color(new HSVA(hsva.h, s, v, hsva.a));\r\n }\r\n onDidOpacityChange(a) {\r\n const hsva = this.model.color.hsva;\r\n this.model.color = new Color(new HSVA(hsva.h, hsva.s, hsva.v, a));\r\n }\r\n onDidHueChange(value) {\r\n const hsva = this.model.color.hsva;\r\n const h = (1 - value) * 360;\r\n this.model.color = new Color(new HSVA(h === 360 ? 0 : h, hsva.s, hsva.v, hsva.a));\r\n }\r\n layout() {\r\n this.saturationBox.layout();\r\n this.opacityStrip.layout();\r\n this.hueStrip.layout();\r\n }\r\n}\r\nclass SaturationBox extends Disposable {\r\n constructor(container, model, pixelRatio) {\r\n super();\r\n this.model = model;\r\n this.pixelRatio = pixelRatio;\r\n this._onDidChange = new Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this._onColorFlushed = new Emitter();\r\n this.onColorFlushed = this._onColorFlushed.event;\r\n this.domNode = $('.saturation-wrap');\r\n dom.append(container, this.domNode);\r\n // Create canvas, draw selected color\r\n this.canvas = document.createElement('canvas');\r\n this.canvas.className = 'saturation-box';\r\n dom.append(this.domNode, this.canvas);\r\n // Add selection circle\r\n this.selection = $('.saturation-selection');\r\n dom.append(this.domNode, this.selection);\r\n this.layout();\r\n this._register(dom.addDisposableGenericMouseDownListner(this.domNode, e => this.onMouseDown(e)));\r\n this._register(this.model.onDidChangeColor(this.onDidChangeColor, this));\r\n this.monitor = null;\r\n }\r\n onMouseDown(e) {\r\n this.monitor = this._register(new GlobalMouseMoveMonitor());\r\n const origin = dom.getDomNodePagePosition(this.domNode);\r\n if (e.target !== this.selection) {\r\n this.onDidChangePosition(e.offsetX, e.offsetY);\r\n }\r\n this.monitor.startMonitoring(e.target, e.buttons, standardMouseMoveMerger, event => this.onDidChangePosition(event.posx - origin.left, event.posy - origin.top), () => null);\r\n const mouseUpListener = dom.addDisposableGenericMouseUpListner(document, () => {\r\n this._onColorFlushed.fire();\r\n mouseUpListener.dispose();\r\n if (this.monitor) {\r\n this.monitor.stopMonitoring(true);\r\n this.monitor = null;\r\n }\r\n }, true);\r\n }\r\n onDidChangePosition(left, top) {\r\n const s = Math.max(0, Math.min(1, left / this.width));\r\n const v = Math.max(0, Math.min(1, 1 - (top / this.height)));\r\n this.paintSelection(s, v);\r\n this._onDidChange.fire({ s, v });\r\n }\r\n layout() {\r\n this.width = this.domNode.offsetWidth;\r\n this.height = this.domNode.offsetHeight;\r\n this.canvas.width = this.width * this.pixelRatio;\r\n this.canvas.height = this.height * this.pixelRatio;\r\n this.paint();\r\n const hsva = this.model.color.hsva;\r\n this.paintSelection(hsva.s, hsva.v);\r\n }\r\n paint() {\r\n const hsva = this.model.color.hsva;\r\n const saturatedColor = new Color(new HSVA(hsva.h, 1, 1, 1));\r\n const ctx = this.canvas.getContext('2d');\r\n const whiteGradient = ctx.createLinearGradient(0, 0, this.canvas.width, 0);\r\n whiteGradient.addColorStop(0, 'rgba(255, 255, 255, 1)');\r\n whiteGradient.addColorStop(0.5, 'rgba(255, 255, 255, 0.5)');\r\n whiteGradient.addColorStop(1, 'rgba(255, 255, 255, 0)');\r\n const blackGradient = ctx.createLinearGradient(0, 0, 0, this.canvas.height);\r\n blackGradient.addColorStop(0, 'rgba(0, 0, 0, 0)');\r\n blackGradient.addColorStop(1, 'rgba(0, 0, 0, 1)');\r\n ctx.rect(0, 0, this.canvas.width, this.canvas.height);\r\n ctx.fillStyle = Color.Format.CSS.format(saturatedColor);\r\n ctx.fill();\r\n ctx.fillStyle = whiteGradient;\r\n ctx.fill();\r\n ctx.fillStyle = blackGradient;\r\n ctx.fill();\r\n }\r\n paintSelection(s, v) {\r\n this.selection.style.left = `${s * this.width}px`;\r\n this.selection.style.top = `${this.height - v * this.height}px`;\r\n }\r\n onDidChangeColor() {\r\n if (this.monitor && this.monitor.isMonitoring()) {\r\n return;\r\n }\r\n this.paint();\r\n }\r\n}\r\nclass Strip extends Disposable {\r\n constructor(container, model) {\r\n super();\r\n this.model = model;\r\n this._onDidChange = new Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this._onColorFlushed = new Emitter();\r\n this.onColorFlushed = this._onColorFlushed.event;\r\n this.domNode = dom.append(container, $('.strip'));\r\n this.overlay = dom.append(this.domNode, $('.overlay'));\r\n this.slider = dom.append(this.domNode, $('.slider'));\r\n this.slider.style.top = `0px`;\r\n this._register(dom.addDisposableGenericMouseDownListner(this.domNode, e => this.onMouseDown(e)));\r\n this.layout();\r\n }\r\n layout() {\r\n this.height = this.domNode.offsetHeight - this.slider.offsetHeight;\r\n const value = this.getValue(this.model.color);\r\n this.updateSliderPosition(value);\r\n }\r\n onMouseDown(e) {\r\n const monitor = this._register(new GlobalMouseMoveMonitor());\r\n const origin = dom.getDomNodePagePosition(this.domNode);\r\n this.domNode.classList.add('grabbing');\r\n if (e.target !== this.slider) {\r\n this.onDidChangeTop(e.offsetY);\r\n }\r\n monitor.startMonitoring(e.target, e.buttons, standardMouseMoveMerger, event => this.onDidChangeTop(event.posy - origin.top), () => null);\r\n const mouseUpListener = dom.addDisposableGenericMouseUpListner(document, () => {\r\n this._onColorFlushed.fire();\r\n mouseUpListener.dispose();\r\n monitor.stopMonitoring(true);\r\n this.domNode.classList.remove('grabbing');\r\n }, true);\r\n }\r\n onDidChangeTop(top) {\r\n const value = Math.max(0, Math.min(1, 1 - (top / this.height)));\r\n this.updateSliderPosition(value);\r\n this._onDidChange.fire(value);\r\n }\r\n updateSliderPosition(value) {\r\n this.slider.style.top = `${(1 - value) * this.height}px`;\r\n }\r\n}\r\nclass OpacityStrip extends Strip {\r\n constructor(container, model) {\r\n super(container, model);\r\n this.domNode.classList.add('opacity-strip');\r\n this._register(model.onDidChangeColor(this.onDidChangeColor, this));\r\n this.onDidChangeColor(this.model.color);\r\n }\r\n onDidChangeColor(color) {\r\n const { r, g, b } = color.rgba;\r\n const opaque = new Color(new RGBA(r, g, b, 1));\r\n const transparent = new Color(new RGBA(r, g, b, 0));\r\n this.overlay.style.background = `linear-gradient(to bottom, ${opaque} 0%, ${transparent} 100%)`;\r\n }\r\n getValue(color) {\r\n return color.hsva.a;\r\n }\r\n}\r\nclass HueStrip extends Strip {\r\n constructor(container, model) {\r\n super(container, model);\r\n this.domNode.classList.add('hue-strip');\r\n }\r\n getValue(color) {\r\n return 1 - (color.hsva.h / 360);\r\n }\r\n}\r\nexport class ColorPickerWidget extends Widget {\r\n constructor(container, model, pixelRatio, themeService) {\r\n super();\r\n this.model = model;\r\n this.pixelRatio = pixelRatio;\r\n this._register(onDidChangeZoomLevel(() => this.layout()));\r\n const element = $('.colorpicker-widget');\r\n container.appendChild(element);\r\n const header = new ColorPickerHeader(element, this.model, themeService);\r\n this.body = new ColorPickerBody(element, this.model, this.pixelRatio);\r\n this._register(header);\r\n this._register(this.body);\r\n }\r\n layout() {\r\n this.body.layout();\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { RunOnceScheduler, createCancelablePromise } from '../../../base/common/async.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nexport class HoverOperation {\r\n constructor(computer, success, error, progress, hoverTime) {\r\n this._computer = computer;\r\n this._state = 0 /* IDLE */;\r\n this._hoverTime = hoverTime;\r\n this._firstWaitScheduler = new RunOnceScheduler(() => this._triggerAsyncComputation(), 0);\r\n this._secondWaitScheduler = new RunOnceScheduler(() => this._triggerSyncComputation(), 0);\r\n this._loadingMessageScheduler = new RunOnceScheduler(() => this._showLoadingMessage(), 0);\r\n this._asyncComputationPromise = null;\r\n this._asyncComputationPromiseDone = false;\r\n this._completeCallback = success;\r\n this._errorCallback = error;\r\n this._progressCallback = progress;\r\n }\r\n setHoverTime(hoverTime) {\r\n this._hoverTime = hoverTime;\r\n }\r\n _firstWaitTime() {\r\n return this._hoverTime / 2;\r\n }\r\n _secondWaitTime() {\r\n return this._hoverTime / 2;\r\n }\r\n _loadingMessageTime() {\r\n return 3 * this._hoverTime;\r\n }\r\n _triggerAsyncComputation() {\r\n this._state = 2 /* SECOND_WAIT */;\r\n this._secondWaitScheduler.schedule(this._secondWaitTime());\r\n if (this._computer.computeAsync) {\r\n this._asyncComputationPromiseDone = false;\r\n this._asyncComputationPromise = createCancelablePromise(token => this._computer.computeAsync(token));\r\n this._asyncComputationPromise.then((asyncResult) => {\r\n this._asyncComputationPromiseDone = true;\r\n this._withAsyncResult(asyncResult);\r\n }, (e) => this._onError(e));\r\n }\r\n else {\r\n this._asyncComputationPromiseDone = true;\r\n }\r\n }\r\n _triggerSyncComputation() {\r\n if (this._computer.computeSync) {\r\n this._computer.onResult(this._computer.computeSync(), true);\r\n }\r\n if (this._asyncComputationPromiseDone) {\r\n this._state = 0 /* IDLE */;\r\n this._onComplete(this._computer.getResult());\r\n }\r\n else {\r\n this._state = 3 /* WAITING_FOR_ASYNC_COMPUTATION */;\r\n this._onProgress(this._computer.getResult());\r\n }\r\n }\r\n _showLoadingMessage() {\r\n if (this._state === 3 /* WAITING_FOR_ASYNC_COMPUTATION */) {\r\n this._onProgress(this._computer.getResultWithLoadingMessage());\r\n }\r\n }\r\n _withAsyncResult(asyncResult) {\r\n if (asyncResult) {\r\n this._computer.onResult(asyncResult, false);\r\n }\r\n if (this._state === 3 /* WAITING_FOR_ASYNC_COMPUTATION */) {\r\n this._state = 0 /* IDLE */;\r\n this._onComplete(this._computer.getResult());\r\n }\r\n }\r\n _onComplete(value) {\r\n this._completeCallback(value);\r\n }\r\n _onError(error) {\r\n if (this._errorCallback) {\r\n this._errorCallback(error);\r\n }\r\n else {\r\n onUnexpectedError(error);\r\n }\r\n }\r\n _onProgress(value) {\r\n this._progressCallback(value);\r\n }\r\n start(mode) {\r\n if (mode === 0 /* Delayed */) {\r\n if (this._state === 0 /* IDLE */) {\r\n this._state = 1 /* FIRST_WAIT */;\r\n this._firstWaitScheduler.schedule(this._firstWaitTime());\r\n this._loadingMessageScheduler.schedule(this._loadingMessageTime());\r\n }\r\n }\r\n else {\r\n switch (this._state) {\r\n case 0 /* IDLE */:\r\n this._triggerAsyncComputation();\r\n this._secondWaitScheduler.cancel();\r\n this._triggerSyncComputation();\r\n break;\r\n case 2 /* SECOND_WAIT */:\r\n this._secondWaitScheduler.cancel();\r\n this._triggerSyncComputation();\r\n break;\r\n }\r\n }\r\n }\r\n cancel() {\r\n this._loadingMessageScheduler.cancel();\r\n if (this._state === 1 /* FIRST_WAIT */) {\r\n this._firstWaitScheduler.cancel();\r\n }\r\n if (this._state === 2 /* SECOND_WAIT */) {\r\n this._secondWaitScheduler.cancel();\r\n if (this._asyncComputationPromise) {\r\n this._asyncComputationPromise.cancel();\r\n this._asyncComputationPromise = null;\r\n }\r\n }\r\n if (this._state === 3 /* WAITING_FOR_ASYNC_COMPUTATION */) {\r\n if (this._asyncComputationPromise) {\r\n this._asyncComputationPromise.cancel();\r\n this._asyncComputationPromise = null;\r\n }\r\n }\r\n this._state = 0 /* IDLE */;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './hover.css';\r\nimport * as dom from '../../dom.js';\r\nimport { Disposable } from '../../../common/lifecycle.js';\r\nimport { DomScrollableElement } from '../scrollbar/scrollableElement.js';\r\nconst $ = dom.$;\r\nexport class HoverWidget extends Disposable {\r\n constructor() {\r\n super();\r\n this.containerDomNode = document.createElement('div');\r\n this.containerDomNode.className = 'monaco-hover';\r\n this.containerDomNode.tabIndex = 0;\r\n this.containerDomNode.setAttribute('role', 'tooltip');\r\n this.contentsDomNode = document.createElement('div');\r\n this.contentsDomNode.className = 'monaco-hover-content';\r\n this._scrollbar = this._register(new DomScrollableElement(this.contentsDomNode, {\r\n consumeMouseWheelIfScrollbarIsNeeded: true\r\n }));\r\n this.containerDomNode.appendChild(this._scrollbar.getDomNode());\r\n }\r\n onContentsChanged() {\r\n this._scrollbar.scanDomNode();\r\n }\r\n}\r\nexport function renderHoverAction(parent, actionOptions, keybindingLabel) {\r\n const actionContainer = dom.append(parent, $('div.action-container'));\r\n const action = dom.append(actionContainer, $('a.action'));\r\n action.setAttribute('href', '#');\r\n action.setAttribute('role', 'button');\r\n if (actionOptions.iconClass) {\r\n dom.append(action, $(`span.icon.${actionOptions.iconClass}`));\r\n }\r\n const label = dom.append(action, $('span'));\r\n label.textContent = keybindingLabel ? `${actionOptions.label} (${keybindingLabel})` : actionOptions.label;\r\n return dom.addDisposableListener(actionContainer, dom.EventType.CLICK, e => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n actionOptions.run(actionContainer);\r\n });\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { URI } from './uri.js';\r\nimport { Schemas } from './network.js';\r\nimport { isWindows } from './platform.js';\r\nimport { basename } from './resources.js';\r\nimport { hasDriveLetter, isRootOrDriveLetter } from './extpath.js';\r\nexport function getBaseLabel(resource) {\r\n if (!resource) {\r\n return undefined;\r\n }\r\n if (typeof resource === 'string') {\r\n resource = URI.file(resource);\r\n }\r\n const base = basename(resource) || (resource.scheme === Schemas.file ? resource.fsPath : resource.path) /* can be empty string if '/' is passed in */;\r\n // convert c: => C:\r\n if (isWindows && isRootOrDriveLetter(base)) {\r\n return normalizeDriveLetter(base);\r\n }\r\n return base;\r\n}\r\nexport function normalizeDriveLetter(path) {\r\n if (hasDriveLetter(path)) {\r\n return path.charAt(0).toUpperCase() + path.slice(1);\r\n }\r\n return path;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport * as objects from '../../../base/common/objects.js';\r\nimport { ICodeEditorService } from '../services/codeEditorService.js';\r\nimport { CodeEditorWidget } from './codeEditorWidget.js';\r\nimport { ICommandService } from '../../../platform/commands/common/commands.js';\r\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\r\nimport { IThemeService } from '../../../platform/theme/common/themeService.js';\r\nimport { IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';\r\nlet EmbeddedCodeEditorWidget = class EmbeddedCodeEditorWidget extends CodeEditorWidget {\r\n constructor(domElement, options, parentEditor, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService) {\r\n super(domElement, Object.assign(Object.assign({}, parentEditor.getRawOptions()), { overflowWidgetsDomNode: parentEditor.getOverflowWidgetsDomNode() }), {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService);\r\n this._parentEditor = parentEditor;\r\n this._overwriteOptions = options;\r\n // Overwrite parent's options\r\n super.updateOptions(this._overwriteOptions);\r\n this._register(parentEditor.onDidChangeConfiguration((e) => this._onParentConfigurationChanged(e)));\r\n }\r\n getParentEditor() {\r\n return this._parentEditor;\r\n }\r\n _onParentConfigurationChanged(e) {\r\n super.updateOptions(this._parentEditor.getRawOptions());\r\n super.updateOptions(this._overwriteOptions);\r\n }\r\n updateOptions(newOptions) {\r\n objects.mixin(this._overwriteOptions, newOptions, true);\r\n super.updateOptions(this._overwriteOptions);\r\n }\r\n};\r\nEmbeddedCodeEditorWidget = __decorate([\r\n __param(3, IInstantiationService),\r\n __param(4, ICodeEditorService),\r\n __param(5, ICommandService),\r\n __param(6, IContextKeyService),\r\n __param(7, IThemeService),\r\n __param(8, INotificationService),\r\n __param(9, IAccessibilityService)\r\n], EmbeddedCodeEditorWidget);\r\nexport { EmbeddedCodeEditorWidget };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './zoneWidget.css';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { Sash } from '../../../base/browser/ui/sash/sash.js';\r\nimport { Color, RGBA } from '../../../base/common/color.js';\r\nimport { IdGenerator } from '../../../base/common/idGenerator.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport * as objects from '../../../base/common/objects.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nconst defaultColor = new Color(new RGBA(0, 122, 204));\r\nconst defaultOptions = {\r\n showArrow: true,\r\n showFrame: true,\r\n className: '',\r\n frameColor: defaultColor,\r\n arrowColor: defaultColor,\r\n keepEditorSelection: false\r\n};\r\nconst WIDGET_ID = 'vs.editor.contrib.zoneWidget';\r\nexport class ViewZoneDelegate {\r\n constructor(domNode, afterLineNumber, afterColumn, heightInLines, onDomNodeTop, onComputedHeight) {\r\n this.id = ''; // A valid zone id should be greater than 0\r\n this.domNode = domNode;\r\n this.afterLineNumber = afterLineNumber;\r\n this.afterColumn = afterColumn;\r\n this.heightInLines = heightInLines;\r\n this._onDomNodeTop = onDomNodeTop;\r\n this._onComputedHeight = onComputedHeight;\r\n }\r\n onDomNodeTop(top) {\r\n this._onDomNodeTop(top);\r\n }\r\n onComputedHeight(height) {\r\n this._onComputedHeight(height);\r\n }\r\n}\r\nexport class OverlayWidgetDelegate {\r\n constructor(id, domNode) {\r\n this._id = id;\r\n this._domNode = domNode;\r\n }\r\n getId() {\r\n return this._id;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return null;\r\n }\r\n}\r\nclass Arrow {\r\n constructor(_editor) {\r\n this._editor = _editor;\r\n this._ruleName = Arrow._IdGenerator.nextId();\r\n this._decorations = [];\r\n this._color = null;\r\n this._height = -1;\r\n //\r\n }\r\n dispose() {\r\n this.hide();\r\n dom.removeCSSRulesContainingSelector(this._ruleName);\r\n }\r\n set color(value) {\r\n if (this._color !== value) {\r\n this._color = value;\r\n this._updateStyle();\r\n }\r\n }\r\n set height(value) {\r\n if (this._height !== value) {\r\n this._height = value;\r\n this._updateStyle();\r\n }\r\n }\r\n _updateStyle() {\r\n dom.removeCSSRulesContainingSelector(this._ruleName);\r\n dom.createCSSRule(`.monaco-editor ${this._ruleName}`, `border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `);\r\n }\r\n show(where) {\r\n this._decorations = this._editor.deltaDecorations(this._decorations, [{ range: Range.fromPositions(where), options: { className: this._ruleName, stickiness: 1 /* NeverGrowsWhenTypingAtEdges */ } }]);\r\n }\r\n hide() {\r\n this._editor.deltaDecorations(this._decorations, []);\r\n }\r\n}\r\nArrow._IdGenerator = new IdGenerator('.arrow-decoration-');\r\nexport class ZoneWidget {\r\n constructor(editor, options = {}) {\r\n this._arrow = null;\r\n this._overlayWidget = null;\r\n this._resizeSash = null;\r\n this._positionMarkerId = [];\r\n this._viewZone = null;\r\n this._disposables = new DisposableStore();\r\n this.container = null;\r\n this._isShowing = false;\r\n this.editor = editor;\r\n this.options = objects.deepClone(options);\r\n objects.mixin(this.options, defaultOptions, false);\r\n this.domNode = document.createElement('div');\r\n if (!this.options.isAccessible) {\r\n this.domNode.setAttribute('aria-hidden', 'true');\r\n this.domNode.setAttribute('role', 'presentation');\r\n }\r\n this._disposables.add(this.editor.onDidLayoutChange((info) => {\r\n const width = this._getWidth(info);\r\n this.domNode.style.width = width + 'px';\r\n this.domNode.style.left = this._getLeft(info) + 'px';\r\n this._onWidth(width);\r\n }));\r\n }\r\n dispose() {\r\n if (this._overlayWidget) {\r\n this.editor.removeOverlayWidget(this._overlayWidget);\r\n this._overlayWidget = null;\r\n }\r\n if (this._viewZone) {\r\n this.editor.changeViewZones(accessor => {\r\n if (this._viewZone) {\r\n accessor.removeZone(this._viewZone.id);\r\n }\r\n this._viewZone = null;\r\n });\r\n }\r\n this.editor.deltaDecorations(this._positionMarkerId, []);\r\n this._positionMarkerId = [];\r\n this._disposables.dispose();\r\n }\r\n create() {\r\n this.domNode.classList.add('zone-widget');\r\n if (this.options.className) {\r\n this.domNode.classList.add(this.options.className);\r\n }\r\n this.container = document.createElement('div');\r\n this.container.classList.add('zone-widget-container');\r\n this.domNode.appendChild(this.container);\r\n if (this.options.showArrow) {\r\n this._arrow = new Arrow(this.editor);\r\n this._disposables.add(this._arrow);\r\n }\r\n this._fillContainer(this.container);\r\n this._initSash();\r\n this._applyStyles();\r\n }\r\n style(styles) {\r\n if (styles.frameColor) {\r\n this.options.frameColor = styles.frameColor;\r\n }\r\n if (styles.arrowColor) {\r\n this.options.arrowColor = styles.arrowColor;\r\n }\r\n this._applyStyles();\r\n }\r\n _applyStyles() {\r\n if (this.container && this.options.frameColor) {\r\n let frameColor = this.options.frameColor.toString();\r\n this.container.style.borderTopColor = frameColor;\r\n this.container.style.borderBottomColor = frameColor;\r\n }\r\n if (this._arrow && this.options.arrowColor) {\r\n let arrowColor = this.options.arrowColor.toString();\r\n this._arrow.color = arrowColor;\r\n }\r\n }\r\n _getWidth(info) {\r\n return info.width - info.minimap.minimapWidth - info.verticalScrollbarWidth;\r\n }\r\n _getLeft(info) {\r\n // If minimap is to the left, we move beyond it\r\n if (info.minimap.minimapWidth > 0 && info.minimap.minimapLeft === 0) {\r\n return info.minimap.minimapWidth;\r\n }\r\n return 0;\r\n }\r\n _onViewZoneTop(top) {\r\n this.domNode.style.top = top + 'px';\r\n }\r\n _onViewZoneHeight(height) {\r\n this.domNode.style.height = `${height}px`;\r\n if (this.container) {\r\n let containerHeight = height - this._decoratingElementsHeight();\r\n this.container.style.height = `${containerHeight}px`;\r\n const layoutInfo = this.editor.getLayoutInfo();\r\n this._doLayout(containerHeight, this._getWidth(layoutInfo));\r\n }\r\n if (this._resizeSash) {\r\n this._resizeSash.layout();\r\n }\r\n }\r\n get position() {\r\n const [id] = this._positionMarkerId;\r\n if (!id) {\r\n return undefined;\r\n }\r\n const model = this.editor.getModel();\r\n if (!model) {\r\n return undefined;\r\n }\r\n const range = model.getDecorationRange(id);\r\n if (!range) {\r\n return undefined;\r\n }\r\n return range.getStartPosition();\r\n }\r\n show(rangeOrPos, heightInLines) {\r\n const range = Range.isIRange(rangeOrPos) ? Range.lift(rangeOrPos) : Range.fromPositions(rangeOrPos);\r\n this._isShowing = true;\r\n this._showImpl(range, heightInLines);\r\n this._isShowing = false;\r\n this._positionMarkerId = this.editor.deltaDecorations(this._positionMarkerId, [{ range, options: ModelDecorationOptions.EMPTY }]);\r\n }\r\n hide() {\r\n if (this._viewZone) {\r\n this.editor.changeViewZones(accessor => {\r\n if (this._viewZone) {\r\n accessor.removeZone(this._viewZone.id);\r\n }\r\n });\r\n this._viewZone = null;\r\n }\r\n if (this._overlayWidget) {\r\n this.editor.removeOverlayWidget(this._overlayWidget);\r\n this._overlayWidget = null;\r\n }\r\n if (this._arrow) {\r\n this._arrow.hide();\r\n }\r\n }\r\n _decoratingElementsHeight() {\r\n let lineHeight = this.editor.getOption(53 /* lineHeight */);\r\n let result = 0;\r\n if (this.options.showArrow) {\r\n let arrowHeight = Math.round(lineHeight / 3);\r\n result += 2 * arrowHeight;\r\n }\r\n if (this.options.showFrame) {\r\n let frameThickness = Math.round(lineHeight / 9);\r\n result += 2 * frameThickness;\r\n }\r\n return result;\r\n }\r\n _showImpl(where, heightInLines) {\r\n const position = where.getStartPosition();\r\n const layoutInfo = this.editor.getLayoutInfo();\r\n const width = this._getWidth(layoutInfo);\r\n this.domNode.style.width = `${width}px`;\r\n this.domNode.style.left = this._getLeft(layoutInfo) + 'px';\r\n // Render the widget as zone (rendering) and widget (lifecycle)\r\n const viewZoneDomNode = document.createElement('div');\r\n viewZoneDomNode.style.overflow = 'hidden';\r\n const lineHeight = this.editor.getOption(53 /* lineHeight */);\r\n // adjust heightInLines to viewport\r\n const maxHeightInLines = Math.max(12, (this.editor.getLayoutInfo().height / lineHeight) * 0.8);\r\n heightInLines = Math.min(heightInLines, maxHeightInLines);\r\n let arrowHeight = 0;\r\n let frameThickness = 0;\r\n // Render the arrow one 1/3 of an editor line height\r\n if (this._arrow && this.options.showArrow) {\r\n arrowHeight = Math.round(lineHeight / 3);\r\n this._arrow.height = arrowHeight;\r\n this._arrow.show(position);\r\n }\r\n // Render the frame as 1/9 of an editor line height\r\n if (this.options.showFrame) {\r\n frameThickness = Math.round(lineHeight / 9);\r\n }\r\n // insert zone widget\r\n this.editor.changeViewZones((accessor) => {\r\n if (this._viewZone) {\r\n accessor.removeZone(this._viewZone.id);\r\n }\r\n if (this._overlayWidget) {\r\n this.editor.removeOverlayWidget(this._overlayWidget);\r\n this._overlayWidget = null;\r\n }\r\n this.domNode.style.top = '-1000px';\r\n this._viewZone = new ViewZoneDelegate(viewZoneDomNode, position.lineNumber, position.column, heightInLines, (top) => this._onViewZoneTop(top), (height) => this._onViewZoneHeight(height));\r\n this._viewZone.id = accessor.addZone(this._viewZone);\r\n this._overlayWidget = new OverlayWidgetDelegate(WIDGET_ID + this._viewZone.id, this.domNode);\r\n this.editor.addOverlayWidget(this._overlayWidget);\r\n });\r\n if (this.container && this.options.showFrame) {\r\n const width = this.options.frameWidth ? this.options.frameWidth : frameThickness;\r\n this.container.style.borderTopWidth = width + 'px';\r\n this.container.style.borderBottomWidth = width + 'px';\r\n }\r\n let containerHeight = heightInLines * lineHeight - this._decoratingElementsHeight();\r\n if (this.container) {\r\n this.container.style.top = arrowHeight + 'px';\r\n this.container.style.height = containerHeight + 'px';\r\n this.container.style.overflow = 'hidden';\r\n }\r\n this._doLayout(containerHeight, width);\r\n if (!this.options.keepEditorSelection) {\r\n this.editor.setSelection(where);\r\n }\r\n const model = this.editor.getModel();\r\n if (model) {\r\n const revealLine = where.endLineNumber + 1;\r\n if (revealLine <= model.getLineCount()) {\r\n // reveal line below the zone widget\r\n this.revealLine(revealLine, false);\r\n }\r\n else {\r\n // reveal last line atop\r\n this.revealLine(model.getLineCount(), true);\r\n }\r\n }\r\n }\r\n revealLine(lineNumber, isLastLine) {\r\n if (isLastLine) {\r\n this.editor.revealLineInCenter(lineNumber, 0 /* Smooth */);\r\n }\r\n else {\r\n this.editor.revealLine(lineNumber, 0 /* Smooth */);\r\n }\r\n }\r\n setCssClass(className, classToReplace) {\r\n if (!this.container) {\r\n return;\r\n }\r\n if (classToReplace) {\r\n this.container.classList.remove(classToReplace);\r\n }\r\n this.container.classList.add(className);\r\n }\r\n _onWidth(widthInPixel) {\r\n // implement in subclass\r\n }\r\n _doLayout(heightInPixel, widthInPixel) {\r\n // implement in subclass\r\n }\r\n _relayout(newHeightInLines) {\r\n if (this._viewZone && this._viewZone.heightInLines !== newHeightInLines) {\r\n this.editor.changeViewZones(accessor => {\r\n if (this._viewZone) {\r\n this._viewZone.heightInLines = newHeightInLines;\r\n accessor.layoutZone(this._viewZone.id);\r\n }\r\n });\r\n }\r\n }\r\n // --- sash\r\n _initSash() {\r\n if (this._resizeSash) {\r\n return;\r\n }\r\n this._resizeSash = this._disposables.add(new Sash(this.domNode, this, { orientation: 1 /* HORIZONTAL */ }));\r\n if (!this.options.isResizeable) {\r\n this._resizeSash.hide();\r\n this._resizeSash.state = 0 /* Disabled */;\r\n }\r\n let data;\r\n this._disposables.add(this._resizeSash.onDidStart((e) => {\r\n if (this._viewZone) {\r\n data = {\r\n startY: e.startY,\r\n heightInLines: this._viewZone.heightInLines,\r\n };\r\n }\r\n }));\r\n this._disposables.add(this._resizeSash.onDidEnd(() => {\r\n data = undefined;\r\n }));\r\n this._disposables.add(this._resizeSash.onDidChange((evt) => {\r\n if (data) {\r\n let lineDelta = (evt.currentY - data.startY) / this.editor.getOption(53 /* lineHeight */);\r\n let roundedLineDelta = lineDelta < 0 ? Math.ceil(lineDelta) : Math.floor(lineDelta);\r\n let newHeightInLines = data.heightInLines + roundedLineDelta;\r\n if (newHeightInLines > 5 && newHeightInLines < 35) {\r\n this._relayout(newHeightInLines);\r\n }\r\n }\r\n }));\r\n }\r\n getHorizontalSashLeft() {\r\n return 0;\r\n }\r\n getHorizontalSashTop() {\r\n return (this.domNode.style.height === null ? 0 : parseInt(this.domNode.style.height)) - (this._decoratingElementsHeight() / 2);\r\n }\r\n getHorizontalSashWidth() {\r\n const layoutInfo = this.editor.getLayoutInfo();\r\n return layoutInfo.width - layoutInfo.minimap.minimapWidth;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './dropdown.css';\r\nimport { Gesture, EventType as GestureEventType } from '../../touch.js';\r\nimport { ActionRunner } from '../../../common/actions.js';\r\nimport { EventHelper, EventType, append, $, addDisposableListener } from '../../dom.js';\r\nimport { StandardKeyboardEvent } from '../../keyboardEvent.js';\r\nimport { Emitter } from '../../../common/event.js';\r\nexport class BaseDropdown extends ActionRunner {\r\n constructor(container, options) {\r\n super();\r\n this._onDidChangeVisibility = new Emitter();\r\n this.onDidChangeVisibility = this._onDidChangeVisibility.event;\r\n this._element = append(container, $('.monaco-dropdown'));\r\n this._label = append(this._element, $('.dropdown-label'));\r\n let labelRenderer = options.labelRenderer;\r\n if (!labelRenderer) {\r\n labelRenderer = (container) => {\r\n container.textContent = options.label || '';\r\n return null;\r\n };\r\n }\r\n for (const event of [EventType.CLICK, EventType.MOUSE_DOWN, GestureEventType.Tap]) {\r\n this._register(addDisposableListener(this.element, event, e => EventHelper.stop(e, true))); // prevent default click behaviour to trigger\r\n }\r\n for (const event of [EventType.MOUSE_DOWN, GestureEventType.Tap]) {\r\n this._register(addDisposableListener(this._label, event, e => {\r\n if (e instanceof MouseEvent && e.detail > 1) {\r\n return; // prevent multiple clicks to open multiple context menus (https://github.com/microsoft/vscode/issues/41363)\r\n }\r\n if (this.visible) {\r\n this.hide();\r\n }\r\n else {\r\n this.show();\r\n }\r\n }));\r\n }\r\n this._register(addDisposableListener(this._label, EventType.KEY_UP, e => {\r\n const event = new StandardKeyboardEvent(e);\r\n if (event.equals(3 /* Enter */) || event.equals(10 /* Space */)) {\r\n EventHelper.stop(e, true); // https://github.com/microsoft/vscode/issues/57997\r\n if (this.visible) {\r\n this.hide();\r\n }\r\n else {\r\n this.show();\r\n }\r\n }\r\n }));\r\n const cleanupFn = labelRenderer(this._label);\r\n if (cleanupFn) {\r\n this._register(cleanupFn);\r\n }\r\n this._register(Gesture.addTarget(this._label));\r\n }\r\n get element() {\r\n return this._element;\r\n }\r\n show() {\r\n if (!this.visible) {\r\n this.visible = true;\r\n this._onDidChangeVisibility.fire(true);\r\n }\r\n }\r\n hide() {\r\n if (this.visible) {\r\n this.visible = false;\r\n this._onDidChangeVisibility.fire(false);\r\n }\r\n }\r\n dispose() {\r\n super.dispose();\r\n this.hide();\r\n if (this.boxContainer) {\r\n this.boxContainer.remove();\r\n this.boxContainer = undefined;\r\n }\r\n if (this.contents) {\r\n this.contents.remove();\r\n this.contents = undefined;\r\n }\r\n if (this._label) {\r\n this._label.remove();\r\n this._label = undefined;\r\n }\r\n }\r\n}\r\nexport class DropdownMenu extends BaseDropdown {\r\n constructor(container, options) {\r\n super(container, options);\r\n this._actions = [];\r\n this._contextMenuProvider = options.contextMenuProvider;\r\n this.actions = options.actions || [];\r\n this.actionProvider = options.actionProvider;\r\n this.menuClassName = options.menuClassName || '';\r\n this.menuAsChild = !!options.menuAsChild;\r\n }\r\n set menuOptions(options) {\r\n this._menuOptions = options;\r\n }\r\n get menuOptions() {\r\n return this._menuOptions;\r\n }\r\n get actions() {\r\n if (this.actionProvider) {\r\n return this.actionProvider.getActions();\r\n }\r\n return this._actions;\r\n }\r\n set actions(actions) {\r\n this._actions = actions;\r\n }\r\n show() {\r\n super.show();\r\n this.element.classList.add('active');\r\n this._contextMenuProvider.showContextMenu({\r\n getAnchor: () => this.element,\r\n getActions: () => this.actions,\r\n getActionsContext: () => this.menuOptions ? this.menuOptions.context : null,\r\n getActionViewItem: action => this.menuOptions && this.menuOptions.actionViewItemProvider ? this.menuOptions.actionViewItemProvider(action) : undefined,\r\n getKeyBinding: action => this.menuOptions && this.menuOptions.getKeyBinding ? this.menuOptions.getKeyBinding(action) : undefined,\r\n getMenuClassName: () => this.menuClassName,\r\n onHide: () => this.onHide(),\r\n actionRunner: this.menuOptions ? this.menuOptions.actionRunner : undefined,\r\n anchorAlignment: this.menuOptions ? this.menuOptions.anchorAlignment : 0 /* LEFT */,\r\n domForShadowRoot: this.menuAsChild ? this.element : undefined\r\n });\r\n }\r\n hide() {\r\n super.hide();\r\n }\r\n onHide() {\r\n this.hide();\r\n this.element.classList.remove('active');\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './dropdown.css';\r\nimport { append, $ } from '../../dom.js';\r\nimport { Emitter } from '../../../common/event.js';\r\nimport { BaseActionViewItem } from '../actionbar/actionViewItems.js';\r\nimport { DropdownMenu } from './dropdown.js';\r\nexport class DropdownMenuActionViewItem extends BaseActionViewItem {\r\n constructor(action, menuActionsOrProvider, contextMenuProvider, options = {}) {\r\n super(null, action, options);\r\n this.options = options;\r\n this.actionItem = null;\r\n this._onDidChangeVisibility = this._register(new Emitter());\r\n this.menuActionsOrProvider = menuActionsOrProvider;\r\n this.contextMenuProvider = contextMenuProvider;\r\n if (this.options.actionRunner) {\r\n this.actionRunner = this.options.actionRunner;\r\n }\r\n }\r\n render(container) {\r\n this.actionItem = container;\r\n const labelRenderer = (el) => {\r\n this.element = append(el, $('a.action-label'));\r\n let classNames = [];\r\n if (typeof this.options.classNames === 'string') {\r\n classNames = this.options.classNames.split(/\\s+/g).filter(s => !!s);\r\n }\r\n else if (this.options.classNames) {\r\n classNames = this.options.classNames;\r\n }\r\n // todo@aeschli: remove codicon, should come through `this.options.classNames`\r\n if (!classNames.find(c => c === 'icon')) {\r\n classNames.push('codicon');\r\n }\r\n this.element.classList.add(...classNames);\r\n this.element.tabIndex = 0;\r\n this.element.setAttribute('role', 'button');\r\n this.element.setAttribute('aria-haspopup', 'true');\r\n this.element.setAttribute('aria-expanded', 'false');\r\n this.element.title = this._action.label || '';\r\n return null;\r\n };\r\n const isActionsArray = Array.isArray(this.menuActionsOrProvider);\r\n const options = {\r\n contextMenuProvider: this.contextMenuProvider,\r\n labelRenderer: labelRenderer,\r\n menuAsChild: this.options.menuAsChild,\r\n actions: isActionsArray ? this.menuActionsOrProvider : undefined,\r\n actionProvider: isActionsArray ? undefined : this.menuActionsOrProvider\r\n };\r\n this.dropdownMenu = this._register(new DropdownMenu(container, options));\r\n this._register(this.dropdownMenu.onDidChangeVisibility(visible => {\r\n var _a;\r\n (_a = this.element) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-expanded', `${visible}`);\r\n this._onDidChangeVisibility.fire(visible);\r\n }));\r\n this.dropdownMenu.menuOptions = {\r\n actionViewItemProvider: this.options.actionViewItemProvider,\r\n actionRunner: this.actionRunner,\r\n getKeyBinding: this.options.keybindingProvider,\r\n context: this._context\r\n };\r\n if (this.options.anchorAlignmentProvider) {\r\n const that = this;\r\n this.dropdownMenu.menuOptions = Object.assign(Object.assign({}, this.dropdownMenu.menuOptions), { get anchorAlignment() {\r\n return that.options.anchorAlignmentProvider();\r\n } });\r\n }\r\n this.updateEnabled();\r\n }\r\n setActionContext(newContext) {\r\n super.setActionContext(newContext);\r\n if (this.dropdownMenu) {\r\n if (this.dropdownMenu.menuOptions) {\r\n this.dropdownMenu.menuOptions.context = newContext;\r\n }\r\n else {\r\n this.dropdownMenu.menuOptions = { context: newContext };\r\n }\r\n }\r\n }\r\n updateEnabled() {\r\n var _a, _b;\r\n const disabled = !this.getAction().enabled;\r\n (_a = this.actionItem) === null || _a === void 0 ? void 0 : _a.classList.toggle('disabled', disabled);\r\n (_b = this.element) === null || _b === void 0 ? void 0 : _b.classList.toggle('disabled', disabled);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport './menuEntryActionViewItem.css';\r\nimport { asCSSUrl, ModifierKeyEmitter } from '../../../base/browser/dom.js';\r\nimport { domEvent } from '../../../base/browser/event.js';\r\nimport { Separator } from '../../../base/common/actions.js';\r\nimport { toDisposable, MutableDisposable, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { localize } from '../../../nls.js';\r\nimport { MenuItemAction, SubmenuItemAction } from '../common/actions.js';\r\nimport { IContextMenuService } from '../../contextview/browser/contextView.js';\r\nimport { IKeybindingService } from '../../keybinding/common/keybinding.js';\r\nimport { INotificationService } from '../../notification/common/notification.js';\r\nimport { ThemeIcon } from '../../theme/common/themeService.js';\r\nimport { ActionViewItem } from '../../../base/browser/ui/actionbar/actionViewItems.js';\r\nimport { DropdownMenuActionViewItem } from '../../../base/browser/ui/dropdown/dropdownActionViewItem.js';\r\nimport { isWindows, isLinux } from '../../../base/common/platform.js';\r\nexport function createAndFillInActionBarActions(menu, options, target, isPrimaryGroup) {\r\n const groups = menu.getActions(options);\r\n // Action bars handle alternative actions on their own so the alternative actions should be ignored\r\n fillInActions(groups, target, false, isPrimaryGroup);\r\n return asDisposable(groups);\r\n}\r\nfunction asDisposable(groups) {\r\n const disposables = new DisposableStore();\r\n for (const [, actions] of groups) {\r\n for (const action of actions) {\r\n disposables.add(action);\r\n }\r\n }\r\n return disposables;\r\n}\r\nfunction fillInActions(groups, target, useAlternativeActions, isPrimaryGroup = group => group === 'navigation') {\r\n for (let [group, actions] of groups) {\r\n if (useAlternativeActions) {\r\n actions = actions.map(a => (a instanceof MenuItemAction) && !!a.alt ? a.alt : a);\r\n }\r\n if (isPrimaryGroup(group)) {\r\n const to = Array.isArray(target) ? target : target.primary;\r\n to.unshift(...actions);\r\n }\r\n else {\r\n const to = Array.isArray(target) ? target : target.secondary;\r\n if (to.length > 0) {\r\n to.push(new Separator());\r\n }\r\n to.push(...actions);\r\n }\r\n }\r\n}\r\nlet MenuEntryActionViewItem = class MenuEntryActionViewItem extends ActionViewItem {\r\n constructor(_action, _keybindingService, _notificationService) {\r\n super(undefined, _action, { icon: !!(_action.class || _action.item.icon), label: !_action.class && !_action.item.icon });\r\n this._action = _action;\r\n this._keybindingService = _keybindingService;\r\n this._notificationService = _notificationService;\r\n this._wantsAltCommand = false;\r\n this._itemClassDispose = this._register(new MutableDisposable());\r\n this._altKey = ModifierKeyEmitter.getInstance();\r\n }\r\n get _commandAction() {\r\n return this._wantsAltCommand && this._action.alt || this._action;\r\n }\r\n onClick(event) {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n this.actionRunner\r\n .run(this._commandAction, this._context)\r\n .catch(err => this._notificationService.error(err));\r\n }\r\n render(container) {\r\n super.render(container);\r\n container.classList.add('menu-entry');\r\n this._updateItemClass(this._action.item);\r\n let mouseOver = false;\r\n let alternativeKeyDown = this._altKey.keyStatus.altKey || ((isWindows || isLinux) && this._altKey.keyStatus.shiftKey);\r\n const updateAltState = () => {\r\n const wantsAltCommand = mouseOver && alternativeKeyDown;\r\n if (wantsAltCommand !== this._wantsAltCommand) {\r\n this._wantsAltCommand = wantsAltCommand;\r\n this.updateLabel();\r\n this.updateTooltip();\r\n this.updateClass();\r\n }\r\n };\r\n if (this._action.alt) {\r\n this._register(this._altKey.event(value => {\r\n alternativeKeyDown = value.altKey || ((isWindows || isLinux) && value.shiftKey);\r\n updateAltState();\r\n }));\r\n }\r\n this._register(domEvent(container, 'mouseleave')(_ => {\r\n mouseOver = false;\r\n updateAltState();\r\n }));\r\n this._register(domEvent(container, 'mouseenter')(e => {\r\n mouseOver = true;\r\n updateAltState();\r\n }));\r\n }\r\n updateLabel() {\r\n if (this.options.label && this.label) {\r\n this.label.textContent = this._commandAction.label;\r\n }\r\n }\r\n updateTooltip() {\r\n if (this.label) {\r\n const keybinding = this._keybindingService.lookupKeybinding(this._commandAction.id);\r\n const keybindingLabel = keybinding && keybinding.getLabel();\r\n const tooltip = this._commandAction.tooltip || this._commandAction.label;\r\n this.label.title = keybindingLabel\r\n ? localize('titleAndKb', \"{0} ({1})\", tooltip, keybindingLabel)\r\n : tooltip;\r\n }\r\n }\r\n updateClass() {\r\n if (this.options.icon) {\r\n if (this._commandAction !== this._action) {\r\n if (this._action.alt) {\r\n this._updateItemClass(this._action.alt.item);\r\n }\r\n }\r\n else if (this._action.alt) {\r\n this._updateItemClass(this._action.item);\r\n }\r\n }\r\n }\r\n _updateItemClass(item) {\r\n var _a;\r\n this._itemClassDispose.value = undefined;\r\n const { element, label } = this;\r\n if (!element || !label) {\r\n return;\r\n }\r\n const icon = this._commandAction.checked && ((_a = item.toggled) === null || _a === void 0 ? void 0 : _a.icon) ? item.toggled.icon : item.icon;\r\n if (!icon) {\r\n return;\r\n }\r\n if (ThemeIcon.isThemeIcon(icon)) {\r\n // theme icons\r\n const iconClass = ThemeIcon.asClassName(icon);\r\n label.classList.add(...iconClass.split(' '));\r\n this._itemClassDispose.value = toDisposable(() => {\r\n label.classList.remove(...iconClass.split(' '));\r\n });\r\n }\r\n else {\r\n // icon path/url\r\n if (icon.light) {\r\n label.style.setProperty('--menu-entry-icon-light', asCSSUrl(icon.light));\r\n }\r\n if (icon.dark) {\r\n label.style.setProperty('--menu-entry-icon-dark', asCSSUrl(icon.dark));\r\n }\r\n label.classList.add('icon');\r\n this._itemClassDispose.value = toDisposable(() => {\r\n label.classList.remove('icon');\r\n label.style.removeProperty('--menu-entry-icon-light');\r\n label.style.removeProperty('--menu-entry-icon-dark');\r\n });\r\n }\r\n }\r\n};\r\nMenuEntryActionViewItem = __decorate([\r\n __param(1, IKeybindingService),\r\n __param(2, INotificationService)\r\n], MenuEntryActionViewItem);\r\nexport { MenuEntryActionViewItem };\r\nlet SubmenuEntryActionViewItem = class SubmenuEntryActionViewItem extends DropdownMenuActionViewItem {\r\n constructor(action, contextMenuService) {\r\n super(action, { getActions: () => action.actions }, contextMenuService, {\r\n menuAsChild: true,\r\n classNames: ThemeIcon.isThemeIcon(action.item.icon) ? ThemeIcon.asClassName(action.item.icon) : undefined,\r\n });\r\n }\r\n render(container) {\r\n super.render(container);\r\n if (this.element) {\r\n container.classList.add('menu-entry');\r\n const { icon } = this._action.item;\r\n if (icon && !ThemeIcon.isThemeIcon(icon)) {\r\n this.element.classList.add('icon');\r\n if (icon.light) {\r\n this.element.style.setProperty('--menu-entry-icon-light', asCSSUrl(icon.light));\r\n }\r\n if (icon.dark) {\r\n this.element.style.setProperty('--menu-entry-icon-dark', asCSSUrl(icon.dark));\r\n }\r\n }\r\n }\r\n }\r\n};\r\nSubmenuEntryActionViewItem = __decorate([\r\n __param(1, IContextMenuService)\r\n], SubmenuEntryActionViewItem);\r\nexport { SubmenuEntryActionViewItem };\r\n/**\r\n * Creates action view items for menu actions or submenu actions.\r\n */\r\nexport function createActionViewItem(instaService, action) {\r\n if (action instanceof MenuItemAction) {\r\n return instaService.createInstance(MenuEntryActionViewItem, action);\r\n }\r\n else if (action instanceof SubmenuItemAction) {\r\n return instaService.createInstance(SubmenuEntryActionViewItem, action);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport './media/peekViewWidget.css';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { ActionBar } from '../../../base/browser/ui/actionbar/actionbar.js';\r\nimport { Action } from '../../../base/common/actions.js';\r\nimport { Color } from '../../../base/common/color.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport * as objects from '../../../base/common/objects.js';\r\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\r\nimport { EmbeddedCodeEditorWidget } from '../../browser/widget/embeddedCodeEditorWidget.js';\r\nimport { ZoneWidget } from '../zoneWidget/zoneWidget.js';\r\nimport * as nls from '../../../nls.js';\r\nimport { RawContextKey, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { createDecorator, IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { registerSingleton } from '../../../platform/instantiation/common/extensions.js';\r\nimport { registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { registerColor, contrastBorder, activeContrastBorder } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nimport { createActionViewItem } from '../../../platform/actions/browser/menuEntryActionViewItem.js';\r\nexport const IPeekViewService = createDecorator('IPeekViewService');\r\nregisterSingleton(IPeekViewService, class {\r\n constructor() {\r\n this._widgets = new Map();\r\n }\r\n addExclusiveWidget(editor, widget) {\r\n const existing = this._widgets.get(editor);\r\n if (existing) {\r\n existing.listener.dispose();\r\n existing.widget.dispose();\r\n }\r\n const remove = () => {\r\n const data = this._widgets.get(editor);\r\n if (data && data.widget === widget) {\r\n data.listener.dispose();\r\n this._widgets.delete(editor);\r\n }\r\n };\r\n this._widgets.set(editor, { widget, listener: widget.onDidClose(remove) });\r\n }\r\n});\r\nexport var PeekContext;\r\n(function (PeekContext) {\r\n PeekContext.inPeekEditor = new RawContextKey('inReferenceSearchEditor', true);\r\n PeekContext.notInPeekEditor = PeekContext.inPeekEditor.toNegated();\r\n})(PeekContext || (PeekContext = {}));\r\nlet PeekContextController = class PeekContextController {\r\n constructor(editor, contextKeyService) {\r\n if (editor instanceof EmbeddedCodeEditorWidget) {\r\n PeekContext.inPeekEditor.bindTo(contextKeyService);\r\n }\r\n }\r\n dispose() { }\r\n};\r\nPeekContextController.ID = 'editor.contrib.referenceController';\r\nPeekContextController = __decorate([\r\n __param(1, IContextKeyService)\r\n], PeekContextController);\r\nregisterEditorContribution(PeekContextController.ID, PeekContextController);\r\nexport function getOuterEditor(accessor) {\r\n let editor = accessor.get(ICodeEditorService).getFocusedCodeEditor();\r\n if (editor instanceof EmbeddedCodeEditorWidget) {\r\n return editor.getParentEditor();\r\n }\r\n return editor;\r\n}\r\nconst defaultOptions = {\r\n headerBackgroundColor: Color.white,\r\n primaryHeadingColor: Color.fromHex('#333333'),\r\n secondaryHeadingColor: Color.fromHex('#6c6c6cb3')\r\n};\r\nlet PeekViewWidget = class PeekViewWidget extends ZoneWidget {\r\n constructor(editor, options, instantiationService) {\r\n super(editor, options);\r\n this.instantiationService = instantiationService;\r\n this._onDidClose = new Emitter();\r\n this.onDidClose = this._onDidClose.event;\r\n objects.mixin(this.options, defaultOptions, false);\r\n }\r\n dispose() {\r\n if (!this.disposed) {\r\n this.disposed = true; // prevent consumers who dispose on onDidClose from looping\r\n super.dispose();\r\n this._onDidClose.fire(this);\r\n }\r\n }\r\n style(styles) {\r\n let options = this.options;\r\n if (styles.headerBackgroundColor) {\r\n options.headerBackgroundColor = styles.headerBackgroundColor;\r\n }\r\n if (styles.primaryHeadingColor) {\r\n options.primaryHeadingColor = styles.primaryHeadingColor;\r\n }\r\n if (styles.secondaryHeadingColor) {\r\n options.secondaryHeadingColor = styles.secondaryHeadingColor;\r\n }\r\n super.style(styles);\r\n }\r\n _applyStyles() {\r\n super._applyStyles();\r\n let options = this.options;\r\n if (this._headElement && options.headerBackgroundColor) {\r\n this._headElement.style.backgroundColor = options.headerBackgroundColor.toString();\r\n }\r\n if (this._primaryHeading && options.primaryHeadingColor) {\r\n this._primaryHeading.style.color = options.primaryHeadingColor.toString();\r\n }\r\n if (this._secondaryHeading && options.secondaryHeadingColor) {\r\n this._secondaryHeading.style.color = options.secondaryHeadingColor.toString();\r\n }\r\n if (this._bodyElement && options.frameColor) {\r\n this._bodyElement.style.borderColor = options.frameColor.toString();\r\n }\r\n }\r\n _fillContainer(container) {\r\n this.setCssClass('peekview-widget');\r\n this._headElement = dom.$('.head');\r\n this._bodyElement = dom.$('.body');\r\n this._fillHead(this._headElement);\r\n this._fillBody(this._bodyElement);\r\n container.appendChild(this._headElement);\r\n container.appendChild(this._bodyElement);\r\n }\r\n _fillHead(container, noCloseAction) {\r\n const titleElement = dom.$('.peekview-title');\r\n dom.append(this._headElement, titleElement);\r\n dom.addStandardDisposableListener(titleElement, 'click', event => this._onTitleClick(event));\r\n this._fillTitleIcon(titleElement);\r\n this._primaryHeading = dom.$('span.filename');\r\n this._secondaryHeading = dom.$('span.dirname');\r\n this._metaHeading = dom.$('span.meta');\r\n dom.append(titleElement, this._primaryHeading, this._secondaryHeading, this._metaHeading);\r\n const actionsContainer = dom.$('.peekview-actions');\r\n dom.append(this._headElement, actionsContainer);\r\n const actionBarOptions = this._getActionBarOptions();\r\n this._actionbarWidget = new ActionBar(actionsContainer, actionBarOptions);\r\n this._disposables.add(this._actionbarWidget);\r\n if (!noCloseAction) {\r\n this._actionbarWidget.push(new Action('peekview.close', nls.localize('label.close', \"Close\"), Codicon.close.classNames, true, () => {\r\n this.dispose();\r\n return Promise.resolve();\r\n }), { label: false, icon: true });\r\n }\r\n }\r\n _fillTitleIcon(container) {\r\n }\r\n _getActionBarOptions() {\r\n return {\r\n actionViewItemProvider: createActionViewItem.bind(undefined, this.instantiationService),\r\n orientation: 0 /* HORIZONTAL */\r\n };\r\n }\r\n _onTitleClick(event) {\r\n // implement me\r\n }\r\n setTitle(primaryHeading, secondaryHeading) {\r\n if (this._primaryHeading && this._secondaryHeading) {\r\n this._primaryHeading.innerText = primaryHeading;\r\n this._primaryHeading.setAttribute('aria-label', primaryHeading);\r\n if (secondaryHeading) {\r\n this._secondaryHeading.innerText = secondaryHeading;\r\n }\r\n else {\r\n dom.clearNode(this._secondaryHeading);\r\n }\r\n }\r\n }\r\n setMetaTitle(value) {\r\n if (this._metaHeading) {\r\n if (value) {\r\n this._metaHeading.innerText = value;\r\n dom.show(this._metaHeading);\r\n }\r\n else {\r\n dom.hide(this._metaHeading);\r\n }\r\n }\r\n }\r\n _doLayout(heightInPixel, widthInPixel) {\r\n if (!this._isShowing && heightInPixel < 0) {\r\n // Looks like the view zone got folded away!\r\n this.dispose();\r\n return;\r\n }\r\n const headHeight = Math.ceil(this.editor.getOption(53 /* lineHeight */) * 1.2);\r\n const bodyHeight = Math.round(heightInPixel - (headHeight + 2 /* the border-top/bottom width*/));\r\n this._doLayoutHead(headHeight, widthInPixel);\r\n this._doLayoutBody(bodyHeight, widthInPixel);\r\n }\r\n _doLayoutHead(heightInPixel, widthInPixel) {\r\n if (this._headElement) {\r\n this._headElement.style.height = `${heightInPixel}px`;\r\n this._headElement.style.lineHeight = this._headElement.style.height;\r\n }\r\n }\r\n _doLayoutBody(heightInPixel, widthInPixel) {\r\n if (this._bodyElement) {\r\n this._bodyElement.style.height = `${heightInPixel}px`;\r\n }\r\n }\r\n};\r\nPeekViewWidget = __decorate([\r\n __param(2, IInstantiationService)\r\n], PeekViewWidget);\r\nexport { PeekViewWidget };\r\nexport const peekViewTitleBackground = registerColor('peekViewTitle.background', { dark: '#1E1E1E', light: '#FFFFFF', hc: '#0C141F' }, nls.localize('peekViewTitleBackground', 'Background color of the peek view title area.'));\r\nexport const peekViewTitleForeground = registerColor('peekViewTitleLabel.foreground', { dark: '#FFFFFF', light: '#333333', hc: '#FFFFFF' }, nls.localize('peekViewTitleForeground', 'Color of the peek view title.'));\r\nexport const peekViewTitleInfoForeground = registerColor('peekViewTitleDescription.foreground', { dark: '#ccccccb3', light: '#616161e6', hc: '#FFFFFF99' }, nls.localize('peekViewTitleInfoForeground', 'Color of the peek view title info.'));\r\nexport const peekViewBorder = registerColor('peekView.border', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, nls.localize('peekViewBorder', 'Color of the peek view borders and arrow.'));\r\nexport const peekViewResultsBackground = registerColor('peekViewResult.background', { dark: '#252526', light: '#F3F3F3', hc: Color.black }, nls.localize('peekViewResultsBackground', 'Background color of the peek view result list.'));\r\nexport const peekViewResultsMatchForeground = registerColor('peekViewResult.lineForeground', { dark: '#bbbbbb', light: '#646465', hc: Color.white }, nls.localize('peekViewResultsMatchForeground', 'Foreground color for line nodes in the peek view result list.'));\r\nexport const peekViewResultsFileForeground = registerColor('peekViewResult.fileForeground', { dark: Color.white, light: '#1E1E1E', hc: Color.white }, nls.localize('peekViewResultsFileForeground', 'Foreground color for file nodes in the peek view result list.'));\r\nexport const peekViewResultsSelectionBackground = registerColor('peekViewResult.selectionBackground', { dark: '#3399ff33', light: '#3399ff33', hc: null }, nls.localize('peekViewResultsSelectionBackground', 'Background color of the selected entry in the peek view result list.'));\r\nexport const peekViewResultsSelectionForeground = registerColor('peekViewResult.selectionForeground', { dark: Color.white, light: '#6C6C6C', hc: Color.white }, nls.localize('peekViewResultsSelectionForeground', 'Foreground color of the selected entry in the peek view result list.'));\r\nexport const peekViewEditorBackground = registerColor('peekViewEditor.background', { dark: '#001F33', light: '#F2F8FC', hc: Color.black }, nls.localize('peekViewEditorBackground', 'Background color of the peek view editor.'));\r\nexport const peekViewEditorGutterBackground = registerColor('peekViewEditorGutter.background', { dark: peekViewEditorBackground, light: peekViewEditorBackground, hc: peekViewEditorBackground }, nls.localize('peekViewEditorGutterBackground', 'Background color of the gutter in the peek view editor.'));\r\nexport const peekViewResultsMatchHighlight = registerColor('peekViewResult.matchHighlightBackground', { dark: '#ea5c004d', light: '#ea5c004d', hc: null }, nls.localize('peekViewResultsMatchHighlight', 'Match highlight color in the peek view result list.'));\r\nexport const peekViewEditorMatchHighlight = registerColor('peekViewEditor.matchHighlightBackground', { dark: '#ff8f0099', light: '#f5d802de', hc: null }, nls.localize('peekViewEditorMatchHighlight', 'Match highlight color in the peek view editor.'));\r\nexport const peekViewEditorMatchHighlightBorder = registerColor('peekViewEditor.matchHighlightBorder', { dark: null, light: null, hc: activeContrastBorder }, nls.localize('peekViewEditorMatchHighlightBorder', 'Match highlight border in the peek view editor.'));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport Severity from '../../../base/common/severity.js';\r\nimport { registerThemingParticipant } from '../../theme/common/themeService.js';\r\nimport { problemsErrorIconForeground, problemsInfoIconForeground, problemsWarningIconForeground } from '../../theme/common/colorRegistry.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nexport var SeverityIcon;\r\n(function (SeverityIcon) {\r\n function className(severity) {\r\n switch (severity) {\r\n case Severity.Ignore:\r\n return 'severity-ignore ' + Codicon.info.classNames;\r\n case Severity.Info:\r\n return Codicon.info.classNames;\r\n case Severity.Warning:\r\n return Codicon.warning.classNames;\r\n case Severity.Error:\r\n return Codicon.error.classNames;\r\n default:\r\n return '';\r\n }\r\n }\r\n SeverityIcon.className = className;\r\n})(SeverityIcon || (SeverityIcon = {}));\r\nregisterThemingParticipant((theme, collector) => {\r\n const errorIconForeground = theme.getColor(problemsErrorIconForeground);\r\n if (errorIconForeground) {\r\n const errorCodiconSelector = Codicon.error.cssSelector;\r\n collector.addRule(`\n\t\t\t.monaco-editor .zone-widget ${errorCodiconSelector},\n\t\t\t.markers-panel .marker-icon${errorCodiconSelector},\n\t\t\t.extensions-viewlet > .extensions ${errorCodiconSelector} {\n\t\t\t\tcolor: ${errorIconForeground};\n\t\t\t}\n\t\t`);\r\n }\r\n const warningIconForeground = theme.getColor(problemsWarningIconForeground);\r\n if (warningIconForeground) {\r\n const warningCodiconSelector = Codicon.warning.cssSelector;\r\n collector.addRule(`\n\t\t\t.monaco-editor .zone-widget ${warningCodiconSelector},\n\t\t\t.markers-panel .marker-icon${warningCodiconSelector},\n\t\t\t.extensions-viewlet > .extensions ${warningCodiconSelector},\n\t\t\t.extension-editor ${warningCodiconSelector} {\n\t\t\t\tcolor: ${warningIconForeground};\n\t\t\t}\n\t\t`);\r\n }\r\n const infoIconForeground = theme.getColor(problemsInfoIconForeground);\r\n if (infoIconForeground) {\r\n const infoCodiconSelector = Codicon.info.cssSelector;\r\n collector.addRule(`\n\t\t\t.monaco-editor .zone-widget ${infoCodiconSelector},\n\t\t\t.markers-panel .marker-icon${infoCodiconSelector},\n\t\t\t.extensions-viewlet > .extensions ${infoCodiconSelector},\n\t\t\t.extension-editor ${infoCodiconSelector} {\n\t\t\t\tcolor: ${infoIconForeground};\n\t\t\t}\n\t\t`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport './media/gotoErrorWidget.css';\r\nimport * as nls from '../../../nls.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { dispose, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { MarkerSeverity } from '../../../platform/markers/common/markers.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { registerColor, oneOf, textLinkForeground, editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder, editorInfoForeground, editorInfoBorder } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { IThemeService, registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport { Color } from '../../../base/common/color.js';\r\nimport { ScrollableElement } from '../../../base/browser/ui/scrollbar/scrollableElement.js';\r\nimport { getBaseLabel } from '../../../base/common/labels.js';\r\nimport { isNonEmptyArray } from '../../../base/common/arrays.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { PeekViewWidget, peekViewTitleForeground, peekViewTitleInfoForeground } from '../peekView/peekView.js';\r\nimport { basename } from '../../../base/common/resources.js';\r\nimport { SeverityIcon } from '../../../platform/severityIcon/common/severityIcon.js';\r\nimport { IOpenerService } from '../../../platform/opener/common/opener.js';\r\nimport { MenuId, IMenuService } from '../../../platform/actions/common/actions.js';\r\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { createAndFillInActionBarActions } from '../../../platform/actions/browser/menuEntryActionViewItem.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { splitLines } from '../../../base/common/strings.js';\r\nimport { ILabelService } from '../../../platform/label/common/label.js';\r\nclass MessageWidget {\r\n constructor(parent, editor, onRelatedInformation, _openerService, _labelService) {\r\n this._openerService = _openerService;\r\n this._labelService = _labelService;\r\n this._lines = 0;\r\n this._longestLineLength = 0;\r\n this._relatedDiagnostics = new WeakMap();\r\n this._disposables = new DisposableStore();\r\n this._editor = editor;\r\n const domNode = document.createElement('div');\r\n domNode.className = 'descriptioncontainer';\r\n this._messageBlock = document.createElement('div');\r\n this._messageBlock.classList.add('message');\r\n this._messageBlock.setAttribute('aria-live', 'assertive');\r\n this._messageBlock.setAttribute('role', 'alert');\r\n domNode.appendChild(this._messageBlock);\r\n this._relatedBlock = document.createElement('div');\r\n domNode.appendChild(this._relatedBlock);\r\n this._disposables.add(dom.addStandardDisposableListener(this._relatedBlock, 'click', event => {\r\n event.preventDefault();\r\n const related = this._relatedDiagnostics.get(event.target);\r\n if (related) {\r\n onRelatedInformation(related);\r\n }\r\n }));\r\n this._scrollable = new ScrollableElement(domNode, {\r\n horizontal: 1 /* Auto */,\r\n vertical: 1 /* Auto */,\r\n useShadows: false,\r\n horizontalScrollbarSize: 3,\r\n verticalScrollbarSize: 3\r\n });\r\n parent.appendChild(this._scrollable.getDomNode());\r\n this._disposables.add(this._scrollable.onScroll(e => {\r\n domNode.style.left = `-${e.scrollLeft}px`;\r\n domNode.style.top = `-${e.scrollTop}px`;\r\n }));\r\n this._disposables.add(this._scrollable);\r\n }\r\n dispose() {\r\n dispose(this._disposables);\r\n }\r\n update(marker) {\r\n const { source, message, relatedInformation, code } = marker;\r\n let sourceAndCodeLength = ((source === null || source === void 0 ? void 0 : source.length) || 0) + '()'.length;\r\n if (code) {\r\n if (typeof code === 'string') {\r\n sourceAndCodeLength += code.length;\r\n }\r\n else {\r\n sourceAndCodeLength += code.value.length;\r\n }\r\n }\r\n const lines = splitLines(message);\r\n this._lines = lines.length;\r\n this._longestLineLength = 0;\r\n for (const line of lines) {\r\n this._longestLineLength = Math.max(line.length + sourceAndCodeLength, this._longestLineLength);\r\n }\r\n dom.clearNode(this._messageBlock);\r\n this._messageBlock.setAttribute('aria-label', this.getAriaLabel(marker));\r\n this._editor.applyFontInfo(this._messageBlock);\r\n let lastLineElement = this._messageBlock;\r\n for (const line of lines) {\r\n lastLineElement = document.createElement('div');\r\n lastLineElement.innerText = line;\r\n if (line === '') {\r\n lastLineElement.style.height = this._messageBlock.style.lineHeight;\r\n }\r\n this._messageBlock.appendChild(lastLineElement);\r\n }\r\n if (source || code) {\r\n const detailsElement = document.createElement('span');\r\n detailsElement.classList.add('details');\r\n lastLineElement.appendChild(detailsElement);\r\n if (source) {\r\n const sourceElement = document.createElement('span');\r\n sourceElement.innerText = source;\r\n sourceElement.classList.add('source');\r\n detailsElement.appendChild(sourceElement);\r\n }\r\n if (code) {\r\n if (typeof code === 'string') {\r\n const codeElement = document.createElement('span');\r\n codeElement.innerText = `(${code})`;\r\n codeElement.classList.add('code');\r\n detailsElement.appendChild(codeElement);\r\n }\r\n else {\r\n this._codeLink = dom.$('a.code-link');\r\n this._codeLink.setAttribute('href', `${code.target.toString()}`);\r\n this._codeLink.onclick = (e) => {\r\n this._openerService.open(code.target);\r\n e.preventDefault();\r\n e.stopPropagation();\r\n };\r\n const codeElement = dom.append(this._codeLink, dom.$('span'));\r\n codeElement.innerText = code.value;\r\n detailsElement.appendChild(this._codeLink);\r\n }\r\n }\r\n }\r\n dom.clearNode(this._relatedBlock);\r\n this._editor.applyFontInfo(this._relatedBlock);\r\n if (isNonEmptyArray(relatedInformation)) {\r\n const relatedInformationNode = this._relatedBlock.appendChild(document.createElement('div'));\r\n relatedInformationNode.style.paddingTop = `${Math.floor(this._editor.getOption(53 /* lineHeight */) * 0.66)}px`;\r\n this._lines += 1;\r\n for (const related of relatedInformation) {\r\n let container = document.createElement('div');\r\n let relatedResource = document.createElement('a');\r\n relatedResource.classList.add('filename');\r\n relatedResource.innerText = `${getBaseLabel(related.resource)}(${related.startLineNumber}, ${related.startColumn}): `;\r\n relatedResource.title = this._labelService.getUriLabel(related.resource);\r\n this._relatedDiagnostics.set(relatedResource, related);\r\n let relatedMessage = document.createElement('span');\r\n relatedMessage.innerText = related.message;\r\n container.appendChild(relatedResource);\r\n container.appendChild(relatedMessage);\r\n this._lines += 1;\r\n relatedInformationNode.appendChild(container);\r\n }\r\n }\r\n const fontInfo = this._editor.getOption(38 /* fontInfo */);\r\n const scrollWidth = Math.ceil(fontInfo.typicalFullwidthCharacterWidth * this._longestLineLength * 0.75);\r\n const scrollHeight = fontInfo.lineHeight * this._lines;\r\n this._scrollable.setScrollDimensions({ scrollWidth, scrollHeight });\r\n }\r\n layout(height, width) {\r\n this._scrollable.getDomNode().style.height = `${height}px`;\r\n this._scrollable.getDomNode().style.width = `${width}px`;\r\n this._scrollable.setScrollDimensions({ width, height });\r\n }\r\n getHeightInLines() {\r\n return Math.min(17, this._lines);\r\n }\r\n getAriaLabel(marker) {\r\n let severityLabel = '';\r\n switch (marker.severity) {\r\n case MarkerSeverity.Error:\r\n severityLabel = nls.localize('Error', \"Error\");\r\n break;\r\n case MarkerSeverity.Warning:\r\n severityLabel = nls.localize('Warning', \"Warning\");\r\n break;\r\n case MarkerSeverity.Info:\r\n severityLabel = nls.localize('Info', \"Info\");\r\n break;\r\n case MarkerSeverity.Hint:\r\n severityLabel = nls.localize('Hint', \"Hint\");\r\n break;\r\n }\r\n let ariaLabel = nls.localize('marker aria', \"{0} at {1}. \", severityLabel, marker.startLineNumber + ':' + marker.startColumn);\r\n const model = this._editor.getModel();\r\n if (model && (marker.startLineNumber <= model.getLineCount()) && (marker.startLineNumber >= 1)) {\r\n const lineContent = model.getLineContent(marker.startLineNumber);\r\n ariaLabel = `${lineContent}, ${ariaLabel}`;\r\n }\r\n return ariaLabel;\r\n }\r\n}\r\nlet MarkerNavigationWidget = class MarkerNavigationWidget extends PeekViewWidget {\r\n constructor(editor, _themeService, _openerService, _menuService, instantiationService, _contextKeyService, _labelService) {\r\n super(editor, { showArrow: true, showFrame: true, isAccessible: true }, instantiationService);\r\n this._themeService = _themeService;\r\n this._openerService = _openerService;\r\n this._menuService = _menuService;\r\n this._contextKeyService = _contextKeyService;\r\n this._labelService = _labelService;\r\n this._callOnDispose = new DisposableStore();\r\n this._onDidSelectRelatedInformation = new Emitter();\r\n this.onDidSelectRelatedInformation = this._onDidSelectRelatedInformation.event;\r\n this._severity = MarkerSeverity.Warning;\r\n this._backgroundColor = Color.white;\r\n this._applyTheme(_themeService.getColorTheme());\r\n this._callOnDispose.add(_themeService.onDidColorThemeChange(this._applyTheme.bind(this)));\r\n this.create();\r\n }\r\n _applyTheme(theme) {\r\n this._backgroundColor = theme.getColor(editorMarkerNavigationBackground);\r\n let colorId = editorMarkerNavigationError;\r\n if (this._severity === MarkerSeverity.Warning) {\r\n colorId = editorMarkerNavigationWarning;\r\n }\r\n else if (this._severity === MarkerSeverity.Info) {\r\n colorId = editorMarkerNavigationInfo;\r\n }\r\n const frameColor = theme.getColor(colorId);\r\n this.style({\r\n arrowColor: frameColor,\r\n frameColor: frameColor,\r\n headerBackgroundColor: this._backgroundColor,\r\n primaryHeadingColor: theme.getColor(peekViewTitleForeground),\r\n secondaryHeadingColor: theme.getColor(peekViewTitleInfoForeground)\r\n }); // style() will trigger _applyStyles\r\n }\r\n _applyStyles() {\r\n if (this._parentContainer) {\r\n this._parentContainer.style.backgroundColor = this._backgroundColor ? this._backgroundColor.toString() : '';\r\n }\r\n super._applyStyles();\r\n }\r\n dispose() {\r\n this._callOnDispose.dispose();\r\n super.dispose();\r\n }\r\n _fillHead(container) {\r\n super._fillHead(container);\r\n this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun(e => this.editor.focus()));\r\n const actions = [];\r\n const menu = this._menuService.createMenu(MarkerNavigationWidget.TitleMenu, this._contextKeyService);\r\n createAndFillInActionBarActions(menu, undefined, actions);\r\n this._actionbarWidget.push(actions, { label: false, icon: true, index: 0 });\r\n menu.dispose();\r\n }\r\n _fillTitleIcon(container) {\r\n this._icon = dom.append(container, dom.$(''));\r\n }\r\n _fillBody(container) {\r\n this._parentContainer = container;\r\n container.classList.add('marker-widget');\r\n this._parentContainer.tabIndex = 0;\r\n this._parentContainer.setAttribute('role', 'tooltip');\r\n this._container = document.createElement('div');\r\n container.appendChild(this._container);\r\n this._message = new MessageWidget(this._container, this.editor, related => this._onDidSelectRelatedInformation.fire(related), this._openerService, this._labelService);\r\n this._disposables.add(this._message);\r\n }\r\n show() {\r\n throw new Error('call showAtMarker');\r\n }\r\n showAtMarker(marker, markerIdx, markerCount) {\r\n // update:\r\n // * title\r\n // * message\r\n this._container.classList.remove('stale');\r\n this._message.update(marker);\r\n // update frame color (only applied on 'show')\r\n this._severity = marker.severity;\r\n this._applyTheme(this._themeService.getColorTheme());\r\n // show\r\n let range = Range.lift(marker);\r\n const editorPosition = this.editor.getPosition();\r\n let position = editorPosition && range.containsPosition(editorPosition) ? editorPosition : range.getStartPosition();\r\n super.show(position, this.computeRequiredHeight());\r\n const model = this.editor.getModel();\r\n if (model) {\r\n const detail = markerCount > 1\r\n ? nls.localize('problems', \"{0} of {1} problems\", markerIdx, markerCount)\r\n : nls.localize('change', \"{0} of {1} problem\", markerIdx, markerCount);\r\n this.setTitle(basename(model.uri), detail);\r\n }\r\n this._icon.className = `codicon ${SeverityIcon.className(MarkerSeverity.toSeverity(this._severity))}`;\r\n this.editor.revealPositionNearTop(position, 0 /* Smooth */);\r\n this.editor.focus();\r\n }\r\n updateMarker(marker) {\r\n this._container.classList.remove('stale');\r\n this._message.update(marker);\r\n }\r\n showStale() {\r\n this._container.classList.add('stale');\r\n this._relayout();\r\n }\r\n _doLayoutBody(heightInPixel, widthInPixel) {\r\n super._doLayoutBody(heightInPixel, widthInPixel);\r\n this._heightInPixel = heightInPixel;\r\n this._message.layout(heightInPixel, widthInPixel);\r\n this._container.style.height = `${heightInPixel}px`;\r\n }\r\n _onWidth(widthInPixel) {\r\n this._message.layout(this._heightInPixel, widthInPixel);\r\n }\r\n _relayout() {\r\n super._relayout(this.computeRequiredHeight());\r\n }\r\n computeRequiredHeight() {\r\n return 3 + this._message.getHeightInLines();\r\n }\r\n};\r\nMarkerNavigationWidget.TitleMenu = new MenuId('gotoErrorTitleMenu');\r\nMarkerNavigationWidget = __decorate([\r\n __param(1, IThemeService),\r\n __param(2, IOpenerService),\r\n __param(3, IMenuService),\r\n __param(4, IInstantiationService),\r\n __param(5, IContextKeyService),\r\n __param(6, ILabelService)\r\n], MarkerNavigationWidget);\r\nexport { MarkerNavigationWidget };\r\n// theming\r\nlet errorDefault = oneOf(editorErrorForeground, editorErrorBorder);\r\nlet warningDefault = oneOf(editorWarningForeground, editorWarningBorder);\r\nlet infoDefault = oneOf(editorInfoForeground, editorInfoBorder);\r\nexport const editorMarkerNavigationError = registerColor('editorMarkerNavigationError.background', { dark: errorDefault, light: errorDefault, hc: errorDefault }, nls.localize('editorMarkerNavigationError', 'Editor marker navigation widget error color.'));\r\nexport const editorMarkerNavigationWarning = registerColor('editorMarkerNavigationWarning.background', { dark: warningDefault, light: warningDefault, hc: warningDefault }, nls.localize('editorMarkerNavigationWarning', 'Editor marker navigation widget warning color.'));\r\nexport const editorMarkerNavigationInfo = registerColor('editorMarkerNavigationInfo.background', { dark: infoDefault, light: infoDefault, hc: infoDefault }, nls.localize('editorMarkerNavigationInfo', 'Editor marker navigation widget info color.'));\r\nexport const editorMarkerNavigationBackground = registerColor('editorMarkerNavigation.background', { dark: '#2D2D30', light: Color.white, hc: '#0C141F' }, nls.localize('editorMarkerNavigationBackground', 'Editor marker navigation widget background.'));\r\nregisterThemingParticipant((theme, collector) => {\r\n const linkFg = theme.getColor(textLinkForeground);\r\n if (linkFg) {\r\n collector.addRule(`.monaco-editor .marker-widget a { color: ${linkFg}; }`);\r\n collector.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${linkFg}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { IMarkerService, MarkerSeverity } from '../../../platform/markers/common/markers.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { compare } from '../../../base/common/strings.js';\r\nimport { binarySearch } from '../../../base/common/arrays.js';\r\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { registerSingleton } from '../../../platform/instantiation/common/extensions.js';\r\nimport { LinkedList } from '../../../base/common/linkedList.js';\r\nexport class MarkerCoordinate {\r\n constructor(marker, index, total) {\r\n this.marker = marker;\r\n this.index = index;\r\n this.total = total;\r\n }\r\n}\r\nlet MarkerList = class MarkerList {\r\n constructor(resourceFilter, _markerService) {\r\n this._markerService = _markerService;\r\n this._onDidChange = new Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this._dispoables = new DisposableStore();\r\n this._markers = [];\r\n this._nextIdx = -1;\r\n if (URI.isUri(resourceFilter)) {\r\n this._resourceFilter = uri => uri.toString() === resourceFilter.toString();\r\n }\r\n else if (resourceFilter) {\r\n this._resourceFilter = resourceFilter;\r\n }\r\n const updateMarker = () => {\r\n this._markers = this._markerService.read({\r\n resource: URI.isUri(resourceFilter) ? resourceFilter : undefined,\r\n severities: MarkerSeverity.Error | MarkerSeverity.Warning | MarkerSeverity.Info\r\n });\r\n if (typeof resourceFilter === 'function') {\r\n this._markers = this._markers.filter(m => this._resourceFilter(m.resource));\r\n }\r\n this._markers.sort(MarkerList._compareMarker);\r\n };\r\n updateMarker();\r\n this._dispoables.add(_markerService.onMarkerChanged(uris => {\r\n if (!this._resourceFilter || uris.some(uri => this._resourceFilter(uri))) {\r\n updateMarker();\r\n this._nextIdx = -1;\r\n this._onDidChange.fire();\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._dispoables.dispose();\r\n this._onDidChange.dispose();\r\n }\r\n matches(uri) {\r\n if (!this._resourceFilter && !uri) {\r\n return true;\r\n }\r\n if (!this._resourceFilter || !uri) {\r\n return false;\r\n }\r\n return this._resourceFilter(uri);\r\n }\r\n get selected() {\r\n const marker = this._markers[this._nextIdx];\r\n return marker && new MarkerCoordinate(marker, this._nextIdx + 1, this._markers.length);\r\n }\r\n _initIdx(model, position, fwd) {\r\n let found = false;\r\n let idx = this._markers.findIndex(marker => marker.resource.toString() === model.uri.toString());\r\n if (idx < 0) {\r\n idx = binarySearch(this._markers, { resource: model.uri }, (a, b) => compare(a.resource.toString(), b.resource.toString()));\r\n if (idx < 0) {\r\n idx = ~idx;\r\n }\r\n }\r\n for (let i = idx; i < this._markers.length; i++) {\r\n let range = Range.lift(this._markers[i]);\r\n if (range.isEmpty()) {\r\n const word = model.getWordAtPosition(range.getStartPosition());\r\n if (word) {\r\n range = new Range(range.startLineNumber, word.startColumn, range.startLineNumber, word.endColumn);\r\n }\r\n }\r\n if (position && (range.containsPosition(position) || position.isBeforeOrEqual(range.getStartPosition()))) {\r\n this._nextIdx = i;\r\n found = true;\r\n break;\r\n }\r\n if (this._markers[i].resource.toString() !== model.uri.toString()) {\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n // after the last change\r\n this._nextIdx = fwd ? 0 : this._markers.length - 1;\r\n }\r\n if (this._nextIdx < 0) {\r\n this._nextIdx = this._markers.length - 1;\r\n }\r\n }\r\n resetIndex() {\r\n this._nextIdx = -1;\r\n }\r\n move(fwd, model, position) {\r\n if (this._markers.length === 0) {\r\n return false;\r\n }\r\n let oldIdx = this._nextIdx;\r\n if (this._nextIdx === -1) {\r\n this._initIdx(model, position, fwd);\r\n }\r\n else if (fwd) {\r\n this._nextIdx = (this._nextIdx + 1) % this._markers.length;\r\n }\r\n else if (!fwd) {\r\n this._nextIdx = (this._nextIdx - 1 + this._markers.length) % this._markers.length;\r\n }\r\n if (oldIdx !== this._nextIdx) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n find(uri, position) {\r\n let idx = this._markers.findIndex(marker => marker.resource.toString() === uri.toString());\r\n if (idx < 0) {\r\n return undefined;\r\n }\r\n for (; idx < this._markers.length; idx++) {\r\n if (Range.containsPosition(this._markers[idx], position)) {\r\n return new MarkerCoordinate(this._markers[idx], idx + 1, this._markers.length);\r\n }\r\n }\r\n return undefined;\r\n }\r\n static _compareMarker(a, b) {\r\n let res = compare(a.resource.toString(), b.resource.toString());\r\n if (res === 0) {\r\n res = MarkerSeverity.compare(a.severity, b.severity);\r\n }\r\n if (res === 0) {\r\n res = Range.compareRangesUsingStarts(a, b);\r\n }\r\n return res;\r\n }\r\n};\r\nMarkerList = __decorate([\r\n __param(1, IMarkerService)\r\n], MarkerList);\r\nexport { MarkerList };\r\nexport const IMarkerNavigationService = createDecorator('IMarkerNavigationService');\r\nlet MarkerNavigationService = class MarkerNavigationService {\r\n constructor(_markerService) {\r\n this._markerService = _markerService;\r\n this._provider = new LinkedList();\r\n }\r\n getMarkerList(resource) {\r\n for (let provider of this._provider) {\r\n const result = provider.getMarkerList(resource);\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n // default\r\n return new MarkerList(resource, this._markerService);\r\n }\r\n};\r\nMarkerNavigationService = __decorate([\r\n __param(0, IMarkerService)\r\n], MarkerNavigationService);\r\nregisterSingleton(IMarkerNavigationService, MarkerNavigationService, true);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { RawContextKey, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { registerEditorAction, registerEditorContribution, EditorAction, EditorCommand, registerEditorCommand } from '../../browser/editorExtensions.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { MarkerNavigationWidget } from './gotoErrorWidget.js';\r\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\r\nimport { MenuId } from '../../../platform/actions/common/actions.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { IMarkerNavigationService } from './markerNavigationService.js';\r\nimport { registerIcon } from '../../../platform/theme/common/iconRegistry.js';\r\nlet MarkerController = class MarkerController {\r\n constructor(editor, _markerNavigationService, _contextKeyService, _editorService, _instantiationService) {\r\n this._markerNavigationService = _markerNavigationService;\r\n this._contextKeyService = _contextKeyService;\r\n this._editorService = _editorService;\r\n this._instantiationService = _instantiationService;\r\n this._sessionDispoables = new DisposableStore();\r\n this._editor = editor;\r\n this._widgetVisible = CONTEXT_MARKERS_NAVIGATION_VISIBLE.bindTo(this._contextKeyService);\r\n }\r\n static get(editor) {\r\n return editor.getContribution(MarkerController.ID);\r\n }\r\n dispose() {\r\n this._cleanUp();\r\n this._sessionDispoables.dispose();\r\n }\r\n _cleanUp() {\r\n this._widgetVisible.reset();\r\n this._sessionDispoables.clear();\r\n this._widget = undefined;\r\n this._model = undefined;\r\n }\r\n _getOrCreateModel(uri) {\r\n if (this._model && this._model.matches(uri)) {\r\n return this._model;\r\n }\r\n let reusePosition = false;\r\n if (this._model) {\r\n reusePosition = true;\r\n this._cleanUp();\r\n }\r\n this._model = this._markerNavigationService.getMarkerList(uri);\r\n if (reusePosition) {\r\n this._model.move(true, this._editor.getModel(), this._editor.getPosition());\r\n }\r\n this._widget = this._instantiationService.createInstance(MarkerNavigationWidget, this._editor);\r\n this._widget.onDidClose(() => this.close(), this, this._sessionDispoables);\r\n this._widgetVisible.set(true);\r\n this._sessionDispoables.add(this._model);\r\n this._sessionDispoables.add(this._widget);\r\n // follow cursor\r\n this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(e => {\r\n var _a, _b, _c;\r\n if (!((_a = this._model) === null || _a === void 0 ? void 0 : _a.selected) || !Range.containsPosition((_b = this._model) === null || _b === void 0 ? void 0 : _b.selected.marker, e.position)) {\r\n (_c = this._model) === null || _c === void 0 ? void 0 : _c.resetIndex();\r\n }\r\n }));\r\n // update markers\r\n this._sessionDispoables.add(this._model.onDidChange(() => {\r\n if (!this._widget || !this._widget.position || !this._model) {\r\n return;\r\n }\r\n const info = this._model.find(this._editor.getModel().uri, this._widget.position);\r\n if (info) {\r\n this._widget.updateMarker(info.marker);\r\n }\r\n else {\r\n this._widget.showStale();\r\n }\r\n }));\r\n // open related\r\n this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(related => {\r\n this._editorService.openCodeEditor({\r\n resource: related.resource,\r\n options: { pinned: true, revealIfOpened: true, selection: Range.lift(related).collapseToStart() }\r\n }, this._editor);\r\n this.close(false);\r\n }));\r\n this._sessionDispoables.add(this._editor.onDidChangeModel(() => this._cleanUp()));\r\n return this._model;\r\n }\r\n close(focusEditor = true) {\r\n this._cleanUp();\r\n if (focusEditor) {\r\n this._editor.focus();\r\n }\r\n }\r\n showAtMarker(marker) {\r\n if (this._editor.hasModel()) {\r\n const model = this._getOrCreateModel(this._editor.getModel().uri);\r\n model.resetIndex();\r\n model.move(true, this._editor.getModel(), new Position(marker.startLineNumber, marker.startColumn));\r\n if (model.selected) {\r\n this._widget.showAtMarker(model.selected.marker, model.selected.index, model.selected.total);\r\n }\r\n }\r\n }\r\n nagivate(next, multiFile) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this._editor.hasModel()) {\r\n const model = this._getOrCreateModel(multiFile ? undefined : this._editor.getModel().uri);\r\n model.move(next, this._editor.getModel(), this._editor.getPosition());\r\n if (!model.selected) {\r\n return;\r\n }\r\n if (model.selected.marker.resource.toString() !== this._editor.getModel().uri.toString()) {\r\n // show in different editor\r\n this._cleanUp();\r\n const otherEditor = yield this._editorService.openCodeEditor({\r\n resource: model.selected.marker.resource,\r\n options: { pinned: false, revealIfOpened: true, selectionRevealType: 2 /* NearTop */, selection: model.selected.marker }\r\n }, this._editor);\r\n if (otherEditor) {\r\n MarkerController.get(otherEditor).close();\r\n MarkerController.get(otherEditor).nagivate(next, multiFile);\r\n }\r\n }\r\n else {\r\n // show in this editor\r\n this._widget.showAtMarker(model.selected.marker, model.selected.index, model.selected.total);\r\n }\r\n }\r\n });\r\n }\r\n};\r\nMarkerController.ID = 'editor.contrib.markerController';\r\nMarkerController = __decorate([\r\n __param(1, IMarkerNavigationService),\r\n __param(2, IContextKeyService),\r\n __param(3, ICodeEditorService),\r\n __param(4, IInstantiationService)\r\n], MarkerController);\r\nexport { MarkerController };\r\nclass MarkerNavigationAction extends EditorAction {\r\n constructor(_next, _multiFile, opts) {\r\n super(opts);\r\n this._next = _next;\r\n this._multiFile = _multiFile;\r\n }\r\n run(_accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (editor.hasModel()) {\r\n MarkerController.get(editor).nagivate(this._next, this._multiFile);\r\n }\r\n });\r\n }\r\n}\r\nexport class NextMarkerAction extends MarkerNavigationAction {\r\n constructor() {\r\n super(true, false, {\r\n id: NextMarkerAction.ID,\r\n label: NextMarkerAction.LABEL,\r\n alias: 'Go to Next Problem (Error, Warning, Info)',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 512 /* Alt */ | 66 /* F8 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MarkerNavigationWidget.TitleMenu,\r\n title: NextMarkerAction.LABEL,\r\n icon: registerIcon('marker-navigation-next', Codicon.chevronDown, nls.localize('nextMarkerIcon', 'Icon for goto next marker.')),\r\n group: 'navigation',\r\n order: 1\r\n }\r\n });\r\n }\r\n}\r\nNextMarkerAction.ID = 'editor.action.marker.next';\r\nNextMarkerAction.LABEL = nls.localize('markerAction.next.label', \"Go to Next Problem (Error, Warning, Info)\");\r\nclass PrevMarkerAction extends MarkerNavigationAction {\r\n constructor() {\r\n super(false, false, {\r\n id: PrevMarkerAction.ID,\r\n label: PrevMarkerAction.LABEL,\r\n alias: 'Go to Previous Problem (Error, Warning, Info)',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 66 /* F8 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MarkerNavigationWidget.TitleMenu,\r\n title: NextMarkerAction.LABEL,\r\n icon: registerIcon('marker-navigation-previous', Codicon.chevronUp, nls.localize('previousMarkerIcon', 'Icon for goto previous marker.')),\r\n group: 'navigation',\r\n order: 2\r\n }\r\n });\r\n }\r\n}\r\nPrevMarkerAction.ID = 'editor.action.marker.prev';\r\nPrevMarkerAction.LABEL = nls.localize('markerAction.previous.label', \"Go to Previous Problem (Error, Warning, Info)\");\r\nclass NextMarkerInFilesAction extends MarkerNavigationAction {\r\n constructor() {\r\n super(true, true, {\r\n id: 'editor.action.marker.nextInFiles',\r\n label: nls.localize('markerAction.nextInFiles.label', \"Go to Next Problem in Files (Error, Warning, Info)\"),\r\n alias: 'Go to Next Problem in Files (Error, Warning, Info)',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 66 /* F8 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarGoMenu,\r\n title: nls.localize({ key: 'miGotoNextProblem', comment: ['&& denotes a mnemonic'] }, \"Next &&Problem\"),\r\n group: '6_problem_nav',\r\n order: 1\r\n }\r\n });\r\n }\r\n}\r\nclass PrevMarkerInFilesAction extends MarkerNavigationAction {\r\n constructor() {\r\n super(false, true, {\r\n id: 'editor.action.marker.prevInFiles',\r\n label: nls.localize('markerAction.previousInFiles.label', \"Go to Previous Problem in Files (Error, Warning, Info)\"),\r\n alias: 'Go to Previous Problem in Files (Error, Warning, Info)',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 1024 /* Shift */ | 66 /* F8 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarGoMenu,\r\n title: nls.localize({ key: 'miGotoPreviousProblem', comment: ['&& denotes a mnemonic'] }, \"Previous &&Problem\"),\r\n group: '6_problem_nav',\r\n order: 2\r\n }\r\n });\r\n }\r\n}\r\nregisterEditorContribution(MarkerController.ID, MarkerController);\r\nregisterEditorAction(NextMarkerAction);\r\nregisterEditorAction(PrevMarkerAction);\r\nregisterEditorAction(NextMarkerInFilesAction);\r\nregisterEditorAction(PrevMarkerInFilesAction);\r\nconst CONTEXT_MARKERS_NAVIGATION_VISIBLE = new RawContextKey('markersNavigationVisible', false);\r\nconst MarkerCommand = EditorCommand.bindToContribution(MarkerController.get);\r\nregisterEditorCommand(new MarkerCommand({\r\n id: 'closeMarkersNavigation',\r\n precondition: CONTEXT_MARKERS_NAVIGATION_VISIBLE,\r\n handler: x => x.close(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 50,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { toDisposable, DisposableStore, Disposable } from '../../../base/common/lifecycle.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { isNonEmptyArray } from '../../../base/common/arrays.js';\r\nimport { IMarkerData, MarkerSeverity } from '../../../platform/markers/common/markers.js';\r\nimport { basename } from '../../../base/common/resources.js';\r\nimport { IMarkerDecorationsService } from '../../common/services/markersDecorationService.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { IOpenerService } from '../../../platform/opener/common/opener.js';\r\nimport { MarkerController, NextMarkerAction } from '../gotoError/gotoError.js';\r\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding.js';\r\nimport { createCancelablePromise, disposableTimeout } from '../../../base/common/async.js';\r\nimport { getCodeActions } from '../codeAction/codeAction.js';\r\nimport { QuickFixAction, QuickFixController } from '../codeAction/codeActionCommands.js';\r\nimport { CodeActionKind } from '../codeAction/types.js';\r\nimport { Progress } from '../../../platform/progress/common/progress.js';\r\nimport { renderHoverAction } from '../../../base/browser/ui/hover/hoverWidget.js';\r\nconst $ = dom.$;\r\nexport class MarkerHover {\r\n constructor(range, marker) {\r\n this.range = range;\r\n this.marker = marker;\r\n }\r\n equals(other) {\r\n if (other instanceof MarkerHover) {\r\n return IMarkerData.makeKey(this.marker) === IMarkerData.makeKey(other.marker);\r\n }\r\n return false;\r\n }\r\n}\r\nconst markerCodeActionTrigger = {\r\n type: 2 /* Manual */,\r\n filter: { include: CodeActionKind.QuickFix }\r\n};\r\nlet MarkerHoverParticipant = class MarkerHoverParticipant {\r\n constructor(_editor, _hover, _markerDecorationsService, _keybindingService, _openerService) {\r\n this._editor = _editor;\r\n this._hover = _hover;\r\n this._markerDecorationsService = _markerDecorationsService;\r\n this._keybindingService = _keybindingService;\r\n this._openerService = _openerService;\r\n this.recentMarkerCodeActionsInfo = undefined;\r\n }\r\n computeSync(hoverRange, lineDecorations) {\r\n if (!this._editor.hasModel()) {\r\n return [];\r\n }\r\n const model = this._editor.getModel();\r\n const lineNumber = hoverRange.startLineNumber;\r\n const maxColumn = model.getLineMaxColumn(lineNumber);\r\n const result = [];\r\n for (const d of lineDecorations) {\r\n const startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1;\r\n const endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn;\r\n const marker = this._markerDecorationsService.getMarker(model.uri, d);\r\n if (!marker) {\r\n continue;\r\n }\r\n const range = new Range(hoverRange.startLineNumber, startColumn, hoverRange.startLineNumber, endColumn);\r\n result.push(new MarkerHover(range, marker));\r\n }\r\n return result;\r\n }\r\n renderHoverParts(hoverParts, fragment) {\r\n if (!hoverParts.length) {\r\n return Disposable.None;\r\n }\r\n const disposables = new DisposableStore();\r\n hoverParts.forEach(msg => fragment.appendChild(this.renderMarkerHover(msg, disposables)));\r\n const markerHoverForStatusbar = hoverParts.length === 1 ? hoverParts[0] : hoverParts.sort((a, b) => MarkerSeverity.compare(a.marker.severity, b.marker.severity))[0];\r\n fragment.appendChild(this.renderMarkerStatusbar(markerHoverForStatusbar, disposables));\r\n return disposables;\r\n }\r\n renderMarkerHover(markerHover, disposables) {\r\n const hoverElement = $('div.hover-row');\r\n const markerElement = dom.append(hoverElement, $('div.marker.hover-contents'));\r\n const { source, message, code, relatedInformation } = markerHover.marker;\r\n this._editor.applyFontInfo(markerElement);\r\n const messageElement = dom.append(markerElement, $('span'));\r\n messageElement.style.whiteSpace = 'pre-wrap';\r\n messageElement.innerText = message;\r\n if (source || code) {\r\n // Code has link\r\n if (code && typeof code !== 'string') {\r\n const sourceAndCodeElement = $('span');\r\n if (source) {\r\n const sourceElement = dom.append(sourceAndCodeElement, $('span'));\r\n sourceElement.innerText = source;\r\n }\r\n const codeLink = dom.append(sourceAndCodeElement, $('a.code-link'));\r\n codeLink.setAttribute('href', code.target.toString());\r\n disposables.add(dom.addDisposableListener(codeLink, 'click', (e) => {\r\n this._openerService.open(code.target);\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }));\r\n const codeElement = dom.append(codeLink, $('span'));\r\n codeElement.innerText = code.value;\r\n const detailsElement = dom.append(markerElement, sourceAndCodeElement);\r\n detailsElement.style.opacity = '0.6';\r\n detailsElement.style.paddingLeft = '6px';\r\n }\r\n else {\r\n const detailsElement = dom.append(markerElement, $('span'));\r\n detailsElement.style.opacity = '0.6';\r\n detailsElement.style.paddingLeft = '6px';\r\n detailsElement.innerText = source && code ? `${source}(${code})` : source ? source : `(${code})`;\r\n }\r\n }\r\n if (isNonEmptyArray(relatedInformation)) {\r\n for (const { message, resource, startLineNumber, startColumn } of relatedInformation) {\r\n const relatedInfoContainer = dom.append(markerElement, $('div'));\r\n relatedInfoContainer.style.marginTop = '8px';\r\n const a = dom.append(relatedInfoContainer, $('a'));\r\n a.innerText = `${basename(resource)}(${startLineNumber}, ${startColumn}): `;\r\n a.style.cursor = 'pointer';\r\n disposables.add(dom.addDisposableListener(a, 'click', (e) => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n if (this._openerService) {\r\n this._openerService.open(resource, {\r\n fromUserGesture: true,\r\n editorOptions: { selection: { startLineNumber, startColumn } }\r\n }).catch(onUnexpectedError);\r\n }\r\n }));\r\n const messageElement = dom.append(relatedInfoContainer, $('span'));\r\n messageElement.innerText = message;\r\n this._editor.applyFontInfo(messageElement);\r\n }\r\n }\r\n return hoverElement;\r\n }\r\n renderMarkerStatusbar(markerHover, disposables) {\r\n const hoverElement = $('div.hover-row.status-bar');\r\n const actionsElement = dom.append(hoverElement, $('div.actions'));\r\n if (markerHover.marker.severity === MarkerSeverity.Error || markerHover.marker.severity === MarkerSeverity.Warning || markerHover.marker.severity === MarkerSeverity.Info) {\r\n disposables.add(this.renderAction(actionsElement, {\r\n label: nls.localize('peek problem', \"Peek Problem\"),\r\n commandId: NextMarkerAction.ID,\r\n run: () => {\r\n this._hover.hide();\r\n MarkerController.get(this._editor).showAtMarker(markerHover.marker);\r\n this._editor.focus();\r\n }\r\n }));\r\n }\r\n if (!this._editor.getOption(75 /* readOnly */)) {\r\n const quickfixPlaceholderElement = dom.append(actionsElement, $('div'));\r\n if (this.recentMarkerCodeActionsInfo) {\r\n if (IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker) === IMarkerData.makeKey(markerHover.marker)) {\r\n if (!this.recentMarkerCodeActionsInfo.hasCodeActions) {\r\n quickfixPlaceholderElement.textContent = nls.localize('noQuickFixes', \"No quick fixes available\");\r\n }\r\n }\r\n else {\r\n this.recentMarkerCodeActionsInfo = undefined;\r\n }\r\n }\r\n const updatePlaceholderDisposable = this.recentMarkerCodeActionsInfo && !this.recentMarkerCodeActionsInfo.hasCodeActions ? Disposable.None : disposables.add(disposableTimeout(() => quickfixPlaceholderElement.textContent = nls.localize('checkingForQuickFixes', \"Checking for quick fixes...\"), 200));\r\n if (!quickfixPlaceholderElement.textContent) {\r\n // Have some content in here to avoid flickering\r\n quickfixPlaceholderElement.textContent = String.fromCharCode(0xA0); //  \r\n }\r\n const codeActionsPromise = this.getCodeActions(markerHover.marker);\r\n disposables.add(toDisposable(() => codeActionsPromise.cancel()));\r\n codeActionsPromise.then(actions => {\r\n updatePlaceholderDisposable.dispose();\r\n this.recentMarkerCodeActionsInfo = { marker: markerHover.marker, hasCodeActions: actions.validActions.length > 0 };\r\n if (!this.recentMarkerCodeActionsInfo.hasCodeActions) {\r\n actions.dispose();\r\n quickfixPlaceholderElement.textContent = nls.localize('noQuickFixes', \"No quick fixes available\");\r\n return;\r\n }\r\n quickfixPlaceholderElement.style.display = 'none';\r\n let showing = false;\r\n disposables.add(toDisposable(() => {\r\n if (!showing) {\r\n actions.dispose();\r\n }\r\n }));\r\n disposables.add(this.renderAction(actionsElement, {\r\n label: nls.localize('quick fixes', \"Quick Fix...\"),\r\n commandId: QuickFixAction.Id,\r\n run: (target) => {\r\n showing = true;\r\n const controller = QuickFixController.get(this._editor);\r\n const elementPosition = dom.getDomNodePagePosition(target);\r\n // Hide the hover pre-emptively, otherwise the editor can close the code actions\r\n // context menu as well when using keyboard navigation\r\n this._hover.hide();\r\n controller.showCodeActions(markerCodeActionTrigger, actions, {\r\n x: elementPosition.left + 6,\r\n y: elementPosition.top + elementPosition.height + 6\r\n });\r\n }\r\n }));\r\n });\r\n }\r\n return hoverElement;\r\n }\r\n renderAction(parent, actionOptions) {\r\n const keybinding = this._keybindingService.lookupKeybinding(actionOptions.commandId);\r\n const keybindingLabel = keybinding ? keybinding.getLabel() : null;\r\n return renderHoverAction(parent, actionOptions, keybindingLabel);\r\n }\r\n getCodeActions(marker) {\r\n return createCancelablePromise(cancellationToken => {\r\n return getCodeActions(this._editor.getModel(), new Range(marker.startLineNumber, marker.startColumn, marker.endLineNumber, marker.endColumn), markerCodeActionTrigger, Progress.None, cancellationToken);\r\n });\r\n }\r\n};\r\nMarkerHoverParticipant = __decorate([\r\n __param(2, IMarkerDecorationsService),\r\n __param(3, IKeybindingService),\r\n __param(4, IOpenerService)\r\n], MarkerHoverParticipant);\r\nexport { MarkerHoverParticipant };\r\n","/*\nThe MIT License (MIT)\n\nCopyright © 2015 Nicolas Bevacqua\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\nlet __insane_func;\n\n(function () { function r(e, n, t) { function o(i, f) { if (!n[i]) { if (!e[i]) { var c = \"function\" == typeof require && require; if (!f && c) return c(i, !0); if (u) return u(i, !0); var a = new Error(\"Cannot find module '\" + i + \"'\"); throw a.code = \"MODULE_NOT_FOUND\", a } var p = n[i] = { exports: {} }; e[i][0].call(p.exports, function (r) { var n = e[i][1][r]; return o(n || r) }, p, p.exports, r, e, n, t) } return n[i].exports } for (var u = \"function\" == typeof require && require, i = 0; i < t.length; i++)o(t[i]); return o } return r })()({\n\t1: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar toMap = require('./toMap');\n\t\tvar uris = ['background', 'base', 'cite', 'href', 'longdesc', 'src', 'usemap'];\n\n\t\tmodule.exports = {\n\t\t\turis: toMap(uris) // attributes that have an href and hence need to be sanitized\n\t\t};\n\n\t}, { \"./toMap\": 10 }], 2: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar defaults = {\n\t\t\tallowedAttributes: {\n\t\t\t\t'*': ['title', 'accesskey'],\n\t\t\t\ta: ['href', 'name', 'target', 'aria-label'],\n\t\t\t\tiframe: ['allowfullscreen', 'frameborder', 'src'],\n\t\t\t\timg: ['src', 'alt', 'title', 'aria-label']\n\t\t\t},\n\t\t\tallowedClasses: {},\n\t\t\tallowedSchemes: ['http', 'https', 'mailto'],\n\t\t\tallowedTags: [\n\t\t\t\t'a', 'abbr', 'article', 'b', 'blockquote', 'br', 'caption', 'code', 'del', 'details', 'div', 'em',\n\t\t\t\t'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'ins', 'kbd', 'li', 'main', 'mark',\n\t\t\t\t'ol', 'p', 'pre', 'section', 'span', 'strike', 'strong', 'sub', 'summary', 'sup', 'table',\n\t\t\t\t'tbody', 'td', 'th', 'thead', 'tr', 'u', 'ul'\n\t\t\t],\n\t\t\tfilter: null\n\t\t};\n\n\t\tmodule.exports = defaults;\n\n\t}, {}], 3: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar toMap = require('./toMap');\n\t\tvar voids = ['area', 'br', 'col', 'hr', 'img', 'wbr', 'input', 'base', 'basefont', 'link', 'meta'];\n\n\t\tmodule.exports = {\n\t\t\tvoids: toMap(voids)\n\t\t};\n\n\t}, { \"./toMap\": 10 }], 4: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar he = require('he');\n\t\tvar assign = require('assignment');\n\t\tvar parser = require('./parser');\n\t\tvar sanitizer = require('./sanitizer');\n\t\tvar defaults = require('./defaults');\n\n\t\tfunction insane(html, options, strict) {\n\t\t\tvar buffer = [];\n\t\t\tvar configuration = strict === true ? options : assign({}, defaults, options);\n\t\t\tvar handler = sanitizer(buffer, configuration);\n\n\t\t\tparser(html, handler);\n\n\t\t\treturn buffer.join('');\n\t\t}\n\n\t\tinsane.defaults = defaults;\n\t\tmodule.exports = insane;\n\t\t__insane_func = insane;\n\n\t}, { \"./defaults\": 2, \"./parser\": 7, \"./sanitizer\": 8, \"assignment\": 6, \"he\": 9 }], 5: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tmodule.exports = function lowercase(string) {\n\t\t\treturn typeof string === 'string' ? string.toLowerCase() : string;\n\t\t};\n\n\t}, {}], 6: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tfunction assignment(result) {\n\t\t\tvar stack = Array.prototype.slice.call(arguments, 1);\n\t\t\tvar item;\n\t\t\tvar key;\n\t\t\twhile (stack.length) {\n\t\t\t\titem = stack.shift();\n\t\t\t\tfor (key in item) {\n\t\t\t\t\tif (item.hasOwnProperty(key)) {\n\t\t\t\t\t\tif (Object.prototype.toString.call(result[key]) === '[object Object]') {\n\t\t\t\t\t\t\tresult[key] = assignment(result[key], item[key]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult[key] = item[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\tmodule.exports = assignment;\n\n\t}, {}], 7: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar he = require('he');\n\t\tvar lowercase = require('./lowercase');\n\t\tvar attributes = require('./attributes');\n\t\tvar elements = require('./elements');\n\t\tvar rstart = /^<\\s*([\\w:-]+)((?:\\s+[\\w:-]+(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*(\\/?)\\s*>/;\n\t\tvar rend = /^<\\s*\\/\\s*([\\w:-]+)[^>]*>/;\n\t\tvar rattrs = /([\\w:-]+)(?:\\s*=\\s*(?:(?:\"((?:[^\"])*)\")|(?:'((?:[^'])*)')|([^>\\s]+)))?/g;\n\t\tvar rtag = /^');\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tif (handler.comment) {\n\t\t\t\t\t\thandler.comment(html.substring(4, index));\n\t\t\t\t\t}\n\t\t\t\t\thtml = html.substring(index + 3);\n\t\t\t\t\tchars = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction parseTagDecode() {\n\t\t\t\tif (!chars) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar text;\n\t\t\t\tvar index = html.indexOf('<');\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\ttext = html.substring(0, index);\n\t\t\t\t\thtml = html.substring(index);\n\t\t\t\t} else {\n\t\t\t\t\ttext = html;\n\t\t\t\t\thtml = '';\n\t\t\t\t}\n\t\t\t\tif (handler.chars) {\n\t\t\t\t\thandler.chars(text);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction parseStartTag(tag, tagName, rest, unary) {\n\t\t\t\tvar attrs = {};\n\t\t\t\tvar low = lowercase(tagName);\n\t\t\t\tvar u = elements.voids[low] || !!unary;\n\n\t\t\t\trest.replace(rattrs, attrReplacer);\n\n\t\t\t\tif (!u) {\n\t\t\t\t\tstack.push(low);\n\t\t\t\t}\n\t\t\t\tif (handler.start) {\n\t\t\t\t\thandler.start(low, attrs, u);\n\t\t\t\t}\n\n\t\t\t\tfunction attrReplacer(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) {\n\t\t\t\t\tif (doubleQuotedValue === void 0 && singleQuotedValue === void 0 && unquotedValue === void 0) {\n\t\t\t\t\t\tattrs[name] = void 0; // attribute is like \n\t\t\t\t\t} else {\n\t\t\t\t\t\tattrs[name] = he.decode(doubleQuotedValue || singleQuotedValue || unquotedValue || '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction parseEndTag(tag, tagName) {\n\t\t\t\tvar i;\n\t\t\t\tvar pos = 0;\n\t\t\t\tvar low = lowercase(tagName);\n\t\t\t\tif (low) {\n\t\t\t\t\tfor (pos = stack.length - 1; pos >= 0; pos--) {\n\t\t\t\t\t\tif (stack[pos] === low) {\n\t\t\t\t\t\t\tbreak; // find the closest opened tag of the same type\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (pos >= 0) {\n\t\t\t\t\tfor (i = stack.length - 1; i >= pos; i--) {\n\t\t\t\t\t\tif (handler.end) { // close all the open elements, up the stack\n\t\t\t\t\t\t\thandler.end(stack[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tstack.length = pos;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tmodule.exports = parser;\n\n\t}, { \"./attributes\": 1, \"./elements\": 3, \"./lowercase\": 5, \"he\": 9 }], 8: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar he = require('he');\n\t\tvar lowercase = require('./lowercase');\n\t\tvar attributes = require('./attributes');\n\t\tvar elements = require('./elements');\n\n\t\tfunction sanitizer(buffer, options) {\n\t\t\tvar last;\n\t\t\tvar context;\n\t\t\tvar o = options || {};\n\n\t\t\treset();\n\n\t\t\treturn {\n\t\t\t\tstart: start,\n\t\t\t\tend: end,\n\t\t\t\tchars: chars\n\t\t\t};\n\n\t\t\tfunction out(value) {\n\t\t\t\tbuffer.push(value);\n\t\t\t}\n\n\t\t\tfunction start(tag, attrs, unary) {\n\t\t\t\tvar low = lowercase(tag);\n\n\t\t\t\tif (context.ignoring) {\n\t\t\t\t\tignore(low); return;\n\t\t\t\t}\n\t\t\t\tif ((o.allowedTags || []).indexOf(low) === -1) {\n\t\t\t\t\tignore(low); return;\n\t\t\t\t}\n\t\t\t\tif (o.filter && !o.filter({ tag: low, attrs: attrs })) {\n\t\t\t\t\tignore(low); return;\n\t\t\t\t}\n\n\t\t\t\tout('<');\n\t\t\t\tout(low);\n\t\t\t\tObject.keys(attrs).forEach(parse);\n\t\t\t\tout(unary ? '/>' : '>');\n\n\t\t\t\tfunction parse(key) {\n\t\t\t\t\tvar value = attrs[key];\n\t\t\t\t\tvar classesOk = (o.allowedClasses || {})[low] || [];\n\t\t\t\t\tvar attrsOk = (o.allowedAttributes || {})[low] || [];\n\t\t\t\t\tattrsOk = attrsOk.concat((o.allowedAttributes || {})['*'] || []);\n\t\t\t\t\tvar valid;\n\t\t\t\t\tvar lkey = lowercase(key);\n\t\t\t\t\tif (lkey === 'class' && attrsOk.indexOf(lkey) === -1) {\n\t\t\t\t\t\tvalue = value.split(' ').filter(isValidClass).join(' ').trim();\n\t\t\t\t\t\tvalid = value.length;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalid = attrsOk.indexOf(lkey) !== -1 && (attributes.uris[lkey] !== true || testUrl(value));\n\t\t\t\t\t}\n\t\t\t\t\tif (valid) {\n\t\t\t\t\t\tout(' ');\n\t\t\t\t\t\tout(key);\n\t\t\t\t\t\tif (typeof value === 'string') {\n\t\t\t\t\t\t\tout('=\"');\n\t\t\t\t\t\t\tout(he.encode(value));\n\t\t\t\t\t\t\tout('\"');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfunction isValidClass(className) {\n\t\t\t\t\t\treturn classesOk && classesOk.indexOf(className) !== -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction end(tag) {\n\t\t\t\tvar low = lowercase(tag);\n\t\t\t\tvar allowed = (o.allowedTags || []).indexOf(low) !== -1;\n\t\t\t\tif (allowed) {\n\t\t\t\t\tif (context.ignoring === false) {\n\t\t\t\t\t\tout('');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tunignore(low);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tunignore(low);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction testUrl(text) {\n\t\t\t\tvar start = text[0];\n\t\t\t\tif (start === '#' || start === '/') {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tvar colon = text.indexOf(':');\n\t\t\t\tif (colon === -1) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tvar questionmark = text.indexOf('?');\n\t\t\t\tif (questionmark !== -1 && colon > questionmark) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tvar hash = text.indexOf('#');\n\t\t\t\tif (hash !== -1 && colon > hash) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn o.allowedSchemes.some(matches);\n\n\t\t\t\tfunction matches(scheme) {\n\t\t\t\t\treturn text.indexOf(scheme + ':') === 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction chars(text) {\n\t\t\t\tif (context.ignoring === false) {\n\t\t\t\t\tout(o.transformText ? o.transformText(text) : text);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction ignore(tag) {\n\t\t\t\tif (elements.voids[tag]) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (context.ignoring === false) {\n\t\t\t\t\tcontext = { ignoring: tag, depth: 1 };\n\t\t\t\t} else if (context.ignoring === tag) {\n\t\t\t\t\tcontext.depth++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction unignore(tag) {\n\t\t\t\tif (context.ignoring === tag) {\n\t\t\t\t\tif (--context.depth <= 0) {\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction reset() {\n\t\t\t\tcontext = { ignoring: false, depth: 0 };\n\t\t\t}\n\t\t}\n\n\t\tmodule.exports = sanitizer;\n\n\t}, { \"./attributes\": 1, \"./elements\": 3, \"./lowercase\": 5, \"he\": 9 }], 9: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tvar escapes = {\n\t\t\t'&': '&',\n\t\t\t'<': '<',\n\t\t\t'>': '>',\n\t\t\t'\"': '"',\n\t\t\t\"'\": '''\n\t\t};\n\t\tvar unescapes = {\n\t\t\t'&': '&',\n\t\t\t'<': '<',\n\t\t\t'>': '>',\n\t\t\t'"': '\"',\n\t\t\t''': \"'\"\n\t\t};\n\t\tvar rescaped = /(&|<|>|"|')/g;\n\t\tvar runescaped = /[&<>\"']/g;\n\n\t\tfunction escapeHtmlChar(match) {\n\t\t\treturn escapes[match];\n\t\t}\n\t\tfunction unescapeHtmlChar(match) {\n\t\t\treturn unescapes[match];\n\t\t}\n\n\t\tfunction escapeHtml(text) {\n\t\t\treturn text == null ? '' : String(text).replace(runescaped, escapeHtmlChar);\n\t\t}\n\n\t\tfunction unescapeHtml(html) {\n\t\t\treturn html == null ? '' : String(html).replace(rescaped, unescapeHtmlChar);\n\t\t}\n\n\t\tescapeHtml.options = unescapeHtml.options = {};\n\n\t\tmodule.exports = {\n\t\t\tencode: escapeHtml,\n\t\t\tescape: escapeHtml,\n\t\t\tdecode: unescapeHtml,\n\t\t\tunescape: unescapeHtml,\n\t\t\tversion: '1.0.0-browser'\n\t\t};\n\n\t}, {}], 10: [function (require, module, exports) {\n\t\t'use strict';\n\n\t\tfunction toMap(list) {\n\t\t\treturn list.reduce(asKey, {});\n\t\t}\n\n\t\tfunction asKey(accumulator, item) {\n\t\t\taccumulator[item] = true;\n\t\t\treturn accumulator;\n\t\t}\n\n\t\tmodule.exports = toMap;\n\n\t}, {}]\n}, {}, [4]);\n\n// ESM-comment-begin\n// define(function() { return { insane: __insane_func }; });\n// ESM-comment-end\n\n// ESM-uncomment-begin\nexport var insane = __insane_func;\n// ESM-uncomment-end\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\nimport * as DOM from './dom.js';\r\nimport { createElement } from './formattedTextRenderer.js';\r\nimport { onUnexpectedError } from '../common/errors.js';\r\nimport { parseHrefAndDimensions, removeMarkdownEscapes } from '../common/htmlContent.js';\r\nimport { defaultGenerator } from '../common/idGenerator.js';\r\nimport * as marked from '../common/marked/marked.js';\r\nimport { insane } from '../common/insane/insane.js';\r\nimport { parse } from '../common/marshalling.js';\r\nimport { cloneAndChange } from '../common/objects.js';\r\nimport { escape } from '../common/strings.js';\r\nimport { URI } from '../common/uri.js';\r\nimport { FileAccess, Schemas } from '../common/network.js';\r\nimport { markdownEscapeEscapedIcons } from '../common/iconLabels.js';\r\nimport { resolvePath } from '../common/resources.js';\r\nimport { StandardMouseEvent } from './mouseEvent.js';\r\nimport { renderLabelWithIcons } from './ui/iconLabel/iconLabels.js';\r\nimport { Event } from '../common/event.js';\r\nimport { domEvent } from './event.js';\r\nconst _ttpInsane = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('insane', {\r\n createHTML(value, options) {\r\n return insane(value, options);\r\n }\r\n});\r\n/**\r\n * Low-level way create a html element from a markdown string.\r\n *\r\n * **Note** that for most cases you should be using [`MarkdownRenderer`](./src/vs/editor/browser/core/markdownRenderer.ts)\r\n * which comes with support for pretty code block rendering and which uses the default way of handling links.\r\n */\r\nexport function renderMarkdown(markdown, options = {}, markedOptions = {}) {\r\n var _a;\r\n const element = createElement(options);\r\n const _uriMassage = function (part) {\r\n let data;\r\n try {\r\n data = parse(decodeURIComponent(part));\r\n }\r\n catch (e) {\r\n // ignore\r\n }\r\n if (!data) {\r\n return part;\r\n }\r\n data = cloneAndChange(data, value => {\r\n if (markdown.uris && markdown.uris[value]) {\r\n return URI.revive(markdown.uris[value]);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n });\r\n return encodeURIComponent(JSON.stringify(data));\r\n };\r\n const _href = function (href, isDomUri) {\r\n const data = markdown.uris && markdown.uris[href];\r\n if (!data) {\r\n return href; // no uri exists\r\n }\r\n let uri = URI.revive(data);\r\n if (URI.parse(href).toString() === uri.toString()) {\r\n return href; // no tranformation performed\r\n }\r\n if (isDomUri) {\r\n // this URI will end up as \"src\"-attribute of a dom node\r\n // and because of that special rewriting needs to be done\r\n // so that the URI uses a protocol that's understood by\r\n // browsers (like http or https)\r\n return FileAccess.asBrowserUri(uri).toString(true);\r\n }\r\n if (uri.query) {\r\n uri = uri.with({ query: _uriMassage(uri.query) });\r\n }\r\n return uri.toString();\r\n };\r\n // signal to code-block render that the\r\n // element has been created\r\n let signalInnerHTML;\r\n const withInnerHTML = new Promise(c => signalInnerHTML = c);\r\n const renderer = new marked.Renderer();\r\n renderer.image = (href, title, text) => {\r\n let dimensions = [];\r\n let attributes = [];\r\n if (href) {\r\n ({ href, dimensions } = parseHrefAndDimensions(href));\r\n href = _href(href, true);\r\n try {\r\n const hrefAsUri = URI.parse(href);\r\n if (options.baseUrl && hrefAsUri.scheme === Schemas.file) { // absolute or relative local path, or file: uri\r\n href = resolvePath(options.baseUrl, href).toString();\r\n }\r\n }\r\n catch (err) { }\r\n attributes.push(`src=\"${href}\"`);\r\n }\r\n if (text) {\r\n attributes.push(`alt=\"${text}\"`);\r\n }\r\n if (title) {\r\n attributes.push(`title=\"${title}\"`);\r\n }\r\n if (dimensions.length) {\r\n attributes = attributes.concat(dimensions);\r\n }\r\n return '';\r\n };\r\n renderer.link = (href, title, text) => {\r\n // Remove markdown escapes. Workaround for https://github.com/chjj/marked/issues/829\r\n if (href === text) { // raw link case\r\n text = removeMarkdownEscapes(text);\r\n }\r\n href = _href(href, false);\r\n if (options.baseUrl) {\r\n const hasScheme = /^\\w[\\w\\d+.-]*:/.test(href);\r\n if (!hasScheme) {\r\n href = resolvePath(options.baseUrl, href).toString();\r\n }\r\n }\r\n title = removeMarkdownEscapes(title);\r\n href = removeMarkdownEscapes(href);\r\n if (!href\r\n || href.match(/^data:|javascript:/i)\r\n || (href.match(/^command:/i) && !markdown.isTrusted)\r\n || href.match(/^command:(\\/\\/\\/)?_workbench\\.downloadResource/i)) {\r\n // drop the link\r\n return text;\r\n }\r\n else {\r\n // HTML Encode href\r\n href = href.replace(/&/g, '&')\r\n .replace(//g, '>')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''');\r\n return `
    ${text}`;\r\n }\r\n };\r\n renderer.paragraph = (text) => {\r\n if (markdown.supportThemeIcons) {\r\n const elements = renderLabelWithIcons(text);\r\n text = elements.map(e => typeof e === 'string' ? e : e.outerHTML).join('');\r\n }\r\n return `

    ${text}

    `;\r\n };\r\n if (options.codeBlockRenderer) {\r\n renderer.code = (code, lang) => {\r\n const value = options.codeBlockRenderer(lang, code);\r\n // when code-block rendering is async we return sync\r\n // but update the node with the real result later.\r\n const id = defaultGenerator.nextId();\r\n const promise = Promise.all([value, withInnerHTML]).then(values => {\r\n const span = element.querySelector(`div[data-code=\"${id}\"]`);\r\n if (span) {\r\n DOM.reset(span, values[0]);\r\n }\r\n }).catch(_err => {\r\n // ignore\r\n });\r\n if (options.asyncRenderCallback) {\r\n promise.then(options.asyncRenderCallback);\r\n }\r\n return `
    ${escape(code)}
    `;\r\n };\r\n }\r\n if (options.actionHandler) {\r\n options.actionHandler.disposeables.add(Event.any(domEvent(element, 'click'), domEvent(element, 'auxclick'))(e => {\r\n const mouseEvent = new StandardMouseEvent(e);\r\n if (!mouseEvent.leftButton && !mouseEvent.middleButton) {\r\n return;\r\n }\r\n let target = mouseEvent.target;\r\n if (target.tagName !== 'A') {\r\n target = target.parentElement;\r\n if (!target || target.tagName !== 'A') {\r\n return;\r\n }\r\n }\r\n try {\r\n const href = target.dataset['href'];\r\n if (href) {\r\n options.actionHandler.callback(href, mouseEvent);\r\n }\r\n }\r\n catch (err) {\r\n onUnexpectedError(err);\r\n }\r\n finally {\r\n mouseEvent.preventDefault();\r\n }\r\n }));\r\n }\r\n // Use our own sanitizer so that we can let through only spans.\r\n // Otherwise, we'd be letting all html be rendered.\r\n // If we want to allow markdown permitted tags, then we can delete sanitizer and sanitize.\r\n // We always pass the output through insane after this so that we don't rely on\r\n // marked for sanitization.\r\n markedOptions.sanitizer = (html) => {\r\n const match = markdown.isTrusted ? html.match(/^(]+>)|(<\\/\\s*span>)$/) : undefined;\r\n return match ? html : '';\r\n };\r\n markedOptions.sanitize = true;\r\n markedOptions.silent = true;\r\n markedOptions.renderer = renderer;\r\n // values that are too long will freeze the UI\r\n let value = (_a = markdown.value) !== null && _a !== void 0 ? _a : '';\r\n if (value.length > 100000) {\r\n value = `${value.substr(0, 100000)}…`;\r\n }\r\n // escape theme icons\r\n if (markdown.supportThemeIcons) {\r\n value = markdownEscapeEscapedIcons(value);\r\n }\r\n const renderedMarkdown = marked.parse(value, markedOptions);\r\n // sanitize with insane\r\n element.innerHTML = sanitizeRenderedMarkdown(markdown, renderedMarkdown);\r\n // signal that async code blocks can be now be inserted\r\n signalInnerHTML();\r\n // signal size changes for image tags\r\n if (options.asyncRenderCallback) {\r\n for (const img of element.getElementsByTagName('img')) {\r\n const listener = DOM.addDisposableListener(img, 'load', () => {\r\n listener.dispose();\r\n options.asyncRenderCallback();\r\n });\r\n }\r\n }\r\n return element;\r\n}\r\nfunction sanitizeRenderedMarkdown(options, renderedMarkdown) {\r\n var _a;\r\n const insaneOptions = getInsaneOptions(options);\r\n return (_a = _ttpInsane === null || _ttpInsane === void 0 ? void 0 : _ttpInsane.createHTML(renderedMarkdown, insaneOptions)) !== null && _a !== void 0 ? _a : insane(renderedMarkdown, insaneOptions);\r\n}\r\nfunction getInsaneOptions(options) {\r\n const allowedSchemes = [\r\n Schemas.http,\r\n Schemas.https,\r\n Schemas.mailto,\r\n Schemas.data,\r\n Schemas.file,\r\n Schemas.vscodeRemote,\r\n Schemas.vscodeRemoteResource,\r\n ];\r\n if (options.isTrusted) {\r\n allowedSchemes.push(Schemas.command);\r\n }\r\n return {\r\n allowedSchemes,\r\n // allowedTags should included everything that markdown renders to.\r\n // Since we have our own sanitize function for marked, it's possible we missed some tag so let insane make sure.\r\n // HTML tags that can result from markdown are from reading https://spec.commonmark.org/0.29/\r\n // HTML table tags that can result from markdown are from https://github.github.com/gfm/#tables-extension-\r\n allowedTags: ['ul', 'li', 'p', 'code', 'blockquote', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'em', 'pre', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'div', 'del', 'a', 'strong', 'br', 'img', 'span'],\r\n allowedAttributes: {\r\n 'a': ['href', 'name', 'target', 'data-href'],\r\n 'img': ['src', 'title', 'alt', 'width', 'height'],\r\n 'div': ['class', 'data-code'],\r\n 'span': ['class', 'style'],\r\n // https://github.com/microsoft/vscode/issues/95937\r\n 'th': ['align'],\r\n 'td': ['align']\r\n },\r\n filter(token) {\r\n if (token.tag === 'span' && options.isTrusted) {\r\n if (token.attrs['style'] && (Object.keys(token.attrs).length === 1)) {\r\n return !!token.attrs['style'].match(/^(color\\:#[0-9a-fA-F]+;)?(background-color\\:#[0-9a-fA-F]+;)?$/);\r\n }\r\n else if (token.attrs['class']) {\r\n // The class should match codicon rendering in src\\vs\\base\\common\\codicons.ts\r\n return !!token.attrs['class'].match(/^codicon codicon-[a-z\\-]+( codicon-modifier-[a-z\\-]+)?$/);\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n };\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar _a;\r\nimport { renderMarkdown } from '../../../base/browser/markdownRenderer.js';\r\nimport { IOpenerService } from '../../../platform/opener/common/opener.js';\r\nimport { IModeService } from '../../common/services/modeService.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { tokenizeToString } from '../../common/modes/textToHtmlTokenizer.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { TokenizationRegistry } from '../../common/modes.js';\r\n/**\r\n * Markdown renderer that can render codeblocks with the editor mechanics. This\r\n * renderer should always be preferred.\r\n */\r\nlet MarkdownRenderer = class MarkdownRenderer {\r\n constructor(_options, _modeService, _openerService) {\r\n this._options = _options;\r\n this._modeService = _modeService;\r\n this._openerService = _openerService;\r\n this._onDidRenderAsync = new Emitter();\r\n this.onDidRenderAsync = this._onDidRenderAsync.event;\r\n }\r\n dispose() {\r\n this._onDidRenderAsync.dispose();\r\n }\r\n render(markdown, options, markedOptions) {\r\n const disposeables = new DisposableStore();\r\n let element;\r\n if (!markdown) {\r\n element = document.createElement('span');\r\n }\r\n else {\r\n element = renderMarkdown(markdown, Object.assign(Object.assign({}, this._getRenderOptions(disposeables)), options), markedOptions);\r\n }\r\n return {\r\n element,\r\n dispose: () => disposeables.dispose()\r\n };\r\n }\r\n _getRenderOptions(disposeables) {\r\n return {\r\n baseUrl: this._options.baseUrl,\r\n codeBlockRenderer: (languageAlias, value) => __awaiter(this, void 0, void 0, function* () {\r\n var _a, _b, _c, _d;\r\n // In markdown,\r\n // it is possible that we stumble upon language aliases (e.g.js instead of javascript)\r\n // it is possible no alias is given in which case we fall back to the current editor lang\r\n let modeId;\r\n if (languageAlias) {\r\n modeId = this._modeService.getModeIdForLanguageName(languageAlias);\r\n }\r\n else if (this._options.editor) {\r\n modeId = (_a = this._options.editor.getModel()) === null || _a === void 0 ? void 0 : _a.getLanguageIdentifier().language;\r\n }\r\n if (!modeId) {\r\n modeId = 'plaintext';\r\n }\r\n this._modeService.triggerMode(modeId);\r\n const tokenization = (_b = yield TokenizationRegistry.getPromise(modeId)) !== null && _b !== void 0 ? _b : undefined;\r\n const element = document.createElement('span');\r\n element.innerHTML = ((_d = (_c = MarkdownRenderer._ttpTokenizer) === null || _c === void 0 ? void 0 : _c.createHTML(value, tokenization)) !== null && _d !== void 0 ? _d : tokenizeToString(value, tokenization));\r\n // use \"good\" font\r\n let fontFamily = this._options.codeBlockFontFamily;\r\n if (this._options.editor) {\r\n fontFamily = this._options.editor.getOption(38 /* fontInfo */).fontFamily;\r\n }\r\n if (fontFamily) {\r\n element.style.fontFamily = fontFamily;\r\n }\r\n return element;\r\n }),\r\n asyncRenderCallback: () => this._onDidRenderAsync.fire(),\r\n actionHandler: {\r\n callback: (content) => this._openerService.open(content, { fromUserGesture: true, allowContributedOpeners: true }).catch(onUnexpectedError),\r\n disposeables\r\n }\r\n };\r\n }\r\n};\r\nMarkdownRenderer._ttpTokenizer = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('tokenizeToString', {\r\n createHTML(value, tokenizer) {\r\n return tokenizeToString(value, tokenizer);\r\n }\r\n});\r\nMarkdownRenderer = __decorate([\r\n __param(1, IModeService),\r\n __param(2, IOpenerService)\r\n], MarkdownRenderer);\r\nexport { MarkdownRenderer };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { coalesce } from '../../../base/common/arrays.js';\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport { registerModelAndPositionCommand } from '../../browser/editorExtensions.js';\r\nimport { HoverProviderRegistry } from '../../common/modes.js';\r\nexport function getHover(model, position, token) {\r\n const supports = HoverProviderRegistry.ordered(model);\r\n const promises = supports.map(support => {\r\n return Promise.resolve(support.provideHover(model, position, token)).then(hover => {\r\n return hover && isValid(hover) ? hover : undefined;\r\n }, err => {\r\n onUnexpectedExternalError(err);\r\n return undefined;\r\n });\r\n });\r\n return Promise.all(promises).then(coalesce);\r\n}\r\nregisterModelAndPositionCommand('_executeHoverProvider', (model, position) => getHover(model, position, CancellationToken.None));\r\nfunction isValid(result) {\r\n const hasRange = (typeof result.range !== 'undefined');\r\n const hasHtmlContent = typeof result.contents !== 'undefined' && result.contents && result.contents.length > 0;\r\n return hasRange && hasHtmlContent;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { MarkdownString, isEmptyMarkdownString, markedStringsEquals } from '../../../base/common/htmlContent.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { MarkdownRenderer } from '../../browser/core/markdownRenderer.js';\r\nimport { asArray } from '../../../base/common/arrays.js';\r\nimport { IOpenerService } from '../../../platform/opener/common/opener.js';\r\nimport { IModeService } from '../../common/services/modeService.js';\r\nimport { HoverProviderRegistry } from '../../common/modes.js';\r\nimport { getHover } from './getHover.js';\r\nimport { Position } from '../../common/core/position.js';\r\nconst $ = dom.$;\r\nexport class MarkdownHover {\r\n constructor(range, contents) {\r\n this.range = range;\r\n this.contents = contents;\r\n }\r\n equals(other) {\r\n if (other instanceof MarkdownHover) {\r\n return markedStringsEquals(this.contents, other.contents);\r\n }\r\n return false;\r\n }\r\n}\r\nlet MarkdownHoverParticipant = class MarkdownHoverParticipant {\r\n constructor(_editor, _hover, _modeService, _openerService) {\r\n this._editor = _editor;\r\n this._hover = _hover;\r\n this._modeService = _modeService;\r\n this._openerService = _openerService;\r\n }\r\n createLoadingMessage(range) {\r\n return new MarkdownHover(range, [new MarkdownString().appendText(nls.localize('modesContentHover.loading', \"Loading...\"))]);\r\n }\r\n computeSync(hoverRange, lineDecorations) {\r\n if (!this._editor.hasModel()) {\r\n return [];\r\n }\r\n const model = this._editor.getModel();\r\n const lineNumber = hoverRange.startLineNumber;\r\n const maxColumn = model.getLineMaxColumn(lineNumber);\r\n const result = [];\r\n for (const d of lineDecorations) {\r\n const startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1;\r\n const endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn;\r\n const hoverMessage = d.options.hoverMessage;\r\n if (!hoverMessage || isEmptyMarkdownString(hoverMessage)) {\r\n continue;\r\n }\r\n const range = new Range(hoverRange.startLineNumber, startColumn, hoverRange.startLineNumber, endColumn);\r\n result.push(new MarkdownHover(range, asArray(hoverMessage)));\r\n }\r\n return result;\r\n }\r\n computeAsync(range, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._editor.hasModel() || !range) {\r\n return Promise.resolve([]);\r\n }\r\n const model = this._editor.getModel();\r\n if (!HoverProviderRegistry.has(model)) {\r\n return Promise.resolve([]);\r\n }\r\n const hovers = yield getHover(model, new Position(range.startLineNumber, range.startColumn), token);\r\n const result = [];\r\n for (const hover of hovers) {\r\n if (isEmptyMarkdownString(hover.contents)) {\r\n continue;\r\n }\r\n const rng = hover.range ? Range.lift(hover.range) : range;\r\n result.push(new MarkdownHover(rng, hover.contents));\r\n }\r\n return result;\r\n });\r\n }\r\n renderHoverParts(hoverParts, fragment) {\r\n const disposables = new DisposableStore();\r\n for (const hoverPart of hoverParts) {\r\n for (const contents of hoverPart.contents) {\r\n if (isEmptyMarkdownString(contents)) {\r\n continue;\r\n }\r\n const markdownHoverElement = $('div.hover-row.markdown-hover');\r\n const hoverContentsElement = dom.append(markdownHoverElement, $('div.hover-contents'));\r\n const renderer = disposables.add(new MarkdownRenderer({ editor: this._editor }, this._modeService, this._openerService));\r\n disposables.add(renderer.onDidRenderAsync(() => {\r\n hoverContentsElement.className = 'hover-contents code-hover-contents';\r\n this._hover.onContentsChanged();\r\n }));\r\n const renderedContents = disposables.add(renderer.render(contents));\r\n hoverContentsElement.appendChild(renderedContents.element);\r\n fragment.appendChild(markdownHoverElement);\r\n }\r\n }\r\n return disposables;\r\n }\r\n};\r\nMarkdownHoverParticipant = __decorate([\r\n __param(2, IModeService),\r\n __param(3, IOpenerService)\r\n], MarkdownHoverParticipant);\r\nexport { MarkdownHoverParticipant };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { Color, RGBA } from '../../../base/common/color.js';\r\nimport { DisposableStore, combinedDisposable } from '../../../base/common/lifecycle.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { TokenizationRegistry } from '../../common/modes.js';\r\nimport { getColorPresentations } from '../colorPicker/color.js';\r\nimport { ColorDetector } from '../colorPicker/colorDetector.js';\r\nimport { ColorPickerModel } from '../colorPicker/colorPickerModel.js';\r\nimport { ColorPickerWidget } from '../colorPicker/colorPickerWidget.js';\r\nimport { HoverOperation } from './hoverOperation.js';\r\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport { coalesce } from '../../../base/common/arrays.js';\r\nimport { textLinkForeground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { Widget } from '../../../base/browser/ui/widget.js';\r\nimport { HoverWidget } from '../../../base/browser/ui/hover/hoverWidget.js';\r\nimport { MarkerHover, MarkerHoverParticipant } from './markerHoverParticipant.js';\r\nimport { MarkdownHover, MarkdownHoverParticipant } from './markdownHoverParticipant.js';\r\nclass ColorHover {\r\n constructor(range, color, provider) {\r\n this.range = range;\r\n this.color = color;\r\n this.provider = provider;\r\n }\r\n equals(other) {\r\n return false;\r\n }\r\n}\r\nclass HoverPartInfo {\r\n constructor(owner, data) {\r\n this.owner = owner;\r\n this.data = data;\r\n }\r\n}\r\nclass ModesContentComputer {\r\n constructor(editor, _markerHoverParticipant, _markdownHoverParticipant) {\r\n this._markerHoverParticipant = _markerHoverParticipant;\r\n this._markdownHoverParticipant = _markdownHoverParticipant;\r\n this._editor = editor;\r\n this._result = [];\r\n this._range = null;\r\n }\r\n setRange(range) {\r\n this._range = range;\r\n this._result = [];\r\n }\r\n clearResult() {\r\n this._result = [];\r\n }\r\n computeAsync(token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._editor.hasModel() || !this._range) {\r\n return Promise.resolve([]);\r\n }\r\n const markdownHovers = yield this._markdownHoverParticipant.computeAsync(this._range, token);\r\n return markdownHovers.map(h => new HoverPartInfo(this._markdownHoverParticipant, h));\r\n });\r\n }\r\n computeSync() {\r\n if (!this._editor.hasModel() || !this._range) {\r\n return [];\r\n }\r\n const model = this._editor.getModel();\r\n const hoverRange = this._range;\r\n const lineNumber = hoverRange.startLineNumber;\r\n if (lineNumber > this._editor.getModel().getLineCount()) {\r\n // Illegal line number => no results\r\n return [];\r\n }\r\n const maxColumn = model.getLineMaxColumn(lineNumber);\r\n const lineDecorations = this._editor.getLineDecorations(lineNumber).filter((d) => {\r\n const startColumn = (d.range.startLineNumber === lineNumber) ? d.range.startColumn : 1;\r\n const endColumn = (d.range.endLineNumber === lineNumber) ? d.range.endColumn : maxColumn;\r\n if (startColumn > hoverRange.startColumn || hoverRange.endColumn > endColumn) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n let result = [];\r\n const colorDetector = ColorDetector.get(this._editor);\r\n for (const d of lineDecorations) {\r\n const colorData = colorDetector.getColorData(d.range.getStartPosition());\r\n if (colorData) {\r\n const { color, range } = colorData.colorInfo;\r\n result.push(new HoverPartInfo(null, new ColorHover(Range.lift(range), color, colorData.provider)));\r\n break;\r\n }\r\n }\r\n const markdownHovers = this._markdownHoverParticipant.computeSync(this._range, lineDecorations);\r\n result = result.concat(markdownHovers.map(h => new HoverPartInfo(this._markdownHoverParticipant, h)));\r\n const markerHovers = this._markerHoverParticipant.computeSync(this._range, lineDecorations);\r\n result = result.concat(markerHovers.map(h => new HoverPartInfo(this._markerHoverParticipant, h)));\r\n return coalesce(result);\r\n }\r\n onResult(result, isFromSynchronousComputation) {\r\n // Always put synchronous messages before asynchronous ones\r\n if (isFromSynchronousComputation) {\r\n this._result = result.concat(this._result);\r\n }\r\n else {\r\n this._result = this._result.concat(result);\r\n }\r\n }\r\n getResult() {\r\n return this._result.slice(0);\r\n }\r\n getResultWithLoadingMessage() {\r\n if (this._range) {\r\n const loadingMessage = new HoverPartInfo(this._markdownHoverParticipant, this._markdownHoverParticipant.createLoadingMessage(this._range));\r\n return this._result.slice(0).concat([loadingMessage]);\r\n }\r\n return this._result.slice(0);\r\n }\r\n}\r\nexport class ModesContentHoverWidget extends Widget {\r\n constructor(editor, _hoverVisibleKey, instantiationService, _themeService) {\r\n super();\r\n this._hoverVisibleKey = _hoverVisibleKey;\r\n this._themeService = _themeService;\r\n // IContentWidget.allowEditorOverflow\r\n this.allowEditorOverflow = true;\r\n this._markerHoverParticipant = instantiationService.createInstance(MarkerHoverParticipant, editor, this);\r\n this._markdownHoverParticipant = instantiationService.createInstance(MarkdownHoverParticipant, editor, this);\r\n this._hover = this._register(new HoverWidget());\r\n this._id = ModesContentHoverWidget.ID;\r\n this._editor = editor;\r\n this._isVisible = false;\r\n this._stoleFocus = false;\r\n this._renderDisposable = null;\r\n this.onkeydown(this._hover.containerDomNode, (e) => {\r\n if (e.equals(9 /* Escape */)) {\r\n this.hide();\r\n }\r\n });\r\n this._register(this._editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(38 /* fontInfo */)) {\r\n this._updateFont();\r\n }\r\n }));\r\n this._editor.onDidLayoutChange(() => this.layout());\r\n this.layout();\r\n this._editor.addContentWidget(this);\r\n this._showAtPosition = null;\r\n this._showAtRange = null;\r\n this._stoleFocus = false;\r\n this._messages = [];\r\n this._lastRange = null;\r\n this._computer = new ModesContentComputer(this._editor, this._markerHoverParticipant, this._markdownHoverParticipant);\r\n this._highlightDecorations = [];\r\n this._isChangingDecorations = false;\r\n this._shouldFocus = false;\r\n this._colorPicker = null;\r\n this._hoverOperation = new HoverOperation(this._computer, result => this._withResult(result, true), null, result => this._withResult(result, false), this._editor.getOption(48 /* hover */).delay);\r\n this._register(dom.addStandardDisposableListener(this.getDomNode(), dom.EventType.FOCUS, () => {\r\n if (this._colorPicker) {\r\n this.getDomNode().classList.add('colorpicker-hover');\r\n }\r\n }));\r\n this._register(dom.addStandardDisposableListener(this.getDomNode(), dom.EventType.BLUR, () => {\r\n this.getDomNode().classList.remove('colorpicker-hover');\r\n }));\r\n this._register(editor.onDidChangeConfiguration(() => {\r\n this._hoverOperation.setHoverTime(this._editor.getOption(48 /* hover */).delay);\r\n }));\r\n this._register(TokenizationRegistry.onDidChange(() => {\r\n if (this._isVisible && this._lastRange && this._messages.length > 0) {\r\n this._messages = this._messages.map(msg => {\r\n var _a, _b;\r\n // If a color hover is visible, we need to update the message that\r\n // created it so that the color matches the last chosen color\r\n if (msg.data instanceof ColorHover && !!((_a = this._lastRange) === null || _a === void 0 ? void 0 : _a.intersectRanges(msg.data.range)) && ((_b = this._colorPicker) === null || _b === void 0 ? void 0 : _b.model.color)) {\r\n const color = this._colorPicker.model.color;\r\n const newColor = {\r\n red: color.rgba.r / 255,\r\n green: color.rgba.g / 255,\r\n blue: color.rgba.b / 255,\r\n alpha: color.rgba.a\r\n };\r\n return new HoverPartInfo(msg.owner, new ColorHover(msg.data.range, newColor, msg.data.provider));\r\n }\r\n else {\r\n return msg;\r\n }\r\n });\r\n this._hover.contentsDomNode.textContent = '';\r\n this._renderMessages(this._lastRange, this._messages);\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._hoverOperation.cancel();\r\n this._editor.removeContentWidget(this);\r\n super.dispose();\r\n }\r\n getId() {\r\n return this._id;\r\n }\r\n getDomNode() {\r\n return this._hover.containerDomNode;\r\n }\r\n showAt(position, range, focus) {\r\n // Position has changed\r\n this._showAtPosition = position;\r\n this._showAtRange = range;\r\n this._hoverVisibleKey.set(true);\r\n this._isVisible = true;\r\n this._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\r\n this._editor.layoutContentWidget(this);\r\n // Simply force a synchronous render on the editor\r\n // such that the widget does not really render with left = '0px'\r\n this._editor.render();\r\n this._stoleFocus = focus;\r\n if (focus) {\r\n this._hover.containerDomNode.focus();\r\n }\r\n }\r\n getPosition() {\r\n if (this._isVisible) {\r\n return {\r\n position: this._showAtPosition,\r\n range: this._showAtRange,\r\n preference: [\r\n 1 /* ABOVE */,\r\n 2 /* BELOW */\r\n ]\r\n };\r\n }\r\n return null;\r\n }\r\n _updateFont() {\r\n const codeClasses = Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName('code'));\r\n codeClasses.forEach(node => this._editor.applyFontInfo(node));\r\n }\r\n _updateContents(node) {\r\n this._hover.contentsDomNode.textContent = '';\r\n this._hover.contentsDomNode.appendChild(node);\r\n this._updateFont();\r\n this._editor.layoutContentWidget(this);\r\n this._hover.onContentsChanged();\r\n }\r\n layout() {\r\n const height = Math.max(this._editor.getLayoutInfo().height / 4, 250);\r\n const { fontSize, lineHeight } = this._editor.getOption(38 /* fontInfo */);\r\n this._hover.contentsDomNode.style.fontSize = `${fontSize}px`;\r\n this._hover.contentsDomNode.style.lineHeight = `${lineHeight}px`;\r\n this._hover.contentsDomNode.style.maxHeight = `${height}px`;\r\n this._hover.contentsDomNode.style.maxWidth = `${Math.max(this._editor.getLayoutInfo().width * 0.66, 500)}px`;\r\n }\r\n onModelDecorationsChanged() {\r\n if (this._isChangingDecorations) {\r\n return;\r\n }\r\n if (this._isVisible) {\r\n // The decorations have changed and the hover is visible,\r\n // we need to recompute the displayed text\r\n this._hoverOperation.cancel();\r\n this._computer.clearResult();\r\n if (!this._colorPicker) { // TODO@Michel ensure that displayed text for other decorations is computed even if color picker is in place\r\n this._hoverOperation.start(0 /* Delayed */);\r\n }\r\n }\r\n }\r\n startShowingAt(range, mode, focus) {\r\n if (this._lastRange && this._lastRange.equalsRange(range)) {\r\n // We have to show the widget at the exact same range as before, so no work is needed\r\n return;\r\n }\r\n this._hoverOperation.cancel();\r\n if (this._isVisible) {\r\n // The range might have changed, but the hover is visible\r\n // Instead of hiding it completely, filter out messages that are still in the new range and\r\n // kick off a new computation\r\n if (!this._showAtPosition || this._showAtPosition.lineNumber !== range.startLineNumber) {\r\n this.hide();\r\n }\r\n else {\r\n let filteredMessages = [];\r\n for (let i = 0, len = this._messages.length; i < len; i++) {\r\n const msg = this._messages[i];\r\n const rng = msg.data.range;\r\n if (rng && rng.startColumn <= range.startColumn && rng.endColumn >= range.endColumn) {\r\n filteredMessages.push(msg);\r\n }\r\n }\r\n if (filteredMessages.length > 0) {\r\n if (hoverContentsEquals(filteredMessages, this._messages)) {\r\n return;\r\n }\r\n this._renderMessages(range, filteredMessages);\r\n }\r\n else {\r\n this.hide();\r\n }\r\n }\r\n }\r\n this._lastRange = range;\r\n this._computer.setRange(range);\r\n this._shouldFocus = focus;\r\n this._hoverOperation.start(mode);\r\n }\r\n hide() {\r\n this._lastRange = null;\r\n this._hoverOperation.cancel();\r\n if (this._isVisible) {\r\n setTimeout(() => {\r\n // Give commands a chance to see the key\r\n if (!this._isVisible) {\r\n this._hoverVisibleKey.set(false);\r\n }\r\n }, 0);\r\n this._isVisible = false;\r\n this._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\r\n this._editor.layoutContentWidget(this);\r\n if (this._stoleFocus) {\r\n this._editor.focus();\r\n }\r\n }\r\n this._isChangingDecorations = true;\r\n this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, []);\r\n this._isChangingDecorations = false;\r\n if (this._renderDisposable) {\r\n this._renderDisposable.dispose();\r\n this._renderDisposable = null;\r\n }\r\n this._colorPicker = null;\r\n }\r\n isColorPickerVisible() {\r\n return !!this._colorPicker;\r\n }\r\n onContentsChanged() {\r\n this._hover.onContentsChanged();\r\n }\r\n _withResult(result, complete) {\r\n this._messages = result;\r\n if (this._lastRange && this._messages.length > 0) {\r\n this._renderMessages(this._lastRange, this._messages);\r\n }\r\n else if (complete) {\r\n this.hide();\r\n }\r\n }\r\n _renderMessages(renderRange, messages) {\r\n if (this._renderDisposable) {\r\n this._renderDisposable.dispose();\r\n this._renderDisposable = null;\r\n }\r\n this._colorPicker = null;\r\n // update column from which to show\r\n let renderColumn = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n let highlightRange = messages[0].data.range ? Range.lift(messages[0].data.range) : null;\r\n let fragment = document.createDocumentFragment();\r\n let containColorPicker = false;\r\n const disposables = new DisposableStore();\r\n const markerMessages = [];\r\n const markdownParts = [];\r\n messages.forEach((_msg) => {\r\n const msg = _msg.data;\r\n if (!msg.range) {\r\n return;\r\n }\r\n renderColumn = Math.min(renderColumn, msg.range.startColumn);\r\n highlightRange = highlightRange ? Range.plusRange(highlightRange, msg.range) : Range.lift(msg.range);\r\n if (msg instanceof ColorHover) {\r\n containColorPicker = true;\r\n const { red, green, blue, alpha } = msg.color;\r\n const rgba = new RGBA(Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255), alpha);\r\n const color = new Color(rgba);\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const editorModel = this._editor.getModel();\r\n let range = new Range(msg.range.startLineNumber, msg.range.startColumn, msg.range.endLineNumber, msg.range.endColumn);\r\n let colorInfo = { range: msg.range, color: msg.color };\r\n // create blank olor picker model and widget first to ensure it's positioned correctly.\r\n const model = new ColorPickerModel(color, [], 0);\r\n const widget = new ColorPickerWidget(fragment, model, this._editor.getOption(122 /* pixelRatio */), this._themeService);\r\n getColorPresentations(editorModel, colorInfo, msg.provider, CancellationToken.None).then(colorPresentations => {\r\n model.colorPresentations = colorPresentations || [];\r\n if (!this._editor.hasModel()) {\r\n // gone...\r\n return;\r\n }\r\n const originalText = this._editor.getModel().getValueInRange(msg.range);\r\n model.guessColorPresentation(color, originalText);\r\n const updateEditorModel = () => {\r\n let textEdits;\r\n let newRange;\r\n if (model.presentation.textEdit) {\r\n textEdits = [model.presentation.textEdit];\r\n newRange = new Range(model.presentation.textEdit.range.startLineNumber, model.presentation.textEdit.range.startColumn, model.presentation.textEdit.range.endLineNumber, model.presentation.textEdit.range.endColumn);\r\n const trackedRange = this._editor.getModel()._setTrackedRange(null, newRange, 3 /* GrowsOnlyWhenTypingAfter */);\r\n this._editor.pushUndoStop();\r\n this._editor.executeEdits('colorpicker', textEdits);\r\n newRange = this._editor.getModel()._getTrackedRange(trackedRange) || newRange;\r\n }\r\n else {\r\n textEdits = [{ identifier: null, range, text: model.presentation.label, forceMoveMarkers: false }];\r\n newRange = range.setEndPosition(range.endLineNumber, range.startColumn + model.presentation.label.length);\r\n this._editor.pushUndoStop();\r\n this._editor.executeEdits('colorpicker', textEdits);\r\n }\r\n if (model.presentation.additionalTextEdits) {\r\n textEdits = [...model.presentation.additionalTextEdits];\r\n this._editor.executeEdits('colorpicker', textEdits);\r\n this.hide();\r\n }\r\n this._editor.pushUndoStop();\r\n range = newRange;\r\n };\r\n const updateColorPresentations = (color) => {\r\n return getColorPresentations(editorModel, {\r\n range: range,\r\n color: {\r\n red: color.rgba.r / 255,\r\n green: color.rgba.g / 255,\r\n blue: color.rgba.b / 255,\r\n alpha: color.rgba.a\r\n }\r\n }, msg.provider, CancellationToken.None).then((colorPresentations) => {\r\n model.colorPresentations = colorPresentations || [];\r\n });\r\n };\r\n const colorListener = model.onColorFlushed((color) => {\r\n updateColorPresentations(color).then(updateEditorModel);\r\n });\r\n const colorChangeListener = model.onDidChangeColor(updateColorPresentations);\r\n this._colorPicker = widget;\r\n this.showAt(range.getStartPosition(), range, this._shouldFocus);\r\n this._updateContents(fragment);\r\n this._colorPicker.layout();\r\n this._renderDisposable = combinedDisposable(colorListener, colorChangeListener, widget, disposables);\r\n });\r\n }\r\n else {\r\n if (msg instanceof MarkerHover) {\r\n markerMessages.push(msg);\r\n }\r\n else {\r\n if (msg instanceof MarkdownHover) {\r\n markdownParts.push(msg);\r\n }\r\n }\r\n }\r\n });\r\n if (markdownParts.length > 0) {\r\n disposables.add(this._markdownHoverParticipant.renderHoverParts(markdownParts, fragment));\r\n }\r\n if (markerMessages.length) {\r\n disposables.add(this._markerHoverParticipant.renderHoverParts(markerMessages, fragment));\r\n }\r\n this._renderDisposable = disposables;\r\n // show\r\n if (!containColorPicker && fragment.hasChildNodes()) {\r\n this.showAt(new Position(renderRange.startLineNumber, renderColumn), highlightRange, this._shouldFocus);\r\n this._updateContents(fragment);\r\n }\r\n this._isChangingDecorations = true;\r\n this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, highlightRange ? [{\r\n range: highlightRange,\r\n options: ModesContentHoverWidget._DECORATION_OPTIONS\r\n }] : []);\r\n this._isChangingDecorations = false;\r\n }\r\n}\r\nModesContentHoverWidget.ID = 'editor.contrib.modesContentHoverWidget';\r\nModesContentHoverWidget._DECORATION_OPTIONS = ModelDecorationOptions.register({\r\n className: 'hoverHighlight'\r\n});\r\nfunction hoverContentsEquals(first, second) {\r\n if (first.length !== second.length) {\r\n return false;\r\n }\r\n for (let i = 0; i < first.length; i++) {\r\n if (!first[i].data.equals(second[i].data)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nregisterThemingParticipant((theme, collector) => {\r\n const linkFg = theme.getColor(textLinkForeground);\r\n if (linkFg) {\r\n collector.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${linkFg}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Widget } from '../../../base/browser/ui/widget.js';\r\nexport class GlyphHoverWidget extends Widget {\r\n constructor(id, editor) {\r\n super();\r\n this._id = id;\r\n this._editor = editor;\r\n this._isVisible = false;\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = 'monaco-hover hidden';\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._domNode.setAttribute('role', 'tooltip');\r\n this._showAtLineNumber = -1;\r\n this._register(this._editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(38 /* fontInfo */)) {\r\n this.updateFont();\r\n }\r\n }));\r\n this._editor.addOverlayWidget(this);\r\n }\r\n get isVisible() {\r\n return this._isVisible;\r\n }\r\n set isVisible(value) {\r\n this._isVisible = value;\r\n this._domNode.classList.toggle('hidden', !this._isVisible);\r\n }\r\n getId() {\r\n return this._id;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n showAt(lineNumber) {\r\n this._showAtLineNumber = lineNumber;\r\n if (!this.isVisible) {\r\n this.isVisible = true;\r\n }\r\n const editorLayout = this._editor.getLayoutInfo();\r\n const topForLineNumber = this._editor.getTopForLineNumber(this._showAtLineNumber);\r\n const editorScrollTop = this._editor.getScrollTop();\r\n const lineHeight = this._editor.getOption(53 /* lineHeight */);\r\n const nodeHeight = this._domNode.clientHeight;\r\n const top = topForLineNumber - editorScrollTop - ((nodeHeight - lineHeight) / 2);\r\n this._domNode.style.left = `${editorLayout.glyphMarginLeft + editorLayout.glyphMarginWidth}px`;\r\n this._domNode.style.top = `${Math.max(Math.round(top), 0)}px`;\r\n }\r\n hide() {\r\n if (!this.isVisible) {\r\n return;\r\n }\r\n this.isVisible = false;\r\n }\r\n getPosition() {\r\n return null;\r\n }\r\n dispose() {\r\n this._editor.removeOverlayWidget(this);\r\n super.dispose();\r\n }\r\n updateFont() {\r\n const codeTags = Array.prototype.slice.call(this._domNode.getElementsByTagName('code'));\r\n const codeClasses = Array.prototype.slice.call(this._domNode.getElementsByClassName('code'));\r\n [...codeTags, ...codeClasses].forEach(node => this._editor.applyFontInfo(node));\r\n }\r\n updateContents(node) {\r\n this._domNode.textContent = '';\r\n this._domNode.appendChild(node);\r\n this.updateFont();\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { $ } from '../../../base/browser/dom.js';\r\nimport { isEmptyMarkdownString } from '../../../base/common/htmlContent.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { HoverOperation } from './hoverOperation.js';\r\nimport { GlyphHoverWidget } from './hoverWidgets.js';\r\nimport { MarkdownRenderer } from '../../browser/core/markdownRenderer.js';\r\nimport { NullOpenerService } from '../../../platform/opener/common/opener.js';\r\nimport { asArray } from '../../../base/common/arrays.js';\r\nclass MarginComputer {\r\n constructor(editor) {\r\n this._editor = editor;\r\n this._lineNumber = -1;\r\n this._result = [];\r\n }\r\n setLineNumber(lineNumber) {\r\n this._lineNumber = lineNumber;\r\n this._result = [];\r\n }\r\n clearResult() {\r\n this._result = [];\r\n }\r\n computeSync() {\r\n const toHoverMessage = (contents) => {\r\n return {\r\n value: contents\r\n };\r\n };\r\n const lineDecorations = this._editor.getLineDecorations(this._lineNumber);\r\n const result = [];\r\n if (!lineDecorations) {\r\n return result;\r\n }\r\n for (const d of lineDecorations) {\r\n if (!d.options.glyphMarginClassName) {\r\n continue;\r\n }\r\n const hoverMessage = d.options.glyphMarginHoverMessage;\r\n if (!hoverMessage || isEmptyMarkdownString(hoverMessage)) {\r\n continue;\r\n }\r\n result.push(...asArray(hoverMessage).map(toHoverMessage));\r\n }\r\n return result;\r\n }\r\n onResult(result, isFromSynchronousComputation) {\r\n this._result = this._result.concat(result);\r\n }\r\n getResult() {\r\n return this._result;\r\n }\r\n getResultWithLoadingMessage() {\r\n return this.getResult();\r\n }\r\n}\r\nexport class ModesGlyphHoverWidget extends GlyphHoverWidget {\r\n constructor(editor, modeService, openerService = NullOpenerService) {\r\n super(ModesGlyphHoverWidget.ID, editor);\r\n this._renderDisposeables = this._register(new DisposableStore());\r\n this._messages = [];\r\n this._lastLineNumber = -1;\r\n this._markdownRenderer = this._register(new MarkdownRenderer({ editor: this._editor }, modeService, openerService));\r\n this._computer = new MarginComputer(this._editor);\r\n this._hoverOperation = new HoverOperation(this._computer, (result) => this._withResult(result), undefined, (result) => this._withResult(result), 300);\r\n }\r\n dispose() {\r\n this._hoverOperation.cancel();\r\n super.dispose();\r\n }\r\n onModelDecorationsChanged() {\r\n if (this.isVisible) {\r\n // The decorations have changed and the hover is visible,\r\n // we need to recompute the displayed text\r\n this._hoverOperation.cancel();\r\n this._computer.clearResult();\r\n this._hoverOperation.start(0 /* Delayed */);\r\n }\r\n }\r\n startShowingAt(lineNumber) {\r\n if (this._lastLineNumber === lineNumber) {\r\n // We have to show the widget at the exact same line number as before, so no work is needed\r\n return;\r\n }\r\n this._hoverOperation.cancel();\r\n this.hide();\r\n this._lastLineNumber = lineNumber;\r\n this._computer.setLineNumber(lineNumber);\r\n this._hoverOperation.start(0 /* Delayed */);\r\n }\r\n hide() {\r\n this._lastLineNumber = -1;\r\n this._hoverOperation.cancel();\r\n super.hide();\r\n }\r\n _withResult(result) {\r\n this._messages = result;\r\n if (this._messages.length > 0) {\r\n this._renderMessages(this._lastLineNumber, this._messages);\r\n }\r\n else {\r\n this.hide();\r\n }\r\n }\r\n _renderMessages(lineNumber, messages) {\r\n this._renderDisposeables.clear();\r\n const fragment = document.createDocumentFragment();\r\n for (const msg of messages) {\r\n const renderedContents = this._markdownRenderer.render(msg.value);\r\n this._renderDisposeables.add(renderedContents);\r\n fragment.appendChild($('div.hover-row', undefined, renderedContents.element));\r\n }\r\n this.updateContents(fragment);\r\n this.showAt(lineNumber);\r\n }\r\n}\r\nModesGlyphHoverWidget.ID = 'editor.contrib.modesGlyphHoverWidget';\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport { registerModelAndPositionCommand } from '../../browser/editorExtensions.js';\r\nimport { DefinitionProviderRegistry, ImplementationProviderRegistry, TypeDefinitionProviderRegistry, DeclarationProviderRegistry, ReferenceProviderRegistry } from '../../common/modes.js';\r\nfunction getLocationLinks(model, position, registry, provide) {\r\n const provider = registry.ordered(model);\r\n // get results\r\n const promises = provider.map((provider) => {\r\n return Promise.resolve(provide(provider, model, position)).then(undefined, err => {\r\n onUnexpectedExternalError(err);\r\n return undefined;\r\n });\r\n });\r\n return Promise.all(promises).then(values => {\r\n const result = [];\r\n for (let value of values) {\r\n if (Array.isArray(value)) {\r\n result.push(...value);\r\n }\r\n else if (value) {\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n });\r\n}\r\nexport function getDefinitionsAtPosition(model, position, token) {\r\n return getLocationLinks(model, position, DefinitionProviderRegistry, (provider, model, position) => {\r\n return provider.provideDefinition(model, position, token);\r\n });\r\n}\r\nexport function getDeclarationsAtPosition(model, position, token) {\r\n return getLocationLinks(model, position, DeclarationProviderRegistry, (provider, model, position) => {\r\n return provider.provideDeclaration(model, position, token);\r\n });\r\n}\r\nexport function getImplementationsAtPosition(model, position, token) {\r\n return getLocationLinks(model, position, ImplementationProviderRegistry, (provider, model, position) => {\r\n return provider.provideImplementation(model, position, token);\r\n });\r\n}\r\nexport function getTypeDefinitionsAtPosition(model, position, token) {\r\n return getLocationLinks(model, position, TypeDefinitionProviderRegistry, (provider, model, position) => {\r\n return provider.provideTypeDefinition(model, position, token);\r\n });\r\n}\r\nexport function getReferencesAtPosition(model, position, compact, token) {\r\n return getLocationLinks(model, position, ReferenceProviderRegistry, (provider, model, position) => __awaiter(this, void 0, void 0, function* () {\r\n const result = yield provider.provideReferences(model, position, { includeDeclaration: true }, token);\r\n if (!compact || !result || result.length !== 2) {\r\n return result;\r\n }\r\n const resultWithoutDeclaration = yield provider.provideReferences(model, position, { includeDeclaration: false }, token);\r\n if (resultWithoutDeclaration && resultWithoutDeclaration.length === 1) {\r\n return resultWithoutDeclaration;\r\n }\r\n return result;\r\n }));\r\n}\r\nregisterModelAndPositionCommand('_executeDefinitionProvider', (model, position) => getDefinitionsAtPosition(model, position, CancellationToken.None));\r\nregisterModelAndPositionCommand('_executeDeclarationProvider', (model, position) => getDeclarationsAtPosition(model, position, CancellationToken.None));\r\nregisterModelAndPositionCommand('_executeImplementationProvider', (model, position) => getImplementationsAtPosition(model, position, CancellationToken.None));\r\nregisterModelAndPositionCommand('_executeTypeDefinitionProvider', (model, position) => getTypeDefinitionsAtPosition(model, position, CancellationToken.None));\r\nregisterModelAndPositionCommand('_executeReferenceProvider', (model, position) => getReferencesAtPosition(model, position, false, CancellationToken.None));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { localize } from '../../../nls.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { basename, extUri } from '../../../base/common/resources.js';\r\nimport { dispose, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { defaultGenerator } from '../../../base/common/idGenerator.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { ResourceMap } from '../../../base/common/map.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nexport class OneReference {\r\n constructor(isProviderFirst, parent, uri, _range, _rangeCallback) {\r\n this.isProviderFirst = isProviderFirst;\r\n this.parent = parent;\r\n this.uri = uri;\r\n this._range = _range;\r\n this._rangeCallback = _rangeCallback;\r\n this.id = defaultGenerator.nextId();\r\n }\r\n get range() {\r\n return this._range;\r\n }\r\n set range(value) {\r\n this._range = value;\r\n this._rangeCallback(this);\r\n }\r\n get ariaMessage() {\r\n var _a;\r\n const preview = (_a = this.parent.getPreview(this)) === null || _a === void 0 ? void 0 : _a.preview(this.range);\r\n if (!preview) {\r\n return localize('aria.oneReference', \"symbol in {0} on line {1} at column {2}\", basename(this.uri), this.range.startLineNumber, this.range.startColumn);\r\n }\r\n else {\r\n return localize({ key: 'aria.oneReference.preview', comment: ['Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code'] }, \"symbol in {0} on line {1} at column {2}, {3}\", basename(this.uri), this.range.startLineNumber, this.range.startColumn, preview.value);\r\n }\r\n }\r\n}\r\nexport class FilePreview {\r\n constructor(_modelReference) {\r\n this._modelReference = _modelReference;\r\n }\r\n dispose() {\r\n this._modelReference.dispose();\r\n }\r\n preview(range, n = 8) {\r\n const model = this._modelReference.object.textEditorModel;\r\n if (!model) {\r\n return undefined;\r\n }\r\n const { startLineNumber, startColumn, endLineNumber, endColumn } = range;\r\n const word = model.getWordUntilPosition({ lineNumber: startLineNumber, column: startColumn - n });\r\n const beforeRange = new Range(startLineNumber, word.startColumn, startLineNumber, startColumn);\r\n const afterRange = new Range(endLineNumber, endColumn, endLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n const before = model.getValueInRange(beforeRange).replace(/^\\s+/, '');\r\n const inside = model.getValueInRange(range);\r\n const after = model.getValueInRange(afterRange).replace(/\\s+$/, '');\r\n return {\r\n value: before + inside + after,\r\n highlight: { start: before.length, end: before.length + inside.length }\r\n };\r\n }\r\n}\r\nexport class FileReferences {\r\n constructor(parent, uri) {\r\n this.parent = parent;\r\n this.uri = uri;\r\n this.children = [];\r\n this._previews = new ResourceMap();\r\n }\r\n dispose() {\r\n dispose(this._previews.values());\r\n this._previews.clear();\r\n }\r\n getPreview(child) {\r\n return this._previews.get(child.uri);\r\n }\r\n get ariaMessage() {\r\n const len = this.children.length;\r\n if (len === 1) {\r\n return localize('aria.fileReferences.1', \"1 symbol in {0}, full path {1}\", basename(this.uri), this.uri.fsPath);\r\n }\r\n else {\r\n return localize('aria.fileReferences.N', \"{0} symbols in {1}, full path {2}\", len, basename(this.uri), this.uri.fsPath);\r\n }\r\n }\r\n resolve(textModelResolverService) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this._previews.size !== 0) {\r\n return this;\r\n }\r\n for (let child of this.children) {\r\n if (this._previews.has(child.uri)) {\r\n continue;\r\n }\r\n try {\r\n const ref = yield textModelResolverService.createModelReference(child.uri);\r\n this._previews.set(child.uri, new FilePreview(ref));\r\n }\r\n catch (err) {\r\n onUnexpectedError(err);\r\n }\r\n }\r\n return this;\r\n });\r\n }\r\n}\r\nexport class ReferencesModel {\r\n constructor(links, title) {\r\n this._disposables = new DisposableStore();\r\n this.groups = [];\r\n this.references = [];\r\n this._onDidChangeReferenceRange = new Emitter();\r\n this.onDidChangeReferenceRange = this._onDidChangeReferenceRange.event;\r\n this._links = links;\r\n this._title = title;\r\n // grouping and sorting\r\n const [providersFirst] = links;\r\n links.sort(ReferencesModel._compareReferences);\r\n let current;\r\n for (let link of links) {\r\n if (!current || !extUri.isEqual(current.uri, link.uri, true)) {\r\n // new group\r\n current = new FileReferences(this, link.uri);\r\n this.groups.push(current);\r\n }\r\n // append, check for equality first!\r\n if (current.children.length === 0 || ReferencesModel._compareReferences(link, current.children[current.children.length - 1]) !== 0) {\r\n const oneRef = new OneReference(providersFirst === link, current, link.uri, link.targetSelectionRange || link.range, ref => this._onDidChangeReferenceRange.fire(ref));\r\n this.references.push(oneRef);\r\n current.children.push(oneRef);\r\n }\r\n }\r\n }\r\n dispose() {\r\n dispose(this.groups);\r\n this._disposables.dispose();\r\n this._onDidChangeReferenceRange.dispose();\r\n this.groups.length = 0;\r\n }\r\n clone() {\r\n return new ReferencesModel(this._links, this._title);\r\n }\r\n get title() {\r\n return this._title;\r\n }\r\n get isEmpty() {\r\n return this.groups.length === 0;\r\n }\r\n get ariaMessage() {\r\n if (this.isEmpty) {\r\n return localize('aria.result.0', \"No results found\");\r\n }\r\n else if (this.references.length === 1) {\r\n return localize('aria.result.1', \"Found 1 symbol in {0}\", this.references[0].uri.fsPath);\r\n }\r\n else if (this.groups.length === 1) {\r\n return localize('aria.result.n1', \"Found {0} symbols in {1}\", this.references.length, this.groups[0].uri.fsPath);\r\n }\r\n else {\r\n return localize('aria.result.nm', \"Found {0} symbols in {1} files\", this.references.length, this.groups.length);\r\n }\r\n }\r\n nextOrPreviousReference(reference, next) {\r\n let { parent } = reference;\r\n let idx = parent.children.indexOf(reference);\r\n let childCount = parent.children.length;\r\n let groupCount = parent.parent.groups.length;\r\n if (groupCount === 1 || next && idx + 1 < childCount || !next && idx > 0) {\r\n // cycling within one file\r\n if (next) {\r\n idx = (idx + 1) % childCount;\r\n }\r\n else {\r\n idx = (idx + childCount - 1) % childCount;\r\n }\r\n return parent.children[idx];\r\n }\r\n idx = parent.parent.groups.indexOf(parent);\r\n if (next) {\r\n idx = (idx + 1) % groupCount;\r\n return parent.parent.groups[idx].children[0];\r\n }\r\n else {\r\n idx = (idx + groupCount - 1) % groupCount;\r\n return parent.parent.groups[idx].children[parent.parent.groups[idx].children.length - 1];\r\n }\r\n }\r\n nearestReference(resource, position) {\r\n const nearest = this.references.map((ref, idx) => {\r\n return {\r\n idx,\r\n prefixLen: strings.commonPrefixLength(ref.uri.toString(), resource.toString()),\r\n offsetDist: Math.abs(ref.range.startLineNumber - position.lineNumber) * 100 + Math.abs(ref.range.startColumn - position.column)\r\n };\r\n }).sort((a, b) => {\r\n if (a.prefixLen > b.prefixLen) {\r\n return -1;\r\n }\r\n else if (a.prefixLen < b.prefixLen) {\r\n return 1;\r\n }\r\n else if (a.offsetDist < b.offsetDist) {\r\n return -1;\r\n }\r\n else if (a.offsetDist > b.offsetDist) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n })[0];\r\n if (nearest) {\r\n return this.references[nearest.idx];\r\n }\r\n return undefined;\r\n }\r\n referenceAt(resource, position) {\r\n for (const ref of this.references) {\r\n if (ref.uri.toString() === resource.toString()) {\r\n if (Range.containsPosition(ref.range, position)) {\r\n return ref;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n firstReference() {\r\n for (const ref of this.references) {\r\n if (ref.isProviderFirst) {\r\n return ref;\r\n }\r\n }\r\n return this.references[0];\r\n }\r\n static _compareReferences(a, b) {\r\n return extUri.compare(a.uri, b.uri) || Range.compareRangesUsingStarts(a.range, b.range);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { ReferencesModel, FileReferences, OneReference } from '../referencesModel.js';\r\nimport { ITextModelService } from '../../../common/services/resolverService.js';\r\nimport { IconLabel } from '../../../../base/browser/ui/iconLabel/iconLabel.js';\r\nimport { CountBadge } from '../../../../base/browser/ui/countBadge/countBadge.js';\r\nimport { ILabelService } from '../../../../platform/label/common/label.js';\r\nimport { IThemeService } from '../../../../platform/theme/common/themeService.js';\r\nimport { attachBadgeStyler } from '../../../../platform/theme/common/styler.js';\r\nimport * as dom from '../../../../base/browser/dom.js';\r\nimport { localize } from '../../../../nls.js';\r\nimport { getBaseLabel } from '../../../../base/common/labels.js';\r\nimport { dirname, basename } from '../../../../base/common/resources.js';\r\nimport { Disposable } from '../../../../base/common/lifecycle.js';\r\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\r\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\r\nimport { FuzzyScore, createMatches } from '../../../../base/common/filters.js';\r\nimport { HighlightedLabel } from '../../../../base/browser/ui/highlightedlabel/highlightedLabel.js';\r\nlet DataSource = class DataSource {\r\n constructor(_resolverService) {\r\n this._resolverService = _resolverService;\r\n }\r\n hasChildren(element) {\r\n if (element instanceof ReferencesModel) {\r\n return true;\r\n }\r\n if (element instanceof FileReferences) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n getChildren(element) {\r\n if (element instanceof ReferencesModel) {\r\n return element.groups;\r\n }\r\n if (element instanceof FileReferences) {\r\n return element.resolve(this._resolverService).then(val => {\r\n // if (element.failure) {\r\n // \t// refresh the element on failure so that\r\n // \t// we can update its rendering\r\n // \treturn tree.refresh(element).then(() => val.children);\r\n // }\r\n return val.children;\r\n });\r\n }\r\n throw new Error('bad tree');\r\n }\r\n};\r\nDataSource = __decorate([\r\n __param(0, ITextModelService)\r\n], DataSource);\r\nexport { DataSource };\r\n//#endregion\r\nexport class Delegate {\r\n getHeight() {\r\n return 23;\r\n }\r\n getTemplateId(element) {\r\n if (element instanceof FileReferences) {\r\n return FileReferencesRenderer.id;\r\n }\r\n else {\r\n return OneReferenceRenderer.id;\r\n }\r\n }\r\n}\r\nlet StringRepresentationProvider = class StringRepresentationProvider {\r\n constructor(_keybindingService) {\r\n this._keybindingService = _keybindingService;\r\n }\r\n getKeyboardNavigationLabel(element) {\r\n var _a;\r\n if (element instanceof OneReference) {\r\n const parts = (_a = element.parent.getPreview(element)) === null || _a === void 0 ? void 0 : _a.preview(element.range);\r\n if (parts) {\r\n return parts.value;\r\n }\r\n }\r\n // FileReferences or unresolved OneReference\r\n return basename(element.uri);\r\n }\r\n};\r\nStringRepresentationProvider = __decorate([\r\n __param(0, IKeybindingService)\r\n], StringRepresentationProvider);\r\nexport { StringRepresentationProvider };\r\nexport class IdentityProvider {\r\n getId(element) {\r\n return element instanceof OneReference ? element.id : element.uri;\r\n }\r\n}\r\n//#region render: File\r\nlet FileReferencesTemplate = class FileReferencesTemplate extends Disposable {\r\n constructor(container, _uriLabel, themeService) {\r\n super();\r\n this._uriLabel = _uriLabel;\r\n const parent = document.createElement('div');\r\n parent.classList.add('reference-file');\r\n this.file = this._register(new IconLabel(parent, { supportHighlights: true }));\r\n this.badge = new CountBadge(dom.append(parent, dom.$('.count')));\r\n this._register(attachBadgeStyler(this.badge, themeService));\r\n container.appendChild(parent);\r\n }\r\n set(element, matches) {\r\n let parent = dirname(element.uri);\r\n this.file.setLabel(getBaseLabel(element.uri), this._uriLabel.getUriLabel(parent, { relative: true }), { title: this._uriLabel.getUriLabel(element.uri), matches });\r\n const len = element.children.length;\r\n this.badge.setCount(len);\r\n if (len > 1) {\r\n this.badge.setTitleFormat(localize('referencesCount', \"{0} references\", len));\r\n }\r\n else {\r\n this.badge.setTitleFormat(localize('referenceCount', \"{0} reference\", len));\r\n }\r\n }\r\n};\r\nFileReferencesTemplate = __decorate([\r\n __param(1, ILabelService),\r\n __param(2, IThemeService)\r\n], FileReferencesTemplate);\r\nlet FileReferencesRenderer = class FileReferencesRenderer {\r\n constructor(_instantiationService) {\r\n this._instantiationService = _instantiationService;\r\n this.templateId = FileReferencesRenderer.id;\r\n }\r\n renderTemplate(container) {\r\n return this._instantiationService.createInstance(FileReferencesTemplate, container);\r\n }\r\n renderElement(node, index, template) {\r\n template.set(node.element, createMatches(node.filterData));\r\n }\r\n disposeTemplate(templateData) {\r\n templateData.dispose();\r\n }\r\n};\r\nFileReferencesRenderer.id = 'FileReferencesRenderer';\r\nFileReferencesRenderer = __decorate([\r\n __param(0, IInstantiationService)\r\n], FileReferencesRenderer);\r\nexport { FileReferencesRenderer };\r\n//#endregion\r\n//#region render: Reference\r\nclass OneReferenceTemplate {\r\n constructor(container) {\r\n this.label = new HighlightedLabel(container, false);\r\n }\r\n set(element, score) {\r\n var _a;\r\n const preview = (_a = element.parent.getPreview(element)) === null || _a === void 0 ? void 0 : _a.preview(element.range);\r\n if (!preview || !preview.value) {\r\n // this means we FAILED to resolve the document or the value is the empty string\r\n this.label.set(`${basename(element.uri)}:${element.range.startLineNumber + 1}:${element.range.startColumn + 1}`);\r\n }\r\n else {\r\n // render search match as highlight unless\r\n // we have score, then render the score\r\n const { value, highlight } = preview;\r\n if (score && !FuzzyScore.isDefault(score)) {\r\n this.label.element.classList.toggle('referenceMatch', false);\r\n this.label.set(value, createMatches(score));\r\n }\r\n else {\r\n this.label.element.classList.toggle('referenceMatch', true);\r\n this.label.set(value, [highlight]);\r\n }\r\n }\r\n }\r\n}\r\nexport class OneReferenceRenderer {\r\n constructor() {\r\n this.templateId = OneReferenceRenderer.id;\r\n }\r\n renderTemplate(container) {\r\n return new OneReferenceTemplate(container);\r\n }\r\n renderElement(node, index, templateData) {\r\n templateData.set(node.element, node.filterData);\r\n }\r\n disposeTemplate() {\r\n }\r\n}\r\nOneReferenceRenderer.id = 'OneReferenceRenderer';\r\n//#endregion\r\nexport class AccessibilityProvider {\r\n getWidgetAriaLabel() {\r\n return localize('treeAriaLabel', \"References\");\r\n }\r\n getAriaLabel(element) {\r\n return element.ariaMessage;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './splitview.css';\r\nimport { toDisposable, Disposable, combinedDisposable } from '../../../common/lifecycle.js';\r\nimport { Event, Emitter } from '../../../common/event.js';\r\nimport * as types from '../../../common/types.js';\r\nimport { clamp } from '../../../common/numbers.js';\r\nimport { range, pushToStart, pushToEnd } from '../../../common/arrays.js';\r\nimport { Sash } from '../sash/sash.js';\r\nimport { Color } from '../../../common/color.js';\r\nimport { domEvent } from '../../event.js';\r\nimport { $, append, scheduleAtNextAnimationFrame } from '../../dom.js';\r\nimport { SmoothScrollableElement } from '../scrollbar/scrollableElement.js';\r\nimport { Scrollable } from '../../../common/scrollable.js';\r\nconst defaultStyles = {\r\n separatorBorder: Color.transparent\r\n};\r\nclass ViewItem {\r\n constructor(container, view, size, disposable) {\r\n this.container = container;\r\n this.view = view;\r\n this.disposable = disposable;\r\n this._cachedVisibleSize = undefined;\r\n if (typeof size === 'number') {\r\n this._size = size;\r\n this._cachedVisibleSize = undefined;\r\n container.classList.add('visible');\r\n }\r\n else {\r\n this._size = 0;\r\n this._cachedVisibleSize = size.cachedVisibleSize;\r\n }\r\n }\r\n set size(size) {\r\n this._size = size;\r\n }\r\n get size() {\r\n return this._size;\r\n }\r\n get visible() {\r\n return typeof this._cachedVisibleSize === 'undefined';\r\n }\r\n setVisible(visible, size) {\r\n if (visible === this.visible) {\r\n return;\r\n }\r\n if (visible) {\r\n this.size = clamp(this._cachedVisibleSize, this.viewMinimumSize, this.viewMaximumSize);\r\n this._cachedVisibleSize = undefined;\r\n }\r\n else {\r\n this._cachedVisibleSize = typeof size === 'number' ? size : this.size;\r\n this.size = 0;\r\n }\r\n this.container.classList.toggle('visible', visible);\r\n if (this.view.setVisible) {\r\n this.view.setVisible(visible);\r\n }\r\n }\r\n get minimumSize() { return this.visible ? this.view.minimumSize : 0; }\r\n get viewMinimumSize() { return this.view.minimumSize; }\r\n get maximumSize() { return this.visible ? this.view.maximumSize : 0; }\r\n get viewMaximumSize() { return this.view.maximumSize; }\r\n get priority() { return this.view.priority; }\r\n get snap() { return !!this.view.snap; }\r\n set enabled(enabled) {\r\n this.container.style.pointerEvents = enabled ? '' : 'none';\r\n }\r\n layout(offset, layoutContext) {\r\n this.layoutContainer(offset);\r\n this.view.layout(this.size, offset, layoutContext);\r\n }\r\n dispose() {\r\n this.disposable.dispose();\r\n return this.view;\r\n }\r\n}\r\nclass VerticalViewItem extends ViewItem {\r\n layoutContainer(offset) {\r\n this.container.style.top = `${offset}px`;\r\n this.container.style.height = `${this.size}px`;\r\n }\r\n}\r\nclass HorizontalViewItem extends ViewItem {\r\n layoutContainer(offset) {\r\n this.container.style.left = `${offset}px`;\r\n this.container.style.width = `${this.size}px`;\r\n }\r\n}\r\nvar State;\r\n(function (State) {\r\n State[State[\"Idle\"] = 0] = \"Idle\";\r\n State[State[\"Busy\"] = 1] = \"Busy\";\r\n})(State || (State = {}));\r\nexport var Sizing;\r\n(function (Sizing) {\r\n Sizing.Distribute = { type: 'distribute' };\r\n function Split(index) { return { type: 'split', index }; }\r\n Sizing.Split = Split;\r\n function Invisible(cachedVisibleSize) { return { type: 'invisible', cachedVisibleSize }; }\r\n Sizing.Invisible = Invisible;\r\n})(Sizing || (Sizing = {}));\r\nexport class SplitView extends Disposable {\r\n constructor(container, options = {}) {\r\n super();\r\n this.size = 0;\r\n this.contentSize = 0;\r\n this.proportions = undefined;\r\n this.viewItems = [];\r\n this.sashItems = [];\r\n this.state = State.Idle;\r\n this._onDidSashChange = this._register(new Emitter());\r\n this.onDidSashChange = this._onDidSashChange.event;\r\n this._onDidSashReset = this._register(new Emitter());\r\n this._startSnappingEnabled = true;\r\n this._endSnappingEnabled = true;\r\n this.orientation = types.isUndefined(options.orientation) ? 0 /* VERTICAL */ : options.orientation;\r\n this.inverseAltBehavior = !!options.inverseAltBehavior;\r\n this.proportionalLayout = types.isUndefined(options.proportionalLayout) ? true : !!options.proportionalLayout;\r\n this.el = document.createElement('div');\r\n this.el.classList.add('monaco-split-view2');\r\n this.el.classList.add(this.orientation === 0 /* VERTICAL */ ? 'vertical' : 'horizontal');\r\n container.appendChild(this.el);\r\n this.sashContainer = append(this.el, $('.sash-container'));\r\n this.viewContainer = $('.split-view-container');\r\n this.scrollable = new Scrollable(125, scheduleAtNextAnimationFrame);\r\n this.scrollableElement = this._register(new SmoothScrollableElement(this.viewContainer, {\r\n vertical: this.orientation === 0 /* VERTICAL */ ? 1 /* Auto */ : 2 /* Hidden */,\r\n horizontal: this.orientation === 1 /* HORIZONTAL */ ? 1 /* Auto */ : 2 /* Hidden */\r\n }, this.scrollable));\r\n this._register(this.scrollableElement.onScroll(e => {\r\n this.viewContainer.scrollTop = e.scrollTop;\r\n this.viewContainer.scrollLeft = e.scrollLeft;\r\n }));\r\n append(this.el, this.scrollableElement.getDomNode());\r\n this.style(options.styles || defaultStyles);\r\n // We have an existing set of view, add them now\r\n if (options.descriptor) {\r\n this.size = options.descriptor.size;\r\n options.descriptor.views.forEach((viewDescriptor, index) => {\r\n const sizing = types.isUndefined(viewDescriptor.visible) || viewDescriptor.visible ? viewDescriptor.size : { type: 'invisible', cachedVisibleSize: viewDescriptor.size };\r\n const view = viewDescriptor.view;\r\n this.doAddView(view, sizing, index, true);\r\n });\r\n // Initialize content size and proportions for first layout\r\n this.contentSize = this.viewItems.reduce((r, i) => r + i.size, 0);\r\n this.saveProportions();\r\n }\r\n }\r\n get orthogonalStartSash() { return this._orthogonalStartSash; }\r\n set orthogonalStartSash(sash) {\r\n for (const sashItem of this.sashItems) {\r\n sashItem.sash.orthogonalStartSash = sash;\r\n }\r\n this._orthogonalStartSash = sash;\r\n }\r\n get orthogonalEndSash() { return this._orthogonalEndSash; }\r\n set orthogonalEndSash(sash) {\r\n for (const sashItem of this.sashItems) {\r\n sashItem.sash.orthogonalEndSash = sash;\r\n }\r\n this._orthogonalEndSash = sash;\r\n }\r\n get startSnappingEnabled() { return this._startSnappingEnabled; }\r\n set startSnappingEnabled(startSnappingEnabled) {\r\n if (this._startSnappingEnabled === startSnappingEnabled) {\r\n return;\r\n }\r\n this._startSnappingEnabled = startSnappingEnabled;\r\n this.updateSashEnablement();\r\n }\r\n get endSnappingEnabled() { return this._endSnappingEnabled; }\r\n set endSnappingEnabled(endSnappingEnabled) {\r\n if (this._endSnappingEnabled === endSnappingEnabled) {\r\n return;\r\n }\r\n this._endSnappingEnabled = endSnappingEnabled;\r\n this.updateSashEnablement();\r\n }\r\n style(styles) {\r\n if (styles.separatorBorder.isTransparent()) {\r\n this.el.classList.remove('separator-border');\r\n this.el.style.removeProperty('--separator-border');\r\n }\r\n else {\r\n this.el.classList.add('separator-border');\r\n this.el.style.setProperty('--separator-border', styles.separatorBorder.toString());\r\n }\r\n }\r\n addView(view, size, index = this.viewItems.length, skipLayout) {\r\n this.doAddView(view, size, index, skipLayout);\r\n }\r\n layout(size, layoutContext) {\r\n const previousSize = Math.max(this.size, this.contentSize);\r\n this.size = size;\r\n this.layoutContext = layoutContext;\r\n if (!this.proportions) {\r\n const indexes = range(this.viewItems.length);\r\n const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 1 /* Low */);\r\n const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */);\r\n this.resize(this.viewItems.length - 1, size - previousSize, undefined, lowPriorityIndexes, highPriorityIndexes);\r\n }\r\n else {\r\n for (let i = 0; i < this.viewItems.length; i++) {\r\n const item = this.viewItems[i];\r\n item.size = clamp(Math.round(this.proportions[i] * size), item.minimumSize, item.maximumSize);\r\n }\r\n }\r\n this.distributeEmptySpace();\r\n this.layoutViews();\r\n }\r\n saveProportions() {\r\n if (this.proportionalLayout && this.contentSize > 0) {\r\n this.proportions = this.viewItems.map(i => i.size / this.contentSize);\r\n }\r\n }\r\n onSashStart({ sash, start, alt }) {\r\n for (const item of this.viewItems) {\r\n item.enabled = false;\r\n }\r\n const index = this.sashItems.findIndex(item => item.sash === sash);\r\n // This way, we can press Alt while we resize a sash, macOS style!\r\n const disposable = combinedDisposable(domEvent(document.body, 'keydown')(e => resetSashDragState(this.sashDragState.current, e.altKey)), domEvent(document.body, 'keyup')(() => resetSashDragState(this.sashDragState.current, false)));\r\n const resetSashDragState = (start, alt) => {\r\n const sizes = this.viewItems.map(i => i.size);\r\n let minDelta = Number.NEGATIVE_INFINITY;\r\n let maxDelta = Number.POSITIVE_INFINITY;\r\n if (this.inverseAltBehavior) {\r\n alt = !alt;\r\n }\r\n if (alt) {\r\n // When we're using the last sash with Alt, we're resizing\r\n // the view to the left/up, instead of right/down as usual\r\n // Thus, we must do the inverse of the usual\r\n const isLastSash = index === this.sashItems.length - 1;\r\n if (isLastSash) {\r\n const viewItem = this.viewItems[index];\r\n minDelta = (viewItem.minimumSize - viewItem.size) / 2;\r\n maxDelta = (viewItem.maximumSize - viewItem.size) / 2;\r\n }\r\n else {\r\n const viewItem = this.viewItems[index + 1];\r\n minDelta = (viewItem.size - viewItem.maximumSize) / 2;\r\n maxDelta = (viewItem.size - viewItem.minimumSize) / 2;\r\n }\r\n }\r\n let snapBefore;\r\n let snapAfter;\r\n if (!alt) {\r\n const upIndexes = range(index, -1);\r\n const downIndexes = range(index + 1, this.viewItems.length);\r\n const minDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].minimumSize - sizes[i]), 0);\r\n const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].viewMaximumSize - sizes[i]), 0);\r\n const maxDeltaDown = downIndexes.length === 0 ? Number.POSITIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].minimumSize), 0);\r\n const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].viewMaximumSize), 0);\r\n const minDelta = Math.max(minDeltaUp, minDeltaDown);\r\n const maxDelta = Math.min(maxDeltaDown, maxDeltaUp);\r\n const snapBeforeIndex = this.findFirstSnapIndex(upIndexes);\r\n const snapAfterIndex = this.findFirstSnapIndex(downIndexes);\r\n if (typeof snapBeforeIndex === 'number') {\r\n const viewItem = this.viewItems[snapBeforeIndex];\r\n const halfSize = Math.floor(viewItem.viewMinimumSize / 2);\r\n snapBefore = {\r\n index: snapBeforeIndex,\r\n limitDelta: viewItem.visible ? minDelta - halfSize : minDelta + halfSize,\r\n size: viewItem.size\r\n };\r\n }\r\n if (typeof snapAfterIndex === 'number') {\r\n const viewItem = this.viewItems[snapAfterIndex];\r\n const halfSize = Math.floor(viewItem.viewMinimumSize / 2);\r\n snapAfter = {\r\n index: snapAfterIndex,\r\n limitDelta: viewItem.visible ? maxDelta + halfSize : maxDelta - halfSize,\r\n size: viewItem.size\r\n };\r\n }\r\n }\r\n this.sashDragState = { start, current: start, index, sizes, minDelta, maxDelta, alt, snapBefore, snapAfter, disposable };\r\n };\r\n resetSashDragState(start, alt);\r\n }\r\n onSashChange({ current }) {\r\n const { index, start, sizes, alt, minDelta, maxDelta, snapBefore, snapAfter } = this.sashDragState;\r\n this.sashDragState.current = current;\r\n const delta = current - start;\r\n const newDelta = this.resize(index, delta, sizes, undefined, undefined, minDelta, maxDelta, snapBefore, snapAfter);\r\n if (alt) {\r\n const isLastSash = index === this.sashItems.length - 1;\r\n const newSizes = this.viewItems.map(i => i.size);\r\n const viewItemIndex = isLastSash ? index : index + 1;\r\n const viewItem = this.viewItems[viewItemIndex];\r\n const newMinDelta = viewItem.size - viewItem.maximumSize;\r\n const newMaxDelta = viewItem.size - viewItem.minimumSize;\r\n const resizeIndex = isLastSash ? index - 1 : index + 1;\r\n this.resize(resizeIndex, -newDelta, newSizes, undefined, undefined, newMinDelta, newMaxDelta);\r\n }\r\n this.distributeEmptySpace();\r\n this.layoutViews();\r\n }\r\n onSashEnd(index) {\r\n this._onDidSashChange.fire(index);\r\n this.sashDragState.disposable.dispose();\r\n this.saveProportions();\r\n for (const item of this.viewItems) {\r\n item.enabled = true;\r\n }\r\n }\r\n onViewChange(item, size) {\r\n const index = this.viewItems.indexOf(item);\r\n if (index < 0 || index >= this.viewItems.length) {\r\n return;\r\n }\r\n size = typeof size === 'number' ? size : item.size;\r\n size = clamp(size, item.minimumSize, item.maximumSize);\r\n if (this.inverseAltBehavior && index > 0) {\r\n // In this case, we want the view to grow or shrink both sides equally\r\n // so we just resize the \"left\" side by half and let `resize` do the clamping magic\r\n this.resize(index - 1, Math.floor((item.size - size) / 2));\r\n this.distributeEmptySpace();\r\n this.layoutViews();\r\n }\r\n else {\r\n item.size = size;\r\n this.relayout([index], undefined);\r\n }\r\n }\r\n resizeView(index, size) {\r\n if (this.state !== State.Idle) {\r\n throw new Error('Cant modify splitview');\r\n }\r\n this.state = State.Busy;\r\n if (index < 0 || index >= this.viewItems.length) {\r\n return;\r\n }\r\n const indexes = range(this.viewItems.length).filter(i => i !== index);\r\n const lowPriorityIndexes = [...indexes.filter(i => this.viewItems[i].priority === 1 /* Low */), index];\r\n const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */);\r\n const item = this.viewItems[index];\r\n size = Math.round(size);\r\n size = clamp(size, item.minimumSize, Math.min(item.maximumSize, this.size));\r\n item.size = size;\r\n this.relayout(lowPriorityIndexes, highPriorityIndexes);\r\n this.state = State.Idle;\r\n }\r\n distributeViewSizes() {\r\n const flexibleViewItems = [];\r\n let flexibleSize = 0;\r\n for (const item of this.viewItems) {\r\n if (item.maximumSize - item.minimumSize > 0) {\r\n flexibleViewItems.push(item);\r\n flexibleSize += item.size;\r\n }\r\n }\r\n const size = Math.floor(flexibleSize / flexibleViewItems.length);\r\n for (const item of flexibleViewItems) {\r\n item.size = clamp(size, item.minimumSize, item.maximumSize);\r\n }\r\n const indexes = range(this.viewItems.length);\r\n const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 1 /* Low */);\r\n const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */);\r\n this.relayout(lowPriorityIndexes, highPriorityIndexes);\r\n }\r\n getViewSize(index) {\r\n if (index < 0 || index >= this.viewItems.length) {\r\n return -1;\r\n }\r\n return this.viewItems[index].size;\r\n }\r\n doAddView(view, size, index = this.viewItems.length, skipLayout) {\r\n if (this.state !== State.Idle) {\r\n throw new Error('Cant modify splitview');\r\n }\r\n this.state = State.Busy;\r\n // Add view\r\n const container = $('.split-view-view');\r\n if (index === this.viewItems.length) {\r\n this.viewContainer.appendChild(container);\r\n }\r\n else {\r\n this.viewContainer.insertBefore(container, this.viewContainer.children.item(index));\r\n }\r\n const onChangeDisposable = view.onDidChange(size => this.onViewChange(item, size));\r\n const containerDisposable = toDisposable(() => this.viewContainer.removeChild(container));\r\n const disposable = combinedDisposable(onChangeDisposable, containerDisposable);\r\n let viewSize;\r\n if (typeof size === 'number') {\r\n viewSize = size;\r\n }\r\n else if (size.type === 'split') {\r\n viewSize = this.getViewSize(size.index) / 2;\r\n }\r\n else if (size.type === 'invisible') {\r\n viewSize = { cachedVisibleSize: size.cachedVisibleSize };\r\n }\r\n else {\r\n viewSize = view.minimumSize;\r\n }\r\n const item = this.orientation === 0 /* VERTICAL */\r\n ? new VerticalViewItem(container, view, viewSize, disposable)\r\n : new HorizontalViewItem(container, view, viewSize, disposable);\r\n this.viewItems.splice(index, 0, item);\r\n // Add sash\r\n if (this.viewItems.length > 1) {\r\n const sash = this.orientation === 0 /* VERTICAL */\r\n ? new Sash(this.sashContainer, { getHorizontalSashTop: (sash) => this.getSashPosition(sash) }, {\r\n orientation: 1 /* HORIZONTAL */,\r\n orthogonalStartSash: this.orthogonalStartSash,\r\n orthogonalEndSash: this.orthogonalEndSash\r\n })\r\n : new Sash(this.sashContainer, { getVerticalSashLeft: (sash) => this.getSashPosition(sash) }, {\r\n orientation: 0 /* VERTICAL */,\r\n orthogonalStartSash: this.orthogonalStartSash,\r\n orthogonalEndSash: this.orthogonalEndSash\r\n });\r\n const sashEventMapper = this.orientation === 0 /* VERTICAL */\r\n ? (e) => ({ sash, start: e.startY, current: e.currentY, alt: e.altKey })\r\n : (e) => ({ sash, start: e.startX, current: e.currentX, alt: e.altKey });\r\n const onStart = Event.map(sash.onDidStart, sashEventMapper);\r\n const onStartDisposable = onStart(this.onSashStart, this);\r\n const onChange = Event.map(sash.onDidChange, sashEventMapper);\r\n const onChangeDisposable = onChange(this.onSashChange, this);\r\n const onEnd = Event.map(sash.onDidEnd, () => this.sashItems.findIndex(item => item.sash === sash));\r\n const onEndDisposable = onEnd(this.onSashEnd, this);\r\n const onDidResetDisposable = sash.onDidReset(() => {\r\n const index = this.sashItems.findIndex(item => item.sash === sash);\r\n const upIndexes = range(index, -1);\r\n const downIndexes = range(index + 1, this.viewItems.length);\r\n const snapBeforeIndex = this.findFirstSnapIndex(upIndexes);\r\n const snapAfterIndex = this.findFirstSnapIndex(downIndexes);\r\n if (typeof snapBeforeIndex === 'number' && !this.viewItems[snapBeforeIndex].visible) {\r\n return;\r\n }\r\n if (typeof snapAfterIndex === 'number' && !this.viewItems[snapAfterIndex].visible) {\r\n return;\r\n }\r\n this._onDidSashReset.fire(index);\r\n });\r\n const disposable = combinedDisposable(onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash);\r\n const sashItem = { sash, disposable };\r\n this.sashItems.splice(index - 1, 0, sashItem);\r\n }\r\n container.appendChild(view.element);\r\n let highPriorityIndexes;\r\n if (typeof size !== 'number' && size.type === 'split') {\r\n highPriorityIndexes = [size.index];\r\n }\r\n if (!skipLayout) {\r\n this.relayout([index], highPriorityIndexes);\r\n }\r\n this.state = State.Idle;\r\n if (!skipLayout && typeof size !== 'number' && size.type === 'distribute') {\r\n this.distributeViewSizes();\r\n }\r\n }\r\n relayout(lowPriorityIndexes, highPriorityIndexes) {\r\n const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0);\r\n this.resize(this.viewItems.length - 1, this.size - contentSize, undefined, lowPriorityIndexes, highPriorityIndexes);\r\n this.distributeEmptySpace();\r\n this.layoutViews();\r\n this.saveProportions();\r\n }\r\n resize(index, delta, sizes = this.viewItems.map(i => i.size), lowPriorityIndexes, highPriorityIndexes, overloadMinDelta = Number.NEGATIVE_INFINITY, overloadMaxDelta = Number.POSITIVE_INFINITY, snapBefore, snapAfter) {\r\n if (index < 0 || index >= this.viewItems.length) {\r\n return 0;\r\n }\r\n const upIndexes = range(index, -1);\r\n const downIndexes = range(index + 1, this.viewItems.length);\r\n if (highPriorityIndexes) {\r\n for (const index of highPriorityIndexes) {\r\n pushToStart(upIndexes, index);\r\n pushToStart(downIndexes, index);\r\n }\r\n }\r\n if (lowPriorityIndexes) {\r\n for (const index of lowPriorityIndexes) {\r\n pushToEnd(upIndexes, index);\r\n pushToEnd(downIndexes, index);\r\n }\r\n }\r\n const upItems = upIndexes.map(i => this.viewItems[i]);\r\n const upSizes = upIndexes.map(i => sizes[i]);\r\n const downItems = downIndexes.map(i => this.viewItems[i]);\r\n const downSizes = downIndexes.map(i => sizes[i]);\r\n const minDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].minimumSize - sizes[i]), 0);\r\n const maxDeltaUp = upIndexes.reduce((r, i) => r + (this.viewItems[i].maximumSize - sizes[i]), 0);\r\n const maxDeltaDown = downIndexes.length === 0 ? Number.POSITIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].minimumSize), 0);\r\n const minDeltaDown = downIndexes.length === 0 ? Number.NEGATIVE_INFINITY : downIndexes.reduce((r, i) => r + (sizes[i] - this.viewItems[i].maximumSize), 0);\r\n const minDelta = Math.max(minDeltaUp, minDeltaDown, overloadMinDelta);\r\n const maxDelta = Math.min(maxDeltaDown, maxDeltaUp, overloadMaxDelta);\r\n let snapped = false;\r\n if (snapBefore) {\r\n const snapView = this.viewItems[snapBefore.index];\r\n const visible = delta >= snapBefore.limitDelta;\r\n snapped = visible !== snapView.visible;\r\n snapView.setVisible(visible, snapBefore.size);\r\n }\r\n if (!snapped && snapAfter) {\r\n const snapView = this.viewItems[snapAfter.index];\r\n const visible = delta < snapAfter.limitDelta;\r\n snapped = visible !== snapView.visible;\r\n snapView.setVisible(visible, snapAfter.size);\r\n }\r\n if (snapped) {\r\n return this.resize(index, delta, sizes, lowPriorityIndexes, highPriorityIndexes, overloadMinDelta, overloadMaxDelta);\r\n }\r\n delta = clamp(delta, minDelta, maxDelta);\r\n for (let i = 0, deltaUp = delta; i < upItems.length; i++) {\r\n const item = upItems[i];\r\n const size = clamp(upSizes[i] + deltaUp, item.minimumSize, item.maximumSize);\r\n const viewDelta = size - upSizes[i];\r\n deltaUp -= viewDelta;\r\n item.size = size;\r\n }\r\n for (let i = 0, deltaDown = delta; i < downItems.length; i++) {\r\n const item = downItems[i];\r\n const size = clamp(downSizes[i] - deltaDown, item.minimumSize, item.maximumSize);\r\n const viewDelta = size - downSizes[i];\r\n deltaDown += viewDelta;\r\n item.size = size;\r\n }\r\n return delta;\r\n }\r\n distributeEmptySpace(lowPriorityIndex) {\r\n const contentSize = this.viewItems.reduce((r, i) => r + i.size, 0);\r\n let emptyDelta = this.size - contentSize;\r\n const indexes = range(this.viewItems.length - 1, -1);\r\n const lowPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 1 /* Low */);\r\n const highPriorityIndexes = indexes.filter(i => this.viewItems[i].priority === 2 /* High */);\r\n for (const index of highPriorityIndexes) {\r\n pushToStart(indexes, index);\r\n }\r\n for (const index of lowPriorityIndexes) {\r\n pushToEnd(indexes, index);\r\n }\r\n if (typeof lowPriorityIndex === 'number') {\r\n pushToEnd(indexes, lowPriorityIndex);\r\n }\r\n for (let i = 0; emptyDelta !== 0 && i < indexes.length; i++) {\r\n const item = this.viewItems[indexes[i]];\r\n const size = clamp(item.size + emptyDelta, item.minimumSize, item.maximumSize);\r\n const viewDelta = size - item.size;\r\n emptyDelta -= viewDelta;\r\n item.size = size;\r\n }\r\n }\r\n layoutViews() {\r\n // Save new content size\r\n this.contentSize = this.viewItems.reduce((r, i) => r + i.size, 0);\r\n // Layout views\r\n let offset = 0;\r\n for (const viewItem of this.viewItems) {\r\n viewItem.layout(offset, this.layoutContext);\r\n offset += viewItem.size;\r\n }\r\n // Layout sashes\r\n this.sashItems.forEach(item => item.sash.layout());\r\n this.updateSashEnablement();\r\n this.updateScrollableElement();\r\n }\r\n updateScrollableElement() {\r\n if (this.orientation === 0 /* VERTICAL */) {\r\n this.scrollableElement.setScrollDimensions({\r\n height: this.size,\r\n scrollHeight: this.contentSize\r\n });\r\n }\r\n else {\r\n this.scrollableElement.setScrollDimensions({\r\n width: this.size,\r\n scrollWidth: this.contentSize\r\n });\r\n }\r\n }\r\n updateSashEnablement() {\r\n let previous = false;\r\n const collapsesDown = this.viewItems.map(i => previous = (i.size - i.minimumSize > 0) || previous);\r\n previous = false;\r\n const expandsDown = this.viewItems.map(i => previous = (i.maximumSize - i.size > 0) || previous);\r\n const reverseViews = [...this.viewItems].reverse();\r\n previous = false;\r\n const collapsesUp = reverseViews.map(i => previous = (i.size - i.minimumSize > 0) || previous).reverse();\r\n previous = false;\r\n const expandsUp = reverseViews.map(i => previous = (i.maximumSize - i.size > 0) || previous).reverse();\r\n let position = 0;\r\n for (let index = 0; index < this.sashItems.length; index++) {\r\n const { sash } = this.sashItems[index];\r\n const viewItem = this.viewItems[index];\r\n position += viewItem.size;\r\n const min = !(collapsesDown[index] && expandsUp[index + 1]);\r\n const max = !(expandsDown[index] && collapsesUp[index + 1]);\r\n if (min && max) {\r\n const upIndexes = range(index, -1);\r\n const downIndexes = range(index + 1, this.viewItems.length);\r\n const snapBeforeIndex = this.findFirstSnapIndex(upIndexes);\r\n const snapAfterIndex = this.findFirstSnapIndex(downIndexes);\r\n const snappedBefore = typeof snapBeforeIndex === 'number' && !this.viewItems[snapBeforeIndex].visible;\r\n const snappedAfter = typeof snapAfterIndex === 'number' && !this.viewItems[snapAfterIndex].visible;\r\n if (snappedBefore && collapsesUp[index] && (position > 0 || this.startSnappingEnabled)) {\r\n sash.state = 1 /* Minimum */;\r\n }\r\n else if (snappedAfter && collapsesDown[index] && (position < this.contentSize || this.endSnappingEnabled)) {\r\n sash.state = 2 /* Maximum */;\r\n }\r\n else {\r\n sash.state = 0 /* Disabled */;\r\n }\r\n }\r\n else if (min && !max) {\r\n sash.state = 1 /* Minimum */;\r\n }\r\n else if (!min && max) {\r\n sash.state = 2 /* Maximum */;\r\n }\r\n else {\r\n sash.state = 3 /* Enabled */;\r\n }\r\n }\r\n }\r\n getSashPosition(sash) {\r\n let position = 0;\r\n for (let i = 0; i < this.sashItems.length; i++) {\r\n position += this.viewItems[i].size;\r\n if (this.sashItems[i].sash === sash) {\r\n return position;\r\n }\r\n }\r\n return 0;\r\n }\r\n findFirstSnapIndex(indexes) {\r\n // visible views first\r\n for (const index of indexes) {\r\n const viewItem = this.viewItems[index];\r\n if (!viewItem.visible) {\r\n continue;\r\n }\r\n if (viewItem.snap) {\r\n return index;\r\n }\r\n }\r\n // then, hidden views\r\n for (const index of indexes) {\r\n const viewItem = this.viewItems[index];\r\n if (viewItem.visible && viewItem.maximumSize - viewItem.minimumSize > 0) {\r\n return undefined;\r\n }\r\n if (!viewItem.visible && viewItem.snap) {\r\n return index;\r\n }\r\n }\r\n return undefined;\r\n }\r\n dispose() {\r\n super.dispose();\r\n this.viewItems.forEach(i => i.dispose());\r\n this.viewItems = [];\r\n this.sashItems.forEach(i => i.disposable.dispose());\r\n this.sashItems = [];\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport './referencesWidget.css';\r\nimport * as dom from '../../../../base/browser/dom.js';\r\nimport { Color } from '../../../../base/common/color.js';\r\nimport { Emitter, Event } from '../../../../base/common/event.js';\r\nimport { dispose, DisposableStore } from '../../../../base/common/lifecycle.js';\r\nimport { Schemas } from '../../../../base/common/network.js';\r\nimport { basenameOrAuthority, dirname } from '../../../../base/common/resources.js';\r\nimport { EmbeddedCodeEditorWidget } from '../../../browser/widget/embeddedCodeEditorWidget.js';\r\nimport { Range } from '../../../common/core/range.js';\r\nimport { ModelDecorationOptions, TextModel } from '../../../common/model/textModel.js';\r\nimport { ITextModelService } from '../../../common/services/resolverService.js';\r\nimport { AccessibilityProvider, DataSource, Delegate, FileReferencesRenderer, OneReferenceRenderer, StringRepresentationProvider, IdentityProvider } from './referencesTree.js';\r\nimport * as nls from '../../../../nls.js';\r\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\r\nimport { ILabelService } from '../../../../platform/label/common/label.js';\r\nimport { WorkbenchAsyncDataTree } from '../../../../platform/list/browser/listService.js';\r\nimport { activeContrastBorder } from '../../../../platform/theme/common/colorRegistry.js';\r\nimport { IThemeService, registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\r\nimport * as peekView from '../../peekView/peekView.js';\r\nimport { FileReferences, OneReference } from '../referencesModel.js';\r\nimport { SplitView, Sizing } from '../../../../base/browser/ui/splitview/splitview.js';\r\nimport { IUndoRedoService } from '../../../../platform/undoRedo/common/undoRedo.js';\r\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\r\nclass DecorationsManager {\r\n constructor(_editor, _model) {\r\n this._editor = _editor;\r\n this._model = _model;\r\n this._decorations = new Map();\r\n this._decorationIgnoreSet = new Set();\r\n this._callOnDispose = new DisposableStore();\r\n this._callOnModelChange = new DisposableStore();\r\n this._callOnDispose.add(this._editor.onDidChangeModel(() => this._onModelChanged()));\r\n this._onModelChanged();\r\n }\r\n dispose() {\r\n this._callOnModelChange.dispose();\r\n this._callOnDispose.dispose();\r\n this.removeDecorations();\r\n }\r\n _onModelChanged() {\r\n this._callOnModelChange.clear();\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n for (let ref of this._model.references) {\r\n if (ref.uri.toString() === model.uri.toString()) {\r\n this._addDecorations(ref.parent);\r\n return;\r\n }\r\n }\r\n }\r\n _addDecorations(reference) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(() => this._onDecorationChanged()));\r\n const newDecorations = [];\r\n const newDecorationsActualIndex = [];\r\n for (let i = 0, len = reference.children.length; i < len; i++) {\r\n let oneReference = reference.children[i];\r\n if (this._decorationIgnoreSet.has(oneReference.id)) {\r\n continue;\r\n }\r\n if (oneReference.uri.toString() !== this._editor.getModel().uri.toString()) {\r\n continue;\r\n }\r\n newDecorations.push({\r\n range: oneReference.range,\r\n options: DecorationsManager.DecorationOptions\r\n });\r\n newDecorationsActualIndex.push(i);\r\n }\r\n const decorations = this._editor.deltaDecorations([], newDecorations);\r\n for (let i = 0; i < decorations.length; i++) {\r\n this._decorations.set(decorations[i], reference.children[newDecorationsActualIndex[i]]);\r\n }\r\n }\r\n _onDecorationChanged() {\r\n const toRemove = [];\r\n const model = this._editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n for (let [decorationId, reference] of this._decorations) {\r\n const newRange = model.getDecorationRange(decorationId);\r\n if (!newRange) {\r\n continue;\r\n }\r\n let ignore = false;\r\n if (Range.equalsRange(newRange, reference.range)) {\r\n continue;\r\n }\r\n if (Range.spansMultipleLines(newRange)) {\r\n ignore = true;\r\n }\r\n else {\r\n const lineLength = reference.range.endColumn - reference.range.startColumn;\r\n const newLineLength = newRange.endColumn - newRange.startColumn;\r\n if (lineLength !== newLineLength) {\r\n ignore = true;\r\n }\r\n }\r\n if (ignore) {\r\n this._decorationIgnoreSet.add(reference.id);\r\n toRemove.push(decorationId);\r\n }\r\n else {\r\n reference.range = newRange;\r\n }\r\n }\r\n for (let i = 0, len = toRemove.length; i < len; i++) {\r\n this._decorations.delete(toRemove[i]);\r\n }\r\n this._editor.deltaDecorations(toRemove, []);\r\n }\r\n removeDecorations() {\r\n this._editor.deltaDecorations([...this._decorations.keys()], []);\r\n this._decorations.clear();\r\n }\r\n}\r\nDecorationsManager.DecorationOptions = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'reference-decoration'\r\n});\r\nexport class LayoutData {\r\n constructor() {\r\n this.ratio = 0.7;\r\n this.heightInLines = 18;\r\n }\r\n static fromJSON(raw) {\r\n let ratio;\r\n let heightInLines;\r\n try {\r\n const data = JSON.parse(raw);\r\n ratio = data.ratio;\r\n heightInLines = data.heightInLines;\r\n }\r\n catch (_a) {\r\n //\r\n }\r\n return {\r\n ratio: ratio || 0.7,\r\n heightInLines: heightInLines || 18\r\n };\r\n }\r\n}\r\nclass ReferencesTree extends WorkbenchAsyncDataTree {\r\n}\r\n/**\r\n * ZoneWidget that is shown inside the editor\r\n */\r\nlet ReferenceWidget = class ReferenceWidget extends peekView.PeekViewWidget {\r\n constructor(editor, _defaultTreeKeyboardSupport, layoutData, themeService, _textModelResolverService, _instantiationService, _peekViewService, _uriLabel, _undoRedoService, _keybindingService) {\r\n super(editor, { showFrame: false, showArrow: true, isResizeable: true, isAccessible: true }, _instantiationService);\r\n this._defaultTreeKeyboardSupport = _defaultTreeKeyboardSupport;\r\n this.layoutData = layoutData;\r\n this._textModelResolverService = _textModelResolverService;\r\n this._instantiationService = _instantiationService;\r\n this._peekViewService = _peekViewService;\r\n this._uriLabel = _uriLabel;\r\n this._undoRedoService = _undoRedoService;\r\n this._keybindingService = _keybindingService;\r\n this._disposeOnNewModel = new DisposableStore();\r\n this._callOnDispose = new DisposableStore();\r\n this._onDidSelectReference = new Emitter();\r\n this.onDidSelectReference = this._onDidSelectReference.event;\r\n this._dim = new dom.Dimension(0, 0);\r\n this._applyTheme(themeService.getColorTheme());\r\n this._callOnDispose.add(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));\r\n this._peekViewService.addExclusiveWidget(editor, this);\r\n this.create();\r\n }\r\n dispose() {\r\n this.setModel(undefined);\r\n this._callOnDispose.dispose();\r\n this._disposeOnNewModel.dispose();\r\n dispose(this._preview);\r\n dispose(this._previewNotAvailableMessage);\r\n dispose(this._tree);\r\n dispose(this._previewModelReference);\r\n this._splitView.dispose();\r\n super.dispose();\r\n }\r\n _applyTheme(theme) {\r\n const borderColor = theme.getColor(peekView.peekViewBorder) || Color.transparent;\r\n this.style({\r\n arrowColor: borderColor,\r\n frameColor: borderColor,\r\n headerBackgroundColor: theme.getColor(peekView.peekViewTitleBackground) || Color.transparent,\r\n primaryHeadingColor: theme.getColor(peekView.peekViewTitleForeground),\r\n secondaryHeadingColor: theme.getColor(peekView.peekViewTitleInfoForeground)\r\n });\r\n }\r\n show(where) {\r\n this.editor.revealRangeInCenterIfOutsideViewport(where, 0 /* Smooth */);\r\n super.show(where, this.layoutData.heightInLines || 18);\r\n }\r\n focusOnReferenceTree() {\r\n this._tree.domFocus();\r\n }\r\n focusOnPreviewEditor() {\r\n this._preview.focus();\r\n }\r\n isPreviewEditorFocused() {\r\n return this._preview.hasTextFocus();\r\n }\r\n _onTitleClick(e) {\r\n if (this._preview && this._preview.getModel()) {\r\n this._onDidSelectReference.fire({\r\n element: this._getFocusedReference(),\r\n kind: e.ctrlKey || e.metaKey || e.altKey ? 'side' : 'open',\r\n source: 'title'\r\n });\r\n }\r\n }\r\n _fillBody(containerElement) {\r\n this.setCssClass('reference-zone-widget');\r\n // message pane\r\n this._messageContainer = dom.append(containerElement, dom.$('div.messages'));\r\n dom.hide(this._messageContainer);\r\n this._splitView = new SplitView(containerElement, { orientation: 1 /* HORIZONTAL */ });\r\n // editor\r\n this._previewContainer = dom.append(containerElement, dom.$('div.preview.inline'));\r\n let options = {\r\n scrollBeyondLastLine: false,\r\n scrollbar: {\r\n verticalScrollbarSize: 14,\r\n horizontal: 'auto',\r\n useShadows: true,\r\n verticalHasArrows: false,\r\n horizontalHasArrows: false,\r\n alwaysConsumeMouseWheel: false\r\n },\r\n overviewRulerLanes: 2,\r\n fixedOverflowWidgets: true,\r\n minimap: {\r\n enabled: false\r\n }\r\n };\r\n this._preview = this._instantiationService.createInstance(EmbeddedCodeEditorWidget, this._previewContainer, options, this.editor);\r\n dom.hide(this._previewContainer);\r\n this._previewNotAvailableMessage = new TextModel(nls.localize('missingPreviewMessage', \"no preview available\"), TextModel.DEFAULT_CREATION_OPTIONS, null, null, this._undoRedoService);\r\n // tree\r\n this._treeContainer = dom.append(containerElement, dom.$('div.ref-tree.inline'));\r\n const treeOptions = {\r\n keyboardSupport: this._defaultTreeKeyboardSupport,\r\n accessibilityProvider: new AccessibilityProvider(),\r\n keyboardNavigationLabelProvider: this._instantiationService.createInstance(StringRepresentationProvider),\r\n identityProvider: new IdentityProvider(),\r\n openOnSingleClick: true,\r\n openOnFocus: true,\r\n overrideStyles: {\r\n listBackground: peekView.peekViewResultsBackground\r\n }\r\n };\r\n if (this._defaultTreeKeyboardSupport) {\r\n // the tree will consume `Escape` and prevent the widget from closing\r\n this._callOnDispose.add(dom.addStandardDisposableListener(this._treeContainer, 'keydown', (e) => {\r\n if (e.equals(9 /* Escape */)) {\r\n this._keybindingService.dispatchEvent(e, e.target);\r\n e.stopPropagation();\r\n }\r\n }, true));\r\n }\r\n this._tree = this._instantiationService.createInstance(ReferencesTree, 'ReferencesWidget', this._treeContainer, new Delegate(), [\r\n this._instantiationService.createInstance(FileReferencesRenderer),\r\n this._instantiationService.createInstance(OneReferenceRenderer),\r\n ], this._instantiationService.createInstance(DataSource), treeOptions);\r\n // split stuff\r\n this._splitView.addView({\r\n onDidChange: Event.None,\r\n element: this._previewContainer,\r\n minimumSize: 200,\r\n maximumSize: Number.MAX_VALUE,\r\n layout: (width) => {\r\n this._preview.layout({ height: this._dim.height, width });\r\n }\r\n }, Sizing.Distribute);\r\n this._splitView.addView({\r\n onDidChange: Event.None,\r\n element: this._treeContainer,\r\n minimumSize: 100,\r\n maximumSize: Number.MAX_VALUE,\r\n layout: (width) => {\r\n this._treeContainer.style.height = `${this._dim.height}px`;\r\n this._treeContainer.style.width = `${width}px`;\r\n this._tree.layout(this._dim.height, width);\r\n }\r\n }, Sizing.Distribute);\r\n this._disposables.add(this._splitView.onDidSashChange(() => {\r\n if (this._dim.width) {\r\n this.layoutData.ratio = this._splitView.getViewSize(0) / this._dim.width;\r\n }\r\n }, undefined));\r\n // listen on selection and focus\r\n let onEvent = (element, kind) => {\r\n if (element instanceof OneReference) {\r\n if (kind === 'show') {\r\n this._revealReference(element, false);\r\n }\r\n this._onDidSelectReference.fire({ element, kind, source: 'tree' });\r\n }\r\n };\r\n this._tree.onDidOpen(e => {\r\n if (e.sideBySide) {\r\n onEvent(e.element, 'side');\r\n }\r\n else if (e.editorOptions.pinned) {\r\n onEvent(e.element, 'goto');\r\n }\r\n else {\r\n onEvent(e.element, 'show');\r\n }\r\n });\r\n dom.hide(this._treeContainer);\r\n }\r\n _onWidth(width) {\r\n if (this._dim) {\r\n this._doLayoutBody(this._dim.height, width);\r\n }\r\n }\r\n _doLayoutBody(heightInPixel, widthInPixel) {\r\n super._doLayoutBody(heightInPixel, widthInPixel);\r\n this._dim = new dom.Dimension(widthInPixel, heightInPixel);\r\n this.layoutData.heightInLines = this._viewZone ? this._viewZone.heightInLines : this.layoutData.heightInLines;\r\n this._splitView.layout(widthInPixel);\r\n this._splitView.resizeView(0, widthInPixel * this.layoutData.ratio);\r\n }\r\n setSelection(selection) {\r\n return this._revealReference(selection, true).then(() => {\r\n if (!this._model) {\r\n // disposed\r\n return;\r\n }\r\n // show in tree\r\n this._tree.setSelection([selection]);\r\n this._tree.setFocus([selection]);\r\n });\r\n }\r\n setModel(newModel) {\r\n // clean up\r\n this._disposeOnNewModel.clear();\r\n this._model = newModel;\r\n if (this._model) {\r\n return this._onNewModel();\r\n }\r\n return Promise.resolve();\r\n }\r\n _onNewModel() {\r\n if (!this._model) {\r\n return Promise.resolve(undefined);\r\n }\r\n if (this._model.isEmpty) {\r\n this.setTitle('');\r\n this._messageContainer.innerText = nls.localize('noResults', \"No results\");\r\n dom.show(this._messageContainer);\r\n return Promise.resolve(undefined);\r\n }\r\n dom.hide(this._messageContainer);\r\n this._decorationsManager = new DecorationsManager(this._preview, this._model);\r\n this._disposeOnNewModel.add(this._decorationsManager);\r\n // listen on model changes\r\n this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(reference => this._tree.rerender(reference)));\r\n // listen on editor\r\n this._disposeOnNewModel.add(this._preview.onMouseDown(e => {\r\n const { event, target } = e;\r\n if (event.detail !== 2) {\r\n return;\r\n }\r\n const element = this._getFocusedReference();\r\n if (!element) {\r\n return;\r\n }\r\n this._onDidSelectReference.fire({\r\n element: { uri: element.uri, range: target.range },\r\n kind: (event.ctrlKey || event.metaKey || event.altKey) ? 'side' : 'open',\r\n source: 'editor'\r\n });\r\n }));\r\n // make sure things are rendered\r\n this.container.classList.add('results-loaded');\r\n dom.show(this._treeContainer);\r\n dom.show(this._previewContainer);\r\n this._splitView.layout(this._dim.width);\r\n this.focusOnReferenceTree();\r\n // pick input and a reference to begin with\r\n return this._tree.setInput(this._model.groups.length === 1 ? this._model.groups[0] : this._model);\r\n }\r\n _getFocusedReference() {\r\n const [element] = this._tree.getFocus();\r\n if (element instanceof OneReference) {\r\n return element;\r\n }\r\n else if (element instanceof FileReferences) {\r\n if (element.children.length > 0) {\r\n return element.children[0];\r\n }\r\n }\r\n return undefined;\r\n }\r\n revealReference(reference) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield this._revealReference(reference, false);\r\n this._onDidSelectReference.fire({ element: reference, kind: 'goto', source: 'tree' });\r\n });\r\n }\r\n _revealReference(reference, revealParent) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // check if there is anything to do...\r\n if (this._revealedReference === reference) {\r\n return;\r\n }\r\n this._revealedReference = reference;\r\n // Update widget header\r\n if (reference.uri.scheme !== Schemas.inMemory) {\r\n this.setTitle(basenameOrAuthority(reference.uri), this._uriLabel.getUriLabel(dirname(reference.uri)));\r\n }\r\n else {\r\n this.setTitle(nls.localize('peekView.alternateTitle', \"References\"));\r\n }\r\n const promise = this._textModelResolverService.createModelReference(reference.uri);\r\n if (this._tree.getInput() === reference.parent) {\r\n this._tree.reveal(reference);\r\n }\r\n else {\r\n if (revealParent) {\r\n this._tree.reveal(reference.parent);\r\n }\r\n yield this._tree.expand(reference.parent);\r\n this._tree.reveal(reference);\r\n }\r\n const ref = yield promise;\r\n if (!this._model) {\r\n // disposed\r\n ref.dispose();\r\n return;\r\n }\r\n dispose(this._previewModelReference);\r\n // show in editor\r\n const model = ref.object;\r\n if (model) {\r\n const scrollType = this._preview.getModel() === model.textEditorModel ? 0 /* Smooth */ : 1 /* Immediate */;\r\n const sel = Range.lift(reference.range).collapseToStart();\r\n this._previewModelReference = ref;\r\n this._preview.setModel(model.textEditorModel);\r\n this._preview.setSelection(sel);\r\n this._preview.revealRangeInCenter(sel, scrollType);\r\n }\r\n else {\r\n this._preview.setModel(this._previewNotAvailableMessage);\r\n ref.dispose();\r\n }\r\n });\r\n }\r\n};\r\nReferenceWidget = __decorate([\r\n __param(3, IThemeService),\r\n __param(4, ITextModelService),\r\n __param(5, IInstantiationService),\r\n __param(6, peekView.IPeekViewService),\r\n __param(7, ILabelService),\r\n __param(8, IUndoRedoService),\r\n __param(9, IKeybindingService)\r\n], ReferenceWidget);\r\nexport { ReferenceWidget };\r\n// theming\r\nregisterThemingParticipant((theme, collector) => {\r\n const findMatchHighlightColor = theme.getColor(peekView.peekViewResultsMatchHighlight);\r\n if (findMatchHighlightColor) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${findMatchHighlightColor}; }`);\r\n }\r\n const referenceHighlightColor = theme.getColor(peekView.peekViewEditorMatchHighlight);\r\n if (referenceHighlightColor) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${referenceHighlightColor}; }`);\r\n }\r\n const referenceHighlightBorder = theme.getColor(peekView.peekViewEditorMatchHighlightBorder);\r\n if (referenceHighlightBorder) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${referenceHighlightBorder}; box-sizing: border-box; }`);\r\n }\r\n const hcOutline = theme.getColor(activeContrastBorder);\r\n if (hcOutline) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`);\r\n }\r\n const resultsBackground = theme.getColor(peekView.peekViewResultsBackground);\r\n if (resultsBackground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${resultsBackground}; }`);\r\n }\r\n const resultsMatchForeground = theme.getColor(peekView.peekViewResultsMatchForeground);\r\n if (resultsMatchForeground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${resultsMatchForeground}; }`);\r\n }\r\n const resultsFileForeground = theme.getColor(peekView.peekViewResultsFileForeground);\r\n if (resultsFileForeground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${resultsFileForeground}; }`);\r\n }\r\n const resultsSelectedBackground = theme.getColor(peekView.peekViewResultsSelectionBackground);\r\n if (resultsSelectedBackground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${resultsSelectedBackground}; }`);\r\n }\r\n const resultsSelectedForeground = theme.getColor(peekView.peekViewResultsSelectionForeground);\r\n if (resultsSelectedForeground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${resultsSelectedForeground} !important; }`);\r\n }\r\n const editorBackground = theme.getColor(peekView.peekViewEditorBackground);\r\n if (editorBackground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,` +\r\n `.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {` +\r\n `\tbackground-color: ${editorBackground};` +\r\n `}`);\r\n }\r\n const editorGutterBackground = theme.getColor(peekView.peekViewEditorGutterBackground);\r\n if (editorGutterBackground) {\r\n collector.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {` +\r\n `\tbackground-color: ${editorGutterBackground};` +\r\n `}`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport * as nls from '../../../../nls.js';\r\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\r\nimport { DisposableStore } from '../../../../base/common/lifecycle.js';\r\nimport { ICodeEditorService } from '../../../browser/services/codeEditorService.js';\r\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\r\nimport { IContextKeyService, RawContextKey, ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';\r\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\r\nimport { IStorageService } from '../../../../platform/storage/common/storage.js';\r\nimport { OneReference } from '../referencesModel.js';\r\nimport { ReferenceWidget, LayoutData } from './referencesWidget.js';\r\nimport { Range } from '../../../common/core/range.js';\r\nimport { Position } from '../../../common/core/position.js';\r\nimport { INotificationService } from '../../../../platform/notification/common/notification.js';\r\nimport { createCancelablePromise } from '../../../../base/common/async.js';\r\nimport { getOuterEditor, PeekContext } from '../../peekView/peekView.js';\r\nimport { IListService, WorkbenchListFocusContextKey } from '../../../../platform/list/browser/listService.js';\r\nimport { KeybindingsRegistry } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\r\nimport { KeyChord } from '../../../../base/common/keyCodes.js';\r\nimport { CommandsRegistry } from '../../../../platform/commands/common/commands.js';\r\nexport const ctxReferenceSearchVisible = new RawContextKey('referenceSearchVisible', false);\r\nlet ReferencesController = class ReferencesController {\r\n constructor(_defaultTreeKeyboardSupport, _editor, contextKeyService, _editorService, _notificationService, _instantiationService, _storageService, _configurationService) {\r\n this._defaultTreeKeyboardSupport = _defaultTreeKeyboardSupport;\r\n this._editor = _editor;\r\n this._editorService = _editorService;\r\n this._notificationService = _notificationService;\r\n this._instantiationService = _instantiationService;\r\n this._storageService = _storageService;\r\n this._configurationService = _configurationService;\r\n this._disposables = new DisposableStore();\r\n this._requestIdPool = 0;\r\n this._ignoreModelChangeEvent = false;\r\n this._referenceSearchVisible = ctxReferenceSearchVisible.bindTo(contextKeyService);\r\n }\r\n static get(editor) {\r\n return editor.getContribution(ReferencesController.ID);\r\n }\r\n dispose() {\r\n var _a, _b;\r\n this._referenceSearchVisible.reset();\r\n this._disposables.dispose();\r\n (_a = this._widget) === null || _a === void 0 ? void 0 : _a.dispose();\r\n (_b = this._model) === null || _b === void 0 ? void 0 : _b.dispose();\r\n this._widget = undefined;\r\n this._model = undefined;\r\n }\r\n toggleWidget(range, modelPromise, peekMode) {\r\n // close current widget and return early is position didn't change\r\n let widgetPosition;\r\n if (this._widget) {\r\n widgetPosition = this._widget.position;\r\n }\r\n this.closeWidget();\r\n if (!!widgetPosition && range.containsPosition(widgetPosition)) {\r\n return;\r\n }\r\n this._peekMode = peekMode;\r\n this._referenceSearchVisible.set(true);\r\n // close the widget on model/mode changes\r\n this._disposables.add(this._editor.onDidChangeModelLanguage(() => { this.closeWidget(); }));\r\n this._disposables.add(this._editor.onDidChangeModel(() => {\r\n if (!this._ignoreModelChangeEvent) {\r\n this.closeWidget();\r\n }\r\n }));\r\n const storageKey = 'peekViewLayout';\r\n const data = LayoutData.fromJSON(this._storageService.get(storageKey, 0 /* GLOBAL */, '{}'));\r\n this._widget = this._instantiationService.createInstance(ReferenceWidget, this._editor, this._defaultTreeKeyboardSupport, data);\r\n this._widget.setTitle(nls.localize('labelLoading', \"Loading...\"));\r\n this._widget.show(range);\r\n this._disposables.add(this._widget.onDidClose(() => {\r\n modelPromise.cancel();\r\n if (this._widget) {\r\n this._storageService.store(storageKey, JSON.stringify(this._widget.layoutData), 0 /* GLOBAL */, 1 /* MACHINE */);\r\n this._widget = undefined;\r\n }\r\n this.closeWidget();\r\n }));\r\n this._disposables.add(this._widget.onDidSelectReference(event => {\r\n let { element, kind } = event;\r\n if (!element) {\r\n return;\r\n }\r\n switch (kind) {\r\n case 'open':\r\n if (event.source !== 'editor' || !this._configurationService.getValue('editor.stablePeek')) {\r\n // when stable peek is configured we don't close\r\n // the peek window on selecting the editor\r\n this.openReference(element, false, false);\r\n }\r\n break;\r\n case 'side':\r\n this.openReference(element, true, false);\r\n break;\r\n case 'goto':\r\n if (peekMode) {\r\n this._gotoReference(element);\r\n }\r\n else {\r\n this.openReference(element, false, true);\r\n }\r\n break;\r\n }\r\n }));\r\n const requestId = ++this._requestIdPool;\r\n modelPromise.then(model => {\r\n // still current request? widget still open?\r\n if (requestId !== this._requestIdPool || !this._widget) {\r\n return undefined;\r\n }\r\n if (this._model) {\r\n this._model.dispose();\r\n }\r\n this._model = model;\r\n // show widget\r\n return this._widget.setModel(this._model).then(() => {\r\n if (this._widget && this._model && this._editor.hasModel()) { // might have been closed\r\n // set title\r\n if (!this._model.isEmpty) {\r\n this._widget.setMetaTitle(nls.localize('metaTitle.N', \"{0} ({1})\", this._model.title, this._model.references.length));\r\n }\r\n else {\r\n this._widget.setMetaTitle('');\r\n }\r\n // set 'best' selection\r\n let uri = this._editor.getModel().uri;\r\n let pos = new Position(range.startLineNumber, range.startColumn);\r\n let selection = this._model.nearestReference(uri, pos);\r\n if (selection) {\r\n return this._widget.setSelection(selection).then(() => {\r\n if (this._widget && this._editor.getOption(71 /* peekWidgetDefaultFocus */) === 'editor') {\r\n this._widget.focusOnPreviewEditor();\r\n }\r\n });\r\n }\r\n }\r\n return undefined;\r\n });\r\n }, error => {\r\n this._notificationService.error(error);\r\n });\r\n }\r\n changeFocusBetweenPreviewAndReferences() {\r\n if (!this._widget) {\r\n // can be called while still resolving...\r\n return;\r\n }\r\n if (this._widget.isPreviewEditorFocused()) {\r\n this._widget.focusOnReferenceTree();\r\n }\r\n else {\r\n this._widget.focusOnPreviewEditor();\r\n }\r\n }\r\n goToNextOrPreviousReference(fwd) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._editor.hasModel() || !this._model || !this._widget) {\r\n // can be called while still resolving...\r\n return;\r\n }\r\n const currentPosition = this._widget.position;\r\n if (!currentPosition) {\r\n return;\r\n }\r\n const source = this._model.nearestReference(this._editor.getModel().uri, currentPosition);\r\n if (!source) {\r\n return;\r\n }\r\n const target = this._model.nextOrPreviousReference(source, fwd);\r\n const editorFocus = this._editor.hasTextFocus();\r\n const previewEditorFocus = this._widget.isPreviewEditorFocused();\r\n yield this._widget.setSelection(target);\r\n yield this._gotoReference(target);\r\n if (editorFocus) {\r\n this._editor.focus();\r\n }\r\n else if (this._widget && previewEditorFocus) {\r\n this._widget.focusOnPreviewEditor();\r\n }\r\n });\r\n }\r\n revealReference(reference) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._editor.hasModel() || !this._model || !this._widget) {\r\n // can be called while still resolving...\r\n return;\r\n }\r\n yield this._widget.revealReference(reference);\r\n });\r\n }\r\n closeWidget(focusEditor = true) {\r\n var _a, _b;\r\n (_a = this._widget) === null || _a === void 0 ? void 0 : _a.dispose();\r\n (_b = this._model) === null || _b === void 0 ? void 0 : _b.dispose();\r\n this._referenceSearchVisible.reset();\r\n this._disposables.clear();\r\n this._widget = undefined;\r\n this._model = undefined;\r\n if (focusEditor) {\r\n this._editor.focus();\r\n }\r\n this._requestIdPool += 1; // Cancel pending requests\r\n }\r\n _gotoReference(ref) {\r\n if (this._widget) {\r\n this._widget.hide();\r\n }\r\n this._ignoreModelChangeEvent = true;\r\n const range = Range.lift(ref.range).collapseToStart();\r\n return this._editorService.openCodeEditor({\r\n resource: ref.uri,\r\n options: { selection: range }\r\n }, this._editor).then(openedEditor => {\r\n var _a;\r\n this._ignoreModelChangeEvent = false;\r\n if (!openedEditor || !this._widget) {\r\n // something went wrong...\r\n this.closeWidget();\r\n return;\r\n }\r\n if (this._editor === openedEditor) {\r\n //\r\n this._widget.show(range);\r\n this._widget.focusOnReferenceTree();\r\n }\r\n else {\r\n // we opened a different editor instance which means a different controller instance.\r\n // therefore we stop with this controller and continue with the other\r\n const other = ReferencesController.get(openedEditor);\r\n const model = this._model.clone();\r\n this.closeWidget();\r\n openedEditor.focus();\r\n other.toggleWidget(range, createCancelablePromise(_ => Promise.resolve(model)), (_a = this._peekMode) !== null && _a !== void 0 ? _a : false);\r\n }\r\n }, (err) => {\r\n this._ignoreModelChangeEvent = false;\r\n onUnexpectedError(err);\r\n });\r\n }\r\n openReference(ref, sideBySide, pinned) {\r\n // clear stage\r\n if (!sideBySide) {\r\n this.closeWidget();\r\n }\r\n const { uri, range } = ref;\r\n this._editorService.openCodeEditor({\r\n resource: uri,\r\n options: { selection: range, pinned }\r\n }, this._editor, sideBySide);\r\n }\r\n};\r\nReferencesController.ID = 'editor.contrib.referencesController';\r\nReferencesController = __decorate([\r\n __param(2, IContextKeyService),\r\n __param(3, ICodeEditorService),\r\n __param(4, INotificationService),\r\n __param(5, IInstantiationService),\r\n __param(6, IStorageService),\r\n __param(7, IConfigurationService)\r\n], ReferencesController);\r\nexport { ReferencesController };\r\nfunction withController(accessor, fn) {\r\n const outerEditor = getOuterEditor(accessor);\r\n if (!outerEditor) {\r\n return;\r\n }\r\n let controller = ReferencesController.get(outerEditor);\r\n if (controller) {\r\n fn(controller);\r\n }\r\n}\r\nKeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'togglePeekWidgetFocus',\r\n weight: 100 /* EditorContrib */,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 60 /* F2 */),\r\n when: ContextKeyExpr.or(ctxReferenceSearchVisible, PeekContext.inPeekEditor),\r\n handler(accessor) {\r\n withController(accessor, controller => {\r\n controller.changeFocusBetweenPreviewAndReferences();\r\n });\r\n }\r\n});\r\nKeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'goToNextReference',\r\n weight: 100 /* EditorContrib */ - 10,\r\n primary: 62 /* F4 */,\r\n secondary: [70 /* F12 */],\r\n when: ContextKeyExpr.or(ctxReferenceSearchVisible, PeekContext.inPeekEditor),\r\n handler(accessor) {\r\n withController(accessor, controller => {\r\n controller.goToNextOrPreviousReference(true);\r\n });\r\n }\r\n});\r\nKeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'goToPreviousReference',\r\n weight: 100 /* EditorContrib */ - 10,\r\n primary: 1024 /* Shift */ | 62 /* F4 */,\r\n secondary: [1024 /* Shift */ | 70 /* F12 */],\r\n when: ContextKeyExpr.or(ctxReferenceSearchVisible, PeekContext.inPeekEditor),\r\n handler(accessor) {\r\n withController(accessor, controller => {\r\n controller.goToNextOrPreviousReference(false);\r\n });\r\n }\r\n});\r\n// commands that aren't needed anymore because there is now ContextKeyExpr.OR\r\nCommandsRegistry.registerCommandAlias('goToNextReferenceFromEmbeddedEditor', 'goToNextReference');\r\nCommandsRegistry.registerCommandAlias('goToPreviousReferenceFromEmbeddedEditor', 'goToPreviousReference');\r\n// close\r\nCommandsRegistry.registerCommandAlias('closeReferenceSearchEditor', 'closeReferenceSearch');\r\nCommandsRegistry.registerCommand('closeReferenceSearch', accessor => withController(accessor, controller => controller.closeWidget()));\r\nKeybindingsRegistry.registerKeybindingRule({\r\n id: 'closeReferenceSearch',\r\n weight: 100 /* EditorContrib */ - 101,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */],\r\n when: ContextKeyExpr.and(PeekContext.inPeekEditor, ContextKeyExpr.not('config.editor.stablePeek'))\r\n});\r\nKeybindingsRegistry.registerKeybindingRule({\r\n id: 'closeReferenceSearch',\r\n weight: 200 /* WorkbenchContrib */ + 50,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */],\r\n when: ContextKeyExpr.and(ctxReferenceSearchVisible, ContextKeyExpr.not('config.editor.stablePeek'))\r\n});\r\nKeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'revealReference',\r\n weight: 200 /* WorkbenchContrib */,\r\n primary: 3 /* Enter */,\r\n mac: {\r\n primary: 3 /* Enter */,\r\n secondary: [2048 /* CtrlCmd */ | 18 /* DownArrow */]\r\n },\r\n when: ContextKeyExpr.and(ctxReferenceSearchVisible, WorkbenchListFocusContextKey),\r\n handler(accessor) {\r\n var _a;\r\n const listService = accessor.get(IListService);\r\n const focus = (_a = listService.lastFocusedList) === null || _a === void 0 ? void 0 : _a.getFocus();\r\n if (Array.isArray(focus) && focus[0] instanceof OneReference) {\r\n withController(accessor, controller => controller.revealReference(focus[0]));\r\n }\r\n }\r\n});\r\nKeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'openReferenceToSide',\r\n weight: 100 /* EditorContrib */,\r\n primary: 2048 /* CtrlCmd */ | 3 /* Enter */,\r\n mac: {\r\n primary: 256 /* WinCtrl */ | 3 /* Enter */\r\n },\r\n when: ContextKeyExpr.and(ctxReferenceSearchVisible, WorkbenchListFocusContextKey),\r\n handler(accessor) {\r\n var _a;\r\n const listService = accessor.get(IListService);\r\n const focus = (_a = listService.lastFocusedList) === null || _a === void 0 ? void 0 : _a.getFocus();\r\n if (Array.isArray(focus) && focus[0] instanceof OneReference) {\r\n withController(accessor, controller => controller.openReference(focus[0], true, true));\r\n }\r\n }\r\n});\r\nCommandsRegistry.registerCommand('openReference', (accessor) => {\r\n var _a;\r\n const listService = accessor.get(IListService);\r\n const focus = (_a = listService.lastFocusedList) === null || _a === void 0 ? void 0 : _a.getFocus();\r\n if (Array.isArray(focus) && focus[0] instanceof OneReference) {\r\n withController(accessor, controller => controller.openReference(focus[0], false, true));\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { RawContextKey, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { registerSingleton } from '../../../platform/instantiation/common/extensions.js';\r\nimport { KeybindingsRegistry } from '../../../platform/keybinding/common/keybindingsRegistry.js';\r\nimport { registerEditorCommand, EditorCommand } from '../../browser/editorExtensions.js';\r\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { dispose, combinedDisposable, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { localize } from '../../../nls.js';\r\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding.js';\r\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\r\nimport { isEqual } from '../../../base/common/resources.js';\r\nexport const ctxHasSymbols = new RawContextKey('hasSymbols', false);\r\nexport const ISymbolNavigationService = createDecorator('ISymbolNavigationService');\r\nlet SymbolNavigationService = class SymbolNavigationService {\r\n constructor(contextKeyService, _editorService, _notificationService, _keybindingService) {\r\n this._editorService = _editorService;\r\n this._notificationService = _notificationService;\r\n this._keybindingService = _keybindingService;\r\n this._currentModel = undefined;\r\n this._currentIdx = -1;\r\n this._ignoreEditorChange = false;\r\n this._ctxHasSymbols = ctxHasSymbols.bindTo(contextKeyService);\r\n }\r\n reset() {\r\n var _a, _b;\r\n this._ctxHasSymbols.reset();\r\n (_a = this._currentState) === null || _a === void 0 ? void 0 : _a.dispose();\r\n (_b = this._currentMessage) === null || _b === void 0 ? void 0 : _b.dispose();\r\n this._currentModel = undefined;\r\n this._currentIdx = -1;\r\n }\r\n put(anchor) {\r\n const refModel = anchor.parent.parent;\r\n if (refModel.references.length <= 1) {\r\n this.reset();\r\n return;\r\n }\r\n this._currentModel = refModel;\r\n this._currentIdx = refModel.references.indexOf(anchor);\r\n this._ctxHasSymbols.set(true);\r\n this._showMessage();\r\n const editorState = new EditorState(this._editorService);\r\n const listener = editorState.onDidChange(_ => {\r\n if (this._ignoreEditorChange) {\r\n return;\r\n }\r\n const editor = this._editorService.getActiveCodeEditor();\r\n if (!editor) {\r\n return;\r\n }\r\n const model = editor.getModel();\r\n const position = editor.getPosition();\r\n if (!model || !position) {\r\n return;\r\n }\r\n let seenUri = false;\r\n let seenPosition = false;\r\n for (const reference of refModel.references) {\r\n if (isEqual(reference.uri, model.uri)) {\r\n seenUri = true;\r\n seenPosition = seenPosition || Range.containsPosition(reference.range, position);\r\n }\r\n else if (seenUri) {\r\n break;\r\n }\r\n }\r\n if (!seenUri || !seenPosition) {\r\n this.reset();\r\n }\r\n });\r\n this._currentState = combinedDisposable(editorState, listener);\r\n }\r\n revealNext(source) {\r\n if (!this._currentModel) {\r\n return Promise.resolve();\r\n }\r\n // get next result and advance\r\n this._currentIdx += 1;\r\n this._currentIdx %= this._currentModel.references.length;\r\n const reference = this._currentModel.references[this._currentIdx];\r\n // status\r\n this._showMessage();\r\n // open editor, ignore events while that happens\r\n this._ignoreEditorChange = true;\r\n return this._editorService.openCodeEditor({\r\n resource: reference.uri,\r\n options: {\r\n selection: Range.collapseToStart(reference.range),\r\n selectionRevealType: 3 /* NearTopIfOutsideViewport */\r\n }\r\n }, source).finally(() => {\r\n this._ignoreEditorChange = false;\r\n });\r\n }\r\n _showMessage() {\r\n var _a;\r\n (_a = this._currentMessage) === null || _a === void 0 ? void 0 : _a.dispose();\r\n const kb = this._keybindingService.lookupKeybinding('editor.gotoNextSymbolFromResult');\r\n const message = kb\r\n ? localize('location.kb', \"Symbol {0} of {1}, {2} for next\", this._currentIdx + 1, this._currentModel.references.length, kb.getLabel())\r\n : localize('location', \"Symbol {0} of {1}\", this._currentIdx + 1, this._currentModel.references.length);\r\n this._currentMessage = this._notificationService.status(message);\r\n }\r\n};\r\nSymbolNavigationService = __decorate([\r\n __param(0, IContextKeyService),\r\n __param(1, ICodeEditorService),\r\n __param(2, INotificationService),\r\n __param(3, IKeybindingService)\r\n], SymbolNavigationService);\r\nregisterSingleton(ISymbolNavigationService, SymbolNavigationService, true);\r\nregisterEditorCommand(new class extends EditorCommand {\r\n constructor() {\r\n super({\r\n id: 'editor.gotoNextSymbolFromResult',\r\n precondition: ctxHasSymbols,\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */,\r\n primary: 70 /* F12 */\r\n }\r\n });\r\n }\r\n runEditorCommand(accessor, editor) {\r\n return accessor.get(ISymbolNavigationService).revealNext(editor);\r\n }\r\n});\r\nKeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'editor.gotoNextSymbolFromResult.cancel',\r\n weight: 100 /* EditorContrib */,\r\n when: ctxHasSymbols,\r\n primary: 9 /* Escape */,\r\n handler(accessor) {\r\n accessor.get(ISymbolNavigationService).reset();\r\n }\r\n});\r\n//\r\nlet EditorState = class EditorState {\r\n constructor(editorService) {\r\n this._listener = new Map();\r\n this._disposables = new DisposableStore();\r\n this._onDidChange = new Emitter();\r\n this.onDidChange = this._onDidChange.event;\r\n this._disposables.add(editorService.onCodeEditorRemove(this._onDidRemoveEditor, this));\r\n this._disposables.add(editorService.onCodeEditorAdd(this._onDidAddEditor, this));\r\n editorService.listCodeEditors().forEach(this._onDidAddEditor, this);\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this._onDidChange.dispose();\r\n dispose(this._listener.values());\r\n }\r\n _onDidAddEditor(editor) {\r\n this._listener.set(editor, combinedDisposable(editor.onDidChangeCursorPosition(_ => this._onDidChange.fire({ editor })), editor.onDidChangeModelContent(_ => this._onDidChange.fire({ editor }))));\r\n }\r\n _onDidRemoveEditor(editor) {\r\n var _a;\r\n (_a = this._listener.get(editor)) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._listener.delete(editor);\r\n }\r\n};\r\nEditorState = __decorate([\r\n __param(0, ICodeEditorService)\r\n], EditorState);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nvar _a, _b, _c, _d, _e, _f, _g, _h;\r\nimport { alert } from '../../../base/browser/ui/aria/aria.js';\r\nimport { createCancelablePromise, raceCancellation } from '../../../base/common/async.js';\r\nimport { KeyChord } from '../../../base/common/keyCodes.js';\r\nimport { isWeb } from '../../../base/common/platform.js';\r\nimport { isCodeEditor } from '../../browser/editorBrowser.js';\r\nimport { EditorAction, registerEditorAction } from '../../browser/editorExtensions.js';\r\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\r\nimport * as corePosition from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { isLocationLink } from '../../common/modes.js';\r\nimport { MessageController } from '../message/messageController.js';\r\nimport { PeekContext } from '../peekView/peekView.js';\r\nimport { ReferencesController } from './peek/referencesController.js';\r\nimport { ReferencesModel } from './referencesModel.js';\r\nimport * as nls from '../../../nls.js';\r\nimport { MenuId, MenuRegistry } from '../../../platform/actions/common/actions.js';\r\nimport { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\r\nimport { IEditorProgressService } from '../../../platform/progress/common/progress.js';\r\nimport { getDefinitionsAtPosition, getImplementationsAtPosition, getTypeDefinitionsAtPosition, getDeclarationsAtPosition, getReferencesAtPosition } from './goToSymbol.js';\r\nimport { CommandsRegistry, ICommandService } from '../../../platform/commands/common/commands.js';\r\nimport { EditorStateCancellationTokenSource } from '../../browser/core/editorState.js';\r\nimport { ISymbolNavigationService } from './symbolNavigation.js';\r\nimport { isStandalone } from '../../../base/browser/browser.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { assertType } from '../../../base/common/types.js';\r\nimport { EmbeddedCodeEditorWidget } from '../../browser/widget/embeddedCodeEditorWidget.js';\r\nMenuRegistry.appendMenuItem(MenuId.EditorContext, {\r\n submenu: MenuId.EditorContextPeek,\r\n title: nls.localize('peek.submenu', \"Peek\"),\r\n group: 'navigation',\r\n order: 100\r\n});\r\nclass SymbolNavigationAction extends EditorAction {\r\n constructor(configuration, opts) {\r\n super(opts);\r\n this._configuration = configuration;\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return Promise.resolve(undefined);\r\n }\r\n const notificationService = accessor.get(INotificationService);\r\n const editorService = accessor.get(ICodeEditorService);\r\n const progressService = accessor.get(IEditorProgressService);\r\n const symbolNavService = accessor.get(ISymbolNavigationService);\r\n const model = editor.getModel();\r\n const pos = editor.getPosition();\r\n const cts = new EditorStateCancellationTokenSource(editor, 1 /* Value */ | 4 /* Position */);\r\n const promise = raceCancellation(this._getLocationModel(model, pos, cts.token), cts.token).then((references) => __awaiter(this, void 0, void 0, function* () {\r\n if (!references || cts.token.isCancellationRequested) {\r\n return;\r\n }\r\n alert(references.ariaMessage);\r\n let altAction;\r\n if (references.referenceAt(model.uri, pos)) {\r\n const altActionId = this._getAlternativeCommand(editor);\r\n if (altActionId !== this.id) {\r\n altAction = editor.getAction(altActionId);\r\n }\r\n }\r\n const referenceCount = references.references.length;\r\n if (referenceCount === 0) {\r\n // no result -> show message\r\n if (!this._configuration.muteMessage) {\r\n const info = model.getWordAtPosition(pos);\r\n MessageController.get(editor).showMessage(this._getNoResultFoundMessage(info), pos);\r\n }\r\n }\r\n else if (referenceCount === 1 && altAction) {\r\n // already at the only result, run alternative\r\n altAction.run();\r\n }\r\n else {\r\n // normal results handling\r\n return this._onResult(editorService, symbolNavService, editor, references);\r\n }\r\n }), (err) => {\r\n // report an error\r\n notificationService.error(err);\r\n }).finally(() => {\r\n cts.dispose();\r\n });\r\n progressService.showWhile(promise, 250);\r\n return promise;\r\n }\r\n _onResult(editorService, symbolNavService, editor, model) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const gotoLocation = this._getGoToPreference(editor);\r\n if (!(editor instanceof EmbeddedCodeEditorWidget) && (this._configuration.openInPeek || (gotoLocation === 'peek' && model.references.length > 1))) {\r\n this._openInPeek(editor, model);\r\n }\r\n else {\r\n const next = model.firstReference();\r\n const peek = model.references.length > 1 && gotoLocation === 'gotoAndPeek';\r\n const targetEditor = yield this._openReference(editor, editorService, next, this._configuration.openToSide, !peek);\r\n if (peek && targetEditor) {\r\n this._openInPeek(targetEditor, model);\r\n }\r\n else {\r\n model.dispose();\r\n }\r\n // keep remaining locations around when using\r\n // 'goto'-mode\r\n if (gotoLocation === 'goto') {\r\n symbolNavService.put(next);\r\n }\r\n }\r\n });\r\n }\r\n _openReference(editor, editorService, reference, sideBySide, highlight) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // range is the target-selection-range when we have one\r\n // and the fallback is the 'full' range\r\n let range = undefined;\r\n if (isLocationLink(reference)) {\r\n range = reference.targetSelectionRange;\r\n }\r\n if (!range) {\r\n range = reference.range;\r\n }\r\n if (!range) {\r\n return undefined;\r\n }\r\n const targetEditor = yield editorService.openCodeEditor({\r\n resource: reference.uri,\r\n options: {\r\n selection: Range.collapseToStart(range),\r\n selectionRevealType: 3 /* NearTopIfOutsideViewport */\r\n }\r\n }, editor, sideBySide);\r\n if (!targetEditor) {\r\n return undefined;\r\n }\r\n if (highlight) {\r\n const modelNow = targetEditor.getModel();\r\n const ids = targetEditor.deltaDecorations([], [{ range, options: { className: 'symbolHighlight' } }]);\r\n setTimeout(() => {\r\n if (targetEditor.getModel() === modelNow) {\r\n targetEditor.deltaDecorations(ids, []);\r\n }\r\n }, 350);\r\n }\r\n return targetEditor;\r\n });\r\n }\r\n _openInPeek(target, model) {\r\n let controller = ReferencesController.get(target);\r\n if (controller && target.hasModel()) {\r\n controller.toggleWidget(target.getSelection(), createCancelablePromise(_ => Promise.resolve(model)), this._configuration.openInPeek);\r\n }\r\n else {\r\n model.dispose();\r\n }\r\n }\r\n}\r\n//#region --- DEFINITION\r\nexport class DefinitionAction extends SymbolNavigationAction {\r\n _getLocationModel(model, position, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new ReferencesModel(yield getDefinitionsAtPosition(model, position, token), nls.localize('def.title', 'Definitions'));\r\n });\r\n }\r\n _getNoResultFoundMessage(info) {\r\n return info && info.word\r\n ? nls.localize('noResultWord', \"No definition found for '{0}'\", info.word)\r\n : nls.localize('generic.noResults', \"No definition found\");\r\n }\r\n _getAlternativeCommand(editor) {\r\n return editor.getOption(45 /* gotoLocation */).alternativeDefinitionCommand;\r\n }\r\n _getGoToPreference(editor) {\r\n return editor.getOption(45 /* gotoLocation */).multipleDefinitions;\r\n }\r\n}\r\nconst goToDefinitionKb = isWeb && !isStandalone\r\n ? 2048 /* CtrlCmd */ | 70 /* F12 */\r\n : 70 /* F12 */;\r\nregisterEditorAction((_a = class GoToDefinitionAction extends DefinitionAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: false,\r\n muteMessage: false\r\n }, {\r\n id: GoToDefinitionAction.id,\r\n label: nls.localize('actions.goToDecl.label', \"Go to Definition\"),\r\n alias: 'Go to Definition',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.hasDefinitionProvider, EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: goToDefinitionKb,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: 'navigation',\r\n order: 1.1\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarGoMenu,\r\n group: '4_symbol_nav',\r\n order: 2,\r\n title: nls.localize({ key: 'miGotoDefinition', comment: ['&& denotes a mnemonic'] }, \"Go to &&Definition\")\r\n }\r\n });\r\n CommandsRegistry.registerCommandAlias('editor.action.goToDeclaration', GoToDefinitionAction.id);\r\n }\r\n },\r\n _a.id = 'editor.action.revealDefinition',\r\n _a));\r\nregisterEditorAction((_b = class OpenDefinitionToSideAction extends DefinitionAction {\r\n constructor() {\r\n super({\r\n openToSide: true,\r\n openInPeek: false,\r\n muteMessage: false\r\n }, {\r\n id: OpenDefinitionToSideAction.id,\r\n label: nls.localize('actions.goToDeclToSide.label', \"Open Definition to the Side\"),\r\n alias: 'Open Definition to the Side',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.hasDefinitionProvider, EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, goToDefinitionKb),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n CommandsRegistry.registerCommandAlias('editor.action.openDeclarationToTheSide', OpenDefinitionToSideAction.id);\r\n }\r\n },\r\n _b.id = 'editor.action.revealDefinitionAside',\r\n _b));\r\nregisterEditorAction((_c = class PeekDefinitionAction extends DefinitionAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: true,\r\n muteMessage: false\r\n }, {\r\n id: PeekDefinitionAction.id,\r\n label: nls.localize('actions.previewDecl.label', \"Peek Definition\"),\r\n alias: 'Peek Definition',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.hasDefinitionProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 512 /* Alt */ | 70 /* F12 */,\r\n linux: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 68 /* F10 */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n menuId: MenuId.EditorContextPeek,\r\n group: 'peek',\r\n order: 2\r\n }\r\n });\r\n CommandsRegistry.registerCommandAlias('editor.action.previewDeclaration', PeekDefinitionAction.id);\r\n }\r\n },\r\n _c.id = 'editor.action.peekDefinition',\r\n _c));\r\n//#endregion\r\n//#region --- DECLARATION\r\nclass DeclarationAction extends SymbolNavigationAction {\r\n _getLocationModel(model, position, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new ReferencesModel(yield getDeclarationsAtPosition(model, position, token), nls.localize('decl.title', 'Declarations'));\r\n });\r\n }\r\n _getNoResultFoundMessage(info) {\r\n return info && info.word\r\n ? nls.localize('decl.noResultWord', \"No declaration found for '{0}'\", info.word)\r\n : nls.localize('decl.generic.noResults', \"No declaration found\");\r\n }\r\n _getAlternativeCommand(editor) {\r\n return editor.getOption(45 /* gotoLocation */).alternativeDeclarationCommand;\r\n }\r\n _getGoToPreference(editor) {\r\n return editor.getOption(45 /* gotoLocation */).multipleDeclarations;\r\n }\r\n}\r\nregisterEditorAction((_d = class GoToDeclarationAction extends DeclarationAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: false,\r\n muteMessage: false\r\n }, {\r\n id: GoToDeclarationAction.id,\r\n label: nls.localize('actions.goToDeclaration.label', \"Go to Declaration\"),\r\n alias: 'Go to Declaration',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.hasDeclarationProvider, EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n contextMenuOpts: {\r\n group: 'navigation',\r\n order: 1.3\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarGoMenu,\r\n group: '4_symbol_nav',\r\n order: 3,\r\n title: nls.localize({ key: 'miGotoDeclaration', comment: ['&& denotes a mnemonic'] }, \"Go to &&Declaration\")\r\n },\r\n });\r\n }\r\n _getNoResultFoundMessage(info) {\r\n return info && info.word\r\n ? nls.localize('decl.noResultWord', \"No declaration found for '{0}'\", info.word)\r\n : nls.localize('decl.generic.noResults', \"No declaration found\");\r\n }\r\n },\r\n _d.id = 'editor.action.revealDeclaration',\r\n _d));\r\nregisterEditorAction(class PeekDeclarationAction extends DeclarationAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: true,\r\n muteMessage: false\r\n }, {\r\n id: 'editor.action.peekDeclaration',\r\n label: nls.localize('actions.peekDecl.label', \"Peek Declaration\"),\r\n alias: 'Peek Declaration',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.hasDeclarationProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n contextMenuOpts: {\r\n menuId: MenuId.EditorContextPeek,\r\n group: 'peek',\r\n order: 3\r\n }\r\n });\r\n }\r\n});\r\n//#endregion\r\n//#region --- TYPE DEFINITION\r\nclass TypeDefinitionAction extends SymbolNavigationAction {\r\n _getLocationModel(model, position, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new ReferencesModel(yield getTypeDefinitionsAtPosition(model, position, token), nls.localize('typedef.title', 'Type Definitions'));\r\n });\r\n }\r\n _getNoResultFoundMessage(info) {\r\n return info && info.word\r\n ? nls.localize('goToTypeDefinition.noResultWord', \"No type definition found for '{0}'\", info.word)\r\n : nls.localize('goToTypeDefinition.generic.noResults', \"No type definition found\");\r\n }\r\n _getAlternativeCommand(editor) {\r\n return editor.getOption(45 /* gotoLocation */).alternativeTypeDefinitionCommand;\r\n }\r\n _getGoToPreference(editor) {\r\n return editor.getOption(45 /* gotoLocation */).multipleTypeDefinitions;\r\n }\r\n}\r\nregisterEditorAction((_e = class GoToTypeDefinitionAction extends TypeDefinitionAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: false,\r\n muteMessage: false\r\n }, {\r\n id: GoToTypeDefinitionAction.ID,\r\n label: nls.localize('actions.goToTypeDefinition.label', \"Go to Type Definition\"),\r\n alias: 'Go to Type Definition',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.hasTypeDefinitionProvider, EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 0,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: 'navigation',\r\n order: 1.4\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarGoMenu,\r\n group: '4_symbol_nav',\r\n order: 3,\r\n title: nls.localize({ key: 'miGotoTypeDefinition', comment: ['&& denotes a mnemonic'] }, \"Go to &&Type Definition\")\r\n }\r\n });\r\n }\r\n },\r\n _e.ID = 'editor.action.goToTypeDefinition',\r\n _e));\r\nregisterEditorAction((_f = class PeekTypeDefinitionAction extends TypeDefinitionAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: true,\r\n muteMessage: false\r\n }, {\r\n id: PeekTypeDefinitionAction.ID,\r\n label: nls.localize('actions.peekTypeDefinition.label', \"Peek Type Definition\"),\r\n alias: 'Peek Type Definition',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.hasTypeDefinitionProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n contextMenuOpts: {\r\n menuId: MenuId.EditorContextPeek,\r\n group: 'peek',\r\n order: 4\r\n }\r\n });\r\n }\r\n },\r\n _f.ID = 'editor.action.peekTypeDefinition',\r\n _f));\r\n//#endregion\r\n//#region --- IMPLEMENTATION\r\nclass ImplementationAction extends SymbolNavigationAction {\r\n _getLocationModel(model, position, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new ReferencesModel(yield getImplementationsAtPosition(model, position, token), nls.localize('impl.title', 'Implementations'));\r\n });\r\n }\r\n _getNoResultFoundMessage(info) {\r\n return info && info.word\r\n ? nls.localize('goToImplementation.noResultWord', \"No implementation found for '{0}'\", info.word)\r\n : nls.localize('goToImplementation.generic.noResults', \"No implementation found\");\r\n }\r\n _getAlternativeCommand(editor) {\r\n return editor.getOption(45 /* gotoLocation */).alternativeImplementationCommand;\r\n }\r\n _getGoToPreference(editor) {\r\n return editor.getOption(45 /* gotoLocation */).multipleImplementations;\r\n }\r\n}\r\nregisterEditorAction((_g = class GoToImplementationAction extends ImplementationAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: false,\r\n muteMessage: false\r\n }, {\r\n id: GoToImplementationAction.ID,\r\n label: nls.localize('actions.goToImplementation.label', \"Go to Implementations\"),\r\n alias: 'Go to Implementations',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.hasImplementationProvider, EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 70 /* F12 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarGoMenu,\r\n group: '4_symbol_nav',\r\n order: 4,\r\n title: nls.localize({ key: 'miGotoImplementation', comment: ['&& denotes a mnemonic'] }, \"Go to &&Implementations\")\r\n },\r\n contextMenuOpts: {\r\n group: 'navigation',\r\n order: 1.45\r\n }\r\n });\r\n }\r\n },\r\n _g.ID = 'editor.action.goToImplementation',\r\n _g));\r\nregisterEditorAction((_h = class PeekImplementationAction extends ImplementationAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: true,\r\n muteMessage: false\r\n }, {\r\n id: PeekImplementationAction.ID,\r\n label: nls.localize('actions.peekImplementation.label', \"Peek Implementations\"),\r\n alias: 'Peek Implementations',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.hasImplementationProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 70 /* F12 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n menuId: MenuId.EditorContextPeek,\r\n group: 'peek',\r\n order: 5\r\n }\r\n });\r\n }\r\n },\r\n _h.ID = 'editor.action.peekImplementation',\r\n _h));\r\n//#endregion\r\n//#region --- REFERENCES\r\nclass ReferencesAction extends SymbolNavigationAction {\r\n _getNoResultFoundMessage(info) {\r\n return info\r\n ? nls.localize('references.no', \"No references found for '{0}'\", info.word)\r\n : nls.localize('references.noGeneric', \"No references found\");\r\n }\r\n _getAlternativeCommand(editor) {\r\n return editor.getOption(45 /* gotoLocation */).alternativeReferenceCommand;\r\n }\r\n _getGoToPreference(editor) {\r\n return editor.getOption(45 /* gotoLocation */).multipleReferences;\r\n }\r\n}\r\nregisterEditorAction(class GoToReferencesAction extends ReferencesAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: false,\r\n muteMessage: false\r\n }, {\r\n id: 'editor.action.goToReferences',\r\n label: nls.localize('goToReferences.label', \"Go to References\"),\r\n alias: 'Go to References',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.hasReferenceProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 70 /* F12 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: 'navigation',\r\n order: 1.45\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarGoMenu,\r\n group: '4_symbol_nav',\r\n order: 5,\r\n title: nls.localize({ key: 'miGotoReference', comment: ['&& denotes a mnemonic'] }, \"Go to &&References\")\r\n },\r\n });\r\n }\r\n _getLocationModel(model, position, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new ReferencesModel(yield getReferencesAtPosition(model, position, true, token), nls.localize('ref.title', 'References'));\r\n });\r\n }\r\n});\r\nregisterEditorAction(class PeekReferencesAction extends ReferencesAction {\r\n constructor() {\r\n super({\r\n openToSide: false,\r\n openInPeek: true,\r\n muteMessage: false\r\n }, {\r\n id: 'editor.action.referenceSearch.trigger',\r\n label: nls.localize('references.action.label', \"Peek References\"),\r\n alias: 'Peek References',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.hasReferenceProvider, PeekContext.notInPeekEditor, EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n contextMenuOpts: {\r\n menuId: MenuId.EditorContextPeek,\r\n group: 'peek',\r\n order: 6\r\n }\r\n });\r\n }\r\n _getLocationModel(model, position, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new ReferencesModel(yield getReferencesAtPosition(model, position, false, token), nls.localize('ref.title', 'References'));\r\n });\r\n }\r\n});\r\n//#endregion\r\n//#region --- GENERIC goto symbols command\r\nclass GenericGoToLocationAction extends SymbolNavigationAction {\r\n constructor(config, _references, _gotoMultipleBehaviour) {\r\n super(config, {\r\n id: 'editor.action.goToLocation',\r\n label: nls.localize('label.generic', \"Go To Any Symbol\"),\r\n alias: 'Go To Any Symbol',\r\n precondition: ContextKeyExpr.and(PeekContext.notInPeekEditor, EditorContextKeys.isInWalkThroughSnippet.toNegated()),\r\n });\r\n this._references = _references;\r\n this._gotoMultipleBehaviour = _gotoMultipleBehaviour;\r\n }\r\n _getLocationModel(_model, _position, _token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return new ReferencesModel(this._references, nls.localize('generic.title', 'Locations'));\r\n });\r\n }\r\n _getNoResultFoundMessage(info) {\r\n return info && nls.localize('generic.noResult', \"No results for '{0}'\", info.word) || '';\r\n }\r\n _getGoToPreference(editor) {\r\n var _a;\r\n return (_a = this._gotoMultipleBehaviour) !== null && _a !== void 0 ? _a : editor.getOption(45 /* gotoLocation */).multipleReferences;\r\n }\r\n _getAlternativeCommand() { return ''; }\r\n}\r\nCommandsRegistry.registerCommand({\r\n id: 'editor.action.goToLocations',\r\n description: {\r\n description: 'Go to locations from a position in a file',\r\n args: [\r\n { name: 'uri', description: 'The text document in which to start', constraint: URI },\r\n { name: 'position', description: 'The position at which to start', constraint: corePosition.Position.isIPosition },\r\n { name: 'locations', description: 'An array of locations.', constraint: Array },\r\n { name: 'multiple', description: 'Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto' },\r\n { name: 'noResultsMessage', description: 'Human readable message that shows when locations is empty.' },\r\n ]\r\n },\r\n handler: (accessor, resource, position, references, multiple, noResultsMessage, openInPeek) => __awaiter(void 0, void 0, void 0, function* () {\r\n assertType(URI.isUri(resource));\r\n assertType(corePosition.Position.isIPosition(position));\r\n assertType(Array.isArray(references));\r\n assertType(typeof multiple === 'undefined' || typeof multiple === 'string');\r\n assertType(typeof openInPeek === 'undefined' || typeof openInPeek === 'boolean');\r\n const editorService = accessor.get(ICodeEditorService);\r\n const editor = yield editorService.openCodeEditor({ resource }, editorService.getFocusedCodeEditor());\r\n if (isCodeEditor(editor)) {\r\n editor.setPosition(position);\r\n editor.revealPositionInCenterIfOutsideViewport(position, 0 /* Smooth */);\r\n return editor.invokeWithinContext(accessor => {\r\n const command = new class extends GenericGoToLocationAction {\r\n _getNoResultFoundMessage(info) {\r\n return noResultsMessage || super._getNoResultFoundMessage(info);\r\n }\r\n }({\r\n muteMessage: !Boolean(noResultsMessage),\r\n openInPeek: Boolean(openInPeek),\r\n openToSide: false\r\n }, references, multiple);\r\n accessor.get(IInstantiationService).invokeFunction(command.run.bind(command), editor);\r\n });\r\n }\r\n })\r\n});\r\nCommandsRegistry.registerCommand({\r\n id: 'editor.action.peekLocations',\r\n description: {\r\n description: 'Peek locations from a position in a file',\r\n args: [\r\n { name: 'uri', description: 'The text document in which to start', constraint: URI },\r\n { name: 'position', description: 'The position at which to start', constraint: corePosition.Position.isIPosition },\r\n { name: 'locations', description: 'An array of locations.', constraint: Array },\r\n { name: 'multiple', description: 'Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto' },\r\n ]\r\n },\r\n handler: (accessor, resource, position, references, multiple) => __awaiter(void 0, void 0, void 0, function* () {\r\n accessor.get(ICommandService).executeCommand('editor.action.goToLocations', resource, position, references, multiple, undefined, true);\r\n })\r\n});\r\n//#endregion\r\n//#region --- REFERENCE search special commands\r\nCommandsRegistry.registerCommand({\r\n id: 'editor.action.findReferences',\r\n handler: (accessor, resource, position) => {\r\n assertType(URI.isUri(resource));\r\n assertType(corePosition.Position.isIPosition(position));\r\n const codeEditorService = accessor.get(ICodeEditorService);\r\n return codeEditorService.openCodeEditor({ resource }, codeEditorService.getFocusedCodeEditor()).then(control => {\r\n if (!isCodeEditor(control) || !control.hasModel()) {\r\n return undefined;\r\n }\r\n const controller = ReferencesController.get(control);\r\n if (!controller) {\r\n return undefined;\r\n }\r\n const references = createCancelablePromise(token => getReferencesAtPosition(control.getModel(), corePosition.Position.lift(position), false, token).then(references => new ReferencesModel(references, nls.localize('ref.title', 'References'))));\r\n const range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);\r\n return Promise.resolve(controller.toggleWidget(range, references, false));\r\n });\r\n }\r\n});\r\n// use NEW command\r\nCommandsRegistry.registerCommandAlias('editor.action.showReferences', 'editor.action.peekLocations');\r\n//#endregion\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Disposable } from '../../../../base/common/lifecycle.js';\r\nimport { Emitter } from '../../../../base/common/event.js';\r\nimport * as platform from '../../../../base/common/platform.js';\r\nfunction hasModifier(e, modifier) {\r\n return !!e[modifier];\r\n}\r\n/**\r\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\r\n */\r\nexport class ClickLinkMouseEvent {\r\n constructor(source, opts) {\r\n this.target = source.target;\r\n this.hasTriggerModifier = hasModifier(source.event, opts.triggerModifier);\r\n this.hasSideBySideModifier = hasModifier(source.event, opts.triggerSideBySideModifier);\r\n this.isNoneOrSingleMouseDown = (source.event.detail <= 1);\r\n }\r\n}\r\n/**\r\n * An event that encapsulates the various trigger modifiers logic needed for go to definition.\r\n */\r\nexport class ClickLinkKeyboardEvent {\r\n constructor(source, opts) {\r\n this.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey);\r\n this.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey);\r\n this.hasTriggerModifier = hasModifier(source, opts.triggerModifier);\r\n }\r\n}\r\nexport class ClickLinkOptions {\r\n constructor(triggerKey, triggerModifier, triggerSideBySideKey, triggerSideBySideModifier) {\r\n this.triggerKey = triggerKey;\r\n this.triggerModifier = triggerModifier;\r\n this.triggerSideBySideKey = triggerSideBySideKey;\r\n this.triggerSideBySideModifier = triggerSideBySideModifier;\r\n }\r\n equals(other) {\r\n return (this.triggerKey === other.triggerKey\r\n && this.triggerModifier === other.triggerModifier\r\n && this.triggerSideBySideKey === other.triggerSideBySideKey\r\n && this.triggerSideBySideModifier === other.triggerSideBySideModifier);\r\n }\r\n}\r\nfunction createOptions(multiCursorModifier) {\r\n if (multiCursorModifier === 'altKey') {\r\n if (platform.isMacintosh) {\r\n return new ClickLinkOptions(57 /* Meta */, 'metaKey', 6 /* Alt */, 'altKey');\r\n }\r\n return new ClickLinkOptions(5 /* Ctrl */, 'ctrlKey', 6 /* Alt */, 'altKey');\r\n }\r\n if (platform.isMacintosh) {\r\n return new ClickLinkOptions(6 /* Alt */, 'altKey', 57 /* Meta */, 'metaKey');\r\n }\r\n return new ClickLinkOptions(6 /* Alt */, 'altKey', 5 /* Ctrl */, 'ctrlKey');\r\n}\r\nexport class ClickLinkGesture extends Disposable {\r\n constructor(editor) {\r\n super();\r\n this._onMouseMoveOrRelevantKeyDown = this._register(new Emitter());\r\n this.onMouseMoveOrRelevantKeyDown = this._onMouseMoveOrRelevantKeyDown.event;\r\n this._onExecute = this._register(new Emitter());\r\n this.onExecute = this._onExecute.event;\r\n this._onCancel = this._register(new Emitter());\r\n this.onCancel = this._onCancel.event;\r\n this._editor = editor;\r\n this._opts = createOptions(this._editor.getOption(64 /* multiCursorModifier */));\r\n this._lastMouseMoveEvent = null;\r\n this._hasTriggerKeyOnMouseDown = false;\r\n this._lineNumberOnMouseDown = 0;\r\n this._register(this._editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(64 /* multiCursorModifier */)) {\r\n const newOpts = createOptions(this._editor.getOption(64 /* multiCursorModifier */));\r\n if (this._opts.equals(newOpts)) {\r\n return;\r\n }\r\n this._opts = newOpts;\r\n this._lastMouseMoveEvent = null;\r\n this._hasTriggerKeyOnMouseDown = false;\r\n this._lineNumberOnMouseDown = 0;\r\n this._onCancel.fire();\r\n }\r\n }));\r\n this._register(this._editor.onMouseMove((e) => this._onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts))));\r\n this._register(this._editor.onMouseDown((e) => this._onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts))));\r\n this._register(this._editor.onMouseUp((e) => this._onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts))));\r\n this._register(this._editor.onKeyDown((e) => this._onEditorKeyDown(new ClickLinkKeyboardEvent(e, this._opts))));\r\n this._register(this._editor.onKeyUp((e) => this._onEditorKeyUp(new ClickLinkKeyboardEvent(e, this._opts))));\r\n this._register(this._editor.onMouseDrag(() => this._resetHandler()));\r\n this._register(this._editor.onDidChangeCursorSelection((e) => this._onDidChangeCursorSelection(e)));\r\n this._register(this._editor.onDidChangeModel((e) => this._resetHandler()));\r\n this._register(this._editor.onDidChangeModelContent(() => this._resetHandler()));\r\n this._register(this._editor.onDidScrollChange((e) => {\r\n if (e.scrollTopChanged || e.scrollLeftChanged) {\r\n this._resetHandler();\r\n }\r\n }));\r\n }\r\n _onDidChangeCursorSelection(e) {\r\n if (e.selection && e.selection.startColumn !== e.selection.endColumn) {\r\n this._resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/microsoft/vscode/issues/7827)\r\n }\r\n }\r\n _onEditorMouseMove(mouseEvent) {\r\n this._lastMouseMoveEvent = mouseEvent;\r\n this._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]);\r\n }\r\n _onEditorMouseDown(mouseEvent) {\r\n // We need to record if we had the trigger key on mouse down because someone might select something in the editor\r\n // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then\r\n // release the mouse button without wanting to do the navigation.\r\n // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed.\r\n this._hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier;\r\n this._lineNumberOnMouseDown = mouseEvent.target.position ? mouseEvent.target.position.lineNumber : 0;\r\n }\r\n _onEditorMouseUp(mouseEvent) {\r\n const currentLineNumber = mouseEvent.target.position ? mouseEvent.target.position.lineNumber : 0;\r\n if (this._hasTriggerKeyOnMouseDown && this._lineNumberOnMouseDown && this._lineNumberOnMouseDown === currentLineNumber) {\r\n this._onExecute.fire(mouseEvent);\r\n }\r\n }\r\n _onEditorKeyDown(e) {\r\n if (this._lastMouseMoveEvent\r\n && (e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition)\r\n || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side)\r\n )) {\r\n this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent, e]);\r\n }\r\n else if (e.hasTriggerModifier) {\r\n this._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration\r\n }\r\n }\r\n _onEditorKeyUp(e) {\r\n if (e.keyCodeIsTriggerKey) {\r\n this._onCancel.fire();\r\n }\r\n }\r\n _resetHandler() {\r\n this._lastMouseMoveEvent = null;\r\n this._hasTriggerKeyOnMouseDown = false;\r\n this._onCancel.fire();\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport './goToDefinitionAtPosition.css';\r\nimport * as nls from '../../../../nls.js';\r\nimport { createCancelablePromise } from '../../../../base/common/async.js';\r\nimport { onUnexpectedError } from '../../../../base/common/errors.js';\r\nimport { MarkdownString } from '../../../../base/common/htmlContent.js';\r\nimport { IModeService } from '../../../common/services/modeService.js';\r\nimport { Range } from '../../../common/core/range.js';\r\nimport { DefinitionProviderRegistry } from '../../../common/modes.js';\r\nimport { registerEditorContribution } from '../../../browser/editorExtensions.js';\r\nimport { getDefinitionsAtPosition } from '../goToSymbol.js';\r\nimport { DisposableStore } from '../../../../base/common/lifecycle.js';\r\nimport { ITextModelService } from '../../../common/services/resolverService.js';\r\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\r\nimport { editorActiveLinkForeground } from '../../../../platform/theme/common/colorRegistry.js';\r\nimport { EditorState } from '../../../browser/core/editorState.js';\r\nimport { DefinitionAction } from '../goToCommands.js';\r\nimport { ClickLinkGesture } from './clickLinkGesture.js';\r\nimport { Position } from '../../../common/core/position.js';\r\nimport { withNullAsUndefined } from '../../../../base/common/types.js';\r\nimport { PeekContext } from '../../peekView/peekView.js';\r\nimport { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\r\nlet GotoDefinitionAtPositionEditorContribution = class GotoDefinitionAtPositionEditorContribution {\r\n constructor(editor, textModelResolverService, modeService) {\r\n this.textModelResolverService = textModelResolverService;\r\n this.modeService = modeService;\r\n this.toUnhook = new DisposableStore();\r\n this.toUnhookForKeyboard = new DisposableStore();\r\n this.linkDecorations = [];\r\n this.currentWordAtPosition = null;\r\n this.previousPromise = null;\r\n this.editor = editor;\r\n let linkGesture = new ClickLinkGesture(editor);\r\n this.toUnhook.add(linkGesture);\r\n this.toUnhook.add(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => {\r\n this.startFindDefinitionFromMouse(mouseEvent, withNullAsUndefined(keyboardEvent));\r\n }));\r\n this.toUnhook.add(linkGesture.onExecute((mouseEvent) => {\r\n if (this.isEnabled(mouseEvent)) {\r\n this.gotoDefinition(mouseEvent.target.position, mouseEvent.hasSideBySideModifier).then(() => {\r\n this.removeLinkDecorations();\r\n }, (error) => {\r\n this.removeLinkDecorations();\r\n onUnexpectedError(error);\r\n });\r\n }\r\n }));\r\n this.toUnhook.add(linkGesture.onCancel(() => {\r\n this.removeLinkDecorations();\r\n this.currentWordAtPosition = null;\r\n }));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(GotoDefinitionAtPositionEditorContribution.ID);\r\n }\r\n startFindDefinitionFromCursor(position) {\r\n // For issue: https://github.com/microsoft/vscode/issues/46257\r\n // equivalent to mouse move with meta/ctrl key\r\n // First find the definition and add decorations\r\n // to the editor to be shown with the content hover widget\r\n return this.startFindDefinition(position).then(() => {\r\n // Add listeners for editor cursor move and key down events\r\n // Dismiss the \"extended\" editor decorations when the user hides\r\n // the hover widget. There is no event for the widget itself so these\r\n // serve as a best effort. After removing the link decorations, the hover\r\n // widget is clean and will only show declarations per next request.\r\n this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(() => {\r\n this.currentWordAtPosition = null;\r\n this.removeLinkDecorations();\r\n this.toUnhookForKeyboard.clear();\r\n }));\r\n this.toUnhookForKeyboard.add(this.editor.onKeyDown((e) => {\r\n if (e) {\r\n this.currentWordAtPosition = null;\r\n this.removeLinkDecorations();\r\n this.toUnhookForKeyboard.clear();\r\n }\r\n }));\r\n });\r\n }\r\n startFindDefinitionFromMouse(mouseEvent, withKey) {\r\n // check if we are active and on a content widget\r\n if (mouseEvent.target.type === 9 /* CONTENT_WIDGET */ && this.linkDecorations.length > 0) {\r\n return;\r\n }\r\n if (!this.editor.hasModel() || !this.isEnabled(mouseEvent, withKey)) {\r\n this.currentWordAtPosition = null;\r\n this.removeLinkDecorations();\r\n return;\r\n }\r\n const position = mouseEvent.target.position;\r\n this.startFindDefinition(position);\r\n }\r\n startFindDefinition(position) {\r\n var _a;\r\n // Dispose listeners for updating decorations when using keyboard to show definition hover\r\n this.toUnhookForKeyboard.clear();\r\n // Find word at mouse position\r\n const word = position ? (_a = this.editor.getModel()) === null || _a === void 0 ? void 0 : _a.getWordAtPosition(position) : null;\r\n if (!word) {\r\n this.currentWordAtPosition = null;\r\n this.removeLinkDecorations();\r\n return Promise.resolve(0);\r\n }\r\n // Return early if word at position is still the same\r\n if (this.currentWordAtPosition && this.currentWordAtPosition.startColumn === word.startColumn && this.currentWordAtPosition.endColumn === word.endColumn && this.currentWordAtPosition.word === word.word) {\r\n return Promise.resolve(0);\r\n }\r\n this.currentWordAtPosition = word;\r\n // Find definition and decorate word if found\r\n let state = new EditorState(this.editor, 4 /* Position */ | 1 /* Value */ | 2 /* Selection */ | 8 /* Scroll */);\r\n if (this.previousPromise) {\r\n this.previousPromise.cancel();\r\n this.previousPromise = null;\r\n }\r\n this.previousPromise = createCancelablePromise(token => this.findDefinition(position, token));\r\n return this.previousPromise.then(results => {\r\n if (!results || !results.length || !state.validate(this.editor)) {\r\n this.removeLinkDecorations();\r\n return;\r\n }\r\n // Multiple results\r\n if (results.length > 1) {\r\n this.addDecoration(new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn), new MarkdownString().appendText(nls.localize('multipleResults', \"Click to show {0} definitions.\", results.length)));\r\n }\r\n // Single result\r\n else {\r\n let result = results[0];\r\n if (!result.uri) {\r\n return;\r\n }\r\n this.textModelResolverService.createModelReference(result.uri).then(ref => {\r\n if (!ref.object || !ref.object.textEditorModel) {\r\n ref.dispose();\r\n return;\r\n }\r\n const { object: { textEditorModel } } = ref;\r\n const { startLineNumber } = result.range;\r\n if (startLineNumber < 1 || startLineNumber > textEditorModel.getLineCount()) {\r\n // invalid range\r\n ref.dispose();\r\n return;\r\n }\r\n const previewValue = this.getPreviewValue(textEditorModel, startLineNumber, result);\r\n let wordRange;\r\n if (result.originSelectionRange) {\r\n wordRange = Range.lift(result.originSelectionRange);\r\n }\r\n else {\r\n wordRange = new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\r\n }\r\n const modeId = this.modeService.getModeIdByFilepathOrFirstLine(textEditorModel.uri);\r\n this.addDecoration(wordRange, new MarkdownString().appendCodeblock(modeId ? modeId : '', previewValue));\r\n ref.dispose();\r\n });\r\n }\r\n }).then(undefined, onUnexpectedError);\r\n }\r\n getPreviewValue(textEditorModel, startLineNumber, result) {\r\n let rangeToUse = result.targetSelectionRange ? result.range : this.getPreviewRangeBasedOnBrackets(textEditorModel, startLineNumber);\r\n const numberOfLinesInRange = rangeToUse.endLineNumber - rangeToUse.startLineNumber;\r\n if (numberOfLinesInRange >= GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES) {\r\n rangeToUse = this.getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber);\r\n }\r\n const previewValue = this.stripIndentationFromPreviewRange(textEditorModel, startLineNumber, rangeToUse);\r\n return previewValue;\r\n }\r\n stripIndentationFromPreviewRange(textEditorModel, startLineNumber, previewRange) {\r\n const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber);\r\n let minIndent = startIndent;\r\n for (let endLineNumber = startLineNumber + 1; endLineNumber < previewRange.endLineNumber; endLineNumber++) {\r\n const endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber);\r\n minIndent = Math.min(minIndent, endIndent);\r\n }\r\n const previewValue = textEditorModel.getValueInRange(previewRange).replace(new RegExp(`^\\\\s{${minIndent - 1}}`, 'gm'), '').trim();\r\n return previewValue;\r\n }\r\n getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber) {\r\n const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber);\r\n const maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES);\r\n let endLineNumber = startLineNumber + 1;\r\n for (; endLineNumber < maxLineNumber; endLineNumber++) {\r\n let endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber);\r\n if (startIndent === endIndent) {\r\n break;\r\n }\r\n }\r\n return new Range(startLineNumber, 1, endLineNumber + 1, 1);\r\n }\r\n getPreviewRangeBasedOnBrackets(textEditorModel, startLineNumber) {\r\n const maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES);\r\n const brackets = [];\r\n let ignoreFirstEmpty = true;\r\n let currentBracket = textEditorModel.findNextBracket(new Position(startLineNumber, 1));\r\n while (currentBracket !== null) {\r\n if (brackets.length === 0) {\r\n brackets.push(currentBracket);\r\n }\r\n else {\r\n const lastBracket = brackets[brackets.length - 1];\r\n if (lastBracket.open[0] === currentBracket.open[0] && lastBracket.isOpen && !currentBracket.isOpen) {\r\n brackets.pop();\r\n }\r\n else {\r\n brackets.push(currentBracket);\r\n }\r\n if (brackets.length === 0) {\r\n if (ignoreFirstEmpty) {\r\n ignoreFirstEmpty = false;\r\n }\r\n else {\r\n return new Range(startLineNumber, 1, currentBracket.range.endLineNumber + 1, 1);\r\n }\r\n }\r\n }\r\n const maxColumn = textEditorModel.getLineMaxColumn(startLineNumber);\r\n let nextLineNumber = currentBracket.range.endLineNumber;\r\n let nextColumn = currentBracket.range.endColumn;\r\n if (maxColumn === currentBracket.range.endColumn) {\r\n nextLineNumber++;\r\n nextColumn = 1;\r\n }\r\n if (nextLineNumber > maxLineNumber) {\r\n return new Range(startLineNumber, 1, maxLineNumber + 1, 1);\r\n }\r\n currentBracket = textEditorModel.findNextBracket(new Position(nextLineNumber, nextColumn));\r\n }\r\n return new Range(startLineNumber, 1, maxLineNumber + 1, 1);\r\n }\r\n addDecoration(range, hoverMessage) {\r\n const newDecorations = {\r\n range: range,\r\n options: {\r\n inlineClassName: 'goto-definition-link',\r\n hoverMessage\r\n }\r\n };\r\n this.linkDecorations = this.editor.deltaDecorations(this.linkDecorations, [newDecorations]);\r\n }\r\n removeLinkDecorations() {\r\n if (this.linkDecorations.length > 0) {\r\n this.linkDecorations = this.editor.deltaDecorations(this.linkDecorations, []);\r\n }\r\n }\r\n isEnabled(mouseEvent, withKey) {\r\n return this.editor.hasModel() &&\r\n mouseEvent.isNoneOrSingleMouseDown &&\r\n (mouseEvent.target.type === 6 /* CONTENT_TEXT */) &&\r\n (mouseEvent.hasTriggerModifier || (withKey ? withKey.keyCodeIsTriggerKey : false)) &&\r\n DefinitionProviderRegistry.has(this.editor.getModel());\r\n }\r\n findDefinition(position, token) {\r\n const model = this.editor.getModel();\r\n if (!model) {\r\n return Promise.resolve(null);\r\n }\r\n return getDefinitionsAtPosition(model, position, token);\r\n }\r\n gotoDefinition(position, openToSide) {\r\n this.editor.setPosition(position);\r\n return this.editor.invokeWithinContext((accessor) => {\r\n const canPeek = !openToSide && this.editor.getOption(72 /* definitionLinkOpensInPeek */) && !this.isInPeekEditor(accessor);\r\n const action = new DefinitionAction({ openToSide, openInPeek: canPeek, muteMessage: true }, { alias: '', label: '', id: '', precondition: undefined });\r\n return action.run(accessor, this.editor);\r\n });\r\n }\r\n isInPeekEditor(accessor) {\r\n const contextKeyService = accessor.get(IContextKeyService);\r\n return PeekContext.inPeekEditor.getValue(contextKeyService);\r\n }\r\n dispose() {\r\n this.toUnhook.dispose();\r\n }\r\n};\r\nGotoDefinitionAtPositionEditorContribution.ID = 'editor.contrib.gotodefinitionatposition';\r\nGotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES = 8;\r\nGotoDefinitionAtPositionEditorContribution = __decorate([\r\n __param(1, ITextModelService),\r\n __param(2, IModeService)\r\n], GotoDefinitionAtPositionEditorContribution);\r\nexport { GotoDefinitionAtPositionEditorContribution };\r\nregisterEditorContribution(GotoDefinitionAtPositionEditorContribution.ID, GotoDefinitionAtPositionEditorContribution);\r\nregisterThemingParticipant((theme, collector) => {\r\n const activeLinkForeground = theme.getColor(editorActiveLinkForeground);\r\n if (activeLinkForeground) {\r\n collector.addRule(`.monaco-editor .goto-definition-link { color: ${activeLinkForeground} !important; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport { KeyChord } from '../../../base/common/keyCodes.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { EditorAction, registerEditorAction, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { IModeService } from '../../common/services/modeService.js';\r\nimport { ModesContentHoverWidget } from './modesContentHover.js';\r\nimport { ModesGlyphHoverWidget } from './modesGlyphHover.js';\r\nimport { IOpenerService } from '../../../platform/opener/common/opener.js';\r\nimport { editorHoverBackground, editorHoverBorder, editorHoverHighlight, textCodeBlockBackground, textLinkForeground, editorHoverStatusBarBackground, editorHoverForeground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { IThemeService, registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport { GotoDefinitionAtPositionEditorContribution } from '../gotoSymbol/link/goToDefinitionAtPosition.js';\r\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nlet ModesHoverController = class ModesHoverController {\r\n constructor(_editor, _instantiationService, _openerService, _modeService, _themeService, _contextKeyService) {\r\n this._editor = _editor;\r\n this._instantiationService = _instantiationService;\r\n this._openerService = _openerService;\r\n this._modeService = _modeService;\r\n this._themeService = _themeService;\r\n this._toUnhook = new DisposableStore();\r\n this._isMouseDown = false;\r\n this._hoverClicked = false;\r\n this._contentWidget = null;\r\n this._glyphWidget = null;\r\n this._hookEvents();\r\n this._didChangeConfigurationHandler = this._editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(48 /* hover */)) {\r\n this._unhookEvents();\r\n this._hookEvents();\r\n }\r\n });\r\n this._hoverVisibleKey = EditorContextKeys.hoverVisible.bindTo(_contextKeyService);\r\n }\r\n static get(editor) {\r\n return editor.getContribution(ModesHoverController.ID);\r\n }\r\n _hookEvents() {\r\n const hideWidgetsEventHandler = () => this._hideWidgets();\r\n const hoverOpts = this._editor.getOption(48 /* hover */);\r\n this._isHoverEnabled = hoverOpts.enabled;\r\n this._isHoverSticky = hoverOpts.sticky;\r\n if (this._isHoverEnabled) {\r\n this._toUnhook.add(this._editor.onMouseDown((e) => this._onEditorMouseDown(e)));\r\n this._toUnhook.add(this._editor.onMouseUp((e) => this._onEditorMouseUp(e)));\r\n this._toUnhook.add(this._editor.onMouseMove((e) => this._onEditorMouseMove(e)));\r\n this._toUnhook.add(this._editor.onKeyDown((e) => this._onKeyDown(e)));\r\n this._toUnhook.add(this._editor.onDidChangeModelDecorations(() => this._onModelDecorationsChanged()));\r\n }\r\n else {\r\n this._toUnhook.add(this._editor.onMouseMove((e) => this._onEditorMouseMove(e)));\r\n this._toUnhook.add(this._editor.onKeyDown((e) => this._onKeyDown(e)));\r\n }\r\n this._toUnhook.add(this._editor.onMouseLeave(hideWidgetsEventHandler));\r\n this._toUnhook.add(this._editor.onDidChangeModel(hideWidgetsEventHandler));\r\n this._toUnhook.add(this._editor.onDidScrollChange((e) => this._onEditorScrollChanged(e)));\r\n }\r\n _unhookEvents() {\r\n this._toUnhook.clear();\r\n }\r\n _onModelDecorationsChanged() {\r\n var _a, _b;\r\n (_a = this._contentWidget) === null || _a === void 0 ? void 0 : _a.onModelDecorationsChanged();\r\n (_b = this._glyphWidget) === null || _b === void 0 ? void 0 : _b.onModelDecorationsChanged();\r\n }\r\n _onEditorScrollChanged(e) {\r\n if (e.scrollTopChanged || e.scrollLeftChanged) {\r\n this._hideWidgets();\r\n }\r\n }\r\n _onEditorMouseDown(mouseEvent) {\r\n this._isMouseDown = true;\r\n const targetType = mouseEvent.target.type;\r\n if (targetType === 9 /* CONTENT_WIDGET */ && mouseEvent.target.detail === ModesContentHoverWidget.ID) {\r\n this._hoverClicked = true;\r\n // mouse down on top of content hover widget\r\n return;\r\n }\r\n if (targetType === 12 /* OVERLAY_WIDGET */ && mouseEvent.target.detail === ModesGlyphHoverWidget.ID) {\r\n // mouse down on top of overlay hover widget\r\n return;\r\n }\r\n if (targetType !== 12 /* OVERLAY_WIDGET */ && mouseEvent.target.detail !== ModesGlyphHoverWidget.ID) {\r\n this._hoverClicked = false;\r\n }\r\n this._hideWidgets();\r\n }\r\n _onEditorMouseUp(mouseEvent) {\r\n this._isMouseDown = false;\r\n }\r\n _onEditorMouseMove(mouseEvent) {\r\n var _a, _b, _c, _d, _e, _f;\r\n let targetType = mouseEvent.target.type;\r\n if (this._isMouseDown && this._hoverClicked) {\r\n return;\r\n }\r\n if (this._isHoverSticky && targetType === 9 /* CONTENT_WIDGET */ && mouseEvent.target.detail === ModesContentHoverWidget.ID) {\r\n // mouse moved on top of content hover widget\r\n return;\r\n }\r\n if (this._isHoverSticky && !((_b = (_a = mouseEvent.event.browserEvent.view) === null || _a === void 0 ? void 0 : _a.getSelection()) === null || _b === void 0 ? void 0 : _b.isCollapsed)) {\r\n // selected text within content hover widget\r\n return;\r\n }\r\n if (!this._isHoverSticky && targetType === 9 /* CONTENT_WIDGET */ && mouseEvent.target.detail === ModesContentHoverWidget.ID\r\n && ((_c = this._contentWidget) === null || _c === void 0 ? void 0 : _c.isColorPickerVisible())) {\r\n // though the hover is not sticky, the color picker needs to.\r\n return;\r\n }\r\n if (this._isHoverSticky && targetType === 12 /* OVERLAY_WIDGET */ && mouseEvent.target.detail === ModesGlyphHoverWidget.ID) {\r\n // mouse moved on top of overlay hover widget\r\n return;\r\n }\r\n if (targetType === 7 /* CONTENT_EMPTY */) {\r\n const epsilon = this._editor.getOption(38 /* fontInfo */).typicalHalfwidthCharacterWidth / 2;\r\n const data = mouseEvent.target.detail;\r\n if (data && !data.isAfterLines && typeof data.horizontalDistanceToText === 'number' && data.horizontalDistanceToText < epsilon) {\r\n // Let hover kick in even when the mouse is technically in the empty area after a line, given the distance is small enough\r\n targetType = 6 /* CONTENT_TEXT */;\r\n }\r\n }\r\n if (targetType === 6 /* CONTENT_TEXT */) {\r\n (_d = this._glyphWidget) === null || _d === void 0 ? void 0 : _d.hide();\r\n if (this._isHoverEnabled && mouseEvent.target.range) {\r\n // TODO@rebornix. This should be removed if we move Color Picker out of Hover component.\r\n // Check if mouse is hovering on color decorator\r\n const hoverOnColorDecorator = [...((_e = mouseEvent.target.element) === null || _e === void 0 ? void 0 : _e.classList.values()) || []].find(className => className.startsWith('ced-colorBox'))\r\n && mouseEvent.target.range.endColumn - mouseEvent.target.range.startColumn === 1;\r\n const showAtRange = (hoverOnColorDecorator // shift the mouse focus by one as color decorator is a `before` decoration of next character.\r\n ? new Range(mouseEvent.target.range.startLineNumber, mouseEvent.target.range.startColumn + 1, mouseEvent.target.range.endLineNumber, mouseEvent.target.range.endColumn + 1)\r\n : mouseEvent.target.range);\r\n if (!this._contentWidget) {\r\n this._contentWidget = new ModesContentHoverWidget(this._editor, this._hoverVisibleKey, this._instantiationService, this._themeService);\r\n }\r\n this._contentWidget.startShowingAt(showAtRange, 0 /* Delayed */, false);\r\n }\r\n }\r\n else if (targetType === 2 /* GUTTER_GLYPH_MARGIN */) {\r\n (_f = this._contentWidget) === null || _f === void 0 ? void 0 : _f.hide();\r\n if (this._isHoverEnabled && mouseEvent.target.position) {\r\n if (!this._glyphWidget) {\r\n this._glyphWidget = new ModesGlyphHoverWidget(this._editor, this._modeService, this._openerService);\r\n }\r\n this._glyphWidget.startShowingAt(mouseEvent.target.position.lineNumber);\r\n }\r\n }\r\n else {\r\n this._hideWidgets();\r\n }\r\n }\r\n _onKeyDown(e) {\r\n if (e.keyCode !== 5 /* Ctrl */ && e.keyCode !== 6 /* Alt */ && e.keyCode !== 57 /* Meta */ && e.keyCode !== 4 /* Shift */) {\r\n // Do not hide hover when a modifier key is pressed\r\n this._hideWidgets();\r\n }\r\n }\r\n _hideWidgets() {\r\n var _a, _b, _c;\r\n if ((this._isMouseDown && this._hoverClicked && ((_a = this._contentWidget) === null || _a === void 0 ? void 0 : _a.isColorPickerVisible()))) {\r\n return;\r\n }\r\n this._hoverClicked = false;\r\n (_b = this._glyphWidget) === null || _b === void 0 ? void 0 : _b.hide();\r\n (_c = this._contentWidget) === null || _c === void 0 ? void 0 : _c.hide();\r\n }\r\n isColorPickerVisible() {\r\n var _a;\r\n return ((_a = this._contentWidget) === null || _a === void 0 ? void 0 : _a.isColorPickerVisible()) || false;\r\n }\r\n showContentHover(range, mode, focus) {\r\n if (!this._contentWidget) {\r\n this._contentWidget = new ModesContentHoverWidget(this._editor, this._hoverVisibleKey, this._instantiationService, this._themeService);\r\n }\r\n this._contentWidget.startShowingAt(range, mode, focus);\r\n }\r\n dispose() {\r\n var _a, _b;\r\n this._unhookEvents();\r\n this._toUnhook.dispose();\r\n this._didChangeConfigurationHandler.dispose();\r\n (_a = this._glyphWidget) === null || _a === void 0 ? void 0 : _a.dispose();\r\n (_b = this._contentWidget) === null || _b === void 0 ? void 0 : _b.dispose();\r\n }\r\n};\r\nModesHoverController.ID = 'editor.contrib.hover';\r\nModesHoverController = __decorate([\r\n __param(1, IInstantiationService),\r\n __param(2, IOpenerService),\r\n __param(3, IModeService),\r\n __param(4, IThemeService),\r\n __param(5, IContextKeyService)\r\n], ModesHoverController);\r\nexport { ModesHoverController };\r\nclass ShowHoverAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.showHover',\r\n label: nls.localize({\r\n key: 'showHover',\r\n comment: [\r\n 'Label for action that will trigger the showing of a hover in the editor.',\r\n 'This allows for users to show the hover without using the mouse.'\r\n ]\r\n }, \"Show Hover\"),\r\n alias: 'Show Hover',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 39 /* KEY_I */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n let controller = ModesHoverController.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n const position = editor.getPosition();\r\n const range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);\r\n const focus = editor.getOption(2 /* accessibilitySupport */) === 2 /* Enabled */;\r\n controller.showContentHover(range, 1 /* Immediate */, focus);\r\n }\r\n}\r\nclass ShowDefinitionPreviewHoverAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.showDefinitionPreviewHover',\r\n label: nls.localize({\r\n key: 'showDefinitionPreviewHover',\r\n comment: [\r\n 'Label for action that will trigger the showing of definition preview hover in the editor.',\r\n 'This allows for users to show the definition preview hover without using the mouse.'\r\n ]\r\n }, \"Show Definition Preview Hover\"),\r\n alias: 'Show Definition Preview Hover',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n let controller = ModesHoverController.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n const position = editor.getPosition();\r\n if (!position) {\r\n return;\r\n }\r\n const range = new Range(position.lineNumber, position.column, position.lineNumber, position.column);\r\n const goto = GotoDefinitionAtPositionEditorContribution.get(editor);\r\n const promise = goto.startFindDefinitionFromCursor(position);\r\n if (promise) {\r\n promise.then(() => {\r\n controller.showContentHover(range, 1 /* Immediate */, true);\r\n });\r\n }\r\n else {\r\n controller.showContentHover(range, 1 /* Immediate */, true);\r\n }\r\n }\r\n}\r\nregisterEditorContribution(ModesHoverController.ID, ModesHoverController);\r\nregisterEditorAction(ShowHoverAction);\r\nregisterEditorAction(ShowDefinitionPreviewHoverAction);\r\n// theming\r\nregisterThemingParticipant((theme, collector) => {\r\n const editorHoverHighlightColor = theme.getColor(editorHoverHighlight);\r\n if (editorHoverHighlightColor) {\r\n collector.addRule(`.monaco-editor .hoverHighlight { background-color: ${editorHoverHighlightColor}; }`);\r\n }\r\n const hoverBackground = theme.getColor(editorHoverBackground);\r\n if (hoverBackground) {\r\n collector.addRule(`.monaco-editor .monaco-hover { background-color: ${hoverBackground}; }`);\r\n }\r\n const hoverBorder = theme.getColor(editorHoverBorder);\r\n if (hoverBorder) {\r\n collector.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${hoverBorder}; }`);\r\n collector.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\r\n collector.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\r\n collector.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${hoverBorder.transparent(0.5)}; }`);\r\n }\r\n const link = theme.getColor(textLinkForeground);\r\n if (link) {\r\n collector.addRule(`.monaco-editor .monaco-hover a { color: ${link}; }`);\r\n }\r\n const hoverForeground = theme.getColor(editorHoverForeground);\r\n if (hoverForeground) {\r\n collector.addRule(`.monaco-editor .monaco-hover { color: ${hoverForeground}; }`);\r\n }\r\n const actionsBackground = theme.getColor(editorHoverStatusBarBackground);\r\n if (actionsBackground) {\r\n collector.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${actionsBackground}; }`);\r\n }\r\n const codeBackground = theme.getColor(textCodeBlockBackground);\r\n if (codeBackground) {\r\n collector.addRule(`.monaco-editor .monaco-hover code { background-color: ${codeBackground}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n// import color detector contribution\r\nimport './colorDetector.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { ModesHoverController } from '../hover/hover.js';\r\nimport { Range } from '../../common/core/range.js';\r\nexport class ColorContribution extends Disposable {\r\n constructor(_editor) {\r\n super();\r\n this._editor = _editor;\r\n this._register(_editor.onMouseDown((e) => this.onMouseDown(e)));\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n onMouseDown(mouseEvent) {\r\n var _a;\r\n const targetType = mouseEvent.target.type;\r\n if (targetType !== 6 /* CONTENT_TEXT */) {\r\n return;\r\n }\r\n const hoverOnColorDecorator = [...((_a = mouseEvent.target.element) === null || _a === void 0 ? void 0 : _a.classList.values()) || []].find(className => className.startsWith('ced-colorBox'));\r\n if (!hoverOnColorDecorator) {\r\n return;\r\n }\r\n if (!mouseEvent.target.range) {\r\n return;\r\n }\r\n const hoverController = this._editor.getContribution(ModesHoverController.ID);\r\n if (!hoverController.isColorPickerVisible()) {\r\n const range = new Range(mouseEvent.target.range.startLineNumber, mouseEvent.target.range.startColumn + 1, mouseEvent.target.range.endLineNumber, mouseEvent.target.range.endColumn + 1);\r\n hoverController.showContentHover(range, 0 /* Delayed */, false);\r\n }\r\n }\r\n}\r\nColorContribution.ID = 'editor.contrib.colorContribution'; // ms\r\nregisterEditorContribution(ColorContribution.ID, ColorContribution);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { EditOperation } from '../../common/core/editOperation.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry.js';\r\nexport class BlockCommentCommand {\r\n constructor(selection, insertSpace) {\r\n this._selection = selection;\r\n this._insertSpace = insertSpace;\r\n this._usedEndToken = null;\r\n }\r\n static _haystackHasNeedleAtOffset(haystack, needle, offset) {\r\n if (offset < 0) {\r\n return false;\r\n }\r\n const needleLength = needle.length;\r\n const haystackLength = haystack.length;\r\n if (offset + needleLength > haystackLength) {\r\n return false;\r\n }\r\n for (let i = 0; i < needleLength; i++) {\r\n const codeA = haystack.charCodeAt(offset + i);\r\n const codeB = needle.charCodeAt(i);\r\n if (codeA === codeB) {\r\n continue;\r\n }\r\n if (codeA >= 65 /* A */ && codeA <= 90 /* Z */ && codeA + 32 === codeB) {\r\n // codeA is upper-case variant of codeB\r\n continue;\r\n }\r\n if (codeB >= 65 /* A */ && codeB <= 90 /* Z */ && codeB + 32 === codeA) {\r\n // codeB is upper-case variant of codeA\r\n continue;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n _createOperationsForBlockComment(selection, startToken, endToken, insertSpace, model, builder) {\r\n const startLineNumber = selection.startLineNumber;\r\n const startColumn = selection.startColumn;\r\n const endLineNumber = selection.endLineNumber;\r\n const endColumn = selection.endColumn;\r\n const startLineText = model.getLineContent(startLineNumber);\r\n const endLineText = model.getLineContent(endLineNumber);\r\n let startTokenIndex = startLineText.lastIndexOf(startToken, startColumn - 1 + startToken.length);\r\n let endTokenIndex = endLineText.indexOf(endToken, endColumn - 1 - endToken.length);\r\n if (startTokenIndex !== -1 && endTokenIndex !== -1) {\r\n if (startLineNumber === endLineNumber) {\r\n const lineBetweenTokens = startLineText.substring(startTokenIndex + startToken.length, endTokenIndex);\r\n if (lineBetweenTokens.indexOf(endToken) >= 0) {\r\n // force to add a block comment\r\n startTokenIndex = -1;\r\n endTokenIndex = -1;\r\n }\r\n }\r\n else {\r\n const startLineAfterStartToken = startLineText.substring(startTokenIndex + startToken.length);\r\n const endLineBeforeEndToken = endLineText.substring(0, endTokenIndex);\r\n if (startLineAfterStartToken.indexOf(endToken) >= 0 || endLineBeforeEndToken.indexOf(endToken) >= 0) {\r\n // force to add a block comment\r\n startTokenIndex = -1;\r\n endTokenIndex = -1;\r\n }\r\n }\r\n }\r\n let ops;\r\n if (startTokenIndex !== -1 && endTokenIndex !== -1) {\r\n // Consider spaces as part of the comment tokens\r\n if (insertSpace && startTokenIndex + startToken.length < startLineText.length && startLineText.charCodeAt(startTokenIndex + startToken.length) === 32 /* Space */) {\r\n // Pretend the start token contains a trailing space\r\n startToken = startToken + ' ';\r\n }\r\n if (insertSpace && endTokenIndex > 0 && endLineText.charCodeAt(endTokenIndex - 1) === 32 /* Space */) {\r\n // Pretend the end token contains a leading space\r\n endToken = ' ' + endToken;\r\n endTokenIndex -= 1;\r\n }\r\n ops = BlockCommentCommand._createRemoveBlockCommentOperations(new Range(startLineNumber, startTokenIndex + startToken.length + 1, endLineNumber, endTokenIndex + 1), startToken, endToken);\r\n }\r\n else {\r\n ops = BlockCommentCommand._createAddBlockCommentOperations(selection, startToken, endToken, this._insertSpace);\r\n this._usedEndToken = ops.length === 1 ? endToken : null;\r\n }\r\n for (const op of ops) {\r\n builder.addTrackedEditOperation(op.range, op.text);\r\n }\r\n }\r\n static _createRemoveBlockCommentOperations(r, startToken, endToken) {\r\n let res = [];\r\n if (!Range.isEmpty(r)) {\r\n // Remove block comment start\r\n res.push(EditOperation.delete(new Range(r.startLineNumber, r.startColumn - startToken.length, r.startLineNumber, r.startColumn)));\r\n // Remove block comment end\r\n res.push(EditOperation.delete(new Range(r.endLineNumber, r.endColumn, r.endLineNumber, r.endColumn + endToken.length)));\r\n }\r\n else {\r\n // Remove both continuously\r\n res.push(EditOperation.delete(new Range(r.startLineNumber, r.startColumn - startToken.length, r.endLineNumber, r.endColumn + endToken.length)));\r\n }\r\n return res;\r\n }\r\n static _createAddBlockCommentOperations(r, startToken, endToken, insertSpace) {\r\n let res = [];\r\n if (!Range.isEmpty(r)) {\r\n // Insert block comment start\r\n res.push(EditOperation.insert(new Position(r.startLineNumber, r.startColumn), startToken + (insertSpace ? ' ' : '')));\r\n // Insert block comment end\r\n res.push(EditOperation.insert(new Position(r.endLineNumber, r.endColumn), (insertSpace ? ' ' : '') + endToken));\r\n }\r\n else {\r\n // Insert both continuously\r\n res.push(EditOperation.replace(new Range(r.startLineNumber, r.startColumn, r.endLineNumber, r.endColumn), startToken + ' ' + endToken));\r\n }\r\n return res;\r\n }\r\n getEditOperations(model, builder) {\r\n const startLineNumber = this._selection.startLineNumber;\r\n const startColumn = this._selection.startColumn;\r\n model.tokenizeIfCheap(startLineNumber);\r\n const languageId = model.getLanguageIdAtPosition(startLineNumber, startColumn);\r\n const config = LanguageConfigurationRegistry.getComments(languageId);\r\n if (!config || !config.blockCommentStartToken || !config.blockCommentEndToken) {\r\n // Mode does not support block comments\r\n return;\r\n }\r\n this._createOperationsForBlockComment(this._selection, config.blockCommentStartToken, config.blockCommentEndToken, this._insertSpace, model, builder);\r\n }\r\n computeCursorState(model, helper) {\r\n const inverseEditOperations = helper.getInverseEditOperations();\r\n if (inverseEditOperations.length === 2) {\r\n const startTokenEditOperation = inverseEditOperations[0];\r\n const endTokenEditOperation = inverseEditOperations[1];\r\n return new Selection(startTokenEditOperation.range.endLineNumber, startTokenEditOperation.range.endColumn, endTokenEditOperation.range.startLineNumber, endTokenEditOperation.range.startColumn);\r\n }\r\n else {\r\n const srcRange = inverseEditOperations[0].range;\r\n const deltaColumn = this._usedEndToken ? -this._usedEndToken.length - 1 : 0; // minus 1 space before endToken\r\n return new Selection(srcRange.endLineNumber, srcRange.endColumn + deltaColumn, srcRange.endLineNumber, srcRange.endColumn + deltaColumn);\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { EditOperation } from '../../common/core/editOperation.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry.js';\r\nimport { BlockCommentCommand } from './blockCommentCommand.js';\r\nexport class LineCommentCommand {\r\n constructor(selection, tabSize, type, insertSpace, ignoreEmptyLines, ignoreFirstLine) {\r\n this._selection = selection;\r\n this._tabSize = tabSize;\r\n this._type = type;\r\n this._insertSpace = insertSpace;\r\n this._selectionId = null;\r\n this._deltaColumn = 0;\r\n this._moveEndPositionDown = false;\r\n this._ignoreEmptyLines = ignoreEmptyLines;\r\n this._ignoreFirstLine = ignoreFirstLine || false;\r\n }\r\n /**\r\n * Do an initial pass over the lines and gather info about the line comment string.\r\n * Returns null if any of the lines doesn't support a line comment string.\r\n */\r\n static _gatherPreflightCommentStrings(model, startLineNumber, endLineNumber) {\r\n model.tokenizeIfCheap(startLineNumber);\r\n const languageId = model.getLanguageIdAtPosition(startLineNumber, 1);\r\n const config = LanguageConfigurationRegistry.getComments(languageId);\r\n const commentStr = (config ? config.lineCommentToken : null);\r\n if (!commentStr) {\r\n // Mode does not support line comments\r\n return null;\r\n }\r\n let lines = [];\r\n for (let i = 0, lineCount = endLineNumber - startLineNumber + 1; i < lineCount; i++) {\r\n lines[i] = {\r\n ignore: false,\r\n commentStr: commentStr,\r\n commentStrOffset: 0,\r\n commentStrLength: commentStr.length\r\n };\r\n }\r\n return lines;\r\n }\r\n /**\r\n * Analyze lines and decide which lines are relevant and what the toggle should do.\r\n * Also, build up several offsets and lengths useful in the generation of editor operations.\r\n */\r\n static _analyzeLines(type, insertSpace, model, lines, startLineNumber, ignoreEmptyLines, ignoreFirstLine) {\r\n let onlyWhitespaceLines = true;\r\n let shouldRemoveComments;\r\n if (type === 0 /* Toggle */) {\r\n shouldRemoveComments = true;\r\n }\r\n else if (type === 1 /* ForceAdd */) {\r\n shouldRemoveComments = false;\r\n }\r\n else {\r\n shouldRemoveComments = true;\r\n }\r\n for (let i = 0, lineCount = lines.length; i < lineCount; i++) {\r\n const lineData = lines[i];\r\n const lineNumber = startLineNumber + i;\r\n if (lineNumber === startLineNumber && ignoreFirstLine) {\r\n // first line ignored\r\n lineData.ignore = true;\r\n continue;\r\n }\r\n const lineContent = model.getLineContent(lineNumber);\r\n const lineContentStartOffset = strings.firstNonWhitespaceIndex(lineContent);\r\n if (lineContentStartOffset === -1) {\r\n // Empty or whitespace only line\r\n lineData.ignore = ignoreEmptyLines;\r\n lineData.commentStrOffset = lineContent.length;\r\n continue;\r\n }\r\n onlyWhitespaceLines = false;\r\n lineData.ignore = false;\r\n lineData.commentStrOffset = lineContentStartOffset;\r\n if (shouldRemoveComments && !BlockCommentCommand._haystackHasNeedleAtOffset(lineContent, lineData.commentStr, lineContentStartOffset)) {\r\n if (type === 0 /* Toggle */) {\r\n // Every line so far has been a line comment, but this one is not\r\n shouldRemoveComments = false;\r\n }\r\n else if (type === 1 /* ForceAdd */) {\r\n // Will not happen\r\n }\r\n else {\r\n lineData.ignore = true;\r\n }\r\n }\r\n if (shouldRemoveComments && insertSpace) {\r\n // Remove a following space if present\r\n const commentStrEndOffset = lineContentStartOffset + lineData.commentStrLength;\r\n if (commentStrEndOffset < lineContent.length && lineContent.charCodeAt(commentStrEndOffset) === 32 /* Space */) {\r\n lineData.commentStrLength += 1;\r\n }\r\n }\r\n }\r\n if (type === 0 /* Toggle */ && onlyWhitespaceLines) {\r\n // For only whitespace lines, we insert comments\r\n shouldRemoveComments = false;\r\n // Also, no longer ignore them\r\n for (let i = 0, lineCount = lines.length; i < lineCount; i++) {\r\n lines[i].ignore = false;\r\n }\r\n }\r\n return {\r\n supported: true,\r\n shouldRemoveComments: shouldRemoveComments,\r\n lines: lines\r\n };\r\n }\r\n /**\r\n * Analyze all lines and decide exactly what to do => not supported | insert line comments | remove line comments\r\n */\r\n static _gatherPreflightData(type, insertSpace, model, startLineNumber, endLineNumber, ignoreEmptyLines, ignoreFirstLine) {\r\n const lines = LineCommentCommand._gatherPreflightCommentStrings(model, startLineNumber, endLineNumber);\r\n if (lines === null) {\r\n return {\r\n supported: false\r\n };\r\n }\r\n return LineCommentCommand._analyzeLines(type, insertSpace, model, lines, startLineNumber, ignoreEmptyLines, ignoreFirstLine);\r\n }\r\n /**\r\n * Given a successful analysis, execute either insert line comments, either remove line comments\r\n */\r\n _executeLineComments(model, builder, data, s) {\r\n let ops;\r\n if (data.shouldRemoveComments) {\r\n ops = LineCommentCommand._createRemoveLineCommentsOperations(data.lines, s.startLineNumber);\r\n }\r\n else {\r\n LineCommentCommand._normalizeInsertionPoint(model, data.lines, s.startLineNumber, this._tabSize);\r\n ops = this._createAddLineCommentsOperations(data.lines, s.startLineNumber);\r\n }\r\n const cursorPosition = new Position(s.positionLineNumber, s.positionColumn);\r\n for (let i = 0, len = ops.length; i < len; i++) {\r\n builder.addEditOperation(ops[i].range, ops[i].text);\r\n if (Range.isEmpty(ops[i].range) && Range.getStartPosition(ops[i].range).equals(cursorPosition)) {\r\n const lineContent = model.getLineContent(cursorPosition.lineNumber);\r\n if (lineContent.length + 1 === cursorPosition.column) {\r\n this._deltaColumn = (ops[i].text || '').length;\r\n }\r\n }\r\n }\r\n this._selectionId = builder.trackSelection(s);\r\n }\r\n _attemptRemoveBlockComment(model, s, startToken, endToken) {\r\n let startLineNumber = s.startLineNumber;\r\n let endLineNumber = s.endLineNumber;\r\n let startTokenAllowedBeforeColumn = endToken.length + Math.max(model.getLineFirstNonWhitespaceColumn(s.startLineNumber), s.startColumn);\r\n let startTokenIndex = model.getLineContent(startLineNumber).lastIndexOf(startToken, startTokenAllowedBeforeColumn - 1);\r\n let endTokenIndex = model.getLineContent(endLineNumber).indexOf(endToken, s.endColumn - 1 - startToken.length);\r\n if (startTokenIndex !== -1 && endTokenIndex === -1) {\r\n endTokenIndex = model.getLineContent(startLineNumber).indexOf(endToken, startTokenIndex + startToken.length);\r\n endLineNumber = startLineNumber;\r\n }\r\n if (startTokenIndex === -1 && endTokenIndex !== -1) {\r\n startTokenIndex = model.getLineContent(endLineNumber).lastIndexOf(startToken, endTokenIndex);\r\n startLineNumber = endLineNumber;\r\n }\r\n if (s.isEmpty() && (startTokenIndex === -1 || endTokenIndex === -1)) {\r\n startTokenIndex = model.getLineContent(startLineNumber).indexOf(startToken);\r\n if (startTokenIndex !== -1) {\r\n endTokenIndex = model.getLineContent(startLineNumber).indexOf(endToken, startTokenIndex + startToken.length);\r\n }\r\n }\r\n // We have to adjust to possible inner white space.\r\n // For Space after startToken, add Space to startToken - range math will work out.\r\n if (startTokenIndex !== -1 && model.getLineContent(startLineNumber).charCodeAt(startTokenIndex + startToken.length) === 32 /* Space */) {\r\n startToken += ' ';\r\n }\r\n // For Space before endToken, add Space before endToken and shift index one left.\r\n if (endTokenIndex !== -1 && model.getLineContent(endLineNumber).charCodeAt(endTokenIndex - 1) === 32 /* Space */) {\r\n endToken = ' ' + endToken;\r\n endTokenIndex -= 1;\r\n }\r\n if (startTokenIndex !== -1 && endTokenIndex !== -1) {\r\n return BlockCommentCommand._createRemoveBlockCommentOperations(new Range(startLineNumber, startTokenIndex + startToken.length + 1, endLineNumber, endTokenIndex + 1), startToken, endToken);\r\n }\r\n return null;\r\n }\r\n /**\r\n * Given an unsuccessful analysis, delegate to the block comment command\r\n */\r\n _executeBlockComment(model, builder, s) {\r\n model.tokenizeIfCheap(s.startLineNumber);\r\n let languageId = model.getLanguageIdAtPosition(s.startLineNumber, 1);\r\n let config = LanguageConfigurationRegistry.getComments(languageId);\r\n if (!config || !config.blockCommentStartToken || !config.blockCommentEndToken) {\r\n // Mode does not support block comments\r\n return;\r\n }\r\n const startToken = config.blockCommentStartToken;\r\n const endToken = config.blockCommentEndToken;\r\n let ops = this._attemptRemoveBlockComment(model, s, startToken, endToken);\r\n if (!ops) {\r\n if (s.isEmpty()) {\r\n const lineContent = model.getLineContent(s.startLineNumber);\r\n let firstNonWhitespaceIndex = strings.firstNonWhitespaceIndex(lineContent);\r\n if (firstNonWhitespaceIndex === -1) {\r\n // Line is empty or contains only whitespace\r\n firstNonWhitespaceIndex = lineContent.length;\r\n }\r\n ops = BlockCommentCommand._createAddBlockCommentOperations(new Range(s.startLineNumber, firstNonWhitespaceIndex + 1, s.startLineNumber, lineContent.length + 1), startToken, endToken, this._insertSpace);\r\n }\r\n else {\r\n ops = BlockCommentCommand._createAddBlockCommentOperations(new Range(s.startLineNumber, model.getLineFirstNonWhitespaceColumn(s.startLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), startToken, endToken, this._insertSpace);\r\n }\r\n if (ops.length === 1) {\r\n // Leave cursor after token and Space\r\n this._deltaColumn = startToken.length + 1;\r\n }\r\n }\r\n this._selectionId = builder.trackSelection(s);\r\n for (const op of ops) {\r\n builder.addEditOperation(op.range, op.text);\r\n }\r\n }\r\n getEditOperations(model, builder) {\r\n let s = this._selection;\r\n this._moveEndPositionDown = false;\r\n if (s.startLineNumber === s.endLineNumber && this._ignoreFirstLine) {\r\n builder.addEditOperation(new Range(s.startLineNumber, model.getLineMaxColumn(s.startLineNumber), s.startLineNumber + 1, 1), s.startLineNumber === model.getLineCount() ? '' : '\\n');\r\n this._selectionId = builder.trackSelection(s);\r\n return;\r\n }\r\n if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {\r\n this._moveEndPositionDown = true;\r\n s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1));\r\n }\r\n const data = LineCommentCommand._gatherPreflightData(this._type, this._insertSpace, model, s.startLineNumber, s.endLineNumber, this._ignoreEmptyLines, this._ignoreFirstLine);\r\n if (data.supported) {\r\n return this._executeLineComments(model, builder, data, s);\r\n }\r\n return this._executeBlockComment(model, builder, s);\r\n }\r\n computeCursorState(model, helper) {\r\n let result = helper.getTrackedSelection(this._selectionId);\r\n if (this._moveEndPositionDown) {\r\n result = result.setEndPosition(result.endLineNumber + 1, 1);\r\n }\r\n return new Selection(result.selectionStartLineNumber, result.selectionStartColumn + this._deltaColumn, result.positionLineNumber, result.positionColumn + this._deltaColumn);\r\n }\r\n /**\r\n * Generate edit operations in the remove line comment case\r\n */\r\n static _createRemoveLineCommentsOperations(lines, startLineNumber) {\r\n let res = [];\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n const lineData = lines[i];\r\n if (lineData.ignore) {\r\n continue;\r\n }\r\n res.push(EditOperation.delete(new Range(startLineNumber + i, lineData.commentStrOffset + 1, startLineNumber + i, lineData.commentStrOffset + lineData.commentStrLength + 1)));\r\n }\r\n return res;\r\n }\r\n /**\r\n * Generate edit operations in the add line comment case\r\n */\r\n _createAddLineCommentsOperations(lines, startLineNumber) {\r\n let res = [];\r\n const afterCommentStr = this._insertSpace ? ' ' : '';\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n const lineData = lines[i];\r\n if (lineData.ignore) {\r\n continue;\r\n }\r\n res.push(EditOperation.insert(new Position(startLineNumber + i, lineData.commentStrOffset + 1), lineData.commentStr + afterCommentStr));\r\n }\r\n return res;\r\n }\r\n static nextVisibleColumn(currentVisibleColumn, tabSize, isTab, columnSize) {\r\n if (isTab) {\r\n return currentVisibleColumn + (tabSize - (currentVisibleColumn % tabSize));\r\n }\r\n return currentVisibleColumn + columnSize;\r\n }\r\n /**\r\n * Adjust insertion points to have them vertically aligned in the add line comment case\r\n */\r\n static _normalizeInsertionPoint(model, lines, startLineNumber, tabSize) {\r\n let minVisibleColumn = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n let j;\r\n let lenJ;\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n if (lines[i].ignore) {\r\n continue;\r\n }\r\n const lineContent = model.getLineContent(startLineNumber + i);\r\n let currentVisibleColumn = 0;\r\n for (let j = 0, lenJ = lines[i].commentStrOffset; currentVisibleColumn < minVisibleColumn && j < lenJ; j++) {\r\n currentVisibleColumn = LineCommentCommand.nextVisibleColumn(currentVisibleColumn, tabSize, lineContent.charCodeAt(j) === 9 /* Tab */, 1);\r\n }\r\n if (currentVisibleColumn < minVisibleColumn) {\r\n minVisibleColumn = currentVisibleColumn;\r\n }\r\n }\r\n minVisibleColumn = Math.floor(minVisibleColumn / tabSize) * tabSize;\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n if (lines[i].ignore) {\r\n continue;\r\n }\r\n const lineContent = model.getLineContent(startLineNumber + i);\r\n let currentVisibleColumn = 0;\r\n for (j = 0, lenJ = lines[i].commentStrOffset; currentVisibleColumn < minVisibleColumn && j < lenJ; j++) {\r\n currentVisibleColumn = LineCommentCommand.nextVisibleColumn(currentVisibleColumn, tabSize, lineContent.charCodeAt(j) === 9 /* Tab */, 1);\r\n }\r\n if (currentVisibleColumn > minVisibleColumn) {\r\n lines[i].commentStrOffset = j - 1;\r\n }\r\n else {\r\n lines[i].commentStrOffset = j;\r\n }\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../../nls.js';\r\nimport { KeyChord } from '../../../base/common/keyCodes.js';\r\nimport { EditorAction, registerEditorAction } from '../../browser/editorExtensions.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { BlockCommentCommand } from './blockCommentCommand.js';\r\nimport { LineCommentCommand } from './lineCommentCommand.js';\r\nimport { MenuId } from '../../../platform/actions/common/actions.js';\r\nclass CommentLineAction extends EditorAction {\r\n constructor(type, opts) {\r\n super(opts);\r\n this._type = type;\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const model = editor.getModel();\r\n const commands = [];\r\n const modelOptions = model.getOptions();\r\n const commentsOptions = editor.getOption(16 /* comments */);\r\n const selections = editor.getSelections().map((selection, index) => ({ selection, index, ignoreFirstLine: false }));\r\n selections.sort((a, b) => Range.compareRangesUsingStarts(a.selection, b.selection));\r\n // Remove selections that would result in copying the same line\r\n let prev = selections[0];\r\n for (let i = 1; i < selections.length; i++) {\r\n const curr = selections[i];\r\n if (prev.selection.endLineNumber === curr.selection.startLineNumber) {\r\n // these two selections would copy the same line\r\n if (prev.index < curr.index) {\r\n // prev wins\r\n curr.ignoreFirstLine = true;\r\n }\r\n else {\r\n // curr wins\r\n prev.ignoreFirstLine = true;\r\n prev = curr;\r\n }\r\n }\r\n }\r\n for (const selection of selections) {\r\n commands.push(new LineCommentCommand(selection.selection, modelOptions.tabSize, this._type, commentsOptions.insertSpace, commentsOptions.ignoreEmptyLines, selection.ignoreFirstLine));\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass ToggleCommentLineAction extends CommentLineAction {\r\n constructor() {\r\n super(0 /* Toggle */, {\r\n id: 'editor.action.commentLine',\r\n label: nls.localize('comment.line', \"Toggle Line Comment\"),\r\n alias: 'Toggle Line Comment',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 85 /* US_SLASH */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarEditMenu,\r\n group: '5_insert',\r\n title: nls.localize({ key: 'miToggleLineComment', comment: ['&& denotes a mnemonic'] }, \"&&Toggle Line Comment\"),\r\n order: 1\r\n }\r\n });\r\n }\r\n}\r\nclass AddLineCommentAction extends CommentLineAction {\r\n constructor() {\r\n super(1 /* ForceAdd */, {\r\n id: 'editor.action.addCommentLine',\r\n label: nls.localize('comment.line.add', \"Add Line Comment\"),\r\n alias: 'Add Line Comment',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 33 /* KEY_C */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass RemoveLineCommentAction extends CommentLineAction {\r\n constructor() {\r\n super(2 /* ForceRemove */, {\r\n id: 'editor.action.removeCommentLine',\r\n label: nls.localize('comment.line.remove', \"Remove Line Comment\"),\r\n alias: 'Remove Line Comment',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 51 /* KEY_U */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass BlockCommentAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.blockComment',\r\n label: nls.localize('comment.block', \"Toggle Block Comment\"),\r\n alias: 'Toggle Block Comment',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 31 /* KEY_A */,\r\n linux: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 31 /* KEY_A */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarEditMenu,\r\n group: '5_insert',\r\n title: nls.localize({ key: 'miToggleBlockComment', comment: ['&& denotes a mnemonic'] }, \"Toggle &&Block Comment\"),\r\n order: 2\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const commentsOptions = editor.getOption(16 /* comments */);\r\n const commands = [];\r\n const selections = editor.getSelections();\r\n for (const selection of selections) {\r\n commands.push(new BlockCommentCommand(selection, commentsOptions.insertSpace));\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nregisterEditorAction(ToggleCommentLineAction);\r\nregisterEditorAction(AddLineCommentAction);\r\nregisterEditorAction(RemoveLineCommentAction);\r\nregisterEditorAction(BlockCommentAction);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { Separator, SubmenuAction } from '../../../base/common/actions.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { EditorAction, registerEditorAction, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { IMenuService, MenuId, SubmenuItemAction } from '../../../platform/actions/common/actions.js';\r\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { IContextMenuService, IContextViewService } from '../../../platform/contextview/browser/contextView.js';\r\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding.js';\r\nimport { ActionViewItem } from '../../../base/browser/ui/actionbar/actionViewItems.js';\r\nlet ContextMenuController = class ContextMenuController {\r\n constructor(editor, _contextMenuService, _contextViewService, _contextKeyService, _keybindingService, _menuService) {\r\n this._contextMenuService = _contextMenuService;\r\n this._contextViewService = _contextViewService;\r\n this._contextKeyService = _contextKeyService;\r\n this._keybindingService = _keybindingService;\r\n this._menuService = _menuService;\r\n this._toDispose = new DisposableStore();\r\n this._contextMenuIsBeingShownCount = 0;\r\n this._editor = editor;\r\n this._toDispose.add(this._editor.onContextMenu((e) => this._onContextMenu(e)));\r\n this._toDispose.add(this._editor.onMouseWheel((e) => {\r\n if (this._contextMenuIsBeingShownCount > 0) {\r\n const view = this._contextViewService.getContextViewElement();\r\n const target = e.srcElement;\r\n // Event triggers on shadow root host first\r\n // Check if the context view is under this host before hiding it #103169\r\n if (!(target.shadowRoot && dom.getShadowRoot(view) === target.shadowRoot)) {\r\n this._contextViewService.hideContextView();\r\n }\r\n }\r\n }));\r\n this._toDispose.add(this._editor.onKeyDown((e) => {\r\n if (e.keyCode === 58 /* ContextMenu */) {\r\n // Chrome is funny like that\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.showContextMenu();\r\n }\r\n }));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(ContextMenuController.ID);\r\n }\r\n _onContextMenu(e) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n if (!this._editor.getOption(17 /* contextmenu */)) {\r\n this._editor.focus();\r\n // Ensure the cursor is at the position of the mouse click\r\n if (e.target.position && !this._editor.getSelection().containsPosition(e.target.position)) {\r\n this._editor.setPosition(e.target.position);\r\n }\r\n return; // Context menu is turned off through configuration\r\n }\r\n if (e.target.type === 12 /* OVERLAY_WIDGET */) {\r\n return; // allow native menu on widgets to support right click on input field for example in find\r\n }\r\n e.event.preventDefault();\r\n if (e.target.type !== 6 /* CONTENT_TEXT */ && e.target.type !== 7 /* CONTENT_EMPTY */ && e.target.type !== 1 /* TEXTAREA */) {\r\n return; // only support mouse click into text or native context menu key for now\r\n }\r\n // Ensure the editor gets focus if it hasn't, so the right events are being sent to other contributions\r\n this._editor.focus();\r\n // Ensure the cursor is at the position of the mouse click\r\n if (e.target.position) {\r\n let hasSelectionAtPosition = false;\r\n for (const selection of this._editor.getSelections()) {\r\n if (selection.containsPosition(e.target.position)) {\r\n hasSelectionAtPosition = true;\r\n break;\r\n }\r\n }\r\n if (!hasSelectionAtPosition) {\r\n this._editor.setPosition(e.target.position);\r\n }\r\n }\r\n // Unless the user triggerd the context menu through Shift+F10, use the mouse position as menu position\r\n let anchor = null;\r\n if (e.target.type !== 1 /* TEXTAREA */) {\r\n anchor = { x: e.event.posx - 1, width: 2, y: e.event.posy - 1, height: 2 };\r\n }\r\n // Show the context menu\r\n this.showContextMenu(anchor);\r\n }\r\n showContextMenu(anchor) {\r\n if (!this._editor.getOption(17 /* contextmenu */)) {\r\n return; // Context menu is turned off through configuration\r\n }\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n if (!this._contextMenuService) {\r\n this._editor.focus();\r\n return; // We need the context menu service to function\r\n }\r\n // Find actions available for menu\r\n const menuActions = this._getMenuActions(this._editor.getModel(), MenuId.EditorContext);\r\n // Show menu if we have actions to show\r\n if (menuActions.length > 0) {\r\n this._doShowContextMenu(menuActions, anchor);\r\n }\r\n }\r\n _getMenuActions(model, menuId) {\r\n const result = [];\r\n // get menu groups\r\n const menu = this._menuService.createMenu(menuId, this._contextKeyService);\r\n const groups = menu.getActions({ arg: model.uri });\r\n menu.dispose();\r\n // translate them into other actions\r\n for (let group of groups) {\r\n const [, actions] = group;\r\n let addedItems = 0;\r\n for (const action of actions) {\r\n if (action instanceof SubmenuItemAction) {\r\n const subActions = this._getMenuActions(model, action.item.submenu);\r\n if (subActions.length > 0) {\r\n result.push(new SubmenuAction(action.id, action.label, subActions));\r\n addedItems++;\r\n }\r\n }\r\n else {\r\n result.push(action);\r\n addedItems++;\r\n }\r\n }\r\n if (addedItems) {\r\n result.push(new Separator());\r\n }\r\n }\r\n if (result.length) {\r\n result.pop(); // remove last separator\r\n }\r\n return result;\r\n }\r\n _doShowContextMenu(actions, anchor = null) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n // Disable hover\r\n const oldHoverSetting = this._editor.getOption(48 /* hover */);\r\n this._editor.updateOptions({\r\n hover: {\r\n enabled: false\r\n }\r\n });\r\n if (!anchor) {\r\n // Ensure selection is visible\r\n this._editor.revealPosition(this._editor.getPosition(), 1 /* Immediate */);\r\n this._editor.render();\r\n const cursorCoords = this._editor.getScrolledVisiblePosition(this._editor.getPosition());\r\n // Translate to absolute editor position\r\n const editorCoords = dom.getDomNodePagePosition(this._editor.getDomNode());\r\n const posx = editorCoords.left + cursorCoords.left;\r\n const posy = editorCoords.top + cursorCoords.top + cursorCoords.height;\r\n anchor = { x: posx, y: posy };\r\n }\r\n // Show menu\r\n this._contextMenuIsBeingShownCount++;\r\n this._contextMenuService.showContextMenu({\r\n domForShadowRoot: this._editor.getDomNode(),\r\n getAnchor: () => anchor,\r\n getActions: () => actions,\r\n getActionViewItem: (action) => {\r\n const keybinding = this._keybindingFor(action);\r\n if (keybinding) {\r\n return new ActionViewItem(action, action, { label: true, keybinding: keybinding.getLabel(), isMenu: true });\r\n }\r\n const customActionViewItem = action;\r\n if (typeof customActionViewItem.getActionViewItem === 'function') {\r\n return customActionViewItem.getActionViewItem();\r\n }\r\n return new ActionViewItem(action, action, { icon: true, label: true, isMenu: true });\r\n },\r\n getKeyBinding: (action) => {\r\n return this._keybindingFor(action);\r\n },\r\n onHide: (wasCancelled) => {\r\n this._contextMenuIsBeingShownCount--;\r\n this._editor.focus();\r\n this._editor.updateOptions({\r\n hover: oldHoverSetting\r\n });\r\n }\r\n });\r\n }\r\n _keybindingFor(action) {\r\n return this._keybindingService.lookupKeybinding(action.id);\r\n }\r\n dispose() {\r\n if (this._contextMenuIsBeingShownCount > 0) {\r\n this._contextViewService.hideContextView();\r\n }\r\n this._toDispose.dispose();\r\n }\r\n};\r\nContextMenuController.ID = 'editor.contrib.contextmenu';\r\nContextMenuController = __decorate([\r\n __param(1, IContextMenuService),\r\n __param(2, IContextViewService),\r\n __param(3, IContextKeyService),\r\n __param(4, IKeybindingService),\r\n __param(5, IMenuService)\r\n], ContextMenuController);\r\nexport { ContextMenuController };\r\nclass ShowContextMenu extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.showContextMenu',\r\n label: nls.localize('action.showContextMenu.label', \"Show Editor Context Menu\"),\r\n alias: 'Show Editor Context Menu',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 68 /* F10 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n let contribution = ContextMenuController.get(editor);\r\n contribution.showContextMenu();\r\n }\r\n}\r\nregisterEditorContribution(ContextMenuController.ID, ContextMenuController);\r\nregisterEditorAction(ShowContextMenu);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../../nls.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { EditorAction, registerEditorAction, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nclass CursorState {\r\n constructor(selections) {\r\n this.selections = selections;\r\n }\r\n equals(other) {\r\n const thisLen = this.selections.length;\r\n const otherLen = other.selections.length;\r\n if (thisLen !== otherLen) {\r\n return false;\r\n }\r\n for (let i = 0; i < thisLen; i++) {\r\n if (!this.selections[i].equalsSelection(other.selections[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n}\r\nclass StackElement {\r\n constructor(cursorState, scrollTop, scrollLeft) {\r\n this.cursorState = cursorState;\r\n this.scrollTop = scrollTop;\r\n this.scrollLeft = scrollLeft;\r\n }\r\n}\r\nexport class CursorUndoRedoController extends Disposable {\r\n constructor(editor) {\r\n super();\r\n this._editor = editor;\r\n this._isCursorUndoRedo = false;\r\n this._undoStack = [];\r\n this._redoStack = [];\r\n this._register(editor.onDidChangeModel((e) => {\r\n this._undoStack = [];\r\n this._redoStack = [];\r\n }));\r\n this._register(editor.onDidChangeModelContent((e) => {\r\n this._undoStack = [];\r\n this._redoStack = [];\r\n }));\r\n this._register(editor.onDidChangeCursorSelection((e) => {\r\n if (this._isCursorUndoRedo) {\r\n return;\r\n }\r\n if (!e.oldSelections) {\r\n return;\r\n }\r\n if (e.oldModelVersionId !== e.modelVersionId) {\r\n return;\r\n }\r\n const prevState = new CursorState(e.oldSelections);\r\n const isEqualToLastUndoStack = (this._undoStack.length > 0 && this._undoStack[this._undoStack.length - 1].cursorState.equals(prevState));\r\n if (!isEqualToLastUndoStack) {\r\n this._undoStack.push(new StackElement(prevState, editor.getScrollTop(), editor.getScrollLeft()));\r\n this._redoStack = [];\r\n if (this._undoStack.length > 50) {\r\n // keep the cursor undo stack bounded\r\n this._undoStack.shift();\r\n }\r\n }\r\n }));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(CursorUndoRedoController.ID);\r\n }\r\n cursorUndo() {\r\n if (!this._editor.hasModel() || this._undoStack.length === 0) {\r\n return;\r\n }\r\n this._redoStack.push(new StackElement(new CursorState(this._editor.getSelections()), this._editor.getScrollTop(), this._editor.getScrollLeft()));\r\n this._applyState(this._undoStack.pop());\r\n }\r\n cursorRedo() {\r\n if (!this._editor.hasModel() || this._redoStack.length === 0) {\r\n return;\r\n }\r\n this._undoStack.push(new StackElement(new CursorState(this._editor.getSelections()), this._editor.getScrollTop(), this._editor.getScrollLeft()));\r\n this._applyState(this._redoStack.pop());\r\n }\r\n _applyState(stackElement) {\r\n this._isCursorUndoRedo = true;\r\n this._editor.setSelections(stackElement.cursorState.selections);\r\n this._editor.setScrollPosition({\r\n scrollTop: stackElement.scrollTop,\r\n scrollLeft: stackElement.scrollLeft\r\n });\r\n this._isCursorUndoRedo = false;\r\n }\r\n}\r\nCursorUndoRedoController.ID = 'editor.contrib.cursorUndoRedoController';\r\nexport class CursorUndo extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'cursorUndo',\r\n label: nls.localize('cursor.undo', \"Cursor Undo\"),\r\n alias: 'Cursor Undo',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 51 /* KEY_U */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n CursorUndoRedoController.get(editor).cursorUndo();\r\n }\r\n}\r\nexport class CursorRedo extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'cursorRedo',\r\n label: nls.localize('cursor.redo', \"Cursor Redo\"),\r\n alias: 'Cursor Redo',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n CursorUndoRedoController.get(editor).cursorRedo();\r\n }\r\n}\r\nregisterEditorContribution(CursorUndoRedoController.ID, CursorUndoRedoController);\r\nregisterEditorAction(CursorUndo);\r\nregisterEditorAction(CursorRedo);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { Range } from '../../common/core/range.js';\r\nexport class DragAndDropCommand {\r\n constructor(selection, targetPosition, copy) {\r\n this.selection = selection;\r\n this.targetPosition = targetPosition;\r\n this.copy = copy;\r\n this.targetSelection = null;\r\n }\r\n getEditOperations(model, builder) {\r\n let text = model.getValueInRange(this.selection);\r\n if (!this.copy) {\r\n builder.addEditOperation(this.selection, null);\r\n }\r\n builder.addEditOperation(new Range(this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column), text);\r\n if (this.selection.containsPosition(this.targetPosition) && !(this.copy && (this.selection.getEndPosition().equals(this.targetPosition) || this.selection.getStartPosition().equals(this.targetPosition)) // we allow users to paste content beside the selection\r\n )) {\r\n this.targetSelection = this.selection;\r\n return;\r\n }\r\n if (this.copy) {\r\n this.targetSelection = new Selection(this.targetPosition.lineNumber, this.targetPosition.column, this.selection.endLineNumber - this.selection.startLineNumber + this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\r\n this.targetPosition.column + this.selection.endColumn - this.selection.startColumn :\r\n this.selection.endColumn);\r\n return;\r\n }\r\n if (this.targetPosition.lineNumber > this.selection.endLineNumber) {\r\n // Drag the selection downwards\r\n this.targetSelection = new Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\r\n this.targetPosition.column + this.selection.endColumn - this.selection.startColumn :\r\n this.selection.endColumn);\r\n return;\r\n }\r\n if (this.targetPosition.lineNumber < this.selection.endLineNumber) {\r\n // Drag the selection upwards\r\n this.targetSelection = new Selection(this.targetPosition.lineNumber, this.targetPosition.column, this.targetPosition.lineNumber + this.selection.endLineNumber - this.selection.startLineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\r\n this.targetPosition.column + this.selection.endColumn - this.selection.startColumn :\r\n this.selection.endColumn);\r\n return;\r\n }\r\n // The target position is at the same line as the selection's end position.\r\n if (this.selection.endColumn <= this.targetPosition.column) {\r\n // The target position is after the selection's end position\r\n this.targetSelection = new Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\r\n this.targetPosition.column - this.selection.endColumn + this.selection.startColumn :\r\n this.targetPosition.column - this.selection.endColumn + this.selection.startColumn, this.targetPosition.lineNumber, this.selection.startLineNumber === this.selection.endLineNumber ?\r\n this.targetPosition.column :\r\n this.selection.endColumn);\r\n }\r\n else {\r\n // The target position is before the selection's end position. Since the selection doesn't contain the target position, the selection is one-line and target position is before this selection.\r\n this.targetSelection = new Selection(this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber, this.targetPosition.column, this.targetPosition.lineNumber, this.targetPosition.column + this.selection.endColumn - this.selection.startColumn);\r\n }\r\n }\r\n computeCursorState(model, helper) {\r\n return this.targetSelection;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './dnd.css';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { isMacintosh } from '../../../base/common/platform.js';\r\nimport { registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { DragAndDropCommand } from './dragAndDropCommand.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nfunction hasTriggerModifier(e) {\r\n if (isMacintosh) {\r\n return e.altKey;\r\n }\r\n else {\r\n return e.ctrlKey;\r\n }\r\n}\r\nexport class DragAndDropController extends Disposable {\r\n constructor(editor) {\r\n super();\r\n this._editor = editor;\r\n this._register(this._editor.onMouseDown((e) => this._onEditorMouseDown(e)));\r\n this._register(this._editor.onMouseUp((e) => this._onEditorMouseUp(e)));\r\n this._register(this._editor.onMouseDrag((e) => this._onEditorMouseDrag(e)));\r\n this._register(this._editor.onMouseDrop((e) => this._onEditorMouseDrop(e)));\r\n this._register(this._editor.onMouseDropCanceled(() => this._onEditorMouseDropCanceled()));\r\n this._register(this._editor.onKeyDown((e) => this.onEditorKeyDown(e)));\r\n this._register(this._editor.onKeyUp((e) => this.onEditorKeyUp(e)));\r\n this._register(this._editor.onDidBlurEditorWidget(() => this.onEditorBlur()));\r\n this._register(this._editor.onDidBlurEditorText(() => this.onEditorBlur()));\r\n this._dndDecorationIds = [];\r\n this._mouseDown = false;\r\n this._modifierPressed = false;\r\n this._dragSelection = null;\r\n }\r\n onEditorBlur() {\r\n this._removeDecoration();\r\n this._dragSelection = null;\r\n this._mouseDown = false;\r\n this._modifierPressed = false;\r\n }\r\n onEditorKeyDown(e) {\r\n if (!this._editor.getOption(27 /* dragAndDrop */) || this._editor.getOption(15 /* columnSelection */)) {\r\n return;\r\n }\r\n if (hasTriggerModifier(e)) {\r\n this._modifierPressed = true;\r\n }\r\n if (this._mouseDown && hasTriggerModifier(e)) {\r\n this._editor.updateOptions({\r\n mouseStyle: 'copy'\r\n });\r\n }\r\n }\r\n onEditorKeyUp(e) {\r\n if (!this._editor.getOption(27 /* dragAndDrop */) || this._editor.getOption(15 /* columnSelection */)) {\r\n return;\r\n }\r\n if (hasTriggerModifier(e)) {\r\n this._modifierPressed = false;\r\n }\r\n if (this._mouseDown && e.keyCode === DragAndDropController.TRIGGER_KEY_VALUE) {\r\n this._editor.updateOptions({\r\n mouseStyle: 'default'\r\n });\r\n }\r\n }\r\n _onEditorMouseDown(mouseEvent) {\r\n this._mouseDown = true;\r\n }\r\n _onEditorMouseUp(mouseEvent) {\r\n this._mouseDown = false;\r\n // Whenever users release the mouse, the drag and drop operation should finish and the cursor should revert to text.\r\n this._editor.updateOptions({\r\n mouseStyle: 'text'\r\n });\r\n }\r\n _onEditorMouseDrag(mouseEvent) {\r\n let target = mouseEvent.target;\r\n if (this._dragSelection === null) {\r\n const selections = this._editor.getSelections() || [];\r\n let possibleSelections = selections.filter(selection => target.position && selection.containsPosition(target.position));\r\n if (possibleSelections.length === 1) {\r\n this._dragSelection = possibleSelections[0];\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n if (hasTriggerModifier(mouseEvent.event)) {\r\n this._editor.updateOptions({\r\n mouseStyle: 'copy'\r\n });\r\n }\r\n else {\r\n this._editor.updateOptions({\r\n mouseStyle: 'default'\r\n });\r\n }\r\n if (target.position) {\r\n if (this._dragSelection.containsPosition(target.position)) {\r\n this._removeDecoration();\r\n }\r\n else {\r\n this.showAt(target.position);\r\n }\r\n }\r\n }\r\n _onEditorMouseDropCanceled() {\r\n this._editor.updateOptions({\r\n mouseStyle: 'text'\r\n });\r\n this._removeDecoration();\r\n this._dragSelection = null;\r\n this._mouseDown = false;\r\n }\r\n _onEditorMouseDrop(mouseEvent) {\r\n if (mouseEvent.target && (this._hitContent(mouseEvent.target) || this._hitMargin(mouseEvent.target)) && mouseEvent.target.position) {\r\n let newCursorPosition = new Position(mouseEvent.target.position.lineNumber, mouseEvent.target.position.column);\r\n if (this._dragSelection === null) {\r\n let newSelections = null;\r\n if (mouseEvent.event.shiftKey) {\r\n let primarySelection = this._editor.getSelection();\r\n if (primarySelection) {\r\n const { selectionStartLineNumber, selectionStartColumn } = primarySelection;\r\n newSelections = [new Selection(selectionStartLineNumber, selectionStartColumn, newCursorPosition.lineNumber, newCursorPosition.column)];\r\n }\r\n }\r\n else {\r\n newSelections = (this._editor.getSelections() || []).map(selection => {\r\n if (selection.containsPosition(newCursorPosition)) {\r\n return new Selection(newCursorPosition.lineNumber, newCursorPosition.column, newCursorPosition.lineNumber, newCursorPosition.column);\r\n }\r\n else {\r\n return selection;\r\n }\r\n });\r\n }\r\n // Use `mouse` as the source instead of `api` and setting the reason to explicit (to behave like any other mouse operation).\r\n this._editor.setSelections(newSelections || [], 'mouse', 3 /* Explicit */);\r\n }\r\n else if (!this._dragSelection.containsPosition(newCursorPosition) ||\r\n ((hasTriggerModifier(mouseEvent.event) ||\r\n this._modifierPressed) && (this._dragSelection.getEndPosition().equals(newCursorPosition) || this._dragSelection.getStartPosition().equals(newCursorPosition)) // we allow users to paste content beside the selection\r\n )) {\r\n this._editor.pushUndoStop();\r\n this._editor.executeCommand(DragAndDropController.ID, new DragAndDropCommand(this._dragSelection, newCursorPosition, hasTriggerModifier(mouseEvent.event) || this._modifierPressed));\r\n this._editor.pushUndoStop();\r\n }\r\n }\r\n this._editor.updateOptions({\r\n mouseStyle: 'text'\r\n });\r\n this._removeDecoration();\r\n this._dragSelection = null;\r\n this._mouseDown = false;\r\n }\r\n showAt(position) {\r\n let newDecorations = [{\r\n range: new Range(position.lineNumber, position.column, position.lineNumber, position.column),\r\n options: DragAndDropController._DECORATION_OPTIONS\r\n }];\r\n this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, newDecorations);\r\n this._editor.revealPosition(position, 1 /* Immediate */);\r\n }\r\n _removeDecoration() {\r\n this._dndDecorationIds = this._editor.deltaDecorations(this._dndDecorationIds, []);\r\n }\r\n _hitContent(target) {\r\n return target.type === 6 /* CONTENT_TEXT */ ||\r\n target.type === 7 /* CONTENT_EMPTY */;\r\n }\r\n _hitMargin(target) {\r\n return target.type === 2 /* GUTTER_GLYPH_MARGIN */ ||\r\n target.type === 3 /* GUTTER_LINE_NUMBERS */ ||\r\n target.type === 4 /* GUTTER_LINE_DECORATIONS */;\r\n }\r\n dispose() {\r\n this._removeDecoration();\r\n this._dragSelection = null;\r\n this._mouseDown = false;\r\n this._modifierPressed = false;\r\n super.dispose();\r\n }\r\n}\r\nDragAndDropController.ID = 'editor.contrib.dragAndDrop';\r\nDragAndDropController.TRIGGER_KEY_VALUE = isMacintosh ? 6 /* Alt */ : 5 /* Ctrl */;\r\nDragAndDropController._DECORATION_OPTIONS = ModelDecorationOptions.register({\r\n className: 'dnd-target'\r\n});\r\nregisterEditorContribution(DragAndDropController.ID, DragAndDropController);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Range } from '../../common/core/range.js';\r\nimport { OverviewRulerLane, MinimapPosition } from '../../common/model.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { overviewRulerFindMatchForeground, minimapFindMatch } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { themeColorFromId } from '../../../platform/theme/common/themeService.js';\r\nexport class FindDecorations {\r\n constructor(editor) {\r\n this._editor = editor;\r\n this._decorations = [];\r\n this._overviewRulerApproximateDecorations = [];\r\n this._findScopeDecorationIds = [];\r\n this._rangeHighlightDecorationId = null;\r\n this._highlightedDecorationId = null;\r\n this._startPosition = this._editor.getPosition();\r\n }\r\n dispose() {\r\n this._editor.deltaDecorations(this._allDecorations(), []);\r\n this._decorations = [];\r\n this._overviewRulerApproximateDecorations = [];\r\n this._findScopeDecorationIds = [];\r\n this._rangeHighlightDecorationId = null;\r\n this._highlightedDecorationId = null;\r\n }\r\n reset() {\r\n this._decorations = [];\r\n this._overviewRulerApproximateDecorations = [];\r\n this._findScopeDecorationIds = [];\r\n this._rangeHighlightDecorationId = null;\r\n this._highlightedDecorationId = null;\r\n }\r\n getCount() {\r\n return this._decorations.length;\r\n }\r\n /** @deprecated use getFindScopes to support multiple selections */\r\n getFindScope() {\r\n if (this._findScopeDecorationIds[0]) {\r\n return this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]);\r\n }\r\n return null;\r\n }\r\n getFindScopes() {\r\n if (this._findScopeDecorationIds.length) {\r\n const scopes = this._findScopeDecorationIds.map(findScopeDecorationId => this._editor.getModel().getDecorationRange(findScopeDecorationId)).filter(element => !!element);\r\n if (scopes.length) {\r\n return scopes;\r\n }\r\n }\r\n return null;\r\n }\r\n getStartPosition() {\r\n return this._startPosition;\r\n }\r\n setStartPosition(newStartPosition) {\r\n this._startPosition = newStartPosition;\r\n this.setCurrentFindMatch(null);\r\n }\r\n _getDecorationIndex(decorationId) {\r\n const index = this._decorations.indexOf(decorationId);\r\n if (index >= 0) {\r\n return index + 1;\r\n }\r\n return 1;\r\n }\r\n getCurrentMatchesPosition(desiredRange) {\r\n let candidates = this._editor.getModel().getDecorationsInRange(desiredRange);\r\n for (const candidate of candidates) {\r\n const candidateOpts = candidate.options;\r\n if (candidateOpts === FindDecorations._FIND_MATCH_DECORATION || candidateOpts === FindDecorations._CURRENT_FIND_MATCH_DECORATION) {\r\n return this._getDecorationIndex(candidate.id);\r\n }\r\n }\r\n // We don't know the current match position, so returns zero to show '?' in find widget\r\n return 0;\r\n }\r\n setCurrentFindMatch(nextMatch) {\r\n let newCurrentDecorationId = null;\r\n let matchPosition = 0;\r\n if (nextMatch) {\r\n for (let i = 0, len = this._decorations.length; i < len; i++) {\r\n let range = this._editor.getModel().getDecorationRange(this._decorations[i]);\r\n if (nextMatch.equalsRange(range)) {\r\n newCurrentDecorationId = this._decorations[i];\r\n matchPosition = (i + 1);\r\n break;\r\n }\r\n }\r\n }\r\n if (this._highlightedDecorationId !== null || newCurrentDecorationId !== null) {\r\n this._editor.changeDecorations((changeAccessor) => {\r\n if (this._highlightedDecorationId !== null) {\r\n changeAccessor.changeDecorationOptions(this._highlightedDecorationId, FindDecorations._FIND_MATCH_DECORATION);\r\n this._highlightedDecorationId = null;\r\n }\r\n if (newCurrentDecorationId !== null) {\r\n this._highlightedDecorationId = newCurrentDecorationId;\r\n changeAccessor.changeDecorationOptions(this._highlightedDecorationId, FindDecorations._CURRENT_FIND_MATCH_DECORATION);\r\n }\r\n if (this._rangeHighlightDecorationId !== null) {\r\n changeAccessor.removeDecoration(this._rangeHighlightDecorationId);\r\n this._rangeHighlightDecorationId = null;\r\n }\r\n if (newCurrentDecorationId !== null) {\r\n let rng = this._editor.getModel().getDecorationRange(newCurrentDecorationId);\r\n if (rng.startLineNumber !== rng.endLineNumber && rng.endColumn === 1) {\r\n let lineBeforeEnd = rng.endLineNumber - 1;\r\n let lineBeforeEndMaxColumn = this._editor.getModel().getLineMaxColumn(lineBeforeEnd);\r\n rng = new Range(rng.startLineNumber, rng.startColumn, lineBeforeEnd, lineBeforeEndMaxColumn);\r\n }\r\n this._rangeHighlightDecorationId = changeAccessor.addDecoration(rng, FindDecorations._RANGE_HIGHLIGHT_DECORATION);\r\n }\r\n });\r\n }\r\n return matchPosition;\r\n }\r\n set(findMatches, findScopes) {\r\n this._editor.changeDecorations((accessor) => {\r\n let findMatchesOptions = FindDecorations._FIND_MATCH_DECORATION;\r\n let newOverviewRulerApproximateDecorations = [];\r\n if (findMatches.length > 1000) {\r\n // we go into a mode where the overview ruler gets \"approximate\" decorations\r\n // the reason is that the overview ruler paints all the decorations in the file and we don't want to cause freezes\r\n findMatchesOptions = FindDecorations._FIND_MATCH_NO_OVERVIEW_DECORATION;\r\n // approximate a distance in lines where matches should be merged\r\n const lineCount = this._editor.getModel().getLineCount();\r\n const height = this._editor.getLayoutInfo().height;\r\n const approxPixelsPerLine = height / lineCount;\r\n const mergeLinesDelta = Math.max(2, Math.ceil(3 / approxPixelsPerLine));\r\n // merge decorations as much as possible\r\n let prevStartLineNumber = findMatches[0].range.startLineNumber;\r\n let prevEndLineNumber = findMatches[0].range.endLineNumber;\r\n for (let i = 1, len = findMatches.length; i < len; i++) {\r\n const range = findMatches[i].range;\r\n if (prevEndLineNumber + mergeLinesDelta >= range.startLineNumber) {\r\n if (range.endLineNumber > prevEndLineNumber) {\r\n prevEndLineNumber = range.endLineNumber;\r\n }\r\n }\r\n else {\r\n newOverviewRulerApproximateDecorations.push({\r\n range: new Range(prevStartLineNumber, 1, prevEndLineNumber, 1),\r\n options: FindDecorations._FIND_MATCH_ONLY_OVERVIEW_DECORATION\r\n });\r\n prevStartLineNumber = range.startLineNumber;\r\n prevEndLineNumber = range.endLineNumber;\r\n }\r\n }\r\n newOverviewRulerApproximateDecorations.push({\r\n range: new Range(prevStartLineNumber, 1, prevEndLineNumber, 1),\r\n options: FindDecorations._FIND_MATCH_ONLY_OVERVIEW_DECORATION\r\n });\r\n }\r\n // Find matches\r\n let newFindMatchesDecorations = new Array(findMatches.length);\r\n for (let i = 0, len = findMatches.length; i < len; i++) {\r\n newFindMatchesDecorations[i] = {\r\n range: findMatches[i].range,\r\n options: findMatchesOptions\r\n };\r\n }\r\n this._decorations = accessor.deltaDecorations(this._decorations, newFindMatchesDecorations);\r\n // Overview ruler approximate decorations\r\n this._overviewRulerApproximateDecorations = accessor.deltaDecorations(this._overviewRulerApproximateDecorations, newOverviewRulerApproximateDecorations);\r\n // Range highlight\r\n if (this._rangeHighlightDecorationId) {\r\n accessor.removeDecoration(this._rangeHighlightDecorationId);\r\n this._rangeHighlightDecorationId = null;\r\n }\r\n // Find scope\r\n if (this._findScopeDecorationIds.length) {\r\n this._findScopeDecorationIds.forEach(findScopeDecorationId => accessor.removeDecoration(findScopeDecorationId));\r\n this._findScopeDecorationIds = [];\r\n }\r\n if (findScopes === null || findScopes === void 0 ? void 0 : findScopes.length) {\r\n this._findScopeDecorationIds = findScopes.map(findScope => accessor.addDecoration(findScope, FindDecorations._FIND_SCOPE_DECORATION));\r\n }\r\n });\r\n }\r\n matchBeforePosition(position) {\r\n if (this._decorations.length === 0) {\r\n return null;\r\n }\r\n for (let i = this._decorations.length - 1; i >= 0; i--) {\r\n let decorationId = this._decorations[i];\r\n let r = this._editor.getModel().getDecorationRange(decorationId);\r\n if (!r || r.endLineNumber > position.lineNumber) {\r\n continue;\r\n }\r\n if (r.endLineNumber < position.lineNumber) {\r\n return r;\r\n }\r\n if (r.endColumn > position.column) {\r\n continue;\r\n }\r\n return r;\r\n }\r\n return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length - 1]);\r\n }\r\n matchAfterPosition(position) {\r\n if (this._decorations.length === 0) {\r\n return null;\r\n }\r\n for (let i = 0, len = this._decorations.length; i < len; i++) {\r\n let decorationId = this._decorations[i];\r\n let r = this._editor.getModel().getDecorationRange(decorationId);\r\n if (!r || r.startLineNumber < position.lineNumber) {\r\n continue;\r\n }\r\n if (r.startLineNumber > position.lineNumber) {\r\n return r;\r\n }\r\n if (r.startColumn < position.column) {\r\n continue;\r\n }\r\n return r;\r\n }\r\n return this._editor.getModel().getDecorationRange(this._decorations[0]);\r\n }\r\n _allDecorations() {\r\n let result = [];\r\n result = result.concat(this._decorations);\r\n result = result.concat(this._overviewRulerApproximateDecorations);\r\n if (this._findScopeDecorationIds.length) {\r\n result.push(...this._findScopeDecorationIds);\r\n }\r\n if (this._rangeHighlightDecorationId) {\r\n result.push(this._rangeHighlightDecorationId);\r\n }\r\n return result;\r\n }\r\n}\r\nFindDecorations._CURRENT_FIND_MATCH_DECORATION = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n zIndex: 13,\r\n className: 'currentFindMatch',\r\n showIfCollapsed: true,\r\n overviewRuler: {\r\n color: themeColorFromId(overviewRulerFindMatchForeground),\r\n position: OverviewRulerLane.Center\r\n },\r\n minimap: {\r\n color: themeColorFromId(minimapFindMatch),\r\n position: MinimapPosition.Inline\r\n }\r\n});\r\nFindDecorations._FIND_MATCH_DECORATION = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'findMatch',\r\n showIfCollapsed: true,\r\n overviewRuler: {\r\n color: themeColorFromId(overviewRulerFindMatchForeground),\r\n position: OverviewRulerLane.Center\r\n },\r\n minimap: {\r\n color: themeColorFromId(minimapFindMatch),\r\n position: MinimapPosition.Inline\r\n }\r\n});\r\nFindDecorations._FIND_MATCH_NO_OVERVIEW_DECORATION = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'findMatch',\r\n showIfCollapsed: true\r\n});\r\nFindDecorations._FIND_MATCH_ONLY_OVERVIEW_DECORATION = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n overviewRuler: {\r\n color: themeColorFromId(overviewRulerFindMatchForeground),\r\n position: OverviewRulerLane.Center\r\n }\r\n});\r\nFindDecorations._RANGE_HIGHLIGHT_DECORATION = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'rangeHighlight',\r\n isWholeLine: true\r\n});\r\nFindDecorations._FIND_SCOPE_DECORATION = ModelDecorationOptions.register({\r\n className: 'findScope',\r\n isWholeLine: true\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Range } from '../../common/core/range.js';\r\nexport class ReplaceAllCommand {\r\n constructor(editorSelection, ranges, replaceStrings) {\r\n this._editorSelection = editorSelection;\r\n this._ranges = ranges;\r\n this._replaceStrings = replaceStrings;\r\n this._trackedEditorSelectionId = null;\r\n }\r\n getEditOperations(model, builder) {\r\n if (this._ranges.length > 0) {\r\n // Collect all edit operations\r\n let ops = [];\r\n for (let i = 0; i < this._ranges.length; i++) {\r\n ops.push({\r\n range: this._ranges[i],\r\n text: this._replaceStrings[i]\r\n });\r\n }\r\n // Sort them in ascending order by range starts\r\n ops.sort((o1, o2) => {\r\n return Range.compareRangesUsingStarts(o1.range, o2.range);\r\n });\r\n // Merge operations that touch each other\r\n let resultOps = [];\r\n let previousOp = ops[0];\r\n for (let i = 1; i < ops.length; i++) {\r\n if (previousOp.range.endLineNumber === ops[i].range.startLineNumber && previousOp.range.endColumn === ops[i].range.startColumn) {\r\n // These operations are one after another and can be merged\r\n previousOp.range = previousOp.range.plusRange(ops[i].range);\r\n previousOp.text = previousOp.text + ops[i].text;\r\n }\r\n else {\r\n resultOps.push(previousOp);\r\n previousOp = ops[i];\r\n }\r\n }\r\n resultOps.push(previousOp);\r\n for (const op of resultOps) {\r\n builder.addEditOperation(op.range, op.text);\r\n }\r\n }\r\n this._trackedEditorSelectionId = builder.trackSelection(this._editorSelection);\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this._trackedEditorSelectionId);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as strings from './strings.js';\r\nexport function buildReplaceStringWithCasePreserved(matches, pattern) {\r\n if (matches && (matches[0] !== '')) {\r\n const containsHyphens = validateSpecificSpecialCharacter(matches, pattern, '-');\r\n const containsUnderscores = validateSpecificSpecialCharacter(matches, pattern, '_');\r\n if (containsHyphens && !containsUnderscores) {\r\n return buildReplaceStringForSpecificSpecialCharacter(matches, pattern, '-');\r\n }\r\n else if (!containsHyphens && containsUnderscores) {\r\n return buildReplaceStringForSpecificSpecialCharacter(matches, pattern, '_');\r\n }\r\n if (matches[0].toUpperCase() === matches[0]) {\r\n return pattern.toUpperCase();\r\n }\r\n else if (matches[0].toLowerCase() === matches[0]) {\r\n return pattern.toLowerCase();\r\n }\r\n else if (strings.containsUppercaseCharacter(matches[0][0]) && pattern.length > 0) {\r\n return pattern[0].toUpperCase() + pattern.substr(1);\r\n }\r\n else {\r\n // we don't understand its pattern yet.\r\n return pattern;\r\n }\r\n }\r\n else {\r\n return pattern;\r\n }\r\n}\r\nfunction validateSpecificSpecialCharacter(matches, pattern, specialCharacter) {\r\n const doesContainSpecialCharacter = matches[0].indexOf(specialCharacter) !== -1 && pattern.indexOf(specialCharacter) !== -1;\r\n return doesContainSpecialCharacter && matches[0].split(specialCharacter).length === pattern.split(specialCharacter).length;\r\n}\r\nfunction buildReplaceStringForSpecificSpecialCharacter(matches, pattern, specialCharacter) {\r\n const splitPatternAtSpecialCharacter = pattern.split(specialCharacter);\r\n const splitMatchAtSpecialCharacter = matches[0].split(specialCharacter);\r\n let replaceString = '';\r\n splitPatternAtSpecialCharacter.forEach((splitValue, index) => {\r\n replaceString += buildReplaceStringWithCasePreserved([splitMatchAtSpecialCharacter[index]], splitValue) + specialCharacter;\r\n });\r\n return replaceString.slice(0, -1);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { buildReplaceStringWithCasePreserved } from '../../../base/common/search.js';\r\n/**\r\n * Assigned when the replace pattern is entirely static.\r\n */\r\nclass StaticValueReplacePattern {\r\n constructor(staticValue) {\r\n this.staticValue = staticValue;\r\n this.kind = 0 /* StaticValue */;\r\n }\r\n}\r\n/**\r\n * Assigned when the replace pattern has replacement patterns.\r\n */\r\nclass DynamicPiecesReplacePattern {\r\n constructor(pieces) {\r\n this.pieces = pieces;\r\n this.kind = 1 /* DynamicPieces */;\r\n }\r\n}\r\nexport class ReplacePattern {\r\n constructor(pieces) {\r\n if (!pieces || pieces.length === 0) {\r\n this._state = new StaticValueReplacePattern('');\r\n }\r\n else if (pieces.length === 1 && pieces[0].staticValue !== null) {\r\n this._state = new StaticValueReplacePattern(pieces[0].staticValue);\r\n }\r\n else {\r\n this._state = new DynamicPiecesReplacePattern(pieces);\r\n }\r\n }\r\n static fromStaticValue(value) {\r\n return new ReplacePattern([ReplacePiece.staticValue(value)]);\r\n }\r\n get hasReplacementPatterns() {\r\n return (this._state.kind === 1 /* DynamicPieces */);\r\n }\r\n buildReplaceString(matches, preserveCase) {\r\n if (this._state.kind === 0 /* StaticValue */) {\r\n if (preserveCase) {\r\n return buildReplaceStringWithCasePreserved(matches, this._state.staticValue);\r\n }\r\n else {\r\n return this._state.staticValue;\r\n }\r\n }\r\n let result = '';\r\n for (let i = 0, len = this._state.pieces.length; i < len; i++) {\r\n let piece = this._state.pieces[i];\r\n if (piece.staticValue !== null) {\r\n // static value ReplacePiece\r\n result += piece.staticValue;\r\n continue;\r\n }\r\n // match index ReplacePiece\r\n let match = ReplacePattern._substitute(piece.matchIndex, matches);\r\n if (piece.caseOps !== null && piece.caseOps.length > 0) {\r\n let repl = [];\r\n let lenOps = piece.caseOps.length;\r\n let opIdx = 0;\r\n for (let idx = 0, len = match.length; idx < len; idx++) {\r\n if (opIdx >= lenOps) {\r\n repl.push(match.slice(idx));\r\n break;\r\n }\r\n switch (piece.caseOps[opIdx]) {\r\n case 'U':\r\n repl.push(match[idx].toUpperCase());\r\n break;\r\n case 'u':\r\n repl.push(match[idx].toUpperCase());\r\n opIdx++;\r\n break;\r\n case 'L':\r\n repl.push(match[idx].toLowerCase());\r\n break;\r\n case 'l':\r\n repl.push(match[idx].toLowerCase());\r\n opIdx++;\r\n break;\r\n default:\r\n repl.push(match[idx]);\r\n }\r\n }\r\n match = repl.join('');\r\n }\r\n result += match;\r\n }\r\n return result;\r\n }\r\n static _substitute(matchIndex, matches) {\r\n if (matches === null) {\r\n return '';\r\n }\r\n if (matchIndex === 0) {\r\n return matches[0];\r\n }\r\n let remainder = '';\r\n while (matchIndex > 0) {\r\n if (matchIndex < matches.length) {\r\n // A match can be undefined\r\n let match = (matches[matchIndex] || '');\r\n return match + remainder;\r\n }\r\n remainder = String(matchIndex % 10) + remainder;\r\n matchIndex = Math.floor(matchIndex / 10);\r\n }\r\n return '$' + remainder;\r\n }\r\n}\r\n/**\r\n * A replace piece can either be a static string or an index to a specific match.\r\n */\r\nexport class ReplacePiece {\r\n constructor(staticValue, matchIndex, caseOps) {\r\n this.staticValue = staticValue;\r\n this.matchIndex = matchIndex;\r\n if (!caseOps || caseOps.length === 0) {\r\n this.caseOps = null;\r\n }\r\n else {\r\n this.caseOps = caseOps.slice(0);\r\n }\r\n }\r\n static staticValue(value) {\r\n return new ReplacePiece(value, -1, null);\r\n }\r\n static caseOps(index, caseOps) {\r\n return new ReplacePiece(null, index, caseOps);\r\n }\r\n}\r\nclass ReplacePieceBuilder {\r\n constructor(source) {\r\n this._source = source;\r\n this._lastCharIndex = 0;\r\n this._result = [];\r\n this._resultLen = 0;\r\n this._currentStaticPiece = '';\r\n }\r\n emitUnchanged(toCharIndex) {\r\n this._emitStatic(this._source.substring(this._lastCharIndex, toCharIndex));\r\n this._lastCharIndex = toCharIndex;\r\n }\r\n emitStatic(value, toCharIndex) {\r\n this._emitStatic(value);\r\n this._lastCharIndex = toCharIndex;\r\n }\r\n _emitStatic(value) {\r\n if (value.length === 0) {\r\n return;\r\n }\r\n this._currentStaticPiece += value;\r\n }\r\n emitMatchIndex(index, toCharIndex, caseOps) {\r\n if (this._currentStaticPiece.length !== 0) {\r\n this._result[this._resultLen++] = ReplacePiece.staticValue(this._currentStaticPiece);\r\n this._currentStaticPiece = '';\r\n }\r\n this._result[this._resultLen++] = ReplacePiece.caseOps(index, caseOps);\r\n this._lastCharIndex = toCharIndex;\r\n }\r\n finalize() {\r\n this.emitUnchanged(this._source.length);\r\n if (this._currentStaticPiece.length !== 0) {\r\n this._result[this._resultLen++] = ReplacePiece.staticValue(this._currentStaticPiece);\r\n this._currentStaticPiece = '';\r\n }\r\n return new ReplacePattern(this._result);\r\n }\r\n}\r\n/**\r\n * \\n\t\t\t=> inserts a LF\r\n * \\t\t\t\t=> inserts a TAB\r\n * \\\\\t\t\t=> inserts a \"\\\".\r\n * \\u\t\t\t=> upper-cases one character in a match.\r\n * \\U\t\t\t=> upper-cases ALL remaining characters in a match.\r\n * \\l\t\t\t=> lower-cases one character in a match.\r\n * \\L\t\t\t=> lower-cases ALL remaining characters in a match.\r\n * $$\t\t\t=> inserts a \"$\".\r\n * $& and $0\t=> inserts the matched substring.\r\n * $n\t\t\t=> Where n is a non-negative integer lesser than 100, inserts the nth parenthesized submatch string\r\n * everything else stays untouched\r\n *\r\n * Also see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter\r\n */\r\nexport function parseReplaceString(replaceString) {\r\n if (!replaceString || replaceString.length === 0) {\r\n return new ReplacePattern(null);\r\n }\r\n let caseOps = [];\r\n let result = new ReplacePieceBuilder(replaceString);\r\n for (let i = 0, len = replaceString.length; i < len; i++) {\r\n let chCode = replaceString.charCodeAt(i);\r\n if (chCode === 92 /* Backslash */) {\r\n // move to next char\r\n i++;\r\n if (i >= len) {\r\n // string ends with a \\\r\n break;\r\n }\r\n let nextChCode = replaceString.charCodeAt(i);\r\n // let replaceWithCharacter: string | null = null;\r\n switch (nextChCode) {\r\n case 92 /* Backslash */:\r\n // \\\\ => inserts a \"\\\"\r\n result.emitUnchanged(i - 1);\r\n result.emitStatic('\\\\', i + 1);\r\n break;\r\n case 110 /* n */:\r\n // \\n => inserts a LF\r\n result.emitUnchanged(i - 1);\r\n result.emitStatic('\\n', i + 1);\r\n break;\r\n case 116 /* t */:\r\n // \\t => inserts a TAB\r\n result.emitUnchanged(i - 1);\r\n result.emitStatic('\\t', i + 1);\r\n break;\r\n // Case modification of string replacements, patterned after Boost, but only applied\r\n // to the replacement text, not subsequent content.\r\n case 117 /* u */:\r\n // \\u => upper-cases one character.\r\n case 85 /* U */:\r\n // \\U => upper-cases ALL following characters.\r\n case 108 /* l */:\r\n // \\l => lower-cases one character.\r\n case 76 /* L */:\r\n // \\L => lower-cases ALL following characters.\r\n result.emitUnchanged(i - 1);\r\n result.emitStatic('', i + 1);\r\n caseOps.push(String.fromCharCode(nextChCode));\r\n break;\r\n }\r\n continue;\r\n }\r\n if (chCode === 36 /* DollarSign */) {\r\n // move to next char\r\n i++;\r\n if (i >= len) {\r\n // string ends with a $\r\n break;\r\n }\r\n let nextChCode = replaceString.charCodeAt(i);\r\n if (nextChCode === 36 /* DollarSign */) {\r\n // $$ => inserts a \"$\"\r\n result.emitUnchanged(i - 1);\r\n result.emitStatic('$', i + 1);\r\n continue;\r\n }\r\n if (nextChCode === 48 /* Digit0 */ || nextChCode === 38 /* Ampersand */) {\r\n // $& and $0 => inserts the matched substring.\r\n result.emitUnchanged(i - 1);\r\n result.emitMatchIndex(0, i + 1, caseOps);\r\n caseOps.length = 0;\r\n continue;\r\n }\r\n if (49 /* Digit1 */ <= nextChCode && nextChCode <= 57 /* Digit9 */) {\r\n // $n\r\n let matchIndex = nextChCode - 48 /* Digit0 */;\r\n // peek next char to probe for $nn\r\n if (i + 1 < len) {\r\n let nextNextChCode = replaceString.charCodeAt(i + 1);\r\n if (48 /* Digit0 */ <= nextNextChCode && nextNextChCode <= 57 /* Digit9 */) {\r\n // $nn\r\n // move to next char\r\n i++;\r\n matchIndex = matchIndex * 10 + (nextNextChCode - 48 /* Digit0 */);\r\n result.emitUnchanged(i - 2);\r\n result.emitMatchIndex(matchIndex, i + 1, caseOps);\r\n caseOps.length = 0;\r\n continue;\r\n }\r\n }\r\n result.emitUnchanged(i - 1);\r\n result.emitMatchIndex(matchIndex, i + 1, caseOps);\r\n caseOps.length = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n return result.finalize();\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { RunOnceScheduler, TimeoutTimer } from '../../../base/common/async.js';\r\nimport { dispose, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { ReplaceCommand, ReplaceCommandThatPreservesSelection } from '../../common/commands/replaceCommand.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { SearchParams } from '../../common/model/textModelSearch.js';\r\nimport { FindDecorations } from './findDecorations.js';\r\nimport { ReplaceAllCommand } from './replaceAllCommand.js';\r\nimport { ReplacePattern, parseReplaceString } from './replacePattern.js';\r\nimport { RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { findFirstInSorted } from '../../../base/common/arrays.js';\r\nexport const CONTEXT_FIND_WIDGET_VISIBLE = new RawContextKey('findWidgetVisible', false);\r\n// Keep ContextKey use of 'Focussed' to not break when clauses\r\nexport const CONTEXT_FIND_INPUT_FOCUSED = new RawContextKey('findInputFocussed', false);\r\nexport const CONTEXT_REPLACE_INPUT_FOCUSED = new RawContextKey('replaceInputFocussed', false);\r\nexport const ToggleCaseSensitiveKeybinding = {\r\n primary: 512 /* Alt */ | 33 /* KEY_C */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 33 /* KEY_C */ }\r\n};\r\nexport const ToggleWholeWordKeybinding = {\r\n primary: 512 /* Alt */ | 53 /* KEY_W */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 53 /* KEY_W */ }\r\n};\r\nexport const ToggleRegexKeybinding = {\r\n primary: 512 /* Alt */ | 48 /* KEY_R */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 48 /* KEY_R */ }\r\n};\r\nexport const ToggleSearchScopeKeybinding = {\r\n primary: 512 /* Alt */ | 42 /* KEY_L */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 42 /* KEY_L */ }\r\n};\r\nexport const TogglePreserveCaseKeybinding = {\r\n primary: 512 /* Alt */ | 46 /* KEY_P */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 46 /* KEY_P */ }\r\n};\r\nexport const FIND_IDS = {\r\n StartFindAction: 'actions.find',\r\n StartFindWithSelection: 'actions.findWithSelection',\r\n NextMatchFindAction: 'editor.action.nextMatchFindAction',\r\n PreviousMatchFindAction: 'editor.action.previousMatchFindAction',\r\n NextSelectionMatchFindAction: 'editor.action.nextSelectionMatchFindAction',\r\n PreviousSelectionMatchFindAction: 'editor.action.previousSelectionMatchFindAction',\r\n StartFindReplaceAction: 'editor.action.startFindReplaceAction',\r\n CloseFindWidgetCommand: 'closeFindWidget',\r\n ToggleCaseSensitiveCommand: 'toggleFindCaseSensitive',\r\n ToggleWholeWordCommand: 'toggleFindWholeWord',\r\n ToggleRegexCommand: 'toggleFindRegex',\r\n ToggleSearchScopeCommand: 'toggleFindInSelection',\r\n TogglePreserveCaseCommand: 'togglePreserveCase',\r\n ReplaceOneAction: 'editor.action.replaceOne',\r\n ReplaceAllAction: 'editor.action.replaceAll',\r\n SelectAllMatchesAction: 'editor.action.selectAllMatches'\r\n};\r\nexport const MATCHES_LIMIT = 19999;\r\nconst RESEARCH_DELAY = 240;\r\nexport class FindModelBoundToEditorModel {\r\n constructor(editor, state) {\r\n this._toDispose = new DisposableStore();\r\n this._editor = editor;\r\n this._state = state;\r\n this._isDisposed = false;\r\n this._startSearchingTimer = new TimeoutTimer();\r\n this._decorations = new FindDecorations(editor);\r\n this._toDispose.add(this._decorations);\r\n this._updateDecorationsScheduler = new RunOnceScheduler(() => this.research(false), 100);\r\n this._toDispose.add(this._updateDecorationsScheduler);\r\n this._toDispose.add(this._editor.onDidChangeCursorPosition((e) => {\r\n if (e.reason === 3 /* Explicit */\r\n || e.reason === 5 /* Undo */\r\n || e.reason === 6 /* Redo */) {\r\n this._decorations.setStartPosition(this._editor.getPosition());\r\n }\r\n }));\r\n this._ignoreModelContentChanged = false;\r\n this._toDispose.add(this._editor.onDidChangeModelContent((e) => {\r\n if (this._ignoreModelContentChanged) {\r\n return;\r\n }\r\n if (e.isFlush) {\r\n // a model.setValue() was called\r\n this._decorations.reset();\r\n }\r\n this._decorations.setStartPosition(this._editor.getPosition());\r\n this._updateDecorationsScheduler.schedule();\r\n }));\r\n this._toDispose.add(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e)));\r\n this.research(false, this._state.searchScope);\r\n }\r\n dispose() {\r\n this._isDisposed = true;\r\n dispose(this._startSearchingTimer);\r\n this._toDispose.dispose();\r\n }\r\n _onStateChanged(e) {\r\n if (this._isDisposed) {\r\n // The find model is disposed during a find state changed event\r\n return;\r\n }\r\n if (!this._editor.hasModel()) {\r\n // The find model will be disposed momentarily\r\n return;\r\n }\r\n if (e.searchString || e.isReplaceRevealed || e.isRegex || e.wholeWord || e.matchCase || e.searchScope) {\r\n let model = this._editor.getModel();\r\n if (model.isTooLargeForSyncing()) {\r\n this._startSearchingTimer.cancel();\r\n this._startSearchingTimer.setIfNotSet(() => {\r\n if (e.searchScope) {\r\n this.research(e.moveCursor, this._state.searchScope);\r\n }\r\n else {\r\n this.research(e.moveCursor);\r\n }\r\n }, RESEARCH_DELAY);\r\n }\r\n else {\r\n if (e.searchScope) {\r\n this.research(e.moveCursor, this._state.searchScope);\r\n }\r\n else {\r\n this.research(e.moveCursor);\r\n }\r\n }\r\n }\r\n }\r\n static _getSearchRange(model, findScope) {\r\n // If we have set now or before a find scope, use it for computing the search range\r\n if (findScope) {\r\n return findScope;\r\n }\r\n return model.getFullModelRange();\r\n }\r\n research(moveCursor, newFindScope) {\r\n let findScopes = null;\r\n if (typeof newFindScope !== 'undefined') {\r\n if (newFindScope !== null) {\r\n if (!Array.isArray(newFindScope)) {\r\n findScopes = [newFindScope];\r\n }\r\n else {\r\n findScopes = newFindScope;\r\n }\r\n }\r\n }\r\n else {\r\n findScopes = this._decorations.getFindScopes();\r\n }\r\n if (findScopes !== null) {\r\n findScopes = findScopes.map(findScope => {\r\n if (findScope.startLineNumber !== findScope.endLineNumber) {\r\n let endLineNumber = findScope.endLineNumber;\r\n if (findScope.endColumn === 1) {\r\n endLineNumber = endLineNumber - 1;\r\n }\r\n return new Range(findScope.startLineNumber, 1, endLineNumber, this._editor.getModel().getLineMaxColumn(endLineNumber));\r\n }\r\n return findScope;\r\n });\r\n }\r\n let findMatches = this._findMatches(findScopes, false, MATCHES_LIMIT);\r\n this._decorations.set(findMatches, findScopes);\r\n const editorSelection = this._editor.getSelection();\r\n let currentMatchesPosition = this._decorations.getCurrentMatchesPosition(editorSelection);\r\n if (currentMatchesPosition === 0 && findMatches.length > 0) {\r\n // current selection is not on top of a match\r\n // try to find its nearest result from the top of the document\r\n const matchAfterSelection = findFirstInSorted(findMatches.map(match => match.range), range => Range.compareRangesUsingStarts(range, editorSelection) >= 0);\r\n currentMatchesPosition = matchAfterSelection > 0 ? matchAfterSelection - 1 + 1 /** match position is one based */ : currentMatchesPosition;\r\n }\r\n this._state.changeMatchInfo(currentMatchesPosition, this._decorations.getCount(), undefined);\r\n if (moveCursor && this._editor.getOption(31 /* find */).cursorMoveOnType) {\r\n this._moveToNextMatch(this._decorations.getStartPosition());\r\n }\r\n }\r\n _hasMatches() {\r\n return (this._state.matchesCount > 0);\r\n }\r\n _cannotFind() {\r\n if (!this._hasMatches()) {\r\n let findScope = this._decorations.getFindScope();\r\n if (findScope) {\r\n // Reveal the selection so user is reminded that 'selection find' is on.\r\n this._editor.revealRangeInCenterIfOutsideViewport(findScope, 0 /* Smooth */);\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n _setCurrentFindMatch(match) {\r\n let matchesPosition = this._decorations.setCurrentFindMatch(match);\r\n this._state.changeMatchInfo(matchesPosition, this._decorations.getCount(), match);\r\n this._editor.setSelection(match);\r\n this._editor.revealRangeInCenterIfOutsideViewport(match, 0 /* Smooth */);\r\n }\r\n _prevSearchPosition(before) {\r\n let isUsingLineStops = this._state.isRegex && (this._state.searchString.indexOf('^') >= 0\r\n || this._state.searchString.indexOf('$') >= 0);\r\n let { lineNumber, column } = before;\r\n let model = this._editor.getModel();\r\n if (isUsingLineStops || column === 1) {\r\n if (lineNumber === 1) {\r\n lineNumber = model.getLineCount();\r\n }\r\n else {\r\n lineNumber--;\r\n }\r\n column = model.getLineMaxColumn(lineNumber);\r\n }\r\n else {\r\n column--;\r\n }\r\n return new Position(lineNumber, column);\r\n }\r\n _moveToPrevMatch(before, isRecursed = false) {\r\n if (!this._state.canNavigateBack()) {\r\n // we are beyond the first matched find result\r\n // instead of doing nothing, we should refocus the first item\r\n const nextMatchRange = this._decorations.matchAfterPosition(before);\r\n if (nextMatchRange) {\r\n this._setCurrentFindMatch(nextMatchRange);\r\n }\r\n return;\r\n }\r\n if (this._decorations.getCount() < MATCHES_LIMIT) {\r\n let prevMatchRange = this._decorations.matchBeforePosition(before);\r\n if (prevMatchRange && prevMatchRange.isEmpty() && prevMatchRange.getStartPosition().equals(before)) {\r\n before = this._prevSearchPosition(before);\r\n prevMatchRange = this._decorations.matchBeforePosition(before);\r\n }\r\n if (prevMatchRange) {\r\n this._setCurrentFindMatch(prevMatchRange);\r\n }\r\n return;\r\n }\r\n if (this._cannotFind()) {\r\n return;\r\n }\r\n let findScope = this._decorations.getFindScope();\r\n let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), findScope);\r\n // ...(----)...|...\r\n if (searchRange.getEndPosition().isBefore(before)) {\r\n before = searchRange.getEndPosition();\r\n }\r\n // ...|...(----)...\r\n if (before.isBefore(searchRange.getStartPosition())) {\r\n before = searchRange.getEndPosition();\r\n }\r\n let { lineNumber, column } = before;\r\n let model = this._editor.getModel();\r\n let position = new Position(lineNumber, column);\r\n let prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, false);\r\n if (prevMatch && prevMatch.range.isEmpty() && prevMatch.range.getStartPosition().equals(position)) {\r\n // Looks like we're stuck at this position, unacceptable!\r\n position = this._prevSearchPosition(position);\r\n prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, false);\r\n }\r\n if (!prevMatch) {\r\n // there is precisely one match and selection is on top of it\r\n return;\r\n }\r\n if (!isRecursed && !searchRange.containsRange(prevMatch.range)) {\r\n return this._moveToPrevMatch(prevMatch.range.getStartPosition(), true);\r\n }\r\n this._setCurrentFindMatch(prevMatch.range);\r\n }\r\n moveToPrevMatch() {\r\n this._moveToPrevMatch(this._editor.getSelection().getStartPosition());\r\n }\r\n _nextSearchPosition(after) {\r\n let isUsingLineStops = this._state.isRegex && (this._state.searchString.indexOf('^') >= 0\r\n || this._state.searchString.indexOf('$') >= 0);\r\n let { lineNumber, column } = after;\r\n let model = this._editor.getModel();\r\n if (isUsingLineStops || column === model.getLineMaxColumn(lineNumber)) {\r\n if (lineNumber === model.getLineCount()) {\r\n lineNumber = 1;\r\n }\r\n else {\r\n lineNumber++;\r\n }\r\n column = 1;\r\n }\r\n else {\r\n column++;\r\n }\r\n return new Position(lineNumber, column);\r\n }\r\n _moveToNextMatch(after) {\r\n if (!this._state.canNavigateForward()) {\r\n // we are beyond the last matched find result\r\n // instead of doing nothing, we should refocus the last item\r\n const prevMatchRange = this._decorations.matchBeforePosition(after);\r\n if (prevMatchRange) {\r\n this._setCurrentFindMatch(prevMatchRange);\r\n }\r\n return;\r\n }\r\n if (this._decorations.getCount() < MATCHES_LIMIT) {\r\n let nextMatchRange = this._decorations.matchAfterPosition(after);\r\n if (nextMatchRange && nextMatchRange.isEmpty() && nextMatchRange.getStartPosition().equals(after)) {\r\n // Looks like we're stuck at this position, unacceptable!\r\n after = this._nextSearchPosition(after);\r\n nextMatchRange = this._decorations.matchAfterPosition(after);\r\n }\r\n if (nextMatchRange) {\r\n this._setCurrentFindMatch(nextMatchRange);\r\n }\r\n return;\r\n }\r\n let nextMatch = this._getNextMatch(after, false, true);\r\n if (nextMatch) {\r\n this._setCurrentFindMatch(nextMatch.range);\r\n }\r\n }\r\n _getNextMatch(after, captureMatches, forceMove, isRecursed = false) {\r\n if (this._cannotFind()) {\r\n return null;\r\n }\r\n let findScope = this._decorations.getFindScope();\r\n let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), findScope);\r\n // ...(----)...|...\r\n if (searchRange.getEndPosition().isBefore(after)) {\r\n after = searchRange.getStartPosition();\r\n }\r\n // ...|...(----)...\r\n if (after.isBefore(searchRange.getStartPosition())) {\r\n after = searchRange.getStartPosition();\r\n }\r\n let { lineNumber, column } = after;\r\n let model = this._editor.getModel();\r\n let position = new Position(lineNumber, column);\r\n let nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, captureMatches);\r\n if (forceMove && nextMatch && nextMatch.range.isEmpty() && nextMatch.range.getStartPosition().equals(position)) {\r\n // Looks like we're stuck at this position, unacceptable!\r\n position = this._nextSearchPosition(position);\r\n nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, captureMatches);\r\n }\r\n if (!nextMatch) {\r\n // there is precisely one match and selection is on top of it\r\n return null;\r\n }\r\n if (!isRecursed && !searchRange.containsRange(nextMatch.range)) {\r\n return this._getNextMatch(nextMatch.range.getEndPosition(), captureMatches, forceMove, true);\r\n }\r\n return nextMatch;\r\n }\r\n moveToNextMatch() {\r\n this._moveToNextMatch(this._editor.getSelection().getEndPosition());\r\n }\r\n _getReplacePattern() {\r\n if (this._state.isRegex) {\r\n return parseReplaceString(this._state.replaceString);\r\n }\r\n return ReplacePattern.fromStaticValue(this._state.replaceString);\r\n }\r\n replace() {\r\n if (!this._hasMatches()) {\r\n return;\r\n }\r\n let replacePattern = this._getReplacePattern();\r\n let selection = this._editor.getSelection();\r\n let nextMatch = this._getNextMatch(selection.getStartPosition(), true, false);\r\n if (nextMatch) {\r\n if (selection.equalsRange(nextMatch.range)) {\r\n // selection sits on a find match => replace it!\r\n let replaceString = replacePattern.buildReplaceString(nextMatch.matches, this._state.preserveCase);\r\n let command = new ReplaceCommand(selection, replaceString);\r\n this._executeEditorCommand('replace', command);\r\n this._decorations.setStartPosition(new Position(selection.startLineNumber, selection.startColumn + replaceString.length));\r\n this.research(true);\r\n }\r\n else {\r\n this._decorations.setStartPosition(this._editor.getPosition());\r\n this._setCurrentFindMatch(nextMatch.range);\r\n }\r\n }\r\n }\r\n _findMatches(findScopes, captureMatches, limitResultCount) {\r\n const searchRanges = (findScopes || [null]).map((scope) => FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), scope));\r\n return this._editor.getModel().findMatches(this._state.searchString, searchRanges, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, captureMatches, limitResultCount);\r\n }\r\n replaceAll() {\r\n if (!this._hasMatches()) {\r\n return;\r\n }\r\n const findScopes = this._decorations.getFindScopes();\r\n if (findScopes === null && this._state.matchesCount >= MATCHES_LIMIT) {\r\n // Doing a replace on the entire file that is over ${MATCHES_LIMIT} matches\r\n this._largeReplaceAll();\r\n }\r\n else {\r\n this._regularReplaceAll(findScopes);\r\n }\r\n this.research(false);\r\n }\r\n _largeReplaceAll() {\r\n const searchParams = new SearchParams(this._state.searchString, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null);\r\n const searchData = searchParams.parseSearchRequest();\r\n if (!searchData) {\r\n return;\r\n }\r\n let searchRegex = searchData.regex;\r\n if (!searchRegex.multiline) {\r\n let mod = 'mu';\r\n if (searchRegex.ignoreCase) {\r\n mod += 'i';\r\n }\r\n if (searchRegex.global) {\r\n mod += 'g';\r\n }\r\n searchRegex = new RegExp(searchRegex.source, mod);\r\n }\r\n const model = this._editor.getModel();\r\n const modelText = model.getValue(1 /* LF */);\r\n const fullModelRange = model.getFullModelRange();\r\n const replacePattern = this._getReplacePattern();\r\n let resultText;\r\n const preserveCase = this._state.preserveCase;\r\n if (replacePattern.hasReplacementPatterns || preserveCase) {\r\n resultText = modelText.replace(searchRegex, function () {\r\n return replacePattern.buildReplaceString(arguments, preserveCase);\r\n });\r\n }\r\n else {\r\n resultText = modelText.replace(searchRegex, replacePattern.buildReplaceString(null, preserveCase));\r\n }\r\n let command = new ReplaceCommandThatPreservesSelection(fullModelRange, resultText, this._editor.getSelection());\r\n this._executeEditorCommand('replaceAll', command);\r\n }\r\n _regularReplaceAll(findScopes) {\r\n const replacePattern = this._getReplacePattern();\r\n // Get all the ranges (even more than the highlighted ones)\r\n let matches = this._findMatches(findScopes, replacePattern.hasReplacementPatterns || this._state.preserveCase, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n let replaceStrings = [];\r\n for (let i = 0, len = matches.length; i < len; i++) {\r\n replaceStrings[i] = replacePattern.buildReplaceString(matches[i].matches, this._state.preserveCase);\r\n }\r\n let command = new ReplaceAllCommand(this._editor.getSelection(), matches.map(m => m.range), replaceStrings);\r\n this._executeEditorCommand('replaceAll', command);\r\n }\r\n selectAllMatches() {\r\n if (!this._hasMatches()) {\r\n return;\r\n }\r\n let findScopes = this._decorations.getFindScopes();\r\n // Get all the ranges (even more than the highlighted ones)\r\n let matches = this._findMatches(findScopes, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n let selections = matches.map(m => new Selection(m.range.startLineNumber, m.range.startColumn, m.range.endLineNumber, m.range.endColumn));\r\n // If one of the ranges is the editor selection, then maintain it as primary\r\n let editorSelection = this._editor.getSelection();\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n let sel = selections[i];\r\n if (sel.equalsRange(editorSelection)) {\r\n selections = [editorSelection].concat(selections.slice(0, i)).concat(selections.slice(i + 1));\r\n break;\r\n }\r\n }\r\n this._editor.setSelections(selections);\r\n }\r\n _executeEditorCommand(source, command) {\r\n try {\r\n this._ignoreModelContentChanged = true;\r\n this._editor.pushUndoStop();\r\n this._editor.executeCommand(source, command);\r\n this._editor.pushUndoStop();\r\n }\r\n finally {\r\n this._ignoreModelContentChanged = false;\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './checkbox.css';\r\nimport * as DOM from '../../dom.js';\r\nimport { Widget } from '../widget.js';\r\nimport { Color } from '../../../common/color.js';\r\nimport { Emitter } from '../../../common/event.js';\r\nimport { CSSIcon } from '../../../common/codicons.js';\r\nconst defaultOpts = {\r\n inputActiveOptionBorder: Color.fromHex('#007ACC00'),\r\n inputActiveOptionForeground: Color.fromHex('#FFFFFF'),\r\n inputActiveOptionBackground: Color.fromHex('#0E639C50')\r\n};\r\nexport class Checkbox extends Widget {\r\n constructor(opts) {\r\n super();\r\n this._onChange = this._register(new Emitter());\r\n this.onChange = this._onChange.event;\r\n this._onKeyDown = this._register(new Emitter());\r\n this.onKeyDown = this._onKeyDown.event;\r\n this._opts = Object.assign(Object.assign({}, defaultOpts), opts);\r\n this._checked = this._opts.isChecked;\r\n const classes = ['monaco-custom-checkbox'];\r\n if (this._opts.icon) {\r\n classes.push(...CSSIcon.asClassNameArray(this._opts.icon));\r\n }\r\n if (this._opts.actionClassName) {\r\n classes.push(...this._opts.actionClassName.split(' '));\r\n }\r\n if (this._checked) {\r\n classes.push('checked');\r\n }\r\n this.domNode = document.createElement('div');\r\n this.domNode.title = this._opts.title;\r\n this.domNode.classList.add(...classes);\r\n this.domNode.tabIndex = 0;\r\n this.domNode.setAttribute('role', 'checkbox');\r\n this.domNode.setAttribute('aria-checked', String(this._checked));\r\n this.domNode.setAttribute('aria-label', this._opts.title);\r\n this.applyStyles();\r\n this.onclick(this.domNode, (ev) => {\r\n this.checked = !this._checked;\r\n this._onChange.fire(false);\r\n ev.preventDefault();\r\n });\r\n this.ignoreGesture(this.domNode);\r\n this.onkeydown(this.domNode, (keyboardEvent) => {\r\n if (keyboardEvent.keyCode === 10 /* Space */ || keyboardEvent.keyCode === 3 /* Enter */) {\r\n this.checked = !this._checked;\r\n this._onChange.fire(true);\r\n keyboardEvent.preventDefault();\r\n return;\r\n }\r\n this._onKeyDown.fire(keyboardEvent);\r\n });\r\n }\r\n get enabled() {\r\n return this.domNode.getAttribute('aria-disabled') !== 'true';\r\n }\r\n focus() {\r\n this.domNode.focus();\r\n }\r\n get checked() {\r\n return this._checked;\r\n }\r\n set checked(newIsChecked) {\r\n this._checked = newIsChecked;\r\n this.domNode.setAttribute('aria-checked', String(this._checked));\r\n this.domNode.classList.toggle('checked', this._checked);\r\n this.applyStyles();\r\n }\r\n width() {\r\n return 2 /*marginleft*/ + 2 /*border*/ + 2 /*padding*/ + 16 /* icon width */;\r\n }\r\n style(styles) {\r\n if (styles.inputActiveOptionBorder) {\r\n this._opts.inputActiveOptionBorder = styles.inputActiveOptionBorder;\r\n }\r\n if (styles.inputActiveOptionForeground) {\r\n this._opts.inputActiveOptionForeground = styles.inputActiveOptionForeground;\r\n }\r\n if (styles.inputActiveOptionBackground) {\r\n this._opts.inputActiveOptionBackground = styles.inputActiveOptionBackground;\r\n }\r\n this.applyStyles();\r\n }\r\n applyStyles() {\r\n if (this.domNode) {\r\n this.domNode.style.borderColor = this._checked && this._opts.inputActiveOptionBorder ? this._opts.inputActiveOptionBorder.toString() : 'transparent';\r\n this.domNode.style.color = this._checked && this._opts.inputActiveOptionForeground ? this._opts.inputActiveOptionForeground.toString() : 'inherit';\r\n this.domNode.style.backgroundColor = this._checked && this._opts.inputActiveOptionBackground ? this._opts.inputActiveOptionBackground.toString() : 'transparent';\r\n }\r\n }\r\n enable() {\r\n this.domNode.tabIndex = 0;\r\n this.domNode.setAttribute('aria-disabled', String(false));\r\n }\r\n disable() {\r\n DOM.removeTabIndexAndUpdateFocus(this.domNode);\r\n this.domNode.setAttribute('aria-disabled', String(true));\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Checkbox } from '../checkbox/checkbox.js';\r\nimport * as nls from '../../../../nls.js';\r\nimport { Codicon } from '../../../common/codicons.js';\r\nconst NLS_CASE_SENSITIVE_CHECKBOX_LABEL = nls.localize('caseDescription', \"Match Case\");\r\nconst NLS_WHOLE_WORD_CHECKBOX_LABEL = nls.localize('wordsDescription', \"Match Whole Word\");\r\nconst NLS_REGEX_CHECKBOX_LABEL = nls.localize('regexDescription', \"Use Regular Expression\");\r\nexport class CaseSensitiveCheckbox extends Checkbox {\r\n constructor(opts) {\r\n super({\r\n icon: Codicon.caseSensitive,\r\n title: NLS_CASE_SENSITIVE_CHECKBOX_LABEL + opts.appendTitle,\r\n isChecked: opts.isChecked,\r\n inputActiveOptionBorder: opts.inputActiveOptionBorder,\r\n inputActiveOptionForeground: opts.inputActiveOptionForeground,\r\n inputActiveOptionBackground: opts.inputActiveOptionBackground\r\n });\r\n }\r\n}\r\nexport class WholeWordsCheckbox extends Checkbox {\r\n constructor(opts) {\r\n super({\r\n icon: Codicon.wholeWord,\r\n title: NLS_WHOLE_WORD_CHECKBOX_LABEL + opts.appendTitle,\r\n isChecked: opts.isChecked,\r\n inputActiveOptionBorder: opts.inputActiveOptionBorder,\r\n inputActiveOptionForeground: opts.inputActiveOptionForeground,\r\n inputActiveOptionBackground: opts.inputActiveOptionBackground\r\n });\r\n }\r\n}\r\nexport class RegexCheckbox extends Checkbox {\r\n constructor(opts) {\r\n super({\r\n icon: Codicon.regex,\r\n title: NLS_REGEX_CHECKBOX_LABEL + opts.appendTitle,\r\n isChecked: opts.isChecked,\r\n inputActiveOptionBorder: opts.inputActiveOptionBorder,\r\n inputActiveOptionForeground: opts.inputActiveOptionForeground,\r\n inputActiveOptionBackground: opts.inputActiveOptionBackground\r\n });\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { CaseSensitiveCheckbox, RegexCheckbox, WholeWordsCheckbox } from '../../../base/browser/ui/findinput/findInputCheckboxes.js';\r\nimport { Widget } from '../../../base/browser/ui/widget.js';\r\nimport { RunOnceScheduler } from '../../../base/common/async.js';\r\nimport { FIND_IDS } from './findModel.js';\r\nimport { contrastBorder, editorWidgetBackground, inputActiveOptionBorder, inputActiveOptionBackground, widgetShadow, editorWidgetForeground, inputActiveOptionForeground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nexport class FindOptionsWidget extends Widget {\r\n constructor(editor, state, keybindingService, themeService) {\r\n super();\r\n this._hideSoon = this._register(new RunOnceScheduler(() => this._hide(), 2000));\r\n this._isVisible = false;\r\n this._editor = editor;\r\n this._state = state;\r\n this._keybindingService = keybindingService;\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = 'findOptionsWidget';\r\n this._domNode.style.display = 'none';\r\n this._domNode.style.top = '10px';\r\n this._domNode.setAttribute('role', 'presentation');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n const inputActiveOptionBorderColor = themeService.getColorTheme().getColor(inputActiveOptionBorder);\r\n const inputActiveOptionForegroundColor = themeService.getColorTheme().getColor(inputActiveOptionForeground);\r\n const inputActiveOptionBackgroundColor = themeService.getColorTheme().getColor(inputActiveOptionBackground);\r\n this.caseSensitive = this._register(new CaseSensitiveCheckbox({\r\n appendTitle: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand),\r\n isChecked: this._state.matchCase,\r\n inputActiveOptionBorder: inputActiveOptionBorderColor,\r\n inputActiveOptionForeground: inputActiveOptionForegroundColor,\r\n inputActiveOptionBackground: inputActiveOptionBackgroundColor\r\n }));\r\n this._domNode.appendChild(this.caseSensitive.domNode);\r\n this._register(this.caseSensitive.onChange(() => {\r\n this._state.change({\r\n matchCase: this.caseSensitive.checked\r\n }, false);\r\n }));\r\n this.wholeWords = this._register(new WholeWordsCheckbox({\r\n appendTitle: this._keybindingLabelFor(FIND_IDS.ToggleWholeWordCommand),\r\n isChecked: this._state.wholeWord,\r\n inputActiveOptionBorder: inputActiveOptionBorderColor,\r\n inputActiveOptionForeground: inputActiveOptionForegroundColor,\r\n inputActiveOptionBackground: inputActiveOptionBackgroundColor\r\n }));\r\n this._domNode.appendChild(this.wholeWords.domNode);\r\n this._register(this.wholeWords.onChange(() => {\r\n this._state.change({\r\n wholeWord: this.wholeWords.checked\r\n }, false);\r\n }));\r\n this.regex = this._register(new RegexCheckbox({\r\n appendTitle: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand),\r\n isChecked: this._state.isRegex,\r\n inputActiveOptionBorder: inputActiveOptionBorderColor,\r\n inputActiveOptionForeground: inputActiveOptionForegroundColor,\r\n inputActiveOptionBackground: inputActiveOptionBackgroundColor\r\n }));\r\n this._domNode.appendChild(this.regex.domNode);\r\n this._register(this.regex.onChange(() => {\r\n this._state.change({\r\n isRegex: this.regex.checked\r\n }, false);\r\n }));\r\n this._editor.addOverlayWidget(this);\r\n this._register(this._state.onFindReplaceStateChange((e) => {\r\n let somethingChanged = false;\r\n if (e.isRegex) {\r\n this.regex.checked = this._state.isRegex;\r\n somethingChanged = true;\r\n }\r\n if (e.wholeWord) {\r\n this.wholeWords.checked = this._state.wholeWord;\r\n somethingChanged = true;\r\n }\r\n if (e.matchCase) {\r\n this.caseSensitive.checked = this._state.matchCase;\r\n somethingChanged = true;\r\n }\r\n if (!this._state.isRevealed && somethingChanged) {\r\n this._revealTemporarily();\r\n }\r\n }));\r\n this._register(dom.addDisposableNonBubblingMouseOutListener(this._domNode, (e) => this._onMouseOut()));\r\n this._register(dom.addDisposableListener(this._domNode, 'mouseover', (e) => this._onMouseOver()));\r\n this._applyTheme(themeService.getColorTheme());\r\n this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));\r\n }\r\n _keybindingLabelFor(actionId) {\r\n let kb = this._keybindingService.lookupKeybinding(actionId);\r\n if (!kb) {\r\n return '';\r\n }\r\n return ` (${kb.getLabel()})`;\r\n }\r\n dispose() {\r\n this._editor.removeOverlayWidget(this);\r\n super.dispose();\r\n }\r\n // ----- IOverlayWidget API\r\n getId() {\r\n return FindOptionsWidget.ID;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return {\r\n preference: 0 /* TOP_RIGHT_CORNER */\r\n };\r\n }\r\n highlightFindOptions() {\r\n this._revealTemporarily();\r\n }\r\n _revealTemporarily() {\r\n this._show();\r\n this._hideSoon.schedule();\r\n }\r\n _onMouseOut() {\r\n this._hideSoon.schedule();\r\n }\r\n _onMouseOver() {\r\n this._hideSoon.cancel();\r\n }\r\n _show() {\r\n if (this._isVisible) {\r\n return;\r\n }\r\n this._isVisible = true;\r\n this._domNode.style.display = 'block';\r\n }\r\n _hide() {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n this._isVisible = false;\r\n this._domNode.style.display = 'none';\r\n }\r\n _applyTheme(theme) {\r\n let inputStyles = {\r\n inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder),\r\n inputActiveOptionForeground: theme.getColor(inputActiveOptionForeground),\r\n inputActiveOptionBackground: theme.getColor(inputActiveOptionBackground)\r\n };\r\n this.caseSensitive.style(inputStyles);\r\n this.wholeWords.style(inputStyles);\r\n this.regex.style(inputStyles);\r\n }\r\n}\r\nFindOptionsWidget.ID = 'editor.contrib.findOptionsWidget';\r\nregisterThemingParticipant((theme, collector) => {\r\n const widgetBackground = theme.getColor(editorWidgetBackground);\r\n if (widgetBackground) {\r\n collector.addRule(`.monaco-editor .findOptionsWidget { background-color: ${widgetBackground}; }`);\r\n }\r\n const widgetForeground = theme.getColor(editorWidgetForeground);\r\n if (widgetForeground) {\r\n collector.addRule(`.monaco-editor .findOptionsWidget { color: ${widgetForeground}; }`);\r\n }\r\n const widgetShadowColor = theme.getColor(widgetShadow);\r\n if (widgetShadowColor) {\r\n collector.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${widgetShadowColor}; }`);\r\n }\r\n const hcBorder = theme.getColor(contrastBorder);\r\n if (hcBorder) {\r\n collector.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${hcBorder}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { MATCHES_LIMIT } from './findModel.js';\r\nfunction effectiveOptionValue(override, value) {\r\n if (override === 1 /* True */) {\r\n return true;\r\n }\r\n if (override === 2 /* False */) {\r\n return false;\r\n }\r\n return value;\r\n}\r\nexport class FindReplaceState extends Disposable {\r\n constructor() {\r\n super();\r\n this._onFindReplaceStateChange = this._register(new Emitter());\r\n this.onFindReplaceStateChange = this._onFindReplaceStateChange.event;\r\n this._searchString = '';\r\n this._replaceString = '';\r\n this._isRevealed = false;\r\n this._isReplaceRevealed = false;\r\n this._isRegex = false;\r\n this._isRegexOverride = 0 /* NotSet */;\r\n this._wholeWord = false;\r\n this._wholeWordOverride = 0 /* NotSet */;\r\n this._matchCase = false;\r\n this._matchCaseOverride = 0 /* NotSet */;\r\n this._preserveCase = false;\r\n this._preserveCaseOverride = 0 /* NotSet */;\r\n this._searchScope = null;\r\n this._matchesPosition = 0;\r\n this._matchesCount = 0;\r\n this._currentMatch = null;\r\n this._loop = true;\r\n }\r\n get searchString() { return this._searchString; }\r\n get replaceString() { return this._replaceString; }\r\n get isRevealed() { return this._isRevealed; }\r\n get isReplaceRevealed() { return this._isReplaceRevealed; }\r\n get isRegex() { return effectiveOptionValue(this._isRegexOverride, this._isRegex); }\r\n get wholeWord() { return effectiveOptionValue(this._wholeWordOverride, this._wholeWord); }\r\n get matchCase() { return effectiveOptionValue(this._matchCaseOverride, this._matchCase); }\r\n get preserveCase() { return effectiveOptionValue(this._preserveCaseOverride, this._preserveCase); }\r\n get actualIsRegex() { return this._isRegex; }\r\n get actualWholeWord() { return this._wholeWord; }\r\n get actualMatchCase() { return this._matchCase; }\r\n get actualPreserveCase() { return this._preserveCase; }\r\n get searchScope() { return this._searchScope; }\r\n get matchesPosition() { return this._matchesPosition; }\r\n get matchesCount() { return this._matchesCount; }\r\n get currentMatch() { return this._currentMatch; }\r\n changeMatchInfo(matchesPosition, matchesCount, currentMatch) {\r\n let changeEvent = {\r\n moveCursor: false,\r\n updateHistory: false,\r\n searchString: false,\r\n replaceString: false,\r\n isRevealed: false,\r\n isReplaceRevealed: false,\r\n isRegex: false,\r\n wholeWord: false,\r\n matchCase: false,\r\n preserveCase: false,\r\n searchScope: false,\r\n matchesPosition: false,\r\n matchesCount: false,\r\n currentMatch: false,\r\n loop: false\r\n };\r\n let somethingChanged = false;\r\n if (matchesCount === 0) {\r\n matchesPosition = 0;\r\n }\r\n if (matchesPosition > matchesCount) {\r\n matchesPosition = matchesCount;\r\n }\r\n if (this._matchesPosition !== matchesPosition) {\r\n this._matchesPosition = matchesPosition;\r\n changeEvent.matchesPosition = true;\r\n somethingChanged = true;\r\n }\r\n if (this._matchesCount !== matchesCount) {\r\n this._matchesCount = matchesCount;\r\n changeEvent.matchesCount = true;\r\n somethingChanged = true;\r\n }\r\n if (typeof currentMatch !== 'undefined') {\r\n if (!Range.equalsRange(this._currentMatch, currentMatch)) {\r\n this._currentMatch = currentMatch;\r\n changeEvent.currentMatch = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n if (somethingChanged) {\r\n this._onFindReplaceStateChange.fire(changeEvent);\r\n }\r\n }\r\n change(newState, moveCursor, updateHistory = true) {\r\n var _a;\r\n let changeEvent = {\r\n moveCursor: moveCursor,\r\n updateHistory: updateHistory,\r\n searchString: false,\r\n replaceString: false,\r\n isRevealed: false,\r\n isReplaceRevealed: false,\r\n isRegex: false,\r\n wholeWord: false,\r\n matchCase: false,\r\n preserveCase: false,\r\n searchScope: false,\r\n matchesPosition: false,\r\n matchesCount: false,\r\n currentMatch: false,\r\n loop: false\r\n };\r\n let somethingChanged = false;\r\n const oldEffectiveIsRegex = this.isRegex;\r\n const oldEffectiveWholeWords = this.wholeWord;\r\n const oldEffectiveMatchCase = this.matchCase;\r\n const oldEffectivePreserveCase = this.preserveCase;\r\n if (typeof newState.searchString !== 'undefined') {\r\n if (this._searchString !== newState.searchString) {\r\n this._searchString = newState.searchString;\r\n changeEvent.searchString = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n if (typeof newState.replaceString !== 'undefined') {\r\n if (this._replaceString !== newState.replaceString) {\r\n this._replaceString = newState.replaceString;\r\n changeEvent.replaceString = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n if (typeof newState.isRevealed !== 'undefined') {\r\n if (this._isRevealed !== newState.isRevealed) {\r\n this._isRevealed = newState.isRevealed;\r\n changeEvent.isRevealed = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n if (typeof newState.isReplaceRevealed !== 'undefined') {\r\n if (this._isReplaceRevealed !== newState.isReplaceRevealed) {\r\n this._isReplaceRevealed = newState.isReplaceRevealed;\r\n changeEvent.isReplaceRevealed = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n if (typeof newState.isRegex !== 'undefined') {\r\n this._isRegex = newState.isRegex;\r\n }\r\n if (typeof newState.wholeWord !== 'undefined') {\r\n this._wholeWord = newState.wholeWord;\r\n }\r\n if (typeof newState.matchCase !== 'undefined') {\r\n this._matchCase = newState.matchCase;\r\n }\r\n if (typeof newState.preserveCase !== 'undefined') {\r\n this._preserveCase = newState.preserveCase;\r\n }\r\n if (typeof newState.searchScope !== 'undefined') {\r\n if (!((_a = newState.searchScope) === null || _a === void 0 ? void 0 : _a.every((newSearchScope) => {\r\n var _a;\r\n return (_a = this._searchScope) === null || _a === void 0 ? void 0 : _a.some(existingSearchScope => {\r\n return !Range.equalsRange(existingSearchScope, newSearchScope);\r\n });\r\n }))) {\r\n this._searchScope = newState.searchScope;\r\n changeEvent.searchScope = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n if (typeof newState.loop !== 'undefined') {\r\n if (this._loop !== newState.loop) {\r\n this._loop = newState.loop;\r\n changeEvent.loop = true;\r\n somethingChanged = true;\r\n }\r\n }\r\n // Overrides get set when they explicitly come in and get reset anytime something else changes\r\n this._isRegexOverride = (typeof newState.isRegexOverride !== 'undefined' ? newState.isRegexOverride : 0 /* NotSet */);\r\n this._wholeWordOverride = (typeof newState.wholeWordOverride !== 'undefined' ? newState.wholeWordOverride : 0 /* NotSet */);\r\n this._matchCaseOverride = (typeof newState.matchCaseOverride !== 'undefined' ? newState.matchCaseOverride : 0 /* NotSet */);\r\n this._preserveCaseOverride = (typeof newState.preserveCaseOverride !== 'undefined' ? newState.preserveCaseOverride : 0 /* NotSet */);\r\n if (oldEffectiveIsRegex !== this.isRegex) {\r\n somethingChanged = true;\r\n changeEvent.isRegex = true;\r\n }\r\n if (oldEffectiveWholeWords !== this.wholeWord) {\r\n somethingChanged = true;\r\n changeEvent.wholeWord = true;\r\n }\r\n if (oldEffectiveMatchCase !== this.matchCase) {\r\n somethingChanged = true;\r\n changeEvent.matchCase = true;\r\n }\r\n if (oldEffectivePreserveCase !== this.preserveCase) {\r\n somethingChanged = true;\r\n changeEvent.preserveCase = true;\r\n }\r\n if (somethingChanged) {\r\n this._onFindReplaceStateChange.fire(changeEvent);\r\n }\r\n }\r\n canNavigateBack() {\r\n return this.canNavigateInLoop() || (this.matchesPosition !== 1);\r\n }\r\n canNavigateForward() {\r\n return this.canNavigateInLoop() || (this.matchesPosition < this.matchesCount);\r\n }\r\n canNavigateInLoop() {\r\n return this._loop || (this.matchesCount >= MATCHES_LIMIT);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './findInput.css';\r\nimport * as nls from '../../../../nls.js';\r\nimport * as dom from '../../dom.js';\r\nimport { HistoryInputBox } from '../inputbox/inputBox.js';\r\nimport { Widget } from '../widget.js';\r\nimport { Emitter } from '../../../common/event.js';\r\nimport { CaseSensitiveCheckbox, WholeWordsCheckbox, RegexCheckbox } from './findInputCheckboxes.js';\r\nconst NLS_DEFAULT_LABEL = nls.localize('defaultLabel', \"input\");\r\nexport class FindInput extends Widget {\r\n constructor(parent, contextViewProvider, _showOptionButtons, options) {\r\n super();\r\n this._showOptionButtons = _showOptionButtons;\r\n this.fixFocusOnOptionClickEnabled = true;\r\n this._onDidOptionChange = this._register(new Emitter());\r\n this.onDidOptionChange = this._onDidOptionChange.event;\r\n this._onKeyDown = this._register(new Emitter());\r\n this.onKeyDown = this._onKeyDown.event;\r\n this._onMouseDown = this._register(new Emitter());\r\n this.onMouseDown = this._onMouseDown.event;\r\n this._onInput = this._register(new Emitter());\r\n this._onKeyUp = this._register(new Emitter());\r\n this._onCaseSensitiveKeyDown = this._register(new Emitter());\r\n this.onCaseSensitiveKeyDown = this._onCaseSensitiveKeyDown.event;\r\n this._onRegexKeyDown = this._register(new Emitter());\r\n this.onRegexKeyDown = this._onRegexKeyDown.event;\r\n this._lastHighlightFindOptions = 0;\r\n this.contextViewProvider = contextViewProvider;\r\n this.placeholder = options.placeholder || '';\r\n this.validation = options.validation;\r\n this.label = options.label || NLS_DEFAULT_LABEL;\r\n this.inputActiveOptionBorder = options.inputActiveOptionBorder;\r\n this.inputActiveOptionForeground = options.inputActiveOptionForeground;\r\n this.inputActiveOptionBackground = options.inputActiveOptionBackground;\r\n this.inputBackground = options.inputBackground;\r\n this.inputForeground = options.inputForeground;\r\n this.inputBorder = options.inputBorder;\r\n this.inputValidationInfoBorder = options.inputValidationInfoBorder;\r\n this.inputValidationInfoBackground = options.inputValidationInfoBackground;\r\n this.inputValidationInfoForeground = options.inputValidationInfoForeground;\r\n this.inputValidationWarningBorder = options.inputValidationWarningBorder;\r\n this.inputValidationWarningBackground = options.inputValidationWarningBackground;\r\n this.inputValidationWarningForeground = options.inputValidationWarningForeground;\r\n this.inputValidationErrorBorder = options.inputValidationErrorBorder;\r\n this.inputValidationErrorBackground = options.inputValidationErrorBackground;\r\n this.inputValidationErrorForeground = options.inputValidationErrorForeground;\r\n const appendCaseSensitiveLabel = options.appendCaseSensitiveLabel || '';\r\n const appendWholeWordsLabel = options.appendWholeWordsLabel || '';\r\n const appendRegexLabel = options.appendRegexLabel || '';\r\n const history = options.history || [];\r\n const flexibleHeight = !!options.flexibleHeight;\r\n const flexibleWidth = !!options.flexibleWidth;\r\n const flexibleMaxHeight = options.flexibleMaxHeight;\r\n this.domNode = document.createElement('div');\r\n this.domNode.classList.add('monaco-findInput');\r\n this.inputBox = this._register(new HistoryInputBox(this.domNode, this.contextViewProvider, {\r\n placeholder: this.placeholder || '',\r\n ariaLabel: this.label || '',\r\n validationOptions: {\r\n validation: this.validation\r\n },\r\n inputBackground: this.inputBackground,\r\n inputForeground: this.inputForeground,\r\n inputBorder: this.inputBorder,\r\n inputValidationInfoBackground: this.inputValidationInfoBackground,\r\n inputValidationInfoForeground: this.inputValidationInfoForeground,\r\n inputValidationInfoBorder: this.inputValidationInfoBorder,\r\n inputValidationWarningBackground: this.inputValidationWarningBackground,\r\n inputValidationWarningForeground: this.inputValidationWarningForeground,\r\n inputValidationWarningBorder: this.inputValidationWarningBorder,\r\n inputValidationErrorBackground: this.inputValidationErrorBackground,\r\n inputValidationErrorForeground: this.inputValidationErrorForeground,\r\n inputValidationErrorBorder: this.inputValidationErrorBorder,\r\n history,\r\n flexibleHeight,\r\n flexibleWidth,\r\n flexibleMaxHeight\r\n }));\r\n this.regex = this._register(new RegexCheckbox({\r\n appendTitle: appendRegexLabel,\r\n isChecked: false,\r\n inputActiveOptionBorder: this.inputActiveOptionBorder,\r\n inputActiveOptionForeground: this.inputActiveOptionForeground,\r\n inputActiveOptionBackground: this.inputActiveOptionBackground\r\n }));\r\n this._register(this.regex.onChange(viaKeyboard => {\r\n this._onDidOptionChange.fire(viaKeyboard);\r\n if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) {\r\n this.inputBox.focus();\r\n }\r\n this.validate();\r\n }));\r\n this._register(this.regex.onKeyDown(e => {\r\n this._onRegexKeyDown.fire(e);\r\n }));\r\n this.wholeWords = this._register(new WholeWordsCheckbox({\r\n appendTitle: appendWholeWordsLabel,\r\n isChecked: false,\r\n inputActiveOptionBorder: this.inputActiveOptionBorder,\r\n inputActiveOptionForeground: this.inputActiveOptionForeground,\r\n inputActiveOptionBackground: this.inputActiveOptionBackground\r\n }));\r\n this._register(this.wholeWords.onChange(viaKeyboard => {\r\n this._onDidOptionChange.fire(viaKeyboard);\r\n if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) {\r\n this.inputBox.focus();\r\n }\r\n this.validate();\r\n }));\r\n this.caseSensitive = this._register(new CaseSensitiveCheckbox({\r\n appendTitle: appendCaseSensitiveLabel,\r\n isChecked: false,\r\n inputActiveOptionBorder: this.inputActiveOptionBorder,\r\n inputActiveOptionForeground: this.inputActiveOptionForeground,\r\n inputActiveOptionBackground: this.inputActiveOptionBackground\r\n }));\r\n this._register(this.caseSensitive.onChange(viaKeyboard => {\r\n this._onDidOptionChange.fire(viaKeyboard);\r\n if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) {\r\n this.inputBox.focus();\r\n }\r\n this.validate();\r\n }));\r\n this._register(this.caseSensitive.onKeyDown(e => {\r\n this._onCaseSensitiveKeyDown.fire(e);\r\n }));\r\n if (this._showOptionButtons) {\r\n this.inputBox.paddingRight = this.caseSensitive.width() + this.wholeWords.width() + this.regex.width();\r\n }\r\n // Arrow-Key support to navigate between options\r\n let indexes = [this.caseSensitive.domNode, this.wholeWords.domNode, this.regex.domNode];\r\n this.onkeydown(this.domNode, (event) => {\r\n if (event.equals(15 /* LeftArrow */) || event.equals(17 /* RightArrow */) || event.equals(9 /* Escape */)) {\r\n let index = indexes.indexOf(document.activeElement);\r\n if (index >= 0) {\r\n let newIndex = -1;\r\n if (event.equals(17 /* RightArrow */)) {\r\n newIndex = (index + 1) % indexes.length;\r\n }\r\n else if (event.equals(15 /* LeftArrow */)) {\r\n if (index === 0) {\r\n newIndex = indexes.length - 1;\r\n }\r\n else {\r\n newIndex = index - 1;\r\n }\r\n }\r\n if (event.equals(9 /* Escape */)) {\r\n indexes[index].blur();\r\n this.inputBox.focus();\r\n }\r\n else if (newIndex >= 0) {\r\n indexes[newIndex].focus();\r\n }\r\n dom.EventHelper.stop(event, true);\r\n }\r\n }\r\n });\r\n let controls = document.createElement('div');\r\n controls.className = 'controls';\r\n controls.style.display = this._showOptionButtons ? 'block' : 'none';\r\n controls.appendChild(this.caseSensitive.domNode);\r\n controls.appendChild(this.wholeWords.domNode);\r\n controls.appendChild(this.regex.domNode);\r\n this.domNode.appendChild(controls);\r\n if (parent) {\r\n parent.appendChild(this.domNode);\r\n }\r\n this.onkeydown(this.inputBox.inputElement, (e) => this._onKeyDown.fire(e));\r\n this.onkeyup(this.inputBox.inputElement, (e) => this._onKeyUp.fire(e));\r\n this.oninput(this.inputBox.inputElement, (e) => this._onInput.fire());\r\n this.onmousedown(this.inputBox.inputElement, (e) => this._onMouseDown.fire(e));\r\n }\r\n enable() {\r\n this.domNode.classList.remove('disabled');\r\n this.inputBox.enable();\r\n this.regex.enable();\r\n this.wholeWords.enable();\r\n this.caseSensitive.enable();\r\n }\r\n disable() {\r\n this.domNode.classList.add('disabled');\r\n this.inputBox.disable();\r\n this.regex.disable();\r\n this.wholeWords.disable();\r\n this.caseSensitive.disable();\r\n }\r\n setFocusInputOnOptionClick(value) {\r\n this.fixFocusOnOptionClickEnabled = value;\r\n }\r\n setEnabled(enabled) {\r\n if (enabled) {\r\n this.enable();\r\n }\r\n else {\r\n this.disable();\r\n }\r\n }\r\n getValue() {\r\n return this.inputBox.value;\r\n }\r\n setValue(value) {\r\n if (this.inputBox.value !== value) {\r\n this.inputBox.value = value;\r\n }\r\n }\r\n style(styles) {\r\n this.inputActiveOptionBorder = styles.inputActiveOptionBorder;\r\n this.inputActiveOptionForeground = styles.inputActiveOptionForeground;\r\n this.inputActiveOptionBackground = styles.inputActiveOptionBackground;\r\n this.inputBackground = styles.inputBackground;\r\n this.inputForeground = styles.inputForeground;\r\n this.inputBorder = styles.inputBorder;\r\n this.inputValidationInfoBackground = styles.inputValidationInfoBackground;\r\n this.inputValidationInfoForeground = styles.inputValidationInfoForeground;\r\n this.inputValidationInfoBorder = styles.inputValidationInfoBorder;\r\n this.inputValidationWarningBackground = styles.inputValidationWarningBackground;\r\n this.inputValidationWarningForeground = styles.inputValidationWarningForeground;\r\n this.inputValidationWarningBorder = styles.inputValidationWarningBorder;\r\n this.inputValidationErrorBackground = styles.inputValidationErrorBackground;\r\n this.inputValidationErrorForeground = styles.inputValidationErrorForeground;\r\n this.inputValidationErrorBorder = styles.inputValidationErrorBorder;\r\n this.applyStyles();\r\n }\r\n applyStyles() {\r\n if (this.domNode) {\r\n const checkBoxStyles = {\r\n inputActiveOptionBorder: this.inputActiveOptionBorder,\r\n inputActiveOptionForeground: this.inputActiveOptionForeground,\r\n inputActiveOptionBackground: this.inputActiveOptionBackground,\r\n };\r\n this.regex.style(checkBoxStyles);\r\n this.wholeWords.style(checkBoxStyles);\r\n this.caseSensitive.style(checkBoxStyles);\r\n const inputBoxStyles = {\r\n inputBackground: this.inputBackground,\r\n inputForeground: this.inputForeground,\r\n inputBorder: this.inputBorder,\r\n inputValidationInfoBackground: this.inputValidationInfoBackground,\r\n inputValidationInfoForeground: this.inputValidationInfoForeground,\r\n inputValidationInfoBorder: this.inputValidationInfoBorder,\r\n inputValidationWarningBackground: this.inputValidationWarningBackground,\r\n inputValidationWarningForeground: this.inputValidationWarningForeground,\r\n inputValidationWarningBorder: this.inputValidationWarningBorder,\r\n inputValidationErrorBackground: this.inputValidationErrorBackground,\r\n inputValidationErrorForeground: this.inputValidationErrorForeground,\r\n inputValidationErrorBorder: this.inputValidationErrorBorder\r\n };\r\n this.inputBox.style(inputBoxStyles);\r\n }\r\n }\r\n select() {\r\n this.inputBox.select();\r\n }\r\n focus() {\r\n this.inputBox.focus();\r\n }\r\n getCaseSensitive() {\r\n return this.caseSensitive.checked;\r\n }\r\n setCaseSensitive(value) {\r\n this.caseSensitive.checked = value;\r\n }\r\n getWholeWords() {\r\n return this.wholeWords.checked;\r\n }\r\n setWholeWords(value) {\r\n this.wholeWords.checked = value;\r\n }\r\n getRegex() {\r\n return this.regex.checked;\r\n }\r\n setRegex(value) {\r\n this.regex.checked = value;\r\n this.validate();\r\n }\r\n focusOnCaseSensitive() {\r\n this.caseSensitive.focus();\r\n }\r\n highlightFindOptions() {\r\n this.domNode.classList.remove('highlight-' + (this._lastHighlightFindOptions));\r\n this._lastHighlightFindOptions = 1 - this._lastHighlightFindOptions;\r\n this.domNode.classList.add('highlight-' + (this._lastHighlightFindOptions));\r\n }\r\n validate() {\r\n this.inputBox.validate();\r\n }\r\n clearMessage() {\r\n this.inputBox.hideMessage();\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './findInput.css';\r\nimport * as nls from '../../../../nls.js';\r\nimport * as dom from '../../dom.js';\r\nimport { HistoryInputBox } from '../inputbox/inputBox.js';\r\nimport { Widget } from '../widget.js';\r\nimport { Emitter } from '../../../common/event.js';\r\nimport { Checkbox } from '../checkbox/checkbox.js';\r\nimport { Codicon } from '../../../common/codicons.js';\r\nconst NLS_DEFAULT_LABEL = nls.localize('defaultLabel', \"input\");\r\nconst NLS_PRESERVE_CASE_LABEL = nls.localize('label.preserveCaseCheckbox', \"Preserve Case\");\r\nexport class PreserveCaseCheckbox extends Checkbox {\r\n constructor(opts) {\r\n super({\r\n // TODO: does this need its own icon?\r\n icon: Codicon.preserveCase,\r\n title: NLS_PRESERVE_CASE_LABEL + opts.appendTitle,\r\n isChecked: opts.isChecked,\r\n inputActiveOptionBorder: opts.inputActiveOptionBorder,\r\n inputActiveOptionForeground: opts.inputActiveOptionForeground,\r\n inputActiveOptionBackground: opts.inputActiveOptionBackground\r\n });\r\n }\r\n}\r\nexport class ReplaceInput extends Widget {\r\n constructor(parent, contextViewProvider, _showOptionButtons, options) {\r\n super();\r\n this._showOptionButtons = _showOptionButtons;\r\n this.fixFocusOnOptionClickEnabled = true;\r\n this.cachedOptionsWidth = 0;\r\n this._onDidOptionChange = this._register(new Emitter());\r\n this.onDidOptionChange = this._onDidOptionChange.event;\r\n this._onKeyDown = this._register(new Emitter());\r\n this.onKeyDown = this._onKeyDown.event;\r\n this._onMouseDown = this._register(new Emitter());\r\n this._onInput = this._register(new Emitter());\r\n this._onKeyUp = this._register(new Emitter());\r\n this._onPreserveCaseKeyDown = this._register(new Emitter());\r\n this.onPreserveCaseKeyDown = this._onPreserveCaseKeyDown.event;\r\n this.contextViewProvider = contextViewProvider;\r\n this.placeholder = options.placeholder || '';\r\n this.validation = options.validation;\r\n this.label = options.label || NLS_DEFAULT_LABEL;\r\n this.inputActiveOptionBorder = options.inputActiveOptionBorder;\r\n this.inputActiveOptionForeground = options.inputActiveOptionForeground;\r\n this.inputActiveOptionBackground = options.inputActiveOptionBackground;\r\n this.inputBackground = options.inputBackground;\r\n this.inputForeground = options.inputForeground;\r\n this.inputBorder = options.inputBorder;\r\n this.inputValidationInfoBorder = options.inputValidationInfoBorder;\r\n this.inputValidationInfoBackground = options.inputValidationInfoBackground;\r\n this.inputValidationInfoForeground = options.inputValidationInfoForeground;\r\n this.inputValidationWarningBorder = options.inputValidationWarningBorder;\r\n this.inputValidationWarningBackground = options.inputValidationWarningBackground;\r\n this.inputValidationWarningForeground = options.inputValidationWarningForeground;\r\n this.inputValidationErrorBorder = options.inputValidationErrorBorder;\r\n this.inputValidationErrorBackground = options.inputValidationErrorBackground;\r\n this.inputValidationErrorForeground = options.inputValidationErrorForeground;\r\n const appendPreserveCaseLabel = options.appendPreserveCaseLabel || '';\r\n const history = options.history || [];\r\n const flexibleHeight = !!options.flexibleHeight;\r\n const flexibleWidth = !!options.flexibleWidth;\r\n const flexibleMaxHeight = options.flexibleMaxHeight;\r\n this.domNode = document.createElement('div');\r\n this.domNode.classList.add('monaco-findInput');\r\n this.inputBox = this._register(new HistoryInputBox(this.domNode, this.contextViewProvider, {\r\n ariaLabel: this.label || '',\r\n placeholder: this.placeholder || '',\r\n validationOptions: {\r\n validation: this.validation\r\n },\r\n inputBackground: this.inputBackground,\r\n inputForeground: this.inputForeground,\r\n inputBorder: this.inputBorder,\r\n inputValidationInfoBackground: this.inputValidationInfoBackground,\r\n inputValidationInfoForeground: this.inputValidationInfoForeground,\r\n inputValidationInfoBorder: this.inputValidationInfoBorder,\r\n inputValidationWarningBackground: this.inputValidationWarningBackground,\r\n inputValidationWarningForeground: this.inputValidationWarningForeground,\r\n inputValidationWarningBorder: this.inputValidationWarningBorder,\r\n inputValidationErrorBackground: this.inputValidationErrorBackground,\r\n inputValidationErrorForeground: this.inputValidationErrorForeground,\r\n inputValidationErrorBorder: this.inputValidationErrorBorder,\r\n history,\r\n flexibleHeight,\r\n flexibleWidth,\r\n flexibleMaxHeight\r\n }));\r\n this.preserveCase = this._register(new PreserveCaseCheckbox({\r\n appendTitle: appendPreserveCaseLabel,\r\n isChecked: false,\r\n inputActiveOptionBorder: this.inputActiveOptionBorder,\r\n inputActiveOptionForeground: this.inputActiveOptionForeground,\r\n inputActiveOptionBackground: this.inputActiveOptionBackground,\r\n }));\r\n this._register(this.preserveCase.onChange(viaKeyboard => {\r\n this._onDidOptionChange.fire(viaKeyboard);\r\n if (!viaKeyboard && this.fixFocusOnOptionClickEnabled) {\r\n this.inputBox.focus();\r\n }\r\n this.validate();\r\n }));\r\n this._register(this.preserveCase.onKeyDown(e => {\r\n this._onPreserveCaseKeyDown.fire(e);\r\n }));\r\n if (this._showOptionButtons) {\r\n this.cachedOptionsWidth = this.preserveCase.width();\r\n }\r\n else {\r\n this.cachedOptionsWidth = 0;\r\n }\r\n // Arrow-Key support to navigate between options\r\n let indexes = [this.preserveCase.domNode];\r\n this.onkeydown(this.domNode, (event) => {\r\n if (event.equals(15 /* LeftArrow */) || event.equals(17 /* RightArrow */) || event.equals(9 /* Escape */)) {\r\n let index = indexes.indexOf(document.activeElement);\r\n if (index >= 0) {\r\n let newIndex = -1;\r\n if (event.equals(17 /* RightArrow */)) {\r\n newIndex = (index + 1) % indexes.length;\r\n }\r\n else if (event.equals(15 /* LeftArrow */)) {\r\n if (index === 0) {\r\n newIndex = indexes.length - 1;\r\n }\r\n else {\r\n newIndex = index - 1;\r\n }\r\n }\r\n if (event.equals(9 /* Escape */)) {\r\n indexes[index].blur();\r\n this.inputBox.focus();\r\n }\r\n else if (newIndex >= 0) {\r\n indexes[newIndex].focus();\r\n }\r\n dom.EventHelper.stop(event, true);\r\n }\r\n }\r\n });\r\n let controls = document.createElement('div');\r\n controls.className = 'controls';\r\n controls.style.display = this._showOptionButtons ? 'block' : 'none';\r\n controls.appendChild(this.preserveCase.domNode);\r\n this.domNode.appendChild(controls);\r\n if (parent) {\r\n parent.appendChild(this.domNode);\r\n }\r\n this.onkeydown(this.inputBox.inputElement, (e) => this._onKeyDown.fire(e));\r\n this.onkeyup(this.inputBox.inputElement, (e) => this._onKeyUp.fire(e));\r\n this.oninput(this.inputBox.inputElement, (e) => this._onInput.fire());\r\n this.onmousedown(this.inputBox.inputElement, (e) => this._onMouseDown.fire(e));\r\n }\r\n enable() {\r\n this.domNode.classList.remove('disabled');\r\n this.inputBox.enable();\r\n this.preserveCase.enable();\r\n }\r\n disable() {\r\n this.domNode.classList.add('disabled');\r\n this.inputBox.disable();\r\n this.preserveCase.disable();\r\n }\r\n setEnabled(enabled) {\r\n if (enabled) {\r\n this.enable();\r\n }\r\n else {\r\n this.disable();\r\n }\r\n }\r\n style(styles) {\r\n this.inputActiveOptionBorder = styles.inputActiveOptionBorder;\r\n this.inputActiveOptionForeground = styles.inputActiveOptionForeground;\r\n this.inputActiveOptionBackground = styles.inputActiveOptionBackground;\r\n this.inputBackground = styles.inputBackground;\r\n this.inputForeground = styles.inputForeground;\r\n this.inputBorder = styles.inputBorder;\r\n this.inputValidationInfoBackground = styles.inputValidationInfoBackground;\r\n this.inputValidationInfoForeground = styles.inputValidationInfoForeground;\r\n this.inputValidationInfoBorder = styles.inputValidationInfoBorder;\r\n this.inputValidationWarningBackground = styles.inputValidationWarningBackground;\r\n this.inputValidationWarningForeground = styles.inputValidationWarningForeground;\r\n this.inputValidationWarningBorder = styles.inputValidationWarningBorder;\r\n this.inputValidationErrorBackground = styles.inputValidationErrorBackground;\r\n this.inputValidationErrorForeground = styles.inputValidationErrorForeground;\r\n this.inputValidationErrorBorder = styles.inputValidationErrorBorder;\r\n this.applyStyles();\r\n }\r\n applyStyles() {\r\n if (this.domNode) {\r\n const checkBoxStyles = {\r\n inputActiveOptionBorder: this.inputActiveOptionBorder,\r\n inputActiveOptionForeground: this.inputActiveOptionForeground,\r\n inputActiveOptionBackground: this.inputActiveOptionBackground,\r\n };\r\n this.preserveCase.style(checkBoxStyles);\r\n const inputBoxStyles = {\r\n inputBackground: this.inputBackground,\r\n inputForeground: this.inputForeground,\r\n inputBorder: this.inputBorder,\r\n inputValidationInfoBackground: this.inputValidationInfoBackground,\r\n inputValidationInfoForeground: this.inputValidationInfoForeground,\r\n inputValidationInfoBorder: this.inputValidationInfoBorder,\r\n inputValidationWarningBackground: this.inputValidationWarningBackground,\r\n inputValidationWarningForeground: this.inputValidationWarningForeground,\r\n inputValidationWarningBorder: this.inputValidationWarningBorder,\r\n inputValidationErrorBackground: this.inputValidationErrorBackground,\r\n inputValidationErrorForeground: this.inputValidationErrorForeground,\r\n inputValidationErrorBorder: this.inputValidationErrorBorder\r\n };\r\n this.inputBox.style(inputBoxStyles);\r\n }\r\n }\r\n select() {\r\n this.inputBox.select();\r\n }\r\n focus() {\r\n this.inputBox.focus();\r\n }\r\n getPreserveCase() {\r\n return this.preserveCase.checked;\r\n }\r\n setPreserveCase(value) {\r\n this.preserveCase.checked = value;\r\n }\r\n focusOnPreserve() {\r\n this.preserveCase.focus();\r\n }\r\n validate() {\r\n if (this.inputBox) {\r\n this.inputBox.validate();\r\n }\r\n }\r\n set width(newWidth) {\r\n this.inputBox.paddingRight = this.cachedOptionsWidth;\r\n this.inputBox.width = newWidth;\r\n this.domNode.style.width = newWidth + 'px';\r\n }\r\n dispose() {\r\n super.dispose();\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { IContextKeyService, ContextKeyExpr, RawContextKey } from '../contextkey/common/contextkey.js';\r\nimport { FindInput } from '../../base/browser/ui/findinput/findInput.js';\r\nimport { KeybindingsRegistry } from '../keybinding/common/keybindingsRegistry.js';\r\nimport { ReplaceInput } from '../../base/browser/ui/findinput/replaceInput.js';\r\nexport const HistoryNavigationWidgetContext = 'historyNavigationWidget';\r\nexport const HistoryNavigationEnablementContext = 'historyNavigationEnabled';\r\nfunction bindContextScopedWidget(contextKeyService, widget, contextKey) {\r\n new RawContextKey(contextKey, widget).bindTo(contextKeyService);\r\n}\r\nfunction createWidgetScopedContextKeyService(contextKeyService, widget) {\r\n return contextKeyService.createScoped(widget.target);\r\n}\r\nfunction getContextScopedWidget(contextKeyService, contextKey) {\r\n return contextKeyService.getContext(document.activeElement).getValue(contextKey);\r\n}\r\nexport function createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService, widget) {\r\n const scopedContextKeyService = createWidgetScopedContextKeyService(contextKeyService, widget);\r\n bindContextScopedWidget(scopedContextKeyService, widget, HistoryNavigationWidgetContext);\r\n const historyNavigationEnablement = new RawContextKey(HistoryNavigationEnablementContext, true).bindTo(scopedContextKeyService);\r\n return { scopedContextKeyService, historyNavigationEnablement };\r\n}\r\nlet ContextScopedFindInput = class ContextScopedFindInput extends FindInput {\r\n constructor(container, contextViewProvider, options, contextKeyService, showFindOptions = false) {\r\n super(container, contextViewProvider, showFindOptions, options);\r\n this._register(createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService, { target: this.inputBox.element, historyNavigator: this.inputBox }).scopedContextKeyService);\r\n }\r\n};\r\nContextScopedFindInput = __decorate([\r\n __param(3, IContextKeyService)\r\n], ContextScopedFindInput);\r\nexport { ContextScopedFindInput };\r\nlet ContextScopedReplaceInput = class ContextScopedReplaceInput extends ReplaceInput {\r\n constructor(container, contextViewProvider, options, contextKeyService, showReplaceOptions = false) {\r\n super(container, contextViewProvider, showReplaceOptions, options);\r\n this._register(createAndBindHistoryNavigationWidgetScopedContextKeyService(contextKeyService, { target: this.inputBox.element, historyNavigator: this.inputBox }).scopedContextKeyService);\r\n }\r\n};\r\nContextScopedReplaceInput = __decorate([\r\n __param(3, IContextKeyService)\r\n], ContextScopedReplaceInput);\r\nexport { ContextScopedReplaceInput };\r\nKeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'history.showPrevious',\r\n weight: 200 /* WorkbenchContrib */,\r\n when: ContextKeyExpr.and(ContextKeyExpr.has(HistoryNavigationWidgetContext), ContextKeyExpr.equals(HistoryNavigationEnablementContext, true)),\r\n primary: 16 /* UpArrow */,\r\n secondary: [512 /* Alt */ | 16 /* UpArrow */],\r\n handler: (accessor, arg2) => {\r\n const widget = getContextScopedWidget(accessor.get(IContextKeyService), HistoryNavigationWidgetContext);\r\n if (widget) {\r\n const historyInputBox = widget.historyNavigator;\r\n historyInputBox.showPreviousValue();\r\n }\r\n }\r\n});\r\nKeybindingsRegistry.registerCommandAndKeybindingRule({\r\n id: 'history.showNext',\r\n weight: 200 /* WorkbenchContrib */,\r\n when: ContextKeyExpr.and(ContextKeyExpr.has(HistoryNavigationWidgetContext), ContextKeyExpr.equals(HistoryNavigationEnablementContext, true)),\r\n primary: 18 /* DownArrow */,\r\n secondary: [512 /* Alt */ | 18 /* DownArrow */],\r\n handler: (accessor, arg2) => {\r\n const widget = getContextScopedWidget(accessor.get(IContextKeyService), HistoryNavigationWidgetContext);\r\n if (widget) {\r\n const historyInputBox = widget.historyNavigator;\r\n historyInputBox.showNextValue();\r\n }\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport './findWidget.css';\r\nimport * as nls from '../../../nls.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { alert as alertFn } from '../../../base/browser/ui/aria/aria.js';\r\nimport { Checkbox } from '../../../base/browser/ui/checkbox/checkbox.js';\r\nimport { Sash } from '../../../base/browser/ui/sash/sash.js';\r\nimport { Widget } from '../../../base/browser/ui/widget.js';\r\nimport { Delayer } from '../../../base/common/async.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { toDisposable } from '../../../base/common/lifecycle.js';\r\nimport * as platform from '../../../base/common/platform.js';\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { CONTEXT_FIND_INPUT_FOCUSED, CONTEXT_REPLACE_INPUT_FOCUSED, FIND_IDS, MATCHES_LIMIT } from './findModel.js';\r\nimport { contrastBorder, editorFindMatch, editorFindMatchBorder, editorFindMatchHighlight, editorFindMatchHighlightBorder, editorFindRangeHighlight, editorFindRangeHighlightBorder, editorWidgetBackground, editorWidgetBorder, editorWidgetResizeBorder, errorForeground, inputActiveOptionBorder, inputActiveOptionBackground, inputActiveOptionForeground, inputBackground, inputBorder, inputForeground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationInfoForeground, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationWarningForeground, widgetShadow, editorWidgetForeground, focusBorder } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant, ThemeIcon } from '../../../platform/theme/common/themeService.js';\r\nimport { ContextScopedFindInput, ContextScopedReplaceInput } from '../../../platform/browser/contextScopedHistoryWidget.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nimport { registerIcon, widgetClose } from '../../../platform/theme/common/iconRegistry.js';\r\nconst findSelectionIcon = registerIcon('find-selection', Codicon.selection, nls.localize('findSelectionIcon', 'Icon for \\'Find in Selection\\' in the editor find widget.'));\r\nconst findCollapsedIcon = registerIcon('find-collapsed', Codicon.chevronRight, nls.localize('findCollapsedIcon', 'Icon to indicate that the editor find widget is collapsed.'));\r\nconst findExpandedIcon = registerIcon('find-expanded', Codicon.chevronDown, nls.localize('findExpandedIcon', 'Icon to indicate that the editor find widget is expanded.'));\r\nexport const findReplaceIcon = registerIcon('find-replace', Codicon.replace, nls.localize('findReplaceIcon', 'Icon for \\'Replace\\' in the editor find widget.'));\r\nexport const findReplaceAllIcon = registerIcon('find-replace-all', Codicon.replaceAll, nls.localize('findReplaceAllIcon', 'Icon for \\'Replace All\\' in the editor find widget.'));\r\nexport const findPreviousMatchIcon = registerIcon('find-previous-match', Codicon.arrowUp, nls.localize('findPreviousMatchIcon', 'Icon for \\'Find Previous\\' in the editor find widget.'));\r\nexport const findNextMatchIcon = registerIcon('find-next-match', Codicon.arrowDown, nls.localize('findNextMatchIcon', 'Icon for \\'Find Next\\' in the editor find widget.'));\r\nconst NLS_FIND_INPUT_LABEL = nls.localize('label.find', \"Find\");\r\nconst NLS_FIND_INPUT_PLACEHOLDER = nls.localize('placeholder.find', \"Find\");\r\nconst NLS_PREVIOUS_MATCH_BTN_LABEL = nls.localize('label.previousMatchButton', \"Previous match\");\r\nconst NLS_NEXT_MATCH_BTN_LABEL = nls.localize('label.nextMatchButton', \"Next match\");\r\nconst NLS_TOGGLE_SELECTION_FIND_TITLE = nls.localize('label.toggleSelectionFind', \"Find in selection\");\r\nconst NLS_CLOSE_BTN_LABEL = nls.localize('label.closeButton', \"Close\");\r\nconst NLS_REPLACE_INPUT_LABEL = nls.localize('label.replace', \"Replace\");\r\nconst NLS_REPLACE_INPUT_PLACEHOLDER = nls.localize('placeholder.replace', \"Replace\");\r\nconst NLS_REPLACE_BTN_LABEL = nls.localize('label.replaceButton', \"Replace\");\r\nconst NLS_REPLACE_ALL_BTN_LABEL = nls.localize('label.replaceAllButton', \"Replace All\");\r\nconst NLS_TOGGLE_REPLACE_MODE_BTN_LABEL = nls.localize('label.toggleReplaceButton', \"Toggle Replace mode\");\r\nconst NLS_MATCHES_COUNT_LIMIT_TITLE = nls.localize('title.matchesCountLimit', \"Only the first {0} results are highlighted, but all find operations work on the entire text.\", MATCHES_LIMIT);\r\nconst NLS_MATCHES_LOCATION = nls.localize('label.matchesLocation', \"{0} of {1}\");\r\nconst NLS_NO_RESULTS = nls.localize('label.noResults', \"No results\");\r\nconst FIND_WIDGET_INITIAL_WIDTH = 419;\r\nconst PART_WIDTH = 275;\r\nconst FIND_INPUT_AREA_WIDTH = PART_WIDTH - 54;\r\nlet MAX_MATCHES_COUNT_WIDTH = 69;\r\n// let FIND_ALL_CONTROLS_WIDTH = 17/** Find Input margin-left */ + (MAX_MATCHES_COUNT_WIDTH + 3 + 1) /** Match Results */ + 23 /** Button */ * 4 + 2/** sash */;\r\nconst FIND_INPUT_AREA_HEIGHT = 33; // The height of Find Widget when Replace Input is not visible.\r\nconst ctrlEnterReplaceAllWarningPromptedKey = 'ctrlEnterReplaceAll.windows.donotask';\r\nconst ctrlKeyMod = (platform.isMacintosh ? 256 /* WinCtrl */ : 2048 /* CtrlCmd */);\r\nexport class FindWidgetViewZone {\r\n constructor(afterLineNumber) {\r\n this.afterLineNumber = afterLineNumber;\r\n this.heightInPx = FIND_INPUT_AREA_HEIGHT;\r\n this.suppressMouseDown = false;\r\n this.domNode = document.createElement('div');\r\n this.domNode.className = 'dock-find-viewzone';\r\n }\r\n}\r\nfunction stopPropagationForMultiLineUpwards(event, value, textarea) {\r\n const isMultiline = !!value.match(/\\n/);\r\n if (textarea && isMultiline && textarea.selectionStart > 0) {\r\n event.stopPropagation();\r\n return;\r\n }\r\n}\r\nfunction stopPropagationForMultiLineDownwards(event, value, textarea) {\r\n const isMultiline = !!value.match(/\\n/);\r\n if (textarea && isMultiline && textarea.selectionEnd < textarea.value.length) {\r\n event.stopPropagation();\r\n return;\r\n }\r\n}\r\nexport class FindWidget extends Widget {\r\n constructor(codeEditor, controller, state, contextViewProvider, keybindingService, contextKeyService, themeService, storageService, notificationService) {\r\n super();\r\n this._cachedHeight = null;\r\n this._revealTimeouts = [];\r\n this._codeEditor = codeEditor;\r\n this._controller = controller;\r\n this._state = state;\r\n this._contextViewProvider = contextViewProvider;\r\n this._keybindingService = keybindingService;\r\n this._contextKeyService = contextKeyService;\r\n this._storageService = storageService;\r\n this._notificationService = notificationService;\r\n this._ctrlEnterReplaceAllWarningPrompted = !!storageService.getBoolean(ctrlEnterReplaceAllWarningPromptedKey, 0 /* GLOBAL */);\r\n this._isVisible = false;\r\n this._isReplaceVisible = false;\r\n this._ignoreChangeEvent = false;\r\n this._updateHistoryDelayer = new Delayer(500);\r\n this._register(toDisposable(() => this._updateHistoryDelayer.cancel()));\r\n this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e)));\r\n this._buildDomNode();\r\n this._updateButtons();\r\n this._tryUpdateWidgetWidth();\r\n this._findInput.inputBox.layout();\r\n this._register(this._codeEditor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(75 /* readOnly */)) {\r\n if (this._codeEditor.getOption(75 /* readOnly */)) {\r\n // Hide replace part if editor becomes read only\r\n this._state.change({ isReplaceRevealed: false }, false);\r\n }\r\n this._updateButtons();\r\n }\r\n if (e.hasChanged(124 /* layoutInfo */)) {\r\n this._tryUpdateWidgetWidth();\r\n }\r\n if (e.hasChanged(2 /* accessibilitySupport */)) {\r\n this.updateAccessibilitySupport();\r\n }\r\n if (e.hasChanged(31 /* find */)) {\r\n const addExtraSpaceOnTop = this._codeEditor.getOption(31 /* find */).addExtraSpaceOnTop;\r\n if (addExtraSpaceOnTop && !this._viewZone) {\r\n this._viewZone = new FindWidgetViewZone(0);\r\n this._showViewZone();\r\n }\r\n if (!addExtraSpaceOnTop && this._viewZone) {\r\n this._removeViewZone();\r\n }\r\n }\r\n }));\r\n this.updateAccessibilitySupport();\r\n this._register(this._codeEditor.onDidChangeCursorSelection(() => {\r\n if (this._isVisible) {\r\n this._updateToggleSelectionFindButton();\r\n }\r\n }));\r\n this._register(this._codeEditor.onDidFocusEditorWidget(() => __awaiter(this, void 0, void 0, function* () {\r\n if (this._isVisible) {\r\n let globalBufferTerm = yield this._controller.getGlobalBufferTerm();\r\n if (globalBufferTerm && globalBufferTerm !== this._state.searchString) {\r\n this._state.change({ searchString: globalBufferTerm }, false);\r\n this._findInput.select();\r\n }\r\n }\r\n })));\r\n this._findInputFocused = CONTEXT_FIND_INPUT_FOCUSED.bindTo(contextKeyService);\r\n this._findFocusTracker = this._register(dom.trackFocus(this._findInput.inputBox.inputElement));\r\n this._register(this._findFocusTracker.onDidFocus(() => {\r\n this._findInputFocused.set(true);\r\n this._updateSearchScope();\r\n }));\r\n this._register(this._findFocusTracker.onDidBlur(() => {\r\n this._findInputFocused.set(false);\r\n }));\r\n this._replaceInputFocused = CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(contextKeyService);\r\n this._replaceFocusTracker = this._register(dom.trackFocus(this._replaceInput.inputBox.inputElement));\r\n this._register(this._replaceFocusTracker.onDidFocus(() => {\r\n this._replaceInputFocused.set(true);\r\n this._updateSearchScope();\r\n }));\r\n this._register(this._replaceFocusTracker.onDidBlur(() => {\r\n this._replaceInputFocused.set(false);\r\n }));\r\n this._codeEditor.addOverlayWidget(this);\r\n if (this._codeEditor.getOption(31 /* find */).addExtraSpaceOnTop) {\r\n this._viewZone = new FindWidgetViewZone(0); // Put it before the first line then users can scroll beyond the first line.\r\n }\r\n this._applyTheme(themeService.getColorTheme());\r\n this._register(themeService.onDidColorThemeChange(this._applyTheme.bind(this)));\r\n this._register(this._codeEditor.onDidChangeModel(() => {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n this._viewZoneId = undefined;\r\n }));\r\n this._register(this._codeEditor.onDidScrollChange((e) => {\r\n if (e.scrollTopChanged) {\r\n this._layoutViewZone();\r\n return;\r\n }\r\n // for other scroll changes, layout the viewzone in next tick to avoid ruining current rendering.\r\n setTimeout(() => {\r\n this._layoutViewZone();\r\n }, 0);\r\n }));\r\n }\r\n // ----- IOverlayWidget API\r\n getId() {\r\n return FindWidget.ID;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n if (this._isVisible) {\r\n return {\r\n preference: 0 /* TOP_RIGHT_CORNER */\r\n };\r\n }\r\n return null;\r\n }\r\n // ----- React to state changes\r\n _onStateChanged(e) {\r\n if (e.searchString) {\r\n try {\r\n this._ignoreChangeEvent = true;\r\n this._findInput.setValue(this._state.searchString);\r\n }\r\n finally {\r\n this._ignoreChangeEvent = false;\r\n }\r\n this._updateButtons();\r\n }\r\n if (e.replaceString) {\r\n this._replaceInput.inputBox.value = this._state.replaceString;\r\n }\r\n if (e.isRevealed) {\r\n if (this._state.isRevealed) {\r\n this._reveal();\r\n }\r\n else {\r\n this._hide(true);\r\n }\r\n }\r\n if (e.isReplaceRevealed) {\r\n if (this._state.isReplaceRevealed) {\r\n if (!this._codeEditor.getOption(75 /* readOnly */) && !this._isReplaceVisible) {\r\n this._isReplaceVisible = true;\r\n this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode);\r\n this._updateButtons();\r\n this._replaceInput.inputBox.layout();\r\n }\r\n }\r\n else {\r\n if (this._isReplaceVisible) {\r\n this._isReplaceVisible = false;\r\n this._updateButtons();\r\n }\r\n }\r\n }\r\n if ((e.isRevealed || e.isReplaceRevealed) && (this._state.isRevealed || this._state.isReplaceRevealed)) {\r\n if (this._tryUpdateHeight()) {\r\n this._showViewZone();\r\n }\r\n }\r\n if (e.isRegex) {\r\n this._findInput.setRegex(this._state.isRegex);\r\n }\r\n if (e.wholeWord) {\r\n this._findInput.setWholeWords(this._state.wholeWord);\r\n }\r\n if (e.matchCase) {\r\n this._findInput.setCaseSensitive(this._state.matchCase);\r\n }\r\n if (e.preserveCase) {\r\n this._replaceInput.setPreserveCase(this._state.preserveCase);\r\n }\r\n if (e.searchScope) {\r\n if (this._state.searchScope) {\r\n this._toggleSelectionFind.checked = true;\r\n }\r\n else {\r\n this._toggleSelectionFind.checked = false;\r\n }\r\n this._updateToggleSelectionFindButton();\r\n }\r\n if (e.searchString || e.matchesCount || e.matchesPosition) {\r\n let showRedOutline = (this._state.searchString.length > 0 && this._state.matchesCount === 0);\r\n this._domNode.classList.toggle('no-results', showRedOutline);\r\n this._updateMatchesCount();\r\n this._updateButtons();\r\n }\r\n if (e.searchString || e.currentMatch) {\r\n this._layoutViewZone();\r\n }\r\n if (e.updateHistory) {\r\n this._delayedUpdateHistory();\r\n }\r\n if (e.loop) {\r\n this._updateButtons();\r\n }\r\n }\r\n _delayedUpdateHistory() {\r\n this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(undefined, onUnexpectedError);\r\n }\r\n _updateHistory() {\r\n if (this._state.searchString) {\r\n this._findInput.inputBox.addToHistory();\r\n }\r\n if (this._state.replaceString) {\r\n this._replaceInput.inputBox.addToHistory();\r\n }\r\n }\r\n _updateMatchesCount() {\r\n this._matchesCount.style.minWidth = MAX_MATCHES_COUNT_WIDTH + 'px';\r\n if (this._state.matchesCount >= MATCHES_LIMIT) {\r\n this._matchesCount.title = NLS_MATCHES_COUNT_LIMIT_TITLE;\r\n }\r\n else {\r\n this._matchesCount.title = '';\r\n }\r\n // remove previous content\r\n if (this._matchesCount.firstChild) {\r\n this._matchesCount.removeChild(this._matchesCount.firstChild);\r\n }\r\n let label;\r\n if (this._state.matchesCount > 0) {\r\n let matchesCount = String(this._state.matchesCount);\r\n if (this._state.matchesCount >= MATCHES_LIMIT) {\r\n matchesCount += '+';\r\n }\r\n let matchesPosition = String(this._state.matchesPosition);\r\n if (matchesPosition === '0') {\r\n matchesPosition = '?';\r\n }\r\n label = strings.format(NLS_MATCHES_LOCATION, matchesPosition, matchesCount);\r\n }\r\n else {\r\n label = NLS_NO_RESULTS;\r\n }\r\n this._matchesCount.appendChild(document.createTextNode(label));\r\n alertFn(this._getAriaLabel(label, this._state.currentMatch, this._state.searchString));\r\n MAX_MATCHES_COUNT_WIDTH = Math.max(MAX_MATCHES_COUNT_WIDTH, this._matchesCount.clientWidth);\r\n }\r\n // ----- actions\r\n _getAriaLabel(label, currentMatch, searchString) {\r\n if (label === NLS_NO_RESULTS) {\r\n return searchString === ''\r\n ? nls.localize('ariaSearchNoResultEmpty', \"{0} found\", label)\r\n : nls.localize('ariaSearchNoResult', \"{0} found for '{1}'\", label, searchString);\r\n }\r\n if (currentMatch) {\r\n const ariaLabel = nls.localize('ariaSearchNoResultWithLineNum', \"{0} found for '{1}', at {2}\", label, searchString, currentMatch.startLineNumber + ':' + currentMatch.startColumn);\r\n const model = this._codeEditor.getModel();\r\n if (model && (currentMatch.startLineNumber <= model.getLineCount()) && (currentMatch.startLineNumber >= 1)) {\r\n const lineContent = model.getLineContent(currentMatch.startLineNumber);\r\n return `${lineContent}, ${ariaLabel}`;\r\n }\r\n return ariaLabel;\r\n }\r\n return nls.localize('ariaSearchNoResultWithLineNumNoCurrentMatch', \"{0} found for '{1}'\", label, searchString);\r\n }\r\n /**\r\n * If 'selection find' is ON we should not disable the button (its function is to cancel 'selection find').\r\n * If 'selection find' is OFF we enable the button only if there is a selection.\r\n */\r\n _updateToggleSelectionFindButton() {\r\n let selection = this._codeEditor.getSelection();\r\n let isSelection = selection ? (selection.startLineNumber !== selection.endLineNumber || selection.startColumn !== selection.endColumn) : false;\r\n let isChecked = this._toggleSelectionFind.checked;\r\n if (this._isVisible && (isChecked || isSelection)) {\r\n this._toggleSelectionFind.enable();\r\n }\r\n else {\r\n this._toggleSelectionFind.disable();\r\n }\r\n }\r\n _updateButtons() {\r\n this._findInput.setEnabled(this._isVisible);\r\n this._replaceInput.setEnabled(this._isVisible && this._isReplaceVisible);\r\n this._updateToggleSelectionFindButton();\r\n this._closeBtn.setEnabled(this._isVisible);\r\n let findInputIsNonEmpty = (this._state.searchString.length > 0);\r\n let matchesCount = this._state.matchesCount ? true : false;\r\n this._prevBtn.setEnabled(this._isVisible && findInputIsNonEmpty && matchesCount && this._state.canNavigateBack());\r\n this._nextBtn.setEnabled(this._isVisible && findInputIsNonEmpty && matchesCount && this._state.canNavigateForward());\r\n this._replaceBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty);\r\n this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty);\r\n this._domNode.classList.toggle('replaceToggled', this._isReplaceVisible);\r\n this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);\r\n let canReplace = !this._codeEditor.getOption(75 /* readOnly */);\r\n this._toggleReplaceBtn.setEnabled(this._isVisible && canReplace);\r\n }\r\n _reveal() {\r\n this._revealTimeouts.forEach(e => {\r\n clearTimeout(e);\r\n });\r\n this._revealTimeouts = [];\r\n if (!this._isVisible) {\r\n this._isVisible = true;\r\n const selection = this._codeEditor.getSelection();\r\n switch (this._codeEditor.getOption(31 /* find */).autoFindInSelection) {\r\n case 'always':\r\n this._toggleSelectionFind.checked = true;\r\n break;\r\n case 'never':\r\n this._toggleSelectionFind.checked = false;\r\n break;\r\n case 'multiline':\r\n const isSelectionMultipleLine = !!selection && selection.startLineNumber !== selection.endLineNumber;\r\n this._toggleSelectionFind.checked = isSelectionMultipleLine;\r\n break;\r\n default:\r\n break;\r\n }\r\n this._tryUpdateWidgetWidth();\r\n this._updateButtons();\r\n this._revealTimeouts.push(setTimeout(() => {\r\n this._domNode.classList.add('visible');\r\n this._domNode.setAttribute('aria-hidden', 'false');\r\n }, 0));\r\n // validate query again as it's being dismissed when we hide the find widget.\r\n this._revealTimeouts.push(setTimeout(() => {\r\n this._findInput.validate();\r\n }, 200));\r\n this._codeEditor.layoutOverlayWidget(this);\r\n let adjustEditorScrollTop = true;\r\n if (this._codeEditor.getOption(31 /* find */).seedSearchStringFromSelection && selection) {\r\n const domNode = this._codeEditor.getDomNode();\r\n if (domNode) {\r\n const editorCoords = dom.getDomNodePagePosition(domNode);\r\n const startCoords = this._codeEditor.getScrolledVisiblePosition(selection.getStartPosition());\r\n const startLeft = editorCoords.left + (startCoords ? startCoords.left : 0);\r\n const startTop = startCoords ? startCoords.top : 0;\r\n if (this._viewZone && startTop < this._viewZone.heightInPx) {\r\n if (selection.endLineNumber > selection.startLineNumber) {\r\n adjustEditorScrollTop = false;\r\n }\r\n const leftOfFindWidget = dom.getTopLeftOffset(this._domNode).left;\r\n if (startLeft > leftOfFindWidget) {\r\n adjustEditorScrollTop = false;\r\n }\r\n const endCoords = this._codeEditor.getScrolledVisiblePosition(selection.getEndPosition());\r\n const endLeft = editorCoords.left + (endCoords ? endCoords.left : 0);\r\n if (endLeft > leftOfFindWidget) {\r\n adjustEditorScrollTop = false;\r\n }\r\n }\r\n }\r\n }\r\n this._showViewZone(adjustEditorScrollTop);\r\n }\r\n }\r\n _hide(focusTheEditor) {\r\n this._revealTimeouts.forEach(e => {\r\n clearTimeout(e);\r\n });\r\n this._revealTimeouts = [];\r\n if (this._isVisible) {\r\n this._isVisible = false;\r\n this._updateButtons();\r\n this._domNode.classList.remove('visible');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._findInput.clearMessage();\r\n if (focusTheEditor) {\r\n this._codeEditor.focus();\r\n }\r\n this._codeEditor.layoutOverlayWidget(this);\r\n this._removeViewZone();\r\n }\r\n }\r\n _layoutViewZone(targetScrollTop) {\r\n const addExtraSpaceOnTop = this._codeEditor.getOption(31 /* find */).addExtraSpaceOnTop;\r\n if (!addExtraSpaceOnTop) {\r\n this._removeViewZone();\r\n return;\r\n }\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n const viewZone = this._viewZone;\r\n if (this._viewZoneId !== undefined || !viewZone) {\r\n return;\r\n }\r\n this._codeEditor.changeViewZones((accessor) => {\r\n viewZone.heightInPx = this._getHeight();\r\n this._viewZoneId = accessor.addZone(viewZone);\r\n // scroll top adjust to make sure the editor doesn't scroll when adding viewzone at the beginning.\r\n this._codeEditor.setScrollTop(targetScrollTop || this._codeEditor.getScrollTop() + viewZone.heightInPx);\r\n });\r\n }\r\n _showViewZone(adjustScroll = true) {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n const addExtraSpaceOnTop = this._codeEditor.getOption(31 /* find */).addExtraSpaceOnTop;\r\n if (!addExtraSpaceOnTop) {\r\n return;\r\n }\r\n if (this._viewZone === undefined) {\r\n this._viewZone = new FindWidgetViewZone(0);\r\n }\r\n const viewZone = this._viewZone;\r\n this._codeEditor.changeViewZones((accessor) => {\r\n if (this._viewZoneId !== undefined) {\r\n // the view zone already exists, we need to update the height\r\n const newHeight = this._getHeight();\r\n if (newHeight === viewZone.heightInPx) {\r\n return;\r\n }\r\n let scrollAdjustment = newHeight - viewZone.heightInPx;\r\n viewZone.heightInPx = newHeight;\r\n accessor.layoutZone(this._viewZoneId);\r\n if (adjustScroll) {\r\n this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment);\r\n }\r\n return;\r\n }\r\n else {\r\n let scrollAdjustment = this._getHeight();\r\n // if the editor has top padding, factor that into the zone height\r\n scrollAdjustment -= this._codeEditor.getOption(69 /* padding */).top;\r\n if (scrollAdjustment <= 0) {\r\n return;\r\n }\r\n viewZone.heightInPx = scrollAdjustment;\r\n this._viewZoneId = accessor.addZone(viewZone);\r\n if (adjustScroll) {\r\n this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment);\r\n }\r\n }\r\n });\r\n }\r\n _removeViewZone() {\r\n this._codeEditor.changeViewZones((accessor) => {\r\n if (this._viewZoneId !== undefined) {\r\n accessor.removeZone(this._viewZoneId);\r\n this._viewZoneId = undefined;\r\n if (this._viewZone) {\r\n this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() - this._viewZone.heightInPx);\r\n this._viewZone = undefined;\r\n }\r\n }\r\n });\r\n }\r\n _applyTheme(theme) {\r\n let inputStyles = {\r\n inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder),\r\n inputActiveOptionBackground: theme.getColor(inputActiveOptionBackground),\r\n inputActiveOptionForeground: theme.getColor(inputActiveOptionForeground),\r\n inputBackground: theme.getColor(inputBackground),\r\n inputForeground: theme.getColor(inputForeground),\r\n inputBorder: theme.getColor(inputBorder),\r\n inputValidationInfoBackground: theme.getColor(inputValidationInfoBackground),\r\n inputValidationInfoForeground: theme.getColor(inputValidationInfoForeground),\r\n inputValidationInfoBorder: theme.getColor(inputValidationInfoBorder),\r\n inputValidationWarningBackground: theme.getColor(inputValidationWarningBackground),\r\n inputValidationWarningForeground: theme.getColor(inputValidationWarningForeground),\r\n inputValidationWarningBorder: theme.getColor(inputValidationWarningBorder),\r\n inputValidationErrorBackground: theme.getColor(inputValidationErrorBackground),\r\n inputValidationErrorForeground: theme.getColor(inputValidationErrorForeground),\r\n inputValidationErrorBorder: theme.getColor(inputValidationErrorBorder),\r\n };\r\n this._findInput.style(inputStyles);\r\n this._replaceInput.style(inputStyles);\r\n this._toggleSelectionFind.style(inputStyles);\r\n }\r\n _tryUpdateWidgetWidth() {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n if (!dom.isInDOM(this._domNode)) {\r\n // the widget is not in the DOM\r\n return;\r\n }\r\n const layoutInfo = this._codeEditor.getLayoutInfo();\r\n const editorContentWidth = layoutInfo.contentWidth;\r\n if (editorContentWidth <= 0) {\r\n // for example, diff view original editor\r\n this._domNode.classList.add('hiddenEditor');\r\n return;\r\n }\r\n else if (this._domNode.classList.contains('hiddenEditor')) {\r\n this._domNode.classList.remove('hiddenEditor');\r\n }\r\n const editorWidth = layoutInfo.width;\r\n const minimapWidth = layoutInfo.minimap.minimapWidth;\r\n let collapsedFindWidget = false;\r\n let reducedFindWidget = false;\r\n let narrowFindWidget = false;\r\n if (this._resized) {\r\n let widgetWidth = dom.getTotalWidth(this._domNode);\r\n if (widgetWidth > FIND_WIDGET_INITIAL_WIDTH) {\r\n // as the widget is resized by users, we may need to change the max width of the widget as the editor width changes.\r\n this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`;\r\n this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode);\r\n return;\r\n }\r\n }\r\n if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth >= editorWidth) {\r\n reducedFindWidget = true;\r\n }\r\n if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth) {\r\n narrowFindWidget = true;\r\n }\r\n if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth + 50) {\r\n collapsedFindWidget = true;\r\n }\r\n this._domNode.classList.toggle('collapsed-find-widget', collapsedFindWidget);\r\n this._domNode.classList.toggle('narrow-find-widget', narrowFindWidget);\r\n this._domNode.classList.toggle('reduced-find-widget', reducedFindWidget);\r\n if (!narrowFindWidget && !collapsedFindWidget) {\r\n // the minimal left offset of findwidget is 15px.\r\n this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`;\r\n }\r\n if (this._resized) {\r\n this._findInput.inputBox.layout();\r\n let findInputWidth = this._findInput.inputBox.element.clientWidth;\r\n if (findInputWidth > 0) {\r\n this._replaceInput.width = findInputWidth;\r\n }\r\n }\r\n else if (this._isReplaceVisible) {\r\n this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode);\r\n }\r\n }\r\n _getHeight() {\r\n let totalheight = 0;\r\n // find input margin top\r\n totalheight += 4;\r\n // find input height\r\n totalheight += this._findInput.inputBox.height + 2 /** input box border */;\r\n if (this._isReplaceVisible) {\r\n // replace input margin\r\n totalheight += 4;\r\n totalheight += this._replaceInput.inputBox.height + 2 /** input box border */;\r\n }\r\n // margin bottom\r\n totalheight += 4;\r\n return totalheight;\r\n }\r\n _tryUpdateHeight() {\r\n const totalHeight = this._getHeight();\r\n if (this._cachedHeight !== null && this._cachedHeight === totalHeight) {\r\n return false;\r\n }\r\n this._cachedHeight = totalHeight;\r\n this._domNode.style.height = `${totalHeight}px`;\r\n return true;\r\n }\r\n // ----- Public\r\n focusFindInput() {\r\n this._findInput.select();\r\n // Edge browser requires focus() in addition to select()\r\n this._findInput.focus();\r\n }\r\n focusReplaceInput() {\r\n this._replaceInput.select();\r\n // Edge browser requires focus() in addition to select()\r\n this._replaceInput.focus();\r\n }\r\n highlightFindOptions() {\r\n this._findInput.highlightFindOptions();\r\n }\r\n _updateSearchScope() {\r\n if (!this._codeEditor.hasModel()) {\r\n return;\r\n }\r\n if (this._toggleSelectionFind.checked) {\r\n let selections = this._codeEditor.getSelections();\r\n selections.map(selection => {\r\n if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) {\r\n selection = selection.setEndPosition(selection.endLineNumber - 1, this._codeEditor.getModel().getLineMaxColumn(selection.endLineNumber - 1));\r\n }\r\n const currentMatch = this._state.currentMatch;\r\n if (selection.startLineNumber !== selection.endLineNumber) {\r\n if (!Range.equalsRange(selection, currentMatch)) {\r\n return selection;\r\n }\r\n }\r\n return null;\r\n }).filter(element => !!element);\r\n if (selections.length) {\r\n this._state.change({ searchScope: selections }, true);\r\n }\r\n }\r\n }\r\n _onFindInputMouseDown(e) {\r\n // on linux, middle key does pasting.\r\n if (e.middleButton) {\r\n e.stopPropagation();\r\n }\r\n }\r\n _onFindInputKeyDown(e) {\r\n if (e.equals(ctrlKeyMod | 3 /* Enter */)) {\r\n this._findInput.inputBox.insertAtCursor('\\n');\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(2 /* Tab */)) {\r\n if (this._isReplaceVisible) {\r\n this._replaceInput.focus();\r\n }\r\n else {\r\n this._findInput.focusOnCaseSensitive();\r\n }\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(2048 /* CtrlCmd */ | 18 /* DownArrow */)) {\r\n this._codeEditor.focus();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(16 /* UpArrow */)) {\r\n return stopPropagationForMultiLineUpwards(e, this._findInput.getValue(), this._findInput.domNode.querySelector('textarea'));\r\n }\r\n if (e.equals(18 /* DownArrow */)) {\r\n return stopPropagationForMultiLineDownwards(e, this._findInput.getValue(), this._findInput.domNode.querySelector('textarea'));\r\n }\r\n }\r\n _onReplaceInputKeyDown(e) {\r\n if (e.equals(ctrlKeyMod | 3 /* Enter */)) {\r\n if (platform.isWindows && platform.isNative && !this._ctrlEnterReplaceAllWarningPrompted) {\r\n // this is the first time when users press Ctrl + Enter to replace all\r\n this._notificationService.info(nls.localize('ctrlEnter.keybindingChanged', 'Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.'));\r\n this._ctrlEnterReplaceAllWarningPrompted = true;\r\n this._storageService.store(ctrlEnterReplaceAllWarningPromptedKey, true, 0 /* GLOBAL */, 0 /* USER */);\r\n }\r\n this._replaceInput.inputBox.insertAtCursor('\\n');\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(2 /* Tab */)) {\r\n this._findInput.focusOnCaseSensitive();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(1024 /* Shift */ | 2 /* Tab */)) {\r\n this._findInput.focus();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(2048 /* CtrlCmd */ | 18 /* DownArrow */)) {\r\n this._codeEditor.focus();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (e.equals(16 /* UpArrow */)) {\r\n return stopPropagationForMultiLineUpwards(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector('textarea'));\r\n }\r\n if (e.equals(18 /* DownArrow */)) {\r\n return stopPropagationForMultiLineDownwards(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector('textarea'));\r\n }\r\n }\r\n // ----- sash\r\n getVerticalSashLeft(_sash) {\r\n return 0;\r\n }\r\n // ----- initialization\r\n _keybindingLabelFor(actionId) {\r\n let kb = this._keybindingService.lookupKeybinding(actionId);\r\n if (!kb) {\r\n return '';\r\n }\r\n return ` (${kb.getLabel()})`;\r\n }\r\n _buildDomNode() {\r\n const flexibleHeight = true;\r\n const flexibleWidth = true;\r\n // Find input\r\n this._findInput = this._register(new ContextScopedFindInput(null, this._contextViewProvider, {\r\n width: FIND_INPUT_AREA_WIDTH,\r\n label: NLS_FIND_INPUT_LABEL,\r\n placeholder: NLS_FIND_INPUT_PLACEHOLDER,\r\n appendCaseSensitiveLabel: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand),\r\n appendWholeWordsLabel: this._keybindingLabelFor(FIND_IDS.ToggleWholeWordCommand),\r\n appendRegexLabel: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand),\r\n validation: (value) => {\r\n if (value.length === 0 || !this._findInput.getRegex()) {\r\n return null;\r\n }\r\n try {\r\n // use `g` and `u` which are also used by the TextModel search\r\n new RegExp(value, 'gu');\r\n return null;\r\n }\r\n catch (e) {\r\n return { content: e.message };\r\n }\r\n },\r\n flexibleHeight,\r\n flexibleWidth,\r\n flexibleMaxHeight: 118\r\n }, this._contextKeyService, true));\r\n this._findInput.setRegex(!!this._state.isRegex);\r\n this._findInput.setCaseSensitive(!!this._state.matchCase);\r\n this._findInput.setWholeWords(!!this._state.wholeWord);\r\n this._register(this._findInput.onKeyDown((e) => this._onFindInputKeyDown(e)));\r\n this._register(this._findInput.inputBox.onDidChange(() => {\r\n if (this._ignoreChangeEvent) {\r\n return;\r\n }\r\n this._state.change({ searchString: this._findInput.getValue() }, true);\r\n }));\r\n this._register(this._findInput.onDidOptionChange(() => {\r\n this._state.change({\r\n isRegex: this._findInput.getRegex(),\r\n wholeWord: this._findInput.getWholeWords(),\r\n matchCase: this._findInput.getCaseSensitive()\r\n }, true);\r\n }));\r\n this._register(this._findInput.onCaseSensitiveKeyDown((e) => {\r\n if (e.equals(1024 /* Shift */ | 2 /* Tab */)) {\r\n if (this._isReplaceVisible) {\r\n this._replaceInput.focus();\r\n e.preventDefault();\r\n }\r\n }\r\n }));\r\n this._register(this._findInput.onRegexKeyDown((e) => {\r\n if (e.equals(2 /* Tab */)) {\r\n if (this._isReplaceVisible) {\r\n this._replaceInput.focusOnPreserve();\r\n e.preventDefault();\r\n }\r\n }\r\n }));\r\n this._register(this._findInput.inputBox.onDidHeightChange((e) => {\r\n if (this._tryUpdateHeight()) {\r\n this._showViewZone();\r\n }\r\n }));\r\n if (platform.isLinux) {\r\n this._register(this._findInput.onMouseDown((e) => this._onFindInputMouseDown(e)));\r\n }\r\n this._matchesCount = document.createElement('div');\r\n this._matchesCount.className = 'matchesCount';\r\n this._updateMatchesCount();\r\n // Previous button\r\n this._prevBtn = this._register(new SimpleButton({\r\n label: NLS_PREVIOUS_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.PreviousMatchFindAction),\r\n icon: findPreviousMatchIcon,\r\n onTrigger: () => {\r\n this._codeEditor.getAction(FIND_IDS.PreviousMatchFindAction).run().then(undefined, onUnexpectedError);\r\n }\r\n }));\r\n // Next button\r\n this._nextBtn = this._register(new SimpleButton({\r\n label: NLS_NEXT_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.NextMatchFindAction),\r\n icon: findNextMatchIcon,\r\n onTrigger: () => {\r\n this._codeEditor.getAction(FIND_IDS.NextMatchFindAction).run().then(undefined, onUnexpectedError);\r\n }\r\n }));\r\n let findPart = document.createElement('div');\r\n findPart.className = 'find-part';\r\n findPart.appendChild(this._findInput.domNode);\r\n const actionsContainer = document.createElement('div');\r\n actionsContainer.className = 'find-actions';\r\n findPart.appendChild(actionsContainer);\r\n actionsContainer.appendChild(this._matchesCount);\r\n actionsContainer.appendChild(this._prevBtn.domNode);\r\n actionsContainer.appendChild(this._nextBtn.domNode);\r\n // Toggle selection button\r\n this._toggleSelectionFind = this._register(new Checkbox({\r\n icon: findSelectionIcon,\r\n title: NLS_TOGGLE_SELECTION_FIND_TITLE + this._keybindingLabelFor(FIND_IDS.ToggleSearchScopeCommand),\r\n isChecked: false\r\n }));\r\n this._register(this._toggleSelectionFind.onChange(() => {\r\n if (this._toggleSelectionFind.checked) {\r\n if (this._codeEditor.hasModel()) {\r\n let selections = this._codeEditor.getSelections();\r\n selections.map(selection => {\r\n if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) {\r\n selection = selection.setEndPosition(selection.endLineNumber - 1, this._codeEditor.getModel().getLineMaxColumn(selection.endLineNumber - 1));\r\n }\r\n if (!selection.isEmpty()) {\r\n return selection;\r\n }\r\n return null;\r\n }).filter(element => !!element);\r\n if (selections.length) {\r\n this._state.change({ searchScope: selections }, true);\r\n }\r\n }\r\n }\r\n else {\r\n this._state.change({ searchScope: null }, true);\r\n }\r\n }));\r\n actionsContainer.appendChild(this._toggleSelectionFind.domNode);\r\n // Close button\r\n this._closeBtn = this._register(new SimpleButton({\r\n label: NLS_CLOSE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.CloseFindWidgetCommand),\r\n icon: widgetClose,\r\n onTrigger: () => {\r\n this._state.change({ isRevealed: false, searchScope: null }, false);\r\n },\r\n onKeyDown: (e) => {\r\n if (e.equals(2 /* Tab */)) {\r\n if (this._isReplaceVisible) {\r\n if (this._replaceBtn.isEnabled()) {\r\n this._replaceBtn.focus();\r\n }\r\n else {\r\n this._codeEditor.focus();\r\n }\r\n e.preventDefault();\r\n }\r\n }\r\n }\r\n }));\r\n actionsContainer.appendChild(this._closeBtn.domNode);\r\n // Replace input\r\n this._replaceInput = this._register(new ContextScopedReplaceInput(null, undefined, {\r\n label: NLS_REPLACE_INPUT_LABEL,\r\n placeholder: NLS_REPLACE_INPUT_PLACEHOLDER,\r\n appendPreserveCaseLabel: this._keybindingLabelFor(FIND_IDS.TogglePreserveCaseCommand),\r\n history: [],\r\n flexibleHeight,\r\n flexibleWidth,\r\n flexibleMaxHeight: 118\r\n }, this._contextKeyService, true));\r\n this._replaceInput.setPreserveCase(!!this._state.preserveCase);\r\n this._register(this._replaceInput.onKeyDown((e) => this._onReplaceInputKeyDown(e)));\r\n this._register(this._replaceInput.inputBox.onDidChange(() => {\r\n this._state.change({ replaceString: this._replaceInput.inputBox.value }, false);\r\n }));\r\n this._register(this._replaceInput.inputBox.onDidHeightChange((e) => {\r\n if (this._isReplaceVisible && this._tryUpdateHeight()) {\r\n this._showViewZone();\r\n }\r\n }));\r\n this._register(this._replaceInput.onDidOptionChange(() => {\r\n this._state.change({\r\n preserveCase: this._replaceInput.getPreserveCase()\r\n }, true);\r\n }));\r\n this._register(this._replaceInput.onPreserveCaseKeyDown((e) => {\r\n if (e.equals(2 /* Tab */)) {\r\n if (this._prevBtn.isEnabled()) {\r\n this._prevBtn.focus();\r\n }\r\n else if (this._nextBtn.isEnabled()) {\r\n this._nextBtn.focus();\r\n }\r\n else if (this._toggleSelectionFind.enabled) {\r\n this._toggleSelectionFind.focus();\r\n }\r\n else if (this._closeBtn.isEnabled()) {\r\n this._closeBtn.focus();\r\n }\r\n e.preventDefault();\r\n }\r\n }));\r\n // Replace one button\r\n this._replaceBtn = this._register(new SimpleButton({\r\n label: NLS_REPLACE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceOneAction),\r\n icon: findReplaceIcon,\r\n onTrigger: () => {\r\n this._controller.replace();\r\n },\r\n onKeyDown: (e) => {\r\n if (e.equals(1024 /* Shift */ | 2 /* Tab */)) {\r\n this._closeBtn.focus();\r\n e.preventDefault();\r\n }\r\n }\r\n }));\r\n // Replace all button\r\n this._replaceAllBtn = this._register(new SimpleButton({\r\n label: NLS_REPLACE_ALL_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceAllAction),\r\n icon: findReplaceAllIcon,\r\n onTrigger: () => {\r\n this._controller.replaceAll();\r\n }\r\n }));\r\n let replacePart = document.createElement('div');\r\n replacePart.className = 'replace-part';\r\n replacePart.appendChild(this._replaceInput.domNode);\r\n const replaceActionsContainer = document.createElement('div');\r\n replaceActionsContainer.className = 'replace-actions';\r\n replacePart.appendChild(replaceActionsContainer);\r\n replaceActionsContainer.appendChild(this._replaceBtn.domNode);\r\n replaceActionsContainer.appendChild(this._replaceAllBtn.domNode);\r\n // Toggle replace button\r\n this._toggleReplaceBtn = this._register(new SimpleButton({\r\n label: NLS_TOGGLE_REPLACE_MODE_BTN_LABEL,\r\n className: 'codicon toggle left',\r\n onTrigger: () => {\r\n this._state.change({ isReplaceRevealed: !this._isReplaceVisible }, false);\r\n if (this._isReplaceVisible) {\r\n this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode);\r\n this._replaceInput.inputBox.layout();\r\n }\r\n this._showViewZone();\r\n }\r\n }));\r\n this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);\r\n // Widget\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = 'editor-widget find-widget';\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n // We need to set this explicitly, otherwise on IE11, the width inheritence of flex doesn't work.\r\n this._domNode.style.width = `${FIND_WIDGET_INITIAL_WIDTH}px`;\r\n this._domNode.appendChild(this._toggleReplaceBtn.domNode);\r\n this._domNode.appendChild(findPart);\r\n this._domNode.appendChild(replacePart);\r\n this._resizeSash = new Sash(this._domNode, this, { orientation: 0 /* VERTICAL */, size: 2 });\r\n this._resized = false;\r\n let originalWidth = FIND_WIDGET_INITIAL_WIDTH;\r\n this._register(this._resizeSash.onDidStart(() => {\r\n originalWidth = dom.getTotalWidth(this._domNode);\r\n }));\r\n this._register(this._resizeSash.onDidChange((evt) => {\r\n this._resized = true;\r\n let width = originalWidth + evt.startX - evt.currentX;\r\n if (width < FIND_WIDGET_INITIAL_WIDTH) {\r\n // narrow down the find widget should be handled by CSS.\r\n return;\r\n }\r\n const maxWidth = parseFloat(dom.getComputedStyle(this._domNode).maxWidth) || 0;\r\n if (width > maxWidth) {\r\n return;\r\n }\r\n this._domNode.style.width = `${width}px`;\r\n if (this._isReplaceVisible) {\r\n this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode);\r\n }\r\n this._findInput.inputBox.layout();\r\n this._tryUpdateHeight();\r\n }));\r\n this._register(this._resizeSash.onDidReset(() => {\r\n // users double click on the sash\r\n const currentWidth = dom.getTotalWidth(this._domNode);\r\n if (currentWidth < FIND_WIDGET_INITIAL_WIDTH) {\r\n // The editor is narrow and the width of the find widget is controlled fully by CSS.\r\n return;\r\n }\r\n let width = FIND_WIDGET_INITIAL_WIDTH;\r\n if (!this._resized || currentWidth === FIND_WIDGET_INITIAL_WIDTH) {\r\n // 1. never resized before, double click should maximizes it\r\n // 2. users resized it already but its width is the same as default\r\n const layoutInfo = this._codeEditor.getLayoutInfo();\r\n width = layoutInfo.width - 28 - layoutInfo.minimap.minimapWidth - 15;\r\n this._resized = true;\r\n }\r\n else {\r\n /**\r\n * no op, the find widget should be shrinked to its default size.\r\n */\r\n }\r\n this._domNode.style.width = `${width}px`;\r\n if (this._isReplaceVisible) {\r\n this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode);\r\n }\r\n this._findInput.inputBox.layout();\r\n }));\r\n }\r\n updateAccessibilitySupport() {\r\n const value = this._codeEditor.getOption(2 /* accessibilitySupport */);\r\n this._findInput.setFocusInputOnOptionClick(value !== 2 /* Enabled */);\r\n }\r\n}\r\nFindWidget.ID = 'editor.contrib.findWidget';\r\nexport class SimpleButton extends Widget {\r\n constructor(opts) {\r\n super();\r\n this._opts = opts;\r\n let className = 'button';\r\n if (this._opts.className) {\r\n className = className + ' ' + this._opts.className;\r\n }\r\n if (this._opts.icon) {\r\n className = className + ' ' + ThemeIcon.asClassName(this._opts.icon);\r\n }\r\n this._domNode = document.createElement('div');\r\n this._domNode.title = this._opts.label;\r\n this._domNode.tabIndex = 0;\r\n this._domNode.className = className;\r\n this._domNode.setAttribute('role', 'button');\r\n this._domNode.setAttribute('aria-label', this._opts.label);\r\n this.onclick(this._domNode, (e) => {\r\n this._opts.onTrigger();\r\n e.preventDefault();\r\n });\r\n this.onkeydown(this._domNode, (e) => {\r\n if (e.equals(10 /* Space */) || e.equals(3 /* Enter */)) {\r\n this._opts.onTrigger();\r\n e.preventDefault();\r\n return;\r\n }\r\n if (this._opts.onKeyDown) {\r\n this._opts.onKeyDown(e);\r\n }\r\n });\r\n }\r\n get domNode() {\r\n return this._domNode;\r\n }\r\n isEnabled() {\r\n return (this._domNode.tabIndex >= 0);\r\n }\r\n focus() {\r\n this._domNode.focus();\r\n }\r\n setEnabled(enabled) {\r\n this._domNode.classList.toggle('disabled', !enabled);\r\n this._domNode.setAttribute('aria-disabled', String(!enabled));\r\n this._domNode.tabIndex = enabled ? 0 : -1;\r\n }\r\n setExpanded(expanded) {\r\n this._domNode.setAttribute('aria-expanded', String(!!expanded));\r\n if (expanded) {\r\n this._domNode.classList.remove(...ThemeIcon.asClassNameArray(findCollapsedIcon));\r\n this._domNode.classList.add(...ThemeIcon.asClassNameArray(findExpandedIcon));\r\n }\r\n else {\r\n this._domNode.classList.remove(...ThemeIcon.asClassNameArray(findExpandedIcon));\r\n this._domNode.classList.add(...ThemeIcon.asClassNameArray(findCollapsedIcon));\r\n }\r\n }\r\n}\r\n// theming\r\nregisterThemingParticipant((theme, collector) => {\r\n const addBackgroundColorRule = (selector, color) => {\r\n if (color) {\r\n collector.addRule(`.monaco-editor ${selector} { background-color: ${color}; }`);\r\n }\r\n };\r\n addBackgroundColorRule('.findMatch', theme.getColor(editorFindMatchHighlight));\r\n addBackgroundColorRule('.currentFindMatch', theme.getColor(editorFindMatch));\r\n addBackgroundColorRule('.findScope', theme.getColor(editorFindRangeHighlight));\r\n const widgetBackground = theme.getColor(editorWidgetBackground);\r\n addBackgroundColorRule('.find-widget', widgetBackground);\r\n const widgetShadowColor = theme.getColor(widgetShadow);\r\n if (widgetShadowColor) {\r\n collector.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${widgetShadowColor}; }`);\r\n }\r\n const findMatchHighlightBorder = theme.getColor(editorFindMatchHighlightBorder);\r\n if (findMatchHighlightBorder) {\r\n collector.addRule(`.monaco-editor .findMatch { border: 1px ${theme.type === 'hc' ? 'dotted' : 'solid'} ${findMatchHighlightBorder}; box-sizing: border-box; }`);\r\n }\r\n const findMatchBorder = theme.getColor(editorFindMatchBorder);\r\n if (findMatchBorder) {\r\n collector.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${findMatchBorder}; padding: 1px; box-sizing: border-box; }`);\r\n }\r\n const findRangeHighlightBorder = theme.getColor(editorFindRangeHighlightBorder);\r\n if (findRangeHighlightBorder) {\r\n collector.addRule(`.monaco-editor .findScope { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${findRangeHighlightBorder}; }`);\r\n }\r\n const hcBorder = theme.getColor(contrastBorder);\r\n if (hcBorder) {\r\n collector.addRule(`.monaco-editor .find-widget { border: 1px solid ${hcBorder}; }`);\r\n }\r\n const foreground = theme.getColor(editorWidgetForeground);\r\n if (foreground) {\r\n collector.addRule(`.monaco-editor .find-widget { color: ${foreground}; }`);\r\n }\r\n const error = theme.getColor(errorForeground);\r\n if (error) {\r\n collector.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${error}; }`);\r\n }\r\n const resizeBorderBackground = theme.getColor(editorWidgetResizeBorder);\r\n if (resizeBorderBackground) {\r\n collector.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${resizeBorderBackground}; }`);\r\n }\r\n else {\r\n const border = theme.getColor(editorWidgetBorder);\r\n if (border) {\r\n collector.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${border}; }`);\r\n }\r\n }\r\n // This rule is used to override the outline color for synthetic-focus find input.\r\n const focusOutline = theme.getColor(focusBorder);\r\n if (focusOutline) {\r\n collector.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${focusOutline}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport { Delayer } from '../../../base/common/async.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { EditorAction, EditorCommand, registerEditorAction, registerEditorCommand, registerEditorContribution, MultiEditorAction, registerMultiEditorAction } from '../../browser/editorExtensions.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { CONTEXT_FIND_INPUT_FOCUSED, CONTEXT_FIND_WIDGET_VISIBLE, FIND_IDS, FindModelBoundToEditorModel, ToggleCaseSensitiveKeybinding, TogglePreserveCaseKeybinding, ToggleRegexKeybinding, ToggleSearchScopeKeybinding, ToggleWholeWordKeybinding, CONTEXT_REPLACE_INPUT_FOCUSED } from './findModel.js';\r\nimport { FindOptionsWidget } from './findOptionsWidget.js';\r\nimport { FindReplaceState } from './findState.js';\r\nimport { FindWidget } from './findWidget.js';\r\nimport { MenuId } from '../../../platform/actions/common/actions.js';\r\nimport { IClipboardService } from '../../../platform/clipboard/common/clipboardService.js';\r\nimport { IContextKeyService, ContextKeyExpr } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { IContextViewService } from '../../../platform/contextview/browser/contextView.js';\r\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding.js';\r\nimport { IStorageService } from '../../../platform/storage/common/storage.js';\r\nimport { IThemeService } from '../../../platform/theme/common/themeService.js';\r\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\r\nconst SEARCH_STRING_MAX_LENGTH = 524288;\r\nexport function getSelectionSearchString(editor, seedSearchStringFromSelection = 'single') {\r\n if (!editor.hasModel()) {\r\n return null;\r\n }\r\n const selection = editor.getSelection();\r\n // if selection spans multiple lines, default search string to empty\r\n if ((seedSearchStringFromSelection === 'single' && selection.startLineNumber === selection.endLineNumber)\r\n || seedSearchStringFromSelection === 'multiple') {\r\n if (selection.isEmpty()) {\r\n const wordAtPosition = editor.getConfiguredWordAtPosition(selection.getStartPosition());\r\n if (wordAtPosition) {\r\n return wordAtPosition.word;\r\n }\r\n }\r\n else {\r\n if (editor.getModel().getValueLengthInRange(selection) < SEARCH_STRING_MAX_LENGTH) {\r\n return editor.getModel().getValueInRange(selection);\r\n }\r\n }\r\n }\r\n return null;\r\n}\r\nlet CommonFindController = class CommonFindController extends Disposable {\r\n constructor(editor, contextKeyService, storageService, clipboardService) {\r\n super();\r\n this._editor = editor;\r\n this._findWidgetVisible = CONTEXT_FIND_WIDGET_VISIBLE.bindTo(contextKeyService);\r\n this._contextKeyService = contextKeyService;\r\n this._storageService = storageService;\r\n this._clipboardService = clipboardService;\r\n this._updateHistoryDelayer = new Delayer(500);\r\n this._state = this._register(new FindReplaceState());\r\n this.loadQueryState();\r\n this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e)));\r\n this._model = null;\r\n this._register(this._editor.onDidChangeModel(() => {\r\n let shouldRestartFind = (this._editor.getModel() && this._state.isRevealed);\r\n this.disposeModel();\r\n this._state.change({\r\n searchScope: null,\r\n matchCase: this._storageService.getBoolean('editor.matchCase', 1 /* WORKSPACE */, false),\r\n wholeWord: this._storageService.getBoolean('editor.wholeWord', 1 /* WORKSPACE */, false),\r\n isRegex: this._storageService.getBoolean('editor.isRegex', 1 /* WORKSPACE */, false),\r\n preserveCase: this._storageService.getBoolean('editor.preserveCase', 1 /* WORKSPACE */, false)\r\n }, false);\r\n if (shouldRestartFind) {\r\n this._start({\r\n forceRevealReplace: false,\r\n seedSearchStringFromSelection: 'none',\r\n seedSearchStringFromGlobalClipboard: false,\r\n shouldFocus: 0 /* NoFocusChange */,\r\n shouldAnimate: false,\r\n updateSearchScope: false,\r\n loop: this._editor.getOption(31 /* find */).loop\r\n });\r\n }\r\n }));\r\n }\r\n get editor() {\r\n return this._editor;\r\n }\r\n static get(editor) {\r\n return editor.getContribution(CommonFindController.ID);\r\n }\r\n dispose() {\r\n this.disposeModel();\r\n super.dispose();\r\n }\r\n disposeModel() {\r\n if (this._model) {\r\n this._model.dispose();\r\n this._model = null;\r\n }\r\n }\r\n _onStateChanged(e) {\r\n this.saveQueryState(e);\r\n if (e.isRevealed) {\r\n if (this._state.isRevealed) {\r\n this._findWidgetVisible.set(true);\r\n }\r\n else {\r\n this._findWidgetVisible.reset();\r\n this.disposeModel();\r\n }\r\n }\r\n if (e.searchString) {\r\n this.setGlobalBufferTerm(this._state.searchString);\r\n }\r\n }\r\n saveQueryState(e) {\r\n if (e.isRegex) {\r\n this._storageService.store('editor.isRegex', this._state.actualIsRegex, 1 /* WORKSPACE */, 0 /* USER */);\r\n }\r\n if (e.wholeWord) {\r\n this._storageService.store('editor.wholeWord', this._state.actualWholeWord, 1 /* WORKSPACE */, 0 /* USER */);\r\n }\r\n if (e.matchCase) {\r\n this._storageService.store('editor.matchCase', this._state.actualMatchCase, 1 /* WORKSPACE */, 0 /* USER */);\r\n }\r\n if (e.preserveCase) {\r\n this._storageService.store('editor.preserveCase', this._state.actualPreserveCase, 1 /* WORKSPACE */, 0 /* USER */);\r\n }\r\n }\r\n loadQueryState() {\r\n this._state.change({\r\n matchCase: this._storageService.getBoolean('editor.matchCase', 1 /* WORKSPACE */, this._state.matchCase),\r\n wholeWord: this._storageService.getBoolean('editor.wholeWord', 1 /* WORKSPACE */, this._state.wholeWord),\r\n isRegex: this._storageService.getBoolean('editor.isRegex', 1 /* WORKSPACE */, this._state.isRegex),\r\n preserveCase: this._storageService.getBoolean('editor.preserveCase', 1 /* WORKSPACE */, this._state.preserveCase)\r\n }, false);\r\n }\r\n isFindInputFocused() {\r\n return !!CONTEXT_FIND_INPUT_FOCUSED.getValue(this._contextKeyService);\r\n }\r\n getState() {\r\n return this._state;\r\n }\r\n closeFindWidget() {\r\n this._state.change({\r\n isRevealed: false,\r\n searchScope: null\r\n }, false);\r\n this._editor.focus();\r\n }\r\n toggleCaseSensitive() {\r\n this._state.change({ matchCase: !this._state.matchCase }, false);\r\n if (!this._state.isRevealed) {\r\n this.highlightFindOptions();\r\n }\r\n }\r\n toggleWholeWords() {\r\n this._state.change({ wholeWord: !this._state.wholeWord }, false);\r\n if (!this._state.isRevealed) {\r\n this.highlightFindOptions();\r\n }\r\n }\r\n toggleRegex() {\r\n this._state.change({ isRegex: !this._state.isRegex }, false);\r\n if (!this._state.isRevealed) {\r\n this.highlightFindOptions();\r\n }\r\n }\r\n togglePreserveCase() {\r\n this._state.change({ preserveCase: !this._state.preserveCase }, false);\r\n if (!this._state.isRevealed) {\r\n this.highlightFindOptions();\r\n }\r\n }\r\n toggleSearchScope() {\r\n if (this._state.searchScope) {\r\n this._state.change({ searchScope: null }, true);\r\n }\r\n else {\r\n if (this._editor.hasModel()) {\r\n let selections = this._editor.getSelections();\r\n selections.map(selection => {\r\n if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) {\r\n selection = selection.setEndPosition(selection.endLineNumber - 1, this._editor.getModel().getLineMaxColumn(selection.endLineNumber - 1));\r\n }\r\n if (!selection.isEmpty()) {\r\n return selection;\r\n }\r\n return null;\r\n }).filter(element => !!element);\r\n if (selections.length) {\r\n this._state.change({ searchScope: selections }, true);\r\n }\r\n }\r\n }\r\n }\r\n setSearchString(searchString) {\r\n if (this._state.isRegex) {\r\n searchString = strings.escapeRegExpCharacters(searchString);\r\n }\r\n this._state.change({ searchString: searchString }, false);\r\n }\r\n highlightFindOptions(ignoreWhenVisible = false) {\r\n // overwritten in subclass\r\n }\r\n _start(opts) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this.disposeModel();\r\n if (!this._editor.hasModel()) {\r\n // cannot do anything with an editor that doesn't have a model...\r\n return;\r\n }\r\n let stateChanges = {\r\n isRevealed: true\r\n };\r\n if (opts.seedSearchStringFromSelection === 'single') {\r\n let selectionSearchString = getSelectionSearchString(this._editor, opts.seedSearchStringFromSelection);\r\n if (selectionSearchString) {\r\n if (this._state.isRegex) {\r\n stateChanges.searchString = strings.escapeRegExpCharacters(selectionSearchString);\r\n }\r\n else {\r\n stateChanges.searchString = selectionSearchString;\r\n }\r\n }\r\n }\r\n else if (opts.seedSearchStringFromSelection === 'multiple' && !opts.updateSearchScope) {\r\n let selectionSearchString = getSelectionSearchString(this._editor, opts.seedSearchStringFromSelection);\r\n if (selectionSearchString) {\r\n stateChanges.searchString = selectionSearchString;\r\n }\r\n }\r\n if (!stateChanges.searchString && opts.seedSearchStringFromGlobalClipboard) {\r\n let selectionSearchString = yield this.getGlobalBufferTerm();\r\n if (!this._editor.hasModel()) {\r\n // the editor has lost its model in the meantime\r\n return;\r\n }\r\n if (selectionSearchString) {\r\n stateChanges.searchString = selectionSearchString;\r\n }\r\n }\r\n // Overwrite isReplaceRevealed\r\n if (opts.forceRevealReplace) {\r\n stateChanges.isReplaceRevealed = true;\r\n }\r\n else if (!this._findWidgetVisible.get()) {\r\n stateChanges.isReplaceRevealed = false;\r\n }\r\n if (opts.updateSearchScope) {\r\n let currentSelections = this._editor.getSelections();\r\n if (currentSelections.some(selection => !selection.isEmpty())) {\r\n stateChanges.searchScope = currentSelections;\r\n }\r\n }\r\n stateChanges.loop = opts.loop;\r\n this._state.change(stateChanges, false);\r\n if (!this._model) {\r\n this._model = new FindModelBoundToEditorModel(this._editor, this._state);\r\n }\r\n });\r\n }\r\n start(opts) {\r\n return this._start(opts);\r\n }\r\n moveToNextMatch() {\r\n if (this._model) {\r\n this._model.moveToNextMatch();\r\n return true;\r\n }\r\n return false;\r\n }\r\n moveToPrevMatch() {\r\n if (this._model) {\r\n this._model.moveToPrevMatch();\r\n return true;\r\n }\r\n return false;\r\n }\r\n replace() {\r\n if (this._model) {\r\n this._model.replace();\r\n return true;\r\n }\r\n return false;\r\n }\r\n replaceAll() {\r\n if (this._model) {\r\n this._model.replaceAll();\r\n return true;\r\n }\r\n return false;\r\n }\r\n selectAllMatches() {\r\n if (this._model) {\r\n this._model.selectAllMatches();\r\n this._editor.focus();\r\n return true;\r\n }\r\n return false;\r\n }\r\n getGlobalBufferTerm() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this._editor.getOption(31 /* find */).globalFindClipboard\r\n && this._editor.hasModel()\r\n && !this._editor.getModel().isTooLargeForSyncing()) {\r\n return this._clipboardService.readFindText();\r\n }\r\n return '';\r\n });\r\n }\r\n setGlobalBufferTerm(text) {\r\n if (this._editor.getOption(31 /* find */).globalFindClipboard\r\n && this._editor.hasModel()\r\n && !this._editor.getModel().isTooLargeForSyncing()) {\r\n // intentionally not awaited\r\n this._clipboardService.writeFindText(text);\r\n }\r\n }\r\n};\r\nCommonFindController.ID = 'editor.contrib.findController';\r\nCommonFindController = __decorate([\r\n __param(1, IContextKeyService),\r\n __param(2, IStorageService),\r\n __param(3, IClipboardService)\r\n], CommonFindController);\r\nexport { CommonFindController };\r\nlet FindController = class FindController extends CommonFindController {\r\n constructor(editor, _contextViewService, _contextKeyService, _keybindingService, _themeService, _notificationService, _storageService, clipboardService) {\r\n super(editor, _contextKeyService, _storageService, clipboardService);\r\n this._contextViewService = _contextViewService;\r\n this._keybindingService = _keybindingService;\r\n this._themeService = _themeService;\r\n this._notificationService = _notificationService;\r\n this._widget = null;\r\n this._findOptionsWidget = null;\r\n }\r\n _start(opts) {\r\n const _super = Object.create(null, {\r\n _start: { get: () => super._start }\r\n });\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._widget) {\r\n this._createFindWidget();\r\n }\r\n const selection = this._editor.getSelection();\r\n let updateSearchScope = false;\r\n switch (this._editor.getOption(31 /* find */).autoFindInSelection) {\r\n case 'always':\r\n updateSearchScope = true;\r\n break;\r\n case 'never':\r\n updateSearchScope = false;\r\n break;\r\n case 'multiline':\r\n const isSelectionMultipleLine = !!selection && selection.startLineNumber !== selection.endLineNumber;\r\n updateSearchScope = isSelectionMultipleLine;\r\n break;\r\n default:\r\n break;\r\n }\r\n opts.updateSearchScope = updateSearchScope;\r\n yield _super._start.call(this, opts);\r\n if (this._widget) {\r\n if (opts.shouldFocus === 2 /* FocusReplaceInput */) {\r\n this._widget.focusReplaceInput();\r\n }\r\n else if (opts.shouldFocus === 1 /* FocusFindInput */) {\r\n this._widget.focusFindInput();\r\n }\r\n }\r\n });\r\n }\r\n highlightFindOptions(ignoreWhenVisible = false) {\r\n if (!this._widget) {\r\n this._createFindWidget();\r\n }\r\n if (this._state.isRevealed && !ignoreWhenVisible) {\r\n this._widget.highlightFindOptions();\r\n }\r\n else {\r\n this._findOptionsWidget.highlightFindOptions();\r\n }\r\n }\r\n _createFindWidget() {\r\n this._widget = this._register(new FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService));\r\n this._findOptionsWidget = this._register(new FindOptionsWidget(this._editor, this._state, this._keybindingService, this._themeService));\r\n }\r\n};\r\nFindController = __decorate([\r\n __param(1, IContextViewService),\r\n __param(2, IContextKeyService),\r\n __param(3, IKeybindingService),\r\n __param(4, IThemeService),\r\n __param(5, INotificationService),\r\n __param(6, IStorageService),\r\n __param(7, IClipboardService)\r\n], FindController);\r\nexport { FindController };\r\nexport class StartFindAction extends MultiEditorAction {\r\n constructor() {\r\n super({\r\n id: FIND_IDS.StartFindAction,\r\n label: nls.localize('startFindAction', \"Find\"),\r\n alias: 'Find',\r\n precondition: ContextKeyExpr.or(ContextKeyExpr.has('editorFocus'), ContextKeyExpr.has('editorIsOpen')),\r\n kbOpts: {\r\n kbExpr: null,\r\n primary: 2048 /* CtrlCmd */ | 36 /* KEY_F */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarEditMenu,\r\n group: '3_find',\r\n title: nls.localize({ key: 'miFind', comment: ['&& denotes a mnemonic'] }, \"&&Find\"),\r\n order: 1\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let controller = CommonFindController.get(editor);\r\n if (controller) {\r\n yield controller.start({\r\n forceRevealReplace: false,\r\n seedSearchStringFromSelection: editor.getOption(31 /* find */).seedSearchStringFromSelection ? 'single' : 'none',\r\n seedSearchStringFromGlobalClipboard: editor.getOption(31 /* find */).globalFindClipboard,\r\n shouldFocus: 1 /* FocusFindInput */,\r\n shouldAnimate: true,\r\n updateSearchScope: false,\r\n loop: editor.getOption(31 /* find */).loop\r\n });\r\n }\r\n });\r\n }\r\n}\r\nexport class StartFindWithSelectionAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: FIND_IDS.StartFindWithSelection,\r\n label: nls.localize('startFindWithSelectionAction', \"Find With Selection\"),\r\n alias: 'Find With Selection',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: null,\r\n primary: 0,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 35 /* KEY_E */,\r\n },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let controller = CommonFindController.get(editor);\r\n if (controller) {\r\n yield controller.start({\r\n forceRevealReplace: false,\r\n seedSearchStringFromSelection: 'multiple',\r\n seedSearchStringFromGlobalClipboard: false,\r\n shouldFocus: 0 /* NoFocusChange */,\r\n shouldAnimate: true,\r\n updateSearchScope: false,\r\n loop: editor.getOption(31 /* find */).loop\r\n });\r\n controller.setGlobalBufferTerm(controller.getState().searchString);\r\n }\r\n });\r\n }\r\n}\r\nexport class MatchFindAction extends EditorAction {\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let controller = CommonFindController.get(editor);\r\n if (controller && !this._run(controller)) {\r\n yield controller.start({\r\n forceRevealReplace: false,\r\n seedSearchStringFromSelection: (controller.getState().searchString.length === 0) && editor.getOption(31 /* find */).seedSearchStringFromSelection ? 'single' : 'none',\r\n seedSearchStringFromGlobalClipboard: true,\r\n shouldFocus: 0 /* NoFocusChange */,\r\n shouldAnimate: true,\r\n updateSearchScope: false,\r\n loop: editor.getOption(31 /* find */).loop\r\n });\r\n this._run(controller);\r\n }\r\n });\r\n }\r\n}\r\nexport class NextMatchFindAction extends MatchFindAction {\r\n constructor() {\r\n super({\r\n id: FIND_IDS.NextMatchFindAction,\r\n label: nls.localize('findNextMatchAction', \"Find Next\"),\r\n alias: 'Find Next',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 61 /* F3 */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 37 /* KEY_G */, secondary: [61 /* F3 */] },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(controller) {\r\n const result = controller.moveToNextMatch();\r\n if (result) {\r\n controller.editor.pushUndoStop();\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\nexport class NextMatchFindAction2 extends MatchFindAction {\r\n constructor() {\r\n super({\r\n id: FIND_IDS.NextMatchFindAction,\r\n label: nls.localize('findNextMatchAction', \"Find Next\"),\r\n alias: 'Find Next',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_FIND_INPUT_FOCUSED),\r\n primary: 3 /* Enter */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(controller) {\r\n const result = controller.moveToNextMatch();\r\n if (result) {\r\n controller.editor.pushUndoStop();\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\nexport class PreviousMatchFindAction extends MatchFindAction {\r\n constructor() {\r\n super({\r\n id: FIND_IDS.PreviousMatchFindAction,\r\n label: nls.localize('findPreviousMatchAction', \"Find Previous\"),\r\n alias: 'Find Previous',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 1024 /* Shift */ | 61 /* F3 */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 37 /* KEY_G */, secondary: [1024 /* Shift */ | 61 /* F3 */] },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(controller) {\r\n return controller.moveToPrevMatch();\r\n }\r\n}\r\nexport class PreviousMatchFindAction2 extends MatchFindAction {\r\n constructor() {\r\n super({\r\n id: FIND_IDS.PreviousMatchFindAction,\r\n label: nls.localize('findPreviousMatchAction', \"Find Previous\"),\r\n alias: 'Find Previous',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_FIND_INPUT_FOCUSED),\r\n primary: 1024 /* Shift */ | 3 /* Enter */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(controller) {\r\n return controller.moveToPrevMatch();\r\n }\r\n}\r\nexport class SelectionMatchFindAction extends EditorAction {\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let controller = CommonFindController.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n let selectionSearchString = getSelectionSearchString(editor);\r\n if (selectionSearchString) {\r\n controller.setSearchString(selectionSearchString);\r\n }\r\n if (!this._run(controller)) {\r\n yield controller.start({\r\n forceRevealReplace: false,\r\n seedSearchStringFromSelection: editor.getOption(31 /* find */).seedSearchStringFromSelection ? 'single' : 'none',\r\n seedSearchStringFromGlobalClipboard: false,\r\n shouldFocus: 0 /* NoFocusChange */,\r\n shouldAnimate: true,\r\n updateSearchScope: false,\r\n loop: editor.getOption(31 /* find */).loop\r\n });\r\n this._run(controller);\r\n }\r\n });\r\n }\r\n}\r\nexport class NextSelectionMatchFindAction extends SelectionMatchFindAction {\r\n constructor() {\r\n super({\r\n id: FIND_IDS.NextSelectionMatchFindAction,\r\n label: nls.localize('nextSelectionMatchFindAction', \"Find Next Selection\"),\r\n alias: 'Find Next Selection',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 61 /* F3 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(controller) {\r\n return controller.moveToNextMatch();\r\n }\r\n}\r\nexport class PreviousSelectionMatchFindAction extends SelectionMatchFindAction {\r\n constructor() {\r\n super({\r\n id: FIND_IDS.PreviousSelectionMatchFindAction,\r\n label: nls.localize('previousSelectionMatchFindAction', \"Find Previous Selection\"),\r\n alias: 'Find Previous Selection',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 61 /* F3 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(controller) {\r\n return controller.moveToPrevMatch();\r\n }\r\n}\r\nexport class StartFindReplaceAction extends MultiEditorAction {\r\n constructor() {\r\n super({\r\n id: FIND_IDS.StartFindReplaceAction,\r\n label: nls.localize('startReplace', \"Replace\"),\r\n alias: 'Replace',\r\n precondition: ContextKeyExpr.or(ContextKeyExpr.has('editorFocus'), ContextKeyExpr.has('editorIsOpen')),\r\n kbOpts: {\r\n kbExpr: null,\r\n primary: 2048 /* CtrlCmd */ | 38 /* KEY_H */,\r\n mac: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 36 /* KEY_F */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarEditMenu,\r\n group: '3_find',\r\n title: nls.localize({ key: 'miReplace', comment: ['&& denotes a mnemonic'] }, \"&&Replace\"),\r\n order: 2\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!editor.hasModel() || editor.getOption(75 /* readOnly */)) {\r\n return;\r\n }\r\n let controller = CommonFindController.get(editor);\r\n let currentSelection = editor.getSelection();\r\n let findInputFocused = controller.isFindInputFocused();\r\n // we only seed search string from selection when the current selection is single line and not empty,\r\n // + the find input is not focused\r\n let seedSearchStringFromSelection = !currentSelection.isEmpty()\r\n && currentSelection.startLineNumber === currentSelection.endLineNumber && editor.getOption(31 /* find */).seedSearchStringFromSelection\r\n && !findInputFocused;\r\n /*\r\n * if the existing search string in find widget is empty and we don't seed search string from selection, it means the Find Input is still empty, so we should focus the Find Input instead of Replace Input.\r\n \r\n * findInputFocused true -> seedSearchStringFromSelection false, FocusReplaceInput\r\n * findInputFocused false, seedSearchStringFromSelection true FocusReplaceInput\r\n * findInputFocused false seedSearchStringFromSelection false FocusFindInput\r\n */\r\n let shouldFocus = (findInputFocused || seedSearchStringFromSelection) ?\r\n 2 /* FocusReplaceInput */ : 1 /* FocusFindInput */;\r\n if (controller) {\r\n yield controller.start({\r\n forceRevealReplace: true,\r\n seedSearchStringFromSelection: seedSearchStringFromSelection ? 'single' : 'none',\r\n seedSearchStringFromGlobalClipboard: editor.getOption(31 /* find */).seedSearchStringFromSelection,\r\n shouldFocus: shouldFocus,\r\n shouldAnimate: true,\r\n updateSearchScope: false,\r\n loop: editor.getOption(31 /* find */).loop\r\n });\r\n }\r\n });\r\n }\r\n}\r\nregisterEditorContribution(CommonFindController.ID, FindController);\r\nexport const EditorStartFindAction = new StartFindAction();\r\nregisterMultiEditorAction(EditorStartFindAction);\r\nregisterEditorAction(StartFindWithSelectionAction);\r\nregisterEditorAction(NextMatchFindAction);\r\nregisterEditorAction(NextMatchFindAction2);\r\nregisterEditorAction(PreviousMatchFindAction);\r\nregisterEditorAction(PreviousMatchFindAction2);\r\nregisterEditorAction(NextSelectionMatchFindAction);\r\nregisterEditorAction(PreviousSelectionMatchFindAction);\r\nexport const EditorStartFindReplaceAction = new StartFindReplaceAction();\r\nregisterMultiEditorAction(EditorStartFindReplaceAction);\r\nconst FindCommand = EditorCommand.bindToContribution(CommonFindController.get);\r\nregisterEditorCommand(new FindCommand({\r\n id: FIND_IDS.CloseFindWidgetCommand,\r\n precondition: CONTEXT_FIND_WIDGET_VISIBLE,\r\n handler: x => x.closeFindWidget(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, ContextKeyExpr.not('isComposing')),\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\nregisterEditorCommand(new FindCommand({\r\n id: FIND_IDS.ToggleCaseSensitiveCommand,\r\n precondition: undefined,\r\n handler: x => x.toggleCaseSensitive(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: ToggleCaseSensitiveKeybinding.primary,\r\n mac: ToggleCaseSensitiveKeybinding.mac,\r\n win: ToggleCaseSensitiveKeybinding.win,\r\n linux: ToggleCaseSensitiveKeybinding.linux\r\n }\r\n}));\r\nregisterEditorCommand(new FindCommand({\r\n id: FIND_IDS.ToggleWholeWordCommand,\r\n precondition: undefined,\r\n handler: x => x.toggleWholeWords(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: ToggleWholeWordKeybinding.primary,\r\n mac: ToggleWholeWordKeybinding.mac,\r\n win: ToggleWholeWordKeybinding.win,\r\n linux: ToggleWholeWordKeybinding.linux\r\n }\r\n}));\r\nregisterEditorCommand(new FindCommand({\r\n id: FIND_IDS.ToggleRegexCommand,\r\n precondition: undefined,\r\n handler: x => x.toggleRegex(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: ToggleRegexKeybinding.primary,\r\n mac: ToggleRegexKeybinding.mac,\r\n win: ToggleRegexKeybinding.win,\r\n linux: ToggleRegexKeybinding.linux\r\n }\r\n}));\r\nregisterEditorCommand(new FindCommand({\r\n id: FIND_IDS.ToggleSearchScopeCommand,\r\n precondition: undefined,\r\n handler: x => x.toggleSearchScope(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: ToggleSearchScopeKeybinding.primary,\r\n mac: ToggleSearchScopeKeybinding.mac,\r\n win: ToggleSearchScopeKeybinding.win,\r\n linux: ToggleSearchScopeKeybinding.linux\r\n }\r\n}));\r\nregisterEditorCommand(new FindCommand({\r\n id: FIND_IDS.TogglePreserveCaseCommand,\r\n precondition: undefined,\r\n handler: x => x.togglePreserveCase(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: TogglePreserveCaseKeybinding.primary,\r\n mac: TogglePreserveCaseKeybinding.mac,\r\n win: TogglePreserveCaseKeybinding.win,\r\n linux: TogglePreserveCaseKeybinding.linux\r\n }\r\n}));\r\nregisterEditorCommand(new FindCommand({\r\n id: FIND_IDS.ReplaceOneAction,\r\n precondition: CONTEXT_FIND_WIDGET_VISIBLE,\r\n handler: x => x.replace(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 22 /* KEY_1 */\r\n }\r\n}));\r\nregisterEditorCommand(new FindCommand({\r\n id: FIND_IDS.ReplaceOneAction,\r\n precondition: CONTEXT_FIND_WIDGET_VISIBLE,\r\n handler: x => x.replace(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_REPLACE_INPUT_FOCUSED),\r\n primary: 3 /* Enter */\r\n }\r\n}));\r\nregisterEditorCommand(new FindCommand({\r\n id: FIND_IDS.ReplaceAllAction,\r\n precondition: CONTEXT_FIND_WIDGET_VISIBLE,\r\n handler: x => x.replaceAll(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 3 /* Enter */\r\n }\r\n}));\r\nregisterEditorCommand(new FindCommand({\r\n id: FIND_IDS.ReplaceAllAction,\r\n precondition: CONTEXT_FIND_WIDGET_VISIBLE,\r\n handler: x => x.replaceAll(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_REPLACE_INPUT_FOCUSED),\r\n primary: undefined,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 3 /* Enter */,\r\n }\r\n }\r\n}));\r\nregisterEditorCommand(new FindCommand({\r\n id: FIND_IDS.SelectAllMatchesAction,\r\n precondition: CONTEXT_FIND_WIDGET_VISIBLE,\r\n handler: x => x.selectAllMatches(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 5,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 512 /* Alt */ | 3 /* Enter */\r\n }\r\n}));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport const MAX_FOLDING_REGIONS = 0xFFFF;\r\nexport const MAX_LINE_NUMBER = 0xFFFFFF;\r\nconst MASK_INDENT = 0xFF000000;\r\nexport class FoldingRegions {\r\n constructor(startIndexes, endIndexes, types) {\r\n if (startIndexes.length !== endIndexes.length || startIndexes.length > MAX_FOLDING_REGIONS) {\r\n throw new Error('invalid startIndexes or endIndexes size');\r\n }\r\n this._startIndexes = startIndexes;\r\n this._endIndexes = endIndexes;\r\n this._collapseStates = new Uint32Array(Math.ceil(startIndexes.length / 32));\r\n this._types = types;\r\n this._parentsComputed = false;\r\n }\r\n ensureParentIndices() {\r\n if (!this._parentsComputed) {\r\n this._parentsComputed = true;\r\n let parentIndexes = [];\r\n let isInsideLast = (startLineNumber, endLineNumber) => {\r\n let index = parentIndexes[parentIndexes.length - 1];\r\n return this.getStartLineNumber(index) <= startLineNumber && this.getEndLineNumber(index) >= endLineNumber;\r\n };\r\n for (let i = 0, len = this._startIndexes.length; i < len; i++) {\r\n let startLineNumber = this._startIndexes[i];\r\n let endLineNumber = this._endIndexes[i];\r\n if (startLineNumber > MAX_LINE_NUMBER || endLineNumber > MAX_LINE_NUMBER) {\r\n throw new Error('startLineNumber or endLineNumber must not exceed ' + MAX_LINE_NUMBER);\r\n }\r\n while (parentIndexes.length > 0 && !isInsideLast(startLineNumber, endLineNumber)) {\r\n parentIndexes.pop();\r\n }\r\n let parentIndex = parentIndexes.length > 0 ? parentIndexes[parentIndexes.length - 1] : -1;\r\n parentIndexes.push(i);\r\n this._startIndexes[i] = startLineNumber + ((parentIndex & 0xFF) << 24);\r\n this._endIndexes[i] = endLineNumber + ((parentIndex & 0xFF00) << 16);\r\n }\r\n }\r\n }\r\n get length() {\r\n return this._startIndexes.length;\r\n }\r\n getStartLineNumber(index) {\r\n return this._startIndexes[index] & MAX_LINE_NUMBER;\r\n }\r\n getEndLineNumber(index) {\r\n return this._endIndexes[index] & MAX_LINE_NUMBER;\r\n }\r\n getType(index) {\r\n return this._types ? this._types[index] : undefined;\r\n }\r\n hasTypes() {\r\n return !!this._types;\r\n }\r\n isCollapsed(index) {\r\n let arrayIndex = (index / 32) | 0;\r\n let bit = index % 32;\r\n return (this._collapseStates[arrayIndex] & (1 << bit)) !== 0;\r\n }\r\n setCollapsed(index, newState) {\r\n let arrayIndex = (index / 32) | 0;\r\n let bit = index % 32;\r\n let value = this._collapseStates[arrayIndex];\r\n if (newState) {\r\n this._collapseStates[arrayIndex] = value | (1 << bit);\r\n }\r\n else {\r\n this._collapseStates[arrayIndex] = value & ~(1 << bit);\r\n }\r\n }\r\n toRegion(index) {\r\n return new FoldingRegion(this, index);\r\n }\r\n getParentIndex(index) {\r\n this.ensureParentIndices();\r\n let parent = ((this._startIndexes[index] & MASK_INDENT) >>> 24) + ((this._endIndexes[index] & MASK_INDENT) >>> 16);\r\n if (parent === MAX_FOLDING_REGIONS) {\r\n return -1;\r\n }\r\n return parent;\r\n }\r\n contains(index, line) {\r\n return this.getStartLineNumber(index) <= line && this.getEndLineNumber(index) >= line;\r\n }\r\n findIndex(line) {\r\n let low = 0, high = this._startIndexes.length;\r\n if (high === 0) {\r\n return -1; // no children\r\n }\r\n while (low < high) {\r\n let mid = Math.floor((low + high) / 2);\r\n if (line < this.getStartLineNumber(mid)) {\r\n high = mid;\r\n }\r\n else {\r\n low = mid + 1;\r\n }\r\n }\r\n return low - 1;\r\n }\r\n findRange(line) {\r\n let index = this.findIndex(line);\r\n if (index >= 0) {\r\n let endLineNumber = this.getEndLineNumber(index);\r\n if (endLineNumber >= line) {\r\n return index;\r\n }\r\n index = this.getParentIndex(index);\r\n while (index !== -1) {\r\n if (this.contains(index, line)) {\r\n return index;\r\n }\r\n index = this.getParentIndex(index);\r\n }\r\n }\r\n return -1;\r\n }\r\n toString() {\r\n let res = [];\r\n for (let i = 0; i < this.length; i++) {\r\n res[i] = `[${this.isCollapsed(i) ? '+' : '-'}] ${this.getStartLineNumber(i)}/${this.getEndLineNumber(i)}`;\r\n }\r\n return res.join(', ');\r\n }\r\n}\r\nexport class FoldingRegion {\r\n constructor(ranges, index) {\r\n this.ranges = ranges;\r\n this.index = index;\r\n }\r\n get startLineNumber() {\r\n return this.ranges.getStartLineNumber(this.index);\r\n }\r\n get endLineNumber() {\r\n return this.ranges.getEndLineNumber(this.index);\r\n }\r\n get regionIndex() {\r\n return this.index;\r\n }\r\n get parentIndex() {\r\n return this.ranges.getParentIndex(this.index);\r\n }\r\n get isCollapsed() {\r\n return this.ranges.isCollapsed(this.index);\r\n }\r\n containedBy(range) {\r\n return range.startLineNumber <= this.startLineNumber && range.endLineNumber >= this.endLineNumber;\r\n }\r\n containsLine(lineNumber) {\r\n return this.startLineNumber <= lineNumber && lineNumber <= this.endLineNumber;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { FoldingRegions } from './foldingRanges.js';\r\nexport class FoldingModel {\r\n constructor(textModel, decorationProvider) {\r\n this._updateEventEmitter = new Emitter();\r\n this.onDidChange = this._updateEventEmitter.event;\r\n this._textModel = textModel;\r\n this._decorationProvider = decorationProvider;\r\n this._regions = new FoldingRegions(new Uint32Array(0), new Uint32Array(0));\r\n this._editorDecorationIds = [];\r\n this._isInitialized = false;\r\n }\r\n get regions() { return this._regions; }\r\n get textModel() { return this._textModel; }\r\n get isInitialized() { return this._isInitialized; }\r\n toggleCollapseState(toggledRegions) {\r\n if (!toggledRegions.length) {\r\n return;\r\n }\r\n toggledRegions = toggledRegions.sort((r1, r2) => r1.regionIndex - r2.regionIndex);\r\n const processed = {};\r\n this._decorationProvider.changeDecorations(accessor => {\r\n let k = 0; // index from [0 ... this.regions.length]\r\n let dirtyRegionEndLine = -1; // end of the range where decorations need to be updated\r\n let lastHiddenLine = -1; // the end of the last hidden lines\r\n const updateDecorationsUntil = (index) => {\r\n while (k < index) {\r\n const endLineNumber = this._regions.getEndLineNumber(k);\r\n const isCollapsed = this._regions.isCollapsed(k);\r\n if (endLineNumber <= dirtyRegionEndLine) {\r\n accessor.changeDecorationOptions(this._editorDecorationIds[k], this._decorationProvider.getDecorationOption(isCollapsed, endLineNumber <= lastHiddenLine));\r\n }\r\n if (isCollapsed && endLineNumber > lastHiddenLine) {\r\n lastHiddenLine = endLineNumber;\r\n }\r\n k++;\r\n }\r\n };\r\n for (let region of toggledRegions) {\r\n let index = region.regionIndex;\r\n let editorDecorationId = this._editorDecorationIds[index];\r\n if (editorDecorationId && !processed[editorDecorationId]) {\r\n processed[editorDecorationId] = true;\r\n updateDecorationsUntil(index); // update all decorations up to current index using the old dirtyRegionEndLine\r\n let newCollapseState = !this._regions.isCollapsed(index);\r\n this._regions.setCollapsed(index, newCollapseState);\r\n dirtyRegionEndLine = Math.max(dirtyRegionEndLine, this._regions.getEndLineNumber(index));\r\n }\r\n }\r\n updateDecorationsUntil(this._regions.length);\r\n });\r\n this._updateEventEmitter.fire({ model: this, collapseStateChanged: toggledRegions });\r\n }\r\n update(newRegions, blockedLineNumers = []) {\r\n let newEditorDecorations = [];\r\n let isBlocked = (startLineNumber, endLineNumber) => {\r\n for (let blockedLineNumber of blockedLineNumers) {\r\n if (startLineNumber < blockedLineNumber && blockedLineNumber <= endLineNumber) { // first line is visible\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n let lastHiddenLine = -1;\r\n let initRange = (index, isCollapsed) => {\r\n const startLineNumber = newRegions.getStartLineNumber(index);\r\n const endLineNumber = newRegions.getEndLineNumber(index);\r\n if (isCollapsed && isBlocked(startLineNumber, endLineNumber)) {\r\n isCollapsed = false;\r\n }\r\n newRegions.setCollapsed(index, isCollapsed);\r\n const maxColumn = this._textModel.getLineMaxColumn(startLineNumber);\r\n const decorationRange = {\r\n startLineNumber: startLineNumber,\r\n startColumn: Math.max(maxColumn - 1, 1),\r\n endLineNumber: startLineNumber,\r\n endColumn: maxColumn\r\n };\r\n newEditorDecorations.push({ range: decorationRange, options: this._decorationProvider.getDecorationOption(isCollapsed, endLineNumber <= lastHiddenLine) });\r\n if (isCollapsed && endLineNumber > lastHiddenLine) {\r\n lastHiddenLine = endLineNumber;\r\n }\r\n };\r\n let i = 0;\r\n let nextCollapsed = () => {\r\n while (i < this._regions.length) {\r\n let isCollapsed = this._regions.isCollapsed(i);\r\n i++;\r\n if (isCollapsed) {\r\n return i - 1;\r\n }\r\n }\r\n return -1;\r\n };\r\n let k = 0;\r\n let collapsedIndex = nextCollapsed();\r\n while (collapsedIndex !== -1 && k < newRegions.length) {\r\n // get the latest range\r\n let decRange = this._textModel.getDecorationRange(this._editorDecorationIds[collapsedIndex]);\r\n if (decRange) {\r\n let collapsedStartLineNumber = decRange.startLineNumber;\r\n if (decRange.startColumn === Math.max(decRange.endColumn - 1, 1) && this._textModel.getLineMaxColumn(collapsedStartLineNumber) === decRange.endColumn) { // test that the decoration is still covering the full line else it got deleted\r\n while (k < newRegions.length) {\r\n let startLineNumber = newRegions.getStartLineNumber(k);\r\n if (collapsedStartLineNumber >= startLineNumber) {\r\n initRange(k, collapsedStartLineNumber === startLineNumber);\r\n k++;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n collapsedIndex = nextCollapsed();\r\n }\r\n while (k < newRegions.length) {\r\n initRange(k, false);\r\n k++;\r\n }\r\n this._editorDecorationIds = this._decorationProvider.deltaDecorations(this._editorDecorationIds, newEditorDecorations);\r\n this._regions = newRegions;\r\n this._isInitialized = true;\r\n this._updateEventEmitter.fire({ model: this });\r\n }\r\n /**\r\n * Collapse state memento, for persistence only\r\n */\r\n getMemento() {\r\n let collapsedRanges = [];\r\n for (let i = 0; i < this._regions.length; i++) {\r\n if (this._regions.isCollapsed(i)) {\r\n let range = this._textModel.getDecorationRange(this._editorDecorationIds[i]);\r\n if (range) {\r\n let startLineNumber = range.startLineNumber;\r\n let endLineNumber = range.endLineNumber + this._regions.getEndLineNumber(i) - this._regions.getStartLineNumber(i);\r\n collapsedRanges.push({ startLineNumber, endLineNumber });\r\n }\r\n }\r\n }\r\n if (collapsedRanges.length > 0) {\r\n return collapsedRanges;\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Apply persisted state, for persistence only\r\n */\r\n applyMemento(state) {\r\n if (!Array.isArray(state)) {\r\n return;\r\n }\r\n let toToogle = [];\r\n for (let range of state) {\r\n let region = this.getRegionAtLine(range.startLineNumber);\r\n if (region && !region.isCollapsed) {\r\n toToogle.push(region);\r\n }\r\n }\r\n this.toggleCollapseState(toToogle);\r\n }\r\n dispose() {\r\n this._decorationProvider.deltaDecorations(this._editorDecorationIds, []);\r\n }\r\n getAllRegionsAtLine(lineNumber, filter) {\r\n let result = [];\r\n if (this._regions) {\r\n let index = this._regions.findRange(lineNumber);\r\n let level = 1;\r\n while (index >= 0) {\r\n let current = this._regions.toRegion(index);\r\n if (!filter || filter(current, level)) {\r\n result.push(current);\r\n }\r\n level++;\r\n index = current.parentIndex;\r\n }\r\n }\r\n return result;\r\n }\r\n getRegionAtLine(lineNumber) {\r\n if (this._regions) {\r\n let index = this._regions.findRange(lineNumber);\r\n if (index >= 0) {\r\n return this._regions.toRegion(index);\r\n }\r\n }\r\n return null;\r\n }\r\n getRegionsInside(region, filter) {\r\n let result = [];\r\n let index = region ? region.regionIndex + 1 : 0;\r\n let endLineNumber = region ? region.endLineNumber : Number.MAX_VALUE;\r\n if (filter && filter.length === 2) {\r\n const levelStack = [];\r\n for (let i = index, len = this._regions.length; i < len; i++) {\r\n let current = this._regions.toRegion(i);\r\n if (this._regions.getStartLineNumber(i) < endLineNumber) {\r\n while (levelStack.length > 0 && !current.containedBy(levelStack[levelStack.length - 1])) {\r\n levelStack.pop();\r\n }\r\n levelStack.push(current);\r\n if (filter(current, levelStack.length)) {\r\n result.push(current);\r\n }\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n for (let i = index, len = this._regions.length; i < len; i++) {\r\n let current = this._regions.toRegion(i);\r\n if (this._regions.getStartLineNumber(i) < endLineNumber) {\r\n if (!filter || filter(current)) {\r\n result.push(current);\r\n }\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n}\r\n/**\r\n * Collapse or expand the regions at the given locations\r\n * @param levels The number of levels. Use 1 to only impact the regions at the location, use Number.MAX_VALUE for all levels.\r\n * @param lineNumbers the location of the regions to collapse or expand, or if not set, all regions in the model.\r\n */\r\nexport function toggleCollapseState(foldingModel, levels, lineNumbers) {\r\n let toToggle = [];\r\n for (let lineNumber of lineNumbers) {\r\n let region = foldingModel.getRegionAtLine(lineNumber);\r\n if (region) {\r\n const doCollapse = !region.isCollapsed;\r\n toToggle.push(region);\r\n if (levels > 1) {\r\n let regionsInside = foldingModel.getRegionsInside(region, (r, level) => r.isCollapsed !== doCollapse && level < levels);\r\n toToggle.push(...regionsInside);\r\n }\r\n }\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n/**\r\n * Collapse or expand the regions at the given locations including all children.\r\n * @param doCollapse Wheter to collase or expand\r\n * @param levels The number of levels. Use 1 to only impact the regions at the location, use Number.MAX_VALUE for all levels.\r\n * @param lineNumbers the location of the regions to collapse or expand, or if not set, all regions in the model.\r\n */\r\nexport function setCollapseStateLevelsDown(foldingModel, doCollapse, levels = Number.MAX_VALUE, lineNumbers) {\r\n let toToggle = [];\r\n if (lineNumbers && lineNumbers.length > 0) {\r\n for (let lineNumber of lineNumbers) {\r\n let region = foldingModel.getRegionAtLine(lineNumber);\r\n if (region) {\r\n if (region.isCollapsed !== doCollapse) {\r\n toToggle.push(region);\r\n }\r\n if (levels > 1) {\r\n let regionsInside = foldingModel.getRegionsInside(region, (r, level) => r.isCollapsed !== doCollapse && level < levels);\r\n toToggle.push(...regionsInside);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n let regionsInside = foldingModel.getRegionsInside(null, (r, level) => r.isCollapsed !== doCollapse && level < levels);\r\n toToggle.push(...regionsInside);\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n/**\r\n * Collapse or expand the regions at the given locations including all parents.\r\n * @param doCollapse Wheter to collase or expand\r\n * @param levels The number of levels. Use 1 to only impact the regions at the location, use Number.MAX_VALUE for all levels.\r\n * @param lineNumbers the location of the regions to collapse or expand.\r\n */\r\nexport function setCollapseStateLevelsUp(foldingModel, doCollapse, levels, lineNumbers) {\r\n let toToggle = [];\r\n for (let lineNumber of lineNumbers) {\r\n let regions = foldingModel.getAllRegionsAtLine(lineNumber, (region, level) => region.isCollapsed !== doCollapse && level <= levels);\r\n toToggle.push(...regions);\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n/**\r\n * Collapse or expand a region at the given locations. If the inner most region is already collapsed/expanded, uses the first parent instead.\r\n * @param doCollapse Wheter to collase or expand\r\n * @param lineNumbers the location of the regions to collapse or expand.\r\n */\r\nexport function setCollapseStateUp(foldingModel, doCollapse, lineNumbers) {\r\n let toToggle = [];\r\n for (let lineNumber of lineNumbers) {\r\n let regions = foldingModel.getAllRegionsAtLine(lineNumber, (region) => region.isCollapsed !== doCollapse);\r\n if (regions.length > 0) {\r\n toToggle.push(regions[0]);\r\n }\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n/**\r\n * Folds or unfolds all regions that have a given level, except if they contain one of the blocked lines.\r\n * @param foldLevel level. Level == 1 is the top level\r\n * @param doCollapse Wheter to collase or expand\r\n*/\r\nexport function setCollapseStateAtLevel(foldingModel, foldLevel, doCollapse, blockedLineNumbers) {\r\n let filter = (region, level) => level === foldLevel && region.isCollapsed !== doCollapse && !blockedLineNumbers.some(line => region.containsLine(line));\r\n let toToggle = foldingModel.getRegionsInside(null, filter);\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n/**\r\n * Folds all regions for which the lines start with a given regex\r\n * @param foldingModel the folding model\r\n */\r\nexport function setCollapseStateForMatchingLines(foldingModel, regExp, doCollapse) {\r\n let editorModel = foldingModel.textModel;\r\n let regions = foldingModel.regions;\r\n let toToggle = [];\r\n for (let i = regions.length - 1; i >= 0; i--) {\r\n if (doCollapse !== regions.isCollapsed(i)) {\r\n let startLineNumber = regions.getStartLineNumber(i);\r\n if (regExp.test(editorModel.getLineContent(startLineNumber))) {\r\n toToggle.push(regions.toRegion(i));\r\n }\r\n }\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n/**\r\n * Folds all regions of the given type\r\n * @param foldingModel the folding model\r\n */\r\nexport function setCollapseStateForType(foldingModel, type, doCollapse) {\r\n let regions = foldingModel.regions;\r\n let toToggle = [];\r\n for (let i = regions.length - 1; i >= 0; i--) {\r\n if (doCollapse !== regions.isCollapsed(i) && type === regions.getType(i)) {\r\n toToggle.push(regions.toRegion(i));\r\n }\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nimport { localize } from '../../../nls.js';\r\nimport { registerIcon } from '../../../platform/theme/common/iconRegistry.js';\r\nimport { ThemeIcon } from '../../../platform/theme/common/themeService.js';\r\nexport const foldingExpandedIcon = registerIcon('folding-expanded', Codicon.chevronDown, localize('foldingExpandedIcon', 'Icon for expanded ranges in the editor glyph margin.'));\r\nexport const foldingCollapsedIcon = registerIcon('folding-collapsed', Codicon.chevronRight, localize('foldingCollapsedIcon', 'Icon for collapsed ranges in the editor glyph margin.'));\r\nexport class FoldingDecorationProvider {\r\n constructor(editor) {\r\n this.editor = editor;\r\n this.autoHideFoldingControls = true;\r\n this.showFoldingHighlights = true;\r\n }\r\n getDecorationOption(isCollapsed, isHidden) {\r\n if (isHidden) {\r\n return FoldingDecorationProvider.HIDDEN_RANGE_DECORATION;\r\n }\r\n if (isCollapsed) {\r\n return this.showFoldingHighlights ? FoldingDecorationProvider.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION : FoldingDecorationProvider.COLLAPSED_VISUAL_DECORATION;\r\n }\r\n else if (this.autoHideFoldingControls) {\r\n return FoldingDecorationProvider.EXPANDED_AUTO_HIDE_VISUAL_DECORATION;\r\n }\r\n else {\r\n return FoldingDecorationProvider.EXPANDED_VISUAL_DECORATION;\r\n }\r\n }\r\n deltaDecorations(oldDecorations, newDecorations) {\r\n return this.editor.deltaDecorations(oldDecorations, newDecorations);\r\n }\r\n changeDecorations(callback) {\r\n return this.editor.changeDecorations(callback);\r\n }\r\n}\r\nFoldingDecorationProvider.COLLAPSED_VISUAL_DECORATION = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n afterContentClassName: 'inline-folded',\r\n isWholeLine: true,\r\n firstLineDecorationClassName: ThemeIcon.asClassName(foldingCollapsedIcon)\r\n});\r\nFoldingDecorationProvider.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n afterContentClassName: 'inline-folded',\r\n className: 'folded-background',\r\n isWholeLine: true,\r\n firstLineDecorationClassName: ThemeIcon.asClassName(foldingCollapsedIcon)\r\n});\r\nFoldingDecorationProvider.EXPANDED_AUTO_HIDE_VISUAL_DECORATION = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n isWholeLine: true,\r\n firstLineDecorationClassName: ThemeIcon.asClassName(foldingExpandedIcon)\r\n});\r\nFoldingDecorationProvider.EXPANDED_VISUAL_DECORATION = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n isWholeLine: true,\r\n firstLineDecorationClassName: 'alwaysShowFoldIcons ' + ThemeIcon.asClassName(foldingExpandedIcon)\r\n});\r\nFoldingDecorationProvider.HIDDEN_RANGE_DECORATION = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { findFirstInSorted } from '../../../base/common/arrays.js';\r\nexport class HiddenRangeModel {\r\n constructor(model) {\r\n this._updateEventEmitter = new Emitter();\r\n this._foldingModel = model;\r\n this._foldingModelListener = model.onDidChange(_ => this.updateHiddenRanges());\r\n this._hiddenRanges = [];\r\n if (model.regions.length) {\r\n this.updateHiddenRanges();\r\n }\r\n }\r\n get onDidChange() { return this._updateEventEmitter.event; }\r\n get hiddenRanges() { return this._hiddenRanges; }\r\n updateHiddenRanges() {\r\n let updateHiddenAreas = false;\r\n let newHiddenAreas = [];\r\n let i = 0; // index into hidden\r\n let k = 0;\r\n let lastCollapsedStart = Number.MAX_VALUE;\r\n let lastCollapsedEnd = -1;\r\n let ranges = this._foldingModel.regions;\r\n for (; i < ranges.length; i++) {\r\n if (!ranges.isCollapsed(i)) {\r\n continue;\r\n }\r\n let startLineNumber = ranges.getStartLineNumber(i) + 1; // the first line is not hidden\r\n let endLineNumber = ranges.getEndLineNumber(i);\r\n if (lastCollapsedStart <= startLineNumber && endLineNumber <= lastCollapsedEnd) {\r\n // ignore ranges contained in collapsed regions\r\n continue;\r\n }\r\n if (!updateHiddenAreas && k < this._hiddenRanges.length && this._hiddenRanges[k].startLineNumber === startLineNumber && this._hiddenRanges[k].endLineNumber === endLineNumber) {\r\n // reuse the old ranges\r\n newHiddenAreas.push(this._hiddenRanges[k]);\r\n k++;\r\n }\r\n else {\r\n updateHiddenAreas = true;\r\n newHiddenAreas.push(new Range(startLineNumber, 1, endLineNumber, 1));\r\n }\r\n lastCollapsedStart = startLineNumber;\r\n lastCollapsedEnd = endLineNumber;\r\n }\r\n if (updateHiddenAreas || k < this._hiddenRanges.length) {\r\n this.applyHiddenRanges(newHiddenAreas);\r\n }\r\n }\r\n applyMemento(state) {\r\n if (!Array.isArray(state) || state.length === 0) {\r\n return false;\r\n }\r\n let hiddenRanges = [];\r\n for (let r of state) {\r\n if (!r.startLineNumber || !r.endLineNumber) {\r\n return false;\r\n }\r\n hiddenRanges.push(new Range(r.startLineNumber + 1, 1, r.endLineNumber, 1));\r\n }\r\n this.applyHiddenRanges(hiddenRanges);\r\n return true;\r\n }\r\n /**\r\n * Collapse state memento, for persistence only, only used if folding model is not yet initialized\r\n */\r\n getMemento() {\r\n return this._hiddenRanges.map(r => ({ startLineNumber: r.startLineNumber - 1, endLineNumber: r.endLineNumber }));\r\n }\r\n applyHiddenRanges(newHiddenAreas) {\r\n this._hiddenRanges = newHiddenAreas;\r\n this._updateEventEmitter.fire(newHiddenAreas);\r\n }\r\n hasRanges() {\r\n return this._hiddenRanges.length > 0;\r\n }\r\n isHidden(line) {\r\n return findRange(this._hiddenRanges, line) !== null;\r\n }\r\n adjustSelections(selections) {\r\n let hasChanges = false;\r\n let editorModel = this._foldingModel.textModel;\r\n let lastRange = null;\r\n let adjustLine = (line) => {\r\n if (!lastRange || !isInside(line, lastRange)) {\r\n lastRange = findRange(this._hiddenRanges, line);\r\n }\r\n if (lastRange) {\r\n return lastRange.startLineNumber - 1;\r\n }\r\n return null;\r\n };\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n let selection = selections[i];\r\n let adjustedStartLine = adjustLine(selection.startLineNumber);\r\n if (adjustedStartLine) {\r\n selection = selection.setStartPosition(adjustedStartLine, editorModel.getLineMaxColumn(adjustedStartLine));\r\n hasChanges = true;\r\n }\r\n let adjustedEndLine = adjustLine(selection.endLineNumber);\r\n if (adjustedEndLine) {\r\n selection = selection.setEndPosition(adjustedEndLine, editorModel.getLineMaxColumn(adjustedEndLine));\r\n hasChanges = true;\r\n }\r\n selections[i] = selection;\r\n }\r\n return hasChanges;\r\n }\r\n dispose() {\r\n if (this.hiddenRanges.length > 0) {\r\n this._hiddenRanges = [];\r\n this._updateEventEmitter.fire(this._hiddenRanges);\r\n }\r\n if (this._foldingModelListener) {\r\n this._foldingModelListener.dispose();\r\n this._foldingModelListener = null;\r\n }\r\n }\r\n}\r\nfunction isInside(line, range) {\r\n return line >= range.startLineNumber && line <= range.endLineNumber;\r\n}\r\nfunction findRange(ranges, line) {\r\n let i = findFirstInSorted(ranges, r => line < r.startLineNumber) - 1;\r\n if (i >= 0 && ranges[i].endLineNumber >= line) {\r\n return ranges[i];\r\n }\r\n return null;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { FoldingRegions, MAX_LINE_NUMBER } from './foldingRanges.js';\r\nimport { TextModel } from '../../common/model/textModel.js';\r\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry.js';\r\nconst MAX_FOLDING_REGIONS_FOR_INDENT_LIMIT = 5000;\r\nexport const ID_INDENT_PROVIDER = 'indent';\r\nexport class IndentRangeProvider {\r\n constructor(editorModel) {\r\n this.editorModel = editorModel;\r\n this.id = ID_INDENT_PROVIDER;\r\n }\r\n dispose() {\r\n }\r\n compute(cancelationToken) {\r\n let foldingRules = LanguageConfigurationRegistry.getFoldingRules(this.editorModel.getLanguageIdentifier().id);\r\n let offSide = foldingRules && !!foldingRules.offSide;\r\n let markers = foldingRules && foldingRules.markers;\r\n return Promise.resolve(computeRanges(this.editorModel, offSide, markers));\r\n }\r\n}\r\n// public only for testing\r\nexport class RangesCollector {\r\n constructor(foldingRangesLimit) {\r\n this._startIndexes = [];\r\n this._endIndexes = [];\r\n this._indentOccurrences = [];\r\n this._length = 0;\r\n this._foldingRangesLimit = foldingRangesLimit;\r\n }\r\n insertFirst(startLineNumber, endLineNumber, indent) {\r\n if (startLineNumber > MAX_LINE_NUMBER || endLineNumber > MAX_LINE_NUMBER) {\r\n return;\r\n }\r\n let index = this._length;\r\n this._startIndexes[index] = startLineNumber;\r\n this._endIndexes[index] = endLineNumber;\r\n this._length++;\r\n if (indent < 1000) {\r\n this._indentOccurrences[indent] = (this._indentOccurrences[indent] || 0) + 1;\r\n }\r\n }\r\n toIndentRanges(model) {\r\n if (this._length <= this._foldingRangesLimit) {\r\n // reverse and create arrays of the exact length\r\n let startIndexes = new Uint32Array(this._length);\r\n let endIndexes = new Uint32Array(this._length);\r\n for (let i = this._length - 1, k = 0; i >= 0; i--, k++) {\r\n startIndexes[k] = this._startIndexes[i];\r\n endIndexes[k] = this._endIndexes[i];\r\n }\r\n return new FoldingRegions(startIndexes, endIndexes);\r\n }\r\n else {\r\n let entries = 0;\r\n let maxIndent = this._indentOccurrences.length;\r\n for (let i = 0; i < this._indentOccurrences.length; i++) {\r\n let n = this._indentOccurrences[i];\r\n if (n) {\r\n if (n + entries > this._foldingRangesLimit) {\r\n maxIndent = i;\r\n break;\r\n }\r\n entries += n;\r\n }\r\n }\r\n const tabSize = model.getOptions().tabSize;\r\n // reverse and create arrays of the exact length\r\n let startIndexes = new Uint32Array(this._foldingRangesLimit);\r\n let endIndexes = new Uint32Array(this._foldingRangesLimit);\r\n for (let i = this._length - 1, k = 0; i >= 0; i--) {\r\n let startIndex = this._startIndexes[i];\r\n let lineContent = model.getLineContent(startIndex);\r\n let indent = TextModel.computeIndentLevel(lineContent, tabSize);\r\n if (indent < maxIndent || (indent === maxIndent && entries++ < this._foldingRangesLimit)) {\r\n startIndexes[k] = startIndex;\r\n endIndexes[k] = this._endIndexes[i];\r\n k++;\r\n }\r\n }\r\n return new FoldingRegions(startIndexes, endIndexes);\r\n }\r\n }\r\n}\r\nexport function computeRanges(model, offSide, markers, foldingRangesLimit = MAX_FOLDING_REGIONS_FOR_INDENT_LIMIT) {\r\n const tabSize = model.getOptions().tabSize;\r\n let result = new RangesCollector(foldingRangesLimit);\r\n let pattern = undefined;\r\n if (markers) {\r\n pattern = new RegExp(`(${markers.start.source})|(?:${markers.end.source})`);\r\n }\r\n let previousRegions = [];\r\n let line = model.getLineCount() + 1;\r\n previousRegions.push({ indent: -1, endAbove: line, line }); // sentinel, to make sure there's at least one entry\r\n for (let line = model.getLineCount(); line > 0; line--) {\r\n let lineContent = model.getLineContent(line);\r\n let indent = TextModel.computeIndentLevel(lineContent, tabSize);\r\n let previous = previousRegions[previousRegions.length - 1];\r\n if (indent === -1) {\r\n if (offSide) {\r\n // for offSide languages, empty lines are associated to the previous block\r\n // note: the next block is already written to the results, so this only\r\n // impacts the end position of the block before\r\n previous.endAbove = line;\r\n }\r\n continue; // only whitespace\r\n }\r\n let m;\r\n if (pattern && (m = lineContent.match(pattern))) {\r\n // folding pattern match\r\n if (m[1]) { // start pattern match\r\n // discard all regions until the folding pattern\r\n let i = previousRegions.length - 1;\r\n while (i > 0 && previousRegions[i].indent !== -2) {\r\n i--;\r\n }\r\n if (i > 0) {\r\n previousRegions.length = i + 1;\r\n previous = previousRegions[i];\r\n // new folding range from pattern, includes the end line\r\n result.insertFirst(line, previous.line, indent);\r\n previous.line = line;\r\n previous.indent = indent;\r\n previous.endAbove = line;\r\n continue;\r\n }\r\n else {\r\n // no end marker found, treat line as a regular line\r\n }\r\n }\r\n else { // end pattern match\r\n previousRegions.push({ indent: -2, endAbove: line, line });\r\n continue;\r\n }\r\n }\r\n if (previous.indent > indent) {\r\n // discard all regions with larger indent\r\n do {\r\n previousRegions.pop();\r\n previous = previousRegions[previousRegions.length - 1];\r\n } while (previous.indent > indent);\r\n // new folding range\r\n let endLineNumber = previous.endAbove - 1;\r\n if (endLineNumber - line >= 1) { // needs at east size 1\r\n result.insertFirst(line, endLineNumber, indent);\r\n }\r\n }\r\n if (previous.indent === indent) {\r\n previous.endAbove = line;\r\n }\r\n else { // previous.indent < indent\r\n // new region with a bigger indent\r\n previousRegions.push({ indent, endAbove: line, line });\r\n }\r\n }\r\n return result.toIndentRanges(model);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport { MAX_LINE_NUMBER, FoldingRegions } from './foldingRanges.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nconst MAX_FOLDING_REGIONS = 5000;\r\nconst foldingContext = {};\r\nexport const ID_SYNTAX_PROVIDER = 'syntax';\r\nexport class SyntaxRangeProvider {\r\n constructor(editorModel, providers, handleFoldingRangesChange, limit = MAX_FOLDING_REGIONS) {\r\n this.editorModel = editorModel;\r\n this.providers = providers;\r\n this.limit = limit;\r\n this.id = ID_SYNTAX_PROVIDER;\r\n for (const provider of providers) {\r\n if (typeof provider.onDidChange === 'function') {\r\n if (!this.disposables) {\r\n this.disposables = new DisposableStore();\r\n }\r\n this.disposables.add(provider.onDidChange(handleFoldingRangesChange));\r\n }\r\n }\r\n }\r\n compute(cancellationToken) {\r\n return collectSyntaxRanges(this.providers, this.editorModel, cancellationToken).then(ranges => {\r\n if (ranges) {\r\n let res = sanitizeRanges(ranges, this.limit);\r\n return res;\r\n }\r\n return null;\r\n });\r\n }\r\n dispose() {\r\n var _a;\r\n (_a = this.disposables) === null || _a === void 0 ? void 0 : _a.dispose();\r\n }\r\n}\r\nfunction collectSyntaxRanges(providers, model, cancellationToken) {\r\n let rangeData = null;\r\n let promises = providers.map((provider, i) => {\r\n return Promise.resolve(provider.provideFoldingRanges(model, foldingContext, cancellationToken)).then(ranges => {\r\n if (cancellationToken.isCancellationRequested) {\r\n return;\r\n }\r\n if (Array.isArray(ranges)) {\r\n if (!Array.isArray(rangeData)) {\r\n rangeData = [];\r\n }\r\n let nLines = model.getLineCount();\r\n for (let r of ranges) {\r\n if (r.start > 0 && r.end > r.start && r.end <= nLines) {\r\n rangeData.push({ start: r.start, end: r.end, rank: i, kind: r.kind });\r\n }\r\n }\r\n }\r\n }, onUnexpectedExternalError);\r\n });\r\n return Promise.all(promises).then(_ => {\r\n return rangeData;\r\n });\r\n}\r\nexport class RangesCollector {\r\n constructor(foldingRangesLimit) {\r\n this._startIndexes = [];\r\n this._endIndexes = [];\r\n this._nestingLevels = [];\r\n this._nestingLevelCounts = [];\r\n this._types = [];\r\n this._length = 0;\r\n this._foldingRangesLimit = foldingRangesLimit;\r\n }\r\n add(startLineNumber, endLineNumber, type, nestingLevel) {\r\n if (startLineNumber > MAX_LINE_NUMBER || endLineNumber > MAX_LINE_NUMBER) {\r\n return;\r\n }\r\n let index = this._length;\r\n this._startIndexes[index] = startLineNumber;\r\n this._endIndexes[index] = endLineNumber;\r\n this._nestingLevels[index] = nestingLevel;\r\n this._types[index] = type;\r\n this._length++;\r\n if (nestingLevel < 30) {\r\n this._nestingLevelCounts[nestingLevel] = (this._nestingLevelCounts[nestingLevel] || 0) + 1;\r\n }\r\n }\r\n toIndentRanges() {\r\n if (this._length <= this._foldingRangesLimit) {\r\n let startIndexes = new Uint32Array(this._length);\r\n let endIndexes = new Uint32Array(this._length);\r\n for (let i = 0; i < this._length; i++) {\r\n startIndexes[i] = this._startIndexes[i];\r\n endIndexes[i] = this._endIndexes[i];\r\n }\r\n return new FoldingRegions(startIndexes, endIndexes, this._types);\r\n }\r\n else {\r\n let entries = 0;\r\n let maxLevel = this._nestingLevelCounts.length;\r\n for (let i = 0; i < this._nestingLevelCounts.length; i++) {\r\n let n = this._nestingLevelCounts[i];\r\n if (n) {\r\n if (n + entries > this._foldingRangesLimit) {\r\n maxLevel = i;\r\n break;\r\n }\r\n entries += n;\r\n }\r\n }\r\n let startIndexes = new Uint32Array(this._foldingRangesLimit);\r\n let endIndexes = new Uint32Array(this._foldingRangesLimit);\r\n let types = [];\r\n for (let i = 0, k = 0; i < this._length; i++) {\r\n let level = this._nestingLevels[i];\r\n if (level < maxLevel || (level === maxLevel && entries++ < this._foldingRangesLimit)) {\r\n startIndexes[k] = this._startIndexes[i];\r\n endIndexes[k] = this._endIndexes[i];\r\n types[k] = this._types[i];\r\n k++;\r\n }\r\n }\r\n return new FoldingRegions(startIndexes, endIndexes, types);\r\n }\r\n }\r\n}\r\nexport function sanitizeRanges(rangeData, limit) {\r\n let sorted = rangeData.sort((d1, d2) => {\r\n let diff = d1.start - d2.start;\r\n if (diff === 0) {\r\n diff = d1.rank - d2.rank;\r\n }\r\n return diff;\r\n });\r\n let collector = new RangesCollector(limit);\r\n let top = undefined;\r\n let previous = [];\r\n for (let entry of sorted) {\r\n if (!top) {\r\n top = entry;\r\n collector.add(entry.start, entry.end, entry.kind && entry.kind.value, previous.length);\r\n }\r\n else {\r\n if (entry.start > top.start) {\r\n if (entry.end <= top.end) {\r\n previous.push(top);\r\n top = entry;\r\n collector.add(entry.start, entry.end, entry.kind && entry.kind.value, previous.length);\r\n }\r\n else {\r\n if (entry.start > top.end) {\r\n do {\r\n top = previous.pop();\r\n } while (top && entry.start > top.end);\r\n if (top) {\r\n previous.push(top);\r\n }\r\n top = entry;\r\n }\r\n collector.add(entry.start, entry.end, entry.kind && entry.kind.value, previous.length);\r\n }\r\n }\r\n }\r\n }\r\n return collector.toIndentRanges();\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { sanitizeRanges } from './syntaxRangeProvider.js';\r\nexport const ID_INIT_PROVIDER = 'init';\r\nexport class InitializingRangeProvider {\r\n constructor(editorModel, initialRanges, onTimeout, timeoutTime) {\r\n this.editorModel = editorModel;\r\n this.id = ID_INIT_PROVIDER;\r\n if (initialRanges.length) {\r\n let toDecorationRange = (range) => {\r\n return {\r\n range: {\r\n startLineNumber: range.startLineNumber,\r\n startColumn: 0,\r\n endLineNumber: range.endLineNumber,\r\n endColumn: editorModel.getLineLength(range.endLineNumber)\r\n },\r\n options: {\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */\r\n }\r\n };\r\n };\r\n this.decorationIds = editorModel.deltaDecorations([], initialRanges.map(toDecorationRange));\r\n this.timeout = setTimeout(onTimeout, timeoutTime);\r\n }\r\n }\r\n dispose() {\r\n if (this.decorationIds) {\r\n this.editorModel.deltaDecorations(this.decorationIds, []);\r\n this.decorationIds = undefined;\r\n }\r\n if (typeof this.timeout === 'number') {\r\n clearTimeout(this.timeout);\r\n this.timeout = undefined;\r\n }\r\n }\r\n compute(cancelationToken) {\r\n let foldingRangeData = [];\r\n if (this.decorationIds) {\r\n for (let id of this.decorationIds) {\r\n let range = this.editorModel.getDecorationRange(id);\r\n if (range) {\r\n foldingRangeData.push({ start: range.startLineNumber, end: range.endLineNumber, rank: 1 });\r\n }\r\n }\r\n }\r\n return Promise.resolve(sanitizeRanges(foldingRangeData, Number.MAX_VALUE));\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport './folding.css';\r\nimport * as nls from '../../../nls.js';\r\nimport * as types from '../../../base/common/types.js';\r\nimport { escapeRegExpCharacters } from '../../../base/common/strings.js';\r\nimport { RunOnceScheduler, Delayer, createCancelablePromise } from '../../../base/common/async.js';\r\nimport { KeyChord } from '../../../base/common/keyCodes.js';\r\nimport { Disposable, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { registerEditorAction, registerEditorContribution, EditorAction, registerInstantiatedEditorAction } from '../../browser/editorExtensions.js';\r\nimport { FoldingModel, setCollapseStateAtLevel, setCollapseStateLevelsDown, setCollapseStateLevelsUp, setCollapseStateForMatchingLines, setCollapseStateForType, toggleCollapseState, setCollapseStateUp } from './foldingModel.js';\r\nimport { FoldingDecorationProvider, foldingCollapsedIcon, foldingExpandedIcon } from './foldingDecorations.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { HiddenRangeModel } from './hiddenRangeModel.js';\r\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry.js';\r\nimport { IndentRangeProvider } from './indentRangeProvider.js';\r\nimport { FoldingRangeProviderRegistry, FoldingRangeKind } from '../../common/modes.js';\r\nimport { SyntaxRangeProvider, ID_SYNTAX_PROVIDER } from './syntaxRangeProvider.js';\r\nimport { InitializingRangeProvider, ID_INIT_PROVIDER } from './intializingRangeProvider.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { RawContextKey, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { registerThemingParticipant, ThemeIcon } from '../../../platform/theme/common/themeService.js';\r\nimport { registerColor, editorSelectionBackground, transparent, iconForeground } from '../../../platform/theme/common/colorRegistry.js';\r\nconst CONTEXT_FOLDING_ENABLED = new RawContextKey('foldingEnabled', false);\r\nlet FoldingController = class FoldingController extends Disposable {\r\n constructor(editor, contextKeyService) {\r\n super();\r\n this.contextKeyService = contextKeyService;\r\n this.localToDispose = this._register(new DisposableStore());\r\n this.editor = editor;\r\n const options = this.editor.getOptions();\r\n this._isEnabled = options.get(33 /* folding */);\r\n this._useFoldingProviders = options.get(34 /* foldingStrategy */) !== 'indentation';\r\n this._unfoldOnClickAfterEndOfLine = options.get(36 /* unfoldOnClickAfterEndOfLine */);\r\n this._restoringViewState = false;\r\n this.foldingModel = null;\r\n this.hiddenRangeModel = null;\r\n this.rangeProvider = null;\r\n this.foldingRegionPromise = null;\r\n this.foldingStateMemento = null;\r\n this.foldingModelPromise = null;\r\n this.updateScheduler = null;\r\n this.cursorChangedScheduler = null;\r\n this.mouseDownInfo = null;\r\n this.foldingDecorationProvider = new FoldingDecorationProvider(editor);\r\n this.foldingDecorationProvider.autoHideFoldingControls = options.get(94 /* showFoldingControls */) === 'mouseover';\r\n this.foldingDecorationProvider.showFoldingHighlights = options.get(35 /* foldingHighlight */);\r\n this.foldingEnabled = CONTEXT_FOLDING_ENABLED.bindTo(this.contextKeyService);\r\n this.foldingEnabled.set(this._isEnabled);\r\n this._register(this.editor.onDidChangeModel(() => this.onModelChanged()));\r\n this._register(this.editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(33 /* folding */)) {\r\n this._isEnabled = this.editor.getOptions().get(33 /* folding */);\r\n this.foldingEnabled.set(this._isEnabled);\r\n this.onModelChanged();\r\n }\r\n if (e.hasChanged(94 /* showFoldingControls */) || e.hasChanged(35 /* foldingHighlight */)) {\r\n const options = this.editor.getOptions();\r\n this.foldingDecorationProvider.autoHideFoldingControls = options.get(94 /* showFoldingControls */) === 'mouseover';\r\n this.foldingDecorationProvider.showFoldingHighlights = options.get(35 /* foldingHighlight */);\r\n this.onModelContentChanged();\r\n }\r\n if (e.hasChanged(34 /* foldingStrategy */)) {\r\n this._useFoldingProviders = this.editor.getOptions().get(34 /* foldingStrategy */) !== 'indentation';\r\n this.onFoldingStrategyChanged();\r\n }\r\n if (e.hasChanged(36 /* unfoldOnClickAfterEndOfLine */)) {\r\n this._unfoldOnClickAfterEndOfLine = this.editor.getOptions().get(36 /* unfoldOnClickAfterEndOfLine */);\r\n }\r\n }));\r\n this.onModelChanged();\r\n }\r\n static get(editor) {\r\n return editor.getContribution(FoldingController.ID);\r\n }\r\n /**\r\n * Store view state.\r\n */\r\n saveViewState() {\r\n let model = this.editor.getModel();\r\n if (!model || !this._isEnabled || model.isTooLargeForTokenization()) {\r\n return {};\r\n }\r\n if (this.foldingModel) { // disposed ?\r\n let collapsedRegions = this.foldingModel.isInitialized ? this.foldingModel.getMemento() : this.hiddenRangeModel.getMemento();\r\n let provider = this.rangeProvider ? this.rangeProvider.id : undefined;\r\n return { collapsedRegions, lineCount: model.getLineCount(), provider };\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Restore view state.\r\n */\r\n restoreViewState(state) {\r\n let model = this.editor.getModel();\r\n if (!model || !this._isEnabled || model.isTooLargeForTokenization() || !this.hiddenRangeModel) {\r\n return;\r\n }\r\n if (!state || !state.collapsedRegions || state.lineCount !== model.getLineCount()) {\r\n return;\r\n }\r\n if (state.provider === ID_SYNTAX_PROVIDER || state.provider === ID_INIT_PROVIDER) {\r\n this.foldingStateMemento = state;\r\n }\r\n const collapsedRegions = state.collapsedRegions;\r\n // set the hidden ranges right away, before waiting for the folding model.\r\n if (this.hiddenRangeModel.applyMemento(collapsedRegions)) {\r\n const foldingModel = this.getFoldingModel();\r\n if (foldingModel) {\r\n foldingModel.then(foldingModel => {\r\n if (foldingModel) {\r\n this._restoringViewState = true;\r\n try {\r\n foldingModel.applyMemento(collapsedRegions);\r\n }\r\n finally {\r\n this._restoringViewState = false;\r\n }\r\n }\r\n }).then(undefined, onUnexpectedError);\r\n }\r\n }\r\n }\r\n onModelChanged() {\r\n this.localToDispose.clear();\r\n let model = this.editor.getModel();\r\n if (!this._isEnabled || !model || model.isTooLargeForTokenization()) {\r\n // huge files get no view model, so they cannot support hidden areas\r\n return;\r\n }\r\n this.foldingModel = new FoldingModel(model, this.foldingDecorationProvider);\r\n this.localToDispose.add(this.foldingModel);\r\n this.hiddenRangeModel = new HiddenRangeModel(this.foldingModel);\r\n this.localToDispose.add(this.hiddenRangeModel);\r\n this.localToDispose.add(this.hiddenRangeModel.onDidChange(hr => this.onHiddenRangesChanges(hr)));\r\n this.updateScheduler = new Delayer(200);\r\n this.cursorChangedScheduler = new RunOnceScheduler(() => this.revealCursor(), 200);\r\n this.localToDispose.add(this.cursorChangedScheduler);\r\n this.localToDispose.add(FoldingRangeProviderRegistry.onDidChange(() => this.onFoldingStrategyChanged()));\r\n this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(() => this.onFoldingStrategyChanged())); // covers model language changes as well\r\n this.localToDispose.add(this.editor.onDidChangeModelContent(() => this.onModelContentChanged()));\r\n this.localToDispose.add(this.editor.onDidChangeCursorPosition(() => this.onCursorPositionChanged()));\r\n this.localToDispose.add(this.editor.onMouseDown(e => this.onEditorMouseDown(e)));\r\n this.localToDispose.add(this.editor.onMouseUp(e => this.onEditorMouseUp(e)));\r\n this.localToDispose.add({\r\n dispose: () => {\r\n if (this.foldingRegionPromise) {\r\n this.foldingRegionPromise.cancel();\r\n this.foldingRegionPromise = null;\r\n }\r\n if (this.updateScheduler) {\r\n this.updateScheduler.cancel();\r\n }\r\n this.updateScheduler = null;\r\n this.foldingModel = null;\r\n this.foldingModelPromise = null;\r\n this.hiddenRangeModel = null;\r\n this.cursorChangedScheduler = null;\r\n this.foldingStateMemento = null;\r\n if (this.rangeProvider) {\r\n this.rangeProvider.dispose();\r\n }\r\n this.rangeProvider = null;\r\n }\r\n });\r\n this.onModelContentChanged();\r\n }\r\n onFoldingStrategyChanged() {\r\n if (this.rangeProvider) {\r\n this.rangeProvider.dispose();\r\n }\r\n this.rangeProvider = null;\r\n this.onModelContentChanged();\r\n }\r\n getRangeProvider(editorModel) {\r\n if (this.rangeProvider) {\r\n return this.rangeProvider;\r\n }\r\n this.rangeProvider = new IndentRangeProvider(editorModel); // fallback\r\n if (this._useFoldingProviders && this.foldingModel) {\r\n let foldingProviders = FoldingRangeProviderRegistry.ordered(this.foldingModel.textModel);\r\n if (foldingProviders.length === 0 && this.foldingStateMemento && this.foldingStateMemento.collapsedRegions) {\r\n const rangeProvider = this.rangeProvider = new InitializingRangeProvider(editorModel, this.foldingStateMemento.collapsedRegions, () => {\r\n // if after 30 the InitializingRangeProvider is still not replaced, force a refresh\r\n this.foldingStateMemento = null;\r\n this.onFoldingStrategyChanged();\r\n }, 30000);\r\n return rangeProvider; // keep memento in case there are still no foldingProviders on the next request.\r\n }\r\n else if (foldingProviders.length > 0) {\r\n this.rangeProvider = new SyntaxRangeProvider(editorModel, foldingProviders, () => this.onModelContentChanged());\r\n }\r\n }\r\n this.foldingStateMemento = null;\r\n return this.rangeProvider;\r\n }\r\n getFoldingModel() {\r\n return this.foldingModelPromise;\r\n }\r\n onModelContentChanged() {\r\n if (this.updateScheduler) {\r\n if (this.foldingRegionPromise) {\r\n this.foldingRegionPromise.cancel();\r\n this.foldingRegionPromise = null;\r\n }\r\n this.foldingModelPromise = this.updateScheduler.trigger(() => {\r\n const foldingModel = this.foldingModel;\r\n if (!foldingModel) { // null if editor has been disposed, or folding turned off\r\n return null;\r\n }\r\n let foldingRegionPromise = this.foldingRegionPromise = createCancelablePromise(token => this.getRangeProvider(foldingModel.textModel).compute(token));\r\n return foldingRegionPromise.then(foldingRanges => {\r\n if (foldingRanges && foldingRegionPromise === this.foldingRegionPromise) { // new request or cancelled in the meantime?\r\n // some cursors might have moved into hidden regions, make sure they are in expanded regions\r\n let selections = this.editor.getSelections();\r\n let selectionLineNumbers = selections ? selections.map(s => s.startLineNumber) : [];\r\n foldingModel.update(foldingRanges, selectionLineNumbers);\r\n }\r\n return foldingModel;\r\n });\r\n }).then(undefined, (err) => {\r\n onUnexpectedError(err);\r\n return null;\r\n });\r\n }\r\n }\r\n onHiddenRangesChanges(hiddenRanges) {\r\n if (this.hiddenRangeModel && hiddenRanges.length && !this._restoringViewState) {\r\n let selections = this.editor.getSelections();\r\n if (selections) {\r\n if (this.hiddenRangeModel.adjustSelections(selections)) {\r\n this.editor.setSelections(selections);\r\n }\r\n }\r\n }\r\n this.editor.setHiddenAreas(hiddenRanges);\r\n }\r\n onCursorPositionChanged() {\r\n if (this.hiddenRangeModel && this.hiddenRangeModel.hasRanges()) {\r\n this.cursorChangedScheduler.schedule();\r\n }\r\n }\r\n revealCursor() {\r\n const foldingModel = this.getFoldingModel();\r\n if (!foldingModel) {\r\n return;\r\n }\r\n foldingModel.then(foldingModel => {\r\n if (foldingModel) {\r\n let selections = this.editor.getSelections();\r\n if (selections && selections.length > 0) {\r\n let toToggle = [];\r\n for (let selection of selections) {\r\n let lineNumber = selection.selectionStartLineNumber;\r\n if (this.hiddenRangeModel && this.hiddenRangeModel.isHidden(lineNumber)) {\r\n toToggle.push(...foldingModel.getAllRegionsAtLine(lineNumber, r => r.isCollapsed && lineNumber > r.startLineNumber));\r\n }\r\n }\r\n if (toToggle.length) {\r\n foldingModel.toggleCollapseState(toToggle);\r\n this.reveal(selections[0].getPosition());\r\n }\r\n }\r\n }\r\n }).then(undefined, onUnexpectedError);\r\n }\r\n onEditorMouseDown(e) {\r\n this.mouseDownInfo = null;\r\n if (!this.hiddenRangeModel || !e.target || !e.target.range) {\r\n return;\r\n }\r\n if (!e.event.leftButton && !e.event.middleButton) {\r\n return;\r\n }\r\n const range = e.target.range;\r\n let iconClicked = false;\r\n switch (e.target.type) {\r\n case 4 /* GUTTER_LINE_DECORATIONS */:\r\n const data = e.target.detail;\r\n const offsetLeftInGutter = e.target.element.offsetLeft;\r\n const gutterOffsetX = data.offsetX - offsetLeftInGutter;\r\n // const gutterOffsetX = data.offsetX - data.glyphMarginWidth - data.lineNumbersWidth - data.glyphMarginLeft;\r\n // TODO@joao TODO@alex TODO@martin this is such that we don't collide with dirty diff\r\n if (gutterOffsetX < 5) { // the whitespace between the border and the real folding icon border is 5px\r\n return;\r\n }\r\n iconClicked = true;\r\n break;\r\n case 7 /* CONTENT_EMPTY */: {\r\n if (this._unfoldOnClickAfterEndOfLine && this.hiddenRangeModel.hasRanges()) {\r\n const data = e.target.detail;\r\n if (!data.isAfterLines) {\r\n break;\r\n }\r\n }\r\n return;\r\n }\r\n case 6 /* CONTENT_TEXT */: {\r\n if (this.hiddenRangeModel.hasRanges()) {\r\n let model = this.editor.getModel();\r\n if (model && range.startColumn === model.getLineMaxColumn(range.startLineNumber)) {\r\n break;\r\n }\r\n }\r\n return;\r\n }\r\n default:\r\n return;\r\n }\r\n this.mouseDownInfo = { lineNumber: range.startLineNumber, iconClicked };\r\n }\r\n onEditorMouseUp(e) {\r\n const foldingModel = this.getFoldingModel();\r\n if (!foldingModel || !this.mouseDownInfo || !e.target) {\r\n return;\r\n }\r\n let lineNumber = this.mouseDownInfo.lineNumber;\r\n let iconClicked = this.mouseDownInfo.iconClicked;\r\n let range = e.target.range;\r\n if (!range || range.startLineNumber !== lineNumber) {\r\n return;\r\n }\r\n if (iconClicked) {\r\n if (e.target.type !== 4 /* GUTTER_LINE_DECORATIONS */) {\r\n return;\r\n }\r\n }\r\n else {\r\n let model = this.editor.getModel();\r\n if (!model || range.startColumn !== model.getLineMaxColumn(lineNumber)) {\r\n return;\r\n }\r\n }\r\n foldingModel.then(foldingModel => {\r\n if (foldingModel) {\r\n let region = foldingModel.getRegionAtLine(lineNumber);\r\n if (region && region.startLineNumber === lineNumber) {\r\n let isCollapsed = region.isCollapsed;\r\n if (iconClicked || isCollapsed) {\r\n let toToggle = [];\r\n let recursive = e.event.middleButton || e.event.shiftKey;\r\n if (recursive) {\r\n for (const r of foldingModel.getRegionsInside(region)) {\r\n if (r.isCollapsed === isCollapsed) {\r\n toToggle.push(r);\r\n }\r\n }\r\n }\r\n // when recursive, first only collapse all children. If all are already folded or there are no children, also fold parent.\r\n if (isCollapsed || !recursive || toToggle.length === 0) {\r\n toToggle.push(region);\r\n }\r\n foldingModel.toggleCollapseState(toToggle);\r\n this.reveal({ lineNumber, column: 1 });\r\n }\r\n }\r\n }\r\n }).then(undefined, onUnexpectedError);\r\n }\r\n reveal(position) {\r\n this.editor.revealPositionInCenterIfOutsideViewport(position, 0 /* Smooth */);\r\n }\r\n};\r\nFoldingController.ID = 'editor.contrib.folding';\r\nFoldingController = __decorate([\r\n __param(1, IContextKeyService)\r\n], FoldingController);\r\nexport { FoldingController };\r\nclass FoldingAction extends EditorAction {\r\n runEditorCommand(accessor, editor, args) {\r\n let foldingController = FoldingController.get(editor);\r\n if (!foldingController) {\r\n return;\r\n }\r\n let foldingModelPromise = foldingController.getFoldingModel();\r\n if (foldingModelPromise) {\r\n this.reportTelemetry(accessor, editor);\r\n return foldingModelPromise.then(foldingModel => {\r\n if (foldingModel) {\r\n this.invoke(foldingController, foldingModel, editor, args);\r\n const selection = editor.getSelection();\r\n if (selection) {\r\n foldingController.reveal(selection.getStartPosition());\r\n }\r\n }\r\n });\r\n }\r\n }\r\n getSelectedLines(editor) {\r\n let selections = editor.getSelections();\r\n return selections ? selections.map(s => s.startLineNumber) : [];\r\n }\r\n getLineNumbers(args, editor) {\r\n if (args && args.selectionLines) {\r\n return args.selectionLines.map(l => l + 1); // to 0-bases line numbers\r\n }\r\n return this.getSelectedLines(editor);\r\n }\r\n run(_accessor, _editor) {\r\n }\r\n}\r\nfunction foldingArgumentsConstraint(args) {\r\n if (!types.isUndefined(args)) {\r\n if (!types.isObject(args)) {\r\n return false;\r\n }\r\n const foldingArgs = args;\r\n if (!types.isUndefined(foldingArgs.levels) && !types.isNumber(foldingArgs.levels)) {\r\n return false;\r\n }\r\n if (!types.isUndefined(foldingArgs.direction) && !types.isString(foldingArgs.direction)) {\r\n return false;\r\n }\r\n if (!types.isUndefined(foldingArgs.selectionLines) && (!types.isArray(foldingArgs.selectionLines) || !foldingArgs.selectionLines.every(types.isNumber))) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nclass UnfoldAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.unfold',\r\n label: nls.localize('unfoldAction.label', \"Unfold\"),\r\n alias: 'Unfold',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 89 /* US_CLOSE_SQUARE_BRACKET */,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 89 /* US_CLOSE_SQUARE_BRACKET */\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n description: {\r\n description: 'Unfold the content in the editor',\r\n args: [\r\n {\r\n name: 'Unfold editor argument',\r\n description: `Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t`,\r\n constraint: foldingArgumentsConstraint,\r\n schema: {\r\n 'type': 'object',\r\n 'properties': {\r\n 'levels': {\r\n 'type': 'number',\r\n 'default': 1\r\n },\r\n 'direction': {\r\n 'type': 'string',\r\n 'enum': ['up', 'down'],\r\n 'default': 'down'\r\n },\r\n 'selectionLines': {\r\n 'type': 'array',\r\n 'items': {\r\n 'type': 'number'\r\n }\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor, args) {\r\n let levels = args && args.levels || 1;\r\n let lineNumbers = this.getLineNumbers(args, editor);\r\n if (args && args.direction === 'up') {\r\n setCollapseStateLevelsUp(foldingModel, false, levels, lineNumbers);\r\n }\r\n else {\r\n setCollapseStateLevelsDown(foldingModel, false, levels, lineNumbers);\r\n }\r\n }\r\n}\r\nclass UnFoldRecursivelyAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.unfoldRecursively',\r\n label: nls.localize('unFoldRecursivelyAction.label', \"Unfold Recursively\"),\r\n alias: 'Unfold Recursively',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 89 /* US_CLOSE_SQUARE_BRACKET */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor, _args) {\r\n setCollapseStateLevelsDown(foldingModel, false, Number.MAX_VALUE, this.getSelectedLines(editor));\r\n }\r\n}\r\nclass FoldAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.fold',\r\n label: nls.localize('foldAction.label', \"Fold\"),\r\n alias: 'Fold',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 87 /* US_OPEN_SQUARE_BRACKET */,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 87 /* US_OPEN_SQUARE_BRACKET */\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n description: {\r\n description: 'Fold the content in the editor',\r\n args: [\r\n {\r\n name: 'Fold editor argument',\r\n description: `Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t`,\r\n constraint: foldingArgumentsConstraint,\r\n schema: {\r\n 'type': 'object',\r\n 'properties': {\r\n 'levels': {\r\n 'type': 'number',\r\n },\r\n 'direction': {\r\n 'type': 'string',\r\n 'enum': ['up', 'down'],\r\n },\r\n 'selectionLines': {\r\n 'type': 'array',\r\n 'items': {\r\n 'type': 'number'\r\n }\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor, args) {\r\n let lineNumbers = this.getLineNumbers(args, editor);\r\n const levels = args && args.levels;\r\n const direction = args && args.direction;\r\n if (typeof levels !== 'number' && typeof direction !== 'string') {\r\n // fold the region at the location or if already collapsed, the first uncollapsed parent instead.\r\n setCollapseStateUp(foldingModel, true, lineNumbers);\r\n }\r\n else {\r\n if (direction === 'up') {\r\n setCollapseStateLevelsUp(foldingModel, true, levels || 1, lineNumbers);\r\n }\r\n else {\r\n setCollapseStateLevelsDown(foldingModel, true, levels || 1, lineNumbers);\r\n }\r\n }\r\n }\r\n}\r\nclass ToggleFoldAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.toggleFold',\r\n label: nls.localize('toggleFoldAction.label', \"Toggle Fold\"),\r\n alias: 'Toggle Fold',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 42 /* KEY_L */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor) {\r\n let selectedLines = this.getSelectedLines(editor);\r\n toggleCollapseState(foldingModel, 1, selectedLines);\r\n }\r\n}\r\nclass FoldRecursivelyAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.foldRecursively',\r\n label: nls.localize('foldRecursivelyAction.label', \"Fold Recursively\"),\r\n alias: 'Fold Recursively',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 87 /* US_OPEN_SQUARE_BRACKET */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor) {\r\n let selectedLines = this.getSelectedLines(editor);\r\n setCollapseStateLevelsDown(foldingModel, true, Number.MAX_VALUE, selectedLines);\r\n }\r\n}\r\nclass FoldAllBlockCommentsAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.foldAllBlockComments',\r\n label: nls.localize('foldAllBlockComments.label', \"Fold All Block Comments\"),\r\n alias: 'Fold All Block Comments',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 85 /* US_SLASH */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor) {\r\n if (foldingModel.regions.hasTypes()) {\r\n setCollapseStateForType(foldingModel, FoldingRangeKind.Comment.value, true);\r\n }\r\n else {\r\n const editorModel = editor.getModel();\r\n if (!editorModel) {\r\n return;\r\n }\r\n let comments = LanguageConfigurationRegistry.getComments(editorModel.getLanguageIdentifier().id);\r\n if (comments && comments.blockCommentStartToken) {\r\n let regExp = new RegExp('^\\\\s*' + escapeRegExpCharacters(comments.blockCommentStartToken));\r\n setCollapseStateForMatchingLines(foldingModel, regExp, true);\r\n }\r\n }\r\n }\r\n}\r\nclass FoldAllRegionsAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.foldAllMarkerRegions',\r\n label: nls.localize('foldAllMarkerRegions.label', \"Fold All Regions\"),\r\n alias: 'Fold All Regions',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 29 /* KEY_8 */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor) {\r\n if (foldingModel.regions.hasTypes()) {\r\n setCollapseStateForType(foldingModel, FoldingRangeKind.Region.value, true);\r\n }\r\n else {\r\n const editorModel = editor.getModel();\r\n if (!editorModel) {\r\n return;\r\n }\r\n let foldingRules = LanguageConfigurationRegistry.getFoldingRules(editorModel.getLanguageIdentifier().id);\r\n if (foldingRules && foldingRules.markers && foldingRules.markers.start) {\r\n let regExp = new RegExp(foldingRules.markers.start);\r\n setCollapseStateForMatchingLines(foldingModel, regExp, true);\r\n }\r\n }\r\n }\r\n}\r\nclass UnfoldAllRegionsAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.unfoldAllMarkerRegions',\r\n label: nls.localize('unfoldAllMarkerRegions.label', \"Unfold All Regions\"),\r\n alias: 'Unfold All Regions',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 30 /* KEY_9 */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, editor) {\r\n if (foldingModel.regions.hasTypes()) {\r\n setCollapseStateForType(foldingModel, FoldingRangeKind.Region.value, false);\r\n }\r\n else {\r\n const editorModel = editor.getModel();\r\n if (!editorModel) {\r\n return;\r\n }\r\n let foldingRules = LanguageConfigurationRegistry.getFoldingRules(editorModel.getLanguageIdentifier().id);\r\n if (foldingRules && foldingRules.markers && foldingRules.markers.start) {\r\n let regExp = new RegExp(foldingRules.markers.start);\r\n setCollapseStateForMatchingLines(foldingModel, regExp, false);\r\n }\r\n }\r\n }\r\n}\r\nclass FoldAllAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.foldAll',\r\n label: nls.localize('foldAllAction.label', \"Fold All\"),\r\n alias: 'Fold All',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 21 /* KEY_0 */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, _editor) {\r\n setCollapseStateLevelsDown(foldingModel, true);\r\n }\r\n}\r\nclass UnfoldAllAction extends FoldingAction {\r\n constructor() {\r\n super({\r\n id: 'editor.unfoldAll',\r\n label: nls.localize('unfoldAllAction.label', \"Unfold All\"),\r\n alias: 'Unfold All',\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 40 /* KEY_J */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n invoke(_foldingController, foldingModel, _editor) {\r\n setCollapseStateLevelsDown(foldingModel, false);\r\n }\r\n}\r\nclass FoldLevelAction extends FoldingAction {\r\n getFoldingLevel() {\r\n return parseInt(this.id.substr(FoldLevelAction.ID_PREFIX.length));\r\n }\r\n invoke(_foldingController, foldingModel, editor) {\r\n setCollapseStateAtLevel(foldingModel, this.getFoldingLevel(), true, this.getSelectedLines(editor));\r\n }\r\n}\r\nFoldLevelAction.ID_PREFIX = 'editor.foldLevel';\r\nFoldLevelAction.ID = (level) => FoldLevelAction.ID_PREFIX + level;\r\nregisterEditorContribution(FoldingController.ID, FoldingController);\r\nregisterEditorAction(UnfoldAction);\r\nregisterEditorAction(UnFoldRecursivelyAction);\r\nregisterEditorAction(FoldAction);\r\nregisterEditorAction(FoldRecursivelyAction);\r\nregisterEditorAction(FoldAllAction);\r\nregisterEditorAction(UnfoldAllAction);\r\nregisterEditorAction(FoldAllBlockCommentsAction);\r\nregisterEditorAction(FoldAllRegionsAction);\r\nregisterEditorAction(UnfoldAllRegionsAction);\r\nregisterEditorAction(ToggleFoldAction);\r\nfor (let i = 1; i <= 7; i++) {\r\n registerInstantiatedEditorAction(new FoldLevelAction({\r\n id: FoldLevelAction.ID(i),\r\n label: nls.localize('foldLevelAction.label', \"Fold Level {0}\", i),\r\n alias: `Fold Level ${i}`,\r\n precondition: CONTEXT_FOLDING_ENABLED,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | (21 /* KEY_0 */ + i)),\r\n weight: 100 /* EditorContrib */\r\n }\r\n }));\r\n}\r\nexport const foldBackgroundBackground = registerColor('editor.foldBackground', { light: transparent(editorSelectionBackground, 0.3), dark: transparent(editorSelectionBackground, 0.3), hc: null }, nls.localize('foldBackgroundBackground', \"Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations.\"), true);\r\nexport const editorFoldForeground = registerColor('editorGutter.foldingControlForeground', { dark: iconForeground, light: iconForeground, hc: iconForeground }, nls.localize('editorGutter.foldingControlForeground', 'Color of the folding control in the editor gutter.'));\r\nregisterThemingParticipant((theme, collector) => {\r\n const foldBackground = theme.getColor(foldBackgroundBackground);\r\n if (foldBackground) {\r\n collector.addRule(`.monaco-editor .folded-background { background-color: ${foldBackground}; }`);\r\n }\r\n const editorFoldColor = theme.getColor(editorFoldForeground);\r\n if (editorFoldColor) {\r\n collector.addRule(`\n\t\t.monaco-editor .cldr${ThemeIcon.asCSSSelector(foldingExpandedIcon)},\n\t\t.monaco-editor .cldr${ThemeIcon.asCSSSelector(foldingCollapsedIcon)} {\n\t\t\tcolor: ${editorFoldColor} !important;\n\t\t}\n\t\t`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../../nls.js';\r\nimport { EditorAction, registerEditorAction } from '../../browser/editorExtensions.js';\r\nimport { EditorZoom } from '../../common/config/editorZoom.js';\r\nclass EditorFontZoomIn extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.fontZoomIn',\r\n label: nls.localize('EditorFontZoomIn.label', \"Editor Font Zoom In\"),\r\n alias: 'Editor Font Zoom In',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n EditorZoom.setZoomLevel(EditorZoom.getZoomLevel() + 1);\r\n }\r\n}\r\nclass EditorFontZoomOut extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.fontZoomOut',\r\n label: nls.localize('EditorFontZoomOut.label', \"Editor Font Zoom Out\"),\r\n alias: 'Editor Font Zoom Out',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n EditorZoom.setZoomLevel(EditorZoom.getZoomLevel() - 1);\r\n }\r\n}\r\nclass EditorFontZoomReset extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.fontZoomReset',\r\n label: nls.localize('EditorFontZoomReset.label', \"Editor Font Zoom Reset\"),\r\n alias: 'Editor Font Zoom Reset',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n EditorZoom.setZoomLevel(0);\r\n }\r\n}\r\nregisterEditorAction(EditorFontZoomIn);\r\nregisterEditorAction(EditorFontZoomOut);\r\nregisterEditorAction(EditorFontZoomReset);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { isNonEmptyArray } from '../../../base/common/arrays.js';\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { KeyChord } from '../../../base/common/keyCodes.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { EditorAction, registerEditorAction, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\r\nimport { CharacterSet } from '../../common/core/characterClassifier.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { DocumentRangeFormattingEditProviderRegistry, OnTypeFormattingEditProviderRegistry } from '../../common/modes.js';\r\nimport { IEditorWorkerService } from '../../common/services/editorWorkerService.js';\r\nimport { getOnTypeFormattingEdits, alertFormattingEdits, formatDocumentRangesWithSelectedProvider, formatDocumentWithSelectedProvider } from './format.js';\r\nimport { FormattingEdit } from './formattingEdit.js';\r\nimport * as nls from '../../../nls.js';\r\nimport { CommandsRegistry, ICommandService } from '../../../platform/commands/common/commands.js';\r\nimport { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { Progress, IEditorProgressService } from '../../../platform/progress/common/progress.js';\r\nlet FormatOnType = class FormatOnType {\r\n constructor(editor, _workerService) {\r\n this._workerService = _workerService;\r\n this._callOnDispose = new DisposableStore();\r\n this._callOnModel = new DisposableStore();\r\n this._editor = editor;\r\n this._callOnDispose.add(editor.onDidChangeConfiguration(() => this._update()));\r\n this._callOnDispose.add(editor.onDidChangeModel(() => this._update()));\r\n this._callOnDispose.add(editor.onDidChangeModelLanguage(() => this._update()));\r\n this._callOnDispose.add(OnTypeFormattingEditProviderRegistry.onDidChange(this._update, this));\r\n }\r\n dispose() {\r\n this._callOnDispose.dispose();\r\n this._callOnModel.dispose();\r\n }\r\n _update() {\r\n // clean up\r\n this._callOnModel.clear();\r\n // we are disabled\r\n if (!this._editor.getOption(43 /* formatOnType */)) {\r\n return;\r\n }\r\n // no model\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n // no support\r\n const [support] = OnTypeFormattingEditProviderRegistry.ordered(model);\r\n if (!support || !support.autoFormatTriggerCharacters) {\r\n return;\r\n }\r\n // register typing listeners that will trigger the format\r\n let triggerChars = new CharacterSet();\r\n for (let ch of support.autoFormatTriggerCharacters) {\r\n triggerChars.add(ch.charCodeAt(0));\r\n }\r\n this._callOnModel.add(this._editor.onDidType((text) => {\r\n let lastCharCode = text.charCodeAt(text.length - 1);\r\n if (triggerChars.has(lastCharCode)) {\r\n this._trigger(String.fromCharCode(lastCharCode));\r\n }\r\n }));\r\n }\r\n _trigger(ch) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n if (this._editor.getSelections().length > 1) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const position = this._editor.getPosition();\r\n let canceled = false;\r\n // install a listener that checks if edits happens before the\r\n // position on which we format right now. If so, we won't\r\n // apply the format edits\r\n const unbind = this._editor.onDidChangeModelContent((e) => {\r\n if (e.isFlush) {\r\n // a model.setValue() was called\r\n // cancel only once\r\n canceled = true;\r\n unbind.dispose();\r\n return;\r\n }\r\n for (let i = 0, len = e.changes.length; i < len; i++) {\r\n const change = e.changes[i];\r\n if (change.range.endLineNumber <= position.lineNumber) {\r\n // cancel only once\r\n canceled = true;\r\n unbind.dispose();\r\n return;\r\n }\r\n }\r\n });\r\n getOnTypeFormattingEdits(this._workerService, model, position, ch, model.getFormattingOptions()).then(edits => {\r\n unbind.dispose();\r\n if (canceled) {\r\n return;\r\n }\r\n if (isNonEmptyArray(edits)) {\r\n FormattingEdit.execute(this._editor, edits, true);\r\n alertFormattingEdits(edits);\r\n }\r\n }, (err) => {\r\n unbind.dispose();\r\n throw err;\r\n });\r\n }\r\n};\r\nFormatOnType.ID = 'editor.contrib.autoFormat';\r\nFormatOnType = __decorate([\r\n __param(1, IEditorWorkerService)\r\n], FormatOnType);\r\nlet FormatOnPaste = class FormatOnPaste {\r\n constructor(editor, _instantiationService) {\r\n this.editor = editor;\r\n this._instantiationService = _instantiationService;\r\n this._callOnDispose = new DisposableStore();\r\n this._callOnModel = new DisposableStore();\r\n this._callOnDispose.add(editor.onDidChangeConfiguration(() => this._update()));\r\n this._callOnDispose.add(editor.onDidChangeModel(() => this._update()));\r\n this._callOnDispose.add(editor.onDidChangeModelLanguage(() => this._update()));\r\n this._callOnDispose.add(DocumentRangeFormattingEditProviderRegistry.onDidChange(this._update, this));\r\n }\r\n dispose() {\r\n this._callOnDispose.dispose();\r\n this._callOnModel.dispose();\r\n }\r\n _update() {\r\n // clean up\r\n this._callOnModel.clear();\r\n // we are disabled\r\n if (!this.editor.getOption(42 /* formatOnPaste */)) {\r\n return;\r\n }\r\n // no model\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n // no formatter\r\n if (!DocumentRangeFormattingEditProviderRegistry.has(this.editor.getModel())) {\r\n return;\r\n }\r\n this._callOnModel.add(this.editor.onDidPaste(({ range }) => this._trigger(range)));\r\n }\r\n _trigger(range) {\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n if (this.editor.getSelections().length > 1) {\r\n return;\r\n }\r\n this._instantiationService.invokeFunction(formatDocumentRangesWithSelectedProvider, this.editor, range, 2 /* Silent */, Progress.None, CancellationToken.None).catch(onUnexpectedError);\r\n }\r\n};\r\nFormatOnPaste.ID = 'editor.contrib.formatOnPaste';\r\nFormatOnPaste = __decorate([\r\n __param(1, IInstantiationService)\r\n], FormatOnPaste);\r\nclass FormatDocumentAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.formatDocument',\r\n label: nls.localize('formatDocument.label', \"Format Document\"),\r\n alias: 'Format Document',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.notInCompositeEditor, EditorContextKeys.writable, EditorContextKeys.hasDocumentFormattingProvider),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 36 /* KEY_F */,\r\n linux: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 39 /* KEY_I */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: '1_modification',\r\n order: 1.3\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (editor.hasModel()) {\r\n const instaService = accessor.get(IInstantiationService);\r\n const progressService = accessor.get(IEditorProgressService);\r\n yield progressService.showWhile(instaService.invokeFunction(formatDocumentWithSelectedProvider, editor, 1 /* Explicit */, Progress.None, CancellationToken.None), 250);\r\n }\r\n });\r\n }\r\n}\r\nclass FormatSelectionAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.formatSelection',\r\n label: nls.localize('formatSelection.label', \"Format Selection\"),\r\n alias: 'Format Selection',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasDocumentSelectionFormattingProvider),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 36 /* KEY_F */),\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n when: EditorContextKeys.hasNonEmptySelection,\r\n group: '1_modification',\r\n order: 1.31\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const instaService = accessor.get(IInstantiationService);\r\n const model = editor.getModel();\r\n const ranges = editor.getSelections().map(range => {\r\n return range.isEmpty()\r\n ? new Range(range.startLineNumber, 1, range.startLineNumber, model.getLineMaxColumn(range.startLineNumber))\r\n : range;\r\n });\r\n const progressService = accessor.get(IEditorProgressService);\r\n yield progressService.showWhile(instaService.invokeFunction(formatDocumentRangesWithSelectedProvider, editor, ranges, 1 /* Explicit */, Progress.None, CancellationToken.None), 250);\r\n });\r\n }\r\n}\r\nregisterEditorContribution(FormatOnType.ID, FormatOnType);\r\nregisterEditorContribution(FormatOnPaste.ID, FormatOnPaste);\r\nregisterEditorAction(FormatDocumentAction);\r\nregisterEditorAction(FormatSelectionAction);\r\n// this is the old format action that does both (format document OR format selection)\r\n// and we keep it here such that existing keybinding configurations etc will still work\r\nCommandsRegistry.registerCommand('editor.action.format', (accessor) => __awaiter(void 0, void 0, void 0, function* () {\r\n const editor = accessor.get(ICodeEditorService).getFocusedCodeEditor();\r\n if (!editor || !editor.hasModel()) {\r\n return;\r\n }\r\n const commandService = accessor.get(ICommandService);\r\n if (editor.getSelection().isEmpty()) {\r\n yield commandService.executeCommand('editor.action.formatDocument');\r\n }\r\n else {\r\n yield commandService.executeCommand('editor.action.formatSelection');\r\n }\r\n}));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { equals } from '../../../base/common/arrays.js';\r\nimport { CancellationTokenSource } from '../../../base/common/cancellation.js';\r\nimport { onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport { LRUCache } from '../../../base/common/map.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { DocumentSymbolProviderRegistry } from '../../common/modes.js';\r\nimport { Iterable } from '../../../base/common/iterator.js';\r\nimport { LanguageFeatureRequestDelays } from '../../common/modes/languageFeatureRegistry.js';\r\nexport class TreeElement {\r\n remove() {\r\n if (this.parent) {\r\n this.parent.children.delete(this.id);\r\n }\r\n }\r\n static findId(candidate, container) {\r\n // complex id-computation which contains the origin/extension,\r\n // the parent path, and some dedupe logic when names collide\r\n let candidateId;\r\n if (typeof candidate === 'string') {\r\n candidateId = `${container.id}/${candidate}`;\r\n }\r\n else {\r\n candidateId = `${container.id}/${candidate.name}`;\r\n if (container.children.get(candidateId) !== undefined) {\r\n candidateId = `${container.id}/${candidate.name}_${candidate.range.startLineNumber}_${candidate.range.startColumn}`;\r\n }\r\n }\r\n let id = candidateId;\r\n for (let i = 0; container.children.get(id) !== undefined; i++) {\r\n id = `${candidateId}_${i}`;\r\n }\r\n return id;\r\n }\r\n static empty(element) {\r\n return element.children.size === 0;\r\n }\r\n}\r\nexport class OutlineElement extends TreeElement {\r\n constructor(id, parent, symbol) {\r\n super();\r\n this.id = id;\r\n this.parent = parent;\r\n this.symbol = symbol;\r\n this.children = new Map();\r\n }\r\n}\r\nexport class OutlineGroup extends TreeElement {\r\n constructor(id, parent, label, order) {\r\n super();\r\n this.id = id;\r\n this.parent = parent;\r\n this.label = label;\r\n this.order = order;\r\n this.children = new Map();\r\n }\r\n}\r\nexport class OutlineModel extends TreeElement {\r\n constructor(uri) {\r\n super();\r\n this.uri = uri;\r\n this.id = 'root';\r\n this.parent = undefined;\r\n this._groups = new Map();\r\n this.children = new Map();\r\n this.id = 'root';\r\n this.parent = undefined;\r\n }\r\n static create(textModel, token) {\r\n let key = this._keys.for(textModel, true);\r\n let data = OutlineModel._requests.get(key);\r\n if (!data) {\r\n let source = new CancellationTokenSource();\r\n data = {\r\n promiseCnt: 0,\r\n source,\r\n promise: OutlineModel._create(textModel, source.token),\r\n model: undefined,\r\n };\r\n OutlineModel._requests.set(key, data);\r\n // keep moving average of request durations\r\n const now = Date.now();\r\n data.promise.then(() => {\r\n this._requestDurations.update(textModel, Date.now() - now);\r\n });\r\n }\r\n if (data.model) {\r\n // resolved -> return data\r\n return Promise.resolve(data.model);\r\n }\r\n // increase usage counter\r\n data.promiseCnt += 1;\r\n token.onCancellationRequested(() => {\r\n // last -> cancel provider request, remove cached promise\r\n if (--data.promiseCnt === 0) {\r\n data.source.cancel();\r\n OutlineModel._requests.delete(key);\r\n }\r\n });\r\n return new Promise((resolve, reject) => {\r\n data.promise.then(model => {\r\n data.model = model;\r\n resolve(model);\r\n }, err => {\r\n OutlineModel._requests.delete(key);\r\n reject(err);\r\n });\r\n });\r\n }\r\n static _create(textModel, token) {\r\n const cts = new CancellationTokenSource(token);\r\n const result = new OutlineModel(textModel.uri);\r\n const provider = DocumentSymbolProviderRegistry.ordered(textModel);\r\n const promises = provider.map((provider, index) => {\r\n var _a;\r\n let id = TreeElement.findId(`provider_${index}`, result);\r\n let group = new OutlineGroup(id, result, (_a = provider.displayName) !== null && _a !== void 0 ? _a : 'Unknown Outline Provider', index);\r\n return Promise.resolve(provider.provideDocumentSymbols(textModel, cts.token)).then(result => {\r\n for (const info of result || []) {\r\n OutlineModel._makeOutlineElement(info, group);\r\n }\r\n return group;\r\n }, err => {\r\n onUnexpectedExternalError(err);\r\n return group;\r\n }).then(group => {\r\n if (!TreeElement.empty(group)) {\r\n result._groups.set(id, group);\r\n }\r\n else {\r\n group.remove();\r\n }\r\n });\r\n });\r\n const listener = DocumentSymbolProviderRegistry.onDidChange(() => {\r\n const newProvider = DocumentSymbolProviderRegistry.ordered(textModel);\r\n if (!equals(newProvider, provider)) {\r\n cts.cancel();\r\n }\r\n });\r\n return Promise.all(promises).then(() => {\r\n if (cts.token.isCancellationRequested && !token.isCancellationRequested) {\r\n return OutlineModel._create(textModel, token);\r\n }\r\n else {\r\n return result._compact();\r\n }\r\n }).finally(() => {\r\n listener.dispose();\r\n });\r\n }\r\n static _makeOutlineElement(info, container) {\r\n let id = TreeElement.findId(info, container);\r\n let res = new OutlineElement(id, container, info);\r\n if (info.children) {\r\n for (const childInfo of info.children) {\r\n OutlineModel._makeOutlineElement(childInfo, res);\r\n }\r\n }\r\n container.children.set(res.id, res);\r\n }\r\n _compact() {\r\n let count = 0;\r\n for (const [key, group] of this._groups) {\r\n if (group.children.size === 0) { // empty\r\n this._groups.delete(key);\r\n }\r\n else {\r\n count += 1;\r\n }\r\n }\r\n if (count !== 1) {\r\n //\r\n this.children = this._groups;\r\n }\r\n else {\r\n // adopt all elements of the first group\r\n let group = Iterable.first(this._groups.values());\r\n for (let [, child] of group.children) {\r\n child.parent = this;\r\n this.children.set(child.id, child);\r\n }\r\n }\r\n return this;\r\n }\r\n getTopLevelSymbols() {\r\n const roots = [];\r\n for (const child of this.children.values()) {\r\n if (child instanceof OutlineElement) {\r\n roots.push(child.symbol);\r\n }\r\n else {\r\n roots.push(...Iterable.map(child.children.values(), child => child.symbol));\r\n }\r\n }\r\n return roots.sort((a, b) => Range.compareRangesUsingStarts(a.range, b.range));\r\n }\r\n asListOfDocumentSymbols() {\r\n const roots = this.getTopLevelSymbols();\r\n const bucket = [];\r\n OutlineModel._flattenDocumentSymbols(bucket, roots, '');\r\n return bucket.sort((a, b) => Range.compareRangesUsingStarts(a.range, b.range));\r\n }\r\n static _flattenDocumentSymbols(bucket, entries, overrideContainerLabel) {\r\n for (const entry of entries) {\r\n bucket.push({\r\n kind: entry.kind,\r\n tags: entry.tags,\r\n name: entry.name,\r\n detail: entry.detail,\r\n containerName: entry.containerName || overrideContainerLabel,\r\n range: entry.range,\r\n selectionRange: entry.selectionRange,\r\n children: undefined, // we flatten it...\r\n });\r\n // Recurse over children\r\n if (entry.children) {\r\n OutlineModel._flattenDocumentSymbols(bucket, entry.children, entry.name);\r\n }\r\n }\r\n }\r\n}\r\nOutlineModel._requestDurations = new LanguageFeatureRequestDelays(DocumentSymbolProviderRegistry, 350);\r\nOutlineModel._requests = new LRUCache(9, 0.75);\r\nOutlineModel._keys = new class {\r\n constructor() {\r\n this._counter = 1;\r\n this._data = new WeakMap();\r\n }\r\n for(textModel, version) {\r\n return `${textModel.id}/${version ? textModel.getVersionId() : ''}/${this._hash(DocumentSymbolProviderRegistry.all(textModel))}`;\r\n }\r\n _hash(providers) {\r\n let result = '';\r\n for (const provider of providers) {\r\n let n = this._data.get(provider);\r\n if (typeof n === 'undefined') {\r\n n = this._counter++;\r\n this._data.set(provider, n);\r\n }\r\n result += n;\r\n }\r\n return result;\r\n }\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { IModelService } from '../../common/services/modelService.js';\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { ITextModelService } from '../../common/services/resolverService.js';\r\nimport { OutlineModel } from './outlineModel.js';\r\nimport { CommandsRegistry } from '../../../platform/commands/common/commands.js';\r\nimport { assertType } from '../../../base/common/types.js';\r\nexport function getDocumentSymbols(document, flat, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const model = yield OutlineModel.create(document, token);\r\n return flat\r\n ? model.asListOfDocumentSymbols()\r\n : model.getTopLevelSymbols();\r\n });\r\n}\r\nCommandsRegistry.registerCommand('_executeDocumentSymbolProvider', function (accessor, ...args) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const [resource] = args;\r\n assertType(URI.isUri(resource));\r\n const model = accessor.get(IModelService).getModel(resource);\r\n if (model) {\r\n return getDocumentSymbols(model, false, CancellationToken.None);\r\n }\r\n const reference = yield accessor.get(ITextModelService).createModelReference(resource);\r\n try {\r\n return yield getDocumentSymbols(reference.object.textEditorModel, false, CancellationToken.None);\r\n }\r\n finally {\r\n reference.dispose();\r\n }\r\n });\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport function getSpaceCnt(str, tabSize) {\r\n let spacesCnt = 0;\r\n for (let i = 0; i < str.length; i++) {\r\n if (str.charAt(i) === '\\t') {\r\n spacesCnt += tabSize;\r\n }\r\n else {\r\n spacesCnt++;\r\n }\r\n }\r\n return spacesCnt;\r\n}\r\nexport function generateIndent(spacesCnt, tabSize, insertSpaces) {\r\n spacesCnt = spacesCnt < 0 ? 0 : spacesCnt;\r\n let result = '';\r\n if (!insertSpaces) {\r\n let tabsCnt = Math.floor(spacesCnt / tabSize);\r\n spacesCnt = spacesCnt % tabSize;\r\n for (let i = 0; i < tabsCnt; i++) {\r\n result += '\\t';\r\n }\r\n }\r\n for (let i = 0; i < spacesCnt; i++) {\r\n result += ' ';\r\n }\r\n return result;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../../nls.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { EditorAction, registerEditorAction, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { ShiftCommand } from '../../common/commands/shiftCommand.js';\r\nimport { EditOperation } from '../../common/core/editOperation.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { TextModel } from '../../common/model/textModel.js';\r\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry.js';\r\nimport { IModelService } from '../../common/services/modelService.js';\r\nimport * as indentUtils from './indentUtils.js';\r\nimport { IQuickInputService } from '../../../platform/quickinput/common/quickInput.js';\r\nexport function getReindentEditOperations(model, startLineNumber, endLineNumber, inheritedIndent) {\r\n if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {\r\n // Model is empty\r\n return [];\r\n }\r\n let indentationRules = LanguageConfigurationRegistry.getIndentationRules(model.getLanguageIdentifier().id);\r\n if (!indentationRules) {\r\n return [];\r\n }\r\n endLineNumber = Math.min(endLineNumber, model.getLineCount());\r\n // Skip `unIndentedLinePattern` lines\r\n while (startLineNumber <= endLineNumber) {\r\n if (!indentationRules.unIndentedLinePattern) {\r\n break;\r\n }\r\n let text = model.getLineContent(startLineNumber);\r\n if (!indentationRules.unIndentedLinePattern.test(text)) {\r\n break;\r\n }\r\n startLineNumber++;\r\n }\r\n if (startLineNumber > endLineNumber - 1) {\r\n return [];\r\n }\r\n const { tabSize, indentSize, insertSpaces } = model.getOptions();\r\n const shiftIndent = (indentation, count) => {\r\n count = count || 1;\r\n return ShiftCommand.shiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);\r\n };\r\n const unshiftIndent = (indentation, count) => {\r\n count = count || 1;\r\n return ShiftCommand.unshiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);\r\n };\r\n let indentEdits = [];\r\n // indentation being passed to lines below\r\n let globalIndent;\r\n // Calculate indentation for the first line\r\n // If there is no passed-in indentation, we use the indentation of the first line as base.\r\n let currentLineText = model.getLineContent(startLineNumber);\r\n let adjustedLineContent = currentLineText;\r\n if (inheritedIndent !== undefined && inheritedIndent !== null) {\r\n globalIndent = inheritedIndent;\r\n let oldIndentation = strings.getLeadingWhitespace(currentLineText);\r\n adjustedLineContent = globalIndent + currentLineText.substring(oldIndentation.length);\r\n if (indentationRules.decreaseIndentPattern && indentationRules.decreaseIndentPattern.test(adjustedLineContent)) {\r\n globalIndent = unshiftIndent(globalIndent);\r\n adjustedLineContent = globalIndent + currentLineText.substring(oldIndentation.length);\r\n }\r\n if (currentLineText !== adjustedLineContent) {\r\n indentEdits.push(EditOperation.replaceMove(new Selection(startLineNumber, 1, startLineNumber, oldIndentation.length + 1), TextModel.normalizeIndentation(globalIndent, indentSize, insertSpaces)));\r\n }\r\n }\r\n else {\r\n globalIndent = strings.getLeadingWhitespace(currentLineText);\r\n }\r\n // idealIndentForNextLine doesn't equal globalIndent when there is a line matching `indentNextLinePattern`.\r\n let idealIndentForNextLine = globalIndent;\r\n if (indentationRules.increaseIndentPattern && indentationRules.increaseIndentPattern.test(adjustedLineContent)) {\r\n idealIndentForNextLine = shiftIndent(idealIndentForNextLine);\r\n globalIndent = shiftIndent(globalIndent);\r\n }\r\n else if (indentationRules.indentNextLinePattern && indentationRules.indentNextLinePattern.test(adjustedLineContent)) {\r\n idealIndentForNextLine = shiftIndent(idealIndentForNextLine);\r\n }\r\n startLineNumber++;\r\n // Calculate indentation adjustment for all following lines\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n let text = model.getLineContent(lineNumber);\r\n let oldIndentation = strings.getLeadingWhitespace(text);\r\n let adjustedLineContent = idealIndentForNextLine + text.substring(oldIndentation.length);\r\n if (indentationRules.decreaseIndentPattern && indentationRules.decreaseIndentPattern.test(adjustedLineContent)) {\r\n idealIndentForNextLine = unshiftIndent(idealIndentForNextLine);\r\n globalIndent = unshiftIndent(globalIndent);\r\n }\r\n if (oldIndentation !== idealIndentForNextLine) {\r\n indentEdits.push(EditOperation.replaceMove(new Selection(lineNumber, 1, lineNumber, oldIndentation.length + 1), TextModel.normalizeIndentation(idealIndentForNextLine, indentSize, insertSpaces)));\r\n }\r\n // calculate idealIndentForNextLine\r\n if (indentationRules.unIndentedLinePattern && indentationRules.unIndentedLinePattern.test(text)) {\r\n // In reindent phase, if the line matches `unIndentedLinePattern` we inherit indentation from above lines\r\n // but don't change globalIndent and idealIndentForNextLine.\r\n continue;\r\n }\r\n else if (indentationRules.increaseIndentPattern && indentationRules.increaseIndentPattern.test(adjustedLineContent)) {\r\n globalIndent = shiftIndent(globalIndent);\r\n idealIndentForNextLine = globalIndent;\r\n }\r\n else if (indentationRules.indentNextLinePattern && indentationRules.indentNextLinePattern.test(adjustedLineContent)) {\r\n idealIndentForNextLine = shiftIndent(idealIndentForNextLine);\r\n }\r\n else {\r\n idealIndentForNextLine = globalIndent;\r\n }\r\n }\r\n return indentEdits;\r\n}\r\nexport class IndentationToSpacesAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: IndentationToSpacesAction.ID,\r\n label: nls.localize('indentationToSpaces', \"Convert Indentation to Spaces\"),\r\n alias: 'Convert Indentation to Spaces',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n run(accessor, editor) {\r\n let model = editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n let modelOpts = model.getOptions();\r\n let selection = editor.getSelection();\r\n if (!selection) {\r\n return;\r\n }\r\n const command = new IndentationToSpacesCommand(selection, modelOpts.tabSize);\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, [command]);\r\n editor.pushUndoStop();\r\n model.updateOptions({\r\n insertSpaces: true\r\n });\r\n }\r\n}\r\nIndentationToSpacesAction.ID = 'editor.action.indentationToSpaces';\r\nexport class IndentationToTabsAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: IndentationToTabsAction.ID,\r\n label: nls.localize('indentationToTabs', \"Convert Indentation to Tabs\"),\r\n alias: 'Convert Indentation to Tabs',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n run(accessor, editor) {\r\n let model = editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n let modelOpts = model.getOptions();\r\n let selection = editor.getSelection();\r\n if (!selection) {\r\n return;\r\n }\r\n const command = new IndentationToTabsCommand(selection, modelOpts.tabSize);\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, [command]);\r\n editor.pushUndoStop();\r\n model.updateOptions({\r\n insertSpaces: false\r\n });\r\n }\r\n}\r\nIndentationToTabsAction.ID = 'editor.action.indentationToTabs';\r\nexport class ChangeIndentationSizeAction extends EditorAction {\r\n constructor(insertSpaces, opts) {\r\n super(opts);\r\n this.insertSpaces = insertSpaces;\r\n }\r\n run(accessor, editor) {\r\n const quickInputService = accessor.get(IQuickInputService);\r\n const modelService = accessor.get(IModelService);\r\n let model = editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n let creationOpts = modelService.getCreationOptions(model.getLanguageIdentifier().language, model.uri, model.isForSimpleWidget);\r\n const picks = [1, 2, 3, 4, 5, 6, 7, 8].map(n => ({\r\n id: n.toString(),\r\n label: n.toString(),\r\n // add description for tabSize value set in the configuration\r\n description: n === creationOpts.tabSize ? nls.localize('configuredTabSize', \"Configured Tab Size\") : undefined\r\n }));\r\n // auto focus the tabSize set for the current editor\r\n const autoFocusIndex = Math.min(model.getOptions().tabSize - 1, 7);\r\n setTimeout(() => {\r\n quickInputService.pick(picks, { placeHolder: nls.localize({ key: 'selectTabWidth', comment: ['Tab corresponds to the tab key'] }, \"Select Tab Size for Current File\"), activeItem: picks[autoFocusIndex] }).then(pick => {\r\n if (pick) {\r\n if (model && !model.isDisposed()) {\r\n model.updateOptions({\r\n tabSize: parseInt(pick.label, 10),\r\n insertSpaces: this.insertSpaces\r\n });\r\n }\r\n }\r\n });\r\n }, 50 /* quick input is sensitive to being opened so soon after another */);\r\n }\r\n}\r\nexport class IndentUsingTabs extends ChangeIndentationSizeAction {\r\n constructor() {\r\n super(false, {\r\n id: IndentUsingTabs.ID,\r\n label: nls.localize('indentUsingTabs', \"Indent Using Tabs\"),\r\n alias: 'Indent Using Tabs',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nIndentUsingTabs.ID = 'editor.action.indentUsingTabs';\r\nexport class IndentUsingSpaces extends ChangeIndentationSizeAction {\r\n constructor() {\r\n super(true, {\r\n id: IndentUsingSpaces.ID,\r\n label: nls.localize('indentUsingSpaces', \"Indent Using Spaces\"),\r\n alias: 'Indent Using Spaces',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nIndentUsingSpaces.ID = 'editor.action.indentUsingSpaces';\r\nexport class DetectIndentation extends EditorAction {\r\n constructor() {\r\n super({\r\n id: DetectIndentation.ID,\r\n label: nls.localize('detectIndentation', \"Detect Indentation from Content\"),\r\n alias: 'Detect Indentation from Content',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n const modelService = accessor.get(IModelService);\r\n let model = editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n let creationOpts = modelService.getCreationOptions(model.getLanguageIdentifier().language, model.uri, model.isForSimpleWidget);\r\n model.detectIndentation(creationOpts.insertSpaces, creationOpts.tabSize);\r\n }\r\n}\r\nDetectIndentation.ID = 'editor.action.detectIndentation';\r\nexport class ReindentLinesAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.reindentlines',\r\n label: nls.localize('editor.reindentlines', \"Reindent Lines\"),\r\n alias: 'Reindent Lines',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n run(accessor, editor) {\r\n let model = editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n let edits = getReindentEditOperations(model, 1, model.getLineCount());\r\n if (edits.length > 0) {\r\n editor.pushUndoStop();\r\n editor.executeEdits(this.id, edits);\r\n editor.pushUndoStop();\r\n }\r\n }\r\n}\r\nexport class ReindentSelectedLinesAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.reindentselectedlines',\r\n label: nls.localize('editor.reindentselectedlines', \"Reindent Selected Lines\"),\r\n alias: 'Reindent Selected Lines',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n run(accessor, editor) {\r\n let model = editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n let selections = editor.getSelections();\r\n if (selections === null) {\r\n return;\r\n }\r\n let edits = [];\r\n for (let selection of selections) {\r\n let startLineNumber = selection.startLineNumber;\r\n let endLineNumber = selection.endLineNumber;\r\n if (startLineNumber !== endLineNumber && selection.endColumn === 1) {\r\n endLineNumber--;\r\n }\r\n if (startLineNumber === 1) {\r\n if (startLineNumber === endLineNumber) {\r\n continue;\r\n }\r\n }\r\n else {\r\n startLineNumber--;\r\n }\r\n let editOperations = getReindentEditOperations(model, startLineNumber, endLineNumber);\r\n edits.push(...editOperations);\r\n }\r\n if (edits.length > 0) {\r\n editor.pushUndoStop();\r\n editor.executeEdits(this.id, edits);\r\n editor.pushUndoStop();\r\n }\r\n }\r\n}\r\nexport class AutoIndentOnPasteCommand {\r\n constructor(edits, initialSelection) {\r\n this._initialSelection = initialSelection;\r\n this._edits = [];\r\n this._selectionId = null;\r\n for (let edit of edits) {\r\n if (edit.range && typeof edit.text === 'string') {\r\n this._edits.push(edit);\r\n }\r\n }\r\n }\r\n getEditOperations(model, builder) {\r\n for (let edit of this._edits) {\r\n builder.addEditOperation(Range.lift(edit.range), edit.text);\r\n }\r\n let selectionIsSet = false;\r\n if (Array.isArray(this._edits) && this._edits.length === 1 && this._initialSelection.isEmpty()) {\r\n if (this._edits[0].range.startColumn === this._initialSelection.endColumn &&\r\n this._edits[0].range.startLineNumber === this._initialSelection.endLineNumber) {\r\n selectionIsSet = true;\r\n this._selectionId = builder.trackSelection(this._initialSelection, true);\r\n }\r\n else if (this._edits[0].range.endColumn === this._initialSelection.startColumn &&\r\n this._edits[0].range.endLineNumber === this._initialSelection.startLineNumber) {\r\n selectionIsSet = true;\r\n this._selectionId = builder.trackSelection(this._initialSelection, false);\r\n }\r\n }\r\n if (!selectionIsSet) {\r\n this._selectionId = builder.trackSelection(this._initialSelection);\r\n }\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this._selectionId);\r\n }\r\n}\r\nexport class AutoIndentOnPaste {\r\n constructor(editor) {\r\n this.callOnDispose = new DisposableStore();\r\n this.callOnModel = new DisposableStore();\r\n this.editor = editor;\r\n this.callOnDispose.add(editor.onDidChangeConfiguration(() => this.update()));\r\n this.callOnDispose.add(editor.onDidChangeModel(() => this.update()));\r\n this.callOnDispose.add(editor.onDidChangeModelLanguage(() => this.update()));\r\n }\r\n update() {\r\n // clean up\r\n this.callOnModel.clear();\r\n // we are disabled\r\n if (this.editor.getOption(8 /* autoIndent */) < 4 /* Full */ || this.editor.getOption(42 /* formatOnPaste */)) {\r\n return;\r\n }\r\n // no model\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n this.callOnModel.add(this.editor.onDidPaste(({ range }) => {\r\n this.trigger(range);\r\n }));\r\n }\r\n trigger(range) {\r\n let selections = this.editor.getSelections();\r\n if (selections === null || selections.length > 1) {\r\n return;\r\n }\r\n const model = this.editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n if (!model.isCheapToTokenize(range.getStartPosition().lineNumber)) {\r\n return;\r\n }\r\n const autoIndent = this.editor.getOption(8 /* autoIndent */);\r\n const { tabSize, indentSize, insertSpaces } = model.getOptions();\r\n let textEdits = [];\r\n let indentConverter = {\r\n shiftIndent: (indentation) => {\r\n return ShiftCommand.shiftIndent(indentation, indentation.length + 1, tabSize, indentSize, insertSpaces);\r\n },\r\n unshiftIndent: (indentation) => {\r\n return ShiftCommand.unshiftIndent(indentation, indentation.length + 1, tabSize, indentSize, insertSpaces);\r\n }\r\n };\r\n let startLineNumber = range.startLineNumber;\r\n while (startLineNumber <= range.endLineNumber) {\r\n if (this.shouldIgnoreLine(model, startLineNumber)) {\r\n startLineNumber++;\r\n continue;\r\n }\r\n break;\r\n }\r\n if (startLineNumber > range.endLineNumber) {\r\n return;\r\n }\r\n let firstLineText = model.getLineContent(startLineNumber);\r\n if (!/\\S/.test(firstLineText.substring(0, range.startColumn - 1))) {\r\n let indentOfFirstLine = LanguageConfigurationRegistry.getGoodIndentForLine(autoIndent, model, model.getLanguageIdentifier().id, startLineNumber, indentConverter);\r\n if (indentOfFirstLine !== null) {\r\n let oldIndentation = strings.getLeadingWhitespace(firstLineText);\r\n let newSpaceCnt = indentUtils.getSpaceCnt(indentOfFirstLine, tabSize);\r\n let oldSpaceCnt = indentUtils.getSpaceCnt(oldIndentation, tabSize);\r\n if (newSpaceCnt !== oldSpaceCnt) {\r\n let newIndent = indentUtils.generateIndent(newSpaceCnt, tabSize, insertSpaces);\r\n textEdits.push({\r\n range: new Range(startLineNumber, 1, startLineNumber, oldIndentation.length + 1),\r\n text: newIndent\r\n });\r\n firstLineText = newIndent + firstLineText.substr(oldIndentation.length);\r\n }\r\n else {\r\n let indentMetadata = LanguageConfigurationRegistry.getIndentMetadata(model, startLineNumber);\r\n if (indentMetadata === 0 || indentMetadata === 8 /* UNINDENT_MASK */) {\r\n // we paste content into a line where only contains whitespaces\r\n // after pasting, the indentation of the first line is already correct\r\n // the first line doesn't match any indentation rule\r\n // then no-op.\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n const firstLineNumber = startLineNumber;\r\n // ignore empty or ignored lines\r\n while (startLineNumber < range.endLineNumber) {\r\n if (!/\\S/.test(model.getLineContent(startLineNumber + 1))) {\r\n startLineNumber++;\r\n continue;\r\n }\r\n break;\r\n }\r\n if (startLineNumber !== range.endLineNumber) {\r\n let virtualModel = {\r\n getLineTokens: (lineNumber) => {\r\n return model.getLineTokens(lineNumber);\r\n },\r\n getLanguageIdentifier: () => {\r\n return model.getLanguageIdentifier();\r\n },\r\n getLanguageIdAtPosition: (lineNumber, column) => {\r\n return model.getLanguageIdAtPosition(lineNumber, column);\r\n },\r\n getLineContent: (lineNumber) => {\r\n if (lineNumber === firstLineNumber) {\r\n return firstLineText;\r\n }\r\n else {\r\n return model.getLineContent(lineNumber);\r\n }\r\n }\r\n };\r\n let indentOfSecondLine = LanguageConfigurationRegistry.getGoodIndentForLine(autoIndent, virtualModel, model.getLanguageIdentifier().id, startLineNumber + 1, indentConverter);\r\n if (indentOfSecondLine !== null) {\r\n let newSpaceCntOfSecondLine = indentUtils.getSpaceCnt(indentOfSecondLine, tabSize);\r\n let oldSpaceCntOfSecondLine = indentUtils.getSpaceCnt(strings.getLeadingWhitespace(model.getLineContent(startLineNumber + 1)), tabSize);\r\n if (newSpaceCntOfSecondLine !== oldSpaceCntOfSecondLine) {\r\n let spaceCntOffset = newSpaceCntOfSecondLine - oldSpaceCntOfSecondLine;\r\n for (let i = startLineNumber + 1; i <= range.endLineNumber; i++) {\r\n let lineContent = model.getLineContent(i);\r\n let originalIndent = strings.getLeadingWhitespace(lineContent);\r\n let originalSpacesCnt = indentUtils.getSpaceCnt(originalIndent, tabSize);\r\n let newSpacesCnt = originalSpacesCnt + spaceCntOffset;\r\n let newIndent = indentUtils.generateIndent(newSpacesCnt, tabSize, insertSpaces);\r\n if (newIndent !== originalIndent) {\r\n textEdits.push({\r\n range: new Range(i, 1, i, originalIndent.length + 1),\r\n text: newIndent\r\n });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (textEdits.length > 0) {\r\n this.editor.pushUndoStop();\r\n let cmd = new AutoIndentOnPasteCommand(textEdits, this.editor.getSelection());\r\n this.editor.executeCommand('autoIndentOnPaste', cmd);\r\n this.editor.pushUndoStop();\r\n }\r\n }\r\n shouldIgnoreLine(model, lineNumber) {\r\n model.forceTokenization(lineNumber);\r\n let nonWhitespaceColumn = model.getLineFirstNonWhitespaceColumn(lineNumber);\r\n if (nonWhitespaceColumn === 0) {\r\n return true;\r\n }\r\n let tokens = model.getLineTokens(lineNumber);\r\n if (tokens.getCount() > 0) {\r\n let firstNonWhitespaceTokenIndex = tokens.findTokenIndexAtOffset(nonWhitespaceColumn);\r\n if (firstNonWhitespaceTokenIndex >= 0 && tokens.getStandardTokenType(firstNonWhitespaceTokenIndex) === 1 /* Comment */) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n dispose() {\r\n this.callOnDispose.dispose();\r\n this.callOnModel.dispose();\r\n }\r\n}\r\nAutoIndentOnPaste.ID = 'editor.contrib.autoIndentOnPaste';\r\nfunction getIndentationEditOperations(model, builder, tabSize, tabsToSpaces) {\r\n if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {\r\n // Model is empty\r\n return;\r\n }\r\n let spaces = '';\r\n for (let i = 0; i < tabSize; i++) {\r\n spaces += ' ';\r\n }\r\n let spacesRegExp = new RegExp(spaces, 'gi');\r\n for (let lineNumber = 1, lineCount = model.getLineCount(); lineNumber <= lineCount; lineNumber++) {\r\n let lastIndentationColumn = model.getLineFirstNonWhitespaceColumn(lineNumber);\r\n if (lastIndentationColumn === 0) {\r\n lastIndentationColumn = model.getLineMaxColumn(lineNumber);\r\n }\r\n if (lastIndentationColumn === 1) {\r\n continue;\r\n }\r\n const originalIndentationRange = new Range(lineNumber, 1, lineNumber, lastIndentationColumn);\r\n const originalIndentation = model.getValueInRange(originalIndentationRange);\r\n const newIndentation = (tabsToSpaces\r\n ? originalIndentation.replace(/\\t/ig, spaces)\r\n : originalIndentation.replace(spacesRegExp, '\\t'));\r\n builder.addEditOperation(originalIndentationRange, newIndentation);\r\n }\r\n}\r\nexport class IndentationToSpacesCommand {\r\n constructor(selection, tabSize) {\r\n this.selection = selection;\r\n this.tabSize = tabSize;\r\n this.selectionId = null;\r\n }\r\n getEditOperations(model, builder) {\r\n this.selectionId = builder.trackSelection(this.selection);\r\n getIndentationEditOperations(model, builder, this.tabSize, true);\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this.selectionId);\r\n }\r\n}\r\nexport class IndentationToTabsCommand {\r\n constructor(selection, tabSize) {\r\n this.selection = selection;\r\n this.tabSize = tabSize;\r\n this.selectionId = null;\r\n }\r\n getEditOperations(model, builder) {\r\n this.selectionId = builder.trackSelection(this.selection);\r\n getIndentationEditOperations(model, builder, this.tabSize, false);\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this.selectionId);\r\n }\r\n}\r\nregisterEditorContribution(AutoIndentOnPaste.ID, AutoIndentOnPaste);\r\nregisterEditorAction(IndentationToSpacesAction);\r\nregisterEditorAction(IndentationToTabsAction);\r\nregisterEditorAction(IndentUsingTabs);\r\nregisterEditorAction(IndentUsingSpaces);\r\nregisterEditorAction(DetectIndentation);\r\nregisterEditorAction(ReindentLinesAction);\r\nregisterEditorAction(ReindentSelectedLinesAction);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { RunOnceScheduler } from '../../../base/common/async.js';\r\nimport { onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport { hash } from '../../../base/common/hash.js';\r\nimport { DisposableStore, toDisposable } from '../../../base/common/lifecycle.js';\r\nimport { registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\r\nimport { InlineHintsProviderRegistry } from '../../common/modes.js';\r\nimport { flatten } from '../../../base/common/arrays.js';\r\nimport { editorInlineHintForeground, editorInlineHintBackground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { CancellationToken, CancellationTokenSource } from '../../../base/common/cancellation.js';\r\nimport { IThemeService } from '../../../platform/theme/common/themeService.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { LanguageFeatureRequestDelays } from '../../common/modes/languageFeatureRegistry.js';\r\nimport { MarkdownString } from '../../../base/common/htmlContent.js';\r\nimport { CommandsRegistry } from '../../../platform/commands/common/commands.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { assertType } from '../../../base/common/types.js';\r\nimport { ITextModelService } from '../../common/services/resolverService.js';\r\nconst MAX_DECORATORS = 500;\r\nexport function getInlineHints(model, ranges, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const datas = [];\r\n const providers = InlineHintsProviderRegistry.ordered(model).reverse();\r\n const promises = flatten(providers.map(provider => ranges.map(range => Promise.resolve(provider.provideInlineHints(model, range, token)).then(result => {\r\n if (result) {\r\n datas.push({ list: result, provider });\r\n }\r\n }, err => {\r\n onUnexpectedExternalError(err);\r\n }))));\r\n yield Promise.all(promises);\r\n return datas;\r\n });\r\n}\r\nlet InlineHintsController = class InlineHintsController {\r\n constructor(_editor, _codeEditorService, _themeService) {\r\n this._editor = _editor;\r\n this._codeEditorService = _codeEditorService;\r\n this._themeService = _themeService;\r\n // static get(editor: ICodeEditor): InlineHintsController {\r\n // \treturn editor.getContribution(this.ID);\r\n // }\r\n this._disposables = new DisposableStore();\r\n this._sessionDisposables = new DisposableStore();\r\n this._getInlineHintsDelays = new LanguageFeatureRequestDelays(InlineHintsProviderRegistry, 250, 2500);\r\n this._decorationsTypeIds = [];\r\n this._decorationIds = [];\r\n this._disposables.add(InlineHintsProviderRegistry.onDidChange(() => this._update()));\r\n this._disposables.add(_themeService.onDidColorThemeChange(() => this._update()));\r\n this._disposables.add(_editor.onDidChangeModel(() => this._update()));\r\n this._disposables.add(_editor.onDidChangeModelLanguage(() => this._update()));\r\n this._disposables.add(_editor.onDidChangeConfiguration(e => {\r\n if (e.hasChanged(120 /* inlineHints */)) {\r\n this._update();\r\n }\r\n }));\r\n this._update();\r\n }\r\n dispose() {\r\n this._sessionDisposables.dispose();\r\n this._removeAllDecorations();\r\n this._disposables.dispose();\r\n }\r\n _update() {\r\n this._sessionDisposables.clear();\r\n if (!this._editor.getOption(120 /* inlineHints */).enabled) {\r\n this._removeAllDecorations();\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n if (!model || !InlineHintsProviderRegistry.has(model)) {\r\n this._removeAllDecorations();\r\n return;\r\n }\r\n const scheduler = new RunOnceScheduler(() => __awaiter(this, void 0, void 0, function* () {\r\n const t1 = Date.now();\r\n const cts = new CancellationTokenSource();\r\n this._sessionDisposables.add(toDisposable(() => cts.dispose(true)));\r\n const visibleRanges = this._editor.getVisibleRangesPlusViewportAboveBelow();\r\n const result = yield getInlineHints(model, visibleRanges, cts.token);\r\n // update moving average\r\n const newDelay = this._getInlineHintsDelays.update(model, Date.now() - t1);\r\n scheduler.delay = newDelay;\r\n // render hints\r\n this._updateHintsDecorators(result);\r\n }), this._getInlineHintsDelays.get(model));\r\n this._sessionDisposables.add(scheduler);\r\n // update inline hints when content or scroll position changes\r\n this._sessionDisposables.add(this._editor.onDidChangeModelContent(() => scheduler.schedule()));\r\n this._disposables.add(this._editor.onDidScrollChange(() => scheduler.schedule()));\r\n scheduler.schedule();\r\n // update inline hints when any any provider fires an event\r\n const providerListener = new DisposableStore();\r\n this._sessionDisposables.add(providerListener);\r\n for (const provider of InlineHintsProviderRegistry.all(model)) {\r\n if (typeof provider.onDidChangeInlineHints === 'function') {\r\n providerListener.add(provider.onDidChangeInlineHints(() => scheduler.schedule()));\r\n }\r\n }\r\n }\r\n _updateHintsDecorators(hintsData) {\r\n const { fontSize, fontFamily } = this._getLayoutInfo();\r\n const backgroundColor = this._themeService.getColorTheme().getColor(editorInlineHintBackground);\r\n const fontColor = this._themeService.getColorTheme().getColor(editorInlineHintForeground);\r\n const newDecorationsTypeIds = [];\r\n const newDecorationsData = [];\r\n for (const { list: hints } of hintsData) {\r\n for (let j = 0; j < hints.length && newDecorationsData.length < MAX_DECORATORS; j++) {\r\n const { text, range, description: hoverMessage, whitespaceBefore, whitespaceAfter } = hints[j];\r\n const marginBefore = whitespaceBefore ? (fontSize / 3) | 0 : 0;\r\n const marginAfter = whitespaceAfter ? (fontSize / 3) | 0 : 0;\r\n const before = {\r\n contentText: text,\r\n backgroundColor: `${backgroundColor}`,\r\n color: `${fontColor}`,\r\n margin: `0px ${marginAfter}px 0px ${marginBefore}px`,\r\n fontSize: `${fontSize}px`,\r\n fontFamily: fontFamily,\r\n padding: `0px ${(fontSize / 4) | 0}px`,\r\n borderRadius: `${(fontSize / 4) | 0}px`,\r\n };\r\n const key = 'inlineHints-' + hash(before).toString(16);\r\n this._codeEditorService.registerDecorationType(key, { before }, undefined, this._editor);\r\n // decoration types are ref-counted which means we only need to\r\n // call register und remove equally often\r\n newDecorationsTypeIds.push(key);\r\n const options = this._codeEditorService.resolveDecorationOptions(key, true);\r\n if (typeof hoverMessage === 'string') {\r\n options.hoverMessage = new MarkdownString().appendText(hoverMessage);\r\n }\r\n else if (hoverMessage) {\r\n options.hoverMessage = hoverMessage;\r\n }\r\n newDecorationsData.push({\r\n range,\r\n options\r\n });\r\n }\r\n }\r\n this._decorationsTypeIds.forEach(this._codeEditorService.removeDecorationType, this._codeEditorService);\r\n this._decorationsTypeIds = newDecorationsTypeIds;\r\n this._decorationIds = this._editor.deltaDecorations(this._decorationIds, newDecorationsData);\r\n }\r\n _getLayoutInfo() {\r\n const options = this._editor.getOption(120 /* inlineHints */);\r\n const editorFontSize = this._editor.getOption(40 /* fontSize */);\r\n let fontSize = options.fontSize;\r\n if (!fontSize || fontSize < 5 || fontSize > editorFontSize) {\r\n fontSize = (editorFontSize * .9) | 0;\r\n }\r\n const fontFamily = options.fontFamily;\r\n return { fontSize, fontFamily };\r\n }\r\n _removeAllDecorations() {\r\n this._decorationIds = this._editor.deltaDecorations(this._decorationIds, []);\r\n this._decorationsTypeIds.forEach(this._codeEditorService.removeDecorationType, this._codeEditorService);\r\n this._decorationsTypeIds = [];\r\n }\r\n};\r\nInlineHintsController.ID = 'editor.contrib.InlineHints';\r\nInlineHintsController = __decorate([\r\n __param(1, ICodeEditorService),\r\n __param(2, IThemeService)\r\n], InlineHintsController);\r\nexport { InlineHintsController };\r\nregisterEditorContribution(InlineHintsController.ID, InlineHintsController);\r\nCommandsRegistry.registerCommand('_executeInlineHintProvider', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri, range] = args;\r\n assertType(URI.isUri(uri));\r\n assertType(Range.isIRange(range));\r\n const ref = yield accessor.get(ITextModelService).createModelReference(uri);\r\n try {\r\n const data = yield getInlineHints(ref.object.textEditorModel, [Range.lift(range)], CancellationToken.None);\r\n return flatten(data.map(item => item.list)).sort((a, b) => Range.compareRangesUsingStarts(a.range, b.range));\r\n }\r\n finally {\r\n ref.dispose();\r\n }\r\n}));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Selection } from '../../common/core/selection.js';\r\nexport class InPlaceReplaceCommand {\r\n constructor(editRange, originalSelection, text) {\r\n this._editRange = editRange;\r\n this._originalSelection = originalSelection;\r\n this._text = text;\r\n }\r\n getEditOperations(model, builder) {\r\n builder.addTrackedEditOperation(this._editRange, this._text);\r\n }\r\n computeCursorState(model, helper) {\r\n const inverseEditOperations = helper.getInverseEditOperations();\r\n const srcRange = inverseEditOperations[0].range;\r\n if (!this._originalSelection.isEmpty()) {\r\n // Preserve selection and extends to typed text\r\n return new Selection(srcRange.endLineNumber, srcRange.endColumn - this._text.length, srcRange.endLineNumber, srcRange.endColumn);\r\n }\r\n return new Selection(srcRange.endLineNumber, Math.min(this._originalSelection.positionColumn, srcRange.endColumn), srcRange.endLineNumber, Math.min(this._originalSelection.positionColumn, srcRange.endColumn));\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { registerEditorAction, EditorAction, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { IEditorWorkerService } from '../../common/services/editorWorkerService.js';\r\nimport { InPlaceReplaceCommand } from './inPlaceReplaceCommand.js';\r\nimport { EditorState } from '../../browser/core/editorState.js';\r\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport { editorBracketMatchBorder } from '../../common/view/editorColorRegistry.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { createCancelablePromise, timeout } from '../../../base/common/async.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nlet InPlaceReplaceController = class InPlaceReplaceController {\r\n constructor(editor, editorWorkerService) {\r\n this.decorationIds = [];\r\n this.editor = editor;\r\n this.editorWorkerService = editorWorkerService;\r\n }\r\n static get(editor) {\r\n return editor.getContribution(InPlaceReplaceController.ID);\r\n }\r\n dispose() {\r\n }\r\n run(source, up) {\r\n // cancel any pending request\r\n if (this.currentRequest) {\r\n this.currentRequest.cancel();\r\n }\r\n const editorSelection = this.editor.getSelection();\r\n const model = this.editor.getModel();\r\n if (!model || !editorSelection) {\r\n return undefined;\r\n }\r\n let selection = editorSelection;\r\n if (selection.startLineNumber !== selection.endLineNumber) {\r\n // Can't accept multiline selection\r\n return undefined;\r\n }\r\n const state = new EditorState(this.editor, 1 /* Value */ | 4 /* Position */);\r\n const modelURI = model.uri;\r\n if (!this.editorWorkerService.canNavigateValueSet(modelURI)) {\r\n return Promise.resolve(undefined);\r\n }\r\n this.currentRequest = createCancelablePromise(token => this.editorWorkerService.navigateValueSet(modelURI, selection, up));\r\n return this.currentRequest.then(result => {\r\n if (!result || !result.range || !result.value) {\r\n // No proper result\r\n return;\r\n }\r\n if (!state.validate(this.editor)) {\r\n // state has changed\r\n return;\r\n }\r\n // Selection\r\n let editRange = Range.lift(result.range);\r\n let highlightRange = result.range;\r\n let diff = result.value.length - (selection.endColumn - selection.startColumn);\r\n // highlight\r\n highlightRange = {\r\n startLineNumber: highlightRange.startLineNumber,\r\n startColumn: highlightRange.startColumn,\r\n endLineNumber: highlightRange.endLineNumber,\r\n endColumn: highlightRange.startColumn + result.value.length\r\n };\r\n if (diff > 1) {\r\n selection = new Selection(selection.startLineNumber, selection.startColumn, selection.endLineNumber, selection.endColumn + diff - 1);\r\n }\r\n // Insert new text\r\n const command = new InPlaceReplaceCommand(editRange, selection, result.value);\r\n this.editor.pushUndoStop();\r\n this.editor.executeCommand(source, command);\r\n this.editor.pushUndoStop();\r\n // add decoration\r\n this.decorationIds = this.editor.deltaDecorations(this.decorationIds, [{\r\n range: highlightRange,\r\n options: InPlaceReplaceController.DECORATION\r\n }]);\r\n // remove decoration after delay\r\n if (this.decorationRemover) {\r\n this.decorationRemover.cancel();\r\n }\r\n this.decorationRemover = timeout(350);\r\n this.decorationRemover.then(() => this.decorationIds = this.editor.deltaDecorations(this.decorationIds, [])).catch(onUnexpectedError);\r\n }).catch(onUnexpectedError);\r\n }\r\n};\r\nInPlaceReplaceController.ID = 'editor.contrib.inPlaceReplaceController';\r\nInPlaceReplaceController.DECORATION = ModelDecorationOptions.register({\r\n className: 'valueSetReplacement'\r\n});\r\nInPlaceReplaceController = __decorate([\r\n __param(1, IEditorWorkerService)\r\n], InPlaceReplaceController);\r\nclass InPlaceReplaceUp extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.inPlaceReplace.up',\r\n label: nls.localize('InPlaceReplaceAction.previous.label', \"Replace with Previous Value\"),\r\n alias: 'Replace with Previous Value',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 82 /* US_COMMA */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const controller = InPlaceReplaceController.get(editor);\r\n if (!controller) {\r\n return Promise.resolve(undefined);\r\n }\r\n return controller.run(this.id, true);\r\n }\r\n}\r\nclass InPlaceReplaceDown extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.inPlaceReplace.down',\r\n label: nls.localize('InPlaceReplaceAction.next.label', \"Replace with Next Value\"),\r\n alias: 'Replace with Next Value',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 84 /* US_DOT */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const controller = InPlaceReplaceController.get(editor);\r\n if (!controller) {\r\n return Promise.resolve(undefined);\r\n }\r\n return controller.run(this.id, false);\r\n }\r\n}\r\nregisterEditorContribution(InPlaceReplaceController.ID, InPlaceReplaceController);\r\nregisterEditorAction(InPlaceReplaceUp);\r\nregisterEditorAction(InPlaceReplaceDown);\r\nregisterThemingParticipant((theme, collector) => {\r\n const border = theme.getColor(editorBracketMatchBorder);\r\n if (border) {\r\n collector.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${border}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { EditOperation } from '../core/editOperation.js';\r\nimport { Range } from '../core/range.js';\r\nexport class TrimTrailingWhitespaceCommand {\r\n constructor(selection, cursors) {\r\n this._selection = selection;\r\n this._cursors = cursors;\r\n this._selectionId = null;\r\n }\r\n getEditOperations(model, builder) {\r\n let ops = trimTrailingWhitespace(model, this._cursors);\r\n for (let i = 0, len = ops.length; i < len; i++) {\r\n let op = ops[i];\r\n builder.addEditOperation(op.range, op.text);\r\n }\r\n this._selectionId = builder.trackSelection(this._selection);\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this._selectionId);\r\n }\r\n}\r\n/**\r\n * Generate commands for trimming trailing whitespace on a model and ignore lines on which cursors are sitting.\r\n */\r\nexport function trimTrailingWhitespace(model, cursors) {\r\n // Sort cursors ascending\r\n cursors.sort((a, b) => {\r\n if (a.lineNumber === b.lineNumber) {\r\n return a.column - b.column;\r\n }\r\n return a.lineNumber - b.lineNumber;\r\n });\r\n // Reduce multiple cursors on the same line and only keep the last one on the line\r\n for (let i = cursors.length - 2; i >= 0; i--) {\r\n if (cursors[i].lineNumber === cursors[i + 1].lineNumber) {\r\n // Remove cursor at `i`\r\n cursors.splice(i, 1);\r\n }\r\n }\r\n let r = [];\r\n let rLen = 0;\r\n let cursorIndex = 0;\r\n let cursorLen = cursors.length;\r\n for (let lineNumber = 1, lineCount = model.getLineCount(); lineNumber <= lineCount; lineNumber++) {\r\n let lineContent = model.getLineContent(lineNumber);\r\n let maxLineColumn = lineContent.length + 1;\r\n let minEditColumn = 0;\r\n if (cursorIndex < cursorLen && cursors[cursorIndex].lineNumber === lineNumber) {\r\n minEditColumn = cursors[cursorIndex].column;\r\n cursorIndex++;\r\n if (minEditColumn === maxLineColumn) {\r\n // The cursor is at the end of the line => no edits for sure on this line\r\n continue;\r\n }\r\n }\r\n if (lineContent.length === 0) {\r\n continue;\r\n }\r\n let lastNonWhitespaceIndex = strings.lastNonWhitespaceIndex(lineContent);\r\n let fromColumn = 0;\r\n if (lastNonWhitespaceIndex === -1) {\r\n // Entire line is whitespace\r\n fromColumn = 1;\r\n }\r\n else if (lastNonWhitespaceIndex !== lineContent.length - 1) {\r\n // There is trailing whitespace\r\n fromColumn = lastNonWhitespaceIndex + 2;\r\n }\r\n else {\r\n // There is no trailing whitespace\r\n continue;\r\n }\r\n fromColumn = Math.max(minEditColumn, fromColumn);\r\n r[rLen++] = EditOperation.delete(new Range(lineNumber, fromColumn, lineNumber, maxLineColumn));\r\n }\r\n return r;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nexport class CopyLinesCommand {\r\n constructor(selection, isCopyingDown, noop) {\r\n this._selection = selection;\r\n this._isCopyingDown = isCopyingDown;\r\n this._noop = noop || false;\r\n this._selectionDirection = 0 /* LTR */;\r\n this._selectionId = null;\r\n this._startLineNumberDelta = 0;\r\n this._endLineNumberDelta = 0;\r\n }\r\n getEditOperations(model, builder) {\r\n let s = this._selection;\r\n this._startLineNumberDelta = 0;\r\n this._endLineNumberDelta = 0;\r\n if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {\r\n this._endLineNumberDelta = 1;\r\n s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1));\r\n }\r\n let sourceLines = [];\r\n for (let i = s.startLineNumber; i <= s.endLineNumber; i++) {\r\n sourceLines.push(model.getLineContent(i));\r\n }\r\n const sourceText = sourceLines.join('\\n');\r\n if (sourceText === '') {\r\n // Duplicating empty line\r\n if (this._isCopyingDown) {\r\n this._startLineNumberDelta++;\r\n this._endLineNumberDelta++;\r\n }\r\n }\r\n if (this._noop) {\r\n builder.addEditOperation(new Range(s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber + 1, 1), s.endLineNumber === model.getLineCount() ? '' : '\\n');\r\n }\r\n else {\r\n if (!this._isCopyingDown) {\r\n builder.addEditOperation(new Range(s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), '\\n' + sourceText);\r\n }\r\n else {\r\n builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), sourceText + '\\n');\r\n }\r\n }\r\n this._selectionId = builder.trackSelection(s);\r\n this._selectionDirection = this._selection.getDirection();\r\n }\r\n computeCursorState(model, helper) {\r\n let result = helper.getTrackedSelection(this._selectionId);\r\n if (this._startLineNumberDelta !== 0 || this._endLineNumberDelta !== 0) {\r\n let startLineNumber = result.startLineNumber;\r\n let startColumn = result.startColumn;\r\n let endLineNumber = result.endLineNumber;\r\n let endColumn = result.endColumn;\r\n if (this._startLineNumberDelta !== 0) {\r\n startLineNumber = startLineNumber + this._startLineNumberDelta;\r\n startColumn = 1;\r\n }\r\n if (this._endLineNumberDelta !== 0) {\r\n endLineNumber = endLineNumber + this._endLineNumberDelta;\r\n endColumn = 1;\r\n }\r\n result = Selection.createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, this._selectionDirection);\r\n }\r\n return result;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { ShiftCommand } from '../../common/commands/shiftCommand.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { IndentAction } from '../../common/modes/languageConfiguration.js';\r\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry.js';\r\nimport * as indentUtils from '../indentation/indentUtils.js';\r\nexport class MoveLinesCommand {\r\n constructor(selection, isMovingDown, autoIndent) {\r\n this._selection = selection;\r\n this._isMovingDown = isMovingDown;\r\n this._autoIndent = autoIndent;\r\n this._selectionId = null;\r\n this._moveEndLineSelectionShrink = false;\r\n }\r\n getEditOperations(model, builder) {\r\n let modelLineCount = model.getLineCount();\r\n if (this._isMovingDown && this._selection.endLineNumber === modelLineCount) {\r\n this._selectionId = builder.trackSelection(this._selection);\r\n return;\r\n }\r\n if (!this._isMovingDown && this._selection.startLineNumber === 1) {\r\n this._selectionId = builder.trackSelection(this._selection);\r\n return;\r\n }\r\n this._moveEndPositionDown = false;\r\n let s = this._selection;\r\n if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {\r\n this._moveEndPositionDown = true;\r\n s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1));\r\n }\r\n const { tabSize, indentSize, insertSpaces } = model.getOptions();\r\n let indentConverter = this.buildIndentConverter(tabSize, indentSize, insertSpaces);\r\n let virtualModel = {\r\n getLineTokens: (lineNumber) => {\r\n return model.getLineTokens(lineNumber);\r\n },\r\n getLanguageIdentifier: () => {\r\n return model.getLanguageIdentifier();\r\n },\r\n getLanguageIdAtPosition: (lineNumber, column) => {\r\n return model.getLanguageIdAtPosition(lineNumber, column);\r\n },\r\n getLineContent: null,\r\n };\r\n if (s.startLineNumber === s.endLineNumber && model.getLineMaxColumn(s.startLineNumber) === 1) {\r\n // Current line is empty\r\n let lineNumber = s.startLineNumber;\r\n let otherLineNumber = (this._isMovingDown ? lineNumber + 1 : lineNumber - 1);\r\n if (model.getLineMaxColumn(otherLineNumber) === 1) {\r\n // Other line number is empty too, so no editing is needed\r\n // Add a no-op to force running by the model\r\n builder.addEditOperation(new Range(1, 1, 1, 1), null);\r\n }\r\n else {\r\n // Type content from other line number on line number\r\n builder.addEditOperation(new Range(lineNumber, 1, lineNumber, 1), model.getLineContent(otherLineNumber));\r\n // Remove content from other line number\r\n builder.addEditOperation(new Range(otherLineNumber, 1, otherLineNumber, model.getLineMaxColumn(otherLineNumber)), null);\r\n }\r\n // Track selection at the other line number\r\n s = new Selection(otherLineNumber, 1, otherLineNumber, 1);\r\n }\r\n else {\r\n let movingLineNumber;\r\n let movingLineText;\r\n if (this._isMovingDown) {\r\n movingLineNumber = s.endLineNumber + 1;\r\n movingLineText = model.getLineContent(movingLineNumber);\r\n // Delete line that needs to be moved\r\n builder.addEditOperation(new Range(movingLineNumber - 1, model.getLineMaxColumn(movingLineNumber - 1), movingLineNumber, model.getLineMaxColumn(movingLineNumber)), null);\r\n let insertingText = movingLineText;\r\n if (this.shouldAutoIndent(model, s)) {\r\n let movingLineMatchResult = this.matchEnterRule(model, indentConverter, tabSize, movingLineNumber, s.startLineNumber - 1);\r\n // if s.startLineNumber - 1 matches onEnter rule, we still honor that.\r\n if (movingLineMatchResult !== null) {\r\n let oldIndentation = strings.getLeadingWhitespace(model.getLineContent(movingLineNumber));\r\n let newSpaceCnt = movingLineMatchResult + indentUtils.getSpaceCnt(oldIndentation, tabSize);\r\n let newIndentation = indentUtils.generateIndent(newSpaceCnt, tabSize, insertSpaces);\r\n insertingText = newIndentation + this.trimLeft(movingLineText);\r\n }\r\n else {\r\n // no enter rule matches, let's check indentatin rules then.\r\n virtualModel.getLineContent = (lineNumber) => {\r\n if (lineNumber === s.startLineNumber) {\r\n return model.getLineContent(movingLineNumber);\r\n }\r\n else {\r\n return model.getLineContent(lineNumber);\r\n }\r\n };\r\n let indentOfMovingLine = LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent, virtualModel, model.getLanguageIdAtPosition(movingLineNumber, 1), s.startLineNumber, indentConverter);\r\n if (indentOfMovingLine !== null) {\r\n let oldIndentation = strings.getLeadingWhitespace(model.getLineContent(movingLineNumber));\r\n let newSpaceCnt = indentUtils.getSpaceCnt(indentOfMovingLine, tabSize);\r\n let oldSpaceCnt = indentUtils.getSpaceCnt(oldIndentation, tabSize);\r\n if (newSpaceCnt !== oldSpaceCnt) {\r\n let newIndentation = indentUtils.generateIndent(newSpaceCnt, tabSize, insertSpaces);\r\n insertingText = newIndentation + this.trimLeft(movingLineText);\r\n }\r\n }\r\n }\r\n // add edit operations for moving line first to make sure it's executed after we make indentation change\r\n // to s.startLineNumber\r\n builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), insertingText + '\\n');\r\n let ret = this.matchEnterRuleMovingDown(model, indentConverter, tabSize, s.startLineNumber, movingLineNumber, insertingText);\r\n // check if the line being moved before matches onEnter rules, if so let's adjust the indentation by onEnter rules.\r\n if (ret !== null) {\r\n if (ret !== 0) {\r\n this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, ret);\r\n }\r\n }\r\n else {\r\n // it doesn't match onEnter rules, let's check indentation rules then.\r\n virtualModel.getLineContent = (lineNumber) => {\r\n if (lineNumber === s.startLineNumber) {\r\n return insertingText;\r\n }\r\n else if (lineNumber >= s.startLineNumber + 1 && lineNumber <= s.endLineNumber + 1) {\r\n return model.getLineContent(lineNumber - 1);\r\n }\r\n else {\r\n return model.getLineContent(lineNumber);\r\n }\r\n };\r\n let newIndentatOfMovingBlock = LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent, virtualModel, model.getLanguageIdAtPosition(movingLineNumber, 1), s.startLineNumber + 1, indentConverter);\r\n if (newIndentatOfMovingBlock !== null) {\r\n const oldIndentation = strings.getLeadingWhitespace(model.getLineContent(s.startLineNumber));\r\n const newSpaceCnt = indentUtils.getSpaceCnt(newIndentatOfMovingBlock, tabSize);\r\n const oldSpaceCnt = indentUtils.getSpaceCnt(oldIndentation, tabSize);\r\n if (newSpaceCnt !== oldSpaceCnt) {\r\n const spaceCntOffset = newSpaceCnt - oldSpaceCnt;\r\n this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, spaceCntOffset);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n // Insert line that needs to be moved before\r\n builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), insertingText + '\\n');\r\n }\r\n }\r\n else {\r\n movingLineNumber = s.startLineNumber - 1;\r\n movingLineText = model.getLineContent(movingLineNumber);\r\n // Delete line that needs to be moved\r\n builder.addEditOperation(new Range(movingLineNumber, 1, movingLineNumber + 1, 1), null);\r\n // Insert line that needs to be moved after\r\n builder.addEditOperation(new Range(s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), '\\n' + movingLineText);\r\n if (this.shouldAutoIndent(model, s)) {\r\n virtualModel.getLineContent = (lineNumber) => {\r\n if (lineNumber === movingLineNumber) {\r\n return model.getLineContent(s.startLineNumber);\r\n }\r\n else {\r\n return model.getLineContent(lineNumber);\r\n }\r\n };\r\n let ret = this.matchEnterRule(model, indentConverter, tabSize, s.startLineNumber, s.startLineNumber - 2);\r\n // check if s.startLineNumber - 2 matches onEnter rules, if so adjust the moving block by onEnter rules.\r\n if (ret !== null) {\r\n if (ret !== 0) {\r\n this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, ret);\r\n }\r\n }\r\n else {\r\n // it doesn't match any onEnter rule, let's check indentation rules then.\r\n let indentOfFirstLine = LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent, virtualModel, model.getLanguageIdAtPosition(s.startLineNumber, 1), movingLineNumber, indentConverter);\r\n if (indentOfFirstLine !== null) {\r\n // adjust the indentation of the moving block\r\n let oldIndent = strings.getLeadingWhitespace(model.getLineContent(s.startLineNumber));\r\n let newSpaceCnt = indentUtils.getSpaceCnt(indentOfFirstLine, tabSize);\r\n let oldSpaceCnt = indentUtils.getSpaceCnt(oldIndent, tabSize);\r\n if (newSpaceCnt !== oldSpaceCnt) {\r\n let spaceCntOffset = newSpaceCnt - oldSpaceCnt;\r\n this.getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, spaceCntOffset);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n this._selectionId = builder.trackSelection(s);\r\n }\r\n buildIndentConverter(tabSize, indentSize, insertSpaces) {\r\n return {\r\n shiftIndent: (indentation) => {\r\n return ShiftCommand.shiftIndent(indentation, indentation.length + 1, tabSize, indentSize, insertSpaces);\r\n },\r\n unshiftIndent: (indentation) => {\r\n return ShiftCommand.unshiftIndent(indentation, indentation.length + 1, tabSize, indentSize, insertSpaces);\r\n }\r\n };\r\n }\r\n parseEnterResult(model, indentConverter, tabSize, line, enter) {\r\n if (enter) {\r\n let enterPrefix = enter.indentation;\r\n if (enter.indentAction === IndentAction.None) {\r\n enterPrefix = enter.indentation + enter.appendText;\r\n }\r\n else if (enter.indentAction === IndentAction.Indent) {\r\n enterPrefix = enter.indentation + enter.appendText;\r\n }\r\n else if (enter.indentAction === IndentAction.IndentOutdent) {\r\n enterPrefix = enter.indentation;\r\n }\r\n else if (enter.indentAction === IndentAction.Outdent) {\r\n enterPrefix = indentConverter.unshiftIndent(enter.indentation) + enter.appendText;\r\n }\r\n let movingLineText = model.getLineContent(line);\r\n if (this.trimLeft(movingLineText).indexOf(this.trimLeft(enterPrefix)) >= 0) {\r\n let oldIndentation = strings.getLeadingWhitespace(model.getLineContent(line));\r\n let newIndentation = strings.getLeadingWhitespace(enterPrefix);\r\n let indentMetadataOfMovelingLine = LanguageConfigurationRegistry.getIndentMetadata(model, line);\r\n if (indentMetadataOfMovelingLine !== null && indentMetadataOfMovelingLine & 2 /* DECREASE_MASK */) {\r\n newIndentation = indentConverter.unshiftIndent(newIndentation);\r\n }\r\n let newSpaceCnt = indentUtils.getSpaceCnt(newIndentation, tabSize);\r\n let oldSpaceCnt = indentUtils.getSpaceCnt(oldIndentation, tabSize);\r\n return newSpaceCnt - oldSpaceCnt;\r\n }\r\n }\r\n return null;\r\n }\r\n /**\r\n *\r\n * @param model\r\n * @param indentConverter\r\n * @param tabSize\r\n * @param line the line moving down\r\n * @param futureAboveLineNumber the line which will be at the `line` position\r\n * @param futureAboveLineText\r\n */\r\n matchEnterRuleMovingDown(model, indentConverter, tabSize, line, futureAboveLineNumber, futureAboveLineText) {\r\n if (strings.lastNonWhitespaceIndex(futureAboveLineText) >= 0) {\r\n // break\r\n let maxColumn = model.getLineMaxColumn(futureAboveLineNumber);\r\n let enter = LanguageConfigurationRegistry.getEnterAction(this._autoIndent, model, new Range(futureAboveLineNumber, maxColumn, futureAboveLineNumber, maxColumn));\r\n return this.parseEnterResult(model, indentConverter, tabSize, line, enter);\r\n }\r\n else {\r\n // go upwards, starting from `line - 1`\r\n let validPrecedingLine = line - 1;\r\n while (validPrecedingLine >= 1) {\r\n let lineContent = model.getLineContent(validPrecedingLine);\r\n let nonWhitespaceIdx = strings.lastNonWhitespaceIndex(lineContent);\r\n if (nonWhitespaceIdx >= 0) {\r\n break;\r\n }\r\n validPrecedingLine--;\r\n }\r\n if (validPrecedingLine < 1 || line > model.getLineCount()) {\r\n return null;\r\n }\r\n let maxColumn = model.getLineMaxColumn(validPrecedingLine);\r\n let enter = LanguageConfigurationRegistry.getEnterAction(this._autoIndent, model, new Range(validPrecedingLine, maxColumn, validPrecedingLine, maxColumn));\r\n return this.parseEnterResult(model, indentConverter, tabSize, line, enter);\r\n }\r\n }\r\n matchEnterRule(model, indentConverter, tabSize, line, oneLineAbove, previousLineText) {\r\n let validPrecedingLine = oneLineAbove;\r\n while (validPrecedingLine >= 1) {\r\n // ship empty lines as empty lines just inherit indentation\r\n let lineContent;\r\n if (validPrecedingLine === oneLineAbove && previousLineText !== undefined) {\r\n lineContent = previousLineText;\r\n }\r\n else {\r\n lineContent = model.getLineContent(validPrecedingLine);\r\n }\r\n let nonWhitespaceIdx = strings.lastNonWhitespaceIndex(lineContent);\r\n if (nonWhitespaceIdx >= 0) {\r\n break;\r\n }\r\n validPrecedingLine--;\r\n }\r\n if (validPrecedingLine < 1 || line > model.getLineCount()) {\r\n return null;\r\n }\r\n let maxColumn = model.getLineMaxColumn(validPrecedingLine);\r\n let enter = LanguageConfigurationRegistry.getEnterAction(this._autoIndent, model, new Range(validPrecedingLine, maxColumn, validPrecedingLine, maxColumn));\r\n return this.parseEnterResult(model, indentConverter, tabSize, line, enter);\r\n }\r\n trimLeft(str) {\r\n return str.replace(/^\\s+/, '');\r\n }\r\n shouldAutoIndent(model, selection) {\r\n if (this._autoIndent < 4 /* Full */) {\r\n return false;\r\n }\r\n // if it's not easy to tokenize, we stop auto indent.\r\n if (!model.isCheapToTokenize(selection.startLineNumber)) {\r\n return false;\r\n }\r\n let languageAtSelectionStart = model.getLanguageIdAtPosition(selection.startLineNumber, 1);\r\n let languageAtSelectionEnd = model.getLanguageIdAtPosition(selection.endLineNumber, 1);\r\n if (languageAtSelectionStart !== languageAtSelectionEnd) {\r\n return false;\r\n }\r\n if (LanguageConfigurationRegistry.getIndentRulesSupport(languageAtSelectionStart) === null) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n getIndentEditsOfMovingBlock(model, builder, s, tabSize, insertSpaces, offset) {\r\n for (let i = s.startLineNumber; i <= s.endLineNumber; i++) {\r\n let lineContent = model.getLineContent(i);\r\n let originalIndent = strings.getLeadingWhitespace(lineContent);\r\n let originalSpacesCnt = indentUtils.getSpaceCnt(originalIndent, tabSize);\r\n let newSpacesCnt = originalSpacesCnt + offset;\r\n let newIndent = indentUtils.generateIndent(newSpacesCnt, tabSize, insertSpaces);\r\n if (newIndent !== originalIndent) {\r\n builder.addEditOperation(new Range(i, 1, i, originalIndent.length + 1), newIndent);\r\n if (i === s.endLineNumber && s.endColumn <= originalIndent.length + 1 && newIndent === '') {\r\n // as users select part of the original indent white spaces\r\n // when we adjust the indentation of endLine, we should adjust the cursor position as well.\r\n this._moveEndLineSelectionShrink = true;\r\n }\r\n }\r\n }\r\n }\r\n computeCursorState(model, helper) {\r\n let result = helper.getTrackedSelection(this._selectionId);\r\n if (this._moveEndPositionDown) {\r\n result = result.setEndPosition(result.endLineNumber + 1, 1);\r\n }\r\n if (this._moveEndLineSelectionShrink && result.startLineNumber < result.endLineNumber) {\r\n result = result.setEndPosition(result.endLineNumber, 2);\r\n }\r\n return result;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { EditOperation } from '../../common/core/editOperation.js';\r\nimport { Range } from '../../common/core/range.js';\r\nexport class SortLinesCommand {\r\n constructor(selection, descending) {\r\n this.selection = selection;\r\n this.descending = descending;\r\n this.selectionId = null;\r\n }\r\n static getCollator() {\r\n if (!SortLinesCommand._COLLATOR) {\r\n SortLinesCommand._COLLATOR = new Intl.Collator();\r\n }\r\n return SortLinesCommand._COLLATOR;\r\n }\r\n getEditOperations(model, builder) {\r\n let op = sortLines(model, this.selection, this.descending);\r\n if (op) {\r\n builder.addEditOperation(op.range, op.text);\r\n }\r\n this.selectionId = builder.trackSelection(this.selection);\r\n }\r\n computeCursorState(model, helper) {\r\n return helper.getTrackedSelection(this.selectionId);\r\n }\r\n static canRun(model, selection, descending) {\r\n if (model === null) {\r\n return false;\r\n }\r\n let data = getSortData(model, selection, descending);\r\n if (!data) {\r\n return false;\r\n }\r\n for (let i = 0, len = data.before.length; i < len; i++) {\r\n if (data.before[i] !== data.after[i]) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nSortLinesCommand._COLLATOR = null;\r\nfunction getSortData(model, selection, descending) {\r\n let startLineNumber = selection.startLineNumber;\r\n let endLineNumber = selection.endLineNumber;\r\n if (selection.endColumn === 1) {\r\n endLineNumber--;\r\n }\r\n // Nothing to sort if user didn't select anything.\r\n if (startLineNumber >= endLineNumber) {\r\n return null;\r\n }\r\n let linesToSort = [];\r\n // Get the contents of the selection to be sorted.\r\n for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {\r\n linesToSort.push(model.getLineContent(lineNumber));\r\n }\r\n let sorted = linesToSort.slice(0);\r\n sorted.sort(SortLinesCommand.getCollator().compare);\r\n // If descending, reverse the order.\r\n if (descending === true) {\r\n sorted = sorted.reverse();\r\n }\r\n return {\r\n startLineNumber: startLineNumber,\r\n endLineNumber: endLineNumber,\r\n before: linesToSort,\r\n after: sorted\r\n };\r\n}\r\n/**\r\n * Generate commands for sorting lines on a model.\r\n */\r\nfunction sortLines(model, selection, descending) {\r\n let data = getSortData(model, selection, descending);\r\n if (!data) {\r\n return null;\r\n }\r\n return EditOperation.replace(new Range(data.startLineNumber, 1, data.endLineNumber, model.getLineMaxColumn(data.endLineNumber)), data.after.join('\\n'));\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../../nls.js';\r\nimport { KeyChord } from '../../../base/common/keyCodes.js';\r\nimport { CoreEditingCommands } from '../../browser/controller/coreCommands.js';\r\nimport { EditorAction, registerEditorAction } from '../../browser/editorExtensions.js';\r\nimport { ReplaceCommand, ReplaceCommandThatPreservesSelection, ReplaceCommandThatSelectsText } from '../../common/commands/replaceCommand.js';\r\nimport { TrimTrailingWhitespaceCommand } from '../../common/commands/trimTrailingWhitespaceCommand.js';\r\nimport { TypeOperations } from '../../common/controller/cursorTypeOperations.js';\r\nimport { EditOperation } from '../../common/core/editOperation.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { CopyLinesCommand } from './copyLinesCommand.js';\r\nimport { MoveLinesCommand } from './moveLinesCommand.js';\r\nimport { SortLinesCommand } from './sortLinesCommand.js';\r\nimport { MenuId } from '../../../platform/actions/common/actions.js';\r\n// copy lines\r\nclass AbstractCopyLinesAction extends EditorAction {\r\n constructor(down, opts) {\r\n super(opts);\r\n this.down = down;\r\n }\r\n run(_accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const selections = editor.getSelections().map((selection, index) => ({ selection, index, ignore: false }));\r\n selections.sort((a, b) => Range.compareRangesUsingStarts(a.selection, b.selection));\r\n // Remove selections that would result in copying the same line\r\n let prev = selections[0];\r\n for (let i = 1; i < selections.length; i++) {\r\n const curr = selections[i];\r\n if (prev.selection.endLineNumber === curr.selection.startLineNumber) {\r\n // these two selections would copy the same line\r\n if (prev.index < curr.index) {\r\n // prev wins\r\n curr.ignore = true;\r\n }\r\n else {\r\n // curr wins\r\n prev.ignore = true;\r\n prev = curr;\r\n }\r\n }\r\n }\r\n const commands = [];\r\n for (const selection of selections) {\r\n commands.push(new CopyLinesCommand(selection.selection, this.down, selection.ignore));\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass CopyLinesUpAction extends AbstractCopyLinesAction {\r\n constructor() {\r\n super(false, {\r\n id: 'editor.action.copyLinesUpAction',\r\n label: nls.localize('lines.copyUp', \"Copy Line Up\"),\r\n alias: 'Copy Line Up',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 512 /* Alt */ | 1024 /* Shift */ | 16 /* UpArrow */,\r\n linux: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 1024 /* Shift */ | 16 /* UpArrow */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '2_line',\r\n title: nls.localize({ key: 'miCopyLinesUp', comment: ['&& denotes a mnemonic'] }, \"&&Copy Line Up\"),\r\n order: 1\r\n }\r\n });\r\n }\r\n}\r\nclass CopyLinesDownAction extends AbstractCopyLinesAction {\r\n constructor() {\r\n super(true, {\r\n id: 'editor.action.copyLinesDownAction',\r\n label: nls.localize('lines.copyDown', \"Copy Line Down\"),\r\n alias: 'Copy Line Down',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 512 /* Alt */ | 1024 /* Shift */ | 18 /* DownArrow */,\r\n linux: { primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 1024 /* Shift */ | 18 /* DownArrow */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '2_line',\r\n title: nls.localize({ key: 'miCopyLinesDown', comment: ['&& denotes a mnemonic'] }, \"Co&&py Line Down\"),\r\n order: 2\r\n }\r\n });\r\n }\r\n}\r\nexport class DuplicateSelectionAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.duplicateSelection',\r\n label: nls.localize('duplicateSelection', \"Duplicate Selection\"),\r\n alias: 'Duplicate Selection',\r\n precondition: EditorContextKeys.writable,\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '2_line',\r\n title: nls.localize({ key: 'miDuplicateSelection', comment: ['&& denotes a mnemonic'] }, \"&&Duplicate Selection\"),\r\n order: 5\r\n }\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const commands = [];\r\n const selections = editor.getSelections();\r\n const model = editor.getModel();\r\n for (const selection of selections) {\r\n if (selection.isEmpty()) {\r\n commands.push(new CopyLinesCommand(selection, true));\r\n }\r\n else {\r\n const insertSelection = new Selection(selection.endLineNumber, selection.endColumn, selection.endLineNumber, selection.endColumn);\r\n commands.push(new ReplaceCommandThatSelectsText(insertSelection, model.getValueInRange(selection)));\r\n }\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\n// move lines\r\nclass AbstractMoveLinesAction extends EditorAction {\r\n constructor(down, opts) {\r\n super(opts);\r\n this.down = down;\r\n }\r\n run(_accessor, editor) {\r\n let commands = [];\r\n let selections = editor.getSelections() || [];\r\n const autoIndent = editor.getOption(8 /* autoIndent */);\r\n for (const selection of selections) {\r\n commands.push(new MoveLinesCommand(selection, this.down, autoIndent));\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass MoveLinesUpAction extends AbstractMoveLinesAction {\r\n constructor() {\r\n super(false, {\r\n id: 'editor.action.moveLinesUpAction',\r\n label: nls.localize('lines.moveUp', \"Move Line Up\"),\r\n alias: 'Move Line Up',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 512 /* Alt */ | 16 /* UpArrow */,\r\n linux: { primary: 512 /* Alt */ | 16 /* UpArrow */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '2_line',\r\n title: nls.localize({ key: 'miMoveLinesUp', comment: ['&& denotes a mnemonic'] }, \"Mo&&ve Line Up\"),\r\n order: 3\r\n }\r\n });\r\n }\r\n}\r\nclass MoveLinesDownAction extends AbstractMoveLinesAction {\r\n constructor() {\r\n super(true, {\r\n id: 'editor.action.moveLinesDownAction',\r\n label: nls.localize('lines.moveDown', \"Move Line Down\"),\r\n alias: 'Move Line Down',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 512 /* Alt */ | 18 /* DownArrow */,\r\n linux: { primary: 512 /* Alt */ | 18 /* DownArrow */ },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '2_line',\r\n title: nls.localize({ key: 'miMoveLinesDown', comment: ['&& denotes a mnemonic'] }, \"Move &&Line Down\"),\r\n order: 4\r\n }\r\n });\r\n }\r\n}\r\nexport class AbstractSortLinesAction extends EditorAction {\r\n constructor(descending, opts) {\r\n super(opts);\r\n this.descending = descending;\r\n }\r\n run(_accessor, editor) {\r\n const selections = editor.getSelections() || [];\r\n for (const selection of selections) {\r\n if (!SortLinesCommand.canRun(editor.getModel(), selection, this.descending)) {\r\n return;\r\n }\r\n }\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n commands[i] = new SortLinesCommand(selections[i], this.descending);\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nexport class SortLinesAscendingAction extends AbstractSortLinesAction {\r\n constructor() {\r\n super(false, {\r\n id: 'editor.action.sortLinesAscending',\r\n label: nls.localize('lines.sortAscending', \"Sort Lines Ascending\"),\r\n alias: 'Sort Lines Ascending',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nexport class SortLinesDescendingAction extends AbstractSortLinesAction {\r\n constructor() {\r\n super(true, {\r\n id: 'editor.action.sortLinesDescending',\r\n label: nls.localize('lines.sortDescending', \"Sort Lines Descending\"),\r\n alias: 'Sort Lines Descending',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nexport class TrimTrailingWhitespaceAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: TrimTrailingWhitespaceAction.ID,\r\n label: nls.localize('lines.trimTrailingWhitespace', \"Trim Trailing Whitespace\"),\r\n alias: 'Trim Trailing Whitespace',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 54 /* KEY_X */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor, args) {\r\n let cursors = [];\r\n if (args.reason === 'auto-save') {\r\n // See https://github.com/editorconfig/editorconfig-vscode/issues/47\r\n // It is very convenient for the editor config extension to invoke this action.\r\n // So, if we get a reason:'auto-save' passed in, let's preserve cursor positions.\r\n cursors = (editor.getSelections() || []).map(s => new Position(s.positionLineNumber, s.positionColumn));\r\n }\r\n let selection = editor.getSelection();\r\n if (selection === null) {\r\n return;\r\n }\r\n let command = new TrimTrailingWhitespaceCommand(selection, cursors);\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, [command]);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nTrimTrailingWhitespaceAction.ID = 'editor.action.trimTrailingWhitespace';\r\nexport class DeleteLinesAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.deleteLines',\r\n label: nls.localize('lines.delete', \"Delete Line\"),\r\n alias: 'Delete Line',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 41 /* KEY_K */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n let ops = this._getLinesToRemove(editor);\r\n let model = editor.getModel();\r\n if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {\r\n // Model is empty\r\n return;\r\n }\r\n let linesDeleted = 0;\r\n let edits = [];\r\n let cursorState = [];\r\n for (let i = 0, len = ops.length; i < len; i++) {\r\n const op = ops[i];\r\n let startLineNumber = op.startLineNumber;\r\n let endLineNumber = op.endLineNumber;\r\n let startColumn = 1;\r\n let endColumn = model.getLineMaxColumn(endLineNumber);\r\n if (endLineNumber < model.getLineCount()) {\r\n endLineNumber += 1;\r\n endColumn = 1;\r\n }\r\n else if (startLineNumber > 1) {\r\n startLineNumber -= 1;\r\n startColumn = model.getLineMaxColumn(startLineNumber);\r\n }\r\n edits.push(EditOperation.replace(new Selection(startLineNumber, startColumn, endLineNumber, endColumn), ''));\r\n cursorState.push(new Selection(startLineNumber - linesDeleted, op.positionColumn, startLineNumber - linesDeleted, op.positionColumn));\r\n linesDeleted += (op.endLineNumber - op.startLineNumber + 1);\r\n }\r\n editor.pushUndoStop();\r\n editor.executeEdits(this.id, edits, cursorState);\r\n editor.pushUndoStop();\r\n }\r\n _getLinesToRemove(editor) {\r\n // Construct delete operations\r\n let operations = editor.getSelections().map((s) => {\r\n let endLineNumber = s.endLineNumber;\r\n if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {\r\n endLineNumber -= 1;\r\n }\r\n return {\r\n startLineNumber: s.startLineNumber,\r\n selectionStartColumn: s.selectionStartColumn,\r\n endLineNumber: endLineNumber,\r\n positionColumn: s.positionColumn\r\n };\r\n });\r\n // Sort delete operations\r\n operations.sort((a, b) => {\r\n if (a.startLineNumber === b.startLineNumber) {\r\n return a.endLineNumber - b.endLineNumber;\r\n }\r\n return a.startLineNumber - b.startLineNumber;\r\n });\r\n // Merge delete operations which are adjacent or overlapping\r\n let mergedOperations = [];\r\n let previousOperation = operations[0];\r\n for (let i = 1; i < operations.length; i++) {\r\n if (previousOperation.endLineNumber + 1 >= operations[i].startLineNumber) {\r\n // Merge current operations into the previous one\r\n previousOperation.endLineNumber = operations[i].endLineNumber;\r\n }\r\n else {\r\n // Push previous operation\r\n mergedOperations.push(previousOperation);\r\n previousOperation = operations[i];\r\n }\r\n }\r\n // Push the last operation\r\n mergedOperations.push(previousOperation);\r\n return mergedOperations;\r\n }\r\n}\r\nexport class IndentLinesAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.indentLines',\r\n label: nls.localize('lines.indent', \"Indent Line\"),\r\n alias: 'Indent Line',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 89 /* US_CLOSE_SQUARE_BRACKET */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n const viewModel = editor._getViewModel();\r\n if (!viewModel) {\r\n return;\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, TypeOperations.indent(viewModel.cursorConfig, editor.getModel(), editor.getSelections()));\r\n editor.pushUndoStop();\r\n }\r\n}\r\nclass OutdentLinesAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.outdentLines',\r\n label: nls.localize('lines.outdent', \"Outdent Line\"),\r\n alias: 'Outdent Line',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 87 /* US_OPEN_SQUARE_BRACKET */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n CoreEditingCommands.Outdent.runEditorCommand(_accessor, editor, null);\r\n }\r\n}\r\nexport class InsertLineBeforeAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.insertLineBefore',\r\n label: nls.localize('lines.insertBefore', \"Insert Line Above\"),\r\n alias: 'Insert Line Above',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 3 /* Enter */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n const viewModel = editor._getViewModel();\r\n if (!viewModel) {\r\n return;\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, TypeOperations.lineInsertBefore(viewModel.cursorConfig, editor.getModel(), editor.getSelections()));\r\n }\r\n}\r\nexport class InsertLineAfterAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.insertLineAfter',\r\n label: nls.localize('lines.insertAfter', \"Insert Line Below\"),\r\n alias: 'Insert Line Below',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 3 /* Enter */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n const viewModel = editor._getViewModel();\r\n if (!viewModel) {\r\n return;\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, TypeOperations.lineInsertAfter(viewModel.cursorConfig, editor.getModel(), editor.getSelections()));\r\n }\r\n}\r\nexport class AbstractDeleteAllToBoundaryAction extends EditorAction {\r\n run(_accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const primaryCursor = editor.getSelection();\r\n let rangesToDelete = this._getRangesToDelete(editor);\r\n // merge overlapping selections\r\n let effectiveRanges = [];\r\n for (let i = 0, count = rangesToDelete.length - 1; i < count; i++) {\r\n let range = rangesToDelete[i];\r\n let nextRange = rangesToDelete[i + 1];\r\n if (Range.intersectRanges(range, nextRange) === null) {\r\n effectiveRanges.push(range);\r\n }\r\n else {\r\n rangesToDelete[i + 1] = Range.plusRange(range, nextRange);\r\n }\r\n }\r\n effectiveRanges.push(rangesToDelete[rangesToDelete.length - 1]);\r\n let endCursorState = this._getEndCursorState(primaryCursor, effectiveRanges);\r\n let edits = effectiveRanges.map(range => {\r\n return EditOperation.replace(range, '');\r\n });\r\n editor.pushUndoStop();\r\n editor.executeEdits(this.id, edits, endCursorState);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nexport class DeleteAllLeftAction extends AbstractDeleteAllToBoundaryAction {\r\n constructor() {\r\n super({\r\n id: 'deleteAllLeft',\r\n label: nls.localize('lines.deleteAllLeft', \"Delete All Left\"),\r\n alias: 'Delete All Left',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 2048 /* CtrlCmd */ | 1 /* Backspace */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _getEndCursorState(primaryCursor, rangesToDelete) {\r\n let endPrimaryCursor = null;\r\n let endCursorState = [];\r\n let deletedLines = 0;\r\n rangesToDelete.forEach(range => {\r\n let endCursor;\r\n if (range.endColumn === 1 && deletedLines > 0) {\r\n let newStartLine = range.startLineNumber - deletedLines;\r\n endCursor = new Selection(newStartLine, range.startColumn, newStartLine, range.startColumn);\r\n }\r\n else {\r\n endCursor = new Selection(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn);\r\n }\r\n deletedLines += range.endLineNumber - range.startLineNumber;\r\n if (range.intersectRanges(primaryCursor)) {\r\n endPrimaryCursor = endCursor;\r\n }\r\n else {\r\n endCursorState.push(endCursor);\r\n }\r\n });\r\n if (endPrimaryCursor) {\r\n endCursorState.unshift(endPrimaryCursor);\r\n }\r\n return endCursorState;\r\n }\r\n _getRangesToDelete(editor) {\r\n let selections = editor.getSelections();\r\n if (selections === null) {\r\n return [];\r\n }\r\n let rangesToDelete = selections;\r\n let model = editor.getModel();\r\n if (model === null) {\r\n return [];\r\n }\r\n rangesToDelete.sort(Range.compareRangesUsingStarts);\r\n rangesToDelete = rangesToDelete.map(selection => {\r\n if (selection.isEmpty()) {\r\n if (selection.startColumn === 1) {\r\n let deleteFromLine = Math.max(1, selection.startLineNumber - 1);\r\n let deleteFromColumn = selection.startLineNumber === 1 ? 1 : model.getLineContent(deleteFromLine).length + 1;\r\n return new Range(deleteFromLine, deleteFromColumn, selection.startLineNumber, 1);\r\n }\r\n else {\r\n return new Range(selection.startLineNumber, 1, selection.startLineNumber, selection.startColumn);\r\n }\r\n }\r\n else {\r\n return new Range(selection.startLineNumber, 1, selection.endLineNumber, selection.endColumn);\r\n }\r\n });\r\n return rangesToDelete;\r\n }\r\n}\r\nexport class DeleteAllRightAction extends AbstractDeleteAllToBoundaryAction {\r\n constructor() {\r\n super({\r\n id: 'deleteAllRight',\r\n label: nls.localize('lines.deleteAllRight', \"Delete All Right\"),\r\n alias: 'Delete All Right',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 41 /* KEY_K */, secondary: [2048 /* CtrlCmd */ | 20 /* Delete */] },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _getEndCursorState(primaryCursor, rangesToDelete) {\r\n let endPrimaryCursor = null;\r\n let endCursorState = [];\r\n for (let i = 0, len = rangesToDelete.length, offset = 0; i < len; i++) {\r\n let range = rangesToDelete[i];\r\n let endCursor = new Selection(range.startLineNumber - offset, range.startColumn, range.startLineNumber - offset, range.startColumn);\r\n if (range.intersectRanges(primaryCursor)) {\r\n endPrimaryCursor = endCursor;\r\n }\r\n else {\r\n endCursorState.push(endCursor);\r\n }\r\n }\r\n if (endPrimaryCursor) {\r\n endCursorState.unshift(endPrimaryCursor);\r\n }\r\n return endCursorState;\r\n }\r\n _getRangesToDelete(editor) {\r\n let model = editor.getModel();\r\n if (model === null) {\r\n return [];\r\n }\r\n let selections = editor.getSelections();\r\n if (selections === null) {\r\n return [];\r\n }\r\n let rangesToDelete = selections.map((sel) => {\r\n if (sel.isEmpty()) {\r\n const maxColumn = model.getLineMaxColumn(sel.startLineNumber);\r\n if (sel.startColumn === maxColumn) {\r\n return new Range(sel.startLineNumber, sel.startColumn, sel.startLineNumber + 1, 1);\r\n }\r\n else {\r\n return new Range(sel.startLineNumber, sel.startColumn, sel.startLineNumber, maxColumn);\r\n }\r\n }\r\n return sel;\r\n });\r\n rangesToDelete.sort(Range.compareRangesUsingStarts);\r\n return rangesToDelete;\r\n }\r\n}\r\nexport class JoinLinesAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.joinLines',\r\n label: nls.localize('lines.joinLines', \"Join Lines\"),\r\n alias: 'Join Lines',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 40 /* KEY_J */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(_accessor, editor) {\r\n let selections = editor.getSelections();\r\n if (selections === null) {\r\n return;\r\n }\r\n let primaryCursor = editor.getSelection();\r\n if (primaryCursor === null) {\r\n return;\r\n }\r\n selections.sort(Range.compareRangesUsingStarts);\r\n let reducedSelections = [];\r\n let lastSelection = selections.reduce((previousValue, currentValue) => {\r\n if (previousValue.isEmpty()) {\r\n if (previousValue.endLineNumber === currentValue.startLineNumber) {\r\n if (primaryCursor.equalsSelection(previousValue)) {\r\n primaryCursor = currentValue;\r\n }\r\n return currentValue;\r\n }\r\n if (currentValue.startLineNumber > previousValue.endLineNumber + 1) {\r\n reducedSelections.push(previousValue);\r\n return currentValue;\r\n }\r\n else {\r\n return new Selection(previousValue.startLineNumber, previousValue.startColumn, currentValue.endLineNumber, currentValue.endColumn);\r\n }\r\n }\r\n else {\r\n if (currentValue.startLineNumber > previousValue.endLineNumber) {\r\n reducedSelections.push(previousValue);\r\n return currentValue;\r\n }\r\n else {\r\n return new Selection(previousValue.startLineNumber, previousValue.startColumn, currentValue.endLineNumber, currentValue.endColumn);\r\n }\r\n }\r\n });\r\n reducedSelections.push(lastSelection);\r\n let model = editor.getModel();\r\n if (model === null) {\r\n return;\r\n }\r\n let edits = [];\r\n let endCursorState = [];\r\n let endPrimaryCursor = primaryCursor;\r\n let lineOffset = 0;\r\n for (let i = 0, len = reducedSelections.length; i < len; i++) {\r\n let selection = reducedSelections[i];\r\n let startLineNumber = selection.startLineNumber;\r\n let startColumn = 1;\r\n let columnDeltaOffset = 0;\r\n let endLineNumber, endColumn;\r\n let selectionEndPositionOffset = model.getLineContent(selection.endLineNumber).length - selection.endColumn;\r\n if (selection.isEmpty() || selection.startLineNumber === selection.endLineNumber) {\r\n let position = selection.getStartPosition();\r\n if (position.lineNumber < model.getLineCount()) {\r\n endLineNumber = startLineNumber + 1;\r\n endColumn = model.getLineMaxColumn(endLineNumber);\r\n }\r\n else {\r\n endLineNumber = position.lineNumber;\r\n endColumn = model.getLineMaxColumn(position.lineNumber);\r\n }\r\n }\r\n else {\r\n endLineNumber = selection.endLineNumber;\r\n endColumn = model.getLineMaxColumn(endLineNumber);\r\n }\r\n let trimmedLinesContent = model.getLineContent(startLineNumber);\r\n for (let i = startLineNumber + 1; i <= endLineNumber; i++) {\r\n let lineText = model.getLineContent(i);\r\n let firstNonWhitespaceIdx = model.getLineFirstNonWhitespaceColumn(i);\r\n if (firstNonWhitespaceIdx >= 1) {\r\n let insertSpace = true;\r\n if (trimmedLinesContent === '') {\r\n insertSpace = false;\r\n }\r\n if (insertSpace && (trimmedLinesContent.charAt(trimmedLinesContent.length - 1) === ' ' ||\r\n trimmedLinesContent.charAt(trimmedLinesContent.length - 1) === '\\t')) {\r\n insertSpace = false;\r\n trimmedLinesContent = trimmedLinesContent.replace(/[\\s\\uFEFF\\xA0]+$/g, ' ');\r\n }\r\n let lineTextWithoutIndent = lineText.substr(firstNonWhitespaceIdx - 1);\r\n trimmedLinesContent += (insertSpace ? ' ' : '') + lineTextWithoutIndent;\r\n if (insertSpace) {\r\n columnDeltaOffset = lineTextWithoutIndent.length + 1;\r\n }\r\n else {\r\n columnDeltaOffset = lineTextWithoutIndent.length;\r\n }\r\n }\r\n else {\r\n columnDeltaOffset = 0;\r\n }\r\n }\r\n let deleteSelection = new Range(startLineNumber, startColumn, endLineNumber, endColumn);\r\n if (!deleteSelection.isEmpty()) {\r\n let resultSelection;\r\n if (selection.isEmpty()) {\r\n edits.push(EditOperation.replace(deleteSelection, trimmedLinesContent));\r\n resultSelection = new Selection(deleteSelection.startLineNumber - lineOffset, trimmedLinesContent.length - columnDeltaOffset + 1, startLineNumber - lineOffset, trimmedLinesContent.length - columnDeltaOffset + 1);\r\n }\r\n else {\r\n if (selection.startLineNumber === selection.endLineNumber) {\r\n edits.push(EditOperation.replace(deleteSelection, trimmedLinesContent));\r\n resultSelection = new Selection(selection.startLineNumber - lineOffset, selection.startColumn, selection.endLineNumber - lineOffset, selection.endColumn);\r\n }\r\n else {\r\n edits.push(EditOperation.replace(deleteSelection, trimmedLinesContent));\r\n resultSelection = new Selection(selection.startLineNumber - lineOffset, selection.startColumn, selection.startLineNumber - lineOffset, trimmedLinesContent.length - selectionEndPositionOffset);\r\n }\r\n }\r\n if (Range.intersectRanges(deleteSelection, primaryCursor) !== null) {\r\n endPrimaryCursor = resultSelection;\r\n }\r\n else {\r\n endCursorState.push(resultSelection);\r\n }\r\n }\r\n lineOffset += deleteSelection.endLineNumber - deleteSelection.startLineNumber;\r\n }\r\n endCursorState.unshift(endPrimaryCursor);\r\n editor.pushUndoStop();\r\n editor.executeEdits(this.id, edits, endCursorState);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nexport class TransposeAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.transpose',\r\n label: nls.localize('editor.transpose', \"Transpose characters around the cursor\"),\r\n alias: 'Transpose characters around the cursor',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n run(_accessor, editor) {\r\n let selections = editor.getSelections();\r\n if (selections === null) {\r\n return;\r\n }\r\n let model = editor.getModel();\r\n if (model === null) {\r\n return;\r\n }\r\n let commands = [];\r\n for (let i = 0, len = selections.length; i < len; i++) {\r\n let selection = selections[i];\r\n if (!selection.isEmpty()) {\r\n continue;\r\n }\r\n let cursor = selection.getStartPosition();\r\n let maxColumn = model.getLineMaxColumn(cursor.lineNumber);\r\n if (cursor.column >= maxColumn) {\r\n if (cursor.lineNumber === model.getLineCount()) {\r\n continue;\r\n }\r\n // The cursor is at the end of current line and current line is not empty\r\n // then we transpose the character before the cursor and the line break if there is any following line.\r\n let deleteSelection = new Range(cursor.lineNumber, Math.max(1, cursor.column - 1), cursor.lineNumber + 1, 1);\r\n let chars = model.getValueInRange(deleteSelection).split('').reverse().join('');\r\n commands.push(new ReplaceCommand(new Selection(cursor.lineNumber, Math.max(1, cursor.column - 1), cursor.lineNumber + 1, 1), chars));\r\n }\r\n else {\r\n let deleteSelection = new Range(cursor.lineNumber, Math.max(1, cursor.column - 1), cursor.lineNumber, cursor.column + 1);\r\n let chars = model.getValueInRange(deleteSelection).split('').reverse().join('');\r\n commands.push(new ReplaceCommandThatPreservesSelection(deleteSelection, chars, new Selection(cursor.lineNumber, cursor.column + 1, cursor.lineNumber, cursor.column + 1)));\r\n }\r\n }\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nexport class AbstractCaseAction extends EditorAction {\r\n run(_accessor, editor) {\r\n const selections = editor.getSelections();\r\n if (selections === null) {\r\n return;\r\n }\r\n const model = editor.getModel();\r\n if (model === null) {\r\n return;\r\n }\r\n const wordSeparators = editor.getOption(110 /* wordSeparators */);\r\n const textEdits = [];\r\n for (const selection of selections) {\r\n if (selection.isEmpty()) {\r\n const cursor = selection.getStartPosition();\r\n const word = editor.getConfiguredWordAtPosition(cursor);\r\n if (!word) {\r\n continue;\r\n }\r\n const wordRange = new Range(cursor.lineNumber, word.startColumn, cursor.lineNumber, word.endColumn);\r\n const text = model.getValueInRange(wordRange);\r\n textEdits.push(EditOperation.replace(wordRange, this._modifyText(text, wordSeparators)));\r\n }\r\n else {\r\n const text = model.getValueInRange(selection);\r\n textEdits.push(EditOperation.replace(selection, this._modifyText(text, wordSeparators)));\r\n }\r\n }\r\n editor.pushUndoStop();\r\n editor.executeEdits(this.id, textEdits);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nexport class UpperCaseAction extends AbstractCaseAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.transformToUppercase',\r\n label: nls.localize('editor.transformToUppercase', \"Transform to Uppercase\"),\r\n alias: 'Transform to Uppercase',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n _modifyText(text, wordSeparators) {\r\n return text.toLocaleUpperCase();\r\n }\r\n}\r\nexport class LowerCaseAction extends AbstractCaseAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.transformToLowercase',\r\n label: nls.localize('editor.transformToLowercase', \"Transform to Lowercase\"),\r\n alias: 'Transform to Lowercase',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n _modifyText(text, wordSeparators) {\r\n return text.toLocaleLowerCase();\r\n }\r\n}\r\nexport class TitleCaseAction extends AbstractCaseAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.transformToTitlecase',\r\n label: nls.localize('editor.transformToTitlecase', \"Transform to Title Case\"),\r\n alias: 'Transform to Title Case',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n _modifyText(text, wordSeparators) {\r\n const separators = '\\r\\n\\t ' + wordSeparators;\r\n const excludedChars = separators.split('');\r\n let title = '';\r\n let startUpperCase = true;\r\n for (let i = 0; i < text.length; i++) {\r\n let currentChar = text[i];\r\n if (excludedChars.indexOf(currentChar) >= 0) {\r\n startUpperCase = true;\r\n title += currentChar;\r\n }\r\n else if (startUpperCase) {\r\n startUpperCase = false;\r\n title += currentChar.toLocaleUpperCase();\r\n }\r\n else {\r\n title += currentChar.toLocaleLowerCase();\r\n }\r\n }\r\n return title;\r\n }\r\n}\r\nexport class SnakeCaseAction extends AbstractCaseAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.transformToSnakecase',\r\n label: nls.localize('editor.transformToSnakecase', \"Transform to Snake Case\"),\r\n alias: 'Transform to Snake Case',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n _modifyText(text, wordSeparators) {\r\n return (text\r\n .replace(/(\\p{Ll})(\\p{Lu})/gmu, '$1_$2')\r\n .replace(/([^\\b_])(\\p{Lu})(\\p{Ll})/gmu, '$1_$2$3')\r\n .toLocaleLowerCase());\r\n }\r\n}\r\nregisterEditorAction(CopyLinesUpAction);\r\nregisterEditorAction(CopyLinesDownAction);\r\nregisterEditorAction(DuplicateSelectionAction);\r\nregisterEditorAction(MoveLinesUpAction);\r\nregisterEditorAction(MoveLinesDownAction);\r\nregisterEditorAction(SortLinesAscendingAction);\r\nregisterEditorAction(SortLinesDescendingAction);\r\nregisterEditorAction(TrimTrailingWhitespaceAction);\r\nregisterEditorAction(DeleteLinesAction);\r\nregisterEditorAction(IndentLinesAction);\r\nregisterEditorAction(OutdentLinesAction);\r\nregisterEditorAction(InsertLineBeforeAction);\r\nregisterEditorAction(InsertLineAfterAction);\r\nregisterEditorAction(DeleteAllLeftAction);\r\nregisterEditorAction(DeleteAllRightAction);\r\nregisterEditorAction(JoinLinesAction);\r\nregisterEditorAction(TransposeAction);\r\nregisterEditorAction(UpperCaseAction);\r\nregisterEditorAction(LowerCaseAction);\r\nregisterEditorAction(TitleCaseAction);\r\nregisterEditorAction(SnakeCaseAction);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport { registerEditorContribution, registerModelAndPositionCommand, EditorAction, EditorCommand, registerEditorAction, registerEditorCommand } from '../../browser/editorExtensions.js';\r\nimport * as arrays from '../../../base/common/arrays.js';\r\nimport { Disposable, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { LinkedEditingRangeProviderRegistry } from '../../common/modes.js';\r\nimport { first, createCancelablePromise, Delayer } from '../../../base/common/async.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { ContextKeyExpr, RawContextKey, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\r\nimport { isPromiseCanceledError, onUnexpectedError, onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { registerColor } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport { Color } from '../../../base/common/color.js';\r\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry.js';\r\nexport const CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE = new RawContextKey('LinkedEditingInputVisible', false);\r\nconst DECORATION_CLASS_NAME = 'linked-editing-decoration';\r\nlet LinkedEditingContribution = class LinkedEditingContribution extends Disposable {\r\n constructor(editor, contextKeyService) {\r\n super();\r\n this._debounceDuration = 200;\r\n this._localToDispose = this._register(new DisposableStore());\r\n this._editor = editor;\r\n this._enabled = false;\r\n this._visibleContextKey = CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(contextKeyService);\r\n this._currentDecorations = [];\r\n this._languageWordPattern = null;\r\n this._currentWordPattern = null;\r\n this._ignoreChangeEvent = false;\r\n this._localToDispose = this._register(new DisposableStore());\r\n this._rangeUpdateTriggerPromise = null;\r\n this._rangeSyncTriggerPromise = null;\r\n this._currentRequest = null;\r\n this._currentRequestPosition = null;\r\n this._currentRequestModelVersion = null;\r\n this._register(this._editor.onDidChangeModel(() => this.reinitialize()));\r\n this._register(this._editor.onDidChangeConfiguration(e => {\r\n if (e.hasChanged(56 /* linkedEditing */) || e.hasChanged(76 /* renameOnType */)) {\r\n this.reinitialize();\r\n }\r\n }));\r\n this._register(LinkedEditingRangeProviderRegistry.onDidChange(() => this.reinitialize()));\r\n this._register(this._editor.onDidChangeModelLanguage(() => this.reinitialize()));\r\n this.reinitialize();\r\n }\r\n static get(editor) {\r\n return editor.getContribution(LinkedEditingContribution.ID);\r\n }\r\n reinitialize() {\r\n const model = this._editor.getModel();\r\n const isEnabled = model !== null && (this._editor.getOption(56 /* linkedEditing */) || this._editor.getOption(76 /* renameOnType */)) && LinkedEditingRangeProviderRegistry.has(model);\r\n if (isEnabled === this._enabled) {\r\n return;\r\n }\r\n this._enabled = isEnabled;\r\n this.clearRanges();\r\n this._localToDispose.clear();\r\n if (!isEnabled || model === null) {\r\n return;\r\n }\r\n this._languageWordPattern = LanguageConfigurationRegistry.getWordDefinition(model.getLanguageIdentifier().id);\r\n this._localToDispose.add(model.onDidChangeLanguageConfiguration(() => {\r\n this._languageWordPattern = LanguageConfigurationRegistry.getWordDefinition(model.getLanguageIdentifier().id);\r\n }));\r\n const rangeUpdateScheduler = new Delayer(this._debounceDuration);\r\n const triggerRangeUpdate = () => {\r\n this._rangeUpdateTriggerPromise = rangeUpdateScheduler.trigger(() => this.updateRanges(), this._debounceDuration);\r\n };\r\n const rangeSyncScheduler = new Delayer(0);\r\n const triggerRangeSync = (decorations) => {\r\n this._rangeSyncTriggerPromise = rangeSyncScheduler.trigger(() => this._syncRanges(decorations));\r\n };\r\n this._localToDispose.add(this._editor.onDidChangeCursorPosition(() => {\r\n triggerRangeUpdate();\r\n }));\r\n this._localToDispose.add(this._editor.onDidChangeModelContent((e) => {\r\n if (!this._ignoreChangeEvent) {\r\n if (this._currentDecorations.length > 0) {\r\n const referenceRange = model.getDecorationRange(this._currentDecorations[0]);\r\n if (referenceRange && e.changes.every(c => referenceRange.intersectRanges(c.range))) {\r\n triggerRangeSync(this._currentDecorations);\r\n return;\r\n }\r\n }\r\n }\r\n triggerRangeUpdate();\r\n }));\r\n this._localToDispose.add({\r\n dispose: () => {\r\n rangeUpdateScheduler.cancel();\r\n rangeSyncScheduler.cancel();\r\n }\r\n });\r\n this.updateRanges();\r\n }\r\n _syncRanges(decorations) {\r\n // dalayed invocation, make sure we're still on\r\n if (!this._editor.hasModel() || decorations !== this._currentDecorations || decorations.length === 0) {\r\n // nothing to do\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const referenceRange = model.getDecorationRange(decorations[0]);\r\n if (!referenceRange || referenceRange.startLineNumber !== referenceRange.endLineNumber) {\r\n return this.clearRanges();\r\n }\r\n const referenceValue = model.getValueInRange(referenceRange);\r\n if (this._currentWordPattern) {\r\n const match = referenceValue.match(this._currentWordPattern);\r\n const matchLength = match ? match[0].length : 0;\r\n if (matchLength !== referenceValue.length) {\r\n return this.clearRanges();\r\n }\r\n }\r\n let edits = [];\r\n for (let i = 1, len = decorations.length; i < len; i++) {\r\n const mirrorRange = model.getDecorationRange(decorations[i]);\r\n if (!mirrorRange) {\r\n continue;\r\n }\r\n if (mirrorRange.startLineNumber !== mirrorRange.endLineNumber) {\r\n edits.push({\r\n range: mirrorRange,\r\n text: referenceValue\r\n });\r\n }\r\n else {\r\n let oldValue = model.getValueInRange(mirrorRange);\r\n let newValue = referenceValue;\r\n let rangeStartColumn = mirrorRange.startColumn;\r\n let rangeEndColumn = mirrorRange.endColumn;\r\n const commonPrefixLength = strings.commonPrefixLength(oldValue, newValue);\r\n rangeStartColumn += commonPrefixLength;\r\n oldValue = oldValue.substr(commonPrefixLength);\r\n newValue = newValue.substr(commonPrefixLength);\r\n const commonSuffixLength = strings.commonSuffixLength(oldValue, newValue);\r\n rangeEndColumn -= commonSuffixLength;\r\n oldValue = oldValue.substr(0, oldValue.length - commonSuffixLength);\r\n newValue = newValue.substr(0, newValue.length - commonSuffixLength);\r\n if (rangeStartColumn !== rangeEndColumn || newValue.length !== 0) {\r\n edits.push({\r\n range: new Range(mirrorRange.startLineNumber, rangeStartColumn, mirrorRange.endLineNumber, rangeEndColumn),\r\n text: newValue\r\n });\r\n }\r\n }\r\n }\r\n if (edits.length === 0) {\r\n return;\r\n }\r\n try {\r\n this._editor.popUndoStop();\r\n this._ignoreChangeEvent = true;\r\n const prevEditOperationType = this._editor._getViewModel().getPrevEditOperationType();\r\n this._editor.executeEdits('linkedEditing', edits);\r\n this._editor._getViewModel().setPrevEditOperationType(prevEditOperationType);\r\n }\r\n finally {\r\n this._ignoreChangeEvent = false;\r\n }\r\n }\r\n dispose() {\r\n this.clearRanges();\r\n super.dispose();\r\n }\r\n clearRanges() {\r\n this._visibleContextKey.set(false);\r\n this._currentDecorations = this._editor.deltaDecorations(this._currentDecorations, []);\r\n if (this._currentRequest) {\r\n this._currentRequest.cancel();\r\n this._currentRequest = null;\r\n this._currentRequestPosition = null;\r\n }\r\n }\r\n updateRanges(force = false) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._editor.hasModel()) {\r\n this.clearRanges();\r\n return;\r\n }\r\n const position = this._editor.getPosition();\r\n if (!this._enabled && !force || this._editor.getSelections().length > 1) {\r\n // disabled or multicursor\r\n this.clearRanges();\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const modelVersionId = model.getVersionId();\r\n if (this._currentRequestPosition && this._currentRequestModelVersion === modelVersionId) {\r\n if (position.equals(this._currentRequestPosition)) {\r\n return; // same position\r\n }\r\n if (this._currentDecorations && this._currentDecorations.length > 0) {\r\n const range = model.getDecorationRange(this._currentDecorations[0]);\r\n if (range && range.containsPosition(position)) {\r\n return; // just moving inside the existing primary range\r\n }\r\n }\r\n }\r\n this._currentRequestPosition = position;\r\n this._currentRequestModelVersion = modelVersionId;\r\n const request = createCancelablePromise((token) => __awaiter(this, void 0, void 0, function* () {\r\n try {\r\n const response = yield getLinkedEditingRanges(model, position, token);\r\n if (request !== this._currentRequest) {\r\n return;\r\n }\r\n this._currentRequest = null;\r\n if (modelVersionId !== model.getVersionId()) {\r\n return;\r\n }\r\n let ranges = [];\r\n if (response === null || response === void 0 ? void 0 : response.ranges) {\r\n ranges = response.ranges;\r\n }\r\n this._currentWordPattern = (response === null || response === void 0 ? void 0 : response.wordPattern) || this._languageWordPattern;\r\n let foundReferenceRange = false;\r\n for (let i = 0, len = ranges.length; i < len; i++) {\r\n if (Range.containsPosition(ranges[i], position)) {\r\n foundReferenceRange = true;\r\n if (i !== 0) {\r\n const referenceRange = ranges[i];\r\n ranges.splice(i, 1);\r\n ranges.unshift(referenceRange);\r\n }\r\n break;\r\n }\r\n }\r\n if (!foundReferenceRange) {\r\n // Cannot do linked editing if the ranges are not where the cursor is...\r\n this.clearRanges();\r\n return;\r\n }\r\n const decorations = ranges.map(range => ({ range: range, options: LinkedEditingContribution.DECORATION }));\r\n this._visibleContextKey.set(true);\r\n this._currentDecorations = this._editor.deltaDecorations(this._currentDecorations, decorations);\r\n }\r\n catch (err) {\r\n if (!isPromiseCanceledError(err)) {\r\n onUnexpectedError(err);\r\n }\r\n if (this._currentRequest === request || !this._currentRequest) {\r\n // stop if we are still the latest request\r\n this.clearRanges();\r\n }\r\n }\r\n }));\r\n this._currentRequest = request;\r\n return request;\r\n });\r\n }\r\n};\r\nLinkedEditingContribution.ID = 'editor.contrib.linkedEditing';\r\nLinkedEditingContribution.DECORATION = ModelDecorationOptions.register({\r\n stickiness: 0 /* AlwaysGrowsWhenTypingAtEdges */,\r\n className: DECORATION_CLASS_NAME\r\n});\r\nLinkedEditingContribution = __decorate([\r\n __param(1, IContextKeyService)\r\n], LinkedEditingContribution);\r\nexport { LinkedEditingContribution };\r\nexport class LinkedEditingAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.linkedEditing',\r\n label: nls.localize('linkedEditing.label', \"Start Linked Editing\"),\r\n alias: 'Start Linked Editing',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasRenameProvider),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 60 /* F2 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n runCommand(accessor, args) {\r\n const editorService = accessor.get(ICodeEditorService);\r\n const [uri, pos] = Array.isArray(args) && args || [undefined, undefined];\r\n if (URI.isUri(uri) && Position.isIPosition(pos)) {\r\n return editorService.openCodeEditor({ resource: uri }, editorService.getActiveCodeEditor()).then(editor => {\r\n if (!editor) {\r\n return;\r\n }\r\n editor.setPosition(pos);\r\n editor.invokeWithinContext(accessor => {\r\n this.reportTelemetry(accessor, editor);\r\n return this.run(accessor, editor);\r\n });\r\n }, onUnexpectedError);\r\n }\r\n return super.runCommand(accessor, args);\r\n }\r\n run(_accessor, editor) {\r\n const controller = LinkedEditingContribution.get(editor);\r\n if (controller) {\r\n return Promise.resolve(controller.updateRanges(true));\r\n }\r\n return Promise.resolve();\r\n }\r\n}\r\nconst LinkedEditingCommand = EditorCommand.bindToContribution(LinkedEditingContribution.get);\r\nregisterEditorCommand(new LinkedEditingCommand({\r\n id: 'cancelLinkedEditingInput',\r\n precondition: CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,\r\n handler: x => x.clearRanges(),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n weight: 100 /* EditorContrib */ + 99,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\nfunction getLinkedEditingRanges(model, position, token) {\r\n const orderedByScore = LinkedEditingRangeProviderRegistry.ordered(model);\r\n // in order of score ask the linked editing range provider\r\n // until someone response with a good result\r\n // (good = not null)\r\n return first(orderedByScore.map(provider => () => __awaiter(this, void 0, void 0, function* () {\r\n try {\r\n return yield provider.provideLinkedEditingRanges(model, position, token);\r\n }\r\n catch (e) {\r\n onUnexpectedExternalError(e);\r\n return undefined;\r\n }\r\n })), result => !!result && arrays.isNonEmptyArray(result === null || result === void 0 ? void 0 : result.ranges));\r\n}\r\nexport const editorLinkedEditingBackground = registerColor('editor.linkedEditingBackground', { dark: Color.fromHex('#f00').transparent(0.3), light: Color.fromHex('#f00').transparent(0.3), hc: Color.fromHex('#f00').transparent(0.3) }, nls.localize('editorLinkedEditingBackground', 'Background color when the editor auto renames on type.'));\r\nregisterThemingParticipant((theme, collector) => {\r\n const editorLinkedEditingBackgroundColor = theme.getColor(editorLinkedEditingBackground);\r\n if (editorLinkedEditingBackgroundColor) {\r\n collector.addRule(`.monaco-editor .${DECORATION_CLASS_NAME} { background: ${editorLinkedEditingBackgroundColor}; border-left-color: ${editorLinkedEditingBackgroundColor}; }`);\r\n }\r\n});\r\nregisterModelAndPositionCommand('_executeLinkedEditingProvider', (model, position) => getLinkedEditingRanges(model, position, CancellationToken.None));\r\nregisterEditorContribution(LinkedEditingContribution.ID, LinkedEditingContribution);\r\nregisterEditorAction(LinkedEditingAction);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { LinkProviderRegistry } from '../../common/modes.js';\r\nimport { IModelService } from '../../common/services/modelService.js';\r\nimport { CommandsRegistry } from '../../../platform/commands/common/commands.js';\r\nimport { isDisposable, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { coalesce } from '../../../base/common/arrays.js';\r\nimport { assertType } from '../../../base/common/types.js';\r\nexport class Link {\r\n constructor(link, provider) {\r\n this._link = link;\r\n this._provider = provider;\r\n }\r\n toJSON() {\r\n return {\r\n range: this.range,\r\n url: this.url,\r\n tooltip: this.tooltip\r\n };\r\n }\r\n get range() {\r\n return this._link.range;\r\n }\r\n get url() {\r\n return this._link.url;\r\n }\r\n get tooltip() {\r\n return this._link.tooltip;\r\n }\r\n resolve(token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this._link.url) {\r\n return this._link.url;\r\n }\r\n if (typeof this._provider.resolveLink === 'function') {\r\n return Promise.resolve(this._provider.resolveLink(this._link, token)).then(value => {\r\n this._link = value || this._link;\r\n if (this._link.url) {\r\n // recurse\r\n return this.resolve(token);\r\n }\r\n return Promise.reject(new Error('missing'));\r\n });\r\n }\r\n return Promise.reject(new Error('missing'));\r\n });\r\n }\r\n}\r\nexport class LinksList {\r\n constructor(tuples) {\r\n this._disposables = new DisposableStore();\r\n let links = [];\r\n for (const [list, provider] of tuples) {\r\n // merge all links\r\n const newLinks = list.links.map(link => new Link(link, provider));\r\n links = LinksList._union(links, newLinks);\r\n // register disposables\r\n if (isDisposable(list)) {\r\n this._disposables.add(list);\r\n }\r\n }\r\n this.links = links;\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this.links.length = 0;\r\n }\r\n static _union(oldLinks, newLinks) {\r\n // reunite oldLinks with newLinks and remove duplicates\r\n let result = [];\r\n let oldIndex;\r\n let oldLen;\r\n let newIndex;\r\n let newLen;\r\n for (oldIndex = 0, newIndex = 0, oldLen = oldLinks.length, newLen = newLinks.length; oldIndex < oldLen && newIndex < newLen;) {\r\n const oldLink = oldLinks[oldIndex];\r\n const newLink = newLinks[newIndex];\r\n if (Range.areIntersectingOrTouching(oldLink.range, newLink.range)) {\r\n // Remove the oldLink\r\n oldIndex++;\r\n continue;\r\n }\r\n const comparisonResult = Range.compareRangesUsingStarts(oldLink.range, newLink.range);\r\n if (comparisonResult < 0) {\r\n // oldLink is before\r\n result.push(oldLink);\r\n oldIndex++;\r\n }\r\n else {\r\n // newLink is before\r\n result.push(newLink);\r\n newIndex++;\r\n }\r\n }\r\n for (; oldIndex < oldLen; oldIndex++) {\r\n result.push(oldLinks[oldIndex]);\r\n }\r\n for (; newIndex < newLen; newIndex++) {\r\n result.push(newLinks[newIndex]);\r\n }\r\n return result;\r\n }\r\n}\r\nexport function getLinks(model, token) {\r\n const lists = [];\r\n // ask all providers for links in parallel\r\n const promises = LinkProviderRegistry.ordered(model).reverse().map((provider, i) => {\r\n return Promise.resolve(provider.provideLinks(model, token)).then(result => {\r\n if (result) {\r\n lists[i] = [result, provider];\r\n }\r\n }, onUnexpectedExternalError);\r\n });\r\n return Promise.all(promises).then(() => {\r\n const result = new LinksList(coalesce(lists));\r\n if (!token.isCancellationRequested) {\r\n return result;\r\n }\r\n result.dispose();\r\n return new LinksList([]);\r\n });\r\n}\r\nCommandsRegistry.registerCommand('_executeLinkProvider', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n let [uri, resolveCount] = args;\r\n assertType(uri instanceof URI);\r\n if (typeof resolveCount !== 'number') {\r\n resolveCount = 0;\r\n }\r\n const model = accessor.get(IModelService).getModel(uri);\r\n if (!model) {\r\n return [];\r\n }\r\n const list = yield getLinks(model, CancellationToken.None);\r\n if (!list) {\r\n return [];\r\n }\r\n // resolve links\r\n for (let i = 0; i < Math.min(resolveCount, list.links.length); i++) {\r\n yield list.links[i].resolve(CancellationToken.None);\r\n }\r\n const result = list.links.slice(0);\r\n list.dispose();\r\n return result;\r\n}));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport './links.css';\r\nimport * as nls from '../../../nls.js';\r\nimport * as async from '../../../base/common/async.js';\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { MarkdownString } from '../../../base/common/htmlContent.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport * as platform from '../../../base/common/platform.js';\r\nimport { EditorAction, registerEditorAction, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { LinkProviderRegistry } from '../../common/modes.js';\r\nimport { ClickLinkGesture } from '../gotoSymbol/link/clickLinkGesture.js';\r\nimport { getLinks } from './getLinks.js';\r\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\r\nimport { IOpenerService } from '../../../platform/opener/common/opener.js';\r\nimport { editorActiveLinkForeground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { Schemas } from '../../../base/common/network.js';\r\nimport * as resources from '../../../base/common/resources.js';\r\nfunction getHoverMessage(link, useMetaKey) {\r\n const executeCmd = link.url && /^command:/i.test(link.url.toString());\r\n const label = link.tooltip\r\n ? link.tooltip\r\n : executeCmd\r\n ? nls.localize('links.navigate.executeCmd', 'Execute command')\r\n : nls.localize('links.navigate.follow', 'Follow link');\r\n const kb = useMetaKey\r\n ? platform.isMacintosh\r\n ? nls.localize('links.navigate.kb.meta.mac', \"cmd + click\")\r\n : nls.localize('links.navigate.kb.meta', \"ctrl + click\")\r\n : platform.isMacintosh\r\n ? nls.localize('links.navigate.kb.alt.mac', \"option + click\")\r\n : nls.localize('links.navigate.kb.alt', \"alt + click\");\r\n if (link.url) {\r\n let nativeLabel = '';\r\n if (/^command:/i.test(link.url.toString())) {\r\n // Don't show complete command arguments in the native tooltip\r\n const match = link.url.toString().match(/^command:([^?#]+)/);\r\n if (match) {\r\n const commandId = match[1];\r\n const nativeLabelText = nls.localize('tooltip.explanation', \"Execute command {0}\", commandId);\r\n nativeLabel = ` \"${nativeLabelText}\"`;\r\n }\r\n }\r\n const hoverMessage = new MarkdownString('', true).appendMarkdown(`[${label}](${link.url.toString(true)}${nativeLabel}) (${kb})`);\r\n return hoverMessage;\r\n }\r\n else {\r\n return new MarkdownString().appendText(`${label} (${kb})`);\r\n }\r\n}\r\nconst decoration = {\r\n general: ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n collapseOnReplaceEdit: true,\r\n inlineClassName: 'detected-link'\r\n }),\r\n active: ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n collapseOnReplaceEdit: true,\r\n inlineClassName: 'detected-link-active'\r\n })\r\n};\r\nclass LinkOccurrence {\r\n constructor(link, decorationId) {\r\n this.link = link;\r\n this.decorationId = decorationId;\r\n }\r\n static decoration(link, useMetaKey) {\r\n return {\r\n range: link.range,\r\n options: LinkOccurrence._getOptions(link, useMetaKey, false)\r\n };\r\n }\r\n static _getOptions(link, useMetaKey, isActive) {\r\n const options = Object.assign({}, (isActive ? decoration.active : decoration.general));\r\n options.hoverMessage = getHoverMessage(link, useMetaKey);\r\n return options;\r\n }\r\n activate(changeAccessor, useMetaKey) {\r\n changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(this.link, useMetaKey, true));\r\n }\r\n deactivate(changeAccessor, useMetaKey) {\r\n changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(this.link, useMetaKey, false));\r\n }\r\n}\r\nlet LinkDetector = class LinkDetector {\r\n constructor(editor, openerService, notificationService) {\r\n this.listenersToRemove = new DisposableStore();\r\n this.editor = editor;\r\n this.openerService = openerService;\r\n this.notificationService = notificationService;\r\n let clickLinkGesture = new ClickLinkGesture(editor);\r\n this.listenersToRemove.add(clickLinkGesture);\r\n this.listenersToRemove.add(clickLinkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => {\r\n this._onEditorMouseMove(mouseEvent, keyboardEvent);\r\n }));\r\n this.listenersToRemove.add(clickLinkGesture.onExecute((e) => {\r\n this.onEditorMouseUp(e);\r\n }));\r\n this.listenersToRemove.add(clickLinkGesture.onCancel((e) => {\r\n this.cleanUpActiveLinkDecoration();\r\n }));\r\n this.enabled = editor.getOption(57 /* links */);\r\n this.listenersToRemove.add(editor.onDidChangeConfiguration((e) => {\r\n const enabled = editor.getOption(57 /* links */);\r\n if (this.enabled === enabled) {\r\n // No change in our configuration option\r\n return;\r\n }\r\n this.enabled = enabled;\r\n // Remove any links (for the getting disabled case)\r\n this.updateDecorations([]);\r\n // Stop any computation (for the getting disabled case)\r\n this.stop();\r\n // Start computing (for the getting enabled case)\r\n this.beginCompute();\r\n }));\r\n this.listenersToRemove.add(editor.onDidChangeModelContent((e) => this.onChange()));\r\n this.listenersToRemove.add(editor.onDidChangeModel((e) => this.onModelChanged()));\r\n this.listenersToRemove.add(editor.onDidChangeModelLanguage((e) => this.onModelModeChanged()));\r\n this.listenersToRemove.add(LinkProviderRegistry.onDidChange((e) => this.onModelModeChanged()));\r\n this.timeout = new async.TimeoutTimer();\r\n this.computePromise = null;\r\n this.activeLinksList = null;\r\n this.currentOccurrences = {};\r\n this.activeLinkDecorationId = null;\r\n this.beginCompute();\r\n }\r\n static get(editor) {\r\n return editor.getContribution(LinkDetector.ID);\r\n }\r\n onModelChanged() {\r\n this.currentOccurrences = {};\r\n this.activeLinkDecorationId = null;\r\n this.stop();\r\n this.beginCompute();\r\n }\r\n onModelModeChanged() {\r\n this.stop();\r\n this.beginCompute();\r\n }\r\n onChange() {\r\n this.timeout.setIfNotSet(() => this.beginCompute(), LinkDetector.RECOMPUTE_TIME);\r\n }\r\n beginCompute() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this.editor.hasModel() || !this.enabled) {\r\n return;\r\n }\r\n const model = this.editor.getModel();\r\n if (!LinkProviderRegistry.has(model)) {\r\n return;\r\n }\r\n if (this.activeLinksList) {\r\n this.activeLinksList.dispose();\r\n this.activeLinksList = null;\r\n }\r\n this.computePromise = async.createCancelablePromise(token => getLinks(model, token));\r\n try {\r\n this.activeLinksList = yield this.computePromise;\r\n this.updateDecorations(this.activeLinksList.links);\r\n }\r\n catch (err) {\r\n onUnexpectedError(err);\r\n }\r\n finally {\r\n this.computePromise = null;\r\n }\r\n });\r\n }\r\n updateDecorations(links) {\r\n const useMetaKey = (this.editor.getOption(64 /* multiCursorModifier */) === 'altKey');\r\n let oldDecorations = [];\r\n let keys = Object.keys(this.currentOccurrences);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n let decorationId = keys[i];\r\n let occurance = this.currentOccurrences[decorationId];\r\n oldDecorations.push(occurance.decorationId);\r\n }\r\n let newDecorations = [];\r\n if (links) {\r\n // Not sure why this is sometimes null\r\n for (const link of links) {\r\n newDecorations.push(LinkOccurrence.decoration(link, useMetaKey));\r\n }\r\n }\r\n let decorations = this.editor.deltaDecorations(oldDecorations, newDecorations);\r\n this.currentOccurrences = {};\r\n this.activeLinkDecorationId = null;\r\n for (let i = 0, len = decorations.length; i < len; i++) {\r\n let occurance = new LinkOccurrence(links[i], decorations[i]);\r\n this.currentOccurrences[occurance.decorationId] = occurance;\r\n }\r\n }\r\n _onEditorMouseMove(mouseEvent, withKey) {\r\n const useMetaKey = (this.editor.getOption(64 /* multiCursorModifier */) === 'altKey');\r\n if (this.isEnabled(mouseEvent, withKey)) {\r\n this.cleanUpActiveLinkDecoration(); // always remove previous link decoration as their can only be one\r\n const occurrence = this.getLinkOccurrence(mouseEvent.target.position);\r\n if (occurrence) {\r\n this.editor.changeDecorations((changeAccessor) => {\r\n occurrence.activate(changeAccessor, useMetaKey);\r\n this.activeLinkDecorationId = occurrence.decorationId;\r\n });\r\n }\r\n }\r\n else {\r\n this.cleanUpActiveLinkDecoration();\r\n }\r\n }\r\n cleanUpActiveLinkDecoration() {\r\n const useMetaKey = (this.editor.getOption(64 /* multiCursorModifier */) === 'altKey');\r\n if (this.activeLinkDecorationId) {\r\n const occurrence = this.currentOccurrences[this.activeLinkDecorationId];\r\n if (occurrence) {\r\n this.editor.changeDecorations((changeAccessor) => {\r\n occurrence.deactivate(changeAccessor, useMetaKey);\r\n });\r\n }\r\n this.activeLinkDecorationId = null;\r\n }\r\n }\r\n onEditorMouseUp(mouseEvent) {\r\n if (!this.isEnabled(mouseEvent)) {\r\n return;\r\n }\r\n const occurrence = this.getLinkOccurrence(mouseEvent.target.position);\r\n if (!occurrence) {\r\n return;\r\n }\r\n this.openLinkOccurrence(occurrence, mouseEvent.hasSideBySideModifier, true /* from user gesture */);\r\n }\r\n openLinkOccurrence(occurrence, openToSide, fromUserGesture = false) {\r\n if (!this.openerService) {\r\n return;\r\n }\r\n const { link } = occurrence;\r\n link.resolve(CancellationToken.None).then(uri => {\r\n // Support for relative file URIs of the shape file://./relativeFile.txt or file:///./relativeFile.txt\r\n if (typeof uri === 'string' && this.editor.hasModel()) {\r\n const modelUri = this.editor.getModel().uri;\r\n if (modelUri.scheme === Schemas.file && uri.startsWith(`${Schemas.file}:`)) {\r\n const parsedUri = URI.parse(uri);\r\n if (parsedUri.scheme === Schemas.file) {\r\n const fsPath = resources.originalFSPath(parsedUri);\r\n let relativePath = null;\r\n if (fsPath.startsWith('/./')) {\r\n relativePath = `.${fsPath.substr(1)}`;\r\n }\r\n else if (fsPath.startsWith('//./')) {\r\n relativePath = `.${fsPath.substr(2)}`;\r\n }\r\n if (relativePath) {\r\n uri = resources.joinPath(modelUri, relativePath);\r\n }\r\n }\r\n }\r\n }\r\n return this.openerService.open(uri, { openToSide, fromUserGesture, allowContributedOpeners: true });\r\n }, err => {\r\n const messageOrError = err instanceof Error ? err.message : err;\r\n // different error cases\r\n if (messageOrError === 'invalid') {\r\n this.notificationService.warn(nls.localize('invalid.url', 'Failed to open this link because it is not well-formed: {0}', link.url.toString()));\r\n }\r\n else if (messageOrError === 'missing') {\r\n this.notificationService.warn(nls.localize('missing.url', 'Failed to open this link because its target is missing.'));\r\n }\r\n else {\r\n onUnexpectedError(err);\r\n }\r\n });\r\n }\r\n getLinkOccurrence(position) {\r\n if (!this.editor.hasModel() || !position) {\r\n return null;\r\n }\r\n const decorations = this.editor.getModel().getDecorationsInRange({\r\n startLineNumber: position.lineNumber,\r\n startColumn: position.column,\r\n endLineNumber: position.lineNumber,\r\n endColumn: position.column\r\n }, 0, true);\r\n for (const decoration of decorations) {\r\n const currentOccurrence = this.currentOccurrences[decoration.id];\r\n if (currentOccurrence) {\r\n return currentOccurrence;\r\n }\r\n }\r\n return null;\r\n }\r\n isEnabled(mouseEvent, withKey) {\r\n return Boolean((mouseEvent.target.type === 6 /* CONTENT_TEXT */)\r\n && (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey)));\r\n }\r\n stop() {\r\n var _a;\r\n this.timeout.cancel();\r\n if (this.activeLinksList) {\r\n (_a = this.activeLinksList) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this.activeLinksList = null;\r\n }\r\n if (this.computePromise) {\r\n this.computePromise.cancel();\r\n this.computePromise = null;\r\n }\r\n }\r\n dispose() {\r\n this.listenersToRemove.dispose();\r\n this.stop();\r\n this.timeout.dispose();\r\n }\r\n};\r\nLinkDetector.ID = 'editor.linkDetector';\r\nLinkDetector.RECOMPUTE_TIME = 1000; // ms\r\nLinkDetector = __decorate([\r\n __param(1, IOpenerService),\r\n __param(2, INotificationService)\r\n], LinkDetector);\r\nexport { LinkDetector };\r\nclass OpenLinkAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.openLink',\r\n label: nls.localize('label', \"Open Link\"),\r\n alias: 'Open Link',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n let linkDetector = LinkDetector.get(editor);\r\n if (!linkDetector) {\r\n return;\r\n }\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n let selections = editor.getSelections();\r\n for (let sel of selections) {\r\n let link = linkDetector.getLinkOccurrence(sel.getEndPosition());\r\n if (link) {\r\n linkDetector.openLinkOccurrence(link, false);\r\n }\r\n }\r\n }\r\n}\r\nregisterEditorContribution(LinkDetector.ID, LinkDetector);\r\nregisterEditorAction(OpenLinkAction);\r\nregisterThemingParticipant((theme, collector) => {\r\n const activeLinkForeground = theme.getColor(editorActiveLinkForeground);\r\n if (activeLinkForeground) {\r\n collector.addRule(`.monaco-editor .detected-link-active { color: ${activeLinkForeground} !important; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../../nls.js';\r\nimport { RunOnceScheduler } from '../../../base/common/async.js';\r\nimport { KeyChord } from '../../../base/common/keyCodes.js';\r\nimport { Disposable, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { EditorAction, registerEditorAction, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { CursorMoveCommands } from '../../common/controller/cursorMoveCommands.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { OverviewRulerLane } from '../../common/model.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { DocumentHighlightProviderRegistry } from '../../common/modes.js';\r\nimport { CommonFindController } from '../find/findController.js';\r\nimport { MenuId } from '../../../platform/actions/common/actions.js';\r\nimport { overviewRulerSelectionHighlightForeground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { themeColorFromId } from '../../../platform/theme/common/themeService.js';\r\nimport { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey.js';\r\nexport class InsertCursorAbove extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.insertCursorAbove',\r\n label: nls.localize('mutlicursor.insertAbove', \"Add Cursor Above\"),\r\n alias: 'Add Cursor Above',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 16 /* UpArrow */,\r\n linux: {\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 16 /* UpArrow */,\r\n secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 16 /* UpArrow */]\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '3_multi',\r\n title: nls.localize({ key: 'miInsertCursorAbove', comment: ['&& denotes a mnemonic'] }, \"&&Add Cursor Above\"),\r\n order: 2\r\n }\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const useLogicalLine = (args && args.logicalLine === true);\r\n const viewModel = editor._getViewModel();\r\n if (viewModel.cursorConfig.readOnly) {\r\n return;\r\n }\r\n viewModel.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, CursorMoveCommands.addCursorUp(viewModel, viewModel.getCursorStates(), useLogicalLine));\r\n viewModel.revealTopMostCursor(args.source);\r\n }\r\n}\r\nexport class InsertCursorBelow extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.insertCursorBelow',\r\n label: nls.localize('mutlicursor.insertBelow', \"Add Cursor Below\"),\r\n alias: 'Add Cursor Below',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 18 /* DownArrow */,\r\n linux: {\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 18 /* DownArrow */,\r\n secondary: [2048 /* CtrlCmd */ | 1024 /* Shift */ | 18 /* DownArrow */]\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '3_multi',\r\n title: nls.localize({ key: 'miInsertCursorBelow', comment: ['&& denotes a mnemonic'] }, \"A&&dd Cursor Below\"),\r\n order: 3\r\n }\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const useLogicalLine = (args && args.logicalLine === true);\r\n const viewModel = editor._getViewModel();\r\n if (viewModel.cursorConfig.readOnly) {\r\n return;\r\n }\r\n viewModel.pushStackElement();\r\n viewModel.setCursorStates(args.source, 3 /* Explicit */, CursorMoveCommands.addCursorDown(viewModel, viewModel.getCursorStates(), useLogicalLine));\r\n viewModel.revealBottomMostCursor(args.source);\r\n }\r\n}\r\nclass InsertCursorAtEndOfEachLineSelected extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.insertCursorAtEndOfEachLineSelected',\r\n label: nls.localize('mutlicursor.insertAtEndOfEachLineSelected', \"Add Cursors to Line Ends\"),\r\n alias: 'Add Cursors to Line Ends',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 39 /* KEY_I */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '3_multi',\r\n title: nls.localize({ key: 'miInsertCursorAtEndOfEachLineSelected', comment: ['&& denotes a mnemonic'] }, \"Add C&&ursors to Line Ends\"),\r\n order: 4\r\n }\r\n });\r\n }\r\n getCursorsForSelection(selection, model, result) {\r\n if (selection.isEmpty()) {\r\n return;\r\n }\r\n for (let i = selection.startLineNumber; i < selection.endLineNumber; i++) {\r\n let currentLineMaxColumn = model.getLineMaxColumn(i);\r\n result.push(new Selection(i, currentLineMaxColumn, i, currentLineMaxColumn));\r\n }\r\n if (selection.endColumn > 1) {\r\n result.push(new Selection(selection.endLineNumber, selection.endColumn, selection.endLineNumber, selection.endColumn));\r\n }\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const model = editor.getModel();\r\n const selections = editor.getSelections();\r\n let newSelections = [];\r\n selections.forEach((sel) => this.getCursorsForSelection(sel, model, newSelections));\r\n if (newSelections.length > 0) {\r\n editor.setSelections(newSelections);\r\n }\r\n }\r\n}\r\nclass InsertCursorAtEndOfLineSelected extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.addCursorsToBottom',\r\n label: nls.localize('mutlicursor.addCursorsToBottom', \"Add Cursors To Bottom\"),\r\n alias: 'Add Cursors To Bottom',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const selections = editor.getSelections();\r\n const lineCount = editor.getModel().getLineCount();\r\n let newSelections = [];\r\n for (let i = selections[0].startLineNumber; i <= lineCount; i++) {\r\n newSelections.push(new Selection(i, selections[0].startColumn, i, selections[0].endColumn));\r\n }\r\n if (newSelections.length > 0) {\r\n editor.setSelections(newSelections);\r\n }\r\n }\r\n}\r\nclass InsertCursorAtTopOfLineSelected extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.addCursorsToTop',\r\n label: nls.localize('mutlicursor.addCursorsToTop', \"Add Cursors To Top\"),\r\n alias: 'Add Cursors To Top',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const selections = editor.getSelections();\r\n let newSelections = [];\r\n for (let i = selections[0].startLineNumber; i >= 1; i--) {\r\n newSelections.push(new Selection(i, selections[0].startColumn, i, selections[0].endColumn));\r\n }\r\n if (newSelections.length > 0) {\r\n editor.setSelections(newSelections);\r\n }\r\n }\r\n}\r\nexport class MultiCursorSessionResult {\r\n constructor(selections, revealRange, revealScrollType) {\r\n this.selections = selections;\r\n this.revealRange = revealRange;\r\n this.revealScrollType = revealScrollType;\r\n }\r\n}\r\nexport class MultiCursorSession {\r\n constructor(_editor, findController, isDisconnectedFromFindController, searchText, wholeWord, matchCase, currentMatch) {\r\n this._editor = _editor;\r\n this.findController = findController;\r\n this.isDisconnectedFromFindController = isDisconnectedFromFindController;\r\n this.searchText = searchText;\r\n this.wholeWord = wholeWord;\r\n this.matchCase = matchCase;\r\n this.currentMatch = currentMatch;\r\n }\r\n static create(editor, findController) {\r\n if (!editor.hasModel()) {\r\n return null;\r\n }\r\n const findState = findController.getState();\r\n // Find widget owns entirely what we search for if:\r\n // - focus is not in the editor (i.e. it is in the find widget)\r\n // - and the search widget is visible\r\n // - and the search string is non-empty\r\n if (!editor.hasTextFocus() && findState.isRevealed && findState.searchString.length > 0) {\r\n // Find widget owns what is searched for\r\n return new MultiCursorSession(editor, findController, false, findState.searchString, findState.wholeWord, findState.matchCase, null);\r\n }\r\n // Otherwise, the selection gives the search text, and the find widget gives the search settings\r\n // The exception is the find state disassociation case: when beginning with a single, collapsed selection\r\n let isDisconnectedFromFindController = false;\r\n let wholeWord;\r\n let matchCase;\r\n const selections = editor.getSelections();\r\n if (selections.length === 1 && selections[0].isEmpty()) {\r\n isDisconnectedFromFindController = true;\r\n wholeWord = true;\r\n matchCase = true;\r\n }\r\n else {\r\n wholeWord = findState.wholeWord;\r\n matchCase = findState.matchCase;\r\n }\r\n // Selection owns what is searched for\r\n const s = editor.getSelection();\r\n let searchText;\r\n let currentMatch = null;\r\n if (s.isEmpty()) {\r\n // selection is empty => expand to current word\r\n const word = editor.getConfiguredWordAtPosition(s.getStartPosition());\r\n if (!word) {\r\n return null;\r\n }\r\n searchText = word.word;\r\n currentMatch = new Selection(s.startLineNumber, word.startColumn, s.startLineNumber, word.endColumn);\r\n }\r\n else {\r\n searchText = editor.getModel().getValueInRange(s).replace(/\\r\\n/g, '\\n');\r\n }\r\n return new MultiCursorSession(editor, findController, isDisconnectedFromFindController, searchText, wholeWord, matchCase, currentMatch);\r\n }\r\n addSelectionToNextFindMatch() {\r\n if (!this._editor.hasModel()) {\r\n return null;\r\n }\r\n const nextMatch = this._getNextMatch();\r\n if (!nextMatch) {\r\n return null;\r\n }\r\n const allSelections = this._editor.getSelections();\r\n return new MultiCursorSessionResult(allSelections.concat(nextMatch), nextMatch, 0 /* Smooth */);\r\n }\r\n moveSelectionToNextFindMatch() {\r\n if (!this._editor.hasModel()) {\r\n return null;\r\n }\r\n const nextMatch = this._getNextMatch();\r\n if (!nextMatch) {\r\n return null;\r\n }\r\n const allSelections = this._editor.getSelections();\r\n return new MultiCursorSessionResult(allSelections.slice(0, allSelections.length - 1).concat(nextMatch), nextMatch, 0 /* Smooth */);\r\n }\r\n _getNextMatch() {\r\n if (!this._editor.hasModel()) {\r\n return null;\r\n }\r\n if (this.currentMatch) {\r\n const result = this.currentMatch;\r\n this.currentMatch = null;\r\n return result;\r\n }\r\n this.findController.highlightFindOptions();\r\n const allSelections = this._editor.getSelections();\r\n const lastAddedSelection = allSelections[allSelections.length - 1];\r\n const nextMatch = this._editor.getModel().findNextMatch(this.searchText, lastAddedSelection.getEndPosition(), false, this.matchCase, this.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, false);\r\n if (!nextMatch) {\r\n return null;\r\n }\r\n return new Selection(nextMatch.range.startLineNumber, nextMatch.range.startColumn, nextMatch.range.endLineNumber, nextMatch.range.endColumn);\r\n }\r\n addSelectionToPreviousFindMatch() {\r\n if (!this._editor.hasModel()) {\r\n return null;\r\n }\r\n const previousMatch = this._getPreviousMatch();\r\n if (!previousMatch) {\r\n return null;\r\n }\r\n const allSelections = this._editor.getSelections();\r\n return new MultiCursorSessionResult(allSelections.concat(previousMatch), previousMatch, 0 /* Smooth */);\r\n }\r\n moveSelectionToPreviousFindMatch() {\r\n if (!this._editor.hasModel()) {\r\n return null;\r\n }\r\n const previousMatch = this._getPreviousMatch();\r\n if (!previousMatch) {\r\n return null;\r\n }\r\n const allSelections = this._editor.getSelections();\r\n return new MultiCursorSessionResult(allSelections.slice(0, allSelections.length - 1).concat(previousMatch), previousMatch, 0 /* Smooth */);\r\n }\r\n _getPreviousMatch() {\r\n if (!this._editor.hasModel()) {\r\n return null;\r\n }\r\n if (this.currentMatch) {\r\n const result = this.currentMatch;\r\n this.currentMatch = null;\r\n return result;\r\n }\r\n this.findController.highlightFindOptions();\r\n const allSelections = this._editor.getSelections();\r\n const lastAddedSelection = allSelections[allSelections.length - 1];\r\n const previousMatch = this._editor.getModel().findPreviousMatch(this.searchText, lastAddedSelection.getStartPosition(), false, this.matchCase, this.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, false);\r\n if (!previousMatch) {\r\n return null;\r\n }\r\n return new Selection(previousMatch.range.startLineNumber, previousMatch.range.startColumn, previousMatch.range.endLineNumber, previousMatch.range.endColumn);\r\n }\r\n selectAll() {\r\n if (!this._editor.hasModel()) {\r\n return [];\r\n }\r\n this.findController.highlightFindOptions();\r\n return this._editor.getModel().findMatches(this.searchText, true, false, this.matchCase, this.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n }\r\n}\r\nexport class MultiCursorSelectionController extends Disposable {\r\n constructor(editor) {\r\n super();\r\n this._sessionDispose = this._register(new DisposableStore());\r\n this._editor = editor;\r\n this._ignoreSelectionChange = false;\r\n this._session = null;\r\n }\r\n static get(editor) {\r\n return editor.getContribution(MultiCursorSelectionController.ID);\r\n }\r\n dispose() {\r\n this._endSession();\r\n super.dispose();\r\n }\r\n _beginSessionIfNeeded(findController) {\r\n if (!this._session) {\r\n // Create a new session\r\n const session = MultiCursorSession.create(this._editor, findController);\r\n if (!session) {\r\n return;\r\n }\r\n this._session = session;\r\n const newState = { searchString: this._session.searchText };\r\n if (this._session.isDisconnectedFromFindController) {\r\n newState.wholeWordOverride = 1 /* True */;\r\n newState.matchCaseOverride = 1 /* True */;\r\n newState.isRegexOverride = 2 /* False */;\r\n }\r\n findController.getState().change(newState, false);\r\n this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e) => {\r\n if (this._ignoreSelectionChange) {\r\n return;\r\n }\r\n this._endSession();\r\n }));\r\n this._sessionDispose.add(this._editor.onDidBlurEditorText(() => {\r\n this._endSession();\r\n }));\r\n this._sessionDispose.add(findController.getState().onFindReplaceStateChange((e) => {\r\n if (e.matchCase || e.wholeWord) {\r\n this._endSession();\r\n }\r\n }));\r\n }\r\n }\r\n _endSession() {\r\n this._sessionDispose.clear();\r\n if (this._session && this._session.isDisconnectedFromFindController) {\r\n const newState = {\r\n wholeWordOverride: 0 /* NotSet */,\r\n matchCaseOverride: 0 /* NotSet */,\r\n isRegexOverride: 0 /* NotSet */,\r\n };\r\n this._session.findController.getState().change(newState, false);\r\n }\r\n this._session = null;\r\n }\r\n _setSelections(selections) {\r\n this._ignoreSelectionChange = true;\r\n this._editor.setSelections(selections);\r\n this._ignoreSelectionChange = false;\r\n }\r\n _expandEmptyToWord(model, selection) {\r\n if (!selection.isEmpty()) {\r\n return selection;\r\n }\r\n const word = this._editor.getConfiguredWordAtPosition(selection.getStartPosition());\r\n if (!word) {\r\n return selection;\r\n }\r\n return new Selection(selection.startLineNumber, word.startColumn, selection.startLineNumber, word.endColumn);\r\n }\r\n _applySessionResult(result) {\r\n if (!result) {\r\n return;\r\n }\r\n this._setSelections(result.selections);\r\n if (result.revealRange) {\r\n this._editor.revealRangeInCenterIfOutsideViewport(result.revealRange, result.revealScrollType);\r\n }\r\n }\r\n getSession(findController) {\r\n return this._session;\r\n }\r\n addSelectionToNextFindMatch(findController) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n if (!this._session) {\r\n // If there are multiple cursors, handle the case where they do not all select the same text.\r\n const allSelections = this._editor.getSelections();\r\n if (allSelections.length > 1) {\r\n const findState = findController.getState();\r\n const matchCase = findState.matchCase;\r\n const selectionsContainSameText = modelRangesContainSameText(this._editor.getModel(), allSelections, matchCase);\r\n if (!selectionsContainSameText) {\r\n const model = this._editor.getModel();\r\n let resultingSelections = [];\r\n for (let i = 0, len = allSelections.length; i < len; i++) {\r\n resultingSelections[i] = this._expandEmptyToWord(model, allSelections[i]);\r\n }\r\n this._editor.setSelections(resultingSelections);\r\n return;\r\n }\r\n }\r\n }\r\n this._beginSessionIfNeeded(findController);\r\n if (this._session) {\r\n this._applySessionResult(this._session.addSelectionToNextFindMatch());\r\n }\r\n }\r\n addSelectionToPreviousFindMatch(findController) {\r\n this._beginSessionIfNeeded(findController);\r\n if (this._session) {\r\n this._applySessionResult(this._session.addSelectionToPreviousFindMatch());\r\n }\r\n }\r\n moveSelectionToNextFindMatch(findController) {\r\n this._beginSessionIfNeeded(findController);\r\n if (this._session) {\r\n this._applySessionResult(this._session.moveSelectionToNextFindMatch());\r\n }\r\n }\r\n moveSelectionToPreviousFindMatch(findController) {\r\n this._beginSessionIfNeeded(findController);\r\n if (this._session) {\r\n this._applySessionResult(this._session.moveSelectionToPreviousFindMatch());\r\n }\r\n }\r\n selectAll(findController) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n let matches = null;\r\n const findState = findController.getState();\r\n // Special case: find widget owns entirely what we search for if:\r\n // - focus is not in the editor (i.e. it is in the find widget)\r\n // - and the search widget is visible\r\n // - and the search string is non-empty\r\n // - and we're searching for a regex\r\n if (findState.isRevealed && findState.searchString.length > 0 && findState.isRegex) {\r\n matches = this._editor.getModel().findMatches(findState.searchString, true, findState.isRegex, findState.matchCase, findState.wholeWord ? this._editor.getOption(110 /* wordSeparators */) : null, false, 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n }\r\n else {\r\n this._beginSessionIfNeeded(findController);\r\n if (!this._session) {\r\n return;\r\n }\r\n matches = this._session.selectAll();\r\n }\r\n if (findState.searchScope) {\r\n const states = findState.searchScope;\r\n let inSelection = [];\r\n matches.forEach((match) => {\r\n states.forEach((state) => {\r\n if (match.range.endLineNumber <= state.endLineNumber && match.range.startLineNumber >= state.startLineNumber) {\r\n inSelection.push(match);\r\n }\r\n });\r\n });\r\n matches = inSelection;\r\n }\r\n if (matches.length > 0) {\r\n const editorSelection = this._editor.getSelection();\r\n // Have the primary cursor remain the one where the action was invoked\r\n for (let i = 0, len = matches.length; i < len; i++) {\r\n const match = matches[i];\r\n const intersection = match.range.intersectRanges(editorSelection);\r\n if (intersection) {\r\n // bingo!\r\n matches[i] = matches[0];\r\n matches[0] = match;\r\n break;\r\n }\r\n }\r\n this._setSelections(matches.map(m => new Selection(m.range.startLineNumber, m.range.startColumn, m.range.endLineNumber, m.range.endColumn)));\r\n }\r\n }\r\n}\r\nMultiCursorSelectionController.ID = 'editor.contrib.multiCursorController';\r\nexport class MultiCursorSelectionControllerAction extends EditorAction {\r\n run(accessor, editor) {\r\n const multiCursorController = MultiCursorSelectionController.get(editor);\r\n if (!multiCursorController) {\r\n return;\r\n }\r\n const findController = CommonFindController.get(editor);\r\n if (!findController) {\r\n return;\r\n }\r\n this._run(multiCursorController, findController);\r\n }\r\n}\r\nexport class AddSelectionToNextFindMatchAction extends MultiCursorSelectionControllerAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.addSelectionToNextFindMatch',\r\n label: nls.localize('addSelectionToNextFindMatch', \"Add Selection To Next Find Match\"),\r\n alias: 'Add Selection To Next Find Match',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 34 /* KEY_D */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '3_multi',\r\n title: nls.localize({ key: 'miAddSelectionToNextFindMatch', comment: ['&& denotes a mnemonic'] }, \"Add &&Next Occurrence\"),\r\n order: 5\r\n }\r\n });\r\n }\r\n _run(multiCursorController, findController) {\r\n multiCursorController.addSelectionToNextFindMatch(findController);\r\n }\r\n}\r\nexport class AddSelectionToPreviousFindMatchAction extends MultiCursorSelectionControllerAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.addSelectionToPreviousFindMatch',\r\n label: nls.localize('addSelectionToPreviousFindMatch', \"Add Selection To Previous Find Match\"),\r\n alias: 'Add Selection To Previous Find Match',\r\n precondition: undefined,\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '3_multi',\r\n title: nls.localize({ key: 'miAddSelectionToPreviousFindMatch', comment: ['&& denotes a mnemonic'] }, \"Add P&&revious Occurrence\"),\r\n order: 6\r\n }\r\n });\r\n }\r\n _run(multiCursorController, findController) {\r\n multiCursorController.addSelectionToPreviousFindMatch(findController);\r\n }\r\n}\r\nexport class MoveSelectionToNextFindMatchAction extends MultiCursorSelectionControllerAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.moveSelectionToNextFindMatch',\r\n label: nls.localize('moveSelectionToNextFindMatch', \"Move Last Selection To Next Find Match\"),\r\n alias: 'Move Last Selection To Next Find Match',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: KeyChord(2048 /* CtrlCmd */ | 41 /* KEY_K */, 2048 /* CtrlCmd */ | 34 /* KEY_D */),\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _run(multiCursorController, findController) {\r\n multiCursorController.moveSelectionToNextFindMatch(findController);\r\n }\r\n}\r\nexport class MoveSelectionToPreviousFindMatchAction extends MultiCursorSelectionControllerAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.moveSelectionToPreviousFindMatch',\r\n label: nls.localize('moveSelectionToPreviousFindMatch', \"Move Last Selection To Previous Find Match\"),\r\n alias: 'Move Last Selection To Previous Find Match',\r\n precondition: undefined\r\n });\r\n }\r\n _run(multiCursorController, findController) {\r\n multiCursorController.moveSelectionToPreviousFindMatch(findController);\r\n }\r\n}\r\nexport class SelectHighlightsAction extends MultiCursorSelectionControllerAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.selectHighlights',\r\n label: nls.localize('selectAllOccurrencesOfFindMatch', \"Select All Occurrences of Find Match\"),\r\n alias: 'Select All Occurrences of Find Match',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 42 /* KEY_L */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '3_multi',\r\n title: nls.localize({ key: 'miSelectHighlights', comment: ['&& denotes a mnemonic'] }, \"Select All &&Occurrences\"),\r\n order: 7\r\n }\r\n });\r\n }\r\n _run(multiCursorController, findController) {\r\n multiCursorController.selectAll(findController);\r\n }\r\n}\r\nexport class CompatChangeAll extends MultiCursorSelectionControllerAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.changeAll',\r\n label: nls.localize('changeAll.label', \"Change All Occurrences\"),\r\n alias: 'Change All Occurrences',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.editorTextFocus),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 60 /* F2 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: '1_modification',\r\n order: 1.2\r\n }\r\n });\r\n }\r\n _run(multiCursorController, findController) {\r\n multiCursorController.selectAll(findController);\r\n }\r\n}\r\nclass SelectionHighlighterState {\r\n constructor(searchText, matchCase, wordSeparators, modelVersionId) {\r\n this.searchText = searchText;\r\n this.matchCase = matchCase;\r\n this.wordSeparators = wordSeparators;\r\n this.modelVersionId = modelVersionId;\r\n }\r\n /**\r\n * Everything equals except for `lastWordUnderCursor`\r\n */\r\n static softEquals(a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n if (!a || !b) {\r\n return false;\r\n }\r\n return (a.searchText === b.searchText\r\n && a.matchCase === b.matchCase\r\n && a.wordSeparators === b.wordSeparators\r\n && a.modelVersionId === b.modelVersionId);\r\n }\r\n}\r\nexport class SelectionHighlighter extends Disposable {\r\n constructor(editor) {\r\n super();\r\n this.editor = editor;\r\n this._isEnabled = editor.getOption(92 /* selectionHighlight */);\r\n this.decorations = [];\r\n this.updateSoon = this._register(new RunOnceScheduler(() => this._update(), 300));\r\n this.state = null;\r\n this._register(editor.onDidChangeConfiguration((e) => {\r\n this._isEnabled = editor.getOption(92 /* selectionHighlight */);\r\n }));\r\n this._register(editor.onDidChangeCursorSelection((e) => {\r\n if (!this._isEnabled) {\r\n // Early exit if nothing needs to be done!\r\n // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;)\r\n return;\r\n }\r\n if (e.selection.isEmpty()) {\r\n if (e.reason === 3 /* Explicit */) {\r\n if (this.state) {\r\n // no longer valid\r\n this._setState(null);\r\n }\r\n this.updateSoon.schedule();\r\n }\r\n else {\r\n this._setState(null);\r\n }\r\n }\r\n else {\r\n this._update();\r\n }\r\n }));\r\n this._register(editor.onDidChangeModel((e) => {\r\n this._setState(null);\r\n }));\r\n this._register(editor.onDidChangeModelContent((e) => {\r\n if (this._isEnabled) {\r\n this.updateSoon.schedule();\r\n }\r\n }));\r\n this._register(CommonFindController.get(editor).getState().onFindReplaceStateChange((e) => {\r\n this._update();\r\n }));\r\n }\r\n _update() {\r\n this._setState(SelectionHighlighter._createState(this._isEnabled, this.editor));\r\n }\r\n static _createState(isEnabled, editor) {\r\n if (!isEnabled) {\r\n return null;\r\n }\r\n if (!editor.hasModel()) {\r\n return null;\r\n }\r\n const s = editor.getSelection();\r\n if (s.startLineNumber !== s.endLineNumber) {\r\n // multiline forbidden for perf reasons\r\n return null;\r\n }\r\n const multiCursorController = MultiCursorSelectionController.get(editor);\r\n if (!multiCursorController) {\r\n return null;\r\n }\r\n const findController = CommonFindController.get(editor);\r\n if (!findController) {\r\n return null;\r\n }\r\n let r = multiCursorController.getSession(findController);\r\n if (!r) {\r\n const allSelections = editor.getSelections();\r\n if (allSelections.length > 1) {\r\n const findState = findController.getState();\r\n const matchCase = findState.matchCase;\r\n const selectionsContainSameText = modelRangesContainSameText(editor.getModel(), allSelections, matchCase);\r\n if (!selectionsContainSameText) {\r\n return null;\r\n }\r\n }\r\n r = MultiCursorSession.create(editor, findController);\r\n }\r\n if (!r) {\r\n return null;\r\n }\r\n if (r.currentMatch) {\r\n // This is an empty selection\r\n // Do not interfere with semantic word highlighting in the no selection case\r\n return null;\r\n }\r\n if (/^[ \\t]+$/.test(r.searchText)) {\r\n // whitespace only selection\r\n return null;\r\n }\r\n if (r.searchText.length > 200) {\r\n // very long selection\r\n return null;\r\n }\r\n // TODO: better handling of this case\r\n const findState = findController.getState();\r\n const caseSensitive = findState.matchCase;\r\n // Return early if the find widget shows the exact same matches\r\n if (findState.isRevealed) {\r\n let findStateSearchString = findState.searchString;\r\n if (!caseSensitive) {\r\n findStateSearchString = findStateSearchString.toLowerCase();\r\n }\r\n let mySearchString = r.searchText;\r\n if (!caseSensitive) {\r\n mySearchString = mySearchString.toLowerCase();\r\n }\r\n if (findStateSearchString === mySearchString && r.matchCase === findState.matchCase && r.wholeWord === findState.wholeWord && !findState.isRegex) {\r\n return null;\r\n }\r\n }\r\n return new SelectionHighlighterState(r.searchText, r.matchCase, r.wholeWord ? editor.getOption(110 /* wordSeparators */) : null, editor.getModel().getVersionId());\r\n }\r\n _setState(state) {\r\n if (SelectionHighlighterState.softEquals(this.state, state)) {\r\n this.state = state;\r\n return;\r\n }\r\n this.state = state;\r\n if (!this.state) {\r\n this.decorations = this.editor.deltaDecorations(this.decorations, []);\r\n return;\r\n }\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n const model = this.editor.getModel();\r\n if (model.isTooLargeForTokenization()) {\r\n // the file is too large, so searching word under cursor in the whole document takes is blocking the UI.\r\n return;\r\n }\r\n const hasFindOccurrences = DocumentHighlightProviderRegistry.has(model) && this.editor.getOption(66 /* occurrencesHighlight */);\r\n let allMatches = model.findMatches(this.state.searchText, true, false, this.state.matchCase, this.state.wordSeparators, false).map(m => m.range);\r\n allMatches.sort(Range.compareRangesUsingStarts);\r\n let selections = this.editor.getSelections();\r\n selections.sort(Range.compareRangesUsingStarts);\r\n // do not overlap with selection (issue #64 and #512)\r\n let matches = [];\r\n for (let i = 0, j = 0, len = allMatches.length, lenJ = selections.length; i < len;) {\r\n const match = allMatches[i];\r\n if (j >= lenJ) {\r\n // finished all editor selections\r\n matches.push(match);\r\n i++;\r\n }\r\n else {\r\n const cmp = Range.compareRangesUsingStarts(match, selections[j]);\r\n if (cmp < 0) {\r\n // match is before sel\r\n if (selections[j].isEmpty() || !Range.areIntersecting(match, selections[j])) {\r\n matches.push(match);\r\n }\r\n i++;\r\n }\r\n else if (cmp > 0) {\r\n // sel is before match\r\n j++;\r\n }\r\n else {\r\n // sel is equal to match\r\n i++;\r\n j++;\r\n }\r\n }\r\n }\r\n const decorations = matches.map(r => {\r\n return {\r\n range: r,\r\n // Show in overviewRuler only if model has no semantic highlighting\r\n options: (hasFindOccurrences ? SelectionHighlighter._SELECTION_HIGHLIGHT : SelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW)\r\n };\r\n });\r\n this.decorations = this.editor.deltaDecorations(this.decorations, decorations);\r\n }\r\n dispose() {\r\n this._setState(null);\r\n super.dispose();\r\n }\r\n}\r\nSelectionHighlighter.ID = 'editor.contrib.selectionHighlighter';\r\nSelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'selectionHighlight',\r\n overviewRuler: {\r\n color: themeColorFromId(overviewRulerSelectionHighlightForeground),\r\n position: OverviewRulerLane.Center\r\n }\r\n});\r\nSelectionHighlighter._SELECTION_HIGHLIGHT = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'selectionHighlight',\r\n});\r\nfunction modelRangesContainSameText(model, ranges, matchCase) {\r\n const selectedText = getValueInRange(model, ranges[0], !matchCase);\r\n for (let i = 1, len = ranges.length; i < len; i++) {\r\n const range = ranges[i];\r\n if (range.isEmpty()) {\r\n return false;\r\n }\r\n const thisSelectedText = getValueInRange(model, range, !matchCase);\r\n if (selectedText !== thisSelectedText) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nfunction getValueInRange(model, range, toLowerCase) {\r\n const text = model.getValueInRange(range);\r\n return (toLowerCase ? text.toLowerCase() : text);\r\n}\r\nregisterEditorContribution(MultiCursorSelectionController.ID, MultiCursorSelectionController);\r\nregisterEditorContribution(SelectionHighlighter.ID, SelectionHighlighter);\r\nregisterEditorAction(InsertCursorAbove);\r\nregisterEditorAction(InsertCursorBelow);\r\nregisterEditorAction(InsertCursorAtEndOfEachLineSelected);\r\nregisterEditorAction(AddSelectionToNextFindMatchAction);\r\nregisterEditorAction(AddSelectionToPreviousFindMatchAction);\r\nregisterEditorAction(MoveSelectionToNextFindMatchAction);\r\nregisterEditorAction(MoveSelectionToPreviousFindMatchAction);\r\nregisterEditorAction(SelectHighlightsAction);\r\nregisterEditorAction(CompatChangeAll);\r\nregisterEditorAction(InsertCursorAtEndOfLineSelected);\r\nregisterEditorAction(InsertCursorAtTopOfLineSelected);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport * as modes from '../../common/modes.js';\r\nimport { RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { CommandsRegistry } from '../../../platform/commands/common/commands.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { assertType } from '../../../base/common/types.js';\r\nimport { ITextModelService } from '../../common/services/resolverService.js';\r\nexport const Context = {\r\n Visible: new RawContextKey('parameterHintsVisible', false),\r\n MultipleSignatures: new RawContextKey('parameterHintsMultipleSignatures', false),\r\n};\r\nexport function provideSignatureHelp(model, position, context, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const supports = modes.SignatureHelpProviderRegistry.ordered(model);\r\n for (const support of supports) {\r\n try {\r\n const result = yield support.provideSignatureHelp(model, position, token, context);\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n catch (err) {\r\n onUnexpectedExternalError(err);\r\n }\r\n }\r\n return undefined;\r\n });\r\n}\r\nCommandsRegistry.registerCommand('_executeSignatureHelpProvider', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri, position, triggerCharacter] = args;\r\n assertType(URI.isUri(uri));\r\n assertType(Position.isIPosition(position));\r\n assertType(typeof triggerCharacter === 'string' || !triggerCharacter);\r\n const ref = yield accessor.get(ITextModelService).createModelReference(uri);\r\n try {\r\n const result = yield provideSignatureHelp(ref.object.textEditorModel, Position.lift(position), {\r\n triggerKind: modes.SignatureHelpTriggerKind.Invoke,\r\n isRetrigger: false,\r\n triggerCharacter,\r\n }, CancellationToken.None);\r\n if (!result) {\r\n return undefined;\r\n }\r\n setTimeout(() => result.dispose(), 0);\r\n return result.value;\r\n }\r\n finally {\r\n ref.dispose();\r\n }\r\n}));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { createCancelablePromise, Delayer } from '../../../base/common/async.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Disposable, MutableDisposable } from '../../../base/common/lifecycle.js';\r\nimport { CharacterSet } from '../../common/core/characterClassifier.js';\r\nimport * as modes from '../../common/modes.js';\r\nimport { provideSignatureHelp } from './provideSignatureHelp.js';\r\nvar ParameterHintState;\r\n(function (ParameterHintState) {\r\n ParameterHintState.Default = { type: 0 /* Default */ };\r\n class Pending {\r\n constructor(request, previouslyActiveHints) {\r\n this.request = request;\r\n this.previouslyActiveHints = previouslyActiveHints;\r\n this.type = 2 /* Pending */;\r\n }\r\n }\r\n ParameterHintState.Pending = Pending;\r\n class Active {\r\n constructor(hints) {\r\n this.hints = hints;\r\n this.type = 1 /* Active */;\r\n }\r\n }\r\n ParameterHintState.Active = Active;\r\n})(ParameterHintState || (ParameterHintState = {}));\r\nexport class ParameterHintsModel extends Disposable {\r\n constructor(editor, delay = ParameterHintsModel.DEFAULT_DELAY) {\r\n super();\r\n this._onChangedHints = this._register(new Emitter());\r\n this.onChangedHints = this._onChangedHints.event;\r\n this.triggerOnType = false;\r\n this._state = ParameterHintState.Default;\r\n this._pendingTriggers = [];\r\n this._lastSignatureHelpResult = this._register(new MutableDisposable());\r\n this.triggerChars = new CharacterSet();\r\n this.retriggerChars = new CharacterSet();\r\n this.triggerId = 0;\r\n this.editor = editor;\r\n this.throttledDelayer = new Delayer(delay);\r\n this._register(this.editor.onDidChangeConfiguration(() => this.onEditorConfigurationChange()));\r\n this._register(this.editor.onDidChangeModel(e => this.onModelChanged()));\r\n this._register(this.editor.onDidChangeModelLanguage(_ => this.onModelChanged()));\r\n this._register(this.editor.onDidChangeCursorSelection(e => this.onCursorChange(e)));\r\n this._register(this.editor.onDidChangeModelContent(e => this.onModelContentChange()));\r\n this._register(modes.SignatureHelpProviderRegistry.onDidChange(this.onModelChanged, this));\r\n this._register(this.editor.onDidType(text => this.onDidType(text)));\r\n this.onEditorConfigurationChange();\r\n this.onModelChanged();\r\n }\r\n get state() { return this._state; }\r\n set state(value) {\r\n if (this._state.type === 2 /* Pending */) {\r\n this._state.request.cancel();\r\n }\r\n this._state = value;\r\n }\r\n cancel(silent = false) {\r\n this.state = ParameterHintState.Default;\r\n this.throttledDelayer.cancel();\r\n if (!silent) {\r\n this._onChangedHints.fire(undefined);\r\n }\r\n }\r\n trigger(context, delay) {\r\n const model = this.editor.getModel();\r\n if (!model || !modes.SignatureHelpProviderRegistry.has(model)) {\r\n return;\r\n }\r\n const triggerId = ++this.triggerId;\r\n this._pendingTriggers.push(context);\r\n this.throttledDelayer.trigger(() => {\r\n return this.doTrigger(triggerId);\r\n }, delay)\r\n .catch(onUnexpectedError);\r\n }\r\n next() {\r\n if (this.state.type !== 1 /* Active */) {\r\n return;\r\n }\r\n const length = this.state.hints.signatures.length;\r\n const activeSignature = this.state.hints.activeSignature;\r\n const last = (activeSignature % length) === (length - 1);\r\n const cycle = this.editor.getOption(70 /* parameterHints */).cycle;\r\n // If there is only one signature, or we're on last signature of list\r\n if ((length < 2 || last) && !cycle) {\r\n this.cancel();\r\n return;\r\n }\r\n this.updateActiveSignature(last && cycle ? 0 : activeSignature + 1);\r\n }\r\n previous() {\r\n if (this.state.type !== 1 /* Active */) {\r\n return;\r\n }\r\n const length = this.state.hints.signatures.length;\r\n const activeSignature = this.state.hints.activeSignature;\r\n const first = activeSignature === 0;\r\n const cycle = this.editor.getOption(70 /* parameterHints */).cycle;\r\n // If there is only one signature, or we're on first signature of list\r\n if ((length < 2 || first) && !cycle) {\r\n this.cancel();\r\n return;\r\n }\r\n this.updateActiveSignature(first && cycle ? length - 1 : activeSignature - 1);\r\n }\r\n updateActiveSignature(activeSignature) {\r\n if (this.state.type !== 1 /* Active */) {\r\n return;\r\n }\r\n this.state = new ParameterHintState.Active(Object.assign(Object.assign({}, this.state.hints), { activeSignature }));\r\n this._onChangedHints.fire(this.state.hints);\r\n }\r\n doTrigger(triggerId) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const isRetrigger = this.state.type === 1 /* Active */ || this.state.type === 2 /* Pending */;\r\n const activeSignatureHelp = this.getLastActiveHints();\r\n this.cancel(true);\r\n if (this._pendingTriggers.length === 0) {\r\n return false;\r\n }\r\n const context = this._pendingTriggers.reduce(mergeTriggerContexts);\r\n this._pendingTriggers = [];\r\n const triggerContext = {\r\n triggerKind: context.triggerKind,\r\n triggerCharacter: context.triggerCharacter,\r\n isRetrigger: isRetrigger,\r\n activeSignatureHelp: activeSignatureHelp\r\n };\r\n if (!this.editor.hasModel()) {\r\n return false;\r\n }\r\n const model = this.editor.getModel();\r\n const position = this.editor.getPosition();\r\n this.state = new ParameterHintState.Pending(createCancelablePromise(token => provideSignatureHelp(model, position, triggerContext, token)), activeSignatureHelp);\r\n try {\r\n const result = yield this.state.request;\r\n // Check that we are still resolving the correct signature help\r\n if (triggerId !== this.triggerId) {\r\n result === null || result === void 0 ? void 0 : result.dispose();\r\n return false;\r\n }\r\n if (!result || !result.value.signatures || result.value.signatures.length === 0) {\r\n result === null || result === void 0 ? void 0 : result.dispose();\r\n this._lastSignatureHelpResult.clear();\r\n this.cancel();\r\n return false;\r\n }\r\n else {\r\n this.state = new ParameterHintState.Active(result.value);\r\n this._lastSignatureHelpResult.value = result;\r\n this._onChangedHints.fire(this.state.hints);\r\n return true;\r\n }\r\n }\r\n catch (error) {\r\n if (triggerId === this.triggerId) {\r\n this.state = ParameterHintState.Default;\r\n }\r\n onUnexpectedError(error);\r\n return false;\r\n }\r\n });\r\n }\r\n getLastActiveHints() {\r\n switch (this.state.type) {\r\n case 1 /* Active */: return this.state.hints;\r\n case 2 /* Pending */: return this.state.previouslyActiveHints;\r\n default: return undefined;\r\n }\r\n }\r\n get isTriggered() {\r\n return this.state.type === 1 /* Active */\r\n || this.state.type === 2 /* Pending */\r\n || this.throttledDelayer.isTriggered();\r\n }\r\n onModelChanged() {\r\n this.cancel();\r\n // Update trigger characters\r\n this.triggerChars = new CharacterSet();\r\n this.retriggerChars = new CharacterSet();\r\n const model = this.editor.getModel();\r\n if (!model) {\r\n return;\r\n }\r\n for (const support of modes.SignatureHelpProviderRegistry.ordered(model)) {\r\n for (const ch of support.signatureHelpTriggerCharacters || []) {\r\n this.triggerChars.add(ch.charCodeAt(0));\r\n // All trigger characters are also considered retrigger characters\r\n this.retriggerChars.add(ch.charCodeAt(0));\r\n }\r\n for (const ch of support.signatureHelpRetriggerCharacters || []) {\r\n this.retriggerChars.add(ch.charCodeAt(0));\r\n }\r\n }\r\n }\r\n onDidType(text) {\r\n if (!this.triggerOnType) {\r\n return;\r\n }\r\n const lastCharIndex = text.length - 1;\r\n const triggerCharCode = text.charCodeAt(lastCharIndex);\r\n if (this.triggerChars.has(triggerCharCode) || this.isTriggered && this.retriggerChars.has(triggerCharCode)) {\r\n this.trigger({\r\n triggerKind: modes.SignatureHelpTriggerKind.TriggerCharacter,\r\n triggerCharacter: text.charAt(lastCharIndex),\r\n });\r\n }\r\n }\r\n onCursorChange(e) {\r\n if (e.source === 'mouse') {\r\n this.cancel();\r\n }\r\n else if (this.isTriggered) {\r\n this.trigger({ triggerKind: modes.SignatureHelpTriggerKind.ContentChange });\r\n }\r\n }\r\n onModelContentChange() {\r\n if (this.isTriggered) {\r\n this.trigger({ triggerKind: modes.SignatureHelpTriggerKind.ContentChange });\r\n }\r\n }\r\n onEditorConfigurationChange() {\r\n this.triggerOnType = this.editor.getOption(70 /* parameterHints */).enabled;\r\n if (!this.triggerOnType) {\r\n this.cancel();\r\n }\r\n }\r\n dispose() {\r\n this.cancel(true);\r\n super.dispose();\r\n }\r\n}\r\nParameterHintsModel.DEFAULT_DELAY = 120; // ms\r\nfunction mergeTriggerContexts(previous, current) {\r\n switch (current.triggerKind) {\r\n case modes.SignatureHelpTriggerKind.Invoke:\r\n // Invoke overrides previous triggers.\r\n return current;\r\n case modes.SignatureHelpTriggerKind.ContentChange:\r\n // Ignore content changes triggers\r\n return previous;\r\n case modes.SignatureHelpTriggerKind.TriggerCharacter:\r\n default:\r\n return current;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { domEvent, stop } from '../../../base/browser/event.js';\r\nimport * as aria from '../../../base/browser/ui/aria/aria.js';\r\nimport { DomScrollableElement } from '../../../base/browser/ui/scrollbar/scrollableElement.js';\r\nimport { Event } from '../../../base/common/event.js';\r\nimport { Disposable, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport './parameterHints.css';\r\nimport { IModeService } from '../../common/services/modeService.js';\r\nimport { MarkdownRenderer } from '../../browser/core/markdownRenderer.js';\r\nimport { Context } from './provideSignatureHelp.js';\r\nimport * as nls from '../../../nls.js';\r\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { IOpenerService } from '../../../platform/opener/common/opener.js';\r\nimport { editorHoverBackground, editorHoverBorder, textCodeBlockBackground, textLinkForeground, editorHoverForeground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant, ThemeIcon } from '../../../platform/theme/common/themeService.js';\r\nimport { ParameterHintsModel } from './parameterHintsModel.js';\r\nimport { escapeRegExpCharacters } from '../../../base/common/strings.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nimport { assertIsDefined } from '../../../base/common/types.js';\r\nimport { ColorScheme } from '../../../platform/theme/common/theme.js';\r\nimport { registerIcon } from '../../../platform/theme/common/iconRegistry.js';\r\nconst $ = dom.$;\r\nconst parameterHintsNextIcon = registerIcon('parameter-hints-next', Codicon.chevronDown, nls.localize('parameterHintsNextIcon', 'Icon for show next parameter hint.'));\r\nconst parameterHintsPreviousIcon = registerIcon('parameter-hints-previous', Codicon.chevronUp, nls.localize('parameterHintsPreviousIcon', 'Icon for show previous parameter hint.'));\r\nlet ParameterHintsWidget = class ParameterHintsWidget extends Disposable {\r\n constructor(editor, contextKeyService, openerService, modeService) {\r\n super();\r\n this.editor = editor;\r\n this.renderDisposeables = this._register(new DisposableStore());\r\n this.visible = false;\r\n this.announcedLabel = null;\r\n // Editor.IContentWidget.allowEditorOverflow\r\n this.allowEditorOverflow = true;\r\n this.markdownRenderer = this._register(new MarkdownRenderer({ editor }, modeService, openerService));\r\n this.model = this._register(new ParameterHintsModel(editor));\r\n this.keyVisible = Context.Visible.bindTo(contextKeyService);\r\n this.keyMultipleSignatures = Context.MultipleSignatures.bindTo(contextKeyService);\r\n this._register(this.model.onChangedHints(newParameterHints => {\r\n if (newParameterHints) {\r\n this.show();\r\n this.render(newParameterHints);\r\n }\r\n else {\r\n this.hide();\r\n }\r\n }));\r\n }\r\n createParamaterHintDOMNodes() {\r\n const element = $('.editor-widget.parameter-hints-widget');\r\n const wrapper = dom.append(element, $('.phwrapper'));\r\n wrapper.tabIndex = -1;\r\n const controls = dom.append(wrapper, $('.controls'));\r\n const previous = dom.append(controls, $('.button' + ThemeIcon.asCSSSelector(parameterHintsPreviousIcon)));\r\n const overloads = dom.append(controls, $('.overloads'));\r\n const next = dom.append(controls, $('.button' + ThemeIcon.asCSSSelector(parameterHintsNextIcon)));\r\n const onPreviousClick = stop(domEvent(previous, 'click'));\r\n this._register(onPreviousClick(this.previous, this));\r\n const onNextClick = stop(domEvent(next, 'click'));\r\n this._register(onNextClick(this.next, this));\r\n const body = $('.body');\r\n const scrollbar = new DomScrollableElement(body, {});\r\n this._register(scrollbar);\r\n wrapper.appendChild(scrollbar.getDomNode());\r\n const signature = dom.append(body, $('.signature'));\r\n const docs = dom.append(body, $('.docs'));\r\n element.style.userSelect = 'text';\r\n this.domNodes = {\r\n element,\r\n signature,\r\n overloads,\r\n docs,\r\n scrollbar,\r\n };\r\n this.editor.addContentWidget(this);\r\n this.hide();\r\n this._register(this.editor.onDidChangeCursorSelection(e => {\r\n if (this.visible) {\r\n this.editor.layoutContentWidget(this);\r\n }\r\n }));\r\n const updateFont = () => {\r\n if (!this.domNodes) {\r\n return;\r\n }\r\n const fontInfo = this.editor.getOption(38 /* fontInfo */);\r\n this.domNodes.element.style.fontSize = `${fontInfo.fontSize}px`;\r\n };\r\n updateFont();\r\n this._register(Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor))\r\n .filter(e => e.hasChanged(38 /* fontInfo */))\r\n .on(updateFont, null));\r\n this._register(this.editor.onDidLayoutChange(e => this.updateMaxHeight()));\r\n this.updateMaxHeight();\r\n }\r\n show() {\r\n if (this.visible) {\r\n return;\r\n }\r\n if (!this.domNodes) {\r\n this.createParamaterHintDOMNodes();\r\n }\r\n this.keyVisible.set(true);\r\n this.visible = true;\r\n setTimeout(() => {\r\n if (this.domNodes) {\r\n this.domNodes.element.classList.add('visible');\r\n }\r\n }, 100);\r\n this.editor.layoutContentWidget(this);\r\n }\r\n hide() {\r\n this.renderDisposeables.clear();\r\n if (!this.visible) {\r\n return;\r\n }\r\n this.keyVisible.reset();\r\n this.visible = false;\r\n this.announcedLabel = null;\r\n if (this.domNodes) {\r\n this.domNodes.element.classList.remove('visible');\r\n }\r\n this.editor.layoutContentWidget(this);\r\n }\r\n getPosition() {\r\n if (this.visible) {\r\n return {\r\n position: this.editor.getPosition(),\r\n preference: [1 /* ABOVE */, 2 /* BELOW */]\r\n };\r\n }\r\n return null;\r\n }\r\n render(hints) {\r\n var _a;\r\n this.renderDisposeables.clear();\r\n if (!this.domNodes) {\r\n return;\r\n }\r\n const multiple = hints.signatures.length > 1;\r\n this.domNodes.element.classList.toggle('multiple', multiple);\r\n this.keyMultipleSignatures.set(multiple);\r\n this.domNodes.signature.innerText = '';\r\n this.domNodes.docs.innerText = '';\r\n const signature = hints.signatures[hints.activeSignature];\r\n if (!signature) {\r\n return;\r\n }\r\n const code = dom.append(this.domNodes.signature, $('.code'));\r\n const fontInfo = this.editor.getOption(38 /* fontInfo */);\r\n code.style.fontSize = `${fontInfo.fontSize}px`;\r\n code.style.fontFamily = fontInfo.fontFamily;\r\n const hasParameters = signature.parameters.length > 0;\r\n const activeParameterIndex = (_a = signature.activeParameter) !== null && _a !== void 0 ? _a : hints.activeParameter;\r\n if (!hasParameters) {\r\n const label = dom.append(code, $('span'));\r\n label.textContent = signature.label;\r\n }\r\n else {\r\n this.renderParameters(code, signature, activeParameterIndex);\r\n }\r\n const activeParameter = signature.parameters[activeParameterIndex];\r\n if (activeParameter === null || activeParameter === void 0 ? void 0 : activeParameter.documentation) {\r\n const documentation = $('span.documentation');\r\n if (typeof activeParameter.documentation === 'string') {\r\n documentation.textContent = activeParameter.documentation;\r\n }\r\n else {\r\n const renderedContents = this.renderMarkdownDocs(activeParameter.documentation);\r\n documentation.appendChild(renderedContents.element);\r\n }\r\n dom.append(this.domNodes.docs, $('p', {}, documentation));\r\n }\r\n if (signature.documentation === undefined) {\r\n /** no op */\r\n }\r\n else if (typeof signature.documentation === 'string') {\r\n dom.append(this.domNodes.docs, $('p', {}, signature.documentation));\r\n }\r\n else {\r\n const renderedContents = this.renderMarkdownDocs(signature.documentation);\r\n dom.append(this.domNodes.docs, renderedContents.element);\r\n }\r\n const hasDocs = this.hasDocs(signature, activeParameter);\r\n this.domNodes.signature.classList.toggle('has-docs', hasDocs);\r\n this.domNodes.docs.classList.toggle('empty', !hasDocs);\r\n this.domNodes.overloads.textContent =\r\n String(hints.activeSignature + 1).padStart(hints.signatures.length.toString().length, '0') + '/' + hints.signatures.length;\r\n if (activeParameter) {\r\n const labelToAnnounce = this.getParameterLabel(signature, activeParameterIndex);\r\n // Select method gets called on every user type while parameter hints are visible.\r\n // We do not want to spam the user with same announcements, so we only announce if the current parameter changed.\r\n if (this.announcedLabel !== labelToAnnounce) {\r\n aria.alert(nls.localize('hint', \"{0}, hint\", labelToAnnounce));\r\n this.announcedLabel = labelToAnnounce;\r\n }\r\n }\r\n this.editor.layoutContentWidget(this);\r\n this.domNodes.scrollbar.scanDomNode();\r\n }\r\n renderMarkdownDocs(markdown) {\r\n const renderedContents = this.renderDisposeables.add(this.markdownRenderer.render(markdown, {\r\n asyncRenderCallback: () => {\r\n var _a;\r\n (_a = this.domNodes) === null || _a === void 0 ? void 0 : _a.scrollbar.scanDomNode();\r\n }\r\n }));\r\n renderedContents.element.classList.add('markdown-docs');\r\n return renderedContents;\r\n }\r\n hasDocs(signature, activeParameter) {\r\n if (activeParameter && typeof activeParameter.documentation === 'string' && assertIsDefined(activeParameter.documentation).length > 0) {\r\n return true;\r\n }\r\n if (activeParameter && typeof activeParameter.documentation === 'object' && assertIsDefined(activeParameter.documentation).value.length > 0) {\r\n return true;\r\n }\r\n if (signature.documentation && typeof signature.documentation === 'string' && assertIsDefined(signature.documentation).length > 0) {\r\n return true;\r\n }\r\n if (signature.documentation && typeof signature.documentation === 'object' && assertIsDefined(signature.documentation.value).length > 0) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n renderParameters(parent, signature, activeParameterIndex) {\r\n const [start, end] = this.getParameterLabelOffsets(signature, activeParameterIndex);\r\n const beforeSpan = document.createElement('span');\r\n beforeSpan.textContent = signature.label.substring(0, start);\r\n const paramSpan = document.createElement('span');\r\n paramSpan.textContent = signature.label.substring(start, end);\r\n paramSpan.className = 'parameter active';\r\n const afterSpan = document.createElement('span');\r\n afterSpan.textContent = signature.label.substring(end);\r\n dom.append(parent, beforeSpan, paramSpan, afterSpan);\r\n }\r\n getParameterLabel(signature, paramIdx) {\r\n const param = signature.parameters[paramIdx];\r\n if (Array.isArray(param.label)) {\r\n return signature.label.substring(param.label[0], param.label[1]);\r\n }\r\n else {\r\n return param.label;\r\n }\r\n }\r\n getParameterLabelOffsets(signature, paramIdx) {\r\n const param = signature.parameters[paramIdx];\r\n if (!param) {\r\n return [0, 0];\r\n }\r\n else if (Array.isArray(param.label)) {\r\n return param.label;\r\n }\r\n else if (!param.label.length) {\r\n return [0, 0];\r\n }\r\n else {\r\n const regex = new RegExp(`(\\\\W|^)${escapeRegExpCharacters(param.label)}(?=\\\\W|$)`, 'g');\r\n regex.test(signature.label);\r\n const idx = regex.lastIndex - param.label.length;\r\n return idx >= 0\r\n ? [idx, regex.lastIndex]\r\n : [0, 0];\r\n }\r\n }\r\n next() {\r\n this.editor.focus();\r\n this.model.next();\r\n }\r\n previous() {\r\n this.editor.focus();\r\n this.model.previous();\r\n }\r\n cancel() {\r\n this.model.cancel();\r\n }\r\n getDomNode() {\r\n if (!this.domNodes) {\r\n this.createParamaterHintDOMNodes();\r\n }\r\n return this.domNodes.element;\r\n }\r\n getId() {\r\n return ParameterHintsWidget.ID;\r\n }\r\n trigger(context) {\r\n this.model.trigger(context, 0);\r\n }\r\n updateMaxHeight() {\r\n if (!this.domNodes) {\r\n return;\r\n }\r\n const height = Math.max(this.editor.getLayoutInfo().height / 4, 250);\r\n const maxHeight = `${height}px`;\r\n this.domNodes.element.style.maxHeight = maxHeight;\r\n const wrapper = this.domNodes.element.getElementsByClassName('phwrapper');\r\n if (wrapper.length) {\r\n wrapper[0].style.maxHeight = maxHeight;\r\n }\r\n }\r\n};\r\nParameterHintsWidget.ID = 'editor.widget.parameterHintsWidget';\r\nParameterHintsWidget = __decorate([\r\n __param(1, IContextKeyService),\r\n __param(2, IOpenerService),\r\n __param(3, IModeService)\r\n], ParameterHintsWidget);\r\nexport { ParameterHintsWidget };\r\nregisterThemingParticipant((theme, collector) => {\r\n const border = theme.getColor(editorHoverBorder);\r\n if (border) {\r\n const borderWidth = theme.type === ColorScheme.HIGH_CONTRAST ? 2 : 1;\r\n collector.addRule(`.monaco-editor .parameter-hints-widget { border: ${borderWidth}px solid ${border}; }`);\r\n collector.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${border.transparent(0.5)}; }`);\r\n collector.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${border.transparent(0.5)}; }`);\r\n }\r\n const background = theme.getColor(editorHoverBackground);\r\n if (background) {\r\n collector.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${background}; }`);\r\n }\r\n const link = theme.getColor(textLinkForeground);\r\n if (link) {\r\n collector.addRule(`.monaco-editor .parameter-hints-widget a { color: ${link}; }`);\r\n }\r\n const foreground = theme.getColor(editorHoverForeground);\r\n if (foreground) {\r\n collector.addRule(`.monaco-editor .parameter-hints-widget { color: ${foreground}; }`);\r\n }\r\n const codeBackground = theme.getColor(textCodeBlockBackground);\r\n if (codeBackground) {\r\n collector.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${codeBackground}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { registerEditorAction, registerEditorContribution, EditorAction, EditorCommand, registerEditorCommand } from '../../browser/editorExtensions.js';\r\nimport { ParameterHintsWidget } from './parameterHintsWidget.js';\r\nimport { Context } from './provideSignatureHelp.js';\r\nimport * as modes from '../../common/modes.js';\r\nlet ParameterHintsController = class ParameterHintsController extends Disposable {\r\n constructor(editor, instantiationService) {\r\n super();\r\n this.editor = editor;\r\n this.widget = this._register(instantiationService.createInstance(ParameterHintsWidget, this.editor));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(ParameterHintsController.ID);\r\n }\r\n cancel() {\r\n this.widget.cancel();\r\n }\r\n previous() {\r\n this.widget.previous();\r\n }\r\n next() {\r\n this.widget.next();\r\n }\r\n trigger(context) {\r\n this.widget.trigger(context);\r\n }\r\n};\r\nParameterHintsController.ID = 'editor.controller.parameterHints';\r\nParameterHintsController = __decorate([\r\n __param(1, IInstantiationService)\r\n], ParameterHintsController);\r\nexport class TriggerParameterHintsAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.triggerParameterHints',\r\n label: nls.localize('parameterHints.trigger.label', \"Trigger Parameter Hints\"),\r\n alias: 'Trigger Parameter Hints',\r\n precondition: EditorContextKeys.hasSignatureHelpProvider,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 10 /* Space */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const controller = ParameterHintsController.get(editor);\r\n if (controller) {\r\n controller.trigger({\r\n triggerKind: modes.SignatureHelpTriggerKind.Invoke\r\n });\r\n }\r\n }\r\n}\r\nregisterEditorContribution(ParameterHintsController.ID, ParameterHintsController);\r\nregisterEditorAction(TriggerParameterHintsAction);\r\nconst weight = 100 /* EditorContrib */ + 75;\r\nconst ParameterHintsCommand = EditorCommand.bindToContribution(ParameterHintsController.get);\r\nregisterEditorCommand(new ParameterHintsCommand({\r\n id: 'closeParameterHints',\r\n precondition: Context.Visible,\r\n handler: x => x.cancel(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\nregisterEditorCommand(new ParameterHintsCommand({\r\n id: 'showPrevParameterHint',\r\n precondition: ContextKeyExpr.and(Context.Visible, Context.MultipleSignatures),\r\n handler: x => x.previous(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 16 /* UpArrow */,\r\n secondary: [512 /* Alt */ | 16 /* UpArrow */],\r\n mac: { primary: 16 /* UpArrow */, secondary: [512 /* Alt */ | 16 /* UpArrow */, 256 /* WinCtrl */ | 46 /* KEY_P */] }\r\n }\r\n}));\r\nregisterEditorCommand(new ParameterHintsCommand({\r\n id: 'showNextParameterHint',\r\n precondition: ContextKeyExpr.and(Context.Visible, Context.MultipleSignatures),\r\n handler: x => x.next(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 18 /* DownArrow */,\r\n secondary: [512 /* Alt */ | 18 /* DownArrow */],\r\n mac: { primary: 18 /* DownArrow */, secondary: [512 /* Alt */ | 18 /* DownArrow */, 256 /* WinCtrl */ | 44 /* KEY_N */] }\r\n }\r\n}));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport './renameInputField.css';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { localize } from '../../../nls.js';\r\nimport { IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { inputBackground, inputBorder, inputForeground, widgetShadow, editorWidgetBackground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { IThemeService } from '../../../platform/theme/common/themeService.js';\r\nimport { IKeybindingService } from '../../../platform/keybinding/common/keybinding.js';\r\nexport const CONTEXT_RENAME_INPUT_VISIBLE = new RawContextKey('renameInputVisible', false);\r\nlet RenameInputField = class RenameInputField {\r\n constructor(_editor, _acceptKeybindings, _themeService, _keybindingService, contextKeyService) {\r\n this._editor = _editor;\r\n this._acceptKeybindings = _acceptKeybindings;\r\n this._themeService = _themeService;\r\n this._keybindingService = _keybindingService;\r\n this._disposables = new DisposableStore();\r\n this.allowEditorOverflow = true;\r\n this._visibleContextKey = CONTEXT_RENAME_INPUT_VISIBLE.bindTo(contextKeyService);\r\n this._editor.addContentWidget(this);\r\n this._disposables.add(this._editor.onDidChangeConfiguration(e => {\r\n if (e.hasChanged(38 /* fontInfo */)) {\r\n this._updateFont();\r\n }\r\n }));\r\n this._disposables.add(_themeService.onDidColorThemeChange(this._updateStyles, this));\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this._editor.removeContentWidget(this);\r\n }\r\n getId() {\r\n return '__renameInputWidget';\r\n }\r\n getDomNode() {\r\n if (!this._domNode) {\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = 'monaco-editor rename-box';\r\n this._input = document.createElement('input');\r\n this._input.className = 'rename-input';\r\n this._input.type = 'text';\r\n this._input.setAttribute('aria-label', localize('renameAriaLabel', \"Rename input. Type new name and press Enter to commit.\"));\r\n this._domNode.appendChild(this._input);\r\n this._label = document.createElement('div');\r\n this._label.className = 'rename-label';\r\n this._domNode.appendChild(this._label);\r\n const updateLabel = () => {\r\n var _a, _b;\r\n const [accept, preview] = this._acceptKeybindings;\r\n this._keybindingService.lookupKeybinding(accept);\r\n this._label.innerText = localize({ key: 'label', comment: ['placeholders are keybindings, e.g \"F2 to Rename, Shift+F2 to Preview\"'] }, \"{0} to Rename, {1} to Preview\", (_a = this._keybindingService.lookupKeybinding(accept)) === null || _a === void 0 ? void 0 : _a.getLabel(), (_b = this._keybindingService.lookupKeybinding(preview)) === null || _b === void 0 ? void 0 : _b.getLabel());\r\n };\r\n updateLabel();\r\n this._disposables.add(this._keybindingService.onDidUpdateKeybindings(updateLabel));\r\n this._updateFont();\r\n this._updateStyles(this._themeService.getColorTheme());\r\n }\r\n return this._domNode;\r\n }\r\n _updateStyles(theme) {\r\n var _a, _b, _c, _d;\r\n if (!this._input || !this._domNode) {\r\n return;\r\n }\r\n const widgetShadowColor = theme.getColor(widgetShadow);\r\n this._domNode.style.backgroundColor = String((_a = theme.getColor(editorWidgetBackground)) !== null && _a !== void 0 ? _a : '');\r\n this._domNode.style.boxShadow = widgetShadowColor ? ` 0 0 8px 2px ${widgetShadowColor}` : '';\r\n this._domNode.style.color = String((_b = theme.getColor(inputForeground)) !== null && _b !== void 0 ? _b : '');\r\n this._input.style.backgroundColor = String((_c = theme.getColor(inputBackground)) !== null && _c !== void 0 ? _c : '');\r\n // this._input.style.color = String(theme.getColor(inputForeground) ?? '');\r\n const border = theme.getColor(inputBorder);\r\n this._input.style.borderWidth = border ? '1px' : '0px';\r\n this._input.style.borderStyle = border ? 'solid' : 'none';\r\n this._input.style.borderColor = (_d = border === null || border === void 0 ? void 0 : border.toString()) !== null && _d !== void 0 ? _d : 'none';\r\n }\r\n _updateFont() {\r\n if (!this._input || !this._label) {\r\n return;\r\n }\r\n const fontInfo = this._editor.getOption(38 /* fontInfo */);\r\n this._input.style.fontFamily = fontInfo.fontFamily;\r\n this._input.style.fontWeight = fontInfo.fontWeight;\r\n this._input.style.fontSize = `${fontInfo.fontSize}px`;\r\n this._label.style.fontSize = `${fontInfo.fontSize * 0.8}px`;\r\n }\r\n getPosition() {\r\n if (!this._visible) {\r\n return null;\r\n }\r\n return {\r\n position: this._position,\r\n preference: [2 /* BELOW */, 1 /* ABOVE */]\r\n };\r\n }\r\n afterRender(position) {\r\n if (!position) {\r\n // cancel rename when input widget isn't rendered anymore\r\n this.cancelInput(true);\r\n }\r\n }\r\n acceptInput(wantsPreview) {\r\n if (this._currentAcceptInput) {\r\n this._currentAcceptInput(wantsPreview);\r\n }\r\n }\r\n cancelInput(focusEditor) {\r\n if (this._currentCancelInput) {\r\n this._currentCancelInput(focusEditor);\r\n }\r\n }\r\n getInput(where, value, selectionStart, selectionEnd, supportPreview, token) {\r\n this._domNode.classList.toggle('preview', supportPreview);\r\n this._position = new Position(where.startLineNumber, where.startColumn);\r\n this._input.value = value;\r\n this._input.setAttribute('selectionStart', selectionStart.toString());\r\n this._input.setAttribute('selectionEnd', selectionEnd.toString());\r\n this._input.size = Math.max((where.endColumn - where.startColumn) * 1.1, 20);\r\n const disposeOnDone = new DisposableStore();\r\n return new Promise(resolve => {\r\n this._currentCancelInput = (focusEditor) => {\r\n this._currentAcceptInput = undefined;\r\n this._currentCancelInput = undefined;\r\n resolve(focusEditor);\r\n return true;\r\n };\r\n this._currentAcceptInput = (wantsPreview) => {\r\n if (this._input.value.trim().length === 0 || this._input.value === value) {\r\n // empty or whitespace only or not changed\r\n this.cancelInput(true);\r\n return;\r\n }\r\n this._currentAcceptInput = undefined;\r\n this._currentCancelInput = undefined;\r\n resolve({\r\n newName: this._input.value,\r\n wantsPreview: supportPreview && wantsPreview\r\n });\r\n };\r\n token.onCancellationRequested(() => this.cancelInput(true));\r\n disposeOnDone.add(this._editor.onDidBlurEditorWidget(() => this.cancelInput(false)));\r\n this._show();\r\n }).finally(() => {\r\n disposeOnDone.dispose();\r\n this._hide();\r\n });\r\n }\r\n _show() {\r\n this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber, 0 /* Smooth */);\r\n this._visible = true;\r\n this._visibleContextKey.set(true);\r\n this._editor.layoutContentWidget(this);\r\n setTimeout(() => {\r\n this._input.focus();\r\n this._input.setSelectionRange(parseInt(this._input.getAttribute('selectionStart')), parseInt(this._input.getAttribute('selectionEnd')));\r\n }, 100);\r\n }\r\n _hide() {\r\n this._visible = false;\r\n this._visibleContextKey.reset();\r\n this._editor.layoutContentWidget(this);\r\n }\r\n};\r\nRenameInputField = __decorate([\r\n __param(2, IThemeService),\r\n __param(3, IKeybindingService),\r\n __param(4, IContextKeyService)\r\n], RenameInputField);\r\nexport { RenameInputField };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { IEditorProgressService } from '../../../platform/progress/common/progress.js';\r\nimport { registerEditorAction, registerEditorContribution, EditorAction, EditorCommand, registerEditorCommand, registerModelAndPositionCommand } from '../../browser/editorExtensions.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { RenameInputField, CONTEXT_RENAME_INPUT_VISIBLE } from './renameInputField.js';\r\nimport { RenameProviderRegistry } from '../../common/modes.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { alert } from '../../../base/browser/ui/aria/aria.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { MessageController } from '../message/messageController.js';\r\nimport { EditorStateCancellationTokenSource } from '../../browser/core/editorState.js';\r\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\r\nimport { IBulkEditService, ResourceEdit } from '../../browser/services/bulkEditService.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\r\nimport { CancellationToken, CancellationTokenSource } from '../../../base/common/cancellation.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { IdleValue, raceCancellation } from '../../../base/common/async.js';\r\nimport { ILogService } from '../../../platform/log/common/log.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { Registry } from '../../../platform/registry/common/platform.js';\r\nimport { Extensions } from '../../../platform/configuration/common/configurationRegistry.js';\r\nimport { ITextResourceConfigurationService } from '../../common/services/textResourceConfigurationService.js';\r\nimport { assertType } from '../../../base/common/types.js';\r\nclass RenameSkeleton {\r\n constructor(model, position) {\r\n this.model = model;\r\n this.position = position;\r\n this._providerRenameIdx = 0;\r\n this._providers = RenameProviderRegistry.ordered(model);\r\n }\r\n hasProvider() {\r\n return this._providers.length > 0;\r\n }\r\n resolveRenameLocation(token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const rejects = [];\r\n for (this._providerRenameIdx = 0; this._providerRenameIdx < this._providers.length; this._providerRenameIdx++) {\r\n const provider = this._providers[this._providerRenameIdx];\r\n if (!provider.resolveRenameLocation) {\r\n break;\r\n }\r\n let res = yield provider.resolveRenameLocation(this.model, this.position, token);\r\n if (!res) {\r\n continue;\r\n }\r\n if (res.rejectReason) {\r\n rejects.push(res.rejectReason);\r\n continue;\r\n }\r\n return res;\r\n }\r\n const word = this.model.getWordAtPosition(this.position);\r\n if (!word) {\r\n return {\r\n range: Range.fromPositions(this.position),\r\n text: '',\r\n rejectReason: rejects.length > 0 ? rejects.join('\\n') : undefined\r\n };\r\n }\r\n return {\r\n range: new Range(this.position.lineNumber, word.startColumn, this.position.lineNumber, word.endColumn),\r\n text: word.word,\r\n rejectReason: rejects.length > 0 ? rejects.join('\\n') : undefined\r\n };\r\n });\r\n }\r\n provideRenameEdits(newName, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return this._provideRenameEdits(newName, this._providerRenameIdx, [], token);\r\n });\r\n }\r\n _provideRenameEdits(newName, i, rejects, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const provider = this._providers[i];\r\n if (!provider) {\r\n return {\r\n edits: [],\r\n rejectReason: rejects.join('\\n')\r\n };\r\n }\r\n const result = yield provider.provideRenameEdits(this.model, this.position, newName, token);\r\n if (!result) {\r\n return this._provideRenameEdits(newName, i + 1, rejects.concat(nls.localize('no result', \"No result.\")), token);\r\n }\r\n else if (result.rejectReason) {\r\n return this._provideRenameEdits(newName, i + 1, rejects.concat(result.rejectReason), token);\r\n }\r\n return result;\r\n });\r\n }\r\n}\r\nexport function rename(model, position, newName) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const skeleton = new RenameSkeleton(model, position);\r\n const loc = yield skeleton.resolveRenameLocation(CancellationToken.None);\r\n if (loc === null || loc === void 0 ? void 0 : loc.rejectReason) {\r\n return { edits: [], rejectReason: loc.rejectReason };\r\n }\r\n return skeleton.provideRenameEdits(newName, CancellationToken.None);\r\n });\r\n}\r\n// --- register actions and commands\r\nlet RenameController = class RenameController {\r\n constructor(editor, _instaService, _notificationService, _bulkEditService, _progressService, _logService, _configService) {\r\n this.editor = editor;\r\n this._instaService = _instaService;\r\n this._notificationService = _notificationService;\r\n this._bulkEditService = _bulkEditService;\r\n this._progressService = _progressService;\r\n this._logService = _logService;\r\n this._configService = _configService;\r\n this._dispoableStore = new DisposableStore();\r\n this._cts = new CancellationTokenSource();\r\n this._renameInputField = this._dispoableStore.add(new IdleValue(() => this._dispoableStore.add(this._instaService.createInstance(RenameInputField, this.editor, ['acceptRenameInput', 'acceptRenameInputWithPreview']))));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(RenameController.ID);\r\n }\r\n dispose() {\r\n this._dispoableStore.dispose();\r\n this._cts.dispose(true);\r\n }\r\n run() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this._cts.dispose(true);\r\n if (!this.editor.hasModel()) {\r\n return undefined;\r\n }\r\n const position = this.editor.getPosition();\r\n const skeleton = new RenameSkeleton(this.editor.getModel(), position);\r\n if (!skeleton.hasProvider()) {\r\n return undefined;\r\n }\r\n this._cts = new EditorStateCancellationTokenSource(this.editor, 4 /* Position */ | 1 /* Value */);\r\n // resolve rename location\r\n let loc;\r\n try {\r\n const resolveLocationOperation = skeleton.resolveRenameLocation(this._cts.token);\r\n this._progressService.showWhile(resolveLocationOperation, 250);\r\n loc = yield resolveLocationOperation;\r\n }\r\n catch (e) {\r\n MessageController.get(this.editor).showMessage(e || nls.localize('resolveRenameLocationFailed', \"An unknown error occurred while resolving rename location\"), position);\r\n return undefined;\r\n }\r\n if (!loc) {\r\n return undefined;\r\n }\r\n if (loc.rejectReason) {\r\n MessageController.get(this.editor).showMessage(loc.rejectReason, position);\r\n return undefined;\r\n }\r\n if (this._cts.token.isCancellationRequested) {\r\n return undefined;\r\n }\r\n this._cts.dispose();\r\n this._cts = new EditorStateCancellationTokenSource(this.editor, 4 /* Position */ | 1 /* Value */, loc.range);\r\n // do rename at location\r\n let selection = this.editor.getSelection();\r\n let selectionStart = 0;\r\n let selectionEnd = loc.text.length;\r\n if (!Range.isEmpty(selection) && !Range.spansMultipleLines(selection) && Range.containsRange(loc.range, selection)) {\r\n selectionStart = Math.max(0, selection.startColumn - loc.range.startColumn);\r\n selectionEnd = Math.min(loc.range.endColumn, selection.endColumn) - loc.range.startColumn;\r\n }\r\n const supportPreview = this._bulkEditService.hasPreviewHandler() && this._configService.getValue(this.editor.getModel().uri, 'editor.rename.enablePreview');\r\n const inputFieldResult = yield this._renameInputField.value.getInput(loc.range, loc.text, selectionStart, selectionEnd, supportPreview, this._cts.token);\r\n // no result, only hint to focus the editor or not\r\n if (typeof inputFieldResult === 'boolean') {\r\n if (inputFieldResult) {\r\n this.editor.focus();\r\n }\r\n return undefined;\r\n }\r\n this.editor.focus();\r\n const renameOperation = raceCancellation(skeleton.provideRenameEdits(inputFieldResult.newName, this._cts.token), this._cts.token).then((renameResult) => __awaiter(this, void 0, void 0, function* () {\r\n if (!renameResult || !this.editor.hasModel()) {\r\n return;\r\n }\r\n if (renameResult.rejectReason) {\r\n this._notificationService.info(renameResult.rejectReason);\r\n return;\r\n }\r\n this._bulkEditService.apply(ResourceEdit.convert(renameResult), {\r\n editor: this.editor,\r\n showPreview: inputFieldResult.wantsPreview,\r\n label: nls.localize('label', \"Renaming '{0}'\", loc === null || loc === void 0 ? void 0 : loc.text),\r\n quotableLabel: nls.localize('quotableLabel', \"Renaming {0}\", loc === null || loc === void 0 ? void 0 : loc.text),\r\n }).then(result => {\r\n if (result.ariaSummary) {\r\n alert(nls.localize('aria', \"Successfully renamed '{0}' to '{1}'. Summary: {2}\", loc.text, inputFieldResult.newName, result.ariaSummary));\r\n }\r\n }).catch(err => {\r\n this._notificationService.error(nls.localize('rename.failedApply', \"Rename failed to apply edits\"));\r\n this._logService.error(err);\r\n });\r\n }), err => {\r\n this._notificationService.error(nls.localize('rename.failed', \"Rename failed to compute edits\"));\r\n this._logService.error(err);\r\n });\r\n this._progressService.showWhile(renameOperation, 250);\r\n return renameOperation;\r\n });\r\n }\r\n acceptRenameInput(wantsPreview) {\r\n this._renameInputField.value.acceptInput(wantsPreview);\r\n }\r\n cancelRenameInput() {\r\n this._renameInputField.value.cancelInput(true);\r\n }\r\n};\r\nRenameController.ID = 'editor.contrib.renameController';\r\nRenameController = __decorate([\r\n __param(1, IInstantiationService),\r\n __param(2, INotificationService),\r\n __param(3, IBulkEditService),\r\n __param(4, IEditorProgressService),\r\n __param(5, ILogService),\r\n __param(6, ITextResourceConfigurationService)\r\n], RenameController);\r\n// ---- action implementation\r\nexport class RenameAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.rename',\r\n label: nls.localize('rename.label', \"Rename Symbol\"),\r\n alias: 'Rename Symbol',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasRenameProvider),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 60 /* F2 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: '1_modification',\r\n order: 1.1\r\n }\r\n });\r\n }\r\n runCommand(accessor, args) {\r\n const editorService = accessor.get(ICodeEditorService);\r\n const [uri, pos] = Array.isArray(args) && args || [undefined, undefined];\r\n if (URI.isUri(uri) && Position.isIPosition(pos)) {\r\n return editorService.openCodeEditor({ resource: uri }, editorService.getActiveCodeEditor()).then(editor => {\r\n if (!editor) {\r\n return;\r\n }\r\n editor.setPosition(pos);\r\n editor.invokeWithinContext(accessor => {\r\n this.reportTelemetry(accessor, editor);\r\n return this.run(accessor, editor);\r\n });\r\n }, onUnexpectedError);\r\n }\r\n return super.runCommand(accessor, args);\r\n }\r\n run(accessor, editor) {\r\n const controller = RenameController.get(editor);\r\n if (controller) {\r\n return controller.run();\r\n }\r\n return Promise.resolve();\r\n }\r\n}\r\nregisterEditorContribution(RenameController.ID, RenameController);\r\nregisterEditorAction(RenameAction);\r\nconst RenameCommand = EditorCommand.bindToContribution(RenameController.get);\r\nregisterEditorCommand(new RenameCommand({\r\n id: 'acceptRenameInput',\r\n precondition: CONTEXT_RENAME_INPUT_VISIBLE,\r\n handler: x => x.acceptRenameInput(false),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 99,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 3 /* Enter */\r\n }\r\n}));\r\nregisterEditorCommand(new RenameCommand({\r\n id: 'acceptRenameInputWithPreview',\r\n precondition: ContextKeyExpr.and(CONTEXT_RENAME_INPUT_VISIBLE, ContextKeyExpr.has('config.editor.rename.enablePreview')),\r\n handler: x => x.acceptRenameInput(true),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 99,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 1024 /* Shift */ + 3 /* Enter */\r\n }\r\n}));\r\nregisterEditorCommand(new RenameCommand({\r\n id: 'cancelRenameInput',\r\n precondition: CONTEXT_RENAME_INPUT_VISIBLE,\r\n handler: x => x.cancelRenameInput(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 99,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\n// ---- api bridge command\r\nregisterModelAndPositionCommand('_executeDocumentRenameProvider', function (model, position, ...args) {\r\n const [newName] = args;\r\n assertType(typeof newName === 'string');\r\n return rename(model, position, newName);\r\n});\r\n//todo@jrieken use editor options world\r\nRegistry.as(Extensions.Configuration).registerConfiguration({\r\n id: 'editor',\r\n properties: {\r\n 'editor.rename.enablePreview': {\r\n scope: 5 /* LANGUAGE_OVERRIDABLE */,\r\n description: nls.localize('enablePreview', \"Enable/disable the ability to preview changes before renaming\"),\r\n default: true,\r\n type: 'boolean'\r\n }\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Range } from '../../common/core/range.js';\r\nimport { isUpperAsciiLetter, isLowerAsciiLetter } from '../../../base/common/strings.js';\r\nexport class WordSelectionRangeProvider {\r\n provideSelectionRanges(model, positions) {\r\n const result = [];\r\n for (const position of positions) {\r\n const bucket = [];\r\n result.push(bucket);\r\n this._addInWordRanges(bucket, model, position);\r\n this._addWordRanges(bucket, model, position);\r\n this._addWhitespaceLine(bucket, model, position);\r\n bucket.push({ range: model.getFullModelRange() });\r\n }\r\n return result;\r\n }\r\n _addInWordRanges(bucket, model, pos) {\r\n const obj = model.getWordAtPosition(pos);\r\n if (!obj) {\r\n return;\r\n }\r\n let { word, startColumn } = obj;\r\n let offset = pos.column - startColumn;\r\n let start = offset;\r\n let end = offset;\r\n let lastCh = 0;\r\n // LEFT anchor (start)\r\n for (; start >= 0; start--) {\r\n let ch = word.charCodeAt(start);\r\n if ((start !== offset) && (ch === 95 /* Underline */ || ch === 45 /* Dash */)) {\r\n // foo-bar OR foo_bar\r\n break;\r\n }\r\n else if (isLowerAsciiLetter(ch) && isUpperAsciiLetter(lastCh)) {\r\n // fooBar\r\n break;\r\n }\r\n lastCh = ch;\r\n }\r\n start += 1;\r\n // RIGHT anchor (end)\r\n for (; end < word.length; end++) {\r\n let ch = word.charCodeAt(end);\r\n if (isUpperAsciiLetter(ch) && isLowerAsciiLetter(lastCh)) {\r\n // fooBar\r\n break;\r\n }\r\n else if (ch === 95 /* Underline */ || ch === 45 /* Dash */) {\r\n // foo-bar OR foo_bar\r\n break;\r\n }\r\n lastCh = ch;\r\n }\r\n if (start < end) {\r\n bucket.push({ range: new Range(pos.lineNumber, startColumn + start, pos.lineNumber, startColumn + end) });\r\n }\r\n }\r\n _addWordRanges(bucket, model, pos) {\r\n const word = model.getWordAtPosition(pos);\r\n if (word) {\r\n bucket.push({ range: new Range(pos.lineNumber, word.startColumn, pos.lineNumber, word.endColumn) });\r\n }\r\n }\r\n _addWhitespaceLine(bucket, model, pos) {\r\n if (model.getLineLength(pos.lineNumber) > 0\r\n && model.getLineFirstNonWhitespaceColumn(pos.lineNumber) === 0\r\n && model.getLineLastNonWhitespaceColumn(pos.lineNumber) === 0) {\r\n bucket.push({ range: new Range(pos.lineNumber, 1, pos.lineNumber, model.getLineMaxColumn(pos.lineNumber)) });\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { LinkedList } from '../../../base/common/linkedList.js';\r\nexport class BracketSelectionRangeProvider {\r\n provideSelectionRanges(model, positions) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const result = [];\r\n for (const position of positions) {\r\n const bucket = [];\r\n result.push(bucket);\r\n const ranges = new Map();\r\n yield new Promise(resolve => BracketSelectionRangeProvider._bracketsRightYield(resolve, 0, model, position, ranges));\r\n yield new Promise(resolve => BracketSelectionRangeProvider._bracketsLeftYield(resolve, 0, model, position, ranges, bucket));\r\n }\r\n return result;\r\n });\r\n }\r\n static _bracketsRightYield(resolve, round, model, pos, ranges) {\r\n const counts = new Map();\r\n const t1 = Date.now();\r\n while (true) {\r\n if (round >= BracketSelectionRangeProvider._maxRounds) {\r\n resolve();\r\n break;\r\n }\r\n if (!pos) {\r\n resolve();\r\n break;\r\n }\r\n let bracket = model.findNextBracket(pos);\r\n if (!bracket) {\r\n resolve();\r\n break;\r\n }\r\n let d = Date.now() - t1;\r\n if (d > BracketSelectionRangeProvider._maxDuration) {\r\n setTimeout(() => BracketSelectionRangeProvider._bracketsRightYield(resolve, round + 1, model, pos, ranges));\r\n break;\r\n }\r\n const key = bracket.close[0];\r\n if (bracket.isOpen) {\r\n // wait for closing\r\n let val = counts.has(key) ? counts.get(key) : 0;\r\n counts.set(key, val + 1);\r\n }\r\n else {\r\n // process closing\r\n let val = counts.has(key) ? counts.get(key) : 0;\r\n val -= 1;\r\n counts.set(key, Math.max(0, val));\r\n if (val < 0) {\r\n let list = ranges.get(key);\r\n if (!list) {\r\n list = new LinkedList();\r\n ranges.set(key, list);\r\n }\r\n list.push(bracket.range);\r\n }\r\n }\r\n pos = bracket.range.getEndPosition();\r\n }\r\n }\r\n static _bracketsLeftYield(resolve, round, model, pos, ranges, bucket) {\r\n const counts = new Map();\r\n const t1 = Date.now();\r\n while (true) {\r\n if (round >= BracketSelectionRangeProvider._maxRounds && ranges.size === 0) {\r\n resolve();\r\n break;\r\n }\r\n if (!pos) {\r\n resolve();\r\n break;\r\n }\r\n let bracket = model.findPrevBracket(pos);\r\n if (!bracket) {\r\n resolve();\r\n break;\r\n }\r\n let d = Date.now() - t1;\r\n if (d > BracketSelectionRangeProvider._maxDuration) {\r\n setTimeout(() => BracketSelectionRangeProvider._bracketsLeftYield(resolve, round + 1, model, pos, ranges, bucket));\r\n break;\r\n }\r\n const key = bracket.close[0];\r\n if (!bracket.isOpen) {\r\n // wait for opening\r\n let val = counts.has(key) ? counts.get(key) : 0;\r\n counts.set(key, val + 1);\r\n }\r\n else {\r\n // opening\r\n let val = counts.has(key) ? counts.get(key) : 0;\r\n val -= 1;\r\n counts.set(key, Math.max(0, val));\r\n if (val < 0) {\r\n let list = ranges.get(key);\r\n if (list) {\r\n let closing = list.shift();\r\n if (list.size === 0) {\r\n ranges.delete(key);\r\n }\r\n const innerBracket = Range.fromPositions(bracket.range.getEndPosition(), closing.getStartPosition());\r\n const outerBracket = Range.fromPositions(bracket.range.getStartPosition(), closing.getEndPosition());\r\n bucket.push({ range: innerBracket });\r\n bucket.push({ range: outerBracket });\r\n BracketSelectionRangeProvider._addBracketLeading(model, outerBracket, bucket);\r\n }\r\n }\r\n }\r\n pos = bracket.range.getStartPosition();\r\n }\r\n }\r\n static _addBracketLeading(model, bracket, bucket) {\r\n if (bracket.startLineNumber === bracket.endLineNumber) {\r\n return;\r\n }\r\n // xxxxxxxx {\r\n //\r\n // }\r\n const startLine = bracket.startLineNumber;\r\n const column = model.getLineFirstNonWhitespaceColumn(startLine);\r\n if (column !== 0 && column !== bracket.startColumn) {\r\n bucket.push({ range: Range.fromPositions(new Position(startLine, column), bracket.getEndPosition()) });\r\n bucket.push({ range: Range.fromPositions(new Position(startLine, 1), bracket.getEndPosition()) });\r\n }\r\n // xxxxxxxx\r\n // {\r\n //\r\n // }\r\n const aboveLine = startLine - 1;\r\n if (aboveLine > 0) {\r\n const column = model.getLineFirstNonWhitespaceColumn(aboveLine);\r\n if (column === bracket.startColumn && column !== model.getLineLastNonWhitespaceColumn(aboveLine)) {\r\n bucket.push({ range: Range.fromPositions(new Position(aboveLine, column), bracket.getEndPosition()) });\r\n bucket.push({ range: Range.fromPositions(new Position(aboveLine, 1), bracket.getEndPosition()) });\r\n }\r\n }\r\n }\r\n}\r\nBracketSelectionRangeProvider._maxDuration = 30;\r\nBracketSelectionRangeProvider._maxRounds = 2;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport * as arrays from '../../../base/common/arrays.js';\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { EditorAction, registerEditorAction, registerEditorContribution, registerModelCommand } from '../../browser/editorExtensions.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport * as modes from '../../common/modes.js';\r\nimport * as nls from '../../../nls.js';\r\nimport { MenuId } from '../../../platform/actions/common/actions.js';\r\nimport { WordSelectionRangeProvider } from './wordSelections.js';\r\nimport { BracketSelectionRangeProvider } from './bracketSelections.js';\r\nimport { CommandsRegistry } from '../../../platform/commands/common/commands.js';\r\nimport { onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nclass SelectionRanges {\r\n constructor(index, ranges) {\r\n this.index = index;\r\n this.ranges = ranges;\r\n }\r\n mov(fwd) {\r\n let index = this.index + (fwd ? 1 : -1);\r\n if (index < 0 || index >= this.ranges.length) {\r\n return this;\r\n }\r\n const res = new SelectionRanges(index, this.ranges);\r\n if (res.ranges[index].equalsRange(this.ranges[this.index])) {\r\n // next range equals this range, retry with next-next\r\n return res.mov(fwd);\r\n }\r\n return res;\r\n }\r\n}\r\nclass SmartSelectController {\r\n constructor(_editor) {\r\n this._editor = _editor;\r\n this._ignoreSelection = false;\r\n }\r\n static get(editor) {\r\n return editor.getContribution(SmartSelectController.ID);\r\n }\r\n dispose() {\r\n var _a;\r\n (_a = this._selectionListener) === null || _a === void 0 ? void 0 : _a.dispose();\r\n }\r\n run(forward) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const selections = this._editor.getSelections();\r\n const model = this._editor.getModel();\r\n if (!modes.SelectionRangeRegistry.has(model)) {\r\n return;\r\n }\r\n if (!this._state) {\r\n yield provideSelectionRanges(model, selections.map(s => s.getPosition()), this._editor.getOption(97 /* smartSelect */), CancellationToken.None).then(ranges => {\r\n var _a;\r\n if (!arrays.isNonEmptyArray(ranges) || ranges.length !== selections.length) {\r\n // invalid result\r\n return;\r\n }\r\n if (!this._editor.hasModel() || !arrays.equals(this._editor.getSelections(), selections, (a, b) => a.equalsSelection(b))) {\r\n // invalid editor state\r\n return;\r\n }\r\n for (let i = 0; i < ranges.length; i++) {\r\n ranges[i] = ranges[i].filter(range => {\r\n // filter ranges inside the selection\r\n return range.containsPosition(selections[i].getStartPosition()) && range.containsPosition(selections[i].getEndPosition());\r\n });\r\n // prepend current selection\r\n ranges[i].unshift(selections[i]);\r\n }\r\n this._state = ranges.map(ranges => new SelectionRanges(0, ranges));\r\n // listen to caret move and forget about state\r\n (_a = this._selectionListener) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._selectionListener = this._editor.onDidChangeCursorPosition(() => {\r\n var _a;\r\n if (!this._ignoreSelection) {\r\n (_a = this._selectionListener) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._state = undefined;\r\n }\r\n });\r\n });\r\n }\r\n if (!this._state) {\r\n // no state\r\n return;\r\n }\r\n this._state = this._state.map(state => state.mov(forward));\r\n const newSelections = this._state.map(state => Selection.fromPositions(state.ranges[state.index].getStartPosition(), state.ranges[state.index].getEndPosition()));\r\n this._ignoreSelection = true;\r\n try {\r\n this._editor.setSelections(newSelections);\r\n }\r\n finally {\r\n this._ignoreSelection = false;\r\n }\r\n });\r\n }\r\n}\r\nSmartSelectController.ID = 'editor.contrib.smartSelectController';\r\nclass AbstractSmartSelect extends EditorAction {\r\n constructor(forward, opts) {\r\n super(opts);\r\n this._forward = forward;\r\n }\r\n run(_accessor, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n let controller = SmartSelectController.get(editor);\r\n if (controller) {\r\n yield controller.run(this._forward);\r\n }\r\n });\r\n }\r\n}\r\nclass GrowSelectionAction extends AbstractSmartSelect {\r\n constructor() {\r\n super(true, {\r\n id: 'editor.action.smartSelect.expand',\r\n label: nls.localize('smartSelect.expand', \"Expand Selection\"),\r\n alias: 'Expand Selection',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 17 /* RightArrow */,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 256 /* WinCtrl */ | 1024 /* Shift */ | 17 /* RightArrow */,\r\n secondary: [256 /* WinCtrl */ | 1024 /* Shift */ | 17 /* RightArrow */],\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '1_basic',\r\n title: nls.localize({ key: 'miSmartSelectGrow', comment: ['&& denotes a mnemonic'] }, \"&&Expand Selection\"),\r\n order: 2\r\n }\r\n });\r\n }\r\n}\r\n// renamed command id\r\nCommandsRegistry.registerCommandAlias('editor.action.smartSelect.grow', 'editor.action.smartSelect.expand');\r\nclass ShrinkSelectionAction extends AbstractSmartSelect {\r\n constructor() {\r\n super(false, {\r\n id: 'editor.action.smartSelect.shrink',\r\n label: nls.localize('smartSelect.shrink', \"Shrink Selection\"),\r\n alias: 'Shrink Selection',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 512 /* Alt */ | 15 /* LeftArrow */,\r\n mac: {\r\n primary: 2048 /* CtrlCmd */ | 256 /* WinCtrl */ | 1024 /* Shift */ | 15 /* LeftArrow */,\r\n secondary: [256 /* WinCtrl */ | 1024 /* Shift */ | 15 /* LeftArrow */],\r\n },\r\n weight: 100 /* EditorContrib */\r\n },\r\n menuOpts: {\r\n menuId: MenuId.MenubarSelectionMenu,\r\n group: '1_basic',\r\n title: nls.localize({ key: 'miSmartSelectShrink', comment: ['&& denotes a mnemonic'] }, \"&&Shrink Selection\"),\r\n order: 3\r\n }\r\n });\r\n }\r\n}\r\nregisterEditorContribution(SmartSelectController.ID, SmartSelectController);\r\nregisterEditorAction(GrowSelectionAction);\r\nregisterEditorAction(ShrinkSelectionAction);\r\n// word selection\r\nmodes.SelectionRangeRegistry.register('*', new WordSelectionRangeProvider());\r\nexport function provideSelectionRanges(model, positions, options, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const providers = modes.SelectionRangeRegistry.all(model);\r\n if (providers.length === 1) {\r\n // add word selection and bracket selection when no provider exists\r\n providers.unshift(new BracketSelectionRangeProvider());\r\n }\r\n let work = [];\r\n let allRawRanges = [];\r\n for (const provider of providers) {\r\n work.push(Promise.resolve(provider.provideSelectionRanges(model, positions, token)).then(allProviderRanges => {\r\n if (arrays.isNonEmptyArray(allProviderRanges) && allProviderRanges.length === positions.length) {\r\n for (let i = 0; i < positions.length; i++) {\r\n if (!allRawRanges[i]) {\r\n allRawRanges[i] = [];\r\n }\r\n for (const oneProviderRanges of allProviderRanges[i]) {\r\n if (Range.isIRange(oneProviderRanges.range) && Range.containsPosition(oneProviderRanges.range, positions[i])) {\r\n allRawRanges[i].push(Range.lift(oneProviderRanges.range));\r\n }\r\n }\r\n }\r\n }\r\n }, onUnexpectedExternalError));\r\n }\r\n yield Promise.all(work);\r\n return allRawRanges.map(oneRawRanges => {\r\n if (oneRawRanges.length === 0) {\r\n return [];\r\n }\r\n // sort all by start/end position\r\n oneRawRanges.sort((a, b) => {\r\n if (Position.isBefore(a.getStartPosition(), b.getStartPosition())) {\r\n return 1;\r\n }\r\n else if (Position.isBefore(b.getStartPosition(), a.getStartPosition())) {\r\n return -1;\r\n }\r\n else if (Position.isBefore(a.getEndPosition(), b.getEndPosition())) {\r\n return -1;\r\n }\r\n else if (Position.isBefore(b.getEndPosition(), a.getEndPosition())) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n });\r\n // remove ranges that don't contain the former range or that are equal to the\r\n // former range\r\n let oneRanges = [];\r\n let last;\r\n for (const range of oneRawRanges) {\r\n if (!last || (Range.containsRange(range, last) && !Range.equalsRange(range, last))) {\r\n oneRanges.push(range);\r\n last = range;\r\n }\r\n }\r\n if (!options.selectLeadingAndTrailingWhitespace) {\r\n return oneRanges;\r\n }\r\n // add ranges that expand trivia at line starts and ends whenever a range\r\n // wraps onto the a new line\r\n let oneRangesWithTrivia = [oneRanges[0]];\r\n for (let i = 1; i < oneRanges.length; i++) {\r\n const prev = oneRanges[i - 1];\r\n const cur = oneRanges[i];\r\n if (cur.startLineNumber !== prev.startLineNumber || cur.endLineNumber !== prev.endLineNumber) {\r\n // add line/block range without leading/failing whitespace\r\n const rangeNoWhitespace = new Range(prev.startLineNumber, model.getLineFirstNonWhitespaceColumn(prev.startLineNumber), prev.endLineNumber, model.getLineLastNonWhitespaceColumn(prev.endLineNumber));\r\n if (rangeNoWhitespace.containsRange(prev) && !rangeNoWhitespace.equalsRange(prev) && cur.containsRange(rangeNoWhitespace) && !cur.equalsRange(rangeNoWhitespace)) {\r\n oneRangesWithTrivia.push(rangeNoWhitespace);\r\n }\r\n // add line/block range\r\n const rangeFull = new Range(prev.startLineNumber, 1, prev.endLineNumber, model.getLineMaxColumn(prev.endLineNumber));\r\n if (rangeFull.containsRange(prev) && !rangeFull.equalsRange(rangeNoWhitespace) && cur.containsRange(rangeFull) && !cur.equalsRange(rangeFull)) {\r\n oneRangesWithTrivia.push(rangeFull);\r\n }\r\n }\r\n oneRangesWithTrivia.push(cur);\r\n }\r\n return oneRangesWithTrivia;\r\n });\r\n });\r\n}\r\nregisterModelCommand('_executeSelectionRangeProvider', function (model, ...args) {\r\n const [positions] = args;\r\n return provideSelectionRanges(model, positions, { selectLeadingAndTrailingWhitespace: true }, CancellationToken.None);\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport class Scanner {\r\n constructor() {\r\n this.value = '';\r\n this.pos = 0;\r\n }\r\n static isDigitCharacter(ch) {\r\n return ch >= 48 /* Digit0 */ && ch <= 57 /* Digit9 */;\r\n }\r\n static isVariableCharacter(ch) {\r\n return ch === 95 /* Underline */\r\n || (ch >= 97 /* a */ && ch <= 122 /* z */)\r\n || (ch >= 65 /* A */ && ch <= 90 /* Z */);\r\n }\r\n text(value) {\r\n this.value = value;\r\n this.pos = 0;\r\n }\r\n tokenText(token) {\r\n return this.value.substr(token.pos, token.len);\r\n }\r\n next() {\r\n if (this.pos >= this.value.length) {\r\n return { type: 14 /* EOF */, pos: this.pos, len: 0 };\r\n }\r\n let pos = this.pos;\r\n let len = 0;\r\n let ch = this.value.charCodeAt(pos);\r\n let type;\r\n // static types\r\n type = Scanner._table[ch];\r\n if (typeof type === 'number') {\r\n this.pos += 1;\r\n return { type, pos, len: 1 };\r\n }\r\n // number\r\n if (Scanner.isDigitCharacter(ch)) {\r\n type = 8 /* Int */;\r\n do {\r\n len += 1;\r\n ch = this.value.charCodeAt(pos + len);\r\n } while (Scanner.isDigitCharacter(ch));\r\n this.pos += len;\r\n return { type, pos, len };\r\n }\r\n // variable name\r\n if (Scanner.isVariableCharacter(ch)) {\r\n type = 9 /* VariableName */;\r\n do {\r\n ch = this.value.charCodeAt(pos + (++len));\r\n } while (Scanner.isVariableCharacter(ch) || Scanner.isDigitCharacter(ch));\r\n this.pos += len;\r\n return { type, pos, len };\r\n }\r\n // format\r\n type = 10 /* Format */;\r\n do {\r\n len += 1;\r\n ch = this.value.charCodeAt(pos + len);\r\n } while (!isNaN(ch)\r\n && typeof Scanner._table[ch] === 'undefined' // not static token\r\n && !Scanner.isDigitCharacter(ch) // not number\r\n && !Scanner.isVariableCharacter(ch) // not variable\r\n );\r\n this.pos += len;\r\n return { type, pos, len };\r\n }\r\n}\r\nScanner._table = {\r\n [36 /* DollarSign */]: 0 /* Dollar */,\r\n [58 /* Colon */]: 1 /* Colon */,\r\n [44 /* Comma */]: 2 /* Comma */,\r\n [123 /* OpenCurlyBrace */]: 3 /* CurlyOpen */,\r\n [125 /* CloseCurlyBrace */]: 4 /* CurlyClose */,\r\n [92 /* Backslash */]: 5 /* Backslash */,\r\n [47 /* Slash */]: 6 /* Forwardslash */,\r\n [124 /* Pipe */]: 7 /* Pipe */,\r\n [43 /* Plus */]: 11 /* Plus */,\r\n [45 /* Dash */]: 12 /* Dash */,\r\n [63 /* QuestionMark */]: 13 /* QuestionMark */,\r\n};\r\nexport class Marker {\r\n constructor() {\r\n this._children = [];\r\n }\r\n appendChild(child) {\r\n if (child instanceof Text && this._children[this._children.length - 1] instanceof Text) {\r\n // this and previous child are text -> merge them\r\n this._children[this._children.length - 1].value += child.value;\r\n }\r\n else {\r\n // normal adoption of child\r\n child.parent = this;\r\n this._children.push(child);\r\n }\r\n return this;\r\n }\r\n replace(child, others) {\r\n const { parent } = child;\r\n const idx = parent.children.indexOf(child);\r\n const newChildren = parent.children.slice(0);\r\n newChildren.splice(idx, 1, ...others);\r\n parent._children = newChildren;\r\n (function _fixParent(children, parent) {\r\n for (const child of children) {\r\n child.parent = parent;\r\n _fixParent(child.children, child);\r\n }\r\n })(others, parent);\r\n }\r\n get children() {\r\n return this._children;\r\n }\r\n get snippet() {\r\n let candidate = this;\r\n while (true) {\r\n if (!candidate) {\r\n return undefined;\r\n }\r\n if (candidate instanceof TextmateSnippet) {\r\n return candidate;\r\n }\r\n candidate = candidate.parent;\r\n }\r\n }\r\n toString() {\r\n return this.children.reduce((prev, cur) => prev + cur.toString(), '');\r\n }\r\n len() {\r\n return 0;\r\n }\r\n}\r\nexport class Text extends Marker {\r\n constructor(value) {\r\n super();\r\n this.value = value;\r\n }\r\n toString() {\r\n return this.value;\r\n }\r\n len() {\r\n return this.value.length;\r\n }\r\n clone() {\r\n return new Text(this.value);\r\n }\r\n}\r\nexport class TransformableMarker extends Marker {\r\n}\r\nexport class Placeholder extends TransformableMarker {\r\n constructor(index) {\r\n super();\r\n this.index = index;\r\n }\r\n static compareByIndex(a, b) {\r\n if (a.index === b.index) {\r\n return 0;\r\n }\r\n else if (a.isFinalTabstop) {\r\n return 1;\r\n }\r\n else if (b.isFinalTabstop) {\r\n return -1;\r\n }\r\n else if (a.index < b.index) {\r\n return -1;\r\n }\r\n else if (a.index > b.index) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n get isFinalTabstop() {\r\n return this.index === 0;\r\n }\r\n get choice() {\r\n return this._children.length === 1 && this._children[0] instanceof Choice\r\n ? this._children[0]\r\n : undefined;\r\n }\r\n clone() {\r\n let ret = new Placeholder(this.index);\r\n if (this.transform) {\r\n ret.transform = this.transform.clone();\r\n }\r\n ret._children = this.children.map(child => child.clone());\r\n return ret;\r\n }\r\n}\r\nexport class Choice extends Marker {\r\n constructor() {\r\n super(...arguments);\r\n this.options = [];\r\n }\r\n appendChild(marker) {\r\n if (marker instanceof Text) {\r\n marker.parent = this;\r\n this.options.push(marker);\r\n }\r\n return this;\r\n }\r\n toString() {\r\n return this.options[0].value;\r\n }\r\n len() {\r\n return this.options[0].len();\r\n }\r\n clone() {\r\n let ret = new Choice();\r\n this.options.forEach(ret.appendChild, ret);\r\n return ret;\r\n }\r\n}\r\nexport class Transform extends Marker {\r\n constructor() {\r\n super(...arguments);\r\n this.regexp = new RegExp('');\r\n }\r\n resolve(value) {\r\n const _this = this;\r\n let didMatch = false;\r\n let ret = value.replace(this.regexp, function () {\r\n didMatch = true;\r\n return _this._replace(Array.prototype.slice.call(arguments, 0, -2));\r\n });\r\n // when the regex didn't match and when the transform has\r\n // else branches, then run those\r\n if (!didMatch && this._children.some(child => child instanceof FormatString && Boolean(child.elseValue))) {\r\n ret = this._replace([]);\r\n }\r\n return ret;\r\n }\r\n _replace(groups) {\r\n let ret = '';\r\n for (const marker of this._children) {\r\n if (marker instanceof FormatString) {\r\n let value = groups[marker.index] || '';\r\n value = marker.resolve(value);\r\n ret += value;\r\n }\r\n else {\r\n ret += marker.toString();\r\n }\r\n }\r\n return ret;\r\n }\r\n toString() {\r\n return '';\r\n }\r\n clone() {\r\n let ret = new Transform();\r\n ret.regexp = new RegExp(this.regexp.source, '' + (this.regexp.ignoreCase ? 'i' : '') + (this.regexp.global ? 'g' : ''));\r\n ret._children = this.children.map(child => child.clone());\r\n return ret;\r\n }\r\n}\r\nexport class FormatString extends Marker {\r\n constructor(index, shorthandName, ifValue, elseValue) {\r\n super();\r\n this.index = index;\r\n this.shorthandName = shorthandName;\r\n this.ifValue = ifValue;\r\n this.elseValue = elseValue;\r\n }\r\n resolve(value) {\r\n if (this.shorthandName === 'upcase') {\r\n return !value ? '' : value.toLocaleUpperCase();\r\n }\r\n else if (this.shorthandName === 'downcase') {\r\n return !value ? '' : value.toLocaleLowerCase();\r\n }\r\n else if (this.shorthandName === 'capitalize') {\r\n return !value ? '' : (value[0].toLocaleUpperCase() + value.substr(1));\r\n }\r\n else if (this.shorthandName === 'pascalcase') {\r\n return !value ? '' : this._toPascalCase(value);\r\n }\r\n else if (Boolean(value) && typeof this.ifValue === 'string') {\r\n return this.ifValue;\r\n }\r\n else if (!Boolean(value) && typeof this.elseValue === 'string') {\r\n return this.elseValue;\r\n }\r\n else {\r\n return value || '';\r\n }\r\n }\r\n _toPascalCase(value) {\r\n const match = value.match(/[a-z]+/gi);\r\n if (!match) {\r\n return value;\r\n }\r\n return match.map(function (word) {\r\n return word.charAt(0).toUpperCase()\r\n + word.substr(1).toLowerCase();\r\n })\r\n .join('');\r\n }\r\n clone() {\r\n let ret = new FormatString(this.index, this.shorthandName, this.ifValue, this.elseValue);\r\n return ret;\r\n }\r\n}\r\nexport class Variable extends TransformableMarker {\r\n constructor(name) {\r\n super();\r\n this.name = name;\r\n }\r\n resolve(resolver) {\r\n let value = resolver.resolve(this);\r\n if (this.transform) {\r\n value = this.transform.resolve(value || '');\r\n }\r\n if (value !== undefined) {\r\n this._children = [new Text(value)];\r\n return true;\r\n }\r\n return false;\r\n }\r\n clone() {\r\n const ret = new Variable(this.name);\r\n if (this.transform) {\r\n ret.transform = this.transform.clone();\r\n }\r\n ret._children = this.children.map(child => child.clone());\r\n return ret;\r\n }\r\n}\r\nfunction walk(marker, visitor) {\r\n const stack = [...marker];\r\n while (stack.length > 0) {\r\n const marker = stack.shift();\r\n const recurse = visitor(marker);\r\n if (!recurse) {\r\n break;\r\n }\r\n stack.unshift(...marker.children);\r\n }\r\n}\r\nexport class TextmateSnippet extends Marker {\r\n get placeholderInfo() {\r\n if (!this._placeholders) {\r\n // fill in placeholders\r\n let all = [];\r\n let last;\r\n this.walk(function (candidate) {\r\n if (candidate instanceof Placeholder) {\r\n all.push(candidate);\r\n last = !last || last.index < candidate.index ? candidate : last;\r\n }\r\n return true;\r\n });\r\n this._placeholders = { all, last };\r\n }\r\n return this._placeholders;\r\n }\r\n get placeholders() {\r\n const { all } = this.placeholderInfo;\r\n return all;\r\n }\r\n offset(marker) {\r\n let pos = 0;\r\n let found = false;\r\n this.walk(candidate => {\r\n if (candidate === marker) {\r\n found = true;\r\n return false;\r\n }\r\n pos += candidate.len();\r\n return true;\r\n });\r\n if (!found) {\r\n return -1;\r\n }\r\n return pos;\r\n }\r\n fullLen(marker) {\r\n let ret = 0;\r\n walk([marker], marker => {\r\n ret += marker.len();\r\n return true;\r\n });\r\n return ret;\r\n }\r\n enclosingPlaceholders(placeholder) {\r\n let ret = [];\r\n let { parent } = placeholder;\r\n while (parent) {\r\n if (parent instanceof Placeholder) {\r\n ret.push(parent);\r\n }\r\n parent = parent.parent;\r\n }\r\n return ret;\r\n }\r\n resolveVariables(resolver) {\r\n this.walk(candidate => {\r\n if (candidate instanceof Variable) {\r\n if (candidate.resolve(resolver)) {\r\n this._placeholders = undefined;\r\n }\r\n }\r\n return true;\r\n });\r\n return this;\r\n }\r\n appendChild(child) {\r\n this._placeholders = undefined;\r\n return super.appendChild(child);\r\n }\r\n replace(child, others) {\r\n this._placeholders = undefined;\r\n return super.replace(child, others);\r\n }\r\n clone() {\r\n let ret = new TextmateSnippet();\r\n this._children = this.children.map(child => child.clone());\r\n return ret;\r\n }\r\n walk(visitor) {\r\n walk(this.children, visitor);\r\n }\r\n}\r\nexport class SnippetParser {\r\n constructor() {\r\n this._scanner = new Scanner();\r\n this._token = { type: 14 /* EOF */, pos: 0, len: 0 };\r\n }\r\n static escape(value) {\r\n return value.replace(/\\$|}|\\\\/g, '\\\\$&');\r\n }\r\n static guessNeedsClipboard(template) {\r\n return /\\${?CLIPBOARD/.test(template);\r\n }\r\n parse(value, insertFinalTabstop, enforceFinalTabstop) {\r\n this._scanner.text(value);\r\n this._token = this._scanner.next();\r\n const snippet = new TextmateSnippet();\r\n while (this._parse(snippet)) {\r\n // nothing\r\n }\r\n // fill in values for placeholders. the first placeholder of an index\r\n // that has a value defines the value for all placeholders with that index\r\n const placeholderDefaultValues = new Map();\r\n const incompletePlaceholders = [];\r\n let placeholderCount = 0;\r\n snippet.walk(marker => {\r\n if (marker instanceof Placeholder) {\r\n placeholderCount += 1;\r\n if (marker.isFinalTabstop) {\r\n placeholderDefaultValues.set(0, undefined);\r\n }\r\n else if (!placeholderDefaultValues.has(marker.index) && marker.children.length > 0) {\r\n placeholderDefaultValues.set(marker.index, marker.children);\r\n }\r\n else {\r\n incompletePlaceholders.push(marker);\r\n }\r\n }\r\n return true;\r\n });\r\n for (const placeholder of incompletePlaceholders) {\r\n const defaultValues = placeholderDefaultValues.get(placeholder.index);\r\n if (defaultValues) {\r\n const clone = new Placeholder(placeholder.index);\r\n clone.transform = placeholder.transform;\r\n for (const child of defaultValues) {\r\n clone.appendChild(child.clone());\r\n }\r\n snippet.replace(placeholder, [clone]);\r\n }\r\n }\r\n if (!enforceFinalTabstop) {\r\n enforceFinalTabstop = placeholderCount > 0 && insertFinalTabstop;\r\n }\r\n if (!placeholderDefaultValues.has(0) && enforceFinalTabstop) {\r\n // the snippet uses placeholders but has no\r\n // final tabstop defined -> insert at the end\r\n snippet.appendChild(new Placeholder(0));\r\n }\r\n return snippet;\r\n }\r\n _accept(type, value) {\r\n if (type === undefined || this._token.type === type) {\r\n let ret = !value ? true : this._scanner.tokenText(this._token);\r\n this._token = this._scanner.next();\r\n return ret;\r\n }\r\n return false;\r\n }\r\n _backTo(token) {\r\n this._scanner.pos = token.pos + token.len;\r\n this._token = token;\r\n return false;\r\n }\r\n _until(type) {\r\n const start = this._token;\r\n while (this._token.type !== type) {\r\n if (this._token.type === 14 /* EOF */) {\r\n return false;\r\n }\r\n else if (this._token.type === 5 /* Backslash */) {\r\n const nextToken = this._scanner.next();\r\n if (nextToken.type !== 0 /* Dollar */\r\n && nextToken.type !== 4 /* CurlyClose */\r\n && nextToken.type !== 5 /* Backslash */) {\r\n return false;\r\n }\r\n }\r\n this._token = this._scanner.next();\r\n }\r\n const value = this._scanner.value.substring(start.pos, this._token.pos).replace(/\\\\(\\$|}|\\\\)/g, '$1');\r\n this._token = this._scanner.next();\r\n return value;\r\n }\r\n _parse(marker) {\r\n return this._parseEscaped(marker)\r\n || this._parseTabstopOrVariableName(marker)\r\n || this._parseComplexPlaceholder(marker)\r\n || this._parseComplexVariable(marker)\r\n || this._parseAnything(marker);\r\n }\r\n // \\$, \\\\, \\} -> just text\r\n _parseEscaped(marker) {\r\n let value;\r\n if (value = this._accept(5 /* Backslash */, true)) {\r\n // saw a backslash, append escaped token or that backslash\r\n value = this._accept(0 /* Dollar */, true)\r\n || this._accept(4 /* CurlyClose */, true)\r\n || this._accept(5 /* Backslash */, true)\r\n || value;\r\n marker.appendChild(new Text(value));\r\n return true;\r\n }\r\n return false;\r\n }\r\n // $foo -> variable, $1 -> tabstop\r\n _parseTabstopOrVariableName(parent) {\r\n let value;\r\n const token = this._token;\r\n const match = this._accept(0 /* Dollar */)\r\n && (value = this._accept(9 /* VariableName */, true) || this._accept(8 /* Int */, true));\r\n if (!match) {\r\n return this._backTo(token);\r\n }\r\n parent.appendChild(/^\\d+$/.test(value)\r\n ? new Placeholder(Number(value))\r\n : new Variable(value));\r\n return true;\r\n }\r\n // ${1:}, ${1} -> placeholder\r\n _parseComplexPlaceholder(parent) {\r\n let index;\r\n const token = this._token;\r\n const match = this._accept(0 /* Dollar */)\r\n && this._accept(3 /* CurlyOpen */)\r\n && (index = this._accept(8 /* Int */, true));\r\n if (!match) {\r\n return this._backTo(token);\r\n }\r\n const placeholder = new Placeholder(Number(index));\r\n if (this._accept(1 /* Colon */)) {\r\n // ${1:}\r\n while (true) {\r\n // ...} -> done\r\n if (this._accept(4 /* CurlyClose */)) {\r\n parent.appendChild(placeholder);\r\n return true;\r\n }\r\n if (this._parse(placeholder)) {\r\n continue;\r\n }\r\n // fallback\r\n parent.appendChild(new Text('${' + index + ':'));\r\n placeholder.children.forEach(parent.appendChild, parent);\r\n return true;\r\n }\r\n }\r\n else if (placeholder.index > 0 && this._accept(7 /* Pipe */)) {\r\n // ${1|one,two,three|}\r\n const choice = new Choice();\r\n while (true) {\r\n if (this._parseChoiceElement(choice)) {\r\n if (this._accept(2 /* Comma */)) {\r\n // opt, -> more\r\n continue;\r\n }\r\n if (this._accept(7 /* Pipe */)) {\r\n placeholder.appendChild(choice);\r\n if (this._accept(4 /* CurlyClose */)) {\r\n // ..|} -> done\r\n parent.appendChild(placeholder);\r\n return true;\r\n }\r\n }\r\n }\r\n this._backTo(token);\r\n return false;\r\n }\r\n }\r\n else if (this._accept(6 /* Forwardslash */)) {\r\n // ${1///}\r\n if (this._parseTransform(placeholder)) {\r\n parent.appendChild(placeholder);\r\n return true;\r\n }\r\n this._backTo(token);\r\n return false;\r\n }\r\n else if (this._accept(4 /* CurlyClose */)) {\r\n // ${1}\r\n parent.appendChild(placeholder);\r\n return true;\r\n }\r\n else {\r\n // ${1 <- missing curly or colon\r\n return this._backTo(token);\r\n }\r\n }\r\n _parseChoiceElement(parent) {\r\n const token = this._token;\r\n const values = [];\r\n while (true) {\r\n if (this._token.type === 2 /* Comma */ || this._token.type === 7 /* Pipe */) {\r\n break;\r\n }\r\n let value;\r\n if (value = this._accept(5 /* Backslash */, true)) {\r\n // \\, \\|, or \\\\\r\n value = this._accept(2 /* Comma */, true)\r\n || this._accept(7 /* Pipe */, true)\r\n || this._accept(5 /* Backslash */, true)\r\n || value;\r\n }\r\n else {\r\n value = this._accept(undefined, true);\r\n }\r\n if (!value) {\r\n // EOF\r\n this._backTo(token);\r\n return false;\r\n }\r\n values.push(value);\r\n }\r\n if (values.length === 0) {\r\n this._backTo(token);\r\n return false;\r\n }\r\n parent.appendChild(new Text(values.join('')));\r\n return true;\r\n }\r\n // ${foo:}, ${foo} -> variable\r\n _parseComplexVariable(parent) {\r\n let name;\r\n const token = this._token;\r\n const match = this._accept(0 /* Dollar */)\r\n && this._accept(3 /* CurlyOpen */)\r\n && (name = this._accept(9 /* VariableName */, true));\r\n if (!match) {\r\n return this._backTo(token);\r\n }\r\n const variable = new Variable(name);\r\n if (this._accept(1 /* Colon */)) {\r\n // ${foo:}\r\n while (true) {\r\n // ...} -> done\r\n if (this._accept(4 /* CurlyClose */)) {\r\n parent.appendChild(variable);\r\n return true;\r\n }\r\n if (this._parse(variable)) {\r\n continue;\r\n }\r\n // fallback\r\n parent.appendChild(new Text('${' + name + ':'));\r\n variable.children.forEach(parent.appendChild, parent);\r\n return true;\r\n }\r\n }\r\n else if (this._accept(6 /* Forwardslash */)) {\r\n // ${foo///}\r\n if (this._parseTransform(variable)) {\r\n parent.appendChild(variable);\r\n return true;\r\n }\r\n this._backTo(token);\r\n return false;\r\n }\r\n else if (this._accept(4 /* CurlyClose */)) {\r\n // ${foo}\r\n parent.appendChild(variable);\r\n return true;\r\n }\r\n else {\r\n // ${foo <- missing curly or colon\r\n return this._backTo(token);\r\n }\r\n }\r\n _parseTransform(parent) {\r\n // ...//}\r\n let transform = new Transform();\r\n let regexValue = '';\r\n let regexOptions = '';\r\n // (1) /regex\r\n while (true) {\r\n if (this._accept(6 /* Forwardslash */)) {\r\n break;\r\n }\r\n let escaped;\r\n if (escaped = this._accept(5 /* Backslash */, true)) {\r\n escaped = this._accept(6 /* Forwardslash */, true) || escaped;\r\n regexValue += escaped;\r\n continue;\r\n }\r\n if (this._token.type !== 14 /* EOF */) {\r\n regexValue += this._accept(undefined, true);\r\n continue;\r\n }\r\n return false;\r\n }\r\n // (2) /format\r\n while (true) {\r\n if (this._accept(6 /* Forwardslash */)) {\r\n break;\r\n }\r\n let escaped;\r\n if (escaped = this._accept(5 /* Backslash */, true)) {\r\n escaped = this._accept(5 /* Backslash */, true) || this._accept(6 /* Forwardslash */, true) || escaped;\r\n transform.appendChild(new Text(escaped));\r\n continue;\r\n }\r\n if (this._parseFormatString(transform) || this._parseAnything(transform)) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n // (3) /option\r\n while (true) {\r\n if (this._accept(4 /* CurlyClose */)) {\r\n break;\r\n }\r\n if (this._token.type !== 14 /* EOF */) {\r\n regexOptions += this._accept(undefined, true);\r\n continue;\r\n }\r\n return false;\r\n }\r\n try {\r\n transform.regexp = new RegExp(regexValue, regexOptions);\r\n }\r\n catch (e) {\r\n // invalid regexp\r\n return false;\r\n }\r\n parent.transform = transform;\r\n return true;\r\n }\r\n _parseFormatString(parent) {\r\n const token = this._token;\r\n if (!this._accept(0 /* Dollar */)) {\r\n return false;\r\n }\r\n let complex = false;\r\n if (this._accept(3 /* CurlyOpen */)) {\r\n complex = true;\r\n }\r\n let index = this._accept(8 /* Int */, true);\r\n if (!index) {\r\n this._backTo(token);\r\n return false;\r\n }\r\n else if (!complex) {\r\n // $1\r\n parent.appendChild(new FormatString(Number(index)));\r\n return true;\r\n }\r\n else if (this._accept(4 /* CurlyClose */)) {\r\n // ${1}\r\n parent.appendChild(new FormatString(Number(index)));\r\n return true;\r\n }\r\n else if (!this._accept(1 /* Colon */)) {\r\n this._backTo(token);\r\n return false;\r\n }\r\n if (this._accept(6 /* Forwardslash */)) {\r\n // ${1:/upcase}\r\n let shorthand = this._accept(9 /* VariableName */, true);\r\n if (!shorthand || !this._accept(4 /* CurlyClose */)) {\r\n this._backTo(token);\r\n return false;\r\n }\r\n else {\r\n parent.appendChild(new FormatString(Number(index), shorthand));\r\n return true;\r\n }\r\n }\r\n else if (this._accept(11 /* Plus */)) {\r\n // ${1:+}\r\n let ifValue = this._until(4 /* CurlyClose */);\r\n if (ifValue) {\r\n parent.appendChild(new FormatString(Number(index), undefined, ifValue, undefined));\r\n return true;\r\n }\r\n }\r\n else if (this._accept(12 /* Dash */)) {\r\n // ${2:-}\r\n let elseValue = this._until(4 /* CurlyClose */);\r\n if (elseValue) {\r\n parent.appendChild(new FormatString(Number(index), undefined, undefined, elseValue));\r\n return true;\r\n }\r\n }\r\n else if (this._accept(13 /* QuestionMark */)) {\r\n // ${2:?:}\r\n let ifValue = this._until(1 /* Colon */);\r\n if (ifValue) {\r\n let elseValue = this._until(4 /* CurlyClose */);\r\n if (elseValue) {\r\n parent.appendChild(new FormatString(Number(index), undefined, ifValue, elseValue));\r\n return true;\r\n }\r\n }\r\n }\r\n else {\r\n // ${1:}\r\n let elseValue = this._until(4 /* CurlyClose */);\r\n if (elseValue) {\r\n parent.appendChild(new FormatString(Number(index), undefined, undefined, elseValue));\r\n return true;\r\n }\r\n }\r\n this._backTo(token);\r\n return false;\r\n }\r\n _parseAnything(marker) {\r\n if (this._token.type !== 14 /* EOF */) {\r\n marker.appendChild(new Text(this._scanner.tokenText(this._token)));\r\n this._accept(undefined);\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { onUnexpectedExternalError, canceled, isPromiseCanceledError } from '../../../base/common/errors.js';\r\nimport * as modes from '../../common/modes.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { FuzzyScore } from '../../../base/common/filters.js';\r\nimport { isDisposable, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { MenuId } from '../../../platform/actions/common/actions.js';\r\nimport { SnippetParser } from '../snippet/snippetParser.js';\r\nimport { StopWatch } from '../../../base/common/stopwatch.js';\r\nimport { CommandsRegistry } from '../../../platform/commands/common/commands.js';\r\nimport { assertType } from '../../../base/common/types.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { ITextModelService } from '../../common/services/resolverService.js';\r\nexport const Context = {\r\n Visible: new RawContextKey('suggestWidgetVisible', false),\r\n DetailsVisible: new RawContextKey('suggestWidgetDetailsVisible', false),\r\n MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false),\r\n MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true),\r\n AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', true),\r\n HasInsertAndReplaceRange: new RawContextKey('suggestionHasInsertAndReplaceRange', false),\r\n InsertMode: new RawContextKey('suggestionInsertMode', undefined),\r\n CanResolve: new RawContextKey('suggestionCanResolve', false),\r\n};\r\nexport const suggestWidgetStatusbarMenu = new MenuId('suggestWidgetStatusBar');\r\nexport class CompletionItem {\r\n constructor(position, completion, container, provider) {\r\n this.position = position;\r\n this.completion = completion;\r\n this.container = container;\r\n this.provider = provider;\r\n // validation\r\n this.isInvalid = false;\r\n // sorting, filtering\r\n this.score = FuzzyScore.Default;\r\n this.distance = 0;\r\n this.textLabel = typeof completion.label === 'string'\r\n ? completion.label\r\n : completion.label.name;\r\n // ensure lower-variants (perf)\r\n this.labelLow = this.textLabel.toLowerCase();\r\n // validate label\r\n this.isInvalid = !this.textLabel;\r\n this.sortTextLow = completion.sortText && completion.sortText.toLowerCase();\r\n this.filterTextLow = completion.filterText && completion.filterText.toLowerCase();\r\n // normalize ranges\r\n if (Range.isIRange(completion.range)) {\r\n this.editStart = new Position(completion.range.startLineNumber, completion.range.startColumn);\r\n this.editInsertEnd = new Position(completion.range.endLineNumber, completion.range.endColumn);\r\n this.editReplaceEnd = new Position(completion.range.endLineNumber, completion.range.endColumn);\r\n // validate range\r\n this.isInvalid = this.isInvalid\r\n || Range.spansMultipleLines(completion.range) || completion.range.startLineNumber !== position.lineNumber;\r\n }\r\n else {\r\n this.editStart = new Position(completion.range.insert.startLineNumber, completion.range.insert.startColumn);\r\n this.editInsertEnd = new Position(completion.range.insert.endLineNumber, completion.range.insert.endColumn);\r\n this.editReplaceEnd = new Position(completion.range.replace.endLineNumber, completion.range.replace.endColumn);\r\n // validate ranges\r\n this.isInvalid = this.isInvalid\r\n || Range.spansMultipleLines(completion.range.insert) || Range.spansMultipleLines(completion.range.replace)\r\n || completion.range.insert.startLineNumber !== position.lineNumber || completion.range.replace.startLineNumber !== position.lineNumber\r\n || completion.range.insert.startColumn !== completion.range.replace.startColumn;\r\n }\r\n // create the suggestion resolver\r\n if (typeof provider.resolveCompletionItem !== 'function') {\r\n this._resolveCache = Promise.resolve();\r\n this._isResolved = true;\r\n }\r\n }\r\n // ---- resolving\r\n get isResolved() {\r\n return !!this._isResolved;\r\n }\r\n resolve(token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!this._resolveCache) {\r\n const sub = token.onCancellationRequested(() => {\r\n this._resolveCache = undefined;\r\n this._isResolved = false;\r\n });\r\n this._resolveCache = Promise.resolve(this.provider.resolveCompletionItem(this.completion, token)).then(value => {\r\n Object.assign(this.completion, value);\r\n this._isResolved = true;\r\n sub.dispose();\r\n }, err => {\r\n if (isPromiseCanceledError(err)) {\r\n // the IPC queue will reject the request with the\r\n // cancellation error -> reset cached\r\n this._resolveCache = undefined;\r\n this._isResolved = false;\r\n }\r\n });\r\n }\r\n return this._resolveCache;\r\n });\r\n }\r\n}\r\nexport class CompletionOptions {\r\n constructor(snippetSortOrder = 2 /* Bottom */, kindFilter = new Set(), providerFilter = new Set()) {\r\n this.snippetSortOrder = snippetSortOrder;\r\n this.kindFilter = kindFilter;\r\n this.providerFilter = providerFilter;\r\n }\r\n}\r\nCompletionOptions.default = new CompletionOptions();\r\nlet _snippetSuggestSupport;\r\nexport function getSnippetSuggestSupport() {\r\n return _snippetSuggestSupport;\r\n}\r\nexport class CompletionItemModel {\r\n constructor(items, needsClipboard, durations, disposable) {\r\n this.items = items;\r\n this.needsClipboard = needsClipboard;\r\n this.durations = durations;\r\n this.disposable = disposable;\r\n }\r\n}\r\nexport function provideSuggestionItems(model, position, options = CompletionOptions.default, context = { triggerKind: 0 /* Invoke */ }, token = CancellationToken.None) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const sw = new StopWatch(true);\r\n position = position.clone();\r\n const word = model.getWordAtPosition(position);\r\n const defaultReplaceRange = word ? new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn) : Range.fromPositions(position);\r\n const defaultRange = { replace: defaultReplaceRange, insert: defaultReplaceRange.setEndPosition(position.lineNumber, position.column) };\r\n const result = [];\r\n const disposables = new DisposableStore();\r\n const durations = [];\r\n let needsClipboard = false;\r\n const onCompletionList = (provider, container, sw) => {\r\n var _a, _b;\r\n if (!container) {\r\n return;\r\n }\r\n for (let suggestion of container.suggestions) {\r\n if (!options.kindFilter.has(suggestion.kind)) {\r\n // fill in default range when missing\r\n if (!suggestion.range) {\r\n suggestion.range = defaultRange;\r\n }\r\n // fill in default sortText when missing\r\n if (!suggestion.sortText) {\r\n suggestion.sortText = typeof suggestion.label === 'string' ? suggestion.label : suggestion.label.name;\r\n }\r\n if (!needsClipboard && suggestion.insertTextRules && suggestion.insertTextRules & 4 /* InsertAsSnippet */) {\r\n needsClipboard = SnippetParser.guessNeedsClipboard(suggestion.insertText);\r\n }\r\n result.push(new CompletionItem(position, suggestion, container, provider));\r\n }\r\n }\r\n if (isDisposable(container)) {\r\n disposables.add(container);\r\n }\r\n durations.push({\r\n providerName: (_a = provider._debugDisplayName) !== null && _a !== void 0 ? _a : 'unkown_provider', elapsedProvider: (_b = container.duration) !== null && _b !== void 0 ? _b : -1,\r\n elapsedOverall: sw.elapsed()\r\n });\r\n };\r\n // ask for snippets in parallel to asking \"real\" providers. Only do something if configured to\r\n // do so - no snippet filter, no special-providers-only request\r\n const snippetCompletions = (() => __awaiter(this, void 0, void 0, function* () {\r\n if (!_snippetSuggestSupport || options.kindFilter.has(27 /* Snippet */)) {\r\n return;\r\n }\r\n if (options.providerFilter.size > 0 && !options.providerFilter.has(_snippetSuggestSupport)) {\r\n return;\r\n }\r\n const sw = new StopWatch(true);\r\n const list = yield _snippetSuggestSupport.provideCompletionItems(model, position, context, token);\r\n onCompletionList(_snippetSuggestSupport, list, sw);\r\n }))();\r\n // add suggestions from contributed providers - providers are ordered in groups of\r\n // equal score and once a group produces a result the process stops\r\n // get provider groups, always add snippet suggestion provider\r\n for (let providerGroup of modes.CompletionProviderRegistry.orderedGroups(model)) {\r\n // for each support in the group ask for suggestions\r\n let lenBefore = result.length;\r\n yield Promise.all(providerGroup.map((provider) => __awaiter(this, void 0, void 0, function* () {\r\n if (options.providerFilter.size > 0 && !options.providerFilter.has(provider)) {\r\n return;\r\n }\r\n try {\r\n const sw = new StopWatch(true);\r\n const list = yield provider.provideCompletionItems(model, position, context, token);\r\n onCompletionList(provider, list, sw);\r\n }\r\n catch (err) {\r\n onUnexpectedExternalError(err);\r\n }\r\n })));\r\n if (lenBefore !== result.length || token.isCancellationRequested) {\r\n break;\r\n }\r\n }\r\n yield snippetCompletions;\r\n if (token.isCancellationRequested) {\r\n disposables.dispose();\r\n return Promise.reject(canceled());\r\n }\r\n return new CompletionItemModel(result.sort(getSuggestionComparator(options.snippetSortOrder)), needsClipboard, { entries: durations, elapsed: sw.elapsed() }, disposables);\r\n });\r\n}\r\nfunction defaultComparator(a, b) {\r\n // check with 'sortText'\r\n if (a.sortTextLow && b.sortTextLow) {\r\n if (a.sortTextLow < b.sortTextLow) {\r\n return -1;\r\n }\r\n else if (a.sortTextLow > b.sortTextLow) {\r\n return 1;\r\n }\r\n }\r\n // check with 'label'\r\n if (a.completion.label < b.completion.label) {\r\n return -1;\r\n }\r\n else if (a.completion.label > b.completion.label) {\r\n return 1;\r\n }\r\n // check with 'type'\r\n return a.completion.kind - b.completion.kind;\r\n}\r\nfunction snippetUpComparator(a, b) {\r\n if (a.completion.kind !== b.completion.kind) {\r\n if (a.completion.kind === 27 /* Snippet */) {\r\n return -1;\r\n }\r\n else if (b.completion.kind === 27 /* Snippet */) {\r\n return 1;\r\n }\r\n }\r\n return defaultComparator(a, b);\r\n}\r\nfunction snippetDownComparator(a, b) {\r\n if (a.completion.kind !== b.completion.kind) {\r\n if (a.completion.kind === 27 /* Snippet */) {\r\n return 1;\r\n }\r\n else if (b.completion.kind === 27 /* Snippet */) {\r\n return -1;\r\n }\r\n }\r\n return defaultComparator(a, b);\r\n}\r\nconst _snippetComparators = new Map();\r\n_snippetComparators.set(0 /* Top */, snippetUpComparator);\r\n_snippetComparators.set(2 /* Bottom */, snippetDownComparator);\r\n_snippetComparators.set(1 /* Inline */, defaultComparator);\r\nexport function getSuggestionComparator(snippetConfig) {\r\n return _snippetComparators.get(snippetConfig);\r\n}\r\nCommandsRegistry.registerCommand('_executeCompletionItemProvider', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri, position, triggerCharacter, maxItemsToResolve] = args;\r\n assertType(URI.isUri(uri));\r\n assertType(Position.isIPosition(position));\r\n assertType(typeof triggerCharacter === 'string' || !triggerCharacter);\r\n assertType(typeof maxItemsToResolve === 'number' || !maxItemsToResolve);\r\n const ref = yield accessor.get(ITextModelService).createModelReference(uri);\r\n try {\r\n const result = {\r\n incomplete: false,\r\n suggestions: []\r\n };\r\n const resolving = [];\r\n const completions = yield provideSuggestionItems(ref.object.textEditorModel, Position.lift(position), undefined, { triggerCharacter, triggerKind: triggerCharacter ? 1 /* TriggerCharacter */ : 0 /* Invoke */ });\r\n for (const item of completions.items) {\r\n if (resolving.length < (maxItemsToResolve !== null && maxItemsToResolve !== void 0 ? maxItemsToResolve : 0)) {\r\n resolving.push(item.resolve(CancellationToken.None));\r\n }\r\n result.incomplete = result.incomplete || item.container.incomplete;\r\n result.suggestions.push(item.completion);\r\n }\r\n try {\r\n yield Promise.all(resolving);\r\n return result;\r\n }\r\n finally {\r\n setTimeout(() => completions.disposable.dispose(), 100);\r\n }\r\n }\r\n finally {\r\n ref.dispose();\r\n }\r\n}));\r\nconst _provider = new class {\r\n constructor() {\r\n this.onlyOnceSuggestions = [];\r\n }\r\n provideCompletionItems() {\r\n let suggestions = this.onlyOnceSuggestions.slice(0);\r\n let result = { suggestions };\r\n this.onlyOnceSuggestions.length = 0;\r\n return result;\r\n }\r\n};\r\nmodes.CompletionProviderRegistry.register('*', _provider);\r\nexport function showSimpleSuggestions(editor, suggestions) {\r\n setTimeout(() => {\r\n _provider.onlyOnceSuggestions.push(...suggestions);\r\n editor.getContribution('editor.contrib.suggestController').triggerSuggest(new Set().add(_provider));\r\n }, 0);\r\n}\r\n","import { URI } from '../../../base/common/uri.js';\r\nexport const WORKSPACE_EXTENSION = 'code-workspace';\r\nexport function isSingleFolderWorkspaceIdentifier(obj) {\r\n const singleFolderIdentifier = obj;\r\n return typeof (singleFolderIdentifier === null || singleFolderIdentifier === void 0 ? void 0 : singleFolderIdentifier.id) === 'string' && URI.isUri(singleFolderIdentifier.uri);\r\n}\r\nexport function toWorkspaceIdentifier(workspace) {\r\n // Multi root\r\n if (workspace.configuration) {\r\n return {\r\n id: workspace.id,\r\n configPath: workspace.configuration\r\n };\r\n }\r\n // Single folder\r\n if (workspace.folders.length === 1) {\r\n return {\r\n id: workspace.id,\r\n uri: workspace.folders[0].uri\r\n };\r\n }\r\n // Empty workspace\r\n return undefined;\r\n}\r\n//#endregion\r\n","// prep-work\r\nconst _data = new Uint8Array(16);\r\nconst _hex = [];\r\nfor (let i = 0; i < 256; i++) {\r\n _hex.push(i.toString(16).padStart(2, '0'));\r\n}\r\n// todo@jrieken\r\n// 1. node nodejs use`crypto#randomBytes`, see: https://nodejs.org/docs/latest/api/crypto.html#crypto_crypto_randombytes_size_callback\r\n// 2. use browser-crypto\r\nconst _fillRandomValues = function (bucket) {\r\n for (let i = 0; i < bucket.length; i++) {\r\n bucket[i] = Math.floor(Math.random() * 256);\r\n }\r\n return bucket;\r\n};\r\nexport function generateUuid() {\r\n // get data\r\n _fillRandomValues(_data);\r\n // set version bits\r\n _data[6] = (_data[6] & 0x0f) | 0x40;\r\n _data[8] = (_data[8] & 0x3f) | 0x80;\r\n // print as string\r\n let i = 0;\r\n let result = '';\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += '-';\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += '-';\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += '-';\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += '-';\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n result += _hex[_data[i++]];\r\n return result;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../../nls.js';\r\nimport * as path from '../../../base/common/path.js';\r\nimport { dirname } from '../../../base/common/resources.js';\r\nimport { Text } from './snippetParser.js';\r\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry.js';\r\nimport { getLeadingWhitespace, commonPrefixLength, isFalsyOrWhitespace, splitLines } from '../../../base/common/strings.js';\r\nimport { toWorkspaceIdentifier, WORKSPACE_EXTENSION, isSingleFolderWorkspaceIdentifier } from '../../../platform/workspaces/common/workspaces.js';\r\nimport { normalizeDriveLetter } from '../../../base/common/labels.js';\r\nimport { generateUuid } from '../../../base/common/uuid.js';\r\nexport class CompositeSnippetVariableResolver {\r\n constructor(_delegates) {\r\n this._delegates = _delegates;\r\n //\r\n }\r\n resolve(variable) {\r\n for (const delegate of this._delegates) {\r\n let value = delegate.resolve(variable);\r\n if (value !== undefined) {\r\n return value;\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexport class SelectionBasedVariableResolver {\r\n constructor(_model, _selection, _selectionIdx, _overtypingCapturer) {\r\n this._model = _model;\r\n this._selection = _selection;\r\n this._selectionIdx = _selectionIdx;\r\n this._overtypingCapturer = _overtypingCapturer;\r\n //\r\n }\r\n resolve(variable) {\r\n const { name } = variable;\r\n if (name === 'SELECTION' || name === 'TM_SELECTED_TEXT') {\r\n let value = this._model.getValueInRange(this._selection) || undefined;\r\n let isMultiline = this._selection.startLineNumber !== this._selection.endLineNumber;\r\n // If there was no selected text, try to get last overtyped text\r\n if (!value && this._overtypingCapturer) {\r\n const info = this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);\r\n if (info) {\r\n value = info.value;\r\n isMultiline = info.multiline;\r\n }\r\n }\r\n if (value && isMultiline && variable.snippet) {\r\n // Selection is a multiline string which we indentation we now\r\n // need to adjust. We compare the indentation of this variable\r\n // with the indentation at the editor position and add potential\r\n // extra indentation to the value\r\n const line = this._model.getLineContent(this._selection.startLineNumber);\r\n const lineLeadingWhitespace = getLeadingWhitespace(line, 0, this._selection.startColumn - 1);\r\n let varLeadingWhitespace = lineLeadingWhitespace;\r\n variable.snippet.walk(marker => {\r\n if (marker === variable) {\r\n return false;\r\n }\r\n if (marker instanceof Text) {\r\n varLeadingWhitespace = getLeadingWhitespace(splitLines(marker.value).pop());\r\n }\r\n return true;\r\n });\r\n const whitespaceCommonLength = commonPrefixLength(varLeadingWhitespace, lineLeadingWhitespace);\r\n value = value.replace(/(\\r\\n|\\r|\\n)(.*)/g, (m, newline, rest) => `${newline}${varLeadingWhitespace.substr(whitespaceCommonLength)}${rest}`);\r\n }\r\n return value;\r\n }\r\n else if (name === 'TM_CURRENT_LINE') {\r\n return this._model.getLineContent(this._selection.positionLineNumber);\r\n }\r\n else if (name === 'TM_CURRENT_WORD') {\r\n const info = this._model.getWordAtPosition({\r\n lineNumber: this._selection.positionLineNumber,\r\n column: this._selection.positionColumn\r\n });\r\n return info && info.word || undefined;\r\n }\r\n else if (name === 'TM_LINE_INDEX') {\r\n return String(this._selection.positionLineNumber - 1);\r\n }\r\n else if (name === 'TM_LINE_NUMBER') {\r\n return String(this._selection.positionLineNumber);\r\n }\r\n return undefined;\r\n }\r\n}\r\nexport class ModelBasedVariableResolver {\r\n constructor(_labelService, _model) {\r\n this._labelService = _labelService;\r\n this._model = _model;\r\n //\r\n }\r\n resolve(variable) {\r\n const { name } = variable;\r\n if (name === 'TM_FILENAME') {\r\n return path.basename(this._model.uri.fsPath);\r\n }\r\n else if (name === 'TM_FILENAME_BASE') {\r\n const name = path.basename(this._model.uri.fsPath);\r\n const idx = name.lastIndexOf('.');\r\n if (idx <= 0) {\r\n return name;\r\n }\r\n else {\r\n return name.slice(0, idx);\r\n }\r\n }\r\n else if (name === 'TM_DIRECTORY' && this._labelService) {\r\n if (path.dirname(this._model.uri.fsPath) === '.') {\r\n return '';\r\n }\r\n return this._labelService.getUriLabel(dirname(this._model.uri));\r\n }\r\n else if (name === 'TM_FILEPATH' && this._labelService) {\r\n return this._labelService.getUriLabel(this._model.uri);\r\n }\r\n else if (name === 'RELATIVE_FILEPATH' && this._labelService) {\r\n return this._labelService.getUriLabel(this._model.uri, { relative: true, noPrefix: true });\r\n }\r\n return undefined;\r\n }\r\n}\r\nexport class ClipboardBasedVariableResolver {\r\n constructor(_readClipboardText, _selectionIdx, _selectionCount, _spread) {\r\n this._readClipboardText = _readClipboardText;\r\n this._selectionIdx = _selectionIdx;\r\n this._selectionCount = _selectionCount;\r\n this._spread = _spread;\r\n //\r\n }\r\n resolve(variable) {\r\n if (variable.name !== 'CLIPBOARD') {\r\n return undefined;\r\n }\r\n const clipboardText = this._readClipboardText();\r\n if (!clipboardText) {\r\n return undefined;\r\n }\r\n // `spread` is assigning each cursor a line of the clipboard\r\n // text whenever there the line count equals the cursor count\r\n // and when enabled\r\n if (this._spread) {\r\n const lines = clipboardText.split(/\\r\\n|\\n|\\r/).filter(s => !isFalsyOrWhitespace(s));\r\n if (lines.length === this._selectionCount) {\r\n return lines[this._selectionIdx];\r\n }\r\n }\r\n return clipboardText;\r\n }\r\n}\r\nexport class CommentBasedVariableResolver {\r\n constructor(_model, _selection) {\r\n this._model = _model;\r\n this._selection = _selection;\r\n //\r\n }\r\n resolve(variable) {\r\n const { name } = variable;\r\n const langId = this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber, this._selection.selectionStartColumn);\r\n const config = LanguageConfigurationRegistry.getComments(langId);\r\n if (!config) {\r\n return undefined;\r\n }\r\n if (name === 'LINE_COMMENT') {\r\n return config.lineCommentToken || undefined;\r\n }\r\n else if (name === 'BLOCK_COMMENT_START') {\r\n return config.blockCommentStartToken || undefined;\r\n }\r\n else if (name === 'BLOCK_COMMENT_END') {\r\n return config.blockCommentEndToken || undefined;\r\n }\r\n return undefined;\r\n }\r\n}\r\nexport class TimeBasedVariableResolver {\r\n resolve(variable) {\r\n const { name } = variable;\r\n if (name === 'CURRENT_YEAR') {\r\n return String(new Date().getFullYear());\r\n }\r\n else if (name === 'CURRENT_YEAR_SHORT') {\r\n return String(new Date().getFullYear()).slice(-2);\r\n }\r\n else if (name === 'CURRENT_MONTH') {\r\n return String(new Date().getMonth().valueOf() + 1).padStart(2, '0');\r\n }\r\n else if (name === 'CURRENT_DATE') {\r\n return String(new Date().getDate().valueOf()).padStart(2, '0');\r\n }\r\n else if (name === 'CURRENT_HOUR') {\r\n return String(new Date().getHours().valueOf()).padStart(2, '0');\r\n }\r\n else if (name === 'CURRENT_MINUTE') {\r\n return String(new Date().getMinutes().valueOf()).padStart(2, '0');\r\n }\r\n else if (name === 'CURRENT_SECOND') {\r\n return String(new Date().getSeconds().valueOf()).padStart(2, '0');\r\n }\r\n else if (name === 'CURRENT_DAY_NAME') {\r\n return TimeBasedVariableResolver.dayNames[new Date().getDay()];\r\n }\r\n else if (name === 'CURRENT_DAY_NAME_SHORT') {\r\n return TimeBasedVariableResolver.dayNamesShort[new Date().getDay()];\r\n }\r\n else if (name === 'CURRENT_MONTH_NAME') {\r\n return TimeBasedVariableResolver.monthNames[new Date().getMonth()];\r\n }\r\n else if (name === 'CURRENT_MONTH_NAME_SHORT') {\r\n return TimeBasedVariableResolver.monthNamesShort[new Date().getMonth()];\r\n }\r\n else if (name === 'CURRENT_SECONDS_UNIX') {\r\n return String(Math.floor(Date.now() / 1000));\r\n }\r\n return undefined;\r\n }\r\n}\r\nTimeBasedVariableResolver.dayNames = [nls.localize('Sunday', \"Sunday\"), nls.localize('Monday', \"Monday\"), nls.localize('Tuesday', \"Tuesday\"), nls.localize('Wednesday', \"Wednesday\"), nls.localize('Thursday', \"Thursday\"), nls.localize('Friday', \"Friday\"), nls.localize('Saturday', \"Saturday\")];\r\nTimeBasedVariableResolver.dayNamesShort = [nls.localize('SundayShort', \"Sun\"), nls.localize('MondayShort', \"Mon\"), nls.localize('TuesdayShort', \"Tue\"), nls.localize('WednesdayShort', \"Wed\"), nls.localize('ThursdayShort', \"Thu\"), nls.localize('FridayShort', \"Fri\"), nls.localize('SaturdayShort', \"Sat\")];\r\nTimeBasedVariableResolver.monthNames = [nls.localize('January', \"January\"), nls.localize('February', \"February\"), nls.localize('March', \"March\"), nls.localize('April', \"April\"), nls.localize('May', \"May\"), nls.localize('June', \"June\"), nls.localize('July', \"July\"), nls.localize('August', \"August\"), nls.localize('September', \"September\"), nls.localize('October', \"October\"), nls.localize('November', \"November\"), nls.localize('December', \"December\")];\r\nTimeBasedVariableResolver.monthNamesShort = [nls.localize('JanuaryShort', \"Jan\"), nls.localize('FebruaryShort', \"Feb\"), nls.localize('MarchShort', \"Mar\"), nls.localize('AprilShort', \"Apr\"), nls.localize('MayShort', \"May\"), nls.localize('JuneShort', \"Jun\"), nls.localize('JulyShort', \"Jul\"), nls.localize('AugustShort', \"Aug\"), nls.localize('SeptemberShort', \"Sep\"), nls.localize('OctoberShort', \"Oct\"), nls.localize('NovemberShort', \"Nov\"), nls.localize('DecemberShort', \"Dec\")];\r\nexport class WorkspaceBasedVariableResolver {\r\n constructor(_workspaceService) {\r\n this._workspaceService = _workspaceService;\r\n //\r\n }\r\n resolve(variable) {\r\n if (!this._workspaceService) {\r\n return undefined;\r\n }\r\n const workspaceIdentifier = toWorkspaceIdentifier(this._workspaceService.getWorkspace());\r\n if (!workspaceIdentifier) {\r\n return undefined;\r\n }\r\n if (variable.name === 'WORKSPACE_NAME') {\r\n return this._resolveWorkspaceName(workspaceIdentifier);\r\n }\r\n else if (variable.name === 'WORKSPACE_FOLDER') {\r\n return this._resoveWorkspacePath(workspaceIdentifier);\r\n }\r\n return undefined;\r\n }\r\n _resolveWorkspaceName(workspaceIdentifier) {\r\n if (isSingleFolderWorkspaceIdentifier(workspaceIdentifier)) {\r\n return path.basename(workspaceIdentifier.uri.path);\r\n }\r\n let filename = path.basename(workspaceIdentifier.configPath.path);\r\n if (filename.endsWith(WORKSPACE_EXTENSION)) {\r\n filename = filename.substr(0, filename.length - WORKSPACE_EXTENSION.length - 1);\r\n }\r\n return filename;\r\n }\r\n _resoveWorkspacePath(workspaceIdentifier) {\r\n if (isSingleFolderWorkspaceIdentifier(workspaceIdentifier)) {\r\n return normalizeDriveLetter(workspaceIdentifier.uri.fsPath);\r\n }\r\n let filename = path.basename(workspaceIdentifier.configPath.path);\r\n let folderpath = workspaceIdentifier.configPath.fsPath;\r\n if (folderpath.endsWith(filename)) {\r\n folderpath = folderpath.substr(0, folderpath.length - filename.length - 1);\r\n }\r\n return (folderpath ? normalizeDriveLetter(folderpath) : '/');\r\n }\r\n}\r\nexport class RandomBasedVariableResolver {\r\n resolve(variable) {\r\n const { name } = variable;\r\n if (name === 'RANDOM') {\r\n return Math.random().toString().slice(-6);\r\n }\r\n else if (name === 'RANDOM_HEX') {\r\n return Math.random().toString(16).slice(-6);\r\n }\r\n else if (name === 'UUID') {\r\n return generateUuid();\r\n }\r\n return undefined;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { groupBy } from '../../../base/common/arrays.js';\r\nimport { dispose } from '../../../base/common/lifecycle.js';\r\nimport { getLeadingWhitespace } from '../../../base/common/strings.js';\r\nimport './snippetSession.css';\r\nimport { EditOperation } from '../../common/core/editOperation.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { IWorkspaceContextService } from '../../../platform/workspace/common/workspace.js';\r\nimport { optional } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { Choice, Placeholder, SnippetParser, Text } from './snippetParser.js';\r\nimport { ClipboardBasedVariableResolver, CompositeSnippetVariableResolver, ModelBasedVariableResolver, SelectionBasedVariableResolver, TimeBasedVariableResolver, CommentBasedVariableResolver, WorkspaceBasedVariableResolver, RandomBasedVariableResolver } from './snippetVariables.js';\r\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport * as colors from '../../../platform/theme/common/colorRegistry.js';\r\nimport { ILabelService } from '../../../platform/label/common/label.js';\r\nregisterThemingParticipant((theme, collector) => {\r\n function getColorGraceful(name) {\r\n const color = theme.getColor(name);\r\n return color ? color.toString() : 'transparent';\r\n }\r\n collector.addRule(`.monaco-editor .snippet-placeholder { background-color: ${getColorGraceful(colors.snippetTabstopHighlightBackground)}; outline-color: ${getColorGraceful(colors.snippetTabstopHighlightBorder)}; }`);\r\n collector.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${getColorGraceful(colors.snippetFinalTabstopHighlightBackground)}; outline-color: ${getColorGraceful(colors.snippetFinalTabstopHighlightBorder)}; }`);\r\n});\r\nexport class OneSnippet {\r\n constructor(_editor, _snippet, _offset, _snippetLineLeadingWhitespace) {\r\n this._editor = _editor;\r\n this._snippet = _snippet;\r\n this._offset = _offset;\r\n this._snippetLineLeadingWhitespace = _snippetLineLeadingWhitespace;\r\n this._nestingLevel = 1;\r\n this._placeholderGroups = groupBy(_snippet.placeholders, Placeholder.compareByIndex);\r\n this._placeholderGroupsIdx = -1;\r\n }\r\n dispose() {\r\n if (this._placeholderDecorations) {\r\n this._editor.deltaDecorations([...this._placeholderDecorations.values()], []);\r\n }\r\n this._placeholderGroups.length = 0;\r\n }\r\n _initDecorations() {\r\n if (this._placeholderDecorations) {\r\n // already initialized\r\n return;\r\n }\r\n this._placeholderDecorations = new Map();\r\n const model = this._editor.getModel();\r\n this._editor.changeDecorations(accessor => {\r\n // create a decoration for each placeholder\r\n for (const placeholder of this._snippet.placeholders) {\r\n const placeholderOffset = this._snippet.offset(placeholder);\r\n const placeholderLen = this._snippet.fullLen(placeholder);\r\n const range = Range.fromPositions(model.getPositionAt(this._offset + placeholderOffset), model.getPositionAt(this._offset + placeholderOffset + placeholderLen));\r\n const options = placeholder.isFinalTabstop ? OneSnippet._decor.inactiveFinal : OneSnippet._decor.inactive;\r\n const handle = accessor.addDecoration(range, options);\r\n this._placeholderDecorations.set(placeholder, handle);\r\n }\r\n });\r\n }\r\n move(fwd) {\r\n if (!this._editor.hasModel()) {\r\n return [];\r\n }\r\n this._initDecorations();\r\n // Transform placeholder text if necessary\r\n if (this._placeholderGroupsIdx >= 0) {\r\n let operations = [];\r\n for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) {\r\n // Check if the placeholder has a transformation\r\n if (placeholder.transform) {\r\n const id = this._placeholderDecorations.get(placeholder);\r\n const range = this._editor.getModel().getDecorationRange(id);\r\n const currentValue = this._editor.getModel().getValueInRange(range);\r\n const transformedValueLines = placeholder.transform.resolve(currentValue).split(/\\r\\n|\\r|\\n/);\r\n // fix indentation for transformed lines\r\n for (let i = 1; i < transformedValueLines.length; i++) {\r\n transformedValueLines[i] = this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace + transformedValueLines[i]);\r\n }\r\n operations.push(EditOperation.replace(range, transformedValueLines.join(this._editor.getModel().getEOL())));\r\n }\r\n }\r\n if (operations.length > 0) {\r\n this._editor.executeEdits('snippet.placeholderTransform', operations);\r\n }\r\n }\r\n let couldSkipThisPlaceholder = false;\r\n if (fwd === true && this._placeholderGroupsIdx < this._placeholderGroups.length - 1) {\r\n this._placeholderGroupsIdx += 1;\r\n couldSkipThisPlaceholder = true;\r\n }\r\n else if (fwd === false && this._placeholderGroupsIdx > 0) {\r\n this._placeholderGroupsIdx -= 1;\r\n couldSkipThisPlaceholder = true;\r\n }\r\n else {\r\n // the selection of the current placeholder might\r\n // not acurate any more -> simply restore it\r\n }\r\n const newSelections = this._editor.getModel().changeDecorations(accessor => {\r\n const activePlaceholders = new Set();\r\n // change stickiness to always grow when typing at its edges\r\n // because these decorations represent the currently active\r\n // tabstop.\r\n // Special case #1: reaching the final tabstop\r\n // Special case #2: placeholders enclosing active placeholders\r\n const selections = [];\r\n for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) {\r\n const id = this._placeholderDecorations.get(placeholder);\r\n const range = this._editor.getModel().getDecorationRange(id);\r\n selections.push(new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn));\r\n // consider to skip this placeholder index when the decoration\r\n // range is empty but when the placeholder wasn't. that's a strong\r\n // hint that the placeholder has been deleted. (all placeholder must match this)\r\n couldSkipThisPlaceholder = couldSkipThisPlaceholder && this._hasPlaceholderBeenCollapsed(placeholder);\r\n accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active);\r\n activePlaceholders.add(placeholder);\r\n for (const enclosingPlaceholder of this._snippet.enclosingPlaceholders(placeholder)) {\r\n const id = this._placeholderDecorations.get(enclosingPlaceholder);\r\n accessor.changeDecorationOptions(id, enclosingPlaceholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active);\r\n activePlaceholders.add(enclosingPlaceholder);\r\n }\r\n }\r\n // change stickness to never grow when typing at its edges\r\n // so that in-active tabstops never grow\r\n for (const [placeholder, id] of this._placeholderDecorations) {\r\n if (!activePlaceholders.has(placeholder)) {\r\n accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.inactiveFinal : OneSnippet._decor.inactive);\r\n }\r\n }\r\n return selections;\r\n });\r\n return !couldSkipThisPlaceholder ? newSelections !== null && newSelections !== void 0 ? newSelections : [] : this.move(fwd);\r\n }\r\n _hasPlaceholderBeenCollapsed(placeholder) {\r\n // A placeholder is empty when it wasn't empty when authored but\r\n // when its tracking decoration is empty. This also applies to all\r\n // potential parent placeholders\r\n let marker = placeholder;\r\n while (marker) {\r\n if (marker instanceof Placeholder) {\r\n const id = this._placeholderDecorations.get(marker);\r\n const range = this._editor.getModel().getDecorationRange(id);\r\n if (range.isEmpty() && marker.toString().length > 0) {\r\n return true;\r\n }\r\n }\r\n marker = marker.parent;\r\n }\r\n return false;\r\n }\r\n get isAtFirstPlaceholder() {\r\n return this._placeholderGroupsIdx <= 0 || this._placeholderGroups.length === 0;\r\n }\r\n get isAtLastPlaceholder() {\r\n return this._placeholderGroupsIdx === this._placeholderGroups.length - 1;\r\n }\r\n get hasPlaceholder() {\r\n return this._snippet.placeholders.length > 0;\r\n }\r\n computePossibleSelections() {\r\n const result = new Map();\r\n for (const placeholdersWithEqualIndex of this._placeholderGroups) {\r\n let ranges;\r\n for (const placeholder of placeholdersWithEqualIndex) {\r\n if (placeholder.isFinalTabstop) {\r\n // ignore those\r\n break;\r\n }\r\n if (!ranges) {\r\n ranges = [];\r\n result.set(placeholder.index, ranges);\r\n }\r\n const id = this._placeholderDecorations.get(placeholder);\r\n const range = this._editor.getModel().getDecorationRange(id);\r\n if (!range) {\r\n // one of the placeholder lost its decoration and\r\n // therefore we bail out and pretend the placeholder\r\n // (with its mirrors) doesn't exist anymore.\r\n result.delete(placeholder.index);\r\n break;\r\n }\r\n ranges.push(range);\r\n }\r\n }\r\n return result;\r\n }\r\n get choice() {\r\n return this._placeholderGroups[this._placeholderGroupsIdx][0].choice;\r\n }\r\n merge(others) {\r\n const model = this._editor.getModel();\r\n this._nestingLevel *= 10;\r\n this._editor.changeDecorations(accessor => {\r\n // For each active placeholder take one snippet and merge it\r\n // in that the placeholder (can be many for `$1foo$1foo`). Because\r\n // everything is sorted by editor selection we can simply remove\r\n // elements from the beginning of the array\r\n for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) {\r\n const nested = others.shift();\r\n console.assert(!nested._placeholderDecorations);\r\n // Massage placeholder-indicies of the nested snippet to be\r\n // sorted right after the insertion point. This ensures we move\r\n // through the placeholders in the correct order\r\n const indexLastPlaceholder = nested._snippet.placeholderInfo.last.index;\r\n for (const nestedPlaceholder of nested._snippet.placeholderInfo.all) {\r\n if (nestedPlaceholder.isFinalTabstop) {\r\n nestedPlaceholder.index = placeholder.index + ((indexLastPlaceholder + 1) / this._nestingLevel);\r\n }\r\n else {\r\n nestedPlaceholder.index = placeholder.index + (nestedPlaceholder.index / this._nestingLevel);\r\n }\r\n }\r\n this._snippet.replace(placeholder, nested._snippet.children);\r\n // Remove the placeholder at which position are inserting\r\n // the snippet and also remove its decoration.\r\n const id = this._placeholderDecorations.get(placeholder);\r\n accessor.removeDecoration(id);\r\n this._placeholderDecorations.delete(placeholder);\r\n // For each *new* placeholder we create decoration to monitor\r\n // how and if it grows/shrinks.\r\n for (const placeholder of nested._snippet.placeholders) {\r\n const placeholderOffset = nested._snippet.offset(placeholder);\r\n const placeholderLen = nested._snippet.fullLen(placeholder);\r\n const range = Range.fromPositions(model.getPositionAt(nested._offset + placeholderOffset), model.getPositionAt(nested._offset + placeholderOffset + placeholderLen));\r\n const handle = accessor.addDecoration(range, OneSnippet._decor.inactive);\r\n this._placeholderDecorations.set(placeholder, handle);\r\n }\r\n }\r\n // Last, re-create the placeholder groups by sorting placeholders by their index.\r\n this._placeholderGroups = groupBy(this._snippet.placeholders, Placeholder.compareByIndex);\r\n });\r\n }\r\n}\r\nOneSnippet._decor = {\r\n active: ModelDecorationOptions.register({ stickiness: 0 /* AlwaysGrowsWhenTypingAtEdges */, className: 'snippet-placeholder' }),\r\n inactive: ModelDecorationOptions.register({ stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, className: 'snippet-placeholder' }),\r\n activeFinal: ModelDecorationOptions.register({ stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, className: 'finish-snippet-placeholder' }),\r\n inactiveFinal: ModelDecorationOptions.register({ stickiness: 1 /* NeverGrowsWhenTypingAtEdges */, className: 'finish-snippet-placeholder' }),\r\n};\r\nconst _defaultOptions = {\r\n overwriteBefore: 0,\r\n overwriteAfter: 0,\r\n adjustWhitespace: true,\r\n clipboardText: undefined,\r\n overtypingCapturer: undefined\r\n};\r\nexport class SnippetSession {\r\n constructor(editor, template, options = _defaultOptions) {\r\n this._templateMerges = [];\r\n this._snippets = [];\r\n this._editor = editor;\r\n this._template = template;\r\n this._options = options;\r\n }\r\n static adjustWhitespace(model, position, snippet, adjustIndentation, adjustNewlines) {\r\n const line = model.getLineContent(position.lineNumber);\r\n const lineLeadingWhitespace = getLeadingWhitespace(line, 0, position.column - 1);\r\n // the snippet as inserted\r\n let snippetTextString;\r\n snippet.walk(marker => {\r\n // all text elements that are not inside choice\r\n if (!(marker instanceof Text) || marker.parent instanceof Choice) {\r\n return true;\r\n }\r\n const lines = marker.value.split(/\\r\\n|\\r|\\n/);\r\n if (adjustIndentation) {\r\n // adjust indentation of snippet test\r\n // -the snippet-start doesn't get extra-indented (lineLeadingWhitespace), only normalized\r\n // -all N+1 lines get extra-indented and normalized\r\n // -the text start get extra-indented and normalized when following a linebreak\r\n const offset = snippet.offset(marker);\r\n if (offset === 0) {\r\n // snippet start\r\n lines[0] = model.normalizeIndentation(lines[0]);\r\n }\r\n else {\r\n // check if text start is after a linebreak\r\n snippetTextString = snippetTextString !== null && snippetTextString !== void 0 ? snippetTextString : snippet.toString();\r\n let prevChar = snippetTextString.charCodeAt(offset - 1);\r\n if (prevChar === 10 /* LineFeed */ || prevChar === 13 /* CarriageReturn */) {\r\n lines[0] = model.normalizeIndentation(lineLeadingWhitespace + lines[0]);\r\n }\r\n }\r\n for (let i = 1; i < lines.length; i++) {\r\n lines[i] = model.normalizeIndentation(lineLeadingWhitespace + lines[i]);\r\n }\r\n }\r\n const newValue = lines.join(model.getEOL());\r\n if (newValue !== marker.value) {\r\n marker.parent.replace(marker, [new Text(newValue)]);\r\n snippetTextString = undefined;\r\n }\r\n return true;\r\n });\r\n return lineLeadingWhitespace;\r\n }\r\n static adjustSelection(model, selection, overwriteBefore, overwriteAfter) {\r\n if (overwriteBefore !== 0 || overwriteAfter !== 0) {\r\n // overwrite[Before|After] is compute using the position, not the whole\r\n // selection. therefore we adjust the selection around that position\r\n const { positionLineNumber, positionColumn } = selection;\r\n const positionColumnBefore = positionColumn - overwriteBefore;\r\n const positionColumnAfter = positionColumn + overwriteAfter;\r\n const range = model.validateRange({\r\n startLineNumber: positionLineNumber,\r\n startColumn: positionColumnBefore,\r\n endLineNumber: positionLineNumber,\r\n endColumn: positionColumnAfter\r\n });\r\n selection = Selection.createWithDirection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn, selection.getDirection());\r\n }\r\n return selection;\r\n }\r\n static createEditsAndSnippets(editor, template, overwriteBefore, overwriteAfter, enforceFinalTabstop, adjustWhitespace, clipboardText, overtypingCapturer) {\r\n const edits = [];\r\n const snippets = [];\r\n if (!editor.hasModel()) {\r\n return { edits, snippets };\r\n }\r\n const model = editor.getModel();\r\n const workspaceService = editor.invokeWithinContext(accessor => accessor.get(IWorkspaceContextService, optional));\r\n const modelBasedVariableResolver = editor.invokeWithinContext(accessor => new ModelBasedVariableResolver(accessor.get(ILabelService, optional), model));\r\n const readClipboardText = () => clipboardText;\r\n let delta = 0;\r\n // know what text the overwrite[Before|After] extensions\r\n // of the primary curser have selected because only when\r\n // secondary selections extend to the same text we can grow them\r\n let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), overwriteBefore, 0));\r\n let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), 0, overwriteAfter));\r\n // remember the first non-whitespace column to decide if\r\n // `keepWhitespace` should be overruled for secondary selections\r\n let firstLineFirstNonWhitespace = model.getLineFirstNonWhitespaceColumn(editor.getSelection().positionLineNumber);\r\n // sort selections by their start position but remeber\r\n // the original index. that allows you to create correct\r\n // offset-based selection logic without changing the\r\n // primary selection\r\n const indexedSelections = editor.getSelections()\r\n .map((selection, idx) => ({ selection, idx }))\r\n .sort((a, b) => Range.compareRangesUsingStarts(a.selection, b.selection));\r\n for (const { selection, idx } of indexedSelections) {\r\n // extend selection with the `overwriteBefore` and `overwriteAfter` and then\r\n // compare if this matches the extensions of the primary selection\r\n let extensionBefore = SnippetSession.adjustSelection(model, selection, overwriteBefore, 0);\r\n let extensionAfter = SnippetSession.adjustSelection(model, selection, 0, overwriteAfter);\r\n if (firstBeforeText !== model.getValueInRange(extensionBefore)) {\r\n extensionBefore = selection;\r\n }\r\n if (firstAfterText !== model.getValueInRange(extensionAfter)) {\r\n extensionAfter = selection;\r\n }\r\n // merge the before and after selection into one\r\n const snippetSelection = selection\r\n .setStartPosition(extensionBefore.startLineNumber, extensionBefore.startColumn)\r\n .setEndPosition(extensionAfter.endLineNumber, extensionAfter.endColumn);\r\n const snippet = new SnippetParser().parse(template, true, enforceFinalTabstop);\r\n // adjust the template string to match the indentation and\r\n // whitespace rules of this insert location (can be different for each cursor)\r\n // happens when being asked for (default) or when this is a secondary\r\n // cursor and the leading whitespace is different\r\n const start = snippetSelection.getStartPosition();\r\n const snippetLineLeadingWhitespace = SnippetSession.adjustWhitespace(model, start, snippet, adjustWhitespace || (idx > 0 && firstLineFirstNonWhitespace !== model.getLineFirstNonWhitespaceColumn(selection.positionLineNumber)), true);\r\n snippet.resolveVariables(new CompositeSnippetVariableResolver([\r\n modelBasedVariableResolver,\r\n new ClipboardBasedVariableResolver(readClipboardText, idx, indexedSelections.length, editor.getOption(65 /* multiCursorPaste */) === 'spread'),\r\n new SelectionBasedVariableResolver(model, selection, idx, overtypingCapturer),\r\n new CommentBasedVariableResolver(model, selection),\r\n new TimeBasedVariableResolver,\r\n new WorkspaceBasedVariableResolver(workspaceService),\r\n new RandomBasedVariableResolver,\r\n ]));\r\n const offset = model.getOffsetAt(start) + delta;\r\n delta += snippet.toString().length - model.getValueLengthInRange(snippetSelection);\r\n // store snippets with the index of their originating selection.\r\n // that ensures the primiary cursor stays primary despite not being\r\n // the one with lowest start position\r\n edits[idx] = EditOperation.replace(snippetSelection, snippet.toString());\r\n edits[idx].identifier = { major: idx, minor: 0 }; // mark the edit so only our undo edits will be used to generate end cursors\r\n snippets[idx] = new OneSnippet(editor, snippet, offset, snippetLineLeadingWhitespace);\r\n }\r\n return { edits, snippets };\r\n }\r\n dispose() {\r\n dispose(this._snippets);\r\n }\r\n _logInfo() {\r\n return `template=\"${this._template}\", merged_templates=\"${this._templateMerges.join(' -> ')}\"`;\r\n }\r\n insert() {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n // make insert edit and start with first selections\r\n const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, this._template, this._options.overwriteBefore, this._options.overwriteAfter, false, this._options.adjustWhitespace, this._options.clipboardText, this._options.overtypingCapturer);\r\n this._snippets = snippets;\r\n this._editor.executeEdits('snippet', edits, undoEdits => {\r\n if (this._snippets[0].hasPlaceholder) {\r\n return this._move(true);\r\n }\r\n else {\r\n return undoEdits\r\n .filter(edit => !!edit.identifier) // only use our undo edits\r\n .map(edit => Selection.fromPositions(edit.range.getEndPosition()));\r\n }\r\n });\r\n this._editor.revealRange(this._editor.getSelections()[0]);\r\n }\r\n merge(template, options = _defaultOptions) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n this._templateMerges.push([this._snippets[0]._nestingLevel, this._snippets[0]._placeholderGroupsIdx, template]);\r\n const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, template, options.overwriteBefore, options.overwriteAfter, true, options.adjustWhitespace, options.clipboardText, options.overtypingCapturer);\r\n this._editor.executeEdits('snippet', edits, undoEdits => {\r\n for (const snippet of this._snippets) {\r\n snippet.merge(snippets);\r\n }\r\n console.assert(snippets.length === 0);\r\n if (this._snippets[0].hasPlaceholder) {\r\n return this._move(undefined);\r\n }\r\n else {\r\n return (undoEdits\r\n .filter(edit => !!edit.identifier) // only use our undo edits\r\n .map(edit => Selection.fromPositions(edit.range.getEndPosition())));\r\n }\r\n });\r\n }\r\n next() {\r\n const newSelections = this._move(true);\r\n this._editor.setSelections(newSelections);\r\n this._editor.revealPositionInCenterIfOutsideViewport(newSelections[0].getPosition());\r\n }\r\n prev() {\r\n const newSelections = this._move(false);\r\n this._editor.setSelections(newSelections);\r\n this._editor.revealPositionInCenterIfOutsideViewport(newSelections[0].getPosition());\r\n }\r\n _move(fwd) {\r\n const selections = [];\r\n for (const snippet of this._snippets) {\r\n const oneSelection = snippet.move(fwd);\r\n selections.push(...oneSelection);\r\n }\r\n return selections;\r\n }\r\n get isAtFirstPlaceholder() {\r\n return this._snippets[0].isAtFirstPlaceholder;\r\n }\r\n get isAtLastPlaceholder() {\r\n return this._snippets[0].isAtLastPlaceholder;\r\n }\r\n get hasPlaceholder() {\r\n return this._snippets[0].hasPlaceholder;\r\n }\r\n get choice() {\r\n return this._snippets[0].choice;\r\n }\r\n isSelectionWithinPlaceholders() {\r\n if (!this.hasPlaceholder) {\r\n return false;\r\n }\r\n const selections = this._editor.getSelections();\r\n if (selections.length < this._snippets.length) {\r\n // this means we started snippet mode with N\r\n // selections and have M (N > M) selections.\r\n // So one snippet is without selection -> cancel\r\n return false;\r\n }\r\n let allPossibleSelections = new Map();\r\n for (const snippet of this._snippets) {\r\n const possibleSelections = snippet.computePossibleSelections();\r\n // for the first snippet find the placeholder (and its ranges)\r\n // that contain at least one selection. for all remaining snippets\r\n // the same placeholder (and their ranges) must be used.\r\n if (allPossibleSelections.size === 0) {\r\n for (const [index, ranges] of possibleSelections) {\r\n ranges.sort(Range.compareRangesUsingStarts);\r\n for (const selection of selections) {\r\n if (ranges[0].containsRange(selection)) {\r\n allPossibleSelections.set(index, []);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n if (allPossibleSelections.size === 0) {\r\n // return false if we couldn't associate a selection to\r\n // this (the first) snippet\r\n return false;\r\n }\r\n // add selections from 'this' snippet so that we know all\r\n // selections for this placeholder\r\n allPossibleSelections.forEach((array, index) => {\r\n array.push(...possibleSelections.get(index));\r\n });\r\n }\r\n // sort selections (and later placeholder-ranges). then walk both\r\n // arrays and make sure the placeholder-ranges contain the corresponding\r\n // selection\r\n selections.sort(Range.compareRangesUsingStarts);\r\n for (let [index, ranges] of allPossibleSelections) {\r\n if (ranges.length !== selections.length) {\r\n allPossibleSelections.delete(index);\r\n continue;\r\n }\r\n ranges.sort(Range.compareRangesUsingStarts);\r\n for (let i = 0; i < ranges.length; i++) {\r\n if (!ranges[i].containsRange(selections[i])) {\r\n allPossibleSelections.delete(index);\r\n continue;\r\n }\r\n }\r\n }\r\n // from all possible selections we have deleted those\r\n // that don't match with the current selection. if we don't\r\n // have any left, we don't have a selection anymore\r\n return allPossibleSelections.size > 0;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { EditorCommand, registerEditorCommand, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { showSimpleSuggestions } from '../suggest/suggest.js';\r\nimport { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { ILogService } from '../../../platform/log/common/log.js';\r\nimport { SnippetSession } from './snippetSession.js';\r\nconst _defaultOptions = {\r\n overwriteBefore: 0,\r\n overwriteAfter: 0,\r\n undoStopBefore: true,\r\n undoStopAfter: true,\r\n adjustWhitespace: true,\r\n clipboardText: undefined,\r\n overtypingCapturer: undefined\r\n};\r\nlet SnippetController2 = class SnippetController2 {\r\n constructor(_editor, _logService, contextKeyService) {\r\n this._editor = _editor;\r\n this._logService = _logService;\r\n this._snippetListener = new DisposableStore();\r\n this._modelVersionId = -1;\r\n this._inSnippet = SnippetController2.InSnippetMode.bindTo(contextKeyService);\r\n this._hasNextTabstop = SnippetController2.HasNextTabstop.bindTo(contextKeyService);\r\n this._hasPrevTabstop = SnippetController2.HasPrevTabstop.bindTo(contextKeyService);\r\n }\r\n static get(editor) {\r\n return editor.getContribution(SnippetController2.ID);\r\n }\r\n dispose() {\r\n var _a;\r\n this._inSnippet.reset();\r\n this._hasPrevTabstop.reset();\r\n this._hasNextTabstop.reset();\r\n (_a = this._session) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._snippetListener.dispose();\r\n }\r\n insert(template, opts) {\r\n // this is here to find out more about the yet-not-understood\r\n // error that sometimes happens when we fail to inserted a nested\r\n // snippet\r\n try {\r\n this._doInsert(template, typeof opts === 'undefined' ? _defaultOptions : Object.assign(Object.assign({}, _defaultOptions), opts));\r\n }\r\n catch (e) {\r\n this.cancel();\r\n this._logService.error(e);\r\n this._logService.error('snippet_error');\r\n this._logService.error('insert_template=', template);\r\n this._logService.error('existing_template=', this._session ? this._session._logInfo() : '');\r\n }\r\n }\r\n _doInsert(template, opts) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n // don't listen while inserting the snippet\r\n // as that is the inflight state causing cancelation\r\n this._snippetListener.clear();\r\n if (opts.undoStopBefore) {\r\n this._editor.getModel().pushStackElement();\r\n }\r\n if (!this._session) {\r\n this._modelVersionId = this._editor.getModel().getAlternativeVersionId();\r\n this._session = new SnippetSession(this._editor, template, opts);\r\n this._session.insert();\r\n }\r\n else {\r\n this._session.merge(template, opts);\r\n }\r\n if (opts.undoStopAfter) {\r\n this._editor.getModel().pushStackElement();\r\n }\r\n this._updateState();\r\n this._snippetListener.add(this._editor.onDidChangeModelContent(e => e.isFlush && this.cancel()));\r\n this._snippetListener.add(this._editor.onDidChangeModel(() => this.cancel()));\r\n this._snippetListener.add(this._editor.onDidChangeCursorSelection(() => this._updateState()));\r\n }\r\n _updateState() {\r\n if (!this._session || !this._editor.hasModel()) {\r\n // canceled in the meanwhile\r\n return;\r\n }\r\n if (this._modelVersionId === this._editor.getModel().getAlternativeVersionId()) {\r\n // undo until the 'before' state happened\r\n // and makes use cancel snippet mode\r\n return this.cancel();\r\n }\r\n if (!this._session.hasPlaceholder) {\r\n // don't listen for selection changes and don't\r\n // update context keys when the snippet is plain text\r\n return this.cancel();\r\n }\r\n if (this._session.isAtLastPlaceholder || !this._session.isSelectionWithinPlaceholders()) {\r\n return this.cancel();\r\n }\r\n this._inSnippet.set(true);\r\n this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder);\r\n this._hasNextTabstop.set(!this._session.isAtLastPlaceholder);\r\n this._handleChoice();\r\n }\r\n _handleChoice() {\r\n if (!this._session || !this._editor.hasModel()) {\r\n this._currentChoice = undefined;\r\n return;\r\n }\r\n const { choice } = this._session;\r\n if (!choice) {\r\n this._currentChoice = undefined;\r\n return;\r\n }\r\n if (this._currentChoice !== choice) {\r\n this._currentChoice = choice;\r\n this._editor.setSelections(this._editor.getSelections()\r\n .map(s => Selection.fromPositions(s.getStartPosition())));\r\n const [first] = choice.options;\r\n showSimpleSuggestions(this._editor, choice.options.map((option, i) => {\r\n // let before = choice.options.slice(0, i);\r\n // let after = choice.options.slice(i);\r\n return {\r\n kind: 13 /* Value */,\r\n label: option.value,\r\n insertText: option.value,\r\n // insertText: `\\${1|${after.concat(before).join(',')}|}$0`,\r\n // snippetType: 'textmate',\r\n sortText: 'a'.repeat(i + 1),\r\n range: Range.fromPositions(this._editor.getPosition(), this._editor.getPosition().delta(0, first.value.length))\r\n };\r\n }));\r\n }\r\n }\r\n finish() {\r\n while (this._inSnippet.get()) {\r\n this.next();\r\n }\r\n }\r\n cancel(resetSelection = false) {\r\n var _a;\r\n this._inSnippet.reset();\r\n this._hasPrevTabstop.reset();\r\n this._hasNextTabstop.reset();\r\n this._snippetListener.clear();\r\n (_a = this._session) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._session = undefined;\r\n this._modelVersionId = -1;\r\n if (resetSelection) {\r\n // reset selection to the primary cursor when being asked\r\n // for. this happens when explicitly cancelling snippet mode,\r\n // e.g. when pressing ESC\r\n this._editor.setSelections([this._editor.getSelection()]);\r\n }\r\n }\r\n prev() {\r\n if (this._session) {\r\n this._session.prev();\r\n }\r\n this._updateState();\r\n }\r\n next() {\r\n if (this._session) {\r\n this._session.next();\r\n }\r\n this._updateState();\r\n }\r\n isInSnippet() {\r\n return Boolean(this._inSnippet.get());\r\n }\r\n};\r\nSnippetController2.ID = 'snippetController2';\r\nSnippetController2.InSnippetMode = new RawContextKey('inSnippetMode', false);\r\nSnippetController2.HasNextTabstop = new RawContextKey('hasNextTabstop', false);\r\nSnippetController2.HasPrevTabstop = new RawContextKey('hasPrevTabstop', false);\r\nSnippetController2 = __decorate([\r\n __param(1, ILogService),\r\n __param(2, IContextKeyService)\r\n], SnippetController2);\r\nexport { SnippetController2 };\r\nregisterEditorContribution(SnippetController2.ID, SnippetController2);\r\nconst CommandCtor = EditorCommand.bindToContribution(SnippetController2.get);\r\nregisterEditorCommand(new CommandCtor({\r\n id: 'jumpToNextSnippetPlaceholder',\r\n precondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasNextTabstop),\r\n handler: ctrl => ctrl.next(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 30,\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 2 /* Tab */\r\n }\r\n}));\r\nregisterEditorCommand(new CommandCtor({\r\n id: 'jumpToPrevSnippetPlaceholder',\r\n precondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasPrevTabstop),\r\n handler: ctrl => ctrl.prev(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 30,\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 2 /* Tab */\r\n }\r\n}));\r\nregisterEditorCommand(new CommandCtor({\r\n id: 'leaveSnippet',\r\n precondition: SnippetController2.InSnippetMode,\r\n handler: ctrl => ctrl.cancel(true),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 30,\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\nregisterEditorCommand(new CommandCtor({\r\n id: 'acceptSnippet',\r\n precondition: SnippetController2.InSnippetMode,\r\n handler: ctrl => ctrl.finish(),\r\n // kbOpts: {\r\n // \tweight: KeybindingWeight.EditorContrib + 30,\r\n // \tkbExpr: EditorContextKeys.textFocus,\r\n // \tprimary: KeyCode.Enter,\r\n // }\r\n}));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { LRUCache, TernarySearchTree } from '../../../base/common/map.js';\r\nimport { IStorageService, WillSaveStateReason } from '../../../platform/storage/common/storage.js';\r\nimport { completionKindFromString } from '../../common/modes.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { RunOnceScheduler } from '../../../base/common/async.js';\r\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\r\nimport { registerSingleton } from '../../../platform/instantiation/common/extensions.js';\r\nimport { IModeService } from '../../common/services/modeService.js';\r\nexport class Memory {\r\n constructor(name) {\r\n this.name = name;\r\n }\r\n select(model, pos, items) {\r\n if (items.length === 0) {\r\n return 0;\r\n }\r\n let topScore = items[0].score[0];\r\n for (let i = 0; i < items.length; i++) {\r\n const { score, completion: suggestion } = items[i];\r\n if (score[0] !== topScore) {\r\n // stop when leaving the group of top matches\r\n break;\r\n }\r\n if (suggestion.preselect) {\r\n // stop when seeing an auto-select-item\r\n return i;\r\n }\r\n }\r\n return 0;\r\n }\r\n}\r\nexport class NoMemory extends Memory {\r\n constructor() {\r\n super('first');\r\n }\r\n memorize(model, pos, item) {\r\n // no-op\r\n }\r\n toJSON() {\r\n return undefined;\r\n }\r\n fromJSON() {\r\n //\r\n }\r\n}\r\nexport class LRUMemory extends Memory {\r\n constructor() {\r\n super('recentlyUsed');\r\n this._cache = new LRUCache(300, 0.66);\r\n this._seq = 0;\r\n }\r\n memorize(model, pos, item) {\r\n const key = `${model.getLanguageIdentifier().language}/${item.textLabel}`;\r\n this._cache.set(key, {\r\n touch: this._seq++,\r\n type: item.completion.kind,\r\n insertText: item.completion.insertText\r\n });\r\n }\r\n select(model, pos, items) {\r\n if (items.length === 0) {\r\n return 0;\r\n }\r\n const lineSuffix = model.getLineContent(pos.lineNumber).substr(pos.column - 10, pos.column - 1);\r\n if (/\\s$/.test(lineSuffix)) {\r\n return super.select(model, pos, items);\r\n }\r\n let topScore = items[0].score[0];\r\n let indexPreselect = -1;\r\n let indexRecency = -1;\r\n let seq = -1;\r\n for (let i = 0; i < items.length; i++) {\r\n if (items[i].score[0] !== topScore) {\r\n // consider only top items\r\n break;\r\n }\r\n const key = `${model.getLanguageIdentifier().language}/${items[i].textLabel}`;\r\n const item = this._cache.peek(key);\r\n if (item && item.touch > seq && item.type === items[i].completion.kind && item.insertText === items[i].completion.insertText) {\r\n seq = item.touch;\r\n indexRecency = i;\r\n }\r\n if (items[i].completion.preselect && indexPreselect === -1) {\r\n // stop when seeing an auto-select-item\r\n return indexPreselect = i;\r\n }\r\n }\r\n if (indexRecency !== -1) {\r\n return indexRecency;\r\n }\r\n else if (indexPreselect !== -1) {\r\n return indexPreselect;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n toJSON() {\r\n return this._cache.toJSON();\r\n }\r\n fromJSON(data) {\r\n this._cache.clear();\r\n let seq = 0;\r\n for (const [key, value] of data) {\r\n value.touch = seq;\r\n value.type = typeof value.type === 'number' ? value.type : completionKindFromString(value.type);\r\n this._cache.set(key, value);\r\n }\r\n this._seq = this._cache.size;\r\n }\r\n}\r\nexport class PrefixMemory extends Memory {\r\n constructor() {\r\n super('recentlyUsedByPrefix');\r\n this._trie = TernarySearchTree.forStrings();\r\n this._seq = 0;\r\n }\r\n memorize(model, pos, item) {\r\n const { word } = model.getWordUntilPosition(pos);\r\n const key = `${model.getLanguageIdentifier().language}/${word}`;\r\n this._trie.set(key, {\r\n type: item.completion.kind,\r\n insertText: item.completion.insertText,\r\n touch: this._seq++\r\n });\r\n }\r\n select(model, pos, items) {\r\n let { word } = model.getWordUntilPosition(pos);\r\n if (!word) {\r\n return super.select(model, pos, items);\r\n }\r\n let key = `${model.getLanguageIdentifier().language}/${word}`;\r\n let item = this._trie.get(key);\r\n if (!item) {\r\n item = this._trie.findSubstr(key);\r\n }\r\n if (item) {\r\n for (let i = 0; i < items.length; i++) {\r\n let { kind, insertText } = items[i].completion;\r\n if (kind === item.type && insertText === item.insertText) {\r\n return i;\r\n }\r\n }\r\n }\r\n return super.select(model, pos, items);\r\n }\r\n toJSON() {\r\n let entries = [];\r\n this._trie.forEach((value, key) => entries.push([key, value]));\r\n // sort by last recently used (touch), then\r\n // take the top 200 item and normalize their\r\n // touch\r\n entries\r\n .sort((a, b) => -(a[1].touch - b[1].touch))\r\n .forEach((value, i) => value[1].touch = i);\r\n return entries.slice(0, 200);\r\n }\r\n fromJSON(data) {\r\n this._trie.clear();\r\n if (data.length > 0) {\r\n this._seq = data[0][1].touch + 1;\r\n for (const [key, value] of data) {\r\n value.type = typeof value.type === 'number' ? value.type : completionKindFromString(value.type);\r\n this._trie.set(key, value);\r\n }\r\n }\r\n }\r\n}\r\nlet SuggestMemoryService = class SuggestMemoryService {\r\n constructor(_storageService, _modeService, _configService) {\r\n this._storageService = _storageService;\r\n this._modeService = _modeService;\r\n this._configService = _configService;\r\n this._disposables = new DisposableStore();\r\n this._persistSoon = new RunOnceScheduler(() => this._saveState(), 500);\r\n this._disposables.add(_storageService.onWillSaveState(e => {\r\n if (e.reason === WillSaveStateReason.SHUTDOWN) {\r\n this._saveState();\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this._persistSoon.dispose();\r\n }\r\n memorize(model, pos, item) {\r\n this._withStrategy(model, pos).memorize(model, pos, item);\r\n this._persistSoon.schedule();\r\n }\r\n select(model, pos, items) {\r\n return this._withStrategy(model, pos).select(model, pos, items);\r\n }\r\n _withStrategy(model, pos) {\r\n var _a, _b;\r\n const mode = this._configService.getValue('editor.suggestSelection', {\r\n overrideIdentifier: (_a = this._modeService.getLanguageIdentifier(model.getLanguageIdAtPosition(pos.lineNumber, pos.column))) === null || _a === void 0 ? void 0 : _a.language,\r\n resource: model.uri\r\n });\r\n if (((_b = this._strategy) === null || _b === void 0 ? void 0 : _b.name) !== mode) {\r\n this._saveState();\r\n const ctor = SuggestMemoryService._strategyCtors.get(mode) || NoMemory;\r\n this._strategy = new ctor();\r\n try {\r\n const share = this._configService.getValue('editor.suggest.shareSuggestSelections');\r\n const scope = share ? 0 /* GLOBAL */ : 1 /* WORKSPACE */;\r\n const raw = this._storageService.get(`${SuggestMemoryService._storagePrefix}/${mode}`, scope);\r\n if (raw) {\r\n this._strategy.fromJSON(JSON.parse(raw));\r\n }\r\n }\r\n catch (e) {\r\n // things can go wrong with JSON...\r\n }\r\n }\r\n return this._strategy;\r\n }\r\n _saveState() {\r\n if (this._strategy) {\r\n const share = this._configService.getValue('editor.suggest.shareSuggestSelections');\r\n const scope = share ? 0 /* GLOBAL */ : 1 /* WORKSPACE */;\r\n const raw = JSON.stringify(this._strategy);\r\n this._storageService.store(`${SuggestMemoryService._storagePrefix}/${this._strategy.name}`, raw, scope, 1 /* MACHINE */);\r\n }\r\n }\r\n};\r\nSuggestMemoryService._strategyCtors = new Map([\r\n ['recentlyUsedByPrefix', PrefixMemory],\r\n ['recentlyUsed', LRUMemory],\r\n ['first', NoMemory]\r\n]);\r\nSuggestMemoryService._storagePrefix = 'suggest/memories';\r\nSuggestMemoryService = __decorate([\r\n __param(0, IStorageService),\r\n __param(1, IModeService),\r\n __param(2, IConfigurationService)\r\n], SuggestMemoryService);\r\nexport { SuggestMemoryService };\r\nexport const ISuggestMemoryService = createDecorator('ISuggestMemories');\r\nregisterSingleton(ISuggestMemoryService, SuggestMemoryService, true);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\r\nlet SuggestAlternatives = class SuggestAlternatives {\r\n constructor(_editor, contextKeyService) {\r\n this._editor = _editor;\r\n this._index = 0;\r\n this._ckOtherSuggestions = SuggestAlternatives.OtherSuggestions.bindTo(contextKeyService);\r\n }\r\n dispose() {\r\n this.reset();\r\n }\r\n reset() {\r\n var _a;\r\n this._ckOtherSuggestions.reset();\r\n (_a = this._listener) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._model = undefined;\r\n this._acceptNext = undefined;\r\n this._ignore = false;\r\n }\r\n set({ model, index }, acceptNext) {\r\n // no suggestions -> nothing to do\r\n if (model.items.length === 0) {\r\n this.reset();\r\n return;\r\n }\r\n // no alternative suggestions -> nothing to do\r\n let nextIndex = SuggestAlternatives._moveIndex(true, model, index);\r\n if (nextIndex === index) {\r\n this.reset();\r\n return;\r\n }\r\n this._acceptNext = acceptNext;\r\n this._model = model;\r\n this._index = index;\r\n this._listener = this._editor.onDidChangeCursorPosition(() => {\r\n if (!this._ignore) {\r\n this.reset();\r\n }\r\n });\r\n this._ckOtherSuggestions.set(true);\r\n }\r\n static _moveIndex(fwd, model, index) {\r\n let newIndex = index;\r\n while (true) {\r\n newIndex = (newIndex + model.items.length + (fwd ? +1 : -1)) % model.items.length;\r\n if (newIndex === index) {\r\n break;\r\n }\r\n if (!model.items[newIndex].completion.additionalTextEdits) {\r\n break;\r\n }\r\n }\r\n return newIndex;\r\n }\r\n next() {\r\n this._move(true);\r\n }\r\n prev() {\r\n this._move(false);\r\n }\r\n _move(fwd) {\r\n if (!this._model) {\r\n // nothing to reason about\r\n return;\r\n }\r\n try {\r\n this._ignore = true;\r\n this._index = SuggestAlternatives._moveIndex(fwd, this._model, this._index);\r\n this._acceptNext({ index: this._index, item: this._model.items[this._index], model: this._model });\r\n }\r\n finally {\r\n this._ignore = false;\r\n }\r\n }\r\n};\r\nSuggestAlternatives.OtherSuggestions = new RawContextKey('hasOtherSuggestions', false);\r\nSuggestAlternatives = __decorate([\r\n __param(1, IContextKeyService)\r\n], SuggestAlternatives);\r\nexport { SuggestAlternatives };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { fuzzyScore, fuzzyScoreGracefulAggressive, FuzzyScore, anyScore } from '../../../base/common/filters.js';\r\nimport { compareIgnoreCase } from '../../../base/common/strings.js';\r\nimport { quickSelect } from '../../../base/common/arrays.js';\r\nexport class LineContext {\r\n constructor(leadingLineContent, characterCountDelta) {\r\n this.leadingLineContent = leadingLineContent;\r\n this.characterCountDelta = characterCountDelta;\r\n }\r\n}\r\n/**\r\n * Sorted, filtered completion view model\r\n * */\r\nexport class CompletionModel {\r\n constructor(items, column, lineContext, wordDistance, options, snippetSuggestions, clipboardText) {\r\n this.clipboardText = clipboardText;\r\n this._snippetCompareFn = CompletionModel._compareCompletionItems;\r\n this._items = items;\r\n this._column = column;\r\n this._wordDistance = wordDistance;\r\n this._options = options;\r\n this._refilterKind = 1 /* All */;\r\n this._lineContext = lineContext;\r\n if (snippetSuggestions === 'top') {\r\n this._snippetCompareFn = CompletionModel._compareCompletionItemsSnippetsUp;\r\n }\r\n else if (snippetSuggestions === 'bottom') {\r\n this._snippetCompareFn = CompletionModel._compareCompletionItemsSnippetsDown;\r\n }\r\n }\r\n get lineContext() {\r\n return this._lineContext;\r\n }\r\n set lineContext(value) {\r\n if (this._lineContext.leadingLineContent !== value.leadingLineContent\r\n || this._lineContext.characterCountDelta !== value.characterCountDelta) {\r\n this._refilterKind = this._lineContext.characterCountDelta < value.characterCountDelta && this._filteredItems ? 2 /* Incr */ : 1 /* All */;\r\n this._lineContext = value;\r\n }\r\n }\r\n get items() {\r\n this._ensureCachedState();\r\n return this._filteredItems;\r\n }\r\n get allProvider() {\r\n this._ensureCachedState();\r\n return this._providerInfo.keys();\r\n }\r\n get incomplete() {\r\n this._ensureCachedState();\r\n const result = new Set();\r\n for (let [provider, incomplete] of this._providerInfo) {\r\n if (incomplete) {\r\n result.add(provider);\r\n }\r\n }\r\n return result;\r\n }\r\n adopt(except) {\r\n let res = [];\r\n for (let i = 0; i < this._items.length;) {\r\n if (!except.has(this._items[i].provider)) {\r\n res.push(this._items[i]);\r\n // unordered removed\r\n this._items[i] = this._items[this._items.length - 1];\r\n this._items.pop();\r\n }\r\n else {\r\n // continue with next item\r\n i++;\r\n }\r\n }\r\n this._refilterKind = 1 /* All */;\r\n return res;\r\n }\r\n get stats() {\r\n this._ensureCachedState();\r\n return this._stats;\r\n }\r\n _ensureCachedState() {\r\n if (this._refilterKind !== 0 /* Nothing */) {\r\n this._createCachedState();\r\n }\r\n }\r\n _createCachedState() {\r\n this._providerInfo = new Map();\r\n const labelLengths = [];\r\n const { leadingLineContent, characterCountDelta } = this._lineContext;\r\n let word = '';\r\n let wordLow = '';\r\n // incrementally filter less\r\n const source = this._refilterKind === 1 /* All */ ? this._items : this._filteredItems;\r\n const target = [];\r\n // picks a score function based on the number of\r\n // items that we have to score/filter and based on the\r\n // user-configuration\r\n const scoreFn = (!this._options.filterGraceful || source.length > 2000) ? fuzzyScore : fuzzyScoreGracefulAggressive;\r\n for (let i = 0; i < source.length; i++) {\r\n const item = source[i];\r\n if (item.isInvalid) {\r\n continue; // SKIP invalid items\r\n }\r\n // collect all support, know if their result is incomplete\r\n this._providerInfo.set(item.provider, Boolean(item.container.incomplete));\r\n // 'word' is that remainder of the current line that we\r\n // filter and score against. In theory each suggestion uses a\r\n // different word, but in practice not - that's why we cache\r\n const overwriteBefore = item.position.column - item.editStart.column;\r\n const wordLen = overwriteBefore + characterCountDelta - (item.position.column - this._column);\r\n if (word.length !== wordLen) {\r\n word = wordLen === 0 ? '' : leadingLineContent.slice(-wordLen);\r\n wordLow = word.toLowerCase();\r\n }\r\n const textLabel = typeof item.completion.label === 'string' ? item.completion.label : item.completion.label.name;\r\n // remember the word against which this item was\r\n // scored\r\n item.word = word;\r\n if (wordLen === 0) {\r\n // when there is nothing to score against, don't\r\n // event try to do. Use a const rank and rely on\r\n // the fallback-sort using the initial sort order.\r\n // use a score of `-100` because that is out of the\r\n // bound of values `fuzzyScore` will return\r\n item.score = FuzzyScore.Default;\r\n }\r\n else {\r\n // skip word characters that are whitespace until\r\n // we have hit the replace range (overwriteBefore)\r\n let wordPos = 0;\r\n while (wordPos < overwriteBefore) {\r\n const ch = word.charCodeAt(wordPos);\r\n if (ch === 32 /* Space */ || ch === 9 /* Tab */) {\r\n wordPos += 1;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n if (wordPos >= wordLen) {\r\n // the wordPos at which scoring starts is the whole word\r\n // and therefore the same rules as not having a word apply\r\n item.score = FuzzyScore.Default;\r\n }\r\n else if (typeof item.completion.filterText === 'string') {\r\n // when there is a `filterText` it must match the `word`.\r\n // if it matches we check with the label to compute highlights\r\n // and if that doesn't yield a result we have no highlights,\r\n // despite having the match\r\n let match = scoreFn(word, wordLow, wordPos, item.completion.filterText, item.filterTextLow, 0, false);\r\n if (!match) {\r\n continue; // NO match\r\n }\r\n if (compareIgnoreCase(item.completion.filterText, textLabel) === 0) {\r\n // filterText and label are actually the same -> use good highlights\r\n item.score = match;\r\n }\r\n else {\r\n // re-run the scorer on the label in the hope of a result BUT use the rank\r\n // of the filterText-match\r\n item.score = anyScore(word, wordLow, wordPos, textLabel, item.labelLow, 0);\r\n item.score[0] = match[0]; // use score from filterText\r\n }\r\n }\r\n else {\r\n // by default match `word` against the `label`\r\n let match = scoreFn(word, wordLow, wordPos, textLabel, item.labelLow, 0, false);\r\n if (!match) {\r\n continue; // NO match\r\n }\r\n item.score = match;\r\n }\r\n }\r\n item.idx = i;\r\n item.distance = this._wordDistance.distance(item.position, item.completion);\r\n target.push(item);\r\n // update stats\r\n labelLengths.push(textLabel.length);\r\n }\r\n this._filteredItems = target.sort(this._snippetCompareFn);\r\n this._refilterKind = 0 /* Nothing */;\r\n this._stats = {\r\n pLabelLen: labelLengths.length ?\r\n quickSelect(labelLengths.length - .85, labelLengths, (a, b) => a - b)\r\n : 0\r\n };\r\n }\r\n static _compareCompletionItems(a, b) {\r\n if (a.score[0] > b.score[0]) {\r\n return -1;\r\n }\r\n else if (a.score[0] < b.score[0]) {\r\n return 1;\r\n }\r\n else if (a.distance < b.distance) {\r\n return -1;\r\n }\r\n else if (a.distance > b.distance) {\r\n return 1;\r\n }\r\n else if (a.idx < b.idx) {\r\n return -1;\r\n }\r\n else if (a.idx > b.idx) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }\r\n static _compareCompletionItemsSnippetsDown(a, b) {\r\n if (a.completion.kind !== b.completion.kind) {\r\n if (a.completion.kind === 27 /* Snippet */) {\r\n return 1;\r\n }\r\n else if (b.completion.kind === 27 /* Snippet */) {\r\n return -1;\r\n }\r\n }\r\n return CompletionModel._compareCompletionItems(a, b);\r\n }\r\n static _compareCompletionItemsSnippetsUp(a, b) {\r\n if (a.completion.kind !== b.completion.kind) {\r\n if (a.completion.kind === 27 /* Snippet */) {\r\n return -1;\r\n }\r\n else if (b.completion.kind === 27 /* Snippet */) {\r\n return 1;\r\n }\r\n }\r\n return CompletionModel._compareCompletionItems(a, b);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { binarySearch, isFalsyOrEmpty } from '../../../base/common/arrays.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { BracketSelectionRangeProvider } from '../smartSelect/bracketSelections.js';\r\nexport class WordDistance {\r\n static create(service, editor) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!editor.getOption(101 /* suggest */).localityBonus) {\r\n return WordDistance.None;\r\n }\r\n if (!editor.hasModel()) {\r\n return WordDistance.None;\r\n }\r\n const model = editor.getModel();\r\n const position = editor.getPosition();\r\n if (!service.canComputeWordRanges(model.uri)) {\r\n return WordDistance.None;\r\n }\r\n const [ranges] = yield new BracketSelectionRangeProvider().provideSelectionRanges(model, [position]);\r\n if (ranges.length === 0) {\r\n return WordDistance.None;\r\n }\r\n const wordRanges = yield service.computeWordRanges(model.uri, ranges[0].range);\r\n if (!wordRanges) {\r\n return WordDistance.None;\r\n }\r\n // remove current word\r\n const wordUntilPos = model.getWordUntilPosition(position);\r\n delete wordRanges[wordUntilPos.word];\r\n return new class extends WordDistance {\r\n distance(anchor, suggestion) {\r\n if (!position.equals(editor.getPosition())) {\r\n return 0;\r\n }\r\n if (suggestion.kind === 17 /* Keyword */) {\r\n return 2 << 20;\r\n }\r\n let word = typeof suggestion.label === 'string' ? suggestion.label : suggestion.label.name;\r\n let wordLines = wordRanges[word];\r\n if (isFalsyOrEmpty(wordLines)) {\r\n return 2 << 20;\r\n }\r\n let idx = binarySearch(wordLines, Range.fromPositions(anchor), Range.compareRangesUsingStarts);\r\n let bestWordRange = idx >= 0 ? wordLines[idx] : wordLines[Math.max(0, ~idx - 1)];\r\n let blockDistance = ranges.length;\r\n for (const range of ranges) {\r\n if (!Range.containsRange(range.range, bestWordRange)) {\r\n break;\r\n }\r\n blockDistance -= 1;\r\n }\r\n return blockDistance;\r\n }\r\n };\r\n });\r\n }\r\n}\r\nWordDistance.None = new class extends WordDistance {\r\n distance() { return 0; }\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { TimeoutTimer } from '../../../base/common/async.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { dispose, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { CompletionProviderRegistry } from '../../common/modes.js';\r\nimport { CompletionModel } from './completionModel.js';\r\nimport { getSuggestionComparator, provideSuggestionItems, getSnippetSuggestSupport, CompletionOptions } from './suggest.js';\r\nimport { SnippetController2 } from '../snippet/snippetController2.js';\r\nimport { CancellationTokenSource } from '../../../base/common/cancellation.js';\r\nimport { IEditorWorkerService } from '../../common/services/editorWorkerService.js';\r\nimport { WordDistance } from './wordDistance.js';\r\nimport { isLowSurrogate, isHighSurrogate, getLeadingWhitespace } from '../../../base/common/strings.js';\r\nimport { IClipboardService } from '../../../platform/clipboard/common/clipboardService.js';\r\nimport { ITelemetryService } from '../../../platform/telemetry/common/telemetry.js';\r\nimport { ILogService } from '../../../platform/log/common/log.js';\r\nexport class LineContext {\r\n constructor(model, position, auto, shy) {\r\n this.leadingLineContent = model.getLineContent(position.lineNumber).substr(0, position.column - 1);\r\n this.leadingWord = model.getWordUntilPosition(position);\r\n this.lineNumber = position.lineNumber;\r\n this.column = position.column;\r\n this.auto = auto;\r\n this.shy = shy;\r\n }\r\n static shouldAutoTrigger(editor) {\r\n if (!editor.hasModel()) {\r\n return false;\r\n }\r\n const model = editor.getModel();\r\n const pos = editor.getPosition();\r\n model.tokenizeIfCheap(pos.lineNumber);\r\n const word = model.getWordAtPosition(pos);\r\n if (!word) {\r\n return false;\r\n }\r\n if (word.endColumn !== pos.column) {\r\n return false;\r\n }\r\n if (!isNaN(Number(word.word))) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n}\r\nlet SuggestModel = class SuggestModel {\r\n constructor(_editor, _editorWorkerService, _clipboardService, _telemetryService, _logService) {\r\n this._editor = _editor;\r\n this._editorWorkerService = _editorWorkerService;\r\n this._clipboardService = _clipboardService;\r\n this._telemetryService = _telemetryService;\r\n this._logService = _logService;\r\n this._toDispose = new DisposableStore();\r\n this._quickSuggestDelay = 10;\r\n this._triggerCharacterListener = new DisposableStore();\r\n this._triggerQuickSuggest = new TimeoutTimer();\r\n this._state = 0 /* Idle */;\r\n this._completionDisposables = new DisposableStore();\r\n this._onDidCancel = new Emitter();\r\n this._onDidTrigger = new Emitter();\r\n this._onDidSuggest = new Emitter();\r\n this.onDidCancel = this._onDidCancel.event;\r\n this.onDidTrigger = this._onDidTrigger.event;\r\n this.onDidSuggest = this._onDidSuggest.event;\r\n this._telemetryGate = 0;\r\n this._currentSelection = this._editor.getSelection() || new Selection(1, 1, 1, 1);\r\n // wire up various listeners\r\n this._toDispose.add(this._editor.onDidChangeModel(() => {\r\n this._updateTriggerCharacters();\r\n this.cancel();\r\n }));\r\n this._toDispose.add(this._editor.onDidChangeModelLanguage(() => {\r\n this._updateTriggerCharacters();\r\n this.cancel();\r\n }));\r\n this._toDispose.add(this._editor.onDidChangeConfiguration(() => {\r\n this._updateTriggerCharacters();\r\n this._updateQuickSuggest();\r\n }));\r\n this._toDispose.add(CompletionProviderRegistry.onDidChange(() => {\r\n this._updateTriggerCharacters();\r\n this._updateActiveSuggestSession();\r\n }));\r\n this._toDispose.add(this._editor.onDidChangeCursorSelection(e => {\r\n this._onCursorChange(e);\r\n }));\r\n let editorIsComposing = false;\r\n this._toDispose.add(this._editor.onDidCompositionStart(() => {\r\n editorIsComposing = true;\r\n }));\r\n this._toDispose.add(this._editor.onDidCompositionEnd(() => {\r\n // refilter when composition ends\r\n editorIsComposing = false;\r\n this._refilterCompletionItems();\r\n }));\r\n this._toDispose.add(this._editor.onDidChangeModelContent(() => {\r\n // only filter completions when the editor isn't\r\n // composing a character, e.g. ¨ + u makes ü but just\r\n // ¨ cannot be used for filtering\r\n if (!editorIsComposing) {\r\n this._refilterCompletionItems();\r\n }\r\n }));\r\n this._updateTriggerCharacters();\r\n this._updateQuickSuggest();\r\n }\r\n dispose() {\r\n dispose(this._triggerCharacterListener);\r\n dispose([this._onDidCancel, this._onDidSuggest, this._onDidTrigger, this._triggerQuickSuggest]);\r\n this._toDispose.dispose();\r\n this._completionDisposables.dispose();\r\n this.cancel();\r\n }\r\n // --- handle configuration & precondition changes\r\n _updateQuickSuggest() {\r\n this._quickSuggestDelay = this._editor.getOption(74 /* quickSuggestionsDelay */);\r\n if (isNaN(this._quickSuggestDelay) || (!this._quickSuggestDelay && this._quickSuggestDelay !== 0) || this._quickSuggestDelay < 0) {\r\n this._quickSuggestDelay = 10;\r\n }\r\n }\r\n _updateTriggerCharacters() {\r\n this._triggerCharacterListener.clear();\r\n if (this._editor.getOption(75 /* readOnly */)\r\n || !this._editor.hasModel()\r\n || !this._editor.getOption(104 /* suggestOnTriggerCharacters */)) {\r\n return;\r\n }\r\n const supportsByTriggerCharacter = new Map();\r\n for (const support of CompletionProviderRegistry.all(this._editor.getModel())) {\r\n for (const ch of support.triggerCharacters || []) {\r\n let set = supportsByTriggerCharacter.get(ch);\r\n if (!set) {\r\n set = new Set();\r\n set.add(getSnippetSuggestSupport());\r\n supportsByTriggerCharacter.set(ch, set);\r\n }\r\n set.add(support);\r\n }\r\n }\r\n const checkTriggerCharacter = (text) => {\r\n if (!text) {\r\n // came here from the compositionEnd-event\r\n const position = this._editor.getPosition();\r\n const model = this._editor.getModel();\r\n text = model.getLineContent(position.lineNumber).substr(0, position.column - 1);\r\n }\r\n let lastChar = '';\r\n if (isLowSurrogate(text.charCodeAt(text.length - 1))) {\r\n if (isHighSurrogate(text.charCodeAt(text.length - 2))) {\r\n lastChar = text.substr(text.length - 2);\r\n }\r\n }\r\n else {\r\n lastChar = text.charAt(text.length - 1);\r\n }\r\n const supports = supportsByTriggerCharacter.get(lastChar);\r\n if (supports) {\r\n // keep existing items that where not computed by the\r\n // supports/providers that want to trigger now\r\n const existing = this._completionModel\r\n ? { items: this._completionModel.adopt(supports), clipboardText: this._completionModel.clipboardText }\r\n : undefined;\r\n this.trigger({ auto: true, shy: false, triggerCharacter: lastChar }, Boolean(this._completionModel), supports, existing);\r\n }\r\n };\r\n this._triggerCharacterListener.add(this._editor.onDidType(checkTriggerCharacter));\r\n this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(checkTriggerCharacter));\r\n }\r\n // --- trigger/retrigger/cancel suggest\r\n get state() {\r\n return this._state;\r\n }\r\n cancel(retrigger = false) {\r\n var _a;\r\n if (this._state !== 0 /* Idle */) {\r\n this._triggerQuickSuggest.cancel();\r\n (_a = this._requestToken) === null || _a === void 0 ? void 0 : _a.cancel();\r\n this._requestToken = undefined;\r\n this._state = 0 /* Idle */;\r\n this._completionModel = undefined;\r\n this._context = undefined;\r\n this._onDidCancel.fire({ retrigger });\r\n }\r\n }\r\n clear() {\r\n this._completionDisposables.clear();\r\n }\r\n _updateActiveSuggestSession() {\r\n if (this._state !== 0 /* Idle */) {\r\n if (!this._editor.hasModel() || !CompletionProviderRegistry.has(this._editor.getModel())) {\r\n this.cancel();\r\n }\r\n else {\r\n this.trigger({ auto: this._state === 2 /* Auto */, shy: false }, true);\r\n }\r\n }\r\n }\r\n _onCursorChange(e) {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const prevSelection = this._currentSelection;\r\n this._currentSelection = this._editor.getSelection();\r\n if (!e.selection.isEmpty()\r\n || (e.reason !== 0 /* NotSet */ && e.reason !== 3 /* Explicit */)\r\n || (e.source !== 'keyboard' && e.source !== 'deleteLeft')) {\r\n // Early exit if nothing needs to be done!\r\n // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;)\r\n this.cancel();\r\n return;\r\n }\r\n if (!CompletionProviderRegistry.has(model)) {\r\n return;\r\n }\r\n if (this._state === 0 /* Idle */ && e.reason === 0 /* NotSet */) {\r\n if (this._editor.getOption(73 /* quickSuggestions */) === false) {\r\n // not enabled\r\n return;\r\n }\r\n if (!prevSelection.containsRange(this._currentSelection) && !prevSelection.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition())) {\r\n // cursor didn't move RIGHT\r\n return;\r\n }\r\n if (this._editor.getOption(101 /* suggest */).snippetsPreventQuickSuggestions && SnippetController2.get(this._editor).isInSnippet()) {\r\n // no quick suggestion when in snippet mode\r\n return;\r\n }\r\n this.cancel();\r\n this._triggerQuickSuggest.cancelAndSet(() => {\r\n if (this._state !== 0 /* Idle */) {\r\n return;\r\n }\r\n if (!LineContext.shouldAutoTrigger(this._editor)) {\r\n return;\r\n }\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const pos = this._editor.getPosition();\r\n // validate enabled now\r\n const quickSuggestions = this._editor.getOption(73 /* quickSuggestions */);\r\n if (quickSuggestions === false) {\r\n return;\r\n }\r\n else if (quickSuggestions === true) {\r\n // all good\r\n }\r\n else {\r\n // Check the type of the token that triggered this\r\n model.tokenizeIfCheap(pos.lineNumber);\r\n const lineTokens = model.getLineTokens(pos.lineNumber);\r\n const tokenType = lineTokens.getStandardTokenType(lineTokens.findTokenIndexAtOffset(Math.max(pos.column - 1 - 1, 0)));\r\n const inValidScope = quickSuggestions.other && tokenType === 0 /* Other */\r\n || quickSuggestions.comments && tokenType === 1 /* Comment */\r\n || quickSuggestions.strings && tokenType === 2 /* String */;\r\n if (!inValidScope) {\r\n return;\r\n }\r\n }\r\n // we made it till here -> trigger now\r\n this.trigger({ auto: true, shy: false });\r\n }, this._quickSuggestDelay);\r\n }\r\n else if (this._state !== 0 /* Idle */ && e.reason === 3 /* Explicit */) {\r\n // suggest is active and something like cursor keys are used to move\r\n // the cursor. this means we can refilter at the new position\r\n this._refilterCompletionItems();\r\n }\r\n }\r\n _refilterCompletionItems() {\r\n // Re-filter suggestions. This MUST run async because filtering/scoring\r\n // uses the model content AND the cursor position. The latter is NOT\r\n // updated when the document has changed (the event which drives this method)\r\n // and therefore a little pause (next mirco task) is needed. See:\r\n // https://stackoverflow.com/questions/25915634/difference-between-microtask-and-macrotask-within-an-event-loop-context#25933985\r\n Promise.resolve().then(() => {\r\n if (this._state === 0 /* Idle */) {\r\n return;\r\n }\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const position = this._editor.getPosition();\r\n const ctx = new LineContext(model, position, this._state === 2 /* Auto */, false);\r\n this._onNewContext(ctx);\r\n });\r\n }\r\n trigger(context, retrigger = false, onlyFrom, existing) {\r\n var _a;\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const auto = context.auto;\r\n const ctx = new LineContext(model, this._editor.getPosition(), auto, context.shy);\r\n // Cancel previous requests, change state & update UI\r\n this.cancel(retrigger);\r\n this._state = auto ? 2 /* Auto */ : 1 /* Manual */;\r\n this._onDidTrigger.fire({ auto, shy: context.shy, position: this._editor.getPosition() });\r\n // Capture context when request was sent\r\n this._context = ctx;\r\n // Build context for request\r\n let suggestCtx = { triggerKind: (_a = context.triggerKind) !== null && _a !== void 0 ? _a : 0 /* Invoke */ };\r\n if (context.triggerCharacter) {\r\n suggestCtx = {\r\n triggerKind: 1 /* TriggerCharacter */,\r\n triggerCharacter: context.triggerCharacter\r\n };\r\n }\r\n this._requestToken = new CancellationTokenSource();\r\n // kind filter and snippet sort rules\r\n const snippetSuggestions = this._editor.getOption(96 /* snippetSuggestions */);\r\n let snippetSortOrder = 1 /* Inline */;\r\n switch (snippetSuggestions) {\r\n case 'top':\r\n snippetSortOrder = 0 /* Top */;\r\n break;\r\n // \t↓ that's the default anyways...\r\n // case 'inline':\r\n // \tsnippetSortOrder = SnippetSortOrder.Inline;\r\n // \tbreak;\r\n case 'bottom':\r\n snippetSortOrder = 2 /* Bottom */;\r\n break;\r\n }\r\n const itemKindFilter = SuggestModel._createItemKindFilter(this._editor);\r\n const wordDistance = WordDistance.create(this._editorWorkerService, this._editor);\r\n const completions = provideSuggestionItems(model, this._editor.getPosition(), new CompletionOptions(snippetSortOrder, itemKindFilter, onlyFrom), suggestCtx, this._requestToken.token);\r\n Promise.all([completions, wordDistance]).then(([completions, wordDistance]) => __awaiter(this, void 0, void 0, function* () {\r\n var _b;\r\n (_b = this._requestToken) === null || _b === void 0 ? void 0 : _b.dispose();\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n let clipboardText = existing === null || existing === void 0 ? void 0 : existing.clipboardText;\r\n if (!clipboardText && completions.needsClipboard) {\r\n clipboardText = yield this._clipboardService.readText();\r\n }\r\n if (this._state === 0 /* Idle */) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n let items = completions.items;\r\n if (existing) {\r\n const cmpFn = getSuggestionComparator(snippetSortOrder);\r\n items = items.concat(existing.items).sort(cmpFn);\r\n }\r\n const ctx = new LineContext(model, this._editor.getPosition(), auto, context.shy);\r\n this._completionModel = new CompletionModel(items, this._context.column, {\r\n leadingLineContent: ctx.leadingLineContent,\r\n characterCountDelta: ctx.column - this._context.column\r\n }, wordDistance, this._editor.getOption(101 /* suggest */), this._editor.getOption(96 /* snippetSuggestions */), clipboardText);\r\n // store containers so that they can be disposed later\r\n this._completionDisposables.add(completions.disposable);\r\n this._onNewContext(ctx);\r\n // finally report telemetry about durations\r\n this._reportDurationsTelemetry(completions.durations);\r\n })).catch(onUnexpectedError);\r\n }\r\n _reportDurationsTelemetry(durations) {\r\n if (this._telemetryGate++ % 230 !== 0) {\r\n return;\r\n }\r\n setTimeout(() => {\r\n this._telemetryService.publicLog2('suggest.durations.json', { data: JSON.stringify(durations) });\r\n this._logService.debug('suggest.durations.json', durations);\r\n });\r\n }\r\n static _createItemKindFilter(editor) {\r\n // kind filter and snippet sort rules\r\n const result = new Set();\r\n // snippet setting\r\n const snippetSuggestions = editor.getOption(96 /* snippetSuggestions */);\r\n if (snippetSuggestions === 'none') {\r\n result.add(27 /* Snippet */);\r\n }\r\n // type setting\r\n const suggestOptions = editor.getOption(101 /* suggest */);\r\n if (!suggestOptions.showMethods) {\r\n result.add(0 /* Method */);\r\n }\r\n if (!suggestOptions.showFunctions) {\r\n result.add(1 /* Function */);\r\n }\r\n if (!suggestOptions.showConstructors) {\r\n result.add(2 /* Constructor */);\r\n }\r\n if (!suggestOptions.showFields) {\r\n result.add(3 /* Field */);\r\n }\r\n if (!suggestOptions.showVariables) {\r\n result.add(4 /* Variable */);\r\n }\r\n if (!suggestOptions.showClasses) {\r\n result.add(5 /* Class */);\r\n }\r\n if (!suggestOptions.showStructs) {\r\n result.add(6 /* Struct */);\r\n }\r\n if (!suggestOptions.showInterfaces) {\r\n result.add(7 /* Interface */);\r\n }\r\n if (!suggestOptions.showModules) {\r\n result.add(8 /* Module */);\r\n }\r\n if (!suggestOptions.showProperties) {\r\n result.add(9 /* Property */);\r\n }\r\n if (!suggestOptions.showEvents) {\r\n result.add(10 /* Event */);\r\n }\r\n if (!suggestOptions.showOperators) {\r\n result.add(11 /* Operator */);\r\n }\r\n if (!suggestOptions.showUnits) {\r\n result.add(12 /* Unit */);\r\n }\r\n if (!suggestOptions.showValues) {\r\n result.add(13 /* Value */);\r\n }\r\n if (!suggestOptions.showConstants) {\r\n result.add(14 /* Constant */);\r\n }\r\n if (!suggestOptions.showEnums) {\r\n result.add(15 /* Enum */);\r\n }\r\n if (!suggestOptions.showEnumMembers) {\r\n result.add(16 /* EnumMember */);\r\n }\r\n if (!suggestOptions.showKeywords) {\r\n result.add(17 /* Keyword */);\r\n }\r\n if (!suggestOptions.showWords) {\r\n result.add(18 /* Text */);\r\n }\r\n if (!suggestOptions.showColors) {\r\n result.add(19 /* Color */);\r\n }\r\n if (!suggestOptions.showFiles) {\r\n result.add(20 /* File */);\r\n }\r\n if (!suggestOptions.showReferences) {\r\n result.add(21 /* Reference */);\r\n }\r\n if (!suggestOptions.showColors) {\r\n result.add(22 /* Customcolor */);\r\n }\r\n if (!suggestOptions.showFolders) {\r\n result.add(23 /* Folder */);\r\n }\r\n if (!suggestOptions.showTypeParameters) {\r\n result.add(24 /* TypeParameter */);\r\n }\r\n if (!suggestOptions.showSnippets) {\r\n result.add(27 /* Snippet */);\r\n }\r\n if (!suggestOptions.showUsers) {\r\n result.add(25 /* User */);\r\n }\r\n if (!suggestOptions.showIssues) {\r\n result.add(26 /* Issue */);\r\n }\r\n return result;\r\n }\r\n _onNewContext(ctx) {\r\n if (!this._context) {\r\n // happens when 24x7 IntelliSense is enabled and still in its delay\r\n return;\r\n }\r\n if (ctx.lineNumber !== this._context.lineNumber) {\r\n // e.g. happens when pressing Enter while IntelliSense is computed\r\n this.cancel();\r\n return;\r\n }\r\n if (getLeadingWhitespace(ctx.leadingLineContent) !== getLeadingWhitespace(this._context.leadingLineContent)) {\r\n // cancel IntelliSense when line start changes\r\n // happens when the current word gets outdented\r\n this.cancel();\r\n return;\r\n }\r\n if (ctx.column < this._context.column) {\r\n // typed -> moved cursor LEFT -> retrigger if still on a word\r\n if (ctx.leadingWord.word) {\r\n this.trigger({ auto: this._context.auto, shy: false }, true);\r\n }\r\n else {\r\n this.cancel();\r\n }\r\n return;\r\n }\r\n if (!this._completionModel) {\r\n // happens when IntelliSense is not yet computed\r\n return;\r\n }\r\n if (ctx.leadingWord.word.length !== 0 && ctx.leadingWord.startColumn > this._context.leadingWord.startColumn) {\r\n // started a new word while IntelliSense shows -> retrigger\r\n // Select those providers have not contributed to this completion model and re-trigger completions for\r\n // them. Also adopt the existing items and merge them into the new completion model\r\n const inactiveProvider = new Set(CompletionProviderRegistry.all(this._editor.getModel()));\r\n for (let provider of this._completionModel.allProvider) {\r\n inactiveProvider.delete(provider);\r\n }\r\n const items = this._completionModel.adopt(new Set());\r\n this.trigger({ auto: this._context.auto, shy: false }, true, inactiveProvider, { items, clipboardText: this._completionModel.clipboardText });\r\n return;\r\n }\r\n if (ctx.column > this._context.column && this._completionModel.incomplete.size > 0 && ctx.leadingWord.word.length !== 0) {\r\n // typed -> moved cursor RIGHT & incomple model & still on a word -> retrigger\r\n const { incomplete } = this._completionModel;\r\n const items = this._completionModel.adopt(incomplete);\r\n this.trigger({ auto: this._state === 2 /* Auto */, shy: false, triggerKind: 2 /* TriggerForIncompleteCompletions */ }, true, incomplete, { items, clipboardText: this._completionModel.clipboardText });\r\n }\r\n else {\r\n // typed -> moved cursor RIGHT -> update UI\r\n let oldLineContext = this._completionModel.lineContext;\r\n let isFrozen = false;\r\n this._completionModel.lineContext = {\r\n leadingLineContent: ctx.leadingLineContent,\r\n characterCountDelta: ctx.column - this._context.column\r\n };\r\n if (this._completionModel.items.length === 0) {\r\n if (LineContext.shouldAutoTrigger(this._editor) && this._context.leadingWord.endColumn < ctx.leadingWord.startColumn) {\r\n // retrigger when heading into a new word\r\n this.trigger({ auto: this._context.auto, shy: false }, true);\r\n return;\r\n }\r\n if (!this._context.auto) {\r\n // freeze when IntelliSense was manually requested\r\n this._completionModel.lineContext = oldLineContext;\r\n isFrozen = this._completionModel.items.length > 0;\r\n if (isFrozen && ctx.leadingWord.word.length === 0) {\r\n // there were results before but now there aren't\r\n // and also we are not on a word anymore -> cancel\r\n this.cancel();\r\n return;\r\n }\r\n }\r\n else {\r\n // nothing left\r\n this.cancel();\r\n return;\r\n }\r\n }\r\n this._onDidSuggest.fire({\r\n completionModel: this._completionModel,\r\n auto: this._context.auto,\r\n shy: this._context.shy,\r\n isFrozen,\r\n });\r\n }\r\n }\r\n};\r\nSuggestModel = __decorate([\r\n __param(1, IEditorWorkerService),\r\n __param(2, IClipboardService),\r\n __param(3, ITelemetryService),\r\n __param(4, ILogService)\r\n], SuggestModel);\r\nexport { SuggestModel };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { localize } from '../../../nls.js';\r\nimport { registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport { registerColor, foreground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nexport const SYMBOL_ICON_ARRAY_FOREGROUND = registerColor('symbolIcon.arrayForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.arrayForeground', 'The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_BOOLEAN_FOREGROUND = registerColor('symbolIcon.booleanForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.booleanForeground', 'The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_CLASS_FOREGROUND = registerColor('symbolIcon.classForeground', {\r\n dark: '#EE9D28',\r\n light: '#D67E00',\r\n hc: '#EE9D28'\r\n}, localize('symbolIcon.classForeground', 'The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_COLOR_FOREGROUND = registerColor('symbolIcon.colorForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.colorForeground', 'The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_CONSTANT_FOREGROUND = registerColor('symbolIcon.constantForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.constantForeground', 'The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_CONSTRUCTOR_FOREGROUND = registerColor('symbolIcon.constructorForeground', {\r\n dark: '#B180D7',\r\n light: '#652D90',\r\n hc: '#B180D7'\r\n}, localize('symbolIcon.constructorForeground', 'The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_ENUMERATOR_FOREGROUND = registerColor('symbolIcon.enumeratorForeground', {\r\n dark: '#EE9D28',\r\n light: '#D67E00',\r\n hc: '#EE9D28'\r\n}, localize('symbolIcon.enumeratorForeground', 'The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND = registerColor('symbolIcon.enumeratorMemberForeground', {\r\n dark: '#75BEFF',\r\n light: '#007ACC',\r\n hc: '#75BEFF'\r\n}, localize('symbolIcon.enumeratorMemberForeground', 'The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_EVENT_FOREGROUND = registerColor('symbolIcon.eventForeground', {\r\n dark: '#EE9D28',\r\n light: '#D67E00',\r\n hc: '#EE9D28'\r\n}, localize('symbolIcon.eventForeground', 'The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_FIELD_FOREGROUND = registerColor('symbolIcon.fieldForeground', {\r\n dark: '#75BEFF',\r\n light: '#007ACC',\r\n hc: '#75BEFF'\r\n}, localize('symbolIcon.fieldForeground', 'The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_FILE_FOREGROUND = registerColor('symbolIcon.fileForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.fileForeground', 'The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_FOLDER_FOREGROUND = registerColor('symbolIcon.folderForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.folderForeground', 'The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_FUNCTION_FOREGROUND = registerColor('symbolIcon.functionForeground', {\r\n dark: '#B180D7',\r\n light: '#652D90',\r\n hc: '#B180D7'\r\n}, localize('symbolIcon.functionForeground', 'The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_INTERFACE_FOREGROUND = registerColor('symbolIcon.interfaceForeground', {\r\n dark: '#75BEFF',\r\n light: '#007ACC',\r\n hc: '#75BEFF'\r\n}, localize('symbolIcon.interfaceForeground', 'The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_KEY_FOREGROUND = registerColor('symbolIcon.keyForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.keyForeground', 'The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_KEYWORD_FOREGROUND = registerColor('symbolIcon.keywordForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.keywordForeground', 'The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_METHOD_FOREGROUND = registerColor('symbolIcon.methodForeground', {\r\n dark: '#B180D7',\r\n light: '#652D90',\r\n hc: '#B180D7'\r\n}, localize('symbolIcon.methodForeground', 'The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_MODULE_FOREGROUND = registerColor('symbolIcon.moduleForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.moduleForeground', 'The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_NAMESPACE_FOREGROUND = registerColor('symbolIcon.namespaceForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.namespaceForeground', 'The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_NULL_FOREGROUND = registerColor('symbolIcon.nullForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.nullForeground', 'The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_NUMBER_FOREGROUND = registerColor('symbolIcon.numberForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.numberForeground', 'The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_OBJECT_FOREGROUND = registerColor('symbolIcon.objectForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.objectForeground', 'The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_OPERATOR_FOREGROUND = registerColor('symbolIcon.operatorForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.operatorForeground', 'The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_PACKAGE_FOREGROUND = registerColor('symbolIcon.packageForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.packageForeground', 'The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_PROPERTY_FOREGROUND = registerColor('symbolIcon.propertyForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.propertyForeground', 'The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_REFERENCE_FOREGROUND = registerColor('symbolIcon.referenceForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.referenceForeground', 'The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_SNIPPET_FOREGROUND = registerColor('symbolIcon.snippetForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.snippetForeground', 'The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_STRING_FOREGROUND = registerColor('symbolIcon.stringForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.stringForeground', 'The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_STRUCT_FOREGROUND = registerColor('symbolIcon.structForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.structForeground', 'The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_TEXT_FOREGROUND = registerColor('symbolIcon.textForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.textForeground', 'The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_TYPEPARAMETER_FOREGROUND = registerColor('symbolIcon.typeParameterForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.typeParameterForeground', 'The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_UNIT_FOREGROUND = registerColor('symbolIcon.unitForeground', {\r\n dark: foreground,\r\n light: foreground,\r\n hc: foreground\r\n}, localize('symbolIcon.unitForeground', 'The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nexport const SYMBOL_ICON_VARIABLE_FOREGROUND = registerColor('symbolIcon.variableForeground', {\r\n dark: '#75BEFF',\r\n light: '#007ACC',\r\n hc: '#75BEFF'\r\n}, localize('symbolIcon.variableForeground', 'The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget.'));\r\nregisterThemingParticipant((theme, collector) => {\r\n const symbolIconArrayColor = theme.getColor(SYMBOL_ICON_ARRAY_FOREGROUND);\r\n if (symbolIconArrayColor) {\r\n collector.addRule(`${Codicon.symbolArray.cssSelector} { color: ${symbolIconArrayColor}; }`);\r\n }\r\n const symbolIconBooleanColor = theme.getColor(SYMBOL_ICON_BOOLEAN_FOREGROUND);\r\n if (symbolIconBooleanColor) {\r\n collector.addRule(`${Codicon.symbolBoolean.cssSelector} { color: ${symbolIconBooleanColor}; }`);\r\n }\r\n const symbolIconClassColor = theme.getColor(SYMBOL_ICON_CLASS_FOREGROUND);\r\n if (symbolIconClassColor) {\r\n collector.addRule(`${Codicon.symbolClass.cssSelector} { color: ${symbolIconClassColor}; }`);\r\n }\r\n const symbolIconMethodColor = theme.getColor(SYMBOL_ICON_METHOD_FOREGROUND);\r\n if (symbolIconMethodColor) {\r\n collector.addRule(`${Codicon.symbolMethod.cssSelector} { color: ${symbolIconMethodColor}; }`);\r\n }\r\n const symbolIconColorColor = theme.getColor(SYMBOL_ICON_COLOR_FOREGROUND);\r\n if (symbolIconColorColor) {\r\n collector.addRule(`${Codicon.symbolColor.cssSelector} { color: ${symbolIconColorColor}; }`);\r\n }\r\n const symbolIconConstantColor = theme.getColor(SYMBOL_ICON_CONSTANT_FOREGROUND);\r\n if (symbolIconConstantColor) {\r\n collector.addRule(`${Codicon.symbolConstant.cssSelector} { color: ${symbolIconConstantColor}; }`);\r\n }\r\n const symbolIconConstructorColor = theme.getColor(SYMBOL_ICON_CONSTRUCTOR_FOREGROUND);\r\n if (symbolIconConstructorColor) {\r\n collector.addRule(`${Codicon.symbolConstructor.cssSelector} { color: ${symbolIconConstructorColor}; }`);\r\n }\r\n const symbolIconEnumeratorColor = theme.getColor(SYMBOL_ICON_ENUMERATOR_FOREGROUND);\r\n if (symbolIconEnumeratorColor) {\r\n collector.addRule(`\n\t\t\t${Codicon.symbolValue.cssSelector},${Codicon.symbolEnum.cssSelector} { color: ${symbolIconEnumeratorColor}; }`);\r\n }\r\n const symbolIconEnumeratorMemberColor = theme.getColor(SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND);\r\n if (symbolIconEnumeratorMemberColor) {\r\n collector.addRule(`${Codicon.symbolEnumMember.cssSelector} { color: ${symbolIconEnumeratorMemberColor}; }`);\r\n }\r\n const symbolIconEventColor = theme.getColor(SYMBOL_ICON_EVENT_FOREGROUND);\r\n if (symbolIconEventColor) {\r\n collector.addRule(`${Codicon.symbolEvent.cssSelector} { color: ${symbolIconEventColor}; }`);\r\n }\r\n const symbolIconFieldColor = theme.getColor(SYMBOL_ICON_FIELD_FOREGROUND);\r\n if (symbolIconFieldColor) {\r\n collector.addRule(`${Codicon.symbolField.cssSelector} { color: ${symbolIconFieldColor}; }`);\r\n }\r\n const symbolIconFileColor = theme.getColor(SYMBOL_ICON_FILE_FOREGROUND);\r\n if (symbolIconFileColor) {\r\n collector.addRule(`${Codicon.symbolFile.cssSelector} { color: ${symbolIconFileColor}; }`);\r\n }\r\n const symbolIconFolderColor = theme.getColor(SYMBOL_ICON_FOLDER_FOREGROUND);\r\n if (symbolIconFolderColor) {\r\n collector.addRule(`${Codicon.symbolFolder.cssSelector} { color: ${symbolIconFolderColor}; }`);\r\n }\r\n const symbolIconFunctionColor = theme.getColor(SYMBOL_ICON_FUNCTION_FOREGROUND);\r\n if (symbolIconFunctionColor) {\r\n collector.addRule(`${Codicon.symbolFunction.cssSelector} { color: ${symbolIconFunctionColor}; }`);\r\n }\r\n const symbolIconInterfaceColor = theme.getColor(SYMBOL_ICON_INTERFACE_FOREGROUND);\r\n if (symbolIconInterfaceColor) {\r\n collector.addRule(`${Codicon.symbolInterface.cssSelector} { color: ${symbolIconInterfaceColor}; }`);\r\n }\r\n const symbolIconKeyColor = theme.getColor(SYMBOL_ICON_KEY_FOREGROUND);\r\n if (symbolIconKeyColor) {\r\n collector.addRule(`${Codicon.symbolKey.cssSelector} { color: ${symbolIconKeyColor}; }`);\r\n }\r\n const symbolIconKeywordColor = theme.getColor(SYMBOL_ICON_KEYWORD_FOREGROUND);\r\n if (symbolIconKeywordColor) {\r\n collector.addRule(`${Codicon.symbolKeyword.cssSelector} { color: ${symbolIconKeywordColor}; }`);\r\n }\r\n const symbolIconModuleColor = theme.getColor(SYMBOL_ICON_MODULE_FOREGROUND);\r\n if (symbolIconModuleColor) {\r\n collector.addRule(`${Codicon.symbolModule.cssSelector} { color: ${symbolIconModuleColor}; }`);\r\n }\r\n const outlineNamespaceColor = theme.getColor(SYMBOL_ICON_NAMESPACE_FOREGROUND);\r\n if (outlineNamespaceColor) {\r\n collector.addRule(`${Codicon.symbolNamespace.cssSelector} { color: ${outlineNamespaceColor}; }`);\r\n }\r\n const symbolIconNullColor = theme.getColor(SYMBOL_ICON_NULL_FOREGROUND);\r\n if (symbolIconNullColor) {\r\n collector.addRule(`${Codicon.symbolNull.cssSelector} { color: ${symbolIconNullColor}; }`);\r\n }\r\n const symbolIconNumberColor = theme.getColor(SYMBOL_ICON_NUMBER_FOREGROUND);\r\n if (symbolIconNumberColor) {\r\n collector.addRule(`${Codicon.symbolNumber.cssSelector} { color: ${symbolIconNumberColor}; }`);\r\n }\r\n const symbolIconObjectColor = theme.getColor(SYMBOL_ICON_OBJECT_FOREGROUND);\r\n if (symbolIconObjectColor) {\r\n collector.addRule(`${Codicon.symbolObject.cssSelector} { color: ${symbolIconObjectColor}; }`);\r\n }\r\n const symbolIconOperatorColor = theme.getColor(SYMBOL_ICON_OPERATOR_FOREGROUND);\r\n if (symbolIconOperatorColor) {\r\n collector.addRule(`${Codicon.symbolOperator.cssSelector} { color: ${symbolIconOperatorColor}; }`);\r\n }\r\n const symbolIconPackageColor = theme.getColor(SYMBOL_ICON_PACKAGE_FOREGROUND);\r\n if (symbolIconPackageColor) {\r\n collector.addRule(`${Codicon.symbolPackage.cssSelector} { color: ${symbolIconPackageColor}; }`);\r\n }\r\n const symbolIconPropertyColor = theme.getColor(SYMBOL_ICON_PROPERTY_FOREGROUND);\r\n if (symbolIconPropertyColor) {\r\n collector.addRule(`${Codicon.symbolProperty.cssSelector} { color: ${symbolIconPropertyColor}; }`);\r\n }\r\n const symbolIconReferenceColor = theme.getColor(SYMBOL_ICON_REFERENCE_FOREGROUND);\r\n if (symbolIconReferenceColor) {\r\n collector.addRule(`${Codicon.symbolReference.cssSelector} { color: ${symbolIconReferenceColor}; }`);\r\n }\r\n const symbolIconSnippetColor = theme.getColor(SYMBOL_ICON_SNIPPET_FOREGROUND);\r\n if (symbolIconSnippetColor) {\r\n collector.addRule(`${Codicon.symbolSnippet.cssSelector} { color: ${symbolIconSnippetColor}; }`);\r\n }\r\n const symbolIconStringColor = theme.getColor(SYMBOL_ICON_STRING_FOREGROUND);\r\n if (symbolIconStringColor) {\r\n collector.addRule(`${Codicon.symbolString.cssSelector} { color: ${symbolIconStringColor}; }`);\r\n }\r\n const symbolIconStructColor = theme.getColor(SYMBOL_ICON_STRUCT_FOREGROUND);\r\n if (symbolIconStructColor) {\r\n collector.addRule(`${Codicon.symbolStruct.cssSelector} { color: ${symbolIconStructColor}; }`);\r\n }\r\n const symbolIconTextColor = theme.getColor(SYMBOL_ICON_TEXT_FOREGROUND);\r\n if (symbolIconTextColor) {\r\n collector.addRule(`${Codicon.symbolText.cssSelector} { color: ${symbolIconTextColor}; }`);\r\n }\r\n const symbolIconTypeParameterColor = theme.getColor(SYMBOL_ICON_TYPEPARAMETER_FOREGROUND);\r\n if (symbolIconTypeParameterColor) {\r\n collector.addRule(`${Codicon.symbolTypeParameter.cssSelector} { color: ${symbolIconTypeParameterColor}; }`);\r\n }\r\n const symbolIconUnitColor = theme.getColor(SYMBOL_ICON_UNIT_FOREGROUND);\r\n if (symbolIconUnitColor) {\r\n collector.addRule(`${Codicon.symbolUnit.cssSelector} { color: ${symbolIconUnitColor}; }`);\r\n }\r\n const symbolIconVariableColor = theme.getColor(SYMBOL_ICON_VARIABLE_FOREGROUND);\r\n if (symbolIconVariableColor) {\r\n collector.addRule(`${Codicon.symbolVariable.cssSelector} { color: ${symbolIconVariableColor}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Event, Emitter } from '../../../base/common/event.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { Dimension } from '../../../base/browser/dom.js';\r\nimport { OrthogonalEdge, Sash } from '../../../base/browser/ui/sash/sash.js';\r\nexport class ResizableHTMLElement {\r\n constructor() {\r\n this._onDidWillResize = new Emitter();\r\n this.onDidWillResize = this._onDidWillResize.event;\r\n this._onDidResize = new Emitter();\r\n this.onDidResize = this._onDidResize.event;\r\n this._sashListener = new DisposableStore();\r\n this._size = new Dimension(0, 0);\r\n this._minSize = new Dimension(0, 0);\r\n this._maxSize = new Dimension(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);\r\n this.domNode = document.createElement('div');\r\n this._eastSash = new Sash(this.domNode, { getVerticalSashLeft: () => this._size.width }, { orientation: 0 /* VERTICAL */ });\r\n this._westSash = new Sash(this.domNode, { getVerticalSashLeft: () => 0 }, { orientation: 0 /* VERTICAL */ });\r\n this._northSash = new Sash(this.domNode, { getHorizontalSashTop: () => 0 }, { orientation: 1 /* HORIZONTAL */, orthogonalEdge: OrthogonalEdge.North });\r\n this._southSash = new Sash(this.domNode, { getHorizontalSashTop: () => this._size.height }, { orientation: 1 /* HORIZONTAL */, orthogonalEdge: OrthogonalEdge.South });\r\n this._northSash.orthogonalStartSash = this._westSash;\r\n this._northSash.orthogonalEndSash = this._eastSash;\r\n this._southSash.orthogonalStartSash = this._westSash;\r\n this._southSash.orthogonalEndSash = this._eastSash;\r\n let currentSize;\r\n let deltaY = 0;\r\n let deltaX = 0;\r\n this._sashListener.add(Event.any(this._northSash.onDidStart, this._eastSash.onDidStart, this._southSash.onDidStart, this._westSash.onDidStart)(() => {\r\n if (currentSize === undefined) {\r\n this._onDidWillResize.fire();\r\n currentSize = this._size;\r\n deltaY = 0;\r\n deltaX = 0;\r\n }\r\n }));\r\n this._sashListener.add(Event.any(this._northSash.onDidEnd, this._eastSash.onDidEnd, this._southSash.onDidEnd, this._westSash.onDidEnd)(() => {\r\n if (currentSize !== undefined) {\r\n currentSize = undefined;\r\n deltaY = 0;\r\n deltaX = 0;\r\n this._onDidResize.fire({ dimension: this._size, done: true });\r\n }\r\n }));\r\n this._sashListener.add(this._eastSash.onDidChange(e => {\r\n if (currentSize) {\r\n deltaX = e.currentX - e.startX;\r\n this.layout(currentSize.height + deltaY, currentSize.width + deltaX);\r\n this._onDidResize.fire({ dimension: this._size, done: false, east: true });\r\n }\r\n }));\r\n this._sashListener.add(this._westSash.onDidChange(e => {\r\n if (currentSize) {\r\n deltaX = -(e.currentX - e.startX);\r\n this.layout(currentSize.height + deltaY, currentSize.width + deltaX);\r\n this._onDidResize.fire({ dimension: this._size, done: false, west: true });\r\n }\r\n }));\r\n this._sashListener.add(this._northSash.onDidChange(e => {\r\n if (currentSize) {\r\n deltaY = -(e.currentY - e.startY);\r\n this.layout(currentSize.height + deltaY, currentSize.width + deltaX);\r\n this._onDidResize.fire({ dimension: this._size, done: false, north: true });\r\n }\r\n }));\r\n this._sashListener.add(this._southSash.onDidChange(e => {\r\n if (currentSize) {\r\n deltaY = e.currentY - e.startY;\r\n this.layout(currentSize.height + deltaY, currentSize.width + deltaX);\r\n this._onDidResize.fire({ dimension: this._size, done: false, south: true });\r\n }\r\n }));\r\n this._sashListener.add(Event.any(this._eastSash.onDidReset, this._westSash.onDidReset)(e => {\r\n if (this._preferredSize) {\r\n this.layout(this._size.height, this._preferredSize.width);\r\n this._onDidResize.fire({ dimension: this._size, done: true });\r\n }\r\n }));\r\n this._sashListener.add(Event.any(this._northSash.onDidReset, this._southSash.onDidReset)(e => {\r\n if (this._preferredSize) {\r\n this.layout(this._preferredSize.height, this._size.width);\r\n this._onDidResize.fire({ dimension: this._size, done: true });\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._northSash.dispose();\r\n this._southSash.dispose();\r\n this._eastSash.dispose();\r\n this._westSash.dispose();\r\n this._sashListener.dispose();\r\n this.domNode.remove();\r\n }\r\n enableSashes(north, east, south, west) {\r\n this._northSash.state = north ? 3 /* Enabled */ : 0 /* Disabled */;\r\n this._eastSash.state = east ? 3 /* Enabled */ : 0 /* Disabled */;\r\n this._southSash.state = south ? 3 /* Enabled */ : 0 /* Disabled */;\r\n this._westSash.state = west ? 3 /* Enabled */ : 0 /* Disabled */;\r\n }\r\n layout(height = this.size.height, width = this.size.width) {\r\n const { height: minHeight, width: minWidth } = this._minSize;\r\n const { height: maxHeight, width: maxWidth } = this._maxSize;\r\n height = Math.max(minHeight, Math.min(maxHeight, height));\r\n width = Math.max(minWidth, Math.min(maxWidth, width));\r\n const newSize = new Dimension(width, height);\r\n if (!Dimension.equals(newSize, this._size)) {\r\n this.domNode.style.height = height + 'px';\r\n this.domNode.style.width = width + 'px';\r\n this._size = newSize;\r\n this._northSash.layout();\r\n this._eastSash.layout();\r\n this._southSash.layout();\r\n this._westSash.layout();\r\n }\r\n }\r\n get size() {\r\n return this._size;\r\n }\r\n set maxSize(value) {\r\n this._maxSize = value;\r\n }\r\n get maxSize() {\r\n return this._maxSize;\r\n }\r\n set minSize(value) {\r\n this._minSize = value;\r\n }\r\n get minSize() {\r\n return this._minSize;\r\n }\r\n set preferredSize(value) {\r\n this._preferredSize = value;\r\n }\r\n get preferredSize() {\r\n return this._preferredSize;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { DomScrollableElement } from '../../../base/browser/ui/scrollbar/scrollableElement.js';\r\nimport { MarkdownRenderer } from '../../browser/core/markdownRenderer.js';\r\nimport { MarkdownString } from '../../../base/common/htmlContent.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { ResizableHTMLElement } from './resizable.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nexport function canExpandCompletionItem(item) {\r\n return !!item && Boolean(item.completion.documentation || item.completion.detail && item.completion.detail !== item.completion.label);\r\n}\r\nlet SuggestDetailsWidget = class SuggestDetailsWidget {\r\n constructor(_editor, instaService) {\r\n this._editor = _editor;\r\n this._onDidClose = new Emitter();\r\n this.onDidClose = this._onDidClose.event;\r\n this._onDidChangeContents = new Emitter();\r\n this.onDidChangeContents = this._onDidChangeContents.event;\r\n this._disposables = new DisposableStore();\r\n this._renderDisposeable = new DisposableStore();\r\n this._borderWidth = 1;\r\n this._size = new dom.Dimension(330, 0);\r\n this.domNode = dom.$('.suggest-details');\r\n this.domNode.classList.add('no-docs');\r\n this._markdownRenderer = instaService.createInstance(MarkdownRenderer, { editor: _editor });\r\n this._body = dom.$('.body');\r\n this._scrollbar = new DomScrollableElement(this._body, {});\r\n dom.append(this.domNode, this._scrollbar.getDomNode());\r\n this._disposables.add(this._scrollbar);\r\n this._header = dom.append(this._body, dom.$('.header'));\r\n this._close = dom.append(this._header, dom.$('span' + Codicon.close.cssSelector));\r\n this._close.title = nls.localize('details.close', \"Close\");\r\n this._type = dom.append(this._header, dom.$('p.type'));\r\n this._docs = dom.append(this._body, dom.$('p.docs'));\r\n this._configureFont();\r\n this._disposables.add(this._editor.onDidChangeConfiguration(e => {\r\n if (e.hasChanged(38 /* fontInfo */)) {\r\n this._configureFont();\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this._renderDisposeable.dispose();\r\n }\r\n _configureFont() {\r\n const options = this._editor.getOptions();\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const fontFamily = fontInfo.fontFamily;\r\n const fontSize = options.get(102 /* suggestFontSize */) || fontInfo.fontSize;\r\n const lineHeight = options.get(103 /* suggestLineHeight */) || fontInfo.lineHeight;\r\n const fontWeight = fontInfo.fontWeight;\r\n const fontSizePx = `${fontSize}px`;\r\n const lineHeightPx = `${lineHeight}px`;\r\n this.domNode.style.fontSize = fontSizePx;\r\n this.domNode.style.lineHeight = lineHeightPx;\r\n this.domNode.style.fontWeight = fontWeight;\r\n this.domNode.style.fontFeatureSettings = fontInfo.fontFeatureSettings;\r\n this._type.style.fontFamily = fontFamily;\r\n this._close.style.height = lineHeightPx;\r\n this._close.style.width = lineHeightPx;\r\n }\r\n getLayoutInfo() {\r\n const lineHeight = this._editor.getOption(103 /* suggestLineHeight */) || this._editor.getOption(38 /* fontInfo */).lineHeight;\r\n const borderWidth = this._borderWidth;\r\n const borderHeight = borderWidth * 2;\r\n return {\r\n lineHeight,\r\n borderWidth,\r\n borderHeight,\r\n verticalPadding: 22,\r\n horizontalPadding: 14\r\n };\r\n }\r\n renderLoading() {\r\n this._type.textContent = nls.localize('loading', \"Loading...\");\r\n this._docs.textContent = '';\r\n this.domNode.classList.remove('no-docs', 'no-type');\r\n this.layout(this.size.width, this.getLayoutInfo().lineHeight * 2);\r\n this._onDidChangeContents.fire(this);\r\n }\r\n renderItem(item, explainMode) {\r\n this._renderDisposeable.clear();\r\n let { detail, documentation } = item.completion;\r\n if (explainMode) {\r\n let md = '';\r\n md += `score: ${item.score[0]}${item.word ? `, compared '${item.completion.filterText && (item.completion.filterText + ' (filterText)') || typeof item.completion.label === 'string' ? item.completion.label : item.completion.label.name}' with '${item.word}'` : ' (no prefix)'}\\n`;\r\n md += `distance: ${item.distance}, see localityBonus-setting\\n`;\r\n md += `index: ${item.idx}, based on ${item.completion.sortText && `sortText: \"${item.completion.sortText}\"` || 'label'}\\n`;\r\n md += `commit characters: ${item.completion.commitCharacters}\\n`;\r\n documentation = new MarkdownString().appendCodeblock('empty', md);\r\n detail = `Provider: ${item.provider._debugDisplayName}`;\r\n }\r\n if (!explainMode && !canExpandCompletionItem(item)) {\r\n this.clearContents();\r\n return;\r\n }\r\n this.domNode.classList.remove('no-docs', 'no-type');\r\n // --- details\r\n if (detail) {\r\n const cappedDetail = detail.length > 100000 ? `${detail.substr(0, 100000)}…` : detail;\r\n this._type.textContent = cappedDetail;\r\n this._type.title = cappedDetail;\r\n dom.show(this._type);\r\n this._type.classList.toggle('auto-wrap', !/\\r?\\n^\\s+/gmi.test(cappedDetail));\r\n }\r\n else {\r\n dom.clearNode(this._type);\r\n this._type.title = '';\r\n dom.hide(this._type);\r\n this.domNode.classList.add('no-type');\r\n }\r\n // --- documentation\r\n dom.clearNode(this._docs);\r\n if (typeof documentation === 'string') {\r\n this._docs.classList.remove('markdown-docs');\r\n this._docs.textContent = documentation;\r\n }\r\n else if (documentation) {\r\n this._docs.classList.add('markdown-docs');\r\n dom.clearNode(this._docs);\r\n const renderedContents = this._markdownRenderer.render(documentation);\r\n this._docs.appendChild(renderedContents.element);\r\n this._renderDisposeable.add(renderedContents);\r\n this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(() => {\r\n this.layout(this._size.width, this._type.clientHeight + this._docs.clientHeight);\r\n this._onDidChangeContents.fire(this);\r\n }));\r\n }\r\n this.domNode.style.userSelect = 'text';\r\n this.domNode.tabIndex = -1;\r\n this._close.onmousedown = e => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n };\r\n this._close.onclick = e => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this._onDidClose.fire();\r\n };\r\n this._body.scrollTop = 0;\r\n this.layout(this._size.width, this._type.clientHeight + this._docs.clientHeight);\r\n this._onDidChangeContents.fire(this);\r\n }\r\n clearContents() {\r\n this.domNode.classList.add('no-docs');\r\n this._type.textContent = '';\r\n this._docs.textContent = '';\r\n }\r\n get size() {\r\n return this._size;\r\n }\r\n layout(width, height) {\r\n const newSize = new dom.Dimension(width, height);\r\n if (!dom.Dimension.equals(newSize, this._size)) {\r\n this._size = newSize;\r\n dom.size(this.domNode, width, height);\r\n }\r\n this._scrollbar.scanDomNode();\r\n }\r\n scrollDown(much = 8) {\r\n this._body.scrollTop += much;\r\n }\r\n scrollUp(much = 8) {\r\n this._body.scrollTop -= much;\r\n }\r\n scrollTop() {\r\n this._body.scrollTop = 0;\r\n }\r\n scrollBottom() {\r\n this._body.scrollTop = this._body.scrollHeight;\r\n }\r\n pageDown() {\r\n this.scrollDown(80);\r\n }\r\n pageUp() {\r\n this.scrollUp(80);\r\n }\r\n set borderWidth(width) {\r\n this._borderWidth = width;\r\n }\r\n get borderWidth() {\r\n return this._borderWidth;\r\n }\r\n};\r\nSuggestDetailsWidget = __decorate([\r\n __param(1, IInstantiationService)\r\n], SuggestDetailsWidget);\r\nexport { SuggestDetailsWidget };\r\nexport class SuggestDetailsOverlay {\r\n constructor(widget, _editor) {\r\n this.widget = widget;\r\n this._editor = _editor;\r\n this._disposables = new DisposableStore();\r\n this._added = false;\r\n this._resizable = new ResizableHTMLElement();\r\n this._resizable.domNode.classList.add('suggest-details-container');\r\n this._resizable.domNode.appendChild(widget.domNode);\r\n this._resizable.enableSashes(false, true, true, false);\r\n let topLeftNow;\r\n let sizeNow;\r\n let deltaTop = 0;\r\n let deltaLeft = 0;\r\n this._disposables.add(this._resizable.onDidWillResize(() => {\r\n topLeftNow = this._topLeft;\r\n sizeNow = this._resizable.size;\r\n }));\r\n this._disposables.add(this._resizable.onDidResize(e => {\r\n if (topLeftNow && sizeNow) {\r\n this.widget.layout(e.dimension.width, e.dimension.height);\r\n let updateTopLeft = false;\r\n if (e.west) {\r\n deltaLeft = sizeNow.width - e.dimension.width;\r\n updateTopLeft = true;\r\n }\r\n if (e.north) {\r\n deltaTop = sizeNow.height - e.dimension.height;\r\n updateTopLeft = true;\r\n }\r\n if (updateTopLeft) {\r\n this._applyTopLeft({\r\n top: topLeftNow.top + deltaTop,\r\n left: topLeftNow.left + deltaLeft,\r\n });\r\n }\r\n }\r\n if (e.done) {\r\n topLeftNow = undefined;\r\n sizeNow = undefined;\r\n deltaTop = 0;\r\n deltaLeft = 0;\r\n this._userSize = e.dimension;\r\n }\r\n }));\r\n this._disposables.add(this.widget.onDidChangeContents(() => {\r\n var _a;\r\n if (this._anchorBox) {\r\n this._placeAtAnchor(this._anchorBox, (_a = this._userSize) !== null && _a !== void 0 ? _a : this.widget.size);\r\n }\r\n }));\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n this.hide();\r\n }\r\n getId() {\r\n return 'suggest.details';\r\n }\r\n getDomNode() {\r\n return this._resizable.domNode;\r\n }\r\n getPosition() {\r\n return null;\r\n }\r\n show() {\r\n if (!this._added) {\r\n this._editor.addOverlayWidget(this);\r\n this.getDomNode().style.position = 'fixed';\r\n this._added = true;\r\n }\r\n }\r\n hide(sessionEnded = false) {\r\n if (this._added) {\r\n this._editor.removeOverlayWidget(this);\r\n this._added = false;\r\n this._anchorBox = undefined;\r\n this._topLeft = undefined;\r\n }\r\n if (sessionEnded) {\r\n this._userSize = undefined;\r\n this.widget.clearContents();\r\n }\r\n }\r\n placeAtAnchor(anchor) {\r\n var _a;\r\n const anchorBox = dom.getDomNodePagePosition(anchor);\r\n this._anchorBox = anchorBox;\r\n this._placeAtAnchor(this._anchorBox, (_a = this._userSize) !== null && _a !== void 0 ? _a : this.widget.size);\r\n }\r\n _placeAtAnchor(anchorBox, size) {\r\n const bodyBox = dom.getClientArea(document.body);\r\n const info = this.widget.getLayoutInfo();\r\n let maxSizeTop;\r\n let maxSizeBottom;\r\n let minSize = new dom.Dimension(220, 2 * info.lineHeight);\r\n let left = 0;\r\n let top = anchorBox.top;\r\n let bottom = anchorBox.top + anchorBox.height - info.borderHeight;\r\n let alignAtTop;\r\n let alignEast;\r\n // position: EAST, west, south\r\n let width = bodyBox.width - (anchorBox.left + anchorBox.width + info.borderWidth + info.horizontalPadding);\r\n left = -info.borderWidth + anchorBox.left + anchorBox.width;\r\n alignEast = true;\r\n maxSizeTop = new dom.Dimension(width, bodyBox.height - anchorBox.top - info.borderHeight - info.verticalPadding);\r\n maxSizeBottom = maxSizeTop.with(undefined, anchorBox.top + anchorBox.height - info.borderHeight - info.verticalPadding);\r\n // find a better place if the widget is wider than there is space available\r\n if (size.width > width) {\r\n // position: east, WEST, south\r\n if (anchorBox.left > width) {\r\n // pos = SuggestDetailsPosition.West;\r\n width = anchorBox.left - info.borderWidth - info.horizontalPadding;\r\n alignEast = false;\r\n left = Math.max(info.horizontalPadding, anchorBox.left - size.width - info.borderWidth);\r\n maxSizeTop = maxSizeTop.with(width);\r\n maxSizeBottom = maxSizeTop.with(undefined, maxSizeBottom.height);\r\n }\r\n // position: east, west, SOUTH\r\n if (anchorBox.width > width * 1.3 && bodyBox.height - (anchorBox.top + anchorBox.height) > anchorBox.height) {\r\n width = anchorBox.width;\r\n left = anchorBox.left;\r\n top = -info.borderWidth + anchorBox.top + anchorBox.height;\r\n maxSizeTop = new dom.Dimension(anchorBox.width - info.borderHeight, bodyBox.height - anchorBox.top - anchorBox.height - info.verticalPadding);\r\n maxSizeBottom = maxSizeTop.with(undefined, anchorBox.top - info.verticalPadding);\r\n minSize = minSize.with(maxSizeTop.width);\r\n }\r\n }\r\n // top/bottom placement\r\n let height = size.height;\r\n let maxHeight = Math.max(maxSizeTop.height, maxSizeBottom.height);\r\n if (height > maxHeight) {\r\n height = maxHeight;\r\n }\r\n let maxSize;\r\n if (height <= maxSizeTop.height) {\r\n alignAtTop = true;\r\n maxSize = maxSizeTop;\r\n }\r\n else {\r\n alignAtTop = false;\r\n maxSize = maxSizeBottom;\r\n }\r\n this._applyTopLeft({ left, top: alignAtTop ? top : bottom - height });\r\n this.getDomNode().style.position = 'fixed';\r\n this._resizable.enableSashes(!alignAtTop, alignEast, alignAtTop, !alignEast);\r\n this._resizable.minSize = minSize;\r\n this._resizable.maxSize = maxSize;\r\n this._resizable.layout(height, Math.min(maxSize.width, size.width));\r\n this.widget.layout(this._resizable.size.width, this._resizable.size.height);\r\n }\r\n _applyTopLeft(topLeft) {\r\n this._topLeft = topLeft;\r\n this.getDomNode().style.left = `${this._topLeft.left}px`;\r\n this.getDomNode().style.top = `${this._topLeft.top}px`;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { ActionBar } from '../../../base/browser/ui/actionbar/actionbar.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { suggestWidgetStatusbarMenu } from './suggest.js';\r\nimport { localize } from '../../../nls.js';\r\nimport { MenuEntryActionViewItem } from '../../../platform/actions/browser/menuEntryActionViewItem.js';\r\nimport { IMenuService, MenuItemAction } from '../../../platform/actions/common/actions.js';\r\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nclass StatusBarViewItem extends MenuEntryActionViewItem {\r\n updateLabel() {\r\n const kb = this._keybindingService.lookupKeybinding(this._action.id);\r\n if (!kb) {\r\n return super.updateLabel();\r\n }\r\n if (this.label) {\r\n this.label.textContent = localize('ddd', '{0} ({1})', this._action.label, StatusBarViewItem.symbolPrintEnter(kb));\r\n }\r\n }\r\n static symbolPrintEnter(kb) {\r\n var _a;\r\n return (_a = kb.getLabel()) === null || _a === void 0 ? void 0 : _a.replace(/\\benter\\b/gi, '\\u23CE');\r\n }\r\n}\r\nlet SuggestWidgetStatus = class SuggestWidgetStatus {\r\n constructor(container, instantiationService, _menuService, _contextKeyService) {\r\n this._menuService = _menuService;\r\n this._contextKeyService = _contextKeyService;\r\n this._menuDisposables = new DisposableStore();\r\n this.element = dom.append(container, dom.$('.suggest-status-bar'));\r\n const actionViewItemProvider = (action => {\r\n return action instanceof MenuItemAction ? instantiationService.createInstance(StatusBarViewItem, action) : undefined;\r\n });\r\n this._leftActions = new ActionBar(this.element, { actionViewItemProvider });\r\n this._rightActions = new ActionBar(this.element, { actionViewItemProvider });\r\n this._leftActions.domNode.classList.add('left');\r\n this._rightActions.domNode.classList.add('right');\r\n }\r\n dispose() {\r\n this._menuDisposables.dispose();\r\n this.element.remove();\r\n }\r\n show() {\r\n const menu = this._menuService.createMenu(suggestWidgetStatusbarMenu, this._contextKeyService);\r\n const renderMenu = () => {\r\n const left = [];\r\n const right = [];\r\n for (let [group, actions] of menu.getActions()) {\r\n if (group === 'left') {\r\n left.push(...actions);\r\n }\r\n else {\r\n right.push(...actions);\r\n }\r\n }\r\n this._leftActions.clear();\r\n this._leftActions.push(left);\r\n this._rightActions.clear();\r\n this._rightActions.push(right);\r\n };\r\n this._menuDisposables.add(menu.onDidChange(() => renderMenu()));\r\n this._menuDisposables.add(menu);\r\n }\r\n hide() {\r\n this._menuDisposables.clear();\r\n }\r\n};\r\nSuggestWidgetStatus = __decorate([\r\n __param(1, IInstantiationService),\r\n __param(2, IMenuService),\r\n __param(3, IContextKeyService)\r\n], SuggestWidgetStatus);\r\nexport { SuggestWidgetStatus };\r\n","export var FileKind;\r\n(function (FileKind) {\r\n FileKind[FileKind[\"FILE\"] = 0] = \"FILE\";\r\n FileKind[FileKind[\"FOLDER\"] = 1] = \"FOLDER\";\r\n FileKind[FileKind[\"ROOT_FOLDER\"] = 2] = \"ROOT_FOLDER\";\r\n})(FileKind || (FileKind = {}));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Schemas } from '../../../base/common/network.js';\r\nimport { DataUri, basenameOrAuthority } from '../../../base/common/resources.js';\r\nimport { PLAINTEXT_MODE_ID } from '../modes/modesRegistry.js';\r\nimport { FileKind } from '../../../platform/files/common/files.js';\r\nexport function getIconClasses(modelService, modeService, resource, fileKind) {\r\n // we always set these base classes even if we do not have a path\r\n const classes = fileKind === FileKind.ROOT_FOLDER ? ['rootfolder-icon'] : fileKind === FileKind.FOLDER ? ['folder-icon'] : ['file-icon'];\r\n if (resource) {\r\n // Get the path and name of the resource. For data-URIs, we need to parse specially\r\n let name;\r\n if (resource.scheme === Schemas.data) {\r\n const metadata = DataUri.parseMetaData(resource);\r\n name = metadata.get(DataUri.META_DATA_LABEL);\r\n }\r\n else {\r\n name = cssEscape(basenameOrAuthority(resource).toLowerCase());\r\n }\r\n // Folders\r\n if (fileKind === FileKind.FOLDER) {\r\n classes.push(`${name}-name-folder-icon`);\r\n }\r\n // Files\r\n else {\r\n // Name & Extension(s)\r\n if (name) {\r\n classes.push(`${name}-name-file-icon`);\r\n const dotSegments = name.split('.');\r\n for (let i = 1; i < dotSegments.length; i++) {\r\n classes.push(`${dotSegments.slice(i).join('.')}-ext-file-icon`); // add each combination of all found extensions if more than one\r\n }\r\n classes.push(`ext-file-icon`); // extra segment to increase file-ext score\r\n }\r\n // Detected Mode\r\n const detectedModeId = detectModeId(modelService, modeService, resource);\r\n if (detectedModeId) {\r\n classes.push(`${cssEscape(detectedModeId)}-lang-file-icon`);\r\n }\r\n }\r\n }\r\n return classes;\r\n}\r\nexport function detectModeId(modelService, modeService, resource) {\r\n if (!resource) {\r\n return null; // we need a resource at least\r\n }\r\n let modeId = null;\r\n // Data URI: check for encoded metadata\r\n if (resource.scheme === Schemas.data) {\r\n const metadata = DataUri.parseMetaData(resource);\r\n const mime = metadata.get(DataUri.META_DATA_MIME);\r\n if (mime) {\r\n modeId = modeService.getModeId(mime);\r\n }\r\n }\r\n // Any other URI: check for model if existing\r\n else {\r\n const model = modelService.getModel(resource);\r\n if (model) {\r\n modeId = model.getModeId();\r\n }\r\n }\r\n // only take if the mode is specific (aka no just plain text)\r\n if (modeId && modeId !== PLAINTEXT_MODE_ID) {\r\n return modeId;\r\n }\r\n // otherwise fallback to path based detection\r\n return modeService.getModeIdByFilepathOrFirstLine(resource);\r\n}\r\nexport function cssEscape(str) {\r\n return str.replace(/[\\11\\12\\14\\15\\40]/g, '/'); // HTML class names can not contain certain whitespace characters, use / instead, which doesn't exist in file names.\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar _a;\r\nimport * as nls from '../../../nls.js';\r\nimport { createMatches } from '../../../base/common/filters.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { append, $, hide, show } from '../../../base/browser/dom.js';\r\nimport { IThemeService, ThemeIcon } from '../../../platform/theme/common/themeService.js';\r\nimport { IModeService } from '../../common/services/modeService.js';\r\nimport { completionKindToCssClass } from '../../common/modes.js';\r\nimport { IconLabel } from '../../../base/browser/ui/iconLabel/iconLabel.js';\r\nimport { getIconClasses } from '../../common/services/getIconClasses.js';\r\nimport { IModelService } from '../../common/services/modelService.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { FileKind } from '../../../platform/files/common/files.js';\r\nimport { flatten } from '../../../base/common/arrays.js';\r\nimport { canExpandCompletionItem } from './suggestWidgetDetails.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { registerIcon } from '../../../platform/theme/common/iconRegistry.js';\r\nexport function getAriaId(index) {\r\n return `suggest-aria-id:${index}`;\r\n}\r\nexport const suggestMoreInfoIcon = registerIcon('suggest-more-info', Codicon.chevronRight, nls.localize('suggestMoreInfoIcon', 'Icon for more information in the suggest widget.'));\r\nconst _completionItemColor = new (_a = class ColorExtractor {\r\n extract(item, out) {\r\n if (item.textLabel.match(ColorExtractor._regexStrict)) {\r\n out[0] = item.textLabel;\r\n return true;\r\n }\r\n if (item.completion.detail && item.completion.detail.match(ColorExtractor._regexStrict)) {\r\n out[0] = item.completion.detail;\r\n return true;\r\n }\r\n if (typeof item.completion.documentation === 'string') {\r\n const match = ColorExtractor._regexRelaxed.exec(item.completion.documentation);\r\n if (match && (match.index === 0 || match.index + match[0].length === item.completion.documentation.length)) {\r\n out[0] = match[0];\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n },\r\n _a._regexRelaxed = /(#([\\da-fA-F]{3}){1,2}|(rgb|hsl)a\\(\\s*(\\d{1,3}%?\\s*,\\s*){3}(1|0?\\.\\d+)\\)|(rgb|hsl)\\(\\s*\\d{1,3}%?(\\s*,\\s*\\d{1,3}%?){2}\\s*\\))/,\r\n _a._regexStrict = new RegExp(`^${_a._regexRelaxed.source}$`, 'i'),\r\n _a);\r\nlet ItemRenderer = class ItemRenderer {\r\n constructor(_editor, _modelService, _modeService, _themeService) {\r\n this._editor = _editor;\r\n this._modelService = _modelService;\r\n this._modeService = _modeService;\r\n this._themeService = _themeService;\r\n this._onDidToggleDetails = new Emitter();\r\n this.onDidToggleDetails = this._onDidToggleDetails.event;\r\n this.templateId = 'suggestion';\r\n }\r\n dispose() {\r\n this._onDidToggleDetails.dispose();\r\n }\r\n renderTemplate(container) {\r\n const data = Object.create(null);\r\n data.disposables = new DisposableStore();\r\n data.root = container;\r\n data.root.classList.add('show-file-icons');\r\n data.icon = append(container, $('.icon'));\r\n data.colorspan = append(data.icon, $('span.colorspan'));\r\n const text = append(container, $('.contents'));\r\n const main = append(text, $('.main'));\r\n data.iconContainer = append(main, $('.icon-label.codicon'));\r\n data.left = append(main, $('span.left'));\r\n data.right = append(main, $('span.right'));\r\n data.iconLabel = new IconLabel(data.left, { supportHighlights: true, supportIcons: true });\r\n data.disposables.add(data.iconLabel);\r\n data.parametersLabel = append(data.left, $('span.signature-label'));\r\n data.qualifierLabel = append(data.left, $('span.qualifier-label'));\r\n data.detailsLabel = append(data.right, $('span.details-label'));\r\n data.readMore = append(data.right, $('span.readMore' + ThemeIcon.asCSSSelector(suggestMoreInfoIcon)));\r\n data.readMore.title = nls.localize('readMore', \"Read More\");\r\n const configureFont = () => {\r\n const options = this._editor.getOptions();\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const fontFamily = fontInfo.fontFamily;\r\n const fontFeatureSettings = fontInfo.fontFeatureSettings;\r\n const fontSize = options.get(102 /* suggestFontSize */) || fontInfo.fontSize;\r\n const lineHeight = options.get(103 /* suggestLineHeight */) || fontInfo.lineHeight;\r\n const fontWeight = fontInfo.fontWeight;\r\n const fontSizePx = `${fontSize}px`;\r\n const lineHeightPx = `${lineHeight}px`;\r\n data.root.style.fontSize = fontSizePx;\r\n data.root.style.fontWeight = fontWeight;\r\n main.style.fontFamily = fontFamily;\r\n main.style.fontFeatureSettings = fontFeatureSettings;\r\n main.style.lineHeight = lineHeightPx;\r\n data.icon.style.height = lineHeightPx;\r\n data.icon.style.width = lineHeightPx;\r\n data.readMore.style.height = lineHeightPx;\r\n data.readMore.style.width = lineHeightPx;\r\n };\r\n configureFont();\r\n data.disposables.add(this._editor.onDidChangeConfiguration(e => {\r\n if (e.hasChanged(38 /* fontInfo */) || e.hasChanged(102 /* suggestFontSize */) || e.hasChanged(103 /* suggestLineHeight */)) {\r\n configureFont();\r\n }\r\n }));\r\n return data;\r\n }\r\n renderElement(element, index, data) {\r\n var _b, _c, _d;\r\n const { completion } = element;\r\n const textLabel = typeof completion.label === 'string' ? completion.label : completion.label.name;\r\n data.root.id = getAriaId(index);\r\n data.colorspan.style.backgroundColor = '';\r\n const labelOptions = {\r\n labelEscapeNewLines: true,\r\n matches: createMatches(element.score)\r\n };\r\n let color = [];\r\n if (completion.kind === 19 /* Color */ && _completionItemColor.extract(element, color)) {\r\n // special logic for 'color' completion items\r\n data.icon.className = 'icon customcolor';\r\n data.iconContainer.className = 'icon hide';\r\n data.colorspan.style.backgroundColor = color[0];\r\n }\r\n else if (completion.kind === 20 /* File */ && this._themeService.getFileIconTheme().hasFileIcons) {\r\n // special logic for 'file' completion items\r\n data.icon.className = 'icon hide';\r\n data.iconContainer.className = 'icon hide';\r\n const labelClasses = getIconClasses(this._modelService, this._modeService, URI.from({ scheme: 'fake', path: textLabel }), FileKind.FILE);\r\n const detailClasses = getIconClasses(this._modelService, this._modeService, URI.from({ scheme: 'fake', path: completion.detail }), FileKind.FILE);\r\n labelOptions.extraClasses = labelClasses.length > detailClasses.length ? labelClasses : detailClasses;\r\n }\r\n else if (completion.kind === 23 /* Folder */ && this._themeService.getFileIconTheme().hasFolderIcons) {\r\n // special logic for 'folder' completion items\r\n data.icon.className = 'icon hide';\r\n data.iconContainer.className = 'icon hide';\r\n labelOptions.extraClasses = flatten([\r\n getIconClasses(this._modelService, this._modeService, URI.from({ scheme: 'fake', path: textLabel }), FileKind.FOLDER),\r\n getIconClasses(this._modelService, this._modeService, URI.from({ scheme: 'fake', path: completion.detail }), FileKind.FOLDER)\r\n ]);\r\n }\r\n else {\r\n // normal icon\r\n data.icon.className = 'icon hide';\r\n data.iconContainer.className = '';\r\n data.iconContainer.classList.add('suggest-icon', ...completionKindToCssClass(completion.kind).split(' '));\r\n }\r\n if (completion.tags && completion.tags.indexOf(1 /* Deprecated */) >= 0) {\r\n labelOptions.extraClasses = (labelOptions.extraClasses || []).concat(['deprecated']);\r\n labelOptions.matches = [];\r\n }\r\n data.iconLabel.setLabel(textLabel, undefined, labelOptions);\r\n if (typeof completion.label === 'string') {\r\n data.parametersLabel.textContent = '';\r\n data.qualifierLabel.textContent = '';\r\n data.detailsLabel.textContent = (completion.detail || '').replace(/\\n.*$/m, '');\r\n data.root.classList.add('string-label');\r\n data.root.title = '';\r\n }\r\n else {\r\n data.parametersLabel.textContent = (completion.label.parameters || '').replace(/\\n.*$/m, '');\r\n data.qualifierLabel.textContent = (completion.label.qualifier || '').replace(/\\n.*$/m, '');\r\n data.detailsLabel.textContent = (completion.label.type || '').replace(/\\n.*$/m, '');\r\n data.root.classList.remove('string-label');\r\n data.root.title = `${textLabel}${(_b = completion.label.parameters) !== null && _b !== void 0 ? _b : ''} ${(_c = completion.label.qualifier) !== null && _c !== void 0 ? _c : ''} ${(_d = completion.label.type) !== null && _d !== void 0 ? _d : ''}`;\r\n }\r\n if (this._editor.getOption(101 /* suggest */).showInlineDetails) {\r\n show(data.detailsLabel);\r\n }\r\n else {\r\n hide(data.detailsLabel);\r\n }\r\n if (canExpandCompletionItem(element)) {\r\n data.right.classList.add('can-expand-details');\r\n show(data.readMore);\r\n data.readMore.onmousedown = e => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n };\r\n data.readMore.onclick = e => {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n this._onDidToggleDetails.fire();\r\n };\r\n }\r\n else {\r\n data.right.classList.remove('can-expand-details');\r\n hide(data.readMore);\r\n data.readMore.onmousedown = null;\r\n data.readMore.onclick = null;\r\n }\r\n }\r\n disposeTemplate(templateData) {\r\n templateData.disposables.dispose();\r\n }\r\n};\r\nItemRenderer = __decorate([\r\n __param(1, IModelService),\r\n __param(2, IModeService),\r\n __param(3, IThemeService)\r\n], ItemRenderer);\r\nexport { ItemRenderer };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport './media/suggest.css';\r\nimport '../../../base/browser/ui/codicons/codiconStyles.js'; // The codicon symbol styles are defined here and must be loaded\r\nimport '../symbolIcons/symbolIcons.js'; // The codicon symbol colors are defined here and must be loaded to get colors\r\nimport * as nls from '../../../nls.js';\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { List } from '../../../base/browser/ui/list/listWidget.js';\r\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { Context as SuggestContext } from './suggest.js';\r\nimport { attachListStyler } from '../../../platform/theme/common/styler.js';\r\nimport { IThemeService, registerThemingParticipant } from '../../../platform/theme/common/themeService.js';\r\nimport { registerColor, editorWidgetBackground, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground, editorWidgetBorder, focusBorder, textLinkForeground, textCodeBlockBackground } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { IStorageService } from '../../../platform/storage/common/storage.js';\r\nimport { TimeoutTimer, createCancelablePromise, disposableTimeout } from '../../../base/common/async.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { SuggestDetailsWidget, canExpandCompletionItem, SuggestDetailsOverlay } from './suggestWidgetDetails.js';\r\nimport { SuggestWidgetStatus } from './suggestWidgetStatus.js';\r\nimport { getAriaId, ItemRenderer } from './suggestWidgetRenderer.js';\r\nimport { ResizableHTMLElement } from './resizable.js';\r\nimport { EmbeddedCodeEditorWidget } from '../../browser/widget/embeddedCodeEditorWidget.js';\r\nimport { clamp } from '../../../base/common/numbers.js';\r\n/**\r\n * Suggest widget colors\r\n */\r\nexport const editorSuggestWidgetBackground = registerColor('editorSuggestWidget.background', { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('editorSuggestWidgetBackground', 'Background color of the suggest widget.'));\r\nexport const editorSuggestWidgetBorder = registerColor('editorSuggestWidget.border', { dark: editorWidgetBorder, light: editorWidgetBorder, hc: editorWidgetBorder }, nls.localize('editorSuggestWidgetBorder', 'Border color of the suggest widget.'));\r\nexport const editorSuggestWidgetForeground = registerColor('editorSuggestWidget.foreground', { dark: editorForeground, light: editorForeground, hc: editorForeground }, nls.localize('editorSuggestWidgetForeground', 'Foreground color of the suggest widget.'));\r\nexport const editorSuggestWidgetSelectedBackground = registerColor('editorSuggestWidget.selectedBackground', { dark: listFocusBackground, light: listFocusBackground, hc: listFocusBackground }, nls.localize('editorSuggestWidgetSelectedBackground', 'Background color of the selected entry in the suggest widget.'));\r\nexport const editorSuggestWidgetHighlightForeground = registerColor('editorSuggestWidget.highlightForeground', { dark: listHighlightForeground, light: listHighlightForeground, hc: listHighlightForeground }, nls.localize('editorSuggestWidgetHighlightForeground', 'Color of the match highlights in the suggest widget.'));\r\nclass PersistedWidgetSize {\r\n constructor(_service, editor) {\r\n this._service = _service;\r\n this._key = `suggestWidget.size/${editor.getEditorType()}/${editor instanceof EmbeddedCodeEditorWidget}`;\r\n }\r\n restore() {\r\n var _a;\r\n const raw = (_a = this._service.get(this._key, 0 /* GLOBAL */)) !== null && _a !== void 0 ? _a : '';\r\n try {\r\n const obj = JSON.parse(raw);\r\n if (dom.Dimension.is(obj)) {\r\n return dom.Dimension.lift(obj);\r\n }\r\n }\r\n catch (_b) {\r\n // ignore\r\n }\r\n return undefined;\r\n }\r\n store(size) {\r\n this._service.store(this._key, JSON.stringify(size), 0 /* GLOBAL */, 1 /* MACHINE */);\r\n }\r\n reset() {\r\n this._service.remove(this._key, 0 /* GLOBAL */);\r\n }\r\n}\r\nlet SuggestWidget = class SuggestWidget {\r\n constructor(editor, _storageService, _contextKeyService, _themeService, instantiationService) {\r\n this.editor = editor;\r\n this._storageService = _storageService;\r\n this._state = 0 /* Hidden */;\r\n this._isAuto = false;\r\n this._ignoreFocusEvents = false;\r\n this._explainMode = false;\r\n this._showTimeout = new TimeoutTimer();\r\n this._disposables = new DisposableStore();\r\n this._onDidSelect = new Emitter();\r\n this._onDidFocus = new Emitter();\r\n this._onDidHide = new Emitter();\r\n this._onDidShow = new Emitter();\r\n this.onDidSelect = this._onDidSelect.event;\r\n this.onDidFocus = this._onDidFocus.event;\r\n this.onDidHide = this._onDidHide.event;\r\n this.onDidShow = this._onDidShow.event;\r\n this._onDetailsKeydown = new Emitter();\r\n this.onDetailsKeyDown = this._onDetailsKeydown.event;\r\n this.element = new ResizableHTMLElement();\r\n this.element.domNode.classList.add('editor-widget', 'suggest-widget');\r\n this._contentWidget = new SuggestContentWidget(this, editor);\r\n this._persistedSize = new PersistedWidgetSize(_storageService, editor);\r\n class ResizeState {\r\n constructor(persistedSize, currentSize, persistHeight = false, persistWidth = false) {\r\n this.persistedSize = persistedSize;\r\n this.currentSize = currentSize;\r\n this.persistHeight = persistHeight;\r\n this.persistWidth = persistWidth;\r\n }\r\n }\r\n let state;\r\n this._disposables.add(this.element.onDidWillResize(() => {\r\n this._contentWidget.lockPreference();\r\n state = new ResizeState(this._persistedSize.restore(), this.element.size);\r\n }));\r\n this._disposables.add(this.element.onDidResize(e => {\r\n var _a, _b, _c, _d;\r\n this._resize(e.dimension.width, e.dimension.height);\r\n if (state) {\r\n state.persistHeight = state.persistHeight || !!e.north || !!e.south;\r\n state.persistWidth = state.persistWidth || !!e.east || !!e.west;\r\n }\r\n if (!e.done) {\r\n return;\r\n }\r\n if (state) {\r\n // only store width or height value that have changed and also\r\n // only store changes that are above a certain threshold\r\n const { itemHeight, defaultSize } = this.getLayoutInfo();\r\n const threshold = Math.round(itemHeight / 2);\r\n let { width, height } = this.element.size;\r\n if (!state.persistHeight || Math.abs(state.currentSize.height - height) <= threshold) {\r\n height = (_b = (_a = state.persistedSize) === null || _a === void 0 ? void 0 : _a.height) !== null && _b !== void 0 ? _b : defaultSize.height;\r\n }\r\n if (!state.persistWidth || Math.abs(state.currentSize.width - width) <= threshold) {\r\n width = (_d = (_c = state.persistedSize) === null || _c === void 0 ? void 0 : _c.width) !== null && _d !== void 0 ? _d : defaultSize.width;\r\n }\r\n this._persistedSize.store(new dom.Dimension(width, height));\r\n }\r\n // reset working state\r\n this._contentWidget.unlockPreference();\r\n state = undefined;\r\n }));\r\n this._messageElement = dom.append(this.element.domNode, dom.$('.message'));\r\n this._listElement = dom.append(this.element.domNode, dom.$('.tree'));\r\n const details = instantiationService.createInstance(SuggestDetailsWidget, this.editor);\r\n details.onDidClose(this.toggleDetails, this, this._disposables);\r\n this._details = new SuggestDetailsOverlay(details, this.editor);\r\n const applyIconStyle = () => this.element.domNode.classList.toggle('no-icons', !this.editor.getOption(101 /* suggest */).showIcons);\r\n applyIconStyle();\r\n const renderer = instantiationService.createInstance(ItemRenderer, this.editor);\r\n this._disposables.add(renderer);\r\n this._disposables.add(renderer.onDidToggleDetails(() => this.toggleDetails()));\r\n this._list = new List('SuggestWidget', this._listElement, {\r\n getHeight: (_element) => this.getLayoutInfo().itemHeight,\r\n getTemplateId: (_element) => 'suggestion'\r\n }, [renderer], {\r\n useShadows: false,\r\n mouseSupport: false,\r\n accessibilityProvider: {\r\n getRole: () => 'option',\r\n getAriaLabel: (item) => {\r\n const textLabel = typeof item.completion.label === 'string' ? item.completion.label : item.completion.label.name;\r\n if (item.isResolved && this._isDetailsVisible()) {\r\n const { documentation, detail } = item.completion;\r\n const docs = strings.format('{0}{1}', detail || '', documentation ? (typeof documentation === 'string' ? documentation : documentation.value) : '');\r\n return nls.localize('ariaCurrenttSuggestionReadDetails', \"{0}, docs: {1}\", textLabel, docs);\r\n }\r\n else {\r\n return textLabel;\r\n }\r\n },\r\n getWidgetAriaLabel: () => nls.localize('suggest', \"Suggest\"),\r\n getWidgetRole: () => 'listbox'\r\n }\r\n });\r\n this._status = instantiationService.createInstance(SuggestWidgetStatus, this.element.domNode);\r\n const applyStatusBarStyle = () => this.element.domNode.classList.toggle('with-status-bar', this.editor.getOption(101 /* suggest */).showStatusBar);\r\n applyStatusBarStyle();\r\n this._disposables.add(attachListStyler(this._list, _themeService, {\r\n listInactiveFocusBackground: editorSuggestWidgetSelectedBackground,\r\n listInactiveFocusOutline: activeContrastBorder\r\n }));\r\n this._disposables.add(_themeService.onDidColorThemeChange(t => this._onThemeChange(t)));\r\n this._onThemeChange(_themeService.getColorTheme());\r\n this._disposables.add(this._list.onMouseDown(e => this._onListMouseDownOrTap(e)));\r\n this._disposables.add(this._list.onTap(e => this._onListMouseDownOrTap(e)));\r\n this._disposables.add(this._list.onDidChangeSelection(e => this._onListSelection(e)));\r\n this._disposables.add(this._list.onDidChangeFocus(e => this._onListFocus(e)));\r\n this._disposables.add(this.editor.onDidChangeCursorSelection(() => this._onCursorSelectionChanged()));\r\n this._disposables.add(this.editor.onDidChangeConfiguration(e => {\r\n if (e.hasChanged(101 /* suggest */)) {\r\n applyStatusBarStyle();\r\n applyIconStyle();\r\n }\r\n }));\r\n this._ctxSuggestWidgetVisible = SuggestContext.Visible.bindTo(_contextKeyService);\r\n this._ctxSuggestWidgetDetailsVisible = SuggestContext.DetailsVisible.bindTo(_contextKeyService);\r\n this._ctxSuggestWidgetMultipleSuggestions = SuggestContext.MultipleSuggestions.bindTo(_contextKeyService);\r\n this._disposables.add(dom.addStandardDisposableListener(this._details.widget.domNode, 'keydown', e => {\r\n this._onDetailsKeydown.fire(e);\r\n }));\r\n this._disposables.add(this.editor.onMouseDown((e) => this._onEditorMouseDown(e)));\r\n }\r\n dispose() {\r\n var _a;\r\n this._details.widget.dispose();\r\n this._details.dispose();\r\n this._list.dispose();\r\n this._status.dispose();\r\n this._disposables.dispose();\r\n (_a = this._loadingTimeout) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._showTimeout.dispose();\r\n this._contentWidget.dispose();\r\n this.element.dispose();\r\n }\r\n _onEditorMouseDown(mouseEvent) {\r\n if (this._details.widget.domNode.contains(mouseEvent.target.element)) {\r\n // Clicking inside details\r\n this._details.widget.domNode.focus();\r\n }\r\n else {\r\n // Clicking outside details and inside suggest\r\n if (this.element.domNode.contains(mouseEvent.target.element)) {\r\n this.editor.focus();\r\n }\r\n }\r\n }\r\n _onCursorSelectionChanged() {\r\n if (this._state !== 0 /* Hidden */) {\r\n this._contentWidget.layout();\r\n }\r\n }\r\n _onListMouseDownOrTap(e) {\r\n if (typeof e.element === 'undefined' || typeof e.index === 'undefined') {\r\n return;\r\n }\r\n // prevent stealing browser focus from the editor\r\n e.browserEvent.preventDefault();\r\n e.browserEvent.stopPropagation();\r\n this._select(e.element, e.index);\r\n }\r\n _onListSelection(e) {\r\n if (e.elements.length) {\r\n this._select(e.elements[0], e.indexes[0]);\r\n }\r\n }\r\n _select(item, index) {\r\n const completionModel = this._completionModel;\r\n if (completionModel) {\r\n this._onDidSelect.fire({ item, index, model: completionModel });\r\n this.editor.focus();\r\n }\r\n }\r\n _onThemeChange(theme) {\r\n const backgroundColor = theme.getColor(editorSuggestWidgetBackground);\r\n if (backgroundColor) {\r\n this.element.domNode.style.backgroundColor = backgroundColor.toString();\r\n this._messageElement.style.backgroundColor = backgroundColor.toString();\r\n this._details.widget.domNode.style.backgroundColor = backgroundColor.toString();\r\n }\r\n const borderColor = theme.getColor(editorSuggestWidgetBorder);\r\n if (borderColor) {\r\n this.element.domNode.style.borderColor = borderColor.toString();\r\n this._messageElement.style.borderColor = borderColor.toString();\r\n this._status.element.style.borderTopColor = borderColor.toString();\r\n this._details.widget.domNode.style.borderColor = borderColor.toString();\r\n this._detailsBorderColor = borderColor.toString();\r\n }\r\n const focusBorderColor = theme.getColor(focusBorder);\r\n if (focusBorderColor) {\r\n this._detailsFocusBorderColor = focusBorderColor.toString();\r\n }\r\n this._details.widget.borderWidth = theme.type === 'hc' ? 2 : 1;\r\n }\r\n _onListFocus(e) {\r\n var _a;\r\n if (this._ignoreFocusEvents) {\r\n return;\r\n }\r\n if (!e.elements.length) {\r\n if (this._currentSuggestionDetails) {\r\n this._currentSuggestionDetails.cancel();\r\n this._currentSuggestionDetails = undefined;\r\n this._focusedItem = undefined;\r\n }\r\n this.editor.setAriaOptions({ activeDescendant: undefined });\r\n return;\r\n }\r\n if (!this._completionModel) {\r\n return;\r\n }\r\n const item = e.elements[0];\r\n const index = e.indexes[0];\r\n if (item !== this._focusedItem) {\r\n (_a = this._currentSuggestionDetails) === null || _a === void 0 ? void 0 : _a.cancel();\r\n this._currentSuggestionDetails = undefined;\r\n this._focusedItem = item;\r\n this._list.reveal(index);\r\n this._currentSuggestionDetails = createCancelablePromise((token) => __awaiter(this, void 0, void 0, function* () {\r\n const loading = disposableTimeout(() => {\r\n if (this._isDetailsVisible()) {\r\n this.showDetails(true);\r\n }\r\n }, 250);\r\n token.onCancellationRequested(() => loading.dispose());\r\n const result = yield item.resolve(token);\r\n loading.dispose();\r\n return result;\r\n }));\r\n this._currentSuggestionDetails.then(() => {\r\n if (index >= this._list.length || item !== this._list.element(index)) {\r\n return;\r\n }\r\n // item can have extra information, so re-render\r\n this._ignoreFocusEvents = true;\r\n this._list.splice(index, 1, [item]);\r\n this._list.setFocus([index]);\r\n this._ignoreFocusEvents = false;\r\n if (this._isDetailsVisible()) {\r\n this.showDetails(false);\r\n }\r\n else {\r\n this.element.domNode.classList.remove('docs-side');\r\n }\r\n this.editor.setAriaOptions({ activeDescendant: getAriaId(index) });\r\n }).catch(onUnexpectedError);\r\n }\r\n // emit an event\r\n this._onDidFocus.fire({ item, index, model: this._completionModel });\r\n }\r\n _setState(state) {\r\n if (this._state === state) {\r\n return;\r\n }\r\n this._state = state;\r\n this.element.domNode.classList.toggle('frozen', state === 4 /* Frozen */);\r\n this.element.domNode.classList.remove('message');\r\n switch (state) {\r\n case 0 /* Hidden */:\r\n dom.hide(this._messageElement, this._listElement, this._status.element);\r\n this._details.hide(true);\r\n this._status.hide();\r\n this._contentWidget.hide();\r\n this._ctxSuggestWidgetVisible.reset();\r\n this._ctxSuggestWidgetMultipleSuggestions.reset();\r\n this.element.domNode.classList.remove('visible');\r\n this._list.splice(0, this._list.length);\r\n this._focusedItem = undefined;\r\n this._cappedHeight = undefined;\r\n this._explainMode = false;\r\n break;\r\n case 1 /* Loading */:\r\n this.element.domNode.classList.add('message');\r\n this._messageElement.textContent = SuggestWidget.LOADING_MESSAGE;\r\n dom.hide(this._listElement, this._status.element);\r\n dom.show(this._messageElement);\r\n this._details.hide();\r\n this._show();\r\n this._focusedItem = undefined;\r\n break;\r\n case 2 /* Empty */:\r\n this.element.domNode.classList.add('message');\r\n this._messageElement.textContent = SuggestWidget.NO_SUGGESTIONS_MESSAGE;\r\n dom.hide(this._listElement, this._status.element);\r\n dom.show(this._messageElement);\r\n this._details.hide();\r\n this._show();\r\n this._focusedItem = undefined;\r\n break;\r\n case 3 /* Open */:\r\n dom.hide(this._messageElement);\r\n dom.show(this._listElement, this._status.element);\r\n this._show();\r\n break;\r\n case 4 /* Frozen */:\r\n dom.hide(this._messageElement);\r\n dom.show(this._listElement, this._status.element);\r\n this._show();\r\n break;\r\n case 5 /* Details */:\r\n dom.hide(this._messageElement);\r\n dom.show(this._listElement, this._status.element);\r\n this._details.show();\r\n this._show();\r\n break;\r\n }\r\n }\r\n _show() {\r\n this._status.show();\r\n this._contentWidget.show();\r\n this._layout(this._persistedSize.restore());\r\n this._ctxSuggestWidgetVisible.set(true);\r\n this._showTimeout.cancelAndSet(() => {\r\n this.element.domNode.classList.add('visible');\r\n this._onDidShow.fire(this);\r\n }, 100);\r\n }\r\n showTriggered(auto, delay) {\r\n if (this._state !== 0 /* Hidden */) {\r\n return;\r\n }\r\n this._contentWidget.setPosition(this.editor.getPosition());\r\n this._isAuto = !!auto;\r\n if (!this._isAuto) {\r\n this._loadingTimeout = disposableTimeout(() => this._setState(1 /* Loading */), delay);\r\n }\r\n }\r\n showSuggestions(completionModel, selectionIndex, isFrozen, isAuto) {\r\n var _a, _b;\r\n this._contentWidget.setPosition(this.editor.getPosition());\r\n (_a = this._loadingTimeout) === null || _a === void 0 ? void 0 : _a.dispose();\r\n (_b = this._currentSuggestionDetails) === null || _b === void 0 ? void 0 : _b.cancel();\r\n this._currentSuggestionDetails = undefined;\r\n if (this._completionModel !== completionModel) {\r\n this._completionModel = completionModel;\r\n }\r\n if (isFrozen && this._state !== 2 /* Empty */ && this._state !== 0 /* Hidden */) {\r\n this._setState(4 /* Frozen */);\r\n return;\r\n }\r\n const visibleCount = this._completionModel.items.length;\r\n const isEmpty = visibleCount === 0;\r\n this._ctxSuggestWidgetMultipleSuggestions.set(visibleCount > 1);\r\n if (isEmpty) {\r\n this._setState(isAuto ? 0 /* Hidden */ : 2 /* Empty */);\r\n this._completionModel = undefined;\r\n return;\r\n }\r\n this._focusedItem = undefined;\r\n this._list.splice(0, this._list.length, this._completionModel.items);\r\n this._setState(isFrozen ? 4 /* Frozen */ : 3 /* Open */);\r\n this._list.reveal(selectionIndex, 0);\r\n this._list.setFocus([selectionIndex]);\r\n this._layout(this.element.size);\r\n // Reset focus border\r\n if (this._detailsBorderColor) {\r\n this._details.widget.domNode.style.borderColor = this._detailsBorderColor;\r\n }\r\n }\r\n selectNextPage() {\r\n switch (this._state) {\r\n case 0 /* Hidden */:\r\n return false;\r\n case 5 /* Details */:\r\n this._details.widget.pageDown();\r\n return true;\r\n case 1 /* Loading */:\r\n return !this._isAuto;\r\n default:\r\n this._list.focusNextPage();\r\n return true;\r\n }\r\n }\r\n selectNext() {\r\n switch (this._state) {\r\n case 0 /* Hidden */:\r\n return false;\r\n case 1 /* Loading */:\r\n return !this._isAuto;\r\n default:\r\n this._list.focusNext(1, true);\r\n return true;\r\n }\r\n }\r\n selectLast() {\r\n switch (this._state) {\r\n case 0 /* Hidden */:\r\n return false;\r\n case 5 /* Details */:\r\n this._details.widget.scrollBottom();\r\n return true;\r\n case 1 /* Loading */:\r\n return !this._isAuto;\r\n default:\r\n this._list.focusLast();\r\n return true;\r\n }\r\n }\r\n selectPreviousPage() {\r\n switch (this._state) {\r\n case 0 /* Hidden */:\r\n return false;\r\n case 5 /* Details */:\r\n this._details.widget.pageUp();\r\n return true;\r\n case 1 /* Loading */:\r\n return !this._isAuto;\r\n default:\r\n this._list.focusPreviousPage();\r\n return true;\r\n }\r\n }\r\n selectPrevious() {\r\n switch (this._state) {\r\n case 0 /* Hidden */:\r\n return false;\r\n case 1 /* Loading */:\r\n return !this._isAuto;\r\n default:\r\n this._list.focusPrevious(1, true);\r\n return false;\r\n }\r\n }\r\n selectFirst() {\r\n switch (this._state) {\r\n case 0 /* Hidden */:\r\n return false;\r\n case 5 /* Details */:\r\n this._details.widget.scrollTop();\r\n return true;\r\n case 1 /* Loading */:\r\n return !this._isAuto;\r\n default:\r\n this._list.focusFirst();\r\n return true;\r\n }\r\n }\r\n getFocusedItem() {\r\n if (this._state !== 0 /* Hidden */\r\n && this._state !== 2 /* Empty */\r\n && this._state !== 1 /* Loading */\r\n && this._completionModel) {\r\n return {\r\n item: this._list.getFocusedElements()[0],\r\n index: this._list.getFocus()[0],\r\n model: this._completionModel\r\n };\r\n }\r\n return undefined;\r\n }\r\n toggleDetailsFocus() {\r\n if (this._state === 5 /* Details */) {\r\n this._setState(3 /* Open */);\r\n if (this._detailsBorderColor) {\r\n this._details.widget.domNode.style.borderColor = this._detailsBorderColor;\r\n }\r\n }\r\n else if (this._state === 3 /* Open */ && this._isDetailsVisible()) {\r\n this._setState(5 /* Details */);\r\n if (this._detailsFocusBorderColor) {\r\n this._details.widget.domNode.style.borderColor = this._detailsFocusBorderColor;\r\n }\r\n }\r\n }\r\n toggleDetails() {\r\n if (this._isDetailsVisible()) {\r\n // hide details widget\r\n this._ctxSuggestWidgetDetailsVisible.set(false);\r\n this._setDetailsVisible(false);\r\n this._details.hide();\r\n this.element.domNode.classList.remove('shows-details');\r\n }\r\n else if (canExpandCompletionItem(this._list.getFocusedElements()[0]) && (this._state === 3 /* Open */ || this._state === 5 /* Details */ || this._state === 4 /* Frozen */)) {\r\n // show details widget (iff possible)\r\n this._ctxSuggestWidgetDetailsVisible.set(true);\r\n this._setDetailsVisible(true);\r\n this.showDetails(false);\r\n }\r\n }\r\n showDetails(loading) {\r\n this._details.show();\r\n if (loading) {\r\n this._details.widget.renderLoading();\r\n }\r\n else {\r\n this._details.widget.renderItem(this._list.getFocusedElements()[0], this._explainMode);\r\n }\r\n this._positionDetails();\r\n this.editor.focus();\r\n this.element.domNode.classList.add('shows-details');\r\n }\r\n toggleExplainMode() {\r\n if (this._list.getFocusedElements()[0] && this._isDetailsVisible()) {\r\n this._explainMode = !this._explainMode;\r\n this.showDetails(false);\r\n }\r\n }\r\n resetPersistedSize() {\r\n this._persistedSize.reset();\r\n }\r\n hideWidget() {\r\n var _a;\r\n (_a = this._loadingTimeout) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._setState(0 /* Hidden */);\r\n this._onDidHide.fire(this);\r\n // ensure that a reasonable widget height is persisted so that\r\n // accidential \"resize-to-single-items\" cases aren't happening\r\n const dim = this._persistedSize.restore();\r\n const minPersistedHeight = Math.ceil(this.getLayoutInfo().itemHeight * 4.3);\r\n if (dim && dim.height < minPersistedHeight) {\r\n this._persistedSize.store(dim.with(undefined, minPersistedHeight));\r\n }\r\n }\r\n isFrozen() {\r\n return this._state === 4 /* Frozen */;\r\n }\r\n _afterRender(position) {\r\n if (position === null) {\r\n if (this._isDetailsVisible()) {\r\n this._details.hide(); //todo@jrieken soft-hide\r\n }\r\n return;\r\n }\r\n if (this._state === 2 /* Empty */ || this._state === 1 /* Loading */) {\r\n // no special positioning when widget isn't showing list\r\n return;\r\n }\r\n if (this._isDetailsVisible()) {\r\n this._details.show();\r\n }\r\n this._positionDetails();\r\n }\r\n _layout(size) {\r\n var _a, _b, _c;\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n if (!this.editor.getDomNode()) {\r\n // happens when running tests\r\n return;\r\n }\r\n const bodyBox = dom.getClientArea(document.body);\r\n const info = this.getLayoutInfo();\r\n if (!size) {\r\n size = info.defaultSize;\r\n }\r\n let height = size.height;\r\n let width = size.width;\r\n // status bar\r\n this._status.element.style.lineHeight = `${info.itemHeight}px`;\r\n if (this._state === 2 /* Empty */ || this._state === 1 /* Loading */) {\r\n // showing a message only\r\n height = info.itemHeight + info.borderHeight;\r\n width = info.defaultSize.width / 2;\r\n this.element.enableSashes(false, false, false, false);\r\n this.element.minSize = this.element.maxSize = new dom.Dimension(width, height);\r\n this._contentWidget.setPreference(2 /* BELOW */);\r\n }\r\n else {\r\n // showing items\r\n // width math\r\n const maxWidth = bodyBox.width - info.borderHeight - 2 * info.horizontalPadding;\r\n if (width > maxWidth) {\r\n width = maxWidth;\r\n }\r\n const preferredWidth = this._completionModel ? this._completionModel.stats.pLabelLen * info.typicalHalfwidthCharacterWidth : width;\r\n // height math\r\n const fullHeight = info.statusBarHeight + this._list.contentHeight + info.borderHeight;\r\n const minHeight = info.itemHeight + info.statusBarHeight;\r\n const editorBox = dom.getDomNodePagePosition(this.editor.getDomNode());\r\n const cursorBox = this.editor.getScrolledVisiblePosition(this.editor.getPosition());\r\n const cursorBottom = editorBox.top + cursorBox.top + cursorBox.height;\r\n const maxHeightBelow = Math.min(bodyBox.height - cursorBottom - info.verticalPadding, fullHeight);\r\n const maxHeightAbove = Math.min(editorBox.top + cursorBox.top - info.verticalPadding, fullHeight);\r\n let maxHeight = Math.min(Math.max(maxHeightAbove, maxHeightBelow) + info.borderHeight, fullHeight);\r\n if (height === ((_a = this._cappedHeight) === null || _a === void 0 ? void 0 : _a.capped)) {\r\n // Restore the old (wanted) height when the current\r\n // height is capped to fit\r\n height = this._cappedHeight.wanted;\r\n }\r\n if (height < minHeight) {\r\n height = minHeight;\r\n }\r\n if (height > maxHeight) {\r\n height = maxHeight;\r\n }\r\n if (height > maxHeightBelow) {\r\n this._contentWidget.setPreference(1 /* ABOVE */);\r\n this.element.enableSashes(true, true, false, false);\r\n maxHeight = maxHeightAbove;\r\n }\r\n else {\r\n this._contentWidget.setPreference(2 /* BELOW */);\r\n this.element.enableSashes(false, true, true, false);\r\n maxHeight = maxHeightBelow;\r\n }\r\n this.element.preferredSize = new dom.Dimension(preferredWidth, info.defaultSize.height);\r\n this.element.maxSize = new dom.Dimension(maxWidth, maxHeight);\r\n this.element.minSize = new dom.Dimension(220, minHeight);\r\n // Know when the height was capped to fit and remember\r\n // the wanted height for later. This is required when going\r\n // left to widen suggestions.\r\n this._cappedHeight = height === fullHeight\r\n ? { wanted: (_c = (_b = this._cappedHeight) === null || _b === void 0 ? void 0 : _b.wanted) !== null && _c !== void 0 ? _c : size.height, capped: height }\r\n : undefined;\r\n }\r\n this._resize(width, height);\r\n }\r\n _resize(width, height) {\r\n const { width: maxWidth, height: maxHeight } = this.element.maxSize;\r\n width = Math.min(maxWidth, width);\r\n height = Math.min(maxHeight, height);\r\n const { statusBarHeight } = this.getLayoutInfo();\r\n this._list.layout(height - statusBarHeight, width);\r\n this._listElement.style.height = `${height - statusBarHeight}px`;\r\n this.element.layout(height, width);\r\n this._contentWidget.layout();\r\n this._positionDetails();\r\n }\r\n _positionDetails() {\r\n if (this._isDetailsVisible()) {\r\n this._details.placeAtAnchor(this.element.domNode);\r\n }\r\n }\r\n getLayoutInfo() {\r\n const fontInfo = this.editor.getOption(38 /* fontInfo */);\r\n const itemHeight = clamp(this.editor.getOption(103 /* suggestLineHeight */) || fontInfo.lineHeight, 8, 1000);\r\n const statusBarHeight = !this.editor.getOption(101 /* suggest */).showStatusBar || this._state === 2 /* Empty */ || this._state === 1 /* Loading */ ? 0 : itemHeight;\r\n const borderWidth = this._details.widget.borderWidth;\r\n const borderHeight = 2 * borderWidth;\r\n return {\r\n itemHeight,\r\n statusBarHeight,\r\n borderWidth,\r\n borderHeight,\r\n typicalHalfwidthCharacterWidth: fontInfo.typicalHalfwidthCharacterWidth,\r\n verticalPadding: 22,\r\n horizontalPadding: 14,\r\n defaultSize: new dom.Dimension(430, statusBarHeight + 12 * itemHeight + borderHeight)\r\n };\r\n }\r\n _isDetailsVisible() {\r\n return this._storageService.getBoolean('expandSuggestionDocs', 0 /* GLOBAL */, false);\r\n }\r\n _setDetailsVisible(value) {\r\n this._storageService.store('expandSuggestionDocs', value, 0 /* GLOBAL */, 0 /* USER */);\r\n }\r\n};\r\nSuggestWidget.LOADING_MESSAGE = nls.localize('suggestWidget.loading', \"Loading...\");\r\nSuggestWidget.NO_SUGGESTIONS_MESSAGE = nls.localize('suggestWidget.noSuggestions', \"No suggestions.\");\r\nSuggestWidget = __decorate([\r\n __param(1, IStorageService),\r\n __param(2, IContextKeyService),\r\n __param(3, IThemeService),\r\n __param(4, IInstantiationService)\r\n], SuggestWidget);\r\nexport { SuggestWidget };\r\nexport class SuggestContentWidget {\r\n constructor(_widget, _editor) {\r\n this._widget = _widget;\r\n this._editor = _editor;\r\n this.allowEditorOverflow = true;\r\n this.suppressMouseDown = false;\r\n this._preferenceLocked = false;\r\n this._added = false;\r\n this._hidden = false;\r\n }\r\n dispose() {\r\n if (this._added) {\r\n this._added = false;\r\n this._editor.removeContentWidget(this);\r\n }\r\n }\r\n getId() {\r\n return 'editor.widget.suggestWidget';\r\n }\r\n getDomNode() {\r\n return this._widget.element.domNode;\r\n }\r\n show() {\r\n this._hidden = false;\r\n if (!this._added) {\r\n this._added = true;\r\n this._editor.addContentWidget(this);\r\n }\r\n }\r\n hide() {\r\n if (!this._hidden) {\r\n this._hidden = true;\r\n this.layout();\r\n }\r\n }\r\n layout() {\r\n this._editor.layoutContentWidget(this);\r\n }\r\n getPosition() {\r\n if (this._hidden || !this._position || !this._preference) {\r\n return null;\r\n }\r\n return {\r\n position: this._position,\r\n preference: [this._preference]\r\n };\r\n }\r\n beforeRender() {\r\n const { height, width } = this._widget.element.size;\r\n const { borderWidth, horizontalPadding } = this._widget.getLayoutInfo();\r\n return new dom.Dimension(width + 2 * borderWidth + horizontalPadding, height + 2 * borderWidth);\r\n }\r\n afterRender(position) {\r\n this._widget._afterRender(position);\r\n }\r\n setPreference(preference) {\r\n if (!this._preferenceLocked) {\r\n this._preference = preference;\r\n }\r\n }\r\n lockPreference() {\r\n this._preferenceLocked = true;\r\n }\r\n unlockPreference() {\r\n this._preferenceLocked = false;\r\n }\r\n setPosition(position) {\r\n this._position = position;\r\n }\r\n}\r\nregisterThemingParticipant((theme, collector) => {\r\n const matchHighlight = theme.getColor(editorSuggestWidgetHighlightForeground);\r\n if (matchHighlight) {\r\n collector.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${matchHighlight}; }`);\r\n }\r\n const foreground = theme.getColor(editorSuggestWidgetForeground);\r\n if (foreground) {\r\n collector.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${foreground}; }`);\r\n }\r\n const link = theme.getColor(textLinkForeground);\r\n if (link) {\r\n collector.addRule(`.monaco-editor .suggest-details a { color: ${link}; }`);\r\n }\r\n const codeBackground = theme.getColor(textCodeBlockBackground);\r\n if (codeBackground) {\r\n collector.addRule(`.monaco-editor .suggest-details code { background-color: ${codeBackground}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { RawContextKey, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nlet WordContextKey = class WordContextKey extends Disposable {\r\n constructor(_editor, contextKeyService) {\r\n super();\r\n this._editor = _editor;\r\n this._enabled = false;\r\n this._ckAtEnd = WordContextKey.AtEnd.bindTo(contextKeyService);\r\n this._register(this._editor.onDidChangeConfiguration(e => e.hasChanged(106 /* tabCompletion */) && this._update()));\r\n this._update();\r\n }\r\n dispose() {\r\n var _a;\r\n super.dispose();\r\n (_a = this._selectionListener) === null || _a === void 0 ? void 0 : _a.dispose();\r\n this._ckAtEnd.reset();\r\n }\r\n _update() {\r\n // only update this when tab completions are enabled\r\n const enabled = this._editor.getOption(106 /* tabCompletion */) === 'on';\r\n if (this._enabled === enabled) {\r\n return;\r\n }\r\n this._enabled = enabled;\r\n if (this._enabled) {\r\n const checkForWordEnd = () => {\r\n if (!this._editor.hasModel()) {\r\n this._ckAtEnd.set(false);\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n const selection = this._editor.getSelection();\r\n const word = model.getWordAtPosition(selection.getStartPosition());\r\n if (!word) {\r\n this._ckAtEnd.set(false);\r\n return;\r\n }\r\n this._ckAtEnd.set(word.endColumn === selection.getStartPosition().column);\r\n };\r\n this._selectionListener = this._editor.onDidChangeCursorSelection(checkForWordEnd);\r\n checkForWordEnd();\r\n }\r\n else if (this._selectionListener) {\r\n this._ckAtEnd.reset();\r\n this._selectionListener.dispose();\r\n this._selectionListener = undefined;\r\n }\r\n }\r\n};\r\nWordContextKey.AtEnd = new RawContextKey('atEndOfWord', false);\r\nWordContextKey = __decorate([\r\n __param(1, IContextKeyService)\r\n], WordContextKey);\r\nexport { WordContextKey };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { isNonEmptyArray } from '../../../base/common/arrays.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { CharacterSet } from '../../common/core/characterClassifier.js';\r\nexport class CommitCharacterController {\r\n constructor(editor, widget, accept) {\r\n this._disposables = new DisposableStore();\r\n this._disposables.add(widget.onDidShow(() => this._onItem(widget.getFocusedItem())));\r\n this._disposables.add(widget.onDidFocus(this._onItem, this));\r\n this._disposables.add(widget.onDidHide(this.reset, this));\r\n this._disposables.add(editor.onWillType(text => {\r\n if (this._active && !widget.isFrozen()) {\r\n const ch = text.charCodeAt(text.length - 1);\r\n if (this._active.acceptCharacters.has(ch) && editor.getOption(0 /* acceptSuggestionOnCommitCharacter */)) {\r\n accept(this._active.item);\r\n }\r\n }\r\n }));\r\n }\r\n _onItem(selected) {\r\n if (!selected || !isNonEmptyArray(selected.item.completion.commitCharacters)) {\r\n // no item or no commit characters\r\n this.reset();\r\n return;\r\n }\r\n if (this._active && this._active.item.item === selected.item) {\r\n // still the same item\r\n return;\r\n }\r\n // keep item and its commit characters\r\n const acceptCharacters = new CharacterSet();\r\n for (const ch of selected.item.completion.commitCharacters) {\r\n if (ch.length > 0) {\r\n acceptCharacters.add(ch.charCodeAt(0));\r\n }\r\n }\r\n this._active = { acceptCharacters, item: selected };\r\n }\r\n reset() {\r\n this._active = undefined;\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nexport class OvertypingCapturer {\r\n constructor(editor, suggestModel) {\r\n this._disposables = new DisposableStore();\r\n this._lastOvertyped = [];\r\n this._empty = true;\r\n this._disposables.add(editor.onWillType(() => {\r\n if (!this._empty) {\r\n return;\r\n }\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const selections = editor.getSelections();\r\n const selectionsLength = selections.length;\r\n // Check if it will overtype any selections\r\n let willOvertype = false;\r\n for (let i = 0; i < selectionsLength; i++) {\r\n if (!selections[i].isEmpty()) {\r\n willOvertype = true;\r\n break;\r\n }\r\n }\r\n if (!willOvertype) {\r\n return;\r\n }\r\n this._lastOvertyped = [];\r\n const model = editor.getModel();\r\n for (let i = 0; i < selectionsLength; i++) {\r\n const selection = selections[i];\r\n // Check for overtyping capturer restrictions\r\n if (model.getValueLengthInRange(selection) > OvertypingCapturer._maxSelectionLength) {\r\n return;\r\n }\r\n this._lastOvertyped[i] = { value: model.getValueInRange(selection), multiline: selection.startLineNumber !== selection.endLineNumber };\r\n }\r\n this._empty = false;\r\n }));\r\n this._disposables.add(suggestModel.onDidCancel(e => {\r\n if (!this._empty && !e.retrigger) {\r\n this._empty = true;\r\n }\r\n }));\r\n }\r\n getLastOvertypedInfo(idx) {\r\n if (!this._empty && idx >= 0 && idx < this._lastOvertyped.length) {\r\n return this._lastOvertyped[idx];\r\n }\r\n return undefined;\r\n }\r\n dispose() {\r\n this._disposables.dispose();\r\n }\r\n}\r\nOvertypingCapturer._maxSelectionLength = 51200;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { alert } from '../../../base/browser/ui/aria/aria.js';\r\nimport { isNonEmptyArray } from '../../../base/common/arrays.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { SimpleKeybinding } from '../../../base/common/keyCodes.js';\r\nimport { dispose, DisposableStore, toDisposable, MutableDisposable } from '../../../base/common/lifecycle.js';\r\nimport { StableEditorScrollState } from '../../browser/core/editorState.js';\r\nimport { EditorAction, EditorCommand, registerEditorAction, registerEditorCommand, registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { EditOperation } from '../../common/core/editOperation.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { SnippetController2 } from '../snippet/snippetController2.js';\r\nimport { SnippetParser } from '../snippet/snippetParser.js';\r\nimport { ISuggestMemoryService } from './suggestMemory.js';\r\nimport * as nls from '../../../nls.js';\r\nimport { ICommandService, CommandsRegistry } from '../../../platform/commands/common/commands.js';\r\nimport { ContextKeyExpr, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { KeybindingsRegistry } from '../../../platform/keybinding/common/keybindingsRegistry.js';\r\nimport { Context as SuggestContext, suggestWidgetStatusbarMenu } from './suggest.js';\r\nimport { SuggestAlternatives } from './suggestAlternatives.js';\r\nimport { SuggestModel } from './suggestModel.js';\r\nimport { SuggestWidget } from './suggestWidget.js';\r\nimport { WordContextKey } from './wordContextKey.js';\r\nimport { Event } from '../../../base/common/event.js';\r\nimport { IdleValue } from '../../../base/common/async.js';\r\nimport { isObject, assertType } from '../../../base/common/types.js';\r\nimport { CommitCharacterController } from './suggestCommitCharacters.js';\r\nimport { OvertypingCapturer } from './suggestOvertypingCapturer.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport * as platform from '../../../base/common/platform.js';\r\nimport { MenuRegistry } from '../../../platform/actions/common/actions.js';\r\nimport { CancellationTokenSource } from '../../../base/common/cancellation.js';\r\nimport { ILogService } from '../../../platform/log/common/log.js';\r\nimport { StopWatch } from '../../../base/common/stopwatch.js';\r\n// sticky suggest widget which doesn't disappear on focus out and such\r\nlet _sticky = false;\r\n// _sticky = Boolean(\"true\"); // done \"weirdly\" so that a lint warning prevents you from pushing this\r\nclass LineSuffix {\r\n constructor(_model, _position) {\r\n this._model = _model;\r\n this._position = _position;\r\n // spy on what's happening right of the cursor. two cases:\r\n // 1. end of line -> check that it's still end of line\r\n // 2. mid of line -> add a marker and compute the delta\r\n const maxColumn = _model.getLineMaxColumn(_position.lineNumber);\r\n if (maxColumn !== _position.column) {\r\n const offset = _model.getOffsetAt(_position);\r\n const end = _model.getPositionAt(offset + 1);\r\n this._marker = _model.deltaDecorations([], [{\r\n range: Range.fromPositions(_position, end),\r\n options: { stickiness: 1 /* NeverGrowsWhenTypingAtEdges */ }\r\n }]);\r\n }\r\n }\r\n dispose() {\r\n if (this._marker && !this._model.isDisposed()) {\r\n this._model.deltaDecorations(this._marker, []);\r\n }\r\n }\r\n delta(position) {\r\n if (this._model.isDisposed() || this._position.lineNumber !== position.lineNumber) {\r\n // bail out early if things seems fishy\r\n return 0;\r\n }\r\n // read the marker (in case suggest was triggered at line end) or compare\r\n // the cursor to the line end.\r\n if (this._marker) {\r\n const range = this._model.getDecorationRange(this._marker[0]);\r\n const end = this._model.getOffsetAt(range.getStartPosition());\r\n return end - this._model.getOffsetAt(position);\r\n }\r\n else {\r\n return this._model.getLineMaxColumn(position.lineNumber) - position.column;\r\n }\r\n }\r\n}\r\nlet SuggestController = class SuggestController {\r\n constructor(editor, _memoryService, _commandService, _contextKeyService, _instantiationService, _logService) {\r\n this._memoryService = _memoryService;\r\n this._commandService = _commandService;\r\n this._contextKeyService = _contextKeyService;\r\n this._instantiationService = _instantiationService;\r\n this._logService = _logService;\r\n this._lineSuffix = new MutableDisposable();\r\n this._toDispose = new DisposableStore();\r\n this.editor = editor;\r\n this.model = _instantiationService.createInstance(SuggestModel, this.editor);\r\n // context key: update insert/replace mode\r\n const ctxInsertMode = SuggestContext.InsertMode.bindTo(_contextKeyService);\r\n ctxInsertMode.set(editor.getOption(101 /* suggest */).insertMode);\r\n this.model.onDidTrigger(() => ctxInsertMode.set(editor.getOption(101 /* suggest */).insertMode));\r\n this.widget = this._toDispose.add(new IdleValue(() => {\r\n const widget = this._instantiationService.createInstance(SuggestWidget, this.editor);\r\n this._toDispose.add(widget);\r\n this._toDispose.add(widget.onDidSelect(item => this._insertSuggestion(item, 0), this));\r\n // Wire up logic to accept a suggestion on certain characters\r\n const commitCharacterController = new CommitCharacterController(this.editor, widget, item => this._insertSuggestion(item, 2 /* NoAfterUndoStop */));\r\n this._toDispose.add(commitCharacterController);\r\n this._toDispose.add(this.model.onDidSuggest(e => {\r\n if (e.completionModel.items.length === 0) {\r\n commitCharacterController.reset();\r\n }\r\n }));\r\n // Wire up makes text edit context key\r\n const ctxMakesTextEdit = SuggestContext.MakesTextEdit.bindTo(this._contextKeyService);\r\n const ctxHasInsertAndReplace = SuggestContext.HasInsertAndReplaceRange.bindTo(this._contextKeyService);\r\n const ctxCanResolve = SuggestContext.CanResolve.bindTo(this._contextKeyService);\r\n this._toDispose.add(toDisposable(() => {\r\n ctxMakesTextEdit.reset();\r\n ctxHasInsertAndReplace.reset();\r\n ctxCanResolve.reset();\r\n }));\r\n this._toDispose.add(widget.onDidFocus(({ item }) => {\r\n // (ctx: makesTextEdit)\r\n const position = this.editor.getPosition();\r\n const startColumn = item.editStart.column;\r\n const endColumn = position.column;\r\n let value = true;\r\n if (this.editor.getOption(1 /* acceptSuggestionOnEnter */) === 'smart'\r\n && this.model.state === 2 /* Auto */\r\n && !item.completion.command\r\n && !item.completion.additionalTextEdits\r\n && !(item.completion.insertTextRules & 4 /* InsertAsSnippet */)\r\n && endColumn - startColumn === item.completion.insertText.length) {\r\n const oldText = this.editor.getModel().getValueInRange({\r\n startLineNumber: position.lineNumber,\r\n startColumn,\r\n endLineNumber: position.lineNumber,\r\n endColumn\r\n });\r\n value = oldText !== item.completion.insertText;\r\n }\r\n ctxMakesTextEdit.set(value);\r\n // (ctx: hasInsertAndReplaceRange)\r\n ctxHasInsertAndReplace.set(!Position.equals(item.editInsertEnd, item.editReplaceEnd));\r\n // (ctx: canResolve)\r\n ctxCanResolve.set(Boolean(item.provider.resolveCompletionItem) || Boolean(item.completion.documentation) || item.completion.detail !== item.completion.label);\r\n }));\r\n this._toDispose.add(widget.onDetailsKeyDown(e => {\r\n // cmd + c on macOS, ctrl + c on Win / Linux\r\n if (e.toKeybinding().equals(new SimpleKeybinding(true, false, false, false, 33 /* KEY_C */)) ||\r\n (platform.isMacintosh && e.toKeybinding().equals(new SimpleKeybinding(false, false, false, true, 33 /* KEY_C */)))) {\r\n e.stopPropagation();\r\n return;\r\n }\r\n if (!e.toKeybinding().isModifierKey()) {\r\n this.editor.focus();\r\n }\r\n }));\r\n return widget;\r\n }));\r\n // Wire up text overtyping capture\r\n this._overtypingCapturer = this._toDispose.add(new IdleValue(() => {\r\n return this._toDispose.add(new OvertypingCapturer(this.editor, this.model));\r\n }));\r\n this._alternatives = this._toDispose.add(new IdleValue(() => {\r\n return this._toDispose.add(new SuggestAlternatives(this.editor, this._contextKeyService));\r\n }));\r\n this._toDispose.add(_instantiationService.createInstance(WordContextKey, editor));\r\n this._toDispose.add(this.model.onDidTrigger(e => {\r\n this.widget.value.showTriggered(e.auto, e.shy ? 250 : 50);\r\n this._lineSuffix.value = new LineSuffix(this.editor.getModel(), e.position);\r\n }));\r\n this._toDispose.add(this.model.onDidSuggest(e => {\r\n if (!e.shy) {\r\n let index = this._memoryService.select(this.editor.getModel(), this.editor.getPosition(), e.completionModel.items);\r\n this.widget.value.showSuggestions(e.completionModel, index, e.isFrozen, e.auto);\r\n }\r\n }));\r\n this._toDispose.add(this.model.onDidCancel(e => {\r\n if (!e.retrigger) {\r\n this.widget.value.hideWidget();\r\n }\r\n }));\r\n this._toDispose.add(this.editor.onDidBlurEditorWidget(() => {\r\n if (!_sticky) {\r\n this.model.cancel();\r\n this.model.clear();\r\n }\r\n }));\r\n // Manage the acceptSuggestionsOnEnter context key\r\n let acceptSuggestionsOnEnter = SuggestContext.AcceptSuggestionsOnEnter.bindTo(_contextKeyService);\r\n let updateFromConfig = () => {\r\n const acceptSuggestionOnEnter = this.editor.getOption(1 /* acceptSuggestionOnEnter */);\r\n acceptSuggestionsOnEnter.set(acceptSuggestionOnEnter === 'on' || acceptSuggestionOnEnter === 'smart');\r\n };\r\n this._toDispose.add(this.editor.onDidChangeConfiguration(() => updateFromConfig()));\r\n updateFromConfig();\r\n }\r\n static get(editor) {\r\n return editor.getContribution(SuggestController.ID);\r\n }\r\n dispose() {\r\n this._alternatives.dispose();\r\n this._toDispose.dispose();\r\n this.widget.dispose();\r\n this.model.dispose();\r\n this._lineSuffix.dispose();\r\n }\r\n _insertSuggestion(event, flags) {\r\n if (!event || !event.item) {\r\n this._alternatives.value.reset();\r\n this.model.cancel();\r\n this.model.clear();\r\n return;\r\n }\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n const model = this.editor.getModel();\r\n const modelVersionNow = model.getAlternativeVersionId();\r\n const { item } = event;\r\n //\r\n const tasks = [];\r\n const cts = new CancellationTokenSource();\r\n // pushing undo stops *before* additional text edits and\r\n // *after* the main edit\r\n if (!(flags & 1 /* NoBeforeUndoStop */)) {\r\n this.editor.pushUndoStop();\r\n }\r\n // compute overwrite[Before|After] deltas BEFORE applying extra edits\r\n const info = this.getOverwriteInfo(item, Boolean(flags & 8 /* AlternativeOverwriteConfig */));\r\n // keep item in memory\r\n this._memoryService.memorize(model, this.editor.getPosition(), item);\r\n if (Array.isArray(item.completion.additionalTextEdits)) {\r\n // sync additional edits\r\n const scrollState = StableEditorScrollState.capture(this.editor);\r\n this.editor.executeEdits('suggestController.additionalTextEdits.sync', item.completion.additionalTextEdits.map(edit => EditOperation.replace(Range.lift(edit.range), edit.text)));\r\n scrollState.restoreRelativeVerticalPositionOfCursor(this.editor);\r\n }\r\n else if (!item.isResolved) {\r\n // async additional edits\r\n const sw = new StopWatch(true);\r\n let position;\r\n const docListener = model.onDidChangeContent(e => {\r\n if (e.isFlush) {\r\n cts.cancel();\r\n docListener.dispose();\r\n return;\r\n }\r\n for (let change of e.changes) {\r\n const thisPosition = Range.getEndPosition(change.range);\r\n if (!position || Position.isBefore(thisPosition, position)) {\r\n position = thisPosition;\r\n }\r\n }\r\n });\r\n let oldFlags = flags;\r\n flags |= 2 /* NoAfterUndoStop */;\r\n let didType = false;\r\n let typeListener = this.editor.onWillType(() => {\r\n typeListener.dispose();\r\n didType = true;\r\n if (!(oldFlags & 2 /* NoAfterUndoStop */)) {\r\n this.editor.pushUndoStop();\r\n }\r\n });\r\n tasks.push(item.resolve(cts.token).then(() => {\r\n if (!item.completion.additionalTextEdits || cts.token.isCancellationRequested) {\r\n return false;\r\n }\r\n if (position && item.completion.additionalTextEdits.some(edit => Position.isBefore(position, Range.getStartPosition(edit.range)))) {\r\n return false;\r\n }\r\n if (didType) {\r\n this.editor.pushUndoStop();\r\n }\r\n const scrollState = StableEditorScrollState.capture(this.editor);\r\n this.editor.executeEdits('suggestController.additionalTextEdits.async', item.completion.additionalTextEdits.map(edit => EditOperation.replace(Range.lift(edit.range), edit.text)));\r\n scrollState.restoreRelativeVerticalPositionOfCursor(this.editor);\r\n if (didType || !(oldFlags & 2 /* NoAfterUndoStop */)) {\r\n this.editor.pushUndoStop();\r\n }\r\n return true;\r\n }).then(applied => {\r\n this._logService.trace('[suggest] async resolving of edits DONE (ms, applied?)', sw.elapsed(), applied);\r\n docListener.dispose();\r\n typeListener.dispose();\r\n }));\r\n }\r\n let { insertText } = item.completion;\r\n if (!(item.completion.insertTextRules & 4 /* InsertAsSnippet */)) {\r\n insertText = SnippetParser.escape(insertText);\r\n }\r\n SnippetController2.get(this.editor).insert(insertText, {\r\n overwriteBefore: info.overwriteBefore,\r\n overwriteAfter: info.overwriteAfter,\r\n undoStopBefore: false,\r\n undoStopAfter: false,\r\n adjustWhitespace: !(item.completion.insertTextRules & 1 /* KeepWhitespace */),\r\n clipboardText: event.model.clipboardText,\r\n overtypingCapturer: this._overtypingCapturer.value\r\n });\r\n if (!(flags & 2 /* NoAfterUndoStop */)) {\r\n this.editor.pushUndoStop();\r\n }\r\n if (!item.completion.command) {\r\n // done\r\n this.model.cancel();\r\n }\r\n else if (item.completion.command.id === TriggerSuggestAction.id) {\r\n // retigger\r\n this.model.trigger({ auto: true, shy: false }, true);\r\n }\r\n else {\r\n // exec command, done\r\n tasks.push(this._commandService.executeCommand(item.completion.command.id, ...(item.completion.command.arguments ? [...item.completion.command.arguments] : [])).catch(onUnexpectedError));\r\n this.model.cancel();\r\n }\r\n if (flags & 4 /* KeepAlternativeSuggestions */) {\r\n this._alternatives.value.set(event, next => {\r\n // cancel resolving of additional edits\r\n cts.cancel();\r\n // this is not so pretty. when inserting the 'next'\r\n // suggestion we undo until we are at the state at\r\n // which we were before inserting the previous suggestion...\r\n while (model.canUndo()) {\r\n if (modelVersionNow !== model.getAlternativeVersionId()) {\r\n model.undo();\r\n }\r\n this._insertSuggestion(next, 1 /* NoBeforeUndoStop */ | 2 /* NoAfterUndoStop */ | (flags & 8 /* AlternativeOverwriteConfig */ ? 8 /* AlternativeOverwriteConfig */ : 0));\r\n break;\r\n }\r\n });\r\n }\r\n this._alertCompletionItem(item);\r\n // clear only now - after all tasks are done\r\n Promise.all(tasks).finally(() => {\r\n this.model.clear();\r\n cts.dispose();\r\n });\r\n }\r\n getOverwriteInfo(item, toggleMode) {\r\n assertType(this.editor.hasModel());\r\n let replace = this.editor.getOption(101 /* suggest */).insertMode === 'replace';\r\n if (toggleMode) {\r\n replace = !replace;\r\n }\r\n const overwriteBefore = item.position.column - item.editStart.column;\r\n const overwriteAfter = (replace ? item.editReplaceEnd.column : item.editInsertEnd.column) - item.position.column;\r\n const columnDelta = this.editor.getPosition().column - item.position.column;\r\n const suffixDelta = this._lineSuffix.value ? this._lineSuffix.value.delta(this.editor.getPosition()) : 0;\r\n return {\r\n overwriteBefore: overwriteBefore + columnDelta,\r\n overwriteAfter: overwriteAfter + suffixDelta\r\n };\r\n }\r\n _alertCompletionItem({ completion: suggestion }) {\r\n const textLabel = typeof suggestion.label === 'string' ? suggestion.label : suggestion.label.name;\r\n if (isNonEmptyArray(suggestion.additionalTextEdits)) {\r\n let msg = nls.localize('aria.alert.snippet', \"Accepting '{0}' made {1} additional edits\", textLabel, suggestion.additionalTextEdits.length);\r\n alert(msg);\r\n }\r\n }\r\n triggerSuggest(onlyFrom) {\r\n if (this.editor.hasModel()) {\r\n this.model.trigger({ auto: false, shy: false }, false, onlyFrom);\r\n this.editor.revealLine(this.editor.getPosition().lineNumber, 0 /* Smooth */);\r\n this.editor.focus();\r\n }\r\n }\r\n triggerSuggestAndAcceptBest(arg) {\r\n if (!this.editor.hasModel()) {\r\n return;\r\n }\r\n const positionNow = this.editor.getPosition();\r\n const fallback = () => {\r\n if (positionNow.equals(this.editor.getPosition())) {\r\n this._commandService.executeCommand(arg.fallback);\r\n }\r\n };\r\n const makesTextEdit = (item) => {\r\n if (item.completion.insertTextRules & 4 /* InsertAsSnippet */ || item.completion.additionalTextEdits) {\r\n // snippet, other editor -> makes edit\r\n return true;\r\n }\r\n const position = this.editor.getPosition();\r\n const startColumn = item.editStart.column;\r\n const endColumn = position.column;\r\n if (endColumn - startColumn !== item.completion.insertText.length) {\r\n // unequal lengths -> makes edit\r\n return true;\r\n }\r\n const textNow = this.editor.getModel().getValueInRange({\r\n startLineNumber: position.lineNumber,\r\n startColumn,\r\n endLineNumber: position.lineNumber,\r\n endColumn\r\n });\r\n // unequal text -> makes edit\r\n return textNow !== item.completion.insertText;\r\n };\r\n Event.once(this.model.onDidTrigger)(_ => {\r\n // wait for trigger because only then the cancel-event is trustworthy\r\n let listener = [];\r\n Event.any(this.model.onDidTrigger, this.model.onDidCancel)(() => {\r\n // retrigger or cancel -> try to type default text\r\n dispose(listener);\r\n fallback();\r\n }, undefined, listener);\r\n this.model.onDidSuggest(({ completionModel }) => {\r\n dispose(listener);\r\n if (completionModel.items.length === 0) {\r\n fallback();\r\n return;\r\n }\r\n const index = this._memoryService.select(this.editor.getModel(), this.editor.getPosition(), completionModel.items);\r\n const item = completionModel.items[index];\r\n if (!makesTextEdit(item)) {\r\n fallback();\r\n return;\r\n }\r\n this.editor.pushUndoStop();\r\n this._insertSuggestion({ index, item, model: completionModel }, 4 /* KeepAlternativeSuggestions */ | 1 /* NoBeforeUndoStop */ | 2 /* NoAfterUndoStop */);\r\n }, undefined, listener);\r\n });\r\n this.model.trigger({ auto: false, shy: true });\r\n this.editor.revealLine(positionNow.lineNumber, 0 /* Smooth */);\r\n this.editor.focus();\r\n }\r\n acceptSelectedSuggestion(keepAlternativeSuggestions, alternativeOverwriteConfig) {\r\n const item = this.widget.value.getFocusedItem();\r\n let flags = 0;\r\n if (keepAlternativeSuggestions) {\r\n flags |= 4 /* KeepAlternativeSuggestions */;\r\n }\r\n if (alternativeOverwriteConfig) {\r\n flags |= 8 /* AlternativeOverwriteConfig */;\r\n }\r\n this._insertSuggestion(item, flags);\r\n }\r\n acceptNextSuggestion() {\r\n this._alternatives.value.next();\r\n }\r\n acceptPrevSuggestion() {\r\n this._alternatives.value.prev();\r\n }\r\n cancelSuggestWidget() {\r\n this.model.cancel();\r\n this.model.clear();\r\n this.widget.value.hideWidget();\r\n }\r\n selectNextSuggestion() {\r\n this.widget.value.selectNext();\r\n }\r\n selectNextPageSuggestion() {\r\n this.widget.value.selectNextPage();\r\n }\r\n selectLastSuggestion() {\r\n this.widget.value.selectLast();\r\n }\r\n selectPrevSuggestion() {\r\n this.widget.value.selectPrevious();\r\n }\r\n selectPrevPageSuggestion() {\r\n this.widget.value.selectPreviousPage();\r\n }\r\n selectFirstSuggestion() {\r\n this.widget.value.selectFirst();\r\n }\r\n toggleSuggestionDetails() {\r\n this.widget.value.toggleDetails();\r\n }\r\n toggleExplainMode() {\r\n this.widget.value.toggleExplainMode();\r\n }\r\n toggleSuggestionFocus() {\r\n this.widget.value.toggleDetailsFocus();\r\n }\r\n resetWidgetSize() {\r\n this.widget.value.resetPersistedSize();\r\n }\r\n};\r\nSuggestController.ID = 'editor.contrib.suggestController';\r\nSuggestController = __decorate([\r\n __param(1, ISuggestMemoryService),\r\n __param(2, ICommandService),\r\n __param(3, IContextKeyService),\r\n __param(4, IInstantiationService),\r\n __param(5, ILogService)\r\n], SuggestController);\r\nexport { SuggestController };\r\nexport class TriggerSuggestAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: TriggerSuggestAction.id,\r\n label: nls.localize('suggest.trigger.label', \"Trigger Suggest\"),\r\n alias: 'Trigger Suggest',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCompletionItemProvider),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 10 /* Space */,\r\n secondary: [2048 /* CtrlCmd */ | 39 /* KEY_I */],\r\n mac: { primary: 256 /* WinCtrl */ | 10 /* Space */, secondary: [512 /* Alt */ | 9 /* Escape */, 2048 /* CtrlCmd */ | 39 /* KEY_I */] },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const controller = SuggestController.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n controller.triggerSuggest();\r\n }\r\n}\r\nTriggerSuggestAction.id = 'editor.action.triggerSuggest';\r\nregisterEditorContribution(SuggestController.ID, SuggestController);\r\nregisterEditorAction(TriggerSuggestAction);\r\nconst weight = 100 /* EditorContrib */ + 90;\r\nconst SuggestCommand = EditorCommand.bindToContribution(SuggestController.get);\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'acceptSelectedSuggestion',\r\n precondition: SuggestContext.Visible,\r\n handler(x) {\r\n x.acceptSelectedSuggestion(true, false);\r\n }\r\n}));\r\n// normal tab\r\nKeybindingsRegistry.registerKeybindingRule({\r\n id: 'acceptSelectedSuggestion',\r\n when: ContextKeyExpr.and(SuggestContext.Visible, EditorContextKeys.textInputFocus),\r\n primary: 2 /* Tab */,\r\n weight\r\n});\r\n// accept on enter has special rules\r\nKeybindingsRegistry.registerKeybindingRule({\r\n id: 'acceptSelectedSuggestion',\r\n when: ContextKeyExpr.and(SuggestContext.Visible, EditorContextKeys.textInputFocus, SuggestContext.AcceptSuggestionsOnEnter, SuggestContext.MakesTextEdit),\r\n primary: 3 /* Enter */,\r\n weight,\r\n});\r\nMenuRegistry.appendMenuItem(suggestWidgetStatusbarMenu, {\r\n command: { id: 'acceptSelectedSuggestion', title: nls.localize('accept.insert', \"Insert\") },\r\n group: 'left',\r\n order: 1,\r\n when: SuggestContext.HasInsertAndReplaceRange.toNegated()\r\n});\r\nMenuRegistry.appendMenuItem(suggestWidgetStatusbarMenu, {\r\n command: { id: 'acceptSelectedSuggestion', title: nls.localize('accept.insert', \"Insert\") },\r\n group: 'left',\r\n order: 1,\r\n when: ContextKeyExpr.and(SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('insert'))\r\n});\r\nMenuRegistry.appendMenuItem(suggestWidgetStatusbarMenu, {\r\n command: { id: 'acceptSelectedSuggestion', title: nls.localize('accept.replace', \"Replace\") },\r\n group: 'left',\r\n order: 1,\r\n when: ContextKeyExpr.and(SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('replace'))\r\n});\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'acceptAlternativeSelectedSuggestion',\r\n precondition: ContextKeyExpr.and(SuggestContext.Visible, EditorContextKeys.textInputFocus),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 3 /* Enter */,\r\n secondary: [1024 /* Shift */ | 2 /* Tab */],\r\n },\r\n handler(x) {\r\n x.acceptSelectedSuggestion(false, true);\r\n },\r\n menuOpts: [{\r\n menuId: suggestWidgetStatusbarMenu,\r\n group: 'left',\r\n order: 2,\r\n when: ContextKeyExpr.and(SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('insert')),\r\n title: nls.localize('accept.replace', \"Replace\")\r\n }, {\r\n menuId: suggestWidgetStatusbarMenu,\r\n group: 'left',\r\n order: 2,\r\n when: ContextKeyExpr.and(SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('replace')),\r\n title: nls.localize('accept.insert', \"Insert\")\r\n }]\r\n}));\r\n// continue to support the old command\r\nCommandsRegistry.registerCommandAlias('acceptSelectedSuggestionOnEnter', 'acceptSelectedSuggestion');\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'hideSuggestWidget',\r\n precondition: SuggestContext.Visible,\r\n handler: x => x.cancelSuggestWidget(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'selectNextSuggestion',\r\n precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MultipleSuggestions),\r\n handler: c => c.selectNextSuggestion(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 18 /* DownArrow */,\r\n secondary: [2048 /* CtrlCmd */ | 18 /* DownArrow */],\r\n mac: { primary: 18 /* DownArrow */, secondary: [2048 /* CtrlCmd */ | 18 /* DownArrow */, 256 /* WinCtrl */ | 44 /* KEY_N */] }\r\n }\r\n}));\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'selectNextPageSuggestion',\r\n precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MultipleSuggestions),\r\n handler: c => c.selectNextPageSuggestion(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 12 /* PageDown */,\r\n secondary: [2048 /* CtrlCmd */ | 12 /* PageDown */]\r\n }\r\n}));\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'selectLastSuggestion',\r\n precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MultipleSuggestions),\r\n handler: c => c.selectLastSuggestion()\r\n}));\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'selectPrevSuggestion',\r\n precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MultipleSuggestions),\r\n handler: c => c.selectPrevSuggestion(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 16 /* UpArrow */,\r\n secondary: [2048 /* CtrlCmd */ | 16 /* UpArrow */],\r\n mac: { primary: 16 /* UpArrow */, secondary: [2048 /* CtrlCmd */ | 16 /* UpArrow */, 256 /* WinCtrl */ | 46 /* KEY_P */] }\r\n }\r\n}));\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'selectPrevPageSuggestion',\r\n precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MultipleSuggestions),\r\n handler: c => c.selectPrevPageSuggestion(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 11 /* PageUp */,\r\n secondary: [2048 /* CtrlCmd */ | 11 /* PageUp */]\r\n }\r\n}));\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'selectFirstSuggestion',\r\n precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MultipleSuggestions),\r\n handler: c => c.selectFirstSuggestion()\r\n}));\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'toggleSuggestionDetails',\r\n precondition: SuggestContext.Visible,\r\n handler: x => x.toggleSuggestionDetails(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 10 /* Space */,\r\n mac: { primary: 256 /* WinCtrl */ | 10 /* Space */ }\r\n },\r\n menuOpts: [{\r\n menuId: suggestWidgetStatusbarMenu,\r\n group: 'right',\r\n order: 1,\r\n when: ContextKeyExpr.and(SuggestContext.DetailsVisible, SuggestContext.CanResolve),\r\n title: nls.localize('detail.more', \"show less\")\r\n }, {\r\n menuId: suggestWidgetStatusbarMenu,\r\n group: 'right',\r\n order: 1,\r\n when: ContextKeyExpr.and(SuggestContext.DetailsVisible.toNegated(), SuggestContext.CanResolve),\r\n title: nls.localize('detail.less', \"show more\")\r\n }]\r\n}));\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'toggleExplainMode',\r\n precondition: SuggestContext.Visible,\r\n handler: x => x.toggleExplainMode(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */,\r\n primary: 2048 /* CtrlCmd */ | 85 /* US_SLASH */,\r\n }\r\n}));\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'toggleSuggestionFocus',\r\n precondition: SuggestContext.Visible,\r\n handler: x => x.toggleSuggestionFocus(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 512 /* Alt */ | 10 /* Space */,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 10 /* Space */ }\r\n }\r\n}));\r\n//#region tab completions\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'insertBestCompletion',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.equals('config.editor.tabCompletion', 'on'), WordContextKey.AtEnd, SuggestContext.Visible.toNegated(), SuggestAlternatives.OtherSuggestions.toNegated(), SnippetController2.InSnippetMode.toNegated()),\r\n handler: (x, arg) => {\r\n x.triggerSuggestAndAcceptBest(isObject(arg) ? Object.assign({ fallback: 'tab' }, arg) : { fallback: 'tab' });\r\n },\r\n kbOpts: {\r\n weight,\r\n primary: 2 /* Tab */\r\n }\r\n}));\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'insertNextSuggestion',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.equals('config.editor.tabCompletion', 'on'), SuggestAlternatives.OtherSuggestions, SuggestContext.Visible.toNegated(), SnippetController2.InSnippetMode.toNegated()),\r\n handler: x => x.acceptNextSuggestion(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 2 /* Tab */\r\n }\r\n}));\r\nregisterEditorCommand(new SuggestCommand({\r\n id: 'insertPrevSuggestion',\r\n precondition: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.equals('config.editor.tabCompletion', 'on'), SuggestAlternatives.OtherSuggestions, SuggestContext.Visible.toNegated(), SnippetController2.InSnippetMode.toNegated()),\r\n handler: x => x.acceptPrevSuggestion(),\r\n kbOpts: {\r\n weight: weight,\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 1024 /* Shift */ | 2 /* Tab */\r\n }\r\n}));\r\nregisterEditorAction(class extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.resetSuggestSize',\r\n label: nls.localize('suggest.reset.label', \"Reset Suggest Widget Size\"),\r\n alias: 'Reset Suggest Widget Size',\r\n precondition: undefined\r\n });\r\n }\r\n run(_accessor, editor) {\r\n SuggestController.get(editor).resetWidgetSize();\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../../nls.js';\r\nimport { EditorAction, registerEditorAction } from '../../browser/editorExtensions.js';\r\nimport { StopWatch } from '../../../base/common/stopwatch.js';\r\nclass ForceRetokenizeAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.forceRetokenize',\r\n label: nls.localize('forceRetokenize', \"Developer: Force Retokenize\"),\r\n alias: 'Developer: Force Retokenize',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const model = editor.getModel();\r\n model.resetTokenization();\r\n const sw = new StopWatch(true);\r\n model.forceTokenization(model.getLineCount());\r\n sw.stop();\r\n console.log(`tokenization took ${sw.elapsed()}`);\r\n }\r\n}\r\nregisterEditorAction(ForceRetokenizeAction);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../../nls.js';\r\nimport { alert } from '../../../base/browser/ui/aria/aria.js';\r\nimport { EditorAction, registerEditorAction } from '../../browser/editorExtensions.js';\r\nimport { TabFocus } from '../../common/config/commonEditorConfig.js';\r\nexport class ToggleTabFocusModeAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: ToggleTabFocusModeAction.ID,\r\n label: nls.localize({ key: 'toggle.tabMovesFocus', comment: ['Turn on/off use of tab key for moving focus around VS Code'] }, \"Toggle Tab Key Moves Focus\"),\r\n alias: 'Toggle Tab Key Moves Focus',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: null,\r\n primary: 2048 /* CtrlCmd */ | 43 /* KEY_M */,\r\n mac: { primary: 256 /* WinCtrl */ | 1024 /* Shift */ | 43 /* KEY_M */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const oldValue = TabFocus.getTabFocusMode();\r\n const newValue = !oldValue;\r\n TabFocus.setTabFocusMode(newValue);\r\n if (newValue) {\r\n alert(nls.localize('toggle.tabMovesFocus.on', \"Pressing Tab will now move focus to the next focusable element\"));\r\n }\r\n else {\r\n alert(nls.localize('toggle.tabMovesFocus.off', \"Pressing Tab will now insert the tab character\"));\r\n }\r\n }\r\n}\r\nToggleTabFocusModeAction.ID = 'editor.action.toggleTabFocusMode';\r\nregisterEditorAction(ToggleTabFocusModeAction);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { ICodeEditorService } from '../../browser/services/codeEditorService.js';\r\nimport { IDialogService } from '../../../platform/dialogs/common/dialogs.js';\r\nconst ignoreUnusualLineTerminators = 'ignoreUnusualLineTerminators';\r\nfunction writeIgnoreState(codeEditorService, model, state) {\r\n codeEditorService.setModelProperty(model.uri, ignoreUnusualLineTerminators, state);\r\n}\r\nfunction readIgnoreState(codeEditorService, model) {\r\n return codeEditorService.getModelProperty(model.uri, ignoreUnusualLineTerminators);\r\n}\r\nlet UnusualLineTerminatorsDetector = class UnusualLineTerminatorsDetector extends Disposable {\r\n constructor(_editor, _dialogService, _codeEditorService) {\r\n super();\r\n this._editor = _editor;\r\n this._dialogService = _dialogService;\r\n this._codeEditorService = _codeEditorService;\r\n this._config = this._editor.getOption(108 /* unusualLineTerminators */);\r\n this._register(this._editor.onDidChangeConfiguration((e) => {\r\n if (e.hasChanged(108 /* unusualLineTerminators */)) {\r\n this._config = this._editor.getOption(108 /* unusualLineTerminators */);\r\n this._checkForUnusualLineTerminators();\r\n }\r\n }));\r\n this._register(this._editor.onDidChangeModel(() => {\r\n this._checkForUnusualLineTerminators();\r\n }));\r\n this._register(this._editor.onDidChangeModelContent((e) => {\r\n if (e.isUndoing) {\r\n // skip checking in case of undoing\r\n return;\r\n }\r\n this._checkForUnusualLineTerminators();\r\n }));\r\n }\r\n _checkForUnusualLineTerminators() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (this._config === 'off') {\r\n return;\r\n }\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n if (!model.mightContainUnusualLineTerminators()) {\r\n return;\r\n }\r\n const ignoreState = readIgnoreState(this._codeEditorService, model);\r\n if (ignoreState === true) {\r\n // this model should be ignored\r\n return;\r\n }\r\n if (this._editor.getOption(75 /* readOnly */)) {\r\n // read only editor => sorry!\r\n return;\r\n }\r\n if (this._config === 'auto') {\r\n // just do it!\r\n model.removeUnusualLineTerminators(this._editor.getSelections());\r\n return;\r\n }\r\n const result = yield this._dialogService.confirm({\r\n title: nls.localize('unusualLineTerminators.title', \"Unusual Line Terminators\"),\r\n message: nls.localize('unusualLineTerminators.message', \"Detected unusual line terminators\"),\r\n detail: nls.localize('unusualLineTerminators.detail', \"This file contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\\n\\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.\"),\r\n primaryButton: nls.localize('unusualLineTerminators.fix', \"Fix this file\"),\r\n secondaryButton: nls.localize('unusualLineTerminators.ignore', \"Ignore problem for this file\")\r\n });\r\n if (!result.confirmed) {\r\n // this model should be ignored\r\n writeIgnoreState(this._codeEditorService, model, true);\r\n return;\r\n }\r\n model.removeUnusualLineTerminators(this._editor.getSelections());\r\n });\r\n }\r\n};\r\nUnusualLineTerminatorsDetector.ID = 'editor.contrib.unusualLineTerminatorsDetector';\r\nUnusualLineTerminatorsDetector = __decorate([\r\n __param(1, IDialogService),\r\n __param(2, ICodeEditorService)\r\n], UnusualLineTerminatorsDetector);\r\nregisterEditorContribution(UnusualLineTerminatorsDetector.ID, UnusualLineTerminatorsDetector);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { RunOnceScheduler, createCancelablePromise } from '../../../base/common/async.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { registerEditorContribution } from '../../browser/editorExtensions.js';\r\nimport { DocumentRangeSemanticTokensProviderRegistry } from '../../common/modes.js';\r\nimport { IModelService } from '../../common/services/modelService.js';\r\nimport { toMultilineTokens2 } from '../../common/services/semanticTokensProviderStyling.js';\r\nimport { IThemeService } from '../../../platform/theme/common/themeService.js';\r\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\r\nimport { isSemanticColoringEnabled, SEMANTIC_HIGHLIGHTING_SETTING_ID } from '../../common/services/modelServiceImpl.js';\r\nimport { getDocumentRangeSemanticTokensProvider } from '../../common/services/getSemanticTokens.js';\r\nlet ViewportSemanticTokensContribution = class ViewportSemanticTokensContribution extends Disposable {\r\n constructor(editor, _modelService, _themeService, _configurationService) {\r\n super();\r\n this._modelService = _modelService;\r\n this._themeService = _themeService;\r\n this._configurationService = _configurationService;\r\n this._editor = editor;\r\n this._tokenizeViewport = new RunOnceScheduler(() => this._tokenizeViewportNow(), 100);\r\n this._outstandingRequests = [];\r\n this._register(this._editor.onDidScrollChange(() => {\r\n this._tokenizeViewport.schedule();\r\n }));\r\n this._register(this._editor.onDidChangeModel(() => {\r\n this._cancelAll();\r\n this._tokenizeViewport.schedule();\r\n }));\r\n this._register(this._editor.onDidChangeModelContent((e) => {\r\n this._cancelAll();\r\n this._tokenizeViewport.schedule();\r\n }));\r\n this._register(DocumentRangeSemanticTokensProviderRegistry.onDidChange(() => {\r\n this._cancelAll();\r\n this._tokenizeViewport.schedule();\r\n }));\r\n this._register(this._configurationService.onDidChangeConfiguration(e => {\r\n if (e.affectsConfiguration(SEMANTIC_HIGHLIGHTING_SETTING_ID)) {\r\n this._cancelAll();\r\n this._tokenizeViewport.schedule();\r\n }\r\n }));\r\n this._register(this._themeService.onDidColorThemeChange(() => {\r\n this._cancelAll();\r\n this._tokenizeViewport.schedule();\r\n }));\r\n }\r\n _cancelAll() {\r\n for (const request of this._outstandingRequests) {\r\n request.cancel();\r\n }\r\n this._outstandingRequests = [];\r\n }\r\n _removeOutstandingRequest(req) {\r\n for (let i = 0, len = this._outstandingRequests.length; i < len; i++) {\r\n if (this._outstandingRequests[i] === req) {\r\n this._outstandingRequests.splice(i, 1);\r\n return;\r\n }\r\n }\r\n }\r\n _tokenizeViewportNow() {\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n const model = this._editor.getModel();\r\n if (model.hasCompleteSemanticTokens()) {\r\n return;\r\n }\r\n if (!isSemanticColoringEnabled(model, this._themeService, this._configurationService)) {\r\n if (model.hasSomeSemanticTokens()) {\r\n model.setSemanticTokens(null, false);\r\n }\r\n return;\r\n }\r\n const provider = getDocumentRangeSemanticTokensProvider(model);\r\n if (!provider) {\r\n if (model.hasSomeSemanticTokens()) {\r\n model.setSemanticTokens(null, false);\r\n }\r\n return;\r\n }\r\n const styling = this._modelService.getSemanticTokensProviderStyling(provider);\r\n const visibleRanges = this._editor.getVisibleRangesPlusViewportAboveBelow();\r\n this._outstandingRequests = this._outstandingRequests.concat(visibleRanges.map(range => this._requestRange(model, range, provider, styling)));\r\n }\r\n _requestRange(model, range, provider, styling) {\r\n const requestVersionId = model.getVersionId();\r\n const request = createCancelablePromise(token => Promise.resolve(provider.provideDocumentRangeSemanticTokens(model, range, token)));\r\n request.then((r) => {\r\n if (!r || model.isDisposed() || model.getVersionId() !== requestVersionId) {\r\n return;\r\n }\r\n model.setPartialSemanticTokens(range, toMultilineTokens2(r, styling, model.getLanguageIdentifier()));\r\n }).then(() => this._removeOutstandingRequest(request), () => this._removeOutstandingRequest(request));\r\n return request;\r\n }\r\n};\r\nViewportSemanticTokensContribution.ID = 'editor.contrib.viewportSemanticTokens';\r\nViewportSemanticTokensContribution = __decorate([\r\n __param(1, IModelService),\r\n __param(2, IThemeService),\r\n __param(3, IConfigurationService)\r\n], ViewportSemanticTokensContribution);\r\nregisterEditorContribution(ViewportSemanticTokensContribution.ID, ViewportSemanticTokensContribution);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport * as arrays from '../../../base/common/arrays.js';\r\nimport { createCancelablePromise, first, timeout } from '../../../base/common/async.js';\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { onUnexpectedError, onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport { Disposable, DisposableStore } from '../../../base/common/lifecycle.js';\r\nimport { EditorAction, registerEditorAction, registerEditorContribution, registerModelAndPositionCommand } from '../../browser/editorExtensions.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { OverviewRulerLane } from '../../common/model.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { DocumentHighlightKind, DocumentHighlightProviderRegistry } from '../../common/modes.js';\r\nimport { IContextKeyService, RawContextKey } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { activeContrastBorder, editorSelectionHighlight, editorSelectionHighlightBorder, overviewRulerSelectionHighlightForeground, registerColor } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant, themeColorFromId } from '../../../platform/theme/common/themeService.js';\r\nimport { alert } from '../../../base/browser/ui/aria/aria.js';\r\nconst editorWordHighlight = registerColor('editor.wordHighlightBackground', { dark: '#575757B8', light: '#57575740', hc: null }, nls.localize('wordHighlight', 'Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst editorWordHighlightStrong = registerColor('editor.wordHighlightStrongBackground', { dark: '#004972B8', light: '#0e639c40', hc: null }, nls.localize('wordHighlightStrong', 'Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst editorWordHighlightBorder = registerColor('editor.wordHighlightBorder', { light: null, dark: null, hc: activeContrastBorder }, nls.localize('wordHighlightBorder', 'Border color of a symbol during read-access, like reading a variable.'));\r\nconst editorWordHighlightStrongBorder = registerColor('editor.wordHighlightStrongBorder', { light: null, dark: null, hc: activeContrastBorder }, nls.localize('wordHighlightStrongBorder', 'Border color of a symbol during write-access, like writing to a variable.'));\r\nconst overviewRulerWordHighlightForeground = registerColor('editorOverviewRuler.wordHighlightForeground', { dark: '#A0A0A0CC', light: '#A0A0A0CC', hc: '#A0A0A0CC' }, nls.localize('overviewRulerWordHighlightForeground', 'Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst overviewRulerWordHighlightStrongForeground = registerColor('editorOverviewRuler.wordHighlightStrongForeground', { dark: '#C0A0C0CC', light: '#C0A0C0CC', hc: '#C0A0C0CC' }, nls.localize('overviewRulerWordHighlightStrongForeground', 'Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations.'), true);\r\nconst ctxHasWordHighlights = new RawContextKey('hasWordHighlights', false);\r\nexport function getOccurrencesAtPosition(model, position, token) {\r\n const orderedByScore = DocumentHighlightProviderRegistry.ordered(model);\r\n // in order of score ask the occurrences provider\r\n // until someone response with a good result\r\n // (good = none empty array)\r\n return first(orderedByScore.map(provider => () => {\r\n return Promise.resolve(provider.provideDocumentHighlights(model, position, token))\r\n .then(undefined, onUnexpectedExternalError);\r\n }), arrays.isNonEmptyArray);\r\n}\r\nclass OccurenceAtPositionRequest {\r\n constructor(model, selection, wordSeparators) {\r\n this._wordRange = this._getCurrentWordRange(model, selection);\r\n this.result = createCancelablePromise(token => this._compute(model, selection, wordSeparators, token));\r\n }\r\n _getCurrentWordRange(model, selection) {\r\n const word = model.getWordAtPosition(selection.getPosition());\r\n if (word) {\r\n return new Range(selection.startLineNumber, word.startColumn, selection.startLineNumber, word.endColumn);\r\n }\r\n return null;\r\n }\r\n isValid(model, selection, decorationIds) {\r\n const lineNumber = selection.startLineNumber;\r\n const startColumn = selection.startColumn;\r\n const endColumn = selection.endColumn;\r\n const currentWordRange = this._getCurrentWordRange(model, selection);\r\n let requestIsValid = Boolean(this._wordRange && this._wordRange.equalsRange(currentWordRange));\r\n // Even if we are on a different word, if that word is in the decorations ranges, the request is still valid\r\n // (Same symbol)\r\n for (let i = 0, len = decorationIds.length; !requestIsValid && i < len; i++) {\r\n let range = model.getDecorationRange(decorationIds[i]);\r\n if (range && range.startLineNumber === lineNumber) {\r\n if (range.startColumn <= startColumn && range.endColumn >= endColumn) {\r\n requestIsValid = true;\r\n }\r\n }\r\n }\r\n return requestIsValid;\r\n }\r\n cancel() {\r\n this.result.cancel();\r\n }\r\n}\r\nclass SemanticOccurenceAtPositionRequest extends OccurenceAtPositionRequest {\r\n _compute(model, selection, wordSeparators, token) {\r\n return getOccurrencesAtPosition(model, selection.getPosition(), token).then(value => value || []);\r\n }\r\n}\r\nclass TextualOccurenceAtPositionRequest extends OccurenceAtPositionRequest {\r\n constructor(model, selection, wordSeparators) {\r\n super(model, selection, wordSeparators);\r\n this._selectionIsEmpty = selection.isEmpty();\r\n }\r\n _compute(model, selection, wordSeparators, token) {\r\n return timeout(250, token).then(() => {\r\n if (!selection.isEmpty()) {\r\n return [];\r\n }\r\n const word = model.getWordAtPosition(selection.getPosition());\r\n if (!word || word.word.length > 1000) {\r\n return [];\r\n }\r\n const matches = model.findMatches(word.word, true, false, true, wordSeparators, false);\r\n return matches.map(m => {\r\n return {\r\n range: m.range,\r\n kind: DocumentHighlightKind.Text\r\n };\r\n });\r\n });\r\n }\r\n isValid(model, selection, decorationIds) {\r\n const currentSelectionIsEmpty = selection.isEmpty();\r\n if (this._selectionIsEmpty !== currentSelectionIsEmpty) {\r\n return false;\r\n }\r\n return super.isValid(model, selection, decorationIds);\r\n }\r\n}\r\nfunction computeOccurencesAtPosition(model, selection, wordSeparators) {\r\n if (DocumentHighlightProviderRegistry.has(model)) {\r\n return new SemanticOccurenceAtPositionRequest(model, selection, wordSeparators);\r\n }\r\n return new TextualOccurenceAtPositionRequest(model, selection, wordSeparators);\r\n}\r\nregisterModelAndPositionCommand('_executeDocumentHighlights', (model, position) => getOccurrencesAtPosition(model, position, CancellationToken.None));\r\nclass WordHighlighter {\r\n constructor(editor, contextKeyService) {\r\n this.toUnhook = new DisposableStore();\r\n this.workerRequestTokenId = 0;\r\n this.workerRequestCompleted = false;\r\n this.workerRequestValue = [];\r\n this.lastCursorPositionChangeTime = 0;\r\n this.renderDecorationsTimer = -1;\r\n this.editor = editor;\r\n this._hasWordHighlights = ctxHasWordHighlights.bindTo(contextKeyService);\r\n this._ignorePositionChangeEvent = false;\r\n this.occurrencesHighlight = this.editor.getOption(66 /* occurrencesHighlight */);\r\n this.model = this.editor.getModel();\r\n this.toUnhook.add(editor.onDidChangeCursorPosition((e) => {\r\n if (this._ignorePositionChangeEvent) {\r\n // We are changing the position => ignore this event\r\n return;\r\n }\r\n if (!this.occurrencesHighlight) {\r\n // Early exit if nothing needs to be done!\r\n // Leave some form of early exit check here if you wish to continue being a cursor position change listener ;)\r\n return;\r\n }\r\n this._onPositionChanged(e);\r\n }));\r\n this.toUnhook.add(editor.onDidChangeModelContent((e) => {\r\n this._stopAll();\r\n }));\r\n this.toUnhook.add(editor.onDidChangeConfiguration((e) => {\r\n let newValue = this.editor.getOption(66 /* occurrencesHighlight */);\r\n if (this.occurrencesHighlight !== newValue) {\r\n this.occurrencesHighlight = newValue;\r\n this._stopAll();\r\n }\r\n }));\r\n this._decorationIds = [];\r\n this.workerRequestTokenId = 0;\r\n this.workerRequest = null;\r\n this.workerRequestCompleted = false;\r\n this.lastCursorPositionChangeTime = 0;\r\n this.renderDecorationsTimer = -1;\r\n }\r\n hasDecorations() {\r\n return (this._decorationIds.length > 0);\r\n }\r\n restore() {\r\n if (!this.occurrencesHighlight) {\r\n return;\r\n }\r\n this._run();\r\n }\r\n _getSortedHighlights() {\r\n return arrays.coalesce(this._decorationIds\r\n .map((id) => this.model.getDecorationRange(id))\r\n .sort(Range.compareRangesUsingStarts));\r\n }\r\n moveNext() {\r\n let highlights = this._getSortedHighlights();\r\n let index = highlights.findIndex((range) => range.containsPosition(this.editor.getPosition()));\r\n let newIndex = ((index + 1) % highlights.length);\r\n let dest = highlights[newIndex];\r\n try {\r\n this._ignorePositionChangeEvent = true;\r\n this.editor.setPosition(dest.getStartPosition());\r\n this.editor.revealRangeInCenterIfOutsideViewport(dest);\r\n const word = this._getWord();\r\n if (word) {\r\n const lineContent = this.editor.getModel().getLineContent(dest.startLineNumber);\r\n alert(`${lineContent}, ${newIndex + 1} of ${highlights.length} for '${word.word}'`);\r\n }\r\n }\r\n finally {\r\n this._ignorePositionChangeEvent = false;\r\n }\r\n }\r\n moveBack() {\r\n let highlights = this._getSortedHighlights();\r\n let index = highlights.findIndex((range) => range.containsPosition(this.editor.getPosition()));\r\n let newIndex = ((index - 1 + highlights.length) % highlights.length);\r\n let dest = highlights[newIndex];\r\n try {\r\n this._ignorePositionChangeEvent = true;\r\n this.editor.setPosition(dest.getStartPosition());\r\n this.editor.revealRangeInCenterIfOutsideViewport(dest);\r\n const word = this._getWord();\r\n if (word) {\r\n const lineContent = this.editor.getModel().getLineContent(dest.startLineNumber);\r\n alert(`${lineContent}, ${newIndex + 1} of ${highlights.length} for '${word.word}'`);\r\n }\r\n }\r\n finally {\r\n this._ignorePositionChangeEvent = false;\r\n }\r\n }\r\n _removeDecorations() {\r\n if (this._decorationIds.length > 0) {\r\n // remove decorations\r\n this._decorationIds = this.editor.deltaDecorations(this._decorationIds, []);\r\n this._hasWordHighlights.set(false);\r\n }\r\n }\r\n _stopAll() {\r\n // Remove any existing decorations\r\n this._removeDecorations();\r\n // Cancel any renderDecorationsTimer\r\n if (this.renderDecorationsTimer !== -1) {\r\n clearTimeout(this.renderDecorationsTimer);\r\n this.renderDecorationsTimer = -1;\r\n }\r\n // Cancel any worker request\r\n if (this.workerRequest !== null) {\r\n this.workerRequest.cancel();\r\n this.workerRequest = null;\r\n }\r\n // Invalidate any worker request callback\r\n if (!this.workerRequestCompleted) {\r\n this.workerRequestTokenId++;\r\n this.workerRequestCompleted = true;\r\n }\r\n }\r\n _onPositionChanged(e) {\r\n // disabled\r\n if (!this.occurrencesHighlight) {\r\n this._stopAll();\r\n return;\r\n }\r\n // ignore typing & other\r\n if (e.reason !== 3 /* Explicit */) {\r\n this._stopAll();\r\n return;\r\n }\r\n this._run();\r\n }\r\n _getWord() {\r\n let editorSelection = this.editor.getSelection();\r\n let lineNumber = editorSelection.startLineNumber;\r\n let startColumn = editorSelection.startColumn;\r\n return this.model.getWordAtPosition({\r\n lineNumber: lineNumber,\r\n column: startColumn\r\n });\r\n }\r\n _run() {\r\n let editorSelection = this.editor.getSelection();\r\n // ignore multiline selection\r\n if (editorSelection.startLineNumber !== editorSelection.endLineNumber) {\r\n this._stopAll();\r\n return;\r\n }\r\n let startColumn = editorSelection.startColumn;\r\n let endColumn = editorSelection.endColumn;\r\n const word = this._getWord();\r\n // The selection must be inside a word or surround one word at most\r\n if (!word || word.startColumn > startColumn || word.endColumn < endColumn) {\r\n this._stopAll();\r\n return;\r\n }\r\n // All the effort below is trying to achieve this:\r\n // - when cursor is moved to a word, trigger immediately a findOccurrences request\r\n // - 250ms later after the last cursor move event, render the occurrences\r\n // - no flickering!\r\n const workerRequestIsValid = (this.workerRequest && this.workerRequest.isValid(this.model, editorSelection, this._decorationIds));\r\n // There are 4 cases:\r\n // a) old workerRequest is valid & completed, renderDecorationsTimer fired\r\n // b) old workerRequest is valid & completed, renderDecorationsTimer not fired\r\n // c) old workerRequest is valid, but not completed\r\n // d) old workerRequest is not valid\r\n // For a) no action is needed\r\n // For c), member 'lastCursorPositionChangeTime' will be used when installing the timer so no action is needed\r\n this.lastCursorPositionChangeTime = (new Date()).getTime();\r\n if (workerRequestIsValid) {\r\n if (this.workerRequestCompleted && this.renderDecorationsTimer !== -1) {\r\n // case b)\r\n // Delay the firing of renderDecorationsTimer by an extra 250 ms\r\n clearTimeout(this.renderDecorationsTimer);\r\n this.renderDecorationsTimer = -1;\r\n this._beginRenderDecorations();\r\n }\r\n }\r\n else {\r\n // case d)\r\n // Stop all previous actions and start fresh\r\n this._stopAll();\r\n let myRequestId = ++this.workerRequestTokenId;\r\n this.workerRequestCompleted = false;\r\n this.workerRequest = computeOccurencesAtPosition(this.model, this.editor.getSelection(), this.editor.getOption(110 /* wordSeparators */));\r\n this.workerRequest.result.then(data => {\r\n if (myRequestId === this.workerRequestTokenId) {\r\n this.workerRequestCompleted = true;\r\n this.workerRequestValue = data || [];\r\n this._beginRenderDecorations();\r\n }\r\n }, onUnexpectedError);\r\n }\r\n }\r\n _beginRenderDecorations() {\r\n let currentTime = (new Date()).getTime();\r\n let minimumRenderTime = this.lastCursorPositionChangeTime + 250;\r\n if (currentTime >= minimumRenderTime) {\r\n // Synchronous\r\n this.renderDecorationsTimer = -1;\r\n this.renderDecorations();\r\n }\r\n else {\r\n // Asynchronous\r\n this.renderDecorationsTimer = setTimeout(() => {\r\n this.renderDecorations();\r\n }, (minimumRenderTime - currentTime));\r\n }\r\n }\r\n renderDecorations() {\r\n this.renderDecorationsTimer = -1;\r\n let decorations = [];\r\n for (const info of this.workerRequestValue) {\r\n if (info.range) {\r\n decorations.push({\r\n range: info.range,\r\n options: WordHighlighter._getDecorationOptions(info.kind)\r\n });\r\n }\r\n }\r\n this._decorationIds = this.editor.deltaDecorations(this._decorationIds, decorations);\r\n this._hasWordHighlights.set(this.hasDecorations());\r\n }\r\n static _getDecorationOptions(kind) {\r\n if (kind === DocumentHighlightKind.Write) {\r\n return this._WRITE_OPTIONS;\r\n }\r\n else if (kind === DocumentHighlightKind.Text) {\r\n return this._TEXT_OPTIONS;\r\n }\r\n else {\r\n return this._REGULAR_OPTIONS;\r\n }\r\n }\r\n dispose() {\r\n this._stopAll();\r\n this.toUnhook.dispose();\r\n }\r\n}\r\nWordHighlighter._WRITE_OPTIONS = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'wordHighlightStrong',\r\n overviewRuler: {\r\n color: themeColorFromId(overviewRulerWordHighlightStrongForeground),\r\n position: OverviewRulerLane.Center\r\n }\r\n});\r\nWordHighlighter._TEXT_OPTIONS = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'selectionHighlight',\r\n overviewRuler: {\r\n color: themeColorFromId(overviewRulerSelectionHighlightForeground),\r\n position: OverviewRulerLane.Center\r\n }\r\n});\r\nWordHighlighter._REGULAR_OPTIONS = ModelDecorationOptions.register({\r\n stickiness: 1 /* NeverGrowsWhenTypingAtEdges */,\r\n className: 'wordHighlight',\r\n overviewRuler: {\r\n color: themeColorFromId(overviewRulerWordHighlightForeground),\r\n position: OverviewRulerLane.Center\r\n }\r\n});\r\nlet WordHighlighterContribution = class WordHighlighterContribution extends Disposable {\r\n constructor(editor, contextKeyService) {\r\n super();\r\n this.wordHighlighter = null;\r\n const createWordHighlighterIfPossible = () => {\r\n if (editor.hasModel()) {\r\n this.wordHighlighter = new WordHighlighter(editor, contextKeyService);\r\n }\r\n };\r\n this._register(editor.onDidChangeModel((e) => {\r\n if (this.wordHighlighter) {\r\n this.wordHighlighter.dispose();\r\n this.wordHighlighter = null;\r\n }\r\n createWordHighlighterIfPossible();\r\n }));\r\n createWordHighlighterIfPossible();\r\n }\r\n static get(editor) {\r\n return editor.getContribution(WordHighlighterContribution.ID);\r\n }\r\n saveViewState() {\r\n if (this.wordHighlighter && this.wordHighlighter.hasDecorations()) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n moveNext() {\r\n if (this.wordHighlighter) {\r\n this.wordHighlighter.moveNext();\r\n }\r\n }\r\n moveBack() {\r\n if (this.wordHighlighter) {\r\n this.wordHighlighter.moveBack();\r\n }\r\n }\r\n restoreViewState(state) {\r\n if (this.wordHighlighter && state) {\r\n this.wordHighlighter.restore();\r\n }\r\n }\r\n dispose() {\r\n if (this.wordHighlighter) {\r\n this.wordHighlighter.dispose();\r\n this.wordHighlighter = null;\r\n }\r\n super.dispose();\r\n }\r\n};\r\nWordHighlighterContribution.ID = 'editor.contrib.wordHighlighter';\r\nWordHighlighterContribution = __decorate([\r\n __param(1, IContextKeyService)\r\n], WordHighlighterContribution);\r\nclass WordHighlightNavigationAction extends EditorAction {\r\n constructor(next, opts) {\r\n super(opts);\r\n this._isNext = next;\r\n }\r\n run(accessor, editor) {\r\n const controller = WordHighlighterContribution.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n if (this._isNext) {\r\n controller.moveNext();\r\n }\r\n else {\r\n controller.moveBack();\r\n }\r\n }\r\n}\r\nclass NextWordHighlightAction extends WordHighlightNavigationAction {\r\n constructor() {\r\n super(true, {\r\n id: 'editor.action.wordHighlight.next',\r\n label: nls.localize('wordHighlight.next.label', \"Go to Next Symbol Highlight\"),\r\n alias: 'Go to Next Symbol Highlight',\r\n precondition: ctxHasWordHighlights,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 65 /* F7 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass PrevWordHighlightAction extends WordHighlightNavigationAction {\r\n constructor() {\r\n super(false, {\r\n id: 'editor.action.wordHighlight.prev',\r\n label: nls.localize('wordHighlight.previous.label', \"Go to Previous Symbol Highlight\"),\r\n alias: 'Go to Previous Symbol Highlight',\r\n precondition: ctxHasWordHighlights,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 1024 /* Shift */ | 65 /* F7 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nclass TriggerWordHighlightAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.wordHighlight.trigger',\r\n label: nls.localize('wordHighlight.trigger.label', \"Trigger Symbol Highlight\"),\r\n alias: 'Trigger Symbol Highlight',\r\n precondition: ctxHasWordHighlights.toNegated(),\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.editorTextFocus,\r\n primary: 0,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n const controller = WordHighlighterContribution.get(editor);\r\n if (!controller) {\r\n return;\r\n }\r\n controller.restoreViewState(true);\r\n }\r\n}\r\nregisterEditorContribution(WordHighlighterContribution.ID, WordHighlighterContribution);\r\nregisterEditorAction(NextWordHighlightAction);\r\nregisterEditorAction(PrevWordHighlightAction);\r\nregisterEditorAction(TriggerWordHighlightAction);\r\nregisterThemingParticipant((theme, collector) => {\r\n const selectionHighlight = theme.getColor(editorSelectionHighlight);\r\n if (selectionHighlight) {\r\n collector.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${selectionHighlight}; }`);\r\n collector.addRule(`.monaco-editor .selectionHighlight { background-color: ${selectionHighlight.transparent(0.5)}; }`);\r\n }\r\n const wordHighlight = theme.getColor(editorWordHighlight);\r\n if (wordHighlight) {\r\n collector.addRule(`.monaco-editor .wordHighlight { background-color: ${wordHighlight}; }`);\r\n }\r\n const wordHighlightStrong = theme.getColor(editorWordHighlightStrong);\r\n if (wordHighlightStrong) {\r\n collector.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${wordHighlightStrong}; }`);\r\n }\r\n const selectionHighlightBorder = theme.getColor(editorSelectionHighlightBorder);\r\n if (selectionHighlightBorder) {\r\n collector.addRule(`.monaco-editor .selectionHighlight { border: 1px ${theme.type === 'hc' ? 'dotted' : 'solid'} ${selectionHighlightBorder}; box-sizing: border-box; }`);\r\n }\r\n const wordHighlightBorder = theme.getColor(editorWordHighlightBorder);\r\n if (wordHighlightBorder) {\r\n collector.addRule(`.monaco-editor .wordHighlight { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${wordHighlightBorder}; box-sizing: border-box; }`);\r\n }\r\n const wordHighlightStrongBorder = theme.getColor(editorWordHighlightStrongBorder);\r\n if (wordHighlightStrongBorder) {\r\n collector.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${wordHighlightStrongBorder}; box-sizing: border-box; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../../nls.js';\r\nimport { EditorCommand, registerEditorCommand, EditorAction, registerEditorAction } from '../../browser/editorExtensions.js';\r\nimport { ReplaceCommand } from '../../common/commands/replaceCommand.js';\r\nimport { CursorState } from '../../common/controller/cursorCommon.js';\r\nimport { WordOperations } from '../../common/controller/cursorWordOperations.js';\r\nimport { getMapForWordSeparators } from '../../common/controller/wordCharacterClassifier.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Selection } from '../../common/core/selection.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from '../../../platform/accessibility/common/accessibility.js';\r\nimport { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { EditorOptions } from '../../common/config/editorOptions.js';\r\nimport { LanguageConfigurationRegistry } from '../../common/modes/languageConfigurationRegistry.js';\r\nexport class MoveWordCommand extends EditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._inSelectionMode = opts.inSelectionMode;\r\n this._wordNavigationType = opts.wordNavigationType;\r\n }\r\n runEditorCommand(accessor, editor, args) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const wordSeparators = getMapForWordSeparators(editor.getOption(110 /* wordSeparators */));\r\n const model = editor.getModel();\r\n const selections = editor.getSelections();\r\n const result = selections.map((sel) => {\r\n const inPosition = new Position(sel.positionLineNumber, sel.positionColumn);\r\n const outPosition = this._move(wordSeparators, model, inPosition, this._wordNavigationType);\r\n return this._moveTo(sel, outPosition, this._inSelectionMode);\r\n });\r\n model.pushStackElement();\r\n editor._getViewModel().setCursorStates('moveWordCommand', 3 /* Explicit */, result.map(r => CursorState.fromModelSelection(r)));\r\n if (result.length === 1) {\r\n const pos = new Position(result[0].positionLineNumber, result[0].positionColumn);\r\n editor.revealPosition(pos, 0 /* Smooth */);\r\n }\r\n }\r\n _moveTo(from, to, inSelectionMode) {\r\n if (inSelectionMode) {\r\n // move just position\r\n return new Selection(from.selectionStartLineNumber, from.selectionStartColumn, to.lineNumber, to.column);\r\n }\r\n else {\r\n // move everything\r\n return new Selection(to.lineNumber, to.column, to.lineNumber, to.column);\r\n }\r\n }\r\n}\r\nexport class WordLeftCommand extends MoveWordCommand {\r\n _move(wordSeparators, model, position, wordNavigationType) {\r\n return WordOperations.moveWordLeft(wordSeparators, model, position, wordNavigationType);\r\n }\r\n}\r\nexport class WordRightCommand extends MoveWordCommand {\r\n _move(wordSeparators, model, position, wordNavigationType) {\r\n return WordOperations.moveWordRight(wordSeparators, model, position, wordNavigationType);\r\n }\r\n}\r\nexport class CursorWordStartLeft extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'cursorWordStartLeft',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nexport class CursorWordEndLeft extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordEndLeft',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nexport class CursorWordLeft extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 1 /* WordStartFast */,\r\n id: 'cursorWordLeft',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 15 /* LeftArrow */,\r\n mac: { primary: 512 /* Alt */ | 15 /* LeftArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nexport class CursorWordStartLeftSelect extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'cursorWordStartLeftSelect',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nexport class CursorWordEndLeftSelect extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordEndLeftSelect',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nexport class CursorWordLeftSelect extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 1 /* WordStartFast */,\r\n id: 'cursorWordLeftSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 15 /* LeftArrow */,\r\n mac: { primary: 512 /* Alt */ | 1024 /* Shift */ | 15 /* LeftArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\n// Accessibility navigation commands should only be enabled on windows since they are tuned to what NVDA expects\r\nexport class CursorWordAccessibilityLeft extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 3 /* WordAccessibility */,\r\n id: 'cursorWordAccessibilityLeft',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, CONTEXT_ACCESSIBILITY_MODE_ENABLED),\r\n win: { primary: 2048 /* CtrlCmd */ | 15 /* LeftArrow */ },\r\n weight: 100 /* EditorContrib */ + 1\r\n }\r\n });\r\n }\r\n _move(_, model, position, wordNavigationType) {\r\n return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType);\r\n }\r\n}\r\nexport class CursorWordAccessibilityLeftSelect extends WordLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 3 /* WordAccessibility */,\r\n id: 'cursorWordAccessibilityLeftSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, CONTEXT_ACCESSIBILITY_MODE_ENABLED),\r\n win: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 15 /* LeftArrow */ },\r\n weight: 100 /* EditorContrib */ + 1\r\n }\r\n });\r\n }\r\n _move(_, model, position, wordNavigationType) {\r\n return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType);\r\n }\r\n}\r\nexport class CursorWordStartRight extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'cursorWordStartRight',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nexport class CursorWordEndRight extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordEndRight',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 17 /* RightArrow */,\r\n mac: { primary: 512 /* Alt */ | 17 /* RightArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nexport class CursorWordRight extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordRight',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nexport class CursorWordStartRightSelect extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'cursorWordStartRightSelect',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nexport class CursorWordEndRightSelect extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordEndRightSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 17 /* RightArrow */,\r\n mac: { primary: 512 /* Alt */ | 1024 /* Shift */ | 17 /* RightArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nexport class CursorWordRightSelect extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordRightSelect',\r\n precondition: undefined\r\n });\r\n }\r\n}\r\nexport class CursorWordAccessibilityRight extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 3 /* WordAccessibility */,\r\n id: 'cursorWordAccessibilityRight',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, CONTEXT_ACCESSIBILITY_MODE_ENABLED),\r\n win: { primary: 2048 /* CtrlCmd */ | 17 /* RightArrow */ },\r\n weight: 100 /* EditorContrib */ + 1\r\n }\r\n });\r\n }\r\n _move(_, model, position, wordNavigationType) {\r\n return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType);\r\n }\r\n}\r\nexport class CursorWordAccessibilityRightSelect extends WordRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 3 /* WordAccessibility */,\r\n id: 'cursorWordAccessibilityRightSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, CONTEXT_ACCESSIBILITY_MODE_ENABLED),\r\n win: { primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 17 /* RightArrow */ },\r\n weight: 100 /* EditorContrib */ + 1\r\n }\r\n });\r\n }\r\n _move(_, model, position, wordNavigationType) {\r\n return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType);\r\n }\r\n}\r\nexport class DeleteWordCommand extends EditorCommand {\r\n constructor(opts) {\r\n super(opts);\r\n this._whitespaceHeuristics = opts.whitespaceHeuristics;\r\n this._wordNavigationType = opts.wordNavigationType;\r\n }\r\n runEditorCommand(accessor, editor, args) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const wordSeparators = getMapForWordSeparators(editor.getOption(110 /* wordSeparators */));\r\n const model = editor.getModel();\r\n const selections = editor.getSelections();\r\n const autoClosingBrackets = editor.getOption(5 /* autoClosingBrackets */);\r\n const autoClosingQuotes = editor.getOption(7 /* autoClosingQuotes */);\r\n const autoClosingPairs = LanguageConfigurationRegistry.getAutoClosingPairs(model.getLanguageIdentifier().id);\r\n const commands = selections.map((sel) => {\r\n const deleteRange = this._delete({\r\n wordSeparators,\r\n model,\r\n selection: sel,\r\n whitespaceHeuristics: this._whitespaceHeuristics,\r\n autoClosingBrackets,\r\n autoClosingQuotes,\r\n autoClosingPairs,\r\n }, this._wordNavigationType);\r\n return new ReplaceCommand(deleteRange, '');\r\n });\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nexport class DeleteWordLeftCommand extends DeleteWordCommand {\r\n _delete(ctx, wordNavigationType) {\r\n let r = WordOperations.deleteWordLeft(ctx, wordNavigationType);\r\n if (r) {\r\n return r;\r\n }\r\n return new Range(1, 1, 1, 1);\r\n }\r\n}\r\nexport class DeleteWordRightCommand extends DeleteWordCommand {\r\n _delete(ctx, wordNavigationType) {\r\n let r = WordOperations.deleteWordRight(ctx, wordNavigationType);\r\n if (r) {\r\n return r;\r\n }\r\n const lineCount = ctx.model.getLineCount();\r\n const maxColumn = ctx.model.getLineMaxColumn(lineCount);\r\n return new Range(lineCount, maxColumn, lineCount, maxColumn);\r\n }\r\n}\r\nexport class DeleteWordStartLeft extends DeleteWordLeftCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: false,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'deleteWordStartLeft',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nexport class DeleteWordEndLeft extends DeleteWordLeftCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: false,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'deleteWordEndLeft',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nexport class DeleteWordLeft extends DeleteWordLeftCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: true,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'deleteWordLeft',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 1 /* Backspace */,\r\n mac: { primary: 512 /* Alt */ | 1 /* Backspace */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nexport class DeleteWordStartRight extends DeleteWordRightCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: false,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'deleteWordStartRight',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nexport class DeleteWordEndRight extends DeleteWordRightCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: false,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'deleteWordEndRight',\r\n precondition: EditorContextKeys.writable\r\n });\r\n }\r\n}\r\nexport class DeleteWordRight extends DeleteWordRightCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: true,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'deleteWordRight',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 2048 /* CtrlCmd */ | 20 /* Delete */,\r\n mac: { primary: 512 /* Alt */ | 20 /* Delete */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nexport class DeleteInsideWord extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'deleteInsideWord',\r\n precondition: EditorContextKeys.writable,\r\n label: nls.localize('deleteInsideWord', \"Delete Word\"),\r\n alias: 'Delete Word'\r\n });\r\n }\r\n run(accessor, editor, args) {\r\n if (!editor.hasModel()) {\r\n return;\r\n }\r\n const wordSeparators = getMapForWordSeparators(editor.getOption(110 /* wordSeparators */));\r\n const model = editor.getModel();\r\n const selections = editor.getSelections();\r\n const commands = selections.map((sel) => {\r\n const deleteRange = WordOperations.deleteInsideWord(wordSeparators, model, sel);\r\n return new ReplaceCommand(deleteRange, '');\r\n });\r\n editor.pushUndoStop();\r\n editor.executeCommands(this.id, commands);\r\n editor.pushUndoStop();\r\n }\r\n}\r\nregisterEditorCommand(new CursorWordStartLeft());\r\nregisterEditorCommand(new CursorWordEndLeft());\r\nregisterEditorCommand(new CursorWordLeft());\r\nregisterEditorCommand(new CursorWordStartLeftSelect());\r\nregisterEditorCommand(new CursorWordEndLeftSelect());\r\nregisterEditorCommand(new CursorWordLeftSelect());\r\nregisterEditorCommand(new CursorWordStartRight());\r\nregisterEditorCommand(new CursorWordEndRight());\r\nregisterEditorCommand(new CursorWordRight());\r\nregisterEditorCommand(new CursorWordStartRightSelect());\r\nregisterEditorCommand(new CursorWordEndRightSelect());\r\nregisterEditorCommand(new CursorWordRightSelect());\r\nregisterEditorCommand(new CursorWordAccessibilityLeft());\r\nregisterEditorCommand(new CursorWordAccessibilityLeftSelect());\r\nregisterEditorCommand(new CursorWordAccessibilityRight());\r\nregisterEditorCommand(new CursorWordAccessibilityRightSelect());\r\nregisterEditorCommand(new DeleteWordStartLeft());\r\nregisterEditorCommand(new DeleteWordEndLeft());\r\nregisterEditorCommand(new DeleteWordLeft());\r\nregisterEditorCommand(new DeleteWordStartRight());\r\nregisterEditorCommand(new DeleteWordEndRight());\r\nregisterEditorCommand(new DeleteWordRight());\r\nregisterEditorAction(DeleteInsideWord);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { registerEditorCommand } from '../../browser/editorExtensions.js';\r\nimport { WordPartOperations } from '../../common/controller/cursorWordOperations.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { EditorContextKeys } from '../../common/editorContextKeys.js';\r\nimport { DeleteWordCommand, MoveWordCommand } from '../wordOperations/wordOperations.js';\r\nimport { CommandsRegistry } from '../../../platform/commands/common/commands.js';\r\nexport class DeleteWordPartLeft extends DeleteWordCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: true,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'deleteWordPartLeft',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 1 /* Backspace */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _delete(ctx, wordNavigationType) {\r\n let r = WordPartOperations.deleteWordPartLeft(ctx);\r\n if (r) {\r\n return r;\r\n }\r\n return new Range(1, 1, 1, 1);\r\n }\r\n}\r\nexport class DeleteWordPartRight extends DeleteWordCommand {\r\n constructor() {\r\n super({\r\n whitespaceHeuristics: true,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'deleteWordPartRight',\r\n precondition: EditorContextKeys.writable,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 20 /* Delete */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n _delete(ctx, wordNavigationType) {\r\n let r = WordPartOperations.deleteWordPartRight(ctx);\r\n if (r) {\r\n return r;\r\n }\r\n const lineCount = ctx.model.getLineCount();\r\n const maxColumn = ctx.model.getLineMaxColumn(lineCount);\r\n return new Range(lineCount, maxColumn, lineCount, maxColumn);\r\n }\r\n}\r\nexport class WordPartLeftCommand extends MoveWordCommand {\r\n _move(wordSeparators, model, position, wordNavigationType) {\r\n return WordPartOperations.moveWordPartLeft(wordSeparators, model, position);\r\n }\r\n}\r\nexport class CursorWordPartLeft extends WordPartLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'cursorWordPartLeft',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 15 /* LeftArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\n// Register previous id for compatibility purposes\r\nCommandsRegistry.registerCommandAlias('cursorWordPartStartLeft', 'cursorWordPartLeft');\r\nexport class CursorWordPartLeftSelect extends WordPartLeftCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 0 /* WordStart */,\r\n id: 'cursorWordPartLeftSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 1024 /* Shift */ | 15 /* LeftArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\n// Register previous id for compatibility purposes\r\nCommandsRegistry.registerCommandAlias('cursorWordPartStartLeftSelect', 'cursorWordPartLeftSelect');\r\nexport class WordPartRightCommand extends MoveWordCommand {\r\n _move(wordSeparators, model, position, wordNavigationType) {\r\n return WordPartOperations.moveWordPartRight(wordSeparators, model, position);\r\n }\r\n}\r\nexport class CursorWordPartRight extends WordPartRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: false,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordPartRight',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 17 /* RightArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nexport class CursorWordPartRightSelect extends WordPartRightCommand {\r\n constructor() {\r\n super({\r\n inSelectionMode: true,\r\n wordNavigationType: 2 /* WordEnd */,\r\n id: 'cursorWordPartRightSelect',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.textInputFocus,\r\n primary: 0,\r\n mac: { primary: 256 /* WinCtrl */ | 512 /* Alt */ | 1024 /* Shift */ | 17 /* RightArrow */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n}\r\nregisterEditorCommand(new DeleteWordPartLeft());\r\nregisterEditorCommand(new DeleteWordPartRight());\r\nregisterEditorCommand(new CursorWordPartLeft());\r\nregisterEditorCommand(new CursorWordPartLeftSelect());\r\nregisterEditorCommand(new CursorWordPartRight());\r\nregisterEditorCommand(new CursorWordPartRightSelect());\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport './accessibilityHelp.css';\r\nimport * as dom from '../../../../base/browser/dom.js';\r\nimport { createFastDomNode } from '../../../../base/browser/fastDomNode.js';\r\nimport { renderFormattedText } from '../../../../base/browser/formattedTextRenderer.js';\r\nimport { alert } from '../../../../base/browser/ui/aria/aria.js';\r\nimport { Widget } from '../../../../base/browser/ui/widget.js';\r\nimport { Disposable } from '../../../../base/common/lifecycle.js';\r\nimport * as platform from '../../../../base/common/platform.js';\r\nimport * as strings from '../../../../base/common/strings.js';\r\nimport { URI } from '../../../../base/common/uri.js';\r\nimport { EditorAction, EditorCommand, registerEditorAction, registerEditorCommand, registerEditorContribution } from '../../../browser/editorExtensions.js';\r\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\r\nimport { ToggleTabFocusModeAction } from '../../../contrib/toggleTabFocusMode/toggleTabFocusMode.js';\r\nimport { IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\r\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\r\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\r\nimport { IOpenerService } from '../../../../platform/opener/common/opener.js';\r\nimport { contrastBorder, editorWidgetBackground, widgetShadow, editorWidgetForeground } from '../../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\r\nimport { AccessibilityHelpNLS } from '../../../common/standaloneStrings.js';\r\nconst CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE = new RawContextKey('accessibilityHelpWidgetVisible', false);\r\nlet AccessibilityHelpController = class AccessibilityHelpController extends Disposable {\r\n constructor(editor, instantiationService) {\r\n super();\r\n this._editor = editor;\r\n this._widget = this._register(instantiationService.createInstance(AccessibilityHelpWidget, this._editor));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(AccessibilityHelpController.ID);\r\n }\r\n show() {\r\n this._widget.show();\r\n }\r\n hide() {\r\n this._widget.hide();\r\n }\r\n};\r\nAccessibilityHelpController.ID = 'editor.contrib.accessibilityHelpController';\r\nAccessibilityHelpController = __decorate([\r\n __param(1, IInstantiationService)\r\n], AccessibilityHelpController);\r\nfunction getSelectionLabel(selections, charactersSelected) {\r\n if (!selections || selections.length === 0) {\r\n return AccessibilityHelpNLS.noSelection;\r\n }\r\n if (selections.length === 1) {\r\n if (charactersSelected) {\r\n return strings.format(AccessibilityHelpNLS.singleSelectionRange, selections[0].positionLineNumber, selections[0].positionColumn, charactersSelected);\r\n }\r\n return strings.format(AccessibilityHelpNLS.singleSelection, selections[0].positionLineNumber, selections[0].positionColumn);\r\n }\r\n if (charactersSelected) {\r\n return strings.format(AccessibilityHelpNLS.multiSelectionRange, selections.length, charactersSelected);\r\n }\r\n if (selections.length > 0) {\r\n return strings.format(AccessibilityHelpNLS.multiSelection, selections.length);\r\n }\r\n return '';\r\n}\r\nlet AccessibilityHelpWidget = class AccessibilityHelpWidget extends Widget {\r\n constructor(editor, _contextKeyService, _keybindingService, _openerService) {\r\n super();\r\n this._contextKeyService = _contextKeyService;\r\n this._keybindingService = _keybindingService;\r\n this._openerService = _openerService;\r\n this._editor = editor;\r\n this._isVisibleKey = CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE.bindTo(this._contextKeyService);\r\n this._domNode = createFastDomNode(document.createElement('div'));\r\n this._domNode.setClassName('accessibilityHelpWidget');\r\n this._domNode.setDisplay('none');\r\n this._domNode.setAttribute('role', 'dialog');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._contentDomNode = createFastDomNode(document.createElement('div'));\r\n this._contentDomNode.setAttribute('role', 'document');\r\n this._domNode.appendChild(this._contentDomNode);\r\n this._isVisible = false;\r\n this._register(this._editor.onDidLayoutChange(() => {\r\n if (this._isVisible) {\r\n this._layout();\r\n }\r\n }));\r\n // Intentionally not configurable!\r\n this._register(dom.addStandardDisposableListener(this._contentDomNode.domNode, 'keydown', (e) => {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n if (e.equals(2048 /* CtrlCmd */ | 35 /* KEY_E */)) {\r\n alert(AccessibilityHelpNLS.emergencyConfOn);\r\n this._editor.updateOptions({\r\n accessibilitySupport: 'on'\r\n });\r\n dom.clearNode(this._contentDomNode.domNode);\r\n this._buildContent();\r\n this._contentDomNode.domNode.focus();\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n if (e.equals(2048 /* CtrlCmd */ | 38 /* KEY_H */)) {\r\n alert(AccessibilityHelpNLS.openingDocs);\r\n let url = this._editor.getRawOptions().accessibilityHelpUrl;\r\n if (typeof url === 'undefined') {\r\n url = 'https://go.microsoft.com/fwlink/?linkid=852450';\r\n }\r\n this._openerService.open(URI.parse(url));\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n }));\r\n this.onblur(this._contentDomNode.domNode, () => {\r\n this.hide();\r\n });\r\n this._editor.addOverlayWidget(this);\r\n }\r\n dispose() {\r\n this._editor.removeOverlayWidget(this);\r\n super.dispose();\r\n }\r\n getId() {\r\n return AccessibilityHelpWidget.ID;\r\n }\r\n getDomNode() {\r\n return this._domNode.domNode;\r\n }\r\n getPosition() {\r\n return {\r\n preference: null\r\n };\r\n }\r\n show() {\r\n if (this._isVisible) {\r\n return;\r\n }\r\n this._isVisible = true;\r\n this._isVisibleKey.set(true);\r\n this._layout();\r\n this._domNode.setDisplay('block');\r\n this._domNode.setAttribute('aria-hidden', 'false');\r\n this._contentDomNode.domNode.tabIndex = 0;\r\n this._buildContent();\r\n this._contentDomNode.domNode.focus();\r\n }\r\n _descriptionForCommand(commandId, msg, noKbMsg) {\r\n let kb = this._keybindingService.lookupKeybinding(commandId);\r\n if (kb) {\r\n return strings.format(msg, kb.getAriaLabel());\r\n }\r\n return strings.format(noKbMsg, commandId);\r\n }\r\n _buildContent() {\r\n const options = this._editor.getOptions();\r\n const selections = this._editor.getSelections();\r\n let charactersSelected = 0;\r\n if (selections) {\r\n const model = this._editor.getModel();\r\n if (model) {\r\n selections.forEach((selection) => {\r\n charactersSelected += model.getValueLengthInRange(selection);\r\n });\r\n }\r\n }\r\n let text = getSelectionLabel(selections, charactersSelected);\r\n if (options.get(49 /* inDiffEditor */)) {\r\n if (options.get(75 /* readOnly */)) {\r\n text += AccessibilityHelpNLS.readonlyDiffEditor;\r\n }\r\n else {\r\n text += AccessibilityHelpNLS.editableDiffEditor;\r\n }\r\n }\r\n else {\r\n if (options.get(75 /* readOnly */)) {\r\n text += AccessibilityHelpNLS.readonlyEditor;\r\n }\r\n else {\r\n text += AccessibilityHelpNLS.editableEditor;\r\n }\r\n }\r\n const turnOnMessage = (platform.isMacintosh\r\n ? AccessibilityHelpNLS.changeConfigToOnMac\r\n : AccessibilityHelpNLS.changeConfigToOnWinLinux);\r\n switch (options.get(2 /* accessibilitySupport */)) {\r\n case 0 /* Unknown */:\r\n text += '\\n\\n - ' + turnOnMessage;\r\n break;\r\n case 2 /* Enabled */:\r\n text += '\\n\\n - ' + AccessibilityHelpNLS.auto_on;\r\n break;\r\n case 1 /* Disabled */:\r\n text += '\\n\\n - ' + AccessibilityHelpNLS.auto_off;\r\n text += ' ' + turnOnMessage;\r\n break;\r\n }\r\n if (options.get(123 /* tabFocusMode */)) {\r\n text += '\\n\\n - ' + this._descriptionForCommand(ToggleTabFocusModeAction.ID, AccessibilityHelpNLS.tabFocusModeOnMsg, AccessibilityHelpNLS.tabFocusModeOnMsgNoKb);\r\n }\r\n else {\r\n text += '\\n\\n - ' + this._descriptionForCommand(ToggleTabFocusModeAction.ID, AccessibilityHelpNLS.tabFocusModeOffMsg, AccessibilityHelpNLS.tabFocusModeOffMsgNoKb);\r\n }\r\n const openDocMessage = (platform.isMacintosh\r\n ? AccessibilityHelpNLS.openDocMac\r\n : AccessibilityHelpNLS.openDocWinLinux);\r\n text += '\\n\\n - ' + openDocMessage;\r\n text += '\\n\\n' + AccessibilityHelpNLS.outroMsg;\r\n this._contentDomNode.domNode.appendChild(renderFormattedText(text));\r\n // Per https://www.w3.org/TR/wai-aria/roles#document, Authors SHOULD provide a title or label for documents\r\n this._contentDomNode.domNode.setAttribute('aria-label', text);\r\n }\r\n hide() {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n this._isVisible = false;\r\n this._isVisibleKey.reset();\r\n this._domNode.setDisplay('none');\r\n this._domNode.setAttribute('aria-hidden', 'true');\r\n this._contentDomNode.domNode.tabIndex = -1;\r\n dom.clearNode(this._contentDomNode.domNode);\r\n this._editor.focus();\r\n }\r\n _layout() {\r\n let editorLayout = this._editor.getLayoutInfo();\r\n let w = Math.max(5, Math.min(AccessibilityHelpWidget.WIDTH, editorLayout.width - 40));\r\n let h = Math.max(5, Math.min(AccessibilityHelpWidget.HEIGHT, editorLayout.height - 40));\r\n this._domNode.setWidth(w);\r\n this._domNode.setHeight(h);\r\n let top = Math.round((editorLayout.height - h) / 2);\r\n this._domNode.setTop(top);\r\n let left = Math.round((editorLayout.width - w) / 2);\r\n this._domNode.setLeft(left);\r\n }\r\n};\r\nAccessibilityHelpWidget.ID = 'editor.contrib.accessibilityHelpWidget';\r\nAccessibilityHelpWidget.WIDTH = 500;\r\nAccessibilityHelpWidget.HEIGHT = 300;\r\nAccessibilityHelpWidget = __decorate([\r\n __param(1, IContextKeyService),\r\n __param(2, IKeybindingService),\r\n __param(3, IOpenerService)\r\n], AccessibilityHelpWidget);\r\nclass ShowAccessibilityHelpAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.showAccessibilityHelp',\r\n label: AccessibilityHelpNLS.showAccessibilityHelpAction,\r\n alias: 'Show Accessibility Help',\r\n precondition: undefined,\r\n kbOpts: {\r\n primary: 512 /* Alt */ | 59 /* F1 */,\r\n weight: 100 /* EditorContrib */,\r\n linux: {\r\n primary: 512 /* Alt */ | 1024 /* Shift */ | 59 /* F1 */,\r\n secondary: [512 /* Alt */ | 59 /* F1 */]\r\n }\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n let controller = AccessibilityHelpController.get(editor);\r\n if (controller) {\r\n controller.show();\r\n }\r\n }\r\n}\r\nregisterEditorContribution(AccessibilityHelpController.ID, AccessibilityHelpController);\r\nregisterEditorAction(ShowAccessibilityHelpAction);\r\nconst AccessibilityHelpCommand = EditorCommand.bindToContribution(AccessibilityHelpController.get);\r\nregisterEditorCommand(new AccessibilityHelpCommand({\r\n id: 'closeAccessibilityHelp',\r\n precondition: CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE,\r\n handler: x => x.hide(),\r\n kbOpts: {\r\n weight: 100 /* EditorContrib */ + 100,\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 9 /* Escape */,\r\n secondary: [1024 /* Shift */ | 9 /* Escape */]\r\n }\r\n}));\r\nregisterThemingParticipant((theme, collector) => {\r\n const widgetBackground = theme.getColor(editorWidgetBackground);\r\n if (widgetBackground) {\r\n collector.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${widgetBackground}; }`);\r\n }\r\n const widgetForeground = theme.getColor(editorWidgetForeground);\r\n if (widgetForeground) {\r\n collector.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${widgetForeground}; }`);\r\n }\r\n const widgetShadowColor = theme.getColor(widgetShadow);\r\n if (widgetShadowColor) {\r\n collector.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`);\r\n }\r\n const hcBorder = theme.getColor(contrastBorder);\r\n if (hcBorder) {\r\n collector.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${hcBorder}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './iPadShowKeyboard.css';\r\nimport * as browser from '../../../../base/browser/browser.js';\r\nimport * as dom from '../../../../base/browser/dom.js';\r\nimport { Disposable } from '../../../../base/common/lifecycle.js';\r\nimport { registerEditorContribution } from '../../../browser/editorExtensions.js';\r\nexport class IPadShowKeyboard extends Disposable {\r\n constructor(editor) {\r\n super();\r\n this.editor = editor;\r\n this.widget = null;\r\n if (browser.isIPad) {\r\n this._register(editor.onDidChangeConfiguration(() => this.update()));\r\n this.update();\r\n }\r\n }\r\n update() {\r\n const shouldHaveWidget = (!this.editor.getOption(75 /* readOnly */));\r\n if (!this.widget && shouldHaveWidget) {\r\n this.widget = new ShowKeyboardWidget(this.editor);\r\n }\r\n else if (this.widget && !shouldHaveWidget) {\r\n this.widget.dispose();\r\n this.widget = null;\r\n }\r\n }\r\n dispose() {\r\n super.dispose();\r\n if (this.widget) {\r\n this.widget.dispose();\r\n this.widget = null;\r\n }\r\n }\r\n}\r\nIPadShowKeyboard.ID = 'editor.contrib.iPadShowKeyboard';\r\nclass ShowKeyboardWidget extends Disposable {\r\n constructor(editor) {\r\n super();\r\n this.editor = editor;\r\n this._domNode = document.createElement('textarea');\r\n this._domNode.className = 'iPadShowKeyboard';\r\n this._register(dom.addDisposableListener(this._domNode, 'touchstart', (e) => {\r\n this.editor.focus();\r\n }));\r\n this._register(dom.addDisposableListener(this._domNode, 'focus', (e) => {\r\n this.editor.focus();\r\n }));\r\n this.editor.addOverlayWidget(this);\r\n }\r\n dispose() {\r\n this.editor.removeOverlayWidget(this);\r\n super.dispose();\r\n }\r\n // ----- IOverlayWidget API\r\n getId() {\r\n return ShowKeyboardWidget.ID;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return {\r\n preference: 1 /* BOTTOM_RIGHT_CORNER */\r\n };\r\n }\r\n}\r\nShowKeyboardWidget.ID = 'editor.contrib.ShowKeyboardWidget';\r\nregisterEditorContribution(IPadShowKeyboard.ID, IPadShowKeyboard);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport './inspectTokens.css';\r\nimport { $, append, reset } from '../../../../base/browser/dom.js';\r\nimport { Color } from '../../../../base/common/color.js';\r\nimport { Disposable } from '../../../../base/common/lifecycle.js';\r\nimport { EditorAction, registerEditorAction, registerEditorContribution } from '../../../browser/editorExtensions.js';\r\nimport { TokenMetadata, TokenizationRegistry } from '../../../common/modes.js';\r\nimport { NULL_STATE, nullTokenize, nullTokenize2 } from '../../../common/modes/nullMode.js';\r\nimport { IModeService } from '../../../common/services/modeService.js';\r\nimport { IStandaloneThemeService } from '../../common/standaloneThemeService.js';\r\nimport { editorHoverBackground, editorHoverBorder, editorHoverForeground } from '../../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\r\nimport { InspectTokensNLS } from '../../../common/standaloneStrings.js';\r\nimport { ColorScheme } from '../../../../platform/theme/common/theme.js';\r\nlet InspectTokensController = class InspectTokensController extends Disposable {\r\n constructor(editor, standaloneColorService, modeService) {\r\n super();\r\n this._editor = editor;\r\n this._modeService = modeService;\r\n this._widget = null;\r\n this._register(this._editor.onDidChangeModel((e) => this.stop()));\r\n this._register(this._editor.onDidChangeModelLanguage((e) => this.stop()));\r\n this._register(TokenizationRegistry.onDidChange((e) => this.stop()));\r\n this._register(this._editor.onKeyUp((e) => e.keyCode === 9 /* Escape */ && this.stop()));\r\n }\r\n static get(editor) {\r\n return editor.getContribution(InspectTokensController.ID);\r\n }\r\n dispose() {\r\n this.stop();\r\n super.dispose();\r\n }\r\n launch() {\r\n if (this._widget) {\r\n return;\r\n }\r\n if (!this._editor.hasModel()) {\r\n return;\r\n }\r\n this._widget = new InspectTokensWidget(this._editor, this._modeService);\r\n }\r\n stop() {\r\n if (this._widget) {\r\n this._widget.dispose();\r\n this._widget = null;\r\n }\r\n }\r\n};\r\nInspectTokensController.ID = 'editor.contrib.inspectTokens';\r\nInspectTokensController = __decorate([\r\n __param(1, IStandaloneThemeService),\r\n __param(2, IModeService)\r\n], InspectTokensController);\r\nclass InspectTokens extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.inspectTokens',\r\n label: InspectTokensNLS.inspectTokensAction,\r\n alias: 'Developer: Inspect Tokens',\r\n precondition: undefined\r\n });\r\n }\r\n run(accessor, editor) {\r\n let controller = InspectTokensController.get(editor);\r\n if (controller) {\r\n controller.launch();\r\n }\r\n }\r\n}\r\nfunction renderTokenText(tokenText) {\r\n let result = '';\r\n for (let charIndex = 0, len = tokenText.length; charIndex < len; charIndex++) {\r\n let charCode = tokenText.charCodeAt(charIndex);\r\n switch (charCode) {\r\n case 9 /* Tab */:\r\n result += '\\u2192'; // →\r\n break;\r\n case 32 /* Space */:\r\n result += '\\u00B7'; // ·\r\n break;\r\n default:\r\n result += String.fromCharCode(charCode);\r\n }\r\n }\r\n return result;\r\n}\r\nfunction getSafeTokenizationSupport(languageIdentifier) {\r\n let tokenizationSupport = TokenizationRegistry.get(languageIdentifier.language);\r\n if (tokenizationSupport) {\r\n return tokenizationSupport;\r\n }\r\n return {\r\n getInitialState: () => NULL_STATE,\r\n tokenize: (line, hasEOL, state, deltaOffset) => nullTokenize(languageIdentifier.language, line, state, deltaOffset),\r\n tokenize2: (line, hasEOL, state, deltaOffset) => nullTokenize2(languageIdentifier.id, line, state, deltaOffset)\r\n };\r\n}\r\nclass InspectTokensWidget extends Disposable {\r\n constructor(editor, modeService) {\r\n super();\r\n // Editor.IContentWidget.allowEditorOverflow\r\n this.allowEditorOverflow = true;\r\n this._editor = editor;\r\n this._modeService = modeService;\r\n this._model = this._editor.getModel();\r\n this._domNode = document.createElement('div');\r\n this._domNode.className = 'tokens-inspect-widget';\r\n this._tokenizationSupport = getSafeTokenizationSupport(this._model.getLanguageIdentifier());\r\n this._compute(this._editor.getPosition());\r\n this._register(this._editor.onDidChangeCursorPosition((e) => this._compute(this._editor.getPosition())));\r\n this._editor.addContentWidget(this);\r\n }\r\n dispose() {\r\n this._editor.removeContentWidget(this);\r\n super.dispose();\r\n }\r\n getId() {\r\n return InspectTokensWidget._ID;\r\n }\r\n _compute(position) {\r\n let data = this._getTokensAtLine(position.lineNumber);\r\n let token1Index = 0;\r\n for (let i = data.tokens1.length - 1; i >= 0; i--) {\r\n let t = data.tokens1[i];\r\n if (position.column - 1 >= t.offset) {\r\n token1Index = i;\r\n break;\r\n }\r\n }\r\n let token2Index = 0;\r\n for (let i = (data.tokens2.length >>> 1); i >= 0; i--) {\r\n if (position.column - 1 >= data.tokens2[(i << 1)]) {\r\n token2Index = i;\r\n break;\r\n }\r\n }\r\n let lineContent = this._model.getLineContent(position.lineNumber);\r\n let tokenText = '';\r\n if (token1Index < data.tokens1.length) {\r\n let tokenStartIndex = data.tokens1[token1Index].offset;\r\n let tokenEndIndex = token1Index + 1 < data.tokens1.length ? data.tokens1[token1Index + 1].offset : lineContent.length;\r\n tokenText = lineContent.substring(tokenStartIndex, tokenEndIndex);\r\n }\r\n reset(this._domNode, $('h2.tm-token', undefined, renderTokenText(tokenText), $('span.tm-token-length', undefined, `${tokenText.length} ${tokenText.length === 1 ? 'char' : 'chars'}`)));\r\n append(this._domNode, $('hr.tokens-inspect-separator', { 'style': 'clear:both' }));\r\n const metadata = (token2Index << 1) + 1 < data.tokens2.length ? this._decodeMetadata(data.tokens2[(token2Index << 1) + 1]) : null;\r\n append(this._domNode, $('table.tm-metadata-table', undefined, $('tbody', undefined, $('tr', undefined, $('td.tm-metadata-key', undefined, 'language'), $('td.tm-metadata-value', undefined, `${metadata ? metadata.languageIdentifier.language : '-?-'}`)), $('tr', undefined, $('td.tm-metadata-key', undefined, 'token type'), $('td.tm-metadata-value', undefined, `${metadata ? this._tokenTypeToString(metadata.tokenType) : '-?-'}`)), $('tr', undefined, $('td.tm-metadata-key', undefined, 'font style'), $('td.tm-metadata-value', undefined, `${metadata ? this._fontStyleToString(metadata.fontStyle) : '-?-'}`)), $('tr', undefined, $('td.tm-metadata-key', undefined, 'foreground'), $('td.tm-metadata-value', undefined, `${metadata ? Color.Format.CSS.formatHex(metadata.foreground) : '-?-'}`)), $('tr', undefined, $('td.tm-metadata-key', undefined, 'background'), $('td.tm-metadata-value', undefined, `${metadata ? Color.Format.CSS.formatHex(metadata.background) : '-?-'}`)))));\r\n append(this._domNode, $('hr.tokens-inspect-separator'));\r\n if (token1Index < data.tokens1.length) {\r\n append(this._domNode, $('span.tm-token-type', undefined, data.tokens1[token1Index].type));\r\n }\r\n this._editor.layoutContentWidget(this);\r\n }\r\n _decodeMetadata(metadata) {\r\n let colorMap = TokenizationRegistry.getColorMap();\r\n let languageId = TokenMetadata.getLanguageId(metadata);\r\n let tokenType = TokenMetadata.getTokenType(metadata);\r\n let fontStyle = TokenMetadata.getFontStyle(metadata);\r\n let foreground = TokenMetadata.getForeground(metadata);\r\n let background = TokenMetadata.getBackground(metadata);\r\n return {\r\n languageIdentifier: this._modeService.getLanguageIdentifier(languageId),\r\n tokenType: tokenType,\r\n fontStyle: fontStyle,\r\n foreground: colorMap[foreground],\r\n background: colorMap[background]\r\n };\r\n }\r\n _tokenTypeToString(tokenType) {\r\n switch (tokenType) {\r\n case 0 /* Other */: return 'Other';\r\n case 1 /* Comment */: return 'Comment';\r\n case 2 /* String */: return 'String';\r\n case 4 /* RegEx */: return 'RegEx';\r\n default: return '??';\r\n }\r\n }\r\n _fontStyleToString(fontStyle) {\r\n let r = '';\r\n if (fontStyle & 1 /* Italic */) {\r\n r += 'italic ';\r\n }\r\n if (fontStyle & 2 /* Bold */) {\r\n r += 'bold ';\r\n }\r\n if (fontStyle & 4 /* Underline */) {\r\n r += 'underline ';\r\n }\r\n if (r.length === 0) {\r\n r = '---';\r\n }\r\n return r;\r\n }\r\n _getTokensAtLine(lineNumber) {\r\n let stateBeforeLine = this._getStateBeforeLine(lineNumber);\r\n let tokenizationResult1 = this._tokenizationSupport.tokenize(this._model.getLineContent(lineNumber), true, stateBeforeLine, 0);\r\n let tokenizationResult2 = this._tokenizationSupport.tokenize2(this._model.getLineContent(lineNumber), true, stateBeforeLine, 0);\r\n return {\r\n startState: stateBeforeLine,\r\n tokens1: tokenizationResult1.tokens,\r\n tokens2: tokenizationResult2.tokens,\r\n endState: tokenizationResult1.endState\r\n };\r\n }\r\n _getStateBeforeLine(lineNumber) {\r\n let state = this._tokenizationSupport.getInitialState();\r\n for (let i = 1; i < lineNumber; i++) {\r\n let tokenizationResult = this._tokenizationSupport.tokenize(this._model.getLineContent(i), true, state, 0);\r\n state = tokenizationResult.endState;\r\n }\r\n return state;\r\n }\r\n getDomNode() {\r\n return this._domNode;\r\n }\r\n getPosition() {\r\n return {\r\n position: this._editor.getPosition(),\r\n preference: [2 /* BELOW */, 1 /* ABOVE */]\r\n };\r\n }\r\n}\r\nInspectTokensWidget._ID = 'editor.contrib.inspectTokensWidget';\r\nregisterEditorContribution(InspectTokensController.ID, InspectTokensController);\r\nregisterEditorAction(InspectTokens);\r\nregisterThemingParticipant((theme, collector) => {\r\n const border = theme.getColor(editorHoverBorder);\r\n if (border) {\r\n let borderWidth = theme.type === ColorScheme.HIGH_CONTRAST ? 2 : 1;\r\n collector.addRule(`.monaco-editor .tokens-inspect-widget { border: ${borderWidth}px solid ${border}; }`);\r\n collector.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${border}; }`);\r\n }\r\n const background = theme.getColor(editorHoverBackground);\r\n if (background) {\r\n collector.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${background}; }`);\r\n }\r\n const foreground = theme.getColor(editorHoverForeground);\r\n if (foreground) {\r\n collector.addRule(`.monaco-editor .tokens-inspect-widget { color: ${foreground}; }`);\r\n }\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { IQuickInputService } from '../common/quickInput.js';\r\nimport { Extensions } from '../common/quickAccess.js';\r\nimport { Registry } from '../../registry/common/platform.js';\r\nimport { localize } from '../../../nls.js';\r\nimport { DisposableStore } from '../../../base/common/lifecycle.js';\r\nlet HelpQuickAccessProvider = class HelpQuickAccessProvider {\r\n constructor(quickInputService) {\r\n this.quickInputService = quickInputService;\r\n this.registry = Registry.as(Extensions.Quickaccess);\r\n }\r\n provide(picker) {\r\n const disposables = new DisposableStore();\r\n // Open a picker with the selected value if picked\r\n disposables.add(picker.onDidAccept(() => {\r\n const [item] = picker.selectedItems;\r\n if (item) {\r\n this.quickInputService.quickAccess.show(item.prefix, { preserveValue: true });\r\n }\r\n }));\r\n // Also open a picker when we detect the user typed the exact\r\n // name of a provider (e.g. `?term` for terminals)\r\n disposables.add(picker.onDidChangeValue(value => {\r\n const providerDescriptor = this.registry.getQuickAccessProvider(value.substr(HelpQuickAccessProvider.PREFIX.length));\r\n if (providerDescriptor && providerDescriptor.prefix && providerDescriptor.prefix !== HelpQuickAccessProvider.PREFIX) {\r\n this.quickInputService.quickAccess.show(providerDescriptor.prefix, { preserveValue: true });\r\n }\r\n }));\r\n // Fill in all providers separated by editor/global scope\r\n const { editorProviders, globalProviders } = this.getQuickAccessProviders();\r\n picker.items = editorProviders.length === 0 || globalProviders.length === 0 ?\r\n // Without groups\r\n [\r\n ...(editorProviders.length === 0 ? globalProviders : editorProviders)\r\n ] :\r\n // With groups\r\n [\r\n { label: localize('globalCommands', \"global commands\"), type: 'separator' },\r\n ...globalProviders,\r\n { label: localize('editorCommands', \"editor commands\"), type: 'separator' },\r\n ...editorProviders\r\n ];\r\n return disposables;\r\n }\r\n getQuickAccessProviders() {\r\n const globalProviders = [];\r\n const editorProviders = [];\r\n for (const provider of this.registry.getQuickAccessProviders().sort((providerA, providerB) => providerA.prefix.localeCompare(providerB.prefix))) {\r\n if (provider.prefix === HelpQuickAccessProvider.PREFIX) {\r\n continue; // exclude help which is already active\r\n }\r\n for (const helpEntry of provider.helpEntries) {\r\n const prefix = helpEntry.prefix || provider.prefix;\r\n const label = prefix || '\\u2026' /* ... */;\r\n (helpEntry.needsEditor ? editorProviders : globalProviders).push({\r\n prefix,\r\n label,\r\n ariaLabel: localize('helpPickAriaLabel', \"{0}, {1}\", label, helpEntry.description),\r\n description: helpEntry.description\r\n });\r\n }\r\n }\r\n return { editorProviders, globalProviders };\r\n }\r\n};\r\nHelpQuickAccessProvider.PREFIX = '?';\r\nHelpQuickAccessProvider = __decorate([\r\n __param(0, IQuickInputService)\r\n], HelpQuickAccessProvider);\r\nexport { HelpQuickAccessProvider };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Registry } from '../../../../platform/registry/common/platform.js';\r\nimport { Extensions } from '../../../../platform/quickinput/common/quickAccess.js';\r\nimport { QuickHelpNLS } from '../../../common/standaloneStrings.js';\r\nimport { HelpQuickAccessProvider } from '../../../../platform/quickinput/browser/helpQuickAccess.js';\r\nRegistry.as(Extensions.Quickaccess).registerQuickAccessProvider({\r\n ctor: HelpQuickAccessProvider,\r\n prefix: '',\r\n helpEntries: [{ description: QuickHelpNLS.helpQuickAccessActionLabel, needsEditor: true }]\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { OverviewRulerLane } from '../../common/model.js';\r\nimport { themeColorFromId } from '../../../platform/theme/common/themeService.js';\r\nimport { overviewRulerRangeHighlight } from '../../common/view/editorColorRegistry.js';\r\nimport { DisposableStore, toDisposable, MutableDisposable } from '../../../base/common/lifecycle.js';\r\nimport { isDiffEditor, getCodeEditor } from '../../browser/editorBrowser.js';\r\nimport { withNullAsUndefined } from '../../../base/common/types.js';\r\nimport { once } from '../../../base/common/functional.js';\r\n/**\r\n * A reusable quick access provider for the editor with support\r\n * for adding decorations for navigating in the currently active file\r\n * (for example \"Go to line\", \"Go to symbol\").\r\n */\r\nexport class AbstractEditorNavigationQuickAccessProvider {\r\n constructor(options) {\r\n this.options = options;\r\n //#endregion\r\n //#region Decorations Utils\r\n this.rangeHighlightDecorationId = undefined;\r\n }\r\n //#region Provider methods\r\n provide(picker, token) {\r\n var _a;\r\n const disposables = new DisposableStore();\r\n // Apply options if any\r\n picker.canAcceptInBackground = !!((_a = this.options) === null || _a === void 0 ? void 0 : _a.canAcceptInBackground);\r\n // Disable filtering & sorting, we control the results\r\n picker.matchOnLabel = picker.matchOnDescription = picker.matchOnDetail = picker.sortByLabel = false;\r\n // Provide based on current active editor\r\n const pickerDisposable = disposables.add(new MutableDisposable());\r\n pickerDisposable.value = this.doProvide(picker, token);\r\n // Re-create whenever the active editor changes\r\n disposables.add(this.onDidActiveTextEditorControlChange(() => {\r\n // Clear old\r\n pickerDisposable.value = undefined;\r\n // Add new\r\n pickerDisposable.value = this.doProvide(picker, token);\r\n }));\r\n return disposables;\r\n }\r\n doProvide(picker, token) {\r\n const disposables = new DisposableStore();\r\n // With text control\r\n const editor = this.activeTextEditorControl;\r\n if (editor && this.canProvideWithTextEditor(editor)) {\r\n const context = { editor };\r\n // Restore any view state if this picker was closed\r\n // without actually going to a line\r\n const codeEditor = getCodeEditor(editor);\r\n if (codeEditor) {\r\n // Remember view state and update it when the cursor position\r\n // changes even later because it could be that the user has\r\n // configured quick access to remain open when focus is lost and\r\n // we always want to restore the current location.\r\n let lastKnownEditorViewState = withNullAsUndefined(editor.saveViewState());\r\n disposables.add(codeEditor.onDidChangeCursorPosition(() => {\r\n lastKnownEditorViewState = withNullAsUndefined(editor.saveViewState());\r\n }));\r\n context.restoreViewState = () => {\r\n if (lastKnownEditorViewState && editor === this.activeTextEditorControl) {\r\n editor.restoreViewState(lastKnownEditorViewState);\r\n }\r\n };\r\n disposables.add(once(token.onCancellationRequested)(() => { var _a; return (_a = context.restoreViewState) === null || _a === void 0 ? void 0 : _a.call(context); }));\r\n }\r\n // Clean up decorations on dispose\r\n disposables.add(toDisposable(() => this.clearDecorations(editor)));\r\n // Ask subclass for entries\r\n disposables.add(this.provideWithTextEditor(context, picker, token));\r\n }\r\n // Without text control\r\n else {\r\n disposables.add(this.provideWithoutTextEditor(picker, token));\r\n }\r\n return disposables;\r\n }\r\n /**\r\n * Subclasses to implement if they can operate on the text editor.\r\n */\r\n canProvideWithTextEditor(editor) {\r\n return true;\r\n }\r\n gotoLocation({ editor }, options) {\r\n editor.setSelection(options.range);\r\n editor.revealRangeInCenter(options.range, 0 /* Smooth */);\r\n if (!options.preserveFocus) {\r\n editor.focus();\r\n }\r\n }\r\n getModel(editor) {\r\n var _a;\r\n return isDiffEditor(editor) ? (_a = editor.getModel()) === null || _a === void 0 ? void 0 : _a.modified :\r\n editor.getModel();\r\n }\r\n addDecorations(editor, range) {\r\n editor.changeDecorations(changeAccessor => {\r\n // Reset old decorations if any\r\n const deleteDecorations = [];\r\n if (this.rangeHighlightDecorationId) {\r\n deleteDecorations.push(this.rangeHighlightDecorationId.overviewRulerDecorationId);\r\n deleteDecorations.push(this.rangeHighlightDecorationId.rangeHighlightId);\r\n this.rangeHighlightDecorationId = undefined;\r\n }\r\n // Add new decorations for the range\r\n const newDecorations = [\r\n // highlight the entire line on the range\r\n {\r\n range,\r\n options: {\r\n className: 'rangeHighlight',\r\n isWholeLine: true\r\n }\r\n },\r\n // also add overview ruler highlight\r\n {\r\n range,\r\n options: {\r\n overviewRuler: {\r\n color: themeColorFromId(overviewRulerRangeHighlight),\r\n position: OverviewRulerLane.Full\r\n }\r\n }\r\n }\r\n ];\r\n const [rangeHighlightId, overviewRulerDecorationId] = changeAccessor.deltaDecorations(deleteDecorations, newDecorations);\r\n this.rangeHighlightDecorationId = { rangeHighlightId, overviewRulerDecorationId };\r\n });\r\n }\r\n clearDecorations(editor) {\r\n const rangeHighlightDecorationId = this.rangeHighlightDecorationId;\r\n if (rangeHighlightDecorationId) {\r\n editor.changeDecorations(changeAccessor => {\r\n changeAccessor.deltaDecorations([\r\n rangeHighlightDecorationId.overviewRulerDecorationId,\r\n rangeHighlightDecorationId.rangeHighlightId\r\n ], []);\r\n });\r\n this.rangeHighlightDecorationId = undefined;\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { localize } from '../../../nls.js';\r\nimport { DisposableStore, Disposable, toDisposable } from '../../../base/common/lifecycle.js';\r\nimport { AbstractEditorNavigationQuickAccessProvider } from './editorNavigationQuickAccess.js';\r\nimport { getCodeEditor } from '../../browser/editorBrowser.js';\r\nexport class AbstractGotoLineQuickAccessProvider extends AbstractEditorNavigationQuickAccessProvider {\r\n constructor() {\r\n super({ canAcceptInBackground: true });\r\n }\r\n provideWithoutTextEditor(picker) {\r\n const label = localize('cannotRunGotoLine', \"Open a text editor first to go to a line.\");\r\n picker.items = [{ label }];\r\n picker.ariaLabel = label;\r\n return Disposable.None;\r\n }\r\n provideWithTextEditor(context, picker, token) {\r\n const editor = context.editor;\r\n const disposables = new DisposableStore();\r\n // Goto line once picked\r\n disposables.add(picker.onDidAccept(event => {\r\n const [item] = picker.selectedItems;\r\n if (item) {\r\n if (!this.isValidLineNumber(editor, item.lineNumber)) {\r\n return;\r\n }\r\n this.gotoLocation(context, { range: this.toRange(item.lineNumber, item.column), keyMods: picker.keyMods, preserveFocus: event.inBackground });\r\n if (!event.inBackground) {\r\n picker.hide();\r\n }\r\n }\r\n }));\r\n // React to picker changes\r\n const updatePickerAndEditor = () => {\r\n const position = this.parsePosition(editor, picker.value.trim().substr(AbstractGotoLineQuickAccessProvider.PREFIX.length));\r\n const label = this.getPickLabel(editor, position.lineNumber, position.column);\r\n // Picker\r\n picker.items = [{\r\n lineNumber: position.lineNumber,\r\n column: position.column,\r\n label\r\n }];\r\n // ARIA Label\r\n picker.ariaLabel = label;\r\n // Clear decorations for invalid range\r\n if (!this.isValidLineNumber(editor, position.lineNumber)) {\r\n this.clearDecorations(editor);\r\n return;\r\n }\r\n // Reveal\r\n const range = this.toRange(position.lineNumber, position.column);\r\n editor.revealRangeInCenter(range, 0 /* Smooth */);\r\n // Decorate\r\n this.addDecorations(editor, range);\r\n };\r\n updatePickerAndEditor();\r\n disposables.add(picker.onDidChangeValue(() => updatePickerAndEditor()));\r\n // Adjust line number visibility as needed\r\n const codeEditor = getCodeEditor(editor);\r\n if (codeEditor) {\r\n const options = codeEditor.getOptions();\r\n const lineNumbers = options.get(54 /* lineNumbers */);\r\n if (lineNumbers.renderType === 2 /* Relative */) {\r\n codeEditor.updateOptions({ lineNumbers: 'on' });\r\n disposables.add(toDisposable(() => codeEditor.updateOptions({ lineNumbers: 'relative' })));\r\n }\r\n }\r\n return disposables;\r\n }\r\n toRange(lineNumber = 1, column = 1) {\r\n return {\r\n startLineNumber: lineNumber,\r\n startColumn: column,\r\n endLineNumber: lineNumber,\r\n endColumn: column\r\n };\r\n }\r\n parsePosition(editor, value) {\r\n // Support line-col formats of `line,col`, `line:col`, `line#col`\r\n const numbers = value.split(/,|:|#/).map(part => parseInt(part, 10)).filter(part => !isNaN(part));\r\n const endLine = this.lineCount(editor) + 1;\r\n return {\r\n lineNumber: numbers[0] > 0 ? numbers[0] : endLine + numbers[0],\r\n column: numbers[1]\r\n };\r\n }\r\n getPickLabel(editor, lineNumber, column) {\r\n // Location valid: indicate this as picker label\r\n if (this.isValidLineNumber(editor, lineNumber)) {\r\n if (this.isValidColumn(editor, lineNumber, column)) {\r\n return localize('gotoLineColumnLabel', \"Go to line {0} and column {1}.\", lineNumber, column);\r\n }\r\n return localize('gotoLineLabel', \"Go to line {0}.\", lineNumber);\r\n }\r\n // Location invalid: show generic label\r\n const position = editor.getPosition() || { lineNumber: 1, column: 1 };\r\n const lineCount = this.lineCount(editor);\r\n if (lineCount > 1) {\r\n return localize('gotoLineLabelEmptyWithLimit', \"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.\", position.lineNumber, position.column, lineCount);\r\n }\r\n return localize('gotoLineLabelEmpty', \"Current Line: {0}, Character: {1}. Type a line number to navigate to.\", position.lineNumber, position.column);\r\n }\r\n isValidLineNumber(editor, lineNumber) {\r\n if (!lineNumber || typeof lineNumber !== 'number') {\r\n return false;\r\n }\r\n return lineNumber > 0 && lineNumber <= this.lineCount(editor);\r\n }\r\n isValidColumn(editor, lineNumber, column) {\r\n if (!column || typeof column !== 'number') {\r\n return false;\r\n }\r\n const model = this.getModel(editor);\r\n if (!model) {\r\n return false;\r\n }\r\n const positionCandidate = { lineNumber, column };\r\n return model.validatePosition(positionCandidate).equals(positionCandidate);\r\n }\r\n lineCount(editor) {\r\n var _a, _b;\r\n return (_b = (_a = this.getModel(editor)) === null || _a === void 0 ? void 0 : _a.getLineCount()) !== null && _b !== void 0 ? _b : 0;\r\n }\r\n}\r\nAbstractGotoLineQuickAccessProvider.PREFIX = ':';\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { AbstractGotoLineQuickAccessProvider } from '../../../contrib/quickAccess/gotoLineQuickAccess.js';\r\nimport { Registry } from '../../../../platform/registry/common/platform.js';\r\nimport { Extensions } from '../../../../platform/quickinput/common/quickAccess.js';\r\nimport { ICodeEditorService } from '../../../browser/services/codeEditorService.js';\r\nimport { withNullAsUndefined } from '../../../../base/common/types.js';\r\nimport { GoToLineNLS } from '../../../common/standaloneStrings.js';\r\nimport { Event } from '../../../../base/common/event.js';\r\nimport { EditorAction, registerEditorAction } from '../../../browser/editorExtensions.js';\r\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\r\nimport { IQuickInputService } from '../../../../platform/quickinput/common/quickInput.js';\r\nlet StandaloneGotoLineQuickAccessProvider = class StandaloneGotoLineQuickAccessProvider extends AbstractGotoLineQuickAccessProvider {\r\n constructor(editorService) {\r\n super();\r\n this.editorService = editorService;\r\n this.onDidActiveTextEditorControlChange = Event.None;\r\n }\r\n get activeTextEditorControl() {\r\n return withNullAsUndefined(this.editorService.getFocusedCodeEditor());\r\n }\r\n};\r\nStandaloneGotoLineQuickAccessProvider = __decorate([\r\n __param(0, ICodeEditorService)\r\n], StandaloneGotoLineQuickAccessProvider);\r\nexport { StandaloneGotoLineQuickAccessProvider };\r\nRegistry.as(Extensions.Quickaccess).registerQuickAccessProvider({\r\n ctor: StandaloneGotoLineQuickAccessProvider,\r\n prefix: StandaloneGotoLineQuickAccessProvider.PREFIX,\r\n helpEntries: [{ description: GoToLineNLS.gotoLineActionLabel, needsEditor: true }]\r\n});\r\nexport class GotoLineAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.gotoLine',\r\n label: GoToLineNLS.gotoLineActionLabel,\r\n alias: 'Go to Line/Column...',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 37 /* KEY_G */,\r\n mac: { primary: 256 /* WinCtrl */ | 37 /* KEY_G */ },\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor) {\r\n accessor.get(IQuickInputService).quickAccess.show(StandaloneGotoLineQuickAccessProvider.PREFIX);\r\n }\r\n}\r\nregisterEditorAction(GotoLineAction);\r\n","import { fuzzyScore, createMatches as createFuzzyMatches } from './filters.js';\r\nimport { sep } from './path.js';\r\nimport { isWindows } from './platform.js';\r\nimport { stripWildcards } from './strings.js';\r\nconst NO_SCORE2 = [undefined, []];\r\nexport function scoreFuzzy2(target, query, patternStart = 0, wordStart = 0) {\r\n // Score: multiple inputs\r\n const preparedQuery = query;\r\n if (preparedQuery.values && preparedQuery.values.length > 1) {\r\n return doScoreFuzzy2Multiple(target, preparedQuery.values, patternStart, wordStart);\r\n }\r\n // Score: single input\r\n return doScoreFuzzy2Single(target, query, patternStart, wordStart);\r\n}\r\nfunction doScoreFuzzy2Multiple(target, query, patternStart, wordStart) {\r\n let totalScore = 0;\r\n const totalMatches = [];\r\n for (const queryPiece of query) {\r\n const [score, matches] = doScoreFuzzy2Single(target, queryPiece, patternStart, wordStart);\r\n if (typeof score !== 'number') {\r\n // if a single query value does not match, return with\r\n // no score entirely, we require all queries to match\r\n return NO_SCORE2;\r\n }\r\n totalScore += score;\r\n totalMatches.push(...matches);\r\n }\r\n // if we have a score, ensure that the positions are\r\n // sorted in ascending order and distinct\r\n return [totalScore, normalizeMatches(totalMatches)];\r\n}\r\nfunction doScoreFuzzy2Single(target, query, patternStart, wordStart) {\r\n const score = fuzzyScore(query.original, query.originalLowercase, patternStart, target, target.toLowerCase(), wordStart, true);\r\n if (!score) {\r\n return NO_SCORE2;\r\n }\r\n return [score[0], createFuzzyMatches(score)];\r\n}\r\nfunction normalizeMatches(matches) {\r\n // sort matches by start to be able to normalize\r\n const sortedMatches = matches.sort((matchA, matchB) => {\r\n return matchA.start - matchB.start;\r\n });\r\n // merge matches that overlap\r\n const normalizedMatches = [];\r\n let currentMatch = undefined;\r\n for (const match of sortedMatches) {\r\n // if we have no current match or the matches\r\n // do not overlap, we take it as is and remember\r\n // it for future merging\r\n if (!currentMatch || !matchOverlaps(currentMatch, match)) {\r\n currentMatch = match;\r\n normalizedMatches.push(match);\r\n }\r\n // otherwise we merge the matches\r\n else {\r\n currentMatch.start = Math.min(currentMatch.start, match.start);\r\n currentMatch.end = Math.max(currentMatch.end, match.end);\r\n }\r\n }\r\n return normalizedMatches;\r\n}\r\nfunction matchOverlaps(matchA, matchB) {\r\n if (matchA.end < matchB.start) {\r\n return false; // A ends before B starts\r\n }\r\n if (matchB.end < matchA.start) {\r\n return false; // B ends before A starts\r\n }\r\n return true;\r\n}\r\n/**\r\n * Helper function to prepare a search value for scoring by removing unwanted characters\r\n * and allowing to score on multiple pieces separated by whitespace character.\r\n */\r\nconst MULTIPLE_QUERY_VALUES_SEPARATOR = ' ';\r\nexport function prepareQuery(original) {\r\n if (typeof original !== 'string') {\r\n original = '';\r\n }\r\n const originalLowercase = original.toLowerCase();\r\n const { pathNormalized, normalized, normalizedLowercase } = normalizeQuery(original);\r\n const containsPathSeparator = pathNormalized.indexOf(sep) >= 0;\r\n let values = undefined;\r\n const originalSplit = original.split(MULTIPLE_QUERY_VALUES_SEPARATOR);\r\n if (originalSplit.length > 1) {\r\n for (const originalPiece of originalSplit) {\r\n const { pathNormalized: pathNormalizedPiece, normalized: normalizedPiece, normalizedLowercase: normalizedLowercasePiece } = normalizeQuery(originalPiece);\r\n if (normalizedPiece) {\r\n if (!values) {\r\n values = [];\r\n }\r\n values.push({\r\n original: originalPiece,\r\n originalLowercase: originalPiece.toLowerCase(),\r\n pathNormalized: pathNormalizedPiece,\r\n normalized: normalizedPiece,\r\n normalizedLowercase: normalizedLowercasePiece\r\n });\r\n }\r\n }\r\n }\r\n return { original, originalLowercase, pathNormalized, normalized, normalizedLowercase, values, containsPathSeparator };\r\n}\r\nfunction normalizeQuery(original) {\r\n let pathNormalized;\r\n if (isWindows) {\r\n pathNormalized = original.replace(/\\//g, sep); // Help Windows users to search for paths when using slash\r\n }\r\n else {\r\n pathNormalized = original.replace(/\\\\/g, sep); // Help macOS/Linux users to search for paths when using backslash\r\n }\r\n const normalized = stripWildcards(pathNormalized).replace(/\\s/g, '');\r\n return {\r\n pathNormalized,\r\n normalized,\r\n normalizedLowercase: normalized.toLowerCase()\r\n };\r\n}\r\nexport function pieceToQuery(arg1) {\r\n if (Array.isArray(arg1)) {\r\n return prepareQuery(arg1.map(piece => piece.original).join(MULTIPLE_QUERY_VALUES_SEPARATOR));\r\n }\r\n return prepareQuery(arg1.original);\r\n}\r\n//#endregion\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { localize } from '../../../nls.js';\r\nimport { CancellationTokenSource } from '../../../base/common/cancellation.js';\r\nimport { DisposableStore, Disposable, toDisposable } from '../../../base/common/lifecycle.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { AbstractEditorNavigationQuickAccessProvider } from './editorNavigationQuickAccess.js';\r\nimport { SymbolKinds, DocumentSymbolProviderRegistry } from '../../common/modes.js';\r\nimport { OutlineModel } from '../documentSymbols/outlineModel.js';\r\nimport { trim, format } from '../../../base/common/strings.js';\r\nimport { prepareQuery, pieceToQuery, scoreFuzzy2 } from '../../../base/common/fuzzyScorer.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nexport class AbstractGotoSymbolQuickAccessProvider extends AbstractEditorNavigationQuickAccessProvider {\r\n constructor(options = Object.create(null)) {\r\n super(options);\r\n this.options = options;\r\n options.canAcceptInBackground = true;\r\n }\r\n provideWithoutTextEditor(picker) {\r\n this.provideLabelPick(picker, localize('cannotRunGotoSymbolWithoutEditor', \"To go to a symbol, first open a text editor with symbol information.\"));\r\n return Disposable.None;\r\n }\r\n provideWithTextEditor(context, picker, token) {\r\n const editor = context.editor;\r\n const model = this.getModel(editor);\r\n if (!model) {\r\n return Disposable.None;\r\n }\r\n // Provide symbols from model if available in registry\r\n if (DocumentSymbolProviderRegistry.has(model)) {\r\n return this.doProvideWithEditorSymbols(context, model, picker, token);\r\n }\r\n // Otherwise show an entry for a model without registry\r\n // But give a chance to resolve the symbols at a later\r\n // point if possible\r\n return this.doProvideWithoutEditorSymbols(context, model, picker, token);\r\n }\r\n doProvideWithoutEditorSymbols(context, model, picker, token) {\r\n const disposables = new DisposableStore();\r\n // Generic pick for not having any symbol information\r\n this.provideLabelPick(picker, localize('cannotRunGotoSymbolWithoutSymbolProvider', \"The active text editor does not provide symbol information.\"));\r\n // Wait for changes to the registry and see if eventually\r\n // we do get symbols. This can happen if the picker is opened\r\n // very early after the model has loaded but before the\r\n // language registry is ready.\r\n // https://github.com/microsoft/vscode/issues/70607\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n const result = yield this.waitForLanguageSymbolRegistry(model, disposables);\r\n if (!result || token.isCancellationRequested) {\r\n return;\r\n }\r\n disposables.add(this.doProvideWithEditorSymbols(context, model, picker, token));\r\n }))();\r\n return disposables;\r\n }\r\n provideLabelPick(picker, label) {\r\n picker.items = [{ label, index: 0, kind: 14 /* String */ }];\r\n picker.ariaLabel = label;\r\n }\r\n waitForLanguageSymbolRegistry(model, disposables) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (DocumentSymbolProviderRegistry.has(model)) {\r\n return true;\r\n }\r\n let symbolProviderRegistryPromiseResolve;\r\n const symbolProviderRegistryPromise = new Promise(resolve => symbolProviderRegistryPromiseResolve = resolve);\r\n // Resolve promise when registry knows model\r\n const symbolProviderListener = disposables.add(DocumentSymbolProviderRegistry.onDidChange(() => {\r\n if (DocumentSymbolProviderRegistry.has(model)) {\r\n symbolProviderListener.dispose();\r\n symbolProviderRegistryPromiseResolve(true);\r\n }\r\n }));\r\n // Resolve promise when we get disposed too\r\n disposables.add(toDisposable(() => symbolProviderRegistryPromiseResolve(false)));\r\n return symbolProviderRegistryPromise;\r\n });\r\n }\r\n doProvideWithEditorSymbols(context, model, picker, token) {\r\n const editor = context.editor;\r\n const disposables = new DisposableStore();\r\n // Goto symbol once picked\r\n disposables.add(picker.onDidAccept(event => {\r\n const [item] = picker.selectedItems;\r\n if (item && item.range) {\r\n this.gotoLocation(context, { range: item.range.selection, keyMods: picker.keyMods, preserveFocus: event.inBackground });\r\n if (!event.inBackground) {\r\n picker.hide();\r\n }\r\n }\r\n }));\r\n // Goto symbol side by side if enabled\r\n disposables.add(picker.onDidTriggerItemButton(({ item }) => {\r\n if (item && item.range) {\r\n this.gotoLocation(context, { range: item.range.selection, keyMods: picker.keyMods, forceSideBySide: true });\r\n picker.hide();\r\n }\r\n }));\r\n // Resolve symbols from document once and reuse this\r\n // request for all filtering and typing then on\r\n const symbolsPromise = this.getDocumentSymbols(model, token);\r\n // Set initial picks and update on type\r\n let picksCts = undefined;\r\n const updatePickerItems = () => __awaiter(this, void 0, void 0, function* () {\r\n // Cancel any previous ask for picks and busy\r\n picksCts === null || picksCts === void 0 ? void 0 : picksCts.dispose(true);\r\n picker.busy = false;\r\n // Create new cancellation source for this run\r\n picksCts = new CancellationTokenSource(token);\r\n // Collect symbol picks\r\n picker.busy = true;\r\n try {\r\n const query = prepareQuery(picker.value.substr(AbstractGotoSymbolQuickAccessProvider.PREFIX.length).trim());\r\n const items = yield this.doGetSymbolPicks(symbolsPromise, query, undefined, picksCts.token);\r\n if (token.isCancellationRequested) {\r\n return;\r\n }\r\n if (items.length > 0) {\r\n picker.items = items;\r\n }\r\n else {\r\n if (query.original.length > 0) {\r\n this.provideLabelPick(picker, localize('noMatchingSymbolResults', \"No matching editor symbols\"));\r\n }\r\n else {\r\n this.provideLabelPick(picker, localize('noSymbolResults', \"No editor symbols\"));\r\n }\r\n }\r\n }\r\n finally {\r\n if (!token.isCancellationRequested) {\r\n picker.busy = false;\r\n }\r\n }\r\n });\r\n disposables.add(picker.onDidChangeValue(() => updatePickerItems()));\r\n updatePickerItems();\r\n // Reveal and decorate when active item changes\r\n // However, ignore the very first event so that\r\n // opening the picker is not immediately revealing\r\n // and decorating the first entry.\r\n let ignoreFirstActiveEvent = true;\r\n disposables.add(picker.onDidChangeActive(() => {\r\n const [item] = picker.activeItems;\r\n if (item && item.range) {\r\n if (ignoreFirstActiveEvent) {\r\n ignoreFirstActiveEvent = false;\r\n return;\r\n }\r\n // Reveal\r\n editor.revealRangeInCenter(item.range.selection, 0 /* Smooth */);\r\n // Decorate\r\n this.addDecorations(editor, item.range.decoration);\r\n }\r\n }));\r\n return disposables;\r\n }\r\n doGetSymbolPicks(symbolsPromise, query, options, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const symbols = yield symbolsPromise;\r\n if (token.isCancellationRequested) {\r\n return [];\r\n }\r\n const filterBySymbolKind = query.original.indexOf(AbstractGotoSymbolQuickAccessProvider.SCOPE_PREFIX) === 0;\r\n const filterPos = filterBySymbolKind ? 1 : 0;\r\n // Split between symbol and container query\r\n let symbolQuery;\r\n let containerQuery;\r\n if (query.values && query.values.length > 1) {\r\n symbolQuery = pieceToQuery(query.values[0]); // symbol: only match on first part\r\n containerQuery = pieceToQuery(query.values.slice(1)); // container: match on all but first parts\r\n }\r\n else {\r\n symbolQuery = query;\r\n }\r\n // Convert to symbol picks and apply filtering\r\n const filteredSymbolPicks = [];\r\n for (let index = 0; index < symbols.length; index++) {\r\n const symbol = symbols[index];\r\n const symbolLabel = trim(symbol.name);\r\n const symbolLabelWithIcon = `$(symbol-${SymbolKinds.toString(symbol.kind) || 'property'}) ${symbolLabel}`;\r\n const symbolLabelIconOffset = symbolLabelWithIcon.length - symbolLabel.length;\r\n let containerLabel = symbol.containerName;\r\n if (options === null || options === void 0 ? void 0 : options.extraContainerLabel) {\r\n if (containerLabel) {\r\n containerLabel = `${options.extraContainerLabel} • ${containerLabel}`;\r\n }\r\n else {\r\n containerLabel = options.extraContainerLabel;\r\n }\r\n }\r\n let symbolScore = undefined;\r\n let symbolMatches = undefined;\r\n let containerScore = undefined;\r\n let containerMatches = undefined;\r\n if (query.original.length > filterPos) {\r\n // First: try to score on the entire query, it is possible that\r\n // the symbol matches perfectly (e.g. searching for \"change log\"\r\n // can be a match on a markdown symbol \"change log\"). In that\r\n // case we want to skip the container query altogether.\r\n let skipContainerQuery = false;\r\n if (symbolQuery !== query) {\r\n [symbolScore, symbolMatches] = scoreFuzzy2(symbolLabelWithIcon, Object.assign(Object.assign({}, query), { values: undefined /* disable multi-query support */ }), filterPos, symbolLabelIconOffset);\r\n if (typeof symbolScore === 'number') {\r\n skipContainerQuery = true; // since we consumed the query, skip any container matching\r\n }\r\n }\r\n // Otherwise: score on the symbol query and match on the container later\r\n if (typeof symbolScore !== 'number') {\r\n [symbolScore, symbolMatches] = scoreFuzzy2(symbolLabelWithIcon, symbolQuery, filterPos, symbolLabelIconOffset);\r\n if (typeof symbolScore !== 'number') {\r\n continue;\r\n }\r\n }\r\n // Score by container if specified\r\n if (!skipContainerQuery && containerQuery) {\r\n if (containerLabel && containerQuery.original.length > 0) {\r\n [containerScore, containerMatches] = scoreFuzzy2(containerLabel, containerQuery);\r\n }\r\n if (typeof containerScore !== 'number') {\r\n continue;\r\n }\r\n if (typeof symbolScore === 'number') {\r\n symbolScore += containerScore; // boost symbolScore by containerScore\r\n }\r\n }\r\n }\r\n const deprecated = symbol.tags && symbol.tags.indexOf(1 /* Deprecated */) >= 0;\r\n filteredSymbolPicks.push({\r\n index,\r\n kind: symbol.kind,\r\n score: symbolScore,\r\n label: symbolLabelWithIcon,\r\n ariaLabel: symbolLabel,\r\n description: containerLabel,\r\n highlights: deprecated ? undefined : {\r\n label: symbolMatches,\r\n description: containerMatches\r\n },\r\n range: {\r\n selection: Range.collapseToStart(symbol.selectionRange),\r\n decoration: symbol.range\r\n },\r\n strikethrough: deprecated,\r\n buttons: (() => {\r\n var _a, _b;\r\n const openSideBySideDirection = ((_a = this.options) === null || _a === void 0 ? void 0 : _a.openSideBySideDirection) ? (_b = this.options) === null || _b === void 0 ? void 0 : _b.openSideBySideDirection() : undefined;\r\n if (!openSideBySideDirection) {\r\n return undefined;\r\n }\r\n return [\r\n {\r\n iconClass: openSideBySideDirection === 'right' ? Codicon.splitHorizontal.classNames : Codicon.splitVertical.classNames,\r\n tooltip: openSideBySideDirection === 'right' ? localize('openToSide', \"Open to the Side\") : localize('openToBottom', \"Open to the Bottom\")\r\n }\r\n ];\r\n })()\r\n });\r\n }\r\n // Sort by score\r\n const sortedFilteredSymbolPicks = filteredSymbolPicks.sort((symbolA, symbolB) => filterBySymbolKind ?\r\n this.compareByKindAndScore(symbolA, symbolB) :\r\n this.compareByScore(symbolA, symbolB));\r\n // Add separator for types\r\n // - @ only total number of symbols\r\n // - @: grouped by symbol kind\r\n let symbolPicks = [];\r\n if (filterBySymbolKind) {\r\n let lastSymbolKind = undefined;\r\n let lastSeparator = undefined;\r\n let lastSymbolKindCounter = 0;\r\n function updateLastSeparatorLabel() {\r\n if (lastSeparator && typeof lastSymbolKind === 'number' && lastSymbolKindCounter > 0) {\r\n lastSeparator.label = format(NLS_SYMBOL_KIND_CACHE[lastSymbolKind] || FALLBACK_NLS_SYMBOL_KIND, lastSymbolKindCounter);\r\n }\r\n }\r\n for (const symbolPick of sortedFilteredSymbolPicks) {\r\n // Found new kind\r\n if (lastSymbolKind !== symbolPick.kind) {\r\n // Update last separator with number of symbols we found for kind\r\n updateLastSeparatorLabel();\r\n lastSymbolKind = symbolPick.kind;\r\n lastSymbolKindCounter = 1;\r\n // Add new separator for new kind\r\n lastSeparator = { type: 'separator' };\r\n symbolPicks.push(lastSeparator);\r\n }\r\n // Existing kind, keep counting\r\n else {\r\n lastSymbolKindCounter++;\r\n }\r\n // Add to final result\r\n symbolPicks.push(symbolPick);\r\n }\r\n // Update last separator with number of symbols we found for kind\r\n updateLastSeparatorLabel();\r\n }\r\n else if (sortedFilteredSymbolPicks.length > 0) {\r\n symbolPicks = [\r\n { label: localize('symbols', \"symbols ({0})\", filteredSymbolPicks.length), type: 'separator' },\r\n ...sortedFilteredSymbolPicks\r\n ];\r\n }\r\n return symbolPicks;\r\n });\r\n }\r\n compareByScore(symbolA, symbolB) {\r\n if (typeof symbolA.score !== 'number' && typeof symbolB.score === 'number') {\r\n return 1;\r\n }\r\n else if (typeof symbolA.score === 'number' && typeof symbolB.score !== 'number') {\r\n return -1;\r\n }\r\n if (typeof symbolA.score === 'number' && typeof symbolB.score === 'number') {\r\n if (symbolA.score > symbolB.score) {\r\n return -1;\r\n }\r\n else if (symbolA.score < symbolB.score) {\r\n return 1;\r\n }\r\n }\r\n if (symbolA.index < symbolB.index) {\r\n return -1;\r\n }\r\n else if (symbolA.index > symbolB.index) {\r\n return 1;\r\n }\r\n return 0;\r\n }\r\n compareByKindAndScore(symbolA, symbolB) {\r\n const kindA = NLS_SYMBOL_KIND_CACHE[symbolA.kind] || FALLBACK_NLS_SYMBOL_KIND;\r\n const kindB = NLS_SYMBOL_KIND_CACHE[symbolB.kind] || FALLBACK_NLS_SYMBOL_KIND;\r\n // Sort by type first if scoped search\r\n const result = kindA.localeCompare(kindB);\r\n if (result === 0) {\r\n return this.compareByScore(symbolA, symbolB);\r\n }\r\n return result;\r\n }\r\n getDocumentSymbols(document, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const model = yield OutlineModel.create(document, token);\r\n return token.isCancellationRequested ? [] : model.asListOfDocumentSymbols();\r\n });\r\n }\r\n}\r\nAbstractGotoSymbolQuickAccessProvider.PREFIX = '@';\r\nAbstractGotoSymbolQuickAccessProvider.SCOPE_PREFIX = ':';\r\nAbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY = `${AbstractGotoSymbolQuickAccessProvider.PREFIX}${AbstractGotoSymbolQuickAccessProvider.SCOPE_PREFIX}`;\r\n// #region NLS Helpers\r\nconst FALLBACK_NLS_SYMBOL_KIND = localize('property', \"properties ({0})\");\r\nconst NLS_SYMBOL_KIND_CACHE = {\r\n [5 /* Method */]: localize('method', \"methods ({0})\"),\r\n [11 /* Function */]: localize('function', \"functions ({0})\"),\r\n [8 /* Constructor */]: localize('_constructor', \"constructors ({0})\"),\r\n [12 /* Variable */]: localize('variable', \"variables ({0})\"),\r\n [4 /* Class */]: localize('class', \"classes ({0})\"),\r\n [22 /* Struct */]: localize('struct', \"structs ({0})\"),\r\n [23 /* Event */]: localize('event', \"events ({0})\"),\r\n [24 /* Operator */]: localize('operator', \"operators ({0})\"),\r\n [10 /* Interface */]: localize('interface', \"interfaces ({0})\"),\r\n [2 /* Namespace */]: localize('namespace', \"namespaces ({0})\"),\r\n [3 /* Package */]: localize('package', \"packages ({0})\"),\r\n [25 /* TypeParameter */]: localize('typeParameter', \"type parameters ({0})\"),\r\n [1 /* Module */]: localize('modules', \"modules ({0})\"),\r\n [6 /* Property */]: localize('property', \"properties ({0})\"),\r\n [9 /* Enum */]: localize('enum', \"enumerations ({0})\"),\r\n [21 /* EnumMember */]: localize('enumMember', \"enumeration members ({0})\"),\r\n [14 /* String */]: localize('string', \"strings ({0})\"),\r\n [0 /* File */]: localize('file', \"files ({0})\"),\r\n [17 /* Array */]: localize('array', \"arrays ({0})\"),\r\n [15 /* Number */]: localize('number', \"numbers ({0})\"),\r\n [16 /* Boolean */]: localize('boolean', \"booleans ({0})\"),\r\n [18 /* Object */]: localize('object', \"objects ({0})\"),\r\n [19 /* Key */]: localize('key', \"keys ({0})\"),\r\n [7 /* Field */]: localize('field', \"fields ({0})\"),\r\n [13 /* Constant */]: localize('constant', \"constants ({0})\")\r\n};\r\n//#endregion\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport '../../../../base/browser/ui/codicons/codiconStyles.js'; // The codicon symbol styles are defined here and must be loaded\r\nimport '../../../contrib/symbolIcons/symbolIcons.js'; // The codicon symbol colors are defined here and must be loaded to get colors\r\nimport { AbstractGotoSymbolQuickAccessProvider } from '../../../contrib/quickAccess/gotoSymbolQuickAccess.js';\r\nimport { Registry } from '../../../../platform/registry/common/platform.js';\r\nimport { Extensions } from '../../../../platform/quickinput/common/quickAccess.js';\r\nimport { ICodeEditorService } from '../../../browser/services/codeEditorService.js';\r\nimport { withNullAsUndefined } from '../../../../base/common/types.js';\r\nimport { QuickOutlineNLS } from '../../../common/standaloneStrings.js';\r\nimport { Event } from '../../../../base/common/event.js';\r\nimport { EditorAction, registerEditorAction } from '../../../browser/editorExtensions.js';\r\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\r\nimport { IQuickInputService } from '../../../../platform/quickinput/common/quickInput.js';\r\nlet StandaloneGotoSymbolQuickAccessProvider = class StandaloneGotoSymbolQuickAccessProvider extends AbstractGotoSymbolQuickAccessProvider {\r\n constructor(editorService) {\r\n super();\r\n this.editorService = editorService;\r\n this.onDidActiveTextEditorControlChange = Event.None;\r\n }\r\n get activeTextEditorControl() {\r\n return withNullAsUndefined(this.editorService.getFocusedCodeEditor());\r\n }\r\n};\r\nStandaloneGotoSymbolQuickAccessProvider = __decorate([\r\n __param(0, ICodeEditorService)\r\n], StandaloneGotoSymbolQuickAccessProvider);\r\nexport { StandaloneGotoSymbolQuickAccessProvider };\r\nRegistry.as(Extensions.Quickaccess).registerQuickAccessProvider({\r\n ctor: StandaloneGotoSymbolQuickAccessProvider,\r\n prefix: AbstractGotoSymbolQuickAccessProvider.PREFIX,\r\n helpEntries: [\r\n { description: QuickOutlineNLS.quickOutlineActionLabel, prefix: AbstractGotoSymbolQuickAccessProvider.PREFIX, needsEditor: true },\r\n { description: QuickOutlineNLS.quickOutlineByCategoryActionLabel, prefix: AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY, needsEditor: true }\r\n ]\r\n});\r\nexport class GotoLineAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.quickOutline',\r\n label: QuickOutlineNLS.quickOutlineActionLabel,\r\n alias: 'Go to Symbol...',\r\n precondition: EditorContextKeys.hasDocumentSymbolProvider,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 2048 /* CtrlCmd */ | 1024 /* Shift */ | 45 /* KEY_O */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: 'navigation',\r\n order: 3\r\n }\r\n });\r\n }\r\n run(accessor) {\r\n accessor.get(IQuickInputService).quickAccess.show(AbstractGotoSymbolQuickAccessProvider.PREFIX);\r\n }\r\n}\r\nregisterEditorAction(GotoLineAction);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { CancellationTokenSource } from '../../../base/common/cancellation.js';\r\nimport { DisposableStore, Disposable, MutableDisposable } from '../../../base/common/lifecycle.js';\r\nimport { timeout } from '../../../base/common/async.js';\r\nexport var TriggerAction;\r\n(function (TriggerAction) {\r\n /**\r\n * Do nothing after the button was clicked.\r\n */\r\n TriggerAction[TriggerAction[\"NO_ACTION\"] = 0] = \"NO_ACTION\";\r\n /**\r\n * Close the picker.\r\n */\r\n TriggerAction[TriggerAction[\"CLOSE_PICKER\"] = 1] = \"CLOSE_PICKER\";\r\n /**\r\n * Update the results of the picker.\r\n */\r\n TriggerAction[TriggerAction[\"REFRESH_PICKER\"] = 2] = \"REFRESH_PICKER\";\r\n /**\r\n * Remove the item from the picker.\r\n */\r\n TriggerAction[TriggerAction[\"REMOVE_ITEM\"] = 3] = \"REMOVE_ITEM\";\r\n})(TriggerAction || (TriggerAction = {}));\r\nfunction isPicksWithActive(obj) {\r\n const candidate = obj;\r\n return Array.isArray(candidate.items);\r\n}\r\nfunction isFastAndSlowPicks(obj) {\r\n const candidate = obj;\r\n return !!candidate.picks && candidate.additionalPicks instanceof Promise;\r\n}\r\nexport class PickerQuickAccessProvider extends Disposable {\r\n constructor(prefix, options) {\r\n super();\r\n this.prefix = prefix;\r\n this.options = options;\r\n }\r\n provide(picker, token) {\r\n var _a;\r\n const disposables = new DisposableStore();\r\n // Apply options if any\r\n picker.canAcceptInBackground = !!((_a = this.options) === null || _a === void 0 ? void 0 : _a.canAcceptInBackground);\r\n // Disable filtering & sorting, we control the results\r\n picker.matchOnLabel = picker.matchOnDescription = picker.matchOnDetail = picker.sortByLabel = false;\r\n // Set initial picks and update on type\r\n let picksCts = undefined;\r\n const picksDisposable = disposables.add(new MutableDisposable());\r\n const updatePickerItems = () => __awaiter(this, void 0, void 0, function* () {\r\n const picksDisposables = picksDisposable.value = new DisposableStore();\r\n // Cancel any previous ask for picks and busy\r\n picksCts === null || picksCts === void 0 ? void 0 : picksCts.dispose(true);\r\n picker.busy = false;\r\n // Create new cancellation source for this run\r\n picksCts = new CancellationTokenSource(token);\r\n // Collect picks and support both long running and short or combined\r\n const picksToken = picksCts.token;\r\n const picksFilter = picker.value.substr(this.prefix.length).trim();\r\n const providedPicks = this.getPicks(picksFilter, picksDisposables, picksToken);\r\n const applyPicks = (picks, skipEmpty) => {\r\n var _a;\r\n let items;\r\n let activeItem = undefined;\r\n if (isPicksWithActive(picks)) {\r\n items = picks.items;\r\n activeItem = picks.active;\r\n }\r\n else {\r\n items = picks;\r\n }\r\n if (items.length === 0) {\r\n if (skipEmpty) {\r\n return false;\r\n }\r\n if (picksFilter.length > 0 && ((_a = this.options) === null || _a === void 0 ? void 0 : _a.noResultsPick)) {\r\n items = [this.options.noResultsPick];\r\n }\r\n }\r\n picker.items = items;\r\n if (activeItem) {\r\n picker.activeItems = [activeItem];\r\n }\r\n return true;\r\n };\r\n // No Picks\r\n if (providedPicks === null) {\r\n // Ignore\r\n }\r\n // Fast and Slow Picks\r\n else if (isFastAndSlowPicks(providedPicks)) {\r\n let fastPicksApplied = false;\r\n let slowPicksApplied = false;\r\n yield Promise.all([\r\n // Fast Picks: to reduce amount of flicker, we race against\r\n // the slow picks over 500ms and then set the fast picks.\r\n // If the slow picks are faster, we reduce the flicker by\r\n // only setting the items once.\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n yield timeout(PickerQuickAccessProvider.FAST_PICKS_RACE_DELAY);\r\n if (picksToken.isCancellationRequested) {\r\n return;\r\n }\r\n if (!slowPicksApplied) {\r\n fastPicksApplied = applyPicks(providedPicks.picks, true /* skip over empty to reduce flicker */);\r\n }\r\n }))(),\r\n // Slow Picks: we await the slow picks and then set them at\r\n // once together with the fast picks, but only if we actually\r\n // have additional results.\r\n (() => __awaiter(this, void 0, void 0, function* () {\r\n picker.busy = true;\r\n try {\r\n const awaitedAdditionalPicks = yield providedPicks.additionalPicks;\r\n if (picksToken.isCancellationRequested) {\r\n return;\r\n }\r\n let picks;\r\n let activePick = undefined;\r\n if (isPicksWithActive(providedPicks.picks)) {\r\n picks = providedPicks.picks.items;\r\n activePick = providedPicks.picks.active;\r\n }\r\n else {\r\n picks = providedPicks.picks;\r\n }\r\n let additionalPicks;\r\n let additionalActivePick = undefined;\r\n if (isPicksWithActive(awaitedAdditionalPicks)) {\r\n additionalPicks = awaitedAdditionalPicks.items;\r\n additionalActivePick = awaitedAdditionalPicks.active;\r\n }\r\n else {\r\n additionalPicks = awaitedAdditionalPicks;\r\n }\r\n if (additionalPicks.length > 0 || !fastPicksApplied) {\r\n // If we do not have any activePick or additionalActivePick\r\n // we try to preserve the currently active pick from the\r\n // fast results. This fixes an issue where the user might\r\n // have made a pick active before the additional results\r\n // kick in.\r\n // See https://github.com/microsoft/vscode/issues/102480\r\n let fallbackActivePick = undefined;\r\n if (!activePick && !additionalActivePick) {\r\n const fallbackActivePickCandidate = picker.activeItems[0];\r\n if (fallbackActivePickCandidate && picks.indexOf(fallbackActivePickCandidate) !== -1) {\r\n fallbackActivePick = fallbackActivePickCandidate;\r\n }\r\n }\r\n applyPicks({\r\n items: [...picks, ...additionalPicks],\r\n active: activePick || additionalActivePick || fallbackActivePick\r\n });\r\n }\r\n }\r\n finally {\r\n if (!picksToken.isCancellationRequested) {\r\n picker.busy = false;\r\n }\r\n slowPicksApplied = true;\r\n }\r\n }))()\r\n ]);\r\n }\r\n // Fast Picks\r\n else if (!(providedPicks instanceof Promise)) {\r\n applyPicks(providedPicks);\r\n }\r\n // Slow Picks\r\n else {\r\n picker.busy = true;\r\n try {\r\n const awaitedPicks = yield providedPicks;\r\n if (picksToken.isCancellationRequested) {\r\n return;\r\n }\r\n applyPicks(awaitedPicks);\r\n }\r\n finally {\r\n if (!picksToken.isCancellationRequested) {\r\n picker.busy = false;\r\n }\r\n }\r\n }\r\n });\r\n disposables.add(picker.onDidChangeValue(() => updatePickerItems()));\r\n updatePickerItems();\r\n // Accept the pick on accept and hide picker\r\n disposables.add(picker.onDidAccept(event => {\r\n const [item] = picker.selectedItems;\r\n if (typeof (item === null || item === void 0 ? void 0 : item.accept) === 'function') {\r\n if (!event.inBackground) {\r\n picker.hide(); // hide picker unless we accept in background\r\n }\r\n item.accept(picker.keyMods, event);\r\n }\r\n }));\r\n // Trigger the pick with button index if button triggered\r\n disposables.add(picker.onDidTriggerItemButton(({ button, item }) => __awaiter(this, void 0, void 0, function* () {\r\n var _b, _c;\r\n if (typeof item.trigger === 'function') {\r\n const buttonIndex = (_c = (_b = item.buttons) === null || _b === void 0 ? void 0 : _b.indexOf(button)) !== null && _c !== void 0 ? _c : -1;\r\n if (buttonIndex >= 0) {\r\n const result = item.trigger(buttonIndex, picker.keyMods);\r\n const action = (typeof result === 'number') ? result : yield result;\r\n if (token.isCancellationRequested) {\r\n return;\r\n }\r\n switch (action) {\r\n case TriggerAction.NO_ACTION:\r\n break;\r\n case TriggerAction.CLOSE_PICKER:\r\n picker.hide();\r\n break;\r\n case TriggerAction.REFRESH_PICKER:\r\n updatePickerItems();\r\n break;\r\n case TriggerAction.REMOVE_ITEM:\r\n const index = picker.items.indexOf(item);\r\n if (index !== -1) {\r\n const items = picker.items.slice();\r\n items.splice(index, 1);\r\n picker.items = items;\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n })));\r\n return disposables;\r\n }\r\n}\r\nPickerQuickAccessProvider.FAST_PICKS_RACE_DELAY = 200; // timeout before we accept fast results before slow results are present\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as nls from '../../nls.js';\r\nimport * as types from './types.js';\r\nimport * as arrays from './arrays.js';\r\nfunction exceptionToErrorMessage(exception, verbose) {\r\n if (verbose && (exception.stack || exception.stacktrace)) {\r\n return nls.localize('stackTrace.format', \"{0}: {1}\", detectSystemErrorMessage(exception), stackToString(exception.stack) || stackToString(exception.stacktrace));\r\n }\r\n return detectSystemErrorMessage(exception);\r\n}\r\nfunction stackToString(stack) {\r\n if (Array.isArray(stack)) {\r\n return stack.join('\\n');\r\n }\r\n return stack;\r\n}\r\nfunction detectSystemErrorMessage(exception) {\r\n // See https://nodejs.org/api/errors.html#errors_class_system_error\r\n if (typeof exception.code === 'string' && typeof exception.errno === 'number' && typeof exception.syscall === 'string') {\r\n return nls.localize('nodeExceptionMessage', \"A system error occurred ({0})\", exception.message);\r\n }\r\n return exception.message || nls.localize('error.defaultMessage', \"An unknown error occurred. Please consult the log for more details.\");\r\n}\r\n/**\r\n * Tries to generate a human readable error message out of the error. If the verbose parameter\r\n * is set to true, the error message will include stacktrace details if provided.\r\n *\r\n * @returns A string containing the error message.\r\n */\r\nexport function toErrorMessage(error = null, verbose = false) {\r\n if (!error) {\r\n return nls.localize('error.defaultMessage', \"An unknown error occurred. Please consult the log for more details.\");\r\n }\r\n if (Array.isArray(error)) {\r\n const errors = arrays.coalesce(error);\r\n const msg = toErrorMessage(errors[0], verbose);\r\n if (errors.length > 1) {\r\n return nls.localize('error.moreErrors', \"{0} ({1} errors in total)\", msg, errors.length);\r\n }\r\n return msg;\r\n }\r\n if (types.isString(error)) {\r\n return error;\r\n }\r\n if (error.detail) {\r\n const detail = error.detail;\r\n if (detail.error) {\r\n return exceptionToErrorMessage(detail.error, verbose);\r\n }\r\n if (detail.exception) {\r\n return exceptionToErrorMessage(detail.exception, verbose);\r\n }\r\n }\r\n if (error.stack) {\r\n return exceptionToErrorMessage(error, verbose);\r\n }\r\n if (error.message) {\r\n return error.message;\r\n }\r\n return nls.localize('error.defaultMessage', \"An unknown error occurred. Please consult the log for more details.\");\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { localize } from '../../../nls.js';\r\nimport { PickerQuickAccessProvider } from './pickerQuickAccess.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { or, matchesPrefix, matchesWords, matchesContiguousSubString } from '../../../base/common/filters.js';\r\nimport { withNullAsUndefined } from '../../../base/common/types.js';\r\nimport { LRUCache } from '../../../base/common/map.js';\r\nimport { IStorageService } from '../../storage/common/storage.js';\r\nimport { IConfigurationService } from '../../configuration/common/configuration.js';\r\nimport { IInstantiationService } from '../../instantiation/common/instantiation.js';\r\nimport { IKeybindingService } from '../../keybinding/common/keybinding.js';\r\nimport { ICommandService } from '../../commands/common/commands.js';\r\nimport { ITelemetryService } from '../../telemetry/common/telemetry.js';\r\nimport { isPromiseCanceledError } from '../../../base/common/errors.js';\r\nimport { INotificationService } from '../../notification/common/notification.js';\r\nimport { toErrorMessage } from '../../../base/common/errorMessage.js';\r\nlet AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvider extends PickerQuickAccessProvider {\r\n constructor(options, instantiationService, keybindingService, commandService, telemetryService, notificationService) {\r\n super(AbstractCommandsQuickAccessProvider.PREFIX, options);\r\n this.options = options;\r\n this.instantiationService = instantiationService;\r\n this.keybindingService = keybindingService;\r\n this.commandService = commandService;\r\n this.telemetryService = telemetryService;\r\n this.notificationService = notificationService;\r\n this.commandsHistory = this._register(this.instantiationService.createInstance(CommandsHistory));\r\n }\r\n getPicks(filter, disposables, token) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // Ask subclass for all command picks\r\n const allCommandPicks = yield this.getCommandPicks(disposables, token);\r\n if (token.isCancellationRequested) {\r\n return [];\r\n }\r\n // Filter\r\n const filteredCommandPicks = [];\r\n for (const commandPick of allCommandPicks) {\r\n const labelHighlights = withNullAsUndefined(AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.label));\r\n const aliasHighlights = commandPick.commandAlias ? withNullAsUndefined(AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.commandAlias)) : undefined;\r\n // Add if matching in label or alias\r\n if (labelHighlights || aliasHighlights) {\r\n commandPick.highlights = {\r\n label: labelHighlights,\r\n detail: this.options.showAlias ? aliasHighlights : undefined\r\n };\r\n filteredCommandPicks.push(commandPick);\r\n }\r\n // Also add if we have a 100% command ID match\r\n else if (filter === commandPick.commandId) {\r\n filteredCommandPicks.push(commandPick);\r\n }\r\n }\r\n // Add description to commands that have duplicate labels\r\n const mapLabelToCommand = new Map();\r\n for (const commandPick of filteredCommandPicks) {\r\n const existingCommandForLabel = mapLabelToCommand.get(commandPick.label);\r\n if (existingCommandForLabel) {\r\n commandPick.description = commandPick.commandId;\r\n existingCommandForLabel.description = existingCommandForLabel.commandId;\r\n }\r\n else {\r\n mapLabelToCommand.set(commandPick.label, commandPick);\r\n }\r\n }\r\n // Sort by MRU order and fallback to name otherwise\r\n filteredCommandPicks.sort((commandPickA, commandPickB) => {\r\n const commandACounter = this.commandsHistory.peek(commandPickA.commandId);\r\n const commandBCounter = this.commandsHistory.peek(commandPickB.commandId);\r\n if (commandACounter && commandBCounter) {\r\n return commandACounter > commandBCounter ? -1 : 1; // use more recently used command before older\r\n }\r\n if (commandACounter) {\r\n return -1; // first command was used, so it wins over the non used one\r\n }\r\n if (commandBCounter) {\r\n return 1; // other command was used so it wins over the command\r\n }\r\n // both commands were never used, so we sort by name\r\n return commandPickA.label.localeCompare(commandPickB.label);\r\n });\r\n const commandPicks = [];\r\n let addSeparator = false;\r\n for (let i = 0; i < filteredCommandPicks.length; i++) {\r\n const commandPick = filteredCommandPicks[i];\r\n const keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId);\r\n const ariaLabel = keybinding ?\r\n localize('commandPickAriaLabelWithKeybinding', \"{0}, {1}\", commandPick.label, keybinding.getAriaLabel()) :\r\n commandPick.label;\r\n // Separator: recently used\r\n if (i === 0 && this.commandsHistory.peek(commandPick.commandId)) {\r\n commandPicks.push({ type: 'separator', label: localize('recentlyUsed', \"recently used\") });\r\n addSeparator = true;\r\n }\r\n // Separator: other commands\r\n if (i !== 0 && addSeparator && !this.commandsHistory.peek(commandPick.commandId)) {\r\n commandPicks.push({ type: 'separator', label: localize('morecCommands', \"other commands\") });\r\n addSeparator = false; // only once\r\n }\r\n // Command\r\n commandPicks.push(Object.assign(Object.assign({}, commandPick), { ariaLabel, detail: this.options.showAlias && commandPick.commandAlias !== commandPick.label ? commandPick.commandAlias : undefined, keybinding, accept: () => __awaiter(this, void 0, void 0, function* () {\r\n // Add to history\r\n this.commandsHistory.push(commandPick.commandId);\r\n // Telementry\r\n this.telemetryService.publicLog2('workbenchActionExecuted', {\r\n id: commandPick.commandId,\r\n from: 'quick open'\r\n });\r\n // Run\r\n try {\r\n yield this.commandService.executeCommand(commandPick.commandId);\r\n }\r\n catch (error) {\r\n if (!isPromiseCanceledError(error)) {\r\n this.notificationService.error(localize('canNotRun', \"Command '{0}' resulted in an error ({1})\", commandPick.label, toErrorMessage(error)));\r\n }\r\n }\r\n }) }));\r\n }\r\n return commandPicks;\r\n });\r\n }\r\n};\r\nAbstractCommandsQuickAccessProvider.PREFIX = '>';\r\nAbstractCommandsQuickAccessProvider.WORD_FILTER = or(matchesPrefix, matchesWords, matchesContiguousSubString);\r\nAbstractCommandsQuickAccessProvider = __decorate([\r\n __param(1, IInstantiationService),\r\n __param(2, IKeybindingService),\r\n __param(3, ICommandService),\r\n __param(4, ITelemetryService),\r\n __param(5, INotificationService)\r\n], AbstractCommandsQuickAccessProvider);\r\nexport { AbstractCommandsQuickAccessProvider };\r\nlet CommandsHistory = class CommandsHistory extends Disposable {\r\n constructor(storageService, configurationService) {\r\n super();\r\n this.storageService = storageService;\r\n this.configurationService = configurationService;\r\n this.configuredCommandsHistoryLength = 0;\r\n this.updateConfiguration();\r\n this.load();\r\n this.registerListeners();\r\n }\r\n registerListeners() {\r\n this._register(this.configurationService.onDidChangeConfiguration(() => this.updateConfiguration()));\r\n }\r\n updateConfiguration() {\r\n this.configuredCommandsHistoryLength = CommandsHistory.getConfiguredCommandHistoryLength(this.configurationService);\r\n if (CommandsHistory.cache && CommandsHistory.cache.limit !== this.configuredCommandsHistoryLength) {\r\n CommandsHistory.cache.limit = this.configuredCommandsHistoryLength;\r\n CommandsHistory.saveState(this.storageService);\r\n }\r\n }\r\n load() {\r\n const raw = this.storageService.get(CommandsHistory.PREF_KEY_CACHE, 0 /* GLOBAL */);\r\n let serializedCache;\r\n if (raw) {\r\n try {\r\n serializedCache = JSON.parse(raw);\r\n }\r\n catch (error) {\r\n // invalid data\r\n }\r\n }\r\n const cache = CommandsHistory.cache = new LRUCache(this.configuredCommandsHistoryLength, 1);\r\n if (serializedCache) {\r\n let entries;\r\n if (serializedCache.usesLRU) {\r\n entries = serializedCache.entries;\r\n }\r\n else {\r\n entries = serializedCache.entries.sort((a, b) => a.value - b.value);\r\n }\r\n entries.forEach(entry => cache.set(entry.key, entry.value));\r\n }\r\n CommandsHistory.counter = this.storageService.getNumber(CommandsHistory.PREF_KEY_COUNTER, 0 /* GLOBAL */, CommandsHistory.counter);\r\n }\r\n push(commandId) {\r\n if (!CommandsHistory.cache) {\r\n return;\r\n }\r\n CommandsHistory.cache.set(commandId, CommandsHistory.counter++); // set counter to command\r\n CommandsHistory.saveState(this.storageService);\r\n }\r\n peek(commandId) {\r\n var _a;\r\n return (_a = CommandsHistory.cache) === null || _a === void 0 ? void 0 : _a.peek(commandId);\r\n }\r\n static saveState(storageService) {\r\n if (!CommandsHistory.cache) {\r\n return;\r\n }\r\n const serializedCache = { usesLRU: true, entries: [] };\r\n CommandsHistory.cache.forEach((value, key) => serializedCache.entries.push({ key, value }));\r\n storageService.store(CommandsHistory.PREF_KEY_CACHE, JSON.stringify(serializedCache), 0 /* GLOBAL */, 0 /* USER */);\r\n storageService.store(CommandsHistory.PREF_KEY_COUNTER, CommandsHistory.counter, 0 /* GLOBAL */, 0 /* USER */);\r\n }\r\n static getConfiguredCommandHistoryLength(configurationService) {\r\n var _a, _b;\r\n const config = configurationService.getValue();\r\n const configuredCommandHistoryLength = (_b = (_a = config.workbench) === null || _a === void 0 ? void 0 : _a.commandPalette) === null || _b === void 0 ? void 0 : _b.history;\r\n if (typeof configuredCommandHistoryLength === 'number') {\r\n return configuredCommandHistoryLength;\r\n }\r\n return CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH;\r\n }\r\n};\r\nCommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH = 50;\r\nCommandsHistory.PREF_KEY_CACHE = 'commandPalette.mru.cache';\r\nCommandsHistory.PREF_KEY_COUNTER = 'commandPalette.mru.counter';\r\nCommandsHistory.counter = 1;\r\nCommandsHistory = __decorate([\r\n __param(0, IStorageService),\r\n __param(1, IConfigurationService)\r\n], CommandsHistory);\r\nexport { CommandsHistory };\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { AbstractCommandsQuickAccessProvider } from '../../../platform/quickinput/browser/commandsQuickAccess.js';\r\nimport { stripIcons } from '../../../base/common/iconLabels.js';\r\nexport class AbstractEditorCommandsQuickAccessProvider extends AbstractCommandsQuickAccessProvider {\r\n constructor(options, instantiationService, keybindingService, commandService, telemetryService, notificationService) {\r\n super(options, instantiationService, keybindingService, commandService, telemetryService, notificationService);\r\n }\r\n getCodeEditorCommandPicks() {\r\n const activeTextEditorControl = this.activeTextEditorControl;\r\n if (!activeTextEditorControl) {\r\n return [];\r\n }\r\n const editorCommandPicks = [];\r\n for (const editorAction of activeTextEditorControl.getSupportedActions()) {\r\n editorCommandPicks.push({\r\n commandId: editorAction.id,\r\n commandAlias: editorAction.alias,\r\n label: stripIcons(editorAction.label) || editorAction.id,\r\n });\r\n }\r\n return editorCommandPicks;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { Registry } from '../../../../platform/registry/common/platform.js';\r\nimport { Extensions } from '../../../../platform/quickinput/common/quickAccess.js';\r\nimport { QuickCommandNLS } from '../../../common/standaloneStrings.js';\r\nimport { ICodeEditorService } from '../../../browser/services/codeEditorService.js';\r\nimport { AbstractEditorCommandsQuickAccessProvider } from '../../../contrib/quickAccess/commandsQuickAccess.js';\r\nimport { withNullAsUndefined } from '../../../../base/common/types.js';\r\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\r\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\r\nimport { ICommandService } from '../../../../platform/commands/common/commands.js';\r\nimport { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js';\r\nimport { INotificationService } from '../../../../platform/notification/common/notification.js';\r\nimport { EditorAction, registerEditorAction } from '../../../browser/editorExtensions.js';\r\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\r\nimport { IQuickInputService } from '../../../../platform/quickinput/common/quickInput.js';\r\nlet StandaloneCommandsQuickAccessProvider = class StandaloneCommandsQuickAccessProvider extends AbstractEditorCommandsQuickAccessProvider {\r\n constructor(instantiationService, codeEditorService, keybindingService, commandService, telemetryService, notificationService) {\r\n super({ showAlias: false }, instantiationService, keybindingService, commandService, telemetryService, notificationService);\r\n this.codeEditorService = codeEditorService;\r\n }\r\n get activeTextEditorControl() { return withNullAsUndefined(this.codeEditorService.getFocusedCodeEditor()); }\r\n getCommandPicks() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return this.getCodeEditorCommandPicks();\r\n });\r\n }\r\n};\r\nStandaloneCommandsQuickAccessProvider = __decorate([\r\n __param(0, IInstantiationService),\r\n __param(1, ICodeEditorService),\r\n __param(2, IKeybindingService),\r\n __param(3, ICommandService),\r\n __param(4, ITelemetryService),\r\n __param(5, INotificationService)\r\n], StandaloneCommandsQuickAccessProvider);\r\nexport { StandaloneCommandsQuickAccessProvider };\r\nRegistry.as(Extensions.Quickaccess).registerQuickAccessProvider({\r\n ctor: StandaloneCommandsQuickAccessProvider,\r\n prefix: StandaloneCommandsQuickAccessProvider.PREFIX,\r\n helpEntries: [{ description: QuickCommandNLS.quickCommandHelp, needsEditor: true }]\r\n});\r\nexport class GotoLineAction extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.quickCommand',\r\n label: QuickCommandNLS.quickCommandActionLabel,\r\n alias: 'Command Palette',\r\n precondition: undefined,\r\n kbOpts: {\r\n kbExpr: EditorContextKeys.focus,\r\n primary: 59 /* F1 */,\r\n weight: 100 /* EditorContrib */\r\n },\r\n contextMenuOpts: {\r\n group: 'z_commands',\r\n order: 1\r\n }\r\n });\r\n }\r\n run(accessor) {\r\n accessor.get(IQuickInputService).quickAccess.show(StandaloneCommandsQuickAccessProvider.PREFIX);\r\n }\r\n}\r\nregisterEditorAction(GotoLineAction);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { registerEditorContribution } from '../../../browser/editorExtensions.js';\r\nimport { ICodeEditorService } from '../../../browser/services/codeEditorService.js';\r\nimport { ReferencesController } from '../../../contrib/gotoSymbol/peek/referencesController.js';\r\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\r\nimport { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';\r\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\r\nimport { INotificationService } from '../../../../platform/notification/common/notification.js';\r\nimport { IStorageService } from '../../../../platform/storage/common/storage.js';\r\nlet StandaloneReferencesController = class StandaloneReferencesController extends ReferencesController {\r\n constructor(editor, contextKeyService, editorService, notificationService, instantiationService, storageService, configurationService) {\r\n super(true, editor, contextKeyService, editorService, notificationService, instantiationService, storageService, configurationService);\r\n }\r\n};\r\nStandaloneReferencesController = __decorate([\r\n __param(1, IContextKeyService),\r\n __param(2, ICodeEditorService),\r\n __param(3, INotificationService),\r\n __param(4, IInstantiationService),\r\n __param(5, IStorageService),\r\n __param(6, IConfigurationService)\r\n], StandaloneReferencesController);\r\nexport { StandaloneReferencesController };\r\nregisterEditorContribution(ReferencesController.ID, StandaloneReferencesController);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { EditorAction, registerEditorAction } from '../../../browser/editorExtensions.js';\r\nimport { IStandaloneThemeService } from '../../common/standaloneThemeService.js';\r\nimport { ToggleHighContrastNLS } from '../../../common/standaloneStrings.js';\r\nclass ToggleHighContrast extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.toggleHighContrast',\r\n label: ToggleHighContrastNLS.toggleHighContrast,\r\n alias: 'Toggle High Contrast Theme',\r\n precondition: undefined\r\n });\r\n this._originalThemeName = null;\r\n }\r\n run(accessor, editor) {\r\n const standaloneThemeService = accessor.get(IStandaloneThemeService);\r\n if (this._originalThemeName) {\r\n // We must toggle back to the integrator's theme\r\n standaloneThemeService.setTheme(this._originalThemeName);\r\n this._originalThemeName = null;\r\n }\r\n else {\r\n this._originalThemeName = standaloneThemeService.getColorTheme().themeName;\r\n standaloneThemeService.setTheme('hc-black');\r\n }\r\n }\r\n}\r\nregisterEditorAction(ToggleHighContrast);\r\n","var superPropBase = require(\"./superPropBase\");\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n module.exports = _get = Reflect.get;\n } else {\n module.exports = _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nmodule.exports = _get;","'use strict'\n\nvar normalize = require('../../normalize')\nvar Schema = require('./schema')\nvar DefinedInfo = require('./defined-info')\n\nmodule.exports = create\n\nfunction create(definition) {\n var space = definition.space\n var mustUseProperty = definition.mustUseProperty || []\n var attributes = definition.attributes || {}\n var props = definition.properties\n var transform = definition.transform\n var property = {}\n var normal = {}\n var prop\n var info\n\n for (prop in props) {\n info = new DefinedInfo(\n prop,\n transform(attributes, prop),\n props[prop],\n space\n )\n\n if (mustUseProperty.indexOf(prop) !== -1) {\n info.mustUseProperty = true\n }\n\n property[prop] = info\n\n normal[normalize(prop)] = prop\n normal[normalize(info.attribute)] = prop\n }\n\n return new Schema(property, normal, space)\n}\n","'use strict';\n\nconst NS = (exports.NAMESPACES = {\n HTML: 'http://www.w3.org/1999/xhtml',\n MATHML: 'http://www.w3.org/1998/Math/MathML',\n SVG: 'http://www.w3.org/2000/svg',\n XLINK: 'http://www.w3.org/1999/xlink',\n XML: 'http://www.w3.org/XML/1998/namespace',\n XMLNS: 'http://www.w3.org/2000/xmlns/'\n});\n\nexports.ATTRS = {\n TYPE: 'type',\n ACTION: 'action',\n ENCODING: 'encoding',\n PROMPT: 'prompt',\n NAME: 'name',\n COLOR: 'color',\n FACE: 'face',\n SIZE: 'size'\n};\n\nexports.DOCUMENT_MODE = {\n NO_QUIRKS: 'no-quirks',\n QUIRKS: 'quirks',\n LIMITED_QUIRKS: 'limited-quirks'\n};\n\nconst $ = (exports.TAG_NAMES = {\n A: 'a',\n ADDRESS: 'address',\n ANNOTATION_XML: 'annotation-xml',\n APPLET: 'applet',\n AREA: 'area',\n ARTICLE: 'article',\n ASIDE: 'aside',\n\n B: 'b',\n BASE: 'base',\n BASEFONT: 'basefont',\n BGSOUND: 'bgsound',\n BIG: 'big',\n BLOCKQUOTE: 'blockquote',\n BODY: 'body',\n BR: 'br',\n BUTTON: 'button',\n\n CAPTION: 'caption',\n CENTER: 'center',\n CODE: 'code',\n COL: 'col',\n COLGROUP: 'colgroup',\n\n DD: 'dd',\n DESC: 'desc',\n DETAILS: 'details',\n DIALOG: 'dialog',\n DIR: 'dir',\n DIV: 'div',\n DL: 'dl',\n DT: 'dt',\n\n EM: 'em',\n EMBED: 'embed',\n\n FIELDSET: 'fieldset',\n FIGCAPTION: 'figcaption',\n FIGURE: 'figure',\n FONT: 'font',\n FOOTER: 'footer',\n FOREIGN_OBJECT: 'foreignObject',\n FORM: 'form',\n FRAME: 'frame',\n FRAMESET: 'frameset',\n\n H1: 'h1',\n H2: 'h2',\n H3: 'h3',\n H4: 'h4',\n H5: 'h5',\n H6: 'h6',\n HEAD: 'head',\n HEADER: 'header',\n HGROUP: 'hgroup',\n HR: 'hr',\n HTML: 'html',\n\n I: 'i',\n IMG: 'img',\n IMAGE: 'image',\n INPUT: 'input',\n IFRAME: 'iframe',\n\n KEYGEN: 'keygen',\n\n LABEL: 'label',\n LI: 'li',\n LINK: 'link',\n LISTING: 'listing',\n\n MAIN: 'main',\n MALIGNMARK: 'malignmark',\n MARQUEE: 'marquee',\n MATH: 'math',\n MENU: 'menu',\n META: 'meta',\n MGLYPH: 'mglyph',\n MI: 'mi',\n MO: 'mo',\n MN: 'mn',\n MS: 'ms',\n MTEXT: 'mtext',\n\n NAV: 'nav',\n NOBR: 'nobr',\n NOFRAMES: 'noframes',\n NOEMBED: 'noembed',\n NOSCRIPT: 'noscript',\n\n OBJECT: 'object',\n OL: 'ol',\n OPTGROUP: 'optgroup',\n OPTION: 'option',\n\n P: 'p',\n PARAM: 'param',\n PLAINTEXT: 'plaintext',\n PRE: 'pre',\n\n RB: 'rb',\n RP: 'rp',\n RT: 'rt',\n RTC: 'rtc',\n RUBY: 'ruby',\n\n S: 's',\n SCRIPT: 'script',\n SECTION: 'section',\n SELECT: 'select',\n SOURCE: 'source',\n SMALL: 'small',\n SPAN: 'span',\n STRIKE: 'strike',\n STRONG: 'strong',\n STYLE: 'style',\n SUB: 'sub',\n SUMMARY: 'summary',\n SUP: 'sup',\n\n TABLE: 'table',\n TBODY: 'tbody',\n TEMPLATE: 'template',\n TEXTAREA: 'textarea',\n TFOOT: 'tfoot',\n TD: 'td',\n TH: 'th',\n THEAD: 'thead',\n TITLE: 'title',\n TR: 'tr',\n TRACK: 'track',\n TT: 'tt',\n\n U: 'u',\n UL: 'ul',\n\n SVG: 'svg',\n\n VAR: 'var',\n\n WBR: 'wbr',\n\n XMP: 'xmp'\n});\n\nexports.SPECIAL_ELEMENTS = {\n [NS.HTML]: {\n [$.ADDRESS]: true,\n [$.APPLET]: true,\n [$.AREA]: true,\n [$.ARTICLE]: true,\n [$.ASIDE]: true,\n [$.BASE]: true,\n [$.BASEFONT]: true,\n [$.BGSOUND]: true,\n [$.BLOCKQUOTE]: true,\n [$.BODY]: true,\n [$.BR]: true,\n [$.BUTTON]: true,\n [$.CAPTION]: true,\n [$.CENTER]: true,\n [$.COL]: true,\n [$.COLGROUP]: true,\n [$.DD]: true,\n [$.DETAILS]: true,\n [$.DIR]: true,\n [$.DIV]: true,\n [$.DL]: true,\n [$.DT]: true,\n [$.EMBED]: true,\n [$.FIELDSET]: true,\n [$.FIGCAPTION]: true,\n [$.FIGURE]: true,\n [$.FOOTER]: true,\n [$.FORM]: true,\n [$.FRAME]: true,\n [$.FRAMESET]: true,\n [$.H1]: true,\n [$.H2]: true,\n [$.H3]: true,\n [$.H4]: true,\n [$.H5]: true,\n [$.H6]: true,\n [$.HEAD]: true,\n [$.HEADER]: true,\n [$.HGROUP]: true,\n [$.HR]: true,\n [$.HTML]: true,\n [$.IFRAME]: true,\n [$.IMG]: true,\n [$.INPUT]: true,\n [$.LI]: true,\n [$.LINK]: true,\n [$.LISTING]: true,\n [$.MAIN]: true,\n [$.MARQUEE]: true,\n [$.MENU]: true,\n [$.META]: true,\n [$.NAV]: true,\n [$.NOEMBED]: true,\n [$.NOFRAMES]: true,\n [$.NOSCRIPT]: true,\n [$.OBJECT]: true,\n [$.OL]: true,\n [$.P]: true,\n [$.PARAM]: true,\n [$.PLAINTEXT]: true,\n [$.PRE]: true,\n [$.SCRIPT]: true,\n [$.SECTION]: true,\n [$.SELECT]: true,\n [$.SOURCE]: true,\n [$.STYLE]: true,\n [$.SUMMARY]: true,\n [$.TABLE]: true,\n [$.TBODY]: true,\n [$.TD]: true,\n [$.TEMPLATE]: true,\n [$.TEXTAREA]: true,\n [$.TFOOT]: true,\n [$.TH]: true,\n [$.THEAD]: true,\n [$.TITLE]: true,\n [$.TR]: true,\n [$.TRACK]: true,\n [$.UL]: true,\n [$.WBR]: true,\n [$.XMP]: true\n },\n [NS.MATHML]: {\n [$.MI]: true,\n [$.MO]: true,\n [$.MN]: true,\n [$.MS]: true,\n [$.MTEXT]: true,\n [$.ANNOTATION_XML]: true\n },\n [NS.SVG]: {\n [$.TITLE]: true,\n [$.FOREIGN_OBJECT]: true,\n [$.DESC]: true\n }\n};\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './codicon/codicon.css';\r\nimport './codicon/codicon-modifiers.css';\r\nimport { Codicon } from '../../../common/codicons.js';\r\nexport function formatRule(c) {\r\n let def = c.definition;\r\n while (def instanceof Codicon) {\r\n def = def.definition;\r\n }\r\n return `.codicon-${c.id}:before { content: '${def.character}'; }`;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport * from '../../../editor/editor.api.js';\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport * from '../../../editor/editor.api.js';\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport * from '../../../editor/editor.api.js';\r\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as platform from '../../registry/common/platform.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nexport const Extensions = {\r\n JSONContribution: 'base.contributions.json'\r\n};\r\nfunction normalizeId(id) {\r\n if (id.length > 0 && id.charAt(id.length - 1) === '#') {\r\n return id.substring(0, id.length - 1);\r\n }\r\n return id;\r\n}\r\nclass JSONContributionRegistry {\r\n constructor() {\r\n this._onDidChangeSchema = new Emitter();\r\n this.schemasById = {};\r\n }\r\n registerSchema(uri, unresolvedSchemaContent) {\r\n this.schemasById[normalizeId(uri)] = unresolvedSchemaContent;\r\n this._onDidChangeSchema.fire(uri);\r\n }\r\n notifySchemaChanged(uri) {\r\n this._onDidChangeSchema.fire(uri);\r\n }\r\n}\r\nconst jsonContributionRegistry = new JSONContributionRegistry();\r\nplatform.Registry.add(Extensions.JSONContribution, jsonContributionRegistry);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\r\nimport { TernarySearchTree } from '../../../base/common/map.js';\r\nexport const IWorkspaceContextService = createDecorator('contextService');\r\nexport class Workspace {\r\n constructor(_id, folders, _configuration, _ignorePathCasing) {\r\n this._id = _id;\r\n this._configuration = _configuration;\r\n this._ignorePathCasing = _ignorePathCasing;\r\n this._foldersMap = TernarySearchTree.forUris(this._ignorePathCasing);\r\n this.folders = folders;\r\n }\r\n get folders() {\r\n return this._folders;\r\n }\r\n set folders(folders) {\r\n this._folders = folders;\r\n this.updateFoldersMap();\r\n }\r\n get id() {\r\n return this._id;\r\n }\r\n get configuration() {\r\n return this._configuration;\r\n }\r\n set configuration(configuration) {\r\n this._configuration = configuration;\r\n }\r\n getFolder(resource) {\r\n if (!resource) {\r\n return null;\r\n }\r\n return this._foldersMap.findSubstr(resource.with({\r\n scheme: resource.scheme,\r\n authority: resource.authority,\r\n path: resource.path\r\n })) || null;\r\n }\r\n updateFoldersMap() {\r\n this._foldersMap = TernarySearchTree.forUris(this._ignorePathCasing);\r\n for (const folder of this.folders) {\r\n this._foldersMap.set(folder.uri, folder);\r\n }\r\n }\r\n toJSON() {\r\n return { id: this.id, folders: this.folders, configuration: this.configuration };\r\n }\r\n}\r\nexport class WorkspaceFolder {\r\n constructor(data, raw) {\r\n this.raw = raw;\r\n this.uri = data.uri;\r\n this.index = data.index;\r\n this.name = data.name;\r\n }\r\n toJSON() {\r\n return { uri: this.uri, name: this.name, index: this.index };\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\r\nexport const IDialogService = createDecorator('dialogService');\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport './iconlabel.css';\r\nimport * as dom from '../../dom.js';\r\nimport { HighlightedLabel } from '../highlightedlabel/highlightedLabel.js';\r\nimport { Disposable } from '../../../common/lifecycle.js';\r\nimport { Range } from '../../../common/range.js';\r\nimport { equals } from '../../../common/objects.js';\r\nimport { isMacintosh } from '../../../common/platform.js';\r\nimport { isFunction, isString } from '../../../common/types.js';\r\nimport { domEvent } from '../../event.js';\r\nimport { localize } from '../../../../nls.js';\r\nimport { CancellationTokenSource } from '../../../common/cancellation.js';\r\nclass FastLabelNode {\r\n constructor(_element) {\r\n this._element = _element;\r\n }\r\n get element() {\r\n return this._element;\r\n }\r\n set textContent(content) {\r\n if (this.disposed || content === this._textContent) {\r\n return;\r\n }\r\n this._textContent = content;\r\n this._element.textContent = content;\r\n }\r\n set className(className) {\r\n if (this.disposed || className === this._className) {\r\n return;\r\n }\r\n this._className = className;\r\n this._element.className = className;\r\n }\r\n set empty(empty) {\r\n if (this.disposed || empty === this._empty) {\r\n return;\r\n }\r\n this._empty = empty;\r\n this._element.style.marginLeft = empty ? '0' : '';\r\n }\r\n dispose() {\r\n this.disposed = true;\r\n }\r\n}\r\nexport class IconLabel extends Disposable {\r\n constructor(container, options) {\r\n super();\r\n this.hoverDelegate = undefined;\r\n this.customHovers = new Map();\r\n this.domNode = this._register(new FastLabelNode(dom.append(container, dom.$('.monaco-icon-label'))));\r\n this.labelContainer = dom.append(this.domNode.element, dom.$('.monaco-icon-label-container'));\r\n const nameContainer = dom.append(this.labelContainer, dom.$('span.monaco-icon-name-container'));\r\n this.descriptionContainer = this._register(new FastLabelNode(dom.append(this.labelContainer, dom.$('span.monaco-icon-description-container'))));\r\n if (options === null || options === void 0 ? void 0 : options.supportHighlights) {\r\n this.nameNode = new LabelWithHighlights(nameContainer, !!options.supportIcons);\r\n }\r\n else {\r\n this.nameNode = new Label(nameContainer);\r\n }\r\n if (options === null || options === void 0 ? void 0 : options.supportDescriptionHighlights) {\r\n this.descriptionNodeFactory = () => new HighlightedLabel(dom.append(this.descriptionContainer.element, dom.$('span.label-description')), !!options.supportIcons);\r\n }\r\n else {\r\n this.descriptionNodeFactory = () => this._register(new FastLabelNode(dom.append(this.descriptionContainer.element, dom.$('span.label-description'))));\r\n }\r\n if (options === null || options === void 0 ? void 0 : options.hoverDelegate) {\r\n this.hoverDelegate = options.hoverDelegate;\r\n }\r\n }\r\n setLabel(label, description, options) {\r\n const classes = ['monaco-icon-label'];\r\n if (options) {\r\n if (options.extraClasses) {\r\n classes.push(...options.extraClasses);\r\n }\r\n if (options.italic) {\r\n classes.push('italic');\r\n }\r\n if (options.strikethrough) {\r\n classes.push('strikethrough');\r\n }\r\n }\r\n this.domNode.className = classes.join(' ');\r\n this.setupHover(this.labelContainer, options === null || options === void 0 ? void 0 : options.title);\r\n this.nameNode.setLabel(label, options);\r\n if (description || this.descriptionNode) {\r\n if (!this.descriptionNode) {\r\n this.descriptionNode = this.descriptionNodeFactory(); // description node is created lazily on demand\r\n }\r\n if (this.descriptionNode instanceof HighlightedLabel) {\r\n this.descriptionNode.set(description || '', options ? options.descriptionMatches : undefined);\r\n this.setupHover(this.descriptionNode.element, options === null || options === void 0 ? void 0 : options.descriptionTitle);\r\n }\r\n else {\r\n this.descriptionNode.textContent = description || '';\r\n this.setupHover(this.descriptionNode.element, (options === null || options === void 0 ? void 0 : options.descriptionTitle) || '');\r\n this.descriptionNode.empty = !description;\r\n }\r\n }\r\n }\r\n setupHover(htmlElement, tooltip) {\r\n const previousCustomHover = this.customHovers.get(htmlElement);\r\n if (previousCustomHover) {\r\n previousCustomHover.dispose();\r\n this.customHovers.delete(htmlElement);\r\n }\r\n if (!tooltip) {\r\n htmlElement.removeAttribute('title');\r\n return;\r\n }\r\n if (!this.hoverDelegate) {\r\n return this.setupNativeHover(htmlElement, tooltip);\r\n }\r\n else {\r\n return this.setupCustomHover(this.hoverDelegate, htmlElement, tooltip);\r\n }\r\n }\r\n static adjustXAndShowCustomHover(hoverOptions, mouseX, hoverDelegate, isHovering) {\r\n if (hoverOptions && isHovering) {\r\n if (mouseX !== undefined) {\r\n hoverOptions.target.x = mouseX + 10;\r\n }\r\n hoverDelegate.showHover(hoverOptions);\r\n }\r\n }\r\n getTooltipForCustom(markdownTooltip) {\r\n if (isString(markdownTooltip)) {\r\n return () => __awaiter(this, void 0, void 0, function* () { return markdownTooltip; });\r\n }\r\n else if (isFunction(markdownTooltip.markdown)) {\r\n return markdownTooltip.markdown;\r\n }\r\n else {\r\n const markdown = markdownTooltip.markdown;\r\n return () => __awaiter(this, void 0, void 0, function* () { return markdown; });\r\n }\r\n }\r\n setupCustomHover(hoverDelegate, htmlElement, markdownTooltip) {\r\n htmlElement.setAttribute('title', '');\r\n htmlElement.removeAttribute('title');\r\n let tooltip = this.getTooltipForCustom(markdownTooltip);\r\n // Testing has indicated that on Windows and Linux 500 ms matches the native hovers most closely.\r\n // On Mac, the delay is 1500.\r\n const hoverDelay = isMacintosh ? 1500 : 500;\r\n let hoverOptions;\r\n let mouseX;\r\n let isHovering = false;\r\n let tokenSource;\r\n function mouseOver(e) {\r\n if (isHovering) {\r\n return;\r\n }\r\n tokenSource = new CancellationTokenSource();\r\n function mouseLeaveOrDown(e) {\r\n isHovering = false;\r\n hoverOptions = undefined;\r\n tokenSource.dispose(true);\r\n mouseLeaveDisposable.dispose();\r\n mouseDownDisposable.dispose();\r\n }\r\n const mouseLeaveDisposable = domEvent(htmlElement, dom.EventType.MOUSE_LEAVE, true)(mouseLeaveOrDown.bind(htmlElement));\r\n const mouseDownDisposable = domEvent(htmlElement, dom.EventType.MOUSE_DOWN, true)(mouseLeaveOrDown.bind(htmlElement));\r\n isHovering = true;\r\n function mouseMove(e) {\r\n mouseX = e.x;\r\n }\r\n const mouseMoveDisposable = domEvent(htmlElement, dom.EventType.MOUSE_MOVE, true)(mouseMove.bind(htmlElement));\r\n setTimeout(() => __awaiter(this, void 0, void 0, function* () {\r\n if (isHovering && tooltip) {\r\n // Re-use the already computed hover options if they exist.\r\n if (!hoverOptions) {\r\n const target = {\r\n targetElements: [this],\r\n dispose: () => { }\r\n };\r\n hoverOptions = {\r\n text: localize('iconLabel.loading', \"Loading...\"),\r\n target,\r\n anchorPosition: 0 /* BELOW */\r\n };\r\n IconLabel.adjustXAndShowCustomHover(hoverOptions, mouseX, hoverDelegate, isHovering);\r\n const resolvedTooltip = yield tooltip(tokenSource.token);\r\n if (resolvedTooltip) {\r\n hoverOptions = {\r\n text: resolvedTooltip,\r\n target,\r\n anchorPosition: 0 /* BELOW */\r\n };\r\n }\r\n }\r\n // awaiting the tooltip could take a while. Make sure we're still hovering.\r\n IconLabel.adjustXAndShowCustomHover(hoverOptions, mouseX, hoverDelegate, isHovering);\r\n }\r\n mouseMoveDisposable.dispose();\r\n }), hoverDelay);\r\n }\r\n const mouseOverDisposable = this._register(domEvent(htmlElement, dom.EventType.MOUSE_OVER, true)(mouseOver.bind(htmlElement)));\r\n this.customHovers.set(htmlElement, mouseOverDisposable);\r\n }\r\n setupNativeHover(htmlElement, tooltip) {\r\n let stringTooltip = '';\r\n if (isString(tooltip)) {\r\n stringTooltip = tooltip;\r\n }\r\n else if (tooltip === null || tooltip === void 0 ? void 0 : tooltip.markdownNotSupportedFallback) {\r\n stringTooltip = tooltip.markdownNotSupportedFallback;\r\n }\r\n htmlElement.title = stringTooltip;\r\n }\r\n}\r\nclass Label {\r\n constructor(container) {\r\n this.container = container;\r\n this.label = undefined;\r\n this.singleLabel = undefined;\r\n }\r\n setLabel(label, options) {\r\n if (this.label === label && equals(this.options, options)) {\r\n return;\r\n }\r\n this.label = label;\r\n this.options = options;\r\n if (typeof label === 'string') {\r\n if (!this.singleLabel) {\r\n this.container.innerText = '';\r\n this.container.classList.remove('multiple');\r\n this.singleLabel = dom.append(this.container, dom.$('a.label-name', { id: options === null || options === void 0 ? void 0 : options.domId }));\r\n }\r\n this.singleLabel.textContent = label;\r\n }\r\n else {\r\n this.container.innerText = '';\r\n this.container.classList.add('multiple');\r\n this.singleLabel = undefined;\r\n for (let i = 0; i < label.length; i++) {\r\n const l = label[i];\r\n const id = (options === null || options === void 0 ? void 0 : options.domId) && `${options === null || options === void 0 ? void 0 : options.domId}_${i}`;\r\n dom.append(this.container, dom.$('a.label-name', { id, 'data-icon-label-count': label.length, 'data-icon-label-index': i, 'role': 'treeitem' }, l));\r\n if (i < label.length - 1) {\r\n dom.append(this.container, dom.$('span.label-separator', undefined, (options === null || options === void 0 ? void 0 : options.separator) || '/'));\r\n }\r\n }\r\n }\r\n }\r\n}\r\nfunction splitMatches(labels, separator, matches) {\r\n if (!matches) {\r\n return undefined;\r\n }\r\n let labelStart = 0;\r\n return labels.map(label => {\r\n const labelRange = { start: labelStart, end: labelStart + label.length };\r\n const result = matches\r\n .map(match => Range.intersect(labelRange, match))\r\n .filter(range => !Range.isEmpty(range))\r\n .map(({ start, end }) => ({ start: start - labelStart, end: end - labelStart }));\r\n labelStart = labelRange.end + separator.length;\r\n return result;\r\n });\r\n}\r\nclass LabelWithHighlights {\r\n constructor(container, supportIcons) {\r\n this.container = container;\r\n this.supportIcons = supportIcons;\r\n this.label = undefined;\r\n this.singleLabel = undefined;\r\n }\r\n setLabel(label, options) {\r\n if (this.label === label && equals(this.options, options)) {\r\n return;\r\n }\r\n this.label = label;\r\n this.options = options;\r\n if (typeof label === 'string') {\r\n if (!this.singleLabel) {\r\n this.container.innerText = '';\r\n this.container.classList.remove('multiple');\r\n this.singleLabel = new HighlightedLabel(dom.append(this.container, dom.$('a.label-name', { id: options === null || options === void 0 ? void 0 : options.domId })), this.supportIcons);\r\n }\r\n this.singleLabel.set(label, options === null || options === void 0 ? void 0 : options.matches, undefined, options === null || options === void 0 ? void 0 : options.labelEscapeNewLines);\r\n }\r\n else {\r\n this.container.innerText = '';\r\n this.container.classList.add('multiple');\r\n this.singleLabel = undefined;\r\n const separator = (options === null || options === void 0 ? void 0 : options.separator) || '/';\r\n const matches = splitMatches(label, separator, options === null || options === void 0 ? void 0 : options.matches);\r\n for (let i = 0; i < label.length; i++) {\r\n const l = label[i];\r\n const m = matches ? matches[i] : undefined;\r\n const id = (options === null || options === void 0 ? void 0 : options.domId) && `${options === null || options === void 0 ? void 0 : options.domId}_${i}`;\r\n const name = dom.$('a.label-name', { id, 'data-icon-label-count': label.length, 'data-icon-label-index': i, 'role': 'treeitem' });\r\n const highlightedLabel = new HighlightedLabel(dom.append(this.container, name), this.supportIcons);\r\n highlightedLabel.set(l, m, undefined, options === null || options === void 0 ? void 0 : options.labelEscapeNewLines);\r\n if (i < label.length - 1) {\r\n dom.append(name, dom.$('span.label-separator', undefined, separator));\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport class ArrayNavigator {\r\n constructor(items, start = 0, end = items.length, index = start - 1) {\r\n this.items = items;\r\n this.start = start;\r\n this.end = end;\r\n this.index = index;\r\n }\r\n current() {\r\n if (this.index === this.start - 1 || this.index === this.end) {\r\n return null;\r\n }\r\n return this.items[this.index];\r\n }\r\n next() {\r\n this.index = Math.min(this.index + 1, this.end);\r\n return this.current();\r\n }\r\n previous() {\r\n this.index = Math.max(this.index - 1, this.start - 1);\r\n return this.current();\r\n }\r\n first() {\r\n this.index = this.start;\r\n return this.current();\r\n }\r\n last() {\r\n this.index = this.end - 1;\r\n return this.current();\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { ArrayNavigator } from './navigator.js';\r\nexport class HistoryNavigator {\r\n constructor(history = [], limit = 10) {\r\n this._initialize(history);\r\n this._limit = limit;\r\n this._onChange();\r\n }\r\n add(t) {\r\n this._history.delete(t);\r\n this._history.add(t);\r\n this._onChange();\r\n }\r\n next() {\r\n if (this._currentPosition() !== this._elements.length - 1) {\r\n return this._navigator.next();\r\n }\r\n return null;\r\n }\r\n previous() {\r\n if (this._currentPosition() !== 0) {\r\n return this._navigator.previous();\r\n }\r\n return null;\r\n }\r\n current() {\r\n return this._navigator.current();\r\n }\r\n first() {\r\n return this._navigator.first();\r\n }\r\n last() {\r\n return this._navigator.last();\r\n }\r\n has(t) {\r\n return this._history.has(t);\r\n }\r\n _onChange() {\r\n this._reduceToLimit();\r\n const elements = this._elements;\r\n this._navigator = new ArrayNavigator(elements, 0, elements.length, elements.length);\r\n }\r\n _reduceToLimit() {\r\n const data = this._elements;\r\n if (data.length > this._limit) {\r\n this._initialize(data.slice(data.length - this._limit));\r\n }\r\n }\r\n _currentPosition() {\r\n const currentElement = this._navigator.current();\r\n if (!currentElement) {\r\n return -1;\r\n }\r\n return this._elements.indexOf(currentElement);\r\n }\r\n _initialize(history) {\r\n this._history = new Set();\r\n for (const entry of history) {\r\n this._history.add(entry);\r\n }\r\n }\r\n get _elements() {\r\n const elements = [];\r\n this._history.forEach(e => elements.push(e));\r\n return elements;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './inputBox.css';\r\nimport * as nls from '../../../../nls.js';\r\nimport * as dom from '../../dom.js';\r\nimport { renderFormattedText, renderText } from '../../formattedTextRenderer.js';\r\nimport * as aria from '../aria/aria.js';\r\nimport { ActionBar } from '../actionbar/actionbar.js';\r\nimport { Event, Emitter } from '../../../common/event.js';\r\nimport { Widget } from '../widget.js';\r\nimport { Color } from '../../../common/color.js';\r\nimport { mixin } from '../../../common/objects.js';\r\nimport { HistoryNavigator } from '../../../common/history.js';\r\nimport { ScrollableElement } from '../scrollbar/scrollableElement.js';\r\nimport { domEvent } from '../../event.js';\r\nconst $ = dom.$;\r\nconst defaultOpts = {\r\n inputBackground: Color.fromHex('#3C3C3C'),\r\n inputForeground: Color.fromHex('#CCCCCC'),\r\n inputValidationInfoBorder: Color.fromHex('#55AAFF'),\r\n inputValidationInfoBackground: Color.fromHex('#063B49'),\r\n inputValidationWarningBorder: Color.fromHex('#B89500'),\r\n inputValidationWarningBackground: Color.fromHex('#352A05'),\r\n inputValidationErrorBorder: Color.fromHex('#BE1100'),\r\n inputValidationErrorBackground: Color.fromHex('#5A1D1D')\r\n};\r\nexport class InputBox extends Widget {\r\n constructor(container, contextViewProvider, options) {\r\n super();\r\n this.state = 'idle';\r\n this.maxHeight = Number.POSITIVE_INFINITY;\r\n this._onDidChange = this._register(new Emitter());\r\n this.onDidChange = this._onDidChange.event;\r\n this._onDidHeightChange = this._register(new Emitter());\r\n this.onDidHeightChange = this._onDidHeightChange.event;\r\n this.contextViewProvider = contextViewProvider;\r\n this.options = options || Object.create(null);\r\n mixin(this.options, defaultOpts, false);\r\n this.message = null;\r\n this.placeholder = this.options.placeholder || '';\r\n this.ariaLabel = this.options.ariaLabel || '';\r\n this.inputBackground = this.options.inputBackground;\r\n this.inputForeground = this.options.inputForeground;\r\n this.inputBorder = this.options.inputBorder;\r\n this.inputValidationInfoBorder = this.options.inputValidationInfoBorder;\r\n this.inputValidationInfoBackground = this.options.inputValidationInfoBackground;\r\n this.inputValidationInfoForeground = this.options.inputValidationInfoForeground;\r\n this.inputValidationWarningBorder = this.options.inputValidationWarningBorder;\r\n this.inputValidationWarningBackground = this.options.inputValidationWarningBackground;\r\n this.inputValidationWarningForeground = this.options.inputValidationWarningForeground;\r\n this.inputValidationErrorBorder = this.options.inputValidationErrorBorder;\r\n this.inputValidationErrorBackground = this.options.inputValidationErrorBackground;\r\n this.inputValidationErrorForeground = this.options.inputValidationErrorForeground;\r\n if (this.options.validationOptions) {\r\n this.validation = this.options.validationOptions.validation;\r\n }\r\n this.element = dom.append(container, $('.monaco-inputbox.idle'));\r\n let tagName = this.options.flexibleHeight ? 'textarea' : 'input';\r\n let wrapper = dom.append(this.element, $('.ibwrapper'));\r\n this.input = dom.append(wrapper, $(tagName + '.input.empty'));\r\n this.input.setAttribute('autocorrect', 'off');\r\n this.input.setAttribute('autocapitalize', 'off');\r\n this.input.setAttribute('spellcheck', 'false');\r\n this.onfocus(this.input, () => this.element.classList.add('synthetic-focus'));\r\n this.onblur(this.input, () => this.element.classList.remove('synthetic-focus'));\r\n if (this.options.flexibleHeight) {\r\n this.maxHeight = typeof this.options.flexibleMaxHeight === 'number' ? this.options.flexibleMaxHeight : Number.POSITIVE_INFINITY;\r\n this.mirror = dom.append(wrapper, $('div.mirror'));\r\n this.mirror.innerText = '\\u00a0';\r\n this.scrollableElement = new ScrollableElement(this.element, { vertical: 1 /* Auto */ });\r\n if (this.options.flexibleWidth) {\r\n this.input.setAttribute('wrap', 'off');\r\n this.mirror.style.whiteSpace = 'pre';\r\n this.mirror.style.wordWrap = 'initial';\r\n }\r\n dom.append(container, this.scrollableElement.getDomNode());\r\n this._register(this.scrollableElement);\r\n // from ScrollableElement to DOM\r\n this._register(this.scrollableElement.onScroll(e => this.input.scrollTop = e.scrollTop));\r\n const onSelectionChange = Event.filter(domEvent(document, 'selectionchange'), () => {\r\n const selection = document.getSelection();\r\n return (selection === null || selection === void 0 ? void 0 : selection.anchorNode) === wrapper;\r\n });\r\n // from DOM to ScrollableElement\r\n this._register(onSelectionChange(this.updateScrollDimensions, this));\r\n this._register(this.onDidHeightChange(this.updateScrollDimensions, this));\r\n }\r\n else {\r\n this.input.type = this.options.type || 'text';\r\n this.input.setAttribute('wrap', 'off');\r\n }\r\n if (this.ariaLabel) {\r\n this.input.setAttribute('aria-label', this.ariaLabel);\r\n }\r\n if (this.placeholder) {\r\n this.setPlaceHolder(this.placeholder);\r\n }\r\n this.oninput(this.input, () => this.onValueChange());\r\n this.onblur(this.input, () => this.onBlur());\r\n this.onfocus(this.input, () => this.onFocus());\r\n this.ignoreGesture(this.input);\r\n setTimeout(() => this.updateMirror(), 0);\r\n // Support actions\r\n if (this.options.actions) {\r\n this.actionbar = this._register(new ActionBar(this.element));\r\n this.actionbar.push(this.options.actions, { icon: true, label: false });\r\n }\r\n this.applyStyles();\r\n }\r\n onBlur() {\r\n this._hideMessage();\r\n }\r\n onFocus() {\r\n this._showMessage();\r\n }\r\n setPlaceHolder(placeHolder) {\r\n this.placeholder = placeHolder;\r\n this.input.setAttribute('placeholder', placeHolder);\r\n this.input.title = placeHolder;\r\n }\r\n setAriaLabel(label) {\r\n this.ariaLabel = label;\r\n if (label) {\r\n this.input.setAttribute('aria-label', this.ariaLabel);\r\n }\r\n else {\r\n this.input.removeAttribute('aria-label');\r\n }\r\n }\r\n getAriaLabel() {\r\n return this.ariaLabel;\r\n }\r\n get inputElement() {\r\n return this.input;\r\n }\r\n get value() {\r\n return this.input.value;\r\n }\r\n set value(newValue) {\r\n if (this.input.value !== newValue) {\r\n this.input.value = newValue;\r\n this.onValueChange();\r\n }\r\n }\r\n get height() {\r\n return typeof this.cachedHeight === 'number' ? this.cachedHeight : dom.getTotalHeight(this.element);\r\n }\r\n focus() {\r\n this.input.focus();\r\n }\r\n blur() {\r\n this.input.blur();\r\n }\r\n hasFocus() {\r\n return document.activeElement === this.input;\r\n }\r\n select(range = null) {\r\n this.input.select();\r\n if (range) {\r\n this.input.setSelectionRange(range.start, range.end);\r\n }\r\n }\r\n isSelectionAtEnd() {\r\n return this.input.selectionEnd === this.input.value.length && this.input.selectionStart === this.input.selectionEnd;\r\n }\r\n enable() {\r\n this.input.removeAttribute('disabled');\r\n }\r\n disable() {\r\n this.blur();\r\n this.input.disabled = true;\r\n this._hideMessage();\r\n }\r\n get width() {\r\n return dom.getTotalWidth(this.input);\r\n }\r\n set width(width) {\r\n if (this.options.flexibleHeight && this.options.flexibleWidth) {\r\n // textarea with horizontal scrolling\r\n let horizontalPadding = 0;\r\n if (this.mirror) {\r\n const paddingLeft = parseFloat(this.mirror.style.paddingLeft || '') || 0;\r\n const paddingRight = parseFloat(this.mirror.style.paddingRight || '') || 0;\r\n horizontalPadding = paddingLeft + paddingRight;\r\n }\r\n this.input.style.width = (width - horizontalPadding) + 'px';\r\n }\r\n else {\r\n this.input.style.width = width + 'px';\r\n }\r\n if (this.mirror) {\r\n this.mirror.style.width = width + 'px';\r\n }\r\n }\r\n set paddingRight(paddingRight) {\r\n if (this.options.flexibleHeight && this.options.flexibleWidth) {\r\n this.input.style.width = `calc(100% - ${paddingRight}px)`;\r\n }\r\n else {\r\n this.input.style.paddingRight = paddingRight + 'px';\r\n }\r\n if (this.mirror) {\r\n this.mirror.style.paddingRight = paddingRight + 'px';\r\n }\r\n }\r\n updateScrollDimensions() {\r\n if (typeof this.cachedContentHeight !== 'number' || typeof this.cachedHeight !== 'number' || !this.scrollableElement) {\r\n return;\r\n }\r\n const scrollHeight = this.cachedContentHeight;\r\n const height = this.cachedHeight;\r\n const scrollTop = this.input.scrollTop;\r\n this.scrollableElement.setScrollDimensions({ scrollHeight, height });\r\n this.scrollableElement.setScrollPosition({ scrollTop });\r\n }\r\n showMessage(message, force) {\r\n this.message = message;\r\n this.element.classList.remove('idle');\r\n this.element.classList.remove('info');\r\n this.element.classList.remove('warning');\r\n this.element.classList.remove('error');\r\n this.element.classList.add(this.classForType(message.type));\r\n const styles = this.stylesForType(this.message.type);\r\n this.element.style.border = styles.border ? `1px solid ${styles.border}` : '';\r\n if (this.hasFocus() || force) {\r\n this._showMessage();\r\n }\r\n }\r\n hideMessage() {\r\n this.message = null;\r\n this.element.classList.remove('info');\r\n this.element.classList.remove('warning');\r\n this.element.classList.remove('error');\r\n this.element.classList.add('idle');\r\n this._hideMessage();\r\n this.applyStyles();\r\n }\r\n validate() {\r\n let errorMsg = null;\r\n if (this.validation) {\r\n errorMsg = this.validation(this.value);\r\n if (errorMsg) {\r\n this.inputElement.setAttribute('aria-invalid', 'true');\r\n this.showMessage(errorMsg);\r\n }\r\n else if (this.inputElement.hasAttribute('aria-invalid')) {\r\n this.inputElement.removeAttribute('aria-invalid');\r\n this.hideMessage();\r\n }\r\n }\r\n return errorMsg === null || errorMsg === void 0 ? void 0 : errorMsg.type;\r\n }\r\n stylesForType(type) {\r\n switch (type) {\r\n case 1 /* INFO */: return { border: this.inputValidationInfoBorder, background: this.inputValidationInfoBackground, foreground: this.inputValidationInfoForeground };\r\n case 2 /* WARNING */: return { border: this.inputValidationWarningBorder, background: this.inputValidationWarningBackground, foreground: this.inputValidationWarningForeground };\r\n default: return { border: this.inputValidationErrorBorder, background: this.inputValidationErrorBackground, foreground: this.inputValidationErrorForeground };\r\n }\r\n }\r\n classForType(type) {\r\n switch (type) {\r\n case 1 /* INFO */: return 'info';\r\n case 2 /* WARNING */: return 'warning';\r\n default: return 'error';\r\n }\r\n }\r\n _showMessage() {\r\n if (!this.contextViewProvider || !this.message) {\r\n return;\r\n }\r\n let div;\r\n let layout = () => div.style.width = dom.getTotalWidth(this.element) + 'px';\r\n this.contextViewProvider.showContextView({\r\n getAnchor: () => this.element,\r\n anchorAlignment: 1 /* RIGHT */,\r\n render: (container) => {\r\n if (!this.message) {\r\n return null;\r\n }\r\n div = dom.append(container, $('.monaco-inputbox-container'));\r\n layout();\r\n const renderOptions = {\r\n inline: true,\r\n className: 'monaco-inputbox-message'\r\n };\r\n const spanElement = (this.message.formatContent\r\n ? renderFormattedText(this.message.content, renderOptions)\r\n : renderText(this.message.content, renderOptions));\r\n spanElement.classList.add(this.classForType(this.message.type));\r\n const styles = this.stylesForType(this.message.type);\r\n spanElement.style.backgroundColor = styles.background ? styles.background.toString() : '';\r\n spanElement.style.color = styles.foreground ? styles.foreground.toString() : '';\r\n spanElement.style.border = styles.border ? `1px solid ${styles.border}` : '';\r\n dom.append(div, spanElement);\r\n return null;\r\n },\r\n onHide: () => {\r\n this.state = 'closed';\r\n },\r\n layout: layout\r\n });\r\n // ARIA Support\r\n let alertText;\r\n if (this.message.type === 3 /* ERROR */) {\r\n alertText = nls.localize('alertErrorMessage', \"Error: {0}\", this.message.content);\r\n }\r\n else if (this.message.type === 2 /* WARNING */) {\r\n alertText = nls.localize('alertWarningMessage', \"Warning: {0}\", this.message.content);\r\n }\r\n else {\r\n alertText = nls.localize('alertInfoMessage', \"Info: {0}\", this.message.content);\r\n }\r\n aria.alert(alertText);\r\n this.state = 'open';\r\n }\r\n _hideMessage() {\r\n if (!this.contextViewProvider) {\r\n return;\r\n }\r\n if (this.state === 'open') {\r\n this.contextViewProvider.hideContextView();\r\n }\r\n this.state = 'idle';\r\n }\r\n onValueChange() {\r\n this._onDidChange.fire(this.value);\r\n this.validate();\r\n this.updateMirror();\r\n this.input.classList.toggle('empty', !this.value);\r\n if (this.state === 'open' && this.contextViewProvider) {\r\n this.contextViewProvider.layout();\r\n }\r\n }\r\n updateMirror() {\r\n if (!this.mirror) {\r\n return;\r\n }\r\n const value = this.value;\r\n const lastCharCode = value.charCodeAt(value.length - 1);\r\n const suffix = lastCharCode === 10 ? ' ' : '';\r\n const mirrorTextContent = value + suffix;\r\n if (mirrorTextContent) {\r\n this.mirror.textContent = value + suffix;\r\n }\r\n else {\r\n this.mirror.innerText = '\\u00a0';\r\n }\r\n this.layout();\r\n }\r\n style(styles) {\r\n this.inputBackground = styles.inputBackground;\r\n this.inputForeground = styles.inputForeground;\r\n this.inputBorder = styles.inputBorder;\r\n this.inputValidationInfoBackground = styles.inputValidationInfoBackground;\r\n this.inputValidationInfoForeground = styles.inputValidationInfoForeground;\r\n this.inputValidationInfoBorder = styles.inputValidationInfoBorder;\r\n this.inputValidationWarningBackground = styles.inputValidationWarningBackground;\r\n this.inputValidationWarningForeground = styles.inputValidationWarningForeground;\r\n this.inputValidationWarningBorder = styles.inputValidationWarningBorder;\r\n this.inputValidationErrorBackground = styles.inputValidationErrorBackground;\r\n this.inputValidationErrorForeground = styles.inputValidationErrorForeground;\r\n this.inputValidationErrorBorder = styles.inputValidationErrorBorder;\r\n this.applyStyles();\r\n }\r\n applyStyles() {\r\n const background = this.inputBackground ? this.inputBackground.toString() : '';\r\n const foreground = this.inputForeground ? this.inputForeground.toString() : '';\r\n const border = this.inputBorder ? this.inputBorder.toString() : '';\r\n this.element.style.backgroundColor = background;\r\n this.element.style.color = foreground;\r\n this.input.style.backgroundColor = 'inherit';\r\n this.input.style.color = foreground;\r\n this.element.style.borderWidth = border ? '1px' : '';\r\n this.element.style.borderStyle = border ? 'solid' : '';\r\n this.element.style.borderColor = border;\r\n }\r\n layout() {\r\n if (!this.mirror) {\r\n return;\r\n }\r\n const previousHeight = this.cachedContentHeight;\r\n this.cachedContentHeight = dom.getTotalHeight(this.mirror);\r\n if (previousHeight !== this.cachedContentHeight) {\r\n this.cachedHeight = Math.min(this.cachedContentHeight, this.maxHeight);\r\n this.input.style.height = this.cachedHeight + 'px';\r\n this._onDidHeightChange.fire(this.cachedContentHeight);\r\n }\r\n }\r\n insertAtCursor(text) {\r\n const inputElement = this.inputElement;\r\n const start = inputElement.selectionStart;\r\n const end = inputElement.selectionEnd;\r\n const content = inputElement.value;\r\n if (start !== null && end !== null) {\r\n this.value = content.substr(0, start) + text + content.substr(end);\r\n inputElement.setSelectionRange(start + 1, start + 1);\r\n this.layout();\r\n }\r\n }\r\n dispose() {\r\n this._hideMessage();\r\n this.message = null;\r\n if (this.actionbar) {\r\n this.actionbar.dispose();\r\n }\r\n super.dispose();\r\n }\r\n}\r\nexport class HistoryInputBox extends InputBox {\r\n constructor(container, contextViewProvider, options) {\r\n super(container, contextViewProvider, options);\r\n this.history = new HistoryNavigator(options.history, 100);\r\n }\r\n addToHistory() {\r\n if (this.value && this.value !== this.getCurrentValue()) {\r\n this.history.add(this.value);\r\n }\r\n }\r\n showNextValue() {\r\n if (!this.history.has(this.value)) {\r\n this.addToHistory();\r\n }\r\n let next = this.getNextValue();\r\n if (next) {\r\n next = next === this.value ? this.getNextValue() : next;\r\n }\r\n if (next) {\r\n this.value = next;\r\n aria.status(this.value);\r\n }\r\n }\r\n showPreviousValue() {\r\n if (!this.history.has(this.value)) {\r\n this.addToHistory();\r\n }\r\n let previous = this.getPreviousValue();\r\n if (previous) {\r\n previous = previous === this.value ? this.getPreviousValue() : previous;\r\n }\r\n if (previous) {\r\n this.value = previous;\r\n aria.status(this.value);\r\n }\r\n }\r\n getCurrentValue() {\r\n let currentValue = this.history.current();\r\n if (!currentValue) {\r\n currentValue = this.history.last();\r\n this.history.next();\r\n }\r\n return currentValue;\r\n }\r\n getPreviousValue() {\r\n return this.history.previous() || this.history.first();\r\n }\r\n getNextValue() {\r\n return this.history.next() || this.history.last();\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * Represents information about a specific difference between two sequences.\r\n */\r\nexport class DiffChange {\r\n /**\r\n * Constructs a new DiffChange with the given sequence information\r\n * and content.\r\n */\r\n constructor(originalStart, originalLength, modifiedStart, modifiedLength) {\r\n //Debug.Assert(originalLength > 0 || modifiedLength > 0, \"originalLength and modifiedLength cannot both be <= 0\");\r\n this.originalStart = originalStart;\r\n this.originalLength = originalLength;\r\n this.modifiedStart = modifiedStart;\r\n this.modifiedLength = modifiedLength;\r\n }\r\n /**\r\n * The end point (exclusive) of the change in the original sequence.\r\n */\r\n getOriginalEnd() {\r\n return this.originalStart + this.originalLength;\r\n }\r\n /**\r\n * The end point (exclusive) of the change in the modified sequence.\r\n */\r\n getModifiedEnd() {\r\n return this.modifiedStart + this.modifiedLength;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { DiffChange } from './diffChange.js';\r\nimport { stringHash } from '../hash.js';\r\nexport class StringDiffSequence {\r\n constructor(source) {\r\n this.source = source;\r\n }\r\n getElements() {\r\n const source = this.source;\r\n const characters = new Int32Array(source.length);\r\n for (let i = 0, len = source.length; i < len; i++) {\r\n characters[i] = source.charCodeAt(i);\r\n }\r\n return characters;\r\n }\r\n}\r\nexport function stringDiff(original, modified, pretty) {\r\n return new LcsDiff(new StringDiffSequence(original), new StringDiffSequence(modified)).ComputeDiff(pretty).changes;\r\n}\r\n//\r\n// The code below has been ported from a C# implementation in VS\r\n//\r\nexport class Debug {\r\n static Assert(condition, message) {\r\n if (!condition) {\r\n throw new Error(message);\r\n }\r\n }\r\n}\r\nexport class MyArray {\r\n /**\r\n * Copies a range of elements from an Array starting at the specified source index and pastes\r\n * them to another Array starting at the specified destination index. The length and the indexes\r\n * are specified as 64-bit integers.\r\n * sourceArray:\r\n *\t\tThe Array that contains the data to copy.\r\n * sourceIndex:\r\n *\t\tA 64-bit integer that represents the index in the sourceArray at which copying begins.\r\n * destinationArray:\r\n *\t\tThe Array that receives the data.\r\n * destinationIndex:\r\n *\t\tA 64-bit integer that represents the index in the destinationArray at which storing begins.\r\n * length:\r\n *\t\tA 64-bit integer that represents the number of elements to copy.\r\n */\r\n static Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) {\r\n for (let i = 0; i < length; i++) {\r\n destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i];\r\n }\r\n }\r\n static Copy2(sourceArray, sourceIndex, destinationArray, destinationIndex, length) {\r\n for (let i = 0; i < length; i++) {\r\n destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i];\r\n }\r\n }\r\n}\r\n/**\r\n * A utility class which helps to create the set of DiffChanges from\r\n * a difference operation. This class accepts original DiffElements and\r\n * modified DiffElements that are involved in a particular change. The\r\n * MarktNextChange() method can be called to mark the separation between\r\n * distinct changes. At the end, the Changes property can be called to retrieve\r\n * the constructed changes.\r\n */\r\nclass DiffChangeHelper {\r\n /**\r\n * Constructs a new DiffChangeHelper for the given DiffSequences.\r\n */\r\n constructor() {\r\n this.m_changes = [];\r\n this.m_originalStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n this.m_modifiedStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n this.m_originalCount = 0;\r\n this.m_modifiedCount = 0;\r\n }\r\n /**\r\n * Marks the beginning of the next change in the set of differences.\r\n */\r\n MarkNextChange() {\r\n // Only add to the list if there is something to add\r\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\r\n // Add the new change to our list\r\n this.m_changes.push(new DiffChange(this.m_originalStart, this.m_originalCount, this.m_modifiedStart, this.m_modifiedCount));\r\n }\r\n // Reset for the next change\r\n this.m_originalCount = 0;\r\n this.m_modifiedCount = 0;\r\n this.m_originalStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n this.m_modifiedStart = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n }\r\n /**\r\n * Adds the original element at the given position to the elements\r\n * affected by the current change. The modified index gives context\r\n * to the change position with respect to the original sequence.\r\n * @param originalIndex The index of the original element to add.\r\n * @param modifiedIndex The index of the modified element that provides corresponding position in the modified sequence.\r\n */\r\n AddOriginalElement(originalIndex, modifiedIndex) {\r\n // The 'true' start index is the smallest of the ones we've seen\r\n this.m_originalStart = Math.min(this.m_originalStart, originalIndex);\r\n this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex);\r\n this.m_originalCount++;\r\n }\r\n /**\r\n * Adds the modified element at the given position to the elements\r\n * affected by the current change. The original index gives context\r\n * to the change position with respect to the modified sequence.\r\n * @param originalIndex The index of the original element that provides corresponding position in the original sequence.\r\n * @param modifiedIndex The index of the modified element to add.\r\n */\r\n AddModifiedElement(originalIndex, modifiedIndex) {\r\n // The 'true' start index is the smallest of the ones we've seen\r\n this.m_originalStart = Math.min(this.m_originalStart, originalIndex);\r\n this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex);\r\n this.m_modifiedCount++;\r\n }\r\n /**\r\n * Retrieves all of the changes marked by the class.\r\n */\r\n getChanges() {\r\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\r\n // Finish up on whatever is left\r\n this.MarkNextChange();\r\n }\r\n return this.m_changes;\r\n }\r\n /**\r\n * Retrieves all of the changes marked by the class in the reverse order\r\n */\r\n getReverseChanges() {\r\n if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {\r\n // Finish up on whatever is left\r\n this.MarkNextChange();\r\n }\r\n this.m_changes.reverse();\r\n return this.m_changes;\r\n }\r\n}\r\n/**\r\n * An implementation of the difference algorithm described in\r\n * \"An O(ND) Difference Algorithm and its variations\" by Eugene W. Myers\r\n */\r\nexport class LcsDiff {\r\n /**\r\n * Constructs the DiffFinder\r\n */\r\n constructor(originalSequence, modifiedSequence, continueProcessingPredicate = null) {\r\n this.ContinueProcessingPredicate = continueProcessingPredicate;\r\n const [originalStringElements, originalElementsOrHash, originalHasStrings] = LcsDiff._getElements(originalSequence);\r\n const [modifiedStringElements, modifiedElementsOrHash, modifiedHasStrings] = LcsDiff._getElements(modifiedSequence);\r\n this._hasStrings = (originalHasStrings && modifiedHasStrings);\r\n this._originalStringElements = originalStringElements;\r\n this._originalElementsOrHash = originalElementsOrHash;\r\n this._modifiedStringElements = modifiedStringElements;\r\n this._modifiedElementsOrHash = modifiedElementsOrHash;\r\n this.m_forwardHistory = [];\r\n this.m_reverseHistory = [];\r\n }\r\n static _isStringArray(arr) {\r\n return (arr.length > 0 && typeof arr[0] === 'string');\r\n }\r\n static _getElements(sequence) {\r\n const elements = sequence.getElements();\r\n if (LcsDiff._isStringArray(elements)) {\r\n const hashes = new Int32Array(elements.length);\r\n for (let i = 0, len = elements.length; i < len; i++) {\r\n hashes[i] = stringHash(elements[i], 0);\r\n }\r\n return [elements, hashes, true];\r\n }\r\n if (elements instanceof Int32Array) {\r\n return [[], elements, false];\r\n }\r\n return [[], new Int32Array(elements), false];\r\n }\r\n ElementsAreEqual(originalIndex, newIndex) {\r\n if (this._originalElementsOrHash[originalIndex] !== this._modifiedElementsOrHash[newIndex]) {\r\n return false;\r\n }\r\n return (this._hasStrings ? this._originalStringElements[originalIndex] === this._modifiedStringElements[newIndex] : true);\r\n }\r\n OriginalElementsAreEqual(index1, index2) {\r\n if (this._originalElementsOrHash[index1] !== this._originalElementsOrHash[index2]) {\r\n return false;\r\n }\r\n return (this._hasStrings ? this._originalStringElements[index1] === this._originalStringElements[index2] : true);\r\n }\r\n ModifiedElementsAreEqual(index1, index2) {\r\n if (this._modifiedElementsOrHash[index1] !== this._modifiedElementsOrHash[index2]) {\r\n return false;\r\n }\r\n return (this._hasStrings ? this._modifiedStringElements[index1] === this._modifiedStringElements[index2] : true);\r\n }\r\n ComputeDiff(pretty) {\r\n return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, pretty);\r\n }\r\n /**\r\n * Computes the differences between the original and modified input\r\n * sequences on the bounded range.\r\n * @returns An array of the differences between the two input sequences.\r\n */\r\n _ComputeDiff(originalStart, originalEnd, modifiedStart, modifiedEnd, pretty) {\r\n const quitEarlyArr = [false];\r\n let changes = this.ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr);\r\n if (pretty) {\r\n // We have to clean up the computed diff to be more intuitive\r\n // but it turns out this cannot be done correctly until the entire set\r\n // of diffs have been computed\r\n changes = this.PrettifyChanges(changes);\r\n }\r\n return {\r\n quitEarly: quitEarlyArr[0],\r\n changes: changes\r\n };\r\n }\r\n /**\r\n * Private helper method which computes the differences on the bounded range\r\n * recursively.\r\n * @returns An array of the differences between the two input sequences.\r\n */\r\n ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr) {\r\n quitEarlyArr[0] = false;\r\n // Find the start of the differences\r\n while (originalStart <= originalEnd && modifiedStart <= modifiedEnd && this.ElementsAreEqual(originalStart, modifiedStart)) {\r\n originalStart++;\r\n modifiedStart++;\r\n }\r\n // Find the end of the differences\r\n while (originalEnd >= originalStart && modifiedEnd >= modifiedStart && this.ElementsAreEqual(originalEnd, modifiedEnd)) {\r\n originalEnd--;\r\n modifiedEnd--;\r\n }\r\n // In the special case where we either have all insertions or all deletions or the sequences are identical\r\n if (originalStart > originalEnd || modifiedStart > modifiedEnd) {\r\n let changes;\r\n if (modifiedStart <= modifiedEnd) {\r\n Debug.Assert(originalStart === originalEnd + 1, 'originalStart should only be one more than originalEnd');\r\n // All insertions\r\n changes = [\r\n new DiffChange(originalStart, 0, modifiedStart, modifiedEnd - modifiedStart + 1)\r\n ];\r\n }\r\n else if (originalStart <= originalEnd) {\r\n Debug.Assert(modifiedStart === modifiedEnd + 1, 'modifiedStart should only be one more than modifiedEnd');\r\n // All deletions\r\n changes = [\r\n new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, 0)\r\n ];\r\n }\r\n else {\r\n Debug.Assert(originalStart === originalEnd + 1, 'originalStart should only be one more than originalEnd');\r\n Debug.Assert(modifiedStart === modifiedEnd + 1, 'modifiedStart should only be one more than modifiedEnd');\r\n // Identical sequences - No differences\r\n changes = [];\r\n }\r\n return changes;\r\n }\r\n // This problem can be solved using the Divide-And-Conquer technique.\r\n const midOriginalArr = [0];\r\n const midModifiedArr = [0];\r\n const result = this.ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr);\r\n const midOriginal = midOriginalArr[0];\r\n const midModified = midModifiedArr[0];\r\n if (result !== null) {\r\n // Result is not-null when there was enough memory to compute the changes while\r\n // searching for the recursion point\r\n return result;\r\n }\r\n else if (!quitEarlyArr[0]) {\r\n // We can break the problem down recursively by finding the changes in the\r\n // First Half: (originalStart, modifiedStart) to (midOriginal, midModified)\r\n // Second Half: (midOriginal + 1, minModified + 1) to (originalEnd, modifiedEnd)\r\n // NOTE: ComputeDiff() is inclusive, therefore the second range starts on the next point\r\n const leftChanges = this.ComputeDiffRecursive(originalStart, midOriginal, modifiedStart, midModified, quitEarlyArr);\r\n let rightChanges = [];\r\n if (!quitEarlyArr[0]) {\r\n rightChanges = this.ComputeDiffRecursive(midOriginal + 1, originalEnd, midModified + 1, modifiedEnd, quitEarlyArr);\r\n }\r\n else {\r\n // We did't have time to finish the first half, so we don't have time to compute this half.\r\n // Consider the entire rest of the sequence different.\r\n rightChanges = [\r\n new DiffChange(midOriginal + 1, originalEnd - (midOriginal + 1) + 1, midModified + 1, modifiedEnd - (midModified + 1) + 1)\r\n ];\r\n }\r\n return this.ConcatenateChanges(leftChanges, rightChanges);\r\n }\r\n // If we hit here, we quit early, and so can't return anything meaningful\r\n return [\r\n new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1)\r\n ];\r\n }\r\n WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr) {\r\n let forwardChanges = null;\r\n let reverseChanges = null;\r\n // First, walk backward through the forward diagonals history\r\n let changeHelper = new DiffChangeHelper();\r\n let diagonalMin = diagonalForwardStart;\r\n let diagonalMax = diagonalForwardEnd;\r\n let diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalForwardOffset;\r\n let lastOriginalIndex = -1073741824 /* MIN_SAFE_SMALL_INTEGER */;\r\n let historyIndex = this.m_forwardHistory.length - 1;\r\n do {\r\n // Get the diagonal index from the relative diagonal number\r\n const diagonal = diagonalRelative + diagonalForwardBase;\r\n // Figure out where we came from\r\n if (diagonal === diagonalMin || (diagonal < diagonalMax && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) {\r\n // Vertical line (the element is an insert)\r\n originalIndex = forwardPoints[diagonal + 1];\r\n modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset;\r\n if (originalIndex < lastOriginalIndex) {\r\n changeHelper.MarkNextChange();\r\n }\r\n lastOriginalIndex = originalIndex;\r\n changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex);\r\n diagonalRelative = (diagonal + 1) - diagonalForwardBase; //Setup for the next iteration\r\n }\r\n else {\r\n // Horizontal line (the element is a deletion)\r\n originalIndex = forwardPoints[diagonal - 1] + 1;\r\n modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset;\r\n if (originalIndex < lastOriginalIndex) {\r\n changeHelper.MarkNextChange();\r\n }\r\n lastOriginalIndex = originalIndex - 1;\r\n changeHelper.AddOriginalElement(originalIndex, modifiedIndex + 1);\r\n diagonalRelative = (diagonal - 1) - diagonalForwardBase; //Setup for the next iteration\r\n }\r\n if (historyIndex >= 0) {\r\n forwardPoints = this.m_forwardHistory[historyIndex];\r\n diagonalForwardBase = forwardPoints[0]; //We stored this in the first spot\r\n diagonalMin = 1;\r\n diagonalMax = forwardPoints.length - 1;\r\n }\r\n } while (--historyIndex >= -1);\r\n // Ironically, we get the forward changes as the reverse of the\r\n // order we added them since we technically added them backwards\r\n forwardChanges = changeHelper.getReverseChanges();\r\n if (quitEarlyArr[0]) {\r\n // TODO: Calculate a partial from the reverse diagonals.\r\n // For now, just assume everything after the midOriginal/midModified point is a diff\r\n let originalStartPoint = midOriginalArr[0] + 1;\r\n let modifiedStartPoint = midModifiedArr[0] + 1;\r\n if (forwardChanges !== null && forwardChanges.length > 0) {\r\n const lastForwardChange = forwardChanges[forwardChanges.length - 1];\r\n originalStartPoint = Math.max(originalStartPoint, lastForwardChange.getOriginalEnd());\r\n modifiedStartPoint = Math.max(modifiedStartPoint, lastForwardChange.getModifiedEnd());\r\n }\r\n reverseChanges = [\r\n new DiffChange(originalStartPoint, originalEnd - originalStartPoint + 1, modifiedStartPoint, modifiedEnd - modifiedStartPoint + 1)\r\n ];\r\n }\r\n else {\r\n // Now walk backward through the reverse diagonals history\r\n changeHelper = new DiffChangeHelper();\r\n diagonalMin = diagonalReverseStart;\r\n diagonalMax = diagonalReverseEnd;\r\n diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalReverseOffset;\r\n lastOriginalIndex = 1073741824 /* MAX_SAFE_SMALL_INTEGER */;\r\n historyIndex = (deltaIsEven) ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2;\r\n do {\r\n // Get the diagonal index from the relative diagonal number\r\n const diagonal = diagonalRelative + diagonalReverseBase;\r\n // Figure out where we came from\r\n if (diagonal === diagonalMin || (diagonal < diagonalMax && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1])) {\r\n // Horizontal line (the element is a deletion))\r\n originalIndex = reversePoints[diagonal + 1] - 1;\r\n modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset;\r\n if (originalIndex > lastOriginalIndex) {\r\n changeHelper.MarkNextChange();\r\n }\r\n lastOriginalIndex = originalIndex + 1;\r\n changeHelper.AddOriginalElement(originalIndex + 1, modifiedIndex + 1);\r\n diagonalRelative = (diagonal + 1) - diagonalReverseBase; //Setup for the next iteration\r\n }\r\n else {\r\n // Vertical line (the element is an insertion)\r\n originalIndex = reversePoints[diagonal - 1];\r\n modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset;\r\n if (originalIndex > lastOriginalIndex) {\r\n changeHelper.MarkNextChange();\r\n }\r\n lastOriginalIndex = originalIndex;\r\n changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex + 1);\r\n diagonalRelative = (diagonal - 1) - diagonalReverseBase; //Setup for the next iteration\r\n }\r\n if (historyIndex >= 0) {\r\n reversePoints = this.m_reverseHistory[historyIndex];\r\n diagonalReverseBase = reversePoints[0]; //We stored this in the first spot\r\n diagonalMin = 1;\r\n diagonalMax = reversePoints.length - 1;\r\n }\r\n } while (--historyIndex >= -1);\r\n // There are cases where the reverse history will find diffs that\r\n // are correct, but not intuitive, so we need shift them.\r\n reverseChanges = changeHelper.getChanges();\r\n }\r\n return this.ConcatenateChanges(forwardChanges, reverseChanges);\r\n }\r\n /**\r\n * Given the range to compute the diff on, this method finds the point:\r\n * (midOriginal, midModified)\r\n * that exists in the middle of the LCS of the two sequences and\r\n * is the point at which the LCS problem may be broken down recursively.\r\n * This method will try to keep the LCS trace in memory. If the LCS recursion\r\n * point is calculated and the full trace is available in memory, then this method\r\n * will return the change list.\r\n * @param originalStart The start bound of the original sequence range\r\n * @param originalEnd The end bound of the original sequence range\r\n * @param modifiedStart The start bound of the modified sequence range\r\n * @param modifiedEnd The end bound of the modified sequence range\r\n * @param midOriginal The middle point of the original sequence range\r\n * @param midModified The middle point of the modified sequence range\r\n * @returns The diff changes, if available, otherwise null\r\n */\r\n ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr) {\r\n let originalIndex = 0, modifiedIndex = 0;\r\n let diagonalForwardStart = 0, diagonalForwardEnd = 0;\r\n let diagonalReverseStart = 0, diagonalReverseEnd = 0;\r\n // To traverse the edit graph and produce the proper LCS, our actual\r\n // start position is just outside the given boundary\r\n originalStart--;\r\n modifiedStart--;\r\n // We set these up to make the compiler happy, but they will\r\n // be replaced before we return with the actual recursion point\r\n midOriginalArr[0] = 0;\r\n midModifiedArr[0] = 0;\r\n // Clear out the history\r\n this.m_forwardHistory = [];\r\n this.m_reverseHistory = [];\r\n // Each cell in the two arrays corresponds to a diagonal in the edit graph.\r\n // The integer value in the cell represents the originalIndex of the furthest\r\n // reaching point found so far that ends in that diagonal.\r\n // The modifiedIndex can be computed mathematically from the originalIndex and the diagonal number.\r\n const maxDifferences = (originalEnd - originalStart) + (modifiedEnd - modifiedStart);\r\n const numDiagonals = maxDifferences + 1;\r\n const forwardPoints = new Int32Array(numDiagonals);\r\n const reversePoints = new Int32Array(numDiagonals);\r\n // diagonalForwardBase: Index into forwardPoints of the diagonal which passes through (originalStart, modifiedStart)\r\n // diagonalReverseBase: Index into reversePoints of the diagonal which passes through (originalEnd, modifiedEnd)\r\n const diagonalForwardBase = (modifiedEnd - modifiedStart);\r\n const diagonalReverseBase = (originalEnd - originalStart);\r\n // diagonalForwardOffset: Geometric offset which allows modifiedIndex to be computed from originalIndex and the\r\n // diagonal number (relative to diagonalForwardBase)\r\n // diagonalReverseOffset: Geometric offset which allows modifiedIndex to be computed from originalIndex and the\r\n // diagonal number (relative to diagonalReverseBase)\r\n const diagonalForwardOffset = (originalStart - modifiedStart);\r\n const diagonalReverseOffset = (originalEnd - modifiedEnd);\r\n // delta: The difference between the end diagonal and the start diagonal. This is used to relate diagonal numbers\r\n // relative to the start diagonal with diagonal numbers relative to the end diagonal.\r\n // The Even/Oddn-ness of this delta is important for determining when we should check for overlap\r\n const delta = diagonalReverseBase - diagonalForwardBase;\r\n const deltaIsEven = (delta % 2 === 0);\r\n // Here we set up the start and end points as the furthest points found so far\r\n // in both the forward and reverse directions, respectively\r\n forwardPoints[diagonalForwardBase] = originalStart;\r\n reversePoints[diagonalReverseBase] = originalEnd;\r\n // Remember if we quit early, and thus need to do a best-effort result instead of a real result.\r\n quitEarlyArr[0] = false;\r\n // A couple of points:\r\n // --With this method, we iterate on the number of differences between the two sequences.\r\n // The more differences there actually are, the longer this will take.\r\n // --Also, as the number of differences increases, we have to search on diagonals further\r\n // away from the reference diagonal (which is diagonalForwardBase for forward, diagonalReverseBase for reverse).\r\n // --We extend on even diagonals (relative to the reference diagonal) only when numDifferences\r\n // is even and odd diagonals only when numDifferences is odd.\r\n for (let numDifferences = 1; numDifferences <= (maxDifferences / 2) + 1; numDifferences++) {\r\n let furthestOriginalIndex = 0;\r\n let furthestModifiedIndex = 0;\r\n // Run the algorithm in the forward direction\r\n diagonalForwardStart = this.ClipDiagonalBound(diagonalForwardBase - numDifferences, numDifferences, diagonalForwardBase, numDiagonals);\r\n diagonalForwardEnd = this.ClipDiagonalBound(diagonalForwardBase + numDifferences, numDifferences, diagonalForwardBase, numDiagonals);\r\n for (let diagonal = diagonalForwardStart; diagonal <= diagonalForwardEnd; diagonal += 2) {\r\n // STEP 1: We extend the furthest reaching point in the present diagonal\r\n // by looking at the diagonals above and below and picking the one whose point\r\n // is further away from the start point (originalStart, modifiedStart)\r\n if (diagonal === diagonalForwardStart || (diagonal < diagonalForwardEnd && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) {\r\n originalIndex = forwardPoints[diagonal + 1];\r\n }\r\n else {\r\n originalIndex = forwardPoints[diagonal - 1] + 1;\r\n }\r\n modifiedIndex = originalIndex - (diagonal - diagonalForwardBase) - diagonalForwardOffset;\r\n // Save the current originalIndex so we can test for false overlap in step 3\r\n const tempOriginalIndex = originalIndex;\r\n // STEP 2: We can continue to extend the furthest reaching point in the present diagonal\r\n // so long as the elements are equal.\r\n while (originalIndex < originalEnd && modifiedIndex < modifiedEnd && this.ElementsAreEqual(originalIndex + 1, modifiedIndex + 1)) {\r\n originalIndex++;\r\n modifiedIndex++;\r\n }\r\n forwardPoints[diagonal] = originalIndex;\r\n if (originalIndex + modifiedIndex > furthestOriginalIndex + furthestModifiedIndex) {\r\n furthestOriginalIndex = originalIndex;\r\n furthestModifiedIndex = modifiedIndex;\r\n }\r\n // STEP 3: If delta is odd (overlap first happens on forward when delta is odd)\r\n // and diagonal is in the range of reverse diagonals computed for numDifferences-1\r\n // (the previous iteration; we haven't computed reverse diagonals for numDifferences yet)\r\n // then check for overlap.\r\n if (!deltaIsEven && Math.abs(diagonal - diagonalReverseBase) <= (numDifferences - 1)) {\r\n if (originalIndex >= reversePoints[diagonal]) {\r\n midOriginalArr[0] = originalIndex;\r\n midModifiedArr[0] = modifiedIndex;\r\n if (tempOriginalIndex <= reversePoints[diagonal] && 1447 /* MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* MaxDifferencesHistory */ + 1)) {\r\n // BINGO! We overlapped, and we have the full trace in memory!\r\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\r\n }\r\n else {\r\n // Either false overlap, or we didn't have enough memory for the full trace\r\n // Just return the recursion point\r\n return null;\r\n }\r\n }\r\n }\r\n }\r\n // Check to see if we should be quitting early, before moving on to the next iteration.\r\n const matchLengthOfLongest = ((furthestOriginalIndex - originalStart) + (furthestModifiedIndex - modifiedStart) - numDifferences) / 2;\r\n if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(furthestOriginalIndex, matchLengthOfLongest)) {\r\n // We can't finish, so skip ahead to generating a result from what we have.\r\n quitEarlyArr[0] = true;\r\n // Use the furthest distance we got in the forward direction.\r\n midOriginalArr[0] = furthestOriginalIndex;\r\n midModifiedArr[0] = furthestModifiedIndex;\r\n if (matchLengthOfLongest > 0 && 1447 /* MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* MaxDifferencesHistory */ + 1)) {\r\n // Enough of the history is in memory to walk it backwards\r\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\r\n }\r\n else {\r\n // We didn't actually remember enough of the history.\r\n //Since we are quiting the diff early, we need to shift back the originalStart and modified start\r\n //back into the boundary limits since we decremented their value above beyond the boundary limit.\r\n originalStart++;\r\n modifiedStart++;\r\n return [\r\n new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1)\r\n ];\r\n }\r\n }\r\n // Run the algorithm in the reverse direction\r\n diagonalReverseStart = this.ClipDiagonalBound(diagonalReverseBase - numDifferences, numDifferences, diagonalReverseBase, numDiagonals);\r\n diagonalReverseEnd = this.ClipDiagonalBound(diagonalReverseBase + numDifferences, numDifferences, diagonalReverseBase, numDiagonals);\r\n for (let diagonal = diagonalReverseStart; diagonal <= diagonalReverseEnd; diagonal += 2) {\r\n // STEP 1: We extend the furthest reaching point in the present diagonal\r\n // by looking at the diagonals above and below and picking the one whose point\r\n // is further away from the start point (originalEnd, modifiedEnd)\r\n if (diagonal === diagonalReverseStart || (diagonal < diagonalReverseEnd && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1])) {\r\n originalIndex = reversePoints[diagonal + 1] - 1;\r\n }\r\n else {\r\n originalIndex = reversePoints[diagonal - 1];\r\n }\r\n modifiedIndex = originalIndex - (diagonal - diagonalReverseBase) - diagonalReverseOffset;\r\n // Save the current originalIndex so we can test for false overlap\r\n const tempOriginalIndex = originalIndex;\r\n // STEP 2: We can continue to extend the furthest reaching point in the present diagonal\r\n // as long as the elements are equal.\r\n while (originalIndex > originalStart && modifiedIndex > modifiedStart && this.ElementsAreEqual(originalIndex, modifiedIndex)) {\r\n originalIndex--;\r\n modifiedIndex--;\r\n }\r\n reversePoints[diagonal] = originalIndex;\r\n // STEP 4: If delta is even (overlap first happens on reverse when delta is even)\r\n // and diagonal is in the range of forward diagonals computed for numDifferences\r\n // then check for overlap.\r\n if (deltaIsEven && Math.abs(diagonal - diagonalForwardBase) <= numDifferences) {\r\n if (originalIndex <= forwardPoints[diagonal]) {\r\n midOriginalArr[0] = originalIndex;\r\n midModifiedArr[0] = modifiedIndex;\r\n if (tempOriginalIndex >= forwardPoints[diagonal] && 1447 /* MaxDifferencesHistory */ > 0 && numDifferences <= (1447 /* MaxDifferencesHistory */ + 1)) {\r\n // BINGO! We overlapped, and we have the full trace in memory!\r\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\r\n }\r\n else {\r\n // Either false overlap, or we didn't have enough memory for the full trace\r\n // Just return the recursion point\r\n return null;\r\n }\r\n }\r\n }\r\n }\r\n // Save current vectors to history before the next iteration\r\n if (numDifferences <= 1447 /* MaxDifferencesHistory */) {\r\n // We are allocating space for one extra int, which we fill with\r\n // the index of the diagonal base index\r\n let temp = new Int32Array(diagonalForwardEnd - diagonalForwardStart + 2);\r\n temp[0] = diagonalForwardBase - diagonalForwardStart + 1;\r\n MyArray.Copy2(forwardPoints, diagonalForwardStart, temp, 1, diagonalForwardEnd - diagonalForwardStart + 1);\r\n this.m_forwardHistory.push(temp);\r\n temp = new Int32Array(diagonalReverseEnd - diagonalReverseStart + 2);\r\n temp[0] = diagonalReverseBase - diagonalReverseStart + 1;\r\n MyArray.Copy2(reversePoints, diagonalReverseStart, temp, 1, diagonalReverseEnd - diagonalReverseStart + 1);\r\n this.m_reverseHistory.push(temp);\r\n }\r\n }\r\n // If we got here, then we have the full trace in history. We just have to convert it to a change list\r\n // NOTE: This part is a bit messy\r\n return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr);\r\n }\r\n /**\r\n * Shifts the given changes to provide a more intuitive diff.\r\n * While the first element in a diff matches the first element after the diff,\r\n * we shift the diff down.\r\n *\r\n * @param changes The list of changes to shift\r\n * @returns The shifted changes\r\n */\r\n PrettifyChanges(changes) {\r\n // Shift all the changes down first\r\n for (let i = 0; i < changes.length; i++) {\r\n const change = changes[i];\r\n const originalStop = (i < changes.length - 1) ? changes[i + 1].originalStart : this._originalElementsOrHash.length;\r\n const modifiedStop = (i < changes.length - 1) ? changes[i + 1].modifiedStart : this._modifiedElementsOrHash.length;\r\n const checkOriginal = change.originalLength > 0;\r\n const checkModified = change.modifiedLength > 0;\r\n while (change.originalStart + change.originalLength < originalStop &&\r\n change.modifiedStart + change.modifiedLength < modifiedStop &&\r\n (!checkOriginal || this.OriginalElementsAreEqual(change.originalStart, change.originalStart + change.originalLength)) &&\r\n (!checkModified || this.ModifiedElementsAreEqual(change.modifiedStart, change.modifiedStart + change.modifiedLength))) {\r\n change.originalStart++;\r\n change.modifiedStart++;\r\n }\r\n let mergedChangeArr = [null];\r\n if (i < changes.length - 1 && this.ChangesOverlap(changes[i], changes[i + 1], mergedChangeArr)) {\r\n changes[i] = mergedChangeArr[0];\r\n changes.splice(i + 1, 1);\r\n i--;\r\n continue;\r\n }\r\n }\r\n // Shift changes back up until we hit empty or whitespace-only lines\r\n for (let i = changes.length - 1; i >= 0; i--) {\r\n const change = changes[i];\r\n let originalStop = 0;\r\n let modifiedStop = 0;\r\n if (i > 0) {\r\n const prevChange = changes[i - 1];\r\n if (prevChange.originalLength > 0) {\r\n originalStop = prevChange.originalStart + prevChange.originalLength;\r\n }\r\n if (prevChange.modifiedLength > 0) {\r\n modifiedStop = prevChange.modifiedStart + prevChange.modifiedLength;\r\n }\r\n }\r\n const checkOriginal = change.originalLength > 0;\r\n const checkModified = change.modifiedLength > 0;\r\n let bestDelta = 0;\r\n let bestScore = this._boundaryScore(change.originalStart, change.originalLength, change.modifiedStart, change.modifiedLength);\r\n for (let delta = 1;; delta++) {\r\n const originalStart = change.originalStart - delta;\r\n const modifiedStart = change.modifiedStart - delta;\r\n if (originalStart < originalStop || modifiedStart < modifiedStop) {\r\n break;\r\n }\r\n if (checkOriginal && !this.OriginalElementsAreEqual(originalStart, originalStart + change.originalLength)) {\r\n break;\r\n }\r\n if (checkModified && !this.ModifiedElementsAreEqual(modifiedStart, modifiedStart + change.modifiedLength)) {\r\n break;\r\n }\r\n const score = this._boundaryScore(originalStart, change.originalLength, modifiedStart, change.modifiedLength);\r\n if (score > bestScore) {\r\n bestScore = score;\r\n bestDelta = delta;\r\n }\r\n }\r\n change.originalStart -= bestDelta;\r\n change.modifiedStart -= bestDelta;\r\n }\r\n // There could be multiple longest common substrings.\r\n // Give preference to the ones containing longer lines\r\n if (this._hasStrings) {\r\n for (let i = 1, len = changes.length; i < len; i++) {\r\n const aChange = changes[i - 1];\r\n const bChange = changes[i];\r\n const matchedLength = bChange.originalStart - aChange.originalStart - aChange.originalLength;\r\n const aOriginalStart = aChange.originalStart;\r\n const bOriginalEnd = bChange.originalStart + bChange.originalLength;\r\n const abOriginalLength = bOriginalEnd - aOriginalStart;\r\n const aModifiedStart = aChange.modifiedStart;\r\n const bModifiedEnd = bChange.modifiedStart + bChange.modifiedLength;\r\n const abModifiedLength = bModifiedEnd - aModifiedStart;\r\n // Avoid wasting a lot of time with these searches\r\n if (matchedLength < 5 && abOriginalLength < 20 && abModifiedLength < 20) {\r\n const t = this._findBetterContiguousSequence(aOriginalStart, abOriginalLength, aModifiedStart, abModifiedLength, matchedLength);\r\n if (t) {\r\n const [originalMatchStart, modifiedMatchStart] = t;\r\n if (originalMatchStart !== aChange.originalStart + aChange.originalLength || modifiedMatchStart !== aChange.modifiedStart + aChange.modifiedLength) {\r\n // switch to another sequence that has a better score\r\n aChange.originalLength = originalMatchStart - aChange.originalStart;\r\n aChange.modifiedLength = modifiedMatchStart - aChange.modifiedStart;\r\n bChange.originalStart = originalMatchStart + matchedLength;\r\n bChange.modifiedStart = modifiedMatchStart + matchedLength;\r\n bChange.originalLength = bOriginalEnd - bChange.originalStart;\r\n bChange.modifiedLength = bModifiedEnd - bChange.modifiedStart;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return changes;\r\n }\r\n _findBetterContiguousSequence(originalStart, originalLength, modifiedStart, modifiedLength, desiredLength) {\r\n if (originalLength < desiredLength || modifiedLength < desiredLength) {\r\n return null;\r\n }\r\n const originalMax = originalStart + originalLength - desiredLength + 1;\r\n const modifiedMax = modifiedStart + modifiedLength - desiredLength + 1;\r\n let bestScore = 0;\r\n let bestOriginalStart = 0;\r\n let bestModifiedStart = 0;\r\n for (let i = originalStart; i < originalMax; i++) {\r\n for (let j = modifiedStart; j < modifiedMax; j++) {\r\n const score = this._contiguousSequenceScore(i, j, desiredLength);\r\n if (score > 0 && score > bestScore) {\r\n bestScore = score;\r\n bestOriginalStart = i;\r\n bestModifiedStart = j;\r\n }\r\n }\r\n }\r\n if (bestScore > 0) {\r\n return [bestOriginalStart, bestModifiedStart];\r\n }\r\n return null;\r\n }\r\n _contiguousSequenceScore(originalStart, modifiedStart, length) {\r\n let score = 0;\r\n for (let l = 0; l < length; l++) {\r\n if (!this.ElementsAreEqual(originalStart + l, modifiedStart + l)) {\r\n return 0;\r\n }\r\n score += this._originalStringElements[originalStart + l].length;\r\n }\r\n return score;\r\n }\r\n _OriginalIsBoundary(index) {\r\n if (index <= 0 || index >= this._originalElementsOrHash.length - 1) {\r\n return true;\r\n }\r\n return (this._hasStrings && /^\\s*$/.test(this._originalStringElements[index]));\r\n }\r\n _OriginalRegionIsBoundary(originalStart, originalLength) {\r\n if (this._OriginalIsBoundary(originalStart) || this._OriginalIsBoundary(originalStart - 1)) {\r\n return true;\r\n }\r\n if (originalLength > 0) {\r\n const originalEnd = originalStart + originalLength;\r\n if (this._OriginalIsBoundary(originalEnd - 1) || this._OriginalIsBoundary(originalEnd)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n _ModifiedIsBoundary(index) {\r\n if (index <= 0 || index >= this._modifiedElementsOrHash.length - 1) {\r\n return true;\r\n }\r\n return (this._hasStrings && /^\\s*$/.test(this._modifiedStringElements[index]));\r\n }\r\n _ModifiedRegionIsBoundary(modifiedStart, modifiedLength) {\r\n if (this._ModifiedIsBoundary(modifiedStart) || this._ModifiedIsBoundary(modifiedStart - 1)) {\r\n return true;\r\n }\r\n if (modifiedLength > 0) {\r\n const modifiedEnd = modifiedStart + modifiedLength;\r\n if (this._ModifiedIsBoundary(modifiedEnd - 1) || this._ModifiedIsBoundary(modifiedEnd)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n _boundaryScore(originalStart, originalLength, modifiedStart, modifiedLength) {\r\n const originalScore = (this._OriginalRegionIsBoundary(originalStart, originalLength) ? 1 : 0);\r\n const modifiedScore = (this._ModifiedRegionIsBoundary(modifiedStart, modifiedLength) ? 1 : 0);\r\n return (originalScore + modifiedScore);\r\n }\r\n /**\r\n * Concatenates the two input DiffChange lists and returns the resulting\r\n * list.\r\n * @param The left changes\r\n * @param The right changes\r\n * @returns The concatenated list\r\n */\r\n ConcatenateChanges(left, right) {\r\n let mergedChangeArr = [];\r\n if (left.length === 0 || right.length === 0) {\r\n return (right.length > 0) ? right : left;\r\n }\r\n else if (this.ChangesOverlap(left[left.length - 1], right[0], mergedChangeArr)) {\r\n // Since we break the problem down recursively, it is possible that we\r\n // might recurse in the middle of a change thereby splitting it into\r\n // two changes. Here in the combining stage, we detect and fuse those\r\n // changes back together\r\n const result = new Array(left.length + right.length - 1);\r\n MyArray.Copy(left, 0, result, 0, left.length - 1);\r\n result[left.length - 1] = mergedChangeArr[0];\r\n MyArray.Copy(right, 1, result, left.length, right.length - 1);\r\n return result;\r\n }\r\n else {\r\n const result = new Array(left.length + right.length);\r\n MyArray.Copy(left, 0, result, 0, left.length);\r\n MyArray.Copy(right, 0, result, left.length, right.length);\r\n return result;\r\n }\r\n }\r\n /**\r\n * Returns true if the two changes overlap and can be merged into a single\r\n * change\r\n * @param left The left change\r\n * @param right The right change\r\n * @param mergedChange The merged change if the two overlap, null otherwise\r\n * @returns True if the two changes overlap\r\n */\r\n ChangesOverlap(left, right, mergedChangeArr) {\r\n Debug.Assert(left.originalStart <= right.originalStart, 'Left change is not less than or equal to right change');\r\n Debug.Assert(left.modifiedStart <= right.modifiedStart, 'Left change is not less than or equal to right change');\r\n if (left.originalStart + left.originalLength >= right.originalStart || left.modifiedStart + left.modifiedLength >= right.modifiedStart) {\r\n const originalStart = left.originalStart;\r\n let originalLength = left.originalLength;\r\n const modifiedStart = left.modifiedStart;\r\n let modifiedLength = left.modifiedLength;\r\n if (left.originalStart + left.originalLength >= right.originalStart) {\r\n originalLength = right.originalStart + right.originalLength - left.originalStart;\r\n }\r\n if (left.modifiedStart + left.modifiedLength >= right.modifiedStart) {\r\n modifiedLength = right.modifiedStart + right.modifiedLength - left.modifiedStart;\r\n }\r\n mergedChangeArr[0] = new DiffChange(originalStart, originalLength, modifiedStart, modifiedLength);\r\n return true;\r\n }\r\n else {\r\n mergedChangeArr[0] = null;\r\n return false;\r\n }\r\n }\r\n /**\r\n * Helper method used to clip a diagonal index to the range of valid\r\n * diagonals. This also decides whether or not the diagonal index,\r\n * if it exceeds the boundary, should be clipped to the boundary or clipped\r\n * one inside the boundary depending on the Even/Odd status of the boundary\r\n * and numDifferences.\r\n * @param diagonal The index of the diagonal to clip.\r\n * @param numDifferences The current number of differences being iterated upon.\r\n * @param diagonalBaseIndex The base reference diagonal.\r\n * @param numDiagonals The total number of diagonals.\r\n * @returns The clipped diagonal index.\r\n */\r\n ClipDiagonalBound(diagonal, numDifferences, diagonalBaseIndex, numDiagonals) {\r\n if (diagonal >= 0 && diagonal < numDiagonals) {\r\n // Nothing to clip, its in range\r\n return diagonal;\r\n }\r\n // diagonalsBelow: The number of diagonals below the reference diagonal\r\n // diagonalsAbove: The number of diagonals above the reference diagonal\r\n const diagonalsBelow = diagonalBaseIndex;\r\n const diagonalsAbove = numDiagonals - diagonalBaseIndex - 1;\r\n const diffEven = (numDifferences % 2 === 0);\r\n if (diagonal < 0) {\r\n const lowerBoundEven = (diagonalsBelow % 2 === 0);\r\n return (diffEven === lowerBoundEven) ? 0 : 1;\r\n }\r\n else {\r\n const upperBoundEven = (diagonalsAbove % 2 === 0);\r\n return (diffEven === upperBoundEven) ? numDiagonals - 1 : numDiagonals - 2;\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/**\r\n * Throws an error with the provided message if the provided value does not evaluate to a true Javascript value.\r\n */\r\nexport function ok(value, message) {\r\n if (!value) {\r\n throw new Error(message ? `Assertion failed (${message})` : 'Assertion Failed');\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { VSBuffer } from '../../../base/common/buffer.js';\r\nimport * as platform from '../../../base/common/platform.js';\r\nfunction reverseEndianness(arr) {\r\n for (let i = 0, len = arr.length; i < len; i += 4) {\r\n // flip bytes 0<->3 and 1<->2\r\n const b0 = arr[i + 0];\r\n const b1 = arr[i + 1];\r\n const b2 = arr[i + 2];\r\n const b3 = arr[i + 3];\r\n arr[i + 0] = b3;\r\n arr[i + 1] = b2;\r\n arr[i + 2] = b1;\r\n arr[i + 3] = b0;\r\n }\r\n}\r\nfunction toLittleEndianBuffer(arr) {\r\n const uint8Arr = new Uint8Array(arr.buffer, arr.byteOffset, arr.length * 4);\r\n if (!platform.isLittleEndian()) {\r\n // the byte order must be changed\r\n reverseEndianness(uint8Arr);\r\n }\r\n return VSBuffer.wrap(uint8Arr);\r\n}\r\nexport function encodeSemanticTokensDto(semanticTokens) {\r\n const dest = new Uint32Array(encodeSemanticTokensDtoSize(semanticTokens));\r\n let offset = 0;\r\n dest[offset++] = semanticTokens.id;\r\n if (semanticTokens.type === 'full') {\r\n dest[offset++] = 1 /* Full */;\r\n dest[offset++] = semanticTokens.data.length;\r\n dest.set(semanticTokens.data, offset);\r\n offset += semanticTokens.data.length;\r\n }\r\n else {\r\n dest[offset++] = 2 /* Delta */;\r\n dest[offset++] = semanticTokens.deltas.length;\r\n for (const delta of semanticTokens.deltas) {\r\n dest[offset++] = delta.start;\r\n dest[offset++] = delta.deleteCount;\r\n if (delta.data) {\r\n dest[offset++] = delta.data.length;\r\n dest.set(delta.data, offset);\r\n offset += delta.data.length;\r\n }\r\n else {\r\n dest[offset++] = 0;\r\n }\r\n }\r\n }\r\n return toLittleEndianBuffer(dest);\r\n}\r\nfunction encodeSemanticTokensDtoSize(semanticTokens) {\r\n let result = 0;\r\n result += (+1 // id\r\n + 1 // type\r\n );\r\n if (semanticTokens.type === 'full') {\r\n result += (+1 // data length\r\n + semanticTokens.data.length);\r\n }\r\n else {\r\n result += (+1 // delta count\r\n );\r\n result += (+1 // start\r\n + 1 // deleteCount\r\n + 1 // data length\r\n ) * semanticTokens.deltas.length;\r\n for (const delta of semanticTokens.deltas) {\r\n if (delta.data) {\r\n result += delta.data.length;\r\n }\r\n }\r\n }\r\n return result;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport { CancellationToken } from '../../../base/common/cancellation.js';\r\nimport { onUnexpectedExternalError } from '../../../base/common/errors.js';\r\nimport { URI } from '../../../base/common/uri.js';\r\nimport { DocumentSemanticTokensProviderRegistry, DocumentRangeSemanticTokensProviderRegistry } from '../modes.js';\r\nimport { IModelService } from './modelService.js';\r\nimport { CommandsRegistry, ICommandService } from '../../../platform/commands/common/commands.js';\r\nimport { assertType } from '../../../base/common/types.js';\r\nimport { encodeSemanticTokensDto } from './semanticTokensDto.js';\r\nimport { Range } from '../core/range.js';\r\nexport function isSemanticTokens(v) {\r\n return v && !!(v.data);\r\n}\r\nexport function isSemanticTokensEdits(v) {\r\n return v && Array.isArray(v.edits);\r\n}\r\nexport function getDocumentSemanticTokens(model, lastResultId, token) {\r\n const provider = _getDocumentSemanticTokensProvider(model);\r\n if (!provider) {\r\n return null;\r\n }\r\n return {\r\n provider: provider,\r\n request: Promise.resolve(provider.provideDocumentSemanticTokens(model, lastResultId, token))\r\n };\r\n}\r\nfunction _getDocumentSemanticTokensProvider(model) {\r\n const result = DocumentSemanticTokensProviderRegistry.ordered(model);\r\n return (result.length > 0 ? result[0] : null);\r\n}\r\nexport function getDocumentRangeSemanticTokensProvider(model) {\r\n const result = DocumentRangeSemanticTokensProviderRegistry.ordered(model);\r\n return (result.length > 0 ? result[0] : null);\r\n}\r\nCommandsRegistry.registerCommand('_provideDocumentSemanticTokensLegend', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri] = args;\r\n assertType(uri instanceof URI);\r\n const model = accessor.get(IModelService).getModel(uri);\r\n if (!model) {\r\n return undefined;\r\n }\r\n const provider = _getDocumentSemanticTokensProvider(model);\r\n if (!provider) {\r\n // there is no provider => fall back to a document range semantic tokens provider\r\n return accessor.get(ICommandService).executeCommand('_provideDocumentRangeSemanticTokensLegend', uri);\r\n }\r\n return provider.getLegend();\r\n}));\r\nCommandsRegistry.registerCommand('_provideDocumentSemanticTokens', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri] = args;\r\n assertType(uri instanceof URI);\r\n const model = accessor.get(IModelService).getModel(uri);\r\n if (!model) {\r\n return undefined;\r\n }\r\n const r = getDocumentSemanticTokens(model, null, CancellationToken.None);\r\n if (!r) {\r\n // there is no provider => fall back to a document range semantic tokens provider\r\n return accessor.get(ICommandService).executeCommand('_provideDocumentRangeSemanticTokens', uri, model.getFullModelRange());\r\n }\r\n const { provider, request } = r;\r\n let result;\r\n try {\r\n result = yield request;\r\n }\r\n catch (err) {\r\n onUnexpectedExternalError(err);\r\n return undefined;\r\n }\r\n if (!result || !isSemanticTokens(result)) {\r\n return undefined;\r\n }\r\n const buff = encodeSemanticTokensDto({\r\n id: 0,\r\n type: 'full',\r\n data: result.data\r\n });\r\n if (result.resultId) {\r\n provider.releaseDocumentSemanticTokens(result.resultId);\r\n }\r\n return buff;\r\n}));\r\nCommandsRegistry.registerCommand('_provideDocumentRangeSemanticTokensLegend', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri] = args;\r\n assertType(uri instanceof URI);\r\n const model = accessor.get(IModelService).getModel(uri);\r\n if (!model) {\r\n return undefined;\r\n }\r\n const provider = getDocumentRangeSemanticTokensProvider(model);\r\n if (!provider) {\r\n return undefined;\r\n }\r\n return provider.getLegend();\r\n}));\r\nCommandsRegistry.registerCommand('_provideDocumentRangeSemanticTokens', (accessor, ...args) => __awaiter(void 0, void 0, void 0, function* () {\r\n const [uri, range] = args;\r\n assertType(uri instanceof URI);\r\n assertType(Range.isIRange(range));\r\n const model = accessor.get(IModelService).getModel(uri);\r\n if (!model) {\r\n return undefined;\r\n }\r\n const provider = getDocumentRangeSemanticTokensProvider(model);\r\n if (!provider) {\r\n // there is no provider\r\n return undefined;\r\n }\r\n let result;\r\n try {\r\n result = yield provider.provideDocumentRangeSemanticTokens(model, Range.lift(range), CancellationToken.None);\r\n }\r\n catch (err) {\r\n onUnexpectedExternalError(err);\r\n return undefined;\r\n }\r\n if (!result || !isSemanticTokens(result)) {\r\n return undefined;\r\n }\r\n return encodeSemanticTokensDto({\r\n id: 0,\r\n type: 'full',\r\n data: result.data\r\n });\r\n}));\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport * from '../../editor/editor.api.js';\r\n","'use strict'\n\nvar assign = Object.assign\n\nmodule.exports = assign\n","'use strict'\n\nfunction normalizeIdentifier(value) {\n return (\n value // Collapse Markdown whitespace.\n .replace(/[\\t\\n\\r ]+/g, ' ') // Trim.\n .replace(/^ | $/g, '') // Some characters are considered “uppercase”, but if their lowercase\n // counterpart is uppercased will result in a different uppercase\n // character.\n // Hence, to get that form, we perform both lower- and uppercase.\n // Upper case makes sure keys will not interact with default prototypal\n // methods: no object method is uppercase.\n .toLowerCase()\n .toUpperCase()\n )\n}\n\nmodule.exports = normalizeIdentifier\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar factorySpace = require('./factory-space.js')\n\nvar partialBlankLine = {\n tokenize: tokenizePartialBlankLine,\n partial: true\n}\n\nfunction tokenizePartialBlankLine(effects, ok, nok) {\n return factorySpace(effects, afterWhitespace, 'linePrefix')\n\n function afterWhitespace(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code)\n }\n}\n\nmodule.exports = partialBlankLine\n","'use strict'\n\nfunction resolveAll(constructs, events, context) {\n var called = []\n var index = -1\n var resolve\n\n while (++index < constructs.length) {\n resolve = constructs[index].resolveAll\n\n if (resolve && called.indexOf(resolve) < 0) {\n events = resolve(events, context)\n called.push(resolve)\n }\n }\n\n return events\n}\n\nmodule.exports = resolveAll\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiAlphanumeric = regexCheck(/[\\dA-Za-z]/)\n\nmodule.exports = asciiAlphanumeric\n","'use strict'\n\nmodule.exports = wrap\n\nvar u = require('unist-builder')\n\n// Wrap `nodes` with line feeds between each entry.\n// Optionally adds line feeds at the start and end.\nfunction wrap(nodes, loose) {\n var result = []\n var index = -1\n var length = nodes.length\n\n if (loose) {\n result.push(u('text', '\\n'))\n }\n\n while (++index < length) {\n if (index) {\n result.push(u('text', '\\n'))\n }\n\n result.push(nodes[index])\n }\n\n if (loose && nodes.length > 0) {\n result.push(u('text', '\\n'))\n }\n\n return result\n}\n","/*!\n * repeat-string \n *\n * Copyright (c) 2014-2015, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\n/**\n * Results cache\n */\n\nvar res = '';\nvar cache;\n\n/**\n * Expose `repeat`\n */\n\nmodule.exports = repeat;\n\n/**\n * Repeat the given `string` the specified `number`\n * of times.\n *\n * **Example:**\n *\n * ```js\n * var repeat = require('repeat-string');\n * repeat('A', 5);\n * //=> AAAAA\n * ```\n *\n * @param {String} `string` The string to repeat\n * @param {Number} `number` The number of times to repeat the string\n * @return {String} Repeated string\n * @api public\n */\n\nfunction repeat(str, num) {\n if (typeof str !== 'string') {\n throw new TypeError('expected a string');\n }\n\n // cover common, quick use cases\n if (num === 1) return str;\n if (num === 2) return str + str;\n\n var max = str.length * num;\n if (cache !== str || typeof cache === 'undefined') {\n cache = str;\n res = '';\n } else if (res.length >= max) {\n return res.substr(0, max);\n }\n\n while (max > res.length && num > 1) {\n if (num & 1) {\n res += str;\n }\n\n num >>= 1;\n str += str;\n }\n\n res += str;\n res = res.substr(0, max);\n return res;\n}\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport * from '../../../editor/editor.api.js';\r\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nlet hasDifferentOriginAncestorFlag = false;\r\nlet sameOriginWindowChainCache = null;\r\nfunction getParentWindowIfSameOrigin(w) {\r\n if (!w.parent || w.parent === w) {\r\n return null;\r\n }\r\n // Cannot really tell if we have access to the parent window unless we try to access something in it\r\n try {\r\n let location = w.location;\r\n let parentLocation = w.parent.location;\r\n if (location.origin !== 'null' && parentLocation.origin !== 'null') {\r\n if (location.protocol !== parentLocation.protocol || location.hostname !== parentLocation.hostname || location.port !== parentLocation.port) {\r\n hasDifferentOriginAncestorFlag = true;\r\n return null;\r\n }\r\n }\r\n }\r\n catch (e) {\r\n hasDifferentOriginAncestorFlag = true;\r\n return null;\r\n }\r\n return w.parent;\r\n}\r\nexport class IframeUtils {\r\n /**\r\n * Returns a chain of embedded windows with the same origin (which can be accessed programmatically).\r\n * Having a chain of length 1 might mean that the current execution environment is running outside of an iframe or inside an iframe embedded in a window with a different origin.\r\n * To distinguish if at one point the current execution environment is running inside a window with a different origin, see hasDifferentOriginAncestor()\r\n */\r\n static getSameOriginWindowChain() {\r\n if (!sameOriginWindowChainCache) {\r\n sameOriginWindowChainCache = [];\r\n let w = window;\r\n let parent;\r\n do {\r\n parent = getParentWindowIfSameOrigin(w);\r\n if (parent) {\r\n sameOriginWindowChainCache.push({\r\n window: w,\r\n iframeElement: w.frameElement || null\r\n });\r\n }\r\n else {\r\n sameOriginWindowChainCache.push({\r\n window: w,\r\n iframeElement: null\r\n });\r\n }\r\n w = parent;\r\n } while (w);\r\n }\r\n return sameOriginWindowChainCache.slice(0);\r\n }\r\n /**\r\n * Returns true if the current execution environment is chained in a list of iframes which at one point ends in a window with a different origin.\r\n * Returns false if the current execution environment is not running inside an iframe or if the entire chain of iframes have the same origin.\r\n */\r\n static hasDifferentOriginAncestor() {\r\n if (!sameOriginWindowChainCache) {\r\n this.getSameOriginWindowChain();\r\n }\r\n return hasDifferentOriginAncestorFlag;\r\n }\r\n /**\r\n * Returns the position of `childWindow` relative to `ancestorWindow`\r\n */\r\n static getPositionOfChildWindowRelativeToAncestorWindow(childWindow, ancestorWindow) {\r\n if (!ancestorWindow || childWindow === ancestorWindow) {\r\n return {\r\n top: 0,\r\n left: 0\r\n };\r\n }\r\n let top = 0, left = 0;\r\n let windowChain = this.getSameOriginWindowChain();\r\n for (const windowChainEl of windowChain) {\r\n top += windowChainEl.window.scrollY;\r\n left += windowChainEl.window.scrollX;\r\n if (windowChainEl.window === ancestorWindow) {\r\n break;\r\n }\r\n if (!windowChainEl.iframeElement) {\r\n break;\r\n }\r\n let boundingRect = windowChainEl.iframeElement.getBoundingClientRect();\r\n top += boundingRect.top;\r\n left += boundingRect.left;\r\n }\r\n return {\r\n top: top,\r\n left: left\r\n };\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { VSBuffer } from './buffer.js';\r\nimport { URI } from './uri.js';\r\nexport function parse(text) {\r\n let data = JSON.parse(text);\r\n data = revive(data);\r\n return data;\r\n}\r\nexport function revive(obj, depth = 0) {\r\n if (!obj || depth > 200) {\r\n return obj;\r\n }\r\n if (typeof obj === 'object') {\r\n switch (obj.$mid) {\r\n case 1: return URI.revive(obj);\r\n case 2: return new RegExp(obj.source, obj.flags);\r\n }\r\n if (obj instanceof VSBuffer\r\n || obj instanceof Uint8Array) {\r\n return obj;\r\n }\r\n if (Array.isArray(obj)) {\r\n for (let i = 0; i < obj.length; ++i) {\r\n obj[i] = revive(obj[i], depth + 1);\r\n }\r\n }\r\n else {\r\n // walk object\r\n for (const key in obj) {\r\n if (Object.hasOwnProperty.call(obj, key)) {\r\n obj[key] = revive(obj[key], depth + 1);\r\n }\r\n }\r\n }\r\n }\r\n return obj;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as buffer from '../../../base/common/buffer.js';\r\nimport { decodeUTF16LE } from '../core/stringBuilder.js';\r\nfunction escapeNewLine(str) {\r\n return (str\r\n .replace(/\\n/g, '\\\\n')\r\n .replace(/\\r/g, '\\\\r'));\r\n}\r\nexport class TextChange {\r\n constructor(oldPosition, oldText, newPosition, newText) {\r\n this.oldPosition = oldPosition;\r\n this.oldText = oldText;\r\n this.newPosition = newPosition;\r\n this.newText = newText;\r\n }\r\n get oldLength() {\r\n return this.oldText.length;\r\n }\r\n get oldEnd() {\r\n return this.oldPosition + this.oldText.length;\r\n }\r\n get newLength() {\r\n return this.newText.length;\r\n }\r\n get newEnd() {\r\n return this.newPosition + this.newText.length;\r\n }\r\n toString() {\r\n if (this.oldText.length === 0) {\r\n return `(insert@${this.oldPosition} \"${escapeNewLine(this.newText)}\")`;\r\n }\r\n if (this.newText.length === 0) {\r\n return `(delete@${this.oldPosition} \"${escapeNewLine(this.oldText)}\")`;\r\n }\r\n return `(replace@${this.oldPosition} \"${escapeNewLine(this.oldText)}\" with \"${escapeNewLine(this.newText)}\")`;\r\n }\r\n static _writeStringSize(str) {\r\n return (4 + 2 * str.length);\r\n }\r\n static _writeString(b, str, offset) {\r\n const len = str.length;\r\n buffer.writeUInt32BE(b, len, offset);\r\n offset += 4;\r\n for (let i = 0; i < len; i++) {\r\n buffer.writeUInt16LE(b, str.charCodeAt(i), offset);\r\n offset += 2;\r\n }\r\n return offset;\r\n }\r\n static _readString(b, offset) {\r\n const len = buffer.readUInt32BE(b, offset);\r\n offset += 4;\r\n return decodeUTF16LE(b, offset, len);\r\n }\r\n writeSize() {\r\n return (+4 // oldPosition\r\n + 4 // newPosition\r\n + TextChange._writeStringSize(this.oldText)\r\n + TextChange._writeStringSize(this.newText));\r\n }\r\n write(b, offset) {\r\n buffer.writeUInt32BE(b, this.oldPosition, offset);\r\n offset += 4;\r\n buffer.writeUInt32BE(b, this.newPosition, offset);\r\n offset += 4;\r\n offset = TextChange._writeString(b, this.oldText, offset);\r\n offset = TextChange._writeString(b, this.newText, offset);\r\n return offset;\r\n }\r\n static read(b, offset, dest) {\r\n const oldPosition = buffer.readUInt32BE(b, offset);\r\n offset += 4;\r\n const newPosition = buffer.readUInt32BE(b, offset);\r\n offset += 4;\r\n const oldText = TextChange._readString(b, offset);\r\n offset += TextChange._writeStringSize(oldText);\r\n const newText = TextChange._readString(b, offset);\r\n offset += TextChange._writeStringSize(newText);\r\n dest.push(new TextChange(oldPosition, oldText, newPosition, newText));\r\n return offset;\r\n }\r\n}\r\nexport function compressConsecutiveTextChanges(prevEdits, currEdits) {\r\n if (prevEdits === null || prevEdits.length === 0) {\r\n return currEdits;\r\n }\r\n const compressor = new TextChangeCompressor(prevEdits, currEdits);\r\n return compressor.compress();\r\n}\r\nclass TextChangeCompressor {\r\n constructor(prevEdits, currEdits) {\r\n this._prevEdits = prevEdits;\r\n this._currEdits = currEdits;\r\n this._result = [];\r\n this._resultLen = 0;\r\n this._prevLen = this._prevEdits.length;\r\n this._prevDeltaOffset = 0;\r\n this._currLen = this._currEdits.length;\r\n this._currDeltaOffset = 0;\r\n }\r\n compress() {\r\n let prevIndex = 0;\r\n let currIndex = 0;\r\n let prevEdit = this._getPrev(prevIndex);\r\n let currEdit = this._getCurr(currIndex);\r\n while (prevIndex < this._prevLen || currIndex < this._currLen) {\r\n if (prevEdit === null) {\r\n this._acceptCurr(currEdit);\r\n currEdit = this._getCurr(++currIndex);\r\n continue;\r\n }\r\n if (currEdit === null) {\r\n this._acceptPrev(prevEdit);\r\n prevEdit = this._getPrev(++prevIndex);\r\n continue;\r\n }\r\n if (currEdit.oldEnd <= prevEdit.newPosition) {\r\n this._acceptCurr(currEdit);\r\n currEdit = this._getCurr(++currIndex);\r\n continue;\r\n }\r\n if (prevEdit.newEnd <= currEdit.oldPosition) {\r\n this._acceptPrev(prevEdit);\r\n prevEdit = this._getPrev(++prevIndex);\r\n continue;\r\n }\r\n if (currEdit.oldPosition < prevEdit.newPosition) {\r\n const [e1, e2] = TextChangeCompressor._splitCurr(currEdit, prevEdit.newPosition - currEdit.oldPosition);\r\n this._acceptCurr(e1);\r\n currEdit = e2;\r\n continue;\r\n }\r\n if (prevEdit.newPosition < currEdit.oldPosition) {\r\n const [e1, e2] = TextChangeCompressor._splitPrev(prevEdit, currEdit.oldPosition - prevEdit.newPosition);\r\n this._acceptPrev(e1);\r\n prevEdit = e2;\r\n continue;\r\n }\r\n // At this point, currEdit.oldPosition === prevEdit.newPosition\r\n let mergePrev;\r\n let mergeCurr;\r\n if (currEdit.oldEnd === prevEdit.newEnd) {\r\n mergePrev = prevEdit;\r\n mergeCurr = currEdit;\r\n prevEdit = this._getPrev(++prevIndex);\r\n currEdit = this._getCurr(++currIndex);\r\n }\r\n else if (currEdit.oldEnd < prevEdit.newEnd) {\r\n const [e1, e2] = TextChangeCompressor._splitPrev(prevEdit, currEdit.oldLength);\r\n mergePrev = e1;\r\n mergeCurr = currEdit;\r\n prevEdit = e2;\r\n currEdit = this._getCurr(++currIndex);\r\n }\r\n else {\r\n const [e1, e2] = TextChangeCompressor._splitCurr(currEdit, prevEdit.newLength);\r\n mergePrev = prevEdit;\r\n mergeCurr = e1;\r\n prevEdit = this._getPrev(++prevIndex);\r\n currEdit = e2;\r\n }\r\n this._result[this._resultLen++] = new TextChange(mergePrev.oldPosition, mergePrev.oldText, mergeCurr.newPosition, mergeCurr.newText);\r\n this._prevDeltaOffset += mergePrev.newLength - mergePrev.oldLength;\r\n this._currDeltaOffset += mergeCurr.newLength - mergeCurr.oldLength;\r\n }\r\n const merged = TextChangeCompressor._merge(this._result);\r\n const cleaned = TextChangeCompressor._removeNoOps(merged);\r\n return cleaned;\r\n }\r\n _acceptCurr(currEdit) {\r\n this._result[this._resultLen++] = TextChangeCompressor._rebaseCurr(this._prevDeltaOffset, currEdit);\r\n this._currDeltaOffset += currEdit.newLength - currEdit.oldLength;\r\n }\r\n _getCurr(currIndex) {\r\n return (currIndex < this._currLen ? this._currEdits[currIndex] : null);\r\n }\r\n _acceptPrev(prevEdit) {\r\n this._result[this._resultLen++] = TextChangeCompressor._rebasePrev(this._currDeltaOffset, prevEdit);\r\n this._prevDeltaOffset += prevEdit.newLength - prevEdit.oldLength;\r\n }\r\n _getPrev(prevIndex) {\r\n return (prevIndex < this._prevLen ? this._prevEdits[prevIndex] : null);\r\n }\r\n static _rebaseCurr(prevDeltaOffset, currEdit) {\r\n return new TextChange(currEdit.oldPosition - prevDeltaOffset, currEdit.oldText, currEdit.newPosition, currEdit.newText);\r\n }\r\n static _rebasePrev(currDeltaOffset, prevEdit) {\r\n return new TextChange(prevEdit.oldPosition, prevEdit.oldText, prevEdit.newPosition + currDeltaOffset, prevEdit.newText);\r\n }\r\n static _splitPrev(edit, offset) {\r\n const preText = edit.newText.substr(0, offset);\r\n const postText = edit.newText.substr(offset);\r\n return [\r\n new TextChange(edit.oldPosition, edit.oldText, edit.newPosition, preText),\r\n new TextChange(edit.oldEnd, '', edit.newPosition + offset, postText)\r\n ];\r\n }\r\n static _splitCurr(edit, offset) {\r\n const preText = edit.oldText.substr(0, offset);\r\n const postText = edit.oldText.substr(offset);\r\n return [\r\n new TextChange(edit.oldPosition, preText, edit.newPosition, edit.newText),\r\n new TextChange(edit.oldPosition + offset, postText, edit.newEnd, '')\r\n ];\r\n }\r\n static _merge(edits) {\r\n if (edits.length === 0) {\r\n return edits;\r\n }\r\n let result = [], resultLen = 0;\r\n let prev = edits[0];\r\n for (let i = 1; i < edits.length; i++) {\r\n const curr = edits[i];\r\n if (prev.oldEnd === curr.oldPosition) {\r\n // Merge into `prev`\r\n prev = new TextChange(prev.oldPosition, prev.oldText + curr.oldText, prev.newPosition, prev.newText + curr.newText);\r\n }\r\n else {\r\n result[resultLen++] = prev;\r\n prev = curr;\r\n }\r\n }\r\n result[resultLen++] = prev;\r\n return result;\r\n }\r\n static _removeNoOps(edits) {\r\n if (edits.length === 0) {\r\n return edits;\r\n }\r\n let result = [], resultLen = 0;\r\n for (let i = 0; i < edits.length; i++) {\r\n const edit = edits[i];\r\n if (edit.oldText === edit.newText) {\r\n continue;\r\n }\r\n result[resultLen++] = edit;\r\n }\r\n return result;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { CursorColumns } from './cursorCommon.js';\r\nexport class AtomicTabMoveOperations {\r\n /**\r\n * Get the visible column at the position. If we get to a non-whitespace character first\r\n * or past the end of string then return -1.\r\n *\r\n * **Note** `position` and the return value are 0-based.\r\n */\r\n static whitespaceVisibleColumn(lineContent, position, tabSize) {\r\n const lineLength = lineContent.length;\r\n let visibleColumn = 0;\r\n let prevTabStopPosition = -1;\r\n let prevTabStopVisibleColumn = -1;\r\n for (let i = 0; i < lineLength; i++) {\r\n if (i === position) {\r\n return [prevTabStopPosition, prevTabStopVisibleColumn, visibleColumn];\r\n }\r\n if (visibleColumn % tabSize === 0) {\r\n prevTabStopPosition = i;\r\n prevTabStopVisibleColumn = visibleColumn;\r\n }\r\n const chCode = lineContent.charCodeAt(i);\r\n switch (chCode) {\r\n case 32 /* Space */:\r\n visibleColumn += 1;\r\n break;\r\n case 9 /* Tab */:\r\n // Skip to the next multiple of tabSize.\r\n visibleColumn = CursorColumns.nextRenderTabStop(visibleColumn, tabSize);\r\n break;\r\n default:\r\n return [-1, -1, -1];\r\n }\r\n }\r\n if (position === lineLength) {\r\n return [prevTabStopPosition, prevTabStopVisibleColumn, visibleColumn];\r\n }\r\n return [-1, -1, -1];\r\n }\r\n /**\r\n * Return the position that should result from a move left, right or to the\r\n * nearest tab, if atomic tabs are enabled. Left and right are used for the\r\n * arrow key movements, nearest is used for mouse selection. It returns\r\n * -1 if atomic tabs are not relevant and you should fall back to normal\r\n * behaviour.\r\n *\r\n * **Note**: `position` and the return value are 0-based.\r\n */\r\n static atomicPosition(lineContent, position, tabSize, direction) {\r\n const lineLength = lineContent.length;\r\n // Get the 0-based visible column corresponding to the position, or return\r\n // -1 if it is not in the initial whitespace.\r\n const [prevTabStopPosition, prevTabStopVisibleColumn, visibleColumn] = AtomicTabMoveOperations.whitespaceVisibleColumn(lineContent, position, tabSize);\r\n if (visibleColumn === -1) {\r\n return -1;\r\n }\r\n // Is the output left or right of the current position. The case for nearest\r\n // where it is the same as the current position is handled in the switch.\r\n let left;\r\n switch (direction) {\r\n case 0 /* Left */:\r\n left = true;\r\n break;\r\n case 1 /* Right */:\r\n left = false;\r\n break;\r\n case 2 /* Nearest */:\r\n // The code below assumes the output position is either left or right\r\n // of the input position. If it is the same, return immediately.\r\n if (visibleColumn % tabSize === 0) {\r\n return position;\r\n }\r\n // Go to the nearest indentation.\r\n left = visibleColumn % tabSize <= (tabSize / 2);\r\n break;\r\n }\r\n // If going left, we can just use the info about the last tab stop position and\r\n // last tab stop visible column that we computed in the first walk over the whitespace.\r\n if (left) {\r\n if (prevTabStopPosition === -1) {\r\n return -1;\r\n }\r\n // If the direction is left, we need to keep scanning right to ensure\r\n // that targetVisibleColumn + tabSize is before non-whitespace.\r\n // This is so that when we press left at the end of a partial\r\n // indentation it only goes one character. For example ' foo' with\r\n // tabSize 4, should jump from position 6 to position 5, not 4.\r\n let currentVisibleColumn = prevTabStopVisibleColumn;\r\n for (let i = prevTabStopPosition; i < lineLength; ++i) {\r\n if (currentVisibleColumn === prevTabStopVisibleColumn + tabSize) {\r\n // It is a full indentation.\r\n return prevTabStopPosition;\r\n }\r\n const chCode = lineContent.charCodeAt(i);\r\n switch (chCode) {\r\n case 32 /* Space */:\r\n currentVisibleColumn += 1;\r\n break;\r\n case 9 /* Tab */:\r\n currentVisibleColumn = CursorColumns.nextRenderTabStop(currentVisibleColumn, tabSize);\r\n break;\r\n default:\r\n return -1;\r\n }\r\n }\r\n if (currentVisibleColumn === prevTabStopVisibleColumn + tabSize) {\r\n return prevTabStopPosition;\r\n }\r\n // It must have been a partial indentation.\r\n return -1;\r\n }\r\n // We are going right.\r\n const targetVisibleColumn = CursorColumns.nextRenderTabStop(visibleColumn, tabSize);\r\n // We can just continue from where whitespaceVisibleColumn got to.\r\n let currentVisibleColumn = visibleColumn;\r\n for (let i = position; i < lineLength; i++) {\r\n if (currentVisibleColumn === targetVisibleColumn) {\r\n return i;\r\n }\r\n const chCode = lineContent.charCodeAt(i);\r\n switch (chCode) {\r\n case 32 /* Space */:\r\n currentVisibleColumn += 1;\r\n break;\r\n case 9 /* Tab */:\r\n currentVisibleColumn = CursorColumns.nextRenderTabStop(currentVisibleColumn, tabSize);\r\n break;\r\n default:\r\n return -1;\r\n }\r\n }\r\n // This condition handles when the target column is at the end of the line.\r\n if (currentVisibleColumn === targetVisibleColumn) {\r\n return lineLength;\r\n }\r\n return -1;\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as strings from '../../../base/common/strings.js';\r\nimport { LineTokens } from '../core/lineTokens.js';\r\nimport { NULL_STATE, nullTokenize2 } from './nullMode.js';\r\nconst fallback = {\r\n getInitialState: () => NULL_STATE,\r\n tokenize2: (buffer, hasEOL, state, deltaOffset) => nullTokenize2(0 /* Null */, buffer, state, deltaOffset)\r\n};\r\nexport function tokenizeToString(text, tokenizationSupport = fallback) {\r\n return _tokenizeToString(text, tokenizationSupport || fallback);\r\n}\r\nexport function tokenizeLineToHTML(text, viewLineTokens, colorMap, startOffset, endOffset, tabSize, useNbsp) {\r\n let result = `
    `;\r\n let charIndex = startOffset;\r\n let tabsCharDelta = 0;\r\n for (let tokenIndex = 0, tokenCount = viewLineTokens.getCount(); tokenIndex < tokenCount; tokenIndex++) {\r\n const tokenEndIndex = viewLineTokens.getEndOffset(tokenIndex);\r\n if (tokenEndIndex <= startOffset) {\r\n continue;\r\n }\r\n let partContent = '';\r\n for (; charIndex < tokenEndIndex && charIndex < endOffset; charIndex++) {\r\n const charCode = text.charCodeAt(charIndex);\r\n switch (charCode) {\r\n case 9 /* Tab */:\r\n let insertSpacesCount = tabSize - (charIndex + tabsCharDelta) % tabSize;\r\n tabsCharDelta += insertSpacesCount - 1;\r\n while (insertSpacesCount > 0) {\r\n partContent += useNbsp ? ' ' : ' ';\r\n insertSpacesCount--;\r\n }\r\n break;\r\n case 60 /* LessThan */:\r\n partContent += '<';\r\n break;\r\n case 62 /* GreaterThan */:\r\n partContent += '>';\r\n break;\r\n case 38 /* Ampersand */:\r\n partContent += '&';\r\n break;\r\n case 0 /* Null */:\r\n partContent += '�';\r\n break;\r\n case 65279 /* UTF8_BOM */:\r\n case 8232 /* LINE_SEPARATOR */:\r\n case 8233 /* PARAGRAPH_SEPARATOR */:\r\n case 133 /* NEXT_LINE */:\r\n partContent += '\\ufffd';\r\n break;\r\n case 13 /* CarriageReturn */:\r\n // zero width space, because carriage return would introduce a line break\r\n partContent += '​';\r\n break;\r\n case 32 /* Space */:\r\n partContent += useNbsp ? ' ' : ' ';\r\n break;\r\n default:\r\n partContent += String.fromCharCode(charCode);\r\n }\r\n }\r\n result += `${partContent}`;\r\n if (tokenEndIndex > endOffset || charIndex >= endOffset) {\r\n break;\r\n }\r\n }\r\n result += `
    `;\r\n return result;\r\n}\r\nfunction _tokenizeToString(text, tokenizationSupport) {\r\n let result = `
    `;\r\n let lines = strings.splitLines(text);\r\n let currentState = tokenizationSupport.getInitialState();\r\n for (let i = 0, len = lines.length; i < len; i++) {\r\n let line = lines[i];\r\n if (i > 0) {\r\n result += `
    `;\r\n }\r\n let tokenizationResult = tokenizationSupport.tokenize2(line, true, currentState, 0);\r\n LineTokens.convertToEndOffset(tokenizationResult.tokens, line.length);\r\n let lineTokens = new LineTokens(tokenizationResult.tokens, line);\r\n let viewLineTokens = lineTokens.inflate();\r\n let startOffset = 0;\r\n for (let j = 0, lenJ = viewLineTokens.getCount(); j < lenJ; j++) {\r\n const type = viewLineTokens.getClassName(j);\r\n const endIndex = viewLineTokens.getEndOffset(j);\r\n result += `${strings.escape(line.substring(startOffset, endIndex))}`;\r\n startOffset = endIndex;\r\n }\r\n currentState = tokenizationResult.endState;\r\n }\r\n result += `
    `;\r\n return result;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Disposable, DisposableStore, dispose } from '../../../base/common/lifecycle.js';\r\nimport * as platform from '../../../base/common/platform.js';\r\nimport * as errors from '../../../base/common/errors.js';\r\nimport { EDITOR_MODEL_DEFAULTS } from '../config/editorOptions.js';\r\nimport { TextModel } from '../model/textModel.js';\r\nimport { DocumentSemanticTokensProviderRegistry } from '../modes.js';\r\nimport { PLAINTEXT_LANGUAGE_IDENTIFIER } from '../modes/modesRegistry.js';\r\nimport { ITextResourcePropertiesService } from './textResourceConfigurationService.js';\r\nimport { IConfigurationService } from '../../../platform/configuration/common/configuration.js';\r\nimport { RunOnceScheduler } from '../../../base/common/async.js';\r\nimport { CancellationTokenSource } from '../../../base/common/cancellation.js';\r\nimport { IThemeService } from '../../../platform/theme/common/themeService.js';\r\nimport { ILogService } from '../../../platform/log/common/log.js';\r\nimport { IUndoRedoService } from '../../../platform/undoRedo/common/undoRedo.js';\r\nimport { StringSHA1 } from '../../../base/common/hash.js';\r\nimport { isEditStackElement } from '../model/editStack.js';\r\nimport { Schemas } from '../../../base/common/network.js';\r\nimport { SemanticTokensProviderStyling, toMultilineTokens2 } from './semanticTokensProviderStyling.js';\r\nimport { getDocumentSemanticTokens, isSemanticTokens, isSemanticTokensEdits } from './getSemanticTokens.js';\r\nfunction MODEL_ID(resource) {\r\n return resource.toString();\r\n}\r\nfunction computeModelSha1(model) {\r\n // compute the sha1\r\n const shaComputer = new StringSHA1();\r\n const snapshot = model.createSnapshot();\r\n let text;\r\n while ((text = snapshot.read())) {\r\n shaComputer.update(text);\r\n }\r\n return shaComputer.digest();\r\n}\r\nclass ModelData {\r\n constructor(model, onWillDispose, onDidChangeLanguage) {\r\n this._modelEventListeners = new DisposableStore();\r\n this.model = model;\r\n this._languageSelection = null;\r\n this._languageSelectionListener = null;\r\n this._modelEventListeners.add(model.onWillDispose(() => onWillDispose(model)));\r\n this._modelEventListeners.add(model.onDidChangeLanguage((e) => onDidChangeLanguage(model, e)));\r\n }\r\n _disposeLanguageSelection() {\r\n if (this._languageSelectionListener) {\r\n this._languageSelectionListener.dispose();\r\n this._languageSelectionListener = null;\r\n }\r\n if (this._languageSelection) {\r\n this._languageSelection.dispose();\r\n this._languageSelection = null;\r\n }\r\n }\r\n dispose() {\r\n this._modelEventListeners.dispose();\r\n this._disposeLanguageSelection();\r\n }\r\n setLanguage(languageSelection) {\r\n this._disposeLanguageSelection();\r\n this._languageSelection = languageSelection;\r\n this._languageSelectionListener = this._languageSelection.onDidChange(() => this.model.setMode(languageSelection.languageIdentifier));\r\n this.model.setMode(languageSelection.languageIdentifier);\r\n }\r\n}\r\nconst DEFAULT_EOL = (platform.isLinux || platform.isMacintosh) ? 1 /* LF */ : 2 /* CRLF */;\r\nclass DisposedModelInfo {\r\n constructor(uri, initialUndoRedoSnapshot, time, sharesUndoRedoStack, heapSize, sha1, versionId, alternativeVersionId) {\r\n this.uri = uri;\r\n this.initialUndoRedoSnapshot = initialUndoRedoSnapshot;\r\n this.time = time;\r\n this.sharesUndoRedoStack = sharesUndoRedoStack;\r\n this.heapSize = heapSize;\r\n this.sha1 = sha1;\r\n this.versionId = versionId;\r\n this.alternativeVersionId = alternativeVersionId;\r\n }\r\n}\r\nfunction schemaShouldMaintainUndoRedoElements(resource) {\r\n return (resource.scheme === Schemas.file\r\n || resource.scheme === Schemas.vscodeRemote\r\n || resource.scheme === Schemas.userData\r\n || resource.scheme === 'fake-fs' // for tests\r\n );\r\n}\r\nlet ModelServiceImpl = class ModelServiceImpl extends Disposable {\r\n constructor(_configurationService, _resourcePropertiesService, _themeService, _logService, _undoRedoService) {\r\n super();\r\n this._configurationService = _configurationService;\r\n this._resourcePropertiesService = _resourcePropertiesService;\r\n this._themeService = _themeService;\r\n this._logService = _logService;\r\n this._undoRedoService = _undoRedoService;\r\n this._onModelAdded = this._register(new Emitter());\r\n this.onModelAdded = this._onModelAdded.event;\r\n this._onModelRemoved = this._register(new Emitter());\r\n this.onModelRemoved = this._onModelRemoved.event;\r\n this._onModelModeChanged = this._register(new Emitter());\r\n this.onModelModeChanged = this._onModelModeChanged.event;\r\n this._modelCreationOptionsByLanguageAndResource = Object.create(null);\r\n this._models = {};\r\n this._disposedModels = new Map();\r\n this._disposedModelsHeapSize = 0;\r\n this._semanticStyling = this._register(new SemanticStyling(this._themeService, this._logService));\r\n this._register(this._configurationService.onDidChangeConfiguration(() => this._updateModelOptions()));\r\n this._updateModelOptions();\r\n this._register(new SemanticColoringFeature(this, this._themeService, this._configurationService, this._semanticStyling));\r\n }\r\n static _readModelOptions(config, isForSimpleWidget) {\r\n let tabSize = EDITOR_MODEL_DEFAULTS.tabSize;\r\n if (config.editor && typeof config.editor.tabSize !== 'undefined') {\r\n const parsedTabSize = parseInt(config.editor.tabSize, 10);\r\n if (!isNaN(parsedTabSize)) {\r\n tabSize = parsedTabSize;\r\n }\r\n if (tabSize < 1) {\r\n tabSize = 1;\r\n }\r\n }\r\n let indentSize = tabSize;\r\n if (config.editor && typeof config.editor.indentSize !== 'undefined' && config.editor.indentSize !== 'tabSize') {\r\n const parsedIndentSize = parseInt(config.editor.indentSize, 10);\r\n if (!isNaN(parsedIndentSize)) {\r\n indentSize = parsedIndentSize;\r\n }\r\n if (indentSize < 1) {\r\n indentSize = 1;\r\n }\r\n }\r\n let insertSpaces = EDITOR_MODEL_DEFAULTS.insertSpaces;\r\n if (config.editor && typeof config.editor.insertSpaces !== 'undefined') {\r\n insertSpaces = (config.editor.insertSpaces === 'false' ? false : Boolean(config.editor.insertSpaces));\r\n }\r\n let newDefaultEOL = DEFAULT_EOL;\r\n const eol = config.eol;\r\n if (eol === '\\r\\n') {\r\n newDefaultEOL = 2 /* CRLF */;\r\n }\r\n else if (eol === '\\n') {\r\n newDefaultEOL = 1 /* LF */;\r\n }\r\n let trimAutoWhitespace = EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;\r\n if (config.editor && typeof config.editor.trimAutoWhitespace !== 'undefined') {\r\n trimAutoWhitespace = (config.editor.trimAutoWhitespace === 'false' ? false : Boolean(config.editor.trimAutoWhitespace));\r\n }\r\n let detectIndentation = EDITOR_MODEL_DEFAULTS.detectIndentation;\r\n if (config.editor && typeof config.editor.detectIndentation !== 'undefined') {\r\n detectIndentation = (config.editor.detectIndentation === 'false' ? false : Boolean(config.editor.detectIndentation));\r\n }\r\n let largeFileOptimizations = EDITOR_MODEL_DEFAULTS.largeFileOptimizations;\r\n if (config.editor && typeof config.editor.largeFileOptimizations !== 'undefined') {\r\n largeFileOptimizations = (config.editor.largeFileOptimizations === 'false' ? false : Boolean(config.editor.largeFileOptimizations));\r\n }\r\n return {\r\n isForSimpleWidget: isForSimpleWidget,\r\n tabSize: tabSize,\r\n indentSize: indentSize,\r\n insertSpaces: insertSpaces,\r\n detectIndentation: detectIndentation,\r\n defaultEOL: newDefaultEOL,\r\n trimAutoWhitespace: trimAutoWhitespace,\r\n largeFileOptimizations: largeFileOptimizations\r\n };\r\n }\r\n _getEOL(resource, language) {\r\n if (resource) {\r\n return this._resourcePropertiesService.getEOL(resource, language);\r\n }\r\n const eol = this._configurationService.getValue('files.eol', { overrideIdentifier: language });\r\n if (eol && eol !== 'auto') {\r\n return eol;\r\n }\r\n return platform.OS === 3 /* Linux */ || platform.OS === 2 /* Macintosh */ ? '\\n' : '\\r\\n';\r\n }\r\n _shouldRestoreUndoStack() {\r\n const result = this._configurationService.getValue('files.restoreUndoStack');\r\n if (typeof result === 'boolean') {\r\n return result;\r\n }\r\n return true;\r\n }\r\n getCreationOptions(language, resource, isForSimpleWidget) {\r\n let creationOptions = this._modelCreationOptionsByLanguageAndResource[language + resource];\r\n if (!creationOptions) {\r\n const editor = this._configurationService.getValue('editor', { overrideIdentifier: language, resource });\r\n const eol = this._getEOL(resource, language);\r\n creationOptions = ModelServiceImpl._readModelOptions({ editor, eol }, isForSimpleWidget);\r\n this._modelCreationOptionsByLanguageAndResource[language + resource] = creationOptions;\r\n }\r\n return creationOptions;\r\n }\r\n _updateModelOptions() {\r\n const oldOptionsByLanguageAndResource = this._modelCreationOptionsByLanguageAndResource;\r\n this._modelCreationOptionsByLanguageAndResource = Object.create(null);\r\n // Update options on all models\r\n const keys = Object.keys(this._models);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const modelId = keys[i];\r\n const modelData = this._models[modelId];\r\n const language = modelData.model.getLanguageIdentifier().language;\r\n const uri = modelData.model.uri;\r\n const oldOptions = oldOptionsByLanguageAndResource[language + uri];\r\n const newOptions = this.getCreationOptions(language, uri, modelData.model.isForSimpleWidget);\r\n ModelServiceImpl._setModelOptionsForModel(modelData.model, newOptions, oldOptions);\r\n }\r\n }\r\n static _setModelOptionsForModel(model, newOptions, currentOptions) {\r\n if (currentOptions && currentOptions.defaultEOL !== newOptions.defaultEOL && model.getLineCount() === 1) {\r\n model.setEOL(newOptions.defaultEOL === 1 /* LF */ ? 0 /* LF */ : 1 /* CRLF */);\r\n }\r\n if (currentOptions\r\n && (currentOptions.detectIndentation === newOptions.detectIndentation)\r\n && (currentOptions.insertSpaces === newOptions.insertSpaces)\r\n && (currentOptions.tabSize === newOptions.tabSize)\r\n && (currentOptions.indentSize === newOptions.indentSize)\r\n && (currentOptions.trimAutoWhitespace === newOptions.trimAutoWhitespace)) {\r\n // Same indent opts, no need to touch the model\r\n return;\r\n }\r\n if (newOptions.detectIndentation) {\r\n model.detectIndentation(newOptions.insertSpaces, newOptions.tabSize);\r\n model.updateOptions({\r\n trimAutoWhitespace: newOptions.trimAutoWhitespace\r\n });\r\n }\r\n else {\r\n model.updateOptions({\r\n insertSpaces: newOptions.insertSpaces,\r\n tabSize: newOptions.tabSize,\r\n indentSize: newOptions.indentSize,\r\n trimAutoWhitespace: newOptions.trimAutoWhitespace\r\n });\r\n }\r\n }\r\n // --- begin IModelService\r\n _insertDisposedModel(disposedModelData) {\r\n this._disposedModels.set(MODEL_ID(disposedModelData.uri), disposedModelData);\r\n this._disposedModelsHeapSize += disposedModelData.heapSize;\r\n }\r\n _removeDisposedModel(resource) {\r\n const disposedModelData = this._disposedModels.get(MODEL_ID(resource));\r\n if (disposedModelData) {\r\n this._disposedModelsHeapSize -= disposedModelData.heapSize;\r\n }\r\n this._disposedModels.delete(MODEL_ID(resource));\r\n return disposedModelData;\r\n }\r\n _ensureDisposedModelsHeapSize(maxModelsHeapSize) {\r\n if (this._disposedModelsHeapSize > maxModelsHeapSize) {\r\n // we must remove some old undo stack elements to free up some memory\r\n const disposedModels = [];\r\n this._disposedModels.forEach(entry => {\r\n if (!entry.sharesUndoRedoStack) {\r\n disposedModels.push(entry);\r\n }\r\n });\r\n disposedModels.sort((a, b) => a.time - b.time);\r\n while (disposedModels.length > 0 && this._disposedModelsHeapSize > maxModelsHeapSize) {\r\n const disposedModel = disposedModels.shift();\r\n this._removeDisposedModel(disposedModel.uri);\r\n if (disposedModel.initialUndoRedoSnapshot !== null) {\r\n this._undoRedoService.restoreSnapshot(disposedModel.initialUndoRedoSnapshot);\r\n }\r\n }\r\n }\r\n }\r\n _createModelData(value, languageIdentifier, resource, isForSimpleWidget) {\r\n // create & save the model\r\n const options = this.getCreationOptions(languageIdentifier.language, resource, isForSimpleWidget);\r\n const model = new TextModel(value, options, languageIdentifier, resource, this._undoRedoService);\r\n if (resource && this._disposedModels.has(MODEL_ID(resource))) {\r\n const disposedModelData = this._removeDisposedModel(resource);\r\n const elements = this._undoRedoService.getElements(resource);\r\n const sha1IsEqual = (computeModelSha1(model) === disposedModelData.sha1);\r\n if (sha1IsEqual || disposedModelData.sharesUndoRedoStack) {\r\n for (const element of elements.past) {\r\n if (isEditStackElement(element) && element.matchesResource(resource)) {\r\n element.setModel(model);\r\n }\r\n }\r\n for (const element of elements.future) {\r\n if (isEditStackElement(element) && element.matchesResource(resource)) {\r\n element.setModel(model);\r\n }\r\n }\r\n this._undoRedoService.setElementsValidFlag(resource, true, (element) => (isEditStackElement(element) && element.matchesResource(resource)));\r\n if (sha1IsEqual) {\r\n model._overwriteVersionId(disposedModelData.versionId);\r\n model._overwriteAlternativeVersionId(disposedModelData.alternativeVersionId);\r\n model._overwriteInitialUndoRedoSnapshot(disposedModelData.initialUndoRedoSnapshot);\r\n }\r\n }\r\n else {\r\n if (disposedModelData.initialUndoRedoSnapshot !== null) {\r\n this._undoRedoService.restoreSnapshot(disposedModelData.initialUndoRedoSnapshot);\r\n }\r\n }\r\n }\r\n const modelId = MODEL_ID(model.uri);\r\n if (this._models[modelId]) {\r\n // There already exists a model with this id => this is a programmer error\r\n throw new Error('ModelService: Cannot add model because it already exists!');\r\n }\r\n const modelData = new ModelData(model, (model) => this._onWillDispose(model), (model, e) => this._onDidChangeLanguage(model, e));\r\n this._models[modelId] = modelData;\r\n return modelData;\r\n }\r\n createModel(value, languageSelection, resource, isForSimpleWidget = false) {\r\n let modelData;\r\n if (languageSelection) {\r\n modelData = this._createModelData(value, languageSelection.languageIdentifier, resource, isForSimpleWidget);\r\n this.setMode(modelData.model, languageSelection);\r\n }\r\n else {\r\n modelData = this._createModelData(value, PLAINTEXT_LANGUAGE_IDENTIFIER, resource, isForSimpleWidget);\r\n }\r\n this._onModelAdded.fire(modelData.model);\r\n return modelData.model;\r\n }\r\n setMode(model, languageSelection) {\r\n if (!languageSelection) {\r\n return;\r\n }\r\n const modelData = this._models[MODEL_ID(model.uri)];\r\n if (!modelData) {\r\n return;\r\n }\r\n modelData.setLanguage(languageSelection);\r\n }\r\n getModels() {\r\n const ret = [];\r\n const keys = Object.keys(this._models);\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n const modelId = keys[i];\r\n ret.push(this._models[modelId].model);\r\n }\r\n return ret;\r\n }\r\n getModel(resource) {\r\n const modelId = MODEL_ID(resource);\r\n const modelData = this._models[modelId];\r\n if (!modelData) {\r\n return null;\r\n }\r\n return modelData.model;\r\n }\r\n getSemanticTokensProviderStyling(provider) {\r\n return this._semanticStyling.get(provider);\r\n }\r\n // --- end IModelService\r\n _onWillDispose(model) {\r\n const modelId = MODEL_ID(model.uri);\r\n const modelData = this._models[modelId];\r\n const sharesUndoRedoStack = (this._undoRedoService.getUriComparisonKey(model.uri) !== model.uri.toString());\r\n let maintainUndoRedoStack = false;\r\n let heapSize = 0;\r\n if (sharesUndoRedoStack || (this._shouldRestoreUndoStack() && schemaShouldMaintainUndoRedoElements(model.uri))) {\r\n const elements = this._undoRedoService.getElements(model.uri);\r\n if (elements.past.length > 0 || elements.future.length > 0) {\r\n for (const element of elements.past) {\r\n if (isEditStackElement(element) && element.matchesResource(model.uri)) {\r\n maintainUndoRedoStack = true;\r\n heapSize += element.heapSize(model.uri);\r\n element.setModel(model.uri); // remove reference from text buffer instance\r\n }\r\n }\r\n for (const element of elements.future) {\r\n if (isEditStackElement(element) && element.matchesResource(model.uri)) {\r\n maintainUndoRedoStack = true;\r\n heapSize += element.heapSize(model.uri);\r\n element.setModel(model.uri); // remove reference from text buffer instance\r\n }\r\n }\r\n }\r\n }\r\n const maxMemory = ModelServiceImpl.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;\r\n if (!maintainUndoRedoStack) {\r\n if (!sharesUndoRedoStack) {\r\n const initialUndoRedoSnapshot = modelData.model.getInitialUndoRedoSnapshot();\r\n if (initialUndoRedoSnapshot !== null) {\r\n this._undoRedoService.restoreSnapshot(initialUndoRedoSnapshot);\r\n }\r\n }\r\n }\r\n else if (!sharesUndoRedoStack && heapSize > maxMemory) {\r\n // the undo stack for this file would never fit in the configured memory, so don't bother with it.\r\n const initialUndoRedoSnapshot = modelData.model.getInitialUndoRedoSnapshot();\r\n if (initialUndoRedoSnapshot !== null) {\r\n this._undoRedoService.restoreSnapshot(initialUndoRedoSnapshot);\r\n }\r\n }\r\n else {\r\n this._ensureDisposedModelsHeapSize(maxMemory - heapSize);\r\n // We only invalidate the elements, but they remain in the undo-redo service.\r\n this._undoRedoService.setElementsValidFlag(model.uri, false, (element) => (isEditStackElement(element) && element.matchesResource(model.uri)));\r\n this._insertDisposedModel(new DisposedModelInfo(model.uri, modelData.model.getInitialUndoRedoSnapshot(), Date.now(), sharesUndoRedoStack, heapSize, computeModelSha1(model), model.getVersionId(), model.getAlternativeVersionId()));\r\n }\r\n delete this._models[modelId];\r\n modelData.dispose();\r\n // clean up cache\r\n delete this._modelCreationOptionsByLanguageAndResource[model.getLanguageIdentifier().language + model.uri];\r\n this._onModelRemoved.fire(model);\r\n }\r\n _onDidChangeLanguage(model, e) {\r\n const oldModeId = e.oldLanguage;\r\n const newModeId = model.getLanguageIdentifier().language;\r\n const oldOptions = this.getCreationOptions(oldModeId, model.uri, model.isForSimpleWidget);\r\n const newOptions = this.getCreationOptions(newModeId, model.uri, model.isForSimpleWidget);\r\n ModelServiceImpl._setModelOptionsForModel(model, newOptions, oldOptions);\r\n this._onModelModeChanged.fire({ model, oldModeId });\r\n }\r\n};\r\nModelServiceImpl.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK = 20 * 1024 * 1024;\r\nModelServiceImpl = __decorate([\r\n __param(0, IConfigurationService),\r\n __param(1, ITextResourcePropertiesService),\r\n __param(2, IThemeService),\r\n __param(3, ILogService),\r\n __param(4, IUndoRedoService)\r\n], ModelServiceImpl);\r\nexport { ModelServiceImpl };\r\nexport const SEMANTIC_HIGHLIGHTING_SETTING_ID = 'editor.semanticHighlighting';\r\nexport function isSemanticColoringEnabled(model, themeService, configurationService) {\r\n var _a;\r\n const setting = (_a = configurationService.getValue(SEMANTIC_HIGHLIGHTING_SETTING_ID, { overrideIdentifier: model.getLanguageIdentifier().language, resource: model.uri })) === null || _a === void 0 ? void 0 : _a.enabled;\r\n if (typeof setting === 'boolean') {\r\n return setting;\r\n }\r\n return themeService.getColorTheme().semanticHighlighting;\r\n}\r\nclass SemanticColoringFeature extends Disposable {\r\n constructor(modelService, themeService, configurationService, semanticStyling) {\r\n super();\r\n this._watchers = Object.create(null);\r\n this._semanticStyling = semanticStyling;\r\n const register = (model) => {\r\n this._watchers[model.uri.toString()] = new ModelSemanticColoring(model, themeService, this._semanticStyling);\r\n };\r\n const deregister = (model, modelSemanticColoring) => {\r\n modelSemanticColoring.dispose();\r\n delete this._watchers[model.uri.toString()];\r\n };\r\n const handleSettingOrThemeChange = () => {\r\n for (let model of modelService.getModels()) {\r\n const curr = this._watchers[model.uri.toString()];\r\n if (isSemanticColoringEnabled(model, themeService, configurationService)) {\r\n if (!curr) {\r\n register(model);\r\n }\r\n }\r\n else {\r\n if (curr) {\r\n deregister(model, curr);\r\n }\r\n }\r\n }\r\n };\r\n this._register(modelService.onModelAdded((model) => {\r\n if (isSemanticColoringEnabled(model, themeService, configurationService)) {\r\n register(model);\r\n }\r\n }));\r\n this._register(modelService.onModelRemoved((model) => {\r\n const curr = this._watchers[model.uri.toString()];\r\n if (curr) {\r\n deregister(model, curr);\r\n }\r\n }));\r\n this._register(configurationService.onDidChangeConfiguration(e => {\r\n if (e.affectsConfiguration(SEMANTIC_HIGHLIGHTING_SETTING_ID)) {\r\n handleSettingOrThemeChange();\r\n }\r\n }));\r\n this._register(themeService.onDidColorThemeChange(handleSettingOrThemeChange));\r\n }\r\n}\r\nclass SemanticStyling extends Disposable {\r\n constructor(_themeService, _logService) {\r\n super();\r\n this._themeService = _themeService;\r\n this._logService = _logService;\r\n this._caches = new WeakMap();\r\n this._register(this._themeService.onDidColorThemeChange(() => {\r\n this._caches = new WeakMap();\r\n }));\r\n }\r\n get(provider) {\r\n if (!this._caches.has(provider)) {\r\n this._caches.set(provider, new SemanticTokensProviderStyling(provider.getLegend(), this._themeService, this._logService));\r\n }\r\n return this._caches.get(provider);\r\n }\r\n}\r\nclass SemanticTokensResponse {\r\n constructor(_provider, resultId, data) {\r\n this._provider = _provider;\r\n this.resultId = resultId;\r\n this.data = data;\r\n }\r\n dispose() {\r\n this._provider.releaseDocumentSemanticTokens(this.resultId);\r\n }\r\n}\r\nexport class ModelSemanticColoring extends Disposable {\r\n constructor(model, themeService, stylingProvider) {\r\n super();\r\n this._isDisposed = false;\r\n this._model = model;\r\n this._semanticStyling = stylingProvider;\r\n this._fetchDocumentSemanticTokens = this._register(new RunOnceScheduler(() => this._fetchDocumentSemanticTokensNow(), ModelSemanticColoring.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY));\r\n this._currentDocumentResponse = null;\r\n this._currentDocumentRequestCancellationTokenSource = null;\r\n this._documentProvidersChangeListeners = [];\r\n this._register(this._model.onDidChangeContent(() => {\r\n if (!this._fetchDocumentSemanticTokens.isScheduled()) {\r\n this._fetchDocumentSemanticTokens.schedule();\r\n }\r\n }));\r\n const bindDocumentChangeListeners = () => {\r\n dispose(this._documentProvidersChangeListeners);\r\n this._documentProvidersChangeListeners = [];\r\n for (const provider of DocumentSemanticTokensProviderRegistry.all(model)) {\r\n if (typeof provider.onDidChange === 'function') {\r\n this._documentProvidersChangeListeners.push(provider.onDidChange(() => this._fetchDocumentSemanticTokens.schedule(0)));\r\n }\r\n }\r\n };\r\n bindDocumentChangeListeners();\r\n this._register(DocumentSemanticTokensProviderRegistry.onDidChange(() => {\r\n bindDocumentChangeListeners();\r\n this._fetchDocumentSemanticTokens.schedule();\r\n }));\r\n this._register(themeService.onDidColorThemeChange(_ => {\r\n // clear out existing tokens\r\n this._setDocumentSemanticTokens(null, null, null, []);\r\n this._fetchDocumentSemanticTokens.schedule();\r\n }));\r\n this._fetchDocumentSemanticTokens.schedule(0);\r\n }\r\n dispose() {\r\n if (this._currentDocumentResponse) {\r\n this._currentDocumentResponse.dispose();\r\n this._currentDocumentResponse = null;\r\n }\r\n if (this._currentDocumentRequestCancellationTokenSource) {\r\n this._currentDocumentRequestCancellationTokenSource.cancel();\r\n this._currentDocumentRequestCancellationTokenSource = null;\r\n }\r\n this._setDocumentSemanticTokens(null, null, null, []);\r\n this._isDisposed = true;\r\n super.dispose();\r\n }\r\n _fetchDocumentSemanticTokensNow() {\r\n if (this._currentDocumentRequestCancellationTokenSource) {\r\n // there is already a request running, let it finish...\r\n return;\r\n }\r\n const cancellationTokenSource = new CancellationTokenSource();\r\n const lastResultId = this._currentDocumentResponse ? this._currentDocumentResponse.resultId || null : null;\r\n const r = getDocumentSemanticTokens(this._model, lastResultId, cancellationTokenSource.token);\r\n if (!r) {\r\n // there is no provider\r\n if (this._currentDocumentResponse) {\r\n // there are semantic tokens set\r\n this._model.setSemanticTokens(null, false);\r\n }\r\n return;\r\n }\r\n const { provider, request } = r;\r\n this._currentDocumentRequestCancellationTokenSource = cancellationTokenSource;\r\n const pendingChanges = [];\r\n const contentChangeListener = this._model.onDidChangeContent((e) => {\r\n pendingChanges.push(e);\r\n });\r\n const styling = this._semanticStyling.get(provider);\r\n request.then((res) => {\r\n this._currentDocumentRequestCancellationTokenSource = null;\r\n contentChangeListener.dispose();\r\n this._setDocumentSemanticTokens(provider, res || null, styling, pendingChanges);\r\n }, (err) => {\r\n const isExpectedError = err && (errors.isPromiseCanceledError(err) || (typeof err.message === 'string' && err.message.indexOf('busy') !== -1));\r\n if (!isExpectedError) {\r\n errors.onUnexpectedError(err);\r\n }\r\n // Semantic tokens eats up all errors and considers errors to mean that the result is temporarily not available\r\n // The API does not have a special error kind to express this...\r\n this._currentDocumentRequestCancellationTokenSource = null;\r\n contentChangeListener.dispose();\r\n if (pendingChanges.length > 0) {\r\n // More changes occurred while the request was running\r\n if (!this._fetchDocumentSemanticTokens.isScheduled()) {\r\n this._fetchDocumentSemanticTokens.schedule();\r\n }\r\n }\r\n });\r\n }\r\n static _copy(src, srcOffset, dest, destOffset, length) {\r\n for (let i = 0; i < length; i++) {\r\n dest[destOffset + i] = src[srcOffset + i];\r\n }\r\n }\r\n _setDocumentSemanticTokens(provider, tokens, styling, pendingChanges) {\r\n const currentResponse = this._currentDocumentResponse;\r\n const rescheduleIfNeeded = () => {\r\n if (pendingChanges.length > 0 && !this._fetchDocumentSemanticTokens.isScheduled()) {\r\n this._fetchDocumentSemanticTokens.schedule();\r\n }\r\n };\r\n if (this._currentDocumentResponse) {\r\n this._currentDocumentResponse.dispose();\r\n this._currentDocumentResponse = null;\r\n }\r\n if (this._isDisposed) {\r\n // disposed!\r\n if (provider && tokens) {\r\n provider.releaseDocumentSemanticTokens(tokens.resultId);\r\n }\r\n return;\r\n }\r\n if (!provider || !styling) {\r\n this._model.setSemanticTokens(null, false);\r\n return;\r\n }\r\n if (!tokens) {\r\n this._model.setSemanticTokens(null, true);\r\n rescheduleIfNeeded();\r\n return;\r\n }\r\n if (isSemanticTokensEdits(tokens)) {\r\n if (!currentResponse) {\r\n // not possible!\r\n this._model.setSemanticTokens(null, true);\r\n return;\r\n }\r\n if (tokens.edits.length === 0) {\r\n // nothing to do!\r\n tokens = {\r\n resultId: tokens.resultId,\r\n data: currentResponse.data\r\n };\r\n }\r\n else {\r\n let deltaLength = 0;\r\n for (const edit of tokens.edits) {\r\n deltaLength += (edit.data ? edit.data.length : 0) - edit.deleteCount;\r\n }\r\n const srcData = currentResponse.data;\r\n const destData = new Uint32Array(srcData.length + deltaLength);\r\n let srcLastStart = srcData.length;\r\n let destLastStart = destData.length;\r\n for (let i = tokens.edits.length - 1; i >= 0; i--) {\r\n const edit = tokens.edits[i];\r\n const copyCount = srcLastStart - (edit.start + edit.deleteCount);\r\n if (copyCount > 0) {\r\n ModelSemanticColoring._copy(srcData, srcLastStart - copyCount, destData, destLastStart - copyCount, copyCount);\r\n destLastStart -= copyCount;\r\n }\r\n if (edit.data) {\r\n ModelSemanticColoring._copy(edit.data, 0, destData, destLastStart - edit.data.length, edit.data.length);\r\n destLastStart -= edit.data.length;\r\n }\r\n srcLastStart = edit.start;\r\n }\r\n if (srcLastStart > 0) {\r\n ModelSemanticColoring._copy(srcData, 0, destData, 0, srcLastStart);\r\n }\r\n tokens = {\r\n resultId: tokens.resultId,\r\n data: destData\r\n };\r\n }\r\n }\r\n if (isSemanticTokens(tokens)) {\r\n this._currentDocumentResponse = new SemanticTokensResponse(provider, tokens.resultId, tokens.data);\r\n const result = toMultilineTokens2(tokens, styling, this._model.getLanguageIdentifier());\r\n // Adjust incoming semantic tokens\r\n if (pendingChanges.length > 0) {\r\n // More changes occurred while the request was running\r\n // We need to:\r\n // 1. Adjust incoming semantic tokens\r\n // 2. Request them again\r\n for (const change of pendingChanges) {\r\n for (const area of result) {\r\n for (const singleChange of change.changes) {\r\n area.applyEdit(singleChange.range, singleChange.text);\r\n }\r\n }\r\n }\r\n }\r\n this._model.setSemanticTokens(result, true);\r\n }\r\n else {\r\n this._model.setSemanticTokens(null, true);\r\n }\r\n rescheduleIfNeeded();\r\n }\r\n}\r\nModelSemanticColoring.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY = 300;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { TokenMetadata } from '../modes.js';\r\nimport { LogLevel } from '../../../platform/log/common/log.js';\r\nimport { MultilineTokens2, SparseEncodedTokens } from '../model/tokensStore.js';\r\nexport class SemanticTokensProviderStyling {\r\n constructor(_legend, _themeService, _logService) {\r\n this._legend = _legend;\r\n this._themeService = _themeService;\r\n this._logService = _logService;\r\n this._hashTable = new HashTable();\r\n }\r\n getMetadata(tokenTypeIndex, tokenModifierSet, languageId) {\r\n const entry = this._hashTable.get(tokenTypeIndex, tokenModifierSet, languageId.id);\r\n let metadata;\r\n if (entry) {\r\n metadata = entry.metadata;\r\n if (this._logService.getLevel() === LogLevel.Trace) {\r\n this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${tokenTypeIndex} / ${tokenModifierSet}: foreground ${TokenMetadata.getForeground(metadata)}, fontStyle ${TokenMetadata.getFontStyle(metadata).toString(2)}`);\r\n }\r\n }\r\n else {\r\n let tokenType = this._legend.tokenTypes[tokenTypeIndex];\r\n const tokenModifiers = [];\r\n if (tokenType) {\r\n let modifierSet = tokenModifierSet;\r\n for (let modifierIndex = 0; modifierSet > 0 && modifierIndex < this._legend.tokenModifiers.length; modifierIndex++) {\r\n if (modifierSet & 1) {\r\n tokenModifiers.push(this._legend.tokenModifiers[modifierIndex]);\r\n }\r\n modifierSet = modifierSet >> 1;\r\n }\r\n if (modifierSet > 0 && this._logService.getLevel() === LogLevel.Trace) {\r\n this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${tokenModifierSet.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`);\r\n tokenModifiers.push('not-in-legend');\r\n }\r\n const tokenStyle = this._themeService.getColorTheme().getTokenStyleMetadata(tokenType, tokenModifiers, languageId.language);\r\n if (typeof tokenStyle === 'undefined') {\r\n metadata = 2147483647 /* NO_STYLING */;\r\n }\r\n else {\r\n metadata = 0;\r\n if (typeof tokenStyle.italic !== 'undefined') {\r\n const italicBit = (tokenStyle.italic ? 1 /* Italic */ : 0) << 11 /* FONT_STYLE_OFFSET */;\r\n metadata |= italicBit | 1 /* SEMANTIC_USE_ITALIC */;\r\n }\r\n if (typeof tokenStyle.bold !== 'undefined') {\r\n const boldBit = (tokenStyle.bold ? 2 /* Bold */ : 0) << 11 /* FONT_STYLE_OFFSET */;\r\n metadata |= boldBit | 2 /* SEMANTIC_USE_BOLD */;\r\n }\r\n if (typeof tokenStyle.underline !== 'undefined') {\r\n const underlineBit = (tokenStyle.underline ? 4 /* Underline */ : 0) << 11 /* FONT_STYLE_OFFSET */;\r\n metadata |= underlineBit | 4 /* SEMANTIC_USE_UNDERLINE */;\r\n }\r\n if (tokenStyle.foreground) {\r\n const foregroundBits = (tokenStyle.foreground) << 14 /* FOREGROUND_OFFSET */;\r\n metadata |= foregroundBits | 8 /* SEMANTIC_USE_FOREGROUND */;\r\n }\r\n if (metadata === 0) {\r\n // Nothing!\r\n metadata = 2147483647 /* NO_STYLING */;\r\n }\r\n }\r\n }\r\n else {\r\n if (this._logService.getLevel() === LogLevel.Trace) {\r\n this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${tokenTypeIndex} for legend: ${JSON.stringify(this._legend.tokenTypes)}`);\r\n }\r\n metadata = 2147483647 /* NO_STYLING */;\r\n tokenType = 'not-in-legend';\r\n }\r\n this._hashTable.add(tokenTypeIndex, tokenModifierSet, languageId.id, metadata);\r\n if (this._logService.getLevel() === LogLevel.Trace) {\r\n this._logService.trace(`SemanticTokensProviderStyling ${tokenTypeIndex} (${tokenType}) / ${tokenModifierSet} (${tokenModifiers.join(' ')}): foreground ${TokenMetadata.getForeground(metadata)}, fontStyle ${TokenMetadata.getFontStyle(metadata).toString(2)}`);\r\n }\r\n }\r\n return metadata;\r\n }\r\n}\r\nexport function toMultilineTokens2(tokens, styling, languageId) {\r\n const srcData = tokens.data;\r\n const tokenCount = (tokens.data.length / 5) | 0;\r\n const tokensPerArea = Math.max(Math.ceil(tokenCount / 1024 /* DesiredMaxAreas */), 400 /* DesiredTokensPerArea */);\r\n const result = [];\r\n let tokenIndex = 0;\r\n let lastLineNumber = 1;\r\n let lastStartCharacter = 0;\r\n while (tokenIndex < tokenCount) {\r\n const tokenStartIndex = tokenIndex;\r\n let tokenEndIndex = Math.min(tokenStartIndex + tokensPerArea, tokenCount);\r\n // Keep tokens on the same line in the same area...\r\n if (tokenEndIndex < tokenCount) {\r\n let smallTokenEndIndex = tokenEndIndex;\r\n while (smallTokenEndIndex - 1 > tokenStartIndex && srcData[5 * smallTokenEndIndex] === 0) {\r\n smallTokenEndIndex--;\r\n }\r\n if (smallTokenEndIndex - 1 === tokenStartIndex) {\r\n // there are so many tokens on this line that our area would be empty, we must now go right\r\n let bigTokenEndIndex = tokenEndIndex;\r\n while (bigTokenEndIndex + 1 < tokenCount && srcData[5 * bigTokenEndIndex] === 0) {\r\n bigTokenEndIndex++;\r\n }\r\n tokenEndIndex = bigTokenEndIndex;\r\n }\r\n else {\r\n tokenEndIndex = smallTokenEndIndex;\r\n }\r\n }\r\n let destData = new Uint32Array((tokenEndIndex - tokenStartIndex) * 4);\r\n let destOffset = 0;\r\n let areaLine = 0;\r\n while (tokenIndex < tokenEndIndex) {\r\n const srcOffset = 5 * tokenIndex;\r\n const deltaLine = srcData[srcOffset];\r\n const deltaCharacter = srcData[srcOffset + 1];\r\n const lineNumber = lastLineNumber + deltaLine;\r\n const startCharacter = (deltaLine === 0 ? lastStartCharacter + deltaCharacter : deltaCharacter);\r\n const length = srcData[srcOffset + 2];\r\n const tokenTypeIndex = srcData[srcOffset + 3];\r\n const tokenModifierSet = srcData[srcOffset + 4];\r\n const metadata = styling.getMetadata(tokenTypeIndex, tokenModifierSet, languageId);\r\n if (metadata !== 2147483647 /* NO_STYLING */) {\r\n if (areaLine === 0) {\r\n areaLine = lineNumber;\r\n }\r\n destData[destOffset] = lineNumber - areaLine;\r\n destData[destOffset + 1] = startCharacter;\r\n destData[destOffset + 2] = startCharacter + length;\r\n destData[destOffset + 3] = metadata;\r\n destOffset += 4;\r\n }\r\n lastLineNumber = lineNumber;\r\n lastStartCharacter = startCharacter;\r\n tokenIndex++;\r\n }\r\n if (destOffset !== destData.length) {\r\n destData = destData.subarray(0, destOffset);\r\n }\r\n const tokens = new MultilineTokens2(areaLine, new SparseEncodedTokens(destData));\r\n result.push(tokens);\r\n }\r\n return result;\r\n}\r\nclass HashTableEntry {\r\n constructor(tokenTypeIndex, tokenModifierSet, languageId, metadata) {\r\n this.tokenTypeIndex = tokenTypeIndex;\r\n this.tokenModifierSet = tokenModifierSet;\r\n this.languageId = languageId;\r\n this.metadata = metadata;\r\n this.next = null;\r\n }\r\n}\r\nclass HashTable {\r\n constructor() {\r\n this._elementsCount = 0;\r\n this._currentLengthIndex = 0;\r\n this._currentLength = HashTable._SIZES[this._currentLengthIndex];\r\n this._growCount = Math.round(this._currentLengthIndex + 1 < HashTable._SIZES.length ? 2 / 3 * this._currentLength : 0);\r\n this._elements = [];\r\n HashTable._nullOutEntries(this._elements, this._currentLength);\r\n }\r\n static _nullOutEntries(entries, length) {\r\n for (let i = 0; i < length; i++) {\r\n entries[i] = null;\r\n }\r\n }\r\n _hash2(n1, n2) {\r\n return (((n1 << 5) - n1) + n2) | 0; // n1 * 31 + n2, keep as int32\r\n }\r\n _hashFunc(tokenTypeIndex, tokenModifierSet, languageId) {\r\n return this._hash2(this._hash2(tokenTypeIndex, tokenModifierSet), languageId) % this._currentLength;\r\n }\r\n get(tokenTypeIndex, tokenModifierSet, languageId) {\r\n const hash = this._hashFunc(tokenTypeIndex, tokenModifierSet, languageId);\r\n let p = this._elements[hash];\r\n while (p) {\r\n if (p.tokenTypeIndex === tokenTypeIndex && p.tokenModifierSet === tokenModifierSet && p.languageId === languageId) {\r\n return p;\r\n }\r\n p = p.next;\r\n }\r\n return null;\r\n }\r\n add(tokenTypeIndex, tokenModifierSet, languageId, metadata) {\r\n this._elementsCount++;\r\n if (this._growCount !== 0 && this._elementsCount >= this._growCount) {\r\n // expand!\r\n const oldElements = this._elements;\r\n this._currentLengthIndex++;\r\n this._currentLength = HashTable._SIZES[this._currentLengthIndex];\r\n this._growCount = Math.round(this._currentLengthIndex + 1 < HashTable._SIZES.length ? 2 / 3 * this._currentLength : 0);\r\n this._elements = [];\r\n HashTable._nullOutEntries(this._elements, this._currentLength);\r\n for (const first of oldElements) {\r\n let p = first;\r\n while (p) {\r\n const oldNext = p.next;\r\n p.next = null;\r\n this._add(p);\r\n p = oldNext;\r\n }\r\n }\r\n }\r\n this._add(new HashTableEntry(tokenTypeIndex, tokenModifierSet, languageId, metadata));\r\n }\r\n _add(element) {\r\n const hash = this._hashFunc(element.tokenTypeIndex, element.tokenModifierSet, element.languageId);\r\n element.next = this._elements[hash];\r\n this._elements[hash] = element;\r\n }\r\n}\r\nHashTable._SIZES = [3, 7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139, 524287, 1048573, 2097143];\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport './countBadge.css';\r\nimport { $, append } from '../../dom.js';\r\nimport { format } from '../../../common/strings.js';\r\nimport { Color } from '../../../common/color.js';\r\nimport { mixin } from '../../../common/objects.js';\r\nconst defaultOpts = {\r\n badgeBackground: Color.fromHex('#4D4D4D'),\r\n badgeForeground: Color.fromHex('#FFFFFF')\r\n};\r\nexport class CountBadge {\r\n constructor(container, options) {\r\n this.count = 0;\r\n this.options = options || Object.create(null);\r\n mixin(this.options, defaultOpts, false);\r\n this.badgeBackground = this.options.badgeBackground;\r\n this.badgeForeground = this.options.badgeForeground;\r\n this.badgeBorder = this.options.badgeBorder;\r\n this.element = append(container, $('.monaco-count-badge'));\r\n this.countFormat = this.options.countFormat || '{0}';\r\n this.titleFormat = this.options.titleFormat || '';\r\n this.setCount(this.options.count || 0);\r\n }\r\n setCount(count) {\r\n this.count = count;\r\n this.render();\r\n }\r\n setTitleFormat(titleFormat) {\r\n this.titleFormat = titleFormat;\r\n this.render();\r\n }\r\n render() {\r\n this.element.textContent = format(this.countFormat, this.count);\r\n this.element.title = format(this.titleFormat, this.count);\r\n this.applyStyles();\r\n }\r\n style(styles) {\r\n this.badgeBackground = styles.badgeBackground;\r\n this.badgeForeground = styles.badgeForeground;\r\n this.badgeBorder = styles.badgeBorder;\r\n this.applyStyles();\r\n }\r\n applyStyles() {\r\n if (this.element) {\r\n const background = this.badgeBackground ? this.badgeBackground.toString() : '';\r\n const foreground = this.badgeForeground ? this.badgeForeground.toString() : '';\r\n const border = this.badgeBorder ? this.badgeBorder.toString() : '';\r\n this.element.style.backgroundColor = background;\r\n this.element.style.color = foreground;\r\n this.element.style.borderWidth = border ? '1px' : '';\r\n this.element.style.borderStyle = border ? 'solid' : '';\r\n this.element.style.borderColor = border;\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { EditOperation } from '../../common/core/editOperation.js';\r\nimport { Range } from '../../common/core/range.js';\r\nexport class FormattingEdit {\r\n static _handleEolEdits(editor, edits) {\r\n let newEol = undefined;\r\n let singleEdits = [];\r\n for (let edit of edits) {\r\n if (typeof edit.eol === 'number') {\r\n newEol = edit.eol;\r\n }\r\n if (edit.range && typeof edit.text === 'string') {\r\n singleEdits.push(edit);\r\n }\r\n }\r\n if (typeof newEol === 'number') {\r\n if (editor.hasModel()) {\r\n editor.getModel().pushEOL(newEol);\r\n }\r\n }\r\n return singleEdits;\r\n }\r\n static _isFullModelReplaceEdit(editor, edit) {\r\n if (!editor.hasModel()) {\r\n return false;\r\n }\r\n const model = editor.getModel();\r\n const editRange = model.validateRange(edit.range);\r\n const fullModelRange = model.getFullModelRange();\r\n return fullModelRange.equalsRange(editRange);\r\n }\r\n static execute(editor, _edits, addUndoStops) {\r\n if (addUndoStops) {\r\n editor.pushUndoStop();\r\n }\r\n const edits = FormattingEdit._handleEolEdits(editor, _edits);\r\n if (edits.length === 1 && FormattingEdit._isFullModelReplaceEdit(editor, edits[0])) {\r\n // We use replace semantics and hope that markers stay put...\r\n editor.executeEdits('formatEditsCommand', edits.map(edit => EditOperation.replace(Range.lift(edit.range), edit.text)));\r\n }\r\n else {\r\n editor.executeEdits('formatEditsCommand', edits.map(edit => EditOperation.replaceMove(Range.lift(edit.range), edit.text)));\r\n }\r\n if (addUndoStops) {\r\n editor.pushUndoStop();\r\n }\r\n }\r\n}\r\n","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","var _typeof = require(\"@babel/runtime/helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","var getPrototypeOf = require(\"./getPrototypeOf\");\n\nvar setPrototypeOf = require(\"./setPrototypeOf\");\n\nvar isNativeFunction = require(\"./isNativeFunction\");\n\nvar construct = require(\"./construct\");\n\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}\n\nmodule.exports = _wrapNativeSuper;","'use strict'\n\nvar fromCharCode = String.fromCharCode\n\nmodule.exports = fromCharCode\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiAlpha = regexCheck(/[A-Za-z]/)\n\nmodule.exports = asciiAlpha\n","'use strict'\n\nmodule.exports = convert\n\nfunction convert(test) {\n if (test == null) {\n return ok\n }\n\n if (typeof test === 'string') {\n return typeFactory(test)\n }\n\n if (typeof test === 'object') {\n return 'length' in test ? anyFactory(test) : allFactory(test)\n }\n\n if (typeof test === 'function') {\n return test\n }\n\n throw new Error('Expected function, string, or object as test')\n}\n\n// Utility assert each property in `test` is represented in `node`, and each\n// values are strictly equal.\nfunction allFactory(test) {\n return all\n\n function all(node) {\n var key\n\n for (key in test) {\n if (node[key] !== test[key]) return false\n }\n\n return true\n }\n}\n\nfunction anyFactory(tests) {\n var checks = []\n var index = -1\n\n while (++index < tests.length) {\n checks[index] = convert(tests[index])\n }\n\n return any\n\n function any() {\n var index = -1\n\n while (++index < checks.length) {\n if (checks[index].apply(this, arguments)) {\n return true\n }\n }\n\n return false\n }\n}\n\n// Utility to convert a string into a function which checks a given node’s type\n// for said string.\nfunction typeFactory(test) {\n return type\n\n function type(node) {\n return Boolean(node && node.type === test)\n }\n}\n\n// Utility to return true.\nfunction ok() {\n return true\n}\n","\n'use strict';\n\n\nvar encodeCache = {};\n\n\n// Create a lookup array where anything but characters in `chars` string\n// and alphanumeric chars is percent-encoded.\n//\nfunction getEncodeCache(exclude) {\n var i, ch, cache = encodeCache[exclude];\n if (cache) { return cache; }\n\n cache = encodeCache[exclude] = [];\n\n for (i = 0; i < 128; i++) {\n ch = String.fromCharCode(i);\n\n if (/^[0-9a-z]$/i.test(ch)) {\n // always allow unencoded alphanumeric characters\n cache.push(ch);\n } else {\n cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));\n }\n }\n\n for (i = 0; i < exclude.length; i++) {\n cache[exclude.charCodeAt(i)] = exclude[i];\n }\n\n return cache;\n}\n\n\n// Encode unsafe characters with percent-encoding, skipping already\n// encoded sequences.\n//\n// - string - string to encode\n// - exclude - list of characters to ignore (in addition to a-zA-Z0-9)\n// - keepEscaped - don't encode '%' in a correct escape sequence (default: true)\n//\nfunction encode(string, exclude, keepEscaped) {\n var i, l, code, nextCode, cache,\n result = '';\n\n if (typeof exclude !== 'string') {\n // encode(string, keepEscaped)\n keepEscaped = exclude;\n exclude = encode.defaultChars;\n }\n\n if (typeof keepEscaped === 'undefined') {\n keepEscaped = true;\n }\n\n cache = getEncodeCache(exclude);\n\n for (i = 0, l = string.length; i < l; i++) {\n code = string.charCodeAt(i);\n\n if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {\n if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {\n result += string.slice(i, i + 3);\n i += 2;\n continue;\n }\n }\n\n if (code < 128) {\n result += cache[code];\n continue;\n }\n\n if (code >= 0xD800 && code <= 0xDFFF) {\n if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {\n nextCode = string.charCodeAt(i + 1);\n if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {\n result += encodeURIComponent(string[i] + string[i + 1]);\n i++;\n continue;\n }\n }\n result += '%EF%BF%BD';\n continue;\n }\n\n result += encodeURIComponent(string[i]);\n }\n\n return result;\n}\n\nencode.defaultChars = \";/?:@&=+$,-_.!~*'()#\";\nencode.componentChars = \"-_.!~*'()\";\n\n\nmodule.exports = encode;\n","'use strict'\n\nvar merge = require('./lib/util/merge')\nvar xlink = require('./lib/xlink')\nvar xml = require('./lib/xml')\nvar xmlns = require('./lib/xmlns')\nvar aria = require('./lib/aria')\nvar html = require('./lib/html')\n\nmodule.exports = merge([xml, xlink, xmlns, aria, html])\n","'use strict'\n\nvar powers = 0\n\nexports.boolean = increment()\nexports.booleanish = increment()\nexports.overloadedBoolean = increment()\nexports.number = increment()\nexports.spaceSeparated = increment()\nexports.commaSeparated = increment()\nexports.commaOrSpaceSeparated = increment()\n\nfunction increment() {\n return Math.pow(2, ++powers)\n}\n","'use strict'\n\nvar merge = require('./lib/util/merge')\nvar xlink = require('./lib/xlink')\nvar xml = require('./lib/xml')\nvar xmlns = require('./lib/xmlns')\nvar aria = require('./lib/aria')\nvar svg = require('./lib/svg')\n\nmodule.exports = merge([xml, xlink, xmlns, aria, svg])\n","'use strict'\n\nvar normalize = require('./normalize')\nvar DefinedInfo = require('./lib/util/defined-info')\nvar Info = require('./lib/util/info')\n\nvar data = 'data'\n\nmodule.exports = find\n\nvar valid = /^data[-\\w.:]+$/i\nvar dash = /-[a-z]/g\nvar cap = /[A-Z]/g\n\nfunction find(schema, value) {\n var normal = normalize(value)\n var prop = value\n var Type = Info\n\n if (normal in schema.normal) {\n return schema.property[schema.normal[normal]]\n }\n\n if (normal.length > 4 && normal.slice(0, 4) === data && valid.test(value)) {\n // Attribute or property.\n if (value.charAt(4) === '-') {\n prop = datasetToProperty(value)\n } else {\n value = datasetToAttribute(value)\n }\n\n Type = DefinedInfo\n }\n\n return new Type(prop, value)\n}\n\nfunction datasetToProperty(attribute) {\n var value = attribute.slice(5).replace(dash, camelcase)\n return data + value.charAt(0).toUpperCase() + value.slice(1)\n}\n\nfunction datasetToAttribute(property) {\n var value = property.slice(4)\n\n if (dash.test(value)) {\n return property\n }\n\n value = value.replace(cap, kebab)\n\n if (value.charAt(0) !== '-') {\n value = '-' + value\n }\n\n return data + value\n}\n\nfunction kebab($0) {\n return '-' + $0.toLowerCase()\n}\n\nfunction camelcase($0) {\n return $0.charAt(1).toUpperCase()\n}\n","'use strict';\n\nconst Preprocessor = require('./preprocessor');\nconst unicode = require('../common/unicode');\nconst neTree = require('./named-entity-data');\nconst ERR = require('../common/error-codes');\n\n//Aliases\nconst $ = unicode.CODE_POINTS;\nconst $$ = unicode.CODE_POINT_SEQUENCES;\n\n//C1 Unicode control character reference replacements\nconst C1_CONTROLS_REFERENCE_REPLACEMENTS = {\n 0x80: 0x20ac,\n 0x82: 0x201a,\n 0x83: 0x0192,\n 0x84: 0x201e,\n 0x85: 0x2026,\n 0x86: 0x2020,\n 0x87: 0x2021,\n 0x88: 0x02c6,\n 0x89: 0x2030,\n 0x8a: 0x0160,\n 0x8b: 0x2039,\n 0x8c: 0x0152,\n 0x8e: 0x017d,\n 0x91: 0x2018,\n 0x92: 0x2019,\n 0x93: 0x201c,\n 0x94: 0x201d,\n 0x95: 0x2022,\n 0x96: 0x2013,\n 0x97: 0x2014,\n 0x98: 0x02dc,\n 0x99: 0x2122,\n 0x9a: 0x0161,\n 0x9b: 0x203a,\n 0x9c: 0x0153,\n 0x9e: 0x017e,\n 0x9f: 0x0178\n};\n\n// Named entity tree flags\nconst HAS_DATA_FLAG = 1 << 0;\nconst DATA_DUPLET_FLAG = 1 << 1;\nconst HAS_BRANCHES_FLAG = 1 << 2;\nconst MAX_BRANCH_MARKER_VALUE = HAS_DATA_FLAG | DATA_DUPLET_FLAG | HAS_BRANCHES_FLAG;\n\n//States\nconst DATA_STATE = 'DATA_STATE';\nconst RCDATA_STATE = 'RCDATA_STATE';\nconst RAWTEXT_STATE = 'RAWTEXT_STATE';\nconst SCRIPT_DATA_STATE = 'SCRIPT_DATA_STATE';\nconst PLAINTEXT_STATE = 'PLAINTEXT_STATE';\nconst TAG_OPEN_STATE = 'TAG_OPEN_STATE';\nconst END_TAG_OPEN_STATE = 'END_TAG_OPEN_STATE';\nconst TAG_NAME_STATE = 'TAG_NAME_STATE';\nconst RCDATA_LESS_THAN_SIGN_STATE = 'RCDATA_LESS_THAN_SIGN_STATE';\nconst RCDATA_END_TAG_OPEN_STATE = 'RCDATA_END_TAG_OPEN_STATE';\nconst RCDATA_END_TAG_NAME_STATE = 'RCDATA_END_TAG_NAME_STATE';\nconst RAWTEXT_LESS_THAN_SIGN_STATE = 'RAWTEXT_LESS_THAN_SIGN_STATE';\nconst RAWTEXT_END_TAG_OPEN_STATE = 'RAWTEXT_END_TAG_OPEN_STATE';\nconst RAWTEXT_END_TAG_NAME_STATE = 'RAWTEXT_END_TAG_NAME_STATE';\nconst SCRIPT_DATA_LESS_THAN_SIGN_STATE = 'SCRIPT_DATA_LESS_THAN_SIGN_STATE';\nconst SCRIPT_DATA_END_TAG_OPEN_STATE = 'SCRIPT_DATA_END_TAG_OPEN_STATE';\nconst SCRIPT_DATA_END_TAG_NAME_STATE = 'SCRIPT_DATA_END_TAG_NAME_STATE';\nconst SCRIPT_DATA_ESCAPE_START_STATE = 'SCRIPT_DATA_ESCAPE_START_STATE';\nconst SCRIPT_DATA_ESCAPE_START_DASH_STATE = 'SCRIPT_DATA_ESCAPE_START_DASH_STATE';\nconst SCRIPT_DATA_ESCAPED_STATE = 'SCRIPT_DATA_ESCAPED_STATE';\nconst SCRIPT_DATA_ESCAPED_DASH_STATE = 'SCRIPT_DATA_ESCAPED_DASH_STATE';\nconst SCRIPT_DATA_ESCAPED_DASH_DASH_STATE = 'SCRIPT_DATA_ESCAPED_DASH_DASH_STATE';\nconst SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE = 'SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE';\nconst SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE = 'SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE';\nconst SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE = 'SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE';\nconst SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE';\nconst SCRIPT_DATA_DOUBLE_ESCAPED_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_STATE';\nconst SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE';\nconst SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE';\nconst SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE';\nconst SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE = 'SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE';\nconst BEFORE_ATTRIBUTE_NAME_STATE = 'BEFORE_ATTRIBUTE_NAME_STATE';\nconst ATTRIBUTE_NAME_STATE = 'ATTRIBUTE_NAME_STATE';\nconst AFTER_ATTRIBUTE_NAME_STATE = 'AFTER_ATTRIBUTE_NAME_STATE';\nconst BEFORE_ATTRIBUTE_VALUE_STATE = 'BEFORE_ATTRIBUTE_VALUE_STATE';\nconst ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE = 'ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE';\nconst ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE = 'ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE';\nconst ATTRIBUTE_VALUE_UNQUOTED_STATE = 'ATTRIBUTE_VALUE_UNQUOTED_STATE';\nconst AFTER_ATTRIBUTE_VALUE_QUOTED_STATE = 'AFTER_ATTRIBUTE_VALUE_QUOTED_STATE';\nconst SELF_CLOSING_START_TAG_STATE = 'SELF_CLOSING_START_TAG_STATE';\nconst BOGUS_COMMENT_STATE = 'BOGUS_COMMENT_STATE';\nconst MARKUP_DECLARATION_OPEN_STATE = 'MARKUP_DECLARATION_OPEN_STATE';\nconst COMMENT_START_STATE = 'COMMENT_START_STATE';\nconst COMMENT_START_DASH_STATE = 'COMMENT_START_DASH_STATE';\nconst COMMENT_STATE = 'COMMENT_STATE';\nconst COMMENT_LESS_THAN_SIGN_STATE = 'COMMENT_LESS_THAN_SIGN_STATE';\nconst COMMENT_LESS_THAN_SIGN_BANG_STATE = 'COMMENT_LESS_THAN_SIGN_BANG_STATE';\nconst COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE = 'COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE';\nconst COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE = 'COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE';\nconst COMMENT_END_DASH_STATE = 'COMMENT_END_DASH_STATE';\nconst COMMENT_END_STATE = 'COMMENT_END_STATE';\nconst COMMENT_END_BANG_STATE = 'COMMENT_END_BANG_STATE';\nconst DOCTYPE_STATE = 'DOCTYPE_STATE';\nconst BEFORE_DOCTYPE_NAME_STATE = 'BEFORE_DOCTYPE_NAME_STATE';\nconst DOCTYPE_NAME_STATE = 'DOCTYPE_NAME_STATE';\nconst AFTER_DOCTYPE_NAME_STATE = 'AFTER_DOCTYPE_NAME_STATE';\nconst AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE = 'AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE';\nconst BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE = 'BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE';\nconst DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE = 'DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE';\nconst DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE = 'DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE';\nconst AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE = 'AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE';\nconst BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE = 'BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE';\nconst AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE = 'AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE';\nconst BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE = 'BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE';\nconst DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE = 'DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE';\nconst DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE = 'DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE';\nconst AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE = 'AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE';\nconst BOGUS_DOCTYPE_STATE = 'BOGUS_DOCTYPE_STATE';\nconst CDATA_SECTION_STATE = 'CDATA_SECTION_STATE';\nconst CDATA_SECTION_BRACKET_STATE = 'CDATA_SECTION_BRACKET_STATE';\nconst CDATA_SECTION_END_STATE = 'CDATA_SECTION_END_STATE';\nconst CHARACTER_REFERENCE_STATE = 'CHARACTER_REFERENCE_STATE';\nconst NAMED_CHARACTER_REFERENCE_STATE = 'NAMED_CHARACTER_REFERENCE_STATE';\nconst AMBIGUOUS_AMPERSAND_STATE = 'AMBIGUOS_AMPERSAND_STATE';\nconst NUMERIC_CHARACTER_REFERENCE_STATE = 'NUMERIC_CHARACTER_REFERENCE_STATE';\nconst HEXADEMICAL_CHARACTER_REFERENCE_START_STATE = 'HEXADEMICAL_CHARACTER_REFERENCE_START_STATE';\nconst DECIMAL_CHARACTER_REFERENCE_START_STATE = 'DECIMAL_CHARACTER_REFERENCE_START_STATE';\nconst HEXADEMICAL_CHARACTER_REFERENCE_STATE = 'HEXADEMICAL_CHARACTER_REFERENCE_STATE';\nconst DECIMAL_CHARACTER_REFERENCE_STATE = 'DECIMAL_CHARACTER_REFERENCE_STATE';\nconst NUMERIC_CHARACTER_REFERENCE_END_STATE = 'NUMERIC_CHARACTER_REFERENCE_END_STATE';\n\n//Utils\n\n//OPTIMIZATION: these utility functions should not be moved out of this module. V8 Crankshaft will not inline\n//this functions if they will be situated in another module due to context switch.\n//Always perform inlining check before modifying this functions ('node --trace-inlining').\nfunction isWhitespace(cp) {\n return cp === $.SPACE || cp === $.LINE_FEED || cp === $.TABULATION || cp === $.FORM_FEED;\n}\n\nfunction isAsciiDigit(cp) {\n return cp >= $.DIGIT_0 && cp <= $.DIGIT_9;\n}\n\nfunction isAsciiUpper(cp) {\n return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_Z;\n}\n\nfunction isAsciiLower(cp) {\n return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_Z;\n}\n\nfunction isAsciiLetter(cp) {\n return isAsciiLower(cp) || isAsciiUpper(cp);\n}\n\nfunction isAsciiAlphaNumeric(cp) {\n return isAsciiLetter(cp) || isAsciiDigit(cp);\n}\n\nfunction isAsciiUpperHexDigit(cp) {\n return cp >= $.LATIN_CAPITAL_A && cp <= $.LATIN_CAPITAL_F;\n}\n\nfunction isAsciiLowerHexDigit(cp) {\n return cp >= $.LATIN_SMALL_A && cp <= $.LATIN_SMALL_F;\n}\n\nfunction isAsciiHexDigit(cp) {\n return isAsciiDigit(cp) || isAsciiUpperHexDigit(cp) || isAsciiLowerHexDigit(cp);\n}\n\nfunction toAsciiLowerCodePoint(cp) {\n return cp + 0x0020;\n}\n\n//NOTE: String.fromCharCode() function can handle only characters from BMP subset.\n//So, we need to workaround this manually.\n//(see: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/fromCharCode#Getting_it_to_work_with_higher_values)\nfunction toChar(cp) {\n if (cp <= 0xffff) {\n return String.fromCharCode(cp);\n }\n\n cp -= 0x10000;\n return String.fromCharCode(((cp >>> 10) & 0x3ff) | 0xd800) + String.fromCharCode(0xdc00 | (cp & 0x3ff));\n}\n\nfunction toAsciiLowerChar(cp) {\n return String.fromCharCode(toAsciiLowerCodePoint(cp));\n}\n\nfunction findNamedEntityTreeBranch(nodeIx, cp) {\n const branchCount = neTree[++nodeIx];\n let lo = ++nodeIx;\n let hi = lo + branchCount - 1;\n\n while (lo <= hi) {\n const mid = (lo + hi) >>> 1;\n const midCp = neTree[mid];\n\n if (midCp < cp) {\n lo = mid + 1;\n } else if (midCp > cp) {\n hi = mid - 1;\n } else {\n return neTree[mid + branchCount];\n }\n }\n\n return -1;\n}\n\n//Tokenizer\nclass Tokenizer {\n constructor() {\n this.preprocessor = new Preprocessor();\n\n this.tokenQueue = [];\n\n this.allowCDATA = false;\n\n this.state = DATA_STATE;\n this.returnState = '';\n\n this.charRefCode = -1;\n this.tempBuff = [];\n this.lastStartTagName = '';\n\n this.consumedAfterSnapshot = -1;\n this.active = false;\n\n this.currentCharacterToken = null;\n this.currentToken = null;\n this.currentAttr = null;\n }\n\n //Errors\n _err() {\n // NOTE: err reporting is noop by default. Enabled by mixin.\n }\n\n _errOnNextCodePoint(err) {\n this._consume();\n this._err(err);\n this._unconsume();\n }\n\n //API\n getNextToken() {\n while (!this.tokenQueue.length && this.active) {\n this.consumedAfterSnapshot = 0;\n\n const cp = this._consume();\n\n if (!this._ensureHibernation()) {\n this[this.state](cp);\n }\n }\n\n return this.tokenQueue.shift();\n }\n\n write(chunk, isLastChunk) {\n this.active = true;\n this.preprocessor.write(chunk, isLastChunk);\n }\n\n insertHtmlAtCurrentPos(chunk) {\n this.active = true;\n this.preprocessor.insertHtmlAtCurrentPos(chunk);\n }\n\n //Hibernation\n _ensureHibernation() {\n if (this.preprocessor.endOfChunkHit) {\n for (; this.consumedAfterSnapshot > 0; this.consumedAfterSnapshot--) {\n this.preprocessor.retreat();\n }\n\n this.active = false;\n this.tokenQueue.push({ type: Tokenizer.HIBERNATION_TOKEN });\n\n return true;\n }\n\n return false;\n }\n\n //Consumption\n _consume() {\n this.consumedAfterSnapshot++;\n return this.preprocessor.advance();\n }\n\n _unconsume() {\n this.consumedAfterSnapshot--;\n this.preprocessor.retreat();\n }\n\n _reconsumeInState(state) {\n this.state = state;\n this._unconsume();\n }\n\n _consumeSequenceIfMatch(pattern, startCp, caseSensitive) {\n let consumedCount = 0;\n let isMatch = true;\n const patternLength = pattern.length;\n let patternPos = 0;\n let cp = startCp;\n let patternCp = void 0;\n\n for (; patternPos < patternLength; patternPos++) {\n if (patternPos > 0) {\n cp = this._consume();\n consumedCount++;\n }\n\n if (cp === $.EOF) {\n isMatch = false;\n break;\n }\n\n patternCp = pattern[patternPos];\n\n if (cp !== patternCp && (caseSensitive || cp !== toAsciiLowerCodePoint(patternCp))) {\n isMatch = false;\n break;\n }\n }\n\n if (!isMatch) {\n while (consumedCount--) {\n this._unconsume();\n }\n }\n\n return isMatch;\n }\n\n //Temp buffer\n _isTempBufferEqualToScriptString() {\n if (this.tempBuff.length !== $$.SCRIPT_STRING.length) {\n return false;\n }\n\n for (let i = 0; i < this.tempBuff.length; i++) {\n if (this.tempBuff[i] !== $$.SCRIPT_STRING[i]) {\n return false;\n }\n }\n\n return true;\n }\n\n //Token creation\n _createStartTagToken() {\n this.currentToken = {\n type: Tokenizer.START_TAG_TOKEN,\n tagName: '',\n selfClosing: false,\n ackSelfClosing: false,\n attrs: []\n };\n }\n\n _createEndTagToken() {\n this.currentToken = {\n type: Tokenizer.END_TAG_TOKEN,\n tagName: '',\n selfClosing: false,\n attrs: []\n };\n }\n\n _createCommentToken() {\n this.currentToken = {\n type: Tokenizer.COMMENT_TOKEN,\n data: ''\n };\n }\n\n _createDoctypeToken(initialName) {\n this.currentToken = {\n type: Tokenizer.DOCTYPE_TOKEN,\n name: initialName,\n forceQuirks: false,\n publicId: null,\n systemId: null\n };\n }\n\n _createCharacterToken(type, ch) {\n this.currentCharacterToken = {\n type: type,\n chars: ch\n };\n }\n\n _createEOFToken() {\n this.currentToken = { type: Tokenizer.EOF_TOKEN };\n }\n\n //Tag attributes\n _createAttr(attrNameFirstCh) {\n this.currentAttr = {\n name: attrNameFirstCh,\n value: ''\n };\n }\n\n _leaveAttrName(toState) {\n if (Tokenizer.getTokenAttr(this.currentToken, this.currentAttr.name) === null) {\n this.currentToken.attrs.push(this.currentAttr);\n } else {\n this._err(ERR.duplicateAttribute);\n }\n\n this.state = toState;\n }\n\n _leaveAttrValue(toState) {\n this.state = toState;\n }\n\n //Token emission\n _emitCurrentToken() {\n this._emitCurrentCharacterToken();\n\n const ct = this.currentToken;\n\n this.currentToken = null;\n\n //NOTE: store emited start tag's tagName to determine is the following end tag token is appropriate.\n if (ct.type === Tokenizer.START_TAG_TOKEN) {\n this.lastStartTagName = ct.tagName;\n } else if (ct.type === Tokenizer.END_TAG_TOKEN) {\n if (ct.attrs.length > 0) {\n this._err(ERR.endTagWithAttributes);\n }\n\n if (ct.selfClosing) {\n this._err(ERR.endTagWithTrailingSolidus);\n }\n }\n\n this.tokenQueue.push(ct);\n }\n\n _emitCurrentCharacterToken() {\n if (this.currentCharacterToken) {\n this.tokenQueue.push(this.currentCharacterToken);\n this.currentCharacterToken = null;\n }\n }\n\n _emitEOFToken() {\n this._createEOFToken();\n this._emitCurrentToken();\n }\n\n //Characters emission\n\n //OPTIMIZATION: specification uses only one type of character tokens (one token per character).\n //This causes a huge memory overhead and a lot of unnecessary parser loops. parse5 uses 3 groups of characters.\n //If we have a sequence of characters that belong to the same group, parser can process it\n //as a single solid character token.\n //So, there are 3 types of character tokens in parse5:\n //1)NULL_CHARACTER_TOKEN - \\u0000-character sequences (e.g. '\\u0000\\u0000\\u0000')\n //2)WHITESPACE_CHARACTER_TOKEN - any whitespace/new-line character sequences (e.g. '\\n \\r\\t \\f')\n //3)CHARACTER_TOKEN - any character sequence which don't belong to groups 1 and 2 (e.g. 'abcdef1234@@#$%^')\n _appendCharToCurrentCharacterToken(type, ch) {\n if (this.currentCharacterToken && this.currentCharacterToken.type !== type) {\n this._emitCurrentCharacterToken();\n }\n\n if (this.currentCharacterToken) {\n this.currentCharacterToken.chars += ch;\n } else {\n this._createCharacterToken(type, ch);\n }\n }\n\n _emitCodePoint(cp) {\n let type = Tokenizer.CHARACTER_TOKEN;\n\n if (isWhitespace(cp)) {\n type = Tokenizer.WHITESPACE_CHARACTER_TOKEN;\n } else if (cp === $.NULL) {\n type = Tokenizer.NULL_CHARACTER_TOKEN;\n }\n\n this._appendCharToCurrentCharacterToken(type, toChar(cp));\n }\n\n _emitSeveralCodePoints(codePoints) {\n for (let i = 0; i < codePoints.length; i++) {\n this._emitCodePoint(codePoints[i]);\n }\n }\n\n //NOTE: used then we emit character explicitly. This is always a non-whitespace and a non-null character.\n //So we can avoid additional checks here.\n _emitChars(ch) {\n this._appendCharToCurrentCharacterToken(Tokenizer.CHARACTER_TOKEN, ch);\n }\n\n // Character reference helpers\n _matchNamedCharacterReference(startCp) {\n let result = null;\n let excess = 1;\n let i = findNamedEntityTreeBranch(0, startCp);\n\n this.tempBuff.push(startCp);\n\n while (i > -1) {\n const current = neTree[i];\n const inNode = current < MAX_BRANCH_MARKER_VALUE;\n const nodeWithData = inNode && current & HAS_DATA_FLAG;\n\n if (nodeWithData) {\n //NOTE: we use greedy search, so we continue lookup at this point\n result = current & DATA_DUPLET_FLAG ? [neTree[++i], neTree[++i]] : [neTree[++i]];\n excess = 0;\n }\n\n const cp = this._consume();\n\n this.tempBuff.push(cp);\n excess++;\n\n if (cp === $.EOF) {\n break;\n }\n\n if (inNode) {\n i = current & HAS_BRANCHES_FLAG ? findNamedEntityTreeBranch(i, cp) : -1;\n } else {\n i = cp === current ? ++i : -1;\n }\n }\n\n while (excess--) {\n this.tempBuff.pop();\n this._unconsume();\n }\n\n return result;\n }\n\n _isCharacterReferenceInAttribute() {\n return (\n this.returnState === ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE ||\n this.returnState === ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE ||\n this.returnState === ATTRIBUTE_VALUE_UNQUOTED_STATE\n );\n }\n\n _isCharacterReferenceAttributeQuirk(withSemicolon) {\n if (!withSemicolon && this._isCharacterReferenceInAttribute()) {\n const nextCp = this._consume();\n\n this._unconsume();\n\n return nextCp === $.EQUALS_SIGN || isAsciiAlphaNumeric(nextCp);\n }\n\n return false;\n }\n\n _flushCodePointsConsumedAsCharacterReference() {\n if (this._isCharacterReferenceInAttribute()) {\n for (let i = 0; i < this.tempBuff.length; i++) {\n this.currentAttr.value += toChar(this.tempBuff[i]);\n }\n } else {\n this._emitSeveralCodePoints(this.tempBuff);\n }\n\n this.tempBuff = [];\n }\n\n // State machine\n\n // Data state\n //------------------------------------------------------------------\n [DATA_STATE](cp) {\n this.preprocessor.dropParsedChunk();\n\n if (cp === $.LESS_THAN_SIGN) {\n this.state = TAG_OPEN_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = DATA_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this._emitCodePoint(cp);\n } else if (cp === $.EOF) {\n this._emitEOFToken();\n } else {\n this._emitCodePoint(cp);\n }\n }\n\n // RCDATA state\n //------------------------------------------------------------------\n [RCDATA_STATE](cp) {\n this.preprocessor.dropParsedChunk();\n\n if (cp === $.AMPERSAND) {\n this.returnState = RCDATA_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.LESS_THAN_SIGN) {\n this.state = RCDATA_LESS_THAN_SIGN_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(unicode.REPLACEMENT_CHARACTER);\n } else if (cp === $.EOF) {\n this._emitEOFToken();\n } else {\n this._emitCodePoint(cp);\n }\n }\n\n // RAWTEXT state\n //------------------------------------------------------------------\n [RAWTEXT_STATE](cp) {\n this.preprocessor.dropParsedChunk();\n\n if (cp === $.LESS_THAN_SIGN) {\n this.state = RAWTEXT_LESS_THAN_SIGN_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(unicode.REPLACEMENT_CHARACTER);\n } else if (cp === $.EOF) {\n this._emitEOFToken();\n } else {\n this._emitCodePoint(cp);\n }\n }\n\n // Script data state\n //------------------------------------------------------------------\n [SCRIPT_DATA_STATE](cp) {\n this.preprocessor.dropParsedChunk();\n\n if (cp === $.LESS_THAN_SIGN) {\n this.state = SCRIPT_DATA_LESS_THAN_SIGN_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(unicode.REPLACEMENT_CHARACTER);\n } else if (cp === $.EOF) {\n this._emitEOFToken();\n } else {\n this._emitCodePoint(cp);\n }\n }\n\n // PLAINTEXT state\n //------------------------------------------------------------------\n [PLAINTEXT_STATE](cp) {\n this.preprocessor.dropParsedChunk();\n\n if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(unicode.REPLACEMENT_CHARACTER);\n } else if (cp === $.EOF) {\n this._emitEOFToken();\n } else {\n this._emitCodePoint(cp);\n }\n }\n\n // Tag open state\n //------------------------------------------------------------------\n [TAG_OPEN_STATE](cp) {\n if (cp === $.EXCLAMATION_MARK) {\n this.state = MARKUP_DECLARATION_OPEN_STATE;\n } else if (cp === $.SOLIDUS) {\n this.state = END_TAG_OPEN_STATE;\n } else if (isAsciiLetter(cp)) {\n this._createStartTagToken();\n this._reconsumeInState(TAG_NAME_STATE);\n } else if (cp === $.QUESTION_MARK) {\n this._err(ERR.unexpectedQuestionMarkInsteadOfTagName);\n this._createCommentToken();\n this._reconsumeInState(BOGUS_COMMENT_STATE);\n } else if (cp === $.EOF) {\n this._err(ERR.eofBeforeTagName);\n this._emitChars('<');\n this._emitEOFToken();\n } else {\n this._err(ERR.invalidFirstCharacterOfTagName);\n this._emitChars('<');\n this._reconsumeInState(DATA_STATE);\n }\n }\n\n // End tag open state\n //------------------------------------------------------------------\n [END_TAG_OPEN_STATE](cp) {\n if (isAsciiLetter(cp)) {\n this._createEndTagToken();\n this._reconsumeInState(TAG_NAME_STATE);\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.missingEndTagName);\n this.state = DATA_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofBeforeTagName);\n this._emitChars('');\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.state = SCRIPT_DATA_ESCAPED_STATE;\n this._emitChars(unicode.REPLACEMENT_CHARACTER);\n } else if (cp === $.EOF) {\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n } else {\n this.state = SCRIPT_DATA_ESCAPED_STATE;\n this._emitCodePoint(cp);\n }\n }\n\n // Script data escaped less-than sign state\n //------------------------------------------------------------------\n [SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE](cp) {\n if (cp === $.SOLIDUS) {\n this.tempBuff = [];\n this.state = SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE;\n } else if (isAsciiLetter(cp)) {\n this.tempBuff = [];\n this._emitChars('<');\n this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE);\n } else {\n this._emitChars('<');\n this._reconsumeInState(SCRIPT_DATA_ESCAPED_STATE);\n }\n }\n\n // Script data escaped end tag open state\n //------------------------------------------------------------------\n [SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE](cp) {\n if (isAsciiLetter(cp)) {\n this._createEndTagToken();\n this._reconsumeInState(SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE);\n } else {\n this._emitChars('');\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;\n this._emitChars(unicode.REPLACEMENT_CHARACTER);\n } else if (cp === $.EOF) {\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n } else {\n this.state = SCRIPT_DATA_DOUBLE_ESCAPED_STATE;\n this._emitCodePoint(cp);\n }\n }\n\n // Script data double escaped less-than sign state\n //------------------------------------------------------------------\n [SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE](cp) {\n if (cp === $.SOLIDUS) {\n this.tempBuff = [];\n this.state = SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE;\n this._emitChars('/');\n } else {\n this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPED_STATE);\n }\n }\n\n // Script data double escape end state\n //------------------------------------------------------------------\n [SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE](cp) {\n if (isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN) {\n this.state = this._isTempBufferEqualToScriptString()\n ? SCRIPT_DATA_ESCAPED_STATE\n : SCRIPT_DATA_DOUBLE_ESCAPED_STATE;\n\n this._emitCodePoint(cp);\n } else if (isAsciiUpper(cp)) {\n this.tempBuff.push(toAsciiLowerCodePoint(cp));\n this._emitCodePoint(cp);\n } else if (isAsciiLower(cp)) {\n this.tempBuff.push(cp);\n this._emitCodePoint(cp);\n } else {\n this._reconsumeInState(SCRIPT_DATA_DOUBLE_ESCAPED_STATE);\n }\n }\n\n // Before attribute name state\n //------------------------------------------------------------------\n [BEFORE_ATTRIBUTE_NAME_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF) {\n this._reconsumeInState(AFTER_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.EQUALS_SIGN) {\n this._err(ERR.unexpectedEqualsSignBeforeAttributeName);\n this._createAttr('=');\n this.state = ATTRIBUTE_NAME_STATE;\n } else {\n this._createAttr('');\n this._reconsumeInState(ATTRIBUTE_NAME_STATE);\n }\n }\n\n // Attribute name state\n //------------------------------------------------------------------\n [ATTRIBUTE_NAME_STATE](cp) {\n if (isWhitespace(cp) || cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF) {\n this._leaveAttrName(AFTER_ATTRIBUTE_NAME_STATE);\n this._unconsume();\n } else if (cp === $.EQUALS_SIGN) {\n this._leaveAttrName(BEFORE_ATTRIBUTE_VALUE_STATE);\n } else if (isAsciiUpper(cp)) {\n this.currentAttr.name += toAsciiLowerChar(cp);\n } else if (cp === $.QUOTATION_MARK || cp === $.APOSTROPHE || cp === $.LESS_THAN_SIGN) {\n this._err(ERR.unexpectedCharacterInAttributeName);\n this.currentAttr.name += toChar(cp);\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.name += unicode.REPLACEMENT_CHARACTER;\n } else {\n this.currentAttr.name += toChar(cp);\n }\n }\n\n // After attribute name state\n //------------------------------------------------------------------\n [AFTER_ATTRIBUTE_NAME_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.SOLIDUS) {\n this.state = SELF_CLOSING_START_TAG_STATE;\n } else if (cp === $.EQUALS_SIGN) {\n this.state = BEFORE_ATTRIBUTE_VALUE_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this._createAttr('');\n this._reconsumeInState(ATTRIBUTE_NAME_STATE);\n }\n }\n\n // Before attribute value state\n //------------------------------------------------------------------\n [BEFORE_ATTRIBUTE_VALUE_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.QUOTATION_MARK) {\n this.state = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;\n } else if (cp === $.APOSTROPHE) {\n this.state = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.missingAttributeValue);\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else {\n this._reconsumeInState(ATTRIBUTE_VALUE_UNQUOTED_STATE);\n }\n }\n\n // Attribute value (double-quoted) state\n //------------------------------------------------------------------\n [ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE](cp) {\n if (cp === $.QUOTATION_MARK) {\n this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }\n\n // Attribute value (single-quoted) state\n //------------------------------------------------------------------\n [ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }\n\n // Attribute value (unquoted) state\n //------------------------------------------------------------------\n [ATTRIBUTE_VALUE_UNQUOTED_STATE](cp) {\n if (isWhitespace(cp)) {\n this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_UNQUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._leaveAttrValue(DATA_STATE);\n this._emitCurrentToken();\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (\n cp === $.QUOTATION_MARK ||\n cp === $.APOSTROPHE ||\n cp === $.LESS_THAN_SIGN ||\n cp === $.EQUALS_SIGN ||\n cp === $.GRAVE_ACCENT\n ) {\n this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);\n this.currentAttr.value += toChar(cp);\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }\n\n // After attribute value (quoted) state\n //------------------------------------------------------------------\n [AFTER_ATTRIBUTE_VALUE_QUOTED_STATE](cp) {\n if (isWhitespace(cp)) {\n this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.SOLIDUS) {\n this._leaveAttrValue(SELF_CLOSING_START_TAG_STATE);\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._leaveAttrValue(DATA_STATE);\n this._emitCurrentToken();\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this._err(ERR.missingWhitespaceBetweenAttributes);\n this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE);\n }\n }\n\n // Self-closing start tag state\n //------------------------------------------------------------------\n [SELF_CLOSING_START_TAG_STATE](cp) {\n if (cp === $.GREATER_THAN_SIGN) {\n this.currentToken.selfClosing = true;\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this._err(ERR.unexpectedSolidusInTag);\n this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE);\n }\n }\n\n // Bogus comment state\n //------------------------------------------------------------------\n [BOGUS_COMMENT_STATE](cp) {\n if (cp === $.GREATER_THAN_SIGN) {\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (cp === $.EOF) {\n this._emitCurrentToken();\n this._emitEOFToken();\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentToken.data += unicode.REPLACEMENT_CHARACTER;\n } else {\n this.currentToken.data += toChar(cp);\n }\n }\n\n // Markup declaration open state\n //------------------------------------------------------------------\n [MARKUP_DECLARATION_OPEN_STATE](cp) {\n if (this._consumeSequenceIfMatch($$.DASH_DASH_STRING, cp, true)) {\n this._createCommentToken();\n this.state = COMMENT_START_STATE;\n } else if (this._consumeSequenceIfMatch($$.DOCTYPE_STRING, cp, false)) {\n this.state = DOCTYPE_STATE;\n } else if (this._consumeSequenceIfMatch($$.CDATA_START_STRING, cp, true)) {\n if (this.allowCDATA) {\n this.state = CDATA_SECTION_STATE;\n } else {\n this._err(ERR.cdataInHtmlContent);\n this._createCommentToken();\n this.currentToken.data = '[CDATA[';\n this.state = BOGUS_COMMENT_STATE;\n }\n }\n\n //NOTE: sequence lookup can be abrupted by hibernation. In that case lookup\n //results are no longer valid and we will need to start over.\n else if (!this._ensureHibernation()) {\n this._err(ERR.incorrectlyOpenedComment);\n this._createCommentToken();\n this._reconsumeInState(BOGUS_COMMENT_STATE);\n }\n }\n\n // Comment start state\n //------------------------------------------------------------------\n [COMMENT_START_STATE](cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = COMMENT_START_DASH_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.abruptClosingOfEmptyComment);\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else {\n this._reconsumeInState(COMMENT_STATE);\n }\n }\n\n // Comment start dash state\n //------------------------------------------------------------------\n [COMMENT_START_DASH_STATE](cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = COMMENT_END_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.abruptClosingOfEmptyComment);\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (cp === $.EOF) {\n this._err(ERR.eofInComment);\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.data += '-';\n this._reconsumeInState(COMMENT_STATE);\n }\n }\n\n // Comment state\n //------------------------------------------------------------------\n [COMMENT_STATE](cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = COMMENT_END_DASH_STATE;\n } else if (cp === $.LESS_THAN_SIGN) {\n this.currentToken.data += '<';\n this.state = COMMENT_LESS_THAN_SIGN_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentToken.data += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInComment);\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.data += toChar(cp);\n }\n }\n\n // Comment less-than sign state\n //------------------------------------------------------------------\n [COMMENT_LESS_THAN_SIGN_STATE](cp) {\n if (cp === $.EXCLAMATION_MARK) {\n this.currentToken.data += '!';\n this.state = COMMENT_LESS_THAN_SIGN_BANG_STATE;\n } else if (cp === $.LESS_THAN_SIGN) {\n this.currentToken.data += '!';\n } else {\n this._reconsumeInState(COMMENT_STATE);\n }\n }\n\n // Comment less-than sign bang state\n //------------------------------------------------------------------\n [COMMENT_LESS_THAN_SIGN_BANG_STATE](cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE;\n } else {\n this._reconsumeInState(COMMENT_STATE);\n }\n }\n\n // Comment less-than sign bang dash state\n //------------------------------------------------------------------\n [COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE](cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE;\n } else {\n this._reconsumeInState(COMMENT_END_DASH_STATE);\n }\n }\n\n // Comment less-than sign bang dash dash state\n //------------------------------------------------------------------\n [COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE](cp) {\n if (cp !== $.GREATER_THAN_SIGN && cp !== $.EOF) {\n this._err(ERR.nestedComment);\n }\n\n this._reconsumeInState(COMMENT_END_STATE);\n }\n\n // Comment end dash state\n //------------------------------------------------------------------\n [COMMENT_END_DASH_STATE](cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.state = COMMENT_END_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInComment);\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.data += '-';\n this._reconsumeInState(COMMENT_STATE);\n }\n }\n\n // Comment end state\n //------------------------------------------------------------------\n [COMMENT_END_STATE](cp) {\n if (cp === $.GREATER_THAN_SIGN) {\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (cp === $.EXCLAMATION_MARK) {\n this.state = COMMENT_END_BANG_STATE;\n } else if (cp === $.HYPHEN_MINUS) {\n this.currentToken.data += '-';\n } else if (cp === $.EOF) {\n this._err(ERR.eofInComment);\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.data += '--';\n this._reconsumeInState(COMMENT_STATE);\n }\n }\n\n // Comment end bang state\n //------------------------------------------------------------------\n [COMMENT_END_BANG_STATE](cp) {\n if (cp === $.HYPHEN_MINUS) {\n this.currentToken.data += '--!';\n this.state = COMMENT_END_DASH_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.incorrectlyClosedComment);\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (cp === $.EOF) {\n this._err(ERR.eofInComment);\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.data += '--!';\n this._reconsumeInState(COMMENT_STATE);\n }\n }\n\n // DOCTYPE state\n //------------------------------------------------------------------\n [DOCTYPE_STATE](cp) {\n if (isWhitespace(cp)) {\n this.state = BEFORE_DOCTYPE_NAME_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._reconsumeInState(BEFORE_DOCTYPE_NAME_STATE);\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this._createDoctypeToken(null);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this._err(ERR.missingWhitespaceBeforeDoctypeName);\n this._reconsumeInState(BEFORE_DOCTYPE_NAME_STATE);\n }\n }\n\n // Before DOCTYPE name state\n //------------------------------------------------------------------\n [BEFORE_DOCTYPE_NAME_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (isAsciiUpper(cp)) {\n this._createDoctypeToken(toAsciiLowerChar(cp));\n this.state = DOCTYPE_NAME_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this._createDoctypeToken(unicode.REPLACEMENT_CHARACTER);\n this.state = DOCTYPE_NAME_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.missingDoctypeName);\n this._createDoctypeToken(null);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this._createDoctypeToken(null);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this._createDoctypeToken(toChar(cp));\n this.state = DOCTYPE_NAME_STATE;\n }\n }\n\n // DOCTYPE name state\n //------------------------------------------------------------------\n [DOCTYPE_NAME_STATE](cp) {\n if (isWhitespace(cp)) {\n this.state = AFTER_DOCTYPE_NAME_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (isAsciiUpper(cp)) {\n this.currentToken.name += toAsciiLowerChar(cp);\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentToken.name += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.name += toChar(cp);\n }\n }\n\n // After DOCTYPE name state\n //------------------------------------------------------------------\n [AFTER_DOCTYPE_NAME_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.GREATER_THAN_SIGN) {\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else if (this._consumeSequenceIfMatch($$.PUBLIC_STRING, cp, false)) {\n this.state = AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE;\n } else if (this._consumeSequenceIfMatch($$.SYSTEM_STRING, cp, false)) {\n this.state = AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE;\n }\n //NOTE: sequence lookup can be abrupted by hibernation. In that case lookup\n //results are no longer valid and we will need to start over.\n else if (!this._ensureHibernation()) {\n this._err(ERR.invalidCharacterSequenceAfterDoctypeName);\n this.currentToken.forceQuirks = true;\n this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n }\n }\n\n // After DOCTYPE public keyword state\n //------------------------------------------------------------------\n [AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE](cp) {\n if (isWhitespace(cp)) {\n this.state = BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n } else if (cp === $.QUOTATION_MARK) {\n this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n this.currentToken.publicId = '';\n this.state = DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE;\n } else if (cp === $.APOSTROPHE) {\n this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n this.currentToken.publicId = '';\n this.state = DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.missingDoctypePublicIdentifier);\n this.currentToken.forceQuirks = true;\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n this.currentToken.forceQuirks = true;\n this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n }\n }\n\n // Before DOCTYPE public identifier state\n //------------------------------------------------------------------\n [BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.QUOTATION_MARK) {\n this.currentToken.publicId = '';\n this.state = DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE;\n } else if (cp === $.APOSTROPHE) {\n this.currentToken.publicId = '';\n this.state = DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.missingDoctypePublicIdentifier);\n this.currentToken.forceQuirks = true;\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n this.currentToken.forceQuirks = true;\n this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n }\n }\n\n // DOCTYPE public identifier (double-quoted) state\n //------------------------------------------------------------------\n [DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE](cp) {\n if (cp === $.QUOTATION_MARK) {\n this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.abruptDoctypePublicIdentifier);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.publicId += toChar(cp);\n }\n }\n\n // DOCTYPE public identifier (single-quoted) state\n //------------------------------------------------------------------\n [DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentToken.publicId += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.abruptDoctypePublicIdentifier);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.publicId += toChar(cp);\n }\n }\n\n // After DOCTYPE public identifier state\n //------------------------------------------------------------------\n [AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE](cp) {\n if (isWhitespace(cp)) {\n this.state = BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (cp === $.QUOTATION_MARK) {\n this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n this.currentToken.systemId = '';\n this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;\n } else if (cp === $.APOSTROPHE) {\n this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n this.currentToken.systemId = '';\n this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n this.currentToken.forceQuirks = true;\n this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n }\n }\n\n // Between DOCTYPE public and system identifiers state\n //------------------------------------------------------------------\n [BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.GREATER_THAN_SIGN) {\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.QUOTATION_MARK) {\n this.currentToken.systemId = '';\n this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;\n } else if (cp === $.APOSTROPHE) {\n this.currentToken.systemId = '';\n this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n this.currentToken.forceQuirks = true;\n this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n }\n }\n\n // After DOCTYPE system keyword state\n //------------------------------------------------------------------\n [AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE](cp) {\n if (isWhitespace(cp)) {\n this.state = BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE;\n } else if (cp === $.QUOTATION_MARK) {\n this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n this.currentToken.systemId = '';\n this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;\n } else if (cp === $.APOSTROPHE) {\n this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n this.currentToken.systemId = '';\n this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.missingDoctypeSystemIdentifier);\n this.currentToken.forceQuirks = true;\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n this.currentToken.forceQuirks = true;\n this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n }\n }\n\n // Before DOCTYPE system identifier state\n //------------------------------------------------------------------\n [BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.QUOTATION_MARK) {\n this.currentToken.systemId = '';\n this.state = DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE;\n } else if (cp === $.APOSTROPHE) {\n this.currentToken.systemId = '';\n this.state = DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.missingDoctypeSystemIdentifier);\n this.currentToken.forceQuirks = true;\n this.state = DATA_STATE;\n this._emitCurrentToken();\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n this.currentToken.forceQuirks = true;\n this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n }\n }\n\n // DOCTYPE system identifier (double-quoted) state\n //------------------------------------------------------------------\n [DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE](cp) {\n if (cp === $.QUOTATION_MARK) {\n this.state = AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentToken.systemId += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.abruptDoctypeSystemIdentifier);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.systemId += toChar(cp);\n }\n }\n\n // DOCTYPE system identifier (single-quoted) state\n //------------------------------------------------------------------\n [DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentToken.systemId += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.abruptDoctypeSystemIdentifier);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this.currentToken.systemId += toChar(cp);\n }\n }\n\n // After DOCTYPE system identifier state\n //------------------------------------------------------------------\n [AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.GREATER_THAN_SIGN) {\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInDoctype);\n this.currentToken.forceQuirks = true;\n this._emitCurrentToken();\n this._emitEOFToken();\n } else {\n this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier);\n this._reconsumeInState(BOGUS_DOCTYPE_STATE);\n }\n }\n\n // Bogus DOCTYPE state\n //------------------------------------------------------------------\n [BOGUS_DOCTYPE_STATE](cp) {\n if (cp === $.GREATER_THAN_SIGN) {\n this._emitCurrentToken();\n this.state = DATA_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n } else if (cp === $.EOF) {\n this._emitCurrentToken();\n this._emitEOFToken();\n }\n }\n\n // CDATA section state\n //------------------------------------------------------------------\n [CDATA_SECTION_STATE](cp) {\n if (cp === $.RIGHT_SQUARE_BRACKET) {\n this.state = CDATA_SECTION_BRACKET_STATE;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInCdata);\n this._emitEOFToken();\n } else {\n this._emitCodePoint(cp);\n }\n }\n\n // CDATA section bracket state\n //------------------------------------------------------------------\n [CDATA_SECTION_BRACKET_STATE](cp) {\n if (cp === $.RIGHT_SQUARE_BRACKET) {\n this.state = CDATA_SECTION_END_STATE;\n } else {\n this._emitChars(']');\n this._reconsumeInState(CDATA_SECTION_STATE);\n }\n }\n\n // CDATA section end state\n //------------------------------------------------------------------\n [CDATA_SECTION_END_STATE](cp) {\n if (cp === $.GREATER_THAN_SIGN) {\n this.state = DATA_STATE;\n } else if (cp === $.RIGHT_SQUARE_BRACKET) {\n this._emitChars(']');\n } else {\n this._emitChars(']]');\n this._reconsumeInState(CDATA_SECTION_STATE);\n }\n }\n\n // Character reference state\n //------------------------------------------------------------------\n [CHARACTER_REFERENCE_STATE](cp) {\n this.tempBuff = [$.AMPERSAND];\n\n if (cp === $.NUMBER_SIGN) {\n this.tempBuff.push(cp);\n this.state = NUMERIC_CHARACTER_REFERENCE_STATE;\n } else if (isAsciiAlphaNumeric(cp)) {\n this._reconsumeInState(NAMED_CHARACTER_REFERENCE_STATE);\n } else {\n this._flushCodePointsConsumedAsCharacterReference();\n this._reconsumeInState(this.returnState);\n }\n }\n\n // Named character reference state\n //------------------------------------------------------------------\n [NAMED_CHARACTER_REFERENCE_STATE](cp) {\n const matchResult = this._matchNamedCharacterReference(cp);\n\n //NOTE: matching can be abrupted by hibernation. In that case match\n //results are no longer valid and we will need to start over.\n if (this._ensureHibernation()) {\n this.tempBuff = [$.AMPERSAND];\n } else if (matchResult) {\n const withSemicolon = this.tempBuff[this.tempBuff.length - 1] === $.SEMICOLON;\n\n if (!this._isCharacterReferenceAttributeQuirk(withSemicolon)) {\n if (!withSemicolon) {\n this._errOnNextCodePoint(ERR.missingSemicolonAfterCharacterReference);\n }\n\n this.tempBuff = matchResult;\n }\n\n this._flushCodePointsConsumedAsCharacterReference();\n this.state = this.returnState;\n } else {\n this._flushCodePointsConsumedAsCharacterReference();\n this.state = AMBIGUOUS_AMPERSAND_STATE;\n }\n }\n\n // Ambiguos ampersand state\n //------------------------------------------------------------------\n [AMBIGUOUS_AMPERSAND_STATE](cp) {\n if (isAsciiAlphaNumeric(cp)) {\n if (this._isCharacterReferenceInAttribute()) {\n this.currentAttr.value += toChar(cp);\n } else {\n this._emitCodePoint(cp);\n }\n } else {\n if (cp === $.SEMICOLON) {\n this._err(ERR.unknownNamedCharacterReference);\n }\n\n this._reconsumeInState(this.returnState);\n }\n }\n\n // Numeric character reference state\n //------------------------------------------------------------------\n [NUMERIC_CHARACTER_REFERENCE_STATE](cp) {\n this.charRefCode = 0;\n\n if (cp === $.LATIN_SMALL_X || cp === $.LATIN_CAPITAL_X) {\n this.tempBuff.push(cp);\n this.state = HEXADEMICAL_CHARACTER_REFERENCE_START_STATE;\n } else {\n this._reconsumeInState(DECIMAL_CHARACTER_REFERENCE_START_STATE);\n }\n }\n\n // Hexademical character reference start state\n //------------------------------------------------------------------\n [HEXADEMICAL_CHARACTER_REFERENCE_START_STATE](cp) {\n if (isAsciiHexDigit(cp)) {\n this._reconsumeInState(HEXADEMICAL_CHARACTER_REFERENCE_STATE);\n } else {\n this._err(ERR.absenceOfDigitsInNumericCharacterReference);\n this._flushCodePointsConsumedAsCharacterReference();\n this._reconsumeInState(this.returnState);\n }\n }\n\n // Decimal character reference start state\n //------------------------------------------------------------------\n [DECIMAL_CHARACTER_REFERENCE_START_STATE](cp) {\n if (isAsciiDigit(cp)) {\n this._reconsumeInState(DECIMAL_CHARACTER_REFERENCE_STATE);\n } else {\n this._err(ERR.absenceOfDigitsInNumericCharacterReference);\n this._flushCodePointsConsumedAsCharacterReference();\n this._reconsumeInState(this.returnState);\n }\n }\n\n // Hexademical character reference state\n //------------------------------------------------------------------\n [HEXADEMICAL_CHARACTER_REFERENCE_STATE](cp) {\n if (isAsciiUpperHexDigit(cp)) {\n this.charRefCode = this.charRefCode * 16 + cp - 0x37;\n } else if (isAsciiLowerHexDigit(cp)) {\n this.charRefCode = this.charRefCode * 16 + cp - 0x57;\n } else if (isAsciiDigit(cp)) {\n this.charRefCode = this.charRefCode * 16 + cp - 0x30;\n } else if (cp === $.SEMICOLON) {\n this.state = NUMERIC_CHARACTER_REFERENCE_END_STATE;\n } else {\n this._err(ERR.missingSemicolonAfterCharacterReference);\n this._reconsumeInState(NUMERIC_CHARACTER_REFERENCE_END_STATE);\n }\n }\n\n // Decimal character reference state\n //------------------------------------------------------------------\n [DECIMAL_CHARACTER_REFERENCE_STATE](cp) {\n if (isAsciiDigit(cp)) {\n this.charRefCode = this.charRefCode * 10 + cp - 0x30;\n } else if (cp === $.SEMICOLON) {\n this.state = NUMERIC_CHARACTER_REFERENCE_END_STATE;\n } else {\n this._err(ERR.missingSemicolonAfterCharacterReference);\n this._reconsumeInState(NUMERIC_CHARACTER_REFERENCE_END_STATE);\n }\n }\n\n // Numeric character reference end state\n //------------------------------------------------------------------\n [NUMERIC_CHARACTER_REFERENCE_END_STATE]() {\n if (this.charRefCode === $.NULL) {\n this._err(ERR.nullCharacterReference);\n this.charRefCode = $.REPLACEMENT_CHARACTER;\n } else if (this.charRefCode > 0x10ffff) {\n this._err(ERR.characterReferenceOutsideUnicodeRange);\n this.charRefCode = $.REPLACEMENT_CHARACTER;\n } else if (unicode.isSurrogate(this.charRefCode)) {\n this._err(ERR.surrogateCharacterReference);\n this.charRefCode = $.REPLACEMENT_CHARACTER;\n } else if (unicode.isUndefinedCodePoint(this.charRefCode)) {\n this._err(ERR.noncharacterCharacterReference);\n } else if (unicode.isControlCodePoint(this.charRefCode) || this.charRefCode === $.CARRIAGE_RETURN) {\n this._err(ERR.controlCharacterReference);\n\n const replacement = C1_CONTROLS_REFERENCE_REPLACEMENTS[this.charRefCode];\n\n if (replacement) {\n this.charRefCode = replacement;\n }\n }\n\n this.tempBuff = [this.charRefCode];\n\n this._flushCodePointsConsumedAsCharacterReference();\n this._reconsumeInState(this.returnState);\n }\n}\n\n//Token types\nTokenizer.CHARACTER_TOKEN = 'CHARACTER_TOKEN';\nTokenizer.NULL_CHARACTER_TOKEN = 'NULL_CHARACTER_TOKEN';\nTokenizer.WHITESPACE_CHARACTER_TOKEN = 'WHITESPACE_CHARACTER_TOKEN';\nTokenizer.START_TAG_TOKEN = 'START_TAG_TOKEN';\nTokenizer.END_TAG_TOKEN = 'END_TAG_TOKEN';\nTokenizer.COMMENT_TOKEN = 'COMMENT_TOKEN';\nTokenizer.DOCTYPE_TOKEN = 'DOCTYPE_TOKEN';\nTokenizer.EOF_TOKEN = 'EOF_TOKEN';\nTokenizer.HIBERNATION_TOKEN = 'HIBERNATION_TOKEN';\n\n//Tokenizer initial states for different modes\nTokenizer.MODE = {\n DATA: DATA_STATE,\n RCDATA: RCDATA_STATE,\n RAWTEXT: RAWTEXT_STATE,\n SCRIPT_DATA: SCRIPT_DATA_STATE,\n PLAINTEXT: PLAINTEXT_STATE\n};\n\n//Static\nTokenizer.getTokenAttr = function(token, attrName) {\n for (let i = token.attrs.length - 1; i >= 0; i--) {\n if (token.attrs[i].name === attrName) {\n return token.attrs[i].value;\n }\n }\n\n return null;\n};\n\nmodule.exports = Tokenizer;\n","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}","import setPrototypeOf from \"@babel/runtime/helpers/esm/setPrototypeOf\";\nimport isNativeReflectConstruct from \"@babel/runtime/helpers/esm/isNativeReflectConstruct\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as strings from './strings.js';\r\nimport * as extpath from './extpath.js';\r\nimport * as paths from './path.js';\r\nimport { LRUCache } from './map.js';\r\nimport { isThenable } from './async.js';\r\nconst GLOBSTAR = '**';\r\nconst GLOB_SPLIT = '/';\r\nconst PATH_REGEX = '[/\\\\\\\\]'; // any slash or backslash\r\nconst NO_PATH_REGEX = '[^/\\\\\\\\]'; // any non-slash and non-backslash\r\nconst ALL_FORWARD_SLASHES = /\\//g;\r\nfunction starsToRegExp(starCount) {\r\n switch (starCount) {\r\n case 0:\r\n return '';\r\n case 1:\r\n return `${NO_PATH_REGEX}*?`; // 1 star matches any number of characters except path separator (/ and \\) - non greedy (?)\r\n default:\r\n // Matches: (Path Sep OR Path Val followed by Path Sep OR Path Sep followed by Path Val) 0-many times\r\n // Group is non capturing because we don't need to capture at all (?:...)\r\n // Overall we use non-greedy matching because it could be that we match too much\r\n return `(?:${PATH_REGEX}|${NO_PATH_REGEX}+${PATH_REGEX}|${PATH_REGEX}${NO_PATH_REGEX}+)*?`;\r\n }\r\n}\r\nexport function splitGlobAware(pattern, splitChar) {\r\n if (!pattern) {\r\n return [];\r\n }\r\n const segments = [];\r\n let inBraces = false;\r\n let inBrackets = false;\r\n let curVal = '';\r\n for (const char of pattern) {\r\n switch (char) {\r\n case splitChar:\r\n if (!inBraces && !inBrackets) {\r\n segments.push(curVal);\r\n curVal = '';\r\n continue;\r\n }\r\n break;\r\n case '{':\r\n inBraces = true;\r\n break;\r\n case '}':\r\n inBraces = false;\r\n break;\r\n case '[':\r\n inBrackets = true;\r\n break;\r\n case ']':\r\n inBrackets = false;\r\n break;\r\n }\r\n curVal += char;\r\n }\r\n // Tail\r\n if (curVal) {\r\n segments.push(curVal);\r\n }\r\n return segments;\r\n}\r\nfunction parseRegExp(pattern) {\r\n if (!pattern) {\r\n return '';\r\n }\r\n let regEx = '';\r\n // Split up into segments for each slash found\r\n const segments = splitGlobAware(pattern, GLOB_SPLIT);\r\n // Special case where we only have globstars\r\n if (segments.every(s => s === GLOBSTAR)) {\r\n regEx = '.*';\r\n }\r\n // Build regex over segments\r\n else {\r\n let previousSegmentWasGlobStar = false;\r\n segments.forEach((segment, index) => {\r\n // Globstar is special\r\n if (segment === GLOBSTAR) {\r\n // if we have more than one globstar after another, just ignore it\r\n if (!previousSegmentWasGlobStar) {\r\n regEx += starsToRegExp(2);\r\n previousSegmentWasGlobStar = true;\r\n }\r\n return;\r\n }\r\n // States\r\n let inBraces = false;\r\n let braceVal = '';\r\n let inBrackets = false;\r\n let bracketVal = '';\r\n for (const char of segment) {\r\n // Support brace expansion\r\n if (char !== '}' && inBraces) {\r\n braceVal += char;\r\n continue;\r\n }\r\n // Support brackets\r\n if (inBrackets && (char !== ']' || !bracketVal) /* ] is literally only allowed as first character in brackets to match it */) {\r\n let res;\r\n // range operator\r\n if (char === '-') {\r\n res = char;\r\n }\r\n // negation operator (only valid on first index in bracket)\r\n else if ((char === '^' || char === '!') && !bracketVal) {\r\n res = '^';\r\n }\r\n // glob split matching is not allowed within character ranges\r\n // see http://man7.org/linux/man-pages/man7/glob.7.html\r\n else if (char === GLOB_SPLIT) {\r\n res = '';\r\n }\r\n // anything else gets escaped\r\n else {\r\n res = strings.escapeRegExpCharacters(char);\r\n }\r\n bracketVal += res;\r\n continue;\r\n }\r\n switch (char) {\r\n case '{':\r\n inBraces = true;\r\n continue;\r\n case '[':\r\n inBrackets = true;\r\n continue;\r\n case '}':\r\n const choices = splitGlobAware(braceVal, ',');\r\n // Converts {foo,bar} => [foo|bar]\r\n const braceRegExp = `(?:${choices.map(c => parseRegExp(c)).join('|')})`;\r\n regEx += braceRegExp;\r\n inBraces = false;\r\n braceVal = '';\r\n break;\r\n case ']':\r\n regEx += ('[' + bracketVal + ']');\r\n inBrackets = false;\r\n bracketVal = '';\r\n break;\r\n case '?':\r\n regEx += NO_PATH_REGEX; // 1 ? matches any single character except path separator (/ and \\)\r\n continue;\r\n case '*':\r\n regEx += starsToRegExp(1);\r\n continue;\r\n default:\r\n regEx += strings.escapeRegExpCharacters(char);\r\n }\r\n }\r\n // Tail: Add the slash we had split on if there is more to come and the remaining pattern is not a globstar\r\n // For example if pattern: some/**/*.js we want the \"/\" after some to be included in the RegEx to prevent\r\n // a folder called \"something\" to match as well.\r\n // However, if pattern: some/**, we tolerate that we also match on \"something\" because our globstar behaviour\r\n // is to match 0-N segments.\r\n if (index < segments.length - 1 && (segments[index + 1] !== GLOBSTAR || index + 2 < segments.length)) {\r\n regEx += PATH_REGEX;\r\n }\r\n // reset state\r\n previousSegmentWasGlobStar = false;\r\n });\r\n }\r\n return regEx;\r\n}\r\n// regexes to check for trival glob patterns that just check for String#endsWith\r\nconst T1 = /^\\*\\*\\/\\*\\.[\\w\\.-]+$/; // **/*.something\r\nconst T2 = /^\\*\\*\\/([\\w\\.-]+)\\/?$/; // **/something\r\nconst T3 = /^{\\*\\*\\/[\\*\\.]?[\\w\\.-]+\\/?(,\\*\\*\\/[\\*\\.]?[\\w\\.-]+\\/?)*}$/; // {**/*.something,**/*.else} or {**/package.json,**/project.json}\r\nconst T3_2 = /^{\\*\\*\\/[\\*\\.]?[\\w\\.-]+(\\/(\\*\\*)?)?(,\\*\\*\\/[\\*\\.]?[\\w\\.-]+(\\/(\\*\\*)?)?)*}$/; // Like T3, with optional trailing /**\r\nconst T4 = /^\\*\\*((\\/[\\w\\.-]+)+)\\/?$/; // **/something/else\r\nconst T5 = /^([\\w\\.-]+(\\/[\\w\\.-]+)*)\\/?$/; // something/else\r\nconst CACHE = new LRUCache(10000); // bounded to 10000 elements\r\nconst FALSE = function () {\r\n return false;\r\n};\r\nconst NULL = function () {\r\n return null;\r\n};\r\nfunction parsePattern(arg1, options) {\r\n if (!arg1) {\r\n return NULL;\r\n }\r\n // Handle IRelativePattern\r\n let pattern;\r\n if (typeof arg1 !== 'string') {\r\n pattern = arg1.pattern;\r\n }\r\n else {\r\n pattern = arg1;\r\n }\r\n // Whitespace trimming\r\n pattern = pattern.trim();\r\n // Check cache\r\n const patternKey = `${pattern}_${!!options.trimForExclusions}`;\r\n let parsedPattern = CACHE.get(patternKey);\r\n if (parsedPattern) {\r\n return wrapRelativePattern(parsedPattern, arg1);\r\n }\r\n // Check for Trivias\r\n let match;\r\n if (T1.test(pattern)) { // common pattern: **/*.txt just need endsWith check\r\n const base = pattern.substr(4); // '**/*'.length === 4\r\n parsedPattern = function (path, basename) {\r\n return typeof path === 'string' && path.endsWith(base) ? pattern : null;\r\n };\r\n }\r\n else if (match = T2.exec(trimForExclusions(pattern, options))) { // common pattern: **/some.txt just need basename check\r\n parsedPattern = trivia2(match[1], pattern);\r\n }\r\n else if ((options.trimForExclusions ? T3_2 : T3).test(pattern)) { // repetition of common patterns (see above) {**/*.txt,**/*.png}\r\n parsedPattern = trivia3(pattern, options);\r\n }\r\n else if (match = T4.exec(trimForExclusions(pattern, options))) { // common pattern: **/something/else just need endsWith check\r\n parsedPattern = trivia4and5(match[1].substr(1), pattern, true);\r\n }\r\n else if (match = T5.exec(trimForExclusions(pattern, options))) { // common pattern: something/else just need equals check\r\n parsedPattern = trivia4and5(match[1], pattern, false);\r\n }\r\n // Otherwise convert to pattern\r\n else {\r\n parsedPattern = toRegExp(pattern);\r\n }\r\n // Cache\r\n CACHE.set(patternKey, parsedPattern);\r\n return wrapRelativePattern(parsedPattern, arg1);\r\n}\r\nfunction wrapRelativePattern(parsedPattern, arg2) {\r\n if (typeof arg2 === 'string') {\r\n return parsedPattern;\r\n }\r\n return function (path, basename) {\r\n if (!extpath.isEqualOrParent(path, arg2.base)) {\r\n return null;\r\n }\r\n return parsedPattern(paths.relative(arg2.base, path), basename);\r\n };\r\n}\r\nfunction trimForExclusions(pattern, options) {\r\n return options.trimForExclusions && pattern.endsWith('/**') ? pattern.substr(0, pattern.length - 2) : pattern; // dropping **, tailing / is dropped later\r\n}\r\n// common pattern: **/some.txt just need basename check\r\nfunction trivia2(base, originalPattern) {\r\n const slashBase = `/${base}`;\r\n const backslashBase = `\\\\${base}`;\r\n const parsedPattern = function (path, basename) {\r\n if (typeof path !== 'string') {\r\n return null;\r\n }\r\n if (basename) {\r\n return basename === base ? originalPattern : null;\r\n }\r\n return path === base || path.endsWith(slashBase) || path.endsWith(backslashBase) ? originalPattern : null;\r\n };\r\n const basenames = [base];\r\n parsedPattern.basenames = basenames;\r\n parsedPattern.patterns = [originalPattern];\r\n parsedPattern.allBasenames = basenames;\r\n return parsedPattern;\r\n}\r\n// repetition of common patterns (see above) {**/*.txt,**/*.png}\r\nfunction trivia3(pattern, options) {\r\n const parsedPatterns = aggregateBasenameMatches(pattern.slice(1, -1).split(',')\r\n .map(pattern => parsePattern(pattern, options))\r\n .filter(pattern => pattern !== NULL), pattern);\r\n const n = parsedPatterns.length;\r\n if (!n) {\r\n return NULL;\r\n }\r\n if (n === 1) {\r\n return parsedPatterns[0];\r\n }\r\n const parsedPattern = function (path, basename) {\r\n for (let i = 0, n = parsedPatterns.length; i < n; i++) {\r\n if (parsedPatterns[i](path, basename)) {\r\n return pattern;\r\n }\r\n }\r\n return null;\r\n };\r\n const withBasenames = parsedPatterns.find(pattern => !!pattern.allBasenames);\r\n if (withBasenames) {\r\n parsedPattern.allBasenames = withBasenames.allBasenames;\r\n }\r\n const allPaths = parsedPatterns.reduce((all, current) => current.allPaths ? all.concat(current.allPaths) : all, []);\r\n if (allPaths.length) {\r\n parsedPattern.allPaths = allPaths;\r\n }\r\n return parsedPattern;\r\n}\r\n// common patterns: **/something/else just need endsWith check, something/else just needs and equals check\r\nfunction trivia4and5(targetPath, pattern, matchPathEnds) {\r\n const usingPosixSep = paths.sep === paths.posix.sep;\r\n const nativePath = usingPosixSep ? targetPath : targetPath.replace(ALL_FORWARD_SLASHES, paths.sep);\r\n const nativePathEnd = paths.sep + nativePath;\r\n const targetPathEnd = paths.posix.sep + targetPath;\r\n const parsedPattern = matchPathEnds ? function (testPath, basename) {\r\n return typeof testPath === 'string' &&\r\n ((testPath === nativePath || testPath.endsWith(nativePathEnd))\r\n || !usingPosixSep && (testPath === targetPath || testPath.endsWith(targetPathEnd)))\r\n ? pattern : null;\r\n } : function (testPath, basename) {\r\n return typeof testPath === 'string' &&\r\n (testPath === nativePath\r\n || (!usingPosixSep && testPath === targetPath))\r\n ? pattern : null;\r\n };\r\n parsedPattern.allPaths = [(matchPathEnds ? '*/' : './') + targetPath];\r\n return parsedPattern;\r\n}\r\nfunction toRegExp(pattern) {\r\n try {\r\n const regExp = new RegExp(`^${parseRegExp(pattern)}$`);\r\n return function (path) {\r\n regExp.lastIndex = 0; // reset RegExp to its initial state to reuse it!\r\n return typeof path === 'string' && regExp.test(path) ? pattern : null;\r\n };\r\n }\r\n catch (error) {\r\n return NULL;\r\n }\r\n}\r\nexport function match(arg1, path, hasSibling) {\r\n if (!arg1 || typeof path !== 'string') {\r\n return false;\r\n }\r\n return parse(arg1)(path, undefined, hasSibling);\r\n}\r\nexport function parse(arg1, options = {}) {\r\n if (!arg1) {\r\n return FALSE;\r\n }\r\n // Glob with String\r\n if (typeof arg1 === 'string' || isRelativePattern(arg1)) {\r\n const parsedPattern = parsePattern(arg1, options);\r\n if (parsedPattern === NULL) {\r\n return FALSE;\r\n }\r\n const resultPattern = function (path, basename) {\r\n return !!parsedPattern(path, basename);\r\n };\r\n if (parsedPattern.allBasenames) {\r\n resultPattern.allBasenames = parsedPattern.allBasenames;\r\n }\r\n if (parsedPattern.allPaths) {\r\n resultPattern.allPaths = parsedPattern.allPaths;\r\n }\r\n return resultPattern;\r\n }\r\n // Glob with Expression\r\n return parsedExpression(arg1, options);\r\n}\r\nexport function isRelativePattern(obj) {\r\n const rp = obj;\r\n return rp && typeof rp.base === 'string' && typeof rp.pattern === 'string';\r\n}\r\nfunction parsedExpression(expression, options) {\r\n const parsedPatterns = aggregateBasenameMatches(Object.getOwnPropertyNames(expression)\r\n .map(pattern => parseExpressionPattern(pattern, expression[pattern], options))\r\n .filter(pattern => pattern !== NULL));\r\n const n = parsedPatterns.length;\r\n if (!n) {\r\n return NULL;\r\n }\r\n if (!parsedPatterns.some(parsedPattern => !!parsedPattern.requiresSiblings)) {\r\n if (n === 1) {\r\n return parsedPatterns[0];\r\n }\r\n const resultExpression = function (path, basename) {\r\n for (let i = 0, n = parsedPatterns.length; i < n; i++) {\r\n // Pattern matches path\r\n const result = parsedPatterns[i](path, basename);\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n return null;\r\n };\r\n const withBasenames = parsedPatterns.find(pattern => !!pattern.allBasenames);\r\n if (withBasenames) {\r\n resultExpression.allBasenames = withBasenames.allBasenames;\r\n }\r\n const allPaths = parsedPatterns.reduce((all, current) => current.allPaths ? all.concat(current.allPaths) : all, []);\r\n if (allPaths.length) {\r\n resultExpression.allPaths = allPaths;\r\n }\r\n return resultExpression;\r\n }\r\n const resultExpression = function (path, basename, hasSibling) {\r\n let name = undefined;\r\n for (let i = 0, n = parsedPatterns.length; i < n; i++) {\r\n // Pattern matches path\r\n const parsedPattern = parsedPatterns[i];\r\n if (parsedPattern.requiresSiblings && hasSibling) {\r\n if (!basename) {\r\n basename = paths.basename(path);\r\n }\r\n if (!name) {\r\n name = basename.substr(0, basename.length - paths.extname(path).length);\r\n }\r\n }\r\n const result = parsedPattern(path, basename, name, hasSibling);\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n return null;\r\n };\r\n const withBasenames = parsedPatterns.find(pattern => !!pattern.allBasenames);\r\n if (withBasenames) {\r\n resultExpression.allBasenames = withBasenames.allBasenames;\r\n }\r\n const allPaths = parsedPatterns.reduce((all, current) => current.allPaths ? all.concat(current.allPaths) : all, []);\r\n if (allPaths.length) {\r\n resultExpression.allPaths = allPaths;\r\n }\r\n return resultExpression;\r\n}\r\nfunction parseExpressionPattern(pattern, value, options) {\r\n if (value === false) {\r\n return NULL; // pattern is disabled\r\n }\r\n const parsedPattern = parsePattern(pattern, options);\r\n if (parsedPattern === NULL) {\r\n return NULL;\r\n }\r\n // Expression Pattern is \r\n if (typeof value === 'boolean') {\r\n return parsedPattern;\r\n }\r\n // Expression Pattern is \r\n if (value) {\r\n const when = value.when;\r\n if (typeof when === 'string') {\r\n const result = (path, basename, name, hasSibling) => {\r\n if (!hasSibling || !parsedPattern(path, basename)) {\r\n return null;\r\n }\r\n const clausePattern = when.replace('$(basename)', name);\r\n const matched = hasSibling(clausePattern);\r\n return isThenable(matched) ?\r\n matched.then(m => m ? pattern : null) :\r\n matched ? pattern : null;\r\n };\r\n result.requiresSiblings = true;\r\n return result;\r\n }\r\n }\r\n // Expression is Anything\r\n return parsedPattern;\r\n}\r\nfunction aggregateBasenameMatches(parsedPatterns, result) {\r\n const basenamePatterns = parsedPatterns.filter(parsedPattern => !!parsedPattern.basenames);\r\n if (basenamePatterns.length < 2) {\r\n return parsedPatterns;\r\n }\r\n const basenames = basenamePatterns.reduce((all, current) => {\r\n const basenames = current.basenames;\r\n return basenames ? all.concat(basenames) : all;\r\n }, []);\r\n let patterns;\r\n if (result) {\r\n patterns = [];\r\n for (let i = 0, n = basenames.length; i < n; i++) {\r\n patterns.push(result);\r\n }\r\n }\r\n else {\r\n patterns = basenamePatterns.reduce((all, current) => {\r\n const patterns = current.patterns;\r\n return patterns ? all.concat(patterns) : all;\r\n }, []);\r\n }\r\n const aggregate = function (path, basename) {\r\n if (typeof path !== 'string') {\r\n return null;\r\n }\r\n if (!basename) {\r\n let i;\r\n for (i = path.length; i > 0; i--) {\r\n const ch = path.charCodeAt(i - 1);\r\n if (ch === 47 /* Slash */ || ch === 92 /* Backslash */) {\r\n break;\r\n }\r\n }\r\n basename = path.substr(i);\r\n }\r\n const index = basenames.indexOf(basename);\r\n return index !== -1 ? patterns[index] : null;\r\n };\r\n aggregate.basenames = basenames;\r\n aggregate.patterns = patterns;\r\n aggregate.allBasenames = basenames;\r\n const aggregatedPatterns = parsedPatterns.filter(parsedPattern => !parsedPattern.basenames);\r\n aggregatedPatterns.push(aggregate);\r\n return aggregatedPatterns;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { toUint32 } from '../../../base/common/uint.js';\r\nexport class PrefixSumIndexOfResult {\r\n constructor(index, remainder) {\r\n this.index = index;\r\n this.remainder = remainder;\r\n }\r\n}\r\nexport class PrefixSumComputer {\r\n constructor(values) {\r\n this.values = values;\r\n this.prefixSum = new Uint32Array(values.length);\r\n this.prefixSumValidIndex = new Int32Array(1);\r\n this.prefixSumValidIndex[0] = -1;\r\n }\r\n insertValues(insertIndex, insertValues) {\r\n insertIndex = toUint32(insertIndex);\r\n const oldValues = this.values;\r\n const oldPrefixSum = this.prefixSum;\r\n const insertValuesLen = insertValues.length;\r\n if (insertValuesLen === 0) {\r\n return false;\r\n }\r\n this.values = new Uint32Array(oldValues.length + insertValuesLen);\r\n this.values.set(oldValues.subarray(0, insertIndex), 0);\r\n this.values.set(oldValues.subarray(insertIndex), insertIndex + insertValuesLen);\r\n this.values.set(insertValues, insertIndex);\r\n if (insertIndex - 1 < this.prefixSumValidIndex[0]) {\r\n this.prefixSumValidIndex[0] = insertIndex - 1;\r\n }\r\n this.prefixSum = new Uint32Array(this.values.length);\r\n if (this.prefixSumValidIndex[0] >= 0) {\r\n this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1));\r\n }\r\n return true;\r\n }\r\n changeValue(index, value) {\r\n index = toUint32(index);\r\n value = toUint32(value);\r\n if (this.values[index] === value) {\r\n return false;\r\n }\r\n this.values[index] = value;\r\n if (index - 1 < this.prefixSumValidIndex[0]) {\r\n this.prefixSumValidIndex[0] = index - 1;\r\n }\r\n return true;\r\n }\r\n removeValues(startIndex, cnt) {\r\n startIndex = toUint32(startIndex);\r\n cnt = toUint32(cnt);\r\n const oldValues = this.values;\r\n const oldPrefixSum = this.prefixSum;\r\n if (startIndex >= oldValues.length) {\r\n return false;\r\n }\r\n let maxCnt = oldValues.length - startIndex;\r\n if (cnt >= maxCnt) {\r\n cnt = maxCnt;\r\n }\r\n if (cnt === 0) {\r\n return false;\r\n }\r\n this.values = new Uint32Array(oldValues.length - cnt);\r\n this.values.set(oldValues.subarray(0, startIndex), 0);\r\n this.values.set(oldValues.subarray(startIndex + cnt), startIndex);\r\n this.prefixSum = new Uint32Array(this.values.length);\r\n if (startIndex - 1 < this.prefixSumValidIndex[0]) {\r\n this.prefixSumValidIndex[0] = startIndex - 1;\r\n }\r\n if (this.prefixSumValidIndex[0] >= 0) {\r\n this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1));\r\n }\r\n return true;\r\n }\r\n getTotalValue() {\r\n if (this.values.length === 0) {\r\n return 0;\r\n }\r\n return this._getAccumulatedValue(this.values.length - 1);\r\n }\r\n getAccumulatedValue(index) {\r\n if (index < 0) {\r\n return 0;\r\n }\r\n index = toUint32(index);\r\n return this._getAccumulatedValue(index);\r\n }\r\n _getAccumulatedValue(index) {\r\n if (index <= this.prefixSumValidIndex[0]) {\r\n return this.prefixSum[index];\r\n }\r\n let startIndex = this.prefixSumValidIndex[0] + 1;\r\n if (startIndex === 0) {\r\n this.prefixSum[0] = this.values[0];\r\n startIndex++;\r\n }\r\n if (index >= this.values.length) {\r\n index = this.values.length - 1;\r\n }\r\n for (let i = startIndex; i <= index; i++) {\r\n this.prefixSum[i] = this.prefixSum[i - 1] + this.values[i];\r\n }\r\n this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], index);\r\n return this.prefixSum[index];\r\n }\r\n getIndexOf(accumulatedValue) {\r\n accumulatedValue = Math.floor(accumulatedValue); //@perf\r\n // Compute all sums (to get a fully valid prefixSum)\r\n this.getTotalValue();\r\n let low = 0;\r\n let high = this.values.length - 1;\r\n let mid = 0;\r\n let midStop = 0;\r\n let midStart = 0;\r\n while (low <= high) {\r\n mid = low + ((high - low) / 2) | 0;\r\n midStop = this.prefixSum[mid];\r\n midStart = midStop - this.values[mid];\r\n if (accumulatedValue < midStart) {\r\n high = mid - 1;\r\n }\r\n else if (accumulatedValue >= midStop) {\r\n low = mid + 1;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n return new PrefixSumIndexOfResult(mid, accumulatedValue - midStart);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\r\n/**\r\n * Iterates over each entry in the provided dictionary. The iterator allows\r\n * to remove elements and will stop when the callback returns {{false}}.\r\n */\r\nexport function forEach(from, callback) {\r\n for (let key in from) {\r\n if (hasOwnProperty.call(from, key)) {\r\n const result = callback({ key: key, value: from[key] }, function () {\r\n delete from[key];\r\n });\r\n if (result === false) {\r\n return;\r\n }\r\n }\r\n }\r\n}\r\nexport class SetMap {\r\n constructor() {\r\n this.map = new Map();\r\n }\r\n add(key, value) {\r\n let values = this.map.get(key);\r\n if (!values) {\r\n values = new Set();\r\n this.map.set(key, values);\r\n }\r\n values.add(value);\r\n }\r\n delete(key, value) {\r\n const values = this.map.get(key);\r\n if (!values) {\r\n return;\r\n }\r\n values.delete(value);\r\n if (values.size === 0) {\r\n this.map.delete(key);\r\n }\r\n }\r\n forEach(key, fn) {\r\n const values = this.map.get(key);\r\n if (!values) {\r\n return;\r\n }\r\n values.forEach(fn);\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nexport class ElementSizeObserver extends Disposable {\r\n constructor(referenceDomElement, dimension, changeCallback) {\r\n super();\r\n this.referenceDomElement = referenceDomElement;\r\n this.changeCallback = changeCallback;\r\n this.width = -1;\r\n this.height = -1;\r\n this.resizeObserver = null;\r\n this.measureReferenceDomElementToken = -1;\r\n this.measureReferenceDomElement(false, dimension);\r\n }\r\n dispose() {\r\n this.stopObserving();\r\n super.dispose();\r\n }\r\n getWidth() {\r\n return this.width;\r\n }\r\n getHeight() {\r\n return this.height;\r\n }\r\n startObserving() {\r\n if (typeof ResizeObserver !== 'undefined') {\r\n if (!this.resizeObserver && this.referenceDomElement) {\r\n this.resizeObserver = new ResizeObserver((entries) => {\r\n if (entries && entries[0] && entries[0].contentRect) {\r\n this.observe({ width: entries[0].contentRect.width, height: entries[0].contentRect.height });\r\n }\r\n else {\r\n this.observe();\r\n }\r\n });\r\n this.resizeObserver.observe(this.referenceDomElement);\r\n }\r\n }\r\n else {\r\n if (this.measureReferenceDomElementToken === -1) {\r\n // setInterval type defaults to NodeJS.Timeout instead of number, so specify it as a number\r\n this.measureReferenceDomElementToken = setInterval(() => this.observe(), 100);\r\n }\r\n }\r\n }\r\n stopObserving() {\r\n if (this.resizeObserver) {\r\n this.resizeObserver.disconnect();\r\n this.resizeObserver = null;\r\n }\r\n if (this.measureReferenceDomElementToken !== -1) {\r\n clearInterval(this.measureReferenceDomElementToken);\r\n this.measureReferenceDomElementToken = -1;\r\n }\r\n }\r\n observe(dimension) {\r\n this.measureReferenceDomElement(true, dimension);\r\n }\r\n measureReferenceDomElement(callChangeCallback, dimension) {\r\n let observedWidth = 0;\r\n let observedHeight = 0;\r\n if (dimension) {\r\n observedWidth = dimension.width;\r\n observedHeight = dimension.height;\r\n }\r\n else if (this.referenceDomElement) {\r\n observedWidth = this.referenceDomElement.clientWidth;\r\n observedHeight = this.referenceDomElement.clientHeight;\r\n }\r\n observedWidth = Math.max(5, observedWidth);\r\n observedHeight = Math.max(5, observedHeight);\r\n if (this.width !== observedWidth || this.height !== observedHeight) {\r\n this.width = observedWidth;\r\n this.height = observedHeight;\r\n if (callChangeCallback) {\r\n this.changeCallback();\r\n }\r\n }\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nexport class InternalEditorAction {\r\n constructor(id, label, alias, precondition, run, contextKeyService) {\r\n this.id = id;\r\n this.label = label;\r\n this.alias = alias;\r\n this._precondition = precondition;\r\n this._run = run;\r\n this._contextKeyService = contextKeyService;\r\n }\r\n isSupported() {\r\n return this._contextKeyService.contextMatchesRules(this._precondition);\r\n }\r\n run() {\r\n if (!this.isSupported()) {\r\n return Promise.resolve(undefined);\r\n }\r\n return this._run();\r\n }\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\r\nexport const IMarkerDecorationsService = createDecorator('markerDecorationsService');\r\n","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.prettierPlugins=t():(e.prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.postcss=t())}(new Function(\"return this\")(),(function(){return(()=>{var e={2426:e=>{\"use strict\";e.exports=({onlyFirst:e=!1}={})=>{const t=[\"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:[a-zA-Z\\\\d]*(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))\"].join(\"|\");return new RegExp(t,e?void 0:\"g\")}},3584:e=>{\"use strict\";const detectNewline=e=>{if(\"string\"!=typeof e)throw new TypeError(\"Expected a string\");const t=e.match(/(?:\\r?\\n)/g)||[];if(0===t.length)return;const r=t.filter((e=>\"\\r\\n\"===e)).length;return r>t.length-r?\"\\r\\n\":\"\\n\"};e.exports=detectNewline,e.exports.graceful=e=>\"string\"==typeof e&&detectNewline(e)||\"\\n\"},541:e=>{\"use strict\";e.exports=function(){return/\\uD83C\\uDFF4\\uDB40\\uDC67\\uDB40\\uDC62(?:\\uDB40\\uDC65\\uDB40\\uDC6E\\uDB40\\uDC67|\\uDB40\\uDC73\\uDB40\\uDC63\\uDB40\\uDC74|\\uDB40\\uDC77\\uDB40\\uDC6C\\uDB40\\uDC73)\\uDB40\\uDC7F|\\uD83D\\uDC68(?:\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C\\uDFFB|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFE])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83D\\uDC68|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D[\\uDC66\\uDC67])|[\\u2695\\u2696\\u2708]\\uFE0F|\\uD83D[\\uDC66\\uDC67]|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|(?:\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708])\\uFE0F|\\uD83C\\uDFFB\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C[\\uDFFB-\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFB\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)\\uD83C\\uDFFB|\\uD83E\\uDDD1(?:\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])|\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1)|(?:\\uD83E\\uDDD1\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFE])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83D\\uDC69(?:\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFB\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFC-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|(?:\\uD83E\\uDDD1\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D\\uDC41\\uFE0F\\u200D\\uD83D\\uDDE8|\\uD83D\\uDC69(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|(?:(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)\\uFE0F|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF])\\u200D[\\u2640\\u2642]|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD6-\\uDDDD])(?:(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|\\u200D[\\u2640\\u2642])|\\uD83C\\uDFF4\\u200D\\u2620)\\uFE0F|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83C\\uDFF3\\uFE0F\\u200D\\uD83C\\uDF08|\\uD83D\\uDC15\\u200D\\uD83E\\uDDBA|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67|\\uD83C\\uDDFD\\uD83C\\uDDF0|\\uD83C\\uDDF4\\uD83C\\uDDF2|\\uD83C\\uDDF6\\uD83C\\uDDE6|[#\\*0-9]\\uFE0F\\u20E3|\\uD83C\\uDDE7(?:\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEF\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9\\uDDFB\\uDDFC\\uDDFE\\uDDFF])|\\uD83C\\uDDF9(?:\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDED\\uDDEF-\\uDDF4\\uDDF7\\uDDF9\\uDDFB\\uDDFC\\uDDFF])|\\uD83C\\uDDEA(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDED\\uDDF7-\\uDDFA])|\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83C\\uDDF7(?:\\uD83C[\\uDDEA\\uDDF4\\uDDF8\\uDDFA\\uDDFC])|\\uD83D\\uDC69(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83C\\uDDF2(?:\\uD83C[\\uDDE6\\uDDE8-\\uDDED\\uDDF0-\\uDDFF])|\\uD83C\\uDDE6(?:\\uD83C[\\uDDE8-\\uDDEC\\uDDEE\\uDDF1\\uDDF2\\uDDF4\\uDDF6-\\uDDFA\\uDDFC\\uDDFD\\uDDFF])|\\uD83C\\uDDF0(?:\\uD83C[\\uDDEA\\uDDEC-\\uDDEE\\uDDF2\\uDDF3\\uDDF5\\uDDF7\\uDDFC\\uDDFE\\uDDFF])|\\uD83C\\uDDED(?:\\uD83C[\\uDDF0\\uDDF2\\uDDF3\\uDDF7\\uDDF9\\uDDFA])|\\uD83C\\uDDE9(?:\\uD83C[\\uDDEA\\uDDEC\\uDDEF\\uDDF0\\uDDF2\\uDDF4\\uDDFF])|\\uD83C\\uDDFE(?:\\uD83C[\\uDDEA\\uDDF9])|\\uD83C\\uDDEC(?:\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEE\\uDDF1-\\uDDF3\\uDDF5-\\uDDFA\\uDDFC\\uDDFE])|\\uD83C\\uDDF8(?:\\uD83C[\\uDDE6-\\uDDEA\\uDDEC-\\uDDF4\\uDDF7-\\uDDF9\\uDDFB\\uDDFD-\\uDDFF])|\\uD83C\\uDDEB(?:\\uD83C[\\uDDEE-\\uDDF0\\uDDF2\\uDDF4\\uDDF7])|\\uD83C\\uDDF5(?:\\uD83C[\\uDDE6\\uDDEA-\\uDDED\\uDDF0-\\uDDF3\\uDDF7-\\uDDF9\\uDDFC\\uDDFE])|\\uD83C\\uDDFB(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDEE\\uDDF3\\uDDFA])|\\uD83C\\uDDF3(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA-\\uDDEC\\uDDEE\\uDDF1\\uDDF4\\uDDF5\\uDDF7\\uDDFA\\uDDFF])|\\uD83C\\uDDE8(?:\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDEE\\uDDF0-\\uDDF5\\uDDF7\\uDDFA-\\uDDFF])|\\uD83C\\uDDF1(?:\\uD83C[\\uDDE6-\\uDDE8\\uDDEE\\uDDF0\\uDDF7-\\uDDFB\\uDDFE])|\\uD83C\\uDDFF(?:\\uD83C[\\uDDE6\\uDDF2\\uDDFC])|\\uD83C\\uDDFC(?:\\uD83C[\\uDDEB\\uDDF8])|\\uD83C\\uDDFA(?:\\uD83C[\\uDDE6\\uDDEC\\uDDF2\\uDDF3\\uDDF8\\uDDFE\\uDDFF])|\\uD83C\\uDDEE(?:\\uD83C[\\uDDE8-\\uDDEA\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9])|\\uD83C\\uDDEF(?:\\uD83C[\\uDDEA\\uDDF2\\uDDF4\\uDDF5])|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD6-\\uDDDD])(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:[\\u261D\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2\\uDFC7]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66\\uDC67\\uDC6B-\\uDC6D\\uDC70\\uDC72\\uDC74-\\uDC76\\uDC78\\uDC7C\\uDC83\\uDC85\\uDCAA\\uDD74\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE4C\\uDE4F\\uDEC0\\uDECC]|\\uD83E[\\uDD0F\\uDD18-\\uDD1C\\uDD1E\\uDD1F\\uDD30-\\uDD36\\uDDB5\\uDDB6\\uDDBB\\uDDD2-\\uDDD5])(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:[\\u231A\\u231B\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u25FE\\u2614\\u2615\\u2648-\\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u270A\\u270B\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55]|\\uD83C[\\uDC04\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF7C\\uDF7E-\\uDF93\\uDFA0-\\uDFCA\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF4\\uDFF8-\\uDFFF]|\\uD83D[\\uDC00-\\uDC3E\\uDC40\\uDC42-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDD7A\\uDD95\\uDD96\\uDDA4\\uDDFB-\\uDE4F\\uDE80-\\uDEC5\\uDECC\\uDED0-\\uDED2\\uDED5\\uDEEB\\uDEEC\\uDEF4-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])|(?:[#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC04\\uDCCF\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE02\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF21\\uDF24-\\uDF93\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E-\\uDFF0\\uDFF3-\\uDFF5\\uDFF7-\\uDFFF]|\\uD83D[\\uDC00-\\uDCFD\\uDCFF-\\uDD3D\\uDD49-\\uDD4E\\uDD50-\\uDD67\\uDD6F\\uDD70\\uDD73-\\uDD7A\\uDD87\\uDD8A-\\uDD8D\\uDD90\\uDD95\\uDD96\\uDDA4\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA-\\uDE4F\\uDE80-\\uDEC5\\uDECB-\\uDED2\\uDED5\\uDEE0-\\uDEE5\\uDEE9\\uDEEB\\uDEEC\\uDEF0\\uDEF3-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])\\uFE0F|(?:[\\u261D\\u26F9\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2-\\uDFC4\\uDFC7\\uDFCA-\\uDFCC]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66-\\uDC78\\uDC7C\\uDC81-\\uDC83\\uDC85-\\uDC87\\uDC8F\\uDC91\\uDCAA\\uDD74\\uDD75\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE45-\\uDE47\\uDE4B-\\uDE4F\\uDEA3\\uDEB4-\\uDEB6\\uDEC0\\uDECC]|\\uD83E[\\uDD0F\\uDD18-\\uDD1F\\uDD26\\uDD30-\\uDD39\\uDD3C-\\uDD3E\\uDDB5\\uDDB6\\uDDB8\\uDDB9\\uDDBB\\uDDCD-\\uDDCF\\uDDD1-\\uDDDD])/g}},2240:e=>{\"use strict\";e.exports=e=>{if(\"string\"!=typeof e)throw new TypeError(\"Expected a string\");return e.replace(/[|\\\\{}()[\\]^$+*?.]/g,\"\\\\$&\").replace(/-/g,\"\\\\x2d\")}},8051:e=>{e.exports=function(e,t){return(t=\"number\"==typeof t?t:1/0)?function _flatten(e,r){return e.reduce((function(e,n){return Array.isArray(n)&&r{e.exports=function(e,t){for(var r=-1,n=[];-1!==(r=e.indexOf(t,r+1));)n.push(r);return n}},9234:(e,t,r)=>{\"use strict\";function _os(){const e=r(9623);return _os=function(){return e},e}function _detectNewline(){const e=(t=r(3584))&&t.__esModule?t:{default:t};var t;return _detectNewline=function(){return e},e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.extract=function(e){const t=e.match(i);return t?t[0].trimLeft():\"\"},t.strip=function(e){const t=e.match(i);return t&&t[0]?e.substring(t[0].length):e},t.parse=function(e){return parseWithComments(e).pragmas},t.parseWithComments=parseWithComments,t.print=function({comments:e=\"\",pragmas:t={}}){const r=(0,_detectNewline().default)(e)||_os().EOL,n=\" *\",o=Object.keys(t),i=o.map((e=>printKeyValues(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>\" * \"+e+r)).join(\"\");if(!e){if(0===o.length)return\"\";if(1===o.length&&!Array.isArray(t[o[0]])){const e=t[o[0]];return\"\".concat(\"/**\",\" \").concat(printKeyValues(o[0],e)[0]).concat(\" */\")}}const s=e.split(r).map((e=>\"\".concat(n,\" \").concat(e))).join(r)+r;return\"/**\"+r+(e?s:\"\")+(e&&o.length?n+r:\"\")+i+\" */\"};const n=/\\*\\/$/,o=/^\\/\\*\\*/,i=/^\\s*(\\/\\*\\*?(.|\\r?\\n)*?\\*\\/)/,s=/(^|\\s+)\\/\\/([^\\r\\n]*)/g,u=/^(\\r?\\n)+/,a=/(?:^|\\r?\\n) *(@[^\\r\\n]*?) *\\r?\\n *(?![^@\\r\\n]*\\/\\/[^]*)([^@\\r\\n\\s][^@\\r\\n]+?) *\\r?\\n/g,c=/(?:^|\\r?\\n) *@(\\S+) *([^\\r\\n]*)/g,l=/(\\r?\\n|^) *\\* ?/g,p=[];function parseWithComments(e){const t=(0,_detectNewline().default)(e)||_os().EOL;e=e.replace(o,\"\").replace(n,\"\").replace(l,\"$1\");let r=\"\";for(;r!==e;)r=e,e=e.replace(a,\"\".concat(t,\"$1 $2\").concat(t));e=e.replace(u,\"\").trimRight();const i=Object.create(null),f=e.replace(c,\"\").replace(u,\"\").trimRight();let h;for(;h=c.exec(e);){const e=h[2].replace(s,\"\");\"string\"==typeof i[h[1]]||Array.isArray(i[h[1]])?i[h[1]]=p.concat(i[h[1]],e):i[h[1]]=e}return{comments:f,pragmas:i}}function printKeyValues(e,t){return p.concat(t).map((t=>\"@\".concat(e,\" \").concat(t).trim()))}},5311:(e,t,r)=>{\"use strict\";function noop(){for(var e=[],t=0;tl,outdent:()=>c}),e=r.hmd(e);var n=Object.prototype.hasOwnProperty,has=function(e,t){return n.call(e,t)};function extend(e,t){for(var r in t)has(t,r)&&(e[r]=t[r]);return e}var o=/^[ \\t]*(?:\\r\\n|\\r|\\n)/,i=/(?:\\r\\n|\\r|\\n)[ \\t]*$/,s=/^(?:[\\r\\n]|$)/,u=/(?:\\r\\n|\\r|\\n)([ \\t]*)(?:[^ \\t\\r\\n]|$)/,a=/^[ \\t]*[\\r\\n][ \\t\\r\\n]*$/;function _outdentArray(e,t,r){var n=0,s=e[0].match(u);s&&(n=s[1].length);var a=new RegExp(\"(\\\\r\\\\n|\\\\r|\\\\n).{0,\"+n+\"}\",\"g\");t&&(e=e.slice(1));var c=r.newline,l=r.trimLeadingNewline,p=r.trimTrailingNewline,f=\"string\"==typeof c,h=e.length;return e.map((function(e,t){return e=e.replace(a,\"$1\"),0===t&&l&&(e=e.replace(o,\"\")),t===h-1&&p&&(e=e.replace(i,\"\")),f&&(e=e.replace(/\\r\\n|\\n|\\r/g,(function(e){return c}))),e}))}function concatStringsAndValues(e,t){for(var r=\"\",n=0,o=e.length;n{\"use strict\";function assertPath(e){if(\"string\"!=typeof e)throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(e))}function normalizeStringPosix(e,t){for(var r,n=\"\",o=0,i=-1,s=0,u=0;u<=e.length;++u){if(u2){var a=n.lastIndexOf(\"/\");if(a!==n.length-1){-1===a?(n=\"\",o=0):o=(n=n.slice(0,a)).length-1-n.lastIndexOf(\"/\"),i=u,s=0;continue}}else if(2===n.length||1===n.length){n=\"\",o=0,i=u,s=0;continue}t&&(n.length>0?n+=\"/..\":n=\"..\",o=2)}else n.length>0?n+=\"/\"+e.slice(i+1,u):n=e.slice(i+1,u),o=u-i-1;i=u,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var t={resolve:function(){for(var e,t=\"\",r=!1,n=arguments.length-1;n>=-1&&!r;n--){var o;n>=0?o=arguments[n]:(void 0===e&&(e=process.cwd()),o=e),assertPath(o),0!==o.length&&(t=o+\"/\"+t,r=47===o.charCodeAt(0))}return t=normalizeStringPosix(t,!r),r?t.length>0?\"/\"+t:\"/\":t.length>0?t:\".\"},normalize:function(e){if(assertPath(e),0===e.length)return\".\";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=normalizeStringPosix(e,!t)).length||t||(e=\".\"),e.length>0&&r&&(e+=\"/\"),t?\"/\"+e:e},isAbsolute:function(e){return assertPath(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return\".\";for(var e,r=0;r0&&(void 0===e?e=n:e+=\"/\"+n)}return void 0===e?\".\":t.normalize(e)},relative:function(e,r){if(assertPath(e),assertPath(r),e===r)return\"\";if((e=t.resolve(e))===(r=t.resolve(r)))return\"\";for(var n=1;na){if(47===r.charCodeAt(s+l))return r.slice(s+l+1);if(0===l)return r.slice(s+l)}else i>a&&(47===e.charCodeAt(n+l)?c=l:0===l&&(c=0));break}var p=e.charCodeAt(n+l);if(p!==r.charCodeAt(s+l))break;47===p&&(c=l)}var f=\"\";for(l=n+c+1;l<=o;++l)l!==o&&47!==e.charCodeAt(l)||(0===f.length?f+=\"..\":f+=\"/..\");return f.length>0?f+r.slice(s+c):(s+=c,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(assertPath(e),0===e.length)return\".\";for(var t=e.charCodeAt(0),r=47===t,n=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){n=i;break}}else o=!1;return-1===n?r?\"/\":\".\":r&&1===n?\"//\":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&\"string\"!=typeof t)throw new TypeError('\"ext\" argument must be a string');assertPath(e);var r,n=0,o=-1,i=!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,u=-1;for(r=e.length-1;r>=0;--r){var a=e.charCodeAt(r);if(47===a){if(!i){n=r+1;break}}else-1===u&&(i=!1,u=r+1),s>=0&&(a===t.charCodeAt(s)?-1==--s&&(o=r):(s=-1,o=u))}return n===o?o=u:-1===o&&(o=e.length),e.slice(n,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!i){n=r+1;break}}else-1===o&&(i=!1,o=r+1);return-1===o?\"\":e.slice(n,o)},extname:function(e){assertPath(e);for(var t=-1,r=0,n=-1,o=!0,i=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===n&&(o=!1,n=s+1),46===u?-1===t?t=s:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){r=s+1;break}}return-1===t||-1===n||0===i||1===i&&t===n-1&&t===r+1?\"\":e.slice(t,n)},format:function(e){if(null===e||\"object\"!=typeof e)throw new TypeError('The \"pathObject\" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||\"\")+(t.ext||\"\");return r?r===t.root?r+n:r+e+n:n}(\"/\",e)},parse:function(e){assertPath(e);var t={root:\"\",dir:\"\",base:\"\",ext:\"\",name:\"\"};if(0===e.length)return t;var r,n=e.charCodeAt(0),o=47===n;o?(t.root=\"/\",r=1):r=0;for(var i=-1,s=0,u=-1,a=!0,c=e.length-1,l=0;c>=r;--c)if(47!==(n=e.charCodeAt(c)))-1===u&&(a=!1,u=c+1),46===n?-1===i?i=c:1!==l&&(l=1):-1!==i&&(l=-1);else if(!a){s=c+1;break}return-1===i||-1===u||0===l||1===l&&i===u-1&&i===s+1?-1!==u&&(t.base=t.name=0===s&&o?e.slice(1,u):e.slice(s,u)):(0===s&&o?(t.name=e.slice(1,i),t.base=e.slice(1,u)):(t.name=e.slice(s,i),t.base=e.slice(s,u)),t.ext=e.slice(i,u)),s>0?t.dir=e.slice(0,s-1):o&&(t.dir=\"/\"),t},sep:\"/\",delimiter:\":\",win32:null,posix:null};t.posix=t,e.exports=t},8681:(e,t,r)=>{const n=r(3102),o=r(7116),{isInlineComment:i}=r(1101),{interpolation:s}=r(3295),{isMixinToken:u}=r(5953),a=r(1330),c=r(5255),l=/(!\\s*important)$/i;e.exports=class extends o{constructor(...e){super(...e),this.lastNode=null}atrule(e){s.bind(this)(e)||(super.atrule(e),a(this.lastNode),c(this.lastNode))}decl(...e){super.decl(...e);/extend\\(.+\\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=\" \".concat(e[0][1]);const t=e.findIndex((e=>\"(\"===e[0])),r=e.reverse().find((e=>\")\"===e[0])),n=e.reverse().indexOf(r),o=e.splice(t,n).map((e=>e[1])).join(\"\");for(const t of e.reverse())this.tokenizer.back(t);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,t,r){super.init(e,t,r),this.lastNode=e}inlineComment(e){const t=new n,r=e[1].slice(2);if(this.init(t,e[2],e[3]),t.source.end={line:e[4],column:e[5]},t.inline=!0,t.raws.begin=\"//\",/^\\s*$/.test(r))t.text=\"\",t.raws.left=r,t.raws.right=\"\";else{const e=r.match(/^(\\s*)([^]*[^\\s])(\\s*)$/);[,t.raws.left,t.text,t.raws.right]=e}}mixin(e){const[t]=e,r=t[1].slice(0,1),n=e.findIndex((e=>\"brackets\"===e[0])),o=e.findIndex((e=>\"(\"===e[0]));let i=\"\";if((n<0||n>3)&&o>0){const t=e.reduce(((e,t,r)=>\")\"===t[0]?r:e)),r=e.slice(o,t+o).map((e=>e[1])).join(\"\"),[n]=e.slice(o),i=[n[2],n[3]],[s]=e.slice(t,t+1),u=[s[2],s[3]],a=[\"brackets\",r].concat(i,u),c=e.slice(0,o),l=e.slice(t+1);(e=c).push(a),e=e.concat(l)}const s=[];for(const t of e)if((\"!\"===t[1]||s.length)&&s.push(t),\"important\"===t[1])break;if(s.length){const[t]=s,r=e.indexOf(t),n=s[s.length-1],o=[t[2],t[3]],i=[n[4],n[5]],u=[\"word\",s.map((e=>e[1])).join(\"\")].concat(o,i);e.splice(r,s.length,u)}const u=e.findIndex((e=>l.test(e[1])));u>0&&([,i]=e[u],e.splice(u,1));for(const t of e.reverse())this.tokenizer.back(t);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,i&&(this.lastNode.important=!0,this.lastNode.raws.important=i)}other(e){i.bind(this)(e)||super.other(e)}rule(e){const t=e[e.length-1],r=e[e.length-2];if(\"at-word\"===r[0]&&\"{\"===t[0]&&(this.tokenizer.back(t),s.bind(this)(r))){const t=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([t]);for(const t of e.reverse())this.tokenizer.back(t);return}super.rule(e);/:extend\\(.+\\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){const[t]=e;\"each\"!==e[0][1]||\"(\"!==e[1][0]?u(t)?this.mixin(e):super.unknownWord(e):this.each(e)}}},3406:(e,t,r)=>{const n=r(5701);e.exports=class extends n{atrule(e,t){if(!e.mixin&&!e.variable&&!e.function)return void super.atrule(e,t);const r=e.function?\"\":e.raws.identifier||\"@\";let n=\"\".concat(r).concat(e.name),o=e.params?this.rawValue(e,\"params\"):\"\";const i=e.raws.important||\"\";if(e.variable&&(o=e.value),void 0!==e.raws.afterName?n+=e.raws.afterName:o&&(n+=\" \"),e.nodes)this.block(e,n+o+i);else{const r=(e.raws.between||\"\")+i+(t?\";\":\"\");this.builder(n+o+r,e)}}comment(e){if(e.inline){const t=this.raw(e,\"left\",\"commentLeft\"),r=this.raw(e,\"right\",\"commentRight\");this.builder(\"//\".concat(t).concat(e.text).concat(r),e)}else super.comment(e)}}},7371:(e,t,r)=>{const n=r(2993),o=r(8681),i=r(3406);e.exports={parse(e,t){const r=new n(e,t),i=new o(r);return i.parse(),i.root},stringify(e,t){new i(t).stringify(e)},nodeToString(t){let r=\"\";return e.exports.stringify(t,(e=>{r+=e})),r}}},1330:(e,t,r)=>{const n=r(1157),o=/^url\\((.+)\\)/;e.exports=e=>{const{name:t,params:r=\"\"}=e;if(\"import\"===t&&r.length){e.import=!0;const t=n({css:r});for(e.filename=r.replace(o,\"$1\");!t.endOfFile();){const[n,o]=t.nextToken();if(\"word\"===n&&\"url\"===o)return;if(\"brackets\"===n){e.options=o,e.filename=r.replace(o,\"\").trim();break}}}}},1101:(e,t,r)=>{const n=r(1157),o=r(2993);e.exports={isInlineComment(t){if(\"word\"===t[0]&&\"//\"===t[1].slice(0,2)){const e=t,r=[];let i;for(;t;){if(/\\r?\\n/.test(t[1])){if(/['\"].*\\r?\\n/.test(t[1])){r.push(t[1].substring(0,t[1].indexOf(\"\\n\")));let e=t[1].substring(t[1].indexOf(\"\\n\"));e+=this.input.css.valueOf().substring(this.tokenizer.position()),this.input=new o(e),this.tokenizer=n(this.input)}else this.tokenizer.back(t);break}r.push(t[1]),i=t,t=this.tokenizer.nextToken({ignoreUnclosed:!0})}const s=[\"comment\",r.join(\"\"),e[2],e[3],i[2],i[3]];return this.inlineComment(s),!0}if(\"/\"===t[1]){const r=this.tokenizer.nextToken({ignoreUnclosed:!0});if(\"comment\"===r[0]&&/^\\/\\*/.test(r[1]))return r[0]=\"word\",r[1]=r[1].slice(1),t[1]=\"//\",this.tokenizer.back(r),e.exports.isInlineComment.bind(this)(t)}return!1}}},3295:e=>{e.exports={interpolation(e){let t=e;const r=[e],n=[\"word\",\"{\",\"}\"];if(e=this.tokenizer.nextToken(),t[1].length>1||\"{\"!==e[0])return this.tokenizer.back(e),!1;for(;e&&n.includes(e[0]);)r.push(e),e=this.tokenizer.nextToken();const o=r.map((e=>e[1]));[t]=r;const i=r.pop(),s=[t[2],t[3]],u=[i[4]||i[2],i[5]||i[3]],a=[\"word\",o.join(\"\")].concat(s,u);return this.tokenizer.back(e),this.tokenizer.back(a),!0}}},5953:e=>{const t=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,r=/\\.[0-9]/;e.exports={isMixinToken:e=>{const[,n]=e,[o]=n;return(\".\"===o||\"#\"===o)&&!1===t.test(n)&&!1===r.test(n)}}},5255:e=>{const t=/:$/,r=/^:(\\s+)?/;e.exports=e=>{const{name:n,params:o=\"\"}=e;if(\":\"===e.name.slice(-1)){if(t.test(n)){const[r]=n.match(t);e.name=n.replace(r,\"\"),e.raws.afterName=r+(e.raws.afterName||\"\"),e.variable=!0,e.value=e.params}if(r.test(o)){const[t]=o.match(r);e.value=o.replace(t,\"\"),e.raws.afterName=(e.raws.afterName||\"\")+t,e.variable=!0}}}},8322:(e,t,r)=>{\"use strict\";t.Z=function(e){return new i.default({nodes:(0,s.parseMediaList)(e),type:\"media-query-list\",value:e.trim()})};var n,o=r(9066),i=(n=o)&&n.__esModule?n:{default:n},s=r(7625)},9066:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n,o=r(7680),i=(n=o)&&n.__esModule?n:{default:n};function Container(e){var t=this;this.constructor(e),this.nodes=e.nodes,void 0===this.after&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:\"\"),void 0===this.before&&(this.before=this.nodes.length>0?this.nodes[0].before:\"\"),void 0===this.sourceIndex&&(this.sourceIndex=this.before.length),this.nodes.forEach((function(e){e.parent=t}))}Container.prototype=Object.create(i.default.prototype),Container.constructor=i.default,Container.prototype.walk=function(e,t){for(var r=\"string\"==typeof e||e instanceof RegExp,n=r?t:e,o=\"string\"==typeof e?new RegExp(e):e,i=0;i{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){this.after=e.after,this.before=e.before,this.type=e.type,this.value=e.value,this.sourceIndex=e.sourceIndex}},7625:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.parseMediaFeature=parseMediaFeature,t.parseMediaQuery=parseMediaQuery,t.parseMediaList=function(e){var t=[],r=0,i=0,s=/^(\\s*)url\\s*\\(/.exec(e);if(null!==s){for(var u=s[0].length,a=1;a>0;){var c=e[u];\"(\"===c&&a++,\")\"===c&&a--,u++}t.unshift(new n.default({type:\"url\",value:e.substring(0,u).trim(),sourceIndex:s[1].length,before:s[1],after:/^(\\s*)/.exec(e.substring(u))[1]})),r=u}for(var l=r;l0&&(r[l-1].after=u.before),void 0===u.type){if(l>0){if(\"media-feature-expression\"===r[l-1].type){u.type=\"keyword\";continue}if(\"not\"===r[l-1].value||\"only\"===r[l-1].value){u.type=\"media-type\";continue}if(\"and\"===r[l-1].value){u.type=\"media-feature-expression\";continue}\"media-type\"===r[l-1].type&&(r[l+1]?u.type=\"media-feature-expression\"===r[l+1].type?\"keyword\":\"media-feature-expression\":u.type=\"media-feature-expression\")}if(0===l){if(!r[l+1]){u.type=\"media-type\";continue}if(r[l+1]&&(\"media-feature-expression\"===r[l+1].type||\"keyword\"===r[l+1].type)){u.type=\"media-type\";continue}if(r[l+2]){if(\"media-feature-expression\"===r[l+2].type){u.type=\"media-type\",r[l+1].type=\"keyword\";continue}if(\"keyword\"===r[l+2].type){u.type=\"keyword\",r[l+1].type=\"media-type\";continue}}if(r[l+3]&&\"media-feature-expression\"===r[l+3].type){u.type=\"keyword\",r[l+1].type=\"media-type\",r[l+2].type=\"keyword\";continue}}}return r}},5822:(e,t,r)=>{\"use strict\";var n=function(e){var t,r;function NestedDeclaration(t){var r;return(r=e.call(this,t)||this).type=\"decl\",r.isNested=!0,r.nodes||(r.nodes=[]),r}return r=e,(t=NestedDeclaration).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,NestedDeclaration}(r(1204));e.exports=n},1945:(e,t,r)=>{\"use strict\";var n=r(2993),o=r(1713);e.exports=function(e,t){var r=new n(e,t),i=new o(r);return i.parse(),i.root}},1713:(e,t,r)=>{\"use strict\";var n=r(3102),o=r(7116),i=r(5822),s=r(6256),u=function(e){var t,r;function ScssParser(){return e.apply(this,arguments)||this}r=e,(t=ScssParser).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=ScssParser.prototype;return o.createTokenizer=function(){this.tokenizer=s(this.input)},o.rule=function(t){var r=!1,n=0,o=\"\",s=t,u=Array.isArray(s),a=0;for(s=u?s:s[Symbol.iterator]();;){var c;if(u){if(a>=s.length)break;c=s[a++]}else{if((a=s.next()).done)break;c=a.value}var l=c;if(r)\"comment\"!==l[0]&&\"{\"!==l[0]&&(o+=l[1]);else{if(\"space\"===l[0]&&-1!==l[1].indexOf(\"\\n\"))break;\"(\"===l[0]?n+=1:\")\"===l[0]?n-=1:0===n&&\":\"===l[0]&&(r=!0)}}if(!r||\"\"===o.trim()||/^[a-zA-Z-:#]/.test(o))e.prototype.rule.call(this,t);else{t.pop();var p=new i;this.init(p);var f,h=t[t.length-1];for(h[4]?p.source.end={line:h[4],column:h[5]}:p.source.end={line:h[2],column:h[3]};\"word\"!==t[0][0];)p.raws.before+=t.shift()[1];for(p.source.start={line:t[0][2],column:t[0][3]},p.prop=\"\";t.length;){var d=t[0][0];if(\":\"===d||\"space\"===d||\"comment\"===d)break;p.prop+=t.shift()[1]}for(p.raws.between=\"\";t.length;){if(\":\"===(f=t.shift())[0]){p.raws.between+=f[1];break}p.raws.between+=f[1]}\"_\"!==p.prop[0]&&\"*\"!==p.prop[0]||(p.raws.before+=p.prop[0],p.prop=p.prop.slice(1)),p.raws.between+=this.spacesAndCommentsFromStart(t),this.precheckMissedSemicolon(t);for(var D=t.length-1;D>0;D--){if(\"!important\"===(f=t[D])[1]){p.important=!0;var g=this.stringFrom(t,D);\" !important\"!==(g=this.spacesFromEnd(t)+g)&&(p.raws.important=g);break}if(\"important\"===f[1]){for(var m=t.slice(0),y=\"\",v=D;v>0;v--){var C=m[v][0];if(0===y.trim().indexOf(\"!\")&&\"space\"!==C)break;y=m.pop()[1]+y}0===y.trim().indexOf(\"!\")&&(p.important=!0,p.raws.important=y,t=m)}if(\"space\"!==f[0]&&\"comment\"!==f[0])break}this.raw(p,\"value\",t),-1!==p.value.indexOf(\":\")&&this.checkMissedSemicolon(t),this.current=p}},o.comment=function(t){if(\"inline\"===t[6]){var r=new n;this.init(r,t[2],t[3]),r.raws.inline=!0,r.source.end={line:t[4],column:t[5]};var o=t[1].slice(2);if(/^\\s*$/.test(o))r.text=\"\",r.raws.left=o,r.raws.right=\"\";else{var i=o.match(/^(\\s*)([^]*[^\\s])(\\s*)$/),s=i[2].replace(/(\\*\\/|\\/\\*)/g,\"*//*\");r.text=s,r.raws.left=i[1],r.raws.right=i[3],r.raws.text=i[2]}}else e.prototype.comment.call(this,t)},o.raw=function(t,r,n){if(e.prototype.raw.call(this,t,r,n),t.raws[r]){var o=t.raws[r].raw;t.raws[r].raw=n.reduce((function(e,t){return\"comment\"===t[0]&&\"inline\"===t[6]?e+\"/*\"+t[1].slice(2).replace(/(\\*\\/|\\/\\*)/g,\"*//*\")+\"*/\":e+t[1]}),\"\"),o!==t.raws[r].raw&&(t.raws[r].scss=o)}},ScssParser}(o);e.exports=u},9235:(e,t,r)=>{\"use strict\";var n=function(e){var t,r;function ScssStringifier(){return e.apply(this,arguments)||this}r=e,(t=ScssStringifier).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var n=ScssStringifier.prototype;return n.comment=function(e){var t=this.raw(e,\"left\",\"commentLeft\"),r=this.raw(e,\"right\",\"commentRight\");if(e.raws.inline){var n=e.raws.text||e.text;this.builder(\"//\"+t+n+r,e)}else this.builder(\"/*\"+t+e.text+r+\"*/\",e)},n.decl=function(t,r){if(t.isNested){var n,o=this.raw(t,\"between\",\"colon\"),i=t.prop+o+this.rawValue(t,\"value\");t.important&&(i+=t.raws.important||\" !important\"),this.builder(i+\"{\",t,\"start\"),t.nodes&&t.nodes.length?(this.body(t),n=this.raw(t,\"after\")):n=this.raw(t,\"after\",\"emptyBody\"),n&&this.builder(n),this.builder(\"}\",t,\"end\")}else e.prototype.decl.call(this,t,r)},n.rawValue=function(e,t){var r=e[t],n=e.raws[t];return n&&n.value===r?n.scss?n.scss:n.raw:r},ScssStringifier}(r(5701));e.exports=n},4933:(e,t,r)=>{\"use strict\";var n=r(9235);e.exports=function(e,t){new n(t).stringify(e)}},304:(e,t,r)=>{\"use strict\";var n=r(4933),o=r(1945);e.exports={parse:o,stringify:n}},6256:e=>{\"use strict\";var t=\"'\".charCodeAt(0),r='\"'.charCodeAt(0),n=\"\\\\\".charCodeAt(0),o=\"/\".charCodeAt(0),i=\"\\n\".charCodeAt(0),s=\" \".charCodeAt(0),u=\"\\f\".charCodeAt(0),a=\"\\t\".charCodeAt(0),c=\"\\r\".charCodeAt(0),l=\"[\".charCodeAt(0),p=\"]\".charCodeAt(0),f=\"(\".charCodeAt(0),h=\")\".charCodeAt(0),d=\"{\".charCodeAt(0),D=\"}\".charCodeAt(0),g=\";\".charCodeAt(0),m=\"*\".charCodeAt(0),y=\":\".charCodeAt(0),v=\"@\".charCodeAt(0),C=\",\".charCodeAt(0),w=\"#\".charCodeAt(0),b=/[ \\n\\t\\r\\f{}()'\"\\\\;/[\\]#]/g,E=/[ \\n\\t\\r\\f(){}:;@!'\"\\\\\\][#]|\\/(?=\\*)/g,_=/.[\\\\/(\"'\\n]/,k=/[a-f0-9]/i,S=/[\\r\\f\\n]/g;e.exports=function(e,A){void 0===A&&(A={});var F,x,O,N,T,I,R,M,P,L,B,j,q,G,U=e.css.valueOf(),W=A.ignoreErrors,$=U.length,z=-1,V=1,H=0,X=[],J=[];function unclosed(t){throw e.error(\"Unclosed \"+t,V,H-z)}function interpolation(){for(var e=1,o=!1,i=!1;e>0;)x+=1,U.length<=x&&unclosed(\"interpolation\"),F=U.charCodeAt(x),j=U.charCodeAt(x+1),o?i||F!==o?F===n?i=!L:i&&(i=!1):(o=!1,i=!1):F===t||F===r?o=F:F===D?e-=1:F===w&&j===d&&(e+=1)}return{back:function(e){J.push(e)},nextToken:function(){if(J.length)return J.pop();if(!(H>=$)){switch(((F=U.charCodeAt(H))===i||F===u||F===c&&U.charCodeAt(H+1)!==i)&&(z=H,V+=1),F){case i:case s:case a:case c:case u:x=H;do{x+=1,(F=U.charCodeAt(x))===i&&(z=x,V+=1)}while(F===s||F===i||F===a||F===c||F===u);q=[\"space\",U.slice(H,x)],H=x-1;break;case l:q=[\"[\",\"[\",V,H-z];break;case p:q=[\"]\",\"]\",V,H-z];break;case d:q=[\"{\",\"{\",V,H-z];break;case D:q=[\"}\",\"}\",V,H-z];break;case C:q=[\"word\",\",\",V,H-z,V,H-z+1];break;case y:q=[\":\",\":\",V,H-z];break;case g:q=[\";\",\";\",V,H-z];break;case f:if(B=X.length?X.pop()[1]:\"\",j=U.charCodeAt(H+1),\"url\"===B&&j!==t&&j!==r){for(G=1,L=!1,x=H+1;x<=U.length-1;){if((j=U.charCodeAt(x))===n)L=!L;else if(j===f)G+=1;else if(j===h&&0===(G-=1))break;x+=1}I=U.slice(H,x+1),N=I.split(\"\\n\"),(T=N.length-1)>0?(M=V+T,P=x-N[T].length):(M=V,P=z),q=[\"brackets\",I,V,H-z,M,x-P],z=P,V=M,H=x}else x=U.indexOf(\")\",H+1),I=U.slice(H,x+1),-1===x||_.test(I)?q=[\"(\",\"(\",V,H-z]:(q=[\"brackets\",I,V,H-z,V,x-z],H=x);break;case h:q=[\")\",\")\",V,H-z];break;case t:case r:for(O=F,x=H,L=!1;x<$&&(++x===$&&unclosed(\"string\"),F=U.charCodeAt(x),j=U.charCodeAt(x+1),L||F!==O);)F===n?L=!L:L?L=!1:F===w&&j===d&&interpolation();I=U.slice(H,x+1),N=I.split(\"\\n\"),(T=N.length-1)>0?(M=V+T,P=x-N[T].length):(M=V,P=z),q=[\"string\",U.slice(H,x+1),V,H-z,M,x-P],z=P,V=M,H=x;break;case v:b.lastIndex=H+1,b.test(U),x=0===b.lastIndex?U.length-1:b.lastIndex-2,q=[\"at-word\",U.slice(H,x+1),V,H-z,V,x-z],H=x;break;case n:for(x=H,R=!0;U.charCodeAt(x+1)===n;)x+=1,R=!R;if(F=U.charCodeAt(x+1),R&&F!==o&&F!==s&&F!==i&&F!==a&&F!==c&&F!==u&&(x+=1,k.test(U.charAt(x)))){for(;k.test(U.charAt(x+1));)x+=1;U.charCodeAt(x+1)===s&&(x+=1)}q=[\"word\",U.slice(H,x+1),V,H-z,V,x-z],H=x;break;default:j=U.charCodeAt(H+1),F===w&&j===d?(x=H,interpolation(),I=U.slice(H,x+1),N=I.split(\"\\n\"),(T=N.length-1)>0?(M=V+T,P=x-N[T].length):(M=V,P=z),q=[\"word\",I,V,H-z,M,x-P],z=P,V=M,H=x):F===o&&j===m?(0===(x=U.indexOf(\"*/\",H+2)+1)&&(W?x=U.length:unclosed(\"comment\")),I=U.slice(H,x+1),N=I.split(\"\\n\"),(T=N.length-1)>0?(M=V+T,P=x-N[T].length):(M=V,P=z),q=[\"comment\",I,V,H-z,M,x-P],z=P,V=M,H=x):F===o&&j===o?(S.lastIndex=H+1,S.test(U),x=0===S.lastIndex?U.length-1:S.lastIndex-2,I=U.slice(H,x+1),q=[\"comment\",I,V,H-z,V,x-z,\"inline\"],H=x):(E.lastIndex=H+1,E.test(U),x=0===E.lastIndex?U.length-1:E.lastIndex-2,q=[\"word\",U.slice(H,x+1),V,H-z,V,x-z],X.push(q),H=x)}return H++,q}},endOfFile:function(){return 0===J.length&&H>=$}}}},1264:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n=_interopRequireDefault(r(2566)),o=_interopRequireDefault(r(616)),i=_interopRequireDefault(r(7835)),s=_interopRequireDefault(r(478)),u=_interopRequireDefault(r(4907)),a=_interopRequireDefault(r(8420)),c=_interopRequireDefault(r(7523)),l=_interopRequireDefault(r(4316)),p=_interopRequireDefault(r(6909)),f=_interopRequireDefault(r(6279)),h=_interopRequireDefault(r(439)),d=_interopRequireDefault(r(9956)),D=_interopRequireDefault(r(70)),g=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(8790));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var parser=function(e){return new n.default(e)};parser.attribute=function(e){return new o.default(e)},parser.className=function(e){return new i.default(e)},parser.combinator=function(e){return new s.default(e)},parser.comment=function(e){return new u.default(e)},parser.id=function(e){return new a.default(e)},parser.nesting=function(e){return new c.default(e)},parser.pseudo=function(e){return new l.default(e)},parser.root=function(e){return new p.default(e)},parser.selector=function(e){return new f.default(e)},parser.string=function(e){return new h.default(e)},parser.tag=function(e){return new d.default(e)},parser.universal=function(e){return new D.default(e)},Object.keys(g).forEach((function(e){\"__esModule\"!==e&&(parser[e]=g[e])})),t.default=parser,e.exports=t.default},5269:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n=function(){function defineProperties(e,t){for(var r=0;r1?(\"\"===o[0]&&(o[0]=!0),i.attribute=this.parseValue(o[2]),i.namespace=this.parseNamespace(o[0])):i.attribute=this.parseValue(n[0]),t=new D.default(i),n[2]){var s=n[2].split(/(\\s+i\\s*?)$/),u=s[0].trim();t.value=this.lossy?u:s[0],s[1]&&(t.insensitive=!0,this.lossy||(t.raws.insensitive=s[1])),t.quoted=\"'\"===u[0]||'\"'===u[0],t.raws.unquoted=t.quoted?u.slice(1,-1):u}this.newNode(t),this.position++},Parser.prototype.combinator=function(){if(\"|\"===this.currToken[1])return this.namespace();for(var e=new m.default({value:\"\",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position1&&e.nextToken&&\"(\"===e.nextToken[0]&&e.error(\"Misplaced parenthesis.\")}))}else this.error('Unexpected \"'+this.currToken[0]+'\" found.')},Parser.prototype.space=function(){var e=this.currToken;0===this.position||\",\"===this.prevToken[0]||\"(\"===this.prevToken[0]?(this.spaces=this.parseSpace(e[1]),this.position++):this.position===this.tokens.length-1||\",\"===this.nextToken[0]||\")\"===this.nextToken[0]?(this.current.last.spaces.after=this.parseSpace(e[1]),this.position++):this.combinator()},Parser.prototype.string=function(){var e=this.currToken;this.newNode(new h.default({value:this.currToken[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++},Parser.prototype.universal=function(e){var t=this.nextToken;if(t&&\"|\"===t[1])return this.position++,this.namespace();this.newNode(new g.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),e),this.position++},Parser.prototype.splitWord=function(e,t){for(var r=this,n=this.nextToken,u=this.currToken[1];n&&\"word\"===n[0];){this.position++;var a=this.currToken[1];if(u+=a,a.lastIndexOf(\"\\\\\")===a.length-1){var l=this.nextToken;l&&\"space\"===l[0]&&(u+=this.parseSpace(l[1],\" \"),this.position++)}n=this.nextToken}var h=(0,i.default)(u,\".\"),d=(0,i.default)(u,\"#\"),D=(0,i.default)(u,\"#{\");D.length&&(d=d.filter((function(e){return!~D.indexOf(e)})));var g=(0,v.default)((0,s.default)((0,o.default)([[0],h,d])));g.forEach((function(n,o){var i=g[o+1]||u.length,s=u.slice(n,i);if(0===o&&t)return t.call(r,s,g.length);var a=void 0;a=~h.indexOf(n)?new c.default({value:s.slice(1),source:{start:{line:r.currToken[2],column:r.currToken[3]+n},end:{line:r.currToken[4],column:r.currToken[3]+(i-1)}},sourceIndex:r.currToken[6]+g[o]}):~d.indexOf(n)?new p.default({value:s.slice(1),source:{start:{line:r.currToken[2],column:r.currToken[3]+n},end:{line:r.currToken[4],column:r.currToken[3]+(i-1)}},sourceIndex:r.currToken[6]+g[o]}):new f.default({value:s,source:{start:{line:r.currToken[2],column:r.currToken[3]+n},end:{line:r.currToken[4],column:r.currToken[3]+(i-1)}},sourceIndex:r.currToken[6]+g[o]}),r.newNode(a,e)})),this.position++},Parser.prototype.word=function(e){var t=this.nextToken;return t&&\"|\"===t[1]?(this.position++,this.namespace()):this.splitWord(e)},Parser.prototype.loop=function(){for(;this.position{\"use strict\";t.__esModule=!0;var n,o=function(){function defineProperties(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},r=new s.default({css:e,error:function(e){throw new Error(e)},options:t});return this.res=r,this.func(r),this},o(Processor,[{key:\"result\",get:function(){return String(this.res)}}]),Processor}();t.default=u,e.exports=t.default},616:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n,o=r(4379),i=(n=o)&&n.__esModule?n:{default:n},s=r(8790);var u=function(e){function Attribute(t){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Attribute);var r=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,e.call(this,t));return r.type=s.ATTRIBUTE,r.raws={},r}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Attribute,e),Attribute.prototype.toString=function(){var e=[this.spaces.before,\"[\",this.ns,this.attribute];return this.operator&&e.push(this.operator),this.value&&e.push(this.value),this.raws.insensitive?e.push(this.raws.insensitive):this.insensitive&&e.push(\" i\"),e.push(\"]\"),e.concat(this.spaces.after).join(\"\")},Attribute}(i.default);t.default=u,e.exports=t.default},7835:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n,o=r(4379),i=(n=o)&&n.__esModule?n:{default:n},s=r(8790);var u=function(e){function ClassName(t){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,ClassName);var r=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,e.call(this,t));return r.type=s.CLASS,r}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(ClassName,e),ClassName.prototype.toString=function(){return[this.spaces.before,this.ns,String(\".\"+this.value),this.spaces.after].join(\"\")},ClassName}(i.default);t.default=u,e.exports=t.default},478:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n,o=r(8871),i=(n=o)&&n.__esModule?n:{default:n},s=r(8790);var u=function(e){function Combinator(t){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Combinator);var r=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,e.call(this,t));return r.type=s.COMBINATOR,r}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Combinator,e),Combinator}(i.default);t.default=u,e.exports=t.default},4907:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n,o=r(8871),i=(n=o)&&n.__esModule?n:{default:n},s=r(8790);var u=function(e){function Comment(t){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Comment);var r=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,e.call(this,t));return r.type=s.COMMENT,r}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Comment,e),Comment}(i.default);t.default=u,e.exports=t.default},7144:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n,o=function(){function defineProperties(e,t){for(var r=0;r=e&&(this.indexes[r]=t-1);return this},Container.prototype.removeAll=function(){var e=this.nodes,t=Array.isArray(e),r=0;for(e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}n.parent=void 0}return this.nodes=[],this},Container.prototype.empty=function(){return this.removeAll()},Container.prototype.insertAfter=function(e,t){var r=this.index(e);this.nodes.splice(r+1,0,t);var n=void 0;for(var o in this.indexes)r<=(n=this.indexes[o])&&(this.indexes[o]=n+this.nodes.length);return this},Container.prototype.insertBefore=function(e,t){var r=this.index(e);this.nodes.splice(r,0,t);var n=void 0;for(var o in this.indexes)r<=(n=this.indexes[o])&&(this.indexes[o]=n+this.nodes.length);return this},Container.prototype.each=function(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var t=this.lastEach;if(this.indexes[t]=0,this.length){for(var r=void 0,n=void 0;this.indexes[t]{\"use strict\";t.__esModule=!0;var n,o=r(4379),i=(n=o)&&n.__esModule?n:{default:n},s=r(8790);var u=function(e){function ID(t){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,ID);var r=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,e.call(this,t));return r.type=s.ID,r}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(ID,e),ID.prototype.toString=function(){return[this.spaces.before,this.ns,String(\"#\"+this.value),this.spaces.after].join(\"\")},ID}(i.default);t.default=u,e.exports=t.default},4379:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n,o=function(){function defineProperties(e,t){for(var r=0;r{\"use strict\";t.__esModule=!0;var n,o=r(8871),i=(n=o)&&n.__esModule?n:{default:n},s=r(8790);var u=function(e){function Nesting(t){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Nesting);var r=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,e.call(this,t));return r.type=s.NESTING,r.value=\"&\",r}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Nesting,e),Nesting}(i.default);t.default=u,e.exports=t.default},8871:(e,t)=>{\"use strict\";t.__esModule=!0;var r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e};function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}var n=function cloneNode(e,t){if(\"object\"!==(void 0===e?\"undefined\":r(e)))return e;var n=new e.constructor;for(var o in e)if(e.hasOwnProperty(o)){var i=e[o],s=void 0===i?\"undefined\":r(i);\"parent\"===o&&\"object\"===s?t&&(n[o]=t):n[o]=i instanceof Array?i.map((function(e){return cloneNode(e,n)})):cloneNode(i,n)}return n},o=function(){function _class(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in _classCallCheck(this,_class),e)this[t]=e[t];var r=e.spaces,n=(r=void 0===r?{}:r).before,o=void 0===n?\"\":n,i=r.after,s=void 0===i?\"\":i;this.spaces={before:o,after:s}}return _class.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},_class.prototype.replaceWith=function(){if(this.parent){for(var e in arguments)this.parent.insertBefore(this,arguments[e]);this.remove()}return this},_class.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},_class.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},_class.prototype.clone=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n(this);for(var r in e)t[r]=e[r];return t},_class.prototype.toString=function(){return[this.spaces.before,String(this.value),this.spaces.after].join(\"\")},_class}();t.default=o,e.exports=t.default},4316:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n,o=r(7144),i=(n=o)&&n.__esModule?n:{default:n},s=r(8790);var u=function(e){function Pseudo(t){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Pseudo);var r=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,e.call(this,t));return r.type=s.PSEUDO,r}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Pseudo,e),Pseudo.prototype.toString=function(){var e=this.length?\"(\"+this.map(String).join(\",\")+\")\":\"\";return[this.spaces.before,String(this.value),e,this.spaces.after].join(\"\")},Pseudo}(i.default);t.default=u,e.exports=t.default},6909:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n,o=r(7144),i=(n=o)&&n.__esModule?n:{default:n},s=r(8790);var u=function(e){function Root(t){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Root);var r=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,e.call(this,t));return r.type=s.ROOT,r}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Root,e),Root.prototype.toString=function(){var e=this.reduce((function(e,t){var r=String(t);return r?e+r+\",\":\"\"}),\"\").slice(0,-1);return this.trailingComma?e+\",\":e},Root}(i.default);t.default=u,e.exports=t.default},6279:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n,o=r(7144),i=(n=o)&&n.__esModule?n:{default:n},s=r(8790);var u=function(e){function Selector(t){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Selector);var r=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,e.call(this,t));return r.type=s.SELECTOR,r}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Selector,e),Selector}(i.default);t.default=u,e.exports=t.default},439:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n,o=r(8871),i=(n=o)&&n.__esModule?n:{default:n},s=r(8790);var u=function(e){function String(t){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,String);var r=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,e.call(this,t));return r.type=s.STRING,r}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(String,e),String}(i.default);t.default=u,e.exports=t.default},9956:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n,o=r(4379),i=(n=o)&&n.__esModule?n:{default:n},s=r(8790);var u=function(e){function Tag(t){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Tag);var r=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,e.call(this,t));return r.type=s.TAG,r}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Tag,e),Tag}(i.default);t.default=u,e.exports=t.default},8790:(e,t)=>{\"use strict\";t.__esModule=!0;t.TAG=\"tag\",t.STRING=\"string\",t.SELECTOR=\"selector\",t.ROOT=\"root\",t.PSEUDO=\"pseudo\",t.NESTING=\"nesting\",t.ID=\"id\",t.COMMENT=\"comment\",t.COMBINATOR=\"combinator\",t.CLASS=\"class\",t.ATTRIBUTE=\"attribute\",t.UNIVERSAL=\"universal\"},70:(e,t,r)=>{\"use strict\";t.__esModule=!0;var n,o=r(4379),i=(n=o)&&n.__esModule?n:{default:n},s=r(8790);var u=function(e){function Universal(t){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Universal);var r=function(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}(this,e.call(this,t));return r.type=s.UNIVERSAL,r.value=\"*\",r}return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Universal,e),Universal}(i.default);t.default=u,e.exports=t.default},9788:(e,t)=>{\"use strict\";t.__esModule=!0,t.default=function(e){return e.sort((function(e,t){return e-t}))},e.exports=t.default},6554:(e,t)=>{\"use strict\";t.__esModule=!0,t.default=function(e){var t=[],o=e.css.valueOf(),i=void 0,s=void 0,u=void 0,a=void 0,c=void 0,l=void 0,p=void 0,f=void 0,h=void 0,d=void 0,D=void 0,g=o.length,m=-1,y=1,v=0,unclosed=function(t,r){if(!e.safe)throw e.error(\"Unclosed \"+t,y,v-m,v);s=(o+=r).length-1};for(;v0?(f=y+c,h=s-a[c].length):(f=y,h=m),t.push([\"comment\",l,y,v-m,f,s-h,v]),m=h,y=f,v=s):(n.lastIndex=v+1,n.test(o),s=0===n.lastIndex?o.length-1:n.lastIndex-2,t.push([\"word\",o.slice(v,s+1),y,v-m,y,s-m,v]),v=s)}v++}return t};var r=/[ \\n\\t\\r\\{\\(\\)'\"\\\\;/]/g,n=/[ \\n\\t\\r\\(\\)\\*:;@!&'\"\\+\\|~>,\\[\\]\\\\]|\\/(?=\\*)/g;e.exports=t.default},5294:(e,t,r)=>{\"use strict\";const n=r(4196);class AtWord extends n{constructor(e){super(e),this.type=\"atword\"}toString(){this.quoted&&this.raws.quote;return[this.raws.before,\"@\",String.prototype.toString.call(this.value),this.raws.after].join(\"\")}}n.registerWalker(AtWord),e.exports=AtWord},8709:(e,t,r)=>{\"use strict\";const n=r(4196),o=r(1466);class Colon extends o{constructor(e){super(e),this.type=\"colon\"}}n.registerWalker(Colon),e.exports=Colon},3627:(e,t,r)=>{\"use strict\";const n=r(4196),o=r(1466);class Comma extends o{constructor(e){super(e),this.type=\"comma\"}}n.registerWalker(Comma),e.exports=Comma},4384:(e,t,r)=>{\"use strict\";const n=r(4196),o=r(1466);class Comment extends o{constructor(e){super(e),this.type=\"comment\",this.inline=Object(e).inline||!1}toString(){return[this.raws.before,this.inline?\"//\":\"/*\",String(this.value),this.inline?\"\":\"*/\",this.raws.after].join(\"\")}}n.registerWalker(Comment),e.exports=Comment},4196:(e,t,r)=>{\"use strict\";const n=r(1466);class Container extends n{constructor(e){super(e),this.nodes||(this.nodes=[])}push(e){return e.parent=this,this.nodes.push(e),this}each(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t,r,n=this.lastEach;if(this.indexes[n]=0,this.nodes){for(;this.indexes[n]{let n=e(t,r);return!1!==n&&t.walk&&(n=t.walk(e)),n}))}walkType(e,t){if(!e||!t)throw new Error(\"Parameters {type} and {callback} are required.\");const r=\"function\"==typeof e;return this.walk(((n,o)=>{if(r&&n instanceof e||!r&&n.type===e)return t.call(this,n,o)}))}append(e){return e.parent=this,this.nodes.push(e),this}prepend(e){return e.parent=this,this.nodes.unshift(e),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}insertAfter(e,t){let r,n=this.index(e);this.nodes.splice(n+1,0,t);for(let e in this.indexes)r=this.indexes[e],n<=r&&(this.indexes[e]=r+this.nodes.length);return this}insertBefore(e,t){let r,n=this.index(e);this.nodes.splice(n,0,t);for(let e in this.indexes)r=this.indexes[e],n<=r&&(this.indexes[e]=r+this.nodes.length);return this}removeChild(e){let t;e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this}removeAll(){for(let e of this.nodes)e.parent=void 0;return this.nodes=[],this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return\"number\"==typeof e?e:this.nodes.indexOf(e)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join(\"\");return this.value&&(e=this.value+e),this.raws.before&&(e=this.raws.before+e),this.raws.after&&(e+=this.raws.after),e}}Container.registerWalker=e=>{let t=\"walk\"+e.name;t.lastIndexOf(\"s\")!==t.length-1&&(t+=\"s\"),Container.prototype[t]||(Container.prototype[t]=function(t){return this.walkType(e,t)})},e.exports=Container},9645:e=>{\"use strict\";class ParserError extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||\"An error ocurred while parsing.\",\"function\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}}e.exports=ParserError},5128:e=>{\"use strict\";class TokenizeError extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||\"An error ocurred while tokzenizing.\",\"function\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}}e.exports=TokenizeError},4320:(e,t,r)=>{\"use strict\";const n=r(4196);class FunctionNode extends n{constructor(e){super(e),this.type=\"func\",this.unbalanced=-1}}n.registerWalker(FunctionNode),e.exports=FunctionNode},9962:(e,t,r)=>{\"use strict\";const n=r(3784),o=r(5294),i=r(8709),s=r(3627),u=r(4384),a=r(4320),c=r(3074),l=r(7214),p=r(1238),f=r(9672),h=r(1369),d=r(2057),D=r(6593);let parser=function(e,t){return new n(e,t)};parser.atword=function(e){return new o(e)},parser.colon=function(e){return new i(Object.assign({value:\":\"},e))},parser.comma=function(e){return new s(Object.assign({value:\",\"},e))},parser.comment=function(e){return new u(e)},parser.func=function(e){return new a(e)},parser.number=function(e){return new c(e)},parser.operator=function(e){return new l(e)},parser.paren=function(e){return new p(Object.assign({value:\"(\"},e))},parser.string=function(e){return new f(Object.assign({quote:\"'\"},e))},parser.value=function(e){return new d(e)},parser.word=function(e){return new D(e)},parser.unicodeRange=function(e){return new h(e)},e.exports=parser},1466:e=>{\"use strict\";let cloneNode=function(e,t){let r=new e.constructor;for(let n in e){if(!e.hasOwnProperty(n))continue;let o=e[n],i=typeof o;\"parent\"===n&&\"object\"===i?t&&(r[n]=t):\"source\"===n?r[n]=o:o instanceof Array?r[n]=o.map((e=>cloneNode(e,r))):\"before\"!==n&&\"after\"!==n&&\"between\"!==n&&\"semicolon\"!==n&&(\"object\"===i&&null!==o&&(o=cloneNode(o)),r[n]=o)}return r};e.exports=class{constructor(e){e=e||{},this.raws={before:\"\",after:\"\"};for(let t in e)this[t]=e[t]}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(){return[this.raws.before,String(this.value),this.raws.after].join(\"\")}clone(e){e=e||{};let t=cloneNode(this);for(let r in e)t[r]=e[r];return t}cloneBefore(e){e=e||{};let t=this.clone(e);return this.parent.insertBefore(this,t),t}cloneAfter(e){e=e||{};let t=this.clone(e);return this.parent.insertAfter(this,t),t}replaceWith(){let e=Array.prototype.slice.call(arguments);if(this.parent){for(let t of e)this.parent.insertBefore(this,t);this.remove()}return this}moveTo(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.append(this),this}moveBefore(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.parent.insertBefore(e,this),this}moveAfter(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.parent.insertAfter(e,this),this}next(){let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){let e=this.parent.index(this);return this.parent.nodes[e-1]}toJSON(){let e={};for(let t in this){if(!this.hasOwnProperty(t))continue;if(\"parent\"===t)continue;let r=this[t];r instanceof Array?e[t]=r.map((e=>\"object\"==typeof e&&e.toJSON?e.toJSON():e)):\"object\"==typeof r&&r.toJSON?e[t]=r.toJSON():e[t]=r}return e}root(){let e=this;for(;e.parent;)e=e.parent;return e}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}positionInside(e){let t=this.toString(),r=this.source.start.column,n=this.source.start.line;for(let o=0;o{\"use strict\";const n=r(4196),o=r(1466);class NumberNode extends o{constructor(e){super(e),this.type=\"number\",this.unit=Object(e).unit||\"\"}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join(\"\")}}n.registerWalker(NumberNode),e.exports=NumberNode},7214:(e,t,r)=>{\"use strict\";const n=r(4196),o=r(1466);class Operator extends o{constructor(e){super(e),this.type=\"operator\"}}n.registerWalker(Operator),e.exports=Operator},1238:(e,t,r)=>{\"use strict\";const n=r(4196),o=r(1466);class Parenthesis extends o{constructor(e){super(e),this.type=\"paren\",this.parenType=\"\"}}n.registerWalker(Parenthesis),e.exports=Parenthesis},3784:(e,t,r)=>{\"use strict\";const n=r(4343),o=r(2057),i=r(5294),s=r(8709),u=r(3627),a=r(4384),c=r(4320),l=r(3074),p=r(7214),f=r(1238),h=r(9672),d=r(6593),D=r(1369),g=r(2481),m=r(8051),y=r(7886),v=r(3210),C=r(9645);e.exports=class{constructor(e,t){this.cache=[],this.input=e,this.options=Object.assign({},{loose:!1},t),this.position=0,this.unbalanced=0,this.root=new n;let r=new o;this.root.append(r),this.current=r,this.tokens=g(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new s({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comma(){let e=this.currToken;this.newNode(new u({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comment(){let e,t=!1,r=this.currToken[1].replace(/\\/\\*|\\*\\//g,\"\");this.options.loose&&r.startsWith(\"//\")&&(r=r.substring(2),t=!0),e=new a({value:r,inline:t,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(e),this.position++}error(e,t){throw new C(e+\" at line: \".concat(t[2],\", column \").concat(t[3]))}loop(){for(;this.position0&&(\"func\"===this.current.type&&\"calc\"===this.current.value?(\"space\"!==this.prevToken[0]&&\"(\"!==this.prevToken[0]||\"space\"!==this.nextToken[0]&&\"word\"!==this.nextToken[0]||\"word\"===this.nextToken[0]&&\"operator\"!==this.current.last.type&&\"(\"!==this.current.last.value)&&this.error(\"Syntax Error\",this.currToken):\"space\"!==this.nextToken[0]&&\"operator\"!==this.nextToken[0]&&\"operator\"!==this.prevToken[0]||this.error(\"Syntax Error\",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&\"operator\"===this.current.last.type)&&\"word\"===this.nextToken[0])return this.word()}else if(\"word\"===this.nextToken[0])return this.word();return e=new p({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(e)}parseTokens(){switch(this.currToken[0]){case\"space\":this.space();break;case\"colon\":this.colon();break;case\"comma\":this.comma();break;case\"comment\":this.comment();break;case\"(\":this.parenOpen();break;case\")\":this.parenClose();break;case\"atword\":case\"word\":this.word();break;case\"operator\":this.operator();break;case\"string\":this.string();break;case\"unicoderange\":this.unicodeRange();break;default:this.word()}}parenOpen(){let e,t=1,r=this.position+1,n=this.currToken;for(;r=this.tokens.length-1&&!this.current.unbalanced||(this.current.unbalanced--,this.current.unbalanced<0&&this.error(\"Expected opening parenthesis\",e),!this.current.unbalanced&&this.cache.length&&(this.current=this.cache.pop()))}space(){let e=this.currToken;this.position===this.tokens.length-1||\",\"===this.nextToken[0]||\")\"===this.nextToken[0]?(this.current.last.raws.after+=e[1],this.position++):(this.spaces=e[1],this.position++)}unicodeRange(){let e=this.currToken;this.newNode(new D({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}splitWord(){let e,t,r=this.nextToken,n=this.currToken[1],o=/^[\\+\\-]?((\\d+(\\.\\d*)?)|(\\.\\d+))([eE][\\+\\-]?\\d+)?/;if(!/^(?!\\#([a-z0-9]+))[\\#\\{\\}]/gi.test(n))for(;r&&\"word\"===r[0];){this.position++;let e=this.currToken[1];n+=e,r=this.nextToken}var s;e=y(n,\"@\"),s=v(m([[0],e])),t=s.sort(((e,t)=>e-t)),t.forEach(((s,u)=>{let a,p=t[u+1]||n.length,f=n.slice(s,p);if(~e.indexOf(s))a=new i({value:f.slice(1),source:{start:{line:this.currToken[2],column:this.currToken[3]+s},end:{line:this.currToken[4],column:this.currToken[3]+(p-1)}},sourceIndex:this.currToken[6]+t[u]});else if(o.test(this.currToken[1])){let e=f.replace(o,\"\");a=new l({value:f.replace(e,\"\"),source:{start:{line:this.currToken[2],column:this.currToken[3]+s},end:{line:this.currToken[4],column:this.currToken[3]+(p-1)}},sourceIndex:this.currToken[6]+t[u],unit:e})}else a=new(r&&\"(\"===r[0]?c:d)({value:f,source:{start:{line:this.currToken[2],column:this.currToken[3]+s},end:{line:this.currToken[4],column:this.currToken[3]+(p-1)}},sourceIndex:this.currToken[6]+t[u]}),\"Word\"===a.constructor.name?(a.isHex=/^#(.+)/.test(f),a.isColor=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(f)):this.cache.push(this.current);this.newNode(a)})),this.position++}string(){let e,t=this.currToken,r=this.currToken[1],n=/^(\\\"|\\')/,o=n.test(r),i=\"\";o&&(i=r.match(n)[0],r=r.slice(1,r.length-1)),e=new h({value:r,source:{start:{line:t[2],column:t[3]},end:{line:t[4],column:t[5]}},sourceIndex:t[6],quoted:o}),e.raws.quote=i,this.newNode(e),this.position++}word(){return this.splitWord()}newNode(e){return this.spaces&&(e.raws.before+=this.spaces,this.spaces=\"\"),this.current.append(e)}get currToken(){return this.tokens[this.position]}get nextToken(){return this.tokens[this.position+1]}get prevToken(){return this.tokens[this.position-1]}}},4343:(e,t,r)=>{\"use strict\";const n=r(4196);e.exports=class extends n{constructor(e){super(e),this.type=\"root\"}}},9672:(e,t,r)=>{\"use strict\";const n=r(4196),o=r(1466);class StringNode extends o{constructor(e){super(e),this.type=\"string\"}toString(){let e=this.quoted?this.raws.quote:\"\";return[this.raws.before,e,this.value+\"\",e,this.raws.after].join(\"\")}}n.registerWalker(StringNode),e.exports=StringNode},2481:(e,t,r)=>{\"use strict\";const n=\"{\".charCodeAt(0),o=\"}\".charCodeAt(0),i=\"(\".charCodeAt(0),s=\")\".charCodeAt(0),u=\"'\".charCodeAt(0),a='\"'.charCodeAt(0),c=\"\\\\\".charCodeAt(0),l=\"/\".charCodeAt(0),p=\".\".charCodeAt(0),f=\",\".charCodeAt(0),h=\":\".charCodeAt(0),d=\"*\".charCodeAt(0),D=\"-\".charCodeAt(0),g=\"+\".charCodeAt(0),m=\"#\".charCodeAt(0),y=\"\\n\".charCodeAt(0),v=\" \".charCodeAt(0),C=\"\\f\".charCodeAt(0),w=\"\\t\".charCodeAt(0),b=\"\\r\".charCodeAt(0),E=\"@\".charCodeAt(0),_=\"e\".charCodeAt(0),k=\"E\".charCodeAt(0),S=\"0\".charCodeAt(0),A=\"9\".charCodeAt(0),F=\"u\".charCodeAt(0),x=\"U\".charCodeAt(0),O=/[ \\n\\t\\r\\{\\(\\)'\"\\\\;,/]/g,N=/[ \\n\\t\\r\\(\\)\\{\\}\\*:;@!&'\"\\+\\|~>,\\[\\]\\\\]|\\/(?=\\*)/g,T=/[ \\n\\t\\r\\(\\)\\{\\}\\*:;@!&'\"\\-\\+\\|~>,\\[\\]\\\\]|\\//g,I=/^[a-z0-9]/i,R=/^[a-f0-9?\\-]/i,M=r(1758),P=r(5128);e.exports=function(e,t){t=t||{};let r,L,B,j,q,G,U,W,$,z,V,H=[],X=e.valueOf(),J=X.length,K=-1,Q=1,Y=0,Z=0,ee=null;function unclosed(e){let t=M.format(\"Unclosed %s at line: %d, column: %d, token: %d\",e,Q,Y-K,Y);throw new P(t)}for(;Y0&&\"word\"===H[H.length-1][0]&&\"url\"===H[H.length-1][1],H.push([\"(\",\"(\",Q,Y-K,Q,L-K,Y]);break;case s:Z--,ee=ee&&Z>0,H.push([\")\",\")\",Q,Y-K,Q,L-K,Y]);break;case u:case a:B=r===u?\"'\":'\"',L=Y;do{for($=!1,L=X.indexOf(B,L+1),-1===L&&unclosed(\"quote\"),z=L;X.charCodeAt(z-1)===c;)z-=1,$=!$}while($);H.push([\"string\",X.slice(Y,L+1),Q,Y-K,Q,L-K,Y]),Y=L;break;case E:O.lastIndex=Y+1,O.test(X),L=0===O.lastIndex?X.length-1:O.lastIndex-2,H.push([\"atword\",X.slice(Y,L+1),Q,Y-K,Q,L-K,Y]),Y=L;break;case c:L=Y,r=X.charCodeAt(L+1),H.push([\"word\",X.slice(Y,L+1),Q,Y-K,Q,L-K,Y]),Y=L;break;case g:case D:case d:L=Y+1,V=X.slice(Y+1,L+1);X.slice(Y-1,Y);if(r===D&&V.charCodeAt(0)===D){L++,H.push([\"word\",X.slice(Y,L),Q,Y-K,Q,L-K,Y]),Y=L-1;break}H.push([\"operator\",X.slice(Y,L),Q,Y-K,Q,L-K,Y]),Y=L-1;break;default:if(r===l&&(X.charCodeAt(Y+1)===d||t.loose&&!ee&&X.charCodeAt(Y+1)===l)){if(X.charCodeAt(Y+1)===d)L=X.indexOf(\"*/\",Y+2)+1,0===L&&unclosed(\"comment\");else{const e=X.indexOf(\"\\n\",Y+2);L=-1!==e?e-1:J}G=X.slice(Y,L+1),j=G.split(\"\\n\"),q=j.length-1,q>0?(U=Q+q,W=L-j[q].length):(U=Q,W=K),H.push([\"comment\",G,Q,Y-K,U,L-W,Y]),K=W,Q=U,Y=L}else if(r!==m||I.test(X.slice(Y+1,Y+2)))if(r!==F&&r!==x||X.charCodeAt(Y+1)!==g)if(r===l)L=Y+1,H.push([\"operator\",X.slice(Y,L),Q,Y-K,Q,L-K,Y]),Y=L-1;else{let e=N;if(r>=S&&r<=A&&(e=T),e.lastIndex=Y+1,e.test(X),L=0===e.lastIndex?X.length-1:e.lastIndex-2,e===T||r===p){let e=X.charCodeAt(L),t=X.charCodeAt(L+1),r=X.charCodeAt(L+2);(e===_||e===k)&&(t===D||t===g)&&r>=S&&r<=A&&(T.lastIndex=L+2,T.test(X),L=0===T.lastIndex?X.length-1:T.lastIndex-2)}H.push([\"word\",X.slice(Y,L+1),Q,Y-K,Q,L-K,Y]),Y=L}else{L=Y+2;do{L+=1,r=X.charCodeAt(L)}while(L{\"use strict\";const n=r(4196),o=r(1466);class UnicodeRange extends o{constructor(e){super(e),this.type=\"unicode-range\"}}n.registerWalker(UnicodeRange),e.exports=UnicodeRange},2057:(e,t,r)=>{\"use strict\";const n=r(4196);e.exports=class extends n{constructor(e){super(e),this.type=\"value\",this.unbalanced=0}}},6593:(e,t,r)=>{\"use strict\";const n=r(4196),o=r(1466);class Word extends o{constructor(e){super(e),this.type=\"word\"}}n.registerWalker(Word),e.exports=Word},8940:(e,t,r)=>{\"use strict\";var n;t.__esModule=!0,t.default=void 0;var o=function(e){var t,r;function AtRule(t){var r;return(r=e.call(this,t)||this).type=\"atrule\",r}r=e,(t=AtRule).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var n=AtRule.prototype;return n.append=function(){var t;this.nodes||(this.nodes=[]);for(var r=arguments.length,n=new Array(r),o=0;o{\"use strict\";var n;t.__esModule=!0,t.default=void 0;var o=function(e){var t,r;function Comment(t){var r;return(r=e.call(this,t)||this).type=\"comment\",r}return r=e,(t=Comment).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,Comment}(((n=r(1714))&&n.__esModule?n:{default:n}).default);t.default=o,e.exports=t.default},1204:(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n=_interopRequireDefault(r(6417)),o=_interopRequireDefault(r(3102));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _createForOfIteratorHelperLoose(e,t){var r;if(\"undefined\"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if(\"string\"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);\"Object\"===r&&e.constructor&&(r=e.constructor.name);if(\"Map\"===r||\"Set\"===r)return Array.from(e);if(\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(e,t)}(e))||t&&e&&\"number\"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}return(r=e[Symbol.iterator]()).next.bind(r)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e&&(this.indexes[r]=t-1);return this},c.removeAll=function(){for(var e,t=_createForOfIteratorHelperLoose(this.nodes);!(e=t()).done;){e.value.parent=void 0}return this.nodes=[],this},c.replaceValues=function(e,t,r){return r||(r=t,t={}),this.walkDecls((function(n){t.props&&-1===t.props.indexOf(n.prop)||t.fast&&-1===n.value.indexOf(t.fast)||(n.value=n.value.replace(e,r))})),this},c.every=function(e){return this.nodes.every(e)},c.some=function(e){return this.nodes.some(e)},c.index=function(e){return\"number\"==typeof e?e:this.nodes.indexOf(e)},c.normalize=function(e,t){var i=this;if(\"string\"==typeof e)e=cleanSource(r(7057)(e).nodes);else if(Array.isArray(e))for(var s,u=_createForOfIteratorHelperLoose(e=e.slice(0));!(s=u()).done;){var a=s.value;a.parent&&a.parent.removeChild(a,\"ignore\")}else if(\"root\"===e.type)for(var c,l=_createForOfIteratorHelperLoose(e=e.nodes.slice(0));!(c=l()).done;){var p=c.value;p.parent&&p.parent.removeChild(p,\"ignore\")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error(\"Value field is missed in node creation\");\"string\"!=typeof e.value&&(e.value=String(e.value)),e=[new n.default(e)]}else if(e.selector){e=[new(r(6621))(e)]}else if(e.name){e=[new(r(8940))(e)]}else{if(!e.text)throw new Error(\"Unknown node type in node creation\");e=[new o.default(e)]}return e.map((function(e){return e.parent&&e.parent.removeChild(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/[^\\s]/g,\"\")),e.parent=i,e}))},s=Container,(u=[{key:\"first\",get:function(){if(this.nodes)return this.nodes[0]}},{key:\"last\",get:function(){if(this.nodes)return this.nodes[this.nodes.length-1]}}])&&_defineProperties(s.prototype,u),a&&_defineProperties(s,a),Container}(_interopRequireDefault(r(1714)).default);t.default=i,e.exports=t.default},1667:(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n=_interopRequireDefault(r(825)),o=_interopRequireDefault(r(7027)),i=_interopRequireDefault(r(5208));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _wrapNativeSuper(e){var t=\"function\"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf(\"[native code]\")))return e;var r;if(\"function\"!=typeof e)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,Wrapper)}function Wrapper(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,e)})(e)}function _construct(e,t,r){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&_setPrototypeOf(o,r.prototype),o}).apply(null,arguments)}function _isNativeReflectConstruct(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s=function(e){var t,r;function CssSyntaxError(t,r,n,o,i,s){var u;return(u=e.call(this,t)||this).name=\"CssSyntaxError\",u.reason=t,i&&(u.file=i),o&&(u.source=o),s&&(u.plugin=s),void 0!==r&&void 0!==n&&(u.line=r,u.column=n),u.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(function(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}(u),CssSyntaxError),u}r=e,(t=CssSyntaxError).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var s=CssSyntaxError.prototype;return s.setMessage=function(){this.message=this.plugin?this.plugin+\": \":\"\",this.message+=this.file?this.file:\"\",void 0!==this.line&&(this.message+=\":\"+this.line+\":\"+this.column),this.message+=\": \"+this.reason},s.showSourceCode=function(e){var t=this;if(!this.source)return\"\";var r=this.source;i.default&&(void 0===e&&(e=n.default.stdout),e&&(r=(0,i.default)(r)));var s=r.split(/\\r?\\n/),u=Math.max(this.line-3,0),a=Math.min(this.line+2,s.length),c=String(a).length;function mark(t){return e&&o.default.red?o.default.red.bold(t):t}function aside(t){return e&&o.default.gray?o.default.gray(t):t}return s.slice(u,a).map((function(e,r){var n=u+1+r,o=\" \"+(\" \"+n).slice(-c)+\" | \";if(n===t.line){var i=aside(o.replace(/\\d/g,\" \"))+e.slice(0,t.column-1).replace(/[^\\t]/g,\" \");return mark(\">\")+aside(o)+e+\"\\n \"+i+mark(\"^\")}return\" \"+aside(o)+e})).join(\"\\n\")},s.toString=function(){var e=this.showSourceCode();return e&&(e=\"\\n\\n\"+e+\"\\n\"),this.name+\": \"+this.message+e},CssSyntaxError}(_wrapNativeSuper(Error));t.default=s,e.exports=t.default},6417:(e,t,r)=>{\"use strict\";var n;t.__esModule=!0,t.default=void 0;var o=function(e){var t,r;function Declaration(t){var r;return(r=e.call(this,t)||this).type=\"decl\",r}return r=e,(t=Declaration).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,Declaration}(((n=r(1714))&&n.__esModule?n:{default:n}).default);t.default=o,e.exports=t.default},2993:(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n=_interopRequireDefault(r(6391)),o=_interopRequireDefault(r(1667)),i=_interopRequireDefault(r(3353));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r\"),this.map&&(this.map.file=this.from)}var e,t,r,u=Input.prototype;return u.error=function(e,t,r,n){var i;void 0===n&&(n={});var s=this.origin(t,r);return(i=s?new o.default(e,s.line,s.column,s.source,s.file,n.plugin):new o.default(e,t,r,this.css,this.file,n.plugin)).input={line:t,column:r,source:this.css},this.file&&(i.input.file=this.file),i},u.origin=function(e,t){if(!this.map)return!1;var r=this.map.consumer(),n=r.originalPositionFor({line:e,column:t});if(!n.source)return!1;var o={file:this.mapResolve(n.source),line:n.line,column:n.column},i=r.sourceContentFor(n.source);return i&&(o.source=i),o},u.mapResolve=function(e){return/^\\w+:\\/\\//.test(e)?e:n.default.resolve(this.map.consumer().sourceRoot||\".\",e)},e=Input,(t=[{key:\"from\",get:function(){return this.file||this.id}}])&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Input}();t.default=u,e.exports=t.default},6992:(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n=_interopRequireDefault(r(8991)),o=_interopRequireDefault(r(6157)),i=(_interopRequireDefault(r(6574)),_interopRequireDefault(r(6865))),s=_interopRequireDefault(r(7057));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _createForOfIteratorHelperLoose(e,t){var r;if(\"undefined\"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if(\"string\"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);\"Object\"===r&&e.constructor&&(r=e.constructor.name);if(\"Map\"===r||\"Set\"===r)return Array.from(e);if(\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(e,t)}(e))||t&&e&&\"number\"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}return(r=e[Symbol.iterator]()).next.bind(r)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=this.processor.plugins.length)return this.processed=!0,e();try{var n=this.processor.plugins[this.plugin],o=this.run(n);this.plugin+=1,isPromise(o)?o.then((function(){r.asyncTick(e,t)})).catch((function(e){r.handleError(e,n),r.processed=!0,t(e)})):this.asyncTick(e,t)}catch(e){this.processed=!0,t(e)}},u.async=function(){var e=this;return this.processed?new Promise((function(t,r){e.error?r(e.error):t(e.stringify())})):(this.processing||(this.processing=new Promise((function(t,r){if(e.error)return r(e.error);e.plugin=0,e.asyncTick(t,r)})).then((function(){return e.processed=!0,e.stringify()}))),this.processing)},u.sync=function(){if(this.processed)return this.result;if(this.processed=!0,this.processing)throw new Error(\"Use process(css).then(cb) to work with async plugins\");if(this.error)throw this.error;for(var e,t=_createForOfIteratorHelperLoose(this.result.processor.plugins);!(e=t()).done;){var r=e.value;if(isPromise(this.run(r)))throw new Error(\"Use process(css).then(cb) to work with async plugins\")}return this.result},u.run=function(e){this.result.lastPlugin=e;try{return e(this.result.root,this.result)}catch(t){throw this.handleError(t,e),t}},u.stringify=function(){if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=o.default;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var r=new n.default(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result},e=LazyResult,(t=[{key:\"processor\",get:function(){return this.result.processor}},{key:\"opts\",get:function(){return this.result.opts}},{key:\"css\",get:function(){return this.stringify().css}},{key:\"content\",get:function(){return this.stringify().content}},{key:\"map\",get:function(){return this.stringify().map}},{key:\"root\",get:function(){return this.sync().root}},{key:\"messages\",get:function(){return this.sync().messages}}])&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),LazyResult}();t.default=u,e.exports=t.default},6136:(e,t)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var r={split:function(e,t,r){for(var n=[],o=\"\",i=!1,s=0,u=!1,a=!1,c=0;c0&&(s-=1):0===s&&-1!==t.indexOf(l)&&(i=!0),i?(\"\"!==o&&n.push(o.trim()),o=\"\",i=!1):o+=l}return(r||\"\"!==o)&&n.push(o.trim()),n},space:function(e){return r.split(e,[\" \",\"\\n\",\"\\t\"])},comma:function(e){return r.split(e,[\",\"],!0)}},n=r;t.default=n,e.exports=t.default},8991:(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n=_interopRequireDefault(r(2447)),o=_interopRequireDefault(r(6391));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _createForOfIteratorHelperLoose(e,t){var r;if(\"undefined\"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if(\"string\"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);\"Object\"===r&&e.constructor&&(r=e.constructor.name);if(\"Map\"===r||\"Set\"===r)return Array.from(e);if(\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(e,t)}(e))||t&&e&&\"number\"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}return(r=e[Symbol.iterator]()).next.bind(r)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0},e.previous=function(){var e=this;return this.previousMaps||(this.previousMaps=[],this.root.walk((function(t){if(t.source&&t.source.input.map){var r=t.source.input.map;-1===e.previousMaps.indexOf(r)&&e.previousMaps.push(r)}}))),this.previousMaps},e.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((function(e){return e.inline})))},e.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((function(e){return e.withContent()}))},e.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)for(var e,t=this.root.nodes.length-1;t>=0;t--)\"comment\"===(e=this.root.nodes[t]).type&&0===e.text.indexOf(\"# sourceMappingURL=\")&&this.root.removeChild(t)},e.setSourcesContent=function(){var e=this,t={};this.root.walk((function(r){if(r.source){var n=r.source.input.from;if(n&&!t[n]){t[n]=!0;var o=e.relative(n);e.map.setSourceContent(o,r.source.input.css)}}}))},e.applyPrevMaps=function(){for(var e,t=_createForOfIteratorHelperLoose(this.previous());!(e=t()).done;){var r=e.value,i=this.relative(r.file),s=r.root||o.default.dirname(r.file),u=void 0;!1===this.mapOpts.sourcesContent?(u=new n.default.SourceMapConsumer(r.text)).sourcesContent&&(u.sourcesContent=u.sourcesContent.map((function(){return null}))):u=r.consumer(),this.map.applySourceMap(u,i,this.relative(s))}},e.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((function(e){return e.annotation})))},e.toBase64=function(e){return Buffer?Buffer.from(e).toString(\"base64\"):window.btoa(unescape(encodeURIComponent(e)))},e.addAnnotation=function(){var e;e=this.isInline()?\"data:application/json;base64,\"+this.toBase64(this.map.toString()):\"string\"==typeof this.mapOpts.annotation?this.mapOpts.annotation:this.outputFile()+\".map\";var t=\"\\n\";-1!==this.css.indexOf(\"\\r\\n\")&&(t=\"\\r\\n\"),this.css+=t+\"/*# sourceMappingURL=\"+e+\" */\"},e.outputFile=function(){return this.opts.to?this.relative(this.opts.to):this.opts.from?this.relative(this.opts.from):\"to.css\"},e.generateMap=function(){return this.generateString(),this.isSourcesContent()&&this.setSourcesContent(),this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},e.relative=function(e){if(0===e.indexOf(\"<\"))return e;if(/^\\w+:\\/\\//.test(e))return e;var t=this.opts.to?o.default.dirname(this.opts.to):\".\";return\"string\"==typeof this.mapOpts.annotation&&(t=o.default.dirname(o.default.resolve(t,this.mapOpts.annotation))),e=o.default.relative(t,e),\"\\\\\"===o.default.sep?e.replace(/\\\\/g,\"/\"):e},e.sourcePath=function(e){return this.mapOpts.from?this.mapOpts.from:this.relative(e.source.input.from)},e.generateString=function(){var e=this;this.css=\"\",this.map=new n.default.SourceMapGenerator({file:this.outputFile()});var t,r,o=1,i=1;this.stringify(this.root,(function(n,s,u){if(e.css+=n,s&&\"end\"!==u&&(s.source&&s.source.start?e.map.addMapping({source:e.sourcePath(s),generated:{line:o,column:i-1},original:{line:s.source.start.line,column:s.source.start.column-1}}):e.map.addMapping({source:\"\",original:{line:1,column:0},generated:{line:o,column:i-1}})),(t=n.match(/\\n/g))?(o+=t.length,r=n.lastIndexOf(\"\\n\"),i=n.length-r):i+=n.length,s&&\"start\"!==u){var a=s.parent||{raws:{}};(\"decl\"!==s.type||s!==a.last||a.raws.semicolon)&&(s.source&&s.source.end?e.map.addMapping({source:e.sourcePath(s),generated:{line:o,column:i-2},original:{line:s.source.end.line,column:s.source.end.column-1}}):e.map.addMapping({source:\"\",original:{line:1,column:0},generated:{line:o,column:i-1}}))}}))},e.generate=function(){if(this.clearAnnotation(),this.isMap())return this.generateMap();var e=\"\";return this.stringify(this.root,(function(t){e+=t})),[e]},MapGenerator}();t.default=i,e.exports=t.default},1714:(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n=_interopRequireDefault(r(1667)),o=_interopRequireDefault(r(5701)),i=_interopRequireDefault(r(6157));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cloneNode(e,t){var r=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n],i=typeof o;\"parent\"===n&&\"object\"===i?t&&(r[n]=t):\"source\"===n?r[n]=o:o instanceof Array?r[n]=o.map((function(e){return cloneNode(e,r)})):(\"object\"===i&&null!==o&&(o=cloneNode(o)),r[n]=o)}return r}var s=function(){function Node(e){for(var t in void 0===e&&(e={}),this.raws={},e)this[t]=e[t]}var e=Node.prototype;return e.error=function(e,t){if(void 0===t&&(t={}),this.source){var r=this.positionBy(t);return this.source.input.error(e,r.line,r.column,t)}return new n.default(e)},e.warn=function(e,t,r){var n={node:this};for(var o in r)n[o]=r[o];return e.warn(t,n)},e.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.toString=function(e){void 0===e&&(e=i.default),e.stringify&&(e=e.stringify);var t=\"\";return e(this,(function(e){t+=e})),t},e.clone=function(e){void 0===e&&(e={});var t=cloneNode(this);for(var r in e)t[r]=e[r];return t},e.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},e.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},e.replaceWith=function(){if(this.parent){for(var e=arguments.length,t=new Array(e),r=0;r{\"use strict\";t.__esModule=!0,t.default=void 0;var n=_interopRequireDefault(r(7116)),o=_interopRequireDefault(r(2993));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=function(e,t){var r=new o.default(e,t),i=new n.default(r);try{i.parse()}catch(e){throw e}return i.root};t.default=_default,e.exports=t.default},7116:(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n=_interopRequireDefault(r(6417)),o=_interopRequireDefault(r(1157)),i=_interopRequireDefault(r(3102)),s=_interopRequireDefault(r(8940)),u=_interopRequireDefault(r(7563)),a=_interopRequireDefault(r(6621));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var c=function(){function Parser(e){this.input=e,this.root=new u.default,this.current=this.root,this.spaces=\"\",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{line:1,column:1}}}var e=Parser.prototype;return e.createTokenizer=function(){this.tokenizer=(0,o.default)(this.input)},e.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case\"space\":this.spaces+=e[1];break;case\";\":this.freeSemicolon(e);break;case\"}\":this.end(e);break;case\"comment\":this.comment(e);break;case\"at-word\":this.atrule(e);break;case\"{\":this.emptyRule(e);break;default:this.other(e)}this.endFile()},e.comment=function(e){var t=new i.default;this.init(t,e[2],e[3]),t.source.end={line:e[4],column:e[5]};var r=e[1].slice(2,-2);if(/^\\s*$/.test(r))t.text=\"\",t.raws.left=r,t.raws.right=\"\";else{var n=r.match(/^(\\s*)([^]*[^\\s])(\\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3]}},e.emptyRule=function(e){var t=new a.default;this.init(t,e[2],e[3]),t.selector=\"\",t.raws.between=\"\",this.current=t},e.other=function(e){for(var t=!1,r=null,n=!1,o=null,i=[],s=[],u=e;u;){if(r=u[0],s.push(u),\"(\"===r||\"[\"===r)o||(o=u),i.push(\"(\"===r?\")\":\"]\");else if(0===i.length){if(\";\"===r){if(n)return void this.decl(s);break}if(\"{\"===r)return void this.rule(s);if(\"}\"===r){this.tokenizer.back(s.pop()),t=!0;break}\":\"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&n){for(;s.length&&(\"space\"===(u=s[s.length-1][0])||\"comment\"===u);)this.tokenizer.back(s.pop());this.decl(s)}else this.unknownWord(s)},e.rule=function(e){e.pop();var t=new a.default;this.init(t,e[0][2],e[0][3]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,\"selector\",e),this.current=t},e.decl=function(e){var t=new n.default;this.init(t);var r,o=e[e.length-1];for(\";\"===o[0]&&(this.semicolon=!0,e.pop()),o[4]?t.source.end={line:o[4],column:o[5]}:t.source.end={line:o[2],column:o[3]};\"word\"!==e[0][0];)1===e.length&&this.unknownWord(e),t.raws.before+=e.shift()[1];for(t.source.start={line:e[0][2],column:e[0][3]},t.prop=\"\";e.length;){var i=e[0][0];if(\":\"===i||\"space\"===i||\"comment\"===i)break;t.prop+=e.shift()[1]}for(t.raws.between=\"\";e.length;){if(\":\"===(r=e.shift())[0]){t.raws.between+=r[1];break}\"word\"===r[0]&&/\\w/.test(r[1])&&this.unknownWord([r]),t.raws.between+=r[1]}\"_\"!==t.prop[0]&&\"*\"!==t.prop[0]||(t.raws.before+=t.prop[0],t.prop=t.prop.slice(1)),t.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(var s=e.length-1;s>0;s--){if(\"!important\"===(r=e[s])[1].toLowerCase()){t.important=!0;var u=this.stringFrom(e,s);\" !important\"!==(u=this.spacesFromEnd(e)+u)&&(t.raws.important=u);break}if(\"important\"===r[1].toLowerCase()){for(var a=e.slice(0),c=\"\",l=s;l>0;l--){var p=a[l][0];if(0===c.trim().indexOf(\"!\")&&\"space\"!==p)break;c=a.pop()[1]+c}0===c.trim().indexOf(\"!\")&&(t.important=!0,t.raws.important=c,e=a)}if(\"space\"!==r[0]&&\"comment\"!==r[0])break}this.raw(t,\"value\",e),-1!==t.value.indexOf(\":\")&&this.checkMissedSemicolon(e)},e.atrule=function(e){var t,r,n=new s.default;n.name=e[1].slice(1),\"\"===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2],e[3]);for(var o=!1,i=!1,u=[];!this.tokenizer.endOfFile();){if(\";\"===(e=this.tokenizer.nextToken())[0]){n.source.end={line:e[2],column:e[3]},this.semicolon=!0;break}if(\"{\"===e[0]){i=!0;break}if(\"}\"===e[0]){if(u.length>0){for(t=u[r=u.length-1];t&&\"space\"===t[0];)t=u[--r];t&&(n.source.end={line:t[4],column:t[5]})}this.end(e);break}if(u.push(e),this.tokenizer.endOfFile()){o=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(n.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(n,\"params\",u),o&&(e=u[u.length-1],n.source.end={line:e[4],column:e[5]},this.spaces=n.raws.between,n.raws.between=\"\")):(n.raws.afterName=\"\",n.params=\"\"),i&&(n.nodes=[],this.current=n)},e.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||\"\")+this.spaces,this.spaces=\"\",this.current.parent?(this.current.source.end={line:e[2],column:e[3]},this.current=this.current.parent):this.unexpectedClose(e)},e.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||\"\")+this.spaces},e.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&\"rule\"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces=\"\")}},e.init=function(e,t,r){this.current.push(e),e.source={start:{line:t,column:r},input:this.input},e.raws.before=this.spaces,this.spaces=\"\",\"comment\"!==e.type&&(this.semicolon=!1)},e.raw=function(e,t,r){for(var n,o,i,s,u=r.length,a=\"\",c=!0,l=/^([.|#])?([\\w])+/i,p=0;p=0&&(\"space\"===(r=e[o])[0]||2!==(n+=1));o--);throw this.input.error(\"Missed semicolon\",r[2],r[3])}},Parser}();t.default=c,e.exports=t.default},3353:(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n=_interopRequireDefault(r(2447)),o=_interopRequireDefault(r(6391)),i=_interopRequireDefault(r(7545));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s=function(){function PreviousMap(e,t){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,\"data:\");var r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);n&&(this.text=n)}var e=PreviousMap.prototype;return e.consumer=function(){return this.consumerCache||(this.consumerCache=new n.default.SourceMapConsumer(this.text)),this.consumerCache},e.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},e.getAnnotationURL=function(e){return e.match(/\\/\\*\\s*# sourceMappingURL=(.*)\\s*\\*\\//)[1].trim()},e.loadAnnotation=function(e){var t=e.match(/\\/\\*\\s*# sourceMappingURL=(.*)\\s*\\*\\//gm);if(t&&t.length>0){var r=t[t.length-1];r&&(this.annotation=this.getAnnotationURL(r))}},e.decodeInline=function(e){var t,r=\"data:application/json,\";if(this.startWith(e,r))return decodeURIComponent(e.substr(r.length));if(/^data:application\\/json;charset=utf-?8;base64,/.test(e)||/^data:application\\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,\"base64\").toString():window.atob(t);var n=e.match(/data:application\\/json;([^,]+),/)[1];throw new Error(\"Unsupported source map encoding \"+n)},e.loadMap=function(e,t){if(!1===t)return!1;if(t){if(\"string\"==typeof t)return t;if(\"function\"==typeof t){var r=t(e);if(r&&i.default.existsSync&&i.default.existsSync(r))return i.default.readFileSync(r,\"utf-8\").toString().trim();throw new Error(\"Unable to load previous source map: \"+r.toString())}if(t instanceof n.default.SourceMapConsumer)return n.default.SourceMapGenerator.fromSourceMap(t).toString();if(t instanceof n.default.SourceMapGenerator)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error(\"Unsupported previous source map format: \"+t.toString())}if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var s=this.annotation;return e&&(s=o.default.join(o.default.dirname(e),s)),this.root=o.default.dirname(s),!(!i.default.existsSync||!i.default.existsSync(s))&&i.default.readFileSync(s,\"utf-8\").toString().trim()}},e.isMap=function(e){return\"object\"==typeof e&&(\"string\"==typeof e.mappings||\"string\"==typeof e._mappings)},PreviousMap}();t.default=s,e.exports=t.default},9429:(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n,o=(n=r(6992))&&n.__esModule?n:{default:n};function _createForOfIteratorHelperLoose(e,t){var r;if(\"undefined\"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if(\"string\"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);\"Object\"===r&&e.constructor&&(r=e.constructor.name);if(\"Map\"===r||\"Set\"===r)return Array.from(e);if(\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(e,t)}(e))||t&&e&&\"number\"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}return(r=e[Symbol.iterator]()).next.bind(r)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{\"use strict\";t.__esModule=!0,t.default=void 0;var n,o=(n=r(1662))&&n.__esModule?n:{default:n};function _defineProperties(e,t){for(var r=0;r{\"use strict\";var n;function _createForOfIteratorHelperLoose(e,t){var r;if(\"undefined\"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if(\"string\"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);\"Object\"===r&&e.constructor&&(r=e.constructor.name);if(\"Map\"===r||\"Set\"===r)return Array.from(e);if(\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(e,t)}(e))||t&&e&&\"number\"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}return(r=e[Symbol.iterator]()).next.bind(r)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),e.prototype.removeChild.call(this,t)},o.normalize=function(t,r,n){var o=e.prototype.normalize.call(this,t);if(r)if(\"prepend\"===n)this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(var i,s=_createForOfIteratorHelperLoose(o);!(i=s()).done;){i.value.raws.before=r.raws.before}return o},o.toResult=function(e){return void 0===e&&(e={}),new(r(6992))(new(r(9429)),this,e).stringify()},Root}(((n=r(1204))&&n.__esModule?n:{default:n}).default);t.default=o,e.exports=t.default},6621:(e,t,r)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var n=_interopRequireDefault(r(1204)),o=_interopRequireDefault(r(6136));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r{\"use strict\";t.__esModule=!0,t.default=void 0;var r={colon:\": \",indent:\" \",beforeDecl:\"\\n\",beforeRule:\"\\n\",beforeOpen:\" \",beforeClose:\"\\n\",beforeComment:\"\\n\",after:\"\\n\",emptyBody:\"\",commentLeft:\" \",commentRight:\" \",semicolon:!1};var n=function(){function Stringifier(e){this.builder=e}var e=Stringifier.prototype;return e.stringify=function(e,t){this[e.type](e,t)},e.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},e.comment=function(e){var t=this.raw(e,\"left\",\"commentLeft\"),r=this.raw(e,\"right\",\"commentRight\");this.builder(\"/*\"+t+e.text+r+\"*/\",e)},e.decl=function(e,t){var r=this.raw(e,\"between\",\"colon\"),n=e.prop+r+this.rawValue(e,\"value\");e.important&&(n+=e.raws.important||\" !important\"),t&&(n+=\";\"),this.builder(n,e)},e.rule=function(e){this.block(e,this.rawValue(e,\"selector\")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,\"end\")},e.atrule=function(e,t){var r=\"@\"+e.name,n=e.params?this.rawValue(e,\"params\"):\"\";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=\" \"),e.nodes)this.block(e,r+n);else{var o=(e.raws.between||\"\")+(t?\";\":\"\");this.builder(r+n+o,e)}},e.body=function(e){for(var t=e.nodes.length-1;t>0&&\"comment\"===e.nodes[t].type;)t-=1;for(var r=this.raw(e,\"semicolon\"),n=0;n0&&void 0!==e.raws.after)return-1!==(t=e.raws.after).indexOf(\"\\n\")&&(t=t.replace(/[^\\n]+$/,\"\")),!1})),t&&(t=t.replace(/[^\\s]/g,\"\")),t},e.rawBeforeOpen=function(e){var t;return e.walk((function(e){if(\"decl\"!==e.type&&void 0!==(t=e.raws.between))return!1})),t},e.rawColon=function(e){var t;return e.walkDecls((function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\\s:]/g,\"\"),!1})),t},e.beforeAfter=function(e,t){var r;r=\"decl\"===e.type?this.raw(e,null,\"beforeDecl\"):\"comment\"===e.type?this.raw(e,null,\"beforeComment\"):\"before\"===t?this.raw(e,null,\"beforeRule\"):this.raw(e,null,\"beforeClose\");for(var n=e.parent,o=0;n&&\"root\"!==n.type;)o+=1,n=n.parent;if(-1!==r.indexOf(\"\\n\")){var i=this.raw(e,null,\"indent\");if(i.length)for(var s=0;s{\"use strict\";t.__esModule=!0,t.default=void 0;var n,o=(n=r(5701))&&n.__esModule?n:{default:n};var _default=function(e,t){new o.default(t).stringify(e)};t.default=_default,e.exports=t.default},1157:(e,t)=>{\"use strict\";t.__esModule=!0,t.default=function(e,t){void 0===t&&(t={});var k,S,A,F,x,O,N,T,I,R,M,P,L,B,j=e.css.valueOf(),q=t.ignoreErrors,G=j.length,U=-1,W=1,$=0,z=[],V=[];function unclosed(t){throw e.error(\"Unclosed \"+t,W,$-U)}return{back:function(e){V.push(e)},nextToken:function(e){if(V.length)return V.pop();if(!($>=G)){var t=!!e&&e.ignoreUnclosed;switch(((k=j.charCodeAt($))===s||k===a||k===l&&j.charCodeAt($+1)!==s)&&(U=$,W+=1),k){case s:case u:case c:case l:case a:S=$;do{S+=1,(k=j.charCodeAt(S))===s&&(U=S,W+=1)}while(k===u||k===s||k===c||k===l||k===a);B=[\"space\",j.slice($,S)],$=S-1;break;case p:case f:case D:case g:case v:case m:case d:var H=String.fromCharCode(k);B=[H,H,W,$-U];break;case h:if(P=z.length?z.pop()[1]:\"\",L=j.charCodeAt($+1),\"url\"===P&&L!==r&&L!==n&&L!==u&&L!==s&&L!==c&&L!==a&&L!==l){S=$;do{if(R=!1,-1===(S=j.indexOf(\")\",S+1))){if(q||t){S=$;break}unclosed(\"bracket\")}for(M=S;j.charCodeAt(M-1)===o;)M-=1,R=!R}while(R);B=[\"brackets\",j.slice($,S+1),W,$-U,W,S-U],$=S}else S=j.indexOf(\")\",$+1),O=j.slice($,S+1),-1===S||E.test(O)?B=[\"(\",\"(\",W,$-U]:(B=[\"brackets\",O,W,$-U,W,S-U],$=S);break;case r:case n:A=k===r?\"'\":'\"',S=$;do{if(R=!1,-1===(S=j.indexOf(A,S+1))){if(q||t){S=$+1;break}unclosed(\"string\")}for(M=S;j.charCodeAt(M-1)===o;)M-=1,R=!R}while(R);O=j.slice($,S+1),F=O.split(\"\\n\"),(x=F.length-1)>0?(T=W+x,I=S-F[x].length):(T=W,I=U),B=[\"string\",j.slice($,S+1),W,$-U,T,S-I],U=I,W=T,$=S;break;case C:w.lastIndex=$+1,w.test(j),S=0===w.lastIndex?j.length-1:w.lastIndex-2,B=[\"at-word\",j.slice($,S+1),W,$-U,W,S-U],$=S;break;case o:for(S=$,N=!0;j.charCodeAt(S+1)===o;)S+=1,N=!N;if(k=j.charCodeAt(S+1),N&&k!==i&&k!==u&&k!==s&&k!==c&&k!==l&&k!==a&&(S+=1,_.test(j.charAt(S)))){for(;_.test(j.charAt(S+1));)S+=1;j.charCodeAt(S+1)===u&&(S+=1)}B=[\"word\",j.slice($,S+1),W,$-U,W,S-U],$=S;break;default:k===i&&j.charCodeAt($+1)===y?(0===(S=j.indexOf(\"*/\",$+2)+1)&&(q||t?S=j.length:unclosed(\"comment\")),O=j.slice($,S+1),F=O.split(\"\\n\"),(x=F.length-1)>0?(T=W+x,I=S-F[x].length):(T=W,I=U),B=[\"comment\",O,W,$-U,T,S-I],U=I,W=T,$=S):(b.lastIndex=$+1,b.test(j),S=0===b.lastIndex?j.length-1:b.lastIndex-2,B=[\"word\",j.slice($,S+1),W,$-U,W,S-U],z.push(B),$=S)}return $++,B}},endOfFile:function(){return 0===V.length&&$>=G},position:function(){return $}}};var r=\"'\".charCodeAt(0),n='\"'.charCodeAt(0),o=\"\\\\\".charCodeAt(0),i=\"/\".charCodeAt(0),s=\"\\n\".charCodeAt(0),u=\" \".charCodeAt(0),a=\"\\f\".charCodeAt(0),c=\"\\t\".charCodeAt(0),l=\"\\r\".charCodeAt(0),p=\"[\".charCodeAt(0),f=\"]\".charCodeAt(0),h=\"(\".charCodeAt(0),d=\")\".charCodeAt(0),D=\"{\".charCodeAt(0),g=\"}\".charCodeAt(0),m=\";\".charCodeAt(0),y=\"*\".charCodeAt(0),v=\":\".charCodeAt(0),C=\"@\".charCodeAt(0),w=/[ \\n\\t\\r\\f{}()'\"\\\\;/[\\]#]/g,b=/[ \\n\\t\\r\\f(){}:;@!'\"\\\\\\][#]|\\/(?=\\*)/g,E=/.[\\\\/(\"'\\n]/,_=/[a-f0-9]/i;e.exports=t.default},6574:(e,t)=>{\"use strict\";t.__esModule=!0,t.default=function(e){if(r[e])return;r[e]=!0,\"undefined\"!=typeof console&&console.warn&&console.warn(e)};var r={};e.exports=t.default},1662:(e,t)=>{\"use strict\";t.__esModule=!0,t.default=void 0;var r=function(){function Warning(e,t){if(void 0===t&&(t={}),this.type=\"warning\",this.text=e,t.node&&t.node.source){var r=t.node.positionBy(t);this.line=r.line,this.column=r.column}for(var n in t)this[n]=t[n]}return Warning.prototype.toString=function(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+\": \"+this.text:this.text},Warning}();t.default=r,e.exports=t.default},6210:(e,t,r)=>{const n=r(895),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=r(8523),{re:s,t:u}=r(3443),{compareIdentifiers:a}=r(8337);class SemVer{constructor(e,t){if(t&&\"object\"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(\"string\"!=typeof e)throw new TypeError(\"Invalid Version: \".concat(e));if(e.length>o)throw new TypeError(\"version is longer than \".concat(o,\" characters\"));n(\"SemVer\",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?s[u.LOOSE]:s[u.FULL]);if(!r)throw new TypeError(\"Invalid Version: \".concat(e));if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError(\"Invalid major version\");if(this.minor>i||this.minor<0)throw new TypeError(\"Invalid minor version\");if(this.patch>i||this.patch<0)throw new TypeError(\"Invalid patch version\");r[4]?this.prerelease=r[4].split(\".\").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)\"number\"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(\"invalid increment argument: \".concat(e))}return this.format(),this.raw=this.version,this}}e.exports=SemVer},2828:(e,t,r)=>{const n=r(6210);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},9195:(e,t,r)=>{const n=r(2828);e.exports=(e,t,r)=>n(e,t,r)>=0},3725:(e,t,r)=>{const n=r(2828);e.exports=(e,t,r)=>n(e,t,r)<0},8523:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:\"2.0.0\",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},895:e=>{const t=\"object\"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\\bsemver\\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(\"SEMVER\",...e):()=>{};e.exports=t},8337:e=>{const t=/^[0-9]+$/,compareIdentifiers=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:ecompareIdentifiers(t,e)}},3443:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=r(8523),o=r(895),i=(t=e.exports={}).re=[],s=t.src=[],u=t.t={};let a=0;const createToken=(e,t,r)=>{const n=a++;o(n,t),u[e]=n,s[n]=t,i[n]=new RegExp(t,r?\"g\":void 0)};createToken(\"NUMERICIDENTIFIER\",\"0|[1-9]\\\\d*\"),createToken(\"NUMERICIDENTIFIERLOOSE\",\"[0-9]+\"),createToken(\"NONNUMERICIDENTIFIER\",\"\\\\d*[a-zA-Z-][a-zA-Z0-9-]*\"),createToken(\"MAINVERSION\",\"(\".concat(s[u.NUMERICIDENTIFIER],\")\\\\.\")+\"(\".concat(s[u.NUMERICIDENTIFIER],\")\\\\.\")+\"(\".concat(s[u.NUMERICIDENTIFIER],\")\")),createToken(\"MAINVERSIONLOOSE\",\"(\".concat(s[u.NUMERICIDENTIFIERLOOSE],\")\\\\.\")+\"(\".concat(s[u.NUMERICIDENTIFIERLOOSE],\")\\\\.\")+\"(\".concat(s[u.NUMERICIDENTIFIERLOOSE],\")\")),createToken(\"PRERELEASEIDENTIFIER\",\"(?:\".concat(s[u.NUMERICIDENTIFIER],\"|\").concat(s[u.NONNUMERICIDENTIFIER],\")\")),createToken(\"PRERELEASEIDENTIFIERLOOSE\",\"(?:\".concat(s[u.NUMERICIDENTIFIERLOOSE],\"|\").concat(s[u.NONNUMERICIDENTIFIER],\")\")),createToken(\"PRERELEASE\",\"(?:-(\".concat(s[u.PRERELEASEIDENTIFIER],\"(?:\\\\.\").concat(s[u.PRERELEASEIDENTIFIER],\")*))\")),createToken(\"PRERELEASELOOSE\",\"(?:-?(\".concat(s[u.PRERELEASEIDENTIFIERLOOSE],\"(?:\\\\.\").concat(s[u.PRERELEASEIDENTIFIERLOOSE],\")*))\")),createToken(\"BUILDIDENTIFIER\",\"[0-9A-Za-z-]+\"),createToken(\"BUILD\",\"(?:\\\\+(\".concat(s[u.BUILDIDENTIFIER],\"(?:\\\\.\").concat(s[u.BUILDIDENTIFIER],\")*))\")),createToken(\"FULLPLAIN\",\"v?\".concat(s[u.MAINVERSION]).concat(s[u.PRERELEASE],\"?\").concat(s[u.BUILD],\"?\")),createToken(\"FULL\",\"^\".concat(s[u.FULLPLAIN],\"$\")),createToken(\"LOOSEPLAIN\",\"[v=\\\\s]*\".concat(s[u.MAINVERSIONLOOSE]).concat(s[u.PRERELEASELOOSE],\"?\").concat(s[u.BUILD],\"?\")),createToken(\"LOOSE\",\"^\".concat(s[u.LOOSEPLAIN],\"$\")),createToken(\"GTLT\",\"((?:<|>)?=?)\"),createToken(\"XRANGEIDENTIFIERLOOSE\",\"\".concat(s[u.NUMERICIDENTIFIERLOOSE],\"|x|X|\\\\*\")),createToken(\"XRANGEIDENTIFIER\",\"\".concat(s[u.NUMERICIDENTIFIER],\"|x|X|\\\\*\")),createToken(\"XRANGEPLAIN\",\"[v=\\\\s]*(\".concat(s[u.XRANGEIDENTIFIER],\")\")+\"(?:\\\\.(\".concat(s[u.XRANGEIDENTIFIER],\")\")+\"(?:\\\\.(\".concat(s[u.XRANGEIDENTIFIER],\")\")+\"(?:\".concat(s[u.PRERELEASE],\")?\").concat(s[u.BUILD],\"?\")+\")?)?\"),createToken(\"XRANGEPLAINLOOSE\",\"[v=\\\\s]*(\".concat(s[u.XRANGEIDENTIFIERLOOSE],\")\")+\"(?:\\\\.(\".concat(s[u.XRANGEIDENTIFIERLOOSE],\")\")+\"(?:\\\\.(\".concat(s[u.XRANGEIDENTIFIERLOOSE],\")\")+\"(?:\".concat(s[u.PRERELEASELOOSE],\")?\").concat(s[u.BUILD],\"?\")+\")?)?\"),createToken(\"XRANGE\",\"^\".concat(s[u.GTLT],\"\\\\s*\").concat(s[u.XRANGEPLAIN],\"$\")),createToken(\"XRANGELOOSE\",\"^\".concat(s[u.GTLT],\"\\\\s*\").concat(s[u.XRANGEPLAINLOOSE],\"$\")),createToken(\"COERCE\",\"\".concat(\"(^|[^\\\\d])(\\\\d{1,\").concat(n,\"})\")+\"(?:\\\\.(\\\\d{1,\".concat(n,\"}))?\")+\"(?:\\\\.(\\\\d{1,\".concat(n,\"}))?\")+\"(?:$|[^\\\\d])\"),createToken(\"COERCERTL\",s[u.COERCE],!0),createToken(\"LONETILDE\",\"(?:~>?)\"),createToken(\"TILDETRIM\",\"(\\\\s*)\".concat(s[u.LONETILDE],\"\\\\s+\"),!0),t.tildeTrimReplace=\"$1~\",createToken(\"TILDE\",\"^\".concat(s[u.LONETILDE]).concat(s[u.XRANGEPLAIN],\"$\")),createToken(\"TILDELOOSE\",\"^\".concat(s[u.LONETILDE]).concat(s[u.XRANGEPLAINLOOSE],\"$\")),createToken(\"LONECARET\",\"(?:\\\\^)\"),createToken(\"CARETTRIM\",\"(\\\\s*)\".concat(s[u.LONECARET],\"\\\\s+\"),!0),t.caretTrimReplace=\"$1^\",createToken(\"CARET\",\"^\".concat(s[u.LONECARET]).concat(s[u.XRANGEPLAIN],\"$\")),createToken(\"CARETLOOSE\",\"^\".concat(s[u.LONECARET]).concat(s[u.XRANGEPLAINLOOSE],\"$\")),createToken(\"COMPARATORLOOSE\",\"^\".concat(s[u.GTLT],\"\\\\s*(\").concat(s[u.LOOSEPLAIN],\")$|^$\")),createToken(\"COMPARATOR\",\"^\".concat(s[u.GTLT],\"\\\\s*(\").concat(s[u.FULLPLAIN],\")$|^$\")),createToken(\"COMPARATORTRIM\",\"(\\\\s*)\".concat(s[u.GTLT],\"\\\\s*(\").concat(s[u.LOOSEPLAIN],\"|\").concat(s[u.XRANGEPLAIN],\")\"),!0),t.comparatorTrimReplace=\"$1$2$3\",createToken(\"HYPHENRANGE\",\"^\\\\s*(\".concat(s[u.XRANGEPLAIN],\")\")+\"\\\\s+-\\\\s+\"+\"(\".concat(s[u.XRANGEPLAIN],\")\")+\"\\\\s*$\"),createToken(\"HYPHENRANGELOOSE\",\"^\\\\s*(\".concat(s[u.XRANGEPLAINLOOSE],\")\")+\"\\\\s+-\\\\s+\"+\"(\".concat(s[u.XRANGEPLAINLOOSE],\")\")+\"\\\\s*$\"),createToken(\"STAR\",\"(<|>)?=?\\\\s*\\\\*\"),createToken(\"GTE0\",\"^\\\\s*>=\\\\s*0.0.0\\\\s*$\"),createToken(\"GTE0PRE\",\"^\\\\s*>=\\\\s*0.0.0-0\\\\s*$\")},6715:(e,t,r)=>{var n=r(7837),o=Object.prototype.hasOwnProperty,i=\"undefined\"!=typeof Map;function ArraySet(){this._array=[],this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function(e,t){for(var r=new ArraySet,n=0,o=e.length;n=0)return t}else{var r=n.toSetString(e);if(o.call(this._set,r))return this._set[r]}throw new Error('\"'+e+'\" is not in the set.')},ArraySet.prototype.at=function(e){if(e>=0&&e{var n=r(4122);t.encode=function(e){var t,r=\"\",o=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&o,(o>>>=5)>0&&(t|=32),r+=n.encode(t)}while(o>0);return r},t.decode=function(e,t,r){var o,i,s,u,a=e.length,c=0,l=0;do{if(t>=a)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(-1===(i=n.decode(e.charCodeAt(t++))))throw new Error(\"Invalid base64 digit: \"+e.charAt(t-1));o=!!(32&i),c+=(i&=31)<>1,1==(1&s)?-u:u),r.rest=t}},4122:(e,t)=>{var r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");t.encode=function(e){if(0<=e&&e{function recursiveSearch(e,r,n,o,i,s){var u=Math.floor((r-e)/2)+e,a=i(n,o[u],!0);return 0===a?u:a>0?r-u>1?recursiveSearch(u,r,n,o,i,s):s==t.LEAST_UPPER_BOUND?r1?recursiveSearch(e,u,n,o,i,s):s==t.LEAST_UPPER_BOUND?u:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,n,o){if(0===r.length)return-1;var i=recursiveSearch(-1,r.length,e,r,n,o||t.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===n(r[i],r[i-1],!0);)--i;return i}},1028:(e,t,r)=>{var n=r(7837);function MappingList(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},MappingList.prototype.add=function(e){var t,r,o,i,s,u;t=this._last,r=e,o=t.generatedLine,i=r.generatedLine,s=t.generatedColumn,u=r.generatedColumn,i>o||i==o&&u>=s||n.compareByGeneratedPositionsInflated(t,r)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},MappingList.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.H=MappingList},6711:(e,t)=>{function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function doQuickSort(e,t,r,n){if(r{var n=r(7837),o=r(8593),i=r(6715).I,s=r(4886),u=r(6711).U;function SourceMapConsumer(e,t){var r=e;return\"string\"==typeof e&&(r=n.parseSourceMapInput(e)),null!=r.sections?new IndexedSourceMapConsumer(r,t):new BasicSourceMapConsumer(r,t)}function BasicSourceMapConsumer(e,t){var r=e;\"string\"==typeof e&&(r=n.parseSourceMapInput(e));var o=n.getArg(r,\"version\"),s=n.getArg(r,\"sources\"),u=n.getArg(r,\"names\",[]),a=n.getArg(r,\"sourceRoot\",null),c=n.getArg(r,\"sourcesContent\",null),l=n.getArg(r,\"mappings\"),p=n.getArg(r,\"file\",null);if(o!=this._version)throw new Error(\"Unsupported version: \"+o);a&&(a=n.normalize(a)),s=s.map(String).map(n.normalize).map((function(e){return a&&n.isAbsolute(a)&&n.isAbsolute(e)?n.relative(a,e):e})),this._names=i.fromArray(u.map(String),!0),this._sources=i.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map((function(e){return n.computeSourceURL(a,e,t)})),this.sourceRoot=a,this.sourcesContent=c,this._mappings=l,this._sourceMapURL=t,this.file=p}function Mapping(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function IndexedSourceMapConsumer(e,t){var r=e;\"string\"==typeof e&&(r=n.parseSourceMapInput(e));var o=n.getArg(r,\"version\"),s=n.getArg(r,\"sections\");if(o!=this._version)throw new Error(\"Unsupported version: \"+o);this._sources=new i,this._names=new i;var u={line:-1,column:0};this._sections=s.map((function(e){if(e.url)throw new Error(\"Support for url field in sections not implemented.\");var r=n.getArg(e,\"offset\"),o=n.getArg(r,\"line\"),i=n.getArg(r,\"column\");if(o=0){var u=this._originalMappings[s];if(void 0===e.column)for(var a=u.originalLine;u&&u.originalLine===a;)i.push({line:n.getArg(u,\"generatedLine\",null),column:n.getArg(u,\"generatedColumn\",null),lastColumn:n.getArg(u,\"lastGeneratedColumn\",null)}),u=this._originalMappings[++s];else for(var c=u.originalColumn;u&&u.originalLine===t&&u.originalColumn==c;)i.push({line:n.getArg(u,\"generatedLine\",null),column:n.getArg(u,\"generatedColumn\",null),lastColumn:n.getArg(u,\"lastGeneratedColumn\",null)}),u=this._originalMappings[++s]}return i},t.SourceMapConsumer=SourceMapConsumer,BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype),BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer,BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var t,r=e;if(null!=this.sourceRoot&&(r=n.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(t=0;t1&&(r.source=d+i[1],d+=i[1],r.originalLine=f+i[2],f=r.originalLine,r.originalLine+=1,r.originalColumn=h+i[3],h=r.originalColumn,i.length>4&&(r.name=D+i[4],D+=i[4])),w.push(r),\"number\"==typeof r.originalLine&&C.push(r)}u(w,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=w,u(C,n.compareByOriginalPositions),this.__originalMappings=C},BasicSourceMapConsumer.prototype._findMapping=function(e,t,r,n,i,s){if(e[r]<=0)throw new TypeError(\"Line must be greater than or equal to 1, got \"+e[r]);if(e[n]<0)throw new TypeError(\"Column must be greater than or equal to 0, got \"+e[n]);return o.search(e,t,i,s)},BasicSourceMapConsumer.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===t.generatedLine){var i=n.getArg(o,\"source\",null);null!==i&&(i=this._sources.at(i),i=n.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=n.getArg(o,\"name\",null);return null!==s&&(s=this._names.at(s)),{source:i,line:n.getArg(o,\"originalLine\",null),column:n.getArg(o,\"originalColumn\",null),name:s}}}return{source:null,line:null,column:null,name:null}},BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},BasicSourceMapConsumer.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var o,i=e;if(null!=this.sourceRoot&&(i=n.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=n.urlParse(this.sourceRoot))){var s=i.replace(/^file:\\/\\//,\"\");if(\"file\"==o.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||\"/\"==o.path)&&this._sources.has(\"/\"+i))return this.sourcesContent[this._sources.indexOf(\"/\"+i)]}if(t)return null;throw new Error('\"'+i+'\" is not in the SourceMap.')},BasicSourceMapConsumer.prototype.generatedPositionFor=function(e){var t=n.getArg(e,\"source\");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:n.getArg(e,\"line\"),originalColumn:n.getArg(e,\"column\")},o=this._findMapping(r,this._originalMappings,\"originalLine\",\"originalColumn\",n.compareByOriginalPositions,n.getArg(e,\"bias\",SourceMapConsumer.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:n.getArg(i,\"generatedLine\",null),column:n.getArg(i,\"generatedColumn\",null),lastColumn:n.getArg(i,\"lastGeneratedColumn\",null)}}return{line:null,column:null,lastColumn:null}},IndexedSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype),IndexedSourceMapConsumer.prototype.constructor=SourceMapConsumer,IndexedSourceMapConsumer.prototype._version=3,Object.defineProperty(IndexedSourceMapConsumer.prototype,\"sources\",{get:function(){for(var e=[],t=0;t{var n=r(4886),o=r(7837),i=r(6715).I,s=r(1028).H;function SourceMapGenerator(e){e||(e={}),this._file=o.getArg(e,\"file\",null),this._sourceRoot=o.getArg(e,\"sourceRoot\",null),this._skipValidation=o.getArg(e,\"skipValidation\",!1),this._sources=new i,this._names=new i,this._mappings=new s,this._sourcesContents=null}SourceMapGenerator.prototype._version=3,SourceMapGenerator.fromSourceMap=function(e){var t=e.sourceRoot,r=new SourceMapGenerator({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=o.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)})),e.sources.forEach((function(n){var i=n;null!==t&&(i=o.relative(t,n)),r._sources.has(i)||r._sources.add(i);var s=e.sourceContentFor(n);null!=s&&r.setSourceContent(n,s)})),r},SourceMapGenerator.prototype.addMapping=function(e){var t=o.getArg(e,\"generated\"),r=o.getArg(e,\"original\",null),n=o.getArg(e,\"source\",null),i=o.getArg(e,\"name\",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},SourceMapGenerator.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=o.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},SourceMapGenerator.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\\'s \"file\" property. Both were omitted.');n=e.file}var s=this._sourceRoot;null!=s&&(n=o.relative(s,n));var u=new i,a=new i;this._mappings.unsortedForEach((function(t){if(t.source===n&&null!=t.originalLine){var i=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=i.source&&(t.source=i.source,null!=r&&(t.source=o.join(r,t.source)),null!=s&&(t.source=o.relative(s,t.source)),t.originalLine=i.line,t.originalColumn=i.column,null!=i.name&&(t.name=i.name))}var c=t.source;null==c||u.has(c)||u.add(c);var l=t.name;null==l||a.has(l)||a.add(l)}),this),this._sources=u,this._names=a,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=o.join(r,t)),null!=s&&(t=o.relative(s,t)),this.setSourceContent(t,n))}),this)},SourceMapGenerator.prototype._validateMapping=function(e,t,r,n){if(t&&\"number\"!=typeof t.line&&\"number\"!=typeof t.column)throw new Error(\"original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.\");if((!(e&&\"line\"in e&&\"column\"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&\"line\"in e&&\"column\"in e&&t&&\"line\"in t&&\"column\"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error(\"Invalid mapping: \"+JSON.stringify({generated:e,source:r,original:t,name:n}))},SourceMapGenerator.prototype._serializeMappings=function(){for(var e,t,r,i,s=0,u=1,a=0,c=0,l=0,p=0,f=\"\",h=this._mappings.toArray(),d=0,D=h.length;d0){if(!o.compareByGeneratedPositionsInflated(t,h[d-1]))continue;e+=\",\"}e+=n.encode(t.generatedColumn-s),s=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),e+=n.encode(i-p),p=i,e+=n.encode(t.originalLine-1-c),c=t.originalLine-1,e+=n.encode(t.originalColumn-a),a=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=n.encode(r-l),l=r)),f+=e}return f},SourceMapGenerator.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));var r=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},SourceMapGenerator.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},SourceMapGenerator.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=SourceMapGenerator},6270:(e,t,r)=>{var n=r(2400).SourceMapGenerator,o=r(7837),i=/(\\r?\\n)/,s=\"$$$isSourceNode$$$\";function SourceNode(e,t,r,n,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==o?null:o,this[s]=!0,null!=n&&this.add(n)}SourceNode.fromStringWithSourceMap=function(e,t,r){var n=new SourceNode,s=e.split(i),u=0,shiftNextLine=function(){return getNextLine()+(getNextLine()||\"\");function getNextLine(){return u=0;t--)this.prepend(e[t]);else{if(!e[s]&&\"string\"!=typeof e)throw new TypeError(\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \"+e);this.children.unshift(e)}return this},SourceNode.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r0){for(t=[],r=0;r{t.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('\"'+t+'\" is a required argument.')};var r=/^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/,n=/^data:.+\\,.+$/;function urlParse(e){var t=e.match(r);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function urlGenerate(e){var t=\"\";return e.scheme&&(t+=e.scheme+\":\"),t+=\"//\",e.auth&&(t+=e.auth+\"@\"),e.host&&(t+=e.host),e.port&&(t+=\":\"+e.port),e.path&&(t+=e.path),t}function normalize(e){var r=e,n=urlParse(e);if(n){if(!n.path)return e;r=n.path}for(var o,i=t.isAbsolute(r),s=r.split(/\\/+/),u=0,a=s.length-1;a>=0;a--)\".\"===(o=s[a])?s.splice(a,1):\"..\"===o?u++:u>0&&(\"\"===o?(s.splice(a+1,u),u=0):(s.splice(a,2),u--));return\"\"===(r=s.join(\"/\"))&&(r=i?\"/\":\".\"),n?(n.path=r,urlGenerate(n)):r}function join(e,t){\"\"===e&&(e=\".\"),\"\"===t&&(t=\".\");var r=urlParse(t),o=urlParse(e);if(o&&(e=o.path||\"/\"),r&&!r.scheme)return o&&(r.scheme=o.scheme),urlGenerate(r);if(r||t.match(n))return t;if(o&&!o.host&&!o.path)return o.host=t,urlGenerate(o);var i=\"/\"===t.charAt(0)?t:normalize(e.replace(/\\/+$/,\"\")+\"/\"+t);return o?(o.path=i,urlGenerate(o)):i}t.urlParse=urlParse,t.urlGenerate=urlGenerate,t.normalize=normalize,t.join=join,t.isAbsolute=function(e){return\"/\"===e.charAt(0)||r.test(e)},t.relative=function(e,t){\"\"===e&&(e=\".\"),e=e.replace(/\\/$/,\"\");for(var r=0;0!==t.indexOf(e+\"/\");){var n=e.lastIndexOf(\"/\");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\\/]+:\\/)?\\/*$/))return t;++r}return Array(r+1).join(\"../\")+t.substr(e.length+1)};var o=!(\"__proto__\"in Object.create(null));function identity(e){return e}function isProtoString(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function strcmp(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=o?identity:function(e){return isProtoString(e)?\"$\"+e:e},t.fromSetString=o?identity:function(e){return isProtoString(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,r){var n=strcmp(e.source,t.source);return 0!==n||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)||r||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:strcmp(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||r||0!==(n=strcmp(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:strcmp(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=strcmp(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:strcmp(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\\)]}'[^\\n]*\\n/,\"\"))},t.computeSourceURL=function(e,t,r){if(t=t||\"\",e&&(\"/\"!==e[e.length-1]&&\"/\"!==t[0]&&(e+=\"/\"),t=e+t),r){var n=urlParse(r);if(!n)throw new Error(\"sourceMapURL could not be parsed\");if(n.path){var o=n.path.lastIndexOf(\"/\");o>=0&&(n.path=n.path.substring(0,o+1))}t=join(urlGenerate(n),t)}return normalize(t)}},2447:(e,t,r)=>{t.SourceMapGenerator=r(2400).SourceMapGenerator,t.SourceMapConsumer=r(8985).SourceMapConsumer,t.SourceNode=r(6270).SourceNode},6549:(e,t,r)=>{\"use strict\";const n=r(9992),o=r(4450),i=r(541),stringWidth=e=>{if(\"string\"!=typeof(e=e.replace(i(),\" \"))||0===e.length)return 0;e=n(e);let t=0;for(let r=0;r=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,t+=o(n)?2:1))}return t};e.exports=stringWidth,e.exports.default=stringWidth},4450:e=>{\"use strict\";const isFullwidthCodePoint=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));e.exports=isFullwidthCodePoint,e.exports.default=isFullwidthCodePoint},9992:(e,t,r)=>{\"use strict\";const n=r(2426);e.exports=e=>\"string\"==typeof e?e.replace(n(),\"\"):e},3210:e=>{\"use strict\";e.exports=function(e,t,r){return 0===e.length?e:t?(r||e.sort(t),function(e,t){for(var r=1,n=e.length,o=e[0],i=e[0],s=1;s{\"use strict\";e.exports={guessEndOfLine:function(e){const t=e.indexOf(\"\\r\");return t>=0?\"\\n\"===e.charAt(t+1)?\"crlf\":\"cr\":\"lf\"},convertEndOfLineToChars:function(e){switch(e){case\"cr\":return\"\\r\";case\"crlf\":return\"\\r\\n\";default:return\"\\n\"}},countEndOfLineChars:function(e,t){let r;if(\"\\n\"===t)r=/\\n/g;else if(\"\\r\"===t)r=/\\r/g;else{if(\"\\r\\n\"!==t)throw new Error('Unexpected \"eol\" '.concat(JSON.stringify(t),\".\"));r=/\\r\\n/g}const n=e.match(r);return n?n.length:0},normalizeEndOfLine:function(e){return e.replace(/\\r\\n?/g,\"\\n\")}}},47:e=>{\"use strict\";e.exports=function(e,t){const r=new SyntaxError(e+\" (\"+t.start.line+\":\"+t.start.column+\")\");return r.loc=t,r}},9428:(e,t,r)=>{\"use strict\";const n=r(6549),o=r(2240),i=r(4652),{getSupportInfo:s}=r(7290),u=/[^\\x20-\\x7F]/;function skip(e){return(t,r,n)=>{const o=n&&n.backwards;if(!1===r)return!1;const{length:i}=t;let s=r;for(;s>=0&&s(r.match(s.regex)||[]).length?s.quote:i.quote}return u}function makeString(e,t,r){const n='\"'===t?\"'\":'\"',o=e.replace(/\\\\([\\S\\s])|([\"'])/g,((e,o,i)=>o===n?o:i===t?\"\\\\\"+i:i||(r&&/^[^\\n\\r\"'0-7\\\\bfnrt-vx\\u2028\\u2029]$/.test(o)?o:\"\\\\\"+o)));return t+o+t}function addCommentHelper(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,\"JSXText\"===e.type&&(t.printed=!0)}e.exports={inferParserByLanguage:function(e,t){const{languages:r}=s({plugins:t.plugins}),n=r.find((({name:t})=>t.toLowerCase()===e))||r.find((({aliases:t})=>Array.isArray(t)&&t.includes(e)))||r.find((({extensions:t})=>Array.isArray(t)&&t.includes(\".\".concat(e))));return n&&n.parsers[0]},replaceEndOfLineWith:function(e,t){const r=[];for(const n of e.split(\"\\n\"))0!==r.length&&r.push(t),r.push(n);return r},getStringWidth:function(e){return e?u.test(e)?n(e):e.length:0},getMaxContinuousCount:function(e,t){const r=e.match(new RegExp(\"(\".concat(o(t),\")+\"),\"g\"));return null===r?0:r.reduce(((e,r)=>Math.max(e,r.length/t.length)),0)},getMinNotPresentContinuousCount:function(e,t){const r=e.match(new RegExp(\"(\".concat(o(t),\")+\"),\"g\"));if(null===r)return 0;const n=new Map;let i=0;for(const e of r){const r=e.length/t.length;n.set(r,!0),r>i&&(i=r)}for(let e=1;ee[e.length-2],getLast:i,getNextNonSpaceNonCommentCharacterIndexWithStartIndex,getNextNonSpaceNonCommentCharacterIndex,getNextNonSpaceNonCommentCharacter:function(e,t,r){return e.charAt(getNextNonSpaceNonCommentCharacterIndex(e,t,r))},skip,skipWhitespace:a,skipSpaces:c,skipToLineEnd:l,skipEverythingButNewLine:p,skipInlineComment,skipTrailingComment,skipNewline,isNextLineEmptyAfterIndex,isNextLineEmpty:function(e,t,r){return isNextLineEmptyAfterIndex(e,r(t))},isPreviousLineEmpty:function(e,t,r){let n=r(t)-1;return n=c(e,n,{backwards:!0}),n=skipNewline(e,n,{backwards:!0}),n=c(e,n,{backwards:!0}),n!==skipNewline(e,n,{backwards:!0})},hasNewline,hasNewlineInRange:function(e,t,r){for(let n=t;n{\"use strict\";function concat(e){return{type:\"concat\",parts:e}}function indent(e){return{type:\"indent\",contents:e}}function align(e,t){return{type:\"align\",contents:t,n:e}}function group(e,t){return{type:\"group\",id:(t=t||{}).id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}const t={type:\"break-parent\"},r=concat([{type:\"line\",hard:!0},t]),n=concat([{type:\"line\",hard:!0,literal:!0},t]),o={type:\"cursor\",placeholder:Symbol(\"cursor\")};e.exports={concat,join:function(e,t){const r=[];for(let n=0;n0){for(let e=0;e{\"use strict\";function flattenDoc(e){if(\"concat\"===e.type){const t=[];for(let r=0;rprintDoc(flattenDoc(e))}},9765:(e,t,r)=>{\"use strict\";const{getStringWidth:n}=r(9428),{convertEndOfLineToChars:o}=r(7933),{concat:i,fill:s,cursor:u}=r(5558);let a;function makeIndent(e,t){return generateInd(e,{type:\"indent\"},t)}function makeAlign(e,t,r){if(t===-1/0)return e.root||{value:\"\",length:0,queue:[]};if(t<0)return generateInd(e,{type:\"dedent\"},r);if(!t)return e;if(\"root\"===t.type)return Object.assign({},e,{root:e});return generateInd(e,{type:\"string\"==typeof t?\"stringAlign\":\"numberAlign\",n:t},r)}function generateInd(e,t,r){const n=\"dedent\"===t.type?e.queue.slice(0,-1):e.queue.concat(t);let o=\"\",i=0,s=0,u=0;for(const e of n)switch(e.type){case\"indent\":flush(),r.useTabs?addTabs(1):addSpaces(r.tabWidth);break;case\"stringAlign\":flush(),o+=e.n,i+=e.n.length;break;case\"numberAlign\":s+=1,u+=e.n;break;default:throw new Error(\"Unexpected type '\".concat(e.type,\"'\"))}return flushSpaces(),Object.assign({},e,{value:o,length:i,queue:n});function addTabs(e){o+=\"\\t\".repeat(e),i+=r.tabWidth*e}function addSpaces(e){o+=\" \".repeat(e),i+=e}function flush(){r.useTabs?function(){s>0&&addTabs(s);resetLast()}():flushSpaces()}function flushSpaces(){u>0&&addSpaces(u),resetLast()}function resetLast(){s=0,u=0}}function trim(e){if(0===e.length)return 0;let t=0;for(;e.length>0&&\"string\"==typeof e[e.length-1]&&e[e.length-1].match(/^[\\t ]*$/);)t+=e.pop().length;if(e.length&&\"string\"==typeof e[e.length-1]){const r=e[e.length-1].replace(/[\\t ]*$/,\"\");t+=e[e.length-1].length-r.length,e[e.length-1]=r}return t}function fits(e,t,r,o,i){let s=t.length;const u=[e],c=[];for(;r>=0;){if(0===u.length){if(0===s)return!0;u.push(t[s-1]),s--;continue}const[e,l,p]=u.pop();if(\"string\"==typeof p)c.push(p),r-=n(p);else switch(p.type){case\"concat\":for(let t=p.parts.length-1;t>=0;t--)u.push([e,l,p.parts[t]]);break;case\"indent\":u.push([makeIndent(e,o),l,p.contents]);break;case\"align\":u.push([makeAlign(e,p.n,o),l,p.contents]);break;case\"trim\":r+=trim(c);break;case\"group\":if(i&&p.break)return!1;u.push([e,p.break?1:l,p.contents]),p.id&&(a[p.id]=u[u.length-1][1]);break;case\"fill\":for(let t=p.parts.length-1;t>=0;t--)u.push([e,l,p.parts[t]]);break;case\"if-break\":{const t=p.groupId?a[p.groupId]:l;1===t&&p.breakContents&&u.push([e,l,p.breakContents]),2===t&&p.flatContents&&u.push([e,l,p.flatContents]);break}case\"line\":switch(l){case 2:if(!p.hard){p.soft||(c.push(\" \"),r-=1);break}return!0;case 1:return!0}}}return!1}e.exports={printDocToString:function(e,t){a={};const r=t.printWidth,c=o(t.endOfLine);let l=0;const p=[[{value:\"\",length:0,queue:[]},1,e]],f=[];let h=!1,d=[];for(;0!==p.length;){const[e,o,D]=p.pop();if(\"string\"==typeof D){const e=\"\\n\"!==c&&D.includes(\"\\n\")?D.replace(/\\n/g,c):D;f.push(e),l+=n(e)}else switch(D.type){case\"cursor\":f.push(u.placeholder);break;case\"concat\":for(let t=D.parts.length-1;t>=0;t--)p.push([e,o,D.parts[t]]);break;case\"indent\":p.push([makeIndent(e,t),o,D.contents]);break;case\"align\":p.push([makeAlign(e,D.n,t),o,D.contents]);break;case\"trim\":l-=trim(f);break;case\"group\":switch(o){case 2:if(!h){p.push([e,D.break?1:2,D.contents]);break}case 1:{h=!1;const n=[e,2,D.contents],o=r-l;if(!D.break&&fits(n,p,o,t))p.push(n);else if(D.expandedStates){const r=D.expandedStates[D.expandedStates.length-1];if(D.break){p.push([e,1,r]);break}for(let n=1;n=D.expandedStates.length){p.push([e,1,r]);break}{const r=[e,2,D.expandedStates[n]];if(fits(r,p,o,t)){p.push(r);break}}}}else p.push([e,1,D.contents]);break}}D.id&&(a[D.id]=p[p.length-1][1]);break;case\"fill\":{const n=r-l,{parts:u}=D;if(0===u.length)break;const[a,c]=u,f=[e,2,a],h=[e,1,a],d=fits(f,[],n,t,!0);if(1===u.length){d?p.push(f):p.push(h);break}const g=[e,2,c],m=[e,1,c];if(2===u.length){d?(p.push(g),p.push(f)):(p.push(m),p.push(h));break}u.splice(0,2);const y=[e,o,s(u)],v=u[0];fits([e,2,i([a,c,v])],[],n,t,!0)?(p.push(y),p.push(g),p.push(f)):d?(p.push(y),p.push(m),p.push(f)):(p.push(y),p.push(m),p.push(h));break}case\"if-break\":{const t=D.groupId?a[D.groupId]:o;1===t&&D.breakContents&&p.push([e,o,D.breakContents]),2===t&&D.flatContents&&p.push([e,o,D.flatContents]);break}case\"line-suffix\":d.push([e,o,D.contents]);break;case\"line-suffix-boundary\":d.length>0&&p.push([e,o,{type:\"line\",hard:!0}]);break;case\"line\":switch(o){case 2:if(!D.hard){D.soft||(f.push(\" \"),l+=1);break}h=!0;case 1:if(d.length){p.push([e,o,D]),p.push(...d.reverse()),d=[];break}D.literal?e.root?(f.push(c,e.root.value),l=e.root.length):(f.push(c),l=0):(l-=trim(f),f.push(c+e.value),l=e.length)}}0===p.length&&d.length&&(p.push(...d.reverse()),d=[])}const D=f.indexOf(u.placeholder);if(-1!==D){const e=f.indexOf(u.placeholder,D+1),t=f.slice(0,D).join(\"\"),r=f.slice(D+1,e).join(\"\");return{formatted:t+r+f.slice(e+1).join(\"\"),cursorNodeStart:t.length,cursorNodeText:r}}return{formatted:f.join(\"\")}}}},630:(e,t,r)=>{\"use strict\";const{literalline:n,concat:o}=r(5558),i={};function traverseDoc(e,t,r,n){const o=[e];for(;0!==o.length;){const e=o.pop();if(e!==i){if(r&&o.push(e,i),!t||!1!==t(e))if(\"concat\"===e.type||\"fill\"===e.type)for(let t=e.parts.length-1;t>=0;--t)o.push(e.parts[t]);else if(\"if-break\"===e.type)e.flatContents&&o.push(e.flatContents),e.breakContents&&o.push(e.breakContents);else if(\"group\"===e.type&&e.expandedStates)if(n)for(let t=e.expandedStates.length-1;t>=0;--t)o.push(e.expandedStates[t]);else o.push(e.contents);else e.contents&&o.push(e.contents)}else r(o.pop())}}function mapDoc(e,t){if(\"concat\"===e.type||\"fill\"===e.type){const r=e.parts.map((e=>mapDoc(e,t)));return t(Object.assign({},e,{parts:r}))}if(\"if-break\"===e.type){const r=e.breakContents&&mapDoc(e.breakContents,t),n=e.flatContents&&mapDoc(e.flatContents,t);return t(Object.assign({},e,{breakContents:r,flatContents:n}))}if(e.contents){const r=mapDoc(e.contents,t);return t(Object.assign({},e,{contents:r}))}return t(e)}function findInDoc(e,t,r){let n=r,o=!1;return traverseDoc(e,(function(e){const r=t(e);if(void 0!==r&&(o=!0,n=r),o)return!1})),n}function isLineNextFn(e){return\"string\"!=typeof e&&(\"line\"===e.type||void 0)}function willBreakFn(e){return!(\"group\"!==e.type||!e.break)||(!(\"line\"!==e.type||!e.hard)||(\"break-parent\"===e.type||void 0))}function breakParentGroup(e){if(e.length>0){const t=e[e.length-1];t.expandedStates||(t.break=!0)}return null}function removeLinesFn(e){return\"line\"!==e.type||e.hard?\"if-break\"===e.type?e.flatContents||\"\":e:e.soft?\"\":\" \"}function normalizeParts(e){const t=[],r=e.filter(Boolean);for(;0!==r.length;){const e=r.shift();e&&(\"concat\"!==e.type?0===t.length||\"string\"!=typeof t[t.length-1]||\"string\"!=typeof e?t.push(e):t[t.length-1]+=e:r.unshift(...e.parts))}return t}e.exports={isEmpty:function(e){return\"string\"==typeof e&&0===e.length},willBreak:function(e){return findInDoc(e,willBreakFn,!1)},isLineNext:function(e){return findInDoc(e,isLineNextFn,!1)},traverseDoc,findInDoc,mapDoc,propagateBreaks:function(e){const t=new Set,r=[];traverseDoc(e,(function(e){if(\"break-parent\"===e.type&&breakParentGroup(r),\"group\"===e.type){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){if(\"group\"===e.type){r.pop().break&&breakParentGroup(r)}}),!0)},removeLines:function(e){return mapDoc(e,removeLinesFn)},stripTrailingHardline:function stripTrailingHardline(e,t=!1){if(\"concat\"===e.type&&0!==e.parts.length){const r=t?function(e){let t,{parts:r}=e;for(let n=e.parts.length;n>0&&!t;n--)t=r[n-1];return\"group\"===t.type&&(r=t.contents.parts),r}(e):e.parts,n=r[r.length-1];if(\"concat\"===n.type)return 2===n.parts.length&&n.parts[0].hard&&\"break-parent\"===n.parts[1].type?{type:\"concat\",parts:r.slice(0,-1)}:{type:\"concat\",parts:e.parts.slice(0,-1).concat(stripTrailingHardline(n))}}return e},normalizeParts,normalizeDoc:function(e){return mapDoc(e,(e=>e.parts?Object.assign({},e,{parts:normalizeParts(e.parts)}):e))},replaceNewlinesWithLiterallines:function(e){return mapDoc(e,(e=>\"string\"==typeof e&&e.includes(\"\\n\")?o(e.split(/(\\n)/g).map(((e,t)=>t%2==0?e:n))):e))}}},3091:(e,t,r)=>{\"use strict\";e.exports={builders:r(5558),printer:r(9765),utils:r(630),debug:r(3839)}},9355:(e,t,r)=>{\"use strict\";const n=r(6920),{getLast:o,skipEverythingButNewLine:i}=r(9428);function calculateLocStart(e,t){return\"number\"==typeof e.sourceIndex?e.sourceIndex:e.source?n(e.source.start,t)-1:null}function calculateLocEnd(e,t){if(\"css-comment\"===e.type&&e.inline)return i(t,e.source.startOffset);const r=e.nodes&&o(e.nodes);return r&&e.source&&!e.source.end&&(e=r),e.source&&e.source.end?n(e.source.end,t):null}function calculateValueNodeLoc(e,t,r){e.source&&(e.source.startOffset=calculateLocStart(e,r)+t,e.source.endOffset=calculateLocEnd(e,r)+t);for(const n in e){const o=e[n];\"source\"!==n&&o&&\"object\"==typeof o&&calculateValueNodeLoc(o,t,r)}}function getValueRootOffset(e){let t=e.source.startOffset;return\"string\"==typeof e.prop&&(t+=e.prop.length),\"css-atrule\"===e.type&&\"string\"==typeof e.name&&(t+=1+e.name.length+e.raws.afterName.match(/^\\s*:?\\s*/)[0].length),\"css-atrule\"!==e.type&&e.raws&&\"string\"==typeof e.raws.between&&(t+=e.raws.between.length),t}e.exports={locStart:function(e){return e.source.startOffset},locEnd:function(e){return e.source.endOffset},calculateLoc:function calculateLoc(e,t){e.source&&(e.source.startOffset=calculateLocStart(e,t),e.source.endOffset=calculateLocEnd(e,t));for(const r in e){const n=e[r];\"source\"!==r&&n&&\"object\"==typeof n&&(\"value-root\"===n.type||\"value-unknown\"===n.type?calculateValueNodeLoc(n,getValueRootOffset(e),n.text||n.value):calculateLoc(n,t))}},replaceQuotesInInlineComments:function(e){let t,r=\"initial\",n=\"initial\",o=!1;const i=[];for(let s=0;s{\"use strict\";const n=r(47),{parse:o}=r(3405),{hasPragma:i}=r(8850),{hasSCSSInterpolation:s,hasStringOrFunction:u,isLessParser:a,isSCSS:c,isSCSSNestedPropertyNode:l,isSCSSVariable:p,stringifyNode:f}=r(5244),{locStart:h,locEnd:d}=r(9355),{calculateLoc:D,replaceQuotesInInlineComments:g}=r(9355),getHighestAncestor=e=>{for(;e.parent;)e=e.parent;return e};function parseValueNode(e,t){const{nodes:r}=e;let n={open:null,close:null,groups:[],type:\"paren_group\"};const o=[n],i=n;let a={groups:[],type:\"comma_group\"};const l=[a];for(let i=0;i0&&n.groups.push(a),i}function flattenGroups(e){return\"paren_group\"!==e.type||e.open||e.close||1!==e.groups.length?\"comma_group\"===e.type&&1===e.groups.length?flattenGroups(e.groups[0]):\"paren_group\"===e.type||\"comma_group\"===e.type?Object.assign({},e,{groups:e.groups.map(flattenGroups)}):e:flattenGroups(e.groups[0])}function addTypePrefix(e,t,r){if(e&&\"object\"==typeof e){delete e.parent;for(const n in e)addTypePrefix(e[n],t,r),\"type\"===n&&\"string\"==typeof e[n]&&(e[n].startsWith(t)||r&&r.test(e[n])||(e[n]=t+e[n]))}return e}function addMissingType(e){if(e&&\"object\"==typeof e){delete e.parent;for(const t in e)addMissingType(e[t]);Array.isArray(e)||!e.value||e.type||(e.type=\"unknown\")}return e}function parseNestedValue(e,t){if(e&&\"object\"==typeof e){for(const r in e)\"parent\"!==r&&(parseNestedValue(e[r],t),\"nodes\"===r&&(e.group=flattenGroups(parseValueNode(e,t)),delete e[r]));delete e.parent}return e}function parseValue(e,t){const n=r(9962);let o=null;try{o=n(e,{loose:!0}).parse()}catch(t){return{type:\"value-unknown\",value:e}}o.text=e;return addTypePrefix(parseNestedValue(o,t),\"value-\",/^selector-/)}function parseSelector(e){if(/\\/\\/|\\/\\*/.test(e))return{type:\"selector-unknown\",value:e.trim()};const t=r(1264);let n=null;try{t((e=>{n=e})).process(e)}catch(t){return{type:\"selector-unknown\",value:e}}return addTypePrefix(n,\"selector-\")}function parseMediaQuery(e){const t=r(8322).Z;let n=null;try{n=t(e)}catch(t){return{type:\"selector-unknown\",value:e}}return addTypePrefix(addMissingType(n),\"media-\")}const m=/(\\s*?)(!default).*$/,y=/(\\s*?)(!global).*$/;function parseNestedCSS(e,t){if(e&&\"object\"==typeof e){delete e.parent;for(const r in e)parseNestedCSS(e[r],t);if(!e.type)return e;e.raws||(e.raws={});let r=\"\";\"string\"==typeof e.selector&&(r=e.raws.selector?e.raws.selector.scss?e.raws.selector.scss:e.raws.selector.raw:e.selector,e.raws.between&&e.raws.between.trim().length>0&&(r+=e.raws.between),e.raws.selector=r);let n=\"\";\"string\"==typeof e.value&&(n=e.raws.value?e.raws.value.scss?e.raws.value.scss:e.raws.value.raw:e.value,n=n.trim(),e.raws.value=n);let o=\"\";if(\"string\"==typeof e.params&&(o=e.raws.params?e.raws.params.scss?e.raws.params.scss:e.raws.params.raw:e.params,e.raws.afterName&&e.raws.afterName.trim().length>0&&(o=e.raws.afterName+o),e.raws.between&&e.raws.between.trim().length>0&&(o+=e.raws.between),o=o.trim(),e.raws.params=o),r.trim().length>0)return r.startsWith(\"@\")&&r.endsWith(\":\")?e:e.mixin?(e.selector=parseValue(r,t),e):(l(e)&&(e.isSCSSNesterProperty=!0),e.selector=parseSelector(r),e);if(n.length>0){const r=n.match(m);r&&(n=n.slice(0,r.index),e.scssDefault=!0,\"!default\"!==r[0].trim()&&(e.raws.scssDefault=r[0]));const o=n.match(y);if(o&&(n=n.slice(0,o.index),e.scssGlobal=!0,\"!global\"!==o[0].trim()&&(e.raws.scssGlobal=o[0])),n.startsWith(\"progid:\"))return{type:\"value-unknown\",value:n};e.value=parseValue(n,t)}if(a(t)&&\"css-decl\"===e.type&&n.startsWith(\"extend(\")&&(e.extend||(e.extend=\":\"===e.raws.between),e.extend&&!e.selector&&(delete e.value,e.selector=parseSelector(n.slice(\"extend(\".length,-1)))),\"css-atrule\"===e.type){if(a(t)){if(e.mixin){const t=e.raws.identifier+e.name+e.raws.afterName+e.raws.params;return e.selector=parseSelector(t),delete e.params,e}if(e.function)return e}if(\"css\"===t.parser&&\"custom-selector\"===e.name){const t=e.params.match(/:--\\S+?\\s+/)[0].trim();return e.customSelector=t,e.selector=parseSelector(e.params.slice(t.length).trim()),delete e.params,e}if(a(t)){if(e.name.includes(\":\")&&!e.params){e.variable=!0;const r=e.name.split(\":\");e.name=r[0],e.value=parseValue(r.slice(1).join(\":\"),t)}if(![\"page\",\"nest\"].includes(e.name)&&e.params&&\":\"===e.params[0]&&(e.variable=!0,e.value=parseValue(e.params.slice(1),t),e.raws.afterName+=\":\"),e.variable)return delete e.params,e}}if(\"css-atrule\"===e.type&&o.length>0){const{name:r}=e,n=e.name.toLowerCase();return\"warn\"===r||\"error\"===r?(e.params={type:\"media-unknown\",value:o},e):\"extend\"===r||\"nest\"===r?(e.selector=parseSelector(o),delete e.params,e):\"at-root\"===r?(/^\\(\\s*(without|with)\\s*:[\\S\\s]+\\)$/.test(o)?e.params=parseValue(o,t):(e.selector=parseSelector(o),delete e.params),e):\"import\"===n?(e.import=!0,delete e.filename,e.params=parseValue(o,t),e):[\"namespace\",\"supports\",\"if\",\"else\",\"for\",\"each\",\"while\",\"debug\",\"mixin\",\"include\",\"function\",\"return\",\"define-mixin\",\"add-mixin\"].includes(r)?(o=o.replace(/(\\$\\S+?)\\s+?\\.{3}/,\"$1...\"),o=o.replace(/^(?!if)(\\S+)\\s+\\(/,\"$1(\"),e.value=parseValue(o,t),delete e.params,e):[\"media\",\"custom-media\"].includes(n)?o.includes(\"#{\")?{type:\"media-unknown\",value:o}:(e.params=parseMediaQuery(o),e):(e.params=o,e)}}return e}function parseWithParser(e,t,r){const i=o(t),{frontMatter:s}=i;let u;t=i.content;try{u=e(t)}catch(e){const{name:t,reason:r,line:o,column:i}=e;if(\"number\"!=typeof o)throw e;throw n(\"\".concat(t,\": \").concat(r),{start:{line:o,column:i}})}return u=parseNestedCSS(addTypePrefix(u,\"css-\"),r),D(u,t),s&&(s.source={startOffset:0,endOffset:s.raw.length},u.nodes.unshift(s)),u}function parseLess(e,t,n){const o=r(7371);return parseWithParser((e=>o.parse(g(e))),e,n)}function parseScss(e,t,n){const{parse:o}=r(304);return parseWithParser(o,e,n)}const v={astFormat:\"postcss\",hasPragma:i,locStart:h,locEnd:d};e.exports={parsers:{css:Object.assign({},v,{parse:function(e,t,r){const n=c(r.parser,e)?[parseScss,parseLess]:[parseLess,parseScss];let o;for(const i of n)try{return i(e,t,r)}catch(e){o=o||e}if(o)throw o}}),less:Object.assign({},v,{parse:parseLess}),scss:Object.assign({},v,{parse:parseScss})}}},8850:(e,t,r)=>{\"use strict\";const n=r(3831),{parse:o}=r(3405);e.exports={hasPragma:function(e){return n.hasPragma(o(e).content)},insertPragma:function(e){const{frontMatter:t,content:r}=o(e);return(t?t.raw+\"\\n\\n\":\"\")+n.insertPragma(r)}}},5244:e=>{\"use strict\";const t=new Set([\"red\",\"green\",\"blue\",\"alpha\",\"a\",\"rgb\",\"hue\",\"h\",\"saturation\",\"s\",\"lightness\",\"l\",\"whiteness\",\"w\",\"blackness\",\"b\",\"tint\",\"shade\",\"blend\",\"blenda\",\"contrast\",\"hsl\",\"hsla\",\"hwb\",\"hwba\"]);function getAncestorCounter(e,t){const r=[].concat(t);let n,o=-1;for(;n=e.getParentNode(++o);)if(r.includes(n.type))return o;return-1}function getAncestorNode(e,t){const r=getAncestorCounter(e,t);return-1===r?null:e.getParentNode(r)}function isMultiplicationNode(e){return\"value-operator\"===e.type&&\"*\"===e.value}function isDivisionNode(e){return\"value-operator\"===e.type&&\"/\"===e.value}function isAdditionNode(e){return\"value-operator\"===e.type&&\"+\"===e.value}function isSubtractionNode(e){return\"value-operator\"===e.type&&\"-\"===e.value}function isModuloNode(e){return\"value-operator\"===e.type&&\"%\"===e.value}function isKeyValuePairNode(e){return\"value-comma_group\"===e.type&&e.groups&&e.groups[1]&&\"value-colon\"===e.groups[1].type}function isKeyValuePairInParenGroupNode(e){return\"value-paren_group\"===e.type&&e.groups&&e.groups[0]&&isKeyValuePairNode(e.groups[0])}e.exports={getAncestorCounter,getAncestorNode,getPropOfDeclNode:function(e){const t=getAncestorNode(e,\"css-decl\");return t&&t.prop&&t.prop.toLowerCase()},hasSCSSInterpolation:function(e){if(e&&e.length)for(let t=e.length-1;t>0;t--)if(\"word\"===e[t].type&&\"{\"===e[t].value&&\"word\"===e[t-1].type&&e[t-1].value.endsWith(\"#\"))return!0;return!1},hasStringOrFunction:function(e){if(e&&e.length)for(let t=0;t\",\"<=\",\">=\"].includes(e.value)},isEqualityOperatorNode:function(e){return\"value-word\"===e.type&&[\"==\",\"!=\"].includes(e.value)},isMultiplicationNode,isDivisionNode,isAdditionNode,isSubtractionNode,isModuloNode,isMathOperatorNode:function(e){return isMultiplicationNode(e)||isDivisionNode(e)||isAdditionNode(e)||isSubtractionNode(e)||isModuloNode(e)},isEachKeywordNode:function(e){return\"value-word\"===e.type&&\"in\"===e.value},isForKeywordNode:function(e){return\"value-word\"===e.type&&[\"from\",\"through\",\"end\"].includes(e.value)},isURLFunctionNode:function(e){return\"value-func\"===e.type&&\"url\"===e.value.toLowerCase()},isIfElseKeywordNode:function(e){return\"value-word\"===e.type&&[\"and\",\"or\",\"not\"].includes(e.value)},hasComposesNode:function(e){return e.value&&\"value-root\"===e.value.type&&e.value.group&&\"value-value\"===e.value.group.type&&\"composes\"===e.prop.toLowerCase()},hasParensAroundNode:function(e){return e.value&&e.value.group&&e.value.group.group&&\"value-paren_group\"===e.value.group.group.type&&null!==e.value.group.group.open&&null!==e.value.group.group.close},hasEmptyRawBefore:function(e){return e.raws&&\"\"===e.raws.before},isSCSSNestedPropertyNode:function(e){return!!e.selector&&e.selector.replace(/\\/\\*.*?\\*\\//,\"\").replace(/\\/\\/.*?\\n/,\"\").trim().endsWith(\":\")},isDetachedRulesetCallNode:function(e){return e.raws&&e.raws.params&&/^\\(\\s*\\)$/.test(e.raws.params)},isTemplatePlaceholderNode:function(e){return e.name.startsWith(\"prettier-placeholder\")},isTemplatePropNode:function(e){return e.prop.startsWith(\"@prettier-placeholder\")},isPostcssSimpleVarNode:function(e,t){return\"$$\"===e.value&&\"value-func\"===e.type&&t&&\"value-word\"===t.type&&!t.raws.before},isKeyValuePairNode,isKeyValuePairInParenGroupNode,isSCSSMapItemNode:function(e){const t=e.getValue();if(0===t.groups.length)return!1;const r=e.getParentNode(1);if(!(isKeyValuePairInParenGroupNode(t)||r&&isKeyValuePairInParenGroupNode(r)))return!1;const n=getAncestorNode(e,\"css-decl\");return!!(n&&n.prop&&n.prop.startsWith(\"$\"))||(!!isKeyValuePairInParenGroupNode(r)||\"value-func\"===r.type)},isInlineValueCommentNode:function(e){return\"value-comment\"===e.type&&e.inline},isHashNode:function(e){return\"value-word\"===e.type&&\"#\"===e.value},isLeftCurlyBraceNode:function(e){return\"value-word\"===e.type&&\"{\"===e.value},isRightCurlyBraceNode:function(e){return\"value-word\"===e.type&&\"}\"===e.value},isWordNode:function(e){return[\"value-word\",\"value-atword\"].includes(e.type)},isColonNode:function(e){return\"value-colon\"===e.type},isMediaAndSupportsKeywords:function(e){return e.value&&[\"not\",\"and\",\"or\"].includes(e.value.toLowerCase())},isColorAdjusterFuncNode:function(e){return\"value-func\"===e.type&&t.has(e.value.toLowerCase())},lastLineHasInlineComment:function(e){return/\\/\\//.test(e.split(/[\\n\\r]/).pop())},stringifyNode:function stringifyNode(e){if(e.groups){return(e.open&&e.open.value?e.open.value:\"\")+e.groups.reduce(((t,r,n)=>t+stringifyNode(r)+(\"comma_group\"===e.groups[0].type&&n!==e.groups.length-1?\",\":\"\")),\"\")+(e.close&&e.close.value?e.close.value:\"\")}const t=e.raws&&e.raws.before?e.raws.before:\"\",r=e.raws&&e.raws.quote?e.raws.quote:\"\";return t+r+(\"atword\"===e.type?\"@\":\"\")+(e.value?e.value:\"\")+r+(e.unit?e.unit:\"\")+(e.group?stringifyNode(e.group):\"\")+(e.raws&&e.raws.after?e.raws.after:\"\")},isAtWordPlaceholderNode:function(e){return e&&\"value-atword\"===e.type&&e.value.startsWith(\"prettier-placeholder-\")}}},3831:(e,t,r)=>{\"use strict\";const{parseWithComments:n,strip:o,extract:i,print:s}=r(9234),{getShebang:u}=r(9428),{normalizeEndOfLine:a}=r(7933);function parseDocBlock(e){const t=u(e);t&&(e=e.slice(t.length+1));const r=i(e),{pragmas:o,comments:s}=n(r);return{shebang:t,text:e,pragmas:o,comments:s}}e.exports={hasPragma:function(e){const t=Object.keys(parseDocBlock(e).pragmas);return t.includes(\"prettier\")||t.includes(\"format\")},insertPragma:function(e){const{shebang:t,text:r,pragmas:n,comments:i}=parseDocBlock(e),u=o(r),c=s({pragmas:Object.assign({format:\"\"},n),comments:i.trimStart()});return(t?\"\".concat(t,\"\\n\"):\"\")+a(c)+(u.startsWith(\"\\n\")?\"\\n\":\"\\n\\n\")+u}}},8988:(e,t,r)=>{\"use strict\";function _templateObject6(){const e=_taggedTemplateLiteral([\"\\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\\n in order for it to be formatted.\\n \"]);return _templateObject6=function(){return e},e}function _templateObject5(){const e=_taggedTemplateLiteral([\"\\n Format code starting at a given character offset.\\n The range will extend backwards to the start of the first line containing the selected statement.\\n This option cannot be used with --cursor-offset.\\n \"]);return _templateObject5=function(){return e},e}function _templateObject4(){const e=_taggedTemplateLiteral([\"\\n Format code ending at a given character offset (exclusive).\\n The range will extend forwards to the end of the selected statement.\\n This option cannot be used with --cursor-offset.\\n \"]);return _templateObject4=function(){return e},e}function _templateObject3(){const e=_taggedTemplateLiteral([\"\\n Custom directory that contains prettier plugins in node_modules subdirectory.\\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\\n Multiple values are accepted.\\n \"]);return _templateObject3=function(){return e},e}function _templateObject2(){const e=_taggedTemplateLiteral([\"\\n Maintain existing\\n (mixed values within one file are normalised by looking at what's used after the first line)\\n \"]);return _templateObject2=function(){return e},e}function _templateObject(){const e=_taggedTemplateLiteral([\"\\n Print (to stderr) where a cursor at the given position would move to after formatting.\\n This option cannot be used with --range-start and --range-end.\\n \"]);return _templateObject=function(){return e},e}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const{outdent:n}=r(5311),o=\"Config\",i=\"Editor\",s=\"Other\",u=\"Global\",a=\"Special\",c={cursorOffset:{since:\"1.4.0\",category:a,type:\"int\",default:-1,range:{start:-1,end:1/0,step:1},description:n(_templateObject()),cliCategory:i},endOfLine:{since:\"1.15.0\",category:u,type:\"choice\",default:[{since:\"1.15.0\",value:\"auto\"},{since:\"2.0.0\",value:\"lf\"}],description:\"Which end of line characters to apply.\",choices:[{value:\"lf\",description:\"Line Feed only (\\\\n), common on Linux and macOS as well as inside git repos\"},{value:\"crlf\",description:\"Carriage Return + Line Feed characters (\\\\r\\\\n), common on Windows\"},{value:\"cr\",description:\"Carriage Return character only (\\\\r), used very rarely\"},{value:\"auto\",description:n(_templateObject2())}]},filepath:{since:\"1.4.0\",category:a,type:\"path\",description:\"Specify the input filepath. This will be used to do parser inference.\",cliName:\"stdin-filepath\",cliCategory:s,cliDescription:\"Path to the file to pretend that stdin comes from.\"},insertPragma:{since:\"1.8.0\",category:a,type:\"boolean\",default:!1,description:\"Insert @format pragma into file's first docblock comment.\",cliCategory:s},parser:{since:\"0.0.10\",category:u,type:\"choice\",default:[{since:\"0.0.10\",value:\"babylon\"},{since:\"1.13.0\",value:void 0}],description:\"Which parser to use.\",exception:e=>\"string\"==typeof e||\"function\"==typeof e,choices:[{value:\"flow\",description:\"Flow\"},{value:\"babel\",since:\"1.16.0\",description:\"JavaScript\"},{value:\"babel-flow\",since:\"1.16.0\",description:\"Flow\"},{value:\"babel-ts\",since:\"2.0.0\",description:\"TypeScript\"},{value:\"typescript\",since:\"1.4.0\",description:\"TypeScript\"},{value:\"espree\",since:\"2.2.0\",description:\"JavaScript\"},{value:\"meriyah\",since:\"2.2.0\",description:\"JavaScript\"},{value:\"css\",since:\"1.7.1\",description:\"CSS\"},{value:\"less\",since:\"1.7.1\",description:\"Less\"},{value:\"scss\",since:\"1.7.1\",description:\"SCSS\"},{value:\"json\",since:\"1.5.0\",description:\"JSON\"},{value:\"json5\",since:\"1.13.0\",description:\"JSON5\"},{value:\"json-stringify\",since:\"1.13.0\",description:\"JSON.stringify\"},{value:\"graphql\",since:\"1.5.0\",description:\"GraphQL\"},{value:\"markdown\",since:\"1.8.0\",description:\"Markdown\"},{value:\"mdx\",since:\"1.15.0\",description:\"MDX\"},{value:\"vue\",since:\"1.10.0\",description:\"Vue\"},{value:\"yaml\",since:\"1.14.0\",description:\"YAML\"},{value:\"glimmer\",since:null,description:\"Handlebars\"},{value:\"html\",since:\"1.15.0\",description:\"HTML\"},{value:\"angular\",since:\"1.15.0\",description:\"Angular\"},{value:\"lwc\",since:\"1.17.0\",description:\"Lightning Web Components\"}]},plugins:{since:\"1.10.0\",type:\"path\",array:!0,default:[{value:[]}],category:u,description:\"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.\",exception:e=>\"string\"==typeof e||\"object\"==typeof e,cliName:\"plugin\",cliCategory:o},pluginSearchDirs:{since:\"1.13.0\",type:\"path\",array:!0,default:[{value:[]}],category:u,description:n(_templateObject3()),exception:e=>\"string\"==typeof e||\"object\"==typeof e,cliName:\"plugin-search-dir\",cliCategory:o},printWidth:{since:\"0.0.0\",category:u,type:\"int\",default:80,description:\"The line length where Prettier will try wrap.\",range:{start:0,end:1/0,step:1}},rangeEnd:{since:\"1.4.0\",category:a,type:\"int\",default:1/0,range:{start:0,end:1/0,step:1},description:n(_templateObject4()),cliCategory:i},rangeStart:{since:\"1.4.0\",category:a,type:\"int\",default:0,range:{start:0,end:1/0,step:1},description:n(_templateObject5()),cliCategory:i},requirePragma:{since:\"1.7.0\",category:a,type:\"boolean\",default:!1,description:n(_templateObject6()),cliCategory:s},tabWidth:{type:\"int\",category:u,default:2,description:\"Number of spaces per indentation level.\",range:{start:0,end:1/0,step:1}},useTabs:{since:\"1.0.0\",category:u,type:\"boolean\",default:!1,description:\"Indent with tabs instead of spaces.\"},embeddedLanguageFormatting:{since:\"2.1.0\",category:u,type:\"choice\",default:[{since:\"2.1.0\",value:\"auto\"}],description:\"Control how Prettier formats quoted code embedded in the file.\",choices:[{value:\"auto\",description:\"Format embedded code if Prettier can automatically identify it.\"},{value:\"off\",description:\"Never automatically format embedded code.\"}]}};e.exports={CATEGORY_CONFIG:o,CATEGORY_EDITOR:i,CATEGORY_FORMAT:\"Format\",CATEGORY_OTHER:s,CATEGORY_OUTPUT:\"Output\",CATEGORY_GLOBAL:u,CATEGORY_SPECIAL:a,options:c}},7290:(e,t,r)=>{\"use strict\";const n={compare:r(2828),lt:r(3725),gte:r(9195)},o=r(9077),i=r(306).i8,s=r(8988).options;e.exports={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:r=!1,showInternal:u=!1}={}){const a=i.split(\"-\",1)[0],c=e.reduce(((e,t)=>e.concat(t.languages||[])),[]).filter(filterSince),l=o(Object.assign({},...e.map((({options:e})=>e)),s),\"name\").filter((e=>filterSince(e)&&filterDeprecated(e))).sort(((e,t)=>e.name===t.name?0:e.name=0||(o[r]=e[r]);return o}(e,[\"cliName\",\"cliCategory\",\"cliDescription\"])})).map((t=>{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(filterSince).sort(((e,t)=>n.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>filterSince(e)&&filterDeprecated(e))),\"parser\"===t.name&&function(e,t,r){const n=new Set(e.choices.map((e=>e.value)));for(const o of t)if(o.parsers)for(const t of o.parsers)if(!n.has(t)){n.add(t);const i=r.find((e=>e.parsers&&e.parsers[t]));let s=o.name;i&&i.name&&(s+=\" (plugin: \".concat(i.name,\")\")),e.choices.push({value:t,description:s})}}(t,c,e));const r=e.filter((e=>e.defaultOptions&&void 0!==e.defaultOptions[t.name])).reduce(((e,r)=>(e[r.name]=r.defaultOptions[t.name],e)),{});return Object.assign({},t,{pluginDefaults:r})}));return{languages:c,options:l};function filterSince(e){return t||!(\"since\"in e)||e.since&&n.gte(a,e.since)}function filterDeprecated(e){return r||!(\"deprecated\"in e)||e.deprecated&&n.lt(a,e.deprecated)}}}},9077:e=>{\"use strict\";e.exports=(e,t)=>Object.entries(e).map((([e,r])=>Object.assign({[t]:e},r)))},3405:(e,t,r)=>{\"use strict\";const n=r(2240),{builders:{hardline:o,concat:i,markAsRoot:s}}=r(3091),u={\"---\":\"yaml\",\"+++\":\"toml\"};e.exports={parse:function(e){const t=Object.keys(u).map(n).join(\"|\"),r=e.match(new RegExp(\"^(\".concat(t,\")([^\\\\n]*)\\\\n(?:([\\\\s\\\\S]*?)\\\\n)?\\\\1[^\\\\n\\\\S]*(\\\\n|$)\")));if(null===r)return{frontMatter:null,content:e};const[o,i,s,a]=r;let c=u[i];return\"toml\"!==c&&s&&s.trim()&&(c=s.trim()),{frontMatter:{type:\"front-matter\",lang:c,value:a,raw:o.replace(/\\n$/,\"\")},content:o.replace(/[^\\n]/g,\" \")+e.slice(o.length)}},print:function(e,t){if(\"yaml\"===e.lang){const r=e.value.trim(),n=r?t(r,{parser:\"yaml\"},{stripTrailingHardline:!0}):\"\";return s(i([\"---\",o,n,n?o:\"\",\"---\"]))}}}},4652:e=>{\"use strict\";e.exports=e=>e[e.length-1]},6920:e=>{\"use strict\";e.exports=function(e,t){let r=0;for(let n=0;n{\"use strict\";e.exports={i8:\"2.2.1\"}},7545:(e,t,r)=>{\"use strict\";r.r(t),r.d(t,{existsSync:()=>existsSync,readFileSync:()=>readFileSync,default:()=>n});const existsSync=()=>!1,readFileSync=()=>\"\",n={existsSync,readFileSync}},9623:(e,t,r)=>{\"use strict\";r.r(t),r.d(t,{default:()=>n});const n={EOL:\"\\n\",platform:()=>\"browser\",cpus:()=>[{model:\"Prettier\"}]}},6391:(e,t,r)=>{\"use strict\";r.r(t),r.d(t,{default:()=>n});var n=r(5724),o={};for(const e in n)\"default\"!==e&&(o[e]=()=>n[e]);r.d(t,o)},5208:()=>{},7027:()=>{},825:()=>{},1758:()=>{}},t={};function __webpack_require__(r){if(t[r])return t[r].exports;var n=t[r]={id:r,loaded:!1,exports:{}};return e[r](n,n.exports,__webpack_require__),n.loaded=!0,n.exports}return __webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,\"exports\",{enumerable:!0,set:()=>{throw new Error(\"ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: \"+e.id)}}),e),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},__webpack_require__(738)})()}));","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar defineProperty = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) { /**/ }\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\n// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target\nvar setProperty = function setProperty(target, options) {\n\tif (defineProperty && options.name === '__proto__') {\n\t\tdefineProperty(target, options.name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tvalue: options.newValue,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\ttarget[options.name] = options.newValue;\n\t}\n};\n\n// Return undefined instead of __proto__ if '__proto__' is not an own property\nvar getProperty = function getProperty(obj, name) {\n\tif (name === '__proto__') {\n\t\tif (!hasOwn.call(obj, name)) {\n\t\t\treturn void 0;\n\t\t} else if (gOPD) {\n\t\t\t// In early versions of node, obj['__proto__'] is buggy when obj has\n\t\t\t// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.\n\t\t\treturn gOPD(obj, name).value;\n\t\t}\n\t}\n\n\treturn obj[name];\n};\n\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone;\n\tvar target = arguments[0];\n\tvar i = 1;\n\tvar length = arguments.length;\n\tvar deep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\tif (target == null || (typeof target !== 'object' && typeof target !== 'function')) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = getProperty(target, name);\n\t\t\t\tcopy = getProperty(options, name);\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: extend(deep, clone, copy) });\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: copy });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n","'use strict'\n\nfunction miniflat(value) {\n return value === null || value === undefined\n ? []\n : 'length' in value\n ? value\n : [value]\n}\n\nmodule.exports = miniflat\n","'use strict'\n\nvar chunkedSplice = require('./chunked-splice.js')\n\nfunction chunkedPush(list, items) {\n if (list.length) {\n chunkedSplice(list, list.length, 0, items)\n return list\n }\n\n return items\n}\n\nmodule.exports = chunkedPush\n","'use strict'\n\n// Note: EOF is seen as ASCII control here, because `null < 32 == true`.\nfunction asciiControl(code) {\n return (\n // Special whitespace codes (which have negative values), C0 and Control\n // character DEL\n code < 32 || code === 127\n )\n}\n\nmodule.exports = asciiControl\n","'use strict'\n\n/* eslint-env browser */\n\nvar el\n\nvar semicolon = 59 // ';'\n\nmodule.exports = decodeEntity\n\nfunction decodeEntity(characters) {\n var entity = '&' + characters + ';'\n var char\n\n el = el || document.createElement('i')\n el.innerHTML = entity\n char = el.textContent\n\n // Some entities do not require the closing semicolon (`¬` - for instance),\n // which leads to situations where parsing the assumed entity of ¬it; will\n // result in the string `¬it;`. When we encounter a trailing semicolon after\n // parsing and the entity to decode was not a semicolon (`;`), we can\n // assume that the matching was incomplete\n if (char.charCodeAt(char.length - 1) === semicolon && characters !== 'semi') {\n return false\n }\n\n // If the decoded string is equal to the input, the entity was not valid\n return char === entity ? false : char\n}\n","'use strict'\n\nvar chunkedSplice = require('../util/chunked-splice.js')\nvar chunkedPush = require('../util/chunked-push.js')\nvar normalizeIdentifier = require('../util/normalize-identifier.js')\nvar shallow = require('../util/shallow.js')\nvar resolveAll = require('../util/resolve-all.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar factoryDestination = require('./factory-destination.js')\nvar factoryLabel = require('./factory-label.js')\nvar factoryWhitespace = require('./factory-whitespace.js')\nvar factoryTitle = require('./factory-title.js')\n\nvar labelEnd = {\n name: 'labelEnd',\n tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\n}\nvar resourceConstruct = {\n tokenize: tokenizeResource\n}\nvar fullReferenceConstruct = {\n tokenize: tokenizeFullReference\n}\nvar collapsedReferenceConstruct = {\n tokenize: tokenizeCollapsedReference\n}\n\nfunction resolveAllLabelEnd(events) {\n var index = -1\n var token\n\n while (++index < events.length) {\n token = events[index][1]\n\n if (\n !token._used &&\n (token.type === 'labelImage' ||\n token.type === 'labelLink' ||\n token.type === 'labelEnd')\n ) {\n // Remove the marker.\n events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)\n token.type = 'data'\n index++\n }\n }\n\n return events\n}\n\nfunction resolveToLabelEnd(events, context) {\n var index = events.length\n var offset = 0\n var group\n var label\n var text\n var token\n var open\n var close\n var media // Find an opening.\n\n while (index--) {\n token = events[index][1]\n\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (\n token.type === 'link' ||\n (token.type === 'labelLink' && token._inactive)\n ) {\n break\n } // Mark other link openings as inactive, as we can’t have links in\n // links.\n\n if (events[index][0] === 'enter' && token.type === 'labelLink') {\n token._inactive = true\n }\n } else if (close) {\n if (\n events[index][0] === 'enter' &&\n (token.type === 'labelImage' || token.type === 'labelLink') &&\n !token._balanced\n ) {\n open = index\n\n if (token.type !== 'labelLink') {\n offset = 2\n break\n }\n }\n } else if (token.type === 'labelEnd') {\n close = index\n }\n }\n\n group = {\n type: events[open][1].type === 'labelLink' ? 'link' : 'image',\n start: shallow(events[open][1].start),\n end: shallow(events[events.length - 1][1].end)\n }\n label = {\n type: 'label',\n start: shallow(events[open][1].start),\n end: shallow(events[close][1].end)\n }\n text = {\n type: 'labelText',\n start: shallow(events[open + offset + 2][1].end),\n end: shallow(events[close - 2][1].start)\n }\n media = [\n ['enter', group, context],\n ['enter', label, context]\n ] // Opening marker.\n\n media = chunkedPush(media, events.slice(open + 1, open + offset + 3)) // Text open.\n\n media = chunkedPush(media, [['enter', text, context]]) // Between.\n\n media = chunkedPush(\n media,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + offset + 4, close - 3),\n context\n )\n ) // Text close, marker close, label close.\n\n media = chunkedPush(media, [\n ['exit', text, context],\n events[close - 2],\n events[close - 1],\n ['exit', label, context]\n ]) // Reference, resource, or so.\n\n media = chunkedPush(media, events.slice(close + 1)) // Media close.\n\n media = chunkedPush(media, [['exit', group, context]])\n chunkedSplice(events, open, events.length, media)\n return events\n}\n\nfunction tokenizeLabelEnd(effects, ok, nok) {\n var self = this\n var index = self.events.length\n var labelStart\n var defined // Find an opening.\n\n while (index--) {\n if (\n (self.events[index][1].type === 'labelImage' ||\n self.events[index][1].type === 'labelLink') &&\n !self.events[index][1]._balanced\n ) {\n labelStart = self.events[index][1]\n break\n }\n }\n\n return start\n\n function start(code) {\n if (!labelStart) {\n return nok(code)\n } // It’s a balanced bracket, but contains a link.\n\n if (labelStart._inactive) return balanced(code)\n defined =\n self.parser.defined.indexOf(\n normalizeIdentifier(\n self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })\n )\n ) > -1\n effects.enter('labelEnd')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelEnd')\n return afterLabelEnd\n }\n\n function afterLabelEnd(code) {\n // Resource: `[asd](fgh)`.\n if (code === 40) {\n return effects.attempt(\n resourceConstruct,\n ok,\n defined ? ok : balanced\n )(code)\n } // Collapsed (`[asd][]`) or full (`[asd][fgh]`) reference?\n\n if (code === 91) {\n return effects.attempt(\n fullReferenceConstruct,\n ok,\n defined\n ? effects.attempt(collapsedReferenceConstruct, ok, balanced)\n : balanced\n )(code)\n } // Shortcut reference: `[asd]`?\n\n return defined ? ok(code) : balanced(code)\n }\n\n function balanced(code) {\n labelStart._balanced = true\n return nok(code)\n }\n}\n\nfunction tokenizeResource(effects, ok, nok) {\n return start\n\n function start(code) {\n effects.enter('resource')\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n return factoryWhitespace(effects, open)\n }\n\n function open(code) {\n if (code === 41) {\n return end(code)\n }\n\n return factoryDestination(\n effects,\n destinationAfter,\n nok,\n 'resourceDestination',\n 'resourceDestinationLiteral',\n 'resourceDestinationLiteralMarker',\n 'resourceDestinationRaw',\n 'resourceDestinationString',\n 3\n )(code)\n }\n\n function destinationAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, between)(code)\n : end(code)\n }\n\n function between(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(\n effects,\n factoryWhitespace(effects, end),\n nok,\n 'resourceTitle',\n 'resourceTitleMarker',\n 'resourceTitleString'\n )(code)\n }\n\n return end(code)\n }\n\n function end(code) {\n if (code === 41) {\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n effects.exit('resource')\n return ok\n }\n\n return nok(code)\n }\n}\n\nfunction tokenizeFullReference(effects, ok, nok) {\n var self = this\n return start\n\n function start(code) {\n return factoryLabel.call(\n self,\n effects,\n afterLabel,\n nok,\n 'reference',\n 'referenceMarker',\n 'referenceString'\n )(code)\n }\n\n function afterLabel(code) {\n return self.parser.defined.indexOf(\n normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n ) < 0\n ? nok(code)\n : ok(code)\n }\n}\n\nfunction tokenizeCollapsedReference(effects, ok, nok) {\n return start\n\n function start(code) {\n effects.enter('reference')\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n return open\n }\n\n function open(code) {\n if (code === 93) {\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n effects.exit('reference')\n return ok\n }\n\n return nok(code)\n }\n}\n\nmodule.exports = labelEnd\n","'use strict'\n\nvar start = factory('start')\nvar end = factory('end')\n\nmodule.exports = position\n\nposition.start = start\nposition.end = end\n\nfunction position(node) {\n return {start: start(node), end: end(node)}\n}\n\nfunction factory(type) {\n point.displayName = type\n\n return point\n\n function point(node) {\n var point = (node && node.position && node.position[type]) || {}\n\n return {\n line: point.line || null,\n column: point.column || null,\n offset: isNaN(point.offset) ? null : point.offset\n }\n }\n}\n","module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n","'use strict'\n\nmodule.exports = normalize\n\nfunction normalize(value) {\n return value.toLowerCase()\n}\n","'use strict'\n\nexports.parse = parse\nexports.stringify = stringify\n\nvar empty = ''\nvar space = ' '\nvar whiteSpace = /[ \\t\\n\\r\\f]+/g\n\nfunction parse(value) {\n var input = String(value || empty).trim()\n return input === empty ? [] : input.split(whiteSpace)\n}\n\nfunction stringify(values) {\n return values.join(space).trim()\n}\n","module.exports = phrasing\n\nfunction phrasing(parent, context, safeOptions) {\n var children = parent.children || []\n var results = []\n var index = -1\n var before = safeOptions.before\n var after\n var handle\n var child\n\n while (++index < children.length) {\n child = children[index]\n\n if (index + 1 < children.length) {\n handle = context.handle.handlers[children[index + 1].type]\n if (handle && handle.peek) handle = handle.peek\n after = handle\n ? handle(children[index + 1], parent, context, {\n before: '',\n after: ''\n }).charAt(0)\n : ''\n } else {\n after = safeOptions.after\n }\n\n results.push(\n context.handle(child, parent, context, {\n before: before,\n after: after\n })\n )\n before = results[results.length - 1].slice(-1)\n }\n\n return results.join('')\n}\n","'use strict';\n\nconst UNDEFINED_CODE_POINTS = [\n 0xfffe,\n 0xffff,\n 0x1fffe,\n 0x1ffff,\n 0x2fffe,\n 0x2ffff,\n 0x3fffe,\n 0x3ffff,\n 0x4fffe,\n 0x4ffff,\n 0x5fffe,\n 0x5ffff,\n 0x6fffe,\n 0x6ffff,\n 0x7fffe,\n 0x7ffff,\n 0x8fffe,\n 0x8ffff,\n 0x9fffe,\n 0x9ffff,\n 0xafffe,\n 0xaffff,\n 0xbfffe,\n 0xbffff,\n 0xcfffe,\n 0xcffff,\n 0xdfffe,\n 0xdffff,\n 0xefffe,\n 0xeffff,\n 0xffffe,\n 0xfffff,\n 0x10fffe,\n 0x10ffff\n];\n\nexports.REPLACEMENT_CHARACTER = '\\uFFFD';\n\nexports.CODE_POINTS = {\n EOF: -1,\n NULL: 0x00,\n TABULATION: 0x09,\n CARRIAGE_RETURN: 0x0d,\n LINE_FEED: 0x0a,\n FORM_FEED: 0x0c,\n SPACE: 0x20,\n EXCLAMATION_MARK: 0x21,\n QUOTATION_MARK: 0x22,\n NUMBER_SIGN: 0x23,\n AMPERSAND: 0x26,\n APOSTROPHE: 0x27,\n HYPHEN_MINUS: 0x2d,\n SOLIDUS: 0x2f,\n DIGIT_0: 0x30,\n DIGIT_9: 0x39,\n SEMICOLON: 0x3b,\n LESS_THAN_SIGN: 0x3c,\n EQUALS_SIGN: 0x3d,\n GREATER_THAN_SIGN: 0x3e,\n QUESTION_MARK: 0x3f,\n LATIN_CAPITAL_A: 0x41,\n LATIN_CAPITAL_F: 0x46,\n LATIN_CAPITAL_X: 0x58,\n LATIN_CAPITAL_Z: 0x5a,\n RIGHT_SQUARE_BRACKET: 0x5d,\n GRAVE_ACCENT: 0x60,\n LATIN_SMALL_A: 0x61,\n LATIN_SMALL_F: 0x66,\n LATIN_SMALL_X: 0x78,\n LATIN_SMALL_Z: 0x7a,\n REPLACEMENT_CHARACTER: 0xfffd\n};\n\nexports.CODE_POINT_SEQUENCES = {\n DASH_DASH_STRING: [0x2d, 0x2d], //--\n DOCTYPE_STRING: [0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45], //DOCTYPE\n CDATA_START_STRING: [0x5b, 0x43, 0x44, 0x41, 0x54, 0x41, 0x5b], //[CDATA[\n SCRIPT_STRING: [0x73, 0x63, 0x72, 0x69, 0x70, 0x74], //script\n PUBLIC_STRING: [0x50, 0x55, 0x42, 0x4c, 0x49, 0x43], //PUBLIC\n SYSTEM_STRING: [0x53, 0x59, 0x53, 0x54, 0x45, 0x4d] //SYSTEM\n};\n\n//Surrogates\nexports.isSurrogate = function(cp) {\n return cp >= 0xd800 && cp <= 0xdfff;\n};\n\nexports.isSurrogatePair = function(cp) {\n return cp >= 0xdc00 && cp <= 0xdfff;\n};\n\nexports.getSurrogatePairCodePoint = function(cp1, cp2) {\n return (cp1 - 0xd800) * 0x400 + 0x2400 + cp2;\n};\n\n//NOTE: excluding NULL and ASCII whitespace\nexports.isControlCodePoint = function(cp) {\n return (\n (cp !== 0x20 && cp !== 0x0a && cp !== 0x0d && cp !== 0x09 && cp !== 0x0c && cp >= 0x01 && cp <= 0x1f) ||\n (cp >= 0x7f && cp <= 0x9f)\n );\n};\n\nexports.isUndefinedCodePoint = function(cp) {\n return (cp >= 0xfdd0 && cp <= 0xfdef) || UNDEFINED_CODE_POINTS.indexOf(cp) > -1;\n};\n","'use strict';\n\nmodule.exports = {\n controlCharacterInInputStream: 'control-character-in-input-stream',\n noncharacterInInputStream: 'noncharacter-in-input-stream',\n surrogateInInputStream: 'surrogate-in-input-stream',\n nonVoidHtmlElementStartTagWithTrailingSolidus: 'non-void-html-element-start-tag-with-trailing-solidus',\n endTagWithAttributes: 'end-tag-with-attributes',\n endTagWithTrailingSolidus: 'end-tag-with-trailing-solidus',\n unexpectedSolidusInTag: 'unexpected-solidus-in-tag',\n unexpectedNullCharacter: 'unexpected-null-character',\n unexpectedQuestionMarkInsteadOfTagName: 'unexpected-question-mark-instead-of-tag-name',\n invalidFirstCharacterOfTagName: 'invalid-first-character-of-tag-name',\n unexpectedEqualsSignBeforeAttributeName: 'unexpected-equals-sign-before-attribute-name',\n missingEndTagName: 'missing-end-tag-name',\n unexpectedCharacterInAttributeName: 'unexpected-character-in-attribute-name',\n unknownNamedCharacterReference: 'unknown-named-character-reference',\n missingSemicolonAfterCharacterReference: 'missing-semicolon-after-character-reference',\n unexpectedCharacterAfterDoctypeSystemIdentifier: 'unexpected-character-after-doctype-system-identifier',\n unexpectedCharacterInUnquotedAttributeValue: 'unexpected-character-in-unquoted-attribute-value',\n eofBeforeTagName: 'eof-before-tag-name',\n eofInTag: 'eof-in-tag',\n missingAttributeValue: 'missing-attribute-value',\n missingWhitespaceBetweenAttributes: 'missing-whitespace-between-attributes',\n missingWhitespaceAfterDoctypePublicKeyword: 'missing-whitespace-after-doctype-public-keyword',\n missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:\n 'missing-whitespace-between-doctype-public-and-system-identifiers',\n missingWhitespaceAfterDoctypeSystemKeyword: 'missing-whitespace-after-doctype-system-keyword',\n missingQuoteBeforeDoctypePublicIdentifier: 'missing-quote-before-doctype-public-identifier',\n missingQuoteBeforeDoctypeSystemIdentifier: 'missing-quote-before-doctype-system-identifier',\n missingDoctypePublicIdentifier: 'missing-doctype-public-identifier',\n missingDoctypeSystemIdentifier: 'missing-doctype-system-identifier',\n abruptDoctypePublicIdentifier: 'abrupt-doctype-public-identifier',\n abruptDoctypeSystemIdentifier: 'abrupt-doctype-system-identifier',\n cdataInHtmlContent: 'cdata-in-html-content',\n incorrectlyOpenedComment: 'incorrectly-opened-comment',\n eofInScriptHtmlCommentLikeText: 'eof-in-script-html-comment-like-text',\n eofInDoctype: 'eof-in-doctype',\n nestedComment: 'nested-comment',\n abruptClosingOfEmptyComment: 'abrupt-closing-of-empty-comment',\n eofInComment: 'eof-in-comment',\n incorrectlyClosedComment: 'incorrectly-closed-comment',\n eofInCdata: 'eof-in-cdata',\n absenceOfDigitsInNumericCharacterReference: 'absence-of-digits-in-numeric-character-reference',\n nullCharacterReference: 'null-character-reference',\n surrogateCharacterReference: 'surrogate-character-reference',\n characterReferenceOutsideUnicodeRange: 'character-reference-outside-unicode-range',\n controlCharacterReference: 'control-character-reference',\n noncharacterCharacterReference: 'noncharacter-character-reference',\n missingWhitespaceBeforeDoctypeName: 'missing-whitespace-before-doctype-name',\n missingDoctypeName: 'missing-doctype-name',\n invalidCharacterSequenceAfterDoctypeName: 'invalid-character-sequence-after-doctype-name',\n duplicateAttribute: 'duplicate-attribute',\n nonConformingDoctype: 'non-conforming-doctype',\n missingDoctype: 'missing-doctype',\n misplacedDoctype: 'misplaced-doctype',\n endTagWithoutMatchingOpenElement: 'end-tag-without-matching-open-element',\n closingOfElementWithOpenChildElements: 'closing-of-element-with-open-child-elements',\n disallowedContentInNoscriptInHead: 'disallowed-content-in-noscript-in-head',\n openElementsLeftAfterEof: 'open-elements-left-after-eof',\n abandonedHeadElementChild: 'abandoned-head-element-child',\n misplacedStartTagForHeadElement: 'misplaced-start-tag-for-head-element',\n nestedNoscriptInHead: 'nested-noscript-in-head',\n eofInElementThatCanContainOnlyText: 'eof-in-element-that-can-contain-only-text'\n};\n","'use strict';\n\nconst Mixin = require('../../utils/mixin');\n\nclass ErrorReportingMixinBase extends Mixin {\n constructor(host, opts) {\n super(host);\n\n this.posTracker = null;\n this.onParseError = opts.onParseError;\n }\n\n _setErrorLocation(err) {\n err.startLine = err.endLine = this.posTracker.line;\n err.startCol = err.endCol = this.posTracker.col;\n err.startOffset = err.endOffset = this.posTracker.offset;\n }\n\n _reportError(code) {\n const err = {\n code: code,\n startLine: -1,\n startCol: -1,\n startOffset: -1,\n endLine: -1,\n endCol: -1,\n endOffset: -1\n };\n\n this._setErrorLocation(err);\n this.onParseError(err);\n }\n\n _getOverriddenMethods(mxn) {\n return {\n _err(code) {\n mxn._reportError(code);\n }\n };\n }\n}\n\nmodule.exports = ErrorReportingMixinBase;\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as assert from '../../../base/common/assert.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport * as objects from '../../../base/common/objects.js';\r\nimport { Range } from '../../common/core/range.js';\r\nconst defaultOptions = {\r\n followsCaret: true,\r\n ignoreCharChanges: true,\r\n alwaysRevealFirst: true\r\n};\r\n/**\r\n * Create a new diff navigator for the provided diff editor.\r\n */\r\nexport class DiffNavigator extends Disposable {\r\n constructor(editor, options = {}) {\r\n super();\r\n this._onDidUpdate = this._register(new Emitter());\r\n this._editor = editor;\r\n this._options = objects.mixin(options, defaultOptions, false);\r\n this.disposed = false;\r\n this.nextIdx = -1;\r\n this.ranges = [];\r\n this.ignoreSelectionChange = false;\r\n this.revealFirst = Boolean(this._options.alwaysRevealFirst);\r\n // hook up to diff editor for diff, disposal, and caret move\r\n this._register(this._editor.onDidDispose(() => this.dispose()));\r\n this._register(this._editor.onDidUpdateDiff(() => this._onDiffUpdated()));\r\n if (this._options.followsCaret) {\r\n this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e) => {\r\n if (this.ignoreSelectionChange) {\r\n return;\r\n }\r\n this.nextIdx = -1;\r\n }));\r\n }\r\n if (this._options.alwaysRevealFirst) {\r\n this._register(this._editor.getModifiedEditor().onDidChangeModel((e) => {\r\n this.revealFirst = true;\r\n }));\r\n }\r\n // init things\r\n this._init();\r\n }\r\n _init() {\r\n let changes = this._editor.getLineChanges();\r\n if (!changes) {\r\n return;\r\n }\r\n }\r\n _onDiffUpdated() {\r\n this._init();\r\n this._compute(this._editor.getLineChanges());\r\n if (this.revealFirst) {\r\n // Only reveal first on first non-null changes\r\n if (this._editor.getLineChanges() !== null) {\r\n this.revealFirst = false;\r\n this.nextIdx = -1;\r\n this.next(1 /* Immediate */);\r\n }\r\n }\r\n }\r\n _compute(lineChanges) {\r\n // new ranges\r\n this.ranges = [];\r\n if (lineChanges) {\r\n // create ranges from changes\r\n lineChanges.forEach((lineChange) => {\r\n if (!this._options.ignoreCharChanges && lineChange.charChanges) {\r\n lineChange.charChanges.forEach((charChange) => {\r\n this.ranges.push({\r\n rhs: true,\r\n range: new Range(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn)\r\n });\r\n });\r\n }\r\n else {\r\n this.ranges.push({\r\n rhs: true,\r\n range: new Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedStartLineNumber, 1)\r\n });\r\n }\r\n });\r\n }\r\n // sort\r\n this.ranges.sort((left, right) => {\r\n if (left.range.getStartPosition().isBeforeOrEqual(right.range.getStartPosition())) {\r\n return -1;\r\n }\r\n else if (right.range.getStartPosition().isBeforeOrEqual(left.range.getStartPosition())) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n });\r\n this._onDidUpdate.fire(this);\r\n }\r\n _initIdx(fwd) {\r\n let found = false;\r\n let position = this._editor.getPosition();\r\n if (!position) {\r\n this.nextIdx = 0;\r\n return;\r\n }\r\n for (let i = 0, len = this.ranges.length; i < len && !found; i++) {\r\n let range = this.ranges[i].range;\r\n if (position.isBeforeOrEqual(range.getStartPosition())) {\r\n this.nextIdx = i + (fwd ? 0 : -1);\r\n found = true;\r\n }\r\n }\r\n if (!found) {\r\n // after the last change\r\n this.nextIdx = fwd ? 0 : this.ranges.length - 1;\r\n }\r\n if (this.nextIdx < 0) {\r\n this.nextIdx = this.ranges.length - 1;\r\n }\r\n }\r\n _move(fwd, scrollType) {\r\n assert.ok(!this.disposed, 'Illegal State - diff navigator has been disposed');\r\n if (!this.canNavigate()) {\r\n return;\r\n }\r\n if (this.nextIdx === -1) {\r\n this._initIdx(fwd);\r\n }\r\n else if (fwd) {\r\n this.nextIdx += 1;\r\n if (this.nextIdx >= this.ranges.length) {\r\n this.nextIdx = 0;\r\n }\r\n }\r\n else {\r\n this.nextIdx -= 1;\r\n if (this.nextIdx < 0) {\r\n this.nextIdx = this.ranges.length - 1;\r\n }\r\n }\r\n let info = this.ranges[this.nextIdx];\r\n this.ignoreSelectionChange = true;\r\n try {\r\n let pos = info.range.getStartPosition();\r\n this._editor.setPosition(pos);\r\n this._editor.revealPositionInCenter(pos, scrollType);\r\n }\r\n finally {\r\n this.ignoreSelectionChange = false;\r\n }\r\n }\r\n canNavigate() {\r\n return this.ranges && this.ranges.length > 0;\r\n }\r\n next(scrollType = 0 /* Smooth */) {\r\n this._move(true, scrollType);\r\n }\r\n previous(scrollType = 0 /* Smooth */) {\r\n this._move(false, scrollType);\r\n }\r\n dispose() {\r\n super.dispose();\r\n this.ranges = [];\r\n this.disposed = true;\r\n }\r\n}\r\n","'use strict'\n\nvar bail = require('bail')\nvar buffer = require('is-buffer')\nvar extend = require('extend')\nvar plain = require('is-plain-obj')\nvar trough = require('trough')\nvar vfile = require('vfile')\n\n// Expose a frozen processor.\nmodule.exports = unified().freeze()\n\nvar slice = [].slice\nvar own = {}.hasOwnProperty\n\n// Process pipeline.\nvar pipeline = trough()\n .use(pipelineParse)\n .use(pipelineRun)\n .use(pipelineStringify)\n\nfunction pipelineParse(p, ctx) {\n ctx.tree = p.parse(ctx.file)\n}\n\nfunction pipelineRun(p, ctx, next) {\n p.run(ctx.tree, ctx.file, done)\n\n function done(err, tree, file) {\n if (err) {\n next(err)\n } else {\n ctx.tree = tree\n ctx.file = file\n next()\n }\n }\n}\n\nfunction pipelineStringify(p, ctx) {\n var result = p.stringify(ctx.tree, ctx.file)\n var file = ctx.file\n\n if (result === undefined || result === null) {\n // Empty.\n } else if (typeof result === 'string' || buffer(result)) {\n file.contents = result\n } else {\n file.result = result\n }\n}\n\n// Function to create the first processor.\nfunction unified() {\n var attachers = []\n var transformers = trough()\n var namespace = {}\n var frozen = false\n var freezeIndex = -1\n\n // Data management.\n processor.data = data\n\n // Lock.\n processor.freeze = freeze\n\n // Plugins.\n processor.attachers = attachers\n processor.use = use\n\n // API.\n processor.parse = parse\n processor.stringify = stringify\n processor.run = run\n processor.runSync = runSync\n processor.process = process\n processor.processSync = processSync\n\n // Expose.\n return processor\n\n // Create a new processor based on the processor in the current scope.\n function processor() {\n var destination = unified()\n var length = attachers.length\n var index = -1\n\n while (++index < length) {\n destination.use.apply(null, attachers[index])\n }\n\n destination.data(extend(true, {}, namespace))\n\n return destination\n }\n\n // Freeze: used to signal a processor that has finished configuration.\n //\n // For example, take unified itself: it’s frozen.\n // Plugins should not be added to it.\n // Rather, it should be extended, by invoking it, before modifying it.\n //\n // In essence, always invoke this when exporting a processor.\n function freeze() {\n var values\n var plugin\n var options\n var transformer\n\n if (frozen) {\n return processor\n }\n\n while (++freezeIndex < attachers.length) {\n values = attachers[freezeIndex]\n plugin = values[0]\n options = values[1]\n transformer = null\n\n if (options === false) {\n continue\n }\n\n if (options === true) {\n values[1] = undefined\n }\n\n transformer = plugin.apply(processor, values.slice(1))\n\n if (typeof transformer === 'function') {\n transformers.use(transformer)\n }\n }\n\n frozen = true\n freezeIndex = Infinity\n\n return processor\n }\n\n // Data management.\n // Getter / setter for processor-specific informtion.\n function data(key, value) {\n if (typeof key === 'string') {\n // Set `key`.\n if (arguments.length === 2) {\n assertUnfrozen('data', frozen)\n\n namespace[key] = value\n\n return processor\n }\n\n // Get `key`.\n return (own.call(namespace, key) && namespace[key]) || null\n }\n\n // Set space.\n if (key) {\n assertUnfrozen('data', frozen)\n namespace = key\n return processor\n }\n\n // Get space.\n return namespace\n }\n\n // Plugin management.\n //\n // Pass it:\n // * an attacher and options,\n // * a preset,\n // * a list of presets, attachers, and arguments (list of attachers and\n // options).\n function use(value) {\n var settings\n\n assertUnfrozen('use', frozen)\n\n if (value === null || value === undefined) {\n // Empty.\n } else if (typeof value === 'function') {\n addPlugin.apply(null, arguments)\n } else if (typeof value === 'object') {\n if ('length' in value) {\n addList(value)\n } else {\n addPreset(value)\n }\n } else {\n throw new Error('Expected usable value, not `' + value + '`')\n }\n\n if (settings) {\n namespace.settings = extend(namespace.settings || {}, settings)\n }\n\n return processor\n\n function addPreset(result) {\n addList(result.plugins)\n\n if (result.settings) {\n settings = extend(settings || {}, result.settings)\n }\n }\n\n function add(value) {\n if (typeof value === 'function') {\n addPlugin(value)\n } else if (typeof value === 'object') {\n if ('length' in value) {\n addPlugin.apply(null, value)\n } else {\n addPreset(value)\n }\n } else {\n throw new Error('Expected usable value, not `' + value + '`')\n }\n }\n\n function addList(plugins) {\n var length\n var index\n\n if (plugins === null || plugins === undefined) {\n // Empty.\n } else if (typeof plugins === 'object' && 'length' in plugins) {\n length = plugins.length\n index = -1\n\n while (++index < length) {\n add(plugins[index])\n }\n } else {\n throw new Error('Expected a list of plugins, not `' + plugins + '`')\n }\n }\n\n function addPlugin(plugin, value) {\n var entry = find(plugin)\n\n if (entry) {\n if (plain(entry[1]) && plain(value)) {\n value = extend(entry[1], value)\n }\n\n entry[1] = value\n } else {\n attachers.push(slice.call(arguments))\n }\n }\n }\n\n function find(plugin) {\n var length = attachers.length\n var index = -1\n var entry\n\n while (++index < length) {\n entry = attachers[index]\n\n if (entry[0] === plugin) {\n return entry\n }\n }\n }\n\n // Parse a file (in string or vfile representation) into a unist node using\n // the `Parser` on the processor.\n function parse(doc) {\n var file = vfile(doc)\n var Parser\n\n freeze()\n Parser = processor.Parser\n assertParser('parse', Parser)\n\n if (newable(Parser, 'parse')) {\n return new Parser(String(file), file).parse()\n }\n\n return Parser(String(file), file) // eslint-disable-line new-cap\n }\n\n // Run transforms on a unist node representation of a file (in string or\n // vfile representation), async.\n function run(node, file, cb) {\n assertNode(node)\n freeze()\n\n if (!cb && typeof file === 'function') {\n cb = file\n file = null\n }\n\n if (!cb) {\n return new Promise(executor)\n }\n\n executor(null, cb)\n\n function executor(resolve, reject) {\n transformers.run(node, vfile(file), done)\n\n function done(err, tree, file) {\n tree = tree || node\n if (err) {\n reject(err)\n } else if (resolve) {\n resolve(tree)\n } else {\n cb(null, tree, file)\n }\n }\n }\n }\n\n // Run transforms on a unist node representation of a file (in string or\n // vfile representation), sync.\n function runSync(node, file) {\n var complete = false\n var result\n\n run(node, file, done)\n\n assertDone('runSync', 'run', complete)\n\n return result\n\n function done(err, tree) {\n complete = true\n bail(err)\n result = tree\n }\n }\n\n // Stringify a unist node representation of a file (in string or vfile\n // representation) into a string using the `Compiler` on the processor.\n function stringify(node, doc) {\n var file = vfile(doc)\n var Compiler\n\n freeze()\n Compiler = processor.Compiler\n assertCompiler('stringify', Compiler)\n assertNode(node)\n\n if (newable(Compiler, 'compile')) {\n return new Compiler(node, file).compile()\n }\n\n return Compiler(node, file) // eslint-disable-line new-cap\n }\n\n // Parse a file (in string or vfile representation) into a unist node using\n // the `Parser` on the processor, then run transforms on that node, and\n // compile the resulting node using the `Compiler` on the processor, and\n // store that result on the vfile.\n function process(doc, cb) {\n freeze()\n assertParser('process', processor.Parser)\n assertCompiler('process', processor.Compiler)\n\n if (!cb) {\n return new Promise(executor)\n }\n\n executor(null, cb)\n\n function executor(resolve, reject) {\n var file = vfile(doc)\n\n pipeline.run(processor, {file: file}, done)\n\n function done(err) {\n if (err) {\n reject(err)\n } else if (resolve) {\n resolve(file)\n } else {\n cb(null, file)\n }\n }\n }\n }\n\n // Process the given document (in string or vfile representation), sync.\n function processSync(doc) {\n var complete = false\n var file\n\n freeze()\n assertParser('processSync', processor.Parser)\n assertCompiler('processSync', processor.Compiler)\n file = vfile(doc)\n\n process(file, done)\n\n assertDone('processSync', 'process', complete)\n\n return file\n\n function done(err) {\n complete = true\n bail(err)\n }\n }\n}\n\n// Check if `value` is a constructor.\nfunction newable(value, name) {\n return (\n typeof value === 'function' &&\n value.prototype &&\n // A function with keys in its prototype is probably a constructor.\n // Classes’ prototype methods are not enumerable, so we check if some value\n // exists in the prototype.\n (keys(value.prototype) || name in value.prototype)\n )\n}\n\n// Check if `value` is an object with keys.\nfunction keys(value) {\n var key\n for (key in value) {\n return true\n }\n\n return false\n}\n\n// Assert a parser is available.\nfunction assertParser(name, Parser) {\n if (typeof Parser !== 'function') {\n throw new Error('Cannot `' + name + '` without `Parser`')\n }\n}\n\n// Assert a compiler is available.\nfunction assertCompiler(name, Compiler) {\n if (typeof Compiler !== 'function') {\n throw new Error('Cannot `' + name + '` without `Compiler`')\n }\n}\n\n// Assert the processor is not frozen.\nfunction assertUnfrozen(name, frozen) {\n if (frozen) {\n throw new Error(\n 'Cannot invoke `' +\n name +\n '` on a frozen processor.\\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.'\n )\n }\n}\n\n// Assert `node` is a unist node.\nfunction assertNode(node) {\n if (!node || typeof node.type !== 'string') {\n throw new Error('Expected node, got `' + node + '`')\n }\n}\n\n// Assert that `complete` is `true`.\nfunction assertDone(name, asyncName, complete) {\n if (!complete) {\n throw new Error(\n '`' + name + '` finished async. Use `' + asyncName + '` instead'\n )\n }\n}\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar _a;\r\nimport './media/diffReview.css';\r\nimport * as nls from '../../../nls.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { createFastDomNode } from '../../../base/browser/fastDomNode.js';\r\nimport { ActionBar } from '../../../base/browser/ui/actionbar/actionbar.js';\r\nimport { DomScrollableElement } from '../../../base/browser/ui/scrollbar/scrollableElement.js';\r\nimport { Action } from '../../../base/common/actions.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { Configuration } from '../config/configuration.js';\r\nimport { EditorAction, registerEditorAction } from '../editorExtensions.js';\r\nimport { ICodeEditorService } from '../services/codeEditorService.js';\r\nimport { EditorFontLigatures } from '../../common/config/editorOptions.js';\r\nimport { LineTokens } from '../../common/core/lineTokens.js';\r\nimport { Position } from '../../common/core/position.js';\r\nimport { editorLineNumbers } from '../../common/view/editorColorRegistry.js';\r\nimport { RenderLineInput, renderViewLine2 as renderViewLine } from '../../common/viewLayout/viewLineRenderer.js';\r\nimport { ViewLineRenderingData } from '../../common/viewModel/viewModel.js';\r\nimport { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { scrollbarShadow } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { registerThemingParticipant, ThemeIcon } from '../../../platform/theme/common/themeService.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nimport { registerIcon } from '../../../platform/theme/common/iconRegistry.js';\r\nconst DIFF_LINES_PADDING = 3;\r\nclass DiffEntry {\r\n constructor(originalLineStart, originalLineEnd, modifiedLineStart, modifiedLineEnd) {\r\n this.originalLineStart = originalLineStart;\r\n this.originalLineEnd = originalLineEnd;\r\n this.modifiedLineStart = modifiedLineStart;\r\n this.modifiedLineEnd = modifiedLineEnd;\r\n }\r\n getType() {\r\n if (this.originalLineStart === 0) {\r\n return 1 /* Insert */;\r\n }\r\n if (this.modifiedLineStart === 0) {\r\n return 2 /* Delete */;\r\n }\r\n return 0 /* Equal */;\r\n }\r\n}\r\nclass Diff {\r\n constructor(entries) {\r\n this.entries = entries;\r\n }\r\n}\r\nconst diffReviewInsertIcon = registerIcon('diff-review-insert', Codicon.add, nls.localize('diffReviewInsertIcon', 'Icon for \\'Insert\\' in diff review.'));\r\nconst diffReviewRemoveIcon = registerIcon('diff-review-remove', Codicon.remove, nls.localize('diffReviewRemoveIcon', 'Icon for \\'Remove\\' in diff review.'));\r\nconst diffReviewCloseIcon = registerIcon('diff-review-close', Codicon.close, nls.localize('diffReviewCloseIcon', 'Icon for \\'Close\\' in diff review.'));\r\nexport class DiffReview extends Disposable {\r\n constructor(diffEditor) {\r\n super();\r\n this._width = 0;\r\n this._diffEditor = diffEditor;\r\n this._isVisible = false;\r\n this.shadow = createFastDomNode(document.createElement('div'));\r\n this.shadow.setClassName('diff-review-shadow');\r\n this.actionBarContainer = createFastDomNode(document.createElement('div'));\r\n this.actionBarContainer.setClassName('diff-review-actions');\r\n this._actionBar = this._register(new ActionBar(this.actionBarContainer.domNode));\r\n this._actionBar.push(new Action('diffreview.close', nls.localize('label.close', \"Close\"), 'close-diff-review ' + ThemeIcon.asClassName(diffReviewCloseIcon), true, () => {\r\n this.hide();\r\n return Promise.resolve(null);\r\n }), { label: false, icon: true });\r\n this.domNode = createFastDomNode(document.createElement('div'));\r\n this.domNode.setClassName('diff-review monaco-editor-background');\r\n this._content = createFastDomNode(document.createElement('div'));\r\n this._content.setClassName('diff-review-content');\r\n this._content.setAttribute('role', 'code');\r\n this.scrollbar = this._register(new DomScrollableElement(this._content.domNode, {}));\r\n this.domNode.domNode.appendChild(this.scrollbar.getDomNode());\r\n this._register(diffEditor.onDidUpdateDiff(() => {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n this._diffs = this._compute();\r\n this._render();\r\n }));\r\n this._register(diffEditor.getModifiedEditor().onDidChangeCursorPosition(() => {\r\n if (!this._isVisible) {\r\n return;\r\n }\r\n this._render();\r\n }));\r\n this._register(dom.addStandardDisposableListener(this.domNode.domNode, 'click', (e) => {\r\n e.preventDefault();\r\n let row = dom.findParentWithClass(e.target, 'diff-review-row');\r\n if (row) {\r\n this._goToRow(row);\r\n }\r\n }));\r\n this._register(dom.addStandardDisposableListener(this.domNode.domNode, 'keydown', (e) => {\r\n if (e.equals(18 /* DownArrow */)\r\n || e.equals(2048 /* CtrlCmd */ | 18 /* DownArrow */)\r\n || e.equals(512 /* Alt */ | 18 /* DownArrow */)) {\r\n e.preventDefault();\r\n this._goToRow(this._getNextRow());\r\n }\r\n if (e.equals(16 /* UpArrow */)\r\n || e.equals(2048 /* CtrlCmd */ | 16 /* UpArrow */)\r\n || e.equals(512 /* Alt */ | 16 /* UpArrow */)) {\r\n e.preventDefault();\r\n this._goToRow(this._getPrevRow());\r\n }\r\n if (e.equals(9 /* Escape */)\r\n || e.equals(2048 /* CtrlCmd */ | 9 /* Escape */)\r\n || e.equals(512 /* Alt */ | 9 /* Escape */)\r\n || e.equals(1024 /* Shift */ | 9 /* Escape */)) {\r\n e.preventDefault();\r\n this.hide();\r\n }\r\n if (e.equals(10 /* Space */)\r\n || e.equals(3 /* Enter */)) {\r\n e.preventDefault();\r\n this.accept();\r\n }\r\n }));\r\n this._diffs = [];\r\n this._currentDiff = null;\r\n }\r\n prev() {\r\n let index = 0;\r\n if (!this._isVisible) {\r\n this._diffs = this._compute();\r\n }\r\n if (this._isVisible) {\r\n let currentIndex = -1;\r\n for (let i = 0, len = this._diffs.length; i < len; i++) {\r\n if (this._diffs[i] === this._currentDiff) {\r\n currentIndex = i;\r\n break;\r\n }\r\n }\r\n index = (this._diffs.length + currentIndex - 1);\r\n }\r\n else {\r\n index = this._findDiffIndex(this._diffEditor.getPosition());\r\n }\r\n if (this._diffs.length === 0) {\r\n // Nothing to do\r\n return;\r\n }\r\n index = index % this._diffs.length;\r\n const entries = this._diffs[index].entries;\r\n this._diffEditor.setPosition(new Position(entries[0].modifiedLineStart, 1));\r\n this._diffEditor.setSelection({ startColumn: 1, startLineNumber: entries[0].modifiedLineStart, endColumn: 1073741824 /* MAX_SAFE_SMALL_INTEGER */, endLineNumber: entries[entries.length - 1].modifiedLineEnd });\r\n this._isVisible = true;\r\n this._diffEditor.doLayout();\r\n this._render();\r\n this._goToRow(this._getNextRow());\r\n }\r\n next() {\r\n let index = 0;\r\n if (!this._isVisible) {\r\n this._diffs = this._compute();\r\n }\r\n if (this._isVisible) {\r\n let currentIndex = -1;\r\n for (let i = 0, len = this._diffs.length; i < len; i++) {\r\n if (this._diffs[i] === this._currentDiff) {\r\n currentIndex = i;\r\n break;\r\n }\r\n }\r\n index = (currentIndex + 1);\r\n }\r\n else {\r\n index = this._findDiffIndex(this._diffEditor.getPosition());\r\n }\r\n if (this._diffs.length === 0) {\r\n // Nothing to do\r\n return;\r\n }\r\n index = index % this._diffs.length;\r\n const entries = this._diffs[index].entries;\r\n this._diffEditor.setPosition(new Position(entries[0].modifiedLineStart, 1));\r\n this._diffEditor.setSelection({ startColumn: 1, startLineNumber: entries[0].modifiedLineStart, endColumn: 1073741824 /* MAX_SAFE_SMALL_INTEGER */, endLineNumber: entries[entries.length - 1].modifiedLineEnd });\r\n this._isVisible = true;\r\n this._diffEditor.doLayout();\r\n this._render();\r\n this._goToRow(this._getNextRow());\r\n }\r\n accept() {\r\n let jumpToLineNumber = -1;\r\n let current = this._getCurrentFocusedRow();\r\n if (current) {\r\n let lineNumber = parseInt(current.getAttribute('data-line'), 10);\r\n if (!isNaN(lineNumber)) {\r\n jumpToLineNumber = lineNumber;\r\n }\r\n }\r\n this.hide();\r\n if (jumpToLineNumber !== -1) {\r\n this._diffEditor.setPosition(new Position(jumpToLineNumber, 1));\r\n this._diffEditor.revealPosition(new Position(jumpToLineNumber, 1), 1 /* Immediate */);\r\n }\r\n }\r\n hide() {\r\n this._isVisible = false;\r\n this._diffEditor.updateOptions({ readOnly: false });\r\n this._diffEditor.focus();\r\n this._diffEditor.doLayout();\r\n this._render();\r\n }\r\n _getPrevRow() {\r\n let current = this._getCurrentFocusedRow();\r\n if (!current) {\r\n return this._getFirstRow();\r\n }\r\n if (current.previousElementSibling) {\r\n return current.previousElementSibling;\r\n }\r\n return current;\r\n }\r\n _getNextRow() {\r\n let current = this._getCurrentFocusedRow();\r\n if (!current) {\r\n return this._getFirstRow();\r\n }\r\n if (current.nextElementSibling) {\r\n return current.nextElementSibling;\r\n }\r\n return current;\r\n }\r\n _getFirstRow() {\r\n return this.domNode.domNode.querySelector('.diff-review-row');\r\n }\r\n _getCurrentFocusedRow() {\r\n let result = document.activeElement;\r\n if (result && /diff-review-row/.test(result.className)) {\r\n return result;\r\n }\r\n return null;\r\n }\r\n _goToRow(row) {\r\n let prev = this._getCurrentFocusedRow();\r\n row.tabIndex = 0;\r\n row.focus();\r\n if (prev && prev !== row) {\r\n prev.tabIndex = -1;\r\n }\r\n this.scrollbar.scanDomNode();\r\n }\r\n isVisible() {\r\n return this._isVisible;\r\n }\r\n layout(top, width, height) {\r\n this._width = width;\r\n this.shadow.setTop(top - 6);\r\n this.shadow.setWidth(width);\r\n this.shadow.setHeight(this._isVisible ? 6 : 0);\r\n this.domNode.setTop(top);\r\n this.domNode.setWidth(width);\r\n this.domNode.setHeight(height);\r\n this._content.setHeight(height);\r\n this._content.setWidth(width);\r\n if (this._isVisible) {\r\n this.actionBarContainer.setAttribute('aria-hidden', 'false');\r\n this.actionBarContainer.setDisplay('block');\r\n }\r\n else {\r\n this.actionBarContainer.setAttribute('aria-hidden', 'true');\r\n this.actionBarContainer.setDisplay('none');\r\n }\r\n }\r\n _compute() {\r\n const lineChanges = this._diffEditor.getLineChanges();\r\n if (!lineChanges || lineChanges.length === 0) {\r\n return [];\r\n }\r\n const originalModel = this._diffEditor.getOriginalEditor().getModel();\r\n const modifiedModel = this._diffEditor.getModifiedEditor().getModel();\r\n if (!originalModel || !modifiedModel) {\r\n return [];\r\n }\r\n return DiffReview._mergeAdjacent(lineChanges, originalModel.getLineCount(), modifiedModel.getLineCount());\r\n }\r\n static _mergeAdjacent(lineChanges, originalLineCount, modifiedLineCount) {\r\n if (!lineChanges || lineChanges.length === 0) {\r\n return [];\r\n }\r\n let diffs = [], diffsLength = 0;\r\n for (let i = 0, len = lineChanges.length; i < len; i++) {\r\n const lineChange = lineChanges[i];\r\n const originalStart = lineChange.originalStartLineNumber;\r\n const originalEnd = lineChange.originalEndLineNumber;\r\n const modifiedStart = lineChange.modifiedStartLineNumber;\r\n const modifiedEnd = lineChange.modifiedEndLineNumber;\r\n let r = [], rLength = 0;\r\n // Emit before anchors\r\n {\r\n const originalEqualAbove = (originalEnd === 0 ? originalStart : originalStart - 1);\r\n const modifiedEqualAbove = (modifiedEnd === 0 ? modifiedStart : modifiedStart - 1);\r\n // Make sure we don't step into the previous diff\r\n let minOriginal = 1;\r\n let minModified = 1;\r\n if (i > 0) {\r\n const prevLineChange = lineChanges[i - 1];\r\n if (prevLineChange.originalEndLineNumber === 0) {\r\n minOriginal = prevLineChange.originalStartLineNumber + 1;\r\n }\r\n else {\r\n minOriginal = prevLineChange.originalEndLineNumber + 1;\r\n }\r\n if (prevLineChange.modifiedEndLineNumber === 0) {\r\n minModified = prevLineChange.modifiedStartLineNumber + 1;\r\n }\r\n else {\r\n minModified = prevLineChange.modifiedEndLineNumber + 1;\r\n }\r\n }\r\n let fromOriginal = originalEqualAbove - DIFF_LINES_PADDING + 1;\r\n let fromModified = modifiedEqualAbove - DIFF_LINES_PADDING + 1;\r\n if (fromOriginal < minOriginal) {\r\n const delta = minOriginal - fromOriginal;\r\n fromOriginal = fromOriginal + delta;\r\n fromModified = fromModified + delta;\r\n }\r\n if (fromModified < minModified) {\r\n const delta = minModified - fromModified;\r\n fromOriginal = fromOriginal + delta;\r\n fromModified = fromModified + delta;\r\n }\r\n r[rLength++] = new DiffEntry(fromOriginal, originalEqualAbove, fromModified, modifiedEqualAbove);\r\n }\r\n // Emit deleted lines\r\n {\r\n if (originalEnd !== 0) {\r\n r[rLength++] = new DiffEntry(originalStart, originalEnd, 0, 0);\r\n }\r\n }\r\n // Emit inserted lines\r\n {\r\n if (modifiedEnd !== 0) {\r\n r[rLength++] = new DiffEntry(0, 0, modifiedStart, modifiedEnd);\r\n }\r\n }\r\n // Emit after anchors\r\n {\r\n const originalEqualBelow = (originalEnd === 0 ? originalStart + 1 : originalEnd + 1);\r\n const modifiedEqualBelow = (modifiedEnd === 0 ? modifiedStart + 1 : modifiedEnd + 1);\r\n // Make sure we don't step into the next diff\r\n let maxOriginal = originalLineCount;\r\n let maxModified = modifiedLineCount;\r\n if (i + 1 < len) {\r\n const nextLineChange = lineChanges[i + 1];\r\n if (nextLineChange.originalEndLineNumber === 0) {\r\n maxOriginal = nextLineChange.originalStartLineNumber;\r\n }\r\n else {\r\n maxOriginal = nextLineChange.originalStartLineNumber - 1;\r\n }\r\n if (nextLineChange.modifiedEndLineNumber === 0) {\r\n maxModified = nextLineChange.modifiedStartLineNumber;\r\n }\r\n else {\r\n maxModified = nextLineChange.modifiedStartLineNumber - 1;\r\n }\r\n }\r\n let toOriginal = originalEqualBelow + DIFF_LINES_PADDING - 1;\r\n let toModified = modifiedEqualBelow + DIFF_LINES_PADDING - 1;\r\n if (toOriginal > maxOriginal) {\r\n const delta = maxOriginal - toOriginal;\r\n toOriginal = toOriginal + delta;\r\n toModified = toModified + delta;\r\n }\r\n if (toModified > maxModified) {\r\n const delta = maxModified - toModified;\r\n toOriginal = toOriginal + delta;\r\n toModified = toModified + delta;\r\n }\r\n r[rLength++] = new DiffEntry(originalEqualBelow, toOriginal, modifiedEqualBelow, toModified);\r\n }\r\n diffs[diffsLength++] = new Diff(r);\r\n }\r\n // Merge adjacent diffs\r\n let curr = diffs[0].entries;\r\n let r = [], rLength = 0;\r\n for (let i = 1, len = diffs.length; i < len; i++) {\r\n const thisDiff = diffs[i].entries;\r\n const currLast = curr[curr.length - 1];\r\n const thisFirst = thisDiff[0];\r\n if (currLast.getType() === 0 /* Equal */\r\n && thisFirst.getType() === 0 /* Equal */\r\n && thisFirst.originalLineStart <= currLast.originalLineEnd) {\r\n // We are dealing with equal lines that overlap\r\n curr[curr.length - 1] = new DiffEntry(currLast.originalLineStart, thisFirst.originalLineEnd, currLast.modifiedLineStart, thisFirst.modifiedLineEnd);\r\n curr = curr.concat(thisDiff.slice(1));\r\n continue;\r\n }\r\n r[rLength++] = new Diff(curr);\r\n curr = thisDiff;\r\n }\r\n r[rLength++] = new Diff(curr);\r\n return r;\r\n }\r\n _findDiffIndex(pos) {\r\n const lineNumber = pos.lineNumber;\r\n for (let i = 0, len = this._diffs.length; i < len; i++) {\r\n const diff = this._diffs[i].entries;\r\n const lastModifiedLine = diff[diff.length - 1].modifiedLineEnd;\r\n if (lineNumber <= lastModifiedLine) {\r\n return i;\r\n }\r\n }\r\n return 0;\r\n }\r\n _render() {\r\n const originalOptions = this._diffEditor.getOriginalEditor().getOptions();\r\n const modifiedOptions = this._diffEditor.getModifiedEditor().getOptions();\r\n const originalModel = this._diffEditor.getOriginalEditor().getModel();\r\n const modifiedModel = this._diffEditor.getModifiedEditor().getModel();\r\n const originalModelOpts = originalModel.getOptions();\r\n const modifiedModelOpts = modifiedModel.getOptions();\r\n if (!this._isVisible || !originalModel || !modifiedModel) {\r\n dom.clearNode(this._content.domNode);\r\n this._currentDiff = null;\r\n this.scrollbar.scanDomNode();\r\n return;\r\n }\r\n this._diffEditor.updateOptions({ readOnly: true });\r\n const diffIndex = this._findDiffIndex(this._diffEditor.getPosition());\r\n if (this._diffs[diffIndex] === this._currentDiff) {\r\n return;\r\n }\r\n this._currentDiff = this._diffs[diffIndex];\r\n const diffs = this._diffs[diffIndex].entries;\r\n let container = document.createElement('div');\r\n container.className = 'diff-review-table';\r\n container.setAttribute('role', 'list');\r\n container.setAttribute('aria-label', 'Difference review. Use \"Stage | Unstage | Revert Selected Ranges\" commands');\r\n Configuration.applyFontInfoSlow(container, modifiedOptions.get(38 /* fontInfo */));\r\n let minOriginalLine = 0;\r\n let maxOriginalLine = 0;\r\n let minModifiedLine = 0;\r\n let maxModifiedLine = 0;\r\n for (let i = 0, len = diffs.length; i < len; i++) {\r\n const diffEntry = diffs[i];\r\n const originalLineStart = diffEntry.originalLineStart;\r\n const originalLineEnd = diffEntry.originalLineEnd;\r\n const modifiedLineStart = diffEntry.modifiedLineStart;\r\n const modifiedLineEnd = diffEntry.modifiedLineEnd;\r\n if (originalLineStart !== 0 && ((minOriginalLine === 0 || originalLineStart < minOriginalLine))) {\r\n minOriginalLine = originalLineStart;\r\n }\r\n if (originalLineEnd !== 0 && ((maxOriginalLine === 0 || originalLineEnd > maxOriginalLine))) {\r\n maxOriginalLine = originalLineEnd;\r\n }\r\n if (modifiedLineStart !== 0 && ((minModifiedLine === 0 || modifiedLineStart < minModifiedLine))) {\r\n minModifiedLine = modifiedLineStart;\r\n }\r\n if (modifiedLineEnd !== 0 && ((maxModifiedLine === 0 || modifiedLineEnd > maxModifiedLine))) {\r\n maxModifiedLine = modifiedLineEnd;\r\n }\r\n }\r\n let header = document.createElement('div');\r\n header.className = 'diff-review-row';\r\n let cell = document.createElement('div');\r\n cell.className = 'diff-review-cell diff-review-summary';\r\n const originalChangedLinesCnt = maxOriginalLine - minOriginalLine + 1;\r\n const modifiedChangedLinesCnt = maxModifiedLine - minModifiedLine + 1;\r\n cell.appendChild(document.createTextNode(`${diffIndex + 1}/${this._diffs.length}: @@ -${minOriginalLine},${originalChangedLinesCnt} +${minModifiedLine},${modifiedChangedLinesCnt} @@`));\r\n header.setAttribute('data-line', String(minModifiedLine));\r\n const getAriaLines = (lines) => {\r\n if (lines === 0) {\r\n return nls.localize('no_lines_changed', \"no lines changed\");\r\n }\r\n else if (lines === 1) {\r\n return nls.localize('one_line_changed', \"1 line changed\");\r\n }\r\n else {\r\n return nls.localize('more_lines_changed', \"{0} lines changed\", lines);\r\n }\r\n };\r\n const originalChangedLinesCntAria = getAriaLines(originalChangedLinesCnt);\r\n const modifiedChangedLinesCntAria = getAriaLines(modifiedChangedLinesCnt);\r\n header.setAttribute('aria-label', nls.localize({\r\n key: 'header',\r\n comment: [\r\n 'This is the ARIA label for a git diff header.',\r\n 'A git diff header looks like this: @@ -154,12 +159,39 @@.',\r\n 'That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.',\r\n 'Variables 0 and 1 refer to the diff index out of total number of diffs.',\r\n 'Variables 2 and 4 will be numbers (a line number).',\r\n 'Variables 3 and 5 will be \"no lines changed\", \"1 line changed\" or \"X lines changed\", localized separately.'\r\n ]\r\n }, \"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}\", (diffIndex + 1), this._diffs.length, minOriginalLine, originalChangedLinesCntAria, minModifiedLine, modifiedChangedLinesCntAria));\r\n header.appendChild(cell);\r\n // @@ -504,7 +517,7 @@\r\n header.setAttribute('role', 'listitem');\r\n container.appendChild(header);\r\n const lineHeight = modifiedOptions.get(53 /* lineHeight */);\r\n let modLine = minModifiedLine;\r\n for (let i = 0, len = diffs.length; i < len; i++) {\r\n const diffEntry = diffs[i];\r\n DiffReview._renderSection(container, diffEntry, modLine, lineHeight, this._width, originalOptions, originalModel, originalModelOpts, modifiedOptions, modifiedModel, modifiedModelOpts);\r\n if (diffEntry.modifiedLineStart !== 0) {\r\n modLine = diffEntry.modifiedLineEnd;\r\n }\r\n }\r\n dom.clearNode(this._content.domNode);\r\n this._content.domNode.appendChild(container);\r\n this.scrollbar.scanDomNode();\r\n }\r\n static _renderSection(dest, diffEntry, modLine, lineHeight, width, originalOptions, originalModel, originalModelOpts, modifiedOptions, modifiedModel, modifiedModelOpts) {\r\n const type = diffEntry.getType();\r\n let rowClassName = 'diff-review-row';\r\n let lineNumbersExtraClassName = '';\r\n const spacerClassName = 'diff-review-spacer';\r\n let spacerIcon = null;\r\n switch (type) {\r\n case 1 /* Insert */:\r\n rowClassName = 'diff-review-row line-insert';\r\n lineNumbersExtraClassName = ' char-insert';\r\n spacerIcon = diffReviewInsertIcon;\r\n break;\r\n case 2 /* Delete */:\r\n rowClassName = 'diff-review-row line-delete';\r\n lineNumbersExtraClassName = ' char-delete';\r\n spacerIcon = diffReviewRemoveIcon;\r\n break;\r\n }\r\n const originalLineStart = diffEntry.originalLineStart;\r\n const originalLineEnd = diffEntry.originalLineEnd;\r\n const modifiedLineStart = diffEntry.modifiedLineStart;\r\n const modifiedLineEnd = diffEntry.modifiedLineEnd;\r\n const cnt = Math.max(modifiedLineEnd - modifiedLineStart, originalLineEnd - originalLineStart);\r\n const originalLayoutInfo = originalOptions.get(124 /* layoutInfo */);\r\n const originalLineNumbersWidth = originalLayoutInfo.glyphMarginWidth + originalLayoutInfo.lineNumbersWidth;\r\n const modifiedLayoutInfo = modifiedOptions.get(124 /* layoutInfo */);\r\n const modifiedLineNumbersWidth = 10 + modifiedLayoutInfo.glyphMarginWidth + modifiedLayoutInfo.lineNumbersWidth;\r\n for (let i = 0; i <= cnt; i++) {\r\n const originalLine = (originalLineStart === 0 ? 0 : originalLineStart + i);\r\n const modifiedLine = (modifiedLineStart === 0 ? 0 : modifiedLineStart + i);\r\n const row = document.createElement('div');\r\n row.style.minWidth = width + 'px';\r\n row.className = rowClassName;\r\n row.setAttribute('role', 'listitem');\r\n if (modifiedLine !== 0) {\r\n modLine = modifiedLine;\r\n }\r\n row.setAttribute('data-line', String(modLine));\r\n let cell = document.createElement('div');\r\n cell.className = 'diff-review-cell';\r\n cell.style.height = `${lineHeight}px`;\r\n row.appendChild(cell);\r\n const originalLineNumber = document.createElement('span');\r\n originalLineNumber.style.width = (originalLineNumbersWidth + 'px');\r\n originalLineNumber.style.minWidth = (originalLineNumbersWidth + 'px');\r\n originalLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName;\r\n if (originalLine !== 0) {\r\n originalLineNumber.appendChild(document.createTextNode(String(originalLine)));\r\n }\r\n else {\r\n originalLineNumber.innerText = '\\u00a0';\r\n }\r\n cell.appendChild(originalLineNumber);\r\n const modifiedLineNumber = document.createElement('span');\r\n modifiedLineNumber.style.width = (modifiedLineNumbersWidth + 'px');\r\n modifiedLineNumber.style.minWidth = (modifiedLineNumbersWidth + 'px');\r\n modifiedLineNumber.style.paddingRight = '10px';\r\n modifiedLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName;\r\n if (modifiedLine !== 0) {\r\n modifiedLineNumber.appendChild(document.createTextNode(String(modifiedLine)));\r\n }\r\n else {\r\n modifiedLineNumber.innerText = '\\u00a0';\r\n }\r\n cell.appendChild(modifiedLineNumber);\r\n const spacer = document.createElement('span');\r\n spacer.className = spacerClassName;\r\n if (spacerIcon) {\r\n const spacerCodicon = document.createElement('span');\r\n spacerCodicon.className = ThemeIcon.asClassName(spacerIcon);\r\n spacerCodicon.innerText = '\\u00a0\\u00a0';\r\n spacer.appendChild(spacerCodicon);\r\n }\r\n else {\r\n spacer.innerText = '\\u00a0\\u00a0';\r\n }\r\n cell.appendChild(spacer);\r\n let lineContent;\r\n if (modifiedLine !== 0) {\r\n let html = this._renderLine(modifiedModel, modifiedOptions, modifiedModelOpts.tabSize, modifiedLine);\r\n if (DiffReview._ttPolicy) {\r\n html = DiffReview._ttPolicy.createHTML(html);\r\n }\r\n cell.insertAdjacentHTML('beforeend', html);\r\n lineContent = modifiedModel.getLineContent(modifiedLine);\r\n }\r\n else {\r\n let html = this._renderLine(originalModel, originalOptions, originalModelOpts.tabSize, originalLine);\r\n if (DiffReview._ttPolicy) {\r\n html = DiffReview._ttPolicy.createHTML(html);\r\n }\r\n cell.insertAdjacentHTML('beforeend', html);\r\n lineContent = originalModel.getLineContent(originalLine);\r\n }\r\n if (lineContent.length === 0) {\r\n lineContent = nls.localize('blankLine', \"blank\");\r\n }\r\n let ariaLabel = '';\r\n switch (type) {\r\n case 0 /* Equal */:\r\n if (originalLine === modifiedLine) {\r\n ariaLabel = nls.localize({ key: 'unchangedLine', comment: ['The placeholders are contents of the line and should not be translated.'] }, \"{0} unchanged line {1}\", lineContent, originalLine);\r\n }\r\n else {\r\n ariaLabel = nls.localize('equalLine', \"{0} original line {1} modified line {2}\", lineContent, originalLine, modifiedLine);\r\n }\r\n break;\r\n case 1 /* Insert */:\r\n ariaLabel = nls.localize('insertLine', \"+ {0} modified line {1}\", lineContent, modifiedLine);\r\n break;\r\n case 2 /* Delete */:\r\n ariaLabel = nls.localize('deleteLine', \"- {0} original line {1}\", lineContent, originalLine);\r\n break;\r\n }\r\n row.setAttribute('aria-label', ariaLabel);\r\n dest.appendChild(row);\r\n }\r\n }\r\n static _renderLine(model, options, tabSize, lineNumber) {\r\n const lineContent = model.getLineContent(lineNumber);\r\n const fontInfo = options.get(38 /* fontInfo */);\r\n const defaultMetadata = ((0 /* None */ << 11 /* FONT_STYLE_OFFSET */)\r\n | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */)\r\n | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0;\r\n const tokens = new Uint32Array(2);\r\n tokens[0] = lineContent.length;\r\n tokens[1] = defaultMetadata;\r\n const lineTokens = new LineTokens(tokens, lineContent);\r\n const isBasicASCII = ViewLineRenderingData.isBasicASCII(lineContent, model.mightContainNonBasicASCII());\r\n const containsRTL = ViewLineRenderingData.containsRTL(lineContent, isBasicASCII, model.mightContainRTL());\r\n const r = renderViewLine(new RenderLineInput((fontInfo.isMonospace && !options.get(26 /* disableMonospaceOptimizations */)), fontInfo.canUseHalfwidthRightwardsArrow, lineContent, false, isBasicASCII, containsRTL, 0, lineTokens, [], tabSize, 0, fontInfo.spaceWidth, fontInfo.middotWidth, fontInfo.wsmiddotWidth, options.get(100 /* stopRenderingLineAfter */), options.get(83 /* renderWhitespace */), options.get(77 /* renderControlCharacters */), options.get(39 /* fontLigatures */) !== EditorFontLigatures.OFF, null));\r\n return r.html;\r\n }\r\n}\r\nDiffReview._ttPolicy = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('diffReview', { createHTML: value => value });\r\n// theming\r\nregisterThemingParticipant((theme, collector) => {\r\n const lineNumbers = theme.getColor(editorLineNumbers);\r\n if (lineNumbers) {\r\n collector.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${lineNumbers}; }`);\r\n }\r\n const shadow = theme.getColor(scrollbarShadow);\r\n if (shadow) {\r\n collector.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${shadow} 0 -6px 6px -6px inset; }`);\r\n }\r\n});\r\nclass DiffReviewNext extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.diffReview.next',\r\n label: nls.localize('editor.action.diffReview.next', \"Go to Next Difference\"),\r\n alias: 'Go to Next Difference',\r\n precondition: ContextKeyExpr.has('isInDiffEditor'),\r\n kbOpts: {\r\n kbExpr: null,\r\n primary: 65 /* F7 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const diffEditor = findFocusedDiffEditor(accessor);\r\n if (diffEditor) {\r\n diffEditor.diffReviewNext();\r\n }\r\n }\r\n}\r\nclass DiffReviewPrev extends EditorAction {\r\n constructor() {\r\n super({\r\n id: 'editor.action.diffReview.prev',\r\n label: nls.localize('editor.action.diffReview.prev', \"Go to Previous Difference\"),\r\n alias: 'Go to Previous Difference',\r\n precondition: ContextKeyExpr.has('isInDiffEditor'),\r\n kbOpts: {\r\n kbExpr: null,\r\n primary: 1024 /* Shift */ | 65 /* F7 */,\r\n weight: 100 /* EditorContrib */\r\n }\r\n });\r\n }\r\n run(accessor, editor) {\r\n const diffEditor = findFocusedDiffEditor(accessor);\r\n if (diffEditor) {\r\n diffEditor.diffReviewPrev();\r\n }\r\n }\r\n}\r\nfunction findFocusedDiffEditor(accessor) {\r\n const codeEditorService = accessor.get(ICodeEditorService);\r\n const diffEditors = codeEditorService.listDiffEditors();\r\n const activeCodeEditor = codeEditorService.getActiveCodeEditor();\r\n if (!activeCodeEditor) {\r\n return null;\r\n }\r\n for (let i = 0, len = diffEditors.length; i < len; i++) {\r\n const diffEditor = diffEditors[i];\r\n if (diffEditor.getModifiedEditor().getId() === activeCodeEditor.getId() || diffEditor.getOriginalEditor().getId() === activeCodeEditor.getId()) {\r\n return diffEditor;\r\n }\r\n }\r\n return null;\r\n}\r\nregisterEditorAction(DiffReviewNext);\r\nregisterEditorAction(DiffReviewPrev);\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n};\r\nvar _a;\r\nimport './media/diffEditor.css';\r\nimport * as nls from '../../../nls.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { createFastDomNode } from '../../../base/browser/fastDomNode.js';\r\nimport { Sash } from '../../../base/browser/ui/sash/sash.js';\r\nimport { RunOnceScheduler } from '../../../base/common/async.js';\r\nimport { Emitter } from '../../../base/common/event.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { Configuration } from '../config/configuration.js';\r\nimport { StableEditorScrollState } from '../core/editorState.js';\r\nimport { ICodeEditorService } from '../services/codeEditorService.js';\r\nimport { CodeEditorWidget } from './codeEditorWidget.js';\r\nimport { DiffReview } from './diffReview.js';\r\nimport { EditorOptions, EditorFontLigatures, stringSet as validateStringSetOption, boolean as validateBooleanOption } from '../../common/config/editorOptions.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { createStringBuilder } from '../../common/core/stringBuilder.js';\r\nimport * as editorCommon from '../../common/editorCommon.js';\r\nimport { ModelDecorationOptions } from '../../common/model/textModel.js';\r\nimport { IEditorWorkerService } from '../../common/services/editorWorkerService.js';\r\nimport { OverviewRulerZone } from '../../common/view/overviewZoneManager.js';\r\nimport { LineDecoration } from '../../common/viewLayout/lineDecorations.js';\r\nimport { RenderLineInput, renderViewLine } from '../../common/viewLayout/viewLineRenderer.js';\r\nimport { InlineDecoration, ViewLineRenderingData } from '../../common/viewModel/viewModel.js';\r\nimport { IContextKeyService } from '../../../platform/contextkey/common/contextkey.js';\r\nimport { IInstantiationService } from '../../../platform/instantiation/common/instantiation.js';\r\nimport { ServiceCollection } from '../../../platform/instantiation/common/serviceCollection.js';\r\nimport { INotificationService } from '../../../platform/notification/common/notification.js';\r\nimport { defaultInsertColor, defaultRemoveColor, diffBorder, diffInserted, diffInsertedOutline, diffRemoved, diffRemovedOutline, scrollbarShadow, scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground, diffDiagonalFill } from '../../../platform/theme/common/colorRegistry.js';\r\nimport { IThemeService, getThemeTypeSelector, registerThemingParticipant, ThemeIcon } from '../../../platform/theme/common/themeService.js';\r\nimport { IContextMenuService } from '../../../platform/contextview/browser/contextView.js';\r\nimport { InlineDiffMargin } from './inlineDiffMargin.js';\r\nimport { IClipboardService } from '../../../platform/clipboard/common/clipboardService.js';\r\nimport { EditorExtensionsRegistry } from '../editorExtensions.js';\r\nimport { onUnexpectedError } from '../../../base/common/errors.js';\r\nimport { IEditorProgressService } from '../../../platform/progress/common/progress.js';\r\nimport { ElementSizeObserver } from '../config/elementSizeObserver.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nimport { MOUSE_CURSOR_TEXT_CSS_CLASS_NAME } from '../../../base/browser/ui/mouseCursor/mouseCursor.js';\r\nimport { registerIcon } from '../../../platform/theme/common/iconRegistry.js';\r\nclass VisualEditorState {\r\n constructor(_contextMenuService, _clipboardService) {\r\n this._contextMenuService = _contextMenuService;\r\n this._clipboardService = _clipboardService;\r\n this._zones = [];\r\n this._inlineDiffMargins = [];\r\n this._zonesMap = {};\r\n this._decorations = [];\r\n }\r\n getForeignViewZones(allViewZones) {\r\n return allViewZones.filter((z) => !this._zonesMap[String(z.id)]);\r\n }\r\n clean(editor) {\r\n // (1) View zones\r\n if (this._zones.length > 0) {\r\n editor.changeViewZones((viewChangeAccessor) => {\r\n for (const zoneId of this._zones) {\r\n viewChangeAccessor.removeZone(zoneId);\r\n }\r\n });\r\n }\r\n this._zones = [];\r\n this._zonesMap = {};\r\n // (2) Model decorations\r\n this._decorations = editor.deltaDecorations(this._decorations, []);\r\n }\r\n apply(editor, overviewRuler, newDecorations, restoreScrollState) {\r\n const scrollState = restoreScrollState ? StableEditorScrollState.capture(editor) : null;\r\n // view zones\r\n editor.changeViewZones((viewChangeAccessor) => {\r\n for (const zoneId of this._zones) {\r\n viewChangeAccessor.removeZone(zoneId);\r\n }\r\n for (const inlineDiffMargin of this._inlineDiffMargins) {\r\n inlineDiffMargin.dispose();\r\n }\r\n this._zones = [];\r\n this._zonesMap = {};\r\n this._inlineDiffMargins = [];\r\n for (let i = 0, length = newDecorations.zones.length; i < length; i++) {\r\n const viewZone = newDecorations.zones[i];\r\n viewZone.suppressMouseDown = true;\r\n const zoneId = viewChangeAccessor.addZone(viewZone);\r\n this._zones.push(zoneId);\r\n this._zonesMap[String(zoneId)] = true;\r\n if (newDecorations.zones[i].diff && viewZone.marginDomNode) {\r\n viewZone.suppressMouseDown = false;\r\n this._inlineDiffMargins.push(new InlineDiffMargin(zoneId, viewZone.marginDomNode, editor, newDecorations.zones[i].diff, this._contextMenuService, this._clipboardService));\r\n }\r\n }\r\n });\r\n if (scrollState) {\r\n scrollState.restore(editor);\r\n }\r\n // decorations\r\n this._decorations = editor.deltaDecorations(this._decorations, newDecorations.decorations);\r\n // overview ruler\r\n if (overviewRuler) {\r\n overviewRuler.setZones(newDecorations.overviewZones);\r\n }\r\n }\r\n}\r\nlet DIFF_EDITOR_ID = 0;\r\nconst diffInsertIcon = registerIcon('diff-insert', Codicon.add, nls.localize('diffInsertIcon', 'Line decoration for inserts in the diff editor.'));\r\nconst diffRemoveIcon = registerIcon('diff-remove', Codicon.remove, nls.localize('diffRemoveIcon', 'Line decoration for removals in the diff editor.'));\r\nconst ttPolicy = (_a = window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy('diffEditorWidget', { createHTML: value => value });\r\nlet DiffEditorWidget = class DiffEditorWidget extends Disposable {\r\n constructor(domElement, options, codeEditorWidgetOptions, clipboardService, editorWorkerService, contextKeyService, instantiationService, codeEditorService, themeService, notificationService, contextMenuService, _editorProgressService) {\r\n super();\r\n this._editorProgressService = _editorProgressService;\r\n this._onDidDispose = this._register(new Emitter());\r\n this.onDidDispose = this._onDidDispose.event;\r\n this._onDidUpdateDiff = this._register(new Emitter());\r\n this.onDidUpdateDiff = this._onDidUpdateDiff.event;\r\n this._onDidContentSizeChange = this._register(new Emitter());\r\n this._lastOriginalWarning = null;\r\n this._lastModifiedWarning = null;\r\n this._editorWorkerService = editorWorkerService;\r\n this._codeEditorService = codeEditorService;\r\n this._contextKeyService = this._register(contextKeyService.createScoped(domElement));\r\n this._contextKeyService.createKey('isInDiffEditor', true);\r\n this._themeService = themeService;\r\n this._notificationService = notificationService;\r\n this._id = (++DIFF_EDITOR_ID);\r\n this._state = 0 /* Idle */;\r\n this._updatingDiffProgress = null;\r\n this._domElement = domElement;\r\n options = options || {};\r\n // renderSideBySide\r\n this._renderSideBySide = true;\r\n if (typeof options.renderSideBySide !== 'undefined') {\r\n this._renderSideBySide = options.renderSideBySide;\r\n }\r\n // maxComputationTime\r\n this._maxComputationTime = 5000;\r\n if (typeof options.maxComputationTime !== 'undefined') {\r\n this._maxComputationTime = options.maxComputationTime;\r\n }\r\n // ignoreTrimWhitespace\r\n this._ignoreTrimWhitespace = true;\r\n if (typeof options.ignoreTrimWhitespace !== 'undefined') {\r\n this._ignoreTrimWhitespace = options.ignoreTrimWhitespace;\r\n }\r\n // renderIndicators\r\n this._renderIndicators = true;\r\n if (typeof options.renderIndicators !== 'undefined') {\r\n this._renderIndicators = options.renderIndicators;\r\n }\r\n this._originalIsEditable = validateBooleanOption(options.originalEditable, false);\r\n this._diffCodeLens = validateBooleanOption(options.diffCodeLens, false);\r\n this._diffWordWrap = validateDiffWordWrap(options.diffWordWrap, 'inherit');\r\n if (typeof options.isInEmbeddedEditor !== 'undefined') {\r\n this._contextKeyService.createKey('isInEmbeddedDiffEditor', options.isInEmbeddedEditor);\r\n }\r\n else {\r\n this._contextKeyService.createKey('isInEmbeddedDiffEditor', false);\r\n }\r\n this._renderOverviewRuler = true;\r\n if (typeof options.renderOverviewRuler !== 'undefined') {\r\n this._renderOverviewRuler = Boolean(options.renderOverviewRuler);\r\n }\r\n this._updateDecorationsRunner = this._register(new RunOnceScheduler(() => this._updateDecorations(), 0));\r\n this._containerDomElement = document.createElement('div');\r\n this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getColorTheme(), this._renderSideBySide);\r\n this._containerDomElement.style.position = 'relative';\r\n this._containerDomElement.style.height = '100%';\r\n this._domElement.appendChild(this._containerDomElement);\r\n this._overviewViewportDomElement = createFastDomNode(document.createElement('div'));\r\n this._overviewViewportDomElement.setClassName('diffViewport');\r\n this._overviewViewportDomElement.setPosition('absolute');\r\n this._overviewDomElement = document.createElement('div');\r\n this._overviewDomElement.className = 'diffOverview';\r\n this._overviewDomElement.style.position = 'absolute';\r\n this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode);\r\n this._register(dom.addStandardDisposableListener(this._overviewDomElement, 'mousedown', (e) => {\r\n this._modifiedEditor.delegateVerticalScrollbarMouseDown(e);\r\n }));\r\n if (this._renderOverviewRuler) {\r\n this._containerDomElement.appendChild(this._overviewDomElement);\r\n }\r\n // Create left side\r\n this._originalDomNode = document.createElement('div');\r\n this._originalDomNode.className = 'editor original';\r\n this._originalDomNode.style.position = 'absolute';\r\n this._originalDomNode.style.height = '100%';\r\n this._containerDomElement.appendChild(this._originalDomNode);\r\n // Create right side\r\n this._modifiedDomNode = document.createElement('div');\r\n this._modifiedDomNode.className = 'editor modified';\r\n this._modifiedDomNode.style.position = 'absolute';\r\n this._modifiedDomNode.style.height = '100%';\r\n this._containerDomElement.appendChild(this._modifiedDomNode);\r\n this._beginUpdateDecorationsTimeout = -1;\r\n this._currentlyChangingViewZones = false;\r\n this._diffComputationToken = 0;\r\n this._originalEditorState = new VisualEditorState(contextMenuService, clipboardService);\r\n this._modifiedEditorState = new VisualEditorState(contextMenuService, clipboardService);\r\n this._isVisible = true;\r\n this._isHandlingScrollEvent = false;\r\n this._elementSizeObserver = this._register(new ElementSizeObserver(this._containerDomElement, options.dimension, () => this._onDidContainerSizeChanged()));\r\n if (options.automaticLayout) {\r\n this._elementSizeObserver.startObserving();\r\n }\r\n this._diffComputationResult = null;\r\n const leftContextKeyService = this._contextKeyService.createScoped();\r\n const leftServices = new ServiceCollection();\r\n leftServices.set(IContextKeyService, leftContextKeyService);\r\n const leftScopedInstantiationService = instantiationService.createChild(leftServices);\r\n const rightContextKeyService = this._contextKeyService.createScoped();\r\n const rightServices = new ServiceCollection();\r\n rightServices.set(IContextKeyService, rightContextKeyService);\r\n const rightScopedInstantiationService = instantiationService.createChild(rightServices);\r\n this._originalEditor = this._createLeftHandSideEditor(options, codeEditorWidgetOptions.originalEditor || {}, leftScopedInstantiationService, leftContextKeyService);\r\n this._modifiedEditor = this._createRightHandSideEditor(options, codeEditorWidgetOptions.modifiedEditor || {}, rightScopedInstantiationService, rightContextKeyService);\r\n this._originalOverviewRuler = null;\r\n this._modifiedOverviewRuler = null;\r\n this._reviewPane = new DiffReview(this);\r\n this._containerDomElement.appendChild(this._reviewPane.domNode.domNode);\r\n this._containerDomElement.appendChild(this._reviewPane.shadow.domNode);\r\n this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode);\r\n // enableSplitViewResizing\r\n this._enableSplitViewResizing = true;\r\n if (typeof options.enableSplitViewResizing !== 'undefined') {\r\n this._enableSplitViewResizing = options.enableSplitViewResizing;\r\n }\r\n if (this._renderSideBySide) {\r\n this._setStrategy(new DiffEditorWidgetSideBySide(this._createDataSource(), this._enableSplitViewResizing));\r\n }\r\n else {\r\n this._setStrategy(new DiffEditorWidgetInline(this._createDataSource(), this._enableSplitViewResizing));\r\n }\r\n this._register(themeService.onDidColorThemeChange(t => {\r\n if (this._strategy && this._strategy.applyColors(t)) {\r\n this._updateDecorationsRunner.schedule();\r\n }\r\n this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getColorTheme(), this._renderSideBySide);\r\n }));\r\n const contributions = EditorExtensionsRegistry.getDiffEditorContributions();\r\n for (const desc of contributions) {\r\n try {\r\n this._register(instantiationService.createInstance(desc.ctor, this));\r\n }\r\n catch (err) {\r\n onUnexpectedError(err);\r\n }\r\n }\r\n this._codeEditorService.addDiffEditor(this);\r\n }\r\n _setState(newState) {\r\n if (this._state === newState) {\r\n return;\r\n }\r\n this._state = newState;\r\n if (this._updatingDiffProgress) {\r\n this._updatingDiffProgress.done();\r\n this._updatingDiffProgress = null;\r\n }\r\n if (this._state === 1 /* ComputingDiff */) {\r\n this._updatingDiffProgress = this._editorProgressService.show(true, 1000);\r\n }\r\n }\r\n diffReviewNext() {\r\n this._reviewPane.next();\r\n }\r\n diffReviewPrev() {\r\n this._reviewPane.prev();\r\n }\r\n static _getClassName(theme, renderSideBySide) {\r\n let result = 'monaco-diff-editor monaco-editor-background ';\r\n if (renderSideBySide) {\r\n result += 'side-by-side ';\r\n }\r\n result += getThemeTypeSelector(theme.type);\r\n return result;\r\n }\r\n _recreateOverviewRulers() {\r\n if (!this._renderOverviewRuler) {\r\n return;\r\n }\r\n if (this._originalOverviewRuler) {\r\n this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode());\r\n this._originalOverviewRuler.dispose();\r\n }\r\n if (this._originalEditor.hasModel()) {\r\n this._originalOverviewRuler = this._originalEditor.createOverviewRuler('original diffOverviewRuler');\r\n this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode());\r\n }\r\n if (this._modifiedOverviewRuler) {\r\n this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode());\r\n this._modifiedOverviewRuler.dispose();\r\n }\r\n if (this._modifiedEditor.hasModel()) {\r\n this._modifiedOverviewRuler = this._modifiedEditor.createOverviewRuler('modified diffOverviewRuler');\r\n this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode());\r\n }\r\n this._layoutOverviewRulers();\r\n }\r\n _createLeftHandSideEditor(options, codeEditorWidgetOptions, instantiationService, contextKeyService) {\r\n const editor = this._createInnerEditor(instantiationService, this._originalDomNode, this._adjustOptionsForLeftHandSide(options), codeEditorWidgetOptions);\r\n this._register(editor.onDidScrollChange((e) => {\r\n if (this._isHandlingScrollEvent) {\r\n return;\r\n }\r\n if (!e.scrollTopChanged && !e.scrollLeftChanged && !e.scrollHeightChanged) {\r\n return;\r\n }\r\n this._isHandlingScrollEvent = true;\r\n this._modifiedEditor.setScrollPosition({\r\n scrollLeft: e.scrollLeft,\r\n scrollTop: e.scrollTop\r\n });\r\n this._isHandlingScrollEvent = false;\r\n this._layoutOverviewViewport();\r\n }));\r\n this._register(editor.onDidChangeViewZones(() => {\r\n this._onViewZonesChanged();\r\n }));\r\n this._register(editor.onDidChangeConfiguration((e) => {\r\n if (!editor.getModel()) {\r\n return;\r\n }\r\n if (e.hasChanged(38 /* fontInfo */)) {\r\n this._updateDecorationsRunner.schedule();\r\n }\r\n if (e.hasChanged(125 /* wrappingInfo */)) {\r\n this._updateDecorationsRunner.cancel();\r\n this._updateDecorations();\r\n }\r\n }));\r\n this._register(editor.onDidChangeModelContent(() => {\r\n if (this._isVisible) {\r\n this._beginUpdateDecorationsSoon();\r\n }\r\n }));\r\n const isInDiffLeftEditorKey = contextKeyService.createKey('isInDiffLeftEditor', undefined);\r\n this._register(editor.onDidFocusEditorWidget(() => isInDiffLeftEditorKey.set(true)));\r\n this._register(editor.onDidBlurEditorWidget(() => isInDiffLeftEditorKey.set(false)));\r\n this._register(editor.onDidContentSizeChange(e => {\r\n const width = this._originalEditor.getContentWidth() + this._modifiedEditor.getContentWidth() + DiffEditorWidget.ONE_OVERVIEW_WIDTH;\r\n const height = Math.max(this._modifiedEditor.getContentHeight(), this._originalEditor.getContentHeight());\r\n this._onDidContentSizeChange.fire({\r\n contentHeight: height,\r\n contentWidth: width,\r\n contentHeightChanged: e.contentHeightChanged,\r\n contentWidthChanged: e.contentWidthChanged\r\n });\r\n }));\r\n return editor;\r\n }\r\n _createRightHandSideEditor(options, codeEditorWidgetOptions, instantiationService, contextKeyService) {\r\n const editor = this._createInnerEditor(instantiationService, this._modifiedDomNode, this._adjustOptionsForRightHandSide(options), codeEditorWidgetOptions);\r\n this._register(editor.onDidScrollChange((e) => {\r\n if (this._isHandlingScrollEvent) {\r\n return;\r\n }\r\n if (!e.scrollTopChanged && !e.scrollLeftChanged && !e.scrollHeightChanged) {\r\n return;\r\n }\r\n this._isHandlingScrollEvent = true;\r\n this._originalEditor.setScrollPosition({\r\n scrollLeft: e.scrollLeft,\r\n scrollTop: e.scrollTop\r\n });\r\n this._isHandlingScrollEvent = false;\r\n this._layoutOverviewViewport();\r\n }));\r\n this._register(editor.onDidChangeViewZones(() => {\r\n this._onViewZonesChanged();\r\n }));\r\n this._register(editor.onDidChangeConfiguration((e) => {\r\n if (!editor.getModel()) {\r\n return;\r\n }\r\n if (e.hasChanged(38 /* fontInfo */)) {\r\n this._updateDecorationsRunner.schedule();\r\n }\r\n if (e.hasChanged(125 /* wrappingInfo */)) {\r\n this._updateDecorationsRunner.cancel();\r\n this._updateDecorations();\r\n }\r\n }));\r\n this._register(editor.onDidChangeModelContent(() => {\r\n if (this._isVisible) {\r\n this._beginUpdateDecorationsSoon();\r\n }\r\n }));\r\n this._register(editor.onDidChangeModelOptions((e) => {\r\n if (e.tabSize) {\r\n this._updateDecorationsRunner.schedule();\r\n }\r\n }));\r\n const isInDiffRightEditorKey = contextKeyService.createKey('isInDiffRightEditor', undefined);\r\n this._register(editor.onDidFocusEditorWidget(() => isInDiffRightEditorKey.set(true)));\r\n this._register(editor.onDidBlurEditorWidget(() => isInDiffRightEditorKey.set(false)));\r\n this._register(editor.onDidContentSizeChange(e => {\r\n const width = this._originalEditor.getContentWidth() + this._modifiedEditor.getContentWidth() + DiffEditorWidget.ONE_OVERVIEW_WIDTH;\r\n const height = Math.max(this._modifiedEditor.getContentHeight(), this._originalEditor.getContentHeight());\r\n this._onDidContentSizeChange.fire({\r\n contentHeight: height,\r\n contentWidth: width,\r\n contentHeightChanged: e.contentHeightChanged,\r\n contentWidthChanged: e.contentWidthChanged\r\n });\r\n }));\r\n return editor;\r\n }\r\n _createInnerEditor(instantiationService, container, options, editorWidgetOptions) {\r\n return instantiationService.createInstance(CodeEditorWidget, container, options, editorWidgetOptions);\r\n }\r\n dispose() {\r\n this._codeEditorService.removeDiffEditor(this);\r\n if (this._beginUpdateDecorationsTimeout !== -1) {\r\n window.clearTimeout(this._beginUpdateDecorationsTimeout);\r\n this._beginUpdateDecorationsTimeout = -1;\r\n }\r\n this._cleanViewZonesAndDecorations();\r\n if (this._originalOverviewRuler) {\r\n this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode());\r\n this._originalOverviewRuler.dispose();\r\n }\r\n if (this._modifiedOverviewRuler) {\r\n this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode());\r\n this._modifiedOverviewRuler.dispose();\r\n }\r\n this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode);\r\n if (this._renderOverviewRuler) {\r\n this._containerDomElement.removeChild(this._overviewDomElement);\r\n }\r\n this._containerDomElement.removeChild(this._originalDomNode);\r\n this._originalEditor.dispose();\r\n this._containerDomElement.removeChild(this._modifiedDomNode);\r\n this._modifiedEditor.dispose();\r\n this._strategy.dispose();\r\n this._containerDomElement.removeChild(this._reviewPane.domNode.domNode);\r\n this._containerDomElement.removeChild(this._reviewPane.shadow.domNode);\r\n this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode);\r\n this._reviewPane.dispose();\r\n this._domElement.removeChild(this._containerDomElement);\r\n this._onDidDispose.fire();\r\n super.dispose();\r\n }\r\n //------------ begin IDiffEditor methods\r\n getId() {\r\n return this.getEditorType() + ':' + this._id;\r\n }\r\n getEditorType() {\r\n return editorCommon.EditorType.IDiffEditor;\r\n }\r\n getLineChanges() {\r\n if (!this._diffComputationResult) {\r\n return null;\r\n }\r\n return this._diffComputationResult.changes;\r\n }\r\n getOriginalEditor() {\r\n return this._originalEditor;\r\n }\r\n getModifiedEditor() {\r\n return this._modifiedEditor;\r\n }\r\n updateOptions(newOptions) {\r\n // Handle side by side\r\n let renderSideBySideChanged = false;\r\n if (typeof newOptions.renderSideBySide !== 'undefined') {\r\n if (this._renderSideBySide !== newOptions.renderSideBySide) {\r\n this._renderSideBySide = newOptions.renderSideBySide;\r\n renderSideBySideChanged = true;\r\n }\r\n }\r\n if (typeof newOptions.maxComputationTime !== 'undefined') {\r\n this._maxComputationTime = newOptions.maxComputationTime;\r\n if (this._isVisible) {\r\n this._beginUpdateDecorationsSoon();\r\n }\r\n }\r\n let beginUpdateDecorations = false;\r\n if (typeof newOptions.ignoreTrimWhitespace !== 'undefined') {\r\n if (this._ignoreTrimWhitespace !== newOptions.ignoreTrimWhitespace) {\r\n this._ignoreTrimWhitespace = newOptions.ignoreTrimWhitespace;\r\n // Begin comparing\r\n beginUpdateDecorations = true;\r\n }\r\n }\r\n if (typeof newOptions.renderIndicators !== 'undefined') {\r\n if (this._renderIndicators !== newOptions.renderIndicators) {\r\n this._renderIndicators = newOptions.renderIndicators;\r\n beginUpdateDecorations = true;\r\n }\r\n }\r\n if (beginUpdateDecorations) {\r\n this._beginUpdateDecorations();\r\n }\r\n this._originalIsEditable = validateBooleanOption(newOptions.originalEditable, this._originalIsEditable);\r\n this._diffCodeLens = validateBooleanOption(newOptions.diffCodeLens, this._diffCodeLens);\r\n this._diffWordWrap = validateDiffWordWrap(newOptions.diffWordWrap, this._diffWordWrap);\r\n this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(newOptions));\r\n this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(newOptions));\r\n // enableSplitViewResizing\r\n if (typeof newOptions.enableSplitViewResizing !== 'undefined') {\r\n this._enableSplitViewResizing = newOptions.enableSplitViewResizing;\r\n }\r\n this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing);\r\n // renderSideBySide\r\n if (renderSideBySideChanged) {\r\n if (this._renderSideBySide) {\r\n this._setStrategy(new DiffEditorWidgetSideBySide(this._createDataSource(), this._enableSplitViewResizing));\r\n }\r\n else {\r\n this._setStrategy(new DiffEditorWidgetInline(this._createDataSource(), this._enableSplitViewResizing));\r\n }\r\n // Update class name\r\n this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getColorTheme(), this._renderSideBySide);\r\n }\r\n // renderOverviewRuler\r\n if (typeof newOptions.renderOverviewRuler !== 'undefined' && this._renderOverviewRuler !== newOptions.renderOverviewRuler) {\r\n this._renderOverviewRuler = newOptions.renderOverviewRuler;\r\n if (this._renderOverviewRuler) {\r\n this._containerDomElement.appendChild(this._overviewDomElement);\r\n }\r\n else {\r\n this._containerDomElement.removeChild(this._overviewDomElement);\r\n }\r\n }\r\n }\r\n getModel() {\r\n return {\r\n original: this._originalEditor.getModel(),\r\n modified: this._modifiedEditor.getModel()\r\n };\r\n }\r\n setModel(model) {\r\n // Guard us against partial null model\r\n if (model && (!model.original || !model.modified)) {\r\n throw new Error(!model.original ? 'DiffEditorWidget.setModel: Original model is null' : 'DiffEditorWidget.setModel: Modified model is null');\r\n }\r\n // Remove all view zones & decorations\r\n this._cleanViewZonesAndDecorations();\r\n // Update code editor models\r\n this._originalEditor.setModel(model ? model.original : null);\r\n this._modifiedEditor.setModel(model ? model.modified : null);\r\n this._updateDecorationsRunner.cancel();\r\n // this.originalEditor.onDidChangeModelOptions\r\n if (model) {\r\n this._originalEditor.setScrollTop(0);\r\n this._modifiedEditor.setScrollTop(0);\r\n }\r\n // Disable any diff computations that will come in\r\n this._diffComputationResult = null;\r\n this._diffComputationToken++;\r\n this._setState(0 /* Idle */);\r\n if (model) {\r\n this._recreateOverviewRulers();\r\n // Begin comparing\r\n this._beginUpdateDecorations();\r\n }\r\n this._layoutOverviewViewport();\r\n }\r\n getDomNode() {\r\n return this._domElement;\r\n }\r\n getVisibleColumnFromPosition(position) {\r\n return this._modifiedEditor.getVisibleColumnFromPosition(position);\r\n }\r\n getPosition() {\r\n return this._modifiedEditor.getPosition();\r\n }\r\n setPosition(position) {\r\n this._modifiedEditor.setPosition(position);\r\n }\r\n revealLine(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLine(lineNumber, scrollType);\r\n }\r\n revealLineInCenter(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLineInCenter(lineNumber, scrollType);\r\n }\r\n revealLineInCenterIfOutsideViewport(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLineInCenterIfOutsideViewport(lineNumber, scrollType);\r\n }\r\n revealLineNearTop(lineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLineNearTop(lineNumber, scrollType);\r\n }\r\n revealPosition(position, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealPosition(position, scrollType);\r\n }\r\n revealPositionInCenter(position, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealPositionInCenter(position, scrollType);\r\n }\r\n revealPositionInCenterIfOutsideViewport(position, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealPositionInCenterIfOutsideViewport(position, scrollType);\r\n }\r\n revealPositionNearTop(position, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealPositionNearTop(position, scrollType);\r\n }\r\n getSelection() {\r\n return this._modifiedEditor.getSelection();\r\n }\r\n getSelections() {\r\n return this._modifiedEditor.getSelections();\r\n }\r\n setSelection(something) {\r\n this._modifiedEditor.setSelection(something);\r\n }\r\n setSelections(ranges) {\r\n this._modifiedEditor.setSelections(ranges);\r\n }\r\n revealLines(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLines(startLineNumber, endLineNumber, scrollType);\r\n }\r\n revealLinesInCenter(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLinesInCenter(startLineNumber, endLineNumber, scrollType);\r\n }\r\n revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType);\r\n }\r\n revealLinesNearTop(startLineNumber, endLineNumber, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealLinesNearTop(startLineNumber, endLineNumber, scrollType);\r\n }\r\n revealRange(range, scrollType = 0 /* Smooth */, revealVerticalInCenter = false, revealHorizontal = true) {\r\n this._modifiedEditor.revealRange(range, scrollType, revealVerticalInCenter, revealHorizontal);\r\n }\r\n revealRangeInCenter(range, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealRangeInCenter(range, scrollType);\r\n }\r\n revealRangeInCenterIfOutsideViewport(range, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealRangeInCenterIfOutsideViewport(range, scrollType);\r\n }\r\n revealRangeNearTop(range, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealRangeNearTop(range, scrollType);\r\n }\r\n revealRangeNearTopIfOutsideViewport(range, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealRangeNearTopIfOutsideViewport(range, scrollType);\r\n }\r\n revealRangeAtTop(range, scrollType = 0 /* Smooth */) {\r\n this._modifiedEditor.revealRangeAtTop(range, scrollType);\r\n }\r\n getSupportedActions() {\r\n return this._modifiedEditor.getSupportedActions();\r\n }\r\n saveViewState() {\r\n const originalViewState = this._originalEditor.saveViewState();\r\n const modifiedViewState = this._modifiedEditor.saveViewState();\r\n return {\r\n original: originalViewState,\r\n modified: modifiedViewState\r\n };\r\n }\r\n restoreViewState(s) {\r\n if (s && s.original && s.modified) {\r\n const diffEditorState = s;\r\n this._originalEditor.restoreViewState(diffEditorState.original);\r\n this._modifiedEditor.restoreViewState(diffEditorState.modified);\r\n }\r\n }\r\n layout(dimension) {\r\n this._elementSizeObserver.observe(dimension);\r\n }\r\n focus() {\r\n this._modifiedEditor.focus();\r\n }\r\n hasTextFocus() {\r\n return this._originalEditor.hasTextFocus() || this._modifiedEditor.hasTextFocus();\r\n }\r\n trigger(source, handlerId, payload) {\r\n this._modifiedEditor.trigger(source, handlerId, payload);\r\n }\r\n changeDecorations(callback) {\r\n return this._modifiedEditor.changeDecorations(callback);\r\n }\r\n //------------ end IDiffEditor methods\r\n //------------ begin layouting methods\r\n _onDidContainerSizeChanged() {\r\n this._doLayout();\r\n }\r\n _getReviewHeight() {\r\n return this._reviewPane.isVisible() ? this._elementSizeObserver.getHeight() : 0;\r\n }\r\n _layoutOverviewRulers() {\r\n if (!this._renderOverviewRuler) {\r\n return;\r\n }\r\n if (!this._originalOverviewRuler || !this._modifiedOverviewRuler) {\r\n return;\r\n }\r\n const height = this._elementSizeObserver.getHeight();\r\n const reviewHeight = this._getReviewHeight();\r\n const freeSpace = DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH - 2 * DiffEditorWidget.ONE_OVERVIEW_WIDTH;\r\n const layoutInfo = this._modifiedEditor.getLayoutInfo();\r\n if (layoutInfo) {\r\n this._originalOverviewRuler.setLayout({\r\n top: 0,\r\n width: DiffEditorWidget.ONE_OVERVIEW_WIDTH,\r\n right: freeSpace + DiffEditorWidget.ONE_OVERVIEW_WIDTH,\r\n height: (height - reviewHeight)\r\n });\r\n this._modifiedOverviewRuler.setLayout({\r\n top: 0,\r\n right: 0,\r\n width: DiffEditorWidget.ONE_OVERVIEW_WIDTH,\r\n height: (height - reviewHeight)\r\n });\r\n }\r\n }\r\n //------------ end layouting methods\r\n _onViewZonesChanged() {\r\n if (this._currentlyChangingViewZones) {\r\n return;\r\n }\r\n this._updateDecorationsRunner.schedule();\r\n }\r\n _beginUpdateDecorationsSoon() {\r\n // Clear previous timeout if necessary\r\n if (this._beginUpdateDecorationsTimeout !== -1) {\r\n window.clearTimeout(this._beginUpdateDecorationsTimeout);\r\n this._beginUpdateDecorationsTimeout = -1;\r\n }\r\n this._beginUpdateDecorationsTimeout = window.setTimeout(() => this._beginUpdateDecorations(), DiffEditorWidget.UPDATE_DIFF_DECORATIONS_DELAY);\r\n }\r\n static _equals(a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n if (!a || !b) {\r\n return false;\r\n }\r\n return (a.toString() === b.toString());\r\n }\r\n _beginUpdateDecorations() {\r\n this._beginUpdateDecorationsTimeout = -1;\r\n const currentOriginalModel = this._originalEditor.getModel();\r\n const currentModifiedModel = this._modifiedEditor.getModel();\r\n if (!currentOriginalModel || !currentModifiedModel) {\r\n return;\r\n }\r\n // Prevent old diff requests to come if a new request has been initiated\r\n // The best method would be to call cancel on the Promise, but this is not\r\n // yet supported, so using tokens for now.\r\n this._diffComputationToken++;\r\n const currentToken = this._diffComputationToken;\r\n this._setState(1 /* ComputingDiff */);\r\n if (!this._editorWorkerService.canComputeDiff(currentOriginalModel.uri, currentModifiedModel.uri)) {\r\n if (!DiffEditorWidget._equals(currentOriginalModel.uri, this._lastOriginalWarning)\r\n || !DiffEditorWidget._equals(currentModifiedModel.uri, this._lastModifiedWarning)) {\r\n this._lastOriginalWarning = currentOriginalModel.uri;\r\n this._lastModifiedWarning = currentModifiedModel.uri;\r\n this._notificationService.warn(nls.localize(\"diff.tooLarge\", \"Cannot compare files because one file is too large.\"));\r\n }\r\n return;\r\n }\r\n this._editorWorkerService.computeDiff(currentOriginalModel.uri, currentModifiedModel.uri, this._ignoreTrimWhitespace, this._maxComputationTime).then((result) => {\r\n if (currentToken === this._diffComputationToken\r\n && currentOriginalModel === this._originalEditor.getModel()\r\n && currentModifiedModel === this._modifiedEditor.getModel()) {\r\n this._setState(2 /* DiffComputed */);\r\n this._diffComputationResult = result;\r\n this._updateDecorationsRunner.schedule();\r\n this._onDidUpdateDiff.fire();\r\n }\r\n }, (error) => {\r\n if (currentToken === this._diffComputationToken\r\n && currentOriginalModel === this._originalEditor.getModel()\r\n && currentModifiedModel === this._modifiedEditor.getModel()) {\r\n this._setState(2 /* DiffComputed */);\r\n this._diffComputationResult = null;\r\n this._updateDecorationsRunner.schedule();\r\n }\r\n });\r\n }\r\n _cleanViewZonesAndDecorations() {\r\n this._originalEditorState.clean(this._originalEditor);\r\n this._modifiedEditorState.clean(this._modifiedEditor);\r\n }\r\n _updateDecorations() {\r\n if (!this._originalEditor.getModel() || !this._modifiedEditor.getModel()) {\r\n return;\r\n }\r\n const lineChanges = (this._diffComputationResult ? this._diffComputationResult.changes : []);\r\n const foreignOriginal = this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces());\r\n const foreignModified = this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces());\r\n const diffDecorations = this._strategy.getEditorsDiffDecorations(lineChanges, this._ignoreTrimWhitespace, this._renderIndicators, foreignOriginal, foreignModified);\r\n try {\r\n this._currentlyChangingViewZones = true;\r\n this._originalEditorState.apply(this._originalEditor, this._originalOverviewRuler, diffDecorations.original, false);\r\n this._modifiedEditorState.apply(this._modifiedEditor, this._modifiedOverviewRuler, diffDecorations.modified, true);\r\n }\r\n finally {\r\n this._currentlyChangingViewZones = false;\r\n }\r\n }\r\n _adjustOptionsForSubEditor(options) {\r\n const clonedOptions = Object.assign({}, options);\r\n clonedOptions.inDiffEditor = true;\r\n clonedOptions.automaticLayout = false;\r\n clonedOptions.scrollbar = clonedOptions.scrollbar || {};\r\n clonedOptions.scrollbar.vertical = 'visible';\r\n clonedOptions.folding = false;\r\n clonedOptions.codeLens = this._diffCodeLens;\r\n clonedOptions.fixedOverflowWidgets = true;\r\n // clonedOptions.lineDecorationsWidth = '2ch';\r\n if (!clonedOptions.minimap) {\r\n clonedOptions.minimap = {};\r\n }\r\n clonedOptions.minimap.enabled = false;\r\n return clonedOptions;\r\n }\r\n _adjustOptionsForLeftHandSide(options) {\r\n const result = this._adjustOptionsForSubEditor(options);\r\n if (!this._renderSideBySide) {\r\n // never wrap hidden editor\r\n result.wordWrapOverride1 = 'off';\r\n }\r\n else {\r\n result.wordWrapOverride1 = this._diffWordWrap;\r\n }\r\n result.readOnly = !this._originalIsEditable;\r\n result.extraEditorClassName = 'original-in-monaco-diff-editor';\r\n return Object.assign(Object.assign({}, result), { dimension: {\r\n height: 0,\r\n width: 0\r\n } });\r\n }\r\n _adjustOptionsForRightHandSide(options) {\r\n const result = this._adjustOptionsForSubEditor(options);\r\n result.wordWrapOverride1 = this._diffWordWrap;\r\n result.revealHorizontalRightPadding = EditorOptions.revealHorizontalRightPadding.defaultValue + DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH;\r\n result.scrollbar.verticalHasArrows = false;\r\n result.extraEditorClassName = 'modified-in-monaco-diff-editor';\r\n return Object.assign(Object.assign({}, result), { dimension: {\r\n height: 0,\r\n width: 0\r\n } });\r\n }\r\n doLayout() {\r\n this._elementSizeObserver.observe();\r\n this._doLayout();\r\n }\r\n _doLayout() {\r\n const width = this._elementSizeObserver.getWidth();\r\n const height = this._elementSizeObserver.getHeight();\r\n const reviewHeight = this._getReviewHeight();\r\n const splitPoint = this._strategy.layout();\r\n this._originalDomNode.style.width = splitPoint + 'px';\r\n this._originalDomNode.style.left = '0px';\r\n this._modifiedDomNode.style.width = (width - splitPoint) + 'px';\r\n this._modifiedDomNode.style.left = splitPoint + 'px';\r\n this._overviewDomElement.style.top = '0px';\r\n this._overviewDomElement.style.height = (height - reviewHeight) + 'px';\r\n this._overviewDomElement.style.width = DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH + 'px';\r\n this._overviewDomElement.style.left = (width - DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH) + 'px';\r\n this._overviewViewportDomElement.setWidth(DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH);\r\n this._overviewViewportDomElement.setHeight(30);\r\n this._originalEditor.layout({ width: splitPoint, height: (height - reviewHeight) });\r\n this._modifiedEditor.layout({ width: width - splitPoint - (this._renderOverviewRuler ? DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH : 0), height: (height - reviewHeight) });\r\n if (this._originalOverviewRuler || this._modifiedOverviewRuler) {\r\n this._layoutOverviewRulers();\r\n }\r\n this._reviewPane.layout(height - reviewHeight, width, reviewHeight);\r\n this._layoutOverviewViewport();\r\n }\r\n _layoutOverviewViewport() {\r\n const layout = this._computeOverviewViewport();\r\n if (!layout) {\r\n this._overviewViewportDomElement.setTop(0);\r\n this._overviewViewportDomElement.setHeight(0);\r\n }\r\n else {\r\n this._overviewViewportDomElement.setTop(layout.top);\r\n this._overviewViewportDomElement.setHeight(layout.height);\r\n }\r\n }\r\n _computeOverviewViewport() {\r\n const layoutInfo = this._modifiedEditor.getLayoutInfo();\r\n if (!layoutInfo) {\r\n return null;\r\n }\r\n const scrollTop = this._modifiedEditor.getScrollTop();\r\n const scrollHeight = this._modifiedEditor.getScrollHeight();\r\n const computedAvailableSize = Math.max(0, layoutInfo.height);\r\n const computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * 0);\r\n const computedRatio = scrollHeight > 0 ? (computedRepresentableSize / scrollHeight) : 0;\r\n const computedSliderSize = Math.max(0, Math.floor(layoutInfo.height * computedRatio));\r\n const computedSliderPosition = Math.floor(scrollTop * computedRatio);\r\n return {\r\n height: computedSliderSize,\r\n top: computedSliderPosition\r\n };\r\n }\r\n _createDataSource() {\r\n return {\r\n getWidth: () => {\r\n return this._elementSizeObserver.getWidth();\r\n },\r\n getHeight: () => {\r\n return (this._elementSizeObserver.getHeight() - this._getReviewHeight());\r\n },\r\n getOptions: () => {\r\n return {\r\n renderOverviewRuler: this._renderOverviewRuler\r\n };\r\n },\r\n getContainerDomNode: () => {\r\n return this._containerDomElement;\r\n },\r\n relayoutEditors: () => {\r\n this._doLayout();\r\n },\r\n getOriginalEditor: () => {\r\n return this._originalEditor;\r\n },\r\n getModifiedEditor: () => {\r\n return this._modifiedEditor;\r\n }\r\n };\r\n }\r\n _setStrategy(newStrategy) {\r\n if (this._strategy) {\r\n this._strategy.dispose();\r\n }\r\n this._strategy = newStrategy;\r\n newStrategy.applyColors(this._themeService.getColorTheme());\r\n if (this._diffComputationResult) {\r\n this._updateDecorations();\r\n }\r\n // Just do a layout, the strategy might need it\r\n this._doLayout();\r\n }\r\n _getLineChangeAtOrBeforeLineNumber(lineNumber, startLineNumberExtractor) {\r\n const lineChanges = (this._diffComputationResult ? this._diffComputationResult.changes : []);\r\n if (lineChanges.length === 0 || lineNumber < startLineNumberExtractor(lineChanges[0])) {\r\n // There are no changes or `lineNumber` is before the first change\r\n return null;\r\n }\r\n let min = 0;\r\n let max = lineChanges.length - 1;\r\n while (min < max) {\r\n const mid = Math.floor((min + max) / 2);\r\n const midStart = startLineNumberExtractor(lineChanges[mid]);\r\n const midEnd = (mid + 1 <= max ? startLineNumberExtractor(lineChanges[mid + 1]) : 1073741824 /* MAX_SAFE_SMALL_INTEGER */);\r\n if (lineNumber < midStart) {\r\n max = mid - 1;\r\n }\r\n else if (lineNumber >= midEnd) {\r\n min = mid + 1;\r\n }\r\n else {\r\n // HIT!\r\n min = mid;\r\n max = mid;\r\n }\r\n }\r\n return lineChanges[min];\r\n }\r\n _getEquivalentLineForOriginalLineNumber(lineNumber) {\r\n const lineChange = this._getLineChangeAtOrBeforeLineNumber(lineNumber, (lineChange) => lineChange.originalStartLineNumber);\r\n if (!lineChange) {\r\n return lineNumber;\r\n }\r\n const originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0);\r\n const modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0);\r\n const lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? (lineChange.originalEndLineNumber - lineChange.originalStartLineNumber + 1) : 0);\r\n const lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? (lineChange.modifiedEndLineNumber - lineChange.modifiedStartLineNumber + 1) : 0);\r\n const delta = lineNumber - originalEquivalentLineNumber;\r\n if (delta <= lineChangeOriginalLength) {\r\n return modifiedEquivalentLineNumber + Math.min(delta, lineChangeModifiedLength);\r\n }\r\n return modifiedEquivalentLineNumber + lineChangeModifiedLength - lineChangeOriginalLength + delta;\r\n }\r\n _getEquivalentLineForModifiedLineNumber(lineNumber) {\r\n const lineChange = this._getLineChangeAtOrBeforeLineNumber(lineNumber, (lineChange) => lineChange.modifiedStartLineNumber);\r\n if (!lineChange) {\r\n return lineNumber;\r\n }\r\n const originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0);\r\n const modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0);\r\n const lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? (lineChange.originalEndLineNumber - lineChange.originalStartLineNumber + 1) : 0);\r\n const lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? (lineChange.modifiedEndLineNumber - lineChange.modifiedStartLineNumber + 1) : 0);\r\n const delta = lineNumber - modifiedEquivalentLineNumber;\r\n if (delta <= lineChangeModifiedLength) {\r\n return originalEquivalentLineNumber + Math.min(delta, lineChangeOriginalLength);\r\n }\r\n return originalEquivalentLineNumber + lineChangeOriginalLength - lineChangeModifiedLength + delta;\r\n }\r\n getDiffLineInformationForOriginal(lineNumber) {\r\n if (!this._diffComputationResult) {\r\n // Cannot answer that which I don't know\r\n return null;\r\n }\r\n return {\r\n equivalentLineNumber: this._getEquivalentLineForOriginalLineNumber(lineNumber)\r\n };\r\n }\r\n getDiffLineInformationForModified(lineNumber) {\r\n if (!this._diffComputationResult) {\r\n // Cannot answer that which I don't know\r\n return null;\r\n }\r\n return {\r\n equivalentLineNumber: this._getEquivalentLineForModifiedLineNumber(lineNumber)\r\n };\r\n }\r\n};\r\nDiffEditorWidget.ONE_OVERVIEW_WIDTH = 15;\r\nDiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH = 30;\r\nDiffEditorWidget.UPDATE_DIFF_DECORATIONS_DELAY = 200; // ms\r\nDiffEditorWidget = __decorate([\r\n __param(3, IClipboardService),\r\n __param(4, IEditorWorkerService),\r\n __param(5, IContextKeyService),\r\n __param(6, IInstantiationService),\r\n __param(7, ICodeEditorService),\r\n __param(8, IThemeService),\r\n __param(9, INotificationService),\r\n __param(10, IContextMenuService),\r\n __param(11, IEditorProgressService)\r\n], DiffEditorWidget);\r\nexport { DiffEditorWidget };\r\nclass DiffEditorWidgetStyle extends Disposable {\r\n constructor(dataSource) {\r\n super();\r\n this._dataSource = dataSource;\r\n this._insertColor = null;\r\n this._removeColor = null;\r\n }\r\n applyColors(theme) {\r\n const newInsertColor = (theme.getColor(diffInserted) || defaultInsertColor).transparent(2);\r\n const newRemoveColor = (theme.getColor(diffRemoved) || defaultRemoveColor).transparent(2);\r\n const hasChanges = !newInsertColor.equals(this._insertColor) || !newRemoveColor.equals(this._removeColor);\r\n this._insertColor = newInsertColor;\r\n this._removeColor = newRemoveColor;\r\n return hasChanges;\r\n }\r\n getEditorsDiffDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators, originalWhitespaces, modifiedWhitespaces) {\r\n // Get view zones\r\n modifiedWhitespaces = modifiedWhitespaces.sort((a, b) => {\r\n return a.afterLineNumber - b.afterLineNumber;\r\n });\r\n originalWhitespaces = originalWhitespaces.sort((a, b) => {\r\n return a.afterLineNumber - b.afterLineNumber;\r\n });\r\n const zones = this._getViewZones(lineChanges, originalWhitespaces, modifiedWhitespaces, renderIndicators);\r\n // Get decorations & overview ruler zones\r\n const originalDecorations = this._getOriginalEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators);\r\n const modifiedDecorations = this._getModifiedEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators);\r\n return {\r\n original: {\r\n decorations: originalDecorations.decorations,\r\n overviewZones: originalDecorations.overviewZones,\r\n zones: zones.original\r\n },\r\n modified: {\r\n decorations: modifiedDecorations.decorations,\r\n overviewZones: modifiedDecorations.overviewZones,\r\n zones: zones.modified\r\n }\r\n };\r\n }\r\n}\r\nclass ForeignViewZonesIterator {\r\n constructor(source) {\r\n this._source = source;\r\n this._index = -1;\r\n this.current = null;\r\n this.advance();\r\n }\r\n advance() {\r\n this._index++;\r\n if (this._index < this._source.length) {\r\n this.current = this._source[this._index];\r\n }\r\n else {\r\n this.current = null;\r\n }\r\n }\r\n}\r\nclass ViewZonesComputer {\r\n constructor(_lineChanges, _originalForeignVZ, _modifiedForeignVZ, _originalEditor, _modifiedEditor) {\r\n this._lineChanges = _lineChanges;\r\n this._originalForeignVZ = _originalForeignVZ;\r\n this._modifiedForeignVZ = _modifiedForeignVZ;\r\n this._originalEditor = _originalEditor;\r\n this._modifiedEditor = _modifiedEditor;\r\n }\r\n static _getViewLineCount(editor, startLineNumber, endLineNumber) {\r\n const model = editor.getModel();\r\n const viewModel = editor._getViewModel();\r\n if (model && viewModel) {\r\n const viewRange = getViewRange(model, viewModel, startLineNumber, endLineNumber);\r\n return (viewRange.endLineNumber - viewRange.startLineNumber + 1);\r\n }\r\n return (endLineNumber - startLineNumber + 1);\r\n }\r\n getViewZones() {\r\n const originalLineHeight = this._originalEditor.getOption(53 /* lineHeight */);\r\n const modifiedLineHeight = this._modifiedEditor.getOption(53 /* lineHeight */);\r\n const originalHasWrapping = (this._originalEditor.getOption(125 /* wrappingInfo */).wrappingColumn !== -1);\r\n const modifiedHasWrapping = (this._modifiedEditor.getOption(125 /* wrappingInfo */).wrappingColumn !== -1);\r\n const hasWrapping = (originalHasWrapping || modifiedHasWrapping);\r\n const originalModel = this._originalEditor.getModel();\r\n const originalCoordinatesConverter = this._originalEditor._getViewModel().coordinatesConverter;\r\n const modifiedCoordinatesConverter = this._modifiedEditor._getViewModel().coordinatesConverter;\r\n const result = {\r\n original: [],\r\n modified: []\r\n };\r\n let lineChangeModifiedLength = 0;\r\n let lineChangeOriginalLength = 0;\r\n let originalEquivalentLineNumber = 0;\r\n let modifiedEquivalentLineNumber = 0;\r\n let originalEndEquivalentLineNumber = 0;\r\n let modifiedEndEquivalentLineNumber = 0;\r\n const sortMyViewZones = (a, b) => {\r\n return a.afterLineNumber - b.afterLineNumber;\r\n };\r\n const addAndCombineIfPossible = (destination, item) => {\r\n if (item.domNode === null && destination.length > 0) {\r\n const lastItem = destination[destination.length - 1];\r\n if (lastItem.afterLineNumber === item.afterLineNumber && lastItem.domNode === null) {\r\n lastItem.heightInLines += item.heightInLines;\r\n return;\r\n }\r\n }\r\n destination.push(item);\r\n };\r\n const modifiedForeignVZ = new ForeignViewZonesIterator(this._modifiedForeignVZ);\r\n const originalForeignVZ = new ForeignViewZonesIterator(this._originalForeignVZ);\r\n let lastOriginalLineNumber = 1;\r\n let lastModifiedLineNumber = 1;\r\n // In order to include foreign view zones after the last line change, the for loop will iterate once more after the end of the `lineChanges` array\r\n for (let i = 0, length = this._lineChanges.length; i <= length; i++) {\r\n const lineChange = (i < length ? this._lineChanges[i] : null);\r\n if (lineChange !== null) {\r\n originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0);\r\n modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0);\r\n lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? ViewZonesComputer._getViewLineCount(this._originalEditor, lineChange.originalStartLineNumber, lineChange.originalEndLineNumber) : 0);\r\n lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? ViewZonesComputer._getViewLineCount(this._modifiedEditor, lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber) : 0);\r\n originalEndEquivalentLineNumber = Math.max(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber);\r\n modifiedEndEquivalentLineNumber = Math.max(lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber);\r\n }\r\n else {\r\n // Increase to very large value to get the producing tests of foreign view zones running\r\n originalEquivalentLineNumber += 10000000 + lineChangeOriginalLength;\r\n modifiedEquivalentLineNumber += 10000000 + lineChangeModifiedLength;\r\n originalEndEquivalentLineNumber = originalEquivalentLineNumber;\r\n modifiedEndEquivalentLineNumber = modifiedEquivalentLineNumber;\r\n }\r\n // Each step produces view zones, and after producing them, we try to cancel them out, to avoid empty-empty view zone cases\r\n let stepOriginal = [];\r\n let stepModified = [];\r\n // ---------------------------- PRODUCE VIEW ZONES\r\n // [PRODUCE] View zones due to line mapping differences (equal lines but wrapped differently)\r\n if (hasWrapping) {\r\n let count;\r\n if (lineChange) {\r\n if (lineChange.originalEndLineNumber > 0) {\r\n count = lineChange.originalStartLineNumber - lastOriginalLineNumber;\r\n }\r\n else {\r\n count = lineChange.modifiedStartLineNumber - lastModifiedLineNumber;\r\n }\r\n }\r\n else {\r\n count = originalModel.getLineCount() - lastOriginalLineNumber;\r\n }\r\n for (let i = 0; i < count; i++) {\r\n const originalLineNumber = lastOriginalLineNumber + i;\r\n const modifiedLineNumber = lastModifiedLineNumber + i;\r\n const originalViewLineCount = originalCoordinatesConverter.getModelLineViewLineCount(originalLineNumber);\r\n const modifiedViewLineCount = modifiedCoordinatesConverter.getModelLineViewLineCount(modifiedLineNumber);\r\n if (originalViewLineCount < modifiedViewLineCount) {\r\n stepOriginal.push({\r\n afterLineNumber: originalLineNumber,\r\n heightInLines: modifiedViewLineCount - originalViewLineCount,\r\n domNode: null,\r\n marginDomNode: null\r\n });\r\n }\r\n else if (originalViewLineCount > modifiedViewLineCount) {\r\n stepModified.push({\r\n afterLineNumber: modifiedLineNumber,\r\n heightInLines: originalViewLineCount - modifiedViewLineCount,\r\n domNode: null,\r\n marginDomNode: null\r\n });\r\n }\r\n }\r\n if (lineChange) {\r\n lastOriginalLineNumber = (lineChange.originalEndLineNumber > 0 ? lineChange.originalEndLineNumber : lineChange.originalStartLineNumber) + 1;\r\n lastModifiedLineNumber = (lineChange.modifiedEndLineNumber > 0 ? lineChange.modifiedEndLineNumber : lineChange.modifiedStartLineNumber) + 1;\r\n }\r\n }\r\n // [PRODUCE] View zone(s) in original-side due to foreign view zone(s) in modified-side\r\n while (modifiedForeignVZ.current && modifiedForeignVZ.current.afterLineNumber <= modifiedEndEquivalentLineNumber) {\r\n let viewZoneLineNumber;\r\n if (modifiedForeignVZ.current.afterLineNumber <= modifiedEquivalentLineNumber) {\r\n viewZoneLineNumber = originalEquivalentLineNumber - modifiedEquivalentLineNumber + modifiedForeignVZ.current.afterLineNumber;\r\n }\r\n else {\r\n viewZoneLineNumber = originalEndEquivalentLineNumber;\r\n }\r\n let marginDomNode = null;\r\n if (lineChange && lineChange.modifiedStartLineNumber <= modifiedForeignVZ.current.afterLineNumber && modifiedForeignVZ.current.afterLineNumber <= lineChange.modifiedEndLineNumber) {\r\n marginDomNode = this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion();\r\n }\r\n stepOriginal.push({\r\n afterLineNumber: viewZoneLineNumber,\r\n heightInLines: modifiedForeignVZ.current.height / modifiedLineHeight,\r\n domNode: null,\r\n marginDomNode: marginDomNode\r\n });\r\n modifiedForeignVZ.advance();\r\n }\r\n // [PRODUCE] View zone(s) in modified-side due to foreign view zone(s) in original-side\r\n while (originalForeignVZ.current && originalForeignVZ.current.afterLineNumber <= originalEndEquivalentLineNumber) {\r\n let viewZoneLineNumber;\r\n if (originalForeignVZ.current.afterLineNumber <= originalEquivalentLineNumber) {\r\n viewZoneLineNumber = modifiedEquivalentLineNumber - originalEquivalentLineNumber + originalForeignVZ.current.afterLineNumber;\r\n }\r\n else {\r\n viewZoneLineNumber = modifiedEndEquivalentLineNumber;\r\n }\r\n stepModified.push({\r\n afterLineNumber: viewZoneLineNumber,\r\n heightInLines: originalForeignVZ.current.height / originalLineHeight,\r\n domNode: null\r\n });\r\n originalForeignVZ.advance();\r\n }\r\n if (lineChange !== null && isChangeOrInsert(lineChange)) {\r\n const r = this._produceOriginalFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength);\r\n if (r) {\r\n stepOriginal.push(r);\r\n }\r\n }\r\n if (lineChange !== null && isChangeOrDelete(lineChange)) {\r\n const r = this._produceModifiedFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength);\r\n if (r) {\r\n stepModified.push(r);\r\n }\r\n }\r\n // ---------------------------- END PRODUCE VIEW ZONES\r\n // ---------------------------- EMIT MINIMAL VIEW ZONES\r\n // [CANCEL & EMIT] Try to cancel view zones out\r\n let stepOriginalIndex = 0;\r\n let stepModifiedIndex = 0;\r\n stepOriginal = stepOriginal.sort(sortMyViewZones);\r\n stepModified = stepModified.sort(sortMyViewZones);\r\n while (stepOriginalIndex < stepOriginal.length && stepModifiedIndex < stepModified.length) {\r\n const original = stepOriginal[stepOriginalIndex];\r\n const modified = stepModified[stepModifiedIndex];\r\n const originalDelta = original.afterLineNumber - originalEquivalentLineNumber;\r\n const modifiedDelta = modified.afterLineNumber - modifiedEquivalentLineNumber;\r\n if (originalDelta < modifiedDelta) {\r\n addAndCombineIfPossible(result.original, original);\r\n stepOriginalIndex++;\r\n }\r\n else if (modifiedDelta < originalDelta) {\r\n addAndCombineIfPossible(result.modified, modified);\r\n stepModifiedIndex++;\r\n }\r\n else if (original.shouldNotShrink) {\r\n addAndCombineIfPossible(result.original, original);\r\n stepOriginalIndex++;\r\n }\r\n else if (modified.shouldNotShrink) {\r\n addAndCombineIfPossible(result.modified, modified);\r\n stepModifiedIndex++;\r\n }\r\n else {\r\n if (original.heightInLines >= modified.heightInLines) {\r\n // modified view zone gets removed\r\n original.heightInLines -= modified.heightInLines;\r\n stepModifiedIndex++;\r\n }\r\n else {\r\n // original view zone gets removed\r\n modified.heightInLines -= original.heightInLines;\r\n stepOriginalIndex++;\r\n }\r\n }\r\n }\r\n // [EMIT] Remaining original view zones\r\n while (stepOriginalIndex < stepOriginal.length) {\r\n addAndCombineIfPossible(result.original, stepOriginal[stepOriginalIndex]);\r\n stepOriginalIndex++;\r\n }\r\n // [EMIT] Remaining modified view zones\r\n while (stepModifiedIndex < stepModified.length) {\r\n addAndCombineIfPossible(result.modified, stepModified[stepModifiedIndex]);\r\n stepModifiedIndex++;\r\n }\r\n // ---------------------------- END EMIT MINIMAL VIEW ZONES\r\n }\r\n return {\r\n original: ViewZonesComputer._ensureDomNodes(result.original),\r\n modified: ViewZonesComputer._ensureDomNodes(result.modified),\r\n };\r\n }\r\n static _ensureDomNodes(zones) {\r\n return zones.map((z) => {\r\n if (!z.domNode) {\r\n z.domNode = createFakeLinesDiv();\r\n }\r\n return z;\r\n });\r\n }\r\n}\r\nfunction createDecoration(startLineNumber, startColumn, endLineNumber, endColumn, options) {\r\n return {\r\n range: new Range(startLineNumber, startColumn, endLineNumber, endColumn),\r\n options: options\r\n };\r\n}\r\nconst DECORATIONS = {\r\n charDelete: ModelDecorationOptions.register({\r\n className: 'char-delete'\r\n }),\r\n charDeleteWholeLine: ModelDecorationOptions.register({\r\n className: 'char-delete',\r\n isWholeLine: true\r\n }),\r\n charInsert: ModelDecorationOptions.register({\r\n className: 'char-insert'\r\n }),\r\n charInsertWholeLine: ModelDecorationOptions.register({\r\n className: 'char-insert',\r\n isWholeLine: true\r\n }),\r\n lineInsert: ModelDecorationOptions.register({\r\n className: 'line-insert',\r\n marginClassName: 'line-insert',\r\n isWholeLine: true\r\n }),\r\n lineInsertWithSign: ModelDecorationOptions.register({\r\n className: 'line-insert',\r\n linesDecorationsClassName: 'insert-sign ' + ThemeIcon.asClassName(diffInsertIcon),\r\n marginClassName: 'line-insert',\r\n isWholeLine: true\r\n }),\r\n lineDelete: ModelDecorationOptions.register({\r\n className: 'line-delete',\r\n marginClassName: 'line-delete',\r\n isWholeLine: true\r\n }),\r\n lineDeleteWithSign: ModelDecorationOptions.register({\r\n className: 'line-delete',\r\n linesDecorationsClassName: 'delete-sign ' + ThemeIcon.asClassName(diffRemoveIcon),\r\n marginClassName: 'line-delete',\r\n isWholeLine: true\r\n }),\r\n lineDeleteMargin: ModelDecorationOptions.register({\r\n marginClassName: 'line-delete',\r\n })\r\n};\r\nclass DiffEditorWidgetSideBySide extends DiffEditorWidgetStyle {\r\n constructor(dataSource, enableSplitViewResizing) {\r\n super(dataSource);\r\n this._disableSash = (enableSplitViewResizing === false);\r\n this._sashRatio = null;\r\n this._sashPosition = null;\r\n this._startSashPosition = null;\r\n this._sash = this._register(new Sash(this._dataSource.getContainerDomNode(), this, { orientation: 0 /* VERTICAL */ }));\r\n if (this._disableSash) {\r\n this._sash.state = 0 /* Disabled */;\r\n }\r\n this._sash.onDidStart(() => this._onSashDragStart());\r\n this._sash.onDidChange((e) => this._onSashDrag(e));\r\n this._sash.onDidEnd(() => this._onSashDragEnd());\r\n this._sash.onDidReset(() => this._onSashReset());\r\n }\r\n setEnableSplitViewResizing(enableSplitViewResizing) {\r\n const newDisableSash = (enableSplitViewResizing === false);\r\n if (this._disableSash !== newDisableSash) {\r\n this._disableSash = newDisableSash;\r\n this._sash.state = this._disableSash ? 0 /* Disabled */ : 3 /* Enabled */;\r\n }\r\n }\r\n layout(sashRatio = this._sashRatio) {\r\n const w = this._dataSource.getWidth();\r\n const contentWidth = w - (this._dataSource.getOptions().renderOverviewRuler ? DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH : 0);\r\n let sashPosition = Math.floor((sashRatio || 0.5) * contentWidth);\r\n const midPoint = Math.floor(0.5 * contentWidth);\r\n sashPosition = this._disableSash ? midPoint : sashPosition || midPoint;\r\n if (contentWidth > DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH * 2) {\r\n if (sashPosition < DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH) {\r\n sashPosition = DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH;\r\n }\r\n if (sashPosition > contentWidth - DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH) {\r\n sashPosition = contentWidth - DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH;\r\n }\r\n }\r\n else {\r\n sashPosition = midPoint;\r\n }\r\n if (this._sashPosition !== sashPosition) {\r\n this._sashPosition = sashPosition;\r\n this._sash.layout();\r\n }\r\n return this._sashPosition;\r\n }\r\n _onSashDragStart() {\r\n this._startSashPosition = this._sashPosition;\r\n }\r\n _onSashDrag(e) {\r\n const w = this._dataSource.getWidth();\r\n const contentWidth = w - (this._dataSource.getOptions().renderOverviewRuler ? DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH : 0);\r\n const sashPosition = this.layout((this._startSashPosition + (e.currentX - e.startX)) / contentWidth);\r\n this._sashRatio = sashPosition / contentWidth;\r\n this._dataSource.relayoutEditors();\r\n }\r\n _onSashDragEnd() {\r\n this._sash.layout();\r\n }\r\n _onSashReset() {\r\n this._sashRatio = 0.5;\r\n this._dataSource.relayoutEditors();\r\n this._sash.layout();\r\n }\r\n getVerticalSashTop(sash) {\r\n return 0;\r\n }\r\n getVerticalSashLeft(sash) {\r\n return this._sashPosition;\r\n }\r\n getVerticalSashHeight(sash) {\r\n return this._dataSource.getHeight();\r\n }\r\n _getViewZones(lineChanges, originalForeignVZ, modifiedForeignVZ) {\r\n const originalEditor = this._dataSource.getOriginalEditor();\r\n const modifiedEditor = this._dataSource.getModifiedEditor();\r\n const c = new SideBySideViewZonesComputer(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor);\r\n return c.getViewZones();\r\n }\r\n _getOriginalEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators) {\r\n const originalEditor = this._dataSource.getOriginalEditor();\r\n const overviewZoneColor = String(this._removeColor);\r\n const result = {\r\n decorations: [],\r\n overviewZones: []\r\n };\r\n const originalModel = originalEditor.getModel();\r\n const originalViewModel = originalEditor._getViewModel();\r\n for (const lineChange of lineChanges) {\r\n if (isChangeOrDelete(lineChange)) {\r\n result.decorations.push({\r\n range: new Range(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */),\r\n options: (renderIndicators ? DECORATIONS.lineDeleteWithSign : DECORATIONS.lineDelete)\r\n });\r\n if (!isChangeOrInsert(lineChange) || !lineChange.charChanges) {\r\n result.decorations.push(createDecoration(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, DECORATIONS.charDeleteWholeLine));\r\n }\r\n const viewRange = getViewRange(originalModel, originalViewModel, lineChange.originalStartLineNumber, lineChange.originalEndLineNumber);\r\n result.overviewZones.push(new OverviewRulerZone(viewRange.startLineNumber, viewRange.endLineNumber, overviewZoneColor));\r\n if (lineChange.charChanges) {\r\n for (const charChange of lineChange.charChanges) {\r\n if (isChangeOrDelete(charChange)) {\r\n if (ignoreTrimWhitespace) {\r\n for (let lineNumber = charChange.originalStartLineNumber; lineNumber <= charChange.originalEndLineNumber; lineNumber++) {\r\n let startColumn;\r\n let endColumn;\r\n if (lineNumber === charChange.originalStartLineNumber) {\r\n startColumn = charChange.originalStartColumn;\r\n }\r\n else {\r\n startColumn = originalModel.getLineFirstNonWhitespaceColumn(lineNumber);\r\n }\r\n if (lineNumber === charChange.originalEndLineNumber) {\r\n endColumn = charChange.originalEndColumn;\r\n }\r\n else {\r\n endColumn = originalModel.getLineLastNonWhitespaceColumn(lineNumber);\r\n }\r\n result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charDelete));\r\n }\r\n }\r\n else {\r\n result.decorations.push(createDecoration(charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn, DECORATIONS.charDelete));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n _getModifiedEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators) {\r\n const modifiedEditor = this._dataSource.getModifiedEditor();\r\n const overviewZoneColor = String(this._insertColor);\r\n const result = {\r\n decorations: [],\r\n overviewZones: []\r\n };\r\n const modifiedModel = modifiedEditor.getModel();\r\n const modifiedViewModel = modifiedEditor._getViewModel();\r\n for (const lineChange of lineChanges) {\r\n if (isChangeOrInsert(lineChange)) {\r\n result.decorations.push({\r\n range: new Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */),\r\n options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert)\r\n });\r\n if (!isChangeOrDelete(lineChange) || !lineChange.charChanges) {\r\n result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, DECORATIONS.charInsertWholeLine));\r\n }\r\n const viewRange = getViewRange(modifiedModel, modifiedViewModel, lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber);\r\n result.overviewZones.push(new OverviewRulerZone(viewRange.startLineNumber, viewRange.endLineNumber, overviewZoneColor));\r\n if (lineChange.charChanges) {\r\n for (const charChange of lineChange.charChanges) {\r\n if (isChangeOrInsert(charChange)) {\r\n if (ignoreTrimWhitespace) {\r\n for (let lineNumber = charChange.modifiedStartLineNumber; lineNumber <= charChange.modifiedEndLineNumber; lineNumber++) {\r\n let startColumn;\r\n let endColumn;\r\n if (lineNumber === charChange.modifiedStartLineNumber) {\r\n startColumn = charChange.modifiedStartColumn;\r\n }\r\n else {\r\n startColumn = modifiedModel.getLineFirstNonWhitespaceColumn(lineNumber);\r\n }\r\n if (lineNumber === charChange.modifiedEndLineNumber) {\r\n endColumn = charChange.modifiedEndColumn;\r\n }\r\n else {\r\n endColumn = modifiedModel.getLineLastNonWhitespaceColumn(lineNumber);\r\n }\r\n result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charInsert));\r\n }\r\n }\r\n else {\r\n result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, DECORATIONS.charInsert));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n}\r\nDiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH = 100;\r\nclass SideBySideViewZonesComputer extends ViewZonesComputer {\r\n constructor(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor) {\r\n super(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor);\r\n }\r\n _createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion() {\r\n return null;\r\n }\r\n _produceOriginalFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength) {\r\n if (lineChangeModifiedLength > lineChangeOriginalLength) {\r\n return {\r\n afterLineNumber: Math.max(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber),\r\n heightInLines: (lineChangeModifiedLength - lineChangeOriginalLength),\r\n domNode: null\r\n };\r\n }\r\n return null;\r\n }\r\n _produceModifiedFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength) {\r\n if (lineChangeOriginalLength > lineChangeModifiedLength) {\r\n return {\r\n afterLineNumber: Math.max(lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber),\r\n heightInLines: (lineChangeOriginalLength - lineChangeModifiedLength),\r\n domNode: null\r\n };\r\n }\r\n return null;\r\n }\r\n}\r\nclass DiffEditorWidgetInline extends DiffEditorWidgetStyle {\r\n constructor(dataSource, enableSplitViewResizing) {\r\n super(dataSource);\r\n this._decorationsLeft = dataSource.getOriginalEditor().getLayoutInfo().decorationsLeft;\r\n this._register(dataSource.getOriginalEditor().onDidLayoutChange((layoutInfo) => {\r\n if (this._decorationsLeft !== layoutInfo.decorationsLeft) {\r\n this._decorationsLeft = layoutInfo.decorationsLeft;\r\n dataSource.relayoutEditors();\r\n }\r\n }));\r\n }\r\n setEnableSplitViewResizing(enableSplitViewResizing) {\r\n // Nothing to do..\r\n }\r\n _getViewZones(lineChanges, originalForeignVZ, modifiedForeignVZ, renderIndicators) {\r\n const originalEditor = this._dataSource.getOriginalEditor();\r\n const modifiedEditor = this._dataSource.getModifiedEditor();\r\n const computer = new InlineViewZonesComputer(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor, renderIndicators);\r\n return computer.getViewZones();\r\n }\r\n _getOriginalEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators) {\r\n const overviewZoneColor = String(this._removeColor);\r\n const result = {\r\n decorations: [],\r\n overviewZones: []\r\n };\r\n const originalEditor = this._dataSource.getOriginalEditor();\r\n const originalModel = originalEditor.getModel();\r\n const originalViewModel = originalEditor._getViewModel();\r\n for (const lineChange of lineChanges) {\r\n // Add overview zones in the overview ruler\r\n if (isChangeOrDelete(lineChange)) {\r\n result.decorations.push({\r\n range: new Range(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */),\r\n options: DECORATIONS.lineDeleteMargin\r\n });\r\n const viewRange = getViewRange(originalModel, originalViewModel, lineChange.originalStartLineNumber, lineChange.originalEndLineNumber);\r\n result.overviewZones.push(new OverviewRulerZone(viewRange.startLineNumber, viewRange.endLineNumber, overviewZoneColor));\r\n }\r\n }\r\n return result;\r\n }\r\n _getModifiedEditorDecorations(lineChanges, ignoreTrimWhitespace, renderIndicators) {\r\n const modifiedEditor = this._dataSource.getModifiedEditor();\r\n const overviewZoneColor = String(this._insertColor);\r\n const result = {\r\n decorations: [],\r\n overviewZones: []\r\n };\r\n const modifiedModel = modifiedEditor.getModel();\r\n const modifiedViewModel = modifiedEditor._getViewModel();\r\n for (const lineChange of lineChanges) {\r\n // Add decorations & overview zones\r\n if (isChangeOrInsert(lineChange)) {\r\n result.decorations.push({\r\n range: new Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */),\r\n options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert)\r\n });\r\n const viewRange = getViewRange(modifiedModel, modifiedViewModel, lineChange.modifiedStartLineNumber, lineChange.modifiedEndLineNumber);\r\n result.overviewZones.push(new OverviewRulerZone(viewRange.startLineNumber, viewRange.endLineNumber, overviewZoneColor));\r\n if (lineChange.charChanges) {\r\n for (const charChange of lineChange.charChanges) {\r\n if (isChangeOrInsert(charChange)) {\r\n if (ignoreTrimWhitespace) {\r\n for (let lineNumber = charChange.modifiedStartLineNumber; lineNumber <= charChange.modifiedEndLineNumber; lineNumber++) {\r\n let startColumn;\r\n let endColumn;\r\n if (lineNumber === charChange.modifiedStartLineNumber) {\r\n startColumn = charChange.modifiedStartColumn;\r\n }\r\n else {\r\n startColumn = modifiedModel.getLineFirstNonWhitespaceColumn(lineNumber);\r\n }\r\n if (lineNumber === charChange.modifiedEndLineNumber) {\r\n endColumn = charChange.modifiedEndColumn;\r\n }\r\n else {\r\n endColumn = modifiedModel.getLineLastNonWhitespaceColumn(lineNumber);\r\n }\r\n result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charInsert));\r\n }\r\n }\r\n else {\r\n result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, DECORATIONS.charInsert));\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, 1073741824 /* MAX_SAFE_SMALL_INTEGER */, DECORATIONS.charInsertWholeLine));\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n layout() {\r\n // An editor should not be smaller than 5px\r\n return Math.max(5, this._decorationsLeft);\r\n }\r\n}\r\nclass InlineViewZonesComputer extends ViewZonesComputer {\r\n constructor(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor, renderIndicators) {\r\n super(lineChanges, originalForeignVZ, modifiedForeignVZ, originalEditor, modifiedEditor);\r\n this._originalModel = originalEditor.getModel();\r\n this._renderIndicators = renderIndicators;\r\n this._pendingLineChange = [];\r\n this._pendingViewZones = [];\r\n this._lineBreaksComputer = this._modifiedEditor._getViewModel().createLineBreaksComputer();\r\n }\r\n getViewZones() {\r\n const result = super.getViewZones();\r\n this._finalize(result);\r\n return result;\r\n }\r\n _createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion() {\r\n const result = document.createElement('div');\r\n result.className = 'inline-added-margin-view-zone';\r\n return result;\r\n }\r\n _produceOriginalFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength) {\r\n const marginDomNode = document.createElement('div');\r\n marginDomNode.className = 'inline-added-margin-view-zone';\r\n return {\r\n afterLineNumber: Math.max(lineChange.originalStartLineNumber, lineChange.originalEndLineNumber),\r\n heightInLines: lineChangeModifiedLength,\r\n domNode: document.createElement('div'),\r\n marginDomNode: marginDomNode\r\n };\r\n }\r\n _produceModifiedFromDiff(lineChange, lineChangeOriginalLength, lineChangeModifiedLength) {\r\n const domNode = document.createElement('div');\r\n domNode.className = `view-lines line-delete ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;\r\n const marginDomNode = document.createElement('div');\r\n marginDomNode.className = 'inline-deleted-margin-view-zone';\r\n const viewZone = {\r\n shouldNotShrink: true,\r\n afterLineNumber: (lineChange.modifiedEndLineNumber === 0 ? lineChange.modifiedStartLineNumber : lineChange.modifiedStartLineNumber - 1),\r\n heightInLines: lineChangeOriginalLength,\r\n minWidthInPx: 0,\r\n domNode: domNode,\r\n marginDomNode: marginDomNode,\r\n diff: {\r\n originalStartLineNumber: lineChange.originalStartLineNumber,\r\n originalEndLineNumber: lineChange.originalEndLineNumber,\r\n modifiedStartLineNumber: lineChange.modifiedStartLineNumber,\r\n modifiedEndLineNumber: lineChange.modifiedEndLineNumber,\r\n originalModel: this._originalModel,\r\n viewLineCounts: null,\r\n }\r\n };\r\n for (let lineNumber = lineChange.originalStartLineNumber; lineNumber <= lineChange.originalEndLineNumber; lineNumber++) {\r\n this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(lineNumber), null);\r\n }\r\n this._pendingLineChange.push(lineChange);\r\n this._pendingViewZones.push(viewZone);\r\n return viewZone;\r\n }\r\n _finalize(result) {\r\n const modifiedEditorOptions = this._modifiedEditor.getOptions();\r\n const tabSize = this._modifiedEditor.getModel().getOptions().tabSize;\r\n const fontInfo = modifiedEditorOptions.get(38 /* fontInfo */);\r\n const disableMonospaceOptimizations = modifiedEditorOptions.get(26 /* disableMonospaceOptimizations */);\r\n const typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;\r\n const scrollBeyondLastColumn = modifiedEditorOptions.get(88 /* scrollBeyondLastColumn */);\r\n const mightContainNonBasicASCII = this._originalModel.mightContainNonBasicASCII();\r\n const mightContainRTL = this._originalModel.mightContainRTL();\r\n const lineHeight = modifiedEditorOptions.get(53 /* lineHeight */);\r\n const layoutInfo = modifiedEditorOptions.get(124 /* layoutInfo */);\r\n const lineDecorationsWidth = layoutInfo.decorationsWidth;\r\n const stopRenderingLineAfter = modifiedEditorOptions.get(100 /* stopRenderingLineAfter */);\r\n const renderWhitespace = modifiedEditorOptions.get(83 /* renderWhitespace */);\r\n const renderControlCharacters = modifiedEditorOptions.get(77 /* renderControlCharacters */);\r\n const fontLigatures = modifiedEditorOptions.get(39 /* fontLigatures */);\r\n const lineBreaks = this._lineBreaksComputer.finalize();\r\n let lineBreakIndex = 0;\r\n for (let i = 0; i < this._pendingLineChange.length; i++) {\r\n const lineChange = this._pendingLineChange[i];\r\n const viewZone = this._pendingViewZones[i];\r\n const domNode = viewZone.domNode;\r\n Configuration.applyFontInfoSlow(domNode, fontInfo);\r\n const marginDomNode = viewZone.marginDomNode;\r\n Configuration.applyFontInfoSlow(marginDomNode, fontInfo);\r\n const decorations = [];\r\n if (lineChange.charChanges) {\r\n for (const charChange of lineChange.charChanges) {\r\n if (isChangeOrDelete(charChange)) {\r\n decorations.push(new InlineDecoration(new Range(charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn), 'char-delete', 0 /* Regular */));\r\n }\r\n }\r\n }\r\n const hasCharChanges = (decorations.length > 0);\r\n const sb = createStringBuilder(10000);\r\n let maxCharsPerLine = 0;\r\n let renderedLineCount = 0;\r\n let viewLineCounts = null;\r\n for (let lineNumber = lineChange.originalStartLineNumber; lineNumber <= lineChange.originalEndLineNumber; lineNumber++) {\r\n const lineIndex = lineNumber - lineChange.originalStartLineNumber;\r\n const lineTokens = this._originalModel.getLineTokens(lineNumber);\r\n const lineContent = lineTokens.getLineContent();\r\n const lineBreakData = lineBreaks[lineBreakIndex++];\r\n const actualDecorations = LineDecoration.filter(decorations, lineNumber, 1, lineContent.length + 1);\r\n if (lineBreakData) {\r\n let lastBreakOffset = 0;\r\n for (const breakOffset of lineBreakData.breakOffsets) {\r\n const viewLineTokens = lineTokens.sliceAndInflate(lastBreakOffset, breakOffset, 0);\r\n const viewLineContent = lineContent.substring(lastBreakOffset, breakOffset);\r\n maxCharsPerLine = Math.max(maxCharsPerLine, this._renderOriginalLine(renderedLineCount++, viewLineContent, viewLineTokens, LineDecoration.extractWrapped(actualDecorations, lastBreakOffset, breakOffset), hasCharChanges, mightContainNonBasicASCII, mightContainRTL, fontInfo, disableMonospaceOptimizations, lineHeight, lineDecorationsWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures, tabSize, sb, marginDomNode));\r\n lastBreakOffset = breakOffset;\r\n }\r\n if (!viewLineCounts) {\r\n viewLineCounts = [];\r\n }\r\n // make sure all lines before this one have an entry in `viewLineCounts`\r\n while (viewLineCounts.length < lineIndex) {\r\n viewLineCounts[viewLineCounts.length] = 1;\r\n }\r\n viewLineCounts[lineIndex] = lineBreakData.breakOffsets.length;\r\n viewZone.heightInLines += (lineBreakData.breakOffsets.length - 1);\r\n const marginDomNode2 = document.createElement('div');\r\n marginDomNode2.className = 'line-delete';\r\n result.original.push({\r\n afterLineNumber: lineNumber,\r\n afterColumn: 0,\r\n heightInLines: lineBreakData.breakOffsets.length - 1,\r\n domNode: createFakeLinesDiv(),\r\n marginDomNode: marginDomNode2\r\n });\r\n }\r\n else {\r\n maxCharsPerLine = Math.max(maxCharsPerLine, this._renderOriginalLine(renderedLineCount++, lineContent, lineTokens, actualDecorations, hasCharChanges, mightContainNonBasicASCII, mightContainRTL, fontInfo, disableMonospaceOptimizations, lineHeight, lineDecorationsWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures, tabSize, sb, marginDomNode));\r\n }\r\n }\r\n maxCharsPerLine += scrollBeyondLastColumn;\r\n const html = sb.build();\r\n const trustedhtml = ttPolicy ? ttPolicy.createHTML(html) : html;\r\n domNode.innerHTML = trustedhtml;\r\n viewZone.minWidthInPx = (maxCharsPerLine * typicalHalfwidthCharacterWidth);\r\n if (viewLineCounts) {\r\n // make sure all lines have an entry in `viewLineCounts`\r\n const cnt = lineChange.originalEndLineNumber - lineChange.originalStartLineNumber;\r\n while (viewLineCounts.length <= cnt) {\r\n viewLineCounts[viewLineCounts.length] = 1;\r\n }\r\n }\r\n viewZone.diff.viewLineCounts = viewLineCounts;\r\n }\r\n result.original.sort((a, b) => {\r\n return a.afterLineNumber - b.afterLineNumber;\r\n });\r\n }\r\n _renderOriginalLine(renderedLineCount, lineContent, lineTokens, decorations, hasCharChanges, mightContainNonBasicASCII, mightContainRTL, fontInfo, disableMonospaceOptimizations, lineHeight, lineDecorationsWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures, tabSize, sb, marginDomNode) {\r\n sb.appendASCIIString('
    ');\r\n const isBasicASCII = ViewLineRenderingData.isBasicASCII(lineContent, mightContainNonBasicASCII);\r\n const containsRTL = ViewLineRenderingData.containsRTL(lineContent, isBasicASCII, mightContainRTL);\r\n const output = renderViewLine(new RenderLineInput((fontInfo.isMonospace && !disableMonospaceOptimizations), fontInfo.canUseHalfwidthRightwardsArrow, lineContent, false, isBasicASCII, containsRTL, 0, lineTokens, decorations, tabSize, 0, fontInfo.spaceWidth, fontInfo.middotWidth, fontInfo.wsmiddotWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures !== EditorFontLigatures.OFF, null // Send no selections, original line cannot be selected\r\n ), sb);\r\n sb.appendASCIIString('
    ');\r\n if (this._renderIndicators) {\r\n const marginElement = document.createElement('div');\r\n marginElement.className = `delete-sign ${ThemeIcon.asClassName(diffRemoveIcon)}`;\r\n marginElement.setAttribute('style', `position:absolute;top:${renderedLineCount * lineHeight}px;width:${lineDecorationsWidth}px;height:${lineHeight}px;right:0;`);\r\n marginDomNode.appendChild(marginElement);\r\n }\r\n const absoluteOffsets = output.characterMapping.getAbsoluteOffsets();\r\n return absoluteOffsets.length > 0 ? absoluteOffsets[absoluteOffsets.length - 1] : 0;\r\n }\r\n}\r\nfunction validateDiffWordWrap(value, defaultValue) {\r\n return validateStringSetOption(value, defaultValue, ['off', 'on', 'inherit']);\r\n}\r\nfunction isChangeOrInsert(lineChange) {\r\n return lineChange.modifiedEndLineNumber > 0;\r\n}\r\nfunction isChangeOrDelete(lineChange) {\r\n return lineChange.originalEndLineNumber > 0;\r\n}\r\nfunction createFakeLinesDiv() {\r\n const r = document.createElement('div');\r\n r.className = 'diagonal-fill';\r\n return r;\r\n}\r\nfunction getViewRange(model, viewModel, startLineNumber, endLineNumber) {\r\n const lineCount = model.getLineCount();\r\n startLineNumber = Math.min(lineCount, Math.max(1, startLineNumber));\r\n endLineNumber = Math.min(lineCount, Math.max(1, endLineNumber));\r\n return viewModel.coordinatesConverter.convertModelRangeToViewRange(new Range(startLineNumber, model.getLineMinColumn(startLineNumber), endLineNumber, model.getLineMaxColumn(endLineNumber)));\r\n}\r\nregisterThemingParticipant((theme, collector) => {\r\n const added = theme.getColor(diffInserted);\r\n if (added) {\r\n collector.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${added}; }`);\r\n collector.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${added}; }`);\r\n collector.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${added}; }`);\r\n }\r\n const removed = theme.getColor(diffRemoved);\r\n if (removed) {\r\n collector.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${removed}; }`);\r\n collector.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${removed}; }`);\r\n collector.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${removed}; }`);\r\n }\r\n const addedOutline = theme.getColor(diffInsertedOutline);\r\n if (addedOutline) {\r\n collector.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${addedOutline}; }`);\r\n }\r\n const removedOutline = theme.getColor(diffRemovedOutline);\r\n if (removedOutline) {\r\n collector.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${theme.type === 'hc' ? 'dashed' : 'solid'} ${removedOutline}; }`);\r\n }\r\n const shadow = theme.getColor(scrollbarShadow);\r\n if (shadow) {\r\n collector.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${shadow}; }`);\r\n }\r\n const border = theme.getColor(diffBorder);\r\n if (border) {\r\n collector.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${border}; }`);\r\n }\r\n const scrollbarSliderBackgroundColor = theme.getColor(scrollbarSliderBackground);\r\n if (scrollbarSliderBackgroundColor) {\r\n collector.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${scrollbarSliderBackgroundColor};\n\t\t\t}\n\t\t`);\r\n }\r\n const scrollbarSliderHoverBackgroundColor = theme.getColor(scrollbarSliderHoverBackground);\r\n if (scrollbarSliderHoverBackgroundColor) {\r\n collector.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${scrollbarSliderHoverBackgroundColor};\n\t\t\t}\n\t\t`);\r\n }\r\n const scrollbarSliderActiveBackgroundColor = theme.getColor(scrollbarSliderActiveBackground);\r\n if (scrollbarSliderActiveBackgroundColor) {\r\n collector.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${scrollbarSliderActiveBackgroundColor};\n\t\t\t}\n\t\t`);\r\n }\r\n const diffDiagonalFillColor = theme.getColor(diffDiagonalFill);\r\n collector.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${diffDiagonalFillColor} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${diffDiagonalFillColor} 50%, ${diffDiagonalFillColor} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`);\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nimport * as nls from '../../../nls.js';\r\nimport * as dom from '../../../base/browser/dom.js';\r\nimport { Action } from '../../../base/common/actions.js';\r\nimport { Disposable } from '../../../base/common/lifecycle.js';\r\nimport { Range } from '../../common/core/range.js';\r\nimport { Codicon } from '../../../base/common/codicons.js';\r\nexport class InlineDiffMargin extends Disposable {\r\n constructor(_viewZoneId, _marginDomNode, editor, diff, _contextMenuService, _clipboardService) {\r\n super();\r\n this._viewZoneId = _viewZoneId;\r\n this._marginDomNode = _marginDomNode;\r\n this.editor = editor;\r\n this.diff = diff;\r\n this._contextMenuService = _contextMenuService;\r\n this._clipboardService = _clipboardService;\r\n this._visibility = false;\r\n // make sure the diff margin shows above overlay.\r\n this._marginDomNode.style.zIndex = '10';\r\n this._diffActions = document.createElement('div');\r\n this._diffActions.className = Codicon.lightBulb.classNames + ' lightbulb-glyph';\r\n this._diffActions.style.position = 'absolute';\r\n const lineHeight = editor.getOption(53 /* lineHeight */);\r\n const lineFeed = editor.getModel().getEOL();\r\n this._diffActions.style.right = '0px';\r\n this._diffActions.style.visibility = 'hidden';\r\n this._diffActions.style.height = `${lineHeight}px`;\r\n this._diffActions.style.lineHeight = `${lineHeight}px`;\r\n this._marginDomNode.appendChild(this._diffActions);\r\n const actions = [];\r\n // default action\r\n actions.push(new Action('diff.clipboard.copyDeletedContent', diff.originalEndLineNumber > diff.modifiedStartLineNumber\r\n ? nls.localize('diff.clipboard.copyDeletedLinesContent.label', \"Copy deleted lines\")\r\n : nls.localize('diff.clipboard.copyDeletedLinesContent.single.label', \"Copy deleted line\"), undefined, true, () => __awaiter(this, void 0, void 0, function* () {\r\n const range = new Range(diff.originalStartLineNumber, 1, diff.originalEndLineNumber + 1, 1);\r\n const deletedText = diff.originalModel.getValueInRange(range);\r\n yield this._clipboardService.writeText(deletedText);\r\n })));\r\n let currentLineNumberOffset = 0;\r\n let copyLineAction = undefined;\r\n if (diff.originalEndLineNumber > diff.modifiedStartLineNumber) {\r\n copyLineAction = new Action('diff.clipboard.copyDeletedLineContent', nls.localize('diff.clipboard.copyDeletedLineContent.label', \"Copy deleted line ({0})\", diff.originalStartLineNumber), undefined, true, () => __awaiter(this, void 0, void 0, function* () {\r\n const lineContent = diff.originalModel.getLineContent(diff.originalStartLineNumber + currentLineNumberOffset);\r\n yield this._clipboardService.writeText(lineContent);\r\n }));\r\n actions.push(copyLineAction);\r\n }\r\n const readOnly = editor.getOption(75 /* readOnly */);\r\n if (!readOnly) {\r\n actions.push(new Action('diff.inline.revertChange', nls.localize('diff.inline.revertChange.label', \"Revert this change\"), undefined, true, () => __awaiter(this, void 0, void 0, function* () {\r\n const range = new Range(diff.originalStartLineNumber, 1, diff.originalEndLineNumber, diff.originalModel.getLineMaxColumn(diff.originalEndLineNumber));\r\n const deletedText = diff.originalModel.getValueInRange(range);\r\n if (diff.modifiedEndLineNumber === 0) {\r\n // deletion only\r\n const column = editor.getModel().getLineMaxColumn(diff.modifiedStartLineNumber);\r\n editor.executeEdits('diffEditor', [\r\n {\r\n range: new Range(diff.modifiedStartLineNumber, column, diff.modifiedStartLineNumber, column),\r\n text: lineFeed + deletedText\r\n }\r\n ]);\r\n }\r\n else {\r\n const column = editor.getModel().getLineMaxColumn(diff.modifiedEndLineNumber);\r\n editor.executeEdits('diffEditor', [\r\n {\r\n range: new Range(diff.modifiedStartLineNumber, 1, diff.modifiedEndLineNumber, column),\r\n text: deletedText\r\n }\r\n ]);\r\n }\r\n })));\r\n }\r\n const showContextMenu = (x, y) => {\r\n this._contextMenuService.showContextMenu({\r\n getAnchor: () => {\r\n return {\r\n x,\r\n y\r\n };\r\n },\r\n getActions: () => {\r\n if (copyLineAction) {\r\n copyLineAction.label = nls.localize('diff.clipboard.copyDeletedLineContent.label', \"Copy deleted line ({0})\", diff.originalStartLineNumber + currentLineNumberOffset);\r\n }\r\n return actions;\r\n },\r\n autoSelectFirstItem: true\r\n });\r\n };\r\n this._register(dom.addStandardDisposableListener(this._diffActions, 'mousedown', e => {\r\n const { top, height } = dom.getDomNodePagePosition(this._diffActions);\r\n let pad = Math.floor(lineHeight / 3);\r\n e.preventDefault();\r\n showContextMenu(e.posx, top + height + pad);\r\n }));\r\n this._register(editor.onMouseMove((e) => {\r\n if (e.target.type === 8 /* CONTENT_VIEW_ZONE */ || e.target.type === 5 /* GUTTER_VIEW_ZONE */) {\r\n const viewZoneId = e.target.detail.viewZoneId;\r\n if (viewZoneId === this._viewZoneId) {\r\n this.visibility = true;\r\n currentLineNumberOffset = this._updateLightBulbPosition(this._marginDomNode, e.event.browserEvent.y, lineHeight);\r\n }\r\n else {\r\n this.visibility = false;\r\n }\r\n }\r\n else {\r\n this.visibility = false;\r\n }\r\n }));\r\n this._register(editor.onMouseDown((e) => {\r\n if (!e.event.rightButton) {\r\n return;\r\n }\r\n if (e.target.type === 8 /* CONTENT_VIEW_ZONE */ || e.target.type === 5 /* GUTTER_VIEW_ZONE */) {\r\n const viewZoneId = e.target.detail.viewZoneId;\r\n if (viewZoneId === this._viewZoneId) {\r\n e.event.preventDefault();\r\n currentLineNumberOffset = this._updateLightBulbPosition(this._marginDomNode, e.event.browserEvent.y, lineHeight);\r\n showContextMenu(e.event.posx, e.event.posy + lineHeight);\r\n }\r\n }\r\n }));\r\n }\r\n get visibility() {\r\n return this._visibility;\r\n }\r\n set visibility(_visibility) {\r\n if (this._visibility !== _visibility) {\r\n this._visibility = _visibility;\r\n if (_visibility) {\r\n this._diffActions.style.visibility = 'visible';\r\n }\r\n else {\r\n this._diffActions.style.visibility = 'hidden';\r\n }\r\n }\r\n }\r\n _updateLightBulbPosition(marginDomNode, y, lineHeight) {\r\n const { top } = dom.getDomNodePagePosition(marginDomNode);\r\n const offset = y - top;\r\n const lineNumberOffset = Math.floor(offset / lineHeight);\r\n const newTop = lineNumberOffset * lineHeight;\r\n this._diffActions.style.top = `${newTop}px`;\r\n if (this.diff.viewLineCounts) {\r\n let acc = 0;\r\n for (let i = 0; i < this.diff.viewLineCounts.length; i++) {\r\n acc += this.diff.viewLineCounts[i];\r\n if (lineNumberOffset < acc) {\r\n return i;\r\n }\r\n }\r\n }\r\n return lineNumberOffset;\r\n }\r\n}\r\n"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 45c73b25d2bcb2ca56cf","export default class Util {\n static htmlToText(html) {\n var tmp = document.implementation.createHTMLDocument(\"New\").body;\n tmp.innerHTML = html;\n return tmp.textContent || tmp.innerText || \"\";\n }\n\n static truncateString(string, limit = 90) {\n if(string.length <= limit) {\n return string;\n } else {\n return string.substring(0, limit) + \"...\";\n }\n }\n\n static sleep(seconds) {\n return new Promise((resolve, reject) => {\n setTimeout(function () {\n resolve();\n }, seconds * 1000);\n })\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/Util.js","import EditorKitInternal from \"./lib/EditorKitInternal\";\nimport EditorKitDelegate from \"./EditorKitDelegate\"\n\nclass EditorKit {\n\n /*\n @param EditorKitDelegate `delegate`: The instance responsible for handling editor-specific events\n @param string `mode`: one of 'plaintext', 'html', 'markdown'\n @param bool `supportsFilesafe`\n @param int `coallesedSavingDelay`:\n For ComponentManager saving, what the debouncer ms delay should be set to.\n Defaults to 250ms.\n */\n constructor({delegate, mode = 'plaintext', supportsFilesafe = false, coallesedSavingDelay = 250}) {\n this.delegate = delegate;\n this.mode = mode;\n this.supportsFilesafe = supportsFilesafe;\n this.coallesedSavingDelay = coallesedSavingDelay;\n\n this.internal = new EditorKitInternal({delegate, mode, supportsFilesafe, coallesedSavingDelay});\n }\n\n /*\n Public\n */\n\n async getFilesafe() {\n return this.internal.getFilesafe();\n }\n\n /*\n Called by consumer when the editor has a change/input event\n */\n onEditorValueChanged(text) {\n this.internal.onEditorValueChanged(text);\n }\n\n /*\n Called by consumer when the editor has a keyup event\n */\n onEditorKeyUp({key, isSpace, isEnter}) {\n this.internal.onEditorKeyUp({key, isSpace, isEnter});\n }\n\n /*\n Called by consumer when user pastes into editor\n */\n onEditorPaste() {\n this.internal.onEditorPaste();\n }\n\n /*\n Whether or not filesafe is configured with integrations and keys, and can handle file uploads.\n If not, user should open files modal and configure FileSafe.\n */\n canUploadFiles() {\n return this.internal.canUploadFiles();\n }\n\n /*\n Returns a file descriptor if successful.\n */\n async uploadJSFileObject(file) {\n return this.internal.uploadJSFileObject(file);\n }\n}\n\nexport {EditorKit, EditorKitDelegate}\n\n\n\n// WEBPACK FOOTER //\n// ./src/EditorKit.js","import ComponentManager from 'sn-components-api';\n\nimport Util from \"./Util.js\"\nimport FileLoader from \"./FileLoader.js\"\nimport TextExpander from \"./TextExpander.js\"\nimport FilesafeHtml from \"./FilesafeHtml.js\"\n\nexport default class EditorKit {\n\n constructor({delegate, mode, supportsFilesafe, coallesedSavingDelay = 250}) {\n this.delegate = delegate;\n this.mode = mode;\n this.supportsFilesafe = supportsFilesafe;\n this.coallesedSavingDelay = coallesedSavingDelay;\n\n /*\n When we upload a file, we want to associate it with the current note.\n The best way to ensure that files are in sync with the filesafe client is to wait\n until the componentMananger has received the file descriptor item back from SN.\n So, upon being notified that files have changed, we'll sift through this array\n and associate any pending files.\n */\n this.fileIdsPendingAssociation = [];\n\n this.connectToBridge();\n\n // Conditionally import filesafe-js. This way, consumers using editor-kit\n // who don't want FileSafe support don't have to import a large module.\n // Consumers who do want FileSafe support must include filesafe-js in their own package.json\n // Note that filesafe-js is set as an \"external\" in webpack.config, so it is not included in the EditorKit bundle\n if(supportsFilesafe) {\n this.filesafeImportPromise = this.importFilesafe();\n }\n }\n\n async importFilesafe() {\n return import(\"filesafe-js\").then((result) => {\n this.FilesafeClass = result.default;\n this.configureFilesafe();\n return this.filesafe;\n });\n }\n\n async getFilesafe() {\n if(!this.filesafe || this.filesafeImportPromise) {\n if(this.filesafeImportPromise) {\n return this.filesafeImportPromise;\n }\n } else {\n return this.importFilesafe();\n }\n }\n\n configureFilesafe() {\n this.filesafe = new this.FilesafeClass({componentManager: this.componentManager});\n\n this.filesafe.addDataChangeObserver(() => {\n // Reload UI by querying Filesafe for changes\n let allFileDescriptors = this.filesafe.getAllFileDescriptors();\n\n if(this.note && this.fileIdsPendingAssociation.length > 0) {\n let hasMatch = false;\n for(let uuid of this.fileIdsPendingAssociation.slice()) {\n let descriptor = allFileDescriptors.find((candidate) => candidate.uuid == uuid);\n if(!descriptor) {\n continue;\n }\n\n hasMatch = true;\n this.fileIdsPendingAssociation.splice(this.fileIdsPendingAssociation.indexOf(uuid), 1);\n\n let syntax = FilesafeHtml.insertionSyntaxForFileDescriptor(descriptor);\n this.delegate.insertRawText(syntax);\n }\n\n if(hasMatch) {\n this.textExpander.searchPatterns()\n }\n }\n\n if(allFileDescriptors.length > 0) {\n this.fileLoader.loadFilesafeElements();\n }\n });\n\n this.filesafe.addNewFileDescriptorHandler((fileDescriptor) => {\n // Called when a new file is uploaded. We'll wait until the bridge acknowledges\n // receipt of this item, and then it will be added to the editor.\n this.fileIdsPendingAssociation.push(fileDescriptor.uuid);\n })\n\n this.fileLoader = new FileLoader({\n filesafe: this.filesafe,\n getElementsBySelector: this.delegate.getElementsBySelector,\n insertElement: this.delegate.insertElement,\n preprocessElement: this.delegate.preprocessElement\n });\n\n this.textExpander = new TextExpander({\n afterExpand: () => {\n this.fileLoader.loadFilesafeElements();\n },\n getCurrentLineText: this.delegate.getCurrentLineText,\n getPreviousLineText: this.delegate.getPreviousLineText,\n replaceText: this.delegate.replaceText,\n patterns: [{\n regex: FilesafeHtml.FilesafeSyntaxPattern,\n callback: (matchedText) => {\n return FilesafeHtml.expandedFilesafeSyntax(matchedText);\n }\n }]\n });\n }\n\n connectToBridge() {\n this.componentManager = new ComponentManager(null, () => {\n // On ready and permissions authorization\n document.documentElement.classList.add(this.componentManager.platform);\n });\n\n // The editor does some debouncing for us, so we'll lower the default debounce value from 250 to 150\n this.componentManager.coallesedSavingDelay = this.coallesedSavingDelay;\n\n this.componentManager.streamContextItem((note) => {\n // Todo: if note has changed, release previous temp object urls\n let isNewNoteLoad = true;\n if(this.note && this.note.uuid == note.uuid) {\n isNewNoteLoad = false;\n }\n\n if(this.supportsFilesafe) {\n let itemClass = this.FilesafeClass.getSFItemClass();\n this.note = new itemClass(note);\n\n this.filesafe.setCurrentNote(this.note);\n } else {\n this.note = note;\n }\n\n // Only update UI on non-metadata updates.\n if(note.isMetadataUpdate) { return; }\n\n let text = note.content.text;\n\n // If we're an html editor, and we're dealing with a new note\n // check to see if it's in html format.\n // If it's not, we don't want to convert it to HTML until the user makes an explicit change\n // So we'll ignore the next change event in this case\n if(this.mode == \"html\" && isNewNoteLoad) {\n let isHtml = /<[a-z][\\s\\S]*>/i.test(text);\n if(!isHtml) {\n this.ignoreNextTextChange = true;\n }\n }\n\n // Set before expanding. We want this value to always be the collapsed value\n this.previousText = text;\n\n if(this.supportsFilesafe) {\n // We want to expand any filesafe syntax in the text, but only after the text has been inserted. (Will be checked on editor change callback)\n this.needsFilesafeElementLoad = true;\n\n text = FilesafeHtml.expandedFilesafeSyntax(text);\n }\n\n this.delegate.setEditorRawText(text);\n\n if(isNewNoteLoad) {\n this.delegate.clearUndoHistory();\n }\n });\n }\n\n onEditorKeyUp({key, isSpace, isEnter}) {\n this.textExpander.onKeyUp({key, isSpace, isEnter});\n }\n\n onEditorPaste() {\n this.textExpander.onKeyUp({isPaste: true});\n }\n\n onEditorValueChanged(text) {\n if(this.needsFilesafeElementLoad) {\n this.needsFilesafeElementLoad = false;\n this.fileLoader.loadFilesafeElements();\n }\n\n if(this.ignoreNextTextChange) {\n this.ignoreNextTextChange = false;\n return;\n }\n\n if(this.supportsFilesafe) {\n text = FilesafeHtml.collapseFilesafeSyntax(text);\n\n // Change events may be triggered several times when expanding filesafe syntax.\n // Ultimately, while the visual layer is changing a lot, the underlying text layer,\n // after being collapsed, will not change. So we'll compare the previous html to new collapsed html before continuing\n let sameText = this.previousText == text;\n if(sameText) {\n return;\n }\n }\n\n this.previousText = text;\n\n let note = this.note;\n if(note) {\n this.componentManager.saveItemWithPresave(note, () => {\n note.content.text = text;\n if(this.delegate.generateCustomPreview) {\n let result = this.delegate.generateCustomPreview(text);\n if(result.html) {\n note.content.preview_html = result.html;\n }\n if(result.plain) {\n note.content.preview_plain = result.plain;\n }\n }\n else {\n if(this.mode == 'html') {\n let preview = FilesafeHtml.removeFilesafeSyntaxFromHtml(text);\n preview = Util.truncateString(Util.htmlToText(preview));\n // If the preview has no length due to either being an empty note, or having just 1 FileSafe file\n // that is stripped above, then we don't want to set to empty string, otherwise SN app will default to content\n // for preview. We'll set a whitespace preview instead so SN doesn't go based on innate content.\n note.content.preview_plain = preview.length > 0 ? preview : \" \";\n } else {\n note.content.preview_plain = text;\n }\n // We're only using plain in this block.\n note.content.preview_html = null;\n }\n });\n }\n }\n\n canUploadFiles() {\n let credentials = this.filesafe.getAllCredentials();\n let integrations = this.filesafe.getAllIntegrations();\n return credentials.length > 0 && integrations.length > 0;\n }\n\n async uploadJSFileObject(file) {\n let status = this.fileLoader.insertStatusAtCursor(\"Processing file...\");\n return this.filesafe.encryptAndUploadJavaScriptFileObject(file).then((descriptor) => {\n this.fileLoader.removeCursorStatus(status);\n })\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/EditorKitInternal.js","class ComponentManager {\n\n constructor(permissions, onReady) {\n this.sentMessages = [];\n this.messageQueue = [];\n this.loggingEnabled = false;\n this.acceptsThemes = true;\n this.activeThemes = [];\n\n this.initialPermissions = permissions;\n this.onReadyCallback = onReady;\n\n this.coallesedSaving = true;\n this.coallesedSavingDelay = 250;\n\n this.registerMessageHandler();\n }\n\n registerMessageHandler() {\n let messageHandler = (event) => {\n if (this.loggingEnabled) { console.log(\"Components API Message received:\", event.data)}\n\n // The first message will be the most reliable one, so we won't change it after any subsequent events,\n // in case you receive an event from another window.\n if(!this.origin) {\n this.origin = event.origin;\n }\n\n // Mobile environment sends data as JSON string\n let data = event.data;\n let parsedData = typeof data === \"string\" ? JSON.parse(data) : data;\n this.handleMessage(parsedData);\n }\n\n /*\n Mobile (React Native) uses `document`, web/desktop uses `window`.addEventListener\n for postMessage API to work properly.\n\n Update May 2019:\n As part of transitioning React Native webview into the community package,\n we'll now only need to use window.addEventListener.\n\n However, we want to maintain backward compatibility for Mobile < v3.0.5, so we'll keep document.addEventListener\n\n Also, even with the new version of react-native-webview, Android may still require document.addEventListener (while iOS still only requires window.addEventListener)\n https://github.com/react-native-community/react-native-webview/issues/323#issuecomment-467767933\n */\n\n document.addEventListener(\"message\", function (event) {\n messageHandler(event);\n }, false);\n\n window.addEventListener(\"message\", function (event) {\n messageHandler(event);\n }, false);\n }\n\n handleMessage(payload) {\n if(payload.action === \"component-registered\") {\n this.sessionKey = payload.sessionKey;\n this.componentData = payload.componentData;\n\n this.onReady(payload.data);\n\n if(this.loggingEnabled) {\n console.log(\"Component successfully registered with payload:\", payload);\n }\n\n } else if(payload.action === \"themes\") {\n if(this.acceptsThemes) {\n this.activateThemes(payload.data.themes);\n }\n }\n\n else if(payload.original) {\n // get callback from queue\n var originalMessage = this.sentMessages.filter(function(message){\n return message.messageId === payload.original.messageId;\n })[0];\n\n if(!originalMessage) {\n // Connection must have been reset. Alert the user.\n alert(\"This extension is attempting to communicate with Standard Notes, but an error is preventing it from doing so. Please restart this extension and try again.\")\n }\n\n if(originalMessage.callback) {\n originalMessage.callback(payload.data);\n }\n }\n }\n\n onReady(data) {\n this.environment = data.environment;\n this.platform = data.platform;\n this.uuid = data.uuid;\n this.isMobile = this.environment == \"mobile\";\n\n if(this.initialPermissions && this.initialPermissions.length > 0) {\n this.requestPermissions(this.initialPermissions);\n }\n\n for(var message of this.messageQueue) {\n this.postMessage(message.action, message.data, message.callback);\n }\n\n this.messageQueue = [];\n\n if(this.loggingEnabled) { console.log(\"onReadyData\", data); }\n\n this.activateThemes(data.activeThemeUrls || []);\n\n if(this.onReadyCallback) {\n this.onReadyCallback();\n }\n }\n\n getSelfComponentUUID() {\n return this.uuid;\n }\n\n isRunningInDesktopApplication() {\n return this.environment === \"desktop\";\n }\n\n setComponentDataValueForKey(key, value) {\n this.componentData[key] = value;\n this.postMessage(\"set-component-data\", {componentData: this.componentData}, function(data){});\n }\n\n clearComponentData() {\n this.componentData = {};\n this.postMessage(\"set-component-data\", {componentData: this.componentData}, function(data){});\n }\n\n componentDataValueForKey(key) {\n return this.componentData[key];\n }\n\n postMessage(action, data, callback) {\n if(!this.sessionKey) {\n this.messageQueue.push({\n action: action,\n data: data,\n callback: callback\n });\n return;\n }\n\n var message = {\n action: action,\n data: data,\n messageId: this.generateUUID(),\n sessionKey: this.sessionKey,\n api: \"component\"\n }\n\n var sentMessage = JSON.parse(JSON.stringify(message));\n sentMessage.callback = callback;\n this.sentMessages.push(sentMessage);\n\n // Mobile (React Native) requires a string for the postMessage API.\n if(this.isMobile) {\n message = JSON.stringify(message);\n }\n\n if(this.loggingEnabled) {\n console.log(\"Posting message:\", message);\n }\n\n window.parent.postMessage(message, this.origin);\n }\n\n setSize(type, width, height) {\n this.postMessage(\"set-size\", {type: type, width: width, height: height}, function(data){\n\n })\n }\n\n requestPermissions(permissions, callback) {\n this.postMessage(\"request-permissions\", {permissions: permissions}, function(data){\n callback && callback();\n }.bind(this));\n }\n\n streamItems(contentTypes, callback) {\n if(!Array.isArray(contentTypes)) {\n contentTypes = [contentTypes];\n }\n this.postMessage(\"stream-items\", {content_types: contentTypes}, function(data){\n callback(data.items);\n }.bind(this));\n }\n\n streamContextItem(callback) {\n this.postMessage(\"stream-context-item\", null, (data) => {\n let item = data.item;\n /*\n If this is a new context item than the context item the component was currently entertaining,\n we want to immediately commit any pending saves, because if you send the new context item to the\n component before it has commited its presave, it will end up first replacing the UI with new context item,\n and when the debouncer executes to read the component UI, it will be reading the new UI for the previous item.\n */\n let isNewItem = !this.lastStreamedItem || this.lastStreamedItem.uuid !== item.uuid;\n if(isNewItem && this.pendingSaveTimeout) {\n clearTimeout(this.pendingSaveTimeout);\n this._performSavingOfItems(this.pendingSaveParams);\n this.pendingSaveTimeout = null;\n this.pendingSaveParams = null;\n }\n this.lastStreamedItem = item;\n callback(this.lastStreamedItem);\n });\n }\n\n selectItem(item) {\n this.postMessage(\"select-item\", {item: this.jsonObjectForItem(item)});\n }\n\n createItem(item, callback) {\n this.postMessage(\"create-item\", {item: this.jsonObjectForItem(item)}, function(data){\n var item = data.item;\n\n // A previous version of the SN app had an issue where the item in the reply to create-item\n // would be nested inside \"items\" and not \"item\". So handle both cases here.\n if(!item && data.items && data.items.length > 0) {\n item = data.items[0];\n }\n\n this.associateItem(item);\n callback && callback(item);\n }.bind(this));\n }\n\n createItems(items, callback) {\n let mapped = items.map((item) => {return this.jsonObjectForItem(item)});\n this.postMessage(\"create-items\", {items: mapped}, function(data){\n callback && callback(data.items);\n }.bind(this));\n }\n\n associateItem(item) {\n this.postMessage(\"associate-item\", {item: this.jsonObjectForItem(item)});\n }\n\n deassociateItem(item) {\n this.postMessage(\"deassociate-item\", {item: this.jsonObjectForItem(item)});\n }\n\n clearSelection() {\n this.postMessage(\"clear-selection\", {content_type: \"Tag\"});\n }\n\n deleteItem(item, callback) {\n this.deleteItems([item], callback);\n }\n\n deleteItems(items, callback) {\n var params = {\n items: items.map(function(item){\n return this.jsonObjectForItem(item);\n }.bind(this))\n };\n\n this.postMessage(\"delete-items\", params, (data) => {\n callback && callback(data);\n });\n }\n\n sendCustomEvent(action, data, callback) {\n this.postMessage(action, data, function(data){\n callback && callback(data);\n }.bind(this));\n }\n\n saveItem(item, callback, skipDebouncer = false) {\n this.saveItems([item], callback, skipDebouncer);\n }\n\n /* Presave allows clients to perform any actions last second before the save actually occurs (like setting previews).\n Saves debounce by default, so if a client needs to compute a property on an item before saving, it's best to\n hook into the debounce cycle so that clients don't have to implement their own debouncing.\n */\n\n saveItemWithPresave(item, presave, callback) {\n this.saveItemsWithPresave([item], presave, callback);\n }\n\n saveItemsWithPresave(items, presave, callback) {\n this.saveItems(items, callback, false, presave);\n }\n\n _performSavingOfItems({items, presave, callback}) {\n // presave block allows client to gain the benefit of performing something in the debounce cycle.\n presave && presave();\n\n let mappedItems = [];\n for(let item of items) {\n mappedItems.push(this.jsonObjectForItem(item));\n }\n\n this.postMessage(\"save-items\", {items: mappedItems}, (data) => {\n callback && callback();\n });\n }\n\n /*\n skipDebouncer allows saves to go through right away rather than waiting for timeout.\n This should be used when saving items via other means besides keystrokes.\n */\n saveItems(items, callback, skipDebouncer = false, presave) {\n\n // We need to make sure that when we clear a pending save timeout,\n // we carry over those pending items into the new save.\n if(!this.pendingSaveItems) { this.pendingSaveItems = [];}\n\n if(this.coallesedSaving == true && !skipDebouncer) {\n if(this.pendingSaveTimeout) {\n clearTimeout(this.pendingSaveTimeout);\n }\n\n let incomingIds = items.map((item) => item.uuid);\n\n // Replace any existing save items with incoming values\n // Only keep items here who are not in incomingIds\n let preexistingItems = this.pendingSaveItems.filter((item) => {\n return !incomingIds.includes(item.uuid);\n })\n\n // Add new items, now that we've made sure it's cleared of incoming items.\n this.pendingSaveItems = preexistingItems.concat(items);\n\n // We'll potentially need to commit early if stream-context-item message comes in\n this.pendingSaveParams = {\n items: this.pendingSaveItems,\n presave: presave,\n callback: callback\n }\n\n this.pendingSaveTimeout = setTimeout(() => {\n this._performSavingOfItems(this.pendingSaveParams);\n this.pendingSaveItems = [];\n this.pendingSaveTimeout = null;\n this.pendingSaveParams = null;\n }, this.coallesedSavingDelay);\n } else {\n this._performSavingOfItems({items, presave, callback});\n }\n }\n\n jsonObjectForItem(item) {\n var copy = Object.assign({}, item);\n copy.children = null;\n copy.parent = null;\n return copy;\n }\n\n getItemAppDataValue(item, key) {\n let AppDomain = \"org.standardnotes.sn\";\n var data = item.content.appData && item.content.appData[AppDomain];\n if(data) {\n return data[key];\n } else {\n return null;\n }\n }\n\n /* Themes */\n\n activateThemes(incomingUrls) {\n if(this.loggingEnabled) { console.log(\"Incoming themes\", incomingUrls); }\n if(this.activeThemes.sort().toString() == incomingUrls.sort().toString()) {\n // incoming are same as active, do nothing\n return;\n }\n\n let themesToActivate = incomingUrls || [];\n let themesToDeactivate = [];\n\n for(var activeUrl of this.activeThemes) {\n if(!incomingUrls.includes(activeUrl)) {\n // active not present in incoming, deactivate it\n themesToDeactivate.push(activeUrl);\n } else {\n // already present in active themes, remove it from themesToActivate\n themesToActivate = themesToActivate.filter((candidate) => {\n return candidate != activeUrl;\n })\n }\n }\n\n if(this.loggingEnabled) {\n console.log(\"Deactivating themes:\", themesToDeactivate);\n console.log(\"Activating themes:\", themesToActivate);\n }\n\n for(var theme of themesToDeactivate) {\n this.deactivateTheme(theme);\n }\n\n this.activeThemes = incomingUrls;\n\n for(var url of themesToActivate) {\n if(!url) {\n continue;\n }\n\n var link = document.createElement(\"link\");\n link.id = btoa(url);\n link.href = url;\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.media = \"screen,print\";\n link.className = \"custom-theme\";\n document.getElementsByTagName(\"head\")[0].appendChild(link);\n }\n }\n\n themeElementForUrl(url) {\n var elements = Array.from(document.getElementsByClassName(\"custom-theme\")).slice();\n return elements.find((element) => {\n // We used to search here by `href`, but on desktop, with local file:// urls, that didn't work for some reason.\n return element.id == btoa(url);\n })\n }\n\n deactivateTheme(url) {\n let element = this.themeElementForUrl(url);\n if(element) {\n element.disabled = true;\n element.parentNode.removeChild(element);\n }\n }\n\n /* Theme caching is currently disabled. Might be enabled in the future if neccessary. */\n /*\n activateCachedThemes() {\n let themes = this.getCachedThemeUrls();\n let writeToCache = false;\n if(this.loggingEnabled) { console.log(\"Activating cached themes\", themes); }\n this.activateThemes(themes, writeToCache);\n }\n\n cacheThemeUrls(urls) {\n if(this.loggingEnabled) { console.log(\"Caching theme urls\", urls); }\n localStorage.setItem(\"cachedThemeUrls\", JSON.stringify(urls));\n }\n\n decacheThemeUrls() {\n localStorage.removeItem(\"cachedThemeUrls\");\n }\n\n getCachedThemeUrls() {\n let urls = localStorage.getItem(\"cachedThemeUrls\");\n if(urls) {\n return JSON.parse(urls);\n } else {\n return [];\n }\n }\n */\n\n\n /* Utilities */\n\n\n generateUUID() {\n var crypto = window.crypto || window.msCrypto;\n if(crypto) {\n var buf = new Uint32Array(4);\n crypto.getRandomValues(buf);\n var idx = -1;\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n idx++;\n var r = (buf[idx>>3] >> ((idx%8)*4))&15;\n var v = c == 'x' ? r : (r&0x3|0x8);\n return v.toString(16);\n });\n } else {\n var d = new Date().getTime();\n if(window.performance && typeof window.performance.now === \"function\"){\n d += performance.now(); //use high-precision timer if available\n }\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random()*16)%16 | 0;\n d = Math.floor(d/16);\n return (c=='x' ? r : (r&0x3|0x8)).toString(16);\n });\n return uuid;\n }\n }\n}\n\n\nif(typeof module != \"undefined\" && typeof module.exports != \"undefined\") {\n module.exports = ComponentManager;\n}\n\nif(window) {\n window.ComponentManager = ComponentManager;\n}\n\n\n\n// WEBPACK FOOTER //\n// ../src/componentManager.js","import Util from \"./Util.js\";\n\nexport default class FileLoader {\n\n constructor({filesafe, getElementsBySelector, preprocessElement, insertElement}) {\n this.filesafe = filesafe;\n this.getElementsBySelector = getElementsBySelector;\n this.insertElement = insertElement;\n this.preprocessElement = preprocessElement;\n\n // When a file is decrypted and loaded into a temp url, we'll place the temp url in here so that subsequent decrypt attempts\n // dont require further work. Mapped values are of form {url, fileType, fsname}\n this.uuidToFileTempUrlAndTypeMapping = {};\n\n // uuids of files currently loading, so that we don't start a new load for currently loading file\n this.currentlyLoadingIds = [];\n\n // uuid to current status element mapping\n this.statusElementMapping = {};\n\n this.fileTypeToElementType = {\n \"image/png\": \"img\",\n \"image/jpg\": \"img\",\n \"image/jpeg\": \"img\",\n \"image/gif\": \"img\",\n \"image/tiff\": \"img\",\n \"image/bmp\": \"img\",\n \"video/mp4\": \"video\",\n \"audio/mpeg\": \"audio\",\n \"audio/mp3\": \"audio\"\n }\n }\n\n fileTypeForElementType(type) {\n return this.fileTypeToElementType[type.toLowerCase()];\n }\n\n /*\n Scans the document for elements . If found, begins loading file.\n */\n loadFilesafeElements() {\n let elements = this.getElementsBySelector(\"*[fsplaceholder]\");\n for(let element of elements) {\n this.loadFilesafeElement(element);\n }\n }\n\n /*\n @param fsSyntax\n The FileSafe syntax string. i.e [FileSafe:uuid-123:name]\n */\n\n async loadFilesafeElement(fsElement) {\n let fsid = fsElement.getAttribute(\"fsid\");\n let fsname = fsElement.getAttribute(\"fsname\");\n let fileNameDisplay = (!fsname || fsname == 'undefined') ? 'file' : fsname;\n\n let existingMapping = this.uuidToFileTempUrlAndTypeMapping[fsid];\n if(existingMapping) {\n this.insertMediaElement({url: existingMapping.url, fsid,\n fileType: existingMapping.fileType, fsname: existingMapping.fsname, fsElement});\n return;\n }\n\n if(this.currentlyLoadingIds.includes(fsid)) {\n return;\n }\n\n let descriptor = this.filesafe.findFileDescriptor(fsid);\n if(!descriptor) {\n this.setStatus(`Unable to find ${fileNameDisplay} ${fsid}.`, fsElement, fsid, fsname, true);\n return {success: false};\n }\n\n let selectorSyntax = `[fsid=\"${descriptor.uuid}\"][fscollapsable]`;\n var existingElements = document.querySelectorAll(`img${selectorSyntax}, figure${selectorSyntax}, video${selectorSyntax}, audio${selectorSyntax}`);\n if(existingElements.length > 0) {\n return {success: false};\n }\n\n const cleanup = () => {\n this.currentlyLoadingIds.splice(this.currentlyLoadingIds.indexOf(fsid), 1);\n }\n\n this.currentlyLoadingIds.push(fsid);\n\n this.setStatus(`Downloading ${fileNameDisplay}...`, fsElement, fsid, fsname);\n await Util.sleep(0.05); // Allow UI to update before beginning download\n let fileItem = await this.filesafe.downloadFileFromDescriptor(descriptor).catch((downloadError) => {\n this.setStatus(`Unable to download ${fileNameDisplay} ${fsid}.`, fsElement, fsid, fsname);\n return;\n })\n\n if(!fileItem) {\n return;\n }\n\n this.setStatus(`Decrypting ${fileNameDisplay}...`, fsElement, fsid, fsname);\n await Util.sleep(0.05); // Allow UI to update before beginning decryption\n let data = await this.filesafe.decryptFile({fileDescriptor: descriptor, fileItem: fileItem}).catch((decryptError) => {\n this.setStatus(`Unable to decrypt ${fileNameDisplay} ${fsid}.`, fsElement, fsid, fsname);\n return;\n });\n\n if(!data) {\n return;\n }\n\n // Remove loading text\n this.setStatus(null, fsElement, fsid);\n await Util.sleep(0.05); // Allow UI to update before adding image\n\n // Generate temporary url, must be released later\n let fileType = descriptor.content.fileType;\n let tempUrl = this.filesafe.createTemporaryFileUrl({base64Data: data.decryptedData, dataType: fileType});\n\n this.insertMediaElement({url: tempUrl, fsid, fileType, fsname, fsElement});\n\n cleanup();\n\n this.uuidToFileTempUrlAndTypeMapping[fsid] = {url: tempUrl, fileType, fsname: fsname};\n\n return {success: true};\n }\n\n insertMediaElement({url, fsid, fsname, fileType, fsElement}) {\n let elementType = this.fileTypeForElementType(fileType);\n\n let mediaElement;\n if(elementType == \"img\") {\n mediaElement = this.createImageElement({url, fsid, fsname, fsElement});\n } else if(elementType == \"video\") {\n mediaElement = this.createVideoElement({url, fsid, fileType, fsname, fsElement});\n } else if(elementType == \"audio\") {\n mediaElement = this.createAudioElement({url, fsid, fsname});\n } else {\n mediaElement = this.createDownloadElement({url, fsid, fileType, fsname, fsElement});\n }\n\n this.insertElementNearElement(mediaElement, fsElement);\n\n // Remove fsElement now that image is loaded\n fsElement.remove();\n\n return true;\n }\n\n wrapElementInTag({element, tagName, fsid, fsname}) {\n let tag = document.createElement(tagName);\n tag.setAttribute('fsid', fsid);\n tag.setAttribute('fsname', fsname);\n tag.setAttribute('fscollapsable', true);\n tag.setAttribute('contenteditable', true);\n tag.append(element);\n return tag;\n }\n\n basicwrapElementInTag(element, tagName) {\n let tag = document.createElement(tagName);\n tag.append(element);\n return tag;\n }\n\n createImageElement({url, fsid, fsname, fsElement}) {\n let image = document.createElement(\"img\");\n image.setAttribute('src', url);\n image.setAttribute('srcset', `${url} 2x`);\n\n image.setAttribute('fsid', fsid);\n image.setAttribute('fsname', fsname);\n image.setAttribute('fscollapsable', true);\n\n if(fsElement.getAttribute(\"width\")) {\n image.setAttribute(\"width\", fsElement.getAttribute(\"width\"));\n image.setAttribute(\"height\", fsElement.getAttribute(\"height\"));\n }\n\n return image;\n }\n\n createVideoElement({url, fsid, fileType, fsname, fsElement}) {\n let video = document.createElement(\"video\");\n video.setAttribute('controls', true);\n video.setAttribute('fsid', fsid);\n video.setAttribute('fsname', fsname);\n video.setAttribute('fscollapsable', true);\n\n if(fsElement.getAttribute(\"width\")) {\n video.setAttribute(\"width\", fsElement.getAttribute(\"width\"));\n video.setAttribute(\"height\", fsElement.getAttribute(\"height\"));\n }\n\n let source = document.createElement(\"source\");\n source.setAttribute('src', url);\n source.setAttribute('type', fileType);\n\n video.append(source);\n\n // Redactor will automatically insert a video element in a p tag,\n // so we'll do it ourselves so that we can control its attributes.\n return this.wrapElementInTag({element: video, tagName: \"p\", fsid, fsname});\n }\n\n createDownloadElement({url, fsid, fileType, fsname, fsElement}) {\n let a = document.createElement(\"a\");\n a.setAttribute('fsid', fsid);\n a.setAttribute('fsname', fsname);\n a.setAttribute('ghost', 'true');\n a.setAttribute('fscollapsable', true);\n a.setAttribute('href', url);\n a.textContent = `${fsname}`;\n return a;\n }\n\n createAudioElement({url, fsid, fsname}) {\n let audio = document.createElement(\"audio\");\n audio.setAttribute('src', url);\n audio.setAttribute('controls', true);\n audio.setAttribute('fsid', fsid);\n audio.setAttribute('fsname', fsname);\n audio.setAttribute('fscollapsable', true);\n\n return this.wrapElementInTag({element: audio, tagName: \"p\", fsid, fsname});\n }\n\n setStatus(status, fsElement, fsid, fsname, removable) {\n if(fsid) {\n let existingStatusElement = this.statusElementMapping[fsid];\n if(existingStatusElement) {\n existingStatusElement.remove();\n delete this.statusElementMapping[fsid];\n }\n }\n\n if(status) {\n let element = document.createElement('label');\n element.setAttribute('id', fsid);\n element.setAttribute('ghost', 'true');\n element.setAttribute('contenteditable', false);\n element.style.fontWeight = \"bold\";\n element.textContent = status;\n if(removable) {\n element.style.userSelect = \"all\";\n }\n\n element = this.insertElementNearElement(element, fsElement);\n\n if(fsid) {\n this.statusElementMapping[fsid] = element;\n }\n return element;\n }\n }\n\n insertStatusAtCursor(status) {\n let identifier = Math.random().toString(36).substring(7);\n this.setStatus(status, null, identifier);\n return identifier;\n }\n\n removeCursorStatus(identifier) {\n // We want to search for the element based on identifier, because the actual element\n // inserted may have been done so as raw HTML, and not via an element pointer\n let elements = this.getElementsBySelector(`#${identifier}`);\n if(elements.length > 0) {\n elements[0].remove();\n }\n }\n\n insertElementNearElement(domNodeToInsert, inVicinityOfElement) {\n let processedElement = this.preprocessElement(domNodeToInsert);\n\n let insertionType = \"child\";\n //
    tags cannot be nested inside p tags.\n if(processedElement.tagName.toLowerCase() == \"figure\") {\n // If we have a p ancestor, we need to get out.\n let pAncestor = inVicinityOfElement.closest(\"p\");\n if(pAncestor) {\n // p tags cannot be nested in other p tags, so if we found one, we know its parent isn't and doesn't belong to a ptag.\n // add the new right after pAncestor\n inVicinityOfElement = pAncestor;\n insertionType = \"afterend\";\n }\n }\n\n this.insertElement(processedElement, inVicinityOfElement, insertionType);\n return processedElement;\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/FileLoader.js","export default class TextExpander {\n\n constructor({patterns, afterExpand, beforeExpand, getCurrentLineText, getPreviousLineText, replaceText}) {\n this.patterns = patterns;\n this.afterExpand = afterExpand;\n this.beforeExpand = beforeExpand;\n this.getCurrentLineText = getCurrentLineText;\n this.getPreviousLineText = getPreviousLineText;\n this.replaceText = replaceText;\n }\n\n onKeyUp({key, isSpace, isEnter, isPaste}) {\n if(isSpace || isEnter || isPaste) {\n this.searchPatterns({searchPreviousLine: isEnter});\n }\n }\n\n searchPatterns({searchPreviousLine} = {}) {\n let text;\n if(searchPreviousLine) {\n text = this.getPreviousLineText();\n } else {\n text = this.getCurrentLineText();\n }\n\n for (let pattern of this.patterns) {\n const match = pattern.regex.exec(text);\n if(!match) { continue; }\n const matchedText = match[0];\n if(matchedText) {\n let replaceWith = pattern.callback(matchedText);\n this.replaceSelection(pattern.regex, replaceWith, searchPreviousLine);\n }\n }\n }\n\n replaceSelection(regex, replacement, previousLine) {\n if(this.beforeExpand) {\n this.beforeExpand();\n }\n\n this.replaceText({regex, replacement, previousLine});\n\n if(this.afterExpand) {\n this.afterExpand();\n }\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/TextExpander.js","export default class FilesafeHtml {\n\n // Remove matching

    tags if present\n // Also capable of matching adjacent [fsSyntax][fsSyntax]\n static FilesafeSyntaxPattern = /(

    )?\\[FileSafe[^\\]]*\\](<\\/p>)?/g;\n\n /*\n Given an HTML string that includes substrings matching `FilesafeSyntaxPattern`,\n replace occurences with ghost div element \n */\n static expandedFilesafeSyntax(html) {\n let result = html.replace(this.FilesafeSyntaxPattern, (match) => {\n return this.filesafeSyntaxToHtmlElement(match);\n })\n\n return result;\n }\n\n static removeFilesafeSyntaxFromHtml(html) {\n return html.replace(this.FilesafeSyntaxPattern, (match) => {\n return \"\";\n })\n }\n\n static insertionSyntaxForFileDescriptor(descriptor) {\n return `[FileSafe:${descriptor.uuid}:${descriptor.content.fileName}]`;\n }\n\n static filesafeSyntaxToHtmlElement(syntax) {\n // remove paragraph tags\n syntax = syntax.replace(\"

    \", \"\");\n syntax = syntax.replace(\"

    \", \"\");\n // Remove brackets\n syntax = syntax.replace(\"[\", \"\").replace(\"]\", \"\");\n let components = syntax.split(\":\");\n let uuid = components[1];\n let name = components[2];\n let size = components[3];\n let sizeString = \"\";\n if(size) {\n let dimensions = size.split(\"x\");\n sizeString = `width=${dimensions[0]} height=${dimensions[1]}`\n }\n // We use a p tag here because if try something custom, like `filesafe` tag, the editor will automatically\n // wrap it in a p tag, causing littered p tags remaining in the plaintext representation.\n let result = `

    `;\n return result;\n }\n\n /*\n Given a rendered HTML string, replace all items with [FileSafe:UUID] plaintext items.\n Also, for any elements that have the 'ghost' attribute, remove it from the resulting string\n */\n static collapseFilesafeSyntax(html) {\n let domCopy = new DOMParser().parseFromString(html, \"text/html\");\n // Elements that have fscollapsable means they should be collapsed to plain syntax\n let mediaElements = domCopy.querySelectorAll(`*[fscollapsable]`);\n\n for(let file of mediaElements) {\n let uuid = file.getAttribute('fsid');\n let name = file.getAttribute('fsname');\n let width = file.getAttribute('width');\n let height = file.getAttribute('height');\n\n let components = [\"FileSafe\", uuid, name];\n if(width || height) {\n let size = `${width}x${height}`;\n components.push(size);\n }\n\n let fsSyntax = `

    [${components.join(\":\")}]

    `;\n file.insertAdjacentHTML('afterend', fsSyntax);\n file.remove();\n }\n\n let ghosts = domCopy.querySelectorAll(`*[ghost]`);\n ghosts.forEach((ghost) => {ghost.remove()});\n\n let result = domCopy.body.innerHTML;\n return result;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/FilesafeHtml.js","module.exports = require(\"filesafe-js\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"filesafe-js\"\n// module id = 7\n// module chunks = 0 1","/*\n The delegate is responsible for responding to events and functions\n that the EditorKit requires. For example, when EditorKit wants to insert\n a new HTML element, it won't neccessarily know how, because it's not designed for\n any particular editor. Instead, it will tell the delegate to insert the element.\n\n The consumer of this API, the actual editor, would configure this delegate with\n the appropriate callbacks.\n\n Callbacks are defined in the constructor.\n*/\n\nexport default class EditorKitDelegate {\n\n constructor({insertRawText, onReceiveNote,\n setEditorRawText, getCurrentLineText, getPreviousLineText, replaceText,\n getElementsBySelector, insertElement, preprocessElement, clearUndoHistory, generateCustomPreview}) {\n this.insertRawText = insertRawText;\n this.onReceiveNote = onReceiveNote;\n this.setEditorRawText = setEditorRawText;\n this.getCurrentLineText = getCurrentLineText;\n this.getPreviousLineText = getPreviousLineText;\n this.replaceText = replaceText;\n this.getElementsBySelector = getElementsBySelector;\n this.insertElement = insertElement;\n this.preprocessElement = preprocessElement;\n this.clearUndoHistory = clearUndoHistory;\n\n // Takes in string parameter, return object {html: string, plain: string}\n this.generateCustomPreview = generateCustomPreview;\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/EditorKitDelegate.js","/**\n * marked - a markdown parser\n * Copyright (c) 2011-2020, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.marked = factory());\n}(this, (function () { 'use strict';\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n it = o[Symbol.iterator]();\n return it.next.bind(it);\n }\n\n function createCommonjsModule(fn, module) {\n \treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n }\n\n var defaults = createCommonjsModule(function (module) {\n function getDefaults() {\n return {\n baseUrl: null,\n breaks: false,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: null,\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartLists: false,\n smartypants: false,\n tokenizer: null,\n walkTokens: null,\n xhtml: false\n };\n }\n\n function changeDefaults(newDefaults) {\n module.exports.defaults = newDefaults;\n }\n\n module.exports = {\n defaults: getDefaults(),\n getDefaults: getDefaults,\n changeDefaults: changeDefaults\n };\n });\n var defaults_1 = defaults.defaults;\n var defaults_2 = defaults.getDefaults;\n var defaults_3 = defaults.changeDefaults;\n\n /**\n * Helpers\n */\n var escapeTest = /[&<>\"']/;\n var escapeReplace = /[&<>\"']/g;\n var escapeTestNoEncode = /[<>\"']|&(?!#?\\w+;)/;\n var escapeReplaceNoEncode = /[<>\"']|&(?!#?\\w+;)/g;\n var escapeReplacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n var getEscapeReplacement = function getEscapeReplacement(ch) {\n return escapeReplacements[ch];\n };\n\n function escape(html, encode) {\n if (encode) {\n if (escapeTest.test(html)) {\n return html.replace(escapeReplace, getEscapeReplacement);\n }\n } else {\n if (escapeTestNoEncode.test(html)) {\n return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n }\n }\n\n return html;\n }\n\n var unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\n\n function unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(unescapeTest, function (_, n) {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));\n }\n\n return '';\n });\n }\n\n var caret = /(^|[^\\[])\\^/g;\n\n function edit(regex, opt) {\n regex = regex.source || regex;\n opt = opt || '';\n var obj = {\n replace: function replace(name, val) {\n val = val.source || val;\n val = val.replace(caret, '$1');\n regex = regex.replace(name, val);\n return obj;\n },\n getRegex: function getRegex() {\n return new RegExp(regex, opt);\n }\n };\n return obj;\n }\n\n var nonWordAndColonTest = /[^\\w:]/g;\n var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\n function cleanUrl(sanitize, base, href) {\n if (sanitize) {\n var prot;\n\n try {\n prot = decodeURIComponent(unescape(href)).replace(nonWordAndColonTest, '').toLowerCase();\n } catch (e) {\n return null;\n }\n\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n return null;\n }\n }\n\n if (base && !originIndependentUrl.test(href)) {\n href = resolveUrl(base, href);\n }\n\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return null;\n }\n\n return href;\n }\n\n var baseUrls = {};\n var justDomain = /^[^:]+:\\/*[^/]*$/;\n var protocol = /^([^:]+:)[\\s\\S]*$/;\n var domain = /^([^:]+:\\/*[^/]*)[\\s\\S]*$/;\n\n function resolveUrl(base, href) {\n if (!baseUrls[' ' + base]) {\n // we can ignore everything in base after the last slash of its path component,\n // but we might need to add _that_\n // https://tools.ietf.org/html/rfc3986#section-3\n if (justDomain.test(base)) {\n baseUrls[' ' + base] = base + '/';\n } else {\n baseUrls[' ' + base] = rtrim(base, '/', true);\n }\n }\n\n base = baseUrls[' ' + base];\n var relativeBase = base.indexOf(':') === -1;\n\n if (href.substring(0, 2) === '//') {\n if (relativeBase) {\n return href;\n }\n\n return base.replace(protocol, '$1') + href;\n } else if (href.charAt(0) === '/') {\n if (relativeBase) {\n return href;\n }\n\n return base.replace(domain, '$1') + href;\n } else {\n return base + href;\n }\n }\n\n var noopTest = {\n exec: function noopTest() {}\n };\n\n function merge(obj) {\n var i = 1,\n target,\n key;\n\n for (; i < arguments.length; i++) {\n target = arguments[i];\n\n for (key in target) {\n if (Object.prototype.hasOwnProperty.call(target, key)) {\n obj[key] = target[key];\n }\n }\n }\n\n return obj;\n }\n\n function splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n var row = tableRow.replace(/\\|/g, function (match, offset, str) {\n var escaped = false,\n curr = offset;\n\n while (--curr >= 0 && str[curr] === '\\\\') {\n escaped = !escaped;\n }\n\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/);\n var i = 0;\n\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) {\n cells.push('');\n }\n }\n\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n\n return cells;\n } // Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n // /c*$/ is vulnerable to REDOS.\n // invert: Remove suffix of non-c chars instead. Default falsey.\n\n\n function rtrim(str, c, invert) {\n var l = str.length;\n\n if (l === 0) {\n return '';\n } // Length of suffix matching the invert condition.\n\n\n var suffLen = 0; // Step left until we fail to match the invert condition.\n\n while (suffLen < l) {\n var currChar = str.charAt(l - suffLen - 1);\n\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n\n return str.substr(0, l - suffLen);\n }\n\n function findClosingBracket(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n\n var l = str.length;\n var level = 0,\n i = 0;\n\n for (; i < l; i++) {\n if (str[i] === '\\\\') {\n i++;\n } else if (str[i] === b[0]) {\n level++;\n } else if (str[i] === b[1]) {\n level--;\n\n if (level < 0) {\n return i;\n }\n }\n }\n\n return -1;\n }\n\n function checkSanitizeDeprecation(opt) {\n if (opt && opt.sanitize && !opt.silent) {\n console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');\n }\n } // copied from https://stackoverflow.com/a/5450113/806777\n\n\n function repeatString(pattern, count) {\n if (count < 1) {\n return '';\n }\n\n var result = '';\n\n while (count > 1) {\n if (count & 1) {\n result += pattern;\n }\n\n count >>= 1;\n pattern += pattern;\n }\n\n return result + pattern;\n }\n\n var helpers = {\n escape: escape,\n unescape: unescape,\n edit: edit,\n cleanUrl: cleanUrl,\n resolveUrl: resolveUrl,\n noopTest: noopTest,\n merge: merge,\n splitCells: splitCells,\n rtrim: rtrim,\n findClosingBracket: findClosingBracket,\n checkSanitizeDeprecation: checkSanitizeDeprecation,\n repeatString: repeatString\n };\n\n var defaults$1 = defaults.defaults;\n var rtrim$1 = helpers.rtrim,\n splitCells$1 = helpers.splitCells,\n _escape = helpers.escape,\n findClosingBracket$1 = helpers.findClosingBracket;\n\n function outputLink(cap, link, raw) {\n var href = link.href;\n var title = link.title ? _escape(link.title) : null;\n var text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n\n if (cap[0].charAt(0) !== '!') {\n return {\n type: 'link',\n raw: raw,\n href: href,\n title: title,\n text: text\n };\n } else {\n return {\n type: 'image',\n raw: raw,\n href: href,\n title: title,\n text: _escape(text)\n };\n }\n }\n\n function indentCodeCompensation(raw, text) {\n var matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n\n if (matchIndentToCode === null) {\n return text;\n }\n\n var indentToCode = matchIndentToCode[1];\n return text.split('\\n').map(function (node) {\n var matchIndentInNode = node.match(/^\\s+/);\n\n if (matchIndentInNode === null) {\n return node;\n }\n\n var indentInNode = matchIndentInNode[0];\n\n if (indentInNode.length >= indentToCode.length) {\n return node.slice(indentToCode.length);\n }\n\n return node;\n }).join('\\n');\n }\n /**\n * Tokenizer\n */\n\n\n var Tokenizer_1 = /*#__PURE__*/function () {\n function Tokenizer(options) {\n this.options = options || defaults$1;\n }\n\n var _proto = Tokenizer.prototype;\n\n _proto.space = function space(src) {\n var cap = this.rules.block.newline.exec(src);\n\n if (cap) {\n if (cap[0].length > 1) {\n return {\n type: 'space',\n raw: cap[0]\n };\n }\n\n return {\n raw: '\\n'\n };\n }\n };\n\n _proto.code = function code(src, tokens) {\n var cap = this.rules.block.code.exec(src);\n\n if (cap) {\n var lastToken = tokens[tokens.length - 1]; // An indented code block cannot interrupt a paragraph.\n\n if (lastToken && lastToken.type === 'paragraph') {\n return {\n raw: cap[0],\n text: cap[0].trimRight()\n };\n }\n\n var text = cap[0].replace(/^ {4}/gm, '');\n return {\n type: 'code',\n raw: cap[0],\n codeBlockStyle: 'indented',\n text: !this.options.pedantic ? rtrim$1(text, '\\n') : text\n };\n }\n };\n\n _proto.fences = function fences(src) {\n var cap = this.rules.block.fences.exec(src);\n\n if (cap) {\n var raw = cap[0];\n var text = indentCodeCompensation(raw, cap[3] || '');\n return {\n type: 'code',\n raw: raw,\n lang: cap[2] ? cap[2].trim() : cap[2],\n text: text\n };\n }\n };\n\n _proto.heading = function heading(src) {\n var cap = this.rules.block.heading.exec(src);\n\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[1].length,\n text: cap[2]\n };\n }\n };\n\n _proto.nptable = function nptable(src) {\n var cap = this.rules.block.nptable.exec(src);\n\n if (cap) {\n var item = {\n type: 'table',\n header: splitCells$1(cap[1].replace(/^ *| *\\| *$/g, '')),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n cells: cap[3] ? cap[3].replace(/\\n$/, '').split('\\n') : [],\n raw: cap[0]\n };\n\n if (item.header.length === item.align.length) {\n var l = item.align.length;\n var i;\n\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n l = item.cells.length;\n\n for (i = 0; i < l; i++) {\n item.cells[i] = splitCells$1(item.cells[i], item.header.length);\n }\n\n return item;\n }\n }\n };\n\n _proto.hr = function hr(src) {\n var cap = this.rules.block.hr.exec(src);\n\n if (cap) {\n return {\n type: 'hr',\n raw: cap[0]\n };\n }\n };\n\n _proto.blockquote = function blockquote(src) {\n var cap = this.rules.block.blockquote.exec(src);\n\n if (cap) {\n var text = cap[0].replace(/^ *> ?/gm, '');\n return {\n type: 'blockquote',\n raw: cap[0],\n text: text\n };\n }\n };\n\n _proto.list = function list(src) {\n var cap = this.rules.block.list.exec(src);\n\n if (cap) {\n var raw = cap[0];\n var bull = cap[2];\n var isordered = bull.length > 1;\n var isparen = bull[bull.length - 1] === ')';\n var list = {\n type: 'list',\n raw: raw,\n ordered: isordered,\n start: isordered ? +bull.slice(0, -1) : '',\n loose: false,\n items: []\n }; // Get each top-level item.\n\n var itemMatch = cap[0].match(this.rules.block.item);\n var next = false,\n item,\n space,\n b,\n addBack,\n loose,\n istask,\n ischecked;\n var l = itemMatch.length;\n\n for (var i = 0; i < l; i++) {\n item = itemMatch[i];\n raw = item; // Remove the list item's bullet\n // so it is seen as the next token.\n\n space = item.length;\n item = item.replace(/^ *([*+-]|\\d+[.)]) ?/, ''); // Outdent whatever the\n // list item contains. Hacky.\n\n if (~item.indexOf('\\n ')) {\n space -= item.length;\n item = !this.options.pedantic ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') : item.replace(/^ {1,4}/gm, '');\n } // Determine whether the next list item belongs here.\n // Backpedal if it does not belong in this list.\n\n\n if (i !== l - 1) {\n b = this.rules.block.bullet.exec(itemMatch[i + 1])[0];\n\n if (isordered ? b.length === 1 || !isparen && b[b.length - 1] === ')' : b.length > 1 || this.options.smartLists && b !== bull) {\n addBack = itemMatch.slice(i + 1).join('\\n');\n list.raw = list.raw.substring(0, list.raw.length - addBack.length);\n i = l - 1;\n }\n } // Determine whether item is loose or not.\n // Use: /(^|\\n)(?! )[^\\n]+\\n\\n(?!\\s*$)/\n // for discount behavior.\n\n\n loose = next || /\\n\\n(?!\\s*$)/.test(item);\n\n if (i !== l - 1) {\n next = item.charAt(item.length - 1) === '\\n';\n if (!loose) loose = next;\n }\n\n if (loose) {\n list.loose = true;\n } // Check for task list items\n\n\n istask = /^\\[[ xX]\\] /.test(item);\n ischecked = undefined;\n\n if (istask) {\n ischecked = item[1] !== ' ';\n item = item.replace(/^\\[[ xX]\\] +/, '');\n }\n\n list.items.push({\n type: 'list_item',\n raw: raw,\n task: istask,\n checked: ischecked,\n loose: loose,\n text: item\n });\n }\n\n return list;\n }\n };\n\n _proto.html = function html(src) {\n var cap = this.rules.block.html.exec(src);\n\n if (cap) {\n return {\n type: this.options.sanitize ? 'paragraph' : 'html',\n raw: cap[0],\n pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0]\n };\n }\n };\n\n _proto.def = function def(src) {\n var cap = this.rules.block.def.exec(src);\n\n if (cap) {\n if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);\n var tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n return {\n tag: tag,\n raw: cap[0],\n href: cap[2],\n title: cap[3]\n };\n }\n };\n\n _proto.table = function table(src) {\n var cap = this.rules.block.table.exec(src);\n\n if (cap) {\n var item = {\n type: 'table',\n header: splitCells$1(cap[1].replace(/^ *| *\\| *$/g, '')),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n cells: cap[3] ? cap[3].replace(/\\n$/, '').split('\\n') : []\n };\n\n if (item.header.length === item.align.length) {\n item.raw = cap[0];\n var l = item.align.length;\n var i;\n\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n l = item.cells.length;\n\n for (i = 0; i < l; i++) {\n item.cells[i] = splitCells$1(item.cells[i].replace(/^ *\\| *| *\\| *$/g, ''), item.header.length);\n }\n\n return item;\n }\n }\n };\n\n _proto.lheading = function lheading(src) {\n var cap = this.rules.block.lheading.exec(src);\n\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1]\n };\n }\n };\n\n _proto.paragraph = function paragraph(src) {\n var cap = this.rules.block.paragraph.exec(src);\n\n if (cap) {\n return {\n type: 'paragraph',\n raw: cap[0],\n text: cap[1].charAt(cap[1].length - 1) === '\\n' ? cap[1].slice(0, -1) : cap[1]\n };\n }\n };\n\n _proto.text = function text(src, tokens) {\n var cap = this.rules.block.text.exec(src);\n\n if (cap) {\n var lastToken = tokens[tokens.length - 1];\n\n if (lastToken && lastToken.type === 'text') {\n return {\n raw: cap[0],\n text: cap[0]\n };\n }\n\n return {\n type: 'text',\n raw: cap[0],\n text: cap[0]\n };\n }\n };\n\n _proto.escape = function escape(src) {\n var cap = this.rules.inline.escape.exec(src);\n\n if (cap) {\n return {\n type: 'escape',\n raw: cap[0],\n text: _escape(cap[1])\n };\n }\n };\n\n _proto.tag = function tag(src, inLink, inRawBlock) {\n var cap = this.rules.inline.tag.exec(src);\n\n if (cap) {\n if (!inLink && /^/i.test(cap[0])) {\n inLink = false;\n }\n\n if (!inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n inRawBlock = true;\n } else if (inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n inRawBlock = false;\n }\n\n return {\n type: this.options.sanitize ? 'text' : 'html',\n raw: cap[0],\n inLink: inLink,\n inRawBlock: inRawBlock,\n text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0]\n };\n }\n };\n\n _proto.link = function link(src) {\n var cap = this.rules.inline.link.exec(src);\n\n if (cap) {\n var lastParenIndex = findClosingBracket$1(cap[2], '()');\n\n if (lastParenIndex > -1) {\n var start = cap[0].indexOf('!') === 0 ? 5 : 4;\n var linkLen = start + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n\n var href = cap[2];\n var title = '';\n\n if (this.options.pedantic) {\n var link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n\n if (link) {\n href = link[1];\n title = link[3];\n } else {\n title = '';\n }\n } else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n\n href = href.trim().replace(/^<([\\s\\S]*)>$/, '$1');\n var token = outputLink(cap, {\n href: href ? href.replace(this.rules.inline._escapes, '$1') : href,\n title: title ? title.replace(this.rules.inline._escapes, '$1') : title\n }, cap[0]);\n return token;\n }\n };\n\n _proto.reflink = function reflink(src, links) {\n var cap;\n\n if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {\n var link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n link = links[link.toLowerCase()];\n\n if (!link || !link.href) {\n var text = cap[0].charAt(0);\n return {\n type: 'text',\n raw: text,\n text: text\n };\n }\n\n var token = outputLink(cap, link, cap[0]);\n return token;\n }\n };\n\n _proto.strong = function strong(src, maskedSrc, prevChar) {\n if (prevChar === void 0) {\n prevChar = '';\n }\n\n var match = this.rules.inline.strong.start.exec(src);\n\n if (match && (!match[1] || match[1] && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar)))) {\n maskedSrc = maskedSrc.slice(-1 * src.length);\n var endReg = match[0] === '**' ? this.rules.inline.strong.endAst : this.rules.inline.strong.endUnd;\n endReg.lastIndex = 0;\n var cap;\n\n while ((match = endReg.exec(maskedSrc)) != null) {\n cap = this.rules.inline.strong.middle.exec(maskedSrc.slice(0, match.index + 3));\n\n if (cap) {\n return {\n type: 'strong',\n raw: src.slice(0, cap[0].length),\n text: src.slice(2, cap[0].length - 2)\n };\n }\n }\n }\n };\n\n _proto.em = function em(src, maskedSrc, prevChar) {\n if (prevChar === void 0) {\n prevChar = '';\n }\n\n var match = this.rules.inline.em.start.exec(src);\n\n if (match && (!match[1] || match[1] && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar)))) {\n maskedSrc = maskedSrc.slice(-1 * src.length);\n var endReg = match[0] === '*' ? this.rules.inline.em.endAst : this.rules.inline.em.endUnd;\n endReg.lastIndex = 0;\n var cap;\n\n while ((match = endReg.exec(maskedSrc)) != null) {\n cap = this.rules.inline.em.middle.exec(maskedSrc.slice(0, match.index + 2));\n\n if (cap) {\n return {\n type: 'em',\n raw: src.slice(0, cap[0].length),\n text: src.slice(1, cap[0].length - 1)\n };\n }\n }\n }\n };\n\n _proto.codespan = function codespan(src) {\n var cap = this.rules.inline.code.exec(src);\n\n if (cap) {\n var text = cap[2].replace(/\\n/g, ' ');\n var hasNonSpaceChars = /[^ ]/.test(text);\n var hasSpaceCharsOnBothEnds = text.startsWith(' ') && text.endsWith(' ');\n\n if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n text = text.substring(1, text.length - 1);\n }\n\n text = _escape(text, true);\n return {\n type: 'codespan',\n raw: cap[0],\n text: text\n };\n }\n };\n\n _proto.br = function br(src) {\n var cap = this.rules.inline.br.exec(src);\n\n if (cap) {\n return {\n type: 'br',\n raw: cap[0]\n };\n }\n };\n\n _proto.del = function del(src) {\n var cap = this.rules.inline.del.exec(src);\n\n if (cap) {\n return {\n type: 'del',\n raw: cap[0],\n text: cap[1]\n };\n }\n };\n\n _proto.autolink = function autolink(src, mangle) {\n var cap = this.rules.inline.autolink.exec(src);\n\n if (cap) {\n var text, href;\n\n if (cap[2] === '@') {\n text = _escape(this.options.mangle ? mangle(cap[1]) : cap[1]);\n href = 'mailto:' + text;\n } else {\n text = _escape(cap[1]);\n href = text;\n }\n\n return {\n type: 'link',\n raw: cap[0],\n text: text,\n href: href,\n tokens: [{\n type: 'text',\n raw: text,\n text: text\n }]\n };\n }\n };\n\n _proto.url = function url(src, mangle) {\n var cap;\n\n if (cap = this.rules.inline.url.exec(src)) {\n var text, href;\n\n if (cap[2] === '@') {\n text = _escape(this.options.mangle ? mangle(cap[0]) : cap[0]);\n href = 'mailto:' + text;\n } else {\n // do extended autolink path validation\n var prevCapZero;\n\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];\n } while (prevCapZero !== cap[0]);\n\n text = _escape(cap[0]);\n\n if (cap[1] === 'www.') {\n href = 'http://' + text;\n } else {\n href = text;\n }\n }\n\n return {\n type: 'link',\n raw: cap[0],\n text: text,\n href: href,\n tokens: [{\n type: 'text',\n raw: text,\n text: text\n }]\n };\n }\n };\n\n _proto.inlineText = function inlineText(src, inRawBlock, smartypants) {\n var cap = this.rules.inline.text.exec(src);\n\n if (cap) {\n var text;\n\n if (inRawBlock) {\n text = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0];\n } else {\n text = _escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]);\n }\n\n return {\n type: 'text',\n raw: cap[0],\n text: text\n };\n }\n };\n\n return Tokenizer;\n }();\n\n var noopTest$1 = helpers.noopTest,\n edit$1 = helpers.edit,\n merge$1 = helpers.merge;\n /**\n * Block-Level Grammar\n */\n\n var block = {\n newline: /^\\n+/,\n code: /^( {4}[^\\n]+\\n*)+/,\n fences: /^ {0,3}(`{3,}(?=[^`\\n]*\\n)|~{3,})([^\\n]*)\\n(?:|([\\s\\S]*?)\\n)(?: {0,3}\\1[~`]* *(?:\\n+|$)|$)/,\n hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)/,\n heading: /^ {0,3}(#{1,6}) +([^\\n]*?)(?: +#+)? *(?:\\n+|$)/,\n blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n list: /^( {0,3})(bull) [\\s\\S]+?(?:hr|def|\\n{2,}(?! )(?!\\1bull )\\n*|\\s*$)/,\n html: '^ {0,3}(?:' // optional indentation\n + '<(script|pre|style)[\\\\s>][\\\\s\\\\S]*?(?:[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n + '|\\\\n*|$)' // (4)\n + '|\\\\n*|$)' // (5)\n + '|)[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (6)\n + '|<(?!script|pre|style)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) open tag\n + '|(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) closing tag\n + ')',\n def: /^ {0,3}\\[(label)\\]: *\\n? *]+)>?(?:(?: +\\n? *| *\\n *)(title))? *(?:\\n+|$)/,\n nptable: noopTest$1,\n table: noopTest$1,\n lheading: /^([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n // regex template, placeholders will be replaced according to different paragraph\n // interruption rules of commonmark and the original markdown spec:\n _paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\\n]+)*)/,\n text: /^[^\\n]+/\n };\n block._label = /(?!\\s*\\])(?:\\\\[\\[\\]]|[^\\[\\]])+/;\n block._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\n block.def = edit$1(block.def).replace('label', block._label).replace('title', block._title).getRegex();\n block.bullet = /(?:[*+-]|\\d{1,9}[.)])/;\n block.item = /^( *)(bull) ?[^\\n]*(?:\\n(?!\\1bull ?)[^\\n]*)*/;\n block.item = edit$1(block.item, 'gm').replace(/bull/g, block.bullet).getRegex();\n block.list = edit$1(block.list).replace(/bull/g, block.bullet).replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))').replace('def', '\\\\n+(?=' + block.def.source + ')').getRegex();\n block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul';\n block._comment = /|$)/;\n block.html = edit$1(block.html, 'i').replace('comment', block._comment).replace('tag', block._tag).replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex();\n block.paragraph = edit$1(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n .replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\n block.blockquote = edit$1(block.blockquote).replace('paragraph', block.paragraph).getRegex();\n /**\n * Normal Block Grammar\n */\n\n block.normal = merge$1({}, block);\n /**\n * GFM Block Grammar\n */\n\n block.gfm = merge$1({}, block.normal, {\n nptable: '^ *([^|\\\\n ].*\\\\|.*)\\\\n' // Header\n + ' {0,3}([-:]+ *\\\\|[-| :]*)' // Align\n + '(?:\\\\n((?:(?!\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)',\n // Cells\n table: '^ *\\\\|(.+)\\\\n' // Header\n + ' {0,3}\\\\|?( *[-:]+[-| :]*)' // Align\n + '(?:\\\\n *((?:(?!\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)' // Cells\n\n });\n block.gfm.nptable = edit$1(block.gfm.nptable).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks\n .getRegex();\n block.gfm.table = edit$1(block.gfm.table).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks\n .getRegex();\n /**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\n\n block.pedantic = merge$1({}, block.normal, {\n html: edit$1('^ *(?:comment *(?:\\\\n|\\\\s*$)' + '|<(tag)[\\\\s\\\\S]+? *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))').replace('comment', block._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(),\n def: /^ *\\[([^\\]]+)\\]: *]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^ *(#{1,6}) *([^\\n]+?) *(?:#+ *)?(?:\\n+|$)/,\n fences: noopTest$1,\n // fences not supported\n paragraph: edit$1(block.normal._paragraph).replace('hr', block.hr).replace('heading', ' *#{1,6} *[^\\n]').replace('lheading', block.lheading).replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').getRegex()\n });\n /**\n * Inline-Level Grammar\n */\n\n var inline = {\n escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n url: noopTest$1,\n tag: '^comment' + '|^' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n + '|^' // declaration, e.g. \n + '|^',\n // CDATA section\n link: /^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/,\n reflink: /^!?\\[(label)\\]\\[(?!\\s*\\])((?:\\\\[\\[\\]]?|[^\\[\\]\\\\])+)\\]/,\n nolink: /^!?\\[(?!\\s*\\])((?:\\[[^\\[\\]]*\\]|\\\\[\\[\\]]|[^\\[\\]])*)\\](?:\\[\\])?/,\n reflinkSearch: 'reflink|nolink(?!\\\\()',\n strong: {\n start: /^(?:(\\*\\*(?=[*punctuation]))|\\*\\*)(?![\\s])|__/,\n // (1) returns if starts w/ punctuation\n middle: /^\\*\\*(?:(?:(?!overlapSkip)(?:[^*]|\\\\\\*)|overlapSkip)|\\*(?:(?!overlapSkip)(?:[^*]|\\\\\\*)|overlapSkip)*?\\*)+?\\*\\*$|^__(?![\\s])((?:(?:(?!overlapSkip)(?:[^_]|\\\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\\\_)|overlapSkip)*?_)+?)__$/,\n endAst: /[^punctuation\\s]\\*\\*(?!\\*)|[punctuation]\\*\\*(?!\\*)(?:(?=[punctuation_\\s]|$))/,\n // last char can't be punct, or final * must also be followed by punct (or endline)\n endUnd: /[^\\s]__(?!_)(?:(?=[punctuation*\\s])|$)/ // last char can't be a space, and final _ must preceed punct or \\s (or endline)\n\n },\n em: {\n start: /^(?:(\\*(?=[punctuation]))|\\*)(?![*\\s])|_/,\n // (1) returns if starts w/ punctuation\n middle: /^\\*(?:(?:(?!overlapSkip)(?:[^*]|\\\\\\*)|overlapSkip)|\\*(?:(?!overlapSkip)(?:[^*]|\\\\\\*)|overlapSkip)*?\\*)+?\\*$|^_(?![_\\s])(?:(?:(?!overlapSkip)(?:[^_]|\\\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\\\_)|overlapSkip)*?_)+?_$/,\n endAst: /[^punctuation\\s]\\*(?!\\*)|[punctuation]\\*(?!\\*)(?:(?=[punctuation_\\s]|$))/,\n // last char can't be punct, or final * must also be followed by punct (or endline)\n endUnd: /[^\\s]_(?!_)(?:(?=[punctuation*\\s])|$)/ // last char can't be a space, and final _ must preceed punct or \\s (or endline)\n\n },\n code: /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,\n br: /^( {2,}|\\\\)\\n(?!\\s*$)/,\n del: noopTest$1,\n text: /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\?@\\\\[\\\\]`^{|}~';\n inline.punctuation = edit$1(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex(); // sequences em should skip over [title](link), `code`, \n\n inline._blockSkip = '\\\\[[^\\\\]]*?\\\\]\\\\([^\\\\)]*?\\\\)|`[^`]*?`|<[^>]*?>';\n inline._overlapSkip = '__[^_]*?__|\\\\*\\\\*\\\\[^\\\\*\\\\]*?\\\\*\\\\*';\n inline._comment = edit$1(block._comment).replace('(?:-->|$)', '-->').getRegex();\n inline.em.start = edit$1(inline.em.start).replace(/punctuation/g, inline._punctuation).getRegex();\n inline.em.middle = edit$1(inline.em.middle).replace(/punctuation/g, inline._punctuation).replace(/overlapSkip/g, inline._overlapSkip).getRegex();\n inline.em.endAst = edit$1(inline.em.endAst, 'g').replace(/punctuation/g, inline._punctuation).getRegex();\n inline.em.endUnd = edit$1(inline.em.endUnd, 'g').replace(/punctuation/g, inline._punctuation).getRegex();\n inline.strong.start = edit$1(inline.strong.start).replace(/punctuation/g, inline._punctuation).getRegex();\n inline.strong.middle = edit$1(inline.strong.middle).replace(/punctuation/g, inline._punctuation).replace(/overlapSkip/g, inline._overlapSkip).getRegex();\n inline.strong.endAst = edit$1(inline.strong.endAst, 'g').replace(/punctuation/g, inline._punctuation).getRegex();\n inline.strong.endUnd = edit$1(inline.strong.endUnd, 'g').replace(/punctuation/g, inline._punctuation).getRegex();\n inline.blockSkip = edit$1(inline._blockSkip, 'g').getRegex();\n inline.overlapSkip = edit$1(inline._overlapSkip, 'g').getRegex();\n inline._escapes = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g;\n inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\n inline._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])?)+(?![-_])/;\n inline.autolink = edit$1(inline.autolink).replace('scheme', inline._scheme).replace('email', inline._email).getRegex();\n inline._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\n inline.tag = edit$1(inline.tag).replace('comment', inline._comment).replace('attribute', inline._attribute).getRegex();\n inline._label = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\n inline._href = /<(?:\\\\[<>]?|[^\\s<>\\\\])*>|[^\\s\\x00-\\x1f]*/;\n inline._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\n inline.link = edit$1(inline.link).replace('label', inline._label).replace('href', inline._href).replace('title', inline._title).getRegex();\n inline.reflink = edit$1(inline.reflink).replace('label', inline._label).getRegex();\n inline.reflinkSearch = edit$1(inline.reflinkSearch, 'g').replace('reflink', inline.reflink).replace('nolink', inline.nolink).getRegex();\n /**\n * Normal Inline Grammar\n */\n\n inline.normal = merge$1({}, inline);\n /**\n * Pedantic Inline Grammar\n */\n\n inline.pedantic = merge$1({}, inline.normal, {\n strong: {\n start: /^__|\\*\\*/,\n middle: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n endAst: /\\*\\*(?!\\*)/g,\n endUnd: /__(?!_)/g\n },\n em: {\n start: /^_|\\*/,\n middle: /^()\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)|^_(?=\\S)([\\s\\S]*?\\S)_(?!_)/,\n endAst: /\\*(?!\\*)/g,\n endUnd: /_(?!_)/g\n },\n link: edit$1(/^!?\\[(label)\\]\\((.*?)\\)/).replace('label', inline._label).getRegex(),\n reflink: edit$1(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace('label', inline._label).getRegex()\n });\n /**\n * GFM Inline Grammar\n */\n\n inline.gfm = merge$1({}, inline.normal, {\n escape: edit$1(inline.escape).replace('])', '~|])').getRegex(),\n _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,\n url: /^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,\n _backpedal: /(?:[^?!.,:;*_~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,\n del: /^~+(?=\\S)([\\s\\S]*?\\S)~+/,\n text: /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\ 0.5) {\n ch = 'x' + ch.toString(16);\n }\n\n out += '&#' + ch + ';';\n }\n\n return out;\n }\n /**\n * Block Lexer\n */\n\n\n var Lexer_1 = /*#__PURE__*/function () {\n function Lexer(options) {\n this.tokens = [];\n this.tokens.links = Object.create(null);\n this.options = options || defaults$2;\n this.options.tokenizer = this.options.tokenizer || new Tokenizer_1();\n this.tokenizer = this.options.tokenizer;\n this.tokenizer.options = this.options;\n var rules = {\n block: block$1.normal,\n inline: inline$1.normal\n };\n\n if (this.options.pedantic) {\n rules.block = block$1.pedantic;\n rules.inline = inline$1.pedantic;\n } else if (this.options.gfm) {\n rules.block = block$1.gfm;\n\n if (this.options.breaks) {\n rules.inline = inline$1.breaks;\n } else {\n rules.inline = inline$1.gfm;\n }\n }\n\n this.tokenizer.rules = rules;\n }\n /**\n * Expose Rules\n */\n\n\n /**\n * Static Lex Method\n */\n Lexer.lex = function lex(src, options) {\n var lexer = new Lexer(options);\n return lexer.lex(src);\n }\n /**\n * Static Lex Inline Method\n */\n ;\n\n Lexer.lexInline = function lexInline(src, options) {\n var lexer = new Lexer(options);\n return lexer.inlineTokens(src);\n }\n /**\n * Preprocessing\n */\n ;\n\n var _proto = Lexer.prototype;\n\n _proto.lex = function lex(src) {\n src = src.replace(/\\r\\n|\\r/g, '\\n').replace(/\\t/g, ' ');\n this.blockTokens(src, this.tokens, true);\n this.inline(this.tokens);\n return this.tokens;\n }\n /**\n * Lexing\n */\n ;\n\n _proto.blockTokens = function blockTokens(src, tokens, top) {\n if (tokens === void 0) {\n tokens = [];\n }\n\n if (top === void 0) {\n top = true;\n }\n\n src = src.replace(/^ +$/gm, '');\n var token, i, l, lastToken;\n\n while (src) {\n // newline\n if (token = this.tokenizer.space(src)) {\n src = src.substring(token.raw.length);\n\n if (token.type) {\n tokens.push(token);\n }\n\n continue;\n } // code\n\n\n if (token = this.tokenizer.code(src, tokens)) {\n src = src.substring(token.raw.length);\n\n if (token.type) {\n tokens.push(token);\n } else {\n lastToken = tokens[tokens.length - 1];\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n }\n\n continue;\n } // fences\n\n\n if (token = this.tokenizer.fences(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // heading\n\n\n if (token = this.tokenizer.heading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // table no leading pipe (gfm)\n\n\n if (token = this.tokenizer.nptable(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // hr\n\n\n if (token = this.tokenizer.hr(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // blockquote\n\n\n if (token = this.tokenizer.blockquote(src)) {\n src = src.substring(token.raw.length);\n token.tokens = this.blockTokens(token.text, [], top);\n tokens.push(token);\n continue;\n } // list\n\n\n if (token = this.tokenizer.list(src)) {\n src = src.substring(token.raw.length);\n l = token.items.length;\n\n for (i = 0; i < l; i++) {\n token.items[i].tokens = this.blockTokens(token.items[i].text, [], false);\n }\n\n tokens.push(token);\n continue;\n } // html\n\n\n if (token = this.tokenizer.html(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // def\n\n\n if (top && (token = this.tokenizer.def(src))) {\n src = src.substring(token.raw.length);\n\n if (!this.tokens.links[token.tag]) {\n this.tokens.links[token.tag] = {\n href: token.href,\n title: token.title\n };\n }\n\n continue;\n } // table (gfm)\n\n\n if (token = this.tokenizer.table(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // lheading\n\n\n if (token = this.tokenizer.lheading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // top-level paragraph\n\n\n if (top && (token = this.tokenizer.paragraph(src))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // text\n\n\n if (token = this.tokenizer.text(src, tokens)) {\n src = src.substring(token.raw.length);\n\n if (token.type) {\n tokens.push(token);\n } else {\n lastToken = tokens[tokens.length - 1];\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n }\n\n continue;\n }\n\n if (src) {\n var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n\n return tokens;\n };\n\n _proto.inline = function inline(tokens) {\n var i, j, k, l2, row, token;\n var l = tokens.length;\n\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n switch (token.type) {\n case 'paragraph':\n case 'text':\n case 'heading':\n {\n token.tokens = [];\n this.inlineTokens(token.text, token.tokens);\n break;\n }\n\n case 'table':\n {\n token.tokens = {\n header: [],\n cells: []\n }; // header\n\n l2 = token.header.length;\n\n for (j = 0; j < l2; j++) {\n token.tokens.header[j] = [];\n this.inlineTokens(token.header[j], token.tokens.header[j]);\n } // cells\n\n\n l2 = token.cells.length;\n\n for (j = 0; j < l2; j++) {\n row = token.cells[j];\n token.tokens.cells[j] = [];\n\n for (k = 0; k < row.length; k++) {\n token.tokens.cells[j][k] = [];\n this.inlineTokens(row[k], token.tokens.cells[j][k]);\n }\n }\n\n break;\n }\n\n case 'blockquote':\n {\n this.inline(token.tokens);\n break;\n }\n\n case 'list':\n {\n l2 = token.items.length;\n\n for (j = 0; j < l2; j++) {\n this.inline(token.items[j].tokens);\n }\n\n break;\n }\n }\n }\n\n return tokens;\n }\n /**\n * Lexing/Compiling\n */\n ;\n\n _proto.inlineTokens = function inlineTokens(src, tokens, inLink, inRawBlock, prevChar) {\n if (tokens === void 0) {\n tokens = [];\n }\n\n if (inLink === void 0) {\n inLink = false;\n }\n\n if (inRawBlock === void 0) {\n inRawBlock = false;\n }\n\n if (prevChar === void 0) {\n prevChar = '';\n }\n\n var token; // String with links masked to avoid interference with em and strong\n\n var maskedSrc = src;\n var match; // Mask out reflinks\n\n if (this.tokens.links) {\n var links = Object.keys(this.tokens.links);\n\n if (links.length > 0) {\n while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString$1('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n }\n }\n }\n } // Mask out other blocks\n\n\n while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString$1('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n }\n\n while (src) {\n // escape\n if (token = this.tokenizer.escape(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // tag\n\n\n if (token = this.tokenizer.tag(src, inLink, inRawBlock)) {\n src = src.substring(token.raw.length);\n inLink = token.inLink;\n inRawBlock = token.inRawBlock;\n tokens.push(token);\n continue;\n } // link\n\n\n if (token = this.tokenizer.link(src)) {\n src = src.substring(token.raw.length);\n\n if (token.type === 'link') {\n token.tokens = this.inlineTokens(token.text, [], true, inRawBlock);\n }\n\n tokens.push(token);\n continue;\n } // reflink, nolink\n\n\n if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n src = src.substring(token.raw.length);\n\n if (token.type === 'link') {\n token.tokens = this.inlineTokens(token.text, [], true, inRawBlock);\n }\n\n tokens.push(token);\n continue;\n } // strong\n\n\n if (token = this.tokenizer.strong(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);\n tokens.push(token);\n continue;\n } // em\n\n\n if (token = this.tokenizer.em(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);\n tokens.push(token);\n continue;\n } // code\n\n\n if (token = this.tokenizer.codespan(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // br\n\n\n if (token = this.tokenizer.br(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // del (gfm)\n\n\n if (token = this.tokenizer.del(src)) {\n src = src.substring(token.raw.length);\n token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);\n tokens.push(token);\n continue;\n } // autolink\n\n\n if (token = this.tokenizer.autolink(src, mangle)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // url (gfm)\n\n\n if (!inLink && (token = this.tokenizer.url(src, mangle))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // text\n\n\n if (token = this.tokenizer.inlineText(src, inRawBlock, smartypants)) {\n src = src.substring(token.raw.length);\n prevChar = token.raw.slice(-1);\n tokens.push(token);\n continue;\n }\n\n if (src) {\n var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n\n return tokens;\n };\n\n _createClass(Lexer, null, [{\n key: \"rules\",\n get: function get() {\n return {\n block: block$1,\n inline: inline$1\n };\n }\n }]);\n\n return Lexer;\n }();\n\n var defaults$3 = defaults.defaults;\n var cleanUrl$1 = helpers.cleanUrl,\n escape$1 = helpers.escape;\n /**\n * Renderer\n */\n\n var Renderer_1 = /*#__PURE__*/function () {\n function Renderer(options) {\n this.options = options || defaults$3;\n }\n\n var _proto = Renderer.prototype;\n\n _proto.code = function code(_code, infostring, escaped) {\n var lang = (infostring || '').match(/\\S*/)[0];\n\n if (this.options.highlight) {\n var out = this.options.highlight(_code, lang);\n\n if (out != null && out !== _code) {\n escaped = true;\n _code = out;\n }\n }\n\n if (!lang) {\n return '
    ' + (escaped ? _code : escape$1(_code, true)) + '
    \\n';\n }\n\n return '
    ' + (escaped ? _code : escape$1(_code, true)) + '
    \\n';\n };\n\n _proto.blockquote = function blockquote(quote) {\n return '
    \\n' + quote + '
    \\n';\n };\n\n _proto.html = function html(_html) {\n return _html;\n };\n\n _proto.heading = function heading(text, level, raw, slugger) {\n if (this.options.headerIds) {\n return '' + text + '\\n';\n } // ignore IDs\n\n\n return '' + text + '\\n';\n };\n\n _proto.hr = function hr() {\n return this.options.xhtml ? '
    \\n' : '
    \\n';\n };\n\n _proto.list = function list(body, ordered, start) {\n var type = ordered ? 'ol' : 'ul',\n startatt = ordered && start !== 1 ? ' start=\"' + start + '\"' : '';\n return '<' + type + startatt + '>\\n' + body + '\\n';\n };\n\n _proto.listitem = function listitem(text) {\n return '
  • ' + text + '
  • \\n';\n };\n\n _proto.checkbox = function checkbox(checked) {\n return ' ';\n };\n\n _proto.paragraph = function paragraph(text) {\n return '

    ' + text + '

    \\n';\n };\n\n _proto.table = function table(header, body) {\n if (body) body = '' + body + '';\n return '\\n' + '\\n' + header + '\\n' + body + '
    \\n';\n };\n\n _proto.tablerow = function tablerow(content) {\n return '\\n' + content + '\\n';\n };\n\n _proto.tablecell = function tablecell(content, flags) {\n var type = flags.header ? 'th' : 'td';\n var tag = flags.align ? '<' + type + ' align=\"' + flags.align + '\">' : '<' + type + '>';\n return tag + content + '\\n';\n } // span level renderer\n ;\n\n _proto.strong = function strong(text) {\n return '' + text + '';\n };\n\n _proto.em = function em(text) {\n return '' + text + '';\n };\n\n _proto.codespan = function codespan(text) {\n return '' + text + '';\n };\n\n _proto.br = function br() {\n return this.options.xhtml ? '
    ' : '
    ';\n };\n\n _proto.del = function del(text) {\n return '' + text + '';\n };\n\n _proto.link = function link(href, title, text) {\n href = cleanUrl$1(this.options.sanitize, this.options.baseUrl, href);\n\n if (href === null) {\n return text;\n }\n\n var out = '
    ';\n return out;\n };\n\n _proto.image = function image(href, title, text) {\n href = cleanUrl$1(this.options.sanitize, this.options.baseUrl, href);\n\n if (href === null) {\n return text;\n }\n\n var out = '\"'' : '>';\n return out;\n };\n\n _proto.text = function text(_text) {\n return _text;\n };\n\n return Renderer;\n }();\n\n /**\n * TextRenderer\n * returns only the textual part of the token\n */\n var TextRenderer_1 = /*#__PURE__*/function () {\n function TextRenderer() {}\n\n var _proto = TextRenderer.prototype;\n\n // no need for block level renderers\n _proto.strong = function strong(text) {\n return text;\n };\n\n _proto.em = function em(text) {\n return text;\n };\n\n _proto.codespan = function codespan(text) {\n return text;\n };\n\n _proto.del = function del(text) {\n return text;\n };\n\n _proto.html = function html(text) {\n return text;\n };\n\n _proto.text = function text(_text) {\n return _text;\n };\n\n _proto.link = function link(href, title, text) {\n return '' + text;\n };\n\n _proto.image = function image(href, title, text) {\n return '' + text;\n };\n\n _proto.br = function br() {\n return '';\n };\n\n return TextRenderer;\n }();\n\n /**\n * Slugger generates header id\n */\n var Slugger_1 = /*#__PURE__*/function () {\n function Slugger() {\n this.seen = {};\n }\n\n var _proto = Slugger.prototype;\n\n _proto.serialize = function serialize(value) {\n return value.toLowerCase().trim() // remove html tags\n .replace(/<[!\\/a-z].*?>/ig, '') // remove unwanted chars\n .replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g, '').replace(/\\s/g, '-');\n }\n /**\n * Finds the next safe (unique) slug to use\n */\n ;\n\n _proto.getNextSafeSlug = function getNextSafeSlug(originalSlug, isDryRun) {\n var slug = originalSlug;\n var occurenceAccumulator = 0;\n\n if (this.seen.hasOwnProperty(slug)) {\n occurenceAccumulator = this.seen[originalSlug];\n\n do {\n occurenceAccumulator++;\n slug = originalSlug + '-' + occurenceAccumulator;\n } while (this.seen.hasOwnProperty(slug));\n }\n\n if (!isDryRun) {\n this.seen[originalSlug] = occurenceAccumulator;\n this.seen[slug] = 0;\n }\n\n return slug;\n }\n /**\n * Convert string to unique id\n * @param {object} options\n * @param {boolean} options.dryrun Generates the next unique slug without updating the internal accumulator.\n */\n ;\n\n _proto.slug = function slug(value, options) {\n if (options === void 0) {\n options = {};\n }\n\n var slug = this.serialize(value);\n return this.getNextSafeSlug(slug, options.dryrun);\n };\n\n return Slugger;\n }();\n\n var defaults$4 = defaults.defaults;\n var unescape$1 = helpers.unescape;\n /**\n * Parsing & Compiling\n */\n\n var Parser_1 = /*#__PURE__*/function () {\n function Parser(options) {\n this.options = options || defaults$4;\n this.options.renderer = this.options.renderer || new Renderer_1();\n this.renderer = this.options.renderer;\n this.renderer.options = this.options;\n this.textRenderer = new TextRenderer_1();\n this.slugger = new Slugger_1();\n }\n /**\n * Static Parse Method\n */\n\n\n Parser.parse = function parse(tokens, options) {\n var parser = new Parser(options);\n return parser.parse(tokens);\n }\n /**\n * Static Parse Inline Method\n */\n ;\n\n Parser.parseInline = function parseInline(tokens, options) {\n var parser = new Parser(options);\n return parser.parseInline(tokens);\n }\n /**\n * Parse Loop\n */\n ;\n\n var _proto = Parser.prototype;\n\n _proto.parse = function parse(tokens, top) {\n if (top === void 0) {\n top = true;\n }\n\n var out = '',\n i,\n j,\n k,\n l2,\n l3,\n row,\n cell,\n header,\n body,\n token,\n ordered,\n start,\n loose,\n itemBody,\n item,\n checked,\n task,\n checkbox;\n var l = tokens.length;\n\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n switch (token.type) {\n case 'space':\n {\n continue;\n }\n\n case 'hr':\n {\n out += this.renderer.hr();\n continue;\n }\n\n case 'heading':\n {\n out += this.renderer.heading(this.parseInline(token.tokens), token.depth, unescape$1(this.parseInline(token.tokens, this.textRenderer)), this.slugger);\n continue;\n }\n\n case 'code':\n {\n out += this.renderer.code(token.text, token.lang, token.escaped);\n continue;\n }\n\n case 'table':\n {\n header = ''; // header\n\n cell = '';\n l2 = token.header.length;\n\n for (j = 0; j < l2; j++) {\n cell += this.renderer.tablecell(this.parseInline(token.tokens.header[j]), {\n header: true,\n align: token.align[j]\n });\n }\n\n header += this.renderer.tablerow(cell);\n body = '';\n l2 = token.cells.length;\n\n for (j = 0; j < l2; j++) {\n row = token.tokens.cells[j];\n cell = '';\n l3 = row.length;\n\n for (k = 0; k < l3; k++) {\n cell += this.renderer.tablecell(this.parseInline(row[k]), {\n header: false,\n align: token.align[k]\n });\n }\n\n body += this.renderer.tablerow(cell);\n }\n\n out += this.renderer.table(header, body);\n continue;\n }\n\n case 'blockquote':\n {\n body = this.parse(token.tokens);\n out += this.renderer.blockquote(body);\n continue;\n }\n\n case 'list':\n {\n ordered = token.ordered;\n start = token.start;\n loose = token.loose;\n l2 = token.items.length;\n body = '';\n\n for (j = 0; j < l2; j++) {\n item = token.items[j];\n checked = item.checked;\n task = item.task;\n itemBody = '';\n\n if (item.task) {\n checkbox = this.renderer.checkbox(checked);\n\n if (loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'text') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n } else {\n item.tokens.unshift({\n type: 'text',\n text: checkbox\n });\n }\n } else {\n itemBody += checkbox;\n }\n }\n\n itemBody += this.parse(item.tokens, loose);\n body += this.renderer.listitem(itemBody, task, checked);\n }\n\n out += this.renderer.list(body, ordered, start);\n continue;\n }\n\n case 'html':\n {\n // TODO parse inline content if parameter markdown=1\n out += this.renderer.html(token.text);\n continue;\n }\n\n case 'paragraph':\n {\n out += this.renderer.paragraph(this.parseInline(token.tokens));\n continue;\n }\n\n case 'text':\n {\n body = token.tokens ? this.parseInline(token.tokens) : token.text;\n\n while (i + 1 < l && tokens[i + 1].type === 'text') {\n token = tokens[++i];\n body += '\\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);\n }\n\n out += top ? this.renderer.paragraph(body) : body;\n continue;\n }\n\n default:\n {\n var errMsg = 'Token with \"' + token.type + '\" type was not found.';\n\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n\n return out;\n }\n /**\n * Parse Inline Tokens\n */\n ;\n\n _proto.parseInline = function parseInline(tokens, renderer) {\n renderer = renderer || this.renderer;\n var out = '',\n i,\n token;\n var l = tokens.length;\n\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n switch (token.type) {\n case 'escape':\n {\n out += renderer.text(token.text);\n break;\n }\n\n case 'html':\n {\n out += renderer.html(token.text);\n break;\n }\n\n case 'link':\n {\n out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'image':\n {\n out += renderer.image(token.href, token.title, token.text);\n break;\n }\n\n case 'strong':\n {\n out += renderer.strong(this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'em':\n {\n out += renderer.em(this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'codespan':\n {\n out += renderer.codespan(token.text);\n break;\n }\n\n case 'br':\n {\n out += renderer.br();\n break;\n }\n\n case 'del':\n {\n out += renderer.del(this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'text':\n {\n out += renderer.text(token.text);\n break;\n }\n\n default:\n {\n var errMsg = 'Token with \"' + token.type + '\" type was not found.';\n\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n\n return out;\n };\n\n return Parser;\n }();\n\n var merge$2 = helpers.merge,\n checkSanitizeDeprecation$1 = helpers.checkSanitizeDeprecation,\n escape$2 = helpers.escape;\n var getDefaults = defaults.getDefaults,\n changeDefaults = defaults.changeDefaults,\n defaults$5 = defaults.defaults;\n /**\n * Marked\n */\n\n function marked(src, opt, callback) {\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n throw new Error('marked(): input parameter is undefined or null');\n }\n\n if (typeof src !== 'string') {\n throw new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');\n }\n\n if (typeof opt === 'function') {\n callback = opt;\n opt = null;\n }\n\n opt = merge$2({}, marked.defaults, opt || {});\n checkSanitizeDeprecation$1(opt);\n\n if (callback) {\n var highlight = opt.highlight;\n var tokens;\n\n try {\n tokens = Lexer_1.lex(src, opt);\n } catch (e) {\n return callback(e);\n }\n\n var done = function done(err) {\n var out;\n\n if (!err) {\n try {\n out = Parser_1.parse(tokens, opt);\n } catch (e) {\n err = e;\n }\n }\n\n opt.highlight = highlight;\n return err ? callback(err) : callback(null, out);\n };\n\n if (!highlight || highlight.length < 3) {\n return done();\n }\n\n delete opt.highlight;\n if (!tokens.length) return done();\n var pending = 0;\n marked.walkTokens(tokens, function (token) {\n if (token.type === 'code') {\n pending++;\n setTimeout(function () {\n highlight(token.text, token.lang, function (err, code) {\n if (err) {\n return done(err);\n }\n\n if (code != null && code !== token.text) {\n token.text = code;\n token.escaped = true;\n }\n\n pending--;\n\n if (pending === 0) {\n done();\n }\n });\n }, 0);\n }\n });\n\n if (pending === 0) {\n done();\n }\n\n return;\n }\n\n try {\n var _tokens = Lexer_1.lex(src, opt);\n\n if (opt.walkTokens) {\n marked.walkTokens(_tokens, opt.walkTokens);\n }\n\n return Parser_1.parse(_tokens, opt);\n } catch (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n\n if (opt.silent) {\n return '

    An error occurred:

    ' + escape$2(e.message + '', true) + '
    ';\n }\n\n throw e;\n }\n }\n /**\n * Options\n */\n\n\n marked.options = marked.setOptions = function (opt) {\n merge$2(marked.defaults, opt);\n changeDefaults(marked.defaults);\n return marked;\n };\n\n marked.getDefaults = getDefaults;\n marked.defaults = defaults$5;\n /**\n * Use Extension\n */\n\n marked.use = function (extension) {\n var opts = merge$2({}, extension);\n\n if (extension.renderer) {\n (function () {\n var renderer = marked.defaults.renderer || new Renderer_1();\n\n var _loop = function _loop(prop) {\n var prevRenderer = renderer[prop];\n\n renderer[prop] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var ret = extension.renderer[prop].apply(renderer, args);\n\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n\n return ret;\n };\n };\n\n for (var prop in extension.renderer) {\n _loop(prop);\n }\n\n opts.renderer = renderer;\n })();\n }\n\n if (extension.tokenizer) {\n (function () {\n var tokenizer = marked.defaults.tokenizer || new Tokenizer_1();\n\n var _loop2 = function _loop2(prop) {\n var prevTokenizer = tokenizer[prop];\n\n tokenizer[prop] = function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var ret = extension.tokenizer[prop].apply(tokenizer, args);\n\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n\n return ret;\n };\n };\n\n for (var prop in extension.tokenizer) {\n _loop2(prop);\n }\n\n opts.tokenizer = tokenizer;\n })();\n }\n\n if (extension.walkTokens) {\n var walkTokens = marked.defaults.walkTokens;\n\n opts.walkTokens = function (token) {\n extension.walkTokens(token);\n\n if (walkTokens) {\n walkTokens(token);\n }\n };\n }\n\n marked.setOptions(opts);\n };\n /**\n * Run callback for every token\n */\n\n\n marked.walkTokens = function (tokens, callback) {\n for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) {\n var token = _step.value;\n callback(token);\n\n switch (token.type) {\n case 'table':\n {\n for (var _iterator2 = _createForOfIteratorHelperLoose(token.tokens.header), _step2; !(_step2 = _iterator2()).done;) {\n var cell = _step2.value;\n marked.walkTokens(cell, callback);\n }\n\n for (var _iterator3 = _createForOfIteratorHelperLoose(token.tokens.cells), _step3; !(_step3 = _iterator3()).done;) {\n var row = _step3.value;\n\n for (var _iterator4 = _createForOfIteratorHelperLoose(row), _step4; !(_step4 = _iterator4()).done;) {\n var _cell = _step4.value;\n marked.walkTokens(_cell, callback);\n }\n }\n\n break;\n }\n\n case 'list':\n {\n marked.walkTokens(token.items, callback);\n break;\n }\n\n default:\n {\n if (token.tokens) {\n marked.walkTokens(token.tokens, callback);\n }\n }\n }\n }\n };\n /**\n * Parse Inline\n */\n\n\n marked.parseInline = function (src, opt) {\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n throw new Error('marked.parseInline(): input parameter is undefined or null');\n }\n\n if (typeof src !== 'string') {\n throw new Error('marked.parseInline(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');\n }\n\n opt = merge$2({}, marked.defaults, opt || {});\n checkSanitizeDeprecation$1(opt);\n\n try {\n var tokens = Lexer_1.lexInline(src, opt);\n\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n\n return Parser_1.parseInline(tokens, opt);\n } catch (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n\n if (opt.silent) {\n return '

    An error occurred:

    ' + escape$2(e.message + '', true) + '
    ';\n }\n\n throw e;\n }\n };\n /**\n * Expose\n */\n\n\n marked.Parser = Parser_1;\n marked.parser = Parser_1.parse;\n marked.Renderer = Renderer_1;\n marked.TextRenderer = TextRenderer_1;\n marked.Lexer = Lexer_1;\n marked.lexer = Lexer_1.lex;\n marked.Tokenizer = Tokenizer_1;\n marked.Slugger = Slugger_1;\n marked.parse = marked;\n var marked_1 = marked;\n\n return marked_1;\n\n})));\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}\n\nmodule.exports = _toArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nmodule.exports = _isNativeReflectConstruct;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","'use strict'\n\nvar own = {}.hasOwnProperty\n\nmodule.exports = stringify\n\nfunction stringify(value) {\n // Nothing.\n if (!value || typeof value !== 'object') {\n return ''\n }\n\n // Node.\n if (own.call(value, 'position') || own.call(value, 'type')) {\n return position(value.position)\n }\n\n // Position.\n if (own.call(value, 'start') || own.call(value, 'end')) {\n return position(value)\n }\n\n // Point.\n if (own.call(value, 'line') || own.call(value, 'column')) {\n return point(value)\n }\n\n // ?\n return ''\n}\n\nfunction point(point) {\n if (!point || typeof point !== 'object') {\n point = {}\n }\n\n return index(point.line) + ':' + index(point.column)\n}\n\nfunction position(pos) {\n if (!pos || typeof pos !== 'object') {\n pos = {}\n }\n\n return point(pos.start) + '-' + point(pos.end)\n}\n\nfunction index(value) {\n return value && typeof value === 'number' ? value : 1\n}\n","'use strict'\n\nmodule.exports = toString\n\n// Get the text content of a node.\n// Prefer the node’s plain-text fields, otherwise serialize its children,\n// and if the given value is an array, serialize the nodes in it.\nfunction toString(node) {\n return (\n (node &&\n (node.value ||\n node.alt ||\n node.title ||\n ('children' in node && all(node.children)) ||\n ('length' in node && all(node)))) ||\n ''\n )\n}\n\nfunction all(values) {\n var result = []\n var index = -1\n\n while (++index < values.length) {\n result[index] = toString(values[index])\n }\n\n return result.join('')\n}\n","'use strict'\n\nvar own = {}.hasOwnProperty\n\nmodule.exports = own\n","'use strict'\n\n// Counts tabs based on their expanded size, and CR+LF as one character.\n\nfunction sizeChunks(chunks) {\n var index = -1\n var size = 0\n\n while (++index < chunks.length) {\n size += typeof chunks[index] === 'string' ? chunks[index].length : 1\n }\n\n return size\n}\n\nmodule.exports = sizeChunks\n","'use strict'\n\nvar assign = require('../constant/assign.js')\nvar chunkedSplice = require('./chunked-splice.js')\nvar shallow = require('./shallow.js')\n\nfunction subtokenize(events) {\n var jumps = {}\n var index = -1\n var event\n var lineIndex\n var otherIndex\n var otherEvent\n var parameters\n var subevents\n var more\n\n while (++index < events.length) {\n while (index in jumps) {\n index = jumps[index]\n }\n\n event = events[index] // Add a hook for the GFM tasklist extension, which needs to know if text\n // is in the first content of a list item.\n\n if (\n index &&\n event[1].type === 'chunkFlow' &&\n events[index - 1][1].type === 'listItemPrefix'\n ) {\n subevents = event[1]._tokenizer.events\n otherIndex = 0\n\n if (\n otherIndex < subevents.length &&\n subevents[otherIndex][1].type === 'lineEndingBlank'\n ) {\n otherIndex += 2\n }\n\n if (\n otherIndex < subevents.length &&\n subevents[otherIndex][1].type === 'content'\n ) {\n while (++otherIndex < subevents.length) {\n if (subevents[otherIndex][1].type === 'content') {\n break\n }\n\n if (subevents[otherIndex][1].type === 'chunkText') {\n subevents[otherIndex][1].isInFirstContentOfListItem = true\n otherIndex++\n }\n }\n }\n } // Enter.\n\n if (event[0] === 'enter') {\n if (event[1].contentType) {\n assign(jumps, subcontent(events, index))\n index = jumps[index]\n more = true\n }\n } // Exit.\n else if (event[1]._container || event[1]._movePreviousLineEndings) {\n otherIndex = index\n lineIndex = undefined\n\n while (otherIndex--) {\n otherEvent = events[otherIndex]\n\n if (\n otherEvent[1].type === 'lineEnding' ||\n otherEvent[1].type === 'lineEndingBlank'\n ) {\n if (otherEvent[0] === 'enter') {\n if (lineIndex) {\n events[lineIndex][1].type = 'lineEndingBlank'\n }\n\n otherEvent[1].type = 'lineEnding'\n lineIndex = otherIndex\n }\n } else {\n break\n }\n }\n\n if (lineIndex) {\n // Fix position.\n event[1].end = shallow(events[lineIndex][1].start) // Switch container exit w/ line endings.\n\n parameters = events.slice(lineIndex, index)\n parameters.unshift(event)\n chunkedSplice(events, lineIndex, index - lineIndex + 1, parameters)\n }\n }\n }\n\n return !more\n}\n\nfunction subcontent(events, eventIndex) {\n var token = events[eventIndex][1]\n var context = events[eventIndex][2]\n var startPosition = eventIndex - 1\n var startPositions = []\n var tokenizer =\n token._tokenizer || context.parser[token.contentType](token.start)\n var childEvents = tokenizer.events\n var jumps = []\n var gaps = {}\n var stream\n var previous\n var index\n var entered\n var end\n var adjust // Loop forward through the linked tokens to pass them in order to the\n // subtokenizer.\n\n while (token) {\n // Find the position of the event for this token.\n while (events[++startPosition][1] !== token) {\n // Empty.\n }\n\n startPositions.push(startPosition)\n\n if (!token._tokenizer) {\n stream = context.sliceStream(token)\n\n if (!token.next) {\n stream.push(null)\n }\n\n if (previous) {\n tokenizer.defineSkip(token.start)\n }\n\n if (token.isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = true\n }\n\n tokenizer.write(stream)\n\n if (token.isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = undefined\n }\n } // Unravel the next token.\n\n previous = token\n token = token.next\n } // Now, loop back through all events (and linked tokens), to figure out which\n // parts belong where.\n\n token = previous\n index = childEvents.length\n\n while (index--) {\n // Make sure we’ve at least seen something (final eol is part of the last\n // token).\n if (childEvents[index][0] === 'enter') {\n entered = true\n } else if (\n // Find a void token that includes a break.\n entered &&\n childEvents[index][1].type === childEvents[index - 1][1].type &&\n childEvents[index][1].start.line !== childEvents[index][1].end.line\n ) {\n add(childEvents.slice(index + 1, end))\n // Help GC.\n token._tokenizer = token.next = undefined\n token = token.previous\n end = index + 1\n }\n }\n\n // Help GC.\n tokenizer.events = token._tokenizer = token.next = undefined // Do head:\n\n add(childEvents.slice(0, end))\n index = -1\n adjust = 0\n\n while (++index < jumps.length) {\n gaps[adjust + jumps[index][0]] = adjust + jumps[index][1]\n adjust += jumps[index][1] - jumps[index][0] - 1\n }\n\n return gaps\n\n function add(slice) {\n var start = startPositions.pop()\n jumps.unshift([start, start + slice.length - 1])\n chunkedSplice(events, start, 2, slice)\n }\n}\n\nmodule.exports = subtokenize\n","'use strict'\n\nObject.defineProperty(exports, '__esModule', {value: true})\n\nvar assign = require('../constant/assign.js')\nvar shallow = require('../util/shallow.js')\n\nvar text = initializeFactory('text')\nvar string = initializeFactory('string')\nvar resolver = {\n resolveAll: createResolver()\n}\n\nfunction initializeFactory(field) {\n return {\n tokenize: initializeText,\n resolveAll: createResolver(\n field === 'text' ? resolveAllLineSuffixes : undefined\n )\n }\n\n function initializeText(effects) {\n var self = this\n var constructs = this.parser.constructs[field]\n var text = effects.attempt(constructs, start, notText)\n return start\n\n function start(code) {\n return atBreak(code) ? text(code) : notText(code)\n }\n\n function notText(code) {\n if (code === null) {\n effects.consume(code)\n return\n }\n\n effects.enter('data')\n effects.consume(code)\n return data\n }\n\n function data(code) {\n if (atBreak(code)) {\n effects.exit('data')\n return text(code)\n } // Data.\n\n effects.consume(code)\n return data\n }\n\n function atBreak(code) {\n var list = constructs[code]\n var index = -1\n\n if (code === null) {\n return true\n }\n\n if (list) {\n while (++index < list.length) {\n if (\n !list[index].previous ||\n list[index].previous.call(self, self.previous)\n ) {\n return true\n }\n }\n }\n }\n }\n}\n\nfunction createResolver(extraResolver) {\n return resolveAllText\n\n function resolveAllText(events, context) {\n var index = -1\n var enter // A rather boring computation (to merge adjacent `data` events) which\n // improves mm performance by 29%.\n\n while (++index <= events.length) {\n if (enter === undefined) {\n if (events[index] && events[index][1].type === 'data') {\n enter = index\n index++\n }\n } else if (!events[index] || events[index][1].type !== 'data') {\n // Don’t do anything if there is one data token.\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end\n events.splice(enter + 2, index - enter - 2)\n index = enter + 2\n }\n\n enter = undefined\n }\n }\n\n return extraResolver ? extraResolver(events, context) : events\n }\n} // A rather ugly set of instructions which again looks at chunks in the input\n// stream.\n// The reason to do this here is that it is *much* faster to parse in reverse.\n// And that we can’t hook into `null` to split the line suffix before an EOF.\n// To do: figure out if we can make this into a clean utility, or even in core.\n// As it will be useful for GFMs literal autolink extension (and maybe even\n// tables?)\n\nfunction resolveAllLineSuffixes(events, context) {\n var eventIndex = -1\n var chunks\n var data\n var chunk\n var index\n var bufferIndex\n var size\n var tabs\n var token\n\n while (++eventIndex <= events.length) {\n if (\n (eventIndex === events.length ||\n events[eventIndex][1].type === 'lineEnding') &&\n events[eventIndex - 1][1].type === 'data'\n ) {\n data = events[eventIndex - 1][1]\n chunks = context.sliceStream(data)\n index = chunks.length\n bufferIndex = -1\n size = 0\n tabs = undefined\n\n while (index--) {\n chunk = chunks[index]\n\n if (typeof chunk === 'string') {\n bufferIndex = chunk.length\n\n while (chunk.charCodeAt(bufferIndex - 1) === 32) {\n size++\n bufferIndex--\n }\n\n if (bufferIndex) break\n bufferIndex = -1\n } // Number\n else if (chunk === -2) {\n tabs = true\n size++\n } else if (chunk === -1);\n else {\n // Replacement character, exit.\n index++\n break\n }\n }\n\n if (size) {\n token = {\n type:\n eventIndex === events.length || tabs || size < 2\n ? 'lineSuffix'\n : 'hardBreakTrailing',\n start: {\n line: data.end.line,\n column: data.end.column - size,\n offset: data.end.offset - size,\n _index: data.start._index + index,\n _bufferIndex: index\n ? bufferIndex\n : data.start._bufferIndex + bufferIndex\n },\n end: shallow(data.end)\n }\n data.end = shallow(token.start)\n\n if (data.start.offset === data.end.offset) {\n assign(data, token)\n } else {\n events.splice(\n eventIndex,\n 0,\n ['enter', token, context],\n ['exit', token, context]\n )\n eventIndex += 2\n }\n }\n\n eventIndex++\n }\n }\n\n return events\n}\n\nexports.resolver = resolver\nexports.string = string\nexports.text = text\n","'use strict'\n\nvar hasOwnProperty = require('../constant/has-own-property.js')\nvar chunkedSplice = require('./chunked-splice.js')\nvar miniflat = require('./miniflat.js')\n\nfunction combineExtensions(extensions) {\n var all = {}\n var index = -1\n\n while (++index < extensions.length) {\n extension(all, extensions[index])\n }\n\n return all\n}\n\nfunction extension(all, extension) {\n var hook\n var left\n var right\n var code\n\n for (hook in extension) {\n left = hasOwnProperty.call(all, hook) ? all[hook] : (all[hook] = {})\n right = extension[hook]\n\n for (code in right) {\n left[code] = constructs(\n miniflat(right[code]),\n hasOwnProperty.call(left, code) ? left[code] : []\n )\n }\n }\n}\n\nfunction constructs(list, existing) {\n var index = -1\n var before = []\n\n while (++index < list.length) {\n ;(list[index].add === 'after' ? existing : before).push(list[index])\n }\n\n chunkedSplice(existing, 0, 0, before)\n return existing\n}\n\nmodule.exports = combineExtensions\n","'use strict'\n\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar unicodePunctuation = require('../character/unicode-punctuation.js')\nvar unicodeWhitespace = require('../character/unicode-whitespace.js')\n\n// Classify whether a character is unicode whitespace, unicode punctuation, or\n// anything else.\n// Used for attention (emphasis, strong), whose sequences can open or close\n// based on the class of surrounding characters.\nfunction classifyCharacter(code) {\n if (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return 1\n }\n\n if (unicodePunctuation(code)) {\n return 2\n }\n}\n\nmodule.exports = classifyCharacter\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\nvar unicodePunctuationRegex = require('../constant/unicode-punctuation-regex.js')\n\n// In fact adds to the bundle size.\n\nvar unicodePunctuation = regexCheck(unicodePunctuationRegex)\n\nmodule.exports = unicodePunctuation\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar unicodeWhitespace = regexCheck(/\\s/)\n\nmodule.exports = unicodeWhitespace\n","'use strict'\n\nvar regexCheck = require('../util/regex-check.js')\n\nvar asciiDigit = regexCheck(/\\d/)\n\nmodule.exports = asciiDigit\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownLineEndingOrSpace = require('../character/markdown-line-ending-or-space.js')\nvar asciiControl = require('../character/ascii-control.js')\n\n// eslint-disable-next-line max-params\nfunction destinationFactory(\n effects,\n ok,\n nok,\n type,\n literalType,\n literalMarkerType,\n rawType,\n stringType,\n max\n) {\n var limit = max || Infinity\n var balance = 0\n return start\n\n function start(code) {\n if (code === 60) {\n effects.enter(type)\n effects.enter(literalType)\n effects.enter(literalMarkerType)\n effects.consume(code)\n effects.exit(literalMarkerType)\n return destinationEnclosedBefore\n }\n\n if (asciiControl(code)) {\n return nok(code)\n }\n\n effects.enter(type)\n effects.enter(rawType)\n effects.enter(stringType)\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return destinationRaw(code)\n }\n\n function destinationEnclosedBefore(code) {\n if (code === 62) {\n effects.enter(literalMarkerType)\n effects.consume(code)\n effects.exit(literalMarkerType)\n effects.exit(literalType)\n effects.exit(type)\n return ok\n }\n\n effects.enter(stringType)\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return destinationEnclosed(code)\n }\n\n function destinationEnclosed(code) {\n if (code === 62) {\n effects.exit('chunkString')\n effects.exit(stringType)\n return destinationEnclosedBefore(code)\n }\n\n if (code === null || code === 60 || markdownLineEnding(code)) {\n return nok(code)\n }\n\n effects.consume(code)\n return code === 92 ? destinationEnclosedEscape : destinationEnclosed\n }\n\n function destinationEnclosedEscape(code) {\n if (code === 60 || code === 62 || code === 92) {\n effects.consume(code)\n return destinationEnclosed\n }\n\n return destinationEnclosed(code)\n }\n\n function destinationRaw(code) {\n if (code === 40) {\n if (++balance > limit) return nok(code)\n effects.consume(code)\n return destinationRaw\n }\n\n if (code === 41) {\n if (!balance--) {\n effects.exit('chunkString')\n effects.exit(stringType)\n effects.exit(rawType)\n effects.exit(type)\n return ok(code)\n }\n\n effects.consume(code)\n return destinationRaw\n }\n\n if (code === null || markdownLineEndingOrSpace(code)) {\n if (balance) return nok(code)\n effects.exit('chunkString')\n effects.exit(stringType)\n effects.exit(rawType)\n effects.exit(type)\n return ok(code)\n }\n\n if (asciiControl(code)) return nok(code)\n effects.consume(code)\n return code === 92 ? destinationRawEscape : destinationRaw\n }\n\n function destinationRawEscape(code) {\n if (code === 40 || code === 41 || code === 92) {\n effects.consume(code)\n return destinationRaw\n }\n\n return destinationRaw(code)\n }\n}\n\nmodule.exports = destinationFactory\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownSpace = require('../character/markdown-space.js')\n\n// eslint-disable-next-line max-params\nfunction labelFactory(effects, ok, nok, type, markerType, stringType) {\n var self = this\n var size = 0\n var data\n return start\n\n function start(code) {\n effects.enter(type)\n effects.enter(markerType)\n effects.consume(code)\n effects.exit(markerType)\n effects.enter(stringType)\n return atBreak\n }\n\n function atBreak(code) {\n if (\n code === null ||\n code === 91 ||\n (code === 93 && !data) ||\n /* c8 ignore next */\n (code === 94 &&\n /* c8 ignore next */\n !size &&\n /* c8 ignore next */\n '_hiddenFootnoteSupport' in self.parser.constructs) ||\n size > 999\n ) {\n return nok(code)\n }\n\n if (code === 93) {\n effects.exit(stringType)\n effects.enter(markerType)\n effects.consume(code)\n effects.exit(markerType)\n effects.exit(type)\n return ok\n }\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return atBreak\n }\n\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return label(code)\n }\n\n function label(code) {\n if (\n code === null ||\n code === 91 ||\n code === 93 ||\n markdownLineEnding(code) ||\n size++ > 999\n ) {\n effects.exit('chunkString')\n return atBreak(code)\n }\n\n effects.consume(code)\n data = data || !markdownSpace(code)\n return code === 92 ? labelEscape : label\n }\n\n function labelEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code)\n size++\n return label\n }\n\n return label(code)\n }\n}\n\nmodule.exports = labelFactory\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar factorySpace = require('./factory-space.js')\n\nfunction whitespaceFactory(effects, ok) {\n var seen\n return start\n\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n seen = true\n return start\n }\n\n if (markdownSpace(code)) {\n return factorySpace(\n effects,\n start,\n seen ? 'linePrefix' : 'lineSuffix'\n )(code)\n }\n\n return ok(code)\n }\n}\n\nmodule.exports = whitespaceFactory\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar factorySpace = require('./factory-space.js')\n\nfunction titleFactory(effects, ok, nok, type, markerType, stringType) {\n var marker\n return start\n\n function start(code) {\n effects.enter(type)\n effects.enter(markerType)\n effects.consume(code)\n effects.exit(markerType)\n marker = code === 40 ? 41 : code\n return atFirstTitleBreak\n }\n\n function atFirstTitleBreak(code) {\n if (code === marker) {\n effects.enter(markerType)\n effects.consume(code)\n effects.exit(markerType)\n effects.exit(type)\n return ok\n }\n\n effects.enter(stringType)\n return atTitleBreak(code)\n }\n\n function atTitleBreak(code) {\n if (code === marker) {\n effects.exit(stringType)\n return atFirstTitleBreak(marker)\n }\n\n if (code === null) {\n return nok(code)\n } // Note: blank lines can’t exist in content.\n\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, atTitleBreak, 'linePrefix')\n }\n\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return title(code)\n }\n\n function title(code) {\n if (code === marker || code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n return atTitleBreak(code)\n }\n\n effects.consume(code)\n return code === 92 ? titleEscape : title\n }\n\n function titleEscape(code) {\n if (code === marker || code === 92) {\n effects.consume(code)\n return title\n }\n\n return title(code)\n }\n}\n\nmodule.exports = titleFactory\n","'use strict'\n\nvar markdownLineEnding = require('../character/markdown-line-ending.js')\nvar markdownSpace = require('../character/markdown-space.js')\nvar factorySpace = require('./factory-space.js')\n\nvar thematicBreak = {\n name: 'thematicBreak',\n tokenize: tokenizeThematicBreak\n}\n\nfunction tokenizeThematicBreak(effects, ok, nok) {\n var size = 0\n var marker\n return start\n\n function start(code) {\n effects.enter('thematicBreak')\n marker = code\n return atBreak(code)\n }\n\n function atBreak(code) {\n if (code === marker) {\n effects.enter('thematicBreakSequence')\n return sequence(code)\n }\n\n if (markdownSpace(code)) {\n return factorySpace(effects, atBreak, 'whitespace')(code)\n }\n\n if (size < 3 || (code !== null && !markdownLineEnding(code))) {\n return nok(code)\n }\n\n effects.exit('thematicBreak')\n return ok(code)\n }\n\n function sequence(code) {\n if (code === marker) {\n effects.consume(code)\n size++\n return sequence\n }\n\n effects.exit('thematicBreakSequence')\n return atBreak(code)\n }\n}\n\nmodule.exports = thematicBreak\n","'use strict'\n\nvar visit = require('unist-util-visit')\n\nmodule.exports = getDefinitionFactory\n\nvar own = {}.hasOwnProperty\n\n// Get a definition in `node` by `identifier`.\nfunction getDefinitionFactory(node, options) {\n return getterFactory(gather(node, options))\n}\n\n// Gather all definitions in `node`\nfunction gather(node) {\n var cache = {}\n\n if (!node || !node.type) {\n throw new Error('mdast-util-definitions expected node')\n }\n\n visit(node, 'definition', ondefinition)\n\n return cache\n\n function ondefinition(definition) {\n var id = normalise(definition.identifier)\n if (!own.call(cache, id)) {\n cache[id] = definition\n }\n }\n}\n\n// Factory to get a node from the given definition-cache.\nfunction getterFactory(cache) {\n return getter\n\n // Get a node from the bound definition-cache.\n function getter(identifier) {\n var id = identifier && normalise(identifier)\n return id && own.call(cache, id) ? cache[id] : null\n }\n}\n\nfunction normalise(identifier) {\n return identifier.toUpperCase()\n}\n","'use strict'\n\nmodule.exports = one\n\nvar u = require('unist-builder')\nvar all = require('./all')\n\nvar own = {}.hasOwnProperty\n\n// Transform an unknown node.\nfunction unknown(h, node) {\n if (text(node)) {\n return h.augment(node, u('text', node.value))\n }\n\n return h(node, 'div', all(h, node))\n}\n\n// Visit a node.\nfunction one(h, node, parent) {\n var type = node && node.type\n var fn\n\n // Fail on non-nodes.\n if (!type) {\n throw new Error('Expected node, got `' + node + '`')\n }\n\n if (own.call(h.handlers, type)) {\n fn = h.handlers[type]\n } else if (h.passThrough && h.passThrough.indexOf(type) > -1) {\n fn = returnNode\n } else {\n fn = h.unknownHandler\n }\n\n return (typeof fn === 'function' ? fn : unknown)(h, node, parent)\n}\n\n// Check if the node should be renderered as a text node.\nfunction text(node) {\n var data = node.data || {}\n\n if (\n own.call(data, 'hName') ||\n own.call(data, 'hProperties') ||\n own.call(data, 'hChildren')\n ) {\n return false\n }\n\n return 'value' in node\n}\n\nfunction returnNode(h, node) {\n var clone\n\n if (node.children) {\n clone = Object.assign({}, node)\n clone.children = all(h, node)\n return clone\n }\n\n return node\n}\n","'use strict'\n\nmodule.exports = thematicBreak\n\nfunction thematicBreak(h, node) {\n return h(node, 'hr')\n}\n","'use strict'\n\nmodule.exports = list\n\nvar wrap = require('../wrap')\nvar all = require('../all')\n\nfunction list(h, node) {\n var props = {}\n var name = node.ordered ? 'ol' : 'ul'\n var items\n var index = -1\n var length\n\n if (typeof node.start === 'number' && node.start !== 1) {\n props.start = node.start\n }\n\n items = all(h, node)\n length = items.length\n\n // Like GitHub, add a class for custom styling.\n while (++index < length) {\n if (\n items[index].properties.className &&\n items[index].properties.className.indexOf('task-list-item') !== -1\n ) {\n props.className = ['contains-task-list']\n break\n }\n }\n\n return h(node, name, props, wrap(items, true))\n}\n","'use strict'\n\nmodule.exports = footnoteReference\n\nvar u = require('unist-builder')\n\nfunction footnoteReference(h, node) {\n var footnoteOrder = h.footnoteOrder\n var identifier = String(node.identifier)\n\n if (footnoteOrder.indexOf(identifier) === -1) {\n footnoteOrder.push(identifier)\n }\n\n return h(node.position, 'sup', {id: 'fnref-' + identifier}, [\n h(node, 'a', {href: '#fn-' + identifier, className: ['footnote-ref']}, [\n u('text', node.label || identifier)\n ])\n ])\n}\n","'use strict'\n\nmodule.exports = revert\n\nvar u = require('unist-builder')\nvar all = require('./all')\n\n// Return the content of a reference without definition as Markdown.\nfunction revert(h, node) {\n var subtype = node.referenceType\n var suffix = ']'\n var contents\n var head\n var tail\n\n if (subtype === 'collapsed') {\n suffix += '[]'\n } else if (subtype === 'full') {\n suffix += '[' + (node.label || node.identifier) + ']'\n }\n\n if (node.type === 'imageReference') {\n return u('text', '![' + node.alt + suffix)\n }\n\n contents = all(h, node)\n head = contents[0]\n\n if (head && head.type === 'text') {\n head.value = '[' + head.value\n } else {\n contents.unshift(u('text', '['))\n }\n\n tail = contents[contents.length - 1]\n\n if (tail && tail.type === 'text') {\n tail.value += suffix\n } else {\n contents.push(u('text', suffix))\n }\n\n return contents\n}\n","'use strict'\n\nvar html = require('property-information/html')\nvar svg = require('property-information/svg')\nvar find = require('property-information/find')\nvar hastToReact = require('property-information/hast-to-react.json')\nvar spaces = require('space-separated-tokens')\nvar commas = require('comma-separated-tokens')\nvar style = require('style-to-object')\nvar ns = require('web-namespaces')\nvar convert = require('unist-util-is/convert')\n\nvar root = convert('root')\nvar element = convert('element')\nvar text = convert('text')\n\nmodule.exports = wrapper\n\nfunction wrapper(h, node, options) {\n var settings = options || {}\n var r = react(h)\n var v = vue(h)\n var vd = vdom(h)\n var prefix\n\n if (typeof h !== 'function') {\n throw new Error('h is not a function')\n }\n\n if (typeof settings === 'string' || typeof settings === 'boolean') {\n prefix = settings\n settings = {}\n } else {\n prefix = settings.prefix\n }\n\n if (root(node)) {\n node =\n node.children.length === 1 && element(node.children[0])\n ? node.children[0]\n : {\n type: 'element',\n tagName: 'div',\n properties: {},\n children: node.children\n }\n } else if (!element(node)) {\n throw new Error(\n 'Expected root or element, not `' + ((node && node.type) || node) + '`'\n )\n }\n\n return toH(h, node, {\n schema: settings.space === 'svg' ? svg : html,\n prefix: prefix == null ? (r || v || vd ? 'h-' : null) : prefix,\n key: 0,\n react: r,\n vue: v,\n vdom: vd,\n hyperscript: hyperscript(h)\n })\n}\n\n// Transform a hast node through a hyperscript interface to *anything*!\nfunction toH(h, node, ctx) {\n var parentSchema = ctx.schema\n var schema = parentSchema\n var name = node.tagName\n var attributes = {}\n var nodes = []\n var index = -1\n var key\n var value\n\n if (parentSchema.space === 'html' && name.toLowerCase() === 'svg') {\n schema = svg\n ctx.schema = schema\n }\n\n for (key in node.properties) {\n addAttribute(attributes, key, node.properties[key], ctx, name)\n }\n\n if (ctx.vdom) {\n if (schema.space === 'html') {\n name = name.toUpperCase()\n } else {\n attributes.namespace = ns[schema.space]\n }\n }\n\n if (ctx.prefix) {\n ctx.key++\n attributes.key = ctx.prefix + ctx.key\n }\n\n if (node.children) {\n while (++index < node.children.length) {\n value = node.children[index]\n\n if (element(value)) {\n nodes.push(toH(h, value, ctx))\n } else if (text(value)) {\n nodes.push(value.value)\n }\n }\n }\n\n // Restore parent schema.\n ctx.schema = parentSchema\n\n // Ensure no React warnings are triggered for void elements having children\n // passed in.\n return nodes.length\n ? h.call(node, name, attributes, nodes)\n : h.call(node, name, attributes)\n}\n\nfunction addAttribute(props, prop, value, ctx, name) {\n var info = find(ctx.schema, prop)\n var subprop\n\n // Ignore nullish and `NaN` values.\n // Ignore `false` and falsey known booleans for hyperlike DSLs.\n if (\n value == null ||\n value !== value ||\n (value === false && (ctx.vue || ctx.vdom || ctx.hyperscript)) ||\n (!value && info.boolean && (ctx.vue || ctx.vdom || ctx.hyperscript))\n ) {\n return\n }\n\n if (value && typeof value === 'object' && 'length' in value) {\n // Accept `array`.\n // Most props are space-separated.\n value = (info.commaSeparated ? commas : spaces).stringify(value)\n }\n\n // Treat `true` and truthy known booleans.\n if (info.boolean && ctx.hyperscript) {\n value = ''\n }\n\n // VDOM, Vue, and React accept `style` as object.\n if (\n info.property === 'style' &&\n typeof value === 'string' &&\n (ctx.react || ctx.vue || ctx.vdom)\n ) {\n value = parseStyle(value, name)\n }\n\n if (ctx.vue) {\n if (info.property !== 'style') subprop = 'attrs'\n } else if (!info.mustUseProperty) {\n if (ctx.vdom) {\n if (info.property !== 'style') subprop = 'attributes'\n } else if (ctx.hyperscript) {\n subprop = 'attrs'\n }\n }\n\n if (subprop) {\n if (!props[subprop]) props[subprop] = {}\n props[subprop][info.attribute] = value\n } else if (info.space && ctx.react) {\n props[hastToReact[info.property] || info.property] = value\n } else {\n props[info.attribute] = value\n }\n}\n\n// Check if `h` is `react.createElement`.\nfunction react(h) {\n var node = h && h('div')\n return Boolean(\n node && ('_owner' in node || '_store' in node) && node.key == null\n )\n}\n\n// Check if `h` is `hyperscript`.\nfunction hyperscript(h) {\n return Boolean(h && h.context && h.cleanup)\n}\n\n// Check if `h` is `virtual-dom/h`.\nfunction vdom(h) {\n return h && h('div').type === 'VirtualNode'\n}\n\nfunction vue(h) {\n var node = h && h('div')\n return Boolean(node && node.context && node.context._isVue)\n}\n\nfunction parseStyle(value, tagName) {\n var result = {}\n\n try {\n style(value, iterator)\n } catch (error) {\n error.message =\n tagName + '[style]' + error.message.slice('undefined'.length)\n throw error\n }\n\n return result\n\n function iterator(name, value) {\n if (name.slice(0, 4) === '-ms-') name = 'ms-' + name.slice(4)\n result[name.replace(/-([a-z])/g, styleReplacer)] = value\n }\n}\n\nfunction styleReplacer($0, $1) {\n return $1.toUpperCase()\n}\n","'use strict'\n\nvar xtend = require('xtend')\nvar Schema = require('./schema')\n\nmodule.exports = merge\n\nfunction merge(definitions) {\n var length = definitions.length\n var property = []\n var normal = []\n var index = -1\n var info\n var space\n\n while (++index < length) {\n info = definitions[index]\n property.push(info.property)\n normal.push(info.normal)\n space = info.space\n }\n\n return new Schema(\n xtend.apply(null, property),\n xtend.apply(null, normal),\n space\n )\n}\n","'use strict'\n\nmodule.exports = Schema\n\nvar proto = Schema.prototype\n\nproto.space = null\nproto.normal = {}\nproto.property = {}\n\nfunction Schema(property, normal, space) {\n this.property = property\n this.normal = normal\n\n if (space) {\n this.space = space\n }\n}\n","'use strict'\n\nvar create = require('./util/create')\n\nmodule.exports = create({\n space: 'xlink',\n transform: xlinkTransform,\n properties: {\n xLinkActuate: null,\n xLinkArcRole: null,\n xLinkHref: null,\n xLinkRole: null,\n xLinkShow: null,\n xLinkTitle: null,\n xLinkType: null\n }\n})\n\nfunction xlinkTransform(_, prop) {\n return 'xlink:' + prop.slice(5).toLowerCase()\n}\n","'use strict'\n\nvar Info = require('./info')\nvar types = require('./types')\n\nmodule.exports = DefinedInfo\n\nDefinedInfo.prototype = new Info()\nDefinedInfo.prototype.defined = true\n\nvar checks = [\n 'boolean',\n 'booleanish',\n 'overloadedBoolean',\n 'number',\n 'commaSeparated',\n 'spaceSeparated',\n 'commaOrSpaceSeparated'\n]\nvar checksLength = checks.length\n\nfunction DefinedInfo(property, attribute, mask, space) {\n var index = -1\n var check\n\n mark(this, 'space', space)\n\n Info.call(this, property, attribute)\n\n while (++index < checksLength) {\n check = checks[index]\n mark(this, check, (mask & types[check]) === types[check])\n }\n}\n\nfunction mark(values, key, value) {\n if (value) {\n values[key] = value\n }\n}\n","'use strict'\n\nmodule.exports = Info\n\nvar proto = Info.prototype\n\nproto.space = null\nproto.attribute = null\nproto.property = null\nproto.boolean = false\nproto.booleanish = false\nproto.overloadedBoolean = false\nproto.number = false\nproto.commaSeparated = false\nproto.spaceSeparated = false\nproto.commaOrSpaceSeparated = false\nproto.mustUseProperty = false\nproto.defined = false\n\nfunction Info(property, attribute) {\n this.property = property\n this.attribute = attribute\n}\n","'use strict'\n\nvar create = require('./util/create')\n\nmodule.exports = create({\n space: 'xml',\n transform: xmlTransform,\n properties: {\n xmlLang: null,\n xmlBase: null,\n xmlSpace: null\n }\n})\n\nfunction xmlTransform(_, prop) {\n return 'xml:' + prop.slice(3).toLowerCase()\n}\n","'use strict'\n\nvar create = require('./util/create')\nvar caseInsensitiveTransform = require('./util/case-insensitive-transform')\n\nmodule.exports = create({\n space: 'xmlns',\n attributes: {\n xmlnsxlink: 'xmlns:xlink'\n },\n transform: caseInsensitiveTransform,\n properties: {\n xmlns: null,\n xmlnsXLink: null\n }\n})\n","'use strict'\n\nvar caseSensitiveTransform = require('./case-sensitive-transform')\n\nmodule.exports = caseInsensitiveTransform\n\nfunction caseInsensitiveTransform(attributes, property) {\n return caseSensitiveTransform(attributes, property.toLowerCase())\n}\n","'use strict'\n\nmodule.exports = caseSensitiveTransform\n\nfunction caseSensitiveTransform(attributes, attribute) {\n return attribute in attributes ? attributes[attribute] : attribute\n}\n","'use strict'\n\nvar types = require('./util/types')\nvar create = require('./util/create')\n\nvar booleanish = types.booleanish\nvar number = types.number\nvar spaceSeparated = types.spaceSeparated\n\nmodule.exports = create({\n transform: ariaTransform,\n properties: {\n ariaActiveDescendant: null,\n ariaAtomic: booleanish,\n ariaAutoComplete: null,\n ariaBusy: booleanish,\n ariaChecked: booleanish,\n ariaColCount: number,\n ariaColIndex: number,\n ariaColSpan: number,\n ariaControls: spaceSeparated,\n ariaCurrent: null,\n ariaDescribedBy: spaceSeparated,\n ariaDetails: null,\n ariaDisabled: booleanish,\n ariaDropEffect: spaceSeparated,\n ariaErrorMessage: null,\n ariaExpanded: booleanish,\n ariaFlowTo: spaceSeparated,\n ariaGrabbed: booleanish,\n ariaHasPopup: null,\n ariaHidden: booleanish,\n ariaInvalid: null,\n ariaKeyShortcuts: null,\n ariaLabel: null,\n ariaLabelledBy: spaceSeparated,\n ariaLevel: number,\n ariaLive: null,\n ariaModal: booleanish,\n ariaMultiLine: booleanish,\n ariaMultiSelectable: booleanish,\n ariaOrientation: null,\n ariaOwns: spaceSeparated,\n ariaPlaceholder: null,\n ariaPosInSet: number,\n ariaPressed: booleanish,\n ariaReadOnly: booleanish,\n ariaRelevant: null,\n ariaRequired: booleanish,\n ariaRoleDescription: spaceSeparated,\n ariaRowCount: number,\n ariaRowIndex: number,\n ariaRowSpan: number,\n ariaSelected: booleanish,\n ariaSetSize: number,\n ariaSort: null,\n ariaValueMax: number,\n ariaValueMin: number,\n ariaValueNow: number,\n ariaValueText: null,\n role: null\n }\n})\n\nfunction ariaTransform(_, prop) {\n return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()\n}\n","'use strict'\n\nexports.parse = parse\nexports.stringify = stringify\n\nvar comma = ','\nvar space = ' '\nvar empty = ''\n\n// Parse comma-separated tokens to an array.\nfunction parse(value) {\n var values = []\n var input = String(value || empty)\n var index = input.indexOf(comma)\n var lastIndex = 0\n var end = false\n var val\n\n while (!end) {\n if (index === -1) {\n index = input.length\n end = true\n }\n\n val = input.slice(lastIndex, index).trim()\n\n if (val || !end) {\n values.push(val)\n }\n\n lastIndex = index + 1\n index = input.indexOf(comma, lastIndex)\n }\n\n return values\n}\n\n// Compile an array to comma-separated tokens.\n// `options.padLeft` (default: `true`) pads a space left of each token, and\n// `options.padRight` (default: `false`) pads a space to the right of each token.\nfunction stringify(values, options) {\n var settings = options || {}\n var left = settings.padLeft === false ? empty : space\n var right = settings.padRight ? space : empty\n\n // Ensure the last empty entry is seen.\n if (values[values.length - 1] === empty) {\n values = values.concat(empty)\n }\n\n return values.join(right + comma + left).trim()\n}\n","module.exports = flow\n\nvar repeat = require('repeat-string')\n\nfunction flow(parent, context) {\n var children = parent.children || []\n var results = []\n var index = -1\n var child\n\n while (++index < children.length) {\n child = children[index]\n\n results.push(\n context.handle(child, parent, context, {before: '\\n', after: '\\n'})\n )\n\n if (index + 1 < children.length) {\n results.push(between(child, children[index + 1]))\n }\n }\n\n return results.join('')\n\n function between(left, right) {\n var index = -1\n var result\n\n while (++index < context.join.length) {\n result = context.join[index](left, right, parent, context)\n\n if (result === true || result === 1) {\n break\n }\n\n if (typeof result === 'number') {\n return repeat('\\n', 1 + Number(result))\n }\n\n if (result === false) {\n return '\\n\\n\\n\\n'\n }\n }\n\n return '\\n\\n'\n }\n}\n","module.exports = indentLines\n\nvar eol = /\\r?\\n|\\r/g\n\nfunction indentLines(value, map) {\n var result = []\n var start = 0\n var line = 0\n var match\n\n while ((match = eol.exec(value))) {\n one(value.slice(start, match.index))\n result.push(match[0])\n start = match.index + match[0].length\n line++\n }\n\n one(value.slice(start))\n\n return result.join('')\n\n function one(value) {\n result.push(map(value, line, !value))\n }\n}\n","module.exports = safe\n\nfunction safe(context, input, config) {\n var value = (config.before || '') + (input || '') + (config.after || '')\n var positions = []\n var result = []\n var infos = {}\n var index = -1\n var before\n var after\n var position\n var pattern\n var expression\n var match\n var start\n var end\n\n while (++index < context.unsafe.length) {\n pattern = context.unsafe[index]\n\n if (\n !inScope(context.stack, pattern.inConstruct, true) ||\n inScope(context.stack, pattern.notInConstruct)\n ) {\n continue\n }\n\n expression =\n pattern._compiled || (pattern._compiled = toExpression(pattern))\n\n while ((match = expression.exec(value))) {\n before = 'before' in pattern || pattern.atBreak\n after = 'after' in pattern\n position = match.index + (before ? match[1].length : 0)\n\n if (positions.indexOf(position) === -1) {\n positions.push(position)\n infos[position] = {before: before, after: after}\n } else {\n if (infos[position].before && !before) {\n infos[position].before = false\n }\n\n if (infos[position].after && !after) {\n infos[position].after = false\n }\n }\n }\n }\n\n positions.sort(numerical)\n\n start = config.before ? config.before.length : 0\n end = value.length - (config.after ? config.after.length : 0)\n index = -1\n\n while (++index < positions.length) {\n position = positions[index]\n\n if (\n // Character before or after matched:\n position < start ||\n position >= end\n ) {\n continue\n }\n\n // If this character is supposed to be escaped because it has a condition on\n // the next character, and the next character is definitly being escaped,\n // then skip this escape.\n if (\n position + 1 < end &&\n positions[index + 1] === position + 1 &&\n infos[position].after &&\n !infos[position + 1].before &&\n !infos[position + 1].after\n ) {\n continue\n }\n\n if (start !== position) {\n result.push(value.slice(start, position))\n }\n\n start = position\n\n if (\n /[!-/:-@[-`{-~]/.test(value.charAt(position)) &&\n (!config.encode || config.encode.indexOf(value.charAt(position)) === -1)\n ) {\n // Character escape.\n result.push('\\\\')\n } else {\n // Character reference.\n result.push(\n '&#x' + value.charCodeAt(position).toString(16).toUpperCase() + ';'\n )\n start++\n }\n }\n\n result.push(value.slice(start, end))\n\n return result.join('')\n}\n\nfunction inScope(stack, list, none) {\n var index\n\n if (!list) {\n return none\n }\n\n if (typeof list === 'string') {\n list = [list]\n }\n\n index = -1\n\n while (++index < list.length) {\n if (stack.indexOf(list[index]) !== -1) {\n return true\n }\n }\n\n return false\n}\n\nfunction toExpression(pattern) {\n var before = pattern.before ? '(?:' + pattern.before + ')' : ''\n var after = pattern.after ? '(?:' + pattern.after + ')' : ''\n\n if (pattern.atBreak) {\n before = '[\\\\r\\\\n][\\\\t ]*' + before\n }\n\n return new RegExp(\n (before ? '(' + before + ')' : '') +\n (/[|\\\\{}()[\\]^$+*?.-]/.test(pattern.character) ? '\\\\' : '') +\n pattern.character +\n (after || ''),\n 'g'\n )\n}\n\nfunction numerical(a, b) {\n return a - b\n}\n","var emoji = require('emoji-regex')\r\n\r\nmodule.exports = BananaSlug\r\n\r\nvar own = Object.hasOwnProperty\r\nvar whitespace = /\\s/g\r\nvar specials = /[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~’]/g\r\n\r\nfunction BananaSlug () {\r\n var self = this\r\n\r\n if (!(self instanceof BananaSlug)) return new BananaSlug()\r\n\r\n self.reset()\r\n}\r\n\r\n/**\r\n * Generate a unique slug.\r\n * @param {string} value String of text to slugify\r\n * @param {boolean} [false] Keep the current case, otherwise make all lowercase\r\n * @return {string} A unique slug string\r\n */\r\nBananaSlug.prototype.slug = function (value, maintainCase) {\r\n var self = this\r\n var slug = slugger(value, maintainCase === true)\r\n var originalSlug = slug\r\n\r\n while (own.call(self.occurrences, slug)) {\r\n self.occurrences[originalSlug]++\r\n slug = originalSlug + '-' + self.occurrences[originalSlug]\r\n }\r\n\r\n self.occurrences[slug] = 0\r\n\r\n return slug\r\n}\r\n\r\n/**\r\n * Reset - Forget all previous slugs\r\n * @return void\r\n */\r\nBananaSlug.prototype.reset = function () {\r\n this.occurrences = Object.create(null)\r\n}\r\n\r\nfunction slugger (string, maintainCase) {\r\n if (typeof string !== 'string') return ''\r\n if (!maintainCase) string = string.toLowerCase()\r\n\r\n return string.trim()\r\n .replace(specials, '')\r\n .replace(emoji(), '')\r\n .replace(whitespace, '-')\r\n}\r\n\r\nBananaSlug.slug = slugger\r\n","'use strict'\n\nmodule.exports = toExpression\n\n// Transform a string into an applicable expression.\nfunction toExpression(value) {\n return new RegExp('^(' + value + ')$', 'i')\n}\n","'use strict'\n\nvar repeat = require('repeat-string')\nvar convert = require('hast-util-is-element/convert')\nvar findAfter = require('unist-util-find-after')\n\nmodule.exports = toText\n\nvar searchLineFeeds = /\\n/g\nvar searchTabOrSpaces = /[\\t ]+/g\n\nvar br = convert('br')\nvar p = convert('p')\nvar cell = convert(['th', 'td'])\nvar row = convert('tr')\n\n// Note that we don’t need to include void elements here as they don’t have text.\n// See: \nvar notRendered = convert([\n // List from: \n 'datalist',\n 'head',\n 'noembed',\n 'noframes',\n 'rp',\n 'script',\n 'style',\n 'template',\n 'title',\n // Act as if we support scripting.\n 'noscript',\n // Hidden attribute.\n hidden,\n // From: \n closedDialog\n])\n\n// See: \nvar blockOrCaption = convert([\n 'caption', // `table-caption`\n // Page\n 'html',\n 'body',\n // Flow content\n 'address',\n 'blockquote',\n 'center', // Legacy\n 'dialog',\n 'div',\n 'figure',\n 'figcaption',\n 'footer',\n 'form,',\n 'header',\n 'hr',\n 'legend',\n 'listing', // Legacy\n 'main',\n 'p',\n 'plaintext', // Legacy\n 'pre',\n 'xmp', // Legacy\n // Sections and headings\n 'article',\n 'aside',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hgroup',\n 'nav',\n 'section',\n // Lists\n 'dir', // Legacy\n 'dd',\n 'dl',\n 'dt',\n 'menu',\n 'ol',\n 'ul'\n])\n\n// Implementation of the `innerText` getter:\n// \n// Note that we act as if `node` is being rendered, and as if we’re a\n// CSS-supporting user agent.\nfunction toText(node) {\n var children = node.children || []\n var block = blockOrCaption(node)\n var whiteSpace = inferWhiteSpace(node, {})\n var index = -1\n var results\n var result\n var value\n var count\n\n // Treat `text` and `comment` as having normal white-space.\n // This deviates from the spec as in the DOM the node’s `.data` has to be\n // returned.\n // If you want that behavior use `hast-util-to-string`.\n // All other nodes are later handled as if they are `element`s (so the\n // algorithm also works on a `root`).\n // Nodes without children are treated as a void element, so `doctype` is thus\n // ignored.\n if (node.type === 'text' || node.type === 'comment') {\n return collectText(node, {\n whiteSpace: whiteSpace,\n breakBefore: true,\n breakAfter: true\n })\n }\n\n // 1. If this element is not being rendered, or if the user agent is a\n // non-CSS user agent, then return the same value as the textContent IDL\n // attribute on this element.\n //\n // Note: we’re not supporting stylesheets so we’re acting as if the node\n // is rendered.\n //\n // If you want that behavior use `hast-util-to-string`.\n // Important: we’ll have to account for this later though.\n\n // 2. Let results be a new empty list.\n results = []\n\n // 3. For each child node node of this element:\n while (++index < children.length) {\n // 3.1. Let current be the list resulting in running the inner text\n // collection steps with node.\n // Each item in results will either be a JavaScript string or a\n // positive integer (a required line break count).\n // 3.2. For each item item in current, append item to results.\n results = results.concat(\n innerTextCollection(children[index], index, node, {\n whiteSpace: whiteSpace,\n breakBefore: index ? null : block,\n breakAfter:\n index < children.length - 1 ? br(children[index + 1]) : block\n })\n )\n }\n\n // 4. Remove any items from results that are the empty string.\n // 5. Remove any runs of consecutive required line break count items at the\n // start or end of results.\n // 6. Replace each remaining run of consecutive required line break count\n // items with a string consisting of as many U+000A LINE FEED (LF)\n // characters as the maximum of the values in the required line break\n // count items.\n index = -1\n result = []\n\n while (++index < results.length) {\n value = results[index]\n\n if (typeof value === 'number') {\n if (count !== undefined && value > count) count = value\n } else if (value) {\n if (count) result.push(repeat('\\n', count))\n count = 0\n result.push(value)\n }\n }\n\n // 7. Return the concatenation of the string items in results.\n return result.join('')\n}\n\n// \nfunction innerTextCollection(node, index, parent, options) {\n if (node.type === 'element') {\n return collectElement(node, index, parent, options)\n }\n\n if (node.type === 'text') {\n return [\n options.whiteSpace === 'normal'\n ? collectText(node, options)\n : collectPreText(node, options)\n ]\n }\n\n return []\n}\n\n// Collect an element.\nfunction collectElement(node, _, parent, options) {\n // First we infer the `white-space` property.\n var whiteSpace = inferWhiteSpace(node, options)\n var children = node.children || []\n var index = -1\n var items = []\n var prefix\n var suffix\n\n // We’re ignoring point 3, and exiting without any content here, because we\n // deviated from the spec in `toText` at step 3.\n if (notRendered(node)) {\n return items\n }\n\n // Note: we first detect if there is going to be a break before or after the\n // contents, as that changes the white-space handling.\n\n // 2. If node’s computed value of `visibility` is not `visible`, then return\n // items.\n //\n // Note: Ignored, as everything is visible by default user agent styles.\n\n // 3. If node is not being rendered, then return items. [...]\n //\n // Note: We already did this above.\n\n // See `collectText` for step 4.\n\n // 5. If node is a `
    ` element, then append a string containing a single\n // U+000A LINE FEED (LF) character to items.\n if (br(node)) {\n suffix = '\\n'\n }\n\n // 7. If node’s computed value of `display` is `table-row`, and node’s CSS\n // box is not the last `table-row` box of the nearest ancestor `table`\n // box, then append a string containing a single U+000A LINE FEED (LF)\n // character to items.\n //\n // See: \n // Note: needs further investigation as this does not account for implicit\n // rows.\n else if (row(node) && findAfter(parent, node, row)) {\n suffix = '\\n'\n }\n\n // 8. If node is a `

    ` element, then append 2 (a required line break count)\n // at the beginning and end of items.\n else if (p(node)) {\n prefix = 2\n suffix = 2\n }\n\n // 9. If node’s used value of `display` is block-level or `table-caption`,\n // then append 1 (a required line break count) at the beginning and end of\n // items.\n else if (blockOrCaption(node)) {\n prefix = 1\n suffix = 1\n }\n\n // 1. Let items be the result of running the inner text collection steps with\n // each child node of node in tree order, and then concatenating the\n // results to a single list.\n while (++index < children.length) {\n items = items.concat(\n innerTextCollection(children[index], index, node, {\n whiteSpace: whiteSpace,\n breakBefore: index ? null : prefix,\n breakAfter:\n index < children.length - 1 ? br(children[index + 1]) : suffix\n })\n )\n }\n\n // 6. If node’s computed value of `display` is `table-cell`, and node’s CSS\n // box is not the last `table-cell` box of its enclosing `table-row` box,\n // then append a string containing a single U+0009 CHARACTER TABULATION\n // (tab) character to items.\n //\n // See: \n if (cell(node) && findAfter(parent, node, cell)) {\n items.push('\\t')\n }\n\n // Add the pre- and suffix.\n if (prefix) items.unshift(prefix)\n if (suffix) items.push(suffix)\n\n return items\n}\n\n// 4. If node is a Text node, then for each CSS text box produced by node,\n// in content order, compute the text of the box after application of the\n// CSS `white-space` processing rules and `text-transform` rules, set\n// items to the list of the resulting strings, and return items.\n// The CSS `white-space` processing rules are slightly modified:\n// collapsible spaces at the end of lines are always collapsed, but they\n// are only removed if the line is the last line of the block, or it ends\n// with a br element.\n// Soft hyphens should be preserved.\n//\n// Note: See `collectText` and `collectPreText`.\n// Note: we don’t deal with `text-transform`, no element has that by\n// default.\n//\n// See: \nfunction collectText(node, options) {\n var value = String(node.value)\n var lines = []\n var result = []\n var start = 0\n var index = -1\n var match\n var end\n var join\n\n while (start < value.length) {\n searchLineFeeds.lastIndex = start\n match = searchLineFeeds.exec(value)\n end = match ? match.index : value.length\n\n lines.push(\n // Any sequence of collapsible spaces and tabs immediately preceding or\n // following a segment break is removed.\n trimAndcollapseSpacesAndTabs(\n // [...] ignoring bidi formatting characters (characters with the\n // Bidi_Control property [UAX9]: ALM, LTR, RTL, LRE-RLO, LRI-PDI) as if\n // they were not there.\n value\n .slice(start, end)\n .replace(/[\\u061c\\u200e\\u200f\\u202a-\\u202e\\u2066-\\u2069]/g, ''),\n options.breakBefore,\n options.breakAfter\n )\n )\n\n start = end + 1\n }\n\n // Collapsible segment breaks are transformed for rendering according to the\n // segment break transformation rules.\n // So here we jump to 4.1.2 of [CSSTEXT]:\n // Any collapsible segment break immediately following another collapsible\n // segment break is removed\n while (++index < lines.length) {\n // * If the character immediately before or immediately after the segment\n // break is the zero-width space character (U+200B), then the break is\n // removed, leaving behind the zero-width space.\n if (\n lines[index].charCodeAt(lines[index].length - 1) === 0x200b /* ZWSP */ ||\n (index < lines.length - 1 &&\n lines[index + 1].charCodeAt(0) === 0x200b) /* ZWSP */\n ) {\n result.push(lines[index])\n join = ''\n }\n\n // * Otherwise, if the East Asian Width property [UAX11] of both the\n // character before and after the segment break is Fullwidth, Wide, or\n // Halfwidth (not Ambiguous), and neither side is Hangul, then the\n // segment break is removed.\n //\n // Note: ignored.\n // * Otherwise, if the writing system of the segment break is Chinese,\n // Japanese, or Yi, and the character before or after the segment break\n // is punctuation or a symbol (Unicode general category P* or S*) and\n // has an East Asian Width property of Ambiguous, and the character on\n // the other side of the segment break is Fullwidth, Wide, or Halfwidth,\n // and not Hangul, then the segment break is removed.\n //\n // Note: ignored.\n\n // * Otherwise, the segment break is converted to a space (U+0020).\n else if (lines[index]) {\n if (join) result.push(join)\n result.push(lines[index])\n join = ' '\n }\n }\n\n return result.join('')\n}\n\nfunction collectPreText(node) {\n return String(node.value)\n}\n\n// 3. Every collapsible tab is converted to a collapsible space (U+0020).\n// 4. Any collapsible space immediately following another collapsible\n// space—even one outside the boundary of the inline containing that\n// space, provided both spaces are within the same inline formatting\n// context—is collapsed to have zero advance width. (It is invisible,\n// but retains its soft wrap opportunity, if any.)\nfunction trimAndcollapseSpacesAndTabs(value, breakBefore, breakAfter) {\n var result = []\n var start = 0\n var match\n var end\n\n while (start < value.length) {\n searchTabOrSpaces.lastIndex = start\n match = searchTabOrSpaces.exec(value)\n end = match ? match.index : value.length\n\n // If we’re not directly after a segment break, but there was white space,\n // add an empty value that will be turned into a space.\n if (!start && !end && match && !breakBefore) {\n result.push('')\n }\n\n if (start !== end) {\n result.push(value.slice(start, end))\n }\n\n start = match ? end + match[0].length : end\n }\n\n // If we reached the end, there was trailing white space, and there’s no\n // segment break after this node, add an empty value that will be turned\n // into a space.\n if (start !== end && !breakAfter) {\n result.push('')\n }\n\n return result.join(' ')\n}\n\n// We don’t support void elements here (so `nobr wbr` -> `normal` is ignored).\nfunction inferWhiteSpace(node, options) {\n var props = node.properties || {}\n var inherit = options.whiteSpace || 'normal'\n\n switch (node.tagName) {\n case 'listing':\n case 'plaintext':\n case 'xmp':\n return 'pre'\n case 'nobr':\n return 'nowrap'\n case 'pre':\n return props.wrap ? 'pre-wrap' : 'pre'\n case 'td':\n case 'th':\n return props.noWrap ? 'nowrap' : inherit\n case 'textarea':\n return 'pre-wrap'\n default:\n return inherit\n }\n}\n\nfunction hidden(node) {\n return (node.properties || {}).hidden\n}\n\nfunction closedDialog(node) {\n return node.tagName === 'dialog' && !(node.properties || {}).open\n}\n","'use strict'\n\nvar s = require('hastscript/svg')\nvar h = require('hastscript')\nvar find = require('property-information/find')\nvar html = require('property-information/html')\nvar svg = require('property-information/svg')\nvar vfileLocation = require('vfile-location')\nvar ns = require('web-namespaces')\n\nmodule.exports = wrapper\n\nvar own = {}.hasOwnProperty\n\n// Handlers.\nvar map = {\n '#document': root,\n '#document-fragment': root,\n '#text': text,\n '#comment': comment,\n '#documentType': doctype\n}\n\n// Wrapper to normalise options.\nfunction wrapper(ast, options) {\n var settings = options || {}\n var file\n\n if (settings.messages) {\n file = settings\n settings = {}\n } else {\n file = settings.file\n }\n\n return transform(ast, {\n schema: settings.space === 'svg' ? svg : html,\n file: file,\n verbose: settings.verbose\n })\n}\n\n// Transform a node.\nfunction transform(ast, config) {\n var schema = config.schema\n var fn = own.call(map, ast.nodeName) ? map[ast.nodeName] : element\n var children\n var result\n var position\n\n if (fn === element) {\n config.schema = ast.namespaceURI === ns.svg ? svg : html\n }\n\n if (ast.childNodes) {\n children = nodes(ast.childNodes, config)\n }\n\n result = fn(ast, children, config)\n\n if (ast.sourceCodeLocation && config.file) {\n position = location(result, ast.sourceCodeLocation, config)\n\n if (position) {\n config.location = true\n result.position = position\n }\n }\n\n config.schema = schema\n\n return result\n}\n\n// Transform children.\nfunction nodes(children, config) {\n var index = -1\n var result = []\n\n while (++index < children.length) {\n result[index] = transform(children[index], config)\n }\n\n return result\n}\n\n// Transform a document.\n// Stores `ast.quirksMode` in `node.data.quirksMode`.\nfunction root(ast, children, config) {\n var result = {\n type: 'root',\n children: children,\n data: {quirksMode: ast.mode === 'quirks' || ast.mode === 'limited-quirks'}\n }\n var doc\n var location\n\n if (config.file && config.location) {\n doc = String(config.file)\n location = vfileLocation(doc)\n result.position = {\n start: location.toPoint(0),\n end: location.toPoint(doc.length)\n }\n }\n\n return result\n}\n\n// Transform a doctype.\nfunction doctype(ast) {\n return {\n type: 'doctype',\n name: ast.name || '',\n public: ast.publicId || null,\n system: ast.systemId || null\n }\n}\n\n// Transform a text.\nfunction text(ast) {\n return {type: 'text', value: ast.value}\n}\n\n// Transform a comment.\nfunction comment(ast) {\n return {type: 'comment', value: ast.data}\n}\n\n// Transform an element.\nfunction element(ast, children, config) {\n var fn = config.schema.space === 'svg' ? s : h\n var props = {}\n var index = -1\n var result\n var attribute\n var pos\n var start\n var end\n\n while (++index < ast.attrs.length) {\n attribute = ast.attrs[index]\n props[(attribute.prefix ? attribute.prefix + ':' : '') + attribute.name] =\n attribute.value\n }\n\n result = fn(ast.tagName, props, children)\n\n if (result.tagName === 'template' && 'content' in ast) {\n pos = ast.sourceCodeLocation\n start = pos && pos.startTag && position(pos.startTag).end\n end = pos && pos.endTag && position(pos.endTag).start\n\n result.content = transform(ast.content, config)\n\n if ((start || end) && config.file) {\n result.content.position = {start: start, end: end}\n }\n }\n\n return result\n}\n\n// Create clean positional information.\nfunction location(node, location, config) {\n var result = position(location)\n var tail\n var key\n var props\n\n if (node.type === 'element') {\n tail = node.children[node.children.length - 1]\n\n // Bug for unclosed with children.\n // See: .\n if (!location.endTag && tail && tail.position && tail.position.end) {\n result.end = Object.assign({}, tail.position.end)\n }\n\n if (config.verbose) {\n props = {}\n\n for (key in location.attrs) {\n props[find(config.schema, key).property] = position(location.attrs[key])\n }\n\n node.data = {\n position: {\n opening: position(location.startTag),\n closing: location.endTag ? position(location.endTag) : null,\n properties: props\n }\n }\n }\n }\n\n return result\n}\n\nfunction position(loc) {\n var start = point({\n line: loc.startLine,\n column: loc.startCol,\n offset: loc.startOffset\n })\n var end = point({\n line: loc.endLine,\n column: loc.endCol,\n offset: loc.endOffset\n })\n return start || end ? {start: start, end: end} : null\n}\n\nfunction point(point) {\n return point.line && point.column ? point : null\n}\n","'use strict'\n\nvar find = require('property-information/find')\nvar normalize = require('property-information/normalize')\nvar parseSelector = require('hast-util-parse-selector')\nvar spaces = require('space-separated-tokens').parse\nvar commas = require('comma-separated-tokens').parse\n\nmodule.exports = factory\n\nvar own = {}.hasOwnProperty\n\nfunction factory(schema, defaultTagName, caseSensitive) {\n var adjust = caseSensitive ? createAdjustMap(caseSensitive) : null\n\n return h\n\n // Hyperscript compatible DSL for creating virtual hast trees.\n function h(selector, properties) {\n var node = parseSelector(selector, defaultTagName)\n var children = Array.prototype.slice.call(arguments, 2)\n var name = node.tagName.toLowerCase()\n var property\n\n node.tagName = adjust && own.call(adjust, name) ? adjust[name] : name\n\n if (properties && isChildren(properties, node)) {\n children.unshift(properties)\n properties = null\n }\n\n if (properties) {\n for (property in properties) {\n addProperty(node.properties, property, properties[property])\n }\n }\n\n addChild(node.children, children)\n\n if (node.tagName === 'template') {\n node.content = {type: 'root', children: node.children}\n node.children = []\n }\n\n return node\n }\n\n function addProperty(properties, key, value) {\n var info\n var property\n var result\n\n // Ignore nullish and NaN values.\n if (value === null || value === undefined || value !== value) {\n return\n }\n\n info = find(schema, key)\n property = info.property\n result = value\n\n // Handle list values.\n if (typeof result === 'string') {\n if (info.spaceSeparated) {\n result = spaces(result)\n } else if (info.commaSeparated) {\n result = commas(result)\n } else if (info.commaOrSpaceSeparated) {\n result = spaces(commas(result).join(' '))\n }\n }\n\n // Accept `object` on style.\n if (property === 'style' && typeof value !== 'string') {\n result = style(result)\n }\n\n // Class-names (which can be added both on the `selector` and here).\n if (property === 'className' && properties.className) {\n result = properties.className.concat(result)\n }\n\n properties[property] = parsePrimitives(info, property, result)\n }\n}\n\nfunction isChildren(value, node) {\n return (\n typeof value === 'string' ||\n 'length' in value ||\n isNode(node.tagName, value)\n )\n}\n\nfunction isNode(tagName, value) {\n var type = value.type\n\n if (tagName === 'input' || !type || typeof type !== 'string') {\n return false\n }\n\n if (typeof value.children === 'object' && 'length' in value.children) {\n return true\n }\n\n type = type.toLowerCase()\n\n if (tagName === 'button') {\n return (\n type !== 'menu' &&\n type !== 'submit' &&\n type !== 'reset' &&\n type !== 'button'\n )\n }\n\n return 'value' in value\n}\n\nfunction addChild(nodes, value) {\n var index\n var length\n\n if (typeof value === 'string' || typeof value === 'number') {\n nodes.push({type: 'text', value: String(value)})\n return\n }\n\n if (typeof value === 'object' && 'length' in value) {\n index = -1\n length = value.length\n\n while (++index < length) {\n addChild(nodes, value[index])\n }\n\n return\n }\n\n if (typeof value !== 'object' || !('type' in value)) {\n throw new Error('Expected node, nodes, or string, got `' + value + '`')\n }\n\n nodes.push(value)\n}\n\n// Parse a (list of) primitives.\nfunction parsePrimitives(info, name, value) {\n var index\n var length\n var result\n\n if (typeof value !== 'object' || !('length' in value)) {\n return parsePrimitive(info, name, value)\n }\n\n length = value.length\n index = -1\n result = []\n\n while (++index < length) {\n result[index] = parsePrimitive(info, name, value[index])\n }\n\n return result\n}\n\n// Parse a single primitives.\nfunction parsePrimitive(info, name, value) {\n var result = value\n\n if (info.number || info.positiveNumber) {\n if (!isNaN(result) && result !== '') {\n result = Number(result)\n }\n } else if (info.boolean || info.overloadedBoolean) {\n // Accept `boolean` and `string`.\n if (\n typeof result === 'string' &&\n (result === '' || normalize(value) === normalize(name))\n ) {\n result = true\n }\n }\n\n return result\n}\n\nfunction style(value) {\n var result = []\n var key\n\n for (key in value) {\n result.push([key, value[key]].join(': '))\n }\n\n return result.join('; ')\n}\n\nfunction createAdjustMap(values) {\n var length = values.length\n var index = -1\n var result = {}\n var value\n\n while (++index < length) {\n value = values[index]\n result[value.toLowerCase()] = value\n }\n\n return result\n}\n","'use strict';\n\nconst Tokenizer = require('../tokenizer');\nconst OpenElementStack = require('./open-element-stack');\nconst FormattingElementList = require('./formatting-element-list');\nconst LocationInfoParserMixin = require('../extensions/location-info/parser-mixin');\nconst ErrorReportingParserMixin = require('../extensions/error-reporting/parser-mixin');\nconst Mixin = require('../utils/mixin');\nconst defaultTreeAdapter = require('../tree-adapters/default');\nconst mergeOptions = require('../utils/merge-options');\nconst doctype = require('../common/doctype');\nconst foreignContent = require('../common/foreign-content');\nconst ERR = require('../common/error-codes');\nconst unicode = require('../common/unicode');\nconst HTML = require('../common/html');\n\n//Aliases\nconst $ = HTML.TAG_NAMES;\nconst NS = HTML.NAMESPACES;\nconst ATTRS = HTML.ATTRS;\n\nconst DEFAULT_OPTIONS = {\n scriptingEnabled: true,\n sourceCodeLocationInfo: false,\n onParseError: null,\n treeAdapter: defaultTreeAdapter\n};\n\n//Misc constants\nconst HIDDEN_INPUT_TYPE = 'hidden';\n\n//Adoption agency loops iteration count\nconst AA_OUTER_LOOP_ITER = 8;\nconst AA_INNER_LOOP_ITER = 3;\n\n//Insertion modes\nconst INITIAL_MODE = 'INITIAL_MODE';\nconst BEFORE_HTML_MODE = 'BEFORE_HTML_MODE';\nconst BEFORE_HEAD_MODE = 'BEFORE_HEAD_MODE';\nconst IN_HEAD_MODE = 'IN_HEAD_MODE';\nconst IN_HEAD_NO_SCRIPT_MODE = 'IN_HEAD_NO_SCRIPT_MODE';\nconst AFTER_HEAD_MODE = 'AFTER_HEAD_MODE';\nconst IN_BODY_MODE = 'IN_BODY_MODE';\nconst TEXT_MODE = 'TEXT_MODE';\nconst IN_TABLE_MODE = 'IN_TABLE_MODE';\nconst IN_TABLE_TEXT_MODE = 'IN_TABLE_TEXT_MODE';\nconst IN_CAPTION_MODE = 'IN_CAPTION_MODE';\nconst IN_COLUMN_GROUP_MODE = 'IN_COLUMN_GROUP_MODE';\nconst IN_TABLE_BODY_MODE = 'IN_TABLE_BODY_MODE';\nconst IN_ROW_MODE = 'IN_ROW_MODE';\nconst IN_CELL_MODE = 'IN_CELL_MODE';\nconst IN_SELECT_MODE = 'IN_SELECT_MODE';\nconst IN_SELECT_IN_TABLE_MODE = 'IN_SELECT_IN_TABLE_MODE';\nconst IN_TEMPLATE_MODE = 'IN_TEMPLATE_MODE';\nconst AFTER_BODY_MODE = 'AFTER_BODY_MODE';\nconst IN_FRAMESET_MODE = 'IN_FRAMESET_MODE';\nconst AFTER_FRAMESET_MODE = 'AFTER_FRAMESET_MODE';\nconst AFTER_AFTER_BODY_MODE = 'AFTER_AFTER_BODY_MODE';\nconst AFTER_AFTER_FRAMESET_MODE = 'AFTER_AFTER_FRAMESET_MODE';\n\n//Insertion mode reset map\nconst INSERTION_MODE_RESET_MAP = {\n [$.TR]: IN_ROW_MODE,\n [$.TBODY]: IN_TABLE_BODY_MODE,\n [$.THEAD]: IN_TABLE_BODY_MODE,\n [$.TFOOT]: IN_TABLE_BODY_MODE,\n [$.CAPTION]: IN_CAPTION_MODE,\n [$.COLGROUP]: IN_COLUMN_GROUP_MODE,\n [$.TABLE]: IN_TABLE_MODE,\n [$.BODY]: IN_BODY_MODE,\n [$.FRAMESET]: IN_FRAMESET_MODE\n};\n\n//Template insertion mode switch map\nconst TEMPLATE_INSERTION_MODE_SWITCH_MAP = {\n [$.CAPTION]: IN_TABLE_MODE,\n [$.COLGROUP]: IN_TABLE_MODE,\n [$.TBODY]: IN_TABLE_MODE,\n [$.TFOOT]: IN_TABLE_MODE,\n [$.THEAD]: IN_TABLE_MODE,\n [$.COL]: IN_COLUMN_GROUP_MODE,\n [$.TR]: IN_TABLE_BODY_MODE,\n [$.TD]: IN_ROW_MODE,\n [$.TH]: IN_ROW_MODE\n};\n\n//Token handlers map for insertion modes\nconst TOKEN_HANDLERS = {\n [INITIAL_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: tokenInInitialMode,\n [Tokenizer.NULL_CHARACTER_TOKEN]: tokenInInitialMode,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: doctypeInInitialMode,\n [Tokenizer.START_TAG_TOKEN]: tokenInInitialMode,\n [Tokenizer.END_TAG_TOKEN]: tokenInInitialMode,\n [Tokenizer.EOF_TOKEN]: tokenInInitialMode\n },\n [BEFORE_HTML_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: tokenBeforeHtml,\n [Tokenizer.NULL_CHARACTER_TOKEN]: tokenBeforeHtml,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagBeforeHtml,\n [Tokenizer.END_TAG_TOKEN]: endTagBeforeHtml,\n [Tokenizer.EOF_TOKEN]: tokenBeforeHtml\n },\n [BEFORE_HEAD_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: tokenBeforeHead,\n [Tokenizer.NULL_CHARACTER_TOKEN]: tokenBeforeHead,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: misplacedDoctype,\n [Tokenizer.START_TAG_TOKEN]: startTagBeforeHead,\n [Tokenizer.END_TAG_TOKEN]: endTagBeforeHead,\n [Tokenizer.EOF_TOKEN]: tokenBeforeHead\n },\n [IN_HEAD_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: tokenInHead,\n [Tokenizer.NULL_CHARACTER_TOKEN]: tokenInHead,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: misplacedDoctype,\n [Tokenizer.START_TAG_TOKEN]: startTagInHead,\n [Tokenizer.END_TAG_TOKEN]: endTagInHead,\n [Tokenizer.EOF_TOKEN]: tokenInHead\n },\n [IN_HEAD_NO_SCRIPT_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: tokenInHeadNoScript,\n [Tokenizer.NULL_CHARACTER_TOKEN]: tokenInHeadNoScript,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: misplacedDoctype,\n [Tokenizer.START_TAG_TOKEN]: startTagInHeadNoScript,\n [Tokenizer.END_TAG_TOKEN]: endTagInHeadNoScript,\n [Tokenizer.EOF_TOKEN]: tokenInHeadNoScript\n },\n [AFTER_HEAD_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: tokenAfterHead,\n [Tokenizer.NULL_CHARACTER_TOKEN]: tokenAfterHead,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: misplacedDoctype,\n [Tokenizer.START_TAG_TOKEN]: startTagAfterHead,\n [Tokenizer.END_TAG_TOKEN]: endTagAfterHead,\n [Tokenizer.EOF_TOKEN]: tokenAfterHead\n },\n [IN_BODY_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: characterInBody,\n [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagInBody,\n [Tokenizer.END_TAG_TOKEN]: endTagInBody,\n [Tokenizer.EOF_TOKEN]: eofInBody\n },\n [TEXT_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.NULL_CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.COMMENT_TOKEN]: ignoreToken,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: ignoreToken,\n [Tokenizer.END_TAG_TOKEN]: endTagInText,\n [Tokenizer.EOF_TOKEN]: eofInText\n },\n [IN_TABLE_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: characterInTable,\n [Tokenizer.NULL_CHARACTER_TOKEN]: characterInTable,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: characterInTable,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagInTable,\n [Tokenizer.END_TAG_TOKEN]: endTagInTable,\n [Tokenizer.EOF_TOKEN]: eofInBody\n },\n [IN_TABLE_TEXT_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: characterInTableText,\n [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInTableText,\n [Tokenizer.COMMENT_TOKEN]: tokenInTableText,\n [Tokenizer.DOCTYPE_TOKEN]: tokenInTableText,\n [Tokenizer.START_TAG_TOKEN]: tokenInTableText,\n [Tokenizer.END_TAG_TOKEN]: tokenInTableText,\n [Tokenizer.EOF_TOKEN]: tokenInTableText\n },\n [IN_CAPTION_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: characterInBody,\n [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagInCaption,\n [Tokenizer.END_TAG_TOKEN]: endTagInCaption,\n [Tokenizer.EOF_TOKEN]: eofInBody\n },\n [IN_COLUMN_GROUP_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: tokenInColumnGroup,\n [Tokenizer.NULL_CHARACTER_TOKEN]: tokenInColumnGroup,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagInColumnGroup,\n [Tokenizer.END_TAG_TOKEN]: endTagInColumnGroup,\n [Tokenizer.EOF_TOKEN]: eofInBody\n },\n [IN_TABLE_BODY_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: characterInTable,\n [Tokenizer.NULL_CHARACTER_TOKEN]: characterInTable,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: characterInTable,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagInTableBody,\n [Tokenizer.END_TAG_TOKEN]: endTagInTableBody,\n [Tokenizer.EOF_TOKEN]: eofInBody\n },\n [IN_ROW_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: characterInTable,\n [Tokenizer.NULL_CHARACTER_TOKEN]: characterInTable,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: characterInTable,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagInRow,\n [Tokenizer.END_TAG_TOKEN]: endTagInRow,\n [Tokenizer.EOF_TOKEN]: eofInBody\n },\n [IN_CELL_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: characterInBody,\n [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagInCell,\n [Tokenizer.END_TAG_TOKEN]: endTagInCell,\n [Tokenizer.EOF_TOKEN]: eofInBody\n },\n [IN_SELECT_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagInSelect,\n [Tokenizer.END_TAG_TOKEN]: endTagInSelect,\n [Tokenizer.EOF_TOKEN]: eofInBody\n },\n [IN_SELECT_IN_TABLE_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagInSelectInTable,\n [Tokenizer.END_TAG_TOKEN]: endTagInSelectInTable,\n [Tokenizer.EOF_TOKEN]: eofInBody\n },\n [IN_TEMPLATE_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: characterInBody,\n [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagInTemplate,\n [Tokenizer.END_TAG_TOKEN]: endTagInTemplate,\n [Tokenizer.EOF_TOKEN]: eofInTemplate\n },\n [AFTER_BODY_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: tokenAfterBody,\n [Tokenizer.NULL_CHARACTER_TOKEN]: tokenAfterBody,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n [Tokenizer.COMMENT_TOKEN]: appendCommentToRootHtmlElement,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagAfterBody,\n [Tokenizer.END_TAG_TOKEN]: endTagAfterBody,\n [Tokenizer.EOF_TOKEN]: stopParsing\n },\n [IN_FRAMESET_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagInFrameset,\n [Tokenizer.END_TAG_TOKEN]: endTagInFrameset,\n [Tokenizer.EOF_TOKEN]: stopParsing\n },\n [AFTER_FRAMESET_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: insertCharacters,\n [Tokenizer.COMMENT_TOKEN]: appendComment,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagAfterFrameset,\n [Tokenizer.END_TAG_TOKEN]: endTagAfterFrameset,\n [Tokenizer.EOF_TOKEN]: stopParsing\n },\n [AFTER_AFTER_BODY_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: tokenAfterAfterBody,\n [Tokenizer.NULL_CHARACTER_TOKEN]: tokenAfterAfterBody,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n [Tokenizer.COMMENT_TOKEN]: appendCommentToDocument,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagAfterAfterBody,\n [Tokenizer.END_TAG_TOKEN]: tokenAfterAfterBody,\n [Tokenizer.EOF_TOKEN]: stopParsing\n },\n [AFTER_AFTER_FRAMESET_MODE]: {\n [Tokenizer.CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.NULL_CHARACTER_TOKEN]: ignoreToken,\n [Tokenizer.WHITESPACE_CHARACTER_TOKEN]: whitespaceCharacterInBody,\n [Tokenizer.COMMENT_TOKEN]: appendCommentToDocument,\n [Tokenizer.DOCTYPE_TOKEN]: ignoreToken,\n [Tokenizer.START_TAG_TOKEN]: startTagAfterAfterFrameset,\n [Tokenizer.END_TAG_TOKEN]: ignoreToken,\n [Tokenizer.EOF_TOKEN]: stopParsing\n }\n};\n\n//Parser\nclass Parser {\n constructor(options) {\n this.options = mergeOptions(DEFAULT_OPTIONS, options);\n\n this.treeAdapter = this.options.treeAdapter;\n this.pendingScript = null;\n\n if (this.options.sourceCodeLocationInfo) {\n Mixin.install(this, LocationInfoParserMixin);\n }\n\n if (this.options.onParseError) {\n Mixin.install(this, ErrorReportingParserMixin, { onParseError: this.options.onParseError });\n }\n }\n\n // API\n parse(html) {\n const document = this.treeAdapter.createDocument();\n\n this._bootstrap(document, null);\n this.tokenizer.write(html, true);\n this._runParsingLoop(null);\n\n return document;\n }\n\n parseFragment(html, fragmentContext) {\n //NOTE: use